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/logoutAuthRegisterAction
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.
AuthRecoverAction
ecommerce/auth/recoverAuthLoginOauthAction
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.
Cart
CartAddItemsAction
ecommerce/cart/add-itemsAccepts an array of the following:
CartRemoveItemsAction
ecommerce/cart/remove-itemsstring[]CartUpdateItemsAction
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.
CartGetCheckoutUrlAction
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.
WishlistRemoveItemsAction
ecommerce/wishlist/remove-itemsstring[]Customer
CustomerGetCurrentAction
ecommerce/customer/get-currentCustomerAddressGetAllAction
ecommerce/customer/address-get-allCustomerAddressCreateAction
ecommerce/customer/address-createCustomerAddressUpdateAction
ecommerce/customer/address-updateThe ID of the address to update.
CustomerAddressDeleteAction
ecommerce/customer/address-deleteThe ID of the address to delete.
CustomerAddressSetDefaultAction
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.
Review
ProductReviewsCreateAction
ecommerce/product/reviews/create