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.
SubscribeAction
newsletter/subscribe
Initial newsletter subscription from a user.
Input
email
stringrequired
Email is the only required field.
formatemail
source
string
phone
string
Represents a phone number. Formatted as a E.164 number.
pattern^\+?[1-9]\d{1,14}$
person
{ firstName, lastName, salutation, 1 more }
address
{ address1, address2, city, 5 more }
customFields
Record<string, unknown>
Custom fields are a way for implementations to pass arbitrary data to actions, queries, etc.