Canonical actions define the write-operation contract between the frontend and your connector app. When you build an ecommerce connector, you implement action handlers for each of these actions so the frontend can authenticate users, manage carts, and perform other mutations against your commerce backend.
Import these from @laioutr-core/canonical-types/ecommerce.
ecommerce/auth/loginThe email address of the user.
The password of the user.
ecommerce/auth/logoutecommerce/auth/registerThe email address of the user.
The password of the user.
The first name(s) of a person.
The last name(s) of a person.
Salutation of a person as lowercase key.
Title of a person as lowercase key.
ecommerce/auth/recoverecommerce/auth/login-oauthecommerce/auth/logout-oauthecommerce/auth/oauth-callbackThe authorization code returned by Shopify's OAuth server.
The state parameter to prevent CSRF attacks.
ecommerce/cart/add-itemsAccepts an array of the following:
ecommerce/cart/remove-itemsstring[]ecommerce/cart/update-itemsCart line-item id.
The new quantity of the item. Won't update if undefined. Only works for products.
ecommerce/cart/get-checkout-urlecommerce/wishlist/add-itemsThe product id.
The variant id.
ecommerce/wishlist/remove-itemsstring[]ecommerce/customer/get-currentecommerce/customer/address-get-allecommerce/customer/address-createecommerce/customer/address-updateThe ID of the address to update.
ecommerce/customer/address-deleteThe ID of the address to delete.
ecommerce/customer/address-set-defaultThe ID of the address to set as default.
The type of default to set. Not all backends may support this distinction.
ecommerce/product/reviews/create