interface AbandonedCart { /** * Original cart ID * @format GUID */ _id?: string; /** Cart status */ status?: StatusWithLiterals; /** * Time the cart was abandoned * @readonly */ abandonTime?: Date | null; /** Buyer information */ buyerInfo?: BuyerInfo; /** Cart total including currency symbol */ total?: string | null; /** * History activities * @readonly */ activities?: Activity[]; } declare enum Status { ABANDONED = "ABANDONED", RECOVERED = "RECOVERED" } /** @enumType */ type StatusWithLiterals = Status | 'ABANDONED' | 'RECOVERED'; interface BuyerInfo { /** * Wix customer ID * @format GUID */ _id?: string; /** Customer information */ identityType?: IdentityWithLiterals; /** * Customer's email address * @maxLength 50 * @format EMAIL */ email?: string | null; /** * Customer's phone number * @format PHONE */ phone?: string | null; /** Customer's first name */ firstName?: string | null; /** Customer's last name */ lastName?: string | null; } declare enum Identity { /** Customer is the site owner */ ADMIN = "ADMIN", /** Customer is logged in */ MEMBER = "MEMBER", /** Customer is not logged in */ VISITOR = "VISITOR", /** Contact was created for the customer */ CONTACT = "CONTACT" } /** @enumType */ type IdentityWithLiterals = Identity | 'ADMIN' | 'MEMBER' | 'VISITOR' | 'CONTACT'; interface Activity { /** * Log item type * @readonly */ activityType?: ActivityTypeWithLiterals; /** * Comment added to Log item * @maxLength 1000 * @readonly */ message?: string | null; /** * Log item occurrence timestamp * @readonly */ timestamp?: Date | null; /** Custom data for un-typed activities */ customData?: CustomData; } declare enum ActivityType { UNRECOGNIZED_TYPE = "UNRECOGNIZED_TYPE", SCHEDULED = "SCHEDULED", EMAIL_SENT = "EMAIL_SENT", EMAIL_NOT_SENT = "EMAIL_NOT_SENT", NOTIFICATION_SENT = "NOTIFICATION_SENT", TASK_CREATED = "TASK_CREATED", CUSTOM_ACTIVITY = "CUSTOM_ACTIVITY" } /** @enumType */ type ActivityTypeWithLiterals = ActivityType | 'UNRECOGNIZED_TYPE' | 'SCHEDULED' | 'EMAIL_SENT' | 'EMAIL_NOT_SENT' | 'NOTIFICATION_SENT' | 'TASK_CREATED' | 'CUSTOM_ACTIVITY'; interface CustomData { /** * Activity unique namespace * @maxLength 50 */ namespace?: string | null; /** Custom json field for any desired data */ customValue?: Record | null; } interface CartAbandonedEvent { /** @format GUID */ cartId?: string; /** * Time the cart was created * @readonly */ creationTime?: Date | null; /** * Time the cart was abandoned * @readonly */ abandonTime?: Date | null; /** Buyer information */ buyerInfo?: BuyerInfo; /** Amount of items in cart */ itemsCount?: number; /** Coupon ID (if relevant) */ couponId?: string; /** Subtotal of all line items in cart, not before shipping and taxes */ totals?: Totals; /** * Checkout URL - checkout with the abandoned cart details * @format WEB_URL */ checkoutUrl?: string; } interface Totals { /** * Subtotal of all line items in cart, without shipping and taxes * @max 999999999.99 */ subtotal?: number | null; /** * Total cart price * @max 999999999.99 */ total?: number | null; /** Formatted total cart price includes currency symbol */ formattedTotal?: string; } interface CartRecoveredEvent { /** @format GUID */ cartId?: string; /** * Time the cart was recovered * @readonly */ recoveredTime?: Date | null; /** * Time the cart was created * @readonly */ creationTime?: Date | null; /** * Time the cart was abandoned * @readonly */ abandonedTime?: Date | null; } interface CartDeletedEvent { /** @format GUID */ instanceId?: string; /** @format GUID */ cartId?: string; } interface GetAbandonedCartRequest { /** * Cart ID * @format GUID */ _id: string; } interface GetAbandonedCartResponse { /** Cart details */ abandonedCart?: AbandonedCart; } interface QueryAbandonedCartsRequest { /** Query details */ query?: Query; } interface Query { paging?: Paging; /** A filter string, for more information see the intro section */ filter?: string | null; /** Sort string, for more information see the intro section */ sort?: string | null; } interface Paging { /** * The number of items to load * @max 100 */ limit?: number | null; /** The offset since the beginning of the collection */ offset?: number | null; } interface QueryAbandonedCartsResponse { /** Abandoned carts list */ abandonedCarts?: AbandonedCart[]; /** Total number of carts */ totalResults?: number; } interface DeleteCartRequest { /** * Cart ID * @format GUID */ _id?: string; } interface DeleteCartResponse { } interface RedirectToCheckoutRequest { /** * abandoned cart id * @format GUID */ _id?: string; /** * Identifier of the metaSite this cart uses * @format GUID */ metaSiteId?: string; /** * The currency code to create the redirection link with * @format CURRENCY */ currency?: string | null; } interface RawHttpResponse { body?: Uint8Array; statusCode?: number | null; headers?: HeadersEntry[]; } interface HeadersEntry { key?: string; value?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface AbandonedCartCartAbandonedEnvelope { data: CartAbandonedEvent; metadata: BaseEventMetadata; } /** *
* * __Deprecation Notice:__ * * This webhook has been replaced with the * [Abandoned Checkout Created Webhook](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/abandoned-checkout/abandoned-checkout-created) * and will be removed on March 31, 2024. * *
* @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId WIX_STORES.READ_ABANDONED_CARTS * @webhook * @eventType com.wix.ecommerce.cart.abandonment.api.v1.CartAbandonedEvent * @serviceIdentifier wix.cart.abandonment.api.v1.AbandonedCarts * @slug cart_abandoned_event * @deprecated * @replacedBy wix.ecom.abandoned_checkout.api.v1.AbandonedCheckouts.CREATED * @targetRemovalDate 2024-03-31 */ declare function onAbandonedCartCartAbandonedEvent(handler: (event: AbandonedCartCartAbandonedEnvelope) => void | Promise): void; interface AbandonedCartCartRecoveredEnvelope { data: CartRecoveredEvent; metadata: BaseEventMetadata; } /** *
* * __Deprecation Notice:__ * * This webhook has been replaced with the * [Abandoned Checkout Recovered Webhook](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/abandoned-checkout/abandoned-checkout-recovered) * and will be removed on March 31, 2024. * *
* @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Manage Stores * @permissionScopeId SCOPE.STORES.MANAGE-STORES * @permissionScope Read Orders * @permissionScopeId SCOPE.DC-STORES.READ-ORDERS * @permissionScope Read Stores - all read permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.READ-STORES * @permissionScope Manage Restaurants - all permissions * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-STORES.MANAGE-ORDERS * @permissionId WIX_STORES.READ_ABANDONED_CARTS * @webhook * @eventType com.wix.ecommerce.cart.abandonment.api.v1.CartRecoveredEvent * @serviceIdentifier wix.cart.abandonment.api.v1.AbandonedCarts * @slug cart_recovered_event * @deprecated * @replacedBy wix.ecom.abandoned_checkout.api.v1.AbandonedCheckoutService.recovered * @targetRemovalDate 2024-03-31 */ declare function onAbandonedCartCartRecoveredEvent(handler: (event: AbandonedCartCartRecoveredEnvelope) => void | Promise): void; interface QueryAbandonedCartsOptions { /** Query details */ query?: Query; } export { type AbandonedCart, type AbandonedCartCartAbandonedEnvelope, type AbandonedCartCartRecoveredEnvelope, type AccountInfo, type Activity, ActivityType, type ActivityTypeWithLiterals, type BaseEventMetadata, type BuyerInfo, type CartAbandonedEvent, type CartDeletedEvent, type CartRecoveredEvent, type CustomData, type DeleteCartRequest, type DeleteCartResponse, type GetAbandonedCartRequest, type GetAbandonedCartResponse, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, Identity, type IdentityWithLiterals, type MessageEnvelope, type Paging, type Query, type QueryAbandonedCartsOptions, type QueryAbandonedCartsRequest, type QueryAbandonedCartsResponse, type RawHttpResponse, type RedirectToCheckoutRequest, Status, type StatusWithLiterals, type Totals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, onAbandonedCartCartAbandonedEvent, onAbandonedCartCartRecoveredEvent };