Actions
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.
Auth
AuthLoginAction
ecommerce/auth/loginThe email address of the user.
The password of the user.
AuthLogoutAction
ecommerce/auth/logoutunknownAuthRegisterAction
ecommerce/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.
unknownAuthRecoverAction
ecommerce/auth/recoverunknownAuthLoginOauthAction
ecommerce/auth/login-oauthAuthLogoutOauthAction
ecommerce/auth/logout-oauthAuthOauthCallbackAction
ecommerce/auth/oauth-callbackThe authorization code returned by Shopify's OAuth server.
The state parameter to prevent CSRF attacks.
unknownCart
CartAddItemsAction
ecommerce/cart/add-itemsUnion of all possible items that can be added to the cart. If you find yourself in a situation where you need to add items which are not products or discount-codes, you should create a custom action for that or use the type custom.
Accepts an array of the following:
unknownCartRemoveItemsAction
ecommerce/cart/remove-itemsstring[]unknownCartUpdateItemsAction
ecommerce/cart/update-itemsCart line-item id.
The new quantity of the item. Won't update if undefined. Only works for products.
Custom fields are a way for implementations to pass arbitrary data to actions, queries, etc.
unknownCartGetCheckoutUrlAction
ecommerce/cart/get-checkout-urlWishlist
WishlistAddItemsAction
ecommerce/wishlist/add-itemsThe product id.
The variant id.
Custom fields are a way for implementations to pass arbitrary data to actions, queries, etc.
unknownWishlistRemoveItemsAction
ecommerce/wishlist/remove-itemsstring[]unknownCustomer
CustomerGetCurrentAction
ecommerce/customer/get-currentA customer is a person who has an account with the shop.
CustomerAddressGetAllAction
ecommerce/customer/address-get-allCustomerAddressCreateAction
ecommerce/customer/address-createunknownCustomerAddressUpdateAction
ecommerce/customer/address-updateThe ID of the address to update.
unknownCustomerAddressDeleteAction
ecommerce/customer/address-deleteThe ID of the address to delete.
unknownCustomerAddressSetDefaultAction
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.
unknownReview
ProductReviewsCreateAction
ecommerce/product/reviews/create