Ecommerce
Canonical Actions
Actions available for implementation and usage
Canonical actions can be imported from the @laioutr-core/canonical-types package. They represent actions that are common in an ecommerce application and may have different implementations depending on the app.
These can be imported from the @laioutr-core/canonical-types/ecommerce package. They bundle all the actions for the ecommerce domain.
Auth
AuthLoginAction ecommerce/auth/login
Input
email
string required 
The email address of the user.
password
string required 
The password of the user.
Output
success
boolean required 
message
string
AuthLogoutAction ecommerce/auth/logout
Input
customerAccessToken
string required 
Output
AuthRegisterAction ecommerce/auth/register
Input
email
string required 
The email address of the user.
password
string required 
The password of the user.
firstName
__schema0 required 
lastName
__schema1 required 
salutation
__schema2
title
__schema3
address
MailingAddress required 
Output
AuthRecoverAction ecommerce/auth/recover
Input
email
string required 
Output
Cart
CartAddItemsAction ecommerce/cart/add-items
Input
arrayOutput
CartRemoveItemsAction ecommerce/cart/remove-items
Input
arraystringOutput
CartUpdateItemsAction ecommerce/cart/update-items
Input
arrayitemId
string required 
Cart line-item id.
quantity
number
The new quantity of the item. Won't update if undefined. Only works for products.
customFields
CustomFields
Output
Wishlist
WishlistAddItemsAction ecommerce/wishlist/add-items
Input
arrayproductId
string required 
The product id.
variantId
string
The variant id.
customFields
CustomFields
Output
WishlistRemoveItemsAction ecommerce/wishlist/remove-items
Input
arraystringOutput
Customer
CustomerAddressGetAllAction ecommerce/customer/address-get-all
Input
Output
addresses
MailingAddress[] required 
CustomerAddressCreateAction ecommerce/customer/address-create
Input
address
MailingAddress required 
Output
CustomerAddressUpdateAction ecommerce/customer/address-update
Input
id
string required 
The ID of the address to update.
address
object required 
Output
CustomerAddressDeleteAction ecommerce/customer/address-delete
Input
id
string required 
The ID of the address to delete.
Output
CustomerAddressSetDefaultAction ecommerce/customer/address-set-default
Input
id
string required 
The ID of the address to set as default.
type
"shipping" | "billing" required 
The type of default to set. Not all backends may support this distinction.
Output
type AuthLoginActionInfo = ActionInfo<typeof AuthLoginAction>;
type AuthLogoutActionInfo = ActionInfo<typeof AuthLogoutAction>;
type AuthRecoverActionInfo = ActionInfo<typeof AuthRecoverAction>;
type CartAddItemsActionInfo = ActionInfo<typeof CartAddItemsAction>;
type WishlistAddItemsActionInfo = ActionInfo<typeof WishlistAddItemsAction>;