declare module "wix-ecom-backend" { interface GiftCard$7 { /** * Gift Card unique id * @deprecated Gift Card unique id */ _id?: string; /** Gift Card obfuscated code */ obfuscatedCode?: string; /** The currency code of the Gift Card */ currencyCode?: string; /** The gift card currency balance */ balance?: Balance$2; /** Gift card status */ status?: Status$6; /** App def id of the GiftCard provider */ appDefId?: string; /** Used for integration and tracking across different platforms. */ externalId?: string | null; } interface Balance$2 { value?: number; } enum Status$6 { UNDEFINED = "UNDEFINED", VALID = "VALID", EXPIRED = "EXPIRED", DISABLED = "DISABLED" } interface GetRequest { _id: string; } interface GetResponse { giftCard?: DBGiftCard; } interface DBGiftCard { _id?: string; code?: string; providerAppDefId?: string; balance?: number; currencyCode?: string; orderId?: string; _createdDate?: string; } interface ListGiftCardsRequest { query?: Query; } interface Query { /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: any; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting$g[]; /** Paging options to limit and skip the number of items. */ paging?: Paging$4; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } interface Sorting$g { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$g; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$g { ASC = "ASC", DESC = "DESC" } interface Paging$4 { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface ListGiftCardsResponse { giftCards?: DBGiftCard[]; } interface ListTransactionsRequest { query?: Query; } interface ListTransactionsResponse { transactions?: DBTransaction[]; } interface DBTransaction { _id?: string; giftCardId?: string; amount?: number; currencyCode?: string; providerAppDefId?: string; providerTransactionId?: string; _createdDate?: string; orderId?: string; buyerMemberId?: string | null; buyerVisitorId?: string | null; } interface GiftCardProviderWasProvisioned$1 { /** The gift card provider which was installed */ providerAppDefId?: string; providerInstanceId?: string; } interface CreateGiftCardRequest { giftCardData: GiftCardData; } interface GiftCardData { /** Gift Card unique code */ code?: string | null; /** Gift Card initial balance */ balance?: number; /** The currency code of the Gift Card */ currencyCode?: string; /** External orderId by the Gift Card provider */ orderId?: string; } interface CreateGiftCardResponse { giftCard?: GiftCard$7; } interface GetGiftCardRequest$1 { /** Gift Card id */ _id: string; } interface GetGiftCardResponse$1 { giftCard?: GiftCard$7; } interface GetGiftCardByCodeRequest { /** Gift Card code */ code?: string; } interface GetGiftCardByCodeResponse { giftCard?: GiftCard$7; } interface GetGiftCardByCodeRequestV2 { /** Gift Card code */ code: string; /** * Physical location indicator * This field is required for Square integration as a gift card provider, and should not be used with other providers */ locationId?: string | null; } interface GetGiftCardByCodeResponseV2 { giftCard?: GiftCard$7; } interface RedeemGiftCardRequest$1 { /** Gift Card unique id */ _id?: string; /** Amount to redeem from the gift card */ amount?: number; /** The currency code to redeem */ currencyCode?: string; /** Idempotency key for the current transaction */ orderId?: string; } interface RedeemGiftCardResponse$1 { /** Unique id of the redemption transaction */ transactionId?: string; } interface RedeemGiftCardRequestV2 { /** Gift Card code */ code: string; /** Amount to redeem from the gift card */ amount: Money$1; /** Idempotency key for the current transaction */ orderId?: string; /** App def id of the GiftCard provider */ providerAppDefId: string; /** * Physical location indicator * This field is required for Square integration as a gift card provider, and should not be used with other providers */ locationId?: string | null; } /** * Money. * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003. */ interface Money$1 { /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. */ value?: string; /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */ currency?: string; /** Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative. */ formattedValue?: string | null; } interface RedeemGiftCardResponseV2 { /** Unique id of the gift card transaction */ transactionId?: string; } interface VoidTransactionRequest$1 { /** Unique id of the redemption transaction */ transactionId?: string; } interface VoidTransactionResponse$1 { } /** Triggered when a gift card transaction is voided */ interface TransactionVoided { /** The gift card which the transaction applies to */ giftCard?: GiftCard$7; /** The transaction that was voided */ transaction?: Transaction$1; } interface Transaction$1 { /** Transaction unique id */ _id?: string; /** Gift Card obfuscated code */ obfuscatedCode?: string; /** The currency code of the Gift Card */ providerUrl?: string; /** App def id of the GiftCard provider */ providerAppDefId?: string; /** Order id of the transaction */ orderId?: string; /** Amount redeemed by the transaction */ amount?: number; /** The currency code of the transaction */ currencyCode?: string; } interface VoidTransactionRequestV2 { /** Unique id of the gift card transaction */ transactionId: string; /** App def id of the GiftCard provider */ providerAppDefId: string; /** * Physical location indicator * This field is required for Square integration as a gift card provider, and should not be used with other providers */ locationId?: string | null; } interface VoidTransactionResponseV2 { } interface GetTransactionRequest { /** Transaction id */ _id: string; } interface GetTransactionResponse { /** Transaction */ transaction?: Transaction$1; } interface GetProviderUrlRequest { /** App def id of the GiftCard provider */ providerAppDefId: string; } interface GetProviderUrlResponse { /** The Dashboard URL of the gift card provider */ providerUrl?: string; } interface MetaSiteSpecialEvent$1 extends MetaSiteSpecialEventPayloadOneOf$1 { /** Emitted on a meta site creation. */ siteCreated?: SiteCreated$1; /** Emitted on a meta site transfer completion. */ siteTransferred?: SiteTransferred$1; /** Emitted on a meta site deletion. */ siteDeleted?: SiteDeleted$1; /** Emitted on a meta site restoration. */ siteUndeleted?: SiteUndeleted$1; /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */ sitePublished?: SitePublished$1; /** Emitted on a meta site unpublish. */ siteUnpublished?: SiteUnpublished$1; /** Emitted when meta site is marked as template. */ siteMarkedAsTemplate?: SiteMarkedAsTemplate$1; /** Emitted when meta site is marked as a WixSite. */ siteMarkedAsWixSite?: SiteMarkedAsWixSite$1; /** Emitted when an application is provisioned (installed). */ serviceProvisioned?: ServiceProvisioned$1; /** Emitted when an application is removed (uninstalled). */ serviceRemoved?: ServiceRemoved$1; /** Emitted when meta site name (URL slug) is changed. */ siteRenamedPayload?: SiteRenamed$1; /** Emitted when meta site was permanently deleted. */ hardDeleted?: SiteHardDeleted$1; /** Emitted on a namespace change. */ namespaceChanged?: NamespaceChanged$1; /** Emitted when Studio is attached. */ studioAssigned?: StudioAssigned$1; /** Emitted when Studio is detached. */ studioUnassigned?: StudioUnassigned$1; /** A meta site id. */ metaSiteId?: string; /** A meta site version. Monotonically increasing. */ version?: string; /** A timestamp of the event. */ timestamp?: string; /** A list of "assets" (applications). The same as MetaSiteContext. */ assets?: Asset$1[]; } /** @oneof */ interface MetaSiteSpecialEventPayloadOneOf$1 { /** Emitted on a meta site creation. */ siteCreated?: SiteCreated$1; /** Emitted on a meta site transfer completion. */ siteTransferred?: SiteTransferred$1; /** Emitted on a meta site deletion. */ siteDeleted?: SiteDeleted$1; /** Emitted on a meta site restoration. */ siteUndeleted?: SiteUndeleted$1; /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */ sitePublished?: SitePublished$1; /** Emitted on a meta site unpublish. */ siteUnpublished?: SiteUnpublished$1; /** Emitted when meta site is marked as template. */ siteMarkedAsTemplate?: SiteMarkedAsTemplate$1; /** Emitted when meta site is marked as a WixSite. */ siteMarkedAsWixSite?: SiteMarkedAsWixSite$1; /** Emitted when an application is provisioned (installed). */ serviceProvisioned?: ServiceProvisioned$1; /** Emitted when an application is removed (uninstalled). */ serviceRemoved?: ServiceRemoved$1; /** Emitted when meta site name (URL slug) is changed. */ siteRenamedPayload?: SiteRenamed$1; /** Emitted when meta site was permanently deleted. */ hardDeleted?: SiteHardDeleted$1; /** Emitted on a namespace change. */ namespaceChanged?: NamespaceChanged$1; /** Emitted when Studio is attached. */ studioAssigned?: StudioAssigned$1; /** Emitted when Studio is detached. */ studioUnassigned?: StudioUnassigned$1; } interface Asset$1 { /** An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum). */ appDefId?: string; /** An instance id. For legacy reasons may be UUID or a string. */ instanceId?: string; /** An application state. */ state?: State$2; } enum State$2 { UNKNOWN = "UNKNOWN", ENABLED = "ENABLED", DISABLED = "DISABLED", PENDING = "PENDING", DEMO = "DEMO" } interface SiteCreated$1 { /** A template identifier (empty if not created from a template). */ originTemplateId?: string; /** An account id of the owner. */ ownerId?: string; /** A context in which meta site was created. */ context?: SiteCreatedContext$1; /** * A meta site id from which this site was created. * * In case of a creation from a template it's a template id. * In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site. */ originMetaSiteId?: string | null; /** A meta site name (URL slug). */ siteName?: string; /** A namespace. */ namespace?: Namespace$2; } enum SiteCreatedContext$1 { /** A valid option, we don't expose all reasons why site might be created. */ OTHER = "OTHER", /** A meta site was created from template. */ FROM_TEMPLATE = "FROM_TEMPLATE", /** A meta site was created by copying of the transfferred meta site. */ DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER", /** A copy of existing meta site. */ DUPLICATE = "DUPLICATE", /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */ OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER", /** deprecated A meta site was created for Flash editor. */ FLASH = "FLASH" } enum Namespace$2 { UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE", /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */ WIX = "WIX", /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */ SHOUT_OUT = "SHOUT_OUT", /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */ ALBUMS = "ALBUMS", /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */ WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE", /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */ HOTELS = "HOTELS", /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */ CLUBS = "CLUBS", /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */ ONBOARDING_DRAFT = "ONBOARDING_DRAFT", /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */ DEV_SITE = "DEV_SITE", /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */ LOGOS = "LOGOS", /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */ VIDEO_MAKER = "VIDEO_MAKER", /** MetaSites with this namespace will *not* be shown in a user's site list by default. */ PARTNER_DASHBOARD = "PARTNER_DASHBOARD", /** MetaSites with this namespace will *not* be shown in a user's site list by default. */ DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY", /** * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain. * * Meta site with this namespace will *not* be shown in a user's site list by default. */ HTML_DRAFT = "HTML_DRAFT", /** * the user-journey for Fitness users who want to start from managing their business instead of designing their website. * Will be accessible from Site List and will not have a website app. * Once the user attaches a site, the site will become a regular wixsite. */ SITELESS_BUSINESS = "SITELESS_BUSINESS", /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */ CREATOR_ECONOMY = "CREATOR_ECONOMY", /** It is to be used in the Business First efforts. */ DASHBOARD_FIRST = "DASHBOARD_FIRST", /** Bookings business flow with no site. */ ANYWHERE = "ANYWHERE", /** Namespace for Headless Backoffice with no editor */ HEADLESS = "HEADLESS", /** * Namespace for master site that will exist in parent account that will be referenced by subaccounts * The site will be used for account level CSM feature for enterprise */ ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS", /** Rise.ai Siteless account management for Gift Cards and Store Credit. */ RISE = "RISE", /** * As part of the branded app new funnel, users now can create a meta site that will be branded app first. * There's a blank site behind the scene but it's blank). * The Mobile company will be the owner of this namespace. */ BRANDED_FIRST = "BRANDED_FIRST", /** Nownia.com Siteless account management for Ai Scheduling Assistant. */ NOWNIA = "NOWNIA" } /** Site transferred to another user. */ interface SiteTransferred$1 { /** A previous owner id (user that transfers meta site). */ oldOwnerId?: string; /** A new owner id (user that accepts meta site). */ newOwnerId?: string; } /** Soft deletion of the meta site. Could be restored. */ interface SiteDeleted$1 { /** A deletion context. */ deleteContext?: DeleteContext$1; } interface DeleteContext$1 { /** When the meta site was deleted. */ dateDeleted?: Date; /** A status. */ deleteStatus?: DeleteStatus$1; /** A reason (flow). */ deleteOrigin?: string; /** A service that deleted it. */ initiatorId?: string | null; } enum DeleteStatus$1 { UNKNOWN = "UNKNOWN", TRASH = "TRASH", DELETED = "DELETED", PENDING_PURGE = "PENDING_PURGE" } /** Restoration of the meta site. */ interface SiteUndeleted$1 { } /** First publish of a meta site. Or subsequent publish after unpublish. */ interface SitePublished$1 { } interface SiteUnpublished$1 { /** A list of URLs previously associated with the meta site. */ urls?: string[]; } interface SiteMarkedAsTemplate$1 { } interface SiteMarkedAsWixSite$1 { } interface ServiceProvisioned$1 { /** Either UUID or EmbeddedServiceType. */ appDefId?: string; /** Not only UUID. Something here could be something weird. */ instanceId?: string; /** An instance id from which this instance is originated. */ originInstanceId?: string; /** A version. */ version?: string | null; } interface ServiceRemoved$1 { /** Either UUID or EmbeddedServiceType. */ appDefId?: string; /** Not only UUID. Something here could be something weird. */ instanceId?: string; /** A version. */ version?: string | null; } /** Rename of the site. Meaning, free public url has been changed as well. */ interface SiteRenamed$1 { /** A new meta site name (URL slug). */ newSiteName?: string; /** A previous meta site name (URL slug). */ oldSiteName?: string; } /** * Hard deletion of the meta site. * * Could not be restored. Therefore it's desirable to cleanup data. */ interface SiteHardDeleted$1 { /** A deletion context. */ deleteContext?: DeleteContext$1; } interface NamespaceChanged$1 { /** A previous namespace. */ oldNamespace?: Namespace$2; /** A new namespace. */ newNamespace?: Namespace$2; } /** Assigned Studio editor */ interface StudioAssigned$1 { } /** Unassigned Studio editor */ interface StudioUnassigned$1 { } interface Empty$h { } interface DomainEvent$o extends DomainEventBodyOneOf$o { createdEvent?: EntityCreatedEvent$o; updatedEvent?: EntityUpdatedEvent$o; deletedEvent?: EntityDeletedEvent$o; actionEvent?: ActionEvent$o; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$o { createdEvent?: EntityCreatedEvent$o; updatedEvent?: EntityUpdatedEvent$o; deletedEvent?: EntityDeletedEvent$o; actionEvent?: ActionEvent$o; } interface EntityCreatedEvent$o { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$o; } interface RestoreInfo$o { deletedDate?: Date; } interface EntityUpdatedEvent$o { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; } interface EntityDeletedEvent$o { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; } interface ActionEvent$o { bodyAsJson?: string; } interface MessageEnvelope$n { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$o; /** Stringify payload. */ data?: string; } interface IdentificationData$o extends IdentificationDataIdOneOf$o { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$n; } /** @oneof */ interface IdentificationDataIdOneOf$o { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$n { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @internal * @documentationMaturity preview * @requiredField _id * @adminMethod */ function get(_id: string): Promise; /** @internal * @documentationMaturity preview * @adminMethod */ function listGiftCards(options?: ListGiftCardsOptions): Promise; interface ListGiftCardsOptions { query?: Query; } /** @internal * @documentationMaturity preview * @adminMethod */ function listTransactions(options?: ListTransactionsOptions): Promise; interface ListTransactionsOptions { query?: Query; } /** * Create a gift card * @internal * @documentationMaturity preview * @requiredField giftCardData * @requiredField giftCardData.code * @permissionId GIFT_CARDS_PROXY.CREATE * @deprecated * @targetRemovalDate 2025-08-01 */ function createGiftCard(giftCardData: GiftCardData): Promise; /** * Get gift card by id * @param _id - Gift Card id * @internal * @documentationMaturity preview * @requiredField _id * @permissionId GIFT_CARDS_PROXY.READ */ function getGiftCard$1(_id: string): Promise; /** * Get gift card by code * @internal * @documentationMaturity preview * @permissionId GIFT_CARDS_PROXY.READ */ function getGiftCardByCode(options?: GetGiftCardByCodeOptions): Promise; interface GetGiftCardByCodeOptions { /** Gift Card code */ code?: string; } /** * Get gift card by code * @param code - Gift Card code * @internal * @documentationMaturity preview * @requiredField code * @permissionId GIFT_CARDS_PROXY.READ */ function getGiftCardByCodeV2(code: string, options?: GetGiftCardByCodeV2Options): Promise; interface GetGiftCardByCodeV2Options { /** * Physical location indicator * This field is required for Square integration as a gift card provider, and should not be used with other providers */ locationId?: string | null; } /** * Redeem a gift card * @internal * @documentationMaturity preview * @permissionId GIFT_CARDS_PROXY.MODIFY */ function redeemGiftCard$1(options?: RedeemGiftCardOptions$1): Promise; interface RedeemGiftCardOptions$1 { /** Gift Card unique id */ _id?: string; /** Amount to redeem from the gift card */ amount?: number; /** The currency code to redeem */ currencyCode?: string; /** Idempotency key for the current transaction */ orderId?: string; } /** * Redeem a gift card * @param code - Gift Card code * @internal * @documentationMaturity preview * @requiredField code * @requiredField options.amount * @requiredField options.providerAppDefId * @permissionId GIFT_CARDS_PROXY.MODIFY */ function redeemGiftCardV2(code: string, options?: RedeemGiftCardV2Options): Promise; interface RedeemGiftCardV2Options { /** Amount to redeem from the gift card */ amount: Money$1; /** Idempotency key for the current transaction */ orderId?: string; /** App def id of the GiftCard provider */ providerAppDefId: string; /** * Physical location indicator * This field is required for Square integration as a gift card provider, and should not be used with other providers */ locationId?: string | null; } /** * Void a gift card transaction * @internal * @documentationMaturity preview * @permissionId GIFT_CARDS_PROXY.MODIFY */ function voidTransaction$1(options?: VoidTransactionOptions$1): Promise; interface VoidTransactionOptions$1 { /** Unique id of the redemption transaction */ transactionId?: string; } /** * Void a gift card transaction * @param transactionId - Unique id of the gift card transaction * @internal * @documentationMaturity preview * @requiredField options.providerAppDefId * @requiredField transactionId * @permissionId GIFT_CARDS_PROXY.MODIFY */ function voidTransactionV2(transactionId: string, options?: VoidTransactionV2Options): Promise; interface VoidTransactionV2Options { /** App def id of the GiftCard provider */ providerAppDefId: string; /** * Physical location indicator * This field is required for Square integration as a gift card provider, and should not be used with other providers */ locationId?: string | null; } /** * Get gift card transactions * @param _id - Transaction id * @internal * @documentationMaturity preview * @requiredField _id * @permissionId GIFT_CARDS_PROXY.READ */ function getTransaction(_id: string): Promise; /** * Get gift card provider URL * @param providerAppDefId - App def id of the GiftCard provider * @internal * @documentationMaturity preview * @requiredField providerAppDefId * @permissionId GIFT_CARDS_PROXY.READ */ function getProviderUrl(providerAppDefId: string): Promise; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetRequest = GetRequest; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetResponse = GetResponse; type ecommerceGiftCardsProxyV1GiftCard_universal_d_DBGiftCard = DBGiftCard; type ecommerceGiftCardsProxyV1GiftCard_universal_d_ListGiftCardsRequest = ListGiftCardsRequest; type ecommerceGiftCardsProxyV1GiftCard_universal_d_Query = Query; type ecommerceGiftCardsProxyV1GiftCard_universal_d_ListGiftCardsResponse = ListGiftCardsResponse; type ecommerceGiftCardsProxyV1GiftCard_universal_d_ListTransactionsRequest = ListTransactionsRequest; type ecommerceGiftCardsProxyV1GiftCard_universal_d_ListTransactionsResponse = ListTransactionsResponse; type ecommerceGiftCardsProxyV1GiftCard_universal_d_DBTransaction = DBTransaction; type ecommerceGiftCardsProxyV1GiftCard_universal_d_CreateGiftCardRequest = CreateGiftCardRequest; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GiftCardData = GiftCardData; type ecommerceGiftCardsProxyV1GiftCard_universal_d_CreateGiftCardResponse = CreateGiftCardResponse; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeRequest = GetGiftCardByCodeRequest; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeResponse = GetGiftCardByCodeResponse; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeRequestV2 = GetGiftCardByCodeRequestV2; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeResponseV2 = GetGiftCardByCodeResponseV2; type ecommerceGiftCardsProxyV1GiftCard_universal_d_RedeemGiftCardRequestV2 = RedeemGiftCardRequestV2; type ecommerceGiftCardsProxyV1GiftCard_universal_d_RedeemGiftCardResponseV2 = RedeemGiftCardResponseV2; type ecommerceGiftCardsProxyV1GiftCard_universal_d_TransactionVoided = TransactionVoided; type ecommerceGiftCardsProxyV1GiftCard_universal_d_VoidTransactionRequestV2 = VoidTransactionRequestV2; type ecommerceGiftCardsProxyV1GiftCard_universal_d_VoidTransactionResponseV2 = VoidTransactionResponseV2; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetTransactionRequest = GetTransactionRequest; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetTransactionResponse = GetTransactionResponse; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetProviderUrlRequest = GetProviderUrlRequest; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetProviderUrlResponse = GetProviderUrlResponse; const ecommerceGiftCardsProxyV1GiftCard_universal_d_get: typeof get; const ecommerceGiftCardsProxyV1GiftCard_universal_d_listGiftCards: typeof listGiftCards; type ecommerceGiftCardsProxyV1GiftCard_universal_d_ListGiftCardsOptions = ListGiftCardsOptions; const ecommerceGiftCardsProxyV1GiftCard_universal_d_listTransactions: typeof listTransactions; type ecommerceGiftCardsProxyV1GiftCard_universal_d_ListTransactionsOptions = ListTransactionsOptions; const ecommerceGiftCardsProxyV1GiftCard_universal_d_createGiftCard: typeof createGiftCard; const ecommerceGiftCardsProxyV1GiftCard_universal_d_getGiftCardByCode: typeof getGiftCardByCode; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeOptions = GetGiftCardByCodeOptions; const ecommerceGiftCardsProxyV1GiftCard_universal_d_getGiftCardByCodeV2: typeof getGiftCardByCodeV2; type ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeV2Options = GetGiftCardByCodeV2Options; const ecommerceGiftCardsProxyV1GiftCard_universal_d_redeemGiftCardV2: typeof redeemGiftCardV2; type ecommerceGiftCardsProxyV1GiftCard_universal_d_RedeemGiftCardV2Options = RedeemGiftCardV2Options; const ecommerceGiftCardsProxyV1GiftCard_universal_d_voidTransactionV2: typeof voidTransactionV2; type ecommerceGiftCardsProxyV1GiftCard_universal_d_VoidTransactionV2Options = VoidTransactionV2Options; const ecommerceGiftCardsProxyV1GiftCard_universal_d_getTransaction: typeof getTransaction; const ecommerceGiftCardsProxyV1GiftCard_universal_d_getProviderUrl: typeof getProviderUrl; namespace ecommerceGiftCardsProxyV1GiftCard_universal_d { export { GiftCard$7 as GiftCard, Balance$2 as Balance, Status$6 as Status, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetRequest as GetRequest, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetResponse as GetResponse, ecommerceGiftCardsProxyV1GiftCard_universal_d_DBGiftCard as DBGiftCard, ecommerceGiftCardsProxyV1GiftCard_universal_d_ListGiftCardsRequest as ListGiftCardsRequest, ecommerceGiftCardsProxyV1GiftCard_universal_d_Query as Query, Sorting$g as Sorting, SortOrder$g as SortOrder, Paging$4 as Paging, ecommerceGiftCardsProxyV1GiftCard_universal_d_ListGiftCardsResponse as ListGiftCardsResponse, ecommerceGiftCardsProxyV1GiftCard_universal_d_ListTransactionsRequest as ListTransactionsRequest, ecommerceGiftCardsProxyV1GiftCard_universal_d_ListTransactionsResponse as ListTransactionsResponse, ecommerceGiftCardsProxyV1GiftCard_universal_d_DBTransaction as DBTransaction, GiftCardProviderWasProvisioned$1 as GiftCardProviderWasProvisioned, ecommerceGiftCardsProxyV1GiftCard_universal_d_CreateGiftCardRequest as CreateGiftCardRequest, ecommerceGiftCardsProxyV1GiftCard_universal_d_GiftCardData as GiftCardData, ecommerceGiftCardsProxyV1GiftCard_universal_d_CreateGiftCardResponse as CreateGiftCardResponse, GetGiftCardRequest$1 as GetGiftCardRequest, GetGiftCardResponse$1 as GetGiftCardResponse, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeRequest as GetGiftCardByCodeRequest, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeResponse as GetGiftCardByCodeResponse, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeRequestV2 as GetGiftCardByCodeRequestV2, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeResponseV2 as GetGiftCardByCodeResponseV2, RedeemGiftCardRequest$1 as RedeemGiftCardRequest, RedeemGiftCardResponse$1 as RedeemGiftCardResponse, ecommerceGiftCardsProxyV1GiftCard_universal_d_RedeemGiftCardRequestV2 as RedeemGiftCardRequestV2, Money$1 as Money, ecommerceGiftCardsProxyV1GiftCard_universal_d_RedeemGiftCardResponseV2 as RedeemGiftCardResponseV2, VoidTransactionRequest$1 as VoidTransactionRequest, VoidTransactionResponse$1 as VoidTransactionResponse, ecommerceGiftCardsProxyV1GiftCard_universal_d_TransactionVoided as TransactionVoided, Transaction$1 as Transaction, ecommerceGiftCardsProxyV1GiftCard_universal_d_VoidTransactionRequestV2 as VoidTransactionRequestV2, ecommerceGiftCardsProxyV1GiftCard_universal_d_VoidTransactionResponseV2 as VoidTransactionResponseV2, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetTransactionRequest as GetTransactionRequest, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetTransactionResponse as GetTransactionResponse, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetProviderUrlRequest as GetProviderUrlRequest, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetProviderUrlResponse as GetProviderUrlResponse, MetaSiteSpecialEvent$1 as MetaSiteSpecialEvent, MetaSiteSpecialEventPayloadOneOf$1 as MetaSiteSpecialEventPayloadOneOf, Asset$1 as Asset, State$2 as State, SiteCreated$1 as SiteCreated, SiteCreatedContext$1 as SiteCreatedContext, Namespace$2 as Namespace, SiteTransferred$1 as SiteTransferred, SiteDeleted$1 as SiteDeleted, DeleteContext$1 as DeleteContext, DeleteStatus$1 as DeleteStatus, SiteUndeleted$1 as SiteUndeleted, SitePublished$1 as SitePublished, SiteUnpublished$1 as SiteUnpublished, SiteMarkedAsTemplate$1 as SiteMarkedAsTemplate, SiteMarkedAsWixSite$1 as SiteMarkedAsWixSite, ServiceProvisioned$1 as ServiceProvisioned, ServiceRemoved$1 as ServiceRemoved, SiteRenamed$1 as SiteRenamed, SiteHardDeleted$1 as SiteHardDeleted, NamespaceChanged$1 as NamespaceChanged, StudioAssigned$1 as StudioAssigned, StudioUnassigned$1 as StudioUnassigned, Empty$h as Empty, DomainEvent$o as DomainEvent, DomainEventBodyOneOf$o as DomainEventBodyOneOf, EntityCreatedEvent$o as EntityCreatedEvent, RestoreInfo$o as RestoreInfo, EntityUpdatedEvent$o as EntityUpdatedEvent, EntityDeletedEvent$o as EntityDeletedEvent, ActionEvent$o as ActionEvent, MessageEnvelope$n as MessageEnvelope, IdentificationData$o as IdentificationData, IdentificationDataIdOneOf$o as IdentificationDataIdOneOf, WebhookIdentityType$n as WebhookIdentityType, ecommerceGiftCardsProxyV1GiftCard_universal_d_get as get, ecommerceGiftCardsProxyV1GiftCard_universal_d_listGiftCards as listGiftCards, ecommerceGiftCardsProxyV1GiftCard_universal_d_ListGiftCardsOptions as ListGiftCardsOptions, ecommerceGiftCardsProxyV1GiftCard_universal_d_listTransactions as listTransactions, ecommerceGiftCardsProxyV1GiftCard_universal_d_ListTransactionsOptions as ListTransactionsOptions, ecommerceGiftCardsProxyV1GiftCard_universal_d_createGiftCard as createGiftCard, getGiftCard$1 as getGiftCard, ecommerceGiftCardsProxyV1GiftCard_universal_d_getGiftCardByCode as getGiftCardByCode, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeOptions as GetGiftCardByCodeOptions, ecommerceGiftCardsProxyV1GiftCard_universal_d_getGiftCardByCodeV2 as getGiftCardByCodeV2, ecommerceGiftCardsProxyV1GiftCard_universal_d_GetGiftCardByCodeV2Options as GetGiftCardByCodeV2Options, redeemGiftCard$1 as redeemGiftCard, RedeemGiftCardOptions$1 as RedeemGiftCardOptions, ecommerceGiftCardsProxyV1GiftCard_universal_d_redeemGiftCardV2 as redeemGiftCardV2, ecommerceGiftCardsProxyV1GiftCard_universal_d_RedeemGiftCardV2Options as RedeemGiftCardV2Options, voidTransaction$1 as voidTransaction, VoidTransactionOptions$1 as VoidTransactionOptions, ecommerceGiftCardsProxyV1GiftCard_universal_d_voidTransactionV2 as voidTransactionV2, ecommerceGiftCardsProxyV1GiftCard_universal_d_VoidTransactionV2Options as VoidTransactionV2Options, ecommerceGiftCardsProxyV1GiftCard_universal_d_getTransaction as getTransaction, ecommerceGiftCardsProxyV1GiftCard_universal_d_getProviderUrl as getProviderUrl, }; } interface CheckoutContentProvider { _id?: string | null; } interface GetCheckoutContentRequest { /** ID of the app that provides the content. */ appId: string; /** ID of the specific component content. */ componentId: string; /** When a language is specified, it will be retrieved the content in that language. */ languageCode?: string | null; } interface GetCheckoutContentResponse { /** The requested CheckoutContent. */ checkoutContent?: CheckoutContent; } interface CheckoutContent { /** * Text to display in place of the "Continue shopping" link. * @readonly */ continueShoppingLink?: string | null; /** * Text to display in place of the "Order summary" title. * @readonly */ orderSummary?: string | null; /** * Text to display in place of the "Customer details" title. * @readonly */ customerDetails?: string | null; /** * Text to display in place of the "Review and place order" title. * @readonly */ reviewAndPlaceOrder?: string | null; /** * Text to display in place of the "Place order" button. * @readonly */ placeOrderButton?: string | null; /** * Text to display in place of the "Place order & pay" button. * @readonly */ placeOrderPayButton?: string | null; } /** * Retrieves a CheckoutContent. * @public * @documentationMaturity preview * @requiredField identifiers * @requiredField identifiers.appId * @requiredField identifiers.componentId * @permissionId ECOM.CHECKOUT_CONTENT_READ */ function getCheckoutContent(identifiers: GetCheckoutContentIdentifiers, options?: GetCheckoutContentOptions): Promise; interface GetCheckoutContentIdentifiers { /** ID of the app that provides the content. */ appId: string; /** ID of the specific component content. */ componentId: string; } interface GetCheckoutContentOptions { /** When a language is specified, it will be retrieved the content in that language. */ languageCode?: string | null; } type ecomApiV1CheckoutContentProvider_universal_d_CheckoutContentProvider = CheckoutContentProvider; type ecomApiV1CheckoutContentProvider_universal_d_GetCheckoutContentRequest = GetCheckoutContentRequest; type ecomApiV1CheckoutContentProvider_universal_d_GetCheckoutContentResponse = GetCheckoutContentResponse; type ecomApiV1CheckoutContentProvider_universal_d_CheckoutContent = CheckoutContent; const ecomApiV1CheckoutContentProvider_universal_d_getCheckoutContent: typeof getCheckoutContent; type ecomApiV1CheckoutContentProvider_universal_d_GetCheckoutContentIdentifiers = GetCheckoutContentIdentifiers; type ecomApiV1CheckoutContentProvider_universal_d_GetCheckoutContentOptions = GetCheckoutContentOptions; namespace ecomApiV1CheckoutContentProvider_universal_d { export { ecomApiV1CheckoutContentProvider_universal_d_CheckoutContentProvider as CheckoutContentProvider, ecomApiV1CheckoutContentProvider_universal_d_GetCheckoutContentRequest as GetCheckoutContentRequest, ecomApiV1CheckoutContentProvider_universal_d_GetCheckoutContentResponse as GetCheckoutContentResponse, ecomApiV1CheckoutContentProvider_universal_d_CheckoutContent as CheckoutContent, ecomApiV1CheckoutContentProvider_universal_d_getCheckoutContent as getCheckoutContent, ecomApiV1CheckoutContentProvider_universal_d_GetCheckoutContentIdentifiers as GetCheckoutContentIdentifiers, ecomApiV1CheckoutContentProvider_universal_d_GetCheckoutContentOptions as GetCheckoutContentOptions, }; } interface CustomTrigger { /** Unique ID of the trigger */ _id?: string; /** App ID of the trigger provider */ appId?: string; /** * Optional - additional data in key:value form * This data will be passed to `GetEligibleTriggers` SPI * i.e weather trigger - be eligible if temp is above 30 degrees, params will have { "minTemp": 30 } * @internal */ params?: Record | null; } interface GetEligibleTriggersRequest { /** List of line items to check the custom triggers on */ lineItems?: LineItem$8[]; /** List of custom triggers to check 'is eligible' on */ triggers?: TriggerToFilterBy[]; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; } interface LineItem$8 { /** Line item ID. */ _id?: string; /** Item quantity in this line item. */ quantity?: number | null; /** * Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. * This field may be empty in the case of a custom line item. */ catalogReference?: CatalogReference$d; /** Price of a single item. */ price?: string; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$d { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration). */ options?: Record | null; } interface TriggerToFilterBy { /** Custom trigger */ customTrigger?: CustomTrigger; /** Unique identifier that will return in `EligibleTrigger.identifier` to distinguish between scopes */ identifier?: string | null; } interface GetEligibleTriggersResponse { /** A List of eligible custom triggers */ eligibleTriggers?: EligibleTrigger[]; } interface EligibleTrigger { /** The ID of the custom trigger */ customTriggerId?: string; /** The id of the application implements this custom trigger */ appId?: string; /** Unique identifier that was assigned in `TriggerToFilterBy.identifier` to distinguish between custom triggers */ identifier?: string | null; } interface ListTriggersRequest { } interface ListTriggersResponse { /** A list of all custom triggers */ triggers?: ListTriggersResponseCustomTrigger[]; } interface ListTriggersResponseCustomTrigger { /** Unique ID of the custom trigger */ _id?: string; /** App ID of the custom trigger provider */ appId?: string; /** Custom Trigger display name */ name?: string; } /** * Get the items that are included in some given custom triggers * @internal * @documentationMaturity preview * @permissionId ECOM.GET_ELIGIBLE_TRIGGERS */ function getEligibleTriggers(options?: GetEligibleTriggersOptions): Promise; interface GetEligibleTriggersOptions { /** List of line items to check the custom triggers on */ lineItems?: LineItem$8[]; /** List of custom triggers to check 'is eligible' on */ triggers?: TriggerToFilterBy[]; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; } /** * List all custom triggers that are available on a given site * @public * @documentationMaturity preview * @permissionId ECOM.CUSTOM_TRIGGERS_READ * @adminMethod */ function listTriggers(): Promise; type ecomCustomTriggerV1CustomTrigger_universal_d_CustomTrigger = CustomTrigger; type ecomCustomTriggerV1CustomTrigger_universal_d_GetEligibleTriggersRequest = GetEligibleTriggersRequest; type ecomCustomTriggerV1CustomTrigger_universal_d_TriggerToFilterBy = TriggerToFilterBy; type ecomCustomTriggerV1CustomTrigger_universal_d_GetEligibleTriggersResponse = GetEligibleTriggersResponse; type ecomCustomTriggerV1CustomTrigger_universal_d_EligibleTrigger = EligibleTrigger; type ecomCustomTriggerV1CustomTrigger_universal_d_ListTriggersRequest = ListTriggersRequest; type ecomCustomTriggerV1CustomTrigger_universal_d_ListTriggersResponse = ListTriggersResponse; type ecomCustomTriggerV1CustomTrigger_universal_d_ListTriggersResponseCustomTrigger = ListTriggersResponseCustomTrigger; const ecomCustomTriggerV1CustomTrigger_universal_d_getEligibleTriggers: typeof getEligibleTriggers; type ecomCustomTriggerV1CustomTrigger_universal_d_GetEligibleTriggersOptions = GetEligibleTriggersOptions; const ecomCustomTriggerV1CustomTrigger_universal_d_listTriggers: typeof listTriggers; namespace ecomCustomTriggerV1CustomTrigger_universal_d { export { ecomCustomTriggerV1CustomTrigger_universal_d_CustomTrigger as CustomTrigger, ecomCustomTriggerV1CustomTrigger_universal_d_GetEligibleTriggersRequest as GetEligibleTriggersRequest, LineItem$8 as LineItem, CatalogReference$d as CatalogReference, ecomCustomTriggerV1CustomTrigger_universal_d_TriggerToFilterBy as TriggerToFilterBy, ecomCustomTriggerV1CustomTrigger_universal_d_GetEligibleTriggersResponse as GetEligibleTriggersResponse, ecomCustomTriggerV1CustomTrigger_universal_d_EligibleTrigger as EligibleTrigger, ecomCustomTriggerV1CustomTrigger_universal_d_ListTriggersRequest as ListTriggersRequest, ecomCustomTriggerV1CustomTrigger_universal_d_ListTriggersResponse as ListTriggersResponse, ecomCustomTriggerV1CustomTrigger_universal_d_ListTriggersResponseCustomTrigger as ListTriggersResponseCustomTrigger, ecomCustomTriggerV1CustomTrigger_universal_d_getEligibleTriggers as getEligibleTriggers, ecomCustomTriggerV1CustomTrigger_universal_d_GetEligibleTriggersOptions as GetEligibleTriggersOptions, ecomCustomTriggerV1CustomTrigger_universal_d_listTriggers as listTriggers, }; } interface DiscountRule$8 { /** * Discount rule ID. * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the discount rule is updated. * To prevent conflicting changes, the current `revision` must be passed when updating the discount rule. * @readonly */ revision?: string | null; /** * Date and time the discount rule was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the discount rule was last updated. * @readonly */ _updatedDate?: Date | null; /** * Whether the discount rule is active. * * Default: `true` */ active?: boolean | null; /** Discount rule name. */ name?: string | null; /** * Discount rule trigger. * A set of conditions that must be met for the `discounts` to be applied. * Not passing a trigger will cause the discount to always apply. */ trigger?: DiscountTrigger; /** Time frame in which the discount rule is active. */ activeTimeInfo?: ActiveTimeInfo; /** * List of discounts that are applied when one or more triggers are met. * * > **Notes:** * > * > + Currently, only 1 discount can be defined per discount rule. * > + A discount rule can be applied on multiple items per cart. * > + A discount rule can only be applied once per item. */ discounts?: Discounts; /** * Discount rule status. * Default: `UNDEFINED` * @readonly */ status?: Status$5; /** * Number of times the discount rule was used. * @readonly */ usageCount?: number; /** * calculated string which describe the discount rule * @internal * @readonly */ offer?: string | null; /** * Discount advance settings. * @internal */ settings?: DiscountSettings; /** * Data Extensions. * @internal */ extendedFields?: ExtendedFields$c; } /** DiscountTrigger - description of a set of conditions, that if met, will trigger the associated rule actions */ interface DiscountTrigger extends DiscountTriggerTriggerOneOf { /** Chain multiple triggers with the `and` operator. */ and?: And; /** Chain multiple triggers with the `or` operator. */ or?: Or; /** Custom trigger. */ customTrigger?: Custom; /** Subtotal trigger range. */ subtotalRange?: SubtotalRange; /** Item quantity trigger range. */ itemQuantityRange?: ItemQuantityRange; /** * Trigger type. * * + `"AND"`: Operator used for chaining multiple triggers. Currently 1 `"AND"` chain operator is supported. * + `"SUBTOTAL_RANGE"`: Subtotal must be within the specified `subtotalRange` values. * + `"ITEM_QUANTITY_RANGE"`: Quantity of items in scope must be within specified `itemQuantityRange` values. * + `"CUSTOM"`: Custom trigger type defined in `customTrigger` object. */ triggerType?: TriggerType; } /** @oneof */ interface DiscountTriggerTriggerOneOf { /** Chain multiple triggers with the `and` operator. */ and?: And; /** Chain multiple triggers with the `or` operator. */ or?: Or; /** Custom trigger. */ customTrigger?: Custom; /** Subtotal trigger range. */ subtotalRange?: SubtotalRange; /** Item quantity trigger range. */ itemQuantityRange?: ItemQuantityRange; } /** * This object represents a scope of catalog items. Examples: * 1. All catalog items of a specific app - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id` * 2. Specific catalog item - type = CATALOG_ITEM, CatalogItemFilter with `catalog_app_id` + `catalog_item_ids` * 3. External catalog filter - type = CUSTOM_FILTER, CustomFilter with 'app_id' + 'params' */ interface Scope$5 extends ScopeScopeItemsOneOf { /** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */ catalogItemFilter?: CatalogItemFilter; /** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */ customFilter?: CustomFilter; /** Scope ID. */ _id?: string; /** Scope type. */ type?: ScopeType; } /** @oneof */ interface ScopeScopeItemsOneOf { /** Catalog item filter. Must be passed with `type."CATALOG_ITEM"`. */ catalogItemFilter?: CatalogItemFilter; /** Custom filter. Must be passed with `type."CATALOG_ITEM"`. */ customFilter?: CustomFilter; } enum ScopeType { UNDEFINED_SCOPE = "UNDEFINED_SCOPE", /** Specific catalog items */ CATALOG_ITEM = "CATALOG_ITEM", /** Specific items by custom filters */ CUSTOM_FILTER = "CUSTOM_FILTER" } interface CatalogItemFilter { /** Catalog App ID. For example, the Wix Stores, Wix Bookings, or 3rd-party `appId`. */ catalogAppId?: string; /** ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores. */ catalogItemIds?: string[]; } interface CustomFilter { /** Custom filter app ID, when relevant. */ appId?: string; /** * Custom filter in `{ "key": "value" }` form. * For example, an array of `collectionIDs`: * `{ ["collectionId": "12345"], ["collectionId": "67890"] }`. */ params?: Record | null; } interface And { /** List of triggers to have an "AND" operator between their results. */ triggers?: DiscountTrigger[]; } interface Or { /** List of triggers to have an "OR" operator between their results. */ triggers?: DiscountTrigger[]; } interface Custom { /** Trigger ID. */ _id?: string; /** ID of the app that created the trigger. */ appId?: string; /** * Additional data in { "key": value } form. * + This data will be passed to the Custom Triggers Service SPI. * + For example, for a trigger that would activate if temperature is above 30 degrees, `params` field would be: `{ "minTemp": 30 }`. * @internal */ params?: Record | null; } interface SubtotalRange { /** Relevant scopes for `"SPECIFIC_ITEMS"` target type. */ scopes?: Scope$5[]; /** Minimum subtotal price (inclusive). */ from?: string | null; /** Maximum subtotal price (inclusive). */ to?: string | null; } interface ItemQuantityRange { /** Relevant scopes for `"SPECIFIC_ITEMS"` target type. */ scopes?: Scope$5[]; /** Minimum item quantity (inclusive). */ from?: number | null; /** Maximum item quantity (inclusive). */ to?: number | null; } enum TriggerType { UNDEFINED = "UNDEFINED", /** Operator used for chaining multiple triggers. Currently 1 `AND` chain operator is supported. */ AND = "AND", /** Subtotal must be within the specified `subtotalRange` values. */ SUBTOTAL_RANGE = "SUBTOTAL_RANGE", /** Quantity of items in scope must be within specified `itemQuantityRange` values. */ ITEM_QUANTITY_RANGE = "ITEM_QUANTITY_RANGE", /** Custom trigger type defined in `customTrigger` object. */ CUSTOM = "CUSTOM", /** Chain multiple triggers with OR operator */ OR = "OR" } interface ActiveTimeInfo { /** Date and time the discount rule is active **from**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ start?: Date | null; /** Date and time the discount rule is active **till**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ end?: Date | null; } interface Discounts { /** Discounts. */ values?: Discount$3[]; } interface Discount$3 extends DiscountDiscountOneOf { /** Percentage to discount from original price. */ percentage?: number; /** Amount to discount from original price. */ fixedAmount?: string; /** Fixed price. Line item will be fixed to this price. */ fixedPrice?: string; /** * Discount target. * * + `"SPECIFIC_ITEMS"`: Discount applies to a specific set of items. */ targetType?: Type; /** Data related to `"SPECIFIC_ITEMS"` target type. */ specificItemsInfo?: SpecificItemsInfo; /** * Discount type. * * + `"PERCENTAGE"`: Price is reduced by percentage value. * + `"FIXED_AMOUNT"`: Price is reduced by fixed amount. * + `"FIXED_PRICE"`: Price will be set to fixed amount. */ discountType?: DiscountType$8; /** * Data related to `BUY_X_GET_Y` target type. * @internal */ buyXGetYInfo?: BuyXGetYInfo; } /** @oneof */ interface DiscountDiscountOneOf { /** Percentage to discount from original price. */ percentage?: number; /** Amount to discount from original price. */ fixedAmount?: string; /** Fixed price. Line item will be fixed to this price. */ fixedPrice?: string; } enum Type { /** Target type is not defined */ UNDEFINED = "UNDEFINED", /** Target type is a set of specific items */ SPECIFIC_ITEMS = "SPECIFIC_ITEMS", /** Target type is a buy x get y */ BUY_X_GET_Y = "BUY_X_GET_Y" } interface SpecificItemsInfo { /** All associated scopes for `"SPECIFIC_ITEMS"` target type. */ scopes?: Scope$5[]; /** * limit number of items the discount can be applied to * if no limit specified, the discount will be applied to all items in the request that match 'scopes' field * @internal */ limit?: number | null; } enum DiscountType$8 { UNDEFINED = "UNDEFINED", /** Price is reduced by percentage value. */ PERCENTAGE = "PERCENTAGE", /** Price is reduced by fixed amount. */ FIXED_AMOUNT = "FIXED_AMOUNT", /** Price will be set to fixed amount. */ FIXED_PRICE = "FIXED_PRICE" } interface BuyXGetYInfo { /** Information about which items must be in the cart (buy X) for the discount to apply (get Y). */ customerBuys?: CustomerBuy; /** Information about which items will be discounted (get Y). */ customerGets?: CustomerGet; /** * The maximum number of times the 'buy X get Y' discount can be applied. * For example, when the value of `limit` is `2`, with a "2+1" sale on all items, the following logic applies: * + Buy 2 get 1, buy 3 get 1. * + Buy 4 get 2, buy 6 get 2, buy 9 get 2, and so on. */ limit?: number | null; } interface CustomerBuy extends CustomerBuyConditionOneOf { /** Minimum number of items the customer must add to the cart to be eligible for a discount. */ minimumQuantity?: number; /** Minimum price the customer must add to the cart to be eligible for a discount. */ minimumSpend?: string | null; /** Scopes of the items that must be added to the cart to enable the discount. */ scopes?: Scope$5[]; } /** @oneof */ interface CustomerBuyConditionOneOf { /** Minimum number of items the customer must add to the cart to be eligible for a discount. */ minimumQuantity?: number; /** Minimum price the customer must add to the cart to be eligible for a discount. */ minimumSpend?: string | null; } interface CustomerGet { /** * Exact number of items in the cart that will be discounted. * If the cart contains fewer items than the value of quantity, the discount will not apply. */ quantity?: number; /** Scopes of the items that will be discounted. */ scopes?: Scope$5[]; } enum Status$5 { /** Rule status is not defined. */ UNDEFINED = "UNDEFINED", /** Rule status is live. */ LIVE = "LIVE", /** Rule status is expired, it might have been live in the past. */ EXPIRED = "EXPIRED", /** Rule status is pending, it might be live in the future. */ PENDING = "PENDING" } /** The discount settings */ interface DiscountSettings { /** Discount applies to either `ALL_ITEMS`, or to the `LOWEST_PRICED_ITEM`. */ appliesTo?: AppliedSubjectType; /** * Whether the discount will apply to subscriptions. * * Default: `false` */ includeSubscription?: boolean | null; /** Maximum total number of uses allowed for the discount rule. */ usageLimit?: number | null; /** * The usage limit per user per discount. * When not provided, this setting will not apply. */ usageLimitPerUser?: number | null; /** * Opt in to indexing this discount rule by an offline pipeline. * Default value is false (rules are not indexed by default). * The purpose of indexing discount rules is to allow fast reads of potential discounts on given catalog items, * without having to do heavy calculations like in `GetAppliedDiscounts` API. * One can read this data from [Discounts Cache Reader Service](https://todo-add-working-link) * This can be used for example, to display potential discounts on the storefront. * @internal */ indexOptIn?: boolean | null; } /** TODO: check if can be removed */ enum AppliedSubjectType { UNDEFINED = "UNDEFINED", /** Discount applies to all items at checkout. */ ALL_ITEMS = "ALL_ITEMS", /** Discount applies to the lowest priced item at checkout. */ LOWEST_PRICED_ITEM = "LOWEST_PRICED_ITEM" } interface ExtendedFields$c { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface CreateDiscountRuleRequest { /** Discount rule info. */ discountRule: DiscountRule$8; } interface CreateDiscountRuleResponse { /** Discount rule. */ discountRule?: DiscountRule$8; } interface GetDiscountRuleRequest { /** ID of the discount rule to retrieve. */ discountRuleId: string; } interface GetDiscountRuleResponse { /** The requested discount rule. */ discountRule?: DiscountRule$8; } interface UpdateDiscountRuleRequest { /** Discount rule info. */ discountRule: DiscountRule$8; /** * Explicit list of fields to update. * @internal */ mask?: string[]; } interface UpdateDiscountRuleResponse { /** Updated discount rule. */ discountRule?: DiscountRule$8; } interface DeleteDiscountRuleRequest { /** ID of the discount rule to delete. */ discountRuleId: string; } interface DeleteDiscountRuleResponse { } interface QueryDiscountRulesRequest { /** Query options. */ query?: PlatformQuery$2; } interface PlatformQuery$2 extends PlatformQueryPagingMethodOneOf$2 { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging$2; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging$f; /** Filter object. */ filter?: Record | null; /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */ sort?: Sorting$f[]; } /** @oneof */ interface PlatformQueryPagingMethodOneOf$2 { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging$2; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging$f; } interface Sorting$f { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$f; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$f { ASC = "ASC", DESC = "DESC" } interface PlatformPaging$2 { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CursorPaging$f { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryDiscountRulesResponse { /** List of discount rules. */ discountRules?: DiscountRule$8[]; /** Details on the paged set of results returned. */ pagingMetadata?: PlatformPagingMetadata$2; } interface PlatformPagingMetadata$2 { /** The number of items returned in this response. */ count?: number | null; /** The offset which was requested. Returned if offset paging was used. */ offset?: number | null; /** The total number of items that match the query. Returned if offset paging was used. */ total?: number | null; /** Cursors to navigate through result pages. Returned if cursor paging was used. */ cursors?: Cursors$f; } interface Cursors$f { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface GetAppliedDiscountsRequest { /** Line items for which to check for discount rules. */ lineItems?: LineItem$7[]; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; } interface LineItem$7 { /** Line item ID. */ _id?: string; /** Line item quantity. */ quantity?: number | null; /** Catalog and item reference info. Learn more about [integrating Wix Stores products with Wix eCommerce](https://dev.wix.com/api/rest/wix-stores/catalog/ecommerce-integration). */ catalogReference?: CatalogReference$c; /** Line item price. */ price?: string; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$c { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration). */ options?: Record | null; } interface GetAppliedDiscountsResponse { /** All eligible discounts. */ appliedDiscounts?: AppliedDiscount$8[]; } interface AppliedDiscount$8 { /** Discount type. */ discountType?: Type; /** IDs of line items the discount applies to, in GUID format. */ lineItemIds?: string[]; /** Applied discount rule. */ appliedDiscountRule?: AppliedDiscountRule; } interface AppliedDiscountRule { /** Applied discount rule ID. */ _id?: string; /** Discount rule name. */ name?: DiscountRuleName$8; /** Total amount reduced from all discounted line items. */ amount?: MultiCurrencyPrice$6; /** Discount rule type. */ discountRuleType?: DiscountType$8; } interface DiscountRuleName$8 { /** Original discount rule name (in site's default language). */ original?: string; /** * Translated discount rule name according to buyer language. * * Default: `original` */ translated?: string | null; } interface MultiCurrencyPrice$6 { /** Amount. */ amount?: string; /** * Converted amount. * @readonly */ convertedAmount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. * @readonly */ formattedConvertedAmount?: string; } interface DomainEvent$n extends DomainEventBodyOneOf$n { createdEvent?: EntityCreatedEvent$n; updatedEvent?: EntityUpdatedEvent$n; deletedEvent?: EntityDeletedEvent$n; actionEvent?: ActionEvent$n; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$n { createdEvent?: EntityCreatedEvent$n; updatedEvent?: EntityUpdatedEvent$n; deletedEvent?: EntityDeletedEvent$n; actionEvent?: ActionEvent$n; } interface EntityCreatedEvent$n { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$n; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$n { deletedDate?: Date | null; } interface EntityUpdatedEvent$n { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$n { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$n { bodyAsJson?: string; } interface Empty$g { } interface DiscountRuleUsageLimitReached { /** Discount Rule */ rule?: DiscountRule$8; } interface MessageEnvelope$m { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$n; /** Stringify payload. */ data?: string; } interface IdentificationData$n extends IdentificationDataIdOneOf$n { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$m; } /** @oneof */ interface IdentificationDataIdOneOf$n { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$m { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates a new discount rule. * * * The `createDiscountRule()` function returns a Promise that resolves to the new discount rule when it's created. * @param discountRule - Discount rule info. * @public * @requiredField discountRule * @requiredField discountRule.discounts * @requiredField discountRule.name * @permissionId ECOM.DISCOUNT_RULES_CREATE * @adminMethod * @returns Discount rule. */ function createDiscountRule(discountRule: DiscountRule$8): Promise; /** * Retrieves a discount rule. * * * The `getDiscountRule()` function returns a Promise that resolves when the specified discount rule is retrieved. * @param discountRuleId - ID of the discount rule to retrieve. * @public * @requiredField discountRuleId * @permissionId ECOM.DISCOUNT_RULES_READ * @adminMethod * @returns The requested discount rule. */ function getDiscountRule(discountRuleId: string): Promise; /** * Updates a discount rule's properties. * * * The `updateDiscountRule()` function returns a Promise that resolves when the specified discount rule's properties are updated. * * Each time the discount rule is updated, `revision` increments by 1. The existing `revision` must be included when updating the discount rule. This ensures you're working with the latest discount rule information, and it prevents unintended overwrites. * @param _id - Discount rule ID. * @public * @requiredField _id * @requiredField discountRule * @requiredField discountRule.revision * @param discountRule - Discount rule info. * @param options - Discount rule info. * @permissionId ECOM.DISCOUNT_RULES_UPDATE * @adminMethod * @returns Updated discount rule. */ function updateDiscountRule(_id: string | null, discountRule: UpdateDiscountRule, options?: UpdateDiscountRuleOptions): Promise; interface UpdateDiscountRule { /** * Discount rule ID. * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the discount rule is updated. * To prevent conflicting changes, the current `revision` must be passed when updating the discount rule. * @readonly */ revision?: string | null; /** * Date and time the discount rule was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the discount rule was last updated. * @readonly */ _updatedDate?: Date | null; /** * Whether the discount rule is active. * * Default: `true` */ active?: boolean | null; /** Discount rule name. */ name?: string | null; /** * Discount rule trigger. * A set of conditions that must be met for the `discounts` to be applied. * Not passing a trigger will cause the discount to always apply. */ trigger?: DiscountTrigger; /** Time frame in which the discount rule is active. */ activeTimeInfo?: ActiveTimeInfo; /** * List of discounts that are applied when one or more triggers are met. * * > **Notes:** * > * > + Currently, only 1 discount can be defined per discount rule. * > + A discount rule can be applied on multiple items per cart. * > + A discount rule can only be applied once per item. */ discounts?: Discounts; /** * Discount rule status. * Default: `UNDEFINED` * @readonly */ status?: Status$5; /** * Number of times the discount rule was used. * @readonly */ usageCount?: number; /** * calculated string which describe the discount rule * @internal * @readonly */ offer?: string | null; /** * Discount advance settings. * @internal */ settings?: DiscountSettings; /** * Data Extensions. * @internal */ extendedFields?: ExtendedFields$c; } interface UpdateDiscountRuleOptions { /** * Explicit list of fields to update. * @internal */ mask?: string[]; } /** * Deletes a discount rule. * * * The `deleteDiscountRule()` function returns a Promise that resolves when the specified discount rule is deleted. * @param discountRuleId - ID of the discount rule to delete. * @public * @requiredField discountRuleId * @permissionId ECOM.DISCOUNT_RULES_DELETE * @adminMethod */ function deleteDiscountRule(discountRuleId: string): Promise; /** * Creates a query to retrieve a list of discount rules. * * * The `queryDiscountRules()` function builds a query to retrieve a list of up to 100 discount rules, and returns a [`DiscountRulesQueryBuilder`](#discountrulesquerybuilder) object. * * The returned object contains the query definition which is typically used to run the query using the [`find()`](/discount-rules/discount-rules-query-builder/find) function. * * You can refine the query by chaining `DiscountRulesQueryBuilder` functions onto the query. `DiscountRulesQueryBuilder` functions enable you to sort, filter, and control the results queryDiscountRules() returns. * * By default, `queryDiscountRules()` sorts results by [`ascending("_id")`](/discount-rules/discount-rules-query-builder/ascending) by default. This can be overridden. * * To learn how to query posts, refer to the table below. * * The following `DiscountRulesQueryBuilder` functions are supported for the `queryDiscountRules()` function. For a full description of the discount rule object, see the object returned for the [`items`](/discount-rules/discount-rules-query-result/items) property in the `DiscountRulesQueryResult`. * @public * @permissionId ECOM.DISCOUNT_RULES_READ * @adminMethod */ function queryDiscountRules(): DiscountRulesQueryBuilder; interface QueryCursorResult$f { cursors: Cursors$f; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface DiscountRulesQueryResult extends QueryCursorResult$f { items: DiscountRule$8[]; query: DiscountRulesQueryBuilder; next: () => Promise; prev: () => Promise; } interface DiscountRulesQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: '_id' | 'revision' | '_createdDate' | '_updatedDate' | 'active' | 'name' | 'activeTimeInfo.start' | 'activeTimeInfo.end', value: any) => DiscountRulesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: '_id' | 'revision' | '_createdDate' | '_updatedDate' | 'active' | 'name' | 'activeTimeInfo.start' | 'activeTimeInfo.end', value: any) => DiscountRulesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ge: (propertyName: 'revision' | '_createdDate' | '_updatedDate' | 'activeTimeInfo.start' | 'activeTimeInfo.end', value: any) => DiscountRulesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: 'revision' | '_createdDate' | '_updatedDate' | 'activeTimeInfo.start' | 'activeTimeInfo.end', value: any) => DiscountRulesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: 'revision' | '_createdDate' | '_updatedDate' | 'activeTimeInfo.start' | 'activeTimeInfo.end', value: any) => DiscountRulesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: 'revision' | '_createdDate' | '_updatedDate' | 'activeTimeInfo.start' | 'activeTimeInfo.end', value: any) => DiscountRulesQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. */ startsWith: (propertyName: '_id' | 'name', value: string) => DiscountRulesQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. */ hasSome: (propertyName: '_id' | 'revision' | '_createdDate' | '_updatedDate' | 'active' | 'name' | 'activeTimeInfo.start' | 'activeTimeInfo.end', value: any[]) => DiscountRulesQueryBuilder; in: (propertyName: '_id' | 'revision' | '_createdDate' | '_updatedDate' | 'active' | 'name' | 'activeTimeInfo.start' | 'activeTimeInfo.end', value: any) => DiscountRulesQueryBuilder; exists: (propertyName: '_id' | 'revision' | '_createdDate' | '_updatedDate' | 'active' | 'name' | 'activeTimeInfo.start' | 'activeTimeInfo.end', value: boolean) => DiscountRulesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'_id' | 'revision' | '_createdDate' | '_updatedDate' | 'active' | 'name' | 'activeTimeInfo.start' | 'activeTimeInfo.end'>) => DiscountRulesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'_id' | 'revision' | '_createdDate' | '_updatedDate' | 'active' | 'name' | 'activeTimeInfo.start' | 'activeTimeInfo.end'>) => DiscountRulesQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => DiscountRulesQueryBuilder; /** @param cursor - A pointer to specific record */ skipTo: (cursor: string) => DiscountRulesQueryBuilder; find: () => Promise; } /** * Retrieve all discounts that can be applied to the given line items. * @internal * @documentationMaturity preview * @permissionId ECOM.GET_APPLIED_DISCOUNTS */ function getAppliedDiscounts(options?: GetAppliedDiscountsOptions): Promise; interface GetAppliedDiscountsOptions { /** Line items for which to check for discount rules. */ lineItems?: LineItem$7[]; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; } type ecomDiscountsV1DiscountRule_universal_d_DiscountTrigger = DiscountTrigger; type ecomDiscountsV1DiscountRule_universal_d_DiscountTriggerTriggerOneOf = DiscountTriggerTriggerOneOf; type ecomDiscountsV1DiscountRule_universal_d_ScopeScopeItemsOneOf = ScopeScopeItemsOneOf; type ecomDiscountsV1DiscountRule_universal_d_ScopeType = ScopeType; const ecomDiscountsV1DiscountRule_universal_d_ScopeType: typeof ScopeType; type ecomDiscountsV1DiscountRule_universal_d_CatalogItemFilter = CatalogItemFilter; type ecomDiscountsV1DiscountRule_universal_d_CustomFilter = CustomFilter; type ecomDiscountsV1DiscountRule_universal_d_And = And; type ecomDiscountsV1DiscountRule_universal_d_Or = Or; type ecomDiscountsV1DiscountRule_universal_d_Custom = Custom; type ecomDiscountsV1DiscountRule_universal_d_SubtotalRange = SubtotalRange; type ecomDiscountsV1DiscountRule_universal_d_ItemQuantityRange = ItemQuantityRange; type ecomDiscountsV1DiscountRule_universal_d_TriggerType = TriggerType; const ecomDiscountsV1DiscountRule_universal_d_TriggerType: typeof TriggerType; type ecomDiscountsV1DiscountRule_universal_d_ActiveTimeInfo = ActiveTimeInfo; type ecomDiscountsV1DiscountRule_universal_d_Discounts = Discounts; type ecomDiscountsV1DiscountRule_universal_d_DiscountDiscountOneOf = DiscountDiscountOneOf; type ecomDiscountsV1DiscountRule_universal_d_Type = Type; const ecomDiscountsV1DiscountRule_universal_d_Type: typeof Type; type ecomDiscountsV1DiscountRule_universal_d_SpecificItemsInfo = SpecificItemsInfo; type ecomDiscountsV1DiscountRule_universal_d_BuyXGetYInfo = BuyXGetYInfo; type ecomDiscountsV1DiscountRule_universal_d_CustomerBuy = CustomerBuy; type ecomDiscountsV1DiscountRule_universal_d_CustomerBuyConditionOneOf = CustomerBuyConditionOneOf; type ecomDiscountsV1DiscountRule_universal_d_CustomerGet = CustomerGet; type ecomDiscountsV1DiscountRule_universal_d_DiscountSettings = DiscountSettings; type ecomDiscountsV1DiscountRule_universal_d_AppliedSubjectType = AppliedSubjectType; const ecomDiscountsV1DiscountRule_universal_d_AppliedSubjectType: typeof AppliedSubjectType; type ecomDiscountsV1DiscountRule_universal_d_CreateDiscountRuleRequest = CreateDiscountRuleRequest; type ecomDiscountsV1DiscountRule_universal_d_CreateDiscountRuleResponse = CreateDiscountRuleResponse; type ecomDiscountsV1DiscountRule_universal_d_GetDiscountRuleRequest = GetDiscountRuleRequest; type ecomDiscountsV1DiscountRule_universal_d_GetDiscountRuleResponse = GetDiscountRuleResponse; type ecomDiscountsV1DiscountRule_universal_d_UpdateDiscountRuleRequest = UpdateDiscountRuleRequest; type ecomDiscountsV1DiscountRule_universal_d_UpdateDiscountRuleResponse = UpdateDiscountRuleResponse; type ecomDiscountsV1DiscountRule_universal_d_DeleteDiscountRuleRequest = DeleteDiscountRuleRequest; type ecomDiscountsV1DiscountRule_universal_d_DeleteDiscountRuleResponse = DeleteDiscountRuleResponse; type ecomDiscountsV1DiscountRule_universal_d_QueryDiscountRulesRequest = QueryDiscountRulesRequest; type ecomDiscountsV1DiscountRule_universal_d_QueryDiscountRulesResponse = QueryDiscountRulesResponse; type ecomDiscountsV1DiscountRule_universal_d_GetAppliedDiscountsRequest = GetAppliedDiscountsRequest; type ecomDiscountsV1DiscountRule_universal_d_GetAppliedDiscountsResponse = GetAppliedDiscountsResponse; type ecomDiscountsV1DiscountRule_universal_d_AppliedDiscountRule = AppliedDiscountRule; type ecomDiscountsV1DiscountRule_universal_d_DiscountRuleUsageLimitReached = DiscountRuleUsageLimitReached; const ecomDiscountsV1DiscountRule_universal_d_createDiscountRule: typeof createDiscountRule; const ecomDiscountsV1DiscountRule_universal_d_getDiscountRule: typeof getDiscountRule; const ecomDiscountsV1DiscountRule_universal_d_updateDiscountRule: typeof updateDiscountRule; type ecomDiscountsV1DiscountRule_universal_d_UpdateDiscountRule = UpdateDiscountRule; type ecomDiscountsV1DiscountRule_universal_d_UpdateDiscountRuleOptions = UpdateDiscountRuleOptions; const ecomDiscountsV1DiscountRule_universal_d_deleteDiscountRule: typeof deleteDiscountRule; const ecomDiscountsV1DiscountRule_universal_d_queryDiscountRules: typeof queryDiscountRules; type ecomDiscountsV1DiscountRule_universal_d_DiscountRulesQueryResult = DiscountRulesQueryResult; type ecomDiscountsV1DiscountRule_universal_d_DiscountRulesQueryBuilder = DiscountRulesQueryBuilder; const ecomDiscountsV1DiscountRule_universal_d_getAppliedDiscounts: typeof getAppliedDiscounts; type ecomDiscountsV1DiscountRule_universal_d_GetAppliedDiscountsOptions = GetAppliedDiscountsOptions; namespace ecomDiscountsV1DiscountRule_universal_d { export { DiscountRule$8 as DiscountRule, ecomDiscountsV1DiscountRule_universal_d_DiscountTrigger as DiscountTrigger, ecomDiscountsV1DiscountRule_universal_d_DiscountTriggerTriggerOneOf as DiscountTriggerTriggerOneOf, Scope$5 as Scope, ecomDiscountsV1DiscountRule_universal_d_ScopeScopeItemsOneOf as ScopeScopeItemsOneOf, ecomDiscountsV1DiscountRule_universal_d_ScopeType as ScopeType, ecomDiscountsV1DiscountRule_universal_d_CatalogItemFilter as CatalogItemFilter, ecomDiscountsV1DiscountRule_universal_d_CustomFilter as CustomFilter, ecomDiscountsV1DiscountRule_universal_d_And as And, ecomDiscountsV1DiscountRule_universal_d_Or as Or, ecomDiscountsV1DiscountRule_universal_d_Custom as Custom, ecomDiscountsV1DiscountRule_universal_d_SubtotalRange as SubtotalRange, ecomDiscountsV1DiscountRule_universal_d_ItemQuantityRange as ItemQuantityRange, ecomDiscountsV1DiscountRule_universal_d_TriggerType as TriggerType, ecomDiscountsV1DiscountRule_universal_d_ActiveTimeInfo as ActiveTimeInfo, ecomDiscountsV1DiscountRule_universal_d_Discounts as Discounts, Discount$3 as Discount, ecomDiscountsV1DiscountRule_universal_d_DiscountDiscountOneOf as DiscountDiscountOneOf, ecomDiscountsV1DiscountRule_universal_d_Type as Type, ecomDiscountsV1DiscountRule_universal_d_SpecificItemsInfo as SpecificItemsInfo, DiscountType$8 as DiscountType, ecomDiscountsV1DiscountRule_universal_d_BuyXGetYInfo as BuyXGetYInfo, ecomDiscountsV1DiscountRule_universal_d_CustomerBuy as CustomerBuy, ecomDiscountsV1DiscountRule_universal_d_CustomerBuyConditionOneOf as CustomerBuyConditionOneOf, ecomDiscountsV1DiscountRule_universal_d_CustomerGet as CustomerGet, Status$5 as Status, ecomDiscountsV1DiscountRule_universal_d_DiscountSettings as DiscountSettings, ecomDiscountsV1DiscountRule_universal_d_AppliedSubjectType as AppliedSubjectType, ExtendedFields$c as ExtendedFields, ecomDiscountsV1DiscountRule_universal_d_CreateDiscountRuleRequest as CreateDiscountRuleRequest, ecomDiscountsV1DiscountRule_universal_d_CreateDiscountRuleResponse as CreateDiscountRuleResponse, ecomDiscountsV1DiscountRule_universal_d_GetDiscountRuleRequest as GetDiscountRuleRequest, ecomDiscountsV1DiscountRule_universal_d_GetDiscountRuleResponse as GetDiscountRuleResponse, ecomDiscountsV1DiscountRule_universal_d_UpdateDiscountRuleRequest as UpdateDiscountRuleRequest, ecomDiscountsV1DiscountRule_universal_d_UpdateDiscountRuleResponse as UpdateDiscountRuleResponse, ecomDiscountsV1DiscountRule_universal_d_DeleteDiscountRuleRequest as DeleteDiscountRuleRequest, ecomDiscountsV1DiscountRule_universal_d_DeleteDiscountRuleResponse as DeleteDiscountRuleResponse, ecomDiscountsV1DiscountRule_universal_d_QueryDiscountRulesRequest as QueryDiscountRulesRequest, PlatformQuery$2 as PlatformQuery, PlatformQueryPagingMethodOneOf$2 as PlatformQueryPagingMethodOneOf, Sorting$f as Sorting, SortOrder$f as SortOrder, PlatformPaging$2 as PlatformPaging, CursorPaging$f as CursorPaging, ecomDiscountsV1DiscountRule_universal_d_QueryDiscountRulesResponse as QueryDiscountRulesResponse, PlatformPagingMetadata$2 as PlatformPagingMetadata, Cursors$f as Cursors, ecomDiscountsV1DiscountRule_universal_d_GetAppliedDiscountsRequest as GetAppliedDiscountsRequest, LineItem$7 as LineItem, CatalogReference$c as CatalogReference, ecomDiscountsV1DiscountRule_universal_d_GetAppliedDiscountsResponse as GetAppliedDiscountsResponse, AppliedDiscount$8 as AppliedDiscount, ecomDiscountsV1DiscountRule_universal_d_AppliedDiscountRule as AppliedDiscountRule, DiscountRuleName$8 as DiscountRuleName, MultiCurrencyPrice$6 as MultiCurrencyPrice, DomainEvent$n as DomainEvent, DomainEventBodyOneOf$n as DomainEventBodyOneOf, EntityCreatedEvent$n as EntityCreatedEvent, RestoreInfo$n as RestoreInfo, EntityUpdatedEvent$n as EntityUpdatedEvent, EntityDeletedEvent$n as EntityDeletedEvent, ActionEvent$n as ActionEvent, Empty$g as Empty, ecomDiscountsV1DiscountRule_universal_d_DiscountRuleUsageLimitReached as DiscountRuleUsageLimitReached, MessageEnvelope$m as MessageEnvelope, IdentificationData$n as IdentificationData, IdentificationDataIdOneOf$n as IdentificationDataIdOneOf, WebhookIdentityType$m as WebhookIdentityType, ecomDiscountsV1DiscountRule_universal_d_createDiscountRule as createDiscountRule, ecomDiscountsV1DiscountRule_universal_d_getDiscountRule as getDiscountRule, ecomDiscountsV1DiscountRule_universal_d_updateDiscountRule as updateDiscountRule, ecomDiscountsV1DiscountRule_universal_d_UpdateDiscountRule as UpdateDiscountRule, ecomDiscountsV1DiscountRule_universal_d_UpdateDiscountRuleOptions as UpdateDiscountRuleOptions, ecomDiscountsV1DiscountRule_universal_d_deleteDiscountRule as deleteDiscountRule, ecomDiscountsV1DiscountRule_universal_d_queryDiscountRules as queryDiscountRules, ecomDiscountsV1DiscountRule_universal_d_DiscountRulesQueryResult as DiscountRulesQueryResult, ecomDiscountsV1DiscountRule_universal_d_DiscountRulesQueryBuilder as DiscountRulesQueryBuilder, ecomDiscountsV1DiscountRule_universal_d_getAppliedDiscounts as getAppliedDiscounts, ecomDiscountsV1DiscountRule_universal_d_GetAppliedDiscountsOptions as GetAppliedDiscountsOptions, }; } interface Invoice { /** Invoice ID. */ _id?: string; /** ID of the app that set the invoice. */ appId?: string; } interface ListInvoicesForSingleOrderRequest$1 { /** Order ID. */ orderId: string; } interface ListInvoicesForSingleOrderResponse$1 { /** List of invoices. */ invoices?: Invoice[]; } interface ListInvoicesForMultipleOrdersRequest$1 { /** Order IDs for which to retrieve invoices. */ orderIds: string[]; } interface ListInvoicesForMultipleOrdersResponse$1 { /** List of order IDs and their associated invoices. */ invoicesForOrder?: InvoicesForOrder$1[]; } interface InvoicesForOrder$1 { /** Order ID. */ orderId?: string; /** * Invoices info. Deprecated: use `invoices_info` instead * @internal * @deprecated */ invoices?: Invoice[]; /** Invoices info. */ invoicesInfo?: Invoice[]; } interface GenerateInvoiceRequest$1 { /** Order ID. */ orderId: string; } interface GenerateInvoiceResponse$1 { /** Invoice ID. */ invoiceId?: string; } interface BulkGenerateInvoicesRequest$1 { /** Order IDs. */ orderIds: string[]; } interface BulkGenerateInvoicesResponse$1 { results?: BulkInvoiceResult$1[]; bulkActionMetadata?: BulkActionMetadata$4; } interface BulkInvoiceResult$1 { itemMetadata?: ItemMetadata$4; item?: InvoiceForOrder$1; } interface ItemMetadata$4 { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError$c; } interface ApplicationError$c { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface InvoiceForOrder$1 { /** Order ID. */ orderId?: string; /** Invoice ID. */ invoiceId?: string; } interface BulkActionMetadata$4 { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface AddInvoiceToOrderRequest$1 { /** Order ID. */ orderId: string; /** Invoice info. */ invoiceInfo: Invoice; } interface AddInvoiceToOrderResponse$1 { /** List of order invoices. */ orderInvoices?: Invoice[]; } interface DomainEvent$m extends DomainEventBodyOneOf$m { createdEvent?: EntityCreatedEvent$m; updatedEvent?: EntityUpdatedEvent$m; deletedEvent?: EntityDeletedEvent$m; actionEvent?: ActionEvent$m; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$m { createdEvent?: EntityCreatedEvent$m; updatedEvent?: EntityUpdatedEvent$m; deletedEvent?: EntityDeletedEvent$m; actionEvent?: ActionEvent$m; } interface EntityCreatedEvent$m { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$m; } interface RestoreInfo$m { deletedDate?: Date | null; } interface EntityUpdatedEvent$m { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; } interface EntityDeletedEvent$m { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; } interface ActionEvent$m { bodyAsJson?: string; } interface Empty$f { } interface GetOrderInvoiceRequest { /** Invoice ID. */ invoiceId: string; } interface GetOrderInvoiceResponse { /** Order ID. */ orderId?: string; /** Invoice info. */ invoiceInfo?: Invoice; } interface GenerateInvoiceWithNumberRequest { /** Order ID. */ orderId: string; invoiceNumber: string; /** Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. */ issueDate?: Date | null; } interface GenerateInvoiceWithNumberResponse { /** Invoice ID. */ invoiceId?: string; } interface MessageEnvelope$l { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$m; /** Stringify payload. */ data?: string; } interface IdentificationData$m extends IdentificationDataIdOneOf$m { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$l; } /** @oneof */ interface IdentificationDataIdOneOf$m { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$l { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Retrieves the IDs of invoices associated with a specified order. * * * The `listInvoicesForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved. * @param orderId - Order ID. * @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.READ_INVOICES */ function listInvoicesForSingleOrder$1(orderId: string): Promise; /** * Retrieves the IDs of invoices associated with all specified orders. * * * The `listInvoicesForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved. * @param orderIds - Order IDs for which to retrieve invoices. * @public * @documentationMaturity preview * @requiredField orderIds * @permissionId ECOM.READ_INVOICES */ function listInvoicesForMultipleOrders$1(orderIds: string[]): Promise; /** * Retrieves invoices associated with all specified orders. * !!! Deprecated !!! * @param orderIds - Order IDs for which to retrieve invoices. * @internal * @documentationMaturity preview * @requiredField orderIds * @permissionId ECOM.READ_INVOICES * @deprecated * @targetRemovalDate 2025-03-02 */ function listInvoicesForMultipleOrdersOld$1(orderIds: string[]): Promise; /** * Generates and adds an invoice to a specified order. * @param orderId - Order ID. * @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.MODIFY_INVOICES * @adminMethod */ function generateInvoice$1(orderId: string): Promise; /** * Generates and adds invoices to all specified orders. * @param orderIds - Order IDs. * @internal * @documentationMaturity preview * @requiredField orderIds * @permissionId ECOM.MODIFY_INVOICES * @adminMethod */ function bulkGenerateInvoices$1(orderIds: string[]): Promise; /** * Adds an invoice to a specified order. * @param orderId - Order ID. * @param invoiceInfo - Invoice info. * @internal * @documentationMaturity preview * @requiredField invoiceInfo * @requiredField invoiceInfo._id * @requiredField invoiceInfo.appId * @requiredField orderId * @permissionId ECOM.ADD_INVOICE * @adminMethod */ function addInvoiceToOrder$1(orderId: string, invoiceInfo: Invoice): Promise; /** @param invoiceId - Invoice ID. * @internal * @documentationMaturity preview * @requiredField invoiceId * @permissionId ECOM.READ_INVOICES */ function getOrderInvoice(invoiceId: string): Promise; /** * Generates and adds an invoice to a specified order. * @param orderId - Order ID. * @internal * @documentationMaturity preview * @requiredField invoiceNumber * @requiredField orderId * @permissionId ECOM.MODIFY_INVOICES * @adminMethod */ function generateInvoiceWithNumber(orderId: string, invoiceNumber: string, options?: GenerateInvoiceWithNumberOptions): Promise; interface GenerateInvoiceWithNumberOptions { /** Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. */ issueDate?: Date | null; } type ecomOrdersV1Invoice_universal_d_Invoice = Invoice; type ecomOrdersV1Invoice_universal_d_GetOrderInvoiceRequest = GetOrderInvoiceRequest; type ecomOrdersV1Invoice_universal_d_GetOrderInvoiceResponse = GetOrderInvoiceResponse; type ecomOrdersV1Invoice_universal_d_GenerateInvoiceWithNumberRequest = GenerateInvoiceWithNumberRequest; type ecomOrdersV1Invoice_universal_d_GenerateInvoiceWithNumberResponse = GenerateInvoiceWithNumberResponse; const ecomOrdersV1Invoice_universal_d_getOrderInvoice: typeof getOrderInvoice; const ecomOrdersV1Invoice_universal_d_generateInvoiceWithNumber: typeof generateInvoiceWithNumber; type ecomOrdersV1Invoice_universal_d_GenerateInvoiceWithNumberOptions = GenerateInvoiceWithNumberOptions; namespace ecomOrdersV1Invoice_universal_d { export { ecomOrdersV1Invoice_universal_d_Invoice as Invoice, ListInvoicesForSingleOrderRequest$1 as ListInvoicesForSingleOrderRequest, ListInvoicesForSingleOrderResponse$1 as ListInvoicesForSingleOrderResponse, ListInvoicesForMultipleOrdersRequest$1 as ListInvoicesForMultipleOrdersRequest, ListInvoicesForMultipleOrdersResponse$1 as ListInvoicesForMultipleOrdersResponse, InvoicesForOrder$1 as InvoicesForOrder, GenerateInvoiceRequest$1 as GenerateInvoiceRequest, GenerateInvoiceResponse$1 as GenerateInvoiceResponse, BulkGenerateInvoicesRequest$1 as BulkGenerateInvoicesRequest, BulkGenerateInvoicesResponse$1 as BulkGenerateInvoicesResponse, BulkInvoiceResult$1 as BulkInvoiceResult, ItemMetadata$4 as ItemMetadata, ApplicationError$c as ApplicationError, InvoiceForOrder$1 as InvoiceForOrder, BulkActionMetadata$4 as BulkActionMetadata, AddInvoiceToOrderRequest$1 as AddInvoiceToOrderRequest, AddInvoiceToOrderResponse$1 as AddInvoiceToOrderResponse, DomainEvent$m as DomainEvent, DomainEventBodyOneOf$m as DomainEventBodyOneOf, EntityCreatedEvent$m as EntityCreatedEvent, RestoreInfo$m as RestoreInfo, EntityUpdatedEvent$m as EntityUpdatedEvent, EntityDeletedEvent$m as EntityDeletedEvent, ActionEvent$m as ActionEvent, Empty$f as Empty, ecomOrdersV1Invoice_universal_d_GetOrderInvoiceRequest as GetOrderInvoiceRequest, ecomOrdersV1Invoice_universal_d_GetOrderInvoiceResponse as GetOrderInvoiceResponse, ecomOrdersV1Invoice_universal_d_GenerateInvoiceWithNumberRequest as GenerateInvoiceWithNumberRequest, ecomOrdersV1Invoice_universal_d_GenerateInvoiceWithNumberResponse as GenerateInvoiceWithNumberResponse, MessageEnvelope$l as MessageEnvelope, IdentificationData$m as IdentificationData, IdentificationDataIdOneOf$m as IdentificationDataIdOneOf, WebhookIdentityType$l as WebhookIdentityType, listInvoicesForSingleOrder$1 as listInvoicesForSingleOrder, listInvoicesForMultipleOrders$1 as listInvoicesForMultipleOrders, listInvoicesForMultipleOrdersOld$1 as listInvoicesForMultipleOrdersOld, generateInvoice$1 as generateInvoice, bulkGenerateInvoices$1 as bulkGenerateInvoices, addInvoiceToOrder$1 as addInvoiceToOrder, ecomOrdersV1Invoice_universal_d_getOrderInvoice as getOrderInvoice, ecomOrdersV1Invoice_universal_d_generateInvoiceWithNumber as generateInvoiceWithNumber, ecomOrdersV1Invoice_universal_d_GenerateInvoiceWithNumberOptions as GenerateInvoiceWithNumberOptions, }; } interface Recommendation { /** Recommended items. */ items?: CatalogReference$b[]; /** The algorithm used to provide the recommendation. */ algorithm?: Algorithm; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$b { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration). */ options?: Record | null; } interface Algorithm { /** Algorithm ID defined by the app providing the algorithm. */ _id?: string; /** * App ID of the Wix or 3rd-party app providing the algorithm. * * Wix app IDs are listed here. */ appId?: string; } interface ListAvailableAlgorithmsRequest { } interface ListAvailableAlgorithmsResponse { /** Algorithms available for use on your Wix site or project. See the method description for more information. */ availableAlgorithms?: AlgorithmInfo[]; } interface AlgorithmInfo { /** How the algorithm is configured. */ config?: AlgorithmConfig; /** * The app ID of the application providing the algorithm. * * Wix app IDs are listed here. */ appId?: string; /** * App IDs of catalogs to which the algorithm can be applied. * * Wix app IDs are listed here. */ catalogAppIds?: string[]; } interface AlgorithmConfig { /** Algorithm name. This value is not translatable. */ name?: string; /** Algorithm description. This describes how the algorithm works and if it has any limitations regarding site content, number of items in the catalog, site traffic, and so on. This value is not translatable. */ description?: string; /** A supplemental `description`. It can be used to help break up and organize information. You can, for example, display this information as a tooltip or as an additional section that is collapsed by default. */ additionalInfo?: string | null; /** * Algorithms may have the following types: * * `RELATED_ITEMS` - This type of algorithm provides recommendations based on 1 or more other provided items. For example, when an item is added to a cart, the algorithm can suggest other items frequently bought together with that item. * * `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals. */ algorithmType?: AlgorithmType; /** Algorithm ID. This must be unique for a specific app but does not have to be unique across all apps on the site or in the project. */ algorithmId?: string; } enum AlgorithmType { UNSPECIFIED = "UNSPECIFIED", RELATED_ITEMS = "RELATED_ITEMS", GLOBAL = "GLOBAL" } interface GetRecommendationRequest { /** The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`. */ items?: CatalogReference$b[]; /** * A list of algorithms checked in a specific order determined by their `appID` and their position in the `algorithms` array. * See the method description for more information. * * If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned. */ algorithms: Algorithm[]; /** * The minimum number of items that must be recommended by the algorithm for those items to be returned in the response. * * Max: `100` */ minimumRecommendedItems?: number; } interface GetRecommendationResponse { /** An object containing a list of items recommended by 1 of the specified algorithms. The recommendation is empty if none of the specified algorithms recommended enough items. */ recommendation?: Recommendation; } interface ItemAppIdNotSupportedByProvider { /** Items with an App ID not supported by the provider. Supported App IDs can be found in the provider config in the Dev Center. */ items?: CatalogReference$b[]; /** Algorithms that don't support the requested items. */ algorithms?: Algorithm[]; } interface RecommendationAlgorithmNotSupported { /** Algorithms not supported by the provider. */ unsupportedAlgorithms?: Algorithm[]; } /** * Returns a list of recommendation algorithms that can be used on your Wix site or project. These algorithms can be used with [`getRecommendation()`](#getRecommendation) to provide item recommendations to the customer. * * Algorithms are run by the apps that provide them, and can only be used on catalogs they support. Apps may provide algorithms for use with their own catalogs and/or catalogs from other apps. * * The app which provides an algorithm is referenced by that algorithm’s `appId`. The apps whose catalogs are supported by an algorithm are referenced by the IDs in that algorithm’s `catalogAppIds` array. * * * For an algorithm to be considered “Available” and returned in this method’s response, the algorithm must meet the following conditions: * 1. The algorithm’s `appId` must match the ID of an installed Wix app. * 2. At least 1 of the IDs in `catalogAppIds` must match the ID of an installed Wix app. * * Wix app IDs are [listed here](https://dev.wix.com/api/rest/getting-started/wix-business-solutions#getting-started_wix-business-solutions_about-wix-business-solutions). * @public * @documentationMaturity preview * @permissionId RECOMMENDATIONS.READ */ function listAvailableAlgorithms(): Promise; /** * Returns a recommendation object containing a list of items to recommend to the customer. * * `getRecommendation()` determines which items to recommend based on the given recommendation algorithms. * * `getRecommendation()` doesn’t run the algorithms. It calls the installed apps that provide them. * * Apps may provide algorithms for use with their own catalogs, or for use with catalogs from other apps. * For example, Wix Stores provides algorithms that can only be used on its own catalogs. * To run an algorithm, the app providing it must be installed, and an app providing a supported catalog must be installed. * For more information and to see which algorithms are available on your site or project, call [`listAvailableAlgorithms()`](#listavailablealgorithms). * * `getRecommendation()` operates as follows: * 1. `getRecommendation()` receives as input a list of algorithms as an array. These algorithms can be provided by different apps and can apply to different catalogs. * 2. `getRecommendation()` calls the app that corresponds to the `appId` of the first algorithm in the list of algorithms. It passes that algorithm’s ID and the IDs of any subsequent algorithms in the array for the same app. * 3. The app runs the algorithms. * 4. `getRecommendation()` returns items recommendations from the first algorithm (according to its position in the `algorithms` array) that meets the minimum number of recommendations. At that point `getRecommendation()` stops calling other apps. * 5. If none of the algorithms run by the first app meet the minimum recommended items, `getRecommendation()` finds the next algorithm in the array with a new `appId` (an ID of an app that has not yet been called), and repeats the process. * 6. If no algorithms in the `algorithms` array recommend at least the minimum recommended items, `getRecommendation()` returns an empty array. * @param algorithms - A list of algorithms checked in a specific order determined by their `appID` and their position in the `algorithms` array. * See the method description for more information. * * If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned. * @public * @documentationMaturity preview * @requiredField algorithms * @requiredField algorithms._id * @requiredField algorithms.appId * @requiredField options.items.appId * @requiredField options.items.catalogItemId * @param options - Get recommendation options. * @permissionId RECOMMENDATIONS.READ */ function getRecommendation(algorithms: Algorithm[], options?: GetRecommendationOptions): Promise; interface GetRecommendationOptions { /** The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`. */ items?: CatalogReference$b[]; /** * The minimum number of items that must be recommended by the algorithm for those items to be returned in the response. * * Max: `100` */ minimumRecommendedItems?: number; } type ecomRecommendationsV1Recommendation_universal_d_Recommendation = Recommendation; type ecomRecommendationsV1Recommendation_universal_d_Algorithm = Algorithm; type ecomRecommendationsV1Recommendation_universal_d_ListAvailableAlgorithmsRequest = ListAvailableAlgorithmsRequest; type ecomRecommendationsV1Recommendation_universal_d_ListAvailableAlgorithmsResponse = ListAvailableAlgorithmsResponse; type ecomRecommendationsV1Recommendation_universal_d_AlgorithmInfo = AlgorithmInfo; type ecomRecommendationsV1Recommendation_universal_d_AlgorithmConfig = AlgorithmConfig; type ecomRecommendationsV1Recommendation_universal_d_AlgorithmType = AlgorithmType; const ecomRecommendationsV1Recommendation_universal_d_AlgorithmType: typeof AlgorithmType; type ecomRecommendationsV1Recommendation_universal_d_GetRecommendationRequest = GetRecommendationRequest; type ecomRecommendationsV1Recommendation_universal_d_GetRecommendationResponse = GetRecommendationResponse; type ecomRecommendationsV1Recommendation_universal_d_ItemAppIdNotSupportedByProvider = ItemAppIdNotSupportedByProvider; type ecomRecommendationsV1Recommendation_universal_d_RecommendationAlgorithmNotSupported = RecommendationAlgorithmNotSupported; const ecomRecommendationsV1Recommendation_universal_d_listAvailableAlgorithms: typeof listAvailableAlgorithms; const ecomRecommendationsV1Recommendation_universal_d_getRecommendation: typeof getRecommendation; type ecomRecommendationsV1Recommendation_universal_d_GetRecommendationOptions = GetRecommendationOptions; namespace ecomRecommendationsV1Recommendation_universal_d { export { ecomRecommendationsV1Recommendation_universal_d_Recommendation as Recommendation, CatalogReference$b as CatalogReference, ecomRecommendationsV1Recommendation_universal_d_Algorithm as Algorithm, ecomRecommendationsV1Recommendation_universal_d_ListAvailableAlgorithmsRequest as ListAvailableAlgorithmsRequest, ecomRecommendationsV1Recommendation_universal_d_ListAvailableAlgorithmsResponse as ListAvailableAlgorithmsResponse, ecomRecommendationsV1Recommendation_universal_d_AlgorithmInfo as AlgorithmInfo, ecomRecommendationsV1Recommendation_universal_d_AlgorithmConfig as AlgorithmConfig, ecomRecommendationsV1Recommendation_universal_d_AlgorithmType as AlgorithmType, ecomRecommendationsV1Recommendation_universal_d_GetRecommendationRequest as GetRecommendationRequest, ecomRecommendationsV1Recommendation_universal_d_GetRecommendationResponse as GetRecommendationResponse, ecomRecommendationsV1Recommendation_universal_d_ItemAppIdNotSupportedByProvider as ItemAppIdNotSupportedByProvider, ecomRecommendationsV1Recommendation_universal_d_RecommendationAlgorithmNotSupported as RecommendationAlgorithmNotSupported, ecomRecommendationsV1Recommendation_universal_d_listAvailableAlgorithms as listAvailableAlgorithms, ecomRecommendationsV1Recommendation_universal_d_getRecommendation as getRecommendation, ecomRecommendationsV1Recommendation_universal_d_GetRecommendationOptions as GetRecommendationOptions, }; } /** * A SubscriptionContract is a ... * You can ... * Read more about SubscriptionContracts * in this [article](). */ interface SubscriptionContract { /** * SubscriptionContract ID. * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the SubscriptionContract is updated. * To prevent conflicting changes, the current revision must be passed when updating the SubscriptionContract. * * Ignored when creating a SubscriptionOrderContract. * @readonly */ revision?: string | null; /** * Date and time the subscription contract was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _createdDate?: Date | null; /** * Date and time the subscription contract was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _updatedDate?: Date | null; /** * Corresponding billing subscription id * @internal */ billingSubscriptionId?: string | null; /** Subscription option description. For example, `"1kg of selected coffee, once a month"`. */ description?: string | null; /** Subscription detailed information. */ subscriptionSettings?: V1SubscriptionSettings$1; /** * Order line items. * @readonly */ lineItems?: OrderLineItem$2[]; /** Buyer information. */ buyerInfo?: BuyerInfo$9; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string | null; /** Weight measurement unit - defaults to site's weight unit. */ weightUnit?: WeightUnit$9; /** Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format. */ currency?: string | null; /** * Whether tax is included in line item prices. * * Default: `false` */ taxIncludedInPrices?: boolean; /** * Order price summary. * @readonly */ priceSummary?: PriceSummary$7; /** Billing address and contact details. */ billingInfo?: AddressWithContact$6; /** Shipping info and selected shipping option details. */ shippingInfo?: ShippingInformation$5; /** * Tax information. * @internal */ taxInfo?: OrderTaxInfo$2; /** Applied discounts. */ appliedDiscounts?: AppliedDiscount$7[]; /** Information about the sales channel that submitted this order. */ channelInfo?: ChannelInfo$4; /** Custom fields. */ customFields?: CustomField$5[]; /** * Order recipient address and contact details. * * This field may differ from the address in `shippingInfo.logistics` when: * + The chosen shipping option is pickup point or store pickup. * + No shipping option is selected. */ recipientInfo?: AddressWithContact$6; /** * Custom field data for the subscription contract object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */ extendedFields?: ExtendedFields$b; /** Subscription option title. For example, `"Monthly coffee Subscription"`. */ title?: string | null; } interface V1SubscriptionSettings$1 { /** Frequency of recurring payment. */ frequency?: V1SubscriptionFrequency; /** Interval of recurring payment. */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number | null; /** Whether to allow the customer to cancel the subscription. */ enableCustomerCancellation?: boolean; } enum V1SubscriptionFrequency { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } interface OrderLineItem$2 { /** Line item ID. */ _id?: string; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: ProductName$6; /** * References to the line item's origin catalog. * This field may be empty in the case of a custom line item. */ catalogReference?: CatalogReference$a; /** Line item quantity. */ quantity?: number; /** * Total discount for this line item's entire quantity. * @readonly */ totalDiscount?: Price$5; /** Line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: DescriptionLine$6[]; /** Line item image. */ image?: string; /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */ physicalProperties?: PhysicalProperties$8; /** Item type. Either a preset type or custom. */ itemType?: ItemType$7; /** * Fulfiller ID. Field is empty when the line item is self-fulfilled. * To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order). */ fulfillerId?: string | null; /** Number of items that were refunded. */ refundQuantity?: number | null; /** Number of items restocked. */ restockQuantity?: number | null; /** Line item price after line item discounts for display purposes. */ price?: Price$5; /** * Line item price before line item discounts for display purposes. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: Price$5; /** * Total price after discounts, and before tax. * @readonly */ totalPriceBeforeTax?: Price$5; /** * Total price after all discounts and tax. * @readonly */ totalPriceAfterTax?: Price$5; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only. */ paymentOption?: PaymentOptionType$4; /** * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @deprecated Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxDetails?: ItemTaxFullDetails$7; /** Represents all the relevant tax details for a specific line item. */ taxInfo?: LineItemTaxInfo$2; /** Digital file identifier, relevant only for items with type DIGITAL. */ digitalFile?: DigitalFile$3; /** Subscription info. */ subscriptionInfo?: SubscriptionInfo$3; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription$6; /** * Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`. * @readonly */ depositAmount?: Price$5; /** * The Item's Delivery Profile Id * @internal */ deliveryProfileId?: string | null; /** @internal */ shippingGroupId?: string | null; /** * Source locations for this line item. The location's total quantity must not exceed the line item quantity. * @internal */ locations?: LocationAndQuantity$2[]; /** * Total price **after** catalog discounts and line item discounts. * @internal */ lineItemPrice?: Price$5; /** * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin. * @internal * @readonly */ customLineItem?: boolean | null; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field has the same value as `catalogReference.catalogItemId`. * @internal * @readonly */ rootCatalogItemId?: string | null; /** * Address used for tax calculation. * @internal */ taxableAddress?: TaxableAddress$7; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; /** * Whether the price is not yet defined, and will be updated after the order is created. * * Default: `false` * @internal */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * * Default: `false` * @internal */ fixedQuantity?: boolean; /** * Custom extended fields for the line item object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. * @internal */ extendedFields?: ExtendedFields$b; } interface ProductName$6 { /** * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * * Min: 1 character. * Max: 200 characters. */ original?: string; /** * Item name translated into the buyer's language. * * Min: 1 character. * Max: 400 characters. * Default: Same as `original`. */ translated?: string | null; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$a { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration). */ options?: Record | null; } interface Price$5 { /** Amount. */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } interface DescriptionLine$6 extends DescriptionLineValueOneOf$6, DescriptionLineDescriptionLineValueOneOf$6 { /** Description line plain text value. */ plainText?: PlainTextValue$6; /** Description line color value. */ colorInfo?: Color$6; /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$6; /** * Description line color. * @internal * @deprecated */ color?: string; /** Description line name. */ name?: DescriptionLineName$6; /** * Description line type. * @internal * @deprecated */ lineType?: DescriptionLineType$6; } /** @oneof */ interface DescriptionLineValueOneOf$6 { /** Description line plain text value. */ plainText?: PlainTextValue$6; /** Description line color value. */ colorInfo?: Color$6; } /** @oneof */ interface DescriptionLineDescriptionLineValueOneOf$6 { /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$6; /** * Description line color. * @internal * @deprecated */ color?: string; } interface DescriptionLineName$6 { /** Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface PlainTextValue$6 { /** Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line plain text value translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface Color$6 { /** Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line color name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; /** HEX or RGB color code for display. */ code?: string | null; } enum DescriptionLineType$6 { /** Unrecognized type. */ UNRECOGNISED = "UNRECOGNISED", /** Plain text type. */ PLAIN_TEXT = "PLAIN_TEXT", /** Color type. */ COLOR = "COLOR" } interface FocalPoint$7 { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } interface PhysicalProperties$8 { /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */ weight?: number | null; /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string | null; /** Whether this line item is shippable. */ shippable?: boolean; } interface ItemType$7 extends ItemTypeItemTypeDataOneOf$7 { /** Preset item type. */ preset?: ItemTypeItemType$7; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } /** @oneof */ interface ItemTypeItemTypeDataOneOf$7 { /** Preset item type. */ preset?: ItemTypeItemType$7; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } enum ItemTypeItemType$7 { UNRECOGNISED = "UNRECOGNISED", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL", GIFT_CARD = "GIFT_CARD", SERVICE = "SERVICE" } /** Type of selected payment option for catalog item */ enum PaymentOptionType$4 { /** The entire payment for this item happens as part of the checkout. */ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE", /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE", /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */ MEMBERSHIP = "MEMBERSHIP", /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */ DEPOSIT_ONLINE = "DEPOSIT_ONLINE", /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE" } interface ItemTaxFullDetails$7 { /** Taxable amount of this line item. */ taxableAmount?: Price$5; /** * ID of the item's tax group, if specified. * @internal */ taxGroupId?: string | null; /** Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`. */ taxRate?: string; /** The calculated tax, based on the `taxableAmount` and `taxRate`. */ totalTax?: Price$5; } interface LineItemTaxInfo$2 { /** Calculated tax, based on `taxable_amount` and `tax_rate`. */ taxAmount?: Price$5; /** Amount for which tax is calculated. */ taxableAmount?: Price$5; /** Tax rate %, as a decimal point. */ taxRate?: string | null; /** * Tax group ID. * Learn more about [Tax Groups](https://dev.wix.com/docs/rest/business-management/payments/tax/tax-groups/introduction). */ taxGroupId?: string | null; /** Indicates whether the price already includes tax. */ taxIncludedInPrice?: boolean; /** Tax information for a line item. */ taxBreakdown?: LineItemTaxBreakdown$2[]; } /** * TaxBreakdown represents tax information for a line item. * It holds the tax amount and the tax rate for each tax authority that apply on the line item. */ interface LineItemTaxBreakdown$2 { /** Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec". */ jurisdiction?: string | null; /** Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000. */ rate?: string | null; /** Amount of tax calculated for this line item. */ taxAmount?: Price$5; /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */ taxType?: string | null; /** * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. * This name should be explicit enough to allow the merchant to understand what tax was calculated. */ taxName?: string | null; /** Type of jurisdiction that taxes were calculated for. */ jurisdictionType?: JurisdictionType$7; /** Non-taxable amount of the line item price. */ nonTaxableAmount?: Price$5; /** Taxable amount of the line item price. */ taxableAmount?: Price$5; } /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ enum JurisdictionType$7 { UNDEFINED = "UNDEFINED", COUNTRY = "COUNTRY", STATE = "STATE", COUNTY = "COUNTY", CITY = "CITY", SPECIAL = "SPECIAL" } interface DigitalFile$3 { /** ID of the secure file in media. */ fileId?: string; /** Link will exist after the digital links have been generated on the order. */ link?: string | null; /** * Link expiration time and date. * @readonly */ expirationDate?: Date | null; } interface SubscriptionInfo$3 { /** Subscription ID. */ _id?: string | null; /** Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`. */ cycleNumber?: number; /** Subscription option title. For example, `"Monthly coffee Subscription"`. */ subscriptionOptionTitle?: string; /** Subscription option description. For example, `"1kg of selected coffee, once a month"`. */ subscriptionOptionDescription?: string | null; /** Subscription detailed information. */ subscriptionSettings?: SubscriptionSettings$8; } interface SubscriptionSettings$8 { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequency$8; /** Interval of recurring payment. */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number | null; /** * Whether to allow the customer to cancel the subscription. * @internal */ enableCustomerCancellation?: boolean; } /** Frequency unit of recurring payment */ enum SubscriptionFrequency$8 { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } interface PriceDescription$6 { /** __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Price description translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface LocationAndQuantity$2 { /** Location id in the associated owner app. */ _id?: string; /** Location owner app, if not provided then the site business info locations will be used. */ appId?: string | null; /** Quantity for specific location. */ quantity?: number; } interface TaxableAddress$7 extends TaxableAddressTaxableAddressDataOneOf$7 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$7; } /** @oneof */ interface TaxableAddressTaxableAddressDataOneOf$7 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$7; } enum TaxableAddressType$7 { UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS", BUSINESS = "BUSINESS", BILLING = "BILLING", SHIPPING = "SHIPPING" } interface ExtendedFields$b { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } /** Buyer Info */ interface BuyerInfo$9 extends BuyerInfoIdOneOf$6 { /** Visitor ID (if site visitor is not a member). */ visitorId?: string; /** Member ID (if site visitor is a site member). */ memberId?: string; /** Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction). */ contactId?: string | null; /** Buyer email address. */ email?: string | null; } /** @oneof */ interface BuyerInfoIdOneOf$6 { /** Visitor ID (if site visitor is not a member). */ visitorId?: string; /** Member ID (if site visitor is a site member). */ memberId?: string; } enum WeightUnit$9 { /** Weight unit can't be classified, due to an error */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms */ KG = "KG", /** Pounds */ LB = "LB" } interface PriceSummary$7 { /** Subtotal of all the line items, before discounts and before tax. */ subtotal?: Price$5; /** Total shipping price, before discounts and before tax. */ shipping?: Price$5; /** Total tax on this order. */ tax?: Price$5; /** Total calculated discount value. */ discount?: Price$5; /** * Deprecated - use `total` instead. * @internal * @deprecated */ totalPrice?: Price$5; /** Order’s total price after discounts and tax. */ total?: Price$5; /** * Order's total price including gift card. * @internal * @deprecated */ totalWithGiftCard?: Price$5; /** * Order's total price after without gift card. * @internal * @deprecated */ totalWithoutGiftCard?: Price$5; /** Total price of additional fees before tax. */ totalAdditionalFees?: Price$5; } /** Billing Info and shipping details */ interface AddressWithContact$6 { /** Address. */ address?: Address$b; /** Contact details. */ contactDetails?: FullAddressContactDetails$8; } /** Physical address */ interface Address$b { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress$a; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** @internal */ location?: AddressLocation$a; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } interface StreetAddress$a { /** Street number. */ number?: string; /** Street name. */ name?: string; /** * Apartment number. * @internal */ apt?: string; /** * Optional address line 1 * @internal */ formattedAddressLine?: string | null; } interface AddressLocation$a { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } /** Full contact details for an address */ interface FullAddressContactDetails$8 { /** First name. */ firstName?: string | null; /** Last name. */ lastName?: string | null; /** Phone number. */ phone?: string | null; /** Company name. */ company?: string | null; /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */ vatId?: VatId$9; } interface VatId$9 { /** Customer's tax ID. */ _id?: string; /** * Tax type. * * Supported values: * + `CPF`: for individual tax payers * + `CNPJ`: for corporations */ type?: VatType$9; } /** tax info types */ enum VatType$9 { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } interface ShippingInformation$5 { /** App Def Id of external provider which was a source of shipping info */ carrierId?: string | null; /** Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`. */ code?: string | null; /** * Shipping option title. * For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`. */ title?: string; /** Shipping logistics. */ logistics?: DeliveryLogistics$8; /** Shipping costs. */ cost?: ShippingPrice$7; /** Shipping region. */ region?: ShippingRegion$7; } interface DeliveryLogistics$8 extends DeliveryLogisticsAddressOneOf$1 { /** Shipping address and contact details. */ shippingDestination?: AddressWithContact$6; /** Pickup details. */ pickupDetails?: PickupDetails$9; /** Expected delivery time in free text. For example, `"3-5 business days"`. */ deliveryTime?: string | null; /** Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`. */ instructions?: string | null; /** * Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @deprecated */ deliverByDate?: Date | null; /** Expected delivery time. */ deliveryTimeSlot?: DeliveryTimeSlot$8; } /** @oneof */ interface DeliveryLogisticsAddressOneOf$1 { /** Shipping address and contact details. */ shippingDestination?: AddressWithContact$6; /** Pickup details. */ pickupDetails?: PickupDetails$9; } interface PickupDetails$9 { /** Pickup address. */ address?: PickupAddress$4; /** Pickup method */ pickupMethod?: PickupMethod$8; } /** Physical address */ interface PickupAddress$4 { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: StreetAddress$a; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; /** @internal */ location?: AddressLocation$a; } enum PickupMethod$8 { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } interface DeliveryTimeSlot$8 { /** Delivery slot starting time. */ from?: Date | null; /** Delivery slot ending time. */ to?: Date | null; } interface ShippingPrice$7 { /** Shipping price for display purposes. */ price?: Price$5; /** * Total price of shipping after discounts (when relevant), and before tax. * @readonly */ totalPriceBeforeTax?: Price$5; /** * Shipping price after all discounts (if any exist), and after tax. * @readonly */ totalPriceAfterTax?: Price$5; /** Tax details. */ taxDetails?: ItemTaxFullDetails$7; /** * Shipping discount before tax. * @readonly */ discount?: Price$5; } interface ShippingRegion$7 { /** Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. */ name?: string | null; } interface OrderTaxInfo$2 { /** Calculated tax, added from line items. */ totalTax?: Price$5; /** The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. */ taxBreakdown?: OrderTaxBreakdown$2[]; /** * Manual tax rate * @internal * @readonly */ manualTaxRate?: string | null; /** * Whether the draft order is exempt from tax calculations. * * Default: `false` * @readonly */ taxExempt?: boolean | null; } /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * Tax breakdown is the tax amount split to the tax authorities that applied on the line item. */ interface OrderTaxBreakdown$2 { /** The name of the tax against which this tax amount was calculated. */ taxName?: string; /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */ taxType?: string; /** The name of the jurisdiction in which this tax detail applies. */ jurisdiction?: string; /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ jurisdictionType?: JurisdictionType$7; /** The rate at which this tax detail was calculated. */ rate?: string; /** The sum of all the tax from line items that calculated by the tax identifiers. */ aggregatedTaxAmount?: Price$5; /** * The sum of all the taxable amount from line items for tax identifiers. * @internal */ aggregatedTaxableAmount?: Price$5; } interface AppliedDiscount$7 extends AppliedDiscountDiscountSourceOneOf$7 { /** Applied coupon info. */ coupon?: Coupon$7; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$7; /** Automatic Discount */ discountRule?: DiscountRule$7; /** * Discount type. * * `"GLOBAL"` - discount applies to entire order. * * `"SPECIFIC-ITEMS"` - discount applies to specific items. * * `"SHIPPING"` - discount applies to shipping. For example, free shipping. */ discountType?: DiscountType$7; /** * IDs of line items discount applies to. * Deprecated. Use `line_item_discounts` instead. * @deprecated IDs of line items discount applies to. * Deprecated. Use `line_item_discounts` instead. * @replacedBy line_item_discounts * @targetRemovalDate 2024-10-30 */ lineItemIds?: string[]; /** Discount id. */ _id?: string | null; /** * Line items the discount applies to. * @internal */ lineItemDiscounts?: LineItemDiscount$7[]; } /** @oneof */ interface AppliedDiscountDiscountSourceOneOf$7 { /** Applied coupon info. */ coupon?: Coupon$7; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$7; /** Automatic Discount */ discountRule?: DiscountRule$7; } enum DiscountType$7 { GLOBAL = "GLOBAL", SPECIFIC_ITEMS = "SPECIFIC_ITEMS", SHIPPING = "SHIPPING" } /** Coupon */ interface Coupon$7 { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** Coupon name. */ name?: string; /** Coupon value. */ amount?: Price$5; } interface MerchantDiscount$7 extends MerchantDiscountMerchantDiscountReasonOneOf$2 { /** * Pre-defined discount reason (optional). * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange. */ discountReason?: DiscountReason$2; /** Discount description as free text (optional). */ description?: string | null; /** Discount amount. */ amount?: Price$5; /** * Discount percentage. * @internal */ percentage?: string | null; } /** @oneof */ interface MerchantDiscountMerchantDiscountReasonOneOf$2 { /** * Pre-defined discount reason (optional). * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange. */ discountReason?: DiscountReason$2; /** Discount description as free text (optional). */ description?: string | null; } enum DiscountReason$2 { UNSPECIFIED = "UNSPECIFIED", EXCHANGED_ITEMS = "EXCHANGED_ITEMS" } interface DiscountRule$7 { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: DiscountRuleName$7; /** Discount value. */ amount?: Price$5; } interface DiscountRuleName$7 { /** Original discount rule name (in site's default language). */ original?: string; /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string | null; } interface LineItemDiscount$7 { /** ID of line item the discount applies to. */ _id?: string; /** Total discount for this line item. */ totalDiscount?: Price$5; } interface ChannelInfo$4 { /** Sales channel that submitted the order. */ type?: ChannelType$7; /** Reference to an order ID from an external system. */ externalOrderId?: string | null; /** URL to the order in the external system. */ externalOrderUrl?: string | null; } enum ChannelType$7 { /** Unspecified sales channel. This value is not supported. */ UNSPECIFIED = "UNSPECIFIED", /** A web client. */ WEB = "WEB", /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */ POS = "POS", /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */ EBAY = "EBAY", /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */ AMAZON = "AMAZON", /** Other sales platform. */ OTHER_PLATFORM = "OTHER_PLATFORM", /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */ WIX_APP_STORE = "WIX_APP_STORE", /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */ WIX_INVOICES = "WIX_INVOICES", /** Wix merchant backoffice. */ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT", /** Wish sales channel. */ WISH = "WISH", /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */ CLASS_PASS = "CLASS_PASS", /** Global-E sales channel. */ GLOBAL_E = "GLOBAL_E", /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */ FACEBOOK = "FACEBOOK", /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */ ETSY = "ETSY", /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */ TIKTOK = "TIKTOK", /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */ FAIRE_COM = "FAIRE_COM" } interface CustomField$5 { /** Custom field value. */ value?: any; /** Custom field title. */ title?: string; /** Translated custom field title. */ translatedTitle?: string | null; } interface CreateSubscriptionContractRequest { /** SubscriptionContract to be created. */ subscriptionContract: SubscriptionContract; } interface CreateSubscriptionContractResponse { /** The created SubscriptionContract. */ subscriptionContract?: SubscriptionContract; } interface GetSubscriptionContractRequest { /** ID of the SubscriptionContract to retrieve. */ subscriptionContractId: string; } interface GetSubscriptionContractResponse { /** The requested SubscriptionContract. */ subscriptionContract?: SubscriptionContract; } interface UpdateSubscriptionContractRequest { /** SubscriptionContract to be updated, may be partial. */ subscriptionContract: SubscriptionContract; /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } interface UpdateSubscriptionContractResponse { /** Updated SubscriptionContract. */ subscriptionContract?: SubscriptionContract; } interface QuerySubscriptionContractsRequest { /** WQL expression. */ query?: CursorQuery$8; } interface CursorQuery$8 extends CursorQueryPagingMethodOneOf$8 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$e; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` * Learn more about the [filter format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * Learn more about the [sort format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sort?: Sorting$e[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf$8 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$e; } interface Sorting$e { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$e; } enum SortOrder$e { ASC = "ASC", DESC = "DESC" } interface CursorPaging$e { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QuerySubscriptionContractsResponse { /** List of SubscriptionContracts. */ subscriptionContracts?: SubscriptionContract[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata$b; } interface CursorPagingMetadata$b { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors$e; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors$e { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface DomainEvent$l extends DomainEventBodyOneOf$l { createdEvent?: EntityCreatedEvent$l; updatedEvent?: EntityUpdatedEvent$l; deletedEvent?: EntityDeletedEvent$l; actionEvent?: ActionEvent$l; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$l { createdEvent?: EntityCreatedEvent$l; updatedEvent?: EntityUpdatedEvent$l; deletedEvent?: EntityDeletedEvent$l; actionEvent?: ActionEvent$l; } interface EntityCreatedEvent$l { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$l; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$l { deletedDate?: Date | null; } interface EntityUpdatedEvent$l { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$l { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$l { bodyAsJson?: string; } interface Empty$e { } interface MessageEnvelope$k { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$l; /** Stringify payload. */ data?: string; } interface IdentificationData$l extends IdentificationDataIdOneOf$l { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$k; } /** @oneof */ interface IdentificationDataIdOneOf$l { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$k { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates a SubscriptionContract. * @param subscriptionContract - SubscriptionContract to be created. * @internal * @documentationMaturity preview * @requiredField subscriptionContract * @requiredField subscriptionContract.billingInfo.contactDetails * @requiredField subscriptionContract.billingInfo.contactDetails.firstName * @requiredField subscriptionContract.channelInfo * @requiredField subscriptionContract.lineItems * @requiredField subscriptionContract.lineItems.catalogReference.appId * @requiredField subscriptionContract.lineItems.catalogReference.catalogItemId * @requiredField subscriptionContract.lineItems.itemType * @requiredField subscriptionContract.lineItems.price * @requiredField subscriptionContract.lineItems.productName * @requiredField subscriptionContract.lineItems.productName.original * @requiredField subscriptionContract.lineItems.quantity * @requiredField subscriptionContract.priceSummary * @requiredField subscriptionContract.subscriptionSettings * @requiredField subscriptionContract.subscriptionSettings.interval * @permissionId ECOM.SUBSCRIPTION_CONTRACT_CREATE * @adminMethod * @returns The created SubscriptionContract. */ function createSubscriptionContract(subscriptionContract: SubscriptionContract): Promise; /** * Retrieves a SubscriptionContract. * @param subscriptionContractId - ID of the SubscriptionContract to retrieve. * @public * @documentationMaturity preview * @requiredField subscriptionContractId * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ * @adminMethod * @returns The requested SubscriptionContract. */ function getSubscriptionContract(subscriptionContractId: string): Promise; /** * Updates a SubscriptionContract. * * Each time the SubscriptionContract is updated, `revision` increments by 1. * The current `revision` must be passed when updating the SubscriptionContract. * This ensures you're working with the latest SubscriptionContract and prevents unintended overwrites. * * Currently, the following fields can be updated: * + `subscriptionContract.billingSubscriptionId` * @param _id - SubscriptionContract ID. * @internal * @documentationMaturity preview * @requiredField _id * @requiredField subscriptionContract * @permissionId ECOM.SUBSCRIPTION_CONTRACT_UPDATE * @adminMethod * @returns Updated SubscriptionContract. */ function updateSubscriptionContract(_id: string | null, subscriptionContract: UpdateSubscriptionContract, options?: UpdateSubscriptionContractOptions): Promise; interface UpdateSubscriptionContract { /** * SubscriptionContract ID. * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the SubscriptionContract is updated. * To prevent conflicting changes, the current revision must be passed when updating the SubscriptionContract. * * Ignored when creating a SubscriptionOrderContract. * @readonly */ revision?: string | null; /** * Date and time the subscription contract was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _createdDate?: Date | null; /** * Date and time the subscription contract was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _updatedDate?: Date | null; /** * Corresponding billing subscription id * @internal */ billingSubscriptionId?: string | null; /** Subscription option description. For example, `"1kg of selected coffee, once a month"`. */ description?: string | null; /** Subscription detailed information. */ subscriptionSettings?: V1SubscriptionSettings$1; /** * Order line items. * @readonly */ lineItems?: OrderLineItem$2[]; /** Buyer information. */ buyerInfo?: BuyerInfo$9; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string | null; /** Weight measurement unit - defaults to site's weight unit. */ weightUnit?: WeightUnit$9; /** Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format. */ currency?: string | null; /** * Whether tax is included in line item prices. * * Default: `false` */ taxIncludedInPrices?: boolean; /** * Order price summary. * @readonly */ priceSummary?: PriceSummary$7; /** Billing address and contact details. */ billingInfo?: AddressWithContact$6; /** Shipping info and selected shipping option details. */ shippingInfo?: ShippingInformation$5; /** * Tax information. * @internal */ taxInfo?: OrderTaxInfo$2; /** Applied discounts. */ appliedDiscounts?: AppliedDiscount$7[]; /** Information about the sales channel that submitted this order. */ channelInfo?: ChannelInfo$4; /** Custom fields. */ customFields?: CustomField$5[]; /** * Order recipient address and contact details. * * This field may differ from the address in `shippingInfo.logistics` when: * + The chosen shipping option is pickup point or store pickup. * + No shipping option is selected. */ recipientInfo?: AddressWithContact$6; /** * Custom field data for the subscription contract object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */ extendedFields?: ExtendedFields$b; /** Subscription option title. For example, `"Monthly coffee Subscription"`. */ title?: string | null; } interface UpdateSubscriptionContractOptions { /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } /** * Retrieves a list of SubscriptionContracts, given the provided [paging, filtering, and sorting][1]. * * Up to 300 SubscriptionContracts can be returned per request. * * To learn how to query SubscriptionContracts, see [API Query Language][2]. * * [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging * [2]: https://dev.wix.com/api/rest/getting-started/api-query-language * @public * @documentationMaturity preview * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ * @adminMethod */ function querySubscriptionContracts(): SubscriptionContractsQueryBuilder; interface QueryCursorResult$e { cursors: Cursors$e; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface SubscriptionContractsQueryResult extends QueryCursorResult$e { items: SubscriptionContract[]; query: SubscriptionContractsQueryBuilder; next: () => Promise; prev: () => Promise; } interface SubscriptionContractsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'buyerInfo.contactId', value: any) => SubscriptionContractsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'buyerInfo.contactId', value: any) => SubscriptionContractsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'buyerInfo.contactId', value: string) => SubscriptionContractsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'buyerInfo.contactId', value: any[]) => SubscriptionContractsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'buyerInfo.contactId', value: any) => SubscriptionContractsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'buyerInfo.contactId', value: boolean) => SubscriptionContractsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | 'buyerInfo.contactId'>) => SubscriptionContractsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | 'buyerInfo.contactId'>) => SubscriptionContractsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => SubscriptionContractsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => SubscriptionContractsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } type ecomSubscriptionContractsV1SubscriptionContract_universal_d_SubscriptionContract = SubscriptionContract; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_V1SubscriptionFrequency = V1SubscriptionFrequency; const ecomSubscriptionContractsV1SubscriptionContract_universal_d_V1SubscriptionFrequency: typeof V1SubscriptionFrequency; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_CreateSubscriptionContractRequest = CreateSubscriptionContractRequest; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_CreateSubscriptionContractResponse = CreateSubscriptionContractResponse; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_GetSubscriptionContractRequest = GetSubscriptionContractRequest; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_GetSubscriptionContractResponse = GetSubscriptionContractResponse; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_UpdateSubscriptionContractRequest = UpdateSubscriptionContractRequest; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_UpdateSubscriptionContractResponse = UpdateSubscriptionContractResponse; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_QuerySubscriptionContractsRequest = QuerySubscriptionContractsRequest; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_QuerySubscriptionContractsResponse = QuerySubscriptionContractsResponse; const ecomSubscriptionContractsV1SubscriptionContract_universal_d_createSubscriptionContract: typeof createSubscriptionContract; const ecomSubscriptionContractsV1SubscriptionContract_universal_d_getSubscriptionContract: typeof getSubscriptionContract; const ecomSubscriptionContractsV1SubscriptionContract_universal_d_updateSubscriptionContract: typeof updateSubscriptionContract; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_UpdateSubscriptionContract = UpdateSubscriptionContract; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_UpdateSubscriptionContractOptions = UpdateSubscriptionContractOptions; const ecomSubscriptionContractsV1SubscriptionContract_universal_d_querySubscriptionContracts: typeof querySubscriptionContracts; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_SubscriptionContractsQueryResult = SubscriptionContractsQueryResult; type ecomSubscriptionContractsV1SubscriptionContract_universal_d_SubscriptionContractsQueryBuilder = SubscriptionContractsQueryBuilder; namespace ecomSubscriptionContractsV1SubscriptionContract_universal_d { export { ecomSubscriptionContractsV1SubscriptionContract_universal_d_SubscriptionContract as SubscriptionContract, V1SubscriptionSettings$1 as V1SubscriptionSettings, ecomSubscriptionContractsV1SubscriptionContract_universal_d_V1SubscriptionFrequency as V1SubscriptionFrequency, OrderLineItem$2 as OrderLineItem, ProductName$6 as ProductName, CatalogReference$a as CatalogReference, Price$5 as Price, DescriptionLine$6 as DescriptionLine, DescriptionLineValueOneOf$6 as DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf$6 as DescriptionLineDescriptionLineValueOneOf, DescriptionLineName$6 as DescriptionLineName, PlainTextValue$6 as PlainTextValue, Color$6 as Color, DescriptionLineType$6 as DescriptionLineType, FocalPoint$7 as FocalPoint, PhysicalProperties$8 as PhysicalProperties, ItemType$7 as ItemType, ItemTypeItemTypeDataOneOf$7 as ItemTypeItemTypeDataOneOf, ItemTypeItemType$7 as ItemTypeItemType, PaymentOptionType$4 as PaymentOptionType, ItemTaxFullDetails$7 as ItemTaxFullDetails, LineItemTaxInfo$2 as LineItemTaxInfo, LineItemTaxBreakdown$2 as LineItemTaxBreakdown, JurisdictionType$7 as JurisdictionType, DigitalFile$3 as DigitalFile, SubscriptionInfo$3 as SubscriptionInfo, SubscriptionSettings$8 as SubscriptionSettings, SubscriptionFrequency$8 as SubscriptionFrequency, PriceDescription$6 as PriceDescription, LocationAndQuantity$2 as LocationAndQuantity, TaxableAddress$7 as TaxableAddress, TaxableAddressTaxableAddressDataOneOf$7 as TaxableAddressTaxableAddressDataOneOf, TaxableAddressType$7 as TaxableAddressType, ExtendedFields$b as ExtendedFields, BuyerInfo$9 as BuyerInfo, BuyerInfoIdOneOf$6 as BuyerInfoIdOneOf, WeightUnit$9 as WeightUnit, PriceSummary$7 as PriceSummary, AddressWithContact$6 as AddressWithContact, Address$b as Address, StreetAddress$a as StreetAddress, AddressLocation$a as AddressLocation, FullAddressContactDetails$8 as FullAddressContactDetails, VatId$9 as VatId, VatType$9 as VatType, ShippingInformation$5 as ShippingInformation, DeliveryLogistics$8 as DeliveryLogistics, DeliveryLogisticsAddressOneOf$1 as DeliveryLogisticsAddressOneOf, PickupDetails$9 as PickupDetails, PickupAddress$4 as PickupAddress, PickupMethod$8 as PickupMethod, DeliveryTimeSlot$8 as DeliveryTimeSlot, ShippingPrice$7 as ShippingPrice, ShippingRegion$7 as ShippingRegion, OrderTaxInfo$2 as OrderTaxInfo, OrderTaxBreakdown$2 as OrderTaxBreakdown, AppliedDiscount$7 as AppliedDiscount, AppliedDiscountDiscountSourceOneOf$7 as AppliedDiscountDiscountSourceOneOf, DiscountType$7 as DiscountType, Coupon$7 as Coupon, MerchantDiscount$7 as MerchantDiscount, MerchantDiscountMerchantDiscountReasonOneOf$2 as MerchantDiscountMerchantDiscountReasonOneOf, DiscountReason$2 as DiscountReason, DiscountRule$7 as DiscountRule, DiscountRuleName$7 as DiscountRuleName, LineItemDiscount$7 as LineItemDiscount, ChannelInfo$4 as ChannelInfo, ChannelType$7 as ChannelType, CustomField$5 as CustomField, ecomSubscriptionContractsV1SubscriptionContract_universal_d_CreateSubscriptionContractRequest as CreateSubscriptionContractRequest, ecomSubscriptionContractsV1SubscriptionContract_universal_d_CreateSubscriptionContractResponse as CreateSubscriptionContractResponse, ecomSubscriptionContractsV1SubscriptionContract_universal_d_GetSubscriptionContractRequest as GetSubscriptionContractRequest, ecomSubscriptionContractsV1SubscriptionContract_universal_d_GetSubscriptionContractResponse as GetSubscriptionContractResponse, ecomSubscriptionContractsV1SubscriptionContract_universal_d_UpdateSubscriptionContractRequest as UpdateSubscriptionContractRequest, ecomSubscriptionContractsV1SubscriptionContract_universal_d_UpdateSubscriptionContractResponse as UpdateSubscriptionContractResponse, ecomSubscriptionContractsV1SubscriptionContract_universal_d_QuerySubscriptionContractsRequest as QuerySubscriptionContractsRequest, CursorQuery$8 as CursorQuery, CursorQueryPagingMethodOneOf$8 as CursorQueryPagingMethodOneOf, Sorting$e as Sorting, SortOrder$e as SortOrder, CursorPaging$e as CursorPaging, ecomSubscriptionContractsV1SubscriptionContract_universal_d_QuerySubscriptionContractsResponse as QuerySubscriptionContractsResponse, CursorPagingMetadata$b as CursorPagingMetadata, Cursors$e as Cursors, DomainEvent$l as DomainEvent, DomainEventBodyOneOf$l as DomainEventBodyOneOf, EntityCreatedEvent$l as EntityCreatedEvent, RestoreInfo$l as RestoreInfo, EntityUpdatedEvent$l as EntityUpdatedEvent, EntityDeletedEvent$l as EntityDeletedEvent, ActionEvent$l as ActionEvent, Empty$e as Empty, MessageEnvelope$k as MessageEnvelope, IdentificationData$l as IdentificationData, IdentificationDataIdOneOf$l as IdentificationDataIdOneOf, WebhookIdentityType$k as WebhookIdentityType, ecomSubscriptionContractsV1SubscriptionContract_universal_d_createSubscriptionContract as createSubscriptionContract, ecomSubscriptionContractsV1SubscriptionContract_universal_d_getSubscriptionContract as getSubscriptionContract, ecomSubscriptionContractsV1SubscriptionContract_universal_d_updateSubscriptionContract as updateSubscriptionContract, ecomSubscriptionContractsV1SubscriptionContract_universal_d_UpdateSubscriptionContract as UpdateSubscriptionContract, ecomSubscriptionContractsV1SubscriptionContract_universal_d_UpdateSubscriptionContractOptions as UpdateSubscriptionContractOptions, ecomSubscriptionContractsV1SubscriptionContract_universal_d_querySubscriptionContracts as querySubscriptionContracts, ecomSubscriptionContractsV1SubscriptionContract_universal_d_SubscriptionContractsQueryResult as SubscriptionContractsQueryResult, ecomSubscriptionContractsV1SubscriptionContract_universal_d_SubscriptionContractsQueryBuilder as SubscriptionContractsQueryBuilder, }; } interface AbandonedCheckout { /** Abandoned checkout ID. */ _id?: string; /** Date and time the abandoned checkout was created. */ _createdDate?: Date | null; /** Date and time the abandoned checkout was updated. */ _updatedDate?: Date | null; /** The associated checkout ID. */ checkoutId?: string | null; /** The associated cart ID. */ cartId?: string | null; /** Status of the abandoned checkout. */ status?: Status$4; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string | null; /** Buyer information. */ buyerInfo?: V1BuyerInfo$1; /** Contact details. */ contactDetails?: FullAddressContactDetails$7; /** The store's currency. */ currency?: string; /** Currency the buyer used in checkout. */ conversionCurrency?: string | null; /** Total price after discounts, gift cards, and tax. */ totalPrice?: MultiCurrencyPrice$5; /** * List of all automation activities performed by [Wix Automations](https://support.wix.com/en/article/wix-automations-getting-started) regarding the abandoned checkout. * Wix Automations updates the `activities` field for each actvity in the automation flow. Only relevant if you've set up [automations in the Dashboard](https://support.wix.com/en/article/wix-automations-creating-a-new-automation). Read more about `activities` in the [introduction](https://www.wix.com/velo/reference/wix-ecom-backend/abandonedcheckout/introduction). */ activities?: Activity$3[]; /** Date and time the abandoned checkout was recovered. */ checkoutRecoveredDate?: Date | null; /** Checkout URL. */ checkoutUrl?: string; /** Subtotal price of all line items, before discounts and before tax. */ subtotalPrice?: MultiCurrencyPrice$5; } enum ActivityType$3 { /** Not implemented. */ UNKNOWN_TYPE = "UNKNOWN_TYPE", /** Scheduled. */ SCHEDULED = "SCHEDULED", /** Email sent. */ EMAIL_SENT = "EMAIL_SENT", /** Email not sent. */ EMAIL_NOT_SENT = "EMAIL_NOT_SENT", /** Notification sent. */ NOTIFICATION_SENT = "NOTIFICATION_SENT", /** Task created. */ TASK_CREATED = "TASK_CREATED" } /** Status of the abandoned checkout. */ enum Status$4 { /** Abandoned. */ ABANDONED = "ABANDONED", /** Recovered. */ RECOVERED = "RECOVERED" } /** Buyer information. */ interface V1BuyerInfo$1 extends V1BuyerInfoIdOneOf { /** Visitor ID (if the site visitor is **not** a site member). */ visitorId?: string; /** Member ID (if the site visitor is a site member). */ memberId?: string; /** User ID (if the site visitor is a site owner or collaborator). */ userId?: string; /** * Contact ID. For more information, see the [Contacts API](https://www.wix.com/velo/reference/wix-crm-v2/contacts). * @readonly */ contactId?: string | null; /** * Buyer email address. * Max: `50` */ email?: string | null; } /** @oneof */ interface V1BuyerInfoIdOneOf { /** Visitor ID (if the site visitor is **not** a site member). */ visitorId?: string; /** Member ID (if the site visitor is a site member). */ memberId?: string; /** User ID (if the site visitor is a site owner or collaborator). */ userId?: string; } /** Full contact details for an address */ interface FullAddressContactDetails$7 { /** * First name. * Max length: `100` */ firstName?: string | null; /** * Last name. * Max length: `100` */ lastName?: string | null; /** Phone number. */ phone?: string | null; /** * Company name. * Max length: `50` */ company?: string | null; /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */ vatId?: VatId$8; } interface VatId$8 { /** Customer's tax ID. */ _id?: string; /** * Tax type. * * Supported values: * + `CPF`: for individual tax payers * + `CNPJ`: for corporations */ type?: VatType$8; } /** tax info types */ enum VatType$8 { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } interface MultiCurrencyPrice$5 { /** Amount. */ amount?: string; /** * Converted amount. * @readonly */ convertedAmount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. * @readonly */ formattedConvertedAmount?: string; } interface Activity$3 { /** Date and time the automation activity was created. */ _createdDate?: Date | null; /** * Automation activity type. * * Supported properties: `UNKNOWN_TYPE`, `SCHEDULED`, `EMAIL_SENT`, `EMAIL_NOT_SENT`, `NOTIFICATION_SENT`, `TASK_CREATED` */ type?: ActivityType$3; } interface CartAbandonedEvent { cartId?: string; /** * Time the cart was created * @readonly */ creationTime?: Date | null; /** * Time the cart was abandoned * @readonly */ abandonTime?: Date | null; /** Buyer information */ buyerInfo?: BuyerInfo$8; /** 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$2; /** Checkout URL - checkout with the abandoned cart details */ checkoutUrl?: string; /** * checkout id for buy now flow * @internal * @readonly */ checkoutId?: string | null; } interface BuyerInfo$8 { /** Wix customer ID */ _id?: string; /** Customer information */ identityType?: Identity; /** Customer's email address */ email?: string | null; /** Customer's phone number */ phone?: string | null; /** Customer's first name */ firstName?: string | null; /** Customer's last name */ lastName?: string | null; } 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" } interface Totals$2 { /** Subtotal of all line items in cart, without shipping and taxes */ subtotal?: number | null; /** Total cart price */ total?: number | null; /** Formatted total cart price includes currency symbol */ formattedTotal?: string; } interface CartRecoveredEvent { 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; /** * Checkout id * @internal * @readonly */ checkoutId?: string | null; } interface GetAbandonedCheckoutRequest { /** Abandoned checkout ID. */ abandonedCheckoutId: string; } interface GetAbandonedCheckoutResponse { /** The requested abandoned checkout. */ abandonedCheckout?: AbandonedCheckout; } interface DeleteAbandonedCheckoutRequest { /** Id of the abandoned checkout to delete */ abandonedCheckoutId: string; } interface DeleteAbandonedCheckoutResponse { } interface QueryAbandonedCheckoutsRequest { /** Query options. */ query: QueryV2$3; } interface QueryV2$3 extends QueryV2PagingMethodOneOf$3 { /** Paging options to limit and skip the number of items. */ paging?: Paging$3; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$d; /** * Filter object. * * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Sort object. * * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sort?: Sorting$d[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ interface QueryV2PagingMethodOneOf$3 { /** Paging options to limit and skip the number of items. */ paging?: Paging$3; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$d; } interface Sorting$d { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$d; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$d { ASC = "ASC", DESC = "DESC" } interface Paging$3 { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CursorPaging$d { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryAbandonedCheckoutsResponse { /** * __Deprecated.__ Use `abandonedCheckouts` instead. * @deprecated */ results?: AbandonedCheckout[]; /** List of abandoned checkouts. */ abandonedCheckouts?: AbandonedCheckout[]; /** Details on the paged set of results returned. */ metadata?: PagingMetadataV2$1; } interface PagingMetadataV2$1 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors$d; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. * @internal */ hasNext?: boolean | null; } interface Cursors$d { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface SearchAbandonedCheckoutsRequest { /** WQL query expression. */ search?: Search; } interface Search extends SearchPagingMethodOneOf { /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */ paging?: CommonPaging; /** Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort' */ cursorPaging?: CommonCursorPaging; /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */ filter?: Record | null; /** Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}] */ sort?: CommonSorting[]; /** free text to match in searchable fields */ search?: SearchDetails; } /** @oneof */ interface SearchPagingMethodOneOf { /** Pointer to page of results using offset. Can not be used together with 'cursor_paging' */ paging?: CommonPaging; /** Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort' */ cursorPaging?: CommonCursorPaging; } interface CommonSorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: CommonSortOrder; } enum CommonSortOrder { /** Ascending order. */ ASC = "ASC", /** Descending order. */ DESC = "DESC" } interface SearchDetails { /** boolean search mode */ mode?: Mode; /** search term or expression */ expression?: string | null; /** fields to search in. if empty - server will search in own default fields */ fields?: string[]; /** flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */ fuzzy?: boolean; } enum Mode { /** Any */ OR = "OR", /** All */ AND = "AND" } interface CommonPaging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CommonCursorPaging { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface SearchAbandonedCheckoutsResponse { /** List of abandoned checkouts. */ abandonedCheckouts?: AbandonedCheckout[]; /** Paging metadata. Contains cursor which can be used in next query. */ pagingMetadata?: CommonPagingMetadataV2; } interface CommonPagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: CommonCursors; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. * @internal */ hasNext?: boolean | null; } interface CommonCursors { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface AddAbandonedCheckoutActivityRequest { /** Id of the abandoned checkout to update */ abandonedCheckoutId: string | null; /** The type of the activity to add */ activityType?: ActivityType$3; } interface AddAbandonedCheckoutActivityResponse { /** The updated abandoned checkout with the added activity */ abandonedCheckout?: AbandonedCheckout; } interface Task$1 { key?: TaskKey$1; executeAt?: Date | null; payload?: string | null; } interface TaskKey$1 { appId?: string; instanceId?: string; subjectId?: string | null; } interface TaskAction$1 extends TaskActionActionOneOf$1 { complete?: Complete$1; cancel?: Cancel$1; reschedule?: Reschedule$1; } /** @oneof */ interface TaskActionActionOneOf$1 { complete?: Complete$1; cancel?: Cancel$1; reschedule?: Reschedule$1; } interface Complete$1 { } interface Cancel$1 { } interface Reschedule$1 { executeAt?: Date | null; payload?: string | null; } interface RedirectToCheckoutRequest { /** abandoned checkout id */ abandonedCheckoutId: string; /** Identifier of the metaSite this checkout uses */ metasiteId: string; } interface RawHttpResponse$1 { body?: Uint8Array; statusCode?: number | null; headers?: HeadersEntry$1[]; } interface HeadersEntry$1 { key?: string; value?: string; } interface DomainEvent$k extends DomainEventBodyOneOf$k { createdEvent?: EntityCreatedEvent$k; updatedEvent?: EntityUpdatedEvent$k; deletedEvent?: EntityDeletedEvent$k; actionEvent?: ActionEvent$k; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$k { createdEvent?: EntityCreatedEvent$k; updatedEvent?: EntityUpdatedEvent$k; deletedEvent?: EntityDeletedEvent$k; actionEvent?: ActionEvent$k; } interface EntityCreatedEvent$k { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$k; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$k { deletedDate?: Date | null; } interface EntityUpdatedEvent$k { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$k { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$k { bodyAsJson?: string; } interface Empty$d { } /** Triggered when an abandoned checkout is recovered (the customer completes the checkout). */ interface AbandonedCheckoutRecovered { abandonedCheckout?: AbandonedCheckout; } interface MessageEnvelope$j { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$k; /** Stringify payload. */ data?: string; } interface IdentificationData$k extends IdentificationDataIdOneOf$k { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$j; } /** @oneof */ interface IdentificationDataIdOneOf$k { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$j { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Retrieves an abandoned checkout. * @param abandonedCheckoutId - Abandoned checkout ID. * @public * @documentationMaturity preview * @requiredField abandonedCheckoutId * @permissionId ECOM.ABANDONED_CHECKOUT_READ * @adminMethod * @returns The requested abandoned checkout. */ function getAbandonedCheckout(abandonedCheckoutId: string): Promise; /** * Delete an AbandonedCheckout * @param abandonedCheckoutId - Id of the abandoned checkout to delete * @public * @documentationMaturity preview * @requiredField abandonedCheckoutId * @permissionId ECOM.ABANDONED_CHECKOUT_DELETE * @adminMethod */ function deleteAbandonedCheckout(abandonedCheckoutId: string): Promise; /** * Creates a query to retrieve a list of abandoned checkouts. * * The `queryAbandonedCheckouts()` function builds a query to retrieve a list of abandoned checkouts and returns a `ResultsQueryBuilder` object. * * The returned object contains the query definition, which is typically used to run the query using the `find()` function. * * You can refine the query by chaining `ResultsQueryBuilder` functions onto the query. `ResultsQueryBuilder` functions enable you to sort, filter, and control the results `queryAbandonedCheckouts()` returns. * @public * @documentationMaturity preview * @permissionId ECOM.ABANDONED_CHECKOUT_READ * @adminMethod */ function queryAbandonedCheckouts(): AbandonedCheckoutsQueryBuilder; interface QueryCursorResult$d { cursors: CommonCursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface AbandonedCheckoutsQueryResult extends QueryCursorResult$d { items: AbandonedCheckout[]; query: AbandonedCheckoutsQueryBuilder; next: () => Promise; prev: () => Promise; } interface AbandonedCheckoutsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status' | 'buyerInfo.visitorId' | 'buyerInfo.memberId' | 'buyerInfo.userId' | 'buyerInfo.contactId' | 'buyerInfo.email', value: any) => AbandonedCheckoutsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status' | 'buyerInfo.visitorId' | 'buyerInfo.memberId' | 'buyerInfo.userId' | 'buyerInfo.contactId' | 'buyerInfo.email', value: any) => AbandonedCheckoutsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => AbandonedCheckoutsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => AbandonedCheckoutsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => AbandonedCheckoutsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => AbandonedCheckoutsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'buyerInfo.visitorId' | 'buyerInfo.memberId' | 'buyerInfo.userId' | 'buyerInfo.contactId' | 'buyerInfo.email', value: string) => AbandonedCheckoutsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status' | 'buyerInfo.visitorId' | 'buyerInfo.memberId' | 'buyerInfo.userId' | 'buyerInfo.contactId' | 'buyerInfo.email', value: any[]) => AbandonedCheckoutsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status' | 'buyerInfo.visitorId' | 'buyerInfo.memberId' | 'buyerInfo.userId' | 'buyerInfo.contactId' | 'buyerInfo.email', value: any) => AbandonedCheckoutsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | '_createdDate' | '_updatedDate' | 'status' | 'buyerInfo.visitorId' | 'buyerInfo.memberId' | 'buyerInfo.userId' | 'buyerInfo.contactId' | 'buyerInfo.email', value: boolean) => AbandonedCheckoutsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'status' | 'buyerInfo.visitorId' | 'buyerInfo.memberId' | 'buyerInfo.userId' | 'buyerInfo.contactId' | 'buyerInfo.email'>) => AbandonedCheckoutsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | '_createdDate' | '_updatedDate' | 'status' | 'buyerInfo.visitorId' | 'buyerInfo.memberId' | 'buyerInfo.userId' | 'buyerInfo.contactId' | 'buyerInfo.email'>) => AbandonedCheckoutsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => AbandonedCheckoutsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => AbandonedCheckoutsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Retrieves a list of abandoned checkouts, given the provided paging, filtering, searchDetails and sorting. Up to 100 abandoned checkouts can be returned per request. * @public * @documentationMaturity preview * @permissionId ECOM.ABANDONED_CHECKOUT_READ * @adminMethod */ function searchAbandonedCheckouts(options?: SearchAbandonedCheckoutsOptions): Promise; interface SearchAbandonedCheckoutsOptions { /** WQL query expression. */ search?: Search; } /** * Adds a new AbandonedCheckout activity * @param abandonedCheckoutId - Id of the abandoned checkout to update * @internal * @documentationMaturity preview * @requiredField abandonedCheckoutId * @permissionId ECOM.ABANDONED_CHECKOUT_UPDATE * @adminMethod */ function addAbandonedCheckoutActivity(abandonedCheckoutId: string | null, options?: AddAbandonedCheckoutActivityOptions): Promise; interface AddAbandonedCheckoutActivityOptions { /** The type of the activity to add */ activityType?: ActivityType$3; } /** * Redirects the abandoned checkout to the checkout page. * @param abandonedCheckoutId - abandoned checkout id * @param metasiteId - Identifier of the metaSite this checkout uses * @public * @documentationMaturity preview * @requiredField abandonedCheckoutId * @requiredField metasiteId * @adminMethod */ function redirectToCheckout(abandonedCheckoutId: string, metasiteId: string): Promise; type ecomV1AbandonedCheckout_universal_d_AbandonedCheckout = AbandonedCheckout; type ecomV1AbandonedCheckout_universal_d_V1BuyerInfoIdOneOf = V1BuyerInfoIdOneOf; type ecomV1AbandonedCheckout_universal_d_CartAbandonedEvent = CartAbandonedEvent; type ecomV1AbandonedCheckout_universal_d_Identity = Identity; const ecomV1AbandonedCheckout_universal_d_Identity: typeof Identity; type ecomV1AbandonedCheckout_universal_d_CartRecoveredEvent = CartRecoveredEvent; type ecomV1AbandonedCheckout_universal_d_GetAbandonedCheckoutRequest = GetAbandonedCheckoutRequest; type ecomV1AbandonedCheckout_universal_d_GetAbandonedCheckoutResponse = GetAbandonedCheckoutResponse; type ecomV1AbandonedCheckout_universal_d_DeleteAbandonedCheckoutRequest = DeleteAbandonedCheckoutRequest; type ecomV1AbandonedCheckout_universal_d_DeleteAbandonedCheckoutResponse = DeleteAbandonedCheckoutResponse; type ecomV1AbandonedCheckout_universal_d_QueryAbandonedCheckoutsRequest = QueryAbandonedCheckoutsRequest; type ecomV1AbandonedCheckout_universal_d_QueryAbandonedCheckoutsResponse = QueryAbandonedCheckoutsResponse; type ecomV1AbandonedCheckout_universal_d_SearchAbandonedCheckoutsRequest = SearchAbandonedCheckoutsRequest; type ecomV1AbandonedCheckout_universal_d_Search = Search; type ecomV1AbandonedCheckout_universal_d_SearchPagingMethodOneOf = SearchPagingMethodOneOf; type ecomV1AbandonedCheckout_universal_d_CommonSorting = CommonSorting; type ecomV1AbandonedCheckout_universal_d_CommonSortOrder = CommonSortOrder; const ecomV1AbandonedCheckout_universal_d_CommonSortOrder: typeof CommonSortOrder; type ecomV1AbandonedCheckout_universal_d_SearchDetails = SearchDetails; type ecomV1AbandonedCheckout_universal_d_Mode = Mode; const ecomV1AbandonedCheckout_universal_d_Mode: typeof Mode; type ecomV1AbandonedCheckout_universal_d_CommonPaging = CommonPaging; type ecomV1AbandonedCheckout_universal_d_CommonCursorPaging = CommonCursorPaging; type ecomV1AbandonedCheckout_universal_d_SearchAbandonedCheckoutsResponse = SearchAbandonedCheckoutsResponse; type ecomV1AbandonedCheckout_universal_d_CommonPagingMetadataV2 = CommonPagingMetadataV2; type ecomV1AbandonedCheckout_universal_d_CommonCursors = CommonCursors; type ecomV1AbandonedCheckout_universal_d_AddAbandonedCheckoutActivityRequest = AddAbandonedCheckoutActivityRequest; type ecomV1AbandonedCheckout_universal_d_AddAbandonedCheckoutActivityResponse = AddAbandonedCheckoutActivityResponse; type ecomV1AbandonedCheckout_universal_d_RedirectToCheckoutRequest = RedirectToCheckoutRequest; type ecomV1AbandonedCheckout_universal_d_AbandonedCheckoutRecovered = AbandonedCheckoutRecovered; const ecomV1AbandonedCheckout_universal_d_getAbandonedCheckout: typeof getAbandonedCheckout; const ecomV1AbandonedCheckout_universal_d_deleteAbandonedCheckout: typeof deleteAbandonedCheckout; const ecomV1AbandonedCheckout_universal_d_queryAbandonedCheckouts: typeof queryAbandonedCheckouts; type ecomV1AbandonedCheckout_universal_d_AbandonedCheckoutsQueryResult = AbandonedCheckoutsQueryResult; type ecomV1AbandonedCheckout_universal_d_AbandonedCheckoutsQueryBuilder = AbandonedCheckoutsQueryBuilder; const ecomV1AbandonedCheckout_universal_d_searchAbandonedCheckouts: typeof searchAbandonedCheckouts; type ecomV1AbandonedCheckout_universal_d_SearchAbandonedCheckoutsOptions = SearchAbandonedCheckoutsOptions; const ecomV1AbandonedCheckout_universal_d_addAbandonedCheckoutActivity: typeof addAbandonedCheckoutActivity; type ecomV1AbandonedCheckout_universal_d_AddAbandonedCheckoutActivityOptions = AddAbandonedCheckoutActivityOptions; const ecomV1AbandonedCheckout_universal_d_redirectToCheckout: typeof redirectToCheckout; namespace ecomV1AbandonedCheckout_universal_d { export { ecomV1AbandonedCheckout_universal_d_AbandonedCheckout as AbandonedCheckout, ActivityType$3 as ActivityType, Status$4 as Status, V1BuyerInfo$1 as V1BuyerInfo, ecomV1AbandonedCheckout_universal_d_V1BuyerInfoIdOneOf as V1BuyerInfoIdOneOf, FullAddressContactDetails$7 as FullAddressContactDetails, VatId$8 as VatId, VatType$8 as VatType, MultiCurrencyPrice$5 as MultiCurrencyPrice, Activity$3 as Activity, ecomV1AbandonedCheckout_universal_d_CartAbandonedEvent as CartAbandonedEvent, BuyerInfo$8 as BuyerInfo, ecomV1AbandonedCheckout_universal_d_Identity as Identity, Totals$2 as Totals, ecomV1AbandonedCheckout_universal_d_CartRecoveredEvent as CartRecoveredEvent, ecomV1AbandonedCheckout_universal_d_GetAbandonedCheckoutRequest as GetAbandonedCheckoutRequest, ecomV1AbandonedCheckout_universal_d_GetAbandonedCheckoutResponse as GetAbandonedCheckoutResponse, ecomV1AbandonedCheckout_universal_d_DeleteAbandonedCheckoutRequest as DeleteAbandonedCheckoutRequest, ecomV1AbandonedCheckout_universal_d_DeleteAbandonedCheckoutResponse as DeleteAbandonedCheckoutResponse, ecomV1AbandonedCheckout_universal_d_QueryAbandonedCheckoutsRequest as QueryAbandonedCheckoutsRequest, QueryV2$3 as QueryV2, QueryV2PagingMethodOneOf$3 as QueryV2PagingMethodOneOf, Sorting$d as Sorting, SortOrder$d as SortOrder, Paging$3 as Paging, CursorPaging$d as CursorPaging, ecomV1AbandonedCheckout_universal_d_QueryAbandonedCheckoutsResponse as QueryAbandonedCheckoutsResponse, PagingMetadataV2$1 as PagingMetadataV2, Cursors$d as Cursors, ecomV1AbandonedCheckout_universal_d_SearchAbandonedCheckoutsRequest as SearchAbandonedCheckoutsRequest, ecomV1AbandonedCheckout_universal_d_Search as Search, ecomV1AbandonedCheckout_universal_d_SearchPagingMethodOneOf as SearchPagingMethodOneOf, ecomV1AbandonedCheckout_universal_d_CommonSorting as CommonSorting, ecomV1AbandonedCheckout_universal_d_CommonSortOrder as CommonSortOrder, ecomV1AbandonedCheckout_universal_d_SearchDetails as SearchDetails, ecomV1AbandonedCheckout_universal_d_Mode as Mode, ecomV1AbandonedCheckout_universal_d_CommonPaging as CommonPaging, ecomV1AbandonedCheckout_universal_d_CommonCursorPaging as CommonCursorPaging, ecomV1AbandonedCheckout_universal_d_SearchAbandonedCheckoutsResponse as SearchAbandonedCheckoutsResponse, ecomV1AbandonedCheckout_universal_d_CommonPagingMetadataV2 as CommonPagingMetadataV2, ecomV1AbandonedCheckout_universal_d_CommonCursors as CommonCursors, ecomV1AbandonedCheckout_universal_d_AddAbandonedCheckoutActivityRequest as AddAbandonedCheckoutActivityRequest, ecomV1AbandonedCheckout_universal_d_AddAbandonedCheckoutActivityResponse as AddAbandonedCheckoutActivityResponse, Task$1 as Task, TaskKey$1 as TaskKey, TaskAction$1 as TaskAction, TaskActionActionOneOf$1 as TaskActionActionOneOf, Complete$1 as Complete, Cancel$1 as Cancel, Reschedule$1 as Reschedule, ecomV1AbandonedCheckout_universal_d_RedirectToCheckoutRequest as RedirectToCheckoutRequest, RawHttpResponse$1 as RawHttpResponse, HeadersEntry$1 as HeadersEntry, DomainEvent$k as DomainEvent, DomainEventBodyOneOf$k as DomainEventBodyOneOf, EntityCreatedEvent$k as EntityCreatedEvent, RestoreInfo$k as RestoreInfo, EntityUpdatedEvent$k as EntityUpdatedEvent, EntityDeletedEvent$k as EntityDeletedEvent, ActionEvent$k as ActionEvent, Empty$d as Empty, ecomV1AbandonedCheckout_universal_d_AbandonedCheckoutRecovered as AbandonedCheckoutRecovered, MessageEnvelope$j as MessageEnvelope, IdentificationData$k as IdentificationData, IdentificationDataIdOneOf$k as IdentificationDataIdOneOf, WebhookIdentityType$j as WebhookIdentityType, ecomV1AbandonedCheckout_universal_d_getAbandonedCheckout as getAbandonedCheckout, ecomV1AbandonedCheckout_universal_d_deleteAbandonedCheckout as deleteAbandonedCheckout, ecomV1AbandonedCheckout_universal_d_queryAbandonedCheckouts as queryAbandonedCheckouts, ecomV1AbandonedCheckout_universal_d_AbandonedCheckoutsQueryResult as AbandonedCheckoutsQueryResult, ecomV1AbandonedCheckout_universal_d_AbandonedCheckoutsQueryBuilder as AbandonedCheckoutsQueryBuilder, ecomV1AbandonedCheckout_universal_d_searchAbandonedCheckouts as searchAbandonedCheckouts, ecomV1AbandonedCheckout_universal_d_SearchAbandonedCheckoutsOptions as SearchAbandonedCheckoutsOptions, ecomV1AbandonedCheckout_universal_d_addAbandonedCheckoutActivity as addAbandonedCheckoutActivity, ecomV1AbandonedCheckout_universal_d_AddAbandonedCheckoutActivityOptions as AddAbandonedCheckoutActivityOptions, ecomV1AbandonedCheckout_universal_d_redirectToCheckout as redirectToCheckout, }; } /** * The back in stock notification request allows a customer to receive a notifiction when a specific item * is available again. The request includes information about the person making the request, the item * they want to receive a notification for, and the status of the notification. */ interface BackInStockNotificationRequest { /** * Request ID. * @readonly */ _id?: string | null; /** * Catalog and item reference that the notification request is for. * * Includes IDs for the catalog and item it came from, as well as additional, optional information. */ catalogReference?: CatalogReference$9; /** Email address to send notification to about item being back in stock. */ email?: string; /** * Contact ID for the contact with this `email`. * * If a contact does not already exist with the email address submitted when creating this request, then a new contact is created. * For more information about contacts, see the Contacts API. * @readonly */ contactId?: string | null; /** * Status of the notification. * * `status` is set to `RECEIVED` when the notification request is created. The `status` changes once a notification email is sent for this request object: * + When a notification email is sent through the site, either automatically or with the `reportItemsBackInStock()` function, then the `status` is briefly set to `PROCESSING` and then set to `NOTIFICATION_SENT` if the email is successul, and `FAILED` if it fails. * + When a notification email is sent offline, use the `markAsNotificationSent()` function to set `status` to `NOTIFICATION_SENT`. * @readonly */ status?: Status$3; /** * Whether a notification was sent automatically. * * `autoNotified` is empty when the notification request is created and is not returned until the field has a value. `autoNotified` receives a value when a notification email is sent for this request object. * * `autoNotified` sets to `true` if the notification is sent through the site, either automatically or with the `reportItemsBackInStock()` function. If the notification email is sent offline but the `status` is updated with the `markAsNotificationSent()` function, then `autoNotified` sets to `false`. * @readonly */ autoNotified?: boolean | null; /** * Date and time the notification request was created. * @readonly */ _createdDate?: Date | null; /** Item URL for this request. */ itemUrl?: string | null; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$9 { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration). */ options?: Record | null; } enum Status$3 { UNSPECIFIED = "UNSPECIFIED", /** initial status of all new requests */ RECEIVED = "RECEIVED", PROCESSING = "PROCESSING", NOTIFICATION_SENT = "NOTIFICATION_SENT", FAILED = "FAILED" } interface InvalidateCache extends InvalidateCacheGetByOneOf { /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */ metaSiteId?: string; /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */ siteId?: string; /** Invalidate by App */ app?: App$1; /** Invalidate by page id */ page?: Page; /** Invalidate by URI path */ uri?: URI; /** Invalidate by file (for media files such as PDFs) */ file?: File; /** tell us why you're invalidating the cache. You don't need to add your app name */ reason?: string | null; /** Is local DS */ localDc?: boolean; hardPurge?: boolean; } /** @oneof */ interface InvalidateCacheGetByOneOf { /** Invalidate by msId. NOT recommended, as this will invalidate the entire site cache! */ metaSiteId?: string; /** Invalidate by Site ID. NOT recommended, as this will invalidate the entire site cache! */ siteId?: string; /** Invalidate by App */ app?: App$1; /** Invalidate by page id */ page?: Page; /** Invalidate by URI path */ uri?: URI; /** Invalidate by file (for media files such as PDFs) */ file?: File; } interface App$1 { /** The AppDefId */ appDefId?: string; /** The instance Id */ instanceId?: string; } interface Page { /** the msid the page is on */ metaSiteId?: string; /** Invalidate by Page ID */ pageId?: string; } interface URI { /** the msid the URI is on */ metaSiteId?: string; /** URI path to invalidate (e.g. page/my/path) - without leading/trailing slashes */ uriPath?: string; } interface File { /** the msid the file is related to */ metaSiteId?: string; /** Invalidate by filename (for media files such as PDFs) */ fileName?: string; } interface CreateBackInStockNotificationRequestRequest { /** * Notification request information. * * Includes details for the out of stock item and the email address * requesting to be notified when it's back in stock. */ request: BackInStockNotificationRequest; /** Item details to include in the notification when the item is back in stock. */ itemDetails: BackInStockItemDetails; } interface BackInStockItemDetails { /** Item name. */ name?: string; /** Item price. */ price?: string; /** Item image. */ image?: string; } interface CreateBackInStockNotificationRequestResponse { /** Created back in stock notification request. */ request?: BackInStockNotificationRequest; } interface GetBackInStockNotificationRequestRequest { /** ID of the notification request to retrieve. */ _id: string; } interface GetBackInStockNotificationRequestResponse { /** Retrieved back in stock notification request. */ request?: BackInStockNotificationRequest; } interface DeleteBackInStockNotificationRequestRequest { /** ID of the notification request to delete. */ _id: string; } interface DeleteBackInStockNotificationRequestResponse { } interface MarkAsNotificationSentRequest { /** ID of the notification request to mark. */ _id: string; } interface MarkAsNotificationSentResponse { /** Marked back in stock notification request. */ request?: BackInStockNotificationRequest; } interface QueryBackInStockNotificationRequestsRequest { /** Query options. */ query: PlatformQuery$1; } interface PlatformQuery$1 extends PlatformQueryPagingMethodOneOf$1 { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging$1; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging$c; /** Filter object. */ filter?: Record | null; /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */ sort?: Sorting$c[]; } /** @oneof */ interface PlatformQueryPagingMethodOneOf$1 { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging$1; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging$c; } interface Sorting$c { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$c; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$c { ASC = "ASC", DESC = "DESC" } interface PlatformPaging$1 { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CursorPaging$c { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryBackInStockNotificationRequestsResponse { /** Retrieved back in stock requests. */ requests?: BackInStockNotificationRequest[]; /** Details on the paged set of results returned. */ metadata?: PlatformPagingMetadata$1; } interface PlatformPagingMetadata$1 { /** The number of items returned in this response. */ count?: number | null; /** The offset which was requested. Returned if offset paging was used. */ offset?: number | null; /** The total number of items that match the query. Returned if offset paging was used. */ total?: number | null; /** Cursors to navigate through result pages. Returned if cursor paging was used. */ cursors?: Cursors$c; } interface Cursors$c { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface GetBackInStockNotificationRequestsCountByCatalogReferencesRequest { /** `catalogReference` items to retrieve the notification request for. */ catalogReferences: CatalogReference$9[]; } interface GetBackInStockNotificationRequestsCountByCatalogReferencesResponse { /** Amount of back in stock notifications for each of the retrieved `catalogReference` items. */ countsPerCatalogReference?: BackInStockNotificationRequestsCount[]; } /** Maps each back in stock CatalogReference to the results (the number of unique occurrences). */ interface BackInStockNotificationRequestsCount { /** * Catalog and item reference. * * Includes IDs and additional, optional information related to the item. */ catalogReference?: CatalogReference$9; /** The number of unique back in stock requests for given `catalogReference`. */ count?: number; } interface ReportItemsBackInStockRequest { /** * `catalogReference` item to send notifications for. * * Cannot be used with `requestIds`. */ catalogReference?: CatalogReference$9; /** * IDs of requests to send notifications for. * * Cannot be used with `catalogReference`. */ requestIds?: string[]; /** * Item details to use in notifications. * * `itemDetails` may populate dynamic valyes in the notification template, as follows: * + `itemDetails.name` passes to the template as `item.name` * + `itemDetails.price` passes to the template as `item.price` * + `itemDetails.image.url` passes to the template as `item.image.url` * * Use `extraAutomationTemplateParameters` to pass additional dynamic values. */ itemDetails: BackInStockItemDetails; /** Additional key-value pairs to pass to the back in stock notification template. */ extraAutomationTemplateParameters?: Record; } interface ReportItemsBackInStockResponse { } interface DomainEvent$j extends DomainEventBodyOneOf$j { createdEvent?: EntityCreatedEvent$j; updatedEvent?: EntityUpdatedEvent$j; deletedEvent?: EntityDeletedEvent$j; actionEvent?: ActionEvent$j; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$j { createdEvent?: EntityCreatedEvent$j; updatedEvent?: EntityUpdatedEvent$j; deletedEvent?: EntityDeletedEvent$j; actionEvent?: ActionEvent$j; } interface EntityCreatedEvent$j { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$j; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$j { deletedDate?: Date | null; } interface EntityUpdatedEvent$j { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$j { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$j { bodyAsJson?: string; } interface Empty$c { } interface MessageEnvelope$i { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$j; /** Stringify payload. */ data?: string; } interface IdentificationData$j extends IdentificationDataIdOneOf$j { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$i; } /** @oneof */ interface IdentificationDataIdOneOf$j { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$i { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates a back in stock notification request. * * If a notification request already exists for the same `catalogReference` and `email`, * then a new one isn't created and the existing request is returned. * @param request - Notification request information. * * Includes details for the out of stock item and the email address * requesting to be notified when it's back in stock. * @param itemDetails - Item details to include in the notification when the item is back in stock. * @public * @documentationMaturity preview * @requiredField itemDetails * @requiredField itemDetails.name * @requiredField itemDetails.price * @requiredField request * @requiredField request.catalogReference * @requiredField request.catalogReference.appId * @requiredField request.catalogReference.catalogItemId * @requiredField request.email * @permissionId ECOM.CREATE_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @returns Created back in stock notification request. */ function createBackInStockNotificationRequest(request: BackInStockNotificationRequest, itemDetails: BackInStockItemDetails): Promise; /** * Retrieves a back in stock notification request. * @param _id - ID of the notification request to retrieve. * @public * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @adminMethod * @returns Retrieved back in stock notification request. */ function getBackInStockNotificationRequest(_id: string): Promise; /** * Deletes a back in stock notification request. * @param _id - ID of the notification request to delete. * @public * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @adminMethod */ function deleteBackInStockNotificationRequest(_id: string): Promise; /** * Sets `status` of a back in stock request to `NOTIFICATION_SENT`. * * Use this function if the notification is sent manually offline. If the notification is sent automatically or with the `reportItemsBackInStock()` function, then `status` updates on its own. * @param _id - ID of the notification request to mark. * @public * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @adminMethod */ function markAsNotificationSent(_id: string): Promise; /** * Creates a query to retrieve a list of back in stock notification requests. * * The `queryBackInStockNotificationRequests()` method builds a query to retrieve a list of back in stock notification requests and returns a `RequestsQueryBuilder` object. * * The returned object contains the query definition, which is typically used to run the query using the `find()` method. * * You can refine the query by chaining `RequestsQueryBuilder` methods onto the query. `RequestsQueryBuilder` methods enable you to sort, filter, and control the results that `queryBackInStockNotificationRequests()` returns. * * The following `RequestsQueryBuilder` methods are supported for `queryBackInStockNotificationRequests()`. For a full description of the Requests object, see the object returned for the `items` property in `RequestsQueryResult`." * @public * @documentationMaturity preview * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @adminMethod */ function queryBackInStockNotificationRequests(): RequestsQueryBuilder; interface QueryCursorResult$c { cursors: Cursors$c; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface RequestsQueryResult extends QueryCursorResult$c { items: BackInStockNotificationRequest[]; query: RequestsQueryBuilder; next: () => Promise; prev: () => Promise; } interface RequestsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_createdDate', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_createdDate', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_createdDate', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_createdDate', value: any) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'contactId' | 'itemUrl', value: string) => RequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl', value: any[]) => RequestsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl', value: any) => RequestsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl', value: boolean) => RequestsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl'>) => RequestsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | 'contactId' | 'status' | 'autoNotified' | '_createdDate' | 'itemUrl'>) => RequestsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => RequestsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => RequestsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Retrieves the amount of back in stock requests for a given `catalogReference` item. * @param catalogReferences - `catalogReference` items to retrieve the notification request for. * @public * @documentationMaturity preview * @requiredField catalogReferences * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @adminMethod */ function getBackInStockNotificationRequestsCountByCatalogReferences(catalogReferences: CatalogReference$9[]): Promise; /** * Sends notifications for back in stock requests. * * > **Important:** * > Automations must be turned on in a [site's dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Go%20to%20Back-in-Stock&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/store/back-in-stock) for notifications to send. * * This endpoint triggers notifications for requests in 1 of 2 ways: * 1. For a specific item, with the `catalogReference` information. * 2. For specific requests, with `requestIds`. * * `itemDetails` are required and may populate dynamic values in the notification template, as follows: * + `itemDetails.name` passes to the template as `item.name` * + `itemDetails.price` passes to the template as `item.price` * + `itemDetails.image.url` passes to the template as `item.image.url` * * If the notification template doesn't include `item.price`, `item.name`, or `item.image.url`, values should * be passed in `extraAutomationTemplateParameters`. * * After this endpoint is called, the `status` for the request will update to `NOTIFICATION_SENT` if it sends * successfully, or to `FAILED` if it fails to send. * @param itemDetails - Item details to use in notifications. * * `itemDetails` may populate dynamic valyes in the notification template, as follows: * + `itemDetails.name` passes to the template as `item.name` * + `itemDetails.price` passes to the template as `item.price` * + `itemDetails.image.url` passes to the template as `item.image.url` * * Use `extraAutomationTemplateParameters` to pass additional dynamic values. * @public * @documentationMaturity preview * @requiredField itemDetails * @requiredField itemDetails.name * @requiredField itemDetails.price * @param options - Report options. * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_REQUESTS * @adminMethod */ function reportItemsBackInStock(itemDetails: BackInStockItemDetails, options?: ReportItemsBackInStockOptions): Promise; interface ReportItemsBackInStockOptions { /** * `catalogReference` item to send notifications for. * * Cannot be used with `requestIds`. */ catalogReference?: CatalogReference$9; /** * IDs of requests to send notifications for. * * Cannot be used with `catalogReference`. */ requestIds?: string[]; /** Additional key-value pairs to pass to the back in stock notification template. */ extraAutomationTemplateParameters?: Record; } type ecomV1BackInStockNotificationRequest_universal_d_BackInStockNotificationRequest = BackInStockNotificationRequest; type ecomV1BackInStockNotificationRequest_universal_d_InvalidateCache = InvalidateCache; type ecomV1BackInStockNotificationRequest_universal_d_InvalidateCacheGetByOneOf = InvalidateCacheGetByOneOf; type ecomV1BackInStockNotificationRequest_universal_d_Page = Page; type ecomV1BackInStockNotificationRequest_universal_d_URI = URI; type ecomV1BackInStockNotificationRequest_universal_d_File = File; type ecomV1BackInStockNotificationRequest_universal_d_CreateBackInStockNotificationRequestRequest = CreateBackInStockNotificationRequestRequest; type ecomV1BackInStockNotificationRequest_universal_d_BackInStockItemDetails = BackInStockItemDetails; type ecomV1BackInStockNotificationRequest_universal_d_CreateBackInStockNotificationRequestResponse = CreateBackInStockNotificationRequestResponse; type ecomV1BackInStockNotificationRequest_universal_d_GetBackInStockNotificationRequestRequest = GetBackInStockNotificationRequestRequest; type ecomV1BackInStockNotificationRequest_universal_d_GetBackInStockNotificationRequestResponse = GetBackInStockNotificationRequestResponse; type ecomV1BackInStockNotificationRequest_universal_d_DeleteBackInStockNotificationRequestRequest = DeleteBackInStockNotificationRequestRequest; type ecomV1BackInStockNotificationRequest_universal_d_DeleteBackInStockNotificationRequestResponse = DeleteBackInStockNotificationRequestResponse; type ecomV1BackInStockNotificationRequest_universal_d_MarkAsNotificationSentRequest = MarkAsNotificationSentRequest; type ecomV1BackInStockNotificationRequest_universal_d_MarkAsNotificationSentResponse = MarkAsNotificationSentResponse; type ecomV1BackInStockNotificationRequest_universal_d_QueryBackInStockNotificationRequestsRequest = QueryBackInStockNotificationRequestsRequest; type ecomV1BackInStockNotificationRequest_universal_d_QueryBackInStockNotificationRequestsResponse = QueryBackInStockNotificationRequestsResponse; type ecomV1BackInStockNotificationRequest_universal_d_GetBackInStockNotificationRequestsCountByCatalogReferencesRequest = GetBackInStockNotificationRequestsCountByCatalogReferencesRequest; type ecomV1BackInStockNotificationRequest_universal_d_GetBackInStockNotificationRequestsCountByCatalogReferencesResponse = GetBackInStockNotificationRequestsCountByCatalogReferencesResponse; type ecomV1BackInStockNotificationRequest_universal_d_BackInStockNotificationRequestsCount = BackInStockNotificationRequestsCount; type ecomV1BackInStockNotificationRequest_universal_d_ReportItemsBackInStockRequest = ReportItemsBackInStockRequest; type ecomV1BackInStockNotificationRequest_universal_d_ReportItemsBackInStockResponse = ReportItemsBackInStockResponse; const ecomV1BackInStockNotificationRequest_universal_d_createBackInStockNotificationRequest: typeof createBackInStockNotificationRequest; const ecomV1BackInStockNotificationRequest_universal_d_getBackInStockNotificationRequest: typeof getBackInStockNotificationRequest; const ecomV1BackInStockNotificationRequest_universal_d_deleteBackInStockNotificationRequest: typeof deleteBackInStockNotificationRequest; const ecomV1BackInStockNotificationRequest_universal_d_markAsNotificationSent: typeof markAsNotificationSent; const ecomV1BackInStockNotificationRequest_universal_d_queryBackInStockNotificationRequests: typeof queryBackInStockNotificationRequests; type ecomV1BackInStockNotificationRequest_universal_d_RequestsQueryResult = RequestsQueryResult; type ecomV1BackInStockNotificationRequest_universal_d_RequestsQueryBuilder = RequestsQueryBuilder; const ecomV1BackInStockNotificationRequest_universal_d_getBackInStockNotificationRequestsCountByCatalogReferences: typeof getBackInStockNotificationRequestsCountByCatalogReferences; const ecomV1BackInStockNotificationRequest_universal_d_reportItemsBackInStock: typeof reportItemsBackInStock; type ecomV1BackInStockNotificationRequest_universal_d_ReportItemsBackInStockOptions = ReportItemsBackInStockOptions; namespace ecomV1BackInStockNotificationRequest_universal_d { export { ecomV1BackInStockNotificationRequest_universal_d_BackInStockNotificationRequest as BackInStockNotificationRequest, CatalogReference$9 as CatalogReference, Status$3 as Status, ecomV1BackInStockNotificationRequest_universal_d_InvalidateCache as InvalidateCache, ecomV1BackInStockNotificationRequest_universal_d_InvalidateCacheGetByOneOf as InvalidateCacheGetByOneOf, App$1 as App, ecomV1BackInStockNotificationRequest_universal_d_Page as Page, ecomV1BackInStockNotificationRequest_universal_d_URI as URI, ecomV1BackInStockNotificationRequest_universal_d_File as File, ecomV1BackInStockNotificationRequest_universal_d_CreateBackInStockNotificationRequestRequest as CreateBackInStockNotificationRequestRequest, ecomV1BackInStockNotificationRequest_universal_d_BackInStockItemDetails as BackInStockItemDetails, ecomV1BackInStockNotificationRequest_universal_d_CreateBackInStockNotificationRequestResponse as CreateBackInStockNotificationRequestResponse, ecomV1BackInStockNotificationRequest_universal_d_GetBackInStockNotificationRequestRequest as GetBackInStockNotificationRequestRequest, ecomV1BackInStockNotificationRequest_universal_d_GetBackInStockNotificationRequestResponse as GetBackInStockNotificationRequestResponse, ecomV1BackInStockNotificationRequest_universal_d_DeleteBackInStockNotificationRequestRequest as DeleteBackInStockNotificationRequestRequest, ecomV1BackInStockNotificationRequest_universal_d_DeleteBackInStockNotificationRequestResponse as DeleteBackInStockNotificationRequestResponse, ecomV1BackInStockNotificationRequest_universal_d_MarkAsNotificationSentRequest as MarkAsNotificationSentRequest, ecomV1BackInStockNotificationRequest_universal_d_MarkAsNotificationSentResponse as MarkAsNotificationSentResponse, ecomV1BackInStockNotificationRequest_universal_d_QueryBackInStockNotificationRequestsRequest as QueryBackInStockNotificationRequestsRequest, PlatformQuery$1 as PlatformQuery, PlatformQueryPagingMethodOneOf$1 as PlatformQueryPagingMethodOneOf, Sorting$c as Sorting, SortOrder$c as SortOrder, PlatformPaging$1 as PlatformPaging, CursorPaging$c as CursorPaging, ecomV1BackInStockNotificationRequest_universal_d_QueryBackInStockNotificationRequestsResponse as QueryBackInStockNotificationRequestsResponse, PlatformPagingMetadata$1 as PlatformPagingMetadata, Cursors$c as Cursors, ecomV1BackInStockNotificationRequest_universal_d_GetBackInStockNotificationRequestsCountByCatalogReferencesRequest as GetBackInStockNotificationRequestsCountByCatalogReferencesRequest, ecomV1BackInStockNotificationRequest_universal_d_GetBackInStockNotificationRequestsCountByCatalogReferencesResponse as GetBackInStockNotificationRequestsCountByCatalogReferencesResponse, ecomV1BackInStockNotificationRequest_universal_d_BackInStockNotificationRequestsCount as BackInStockNotificationRequestsCount, ecomV1BackInStockNotificationRequest_universal_d_ReportItemsBackInStockRequest as ReportItemsBackInStockRequest, ecomV1BackInStockNotificationRequest_universal_d_ReportItemsBackInStockResponse as ReportItemsBackInStockResponse, DomainEvent$j as DomainEvent, DomainEventBodyOneOf$j as DomainEventBodyOneOf, EntityCreatedEvent$j as EntityCreatedEvent, RestoreInfo$j as RestoreInfo, EntityUpdatedEvent$j as EntityUpdatedEvent, EntityDeletedEvent$j as EntityDeletedEvent, ActionEvent$j as ActionEvent, Empty$c as Empty, MessageEnvelope$i as MessageEnvelope, IdentificationData$j as IdentificationData, IdentificationDataIdOneOf$j as IdentificationDataIdOneOf, WebhookIdentityType$i as WebhookIdentityType, ecomV1BackInStockNotificationRequest_universal_d_createBackInStockNotificationRequest as createBackInStockNotificationRequest, ecomV1BackInStockNotificationRequest_universal_d_getBackInStockNotificationRequest as getBackInStockNotificationRequest, ecomV1BackInStockNotificationRequest_universal_d_deleteBackInStockNotificationRequest as deleteBackInStockNotificationRequest, ecomV1BackInStockNotificationRequest_universal_d_markAsNotificationSent as markAsNotificationSent, ecomV1BackInStockNotificationRequest_universal_d_queryBackInStockNotificationRequests as queryBackInStockNotificationRequests, ecomV1BackInStockNotificationRequest_universal_d_RequestsQueryResult as RequestsQueryResult, ecomV1BackInStockNotificationRequest_universal_d_RequestsQueryBuilder as RequestsQueryBuilder, ecomV1BackInStockNotificationRequest_universal_d_getBackInStockNotificationRequestsCountByCatalogReferences as getBackInStockNotificationRequestsCountByCatalogReferences, ecomV1BackInStockNotificationRequest_universal_d_reportItemsBackInStock as reportItemsBackInStock, ecomV1BackInStockNotificationRequest_universal_d_ReportItemsBackInStockOptions as ReportItemsBackInStockOptions, }; } /** * The back in stock settings object holds information related to the state of collecting back in stock * notification requests. */ interface BackInStockSettings { /** * Information about collecting customer requests to receive * back in stock notifications. */ collectionStates?: BackInStockCollectionState[]; } interface BackInStockCollectionState { /** ID of the app to receive notification requests for. */ appId?: string; /** Whether to collect requests for items from this app. */ collectingRequests?: boolean; } interface StartCollectingRequestsRequest { /** ID of the app to start accepting notification requests for. */ appId: string; } interface StartCollectingRequestsResponse { /** Back in stock settings info. */ settings?: BackInStockSettings; } interface StopCollectingRequestsRequest { /** ID of the app to stop accepting notification requests for. */ appId: string; } interface StopCollectingRequestsResponse { /** Back in stock settings info. */ settings?: BackInStockSettings; } interface GetSettingsRequest { } interface GetSettingsResponse { /** Retrieved back in stock request settings. */ settings?: BackInStockSettings; } /** * Sets `settings.collectionStates.collectingRequests` to `true` for given `appId`. * * When the collection state is set to `true`, collecting requests is enabled and customers may request * notifications for out of stock products. While collecting is enabled, customers see a "Notify When Available" * button on out-of-stock items. Customers can click the button to enter their email address, which creates the * notification request. * @param appId - ID of the app to start accepting notification requests for. * @public * @documentationMaturity preview * @requiredField appId * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_SETTINGS * @adminMethod */ function startCollectingRequests(appId: string): Promise; /** * Sets `settings.collectionStates.collectingRequests` to `false` for given `appId`. * * When the collection state is set to `false`, collecting notification requests is disabled. * @param appId - ID of the app to stop accepting notification requests for. * @public * @documentationMaturity preview * @requiredField appId * @permissionId ECOM.MODIFY_BACK_IN_STOCK_NOTIFICATION_SETTINGS * @adminMethod */ function stopCollectingRequests(appId: string): Promise; /** * Retrieves back in stock request settings. * @public * @documentationMaturity preview * @permissionId ECOM.READ_BACK_IN_STOCK_NOTIFICATION_SETTINGS */ function getSettings(): Promise; type ecomV1BackInStockSettings_universal_d_BackInStockSettings = BackInStockSettings; type ecomV1BackInStockSettings_universal_d_BackInStockCollectionState = BackInStockCollectionState; type ecomV1BackInStockSettings_universal_d_StartCollectingRequestsRequest = StartCollectingRequestsRequest; type ecomV1BackInStockSettings_universal_d_StartCollectingRequestsResponse = StartCollectingRequestsResponse; type ecomV1BackInStockSettings_universal_d_StopCollectingRequestsRequest = StopCollectingRequestsRequest; type ecomV1BackInStockSettings_universal_d_StopCollectingRequestsResponse = StopCollectingRequestsResponse; type ecomV1BackInStockSettings_universal_d_GetSettingsRequest = GetSettingsRequest; type ecomV1BackInStockSettings_universal_d_GetSettingsResponse = GetSettingsResponse; const ecomV1BackInStockSettings_universal_d_startCollectingRequests: typeof startCollectingRequests; const ecomV1BackInStockSettings_universal_d_stopCollectingRequests: typeof stopCollectingRequests; const ecomV1BackInStockSettings_universal_d_getSettings: typeof getSettings; namespace ecomV1BackInStockSettings_universal_d { export { ecomV1BackInStockSettings_universal_d_BackInStockSettings as BackInStockSettings, ecomV1BackInStockSettings_universal_d_BackInStockCollectionState as BackInStockCollectionState, ecomV1BackInStockSettings_universal_d_StartCollectingRequestsRequest as StartCollectingRequestsRequest, ecomV1BackInStockSettings_universal_d_StartCollectingRequestsResponse as StartCollectingRequestsResponse, ecomV1BackInStockSettings_universal_d_StopCollectingRequestsRequest as StopCollectingRequestsRequest, ecomV1BackInStockSettings_universal_d_StopCollectingRequestsResponse as StopCollectingRequestsResponse, ecomV1BackInStockSettings_universal_d_GetSettingsRequest as GetSettingsRequest, ecomV1BackInStockSettings_universal_d_GetSettingsResponse as GetSettingsResponse, ecomV1BackInStockSettings_universal_d_startCollectingRequests as startCollectingRequests, ecomV1BackInStockSettings_universal_d_stopCollectingRequests as stopCollectingRequests, ecomV1BackInStockSettings_universal_d_getSettings as getSettings, }; } interface Cart$1 { /** Cart ID. */ _id?: string | null; /** * Line items. * @readonly */ lineItems?: LineItem$6[]; /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string | null; /** Buyer information. */ buyerInfo?: BuyerInfo$7; /** * Currency used for pricing. * @readonly */ currency?: string; /** * Currency code used for all the converted prices that are returned. * For a site that supports multiple currencies, this is the currency the buyer selected. * @readonly */ conversionCurrency?: string; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. * @readonly */ buyerLanguage?: string | null; /** * Site language in which original values are displayed. * @readonly */ siteLanguage?: string | null; /** * Whether tax is included in line item prices. * @readonly */ taxIncludedInPrices?: boolean | null; /** * Weight measurement unit - defaults to site's weight unit. * @readonly */ weightUnit?: WeightUnit$8; /** * Combined price of all line items before discounts. Subtotal includes tax if `cart.tax_included_in_prices` is set to `true`. * @internal * @readonly */ subtotal?: MultiCurrencyPrice$4; /** * Combined price of all line items after discounts. * @internal * @readonly */ subtotalAfterDiscounts?: MultiCurrencyPrice$4; /** * ID of the checkout that originated from this cart. * @readonly */ checkoutId?: string | null; /** * Cart discounts. * @readonly */ appliedDiscounts?: CartDiscount$1[]; /** * Date and time the cart was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the cart was updated. * @readonly */ _updatedDate?: Date | null; /** Contact info. */ contactInfo?: AddressWithContact$5; /** * __Deprecated.__ Use `purchaseFlowId` instead. * @internal * @deprecated */ ecomId?: string | null; /** * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page. * * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`. */ overrideCheckoutUrl?: string | null; /** * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. * @readonly */ purchaseFlowId?: string | null; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$2; /** * Fields extended by data extensions * @internal */ extendedFields?: ExtendedFields$a; } interface LineItem$6 { /** * Line item ID. * @readonly */ _id?: string | null; /** Item quantity. */ quantity?: number; /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$8; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` * @readonly */ productName?: ProductName$5; /** * URL to the item's page on the site. * @readonly */ url?: string; /** * Item price **after** catalog-defined discount and line item discounts. * @readonly */ price?: MultiCurrencyPrice$4; /** * Item price **before** catalog-defined discount. Defaults to `price` when not provided. * @readonly */ fullPrice?: MultiCurrencyPrice$4; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: MultiCurrencyPrice$4; /** * Total price **after** catalog-defined discount and line item discounts. * @internal * @readonly */ lineItemPrice?: MultiCurrencyPrice$4; /** * Line item description lines. Used for displaying the cart, checkout and order. * @readonly */ descriptionLines?: DescriptionLine$5[]; /** * Line item image details. * @readonly */ image?: string; /** * Item availability details. * @readonly */ availability?: ItemAvailabilityInfo$3; /** * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. * @readonly */ physicalProperties?: PhysicalProperties$7; /** * Coupon scopes - which app and items a coupon applies to. * This field is internal to Wix, and should be used by Bookings, Stores and Events as used by the current [Coupons API](https://bo.wix.com/wix-docs/rest/stores/coupons/valid-scope-values). * @internal * @readonly */ couponScopes?: Scope$4[]; /** * Item type. Either a preset type or custom. * @readonly */ itemType?: ItemType$6; /** * Subscription option information. * @internal * @readonly */ subscriptionOptionInfo?: SubscriptionOptionInfo$4; /** * Digital file identifier, relevant only for items with type DIGITAL. * @internal * @readonly */ digitalFile?: SecuredMedia$4; /** * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`. * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item happens as part of the checkout. * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `"MEMBERSHIP"` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` will be 0. * @readonly */ paymentOption?: V1PaymentOptionType$2; /** * Service properties. When relevant, this contains information such as date and number of participants. * @readonly */ serviceProperties?: ServiceProperties$5; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + in most cases, this field is the same as `catalogReference.catalogItemId`. * + Used in membership validation. * @readonly */ rootCatalogItemId?: string | null; /** * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". * @readonly */ priceDescription?: PriceDescription$5; /** * Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only. * @readonly */ depositAmount?: MultiCurrencyPrice$4; /** Selected membership to be used as payment for this item. Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`. This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`. */ selectedMembership?: SelectedMembership$4; /** * The Item's Delivery Profile Id * @internal * @readonly */ deliveryProfileId?: string | null; /** * Tax group ID for this line item. * @readonly */ taxGroupId?: string | null; /** * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin. * @readonly */ customLineItem?: boolean; /** * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page. * @readonly */ consentRequiredPaymentPolicy?: string | null; /** * Shipping group ID. * @internal * @readonly */ shippingGroupId?: string | null; /** * Whether the price is not yet defined, and will be updated after the order is created. * @internal * @readonly */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * @internal * @readonly */ fixedQuantity?: boolean; /** * Overriding values for catalog item properties. * * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ catalogOverrideFields?: CatalogOverrideFields$3; /** * Whether to save the payment method on the order. * * Default: `false` * @readonly */ savePaymentMethod?: boolean; /** * Address to be used for tax calculation. * @internal */ taxableAddress?: TaxableAddress$6; /** * Custom extended fields for the line item object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. * @internal */ extendedFields?: ExtendedFields$a; /** * Policies to be displayed to the customer on the checkout page. * @internal * @readonly */ policies?: Policy$3[]; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$8 { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. * * Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from your Wix Stores catalog, learn more about [eCommerce integration](https://www.wix.com/velo/reference/wix-stores-backend/ecommerce-integration). */ options?: Record | null; } interface ProductName$5 { /** **Required** - Original product name (in site's default language). */ original?: string; /** Description product name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } interface MultiCurrencyPrice$4 { /** Amount. */ amount?: string; /** * Converted amount. * @readonly */ convertedAmount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. * @readonly */ formattedConvertedAmount?: string; } interface DescriptionLine$5 extends DescriptionLineValueOneOf$5, DescriptionLineDescriptionLineValueOneOf$5 { /** Description line plain text value. */ plainText?: PlainTextValue$5; /** Description line color value. */ colorInfo?: Color$5; /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$5; /** * Description line color. * @internal * @deprecated */ color?: string; /** Description line name. */ name?: DescriptionLineName$5; /** * Description line type. * @internal * @deprecated */ lineType?: DescriptionLineType$5; } /** @oneof */ interface DescriptionLineValueOneOf$5 { /** Description line plain text value. */ plainText?: PlainTextValue$5; /** Description line color value. */ colorInfo?: Color$5; } /** @oneof */ interface DescriptionLineDescriptionLineValueOneOf$5 { /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$5; /** * Description line color. * @internal * @deprecated */ color?: string; } interface DescriptionLineName$5 { /** Description line name in site's default language. */ original?: string; /** Description line name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } interface PlainTextValue$5 { /** Description line plain text value in site's default language. */ original?: string; /** Description line plain text value translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } interface Color$5 { /** Description line color name in site's default language. */ original?: string; /** Description line color name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; /** * HEX or RGB color code for display. * */ code?: string | null; } enum DescriptionLineType$5 { /** Unrecognized type. */ UNRECOGNISED = "UNRECOGNISED", /** Plain text type. */ PLAIN_TEXT = "PLAIN_TEXT", /** Color type. */ COLOR = "COLOR" } interface FocalPoint$6 { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } interface ItemAvailabilityInfo$3 { /** * Item availability status. * * NOT_FOUND - Item does not exist. * NOT_AVAILABLE - Not in stock. * PARTIALLY_AVAILABLE - Available quantity is less than requested. */ status?: ItemAvailabilityStatus$3; /** Quantity available. */ quantityAvailable?: number | null; } enum ItemAvailabilityStatus$3 { AVAILABLE = "AVAILABLE", /** Item does not exist */ NOT_FOUND = "NOT_FOUND", /** Item not in stock */ NOT_AVAILABLE = "NOT_AVAILABLE", /** Available quantity is less than requested */ PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE" } interface PhysicalProperties$7 { /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */ weight?: number | null; /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string | null; /** Whether this line item is shippable. */ shippable?: boolean; } interface Scope$4 { /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */ namespace?: string; /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */ group?: Group$4; } interface Group$4 { /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ name?: string; /** Item ID (when the coupon scope is limited to just one item). */ entityId?: string | null; } interface ItemType$6 extends ItemTypeItemTypeDataOneOf$6 { /** Preset item type. */ preset?: ItemTypeItemType$6; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } /** @oneof */ interface ItemTypeItemTypeDataOneOf$6 { /** Preset item type. */ preset?: ItemTypeItemType$6; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } enum ItemTypeItemType$6 { UNRECOGNISED = "UNRECOGNISED", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL", GIFT_CARD = "GIFT_CARD", SERVICE = "SERVICE" } interface SubscriptionOptionInfo$4 { /** Subscription option settings. */ subscriptionSettings?: SubscriptionSettings$7; /** Subscription option title. */ title?: Title$3; /** Subscription option description. */ description?: Description$3; } interface SubscriptionSettings$7 { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequency$7; /** * Interval of recurring payment. * * Default: `1`. * If SubscriptionFrequency is Day the minimum interval is 7 */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. */ billingCycles?: number | null; /** * Whether to allow the customer to cancel the subscription.. * @internal */ enableCustomerCancellation?: boolean; /** * Period until first cycle starts. If applied payNow will be 0 * If None => no free trial * @internal */ freeTrialPeriod?: FreeTrialPeriod$3; /** * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays. * @internal */ startDate?: Date | null; /** * Whether to generate an order each billing cycle. An order will always be generated for the first billing cycle. * Default None => will behave like true * @internal */ generateOrderEachBillingCycle?: boolean | null; } /** Frequency unit of recurring payment */ enum SubscriptionFrequency$7 { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } interface FreeTrialPeriod$3 { /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */ frequency?: SubscriptionFrequency$7; /** interval of period */ interval?: number; } interface Title$3 { /** Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Subscription option name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface Description$3 { /** Subscription option description. */ original?: string; /** Translated subscription option description. */ translated?: string | null; } interface SecuredMedia$4 { /** Media ID in Wix Media Manager. */ _id?: string; /** Original filename. */ fileName?: string; /** File type. */ fileType?: FileType$4; } enum FileType$4 { UNSPECIFIED = "UNSPECIFIED", SECURE_PICTURE = "SECURE_PICTURE", SECURE_VIDEO = "SECURE_VIDEO", SECURE_DOCUMENT = "SECURE_DOCUMENT", SECURE_MUSIC = "SECURE_MUSIC", SECURE_ARCHIVE = "SECURE_ARCHIVE" } /** Type of selected payment option for catalog item */ enum V1PaymentOptionType$2 { /** The entire payment for this item happens as part of the checkout. */ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE", /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE", /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */ MEMBERSHIP = "MEMBERSHIP", /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */ DEPOSIT_ONLINE = "DEPOSIT_ONLINE", /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE" } interface ServiceProperties$5 { /** The date and time for which the service is supposed to be provided. For example, the time of the class. */ scheduledDate?: Date | null; /** The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room. */ numberOfParticipants?: number | null; } interface PriceDescription$5 { /** * **Required** - Original price description (in site's default language). * */ original?: string; /** Product name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } /** Selected Membership */ interface SelectedMembership$4 { /** Membership ID. */ _id?: string; /** ID of the app providing this payment option. */ appId?: string; } interface CatalogOverrideFields$3 { /** Item name. */ productName?: ProductName$5; /** Item price **after** discounts. */ price?: string | null; /** Item price **before** discounts. */ fullPrice?: string | null; /** Item description lines. Used when displaying the line item to customers. */ descriptionLines?: DescriptionLine$5[]; /** Physical properties of the item. */ physicalProperties?: PhysicalProperties$7; /** Item image. */ image?: string; /** Payment method selected for the item. */ paymentOption?: PaymentOption$3; /** Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`. */ depositAmount?: string | null; /** * Whether to save the payment method on the order. * * Default: `false` */ savePaymentMethod?: boolean | null; } interface PaymentOption$3 { /** * + `FULL_PAYMENT_ONLINE`: The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP`: Payment for this item is done by charging a membership. When selected, `price` is `0`. * + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`. * + `MEMBERSHIP_OFFLINE`: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ value?: V1PaymentOptionType$2; } interface TaxableAddress$6 extends TaxableAddressTaxableAddressDataOneOf$6 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$6; } /** @oneof */ interface TaxableAddressTaxableAddressDataOneOf$6 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$6; } enum TaxableAddressType$6 { UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS", BUSINESS = "BUSINESS", BILLING = "BILLING", SHIPPING = "SHIPPING" } interface ExtendedFields$a { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface Policy$3 { /** Policy title - should be translated */ title?: string | null; /** Policy content - should be translated */ content?: string; } /** Buyer Info */ interface BuyerInfo$7 extends BuyerInfoIdOneOf$5 { /** * Visitor ID - if the buyer is **not** a site member. * @readonly */ visitorId?: string; /** * Member ID - if the buyer is a site member. * @readonly */ memberId?: string; /** * User ID - if the cart owner is a Wix user. * @readonly */ userId?: string; /** Contact ID. For more information, see the Contacts API. */ contactId?: string | null; /** Buyer email address. */ email?: string | null; } /** @oneof */ interface BuyerInfoIdOneOf$5 { /** * Visitor ID - if the buyer is **not** a site member. * @readonly */ visitorId?: string; /** * Member ID - if the buyer is a site member. * @readonly */ memberId?: string; /** * User ID - if the cart owner is a Wix user. * @readonly */ userId?: string; } enum WeightUnit$8 { /** Weight unit can't be classified, due to an error */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms */ KG = "KG", /** Pounds */ LB = "LB" } interface CartDiscount$1 extends CartDiscountDiscountSourceOneOf$1 { /** Coupon details. */ coupon?: Coupon$6; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$6; /** * Discount rule * @internal */ discountRule?: V1DiscountRule$1; /** @internal */ lineItemIds?: string[]; } /** @oneof */ interface CartDiscountDiscountSourceOneOf$1 { /** Coupon details. */ coupon?: Coupon$6; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$6; /** * Discount rule * @internal */ discountRule?: V1DiscountRule$1; } interface Coupon$6 { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** * Coupon value. * @internal */ amount?: MultiCurrencyPrice$4; } interface MerchantDiscount$6 { /** Discount value. */ amount?: MultiCurrencyPrice$4; } interface V1DiscountRule$1 { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: V1DiscountRuleName$1; /** Discount value. */ amount?: MultiCurrencyPrice$4; } interface V1DiscountRuleName$1 { /** Original discount rule name (in site's default language). */ original?: string; /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string | null; } /** Billing Info and shipping details */ interface AddressWithContact$5 { /** Address. */ address?: Address$a; /** Contact details. */ contactDetails?: FullAddressContactDetails$6; } /** Physical address */ interface Address$a { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress$9; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** @internal */ location?: AddressLocation$9; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } interface StreetAddress$9 { /** Street number. */ number?: string; /** Street name. */ name?: string; /** * Apartment number. * @internal */ apt?: string; /** * Optional address line 1 * @internal */ formattedAddressLine?: string | null; } interface AddressLocation$9 { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } /** Full contact details for an address */ interface FullAddressContactDetails$6 { /** First name. */ firstName?: string | null; /** Last name. */ lastName?: string | null; /** Phone number. */ phone?: string | null; /** Company name. */ company?: string | null; /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */ vatId?: VatId$7; } interface VatId$7 { /** Customer's tax ID. */ _id?: string; /** * Tax type. * * Supported values: * + `CPF`: for individual tax payers * + `CNPJ`: for corporations */ type?: VatType$7; } /** tax info types */ enum VatType$7 { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } interface SelectedShippingOption$2 { /** Carrier ID. */ carrierId?: string | null; /** Selected shipping option code. For example, "usps_std_overnight". */ code?: string; } interface GetCurrentCartRequest$1 { } interface GetCurrentCartResponse$1 { /** Current session's active cart. */ cart?: Cart$1; } interface UpdateCartRequest$1 { /** Cart info. */ cartInfo?: Cart$1; /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string | null; /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */ merchantDiscounts?: MerchantDiscountInput$3[]; /** Catalog line items. */ lineItems?: LineItem$6[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$4[]; /** * List of field names to determine which of cartInfo's fields will be updated * @internal */ cartFieldmask?: string[]; } interface MerchantDiscountInput$3 { /** Discount amount. */ amount?: string; /** IDs of the line items the discount applies to. */ lineItemIds?: string[]; } interface CustomLineItem$4 { /** * Custom line item quantity. * * Min: `1` * Max: `100000` */ quantity?: number; /** * Custom line item price. * * Must be a number or a decimal without symbols. */ price?: string; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription$5; /** Custom line item description lines. Used for displaying the cart, checkout and order. */ descriptionLines?: DescriptionLine$5[]; /** * Custom line item media. Supported formats: * + Link to an image/video from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager) - `"wix:image://v1/3c76e2_c53...4ea4~mv2.jpg#originWidth=1000&originHeight=1000"`. * + An image from the web - `"http(s)://"`. */ media?: string; /** * Custom line item ID. If passed, `id` must be unique. * * Default: auto-generated ID */ _id?: string | null; /** Tax group ID for this custom line item. */ taxGroupId?: string | null; /** Name of the item or product. */ productName?: ProductName$5; /** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */ url?: string; /** Item type. Either a preset type or custom. */ itemType?: ItemType$6; /** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: string | null; /** * Item quantity available for purchase. Only return this if inventory is managed. * Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart. */ quantityAvailable?: number | null; /** Physical properties of the item. */ physicalProperties?: PhysicalProperties$7; /** * Subscription option info. This field is internal and only used by Stores. * @internal */ subscriptionOptionInfo?: SubscriptionOptionInfo$4; /** * Digital file ID and name. Required if `itemType: DIGITAL`. * @internal */ digitalFile?: SecuredMedia$4; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * * + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field. */ paymentOption?: V1PaymentOptionType$2; /** * Service properties. When relevant, this contains information such as date and number of participants. * Used, among other things, when checking for valid memberships. */ serviceProperties?: ServiceProperties$5; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field is the same as `catalogReference.catalogItemId`. * + Used in membership validation. */ rootCatalogItemId?: string | null; /** * Partial payment for the given item to be paid upfront during the checkout. * * Eligible for catalog items with type `DEPOSIT_ONLINE`. * When omitted, the item's price will not be split and is expected to be paid in a single installment. */ depositAmount?: string | null; /** * Delivery Profile ID. * @internal */ deliveryProfileId?: string | null; /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$8; /** * Whether the price is not yet defined, and will be updated after the order is created. * * Default: `false` * @internal */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * * Default: `false` * @internal */ fixedQuantity?: boolean; /** * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page. * @readonly */ consentRequiredPaymentPolicy?: string | null; /** * Whether to save the payment method on the order. * * Default: `false` * @readonly */ savePaymentMethod?: boolean; /** * Policies to be displayed to the customer on the checkout page. * @internal */ policies?: Policy$3[]; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; } interface UpdateCartResponse$1 { /** Updated Cart. */ cart?: Cart$1; } interface AddToCurrentCartRequest$1 { /** Catalog line items. */ lineItems?: LineItem$6[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$4[]; } interface AddToCartResponse$1 { /** Updated cart. */ cart?: Cart$1; } interface AddToCurrentCartAndEstimateTotalsRequest$1 { /** Catalog line items. */ lineItems?: LineItem$6[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$4[]; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$2; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$a; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$a; /** The selected membership payment options and which line items they apply to. */ selectedMemberships?: SelectedMemberships$4; /** * Whether to calculate tax in the calculation request. * * Default: `true` */ calculateTax?: boolean | null; /** * Whether to calculate shipping in the calculation request. * * Default: `true` */ calculateShipping?: boolean | null; } interface SelectedMemberships$4 { /** Selected memberships. */ memberships?: HostSelectedMembership$1[]; } interface HostSelectedMembership$1 { /** Membership ID. */ _id?: string; /** ID of the app providing this payment option. */ appId?: string; /** IDs of the line items this membership applies to. */ lineItemIds?: string[]; } interface EstimateTotalsResponse$1 { /** Cart. */ cart?: Cart$1; /** Calculated line items. */ calculatedLineItems?: CalculatedLineItem$2[]; /** Price summary. */ priceSummary?: PriceSummary$6; /** Applied gift card. */ giftCard?: GiftCard$6; /** Tax summary. */ taxSummary?: TaxSummary$6; /** Shipping information. */ shippingInfo?: ShippingInformation$4; /** Applied discounts. */ appliedDiscounts?: AppliedDiscount$6[]; /** Calculation errors. */ calculationErrors?: CalculationErrors$5; /** Weight measurement unit - defaults to site's weight unit. */ weightUnit?: WeightUnit$8; /** Currency used for pricing in this store. */ currency?: string; /** * Minimal amount to pay in order to place the order. * @readonly */ payNow?: PriceSummary$6; /** * Remaining amount for the order to be fully paid. * @readonly */ payLater?: PriceSummary$6; /** Information about valid and invalid memberships, and which ones are selected for usage. */ membershipOptions?: MembershipOptions$4; /** Additional fees */ additionalFees?: AdditionalFee$6[]; /** * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction). * @readonly */ violations?: Violation$3[]; } interface CalculatedLineItem$2 { /** Line item ID. */ lineItemId?: string; /** Price breakdown for this line item. */ pricesBreakdown?: LineItemPricesData$2; /** * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`. * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item happens as part of the checkout. * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `"MEMBERSHIP"` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` will be 0. */ paymentOption?: V1PaymentOptionType$2; /** * tax calculation address. * @internal */ taxableAddress?: TaxableAddress$6; } interface LineItemPricesData$2 { /** Total price after discounts and after tax. */ totalPriceAfterTax?: MultiCurrencyPrice$4; /** Total price after discounts, and before tax. */ totalPriceBeforeTax?: MultiCurrencyPrice$4; /** Tax details. */ taxDetails?: ItemTaxFullDetails$6; /** Total discount for all line items. */ totalDiscount?: MultiCurrencyPrice$4; /** Catalog price after catalog discount and automatic discounts. */ price?: MultiCurrencyPrice$4; /** Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: MultiCurrencyPrice$4; /** Total price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: MultiCurrencyPrice$4; /** Item price **before** line item discounts and **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: MultiCurrencyPrice$4; } interface ItemTaxFullDetails$6 { /** Amount for which tax is calculated. */ taxableAmount?: MultiCurrencyPrice$4; /** * Tax group ID, if specified. * @internal */ taxGroupId?: string | null; /** Tax rate %, as a decimal point between 0 and 1. */ taxRate?: string; /** Calculated tax, based on `taxable_amount` and `tax_rate`. */ totalTax?: MultiCurrencyPrice$4; /** * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead. * @readonly * @deprecated */ rateBreakdown?: TaxRateBreakdown$4[]; /** * The amount of this line item that was exempt. * @internal */ exemptAmount?: MultiCurrencyPrice$4; /** * True for items we have a tax applied on them * @internal */ isItemTaxable?: boolean | null; /** * True if the lineAmount include tax in it. * @internal */ isTaxIncluded?: boolean | null; /** * The calculator that calculated this line tax * @internal */ calculatorName?: string | null; /** * tax information for a line item. * @internal * @readonly */ taxBreakdown?: TaxBreakdown$4[]; } interface TaxRateBreakdown$4 { /** Name of tax against which the calculation was performed. */ name?: string; /** Rate at which this tax detail was calculated. */ rate?: string; /** Amount of tax for this tax detail. */ tax?: MultiCurrencyPrice$4; /** * The type of tax that was calculated * @internal */ taxType?: string | null; /** * The name of the jurisdiction in which this tax detail applies * @internal */ jurisdiction?: string | null; /** * The type of the jurisdiction in which this tax detail applies(Country,State,County,City,Special). * @internal */ jurisdictionType?: string | null; /** * The amount of this line item that was exempt from this authority. * @internal */ exemptAmount?: MultiCurrencyPrice$4; /** * ids of the used exemptions from the TaxEstimate exemptions array. * @internal */ exemptionIds?: number[]; /** * The taxable amount of this tax detail * @internal */ taxableAmount?: MultiCurrencyPrice$4; /** * The Taxes/Fee component. True if the fee is applied. * @internal */ isFee?: boolean | null; } /** * TaxBreakdown represents tax information for a line item. * It holds the tax amount and the tax rate for each tax authority that apply on the line item. */ interface TaxBreakdown$4 { /** The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". */ jurisdiction?: string | null; /** The amount of this line item price that was considered nontaxable. (Decimal value) */ nonTaxableAmount?: MultiCurrencyPrice$4; /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */ rate?: string | null; /** The amount of tax estimated for this line item. (Decimal value) */ taxAmount?: MultiCurrencyPrice$4; /** The taxable amount of this line item. */ taxableAmount?: MultiCurrencyPrice$4; /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */ taxType?: string | null; /** * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. * This name should be explicit enough to allow the merchant to understand what tax was calculated. */ taxName?: string | null; /** The type of the jurisdiction in which this tax detail applies. */ jurisdictionType?: JurisdictionType$6; } /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ enum JurisdictionType$6 { UNDEFINED = "UNDEFINED", COUNTRY = "COUNTRY", STATE = "STATE", COUNTY = "COUNTY", CITY = "CITY", SPECIAL = "SPECIAL" } interface PriceSummary$6 { /** Subtotal of all line items, before discounts and before tax. */ subtotal?: MultiCurrencyPrice$4; /** Total shipping price, before discounts and before tax. */ shipping?: MultiCurrencyPrice$4; /** Total tax. */ tax?: MultiCurrencyPrice$4; /** Total calculated discount value. */ discount?: MultiCurrencyPrice$4; /** Total price after discounts, gift cards, and tax. */ total?: MultiCurrencyPrice$4; /** Total additional fees price before tax. */ additionalFees?: MultiCurrencyPrice$4; } interface GiftCard$6 { /** * Gift Card ID. * @deprecated */ _id?: string; /** Gift card obfuscated code. */ obfuscatedCode?: string; /** Gift card value. */ amount?: MultiCurrencyPrice$4; /** App ID of the gift card provider. */ appId?: string; /** * External ID in the gift card provider's system. * Used for integration and tracking across different platforms. */ externalId?: string | null; } interface TaxSummary$6 { /** * Amount for which tax is calculated, added from line items. * @readonly */ taxableAmount?: MultiCurrencyPrice$4; /** * Calculated tax, added from line items. * @readonly */ totalTax?: MultiCurrencyPrice$4; /** * Manual tax rate * @internal * @readonly * @deprecated */ manualTaxRate?: string; /** * Tax calculator that was active when the order was created. * @deprecated */ calculationDetails?: TaxCalculationDetails$4; /** * Tax estimation id in tax service * @internal * @readonly */ taxEstimationId?: string | null; /** * Average Tax Rate * @internal * @readonly */ averageTaxRate?: string | null; /** * The amount of this estimate that was exempt (for all line items). * @internal * @readonly */ totalExempt?: MultiCurrencyPrice$4; /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * @internal * @readonly */ aggregatedTaxBreakdown?: AggregatedTaxBreakdown$4[]; } interface TaxCalculationDetails$4 extends TaxCalculationDetailsCalculationDetailsOneOf$4 { /** Reason the manual calculation was used. */ manualRateReason?: ManualCalculationReason$4; /** Error details and reason for tax rate fallback. */ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails$4; /** * Rate calculation type. Supported values: * + `"AUTO_RATE"` * + `"FALLBACK_RATE"` * + `"MANUAL_RATE"` * + `"NO_TAX_COLLECTED"` */ rateType?: RateType$4; } /** @oneof */ interface TaxCalculationDetailsCalculationDetailsOneOf$4 { /** Reason the manual calculation was used. */ manualRateReason?: ManualCalculationReason$4; /** Details of the fallback rate calculation. */ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails$4; } enum RateType$4 { /** no tax being collected for this request due to location of purchase */ NO_TAX_COLLECTED = "NO_TAX_COLLECTED", /** manual rate used for calculation */ MANUAL_RATE = "MANUAL_RATE", /** autotax rate used for calculation */ AUTO_RATE = "AUTO_RATE", /** fallback rate used for calculation */ FALLBACK_RATE = "FALLBACK_RATE" } enum ManualCalculationReason$4 { /** user set calculator in Business Manager to be Manual */ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL", /** specific region is on manual even though Global setting is Auto-tax */ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL" } interface AutoTaxFallbackCalculationDetails$4 { /** * Reason for fallback. Supported values: * + `"AUTO_TAX_FAILED"` * + `"AUTO_TAX_DEACTIVATED"` */ fallbackReason?: FallbackReason$4; /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */ error?: ApplicationError$b; } enum FallbackReason$4 { /** auto-tax failed to be calculated */ AUTO_TAX_FAILED = "AUTO_TAX_FAILED", /** auto-tax was temporarily deactivated on a system-level */ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED" } interface ApplicationError$b { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * Tax breakdown is the tax amount split to the tax authorities that applied on the line item. */ interface AggregatedTaxBreakdown$4 { /** The name of the tax against which this tax amount was calculated. */ taxName?: string; /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */ taxType?: string; /** The name of the jurisdiction in which this tax detail applies. */ jurisdiction?: string; /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ jurisdictionTypeEnum?: JurisdictionType$6; /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value) */ rate?: string; /** The sum of all the tax from line items that calculated by the tax identifiers. */ aggregatedTaxAmount?: MultiCurrencyPrice$4; /** * The sum of all the taxable amount from line items for tax identifiers. * @internal */ aggregatedTaxableAmount?: MultiCurrencyPrice$4; } interface ShippingInformation$4 { /** Shipping region. */ region?: ShippingRegion$6; /** Selected shipping option. */ selectedCarrierServiceOption?: SelectedCarrierServiceOption$4; /** All shipping options. */ carrierServiceOptions?: CarrierServiceOption$4[]; } interface ShippingRegion$6 { /** * Shipping region ID. * @readonly */ _id?: string; /** Shipping region name. */ name?: string; } interface SelectedCarrierServiceOption$4 { /** Unique identifier of selected option. For example, "usps_std_overnight". */ code?: string; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". * @readonly */ title?: string; /** * Delivery logistics. * @readonly */ logistics?: DeliveryLogistics$7; /** * Shipping costs. * @readonly */ cost?: SelectedCarrierServiceOptionPrices$4; /** * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) * @readonly */ requestedShippingOption?: boolean; /** Other charges */ otherCharges?: SelectedCarrierServiceOptionOtherCharge$4[]; /** This carrier's unique ID */ carrierId?: string | null; /** * Delivery solution allocations to different delivery carriers and delivery regions * @internal */ deliveryAllocations?: DeliveryAllocation$5[]; /** * If the delivery solution is a partial and doesn't apply to all items. * @internal */ partial?: boolean | null; } interface DeliveryLogistics$7 { /** Expected delivery time, in free text. For example, "3-5 business days". */ deliveryTime?: string | null; /** Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */ instructions?: string | null; /** Pickup details. */ pickupDetails?: PickupDetails$8; /** * Expected delivery time slot (from and to time stamps representation) * @internal */ deliveryTimeSlot?: DeliveryTimeSlot$7; } interface PickupDetails$8 { /** Pickup address. */ address?: Address$a; /** * Whether the pickup address is that of a business - this may effect tax calculation. * @deprecated */ businessLocation?: boolean; /** Pickup method */ pickupMethod?: PickupMethod$7; } enum PickupMethod$7 { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } interface DeliveryTimeSlot$7 { /** starting time of the delivery time slot */ from?: Date | null; /** ending time of the delivery time slot */ to?: Date | null; } interface SelectedCarrierServiceOptionPrices$4 { /** Total shipping price, after discount and after tax. */ totalPriceAfterTax?: MultiCurrencyPrice$4; /** Total price of shipping after discounts (when relevant), and before tax. */ totalPriceBeforeTax?: MultiCurrencyPrice$4; /** Tax details. */ taxDetails?: ItemTaxFullDetails$6; /** Shipping discount before tax. */ totalDiscount?: MultiCurrencyPrice$4; /** Shipping price before discount and before tax. */ price?: MultiCurrencyPrice$4; } interface SelectedCarrierServiceOptionOtherCharge$4 { /** Type of additional cost. */ type?: ChargeType$6; /** Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */ details?: string | null; /** Price of added charge. */ cost?: SelectedCarrierServiceOptionPrices$4; } enum ChargeType$6 { HANDLING_FEE = "HANDLING_FEE", INSURANCE = "INSURANCE" } interface DeliveryAllocation$5 { /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */ deliveryCarrier?: Carrier$5; /** The delivery region that are relevant for this delivery solution. */ deliveryRegion?: Region$5; /** Populated if the delivery solution is a partially supplied by this carrier. */ applicableLineItems?: ApplicableLineItems$5; } interface Carrier$5 { /** The carrier app id */ appId?: string | null; /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; } interface Region$5 { /** The delivery region id. */ _id?: string | null; /** The delivery region name. */ name?: string | null; } interface ApplicableLineItems$5 { /** Line items that the delivery solution is for. */ lineItemIds?: string[]; } interface CarrierServiceOption$4 { /** Carrier ID. */ carrierId?: string; /** Shipping options offered by this carrier for this request. */ shippingOptions?: ShippingOption$6[]; } interface ShippingOption$6 { /** * Unique code of provided shipping option like "usps_std_overnight". * For legacy calculators this would be the UUID of the option. */ code?: string; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; /** Delivery logistics. */ logistics?: DeliveryLogistics$7; /** Sipping price information. */ cost?: ShippingPrice$6; /** * Delivery solution allocations to different delivery carriers and delivery regions * @internal */ deliveryAllocations?: DeliveryAllocation$5[]; /** * If the delivery solution is a partial and doesn't apply to all items. * @internal */ partial?: boolean | null; } interface ShippingPrice$6 { /** Shipping price. */ price?: MultiCurrencyPrice$4; /** Other costs such as insurance, handling & packaging for fragile items, etc. */ otherCharges?: OtherCharge$4[]; } interface OtherCharge$4 { /** Type of additional cost. */ type?: ChargeType$6; /** Price of added cost. */ price?: MultiCurrencyPrice$4; } interface AppliedDiscount$6 extends AppliedDiscountDiscountSourceOneOf$6 { /** Coupon details. */ coupon?: V1Coupon$1; /** Merchant discount. */ merchantDiscount?: V1MerchantDiscount$1; /** Discount rule */ discountRule?: DiscountRule$6; /** Discount type. */ discountType?: DiscountType$6; /** * IDs of the line items the discount applies to. * @deprecated IDs of line items the discount applies to. * @replacedBy line_items_discounts * @targetRemovalDate 2024-06-01 */ lineItemIds?: string[]; /** * Discount ID. * @internal */ _id?: string | null; /** * Line items the discount applies to. * @internal */ lineItemDiscounts?: LineItemDiscount$6[]; /** * Number of subscription cycle this discount applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } /** @oneof */ interface AppliedDiscountDiscountSourceOneOf$6 { /** Coupon details. */ coupon?: V1Coupon$1; /** Merchant discount. */ merchantDiscount?: V1MerchantDiscount$1; /** Discount rule */ discountRule?: DiscountRule$6; } enum DiscountType$6 { GLOBAL = "GLOBAL", SPECIFIC_ITEMS = "SPECIFIC_ITEMS", SHIPPING = "SHIPPING" } /** Coupon */ interface V1Coupon$1 { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** Coupon value. */ amount?: MultiCurrencyPrice$4; /** Coupon name. */ name?: string; /** * Coupon type: We want it to be an enum and not a string but currently we have no time to do it so we leave it as is to be aligned with cart summary. * @internal * @deprecated */ couponType?: string; } interface V1MerchantDiscount$1 { /** Discount value. */ amount?: MultiCurrencyPrice$4; /** Discount Percentage. Will be calculated from items price before other discounts. */ percentage?: number | null; } interface DiscountRule$6 { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: DiscountRuleName$6; /** Discount value. */ amount?: MultiCurrencyPrice$4; } interface DiscountRuleName$6 { /** Original discount rule name (in site's default language). */ original?: string; /** Discount rule name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } interface LineItemDiscount$6 { /** ID of line item the discount applies to. */ _id?: string; /** Discount value. */ totalDiscountAmount?: MultiCurrencyPrice$4; } interface CalculationErrors$5 extends CalculationErrorsShippingCalculationErrorOneOf$5 { /** General shipping calculation error. */ generalShippingCalculationError?: Details$6; /** Carrier errors. */ carrierErrors?: CarrierErrors$5; /** Tax calculation error. */ taxCalculationError?: Details$6; /** Coupon calculation error. */ couponCalculationError?: Details$6; /** Gift card calculation error. */ giftCardCalculationError?: Details$6; /** Order validation errors. */ orderValidationErrors?: ApplicationError$b[]; /** * Membership payment methods calculation errors * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid */ membershipError?: Details$6; /** Discount Rule calculation error. */ discountsCalculationError?: Details$6; } /** @oneof */ interface CalculationErrorsShippingCalculationErrorOneOf$5 { /** General shipping calculation error. */ generalShippingCalculationError?: Details$6; /** Carrier errors. */ carrierErrors?: CarrierErrors$5; } interface Details$6 extends DetailsKindOneOf$6 { applicationError?: ApplicationError$b; validationError?: ValidationError$6; systemError?: SystemError$6; /** * Deprecated in APIs. Used to enable migration from rendering arbitrary tracing to rest response. * @deprecated */ tracing?: Record; } /** @oneof */ interface DetailsKindOneOf$6 { applicationError?: ApplicationError$b; validationError?: ValidationError$6; systemError?: SystemError$6; } /** * example result: * { * "fieldViolations": [ * { * "field": "fieldA", * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]", * "violatedRule": "OTHER", * "ruleName": "INVALID_NOTE", * "data": { * "value": "FI" * } * }, * { * "field": "fieldB", * "description": "field value out of range. supported range: [0-20]", * "violatedRule": "MAX", * "data": { * "threshold": 20 * } * }, * { * "field": "fieldC", * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]", * "violatedRule": "FORMAT", * "data": { * "type": "PHONE" * } * } * ] * } */ interface ValidationError$6 { fieldViolations?: FieldViolation$6[]; } enum RuleType$6 { VALIDATION = "VALIDATION", OTHER = "OTHER", MAX = "MAX", MIN = "MIN", MAX_LENGTH = "MAX_LENGTH", MIN_LENGTH = "MIN_LENGTH", MAX_SIZE = "MAX_SIZE", MIN_SIZE = "MIN_SIZE", FORMAT = "FORMAT", DECIMAL_LTE = "DECIMAL_LTE", DECIMAL_GTE = "DECIMAL_GTE", DECIMAL_LT = "DECIMAL_LT", DECIMAL_GT = "DECIMAL_GT", DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE", INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE", REQUIRED_FIELD = "REQUIRED_FIELD", FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED", ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT", EXACT_LENGTH = "EXACT_LENGTH", EXACT_SIZE = "EXACT_SIZE" } interface FieldViolation$6 { field?: string; description?: string; violatedRule?: RuleType$6; /** applicable when violated_rule=OTHER */ ruleName?: string | null; data?: Record | null; } interface SystemError$6 { /** Error code. */ errorCode?: string | null; } interface CarrierErrors$5 { /** Carrier errors. */ errors?: CarrierError$6[]; } interface CarrierError$6 { /** Carrier ID. */ carrierId?: string; /** Error details. */ error?: Details$6; } interface MembershipOptions$4 { /** List of payment options that can be used. */ eligibleMemberships?: Membership$4[]; /** List of payment options that are owned by the member, but cannot be used due to reason provided. */ invalidMemberships?: InvalidMembership$4[]; /** The selected membership payment options and which line items they apply to. */ selectedMemberships?: HostSelectedMembership$1[]; } interface Membership$4 { /** Membership ID. */ _id?: string; /** ID of the application providing this payment option. */ appId?: string; /** The name of this membership. */ name?: MembershipName$6; /** Line item IDs which are "paid" for by this membership. */ lineItemIds?: string[]; /** Optional - For a membership that has limited credits, information about credit usage. */ credits?: MembershipPaymentCredits$4; /** Optional - TMembership expiry date. */ expirationDate?: Date | null; /** Additional data about this membership. */ additionalData?: Record | null; } interface MembershipName$6 { /** Membership name. */ original?: string; /** Membership name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } interface MembershipPaymentCredits$4 { /** Membership's total amount of credits. */ total?: number; /** Membership's remaining amount of credits. */ remaining?: number; } interface InvalidMembership$4 { /** Membership details. */ membership?: Membership$4; /** Reason why this membership is invalid and cannot be used. */ reason?: string; } interface AdditionalFee$6 { /** Additional fee's unique code (or ID) for future processing. */ code?: string | null; /** Translated additional fee's name. */ name?: string; /** Additional fee's price. */ price?: MultiCurrencyPrice$4; /** Tax details. */ taxDetails?: ItemTaxFullDetails$6; /** Provider's app id. */ providerAppId?: string | null; /** Additional fee's price before tax. */ priceBeforeTax?: MultiCurrencyPrice$4; /** Additional fee's price after tax. */ priceAfterTax?: MultiCurrencyPrice$4; /** * Optional - Line items associated with this additional fee. * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. */ lineItemIds?: string[]; /** * Number of subscription cycle this fee applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } interface Violation$3 { /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */ severity?: Severity$3; /** Target location on a checkout or cart page where the violation will be displayed. */ target?: Target$3; /** Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `Click me`. */ description?: string | null; } enum Severity$3 { /** The user is allowed to move forward in the flow. */ WARNING = "WARNING", /** * The user is blocked from moving forward in the flow. * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked. */ ERROR = "ERROR" } interface Target$3 extends TargetTargetTypeOneOf$3 { /** General (other) violation. */ other?: Other$3; /** Specific line item violation. */ lineItem?: TargetLineItem$3; } /** @oneof */ interface TargetTargetTypeOneOf$3 { /** General (other) violation. */ other?: Other$3; /** Specific line item violation. */ lineItem?: TargetLineItem$3; } /** Available locations on the webpage */ enum NameInOther$3 { /** Default location, in case no specific location is specified. */ OTHER_DEFAULT = "OTHER_DEFAULT", /** Delivery section. */ DELIVERY = "DELIVERY" } /** Available locations on the line item */ enum NameInLineItem$3 { /** Default location, in case no specific location is specified. */ LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT" } enum SuggestedFix$3 { /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */ UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX", /** The line item should be removed from the cart or checkout to resolve the violation. */ REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM" } /** General (other) violation. */ interface Other$3 { /** Location on a checkout or a cart page where a general (other) violation will be displayed. */ name?: NameInOther$3; } /** Specific line item violation. */ interface TargetLineItem$3 { /** Location on a checkout or a cart page where the specific line item violation will be displayed. */ name?: NameInLineItem$3; /** ID of the line item containing the violation. */ _id?: string | null; /** * Suggested fix for resolving the line item violation. * @internal */ suggestedFix?: SuggestedFix$3; } interface RemoveLineItemsFromCurrentCartRequest$1 { /** IDs of the line items to remove from the cart. */ lineItemIds: string[]; } interface RemoveLineItemsResponse$2 { /** Updated cart. */ cart?: Cart$1; } interface CreateCheckoutFromCurrentCartRequest$1 { /** **Required**. Sales channel type. */ channelType?: ChannelType$6; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$a; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$a; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$2; /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string | null; } enum ChannelType$6 { /** Unspecified sales channel. This value is not supported. */ UNSPECIFIED = "UNSPECIFIED", /** A web client. */ WEB = "WEB", /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */ POS = "POS", /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */ EBAY = "EBAY", /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */ AMAZON = "AMAZON", /** Other sales platform. */ OTHER_PLATFORM = "OTHER_PLATFORM", /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */ WIX_APP_STORE = "WIX_APP_STORE", /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */ WIX_INVOICES = "WIX_INVOICES", /** Wix merchant backoffice. */ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT", /** Wish sales channel. */ WISH = "WISH", /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */ CLASS_PASS = "CLASS_PASS", /** Global-E sales channel. */ GLOBAL_E = "GLOBAL_E", /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */ FACEBOOK = "FACEBOOK", /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */ ETSY = "ETSY", /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */ TIKTOK = "TIKTOK", /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */ FAIRE_COM = "FAIRE_COM" } interface CreateCheckoutResponse$2 { /** The newly created checkout's ID. */ checkoutId?: string; } interface RemoveCouponFromCurrentCartRequest$1 { } interface RemoveCouponResponse$2 { /** Updated cart. */ cart?: Cart$1; } interface UpdateCurrentCartLineItemQuantityRequest$1 { /** Line item IDs and their new quantity. */ lineItems: LineItemQuantityUpdate$2[]; } interface LineItemQuantityUpdate$2 { /** Line item ID. Required. */ _id?: string; /** New quantity. Number must be 1 or higher. Required. */ quantity?: number; } interface UpdateLineItemsQuantityResponse$2 { /** Updated cart. */ cart?: Cart$1; } interface EstimateCurrentCartTotalsRequest$1 { /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$2; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$a; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$a; /** The selected membership payment options and which line items they apply to. */ selectedMemberships?: SelectedMemberships$4; /** * Whether to calculate tax in the calculation request. * * Default: `true` */ calculateTax?: boolean | null; /** * Whether to calculate shipping in the calculation request. * * Default: `true` */ calculateShipping?: boolean | null; } interface DeleteCurrentCartRequest$1 { } interface DeleteCartResponse$1 { } interface DomainEvent$i extends DomainEventBodyOneOf$i { createdEvent?: EntityCreatedEvent$i; updatedEvent?: EntityUpdatedEvent$i; deletedEvent?: EntityDeletedEvent$i; actionEvent?: ActionEvent$i; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$i { createdEvent?: EntityCreatedEvent$i; updatedEvent?: EntityUpdatedEvent$i; deletedEvent?: EntityDeletedEvent$i; actionEvent?: ActionEvent$i; } interface EntityCreatedEvent$i { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$i; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$i { deletedDate?: Date | null; } interface EntityUpdatedEvent$i { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$i { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$i { bodyAsJson?: string; } interface MessageEnvelope$h { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$i; /** Stringify payload. */ data?: string; } interface IdentificationData$i extends IdentificationDataIdOneOf$i { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$h; } /** @oneof */ interface IdentificationDataIdOneOf$i { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$h { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface CreateCartRequest$1 { /** Cart info. */ cartInfo?: Cart$1; /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string | null; /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart. */ merchantDiscounts?: MerchantDiscountInput$3[]; /** Catalog line items. */ lineItems?: LineItem$6[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$4[]; } interface CreateCartResponse$1 { /** Cart. */ cart?: Cart$1; } interface GetCartRequest$1 { /** ID of the cart to retrieve. */ _id: string; } interface GetCartResponse$1 { /** The requested cart. */ cart?: Cart$1; } interface GetCartByCheckoutIdRequest$1 { /** Checkout ID. */ _id: string; } interface GetCartByCheckoutIdResponse$1 { /** The requested cart. */ cart?: Cart$1; } interface AddToCartRequest$1 { /** Cart ID. */ _id: string; /** Catalog line items. */ lineItems?: LineItem$6[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$4[]; } interface RemoveLineItemsRequest$2 { /** Cart ID. */ _id: string; /** IDs of the line items to remove from the cart. */ lineItemIds: string[]; } interface CreateCheckoutRequest$2 { /** Cart ID. */ _id: string; /** **Required**. Sales channel type. */ channelType?: ChannelType$6; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$a; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$a; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$2; /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string | null; } interface RemoveCouponRequest$2 { /** Cart ID. */ _id: string; } interface UpdateLineItemsQuantityRequest$2 { /** Cart ID. */ _id: string; /** Line item IDs and their new quantity. */ lineItems: LineItemQuantityUpdate$2[]; } interface EstimateTotalsRequest$1 { /** Cart ID. */ _id: string; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$2; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$a; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$a; /** The selected membership payment options and which line items they apply to. */ selectedMemberships?: SelectedMemberships$4; /** * Whether to calculate tax in the calculation request. * * Default: `true` */ calculateTax?: boolean | null; /** * Whether to calculate shipping in the calculation request. * * Default: `true` */ calculateShipping?: boolean | null; } interface DeleteCartRequest$1 { /** ID of the cart to delete. */ _id: string; } interface Empty$b { } /** * Creates a new cart. * * * The `createCart()` function returns a Promise that resolves to the new cart when it's created. * * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required. * @public * @requiredField options.customLineItems.descriptionLines * @requiredField options.customLineItems.descriptionLines.name * @requiredField options.customLineItems.itemType * @requiredField options.customLineItems.price * @requiredField options.customLineItems.productName * @requiredField options.customLineItems.quantity * @requiredField options.lineItems.catalogReference * @requiredField options.lineItems.quantity * @requiredField options.lineItems.selectedMembership._id * @requiredField options.lineItems.selectedMembership.appId * @param options - Cart creation options. * @permissionId ECOM.MODIFY_CARTS * @permissionId ECOM.ADMIN_MODIFY_CARTS * @returns Fulfilled - Cart. */ function createCart(options?: CreateCartOptions): Promise; interface CreateCartOptions { /** Cart info. */ cartInfo?: Cart$1; /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string | null; /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart. */ merchantDiscounts?: MerchantDiscountInput$3[]; /** Catalog line items. */ lineItems?: LineItem$6[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$4[]; } /** * Updates a specified cart's properties. * * * The `updateCart()` function returns a Promise that resolves when the specified cart's properties are updated. * * > **Note:** When updating catalog items, `options.lineItems.catalogReference` is required. * @public * @requiredField _id * @requiredField options.customLineItems.descriptionLines * @requiredField options.customLineItems.descriptionLines.name * @requiredField options.customLineItems.itemType * @requiredField options.customLineItems.productName * @requiredField options.lineItems.catalogReference * @param options - Available options to use when updating a cart. * @param _id - ID of the cart to be updated. * @permissionId ECOM.MODIFY_CARTS * @permissionId ECOM.ADMIN_MODIFY_CARTS * @returns Fulfilled - Updated cart. */ function updateCart(_id: string | null, options?: UpdateCartOptions): Promise; interface UpdateCartOptions { /** The information for the cart being updated. */ cartInfo: { /** ID of the cart to be updated. */ _id?: string | null; /** * Line items. * @readonly */ lineItems?: LineItem$6[]; /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string | null; /** Buyer information. */ buyerInfo?: BuyerInfo$7; /** * Currency used for pricing. * @readonly */ currency?: string; /** * Currency code used for all the converted prices that are returned. * For a site that supports multiple currencies, this is the currency the buyer selected. * @readonly */ conversionCurrency?: string; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. * @readonly */ buyerLanguage?: string | null; /** * Site language in which original values are displayed. * @readonly */ siteLanguage?: string | null; /** * Whether tax is included in line item prices. * @readonly */ taxIncludedInPrices?: boolean | null; /** * Weight measurement unit - defaults to site's weight unit. * @readonly */ weightUnit?: WeightUnit$8; /** * Combined price of all line items before discounts. Subtotal includes tax if `cart.tax_included_in_prices` is set to `true`. * @internal * @readonly */ subtotal?: MultiCurrencyPrice$4; /** * Combined price of all line items after discounts. * @internal * @readonly */ subtotalAfterDiscounts?: MultiCurrencyPrice$4; /** * ID of the checkout that originated from this cart. * @readonly */ checkoutId?: string | null; /** * Cart discounts. * @readonly */ appliedDiscounts?: CartDiscount$1[]; /** * Date and time the cart was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the cart was updated. * @readonly */ _updatedDate?: Date | null; /** Contact info. */ contactInfo?: AddressWithContact$5; /** * __Deprecated.__ Use `purchaseFlowId` instead. * @internal * @deprecated */ ecomId?: string | null; /** * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page. * * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`. */ overrideCheckoutUrl?: string | null; /** * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. * @readonly */ purchaseFlowId?: string | null; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$2; /** * Fields extended by data extensions * @internal */ extendedFields?: ExtendedFields$a; }; /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string | null; /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */ merchantDiscounts?: MerchantDiscountInput$3[]; /** Catalog line items. */ lineItems?: LineItem$6[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$4[]; /** * List of field names to determine which of cartInfo's fields will be updated * @internal */ cartFieldmask?: string[]; } /** * Retrieves a cart. * * * The `getCart()` function returns a Promise that resolves when the specified cart is retrieved. * @param _id - ID of the cart to retrieve. * @public * @requiredField _id * @permissionId ECOM.READ_CARTS * @returns Fulfilled - The specified cart. */ function getCart(_id: string): Promise; /** * Retrieves the cart associated with a specified checkout. * @param _id - Checkout ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.READ_CARTS */ function getCartByCheckoutId(_id: string): Promise; /** * Deprecated. Use CurrentCartService.GetCurrentCart instead. * @internal * @documentationMaturity preview * @permissionId ECOM.READ_CARTS * @deprecated * @replacedBy com.wix.ecom.cart.api.v1.CurrentCartService.GetCurrentCart * @targetRemovalDate 2024-10-31 */ function internalGetCurrentCart(): Promise; /** * Adds catalog line items to a cart. * * * The `addToCart()` function returns a Promise that resolves to the updated cart when the specified items have been added. * * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required. * @param _id - Cart ID. * @public * @requiredField _id * @requiredField options.customLineItems.descriptionLines * @requiredField options.customLineItems.descriptionLines.name * @requiredField options.customLineItems.itemType * @requiredField options.customLineItems.price * @requiredField options.customLineItems.productName * @requiredField options.customLineItems.quantity * @requiredField options.lineItems.catalogReference * @requiredField options.lineItems.selectedMembership._id * @requiredField options.lineItems.selectedMembership.appId * @param options - Items to be added to cart. * @permissionId ECOM.MODIFY_CARTS * @permissionId ECOM.ADMIN_MODIFY_CARTS * @returns Fulfilled - Cart. */ function addToCart(_id: string, options?: AddToCartOptions): Promise; interface AddToCartOptions { /** Catalog line items. */ lineItems?: LineItem$6[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$4[]; } /** * Removes line items from the specified cart. * * * The `removeLineItems()` function returns a Promise that resolves to the updated cart when the line items are removed from the specified cart. * @public * @requiredField _id * @requiredField lineItemIds * @param lineItemIds - IDs of the line items to remove from the cart. * @param _id - ID of the cart to remove line items from. * @permissionId ECOM.MODIFY_CARTS * @returns Fulfilled - Updated cart. */ function removeLineItems$1(_id: string, lineItemIds: string[]): Promise; /** * Creates a checkout from a cart. * * * The `createCheckout()` function returns a Promise that resolves to the new checkout's ID when it's created. * * If a checkout was already created from the specified cart, that checkout will be * updated with any new information from the cart. * * > **Note:** `options.channelType` is a required field. * @param _id - Cart ID. * @public * @requiredField _id * @param options - Checkout creation options. * @permissionId ECOM.CREATE_CHECKOUT_FROM_CART * @returns Fulfilled - ID of the newly created checkout. */ function createCheckout$1(_id: string, options?: CreateCheckoutOptions$1): Promise; interface CreateCheckoutOptions$1 { /** **Required**. Sales channel type. */ channelType?: ChannelType$6; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$a; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$a; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$2; /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string | null; } /** * Removes the coupon from a specified cart. * * * The `removeCoupon()` function returns a Promise that resolves to the updated cart when the coupon is removed from the specified cart. * @param _id - Cart ID. * @public * @requiredField _id * @permissionId ECOM.MODIFY_CARTS * @returns Fulfilled - Updated cart. */ function removeCoupon$1(_id: string): Promise; /** * Updates the quantity of one or more line items in a specified cart. * * * The `updateLineItemsQuantity()` function returns a Promise that resolves when the quantities of the specified cart's line items are updated. * * This endpoint is only for updating the quantity of line items. To entirely remove a line item from the cart, use [`removeLineItems()`](#removelineitems). To add a new line item to the cart, use [`addToCart()`](#addtocart). * * This endpoint checks the amount of stock remaining for this line item. If the specified `quantity` is greater than the remaining stock, then the `quantity` returned in the response is the total amount of remaining stock. * @param _id - Cart ID. * @param lineItems - Line item IDs and their new quantity. * @public * @requiredField _id * @requiredField lineItems * @permissionId ECOM.MODIFY_CARTS * @returns Fulfilled - Updated cart. */ function updateLineItemsQuantity$1(_id: string, lineItems: LineItemQuantityUpdate$2[]): Promise; /** * Estimates the subtotal and total for current site visitor’s cart. Totals include tax and are based on the selected carrier service, shipping address, and billing information. * * * The `estimateTotals()` function returns a Promise that resolves when the estimated totals are generated. * * > **Note:** Not passing any `options` properties will only estimate the cart items price totals. * @param _id - Cart ID. * @public * @requiredField _id * @param options - Total estimation options. * @permissionId ECOM.READ_CARTS * @returns Fulfilled - Cart's estimated totals. */ function estimateTotals(_id: string, options?: EstimateTotalsOptions): Promise; interface EstimateTotalsOptions { /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$2; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$a; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$a; /** The selected membership payment options and which line items they apply to. */ selectedMemberships?: SelectedMemberships$4; /** * Whether to calculate tax in the calculation request. * * Default: `true` */ calculateTax?: boolean | null; /** * Whether to calculate shipping in the calculation request. * * Default: `true` */ calculateShipping?: boolean | null; } /** * Deletes a cart. * * * The `deleteCart()` function returns a Promise that resolves when the specified cart is deleted. * @public * @requiredField _id * @param _id - ID of the cart to delete. * @permissionId ECOM.MODIFY_CARTS * @returns Fulfilled - When the cart is deleted. Rejected - Error message. */ function deleteCart(_id: string): Promise; const ecomV1CartCart_universal_d_createCart: typeof createCart; type ecomV1CartCart_universal_d_CreateCartOptions = CreateCartOptions; const ecomV1CartCart_universal_d_updateCart: typeof updateCart; type ecomV1CartCart_universal_d_UpdateCartOptions = UpdateCartOptions; const ecomV1CartCart_universal_d_getCart: typeof getCart; const ecomV1CartCart_universal_d_getCartByCheckoutId: typeof getCartByCheckoutId; const ecomV1CartCart_universal_d_internalGetCurrentCart: typeof internalGetCurrentCart; const ecomV1CartCart_universal_d_addToCart: typeof addToCart; type ecomV1CartCart_universal_d_AddToCartOptions = AddToCartOptions; const ecomV1CartCart_universal_d_estimateTotals: typeof estimateTotals; type ecomV1CartCart_universal_d_EstimateTotalsOptions = EstimateTotalsOptions; const ecomV1CartCart_universal_d_deleteCart: typeof deleteCart; namespace ecomV1CartCart_universal_d { export { Cart$1 as Cart, LineItem$6 as LineItem, CatalogReference$8 as CatalogReference, ProductName$5 as ProductName, MultiCurrencyPrice$4 as MultiCurrencyPrice, DescriptionLine$5 as DescriptionLine, DescriptionLineValueOneOf$5 as DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf$5 as DescriptionLineDescriptionLineValueOneOf, DescriptionLineName$5 as DescriptionLineName, PlainTextValue$5 as PlainTextValue, Color$5 as Color, DescriptionLineType$5 as DescriptionLineType, FocalPoint$6 as FocalPoint, ItemAvailabilityInfo$3 as ItemAvailabilityInfo, ItemAvailabilityStatus$3 as ItemAvailabilityStatus, PhysicalProperties$7 as PhysicalProperties, Scope$4 as Scope, Group$4 as Group, ItemType$6 as ItemType, ItemTypeItemTypeDataOneOf$6 as ItemTypeItemTypeDataOneOf, ItemTypeItemType$6 as ItemTypeItemType, SubscriptionOptionInfo$4 as SubscriptionOptionInfo, SubscriptionSettings$7 as SubscriptionSettings, SubscriptionFrequency$7 as SubscriptionFrequency, FreeTrialPeriod$3 as FreeTrialPeriod, Title$3 as Title, Description$3 as Description, SecuredMedia$4 as SecuredMedia, FileType$4 as FileType, V1PaymentOptionType$2 as V1PaymentOptionType, ServiceProperties$5 as ServiceProperties, PriceDescription$5 as PriceDescription, SelectedMembership$4 as SelectedMembership, CatalogOverrideFields$3 as CatalogOverrideFields, PaymentOption$3 as PaymentOption, TaxableAddress$6 as TaxableAddress, TaxableAddressTaxableAddressDataOneOf$6 as TaxableAddressTaxableAddressDataOneOf, TaxableAddressType$6 as TaxableAddressType, ExtendedFields$a as ExtendedFields, Policy$3 as Policy, BuyerInfo$7 as BuyerInfo, BuyerInfoIdOneOf$5 as BuyerInfoIdOneOf, WeightUnit$8 as WeightUnit, CartDiscount$1 as CartDiscount, CartDiscountDiscountSourceOneOf$1 as CartDiscountDiscountSourceOneOf, Coupon$6 as Coupon, MerchantDiscount$6 as MerchantDiscount, V1DiscountRule$1 as V1DiscountRule, V1DiscountRuleName$1 as V1DiscountRuleName, AddressWithContact$5 as AddressWithContact, Address$a as Address, StreetAddress$9 as StreetAddress, AddressLocation$9 as AddressLocation, FullAddressContactDetails$6 as FullAddressContactDetails, VatId$7 as VatId, VatType$7 as VatType, SelectedShippingOption$2 as SelectedShippingOption, GetCurrentCartRequest$1 as GetCurrentCartRequest, GetCurrentCartResponse$1 as GetCurrentCartResponse, UpdateCartRequest$1 as UpdateCartRequest, MerchantDiscountInput$3 as MerchantDiscountInput, CustomLineItem$4 as CustomLineItem, UpdateCartResponse$1 as UpdateCartResponse, AddToCurrentCartRequest$1 as AddToCurrentCartRequest, AddToCartResponse$1 as AddToCartResponse, AddToCurrentCartAndEstimateTotalsRequest$1 as AddToCurrentCartAndEstimateTotalsRequest, SelectedMemberships$4 as SelectedMemberships, HostSelectedMembership$1 as HostSelectedMembership, EstimateTotalsResponse$1 as EstimateTotalsResponse, CalculatedLineItem$2 as CalculatedLineItem, LineItemPricesData$2 as LineItemPricesData, ItemTaxFullDetails$6 as ItemTaxFullDetails, TaxRateBreakdown$4 as TaxRateBreakdown, TaxBreakdown$4 as TaxBreakdown, JurisdictionType$6 as JurisdictionType, PriceSummary$6 as PriceSummary, GiftCard$6 as GiftCard, TaxSummary$6 as TaxSummary, TaxCalculationDetails$4 as TaxCalculationDetails, TaxCalculationDetailsCalculationDetailsOneOf$4 as TaxCalculationDetailsCalculationDetailsOneOf, RateType$4 as RateType, ManualCalculationReason$4 as ManualCalculationReason, AutoTaxFallbackCalculationDetails$4 as AutoTaxFallbackCalculationDetails, FallbackReason$4 as FallbackReason, ApplicationError$b as ApplicationError, AggregatedTaxBreakdown$4 as AggregatedTaxBreakdown, ShippingInformation$4 as ShippingInformation, ShippingRegion$6 as ShippingRegion, SelectedCarrierServiceOption$4 as SelectedCarrierServiceOption, DeliveryLogistics$7 as DeliveryLogistics, PickupDetails$8 as PickupDetails, PickupMethod$7 as PickupMethod, DeliveryTimeSlot$7 as DeliveryTimeSlot, SelectedCarrierServiceOptionPrices$4 as SelectedCarrierServiceOptionPrices, SelectedCarrierServiceOptionOtherCharge$4 as SelectedCarrierServiceOptionOtherCharge, ChargeType$6 as ChargeType, DeliveryAllocation$5 as DeliveryAllocation, Carrier$5 as Carrier, Region$5 as Region, ApplicableLineItems$5 as ApplicableLineItems, CarrierServiceOption$4 as CarrierServiceOption, ShippingOption$6 as ShippingOption, ShippingPrice$6 as ShippingPrice, OtherCharge$4 as OtherCharge, AppliedDiscount$6 as AppliedDiscount, AppliedDiscountDiscountSourceOneOf$6 as AppliedDiscountDiscountSourceOneOf, DiscountType$6 as DiscountType, V1Coupon$1 as V1Coupon, V1MerchantDiscount$1 as V1MerchantDiscount, DiscountRule$6 as DiscountRule, DiscountRuleName$6 as DiscountRuleName, LineItemDiscount$6 as LineItemDiscount, CalculationErrors$5 as CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf$5 as CalculationErrorsShippingCalculationErrorOneOf, Details$6 as Details, DetailsKindOneOf$6 as DetailsKindOneOf, ValidationError$6 as ValidationError, RuleType$6 as RuleType, FieldViolation$6 as FieldViolation, SystemError$6 as SystemError, CarrierErrors$5 as CarrierErrors, CarrierError$6 as CarrierError, MembershipOptions$4 as MembershipOptions, Membership$4 as Membership, MembershipName$6 as MembershipName, MembershipPaymentCredits$4 as MembershipPaymentCredits, InvalidMembership$4 as InvalidMembership, AdditionalFee$6 as AdditionalFee, Violation$3 as Violation, Severity$3 as Severity, Target$3 as Target, TargetTargetTypeOneOf$3 as TargetTargetTypeOneOf, NameInOther$3 as NameInOther, NameInLineItem$3 as NameInLineItem, SuggestedFix$3 as SuggestedFix, Other$3 as Other, TargetLineItem$3 as TargetLineItem, RemoveLineItemsFromCurrentCartRequest$1 as RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsResponse$2 as RemoveLineItemsResponse, CreateCheckoutFromCurrentCartRequest$1 as CreateCheckoutFromCurrentCartRequest, ChannelType$6 as ChannelType, CreateCheckoutResponse$2 as CreateCheckoutResponse, RemoveCouponFromCurrentCartRequest$1 as RemoveCouponFromCurrentCartRequest, RemoveCouponResponse$2 as RemoveCouponResponse, UpdateCurrentCartLineItemQuantityRequest$1 as UpdateCurrentCartLineItemQuantityRequest, LineItemQuantityUpdate$2 as LineItemQuantityUpdate, UpdateLineItemsQuantityResponse$2 as UpdateLineItemsQuantityResponse, EstimateCurrentCartTotalsRequest$1 as EstimateCurrentCartTotalsRequest, DeleteCurrentCartRequest$1 as DeleteCurrentCartRequest, DeleteCartResponse$1 as DeleteCartResponse, DomainEvent$i as DomainEvent, DomainEventBodyOneOf$i as DomainEventBodyOneOf, EntityCreatedEvent$i as EntityCreatedEvent, RestoreInfo$i as RestoreInfo, EntityUpdatedEvent$i as EntityUpdatedEvent, EntityDeletedEvent$i as EntityDeletedEvent, ActionEvent$i as ActionEvent, MessageEnvelope$h as MessageEnvelope, IdentificationData$i as IdentificationData, IdentificationDataIdOneOf$i as IdentificationDataIdOneOf, WebhookIdentityType$h as WebhookIdentityType, CreateCartRequest$1 as CreateCartRequest, CreateCartResponse$1 as CreateCartResponse, GetCartRequest$1 as GetCartRequest, GetCartResponse$1 as GetCartResponse, GetCartByCheckoutIdRequest$1 as GetCartByCheckoutIdRequest, GetCartByCheckoutIdResponse$1 as GetCartByCheckoutIdResponse, AddToCartRequest$1 as AddToCartRequest, RemoveLineItemsRequest$2 as RemoveLineItemsRequest, CreateCheckoutRequest$2 as CreateCheckoutRequest, RemoveCouponRequest$2 as RemoveCouponRequest, UpdateLineItemsQuantityRequest$2 as UpdateLineItemsQuantityRequest, EstimateTotalsRequest$1 as EstimateTotalsRequest, DeleteCartRequest$1 as DeleteCartRequest, Empty$b as Empty, ecomV1CartCart_universal_d_createCart as createCart, ecomV1CartCart_universal_d_CreateCartOptions as CreateCartOptions, ecomV1CartCart_universal_d_updateCart as updateCart, ecomV1CartCart_universal_d_UpdateCartOptions as UpdateCartOptions, ecomV1CartCart_universal_d_getCart as getCart, ecomV1CartCart_universal_d_getCartByCheckoutId as getCartByCheckoutId, ecomV1CartCart_universal_d_internalGetCurrentCart as internalGetCurrentCart, ecomV1CartCart_universal_d_addToCart as addToCart, ecomV1CartCart_universal_d_AddToCartOptions as AddToCartOptions, removeLineItems$1 as removeLineItems, createCheckout$1 as createCheckout, CreateCheckoutOptions$1 as CreateCheckoutOptions, removeCoupon$1 as removeCoupon, updateLineItemsQuantity$1 as updateLineItemsQuantity, ecomV1CartCart_universal_d_estimateTotals as estimateTotals, ecomV1CartCart_universal_d_EstimateTotalsOptions as EstimateTotalsOptions, ecomV1CartCart_universal_d_deleteCart as deleteCart, }; } interface Cart { /** Cart ID. */ _id?: string | null; /** * Line items. * @readonly */ lineItems?: LineItem$5[]; /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string | null; /** Buyer information. */ buyerInfo?: BuyerInfo$6; /** * Currency used for pricing. * @readonly */ currency?: string; /** * Currency code used for all the converted prices that are returned. * For a site that supports multiple currencies, this is the currency the buyer selected. * @readonly */ conversionCurrency?: string; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. * @readonly */ buyerLanguage?: string | null; /** * Site language in which original values are displayed. * @readonly */ siteLanguage?: string | null; /** * Whether tax is included in line item prices. * @readonly */ taxIncludedInPrices?: boolean | null; /** * Weight measurement unit - defaults to site's weight unit. * @readonly */ weightUnit?: WeightUnit$7; /** * Combined price of all line items before discounts. Subtotal includes tax if `cart.tax_included_in_prices` is set to `true`. * @internal * @readonly */ subtotal?: MultiCurrencyPrice$3; /** * Combined price of all line items after discounts. * @internal * @readonly */ subtotalAfterDiscounts?: MultiCurrencyPrice$3; /** * ID of the checkout that originated from this cart. * @readonly */ checkoutId?: string | null; /** * Cart discounts. * @readonly */ appliedDiscounts?: CartDiscount[]; /** * Date and time the cart was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the cart was updated. * @readonly */ _updatedDate?: Date | null; /** Contact info. */ contactInfo?: AddressWithContact$4; /** * __Deprecated.__ Use `purchaseFlowId` instead. * @internal * @deprecated */ ecomId?: string | null; /** * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page. * * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`. */ overrideCheckoutUrl?: string | null; /** * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. * @readonly */ purchaseFlowId?: string | null; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$1; /** * Fields extended by data extensions * @internal */ extendedFields?: ExtendedFields$9; } interface LineItem$5 { /** * Line item ID. * @readonly */ _id?: string | null; /** Item quantity. */ quantity?: number; /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$7; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` * @readonly */ productName?: ProductName$4; /** * URL to the item's page on the site. * @readonly */ url?: string; /** * Item price **after** catalog-defined discount and line item discounts. * @readonly */ price?: MultiCurrencyPrice$3; /** * Item price **before** catalog-defined discount. Defaults to `price` when not provided. * @readonly */ fullPrice?: MultiCurrencyPrice$3; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: MultiCurrencyPrice$3; /** * Total price **after** catalog-defined discount and line item discounts. * @internal * @readonly */ lineItemPrice?: MultiCurrencyPrice$3; /** * Line item description lines. Used for displaying the cart, checkout and order. * @readonly */ descriptionLines?: DescriptionLine$4[]; /** * Line item image details. * @readonly */ image?: string; /** * Item availability details. * @readonly */ availability?: ItemAvailabilityInfo$2; /** * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. * @readonly */ physicalProperties?: PhysicalProperties$6; /** * Coupon scopes - which app and items a coupon applies to. * This field is internal to Wix, and should be used by Bookings, Stores and Events as used by the current [Coupons API](https://bo.wix.com/wix-docs/rest/stores/coupons/valid-scope-values). * @internal * @readonly */ couponScopes?: Scope$3[]; /** * Item type. Either a preset type or custom. * @readonly */ itemType?: ItemType$5; /** * Subscription option information. * @internal * @readonly */ subscriptionOptionInfo?: SubscriptionOptionInfo$3; /** * Digital file identifier, relevant only for items with type DIGITAL. * @internal * @readonly */ digitalFile?: SecuredMedia$3; /** * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`. * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item happens as part of the checkout. * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `"MEMBERSHIP"` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` will be 0. * @readonly */ paymentOption?: V1PaymentOptionType$1; /** * Service properties. When relevant, this contains information such as date and number of participants. * @readonly */ serviceProperties?: ServiceProperties$4; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + in most cases, this field is the same as `catalogReference.catalogItemId`. * + Used in membership validation. * @readonly */ rootCatalogItemId?: string | null; /** * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". * @readonly */ priceDescription?: PriceDescription$4; /** * Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only. * @readonly */ depositAmount?: MultiCurrencyPrice$3; /** Selected membership to be used as payment for this item. Must be used with `lineItem.paymentOption` set to `MEMBERSHIP` or `MEMBERSHIP_OFFLINE`. This field can be empty when `lineItem.paymentOption` is set to `MEMBERSHIP_OFFLINE`. */ selectedMembership?: SelectedMembership$3; /** * The Item's Delivery Profile Id * @internal * @readonly */ deliveryProfileId?: string | null; /** * Tax group ID for this line item. * @readonly */ taxGroupId?: string | null; /** * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin. * @readonly */ customLineItem?: boolean; /** * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page. * @readonly */ consentRequiredPaymentPolicy?: string | null; /** * Shipping group ID. * @internal * @readonly */ shippingGroupId?: string | null; /** * Whether the price is not yet defined, and will be updated after the order is created. * @internal * @readonly */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * @internal * @readonly */ fixedQuantity?: boolean; /** * Overriding values for catalog item properties. * * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ catalogOverrideFields?: CatalogOverrideFields$2; /** * Whether to save the payment method on the order. * * Default: `false` * @readonly */ savePaymentMethod?: boolean; /** * Address to be used for tax calculation. * @internal */ taxableAddress?: TaxableAddress$5; /** * Custom extended fields for the line item object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. * @internal */ extendedFields?: ExtendedFields$9; /** * Policies to be displayed to the customer on the checkout page. * @internal * @readonly */ policies?: Policy$2[]; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$7 { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. * * Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from your Wix Stores catalog, learn more about [eCommerce integration](https://www.wix.com/velo/reference/wix-stores-backend/ecommerce-integration). */ options?: Record | null; } interface ProductName$4 { /** **Required** - Original product name (in site's default language). */ original?: string; /** Description product name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } interface MultiCurrencyPrice$3 { /** Amount. */ amount?: string; /** * Converted amount. * @readonly */ convertedAmount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. * @readonly */ formattedConvertedAmount?: string; } interface DescriptionLine$4 extends DescriptionLineValueOneOf$4, DescriptionLineDescriptionLineValueOneOf$4 { /** Description line plain text value. */ plainText?: PlainTextValue$4; /** Description line color value. */ colorInfo?: Color$4; /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$4; /** * Description line color. * @internal * @deprecated */ color?: string; /** Description line name. */ name?: DescriptionLineName$4; /** * Description line type. * @internal * @deprecated */ lineType?: DescriptionLineType$4; } /** @oneof */ interface DescriptionLineValueOneOf$4 { /** Description line plain text value. */ plainText?: PlainTextValue$4; /** Description line color value. */ colorInfo?: Color$4; } /** @oneof */ interface DescriptionLineDescriptionLineValueOneOf$4 { /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$4; /** * Description line color. * @internal * @deprecated */ color?: string; } interface DescriptionLineName$4 { /** Description line name in site's default language. */ original?: string; /** Description line name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } interface PlainTextValue$4 { /** Description line plain text value in site's default language. */ original?: string; /** Description line plain text value translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } interface Color$4 { /** Description line color name in site's default language. */ original?: string; /** Description line color name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; /** * HEX or RGB color code for display. * */ code?: string | null; } enum DescriptionLineType$4 { /** Unrecognized type. */ UNRECOGNISED = "UNRECOGNISED", /** Plain text type. */ PLAIN_TEXT = "PLAIN_TEXT", /** Color type. */ COLOR = "COLOR" } interface FocalPoint$5 { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } interface ItemAvailabilityInfo$2 { /** * Item availability status. * * NOT_FOUND - Item does not exist. * NOT_AVAILABLE - Not in stock. * PARTIALLY_AVAILABLE - Available quantity is less than requested. */ status?: ItemAvailabilityStatus$2; /** Quantity available. */ quantityAvailable?: number | null; } enum ItemAvailabilityStatus$2 { AVAILABLE = "AVAILABLE", /** Item does not exist */ NOT_FOUND = "NOT_FOUND", /** Item not in stock */ NOT_AVAILABLE = "NOT_AVAILABLE", /** Available quantity is less than requested */ PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE" } interface PhysicalProperties$6 { /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */ weight?: number | null; /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string | null; /** Whether this line item is shippable. */ shippable?: boolean; } interface Scope$3 { /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */ namespace?: string; /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */ group?: Group$3; } interface Group$3 { /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ name?: string; /** Item ID (when the coupon scope is limited to just one item). */ entityId?: string | null; } interface ItemType$5 extends ItemTypeItemTypeDataOneOf$5 { /** Preset item type. */ preset?: ItemTypeItemType$5; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } /** @oneof */ interface ItemTypeItemTypeDataOneOf$5 { /** Preset item type. */ preset?: ItemTypeItemType$5; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } enum ItemTypeItemType$5 { UNRECOGNISED = "UNRECOGNISED", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL", GIFT_CARD = "GIFT_CARD", SERVICE = "SERVICE" } interface SubscriptionOptionInfo$3 { /** Subscription option settings. */ subscriptionSettings?: SubscriptionSettings$6; /** Subscription option title. */ title?: Title$2; /** Subscription option description. */ description?: Description$2; } interface SubscriptionSettings$6 { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequency$6; /** * Interval of recurring payment. * * Default: `1`. * If SubscriptionFrequency is Day the minimum interval is 7 */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. */ billingCycles?: number | null; /** * Whether to allow the customer to cancel the subscription.. * @internal */ enableCustomerCancellation?: boolean; /** * Period until first cycle starts. If applied payNow will be 0 * If None => no free trial * @internal */ freeTrialPeriod?: FreeTrialPeriod$2; /** * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays. * @internal */ startDate?: Date | null; /** * Whether to generate an order each billing cycle. An order will always be generated for the first billing cycle. * Default None => will behave like true * @internal */ generateOrderEachBillingCycle?: boolean | null; } /** Frequency unit of recurring payment */ enum SubscriptionFrequency$6 { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } interface FreeTrialPeriod$2 { /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */ frequency?: SubscriptionFrequency$6; /** interval of period */ interval?: number; } interface Title$2 { /** Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Subscription option name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface Description$2 { /** Subscription option description. */ original?: string; /** Translated subscription option description. */ translated?: string | null; } interface SecuredMedia$3 { /** Media ID in Wix Media Manager. */ _id?: string; /** Original filename. */ fileName?: string; /** File type. */ fileType?: FileType$3; } enum FileType$3 { UNSPECIFIED = "UNSPECIFIED", SECURE_PICTURE = "SECURE_PICTURE", SECURE_VIDEO = "SECURE_VIDEO", SECURE_DOCUMENT = "SECURE_DOCUMENT", SECURE_MUSIC = "SECURE_MUSIC", SECURE_ARCHIVE = "SECURE_ARCHIVE" } /** Type of selected payment option for catalog item */ enum V1PaymentOptionType$1 { /** The entire payment for this item happens as part of the checkout. */ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE", /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE", /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */ MEMBERSHIP = "MEMBERSHIP", /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */ DEPOSIT_ONLINE = "DEPOSIT_ONLINE", /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE" } interface ServiceProperties$4 { /** The date and time for which the service is supposed to be provided. For example, the time of the class. */ scheduledDate?: Date | null; /** The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room. */ numberOfParticipants?: number | null; } interface PriceDescription$4 { /** * **Required** - Original price description (in site's default language). * */ original?: string; /** Product name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } /** Selected Membership */ interface SelectedMembership$3 { /** Membership ID. */ _id?: string; /** ID of the app providing this payment option. */ appId?: string; } interface CatalogOverrideFields$2 { /** Item name. */ productName?: ProductName$4; /** Item price **after** discounts. */ price?: string | null; /** Item price **before** discounts. */ fullPrice?: string | null; /** Item description lines. Used when displaying the line item to customers. */ descriptionLines?: DescriptionLine$4[]; /** Physical properties of the item. */ physicalProperties?: PhysicalProperties$6; /** Item image. */ image?: string; /** Payment method selected for the item. */ paymentOption?: PaymentOption$2; /** Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`. */ depositAmount?: string | null; /** * Whether to save the payment method on the order. * * Default: `false` */ savePaymentMethod?: boolean | null; } interface PaymentOption$2 { /** * + `FULL_PAYMENT_ONLINE`: The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP`: Payment for this item is done by charging a membership. When selected, `price` is `0`. * + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`. * + `MEMBERSHIP_OFFLINE`: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ value?: V1PaymentOptionType$1; } interface TaxableAddress$5 extends TaxableAddressTaxableAddressDataOneOf$5 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$5; } /** @oneof */ interface TaxableAddressTaxableAddressDataOneOf$5 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$5; } enum TaxableAddressType$5 { UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS", BUSINESS = "BUSINESS", BILLING = "BILLING", SHIPPING = "SHIPPING" } interface ExtendedFields$9 { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface Policy$2 { /** Policy title - should be translated */ title?: string | null; /** Policy content - should be translated */ content?: string; } /** Buyer Info */ interface BuyerInfo$6 extends BuyerInfoIdOneOf$4 { /** * Visitor ID - if the buyer is **not** a site member. * @readonly */ visitorId?: string; /** * Member ID - if the buyer is a site member. * @readonly */ memberId?: string; /** * User ID - if the cart owner is a Wix user. * @readonly */ userId?: string; /** Contact ID. For more information, see the Contacts API. */ contactId?: string | null; /** Buyer email address. */ email?: string | null; } /** @oneof */ interface BuyerInfoIdOneOf$4 { /** * Visitor ID - if the buyer is **not** a site member. * @readonly */ visitorId?: string; /** * Member ID - if the buyer is a site member. * @readonly */ memberId?: string; /** * User ID - if the cart owner is a Wix user. * @readonly */ userId?: string; } enum WeightUnit$7 { /** Weight unit can't be classified, due to an error */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms */ KG = "KG", /** Pounds */ LB = "LB" } interface CartDiscount extends CartDiscountDiscountSourceOneOf { /** Coupon details. */ coupon?: Coupon$5; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$5; /** * Discount rule * @internal */ discountRule?: V1DiscountRule; /** @internal */ lineItemIds?: string[]; } /** @oneof */ interface CartDiscountDiscountSourceOneOf { /** Coupon details. */ coupon?: Coupon$5; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$5; /** * Discount rule * @internal */ discountRule?: V1DiscountRule; } interface Coupon$5 { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** * Coupon value. * @internal */ amount?: MultiCurrencyPrice$3; } interface MerchantDiscount$5 { /** Discount value. */ amount?: MultiCurrencyPrice$3; } interface V1DiscountRule { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: V1DiscountRuleName; /** Discount value. */ amount?: MultiCurrencyPrice$3; } interface V1DiscountRuleName { /** Original discount rule name (in site's default language). */ original?: string; /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string | null; } /** Billing Info and shipping details */ interface AddressWithContact$4 { /** Address. */ address?: Address$9; /** Contact details. */ contactDetails?: FullAddressContactDetails$5; } /** Physical address */ interface Address$9 { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress$8; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** @internal */ location?: AddressLocation$8; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } interface StreetAddress$8 { /** Street number. */ number?: string; /** Street name. */ name?: string; /** * Apartment number. * @internal */ apt?: string; /** * Optional address line 1 * @internal */ formattedAddressLine?: string | null; } interface AddressLocation$8 { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } /** Full contact details for an address */ interface FullAddressContactDetails$5 { /** First name. */ firstName?: string | null; /** Last name. */ lastName?: string | null; /** Phone number. */ phone?: string | null; /** Company name. */ company?: string | null; /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */ vatId?: VatId$6; } interface VatId$6 { /** Customer's tax ID. */ _id?: string; /** * Tax type. * * Supported values: * + `CPF`: for individual tax payers * + `CNPJ`: for corporations */ type?: VatType$6; } /** tax info types */ enum VatType$6 { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } interface SelectedShippingOption$1 { /** Carrier ID. */ carrierId?: string | null; /** Selected shipping option code. For example, "usps_std_overnight". */ code?: string; } interface GetCurrentCartRequest { } interface GetCurrentCartResponse { /** Current session's active cart. */ cart?: Cart; } interface UpdateCartRequest { /** Cart info. */ cartInfo?: Cart; /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string | null; /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */ merchantDiscounts?: MerchantDiscountInput$2[]; /** Catalog line items. */ lineItems?: LineItem$5[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$3[]; /** * List of field names to determine which of cartInfo's fields will be updated * @internal */ cartFieldmask?: string[]; } interface MerchantDiscountInput$2 { /** Discount amount. */ amount?: string; /** IDs of the line items the discount applies to. */ lineItemIds?: string[]; } interface CustomLineItem$3 { /** * Custom line item quantity. * * Min: `1` * Max: `100000` */ quantity?: number; /** * Custom line item price. * * Must be a number or a decimal without symbols. */ price?: string; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription$4; /** Custom line item description lines. Used for displaying the cart, checkout and order. */ descriptionLines?: DescriptionLine$4[]; /** * Custom line item media. Supported formats: * + Link to an image/video from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager) - `"wix:image://v1/3c76e2_c53...4ea4~mv2.jpg#originWidth=1000&originHeight=1000"`. * + An image from the web - `"http(s)://"`. */ media?: string; /** * Custom line item ID. If passed, `id` must be unique. * * Default: auto-generated ID */ _id?: string | null; /** Tax group ID for this custom line item. */ taxGroupId?: string | null; /** Name of the item or product. */ productName?: ProductName$4; /** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */ url?: string; /** Item type. Either a preset type or custom. */ itemType?: ItemType$5; /** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: string | null; /** * Item quantity available for purchase. Only return this if inventory is managed. * Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart. */ quantityAvailable?: number | null; /** Physical properties of the item. */ physicalProperties?: PhysicalProperties$6; /** * Subscription option info. This field is internal and only used by Stores. * @internal */ subscriptionOptionInfo?: SubscriptionOptionInfo$3; /** * Digital file ID and name. Required if `itemType: DIGITAL`. * @internal */ digitalFile?: SecuredMedia$3; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * * + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field. */ paymentOption?: V1PaymentOptionType$1; /** * Service properties. When relevant, this contains information such as date and number of participants. * Used, among other things, when checking for valid memberships. */ serviceProperties?: ServiceProperties$4; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field is the same as `catalogReference.catalogItemId`. * + Used in membership validation. */ rootCatalogItemId?: string | null; /** * Partial payment for the given item to be paid upfront during the checkout. * * Eligible for catalog items with type `DEPOSIT_ONLINE`. * When omitted, the item's price will not be split and is expected to be paid in a single installment. */ depositAmount?: string | null; /** * Delivery Profile ID. * @internal */ deliveryProfileId?: string | null; /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$7; /** * Whether the price is not yet defined, and will be updated after the order is created. * * Default: `false` * @internal */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * * Default: `false` * @internal */ fixedQuantity?: boolean; /** * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page. * @readonly */ consentRequiredPaymentPolicy?: string | null; /** * Whether to save the payment method on the order. * * Default: `false` * @readonly */ savePaymentMethod?: boolean; /** * Policies to be displayed to the customer on the checkout page. * @internal */ policies?: Policy$2[]; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; } interface UpdateCartResponse { /** Updated Cart. */ cart?: Cart; } interface AddToCurrentCartRequest { /** Catalog line items. */ lineItems?: LineItem$5[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$3[]; } interface AddToCartResponse { /** Updated cart. */ cart?: Cart; } interface AddToCurrentCartAndEstimateTotalsRequest { /** Catalog line items. */ lineItems?: LineItem$5[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$3[]; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$1; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$9; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$9; /** The selected membership payment options and which line items they apply to. */ selectedMemberships?: SelectedMemberships$3; /** * Whether to calculate tax in the calculation request. * * Default: `true` */ calculateTax?: boolean | null; /** * Whether to calculate shipping in the calculation request. * * Default: `true` */ calculateShipping?: boolean | null; } interface SelectedMemberships$3 { /** Selected memberships. */ memberships?: HostSelectedMembership[]; } interface HostSelectedMembership { /** Membership ID. */ _id?: string; /** ID of the app providing this payment option. */ appId?: string; /** IDs of the line items this membership applies to. */ lineItemIds?: string[]; } interface EstimateTotalsResponse { /** Cart. */ cart?: Cart; /** Calculated line items. */ calculatedLineItems?: CalculatedLineItem$1[]; /** Price summary. */ priceSummary?: PriceSummary$5; /** Applied gift card. */ giftCard?: GiftCard$5; /** Tax summary. */ taxSummary?: TaxSummary$5; /** Shipping information. */ shippingInfo?: ShippingInformation$3; /** Applied discounts. */ appliedDiscounts?: AppliedDiscount$5[]; /** Calculation errors. */ calculationErrors?: CalculationErrors$4; /** Weight measurement unit - defaults to site's weight unit. */ weightUnit?: WeightUnit$7; /** Currency used for pricing in this store. */ currency?: string; /** * Minimal amount to pay in order to place the order. * @readonly */ payNow?: PriceSummary$5; /** * Remaining amount for the order to be fully paid. * @readonly */ payLater?: PriceSummary$5; /** Information about valid and invalid memberships, and which ones are selected for usage. */ membershipOptions?: MembershipOptions$3; /** Additional fees */ additionalFees?: AdditionalFee$5[]; /** * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction). * @readonly */ violations?: Violation$2[]; } interface CalculatedLineItem$1 { /** Line item ID. */ lineItemId?: string; /** Price breakdown for this line item. */ pricesBreakdown?: LineItemPricesData$1; /** * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`. * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item happens as part of the checkout. * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `"MEMBERSHIP"` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` will be 0. */ paymentOption?: V1PaymentOptionType$1; /** * tax calculation address. * @internal */ taxableAddress?: TaxableAddress$5; } interface LineItemPricesData$1 { /** Total price after discounts and after tax. */ totalPriceAfterTax?: MultiCurrencyPrice$3; /** Total price after discounts, and before tax. */ totalPriceBeforeTax?: MultiCurrencyPrice$3; /** Tax details. */ taxDetails?: ItemTaxFullDetails$5; /** Total discount for all line items. */ totalDiscount?: MultiCurrencyPrice$3; /** Catalog price after catalog discount and automatic discounts. */ price?: MultiCurrencyPrice$3; /** Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: MultiCurrencyPrice$3; /** Total price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: MultiCurrencyPrice$3; /** Item price **before** line item discounts and **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: MultiCurrencyPrice$3; } interface ItemTaxFullDetails$5 { /** Amount for which tax is calculated. */ taxableAmount?: MultiCurrencyPrice$3; /** * Tax group ID, if specified. * @internal */ taxGroupId?: string | null; /** Tax rate %, as a decimal point between 0 and 1. */ taxRate?: string; /** Calculated tax, based on `taxable_amount` and `tax_rate`. */ totalTax?: MultiCurrencyPrice$3; /** * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead. * @readonly * @deprecated */ rateBreakdown?: TaxRateBreakdown$3[]; /** * The amount of this line item that was exempt. * @internal */ exemptAmount?: MultiCurrencyPrice$3; /** * True for items we have a tax applied on them * @internal */ isItemTaxable?: boolean | null; /** * True if the lineAmount include tax in it. * @internal */ isTaxIncluded?: boolean | null; /** * The calculator that calculated this line tax * @internal */ calculatorName?: string | null; /** * tax information for a line item. * @internal * @readonly */ taxBreakdown?: TaxBreakdown$3[]; } interface TaxRateBreakdown$3 { /** Name of tax against which the calculation was performed. */ name?: string; /** Rate at which this tax detail was calculated. */ rate?: string; /** Amount of tax for this tax detail. */ tax?: MultiCurrencyPrice$3; /** * The type of tax that was calculated * @internal */ taxType?: string | null; /** * The name of the jurisdiction in which this tax detail applies * @internal */ jurisdiction?: string | null; /** * The type of the jurisdiction in which this tax detail applies(Country,State,County,City,Special). * @internal */ jurisdictionType?: string | null; /** * The amount of this line item that was exempt from this authority. * @internal */ exemptAmount?: MultiCurrencyPrice$3; /** * ids of the used exemptions from the TaxEstimate exemptions array. * @internal */ exemptionIds?: number[]; /** * The taxable amount of this tax detail * @internal */ taxableAmount?: MultiCurrencyPrice$3; /** * The Taxes/Fee component. True if the fee is applied. * @internal */ isFee?: boolean | null; } /** * TaxBreakdown represents tax information for a line item. * It holds the tax amount and the tax rate for each tax authority that apply on the line item. */ interface TaxBreakdown$3 { /** The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". */ jurisdiction?: string | null; /** The amount of this line item price that was considered nontaxable. (Decimal value) */ nonTaxableAmount?: MultiCurrencyPrice$3; /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */ rate?: string | null; /** The amount of tax estimated for this line item. (Decimal value) */ taxAmount?: MultiCurrencyPrice$3; /** The taxable amount of this line item. */ taxableAmount?: MultiCurrencyPrice$3; /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */ taxType?: string | null; /** * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. * This name should be explicit enough to allow the merchant to understand what tax was calculated. */ taxName?: string | null; /** The type of the jurisdiction in which this tax detail applies. */ jurisdictionType?: JurisdictionType$5; } /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ enum JurisdictionType$5 { UNDEFINED = "UNDEFINED", COUNTRY = "COUNTRY", STATE = "STATE", COUNTY = "COUNTY", CITY = "CITY", SPECIAL = "SPECIAL" } interface PriceSummary$5 { /** Subtotal of all line items, before discounts and before tax. */ subtotal?: MultiCurrencyPrice$3; /** Total shipping price, before discounts and before tax. */ shipping?: MultiCurrencyPrice$3; /** Total tax. */ tax?: MultiCurrencyPrice$3; /** Total calculated discount value. */ discount?: MultiCurrencyPrice$3; /** Total price after discounts, gift cards, and tax. */ total?: MultiCurrencyPrice$3; /** Total additional fees price before tax. */ additionalFees?: MultiCurrencyPrice$3; } interface GiftCard$5 { /** * Gift Card ID. * @deprecated */ _id?: string; /** Gift card obfuscated code. */ obfuscatedCode?: string; /** Gift card value. */ amount?: MultiCurrencyPrice$3; /** App ID of the gift card provider. */ appId?: string; /** * External ID in the gift card provider's system. * Used for integration and tracking across different platforms. */ externalId?: string | null; } interface TaxSummary$5 { /** * Amount for which tax is calculated, added from line items. * @readonly */ taxableAmount?: MultiCurrencyPrice$3; /** * Calculated tax, added from line items. * @readonly */ totalTax?: MultiCurrencyPrice$3; /** * Manual tax rate * @internal * @readonly * @deprecated */ manualTaxRate?: string; /** * Tax calculator that was active when the order was created. * @deprecated */ calculationDetails?: TaxCalculationDetails$3; /** * Tax estimation id in tax service * @internal * @readonly */ taxEstimationId?: string | null; /** * Average Tax Rate * @internal * @readonly */ averageTaxRate?: string | null; /** * The amount of this estimate that was exempt (for all line items). * @internal * @readonly */ totalExempt?: MultiCurrencyPrice$3; /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * @internal * @readonly */ aggregatedTaxBreakdown?: AggregatedTaxBreakdown$3[]; } interface TaxCalculationDetails$3 extends TaxCalculationDetailsCalculationDetailsOneOf$3 { /** Reason the manual calculation was used. */ manualRateReason?: ManualCalculationReason$3; /** Error details and reason for tax rate fallback. */ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails$3; /** * Rate calculation type. Supported values: * + `"AUTO_RATE"` * + `"FALLBACK_RATE"` * + `"MANUAL_RATE"` * + `"NO_TAX_COLLECTED"` */ rateType?: RateType$3; } /** @oneof */ interface TaxCalculationDetailsCalculationDetailsOneOf$3 { /** Reason the manual calculation was used. */ manualRateReason?: ManualCalculationReason$3; /** Details of the fallback rate calculation. */ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails$3; } enum RateType$3 { /** no tax being collected for this request due to location of purchase */ NO_TAX_COLLECTED = "NO_TAX_COLLECTED", /** manual rate used for calculation */ MANUAL_RATE = "MANUAL_RATE", /** autotax rate used for calculation */ AUTO_RATE = "AUTO_RATE", /** fallback rate used for calculation */ FALLBACK_RATE = "FALLBACK_RATE" } enum ManualCalculationReason$3 { /** user set calculator in Business Manager to be Manual */ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL", /** specific region is on manual even though Global setting is Auto-tax */ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL" } interface AutoTaxFallbackCalculationDetails$3 { /** * Reason for fallback. Supported values: * + `"AUTO_TAX_FAILED"` * + `"AUTO_TAX_DEACTIVATED"` */ fallbackReason?: FallbackReason$3; /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */ error?: ApplicationError$a; } enum FallbackReason$3 { /** auto-tax failed to be calculated */ AUTO_TAX_FAILED = "AUTO_TAX_FAILED", /** auto-tax was temporarily deactivated on a system-level */ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED" } interface ApplicationError$a { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * Tax breakdown is the tax amount split to the tax authorities that applied on the line item. */ interface AggregatedTaxBreakdown$3 { /** The name of the tax against which this tax amount was calculated. */ taxName?: string; /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */ taxType?: string; /** The name of the jurisdiction in which this tax detail applies. */ jurisdiction?: string; /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ jurisdictionTypeEnum?: JurisdictionType$5; /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value) */ rate?: string; /** The sum of all the tax from line items that calculated by the tax identifiers. */ aggregatedTaxAmount?: MultiCurrencyPrice$3; /** * The sum of all the taxable amount from line items for tax identifiers. * @internal */ aggregatedTaxableAmount?: MultiCurrencyPrice$3; } interface ShippingInformation$3 { /** Shipping region. */ region?: ShippingRegion$5; /** Selected shipping option. */ selectedCarrierServiceOption?: SelectedCarrierServiceOption$3; /** All shipping options. */ carrierServiceOptions?: CarrierServiceOption$3[]; } interface ShippingRegion$5 { /** * Shipping region ID. * @readonly */ _id?: string; /** Shipping region name. */ name?: string; } interface SelectedCarrierServiceOption$3 { /** Unique identifier of selected option. For example, "usps_std_overnight". */ code?: string; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". * @readonly */ title?: string; /** * Delivery logistics. * @readonly */ logistics?: DeliveryLogistics$6; /** * Shipping costs. * @readonly */ cost?: SelectedCarrierServiceOptionPrices$3; /** * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) * @readonly */ requestedShippingOption?: boolean; /** Other charges */ otherCharges?: SelectedCarrierServiceOptionOtherCharge$3[]; /** This carrier's unique ID */ carrierId?: string | null; /** * Delivery solution allocations to different delivery carriers and delivery regions * @internal */ deliveryAllocations?: DeliveryAllocation$4[]; /** * If the delivery solution is a partial and doesn't apply to all items. * @internal */ partial?: boolean | null; } interface DeliveryLogistics$6 { /** Expected delivery time, in free text. For example, "3-5 business days". */ deliveryTime?: string | null; /** Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */ instructions?: string | null; /** Pickup details. */ pickupDetails?: PickupDetails$7; /** * Expected delivery time slot (from and to time stamps representation) * @internal */ deliveryTimeSlot?: DeliveryTimeSlot$6; } interface PickupDetails$7 { /** Pickup address. */ address?: Address$9; /** * Whether the pickup address is that of a business - this may effect tax calculation. * @deprecated */ businessLocation?: boolean; /** Pickup method */ pickupMethod?: PickupMethod$6; } enum PickupMethod$6 { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } interface DeliveryTimeSlot$6 { /** starting time of the delivery time slot */ from?: Date | null; /** ending time of the delivery time slot */ to?: Date | null; } interface SelectedCarrierServiceOptionPrices$3 { /** Total shipping price, after discount and after tax. */ totalPriceAfterTax?: MultiCurrencyPrice$3; /** Total price of shipping after discounts (when relevant), and before tax. */ totalPriceBeforeTax?: MultiCurrencyPrice$3; /** Tax details. */ taxDetails?: ItemTaxFullDetails$5; /** Shipping discount before tax. */ totalDiscount?: MultiCurrencyPrice$3; /** Shipping price before discount and before tax. */ price?: MultiCurrencyPrice$3; } interface SelectedCarrierServiceOptionOtherCharge$3 { /** Type of additional cost. */ type?: ChargeType$5; /** Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */ details?: string | null; /** Price of added charge. */ cost?: SelectedCarrierServiceOptionPrices$3; } enum ChargeType$5 { HANDLING_FEE = "HANDLING_FEE", INSURANCE = "INSURANCE" } interface DeliveryAllocation$4 { /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */ deliveryCarrier?: Carrier$4; /** The delivery region that are relevant for this delivery solution. */ deliveryRegion?: Region$4; /** Populated if the delivery solution is a partially supplied by this carrier. */ applicableLineItems?: ApplicableLineItems$4; } interface Carrier$4 { /** The carrier app id */ appId?: string | null; /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; } interface Region$4 { /** The delivery region id. */ _id?: string | null; /** The delivery region name. */ name?: string | null; } interface ApplicableLineItems$4 { /** Line items that the delivery solution is for. */ lineItemIds?: string[]; } interface CarrierServiceOption$3 { /** Carrier ID. */ carrierId?: string; /** Shipping options offered by this carrier for this request. */ shippingOptions?: ShippingOption$5[]; } interface ShippingOption$5 { /** * Unique code of provided shipping option like "usps_std_overnight". * For legacy calculators this would be the UUID of the option. */ code?: string; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; /** Delivery logistics. */ logistics?: DeliveryLogistics$6; /** Sipping price information. */ cost?: ShippingPrice$5; /** * Delivery solution allocations to different delivery carriers and delivery regions * @internal */ deliveryAllocations?: DeliveryAllocation$4[]; /** * If the delivery solution is a partial and doesn't apply to all items. * @internal */ partial?: boolean | null; } interface ShippingPrice$5 { /** Shipping price. */ price?: MultiCurrencyPrice$3; /** Other costs such as insurance, handling & packaging for fragile items, etc. */ otherCharges?: OtherCharge$3[]; } interface OtherCharge$3 { /** Type of additional cost. */ type?: ChargeType$5; /** Price of added cost. */ price?: MultiCurrencyPrice$3; } interface AppliedDiscount$5 extends AppliedDiscountDiscountSourceOneOf$5 { /** Coupon details. */ coupon?: V1Coupon; /** Merchant discount. */ merchantDiscount?: V1MerchantDiscount; /** Discount rule */ discountRule?: DiscountRule$5; /** Discount type. */ discountType?: DiscountType$5; /** * IDs of the line items the discount applies to. * @deprecated IDs of line items the discount applies to. * @replacedBy line_items_discounts * @targetRemovalDate 2024-06-01 */ lineItemIds?: string[]; /** * Discount ID. * @internal */ _id?: string | null; /** * Line items the discount applies to. * @internal */ lineItemDiscounts?: LineItemDiscount$5[]; /** * Number of subscription cycle this discount applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } /** @oneof */ interface AppliedDiscountDiscountSourceOneOf$5 { /** Coupon details. */ coupon?: V1Coupon; /** Merchant discount. */ merchantDiscount?: V1MerchantDiscount; /** Discount rule */ discountRule?: DiscountRule$5; } enum DiscountType$5 { GLOBAL = "GLOBAL", SPECIFIC_ITEMS = "SPECIFIC_ITEMS", SHIPPING = "SHIPPING" } /** Coupon */ interface V1Coupon { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** Coupon value. */ amount?: MultiCurrencyPrice$3; /** Coupon name. */ name?: string; /** * Coupon type: We want it to be an enum and not a string but currently we have no time to do it so we leave it as is to be aligned with cart summary. * @internal * @deprecated */ couponType?: string; } interface V1MerchantDiscount { /** Discount value. */ amount?: MultiCurrencyPrice$3; /** Discount Percentage. Will be calculated from items price before other discounts. */ percentage?: number | null; } interface DiscountRule$5 { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: DiscountRuleName$5; /** Discount value. */ amount?: MultiCurrencyPrice$3; } interface DiscountRuleName$5 { /** Original discount rule name (in site's default language). */ original?: string; /** Discount rule name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } interface LineItemDiscount$5 { /** ID of line item the discount applies to. */ _id?: string; /** Discount value. */ totalDiscountAmount?: MultiCurrencyPrice$3; } interface CalculationErrors$4 extends CalculationErrorsShippingCalculationErrorOneOf$4 { /** General shipping calculation error. */ generalShippingCalculationError?: Details$5; /** Carrier errors. */ carrierErrors?: CarrierErrors$4; /** Tax calculation error. */ taxCalculationError?: Details$5; /** Coupon calculation error. */ couponCalculationError?: Details$5; /** Gift card calculation error. */ giftCardCalculationError?: Details$5; /** Order validation errors. */ orderValidationErrors?: ApplicationError$a[]; /** * Membership payment methods calculation errors * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid */ membershipError?: Details$5; /** Discount Rule calculation error. */ discountsCalculationError?: Details$5; } /** @oneof */ interface CalculationErrorsShippingCalculationErrorOneOf$4 { /** General shipping calculation error. */ generalShippingCalculationError?: Details$5; /** Carrier errors. */ carrierErrors?: CarrierErrors$4; } interface Details$5 extends DetailsKindOneOf$5 { applicationError?: ApplicationError$a; validationError?: ValidationError$5; systemError?: SystemError$5; /** * Deprecated in APIs. Used to enable migration from rendering arbitrary tracing to rest response. * @deprecated */ tracing?: Record; } /** @oneof */ interface DetailsKindOneOf$5 { applicationError?: ApplicationError$a; validationError?: ValidationError$5; systemError?: SystemError$5; } /** * example result: * { * "fieldViolations": [ * { * "field": "fieldA", * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]", * "violatedRule": "OTHER", * "ruleName": "INVALID_NOTE", * "data": { * "value": "FI" * } * }, * { * "field": "fieldB", * "description": "field value out of range. supported range: [0-20]", * "violatedRule": "MAX", * "data": { * "threshold": 20 * } * }, * { * "field": "fieldC", * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]", * "violatedRule": "FORMAT", * "data": { * "type": "PHONE" * } * } * ] * } */ interface ValidationError$5 { fieldViolations?: FieldViolation$5[]; } enum RuleType$5 { VALIDATION = "VALIDATION", OTHER = "OTHER", MAX = "MAX", MIN = "MIN", MAX_LENGTH = "MAX_LENGTH", MIN_LENGTH = "MIN_LENGTH", MAX_SIZE = "MAX_SIZE", MIN_SIZE = "MIN_SIZE", FORMAT = "FORMAT", DECIMAL_LTE = "DECIMAL_LTE", DECIMAL_GTE = "DECIMAL_GTE", DECIMAL_LT = "DECIMAL_LT", DECIMAL_GT = "DECIMAL_GT", DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE", INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE", REQUIRED_FIELD = "REQUIRED_FIELD", FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED", ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT", EXACT_LENGTH = "EXACT_LENGTH", EXACT_SIZE = "EXACT_SIZE" } interface FieldViolation$5 { field?: string; description?: string; violatedRule?: RuleType$5; /** applicable when violated_rule=OTHER */ ruleName?: string | null; data?: Record | null; } interface SystemError$5 { /** Error code. */ errorCode?: string | null; } interface CarrierErrors$4 { /** Carrier errors. */ errors?: CarrierError$5[]; } interface CarrierError$5 { /** Carrier ID. */ carrierId?: string; /** Error details. */ error?: Details$5; } interface MembershipOptions$3 { /** List of payment options that can be used. */ eligibleMemberships?: Membership$3[]; /** List of payment options that are owned by the member, but cannot be used due to reason provided. */ invalidMemberships?: InvalidMembership$3[]; /** The selected membership payment options and which line items they apply to. */ selectedMemberships?: HostSelectedMembership[]; } interface Membership$3 { /** Membership ID. */ _id?: string; /** ID of the application providing this payment option. */ appId?: string; /** The name of this membership. */ name?: MembershipName$5; /** Line item IDs which are "paid" for by this membership. */ lineItemIds?: string[]; /** Optional - For a membership that has limited credits, information about credit usage. */ credits?: MembershipPaymentCredits$3; /** Optional - TMembership expiry date. */ expirationDate?: Date | null; /** Additional data about this membership. */ additionalData?: Record | null; } interface MembershipName$5 { /** Membership name. */ original?: string; /** Membership name translated into buyer's language. Defaults to `original` when not defined. */ translated?: string | null; } interface MembershipPaymentCredits$3 { /** Membership's total amount of credits. */ total?: number; /** Membership's remaining amount of credits. */ remaining?: number; } interface InvalidMembership$3 { /** Membership details. */ membership?: Membership$3; /** Reason why this membership is invalid and cannot be used. */ reason?: string; } interface AdditionalFee$5 { /** Additional fee's unique code (or ID) for future processing. */ code?: string | null; /** Translated additional fee's name. */ name?: string; /** Additional fee's price. */ price?: MultiCurrencyPrice$3; /** Tax details. */ taxDetails?: ItemTaxFullDetails$5; /** Provider's app id. */ providerAppId?: string | null; /** Additional fee's price before tax. */ priceBeforeTax?: MultiCurrencyPrice$3; /** Additional fee's price after tax. */ priceAfterTax?: MultiCurrencyPrice$3; /** * Optional - Line items associated with this additional fee. * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. */ lineItemIds?: string[]; /** * Number of subscription cycle this fee applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } interface Violation$2 { /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */ severity?: Severity$2; /** Target location on a checkout or cart page where the violation will be displayed. */ target?: Target$2; /** Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `Click me`. */ description?: string | null; } enum Severity$2 { /** The user is allowed to move forward in the flow. */ WARNING = "WARNING", /** * The user is blocked from moving forward in the flow. * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked. */ ERROR = "ERROR" } interface Target$2 extends TargetTargetTypeOneOf$2 { /** General (other) violation. */ other?: Other$2; /** Specific line item violation. */ lineItem?: TargetLineItem$2; } /** @oneof */ interface TargetTargetTypeOneOf$2 { /** General (other) violation. */ other?: Other$2; /** Specific line item violation. */ lineItem?: TargetLineItem$2; } /** Available locations on the webpage */ enum NameInOther$2 { /** Default location, in case no specific location is specified. */ OTHER_DEFAULT = "OTHER_DEFAULT", /** Delivery section. */ DELIVERY = "DELIVERY" } /** Available locations on the line item */ enum NameInLineItem$2 { /** Default location, in case no specific location is specified. */ LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT" } enum SuggestedFix$2 { /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */ UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX", /** The line item should be removed from the cart or checkout to resolve the violation. */ REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM" } /** General (other) violation. */ interface Other$2 { /** Location on a checkout or a cart page where a general (other) violation will be displayed. */ name?: NameInOther$2; } /** Specific line item violation. */ interface TargetLineItem$2 { /** Location on a checkout or a cart page where the specific line item violation will be displayed. */ name?: NameInLineItem$2; /** ID of the line item containing the violation. */ _id?: string | null; /** * Suggested fix for resolving the line item violation. * @internal */ suggestedFix?: SuggestedFix$2; } interface RemoveLineItemsFromCurrentCartRequest { /** IDs of the line items to remove from the cart. */ lineItemIds: string[]; } interface RemoveLineItemsResponse$1 { /** Updated cart. */ cart?: Cart; } interface CreateCheckoutFromCurrentCartRequest { /** **Required**. Sales channel type. */ channelType?: ChannelType$5; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$9; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$9; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$1; /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string | null; } enum ChannelType$5 { /** Unspecified sales channel. This value is not supported. */ UNSPECIFIED = "UNSPECIFIED", /** A web client. */ WEB = "WEB", /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */ POS = "POS", /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */ EBAY = "EBAY", /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */ AMAZON = "AMAZON", /** Other sales platform. */ OTHER_PLATFORM = "OTHER_PLATFORM", /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */ WIX_APP_STORE = "WIX_APP_STORE", /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */ WIX_INVOICES = "WIX_INVOICES", /** Wix merchant backoffice. */ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT", /** Wish sales channel. */ WISH = "WISH", /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */ CLASS_PASS = "CLASS_PASS", /** Global-E sales channel. */ GLOBAL_E = "GLOBAL_E", /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */ FACEBOOK = "FACEBOOK", /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */ ETSY = "ETSY", /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */ TIKTOK = "TIKTOK", /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */ FAIRE_COM = "FAIRE_COM" } interface CreateCheckoutResponse$1 { /** The newly created checkout's ID. */ checkoutId?: string; } interface RemoveCouponFromCurrentCartRequest { } interface RemoveCouponResponse$1 { /** Updated cart. */ cart?: Cart; } interface UpdateCurrentCartLineItemQuantityRequest { /** Line item IDs and their new quantity. */ lineItems: LineItemQuantityUpdate$1[]; } interface LineItemQuantityUpdate$1 { /** Line item ID. Required. */ _id?: string; /** New quantity. Number must be 1 or higher. Required. */ quantity?: number; } interface UpdateLineItemsQuantityResponse$1 { /** Updated cart. */ cart?: Cart; } interface EstimateCurrentCartTotalsRequest { /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$1; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$9; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$9; /** The selected membership payment options and which line items they apply to. */ selectedMemberships?: SelectedMemberships$3; /** * Whether to calculate tax in the calculation request. * * Default: `true` */ calculateTax?: boolean | null; /** * Whether to calculate shipping in the calculation request. * * Default: `true` */ calculateShipping?: boolean | null; } interface DeleteCurrentCartRequest { } interface DeleteCartResponse { } interface DomainEvent$h extends DomainEventBodyOneOf$h { createdEvent?: EntityCreatedEvent$h; updatedEvent?: EntityUpdatedEvent$h; deletedEvent?: EntityDeletedEvent$h; actionEvent?: ActionEvent$h; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$h { createdEvent?: EntityCreatedEvent$h; updatedEvent?: EntityUpdatedEvent$h; deletedEvent?: EntityDeletedEvent$h; actionEvent?: ActionEvent$h; } interface EntityCreatedEvent$h { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$h; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$h { deletedDate?: Date | null; } interface EntityUpdatedEvent$h { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$h { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$h { bodyAsJson?: string; } interface MessageEnvelope$g { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$h; /** Stringify payload. */ data?: string; } interface IdentificationData$h extends IdentificationDataIdOneOf$h { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$g; } /** @oneof */ interface IdentificationDataIdOneOf$h { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$g { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface CreateCartRequest { /** Cart info. */ cartInfo?: Cart; /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string | null; /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will apply to the whole cart. */ merchantDiscounts?: MerchantDiscountInput$2[]; /** Catalog line items. */ lineItems?: LineItem$5[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$3[]; } interface CreateCartResponse { /** Cart. */ cart?: Cart; } interface GetCartRequest { /** ID of the cart to retrieve. */ _id: string; } interface GetCartResponse { /** The requested cart. */ cart?: Cart; } interface GetCartByCheckoutIdRequest { /** Checkout ID. */ _id: string; } interface GetCartByCheckoutIdResponse { /** The requested cart. */ cart?: Cart; } interface AddToCartRequest { /** Cart ID. */ _id: string; /** Catalog line items. */ lineItems?: LineItem$5[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$3[]; } interface RemoveLineItemsRequest$1 { /** Cart ID. */ _id: string; /** IDs of the line items to remove from the cart. */ lineItemIds: string[]; } interface CreateCheckoutRequest$1 { /** Cart ID. */ _id: string; /** **Required**. Sales channel type. */ channelType?: ChannelType$5; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$9; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$9; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$1; /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string | null; } interface RemoveCouponRequest$1 { /** Cart ID. */ _id: string; } interface UpdateLineItemsQuantityRequest$1 { /** Cart ID. */ _id: string; /** Line item IDs and their new quantity. */ lineItems: LineItemQuantityUpdate$1[]; } interface EstimateTotalsRequest { /** Cart ID. */ _id: string; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$1; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$9; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$9; /** The selected membership payment options and which line items they apply to. */ selectedMemberships?: SelectedMemberships$3; /** * Whether to calculate tax in the calculation request. * * Default: `true` */ calculateTax?: boolean | null; /** * Whether to calculate shipping in the calculation request. * * Default: `true` */ calculateShipping?: boolean | null; } interface DeleteCartRequest { /** ID of the cart to delete. */ _id: string; } interface Empty$a { } /** * Retrieves the current site visitor's cart. * * * The `getCurrentCart()` function returns a Promise that resolves when the current cart is retrieved. * @public * @permissionId ECOM.READ_CARTS * @returns Current session's active cart. */ function getCurrentCart(): Promise; /** * Updates the current site visitor's cart. * * * The `updateCurrentCart()` function returns a Promise that resolves when the current cart's properties are updated. * * > **Note:** When updating catalog items, `options.lineItems.catalogReference` is required. * @public * @requiredField options.lineItems.catalogReference * @param options - Current cart update options. * @permissionId ECOM.MODIFY_CARTS * @returns Fulfilled - The updated current cart. */ function updateCurrentCart(options?: UpdateCurrentCartOptions): Promise; interface UpdateCurrentCartOptions { /** Cart info. */ cartInfo?: Cart; /** The code of an existing coupon to apply to the cart. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string | null; /** Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart. */ merchantDiscounts?: MerchantDiscountInput$2[]; /** Catalog line items. */ lineItems?: LineItem$5[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$3[]; /** * List of field names to determine which of cartInfo's fields will be updated * @internal */ cartFieldmask?: string[]; } /** * Adds catalog line items to the current site visitor's cart. * * * The `addToCurrentCart()` function returns a Promise that resolves to the updated current cart when the specified items have been added. * * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required. * @public * @requiredField options.customLineItems.descriptionLines * @requiredField options.customLineItems.descriptionLines.name * @requiredField options.customLineItems.itemType * @requiredField options.customLineItems.price * @requiredField options.customLineItems.productName * @requiredField options.customLineItems.quantity * @requiredField options.lineItems.catalogReference * @requiredField options.lineItems.quantity * @requiredField options.lineItems.selectedMembership._id * @requiredField options.lineItems.selectedMembership.appId * @param options - Items to be added to the current cart. * @permissionId ECOM.MODIFY_CARTS */ function addToCurrentCart(options?: AddToCurrentCartOptions): Promise; interface AddToCurrentCartOptions { /** Catalog line items. */ lineItems?: LineItem$5[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$3[]; } /** * Removes line items from the current site visitor's cart. * * * The `removeLineItemsFromCurrentCart()` function returns a Promise that resolves to the updated current cart when the line items are removed. * @public * @requiredField lineItemIds * @param lineItemIds - IDs of the line items to remove from the cart. * @permissionId ECOM.MODIFY_CARTS */ function removeLineItemsFromCurrentCart(lineItemIds: string[]): Promise; /** * Creates a checkout from the current site visitor’s cart. * * * The `createCheckoutFromCurrentCart()` function returns a Promise that resolves to the new checkout's ID when it's created. * * If a checkout was already created from the current cart, that checkout will be updated with any new information from the cart. * * > **Note:** `options.channelType` is a required field. * @public * @param options - Checkout creation options. * @permissionId ECOM.CREATE_CHECKOUT_FROM_CART */ function createCheckoutFromCurrentCart(options?: CreateCheckoutFromCurrentCartOptions): Promise; interface CreateCheckoutFromCurrentCartOptions { /** **Required**. Sales channel type. */ channelType?: ChannelType$5; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$9; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$9; /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$1; /** Mandatory when setting a billing or shipping address if the site visitor isn't logged in. */ email?: string | null; } /** * Removes the coupon from the current site visitor's cart. * * * The `removeCouponFromCurrentCart()` function returns a Promise that resolves to the updated current cart when the coupon is removed. * @public * @permissionId ECOM.MODIFY_CARTS * @returns Fulfilled - Updated current cart. */ function removeCouponFromCurrentCart(): Promise; /** * Updates the quantity of one or more line items in the current site visitor's cart. * * * The `updateCurrentCartLineItemQuantity()` function returns a Promise that resolves when the quantities of the current cart's line items are updated. This endpoint is only for updating the quantity of line items. To entirely remove a line item from the current cart, use [`removeLineItemsFromCurrentCart()`](#removelineitemsfromcurrentcart). * To add a new line item to the current cart, use [`addToCurrentCart()`](#addtocurrentcart). * * This endpoint checks the amount of stock remaining for this line item. If the specified `quantity` is greater than the remaining stock, then the `quantity` returned in the response is the total amount of remaining stock. * @param lineItems - Line item IDs and their new quantity. * @public * @requiredField lineItems * @permissionId ECOM.MODIFY_CARTS * @returns Fulfilled - The updated current cart. */ function updateCurrentCartLineItemQuantity(lineItems: LineItemQuantityUpdate$1[]): Promise; /** * Estimates the current cart's price totals (including tax), based on a selected carrier service, shipping address, and billing information. * * * The `estimateCurrentCartTotals()` function returns a Promise that resolves when the estimated totals are generated. * * > **Note:** Not passing any `options` properties will only estimate the cart items price totals. * @public * @param options - Total estimation options. * @permissionId ECOM.READ_CARTS */ function estimateCurrentCartTotals(options?: EstimateCurrentCartTotalsOptions): Promise; interface EstimateCurrentCartTotalsOptions { /** Selected shipping option. */ selectedShippingOption?: SelectedShippingOption$1; /** Shipping address. Used for calculating tax and shipping (when applicable). */ shippingAddress?: Address$9; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$9; /** The selected membership payment options and which line items they apply to. */ selectedMemberships?: SelectedMemberships$3; /** * Whether to calculate tax in the calculation request. * * Default: `true` */ calculateTax?: boolean | null; /** * Whether to calculate shipping in the calculation request. * * Default: `true` */ calculateShipping?: boolean | null; } /** * Deletes the current site visitor's cart. * * * The `deleteCurrentCart()` function returns a Promise that resolves when the current cart is deleted. * @public * @permissionId ECOM.MODIFY_CARTS * @returns Fulfilled - When the current cart is deleted. Rejected - Error message. */ function deleteCurrentCart(): Promise; type ecomV1CartCurrentCart_universal_d_Cart = Cart; type ecomV1CartCurrentCart_universal_d_CartDiscount = CartDiscount; type ecomV1CartCurrentCart_universal_d_CartDiscountDiscountSourceOneOf = CartDiscountDiscountSourceOneOf; type ecomV1CartCurrentCart_universal_d_V1DiscountRule = V1DiscountRule; type ecomV1CartCurrentCart_universal_d_V1DiscountRuleName = V1DiscountRuleName; type ecomV1CartCurrentCart_universal_d_GetCurrentCartRequest = GetCurrentCartRequest; type ecomV1CartCurrentCart_universal_d_GetCurrentCartResponse = GetCurrentCartResponse; type ecomV1CartCurrentCart_universal_d_UpdateCartRequest = UpdateCartRequest; type ecomV1CartCurrentCart_universal_d_UpdateCartResponse = UpdateCartResponse; type ecomV1CartCurrentCart_universal_d_AddToCurrentCartRequest = AddToCurrentCartRequest; type ecomV1CartCurrentCart_universal_d_AddToCartResponse = AddToCartResponse; type ecomV1CartCurrentCart_universal_d_AddToCurrentCartAndEstimateTotalsRequest = AddToCurrentCartAndEstimateTotalsRequest; type ecomV1CartCurrentCart_universal_d_HostSelectedMembership = HostSelectedMembership; type ecomV1CartCurrentCart_universal_d_EstimateTotalsResponse = EstimateTotalsResponse; type ecomV1CartCurrentCart_universal_d_V1Coupon = V1Coupon; type ecomV1CartCurrentCart_universal_d_V1MerchantDiscount = V1MerchantDiscount; type ecomV1CartCurrentCart_universal_d_RemoveLineItemsFromCurrentCartRequest = RemoveLineItemsFromCurrentCartRequest; type ecomV1CartCurrentCart_universal_d_CreateCheckoutFromCurrentCartRequest = CreateCheckoutFromCurrentCartRequest; type ecomV1CartCurrentCart_universal_d_RemoveCouponFromCurrentCartRequest = RemoveCouponFromCurrentCartRequest; type ecomV1CartCurrentCart_universal_d_UpdateCurrentCartLineItemQuantityRequest = UpdateCurrentCartLineItemQuantityRequest; type ecomV1CartCurrentCart_universal_d_EstimateCurrentCartTotalsRequest = EstimateCurrentCartTotalsRequest; type ecomV1CartCurrentCart_universal_d_DeleteCurrentCartRequest = DeleteCurrentCartRequest; type ecomV1CartCurrentCart_universal_d_DeleteCartResponse = DeleteCartResponse; type ecomV1CartCurrentCart_universal_d_CreateCartRequest = CreateCartRequest; type ecomV1CartCurrentCart_universal_d_CreateCartResponse = CreateCartResponse; type ecomV1CartCurrentCart_universal_d_GetCartRequest = GetCartRequest; type ecomV1CartCurrentCart_universal_d_GetCartResponse = GetCartResponse; type ecomV1CartCurrentCart_universal_d_GetCartByCheckoutIdRequest = GetCartByCheckoutIdRequest; type ecomV1CartCurrentCart_universal_d_GetCartByCheckoutIdResponse = GetCartByCheckoutIdResponse; type ecomV1CartCurrentCart_universal_d_AddToCartRequest = AddToCartRequest; type ecomV1CartCurrentCart_universal_d_EstimateTotalsRequest = EstimateTotalsRequest; type ecomV1CartCurrentCart_universal_d_DeleteCartRequest = DeleteCartRequest; const ecomV1CartCurrentCart_universal_d_getCurrentCart: typeof getCurrentCart; const ecomV1CartCurrentCart_universal_d_updateCurrentCart: typeof updateCurrentCart; type ecomV1CartCurrentCart_universal_d_UpdateCurrentCartOptions = UpdateCurrentCartOptions; const ecomV1CartCurrentCart_universal_d_addToCurrentCart: typeof addToCurrentCart; type ecomV1CartCurrentCart_universal_d_AddToCurrentCartOptions = AddToCurrentCartOptions; const ecomV1CartCurrentCart_universal_d_removeLineItemsFromCurrentCart: typeof removeLineItemsFromCurrentCart; const ecomV1CartCurrentCart_universal_d_createCheckoutFromCurrentCart: typeof createCheckoutFromCurrentCart; type ecomV1CartCurrentCart_universal_d_CreateCheckoutFromCurrentCartOptions = CreateCheckoutFromCurrentCartOptions; const ecomV1CartCurrentCart_universal_d_removeCouponFromCurrentCart: typeof removeCouponFromCurrentCart; const ecomV1CartCurrentCart_universal_d_updateCurrentCartLineItemQuantity: typeof updateCurrentCartLineItemQuantity; const ecomV1CartCurrentCart_universal_d_estimateCurrentCartTotals: typeof estimateCurrentCartTotals; type ecomV1CartCurrentCart_universal_d_EstimateCurrentCartTotalsOptions = EstimateCurrentCartTotalsOptions; const ecomV1CartCurrentCart_universal_d_deleteCurrentCart: typeof deleteCurrentCart; namespace ecomV1CartCurrentCart_universal_d { export { ecomV1CartCurrentCart_universal_d_Cart as Cart, LineItem$5 as LineItem, CatalogReference$7 as CatalogReference, ProductName$4 as ProductName, MultiCurrencyPrice$3 as MultiCurrencyPrice, DescriptionLine$4 as DescriptionLine, DescriptionLineValueOneOf$4 as DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf$4 as DescriptionLineDescriptionLineValueOneOf, DescriptionLineName$4 as DescriptionLineName, PlainTextValue$4 as PlainTextValue, Color$4 as Color, DescriptionLineType$4 as DescriptionLineType, FocalPoint$5 as FocalPoint, ItemAvailabilityInfo$2 as ItemAvailabilityInfo, ItemAvailabilityStatus$2 as ItemAvailabilityStatus, PhysicalProperties$6 as PhysicalProperties, Scope$3 as Scope, Group$3 as Group, ItemType$5 as ItemType, ItemTypeItemTypeDataOneOf$5 as ItemTypeItemTypeDataOneOf, ItemTypeItemType$5 as ItemTypeItemType, SubscriptionOptionInfo$3 as SubscriptionOptionInfo, SubscriptionSettings$6 as SubscriptionSettings, SubscriptionFrequency$6 as SubscriptionFrequency, FreeTrialPeriod$2 as FreeTrialPeriod, Title$2 as Title, Description$2 as Description, SecuredMedia$3 as SecuredMedia, FileType$3 as FileType, V1PaymentOptionType$1 as V1PaymentOptionType, ServiceProperties$4 as ServiceProperties, PriceDescription$4 as PriceDescription, SelectedMembership$3 as SelectedMembership, CatalogOverrideFields$2 as CatalogOverrideFields, PaymentOption$2 as PaymentOption, TaxableAddress$5 as TaxableAddress, TaxableAddressTaxableAddressDataOneOf$5 as TaxableAddressTaxableAddressDataOneOf, TaxableAddressType$5 as TaxableAddressType, ExtendedFields$9 as ExtendedFields, Policy$2 as Policy, BuyerInfo$6 as BuyerInfo, BuyerInfoIdOneOf$4 as BuyerInfoIdOneOf, WeightUnit$7 as WeightUnit, ecomV1CartCurrentCart_universal_d_CartDiscount as CartDiscount, ecomV1CartCurrentCart_universal_d_CartDiscountDiscountSourceOneOf as CartDiscountDiscountSourceOneOf, Coupon$5 as Coupon, MerchantDiscount$5 as MerchantDiscount, ecomV1CartCurrentCart_universal_d_V1DiscountRule as V1DiscountRule, ecomV1CartCurrentCart_universal_d_V1DiscountRuleName as V1DiscountRuleName, AddressWithContact$4 as AddressWithContact, Address$9 as Address, StreetAddress$8 as StreetAddress, AddressLocation$8 as AddressLocation, FullAddressContactDetails$5 as FullAddressContactDetails, VatId$6 as VatId, VatType$6 as VatType, SelectedShippingOption$1 as SelectedShippingOption, ecomV1CartCurrentCart_universal_d_GetCurrentCartRequest as GetCurrentCartRequest, ecomV1CartCurrentCart_universal_d_GetCurrentCartResponse as GetCurrentCartResponse, ecomV1CartCurrentCart_universal_d_UpdateCartRequest as UpdateCartRequest, MerchantDiscountInput$2 as MerchantDiscountInput, CustomLineItem$3 as CustomLineItem, ecomV1CartCurrentCart_universal_d_UpdateCartResponse as UpdateCartResponse, ecomV1CartCurrentCart_universal_d_AddToCurrentCartRequest as AddToCurrentCartRequest, ecomV1CartCurrentCart_universal_d_AddToCartResponse as AddToCartResponse, ecomV1CartCurrentCart_universal_d_AddToCurrentCartAndEstimateTotalsRequest as AddToCurrentCartAndEstimateTotalsRequest, SelectedMemberships$3 as SelectedMemberships, ecomV1CartCurrentCart_universal_d_HostSelectedMembership as HostSelectedMembership, ecomV1CartCurrentCart_universal_d_EstimateTotalsResponse as EstimateTotalsResponse, CalculatedLineItem$1 as CalculatedLineItem, LineItemPricesData$1 as LineItemPricesData, ItemTaxFullDetails$5 as ItemTaxFullDetails, TaxRateBreakdown$3 as TaxRateBreakdown, TaxBreakdown$3 as TaxBreakdown, JurisdictionType$5 as JurisdictionType, PriceSummary$5 as PriceSummary, GiftCard$5 as GiftCard, TaxSummary$5 as TaxSummary, TaxCalculationDetails$3 as TaxCalculationDetails, TaxCalculationDetailsCalculationDetailsOneOf$3 as TaxCalculationDetailsCalculationDetailsOneOf, RateType$3 as RateType, ManualCalculationReason$3 as ManualCalculationReason, AutoTaxFallbackCalculationDetails$3 as AutoTaxFallbackCalculationDetails, FallbackReason$3 as FallbackReason, ApplicationError$a as ApplicationError, AggregatedTaxBreakdown$3 as AggregatedTaxBreakdown, ShippingInformation$3 as ShippingInformation, ShippingRegion$5 as ShippingRegion, SelectedCarrierServiceOption$3 as SelectedCarrierServiceOption, DeliveryLogistics$6 as DeliveryLogistics, PickupDetails$7 as PickupDetails, PickupMethod$6 as PickupMethod, DeliveryTimeSlot$6 as DeliveryTimeSlot, SelectedCarrierServiceOptionPrices$3 as SelectedCarrierServiceOptionPrices, SelectedCarrierServiceOptionOtherCharge$3 as SelectedCarrierServiceOptionOtherCharge, ChargeType$5 as ChargeType, DeliveryAllocation$4 as DeliveryAllocation, Carrier$4 as Carrier, Region$4 as Region, ApplicableLineItems$4 as ApplicableLineItems, CarrierServiceOption$3 as CarrierServiceOption, ShippingOption$5 as ShippingOption, ShippingPrice$5 as ShippingPrice, OtherCharge$3 as OtherCharge, AppliedDiscount$5 as AppliedDiscount, AppliedDiscountDiscountSourceOneOf$5 as AppliedDiscountDiscountSourceOneOf, DiscountType$5 as DiscountType, ecomV1CartCurrentCart_universal_d_V1Coupon as V1Coupon, ecomV1CartCurrentCart_universal_d_V1MerchantDiscount as V1MerchantDiscount, DiscountRule$5 as DiscountRule, DiscountRuleName$5 as DiscountRuleName, LineItemDiscount$5 as LineItemDiscount, CalculationErrors$4 as CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf$4 as CalculationErrorsShippingCalculationErrorOneOf, Details$5 as Details, DetailsKindOneOf$5 as DetailsKindOneOf, ValidationError$5 as ValidationError, RuleType$5 as RuleType, FieldViolation$5 as FieldViolation, SystemError$5 as SystemError, CarrierErrors$4 as CarrierErrors, CarrierError$5 as CarrierError, MembershipOptions$3 as MembershipOptions, Membership$3 as Membership, MembershipName$5 as MembershipName, MembershipPaymentCredits$3 as MembershipPaymentCredits, InvalidMembership$3 as InvalidMembership, AdditionalFee$5 as AdditionalFee, Violation$2 as Violation, Severity$2 as Severity, Target$2 as Target, TargetTargetTypeOneOf$2 as TargetTargetTypeOneOf, NameInOther$2 as NameInOther, NameInLineItem$2 as NameInLineItem, SuggestedFix$2 as SuggestedFix, Other$2 as Other, TargetLineItem$2 as TargetLineItem, ecomV1CartCurrentCart_universal_d_RemoveLineItemsFromCurrentCartRequest as RemoveLineItemsFromCurrentCartRequest, RemoveLineItemsResponse$1 as RemoveLineItemsResponse, ecomV1CartCurrentCart_universal_d_CreateCheckoutFromCurrentCartRequest as CreateCheckoutFromCurrentCartRequest, ChannelType$5 as ChannelType, CreateCheckoutResponse$1 as CreateCheckoutResponse, ecomV1CartCurrentCart_universal_d_RemoveCouponFromCurrentCartRequest as RemoveCouponFromCurrentCartRequest, RemoveCouponResponse$1 as RemoveCouponResponse, ecomV1CartCurrentCart_universal_d_UpdateCurrentCartLineItemQuantityRequest as UpdateCurrentCartLineItemQuantityRequest, LineItemQuantityUpdate$1 as LineItemQuantityUpdate, UpdateLineItemsQuantityResponse$1 as UpdateLineItemsQuantityResponse, ecomV1CartCurrentCart_universal_d_EstimateCurrentCartTotalsRequest as EstimateCurrentCartTotalsRequest, ecomV1CartCurrentCart_universal_d_DeleteCurrentCartRequest as DeleteCurrentCartRequest, ecomV1CartCurrentCart_universal_d_DeleteCartResponse as DeleteCartResponse, DomainEvent$h as DomainEvent, DomainEventBodyOneOf$h as DomainEventBodyOneOf, EntityCreatedEvent$h as EntityCreatedEvent, RestoreInfo$h as RestoreInfo, EntityUpdatedEvent$h as EntityUpdatedEvent, EntityDeletedEvent$h as EntityDeletedEvent, ActionEvent$h as ActionEvent, MessageEnvelope$g as MessageEnvelope, IdentificationData$h as IdentificationData, IdentificationDataIdOneOf$h as IdentificationDataIdOneOf, WebhookIdentityType$g as WebhookIdentityType, ecomV1CartCurrentCart_universal_d_CreateCartRequest as CreateCartRequest, ecomV1CartCurrentCart_universal_d_CreateCartResponse as CreateCartResponse, ecomV1CartCurrentCart_universal_d_GetCartRequest as GetCartRequest, ecomV1CartCurrentCart_universal_d_GetCartResponse as GetCartResponse, ecomV1CartCurrentCart_universal_d_GetCartByCheckoutIdRequest as GetCartByCheckoutIdRequest, ecomV1CartCurrentCart_universal_d_GetCartByCheckoutIdResponse as GetCartByCheckoutIdResponse, ecomV1CartCurrentCart_universal_d_AddToCartRequest as AddToCartRequest, RemoveLineItemsRequest$1 as RemoveLineItemsRequest, CreateCheckoutRequest$1 as CreateCheckoutRequest, RemoveCouponRequest$1 as RemoveCouponRequest, UpdateLineItemsQuantityRequest$1 as UpdateLineItemsQuantityRequest, ecomV1CartCurrentCart_universal_d_EstimateTotalsRequest as EstimateTotalsRequest, ecomV1CartCurrentCart_universal_d_DeleteCartRequest as DeleteCartRequest, Empty$a as Empty, ecomV1CartCurrentCart_universal_d_getCurrentCart as getCurrentCart, ecomV1CartCurrentCart_universal_d_updateCurrentCart as updateCurrentCart, ecomV1CartCurrentCart_universal_d_UpdateCurrentCartOptions as UpdateCurrentCartOptions, ecomV1CartCurrentCart_universal_d_addToCurrentCart as addToCurrentCart, ecomV1CartCurrentCart_universal_d_AddToCurrentCartOptions as AddToCurrentCartOptions, ecomV1CartCurrentCart_universal_d_removeLineItemsFromCurrentCart as removeLineItemsFromCurrentCart, ecomV1CartCurrentCart_universal_d_createCheckoutFromCurrentCart as createCheckoutFromCurrentCart, ecomV1CartCurrentCart_universal_d_CreateCheckoutFromCurrentCartOptions as CreateCheckoutFromCurrentCartOptions, ecomV1CartCurrentCart_universal_d_removeCouponFromCurrentCart as removeCouponFromCurrentCart, ecomV1CartCurrentCart_universal_d_updateCurrentCartLineItemQuantity as updateCurrentCartLineItemQuantity, ecomV1CartCurrentCart_universal_d_estimateCurrentCartTotals as estimateCurrentCartTotals, ecomV1CartCurrentCart_universal_d_EstimateCurrentCartTotalsOptions as EstimateCurrentCartTotalsOptions, ecomV1CartCurrentCart_universal_d_deleteCurrentCart as deleteCurrentCart, }; } interface Checkout$1 { /** * Checkout ID. * @readonly */ _id?: string | null; /** * Line items. * * Max: 300 items * @readonly */ lineItems?: LineItem$4[]; /** Billing information. */ billingInfo?: AddressWithContact$3; /** Shipping information. */ shippingInfo?: ShippingInfo$2; /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string | null; /** Buyer information. */ buyerInfo?: BuyerInfo$5; /** * All converted prices are displayed in this currency in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. * @readonly */ conversionCurrency?: string; /** * Calculated price summary for the checkout. * @readonly */ priceSummary?: PriceSummary$4; /** * Errors when calculating totals. * @readonly */ calculationErrors?: CalculationErrors$3; /** * Applied gift card details. * * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards). * @readonly */ giftCard?: GiftCard$4; /** * Applied discounts. * @readonly */ appliedDiscounts?: AppliedDiscount$4[]; /** Custom fields. */ customFields?: CustomField$4[]; /** * Weight measurement unit - defaults to site's weight unit. * @readonly */ weightUnit?: WeightUnit$6; /** * Tax summary. * @readonly */ taxSummary?: TaxSummary$4; /** * The currency used when submitting the order. * @readonly */ currency?: string; /** * Sales channel that submitted the order. * @readonly */ channelType?: ChannelType$4; /** * Site language in which original values are shown. * @readonly */ siteLanguage?: string; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. * @readonly */ buyerLanguage?: string; /** * Whether an order was successfully created from this checkout. * For an order to be successful, it must be successfully paid for (unless the total is 0). * @readonly */ completed?: boolean; /** * Whether tax is included in line item prices. * @readonly */ taxIncludedInPrice?: boolean; /** * ID of the checkout's initiator. * @readonly */ createdBy?: CreatedBy$4; /** * Date and time the checkout was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the checkout was updated. * @readonly */ _updatedDate?: Date | null; /** * Minimal amount to pay in order to place the order. * @readonly */ payNow?: PriceSummary$4; /** * Remaining amount for the order to be fully paid. * @readonly */ payLater?: PriceSummary$4; /** Memberships to apply when creating the order. */ membershipOptions?: MembershipOptions$2; /** Additional Fees. */ additionalFees?: AdditionalFee$4[]; /** Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart. */ cartId?: string | null; /** * Information about the currency conversion that took place if at all. Empty if no conversion took place. * @internal */ conversionInfo?: ConversionInfo$1; /** * The pay now total amount after gift card reduction * @internal * @readonly */ payNowTotalAfterGiftCard?: MultiCurrencyPrice$2; /** * __Deprecated.__ Use `purchaseFlowId` instead. * @internal * @deprecated */ ecomId?: string | null; /** * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction). * @readonly */ violations?: Violation$1[]; /** * The total payment amount after gift card reduction * @internal * @readonly */ totalAfterGiftCard?: MultiCurrencyPrice$2; /** * Custom field data for the checkout object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields$8; /** * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. * @readonly */ purchaseFlowId?: string | null; /** * Additional settings for customization of the checkout process. * * Custom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout). */ customSettings?: CustomSettings$1; /** * Reference IDs for the app and component providing custom checkout page content. * * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customContentReference?: CustomContentReference$1; /** * References to an external app and resource associated with this checkout. * Used for integration and tracking across different platforms. * @internal */ externalReference?: ExternalReference$2; /** * Order ID. * * This field is empty until the checkout completes and becomes an order. * @internal * @readonly */ orderId?: string | null; /** * Payment for subscriptions after free trial period. * @internal * @readonly */ payAfterFreeTrial?: PriceSummary$4; } interface LineItem$4 { /** * Line item ID. * @readonly */ _id?: string | null; /** * Item quantity. * * Min: `"1"` * Max: `"100000"` */ quantity?: number; /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$6; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` * @readonly */ productName?: ProductName$3; /** * URL to the item's page on the site. * @readonly */ url?: string; /** * Item price **after** catalog-defined discount and line item discounts. * @readonly */ price?: MultiCurrencyPrice$2; /** * Total line item price **after** catalog-defined discount and line item discounts. * @readonly */ lineItemPrice?: MultiCurrencyPrice$2; /** * Item price **before** catalog-defined discount. Defaults to `price` when not provided. * @readonly */ fullPrice?: MultiCurrencyPrice$2; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: MultiCurrencyPrice$2; /** * Total price after all discounts and tax. * @readonly */ totalPriceAfterTax?: MultiCurrencyPrice$2; /** * Total price after discounts, and before tax. * @readonly */ totalPriceBeforeTax?: MultiCurrencyPrice$2; /** * Tax details for this line item. * @readonly */ taxDetails?: ItemTaxFullDetails$4; /** * Discount for this line item's entire quantity. * @readonly */ discount?: MultiCurrencyPrice$2; /** * Line item description lines. Used for displaying the cart, checkout and order. * @readonly */ descriptionLines?: DescriptionLine$3[]; /** * Line item image details. * @readonly */ media?: string; /** * Item availability details. * @readonly */ availability?: ItemAvailabilityInfo$1; /** * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. * @readonly */ physicalProperties?: PhysicalProperties$5; /** * Coupon scopes - which app and items a coupon applies to. * This field is internal to Wix, and should be used by Bookings, Stores and Events as used by the current [Coupons API](https://bo.wix.com/wix-docs/rest/stores/coupons/valid-scope-values). * @internal * @readonly */ couponScopes?: Scope$2[]; /** * Item type. Either a preset type or custom. * @readonly */ itemType?: ItemType$4; /** * Subscription option information. * @readonly */ subscriptionOptionInfo?: SubscriptionOptionInfo$2; /** * Fulfiller ID for this item. Field is empty when the item is self-fulfilled. * @internal * @readonly */ fulfillerId?: string | null; /** * Shipping group ID. * @internal * @readonly */ shippingGroupId?: string | null; /** * Digital file identifier, relevant only for items with type DIGITAL. * @internal * @readonly */ digitalFile?: SecuredMedia$2; /** * Type of selected payment option for current item. Defaults to `"FULL_PAYMENT_ONLINE"`. * + `"FULL_PAYMENT_ONLINE"`: The entire payment for this item happens as part of the checkout. * + `"FULL_PAYMENT_OFFLINE"`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `"MEMBERSHIP"`: Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `"DEPOSIT_ONLINE"`: Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field. * @readonly */ paymentOption?: V1PaymentOptionType; /** * Service properties. When relevant, this contains information such as date and number of participants. * @readonly */ serviceProperties?: ServiceProperties$3; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field has the same value as `catalogReference.catalogItemId`. * + Used in membership validation. * @readonly */ rootCatalogItemId?: string | null; /** * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". * @readonly */ priceDescription?: PriceDescription$3; /** * Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only. * @readonly */ depositAmount?: MultiCurrencyPrice$2; /** * Delivery Profile Id for the product * @internal * @readonly */ deliveryProfileId?: string | null; /** * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin. * @readonly */ customLineItem?: boolean; /** * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page. * @readonly */ consentRequiredPaymentPolicy?: string | null; /** * Overriding values for catalog item properties. * * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ catalogOverrideFields?: CatalogOverrideFields$1; /** * Whether the price is not yet defined, and will be updated after the order is created. * @internal * @readonly */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * @internal * @readonly */ fixedQuantity?: boolean; /** * Whether to save the payment method on the order. * * Default: `false` * @readonly */ savePaymentMethod?: boolean; /** * Address to be used for tax calculation. * @internal */ taxableAddress?: TaxableAddress$4; /** * Custom extended fields for the line item object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. * @internal */ extendedFields?: ExtendedFields$8; /** * Policies to be displayed to the customer on the checkout page. * @internal * @readonly */ policies?: Policy$1[]; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$6 { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. * * Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from your Wix Stores catalog, learn more about [eCommerce integration](https://www.wix.com/velo/reference/wix-stores-backend/ecommerce-integration). */ options?: Record | null; } interface ProductName$3 { /** * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * * Min: 1 character. * Max: 200 characters. */ original?: string; /** * Item name translated into the buyer's language. * * Min: 1 character. * Max: 400 characters. * Default: Same as `original`. */ translated?: string | null; } interface MultiCurrencyPrice$2 { /** Amount. */ amount?: string; /** * Converted amount. * @readonly */ convertedAmount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. * @readonly */ formattedConvertedAmount?: string; } interface ItemTaxFullDetails$4 { /** Amount for which tax is calculated. */ taxableAmount?: MultiCurrencyPrice$2; /** * Tax group ID, if specified. * @internal */ taxGroupId?: string | null; /** Tax rate %, as a decimal point between 0 and 1. */ taxRate?: string; /** Calculated tax, based on `taxable_amount` and `tax_rate`. */ totalTax?: MultiCurrencyPrice$2; /** * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead. * @readonly * @deprecated */ rateBreakdown?: TaxRateBreakdown$2[]; /** * The amount of this line item that was exempt. * @internal */ exemptAmount?: MultiCurrencyPrice$2; /** * True for items we have a tax applied on them * @internal */ isItemTaxable?: boolean | null; /** * True if the lineAmount include tax in it. * @internal */ isTaxIncluded?: boolean | null; /** * The calculator that calculated this line tax * @internal */ calculatorName?: string | null; /** * tax information for a line item. * @internal * @readonly */ taxBreakdown?: TaxBreakdown$2[]; } interface TaxRateBreakdown$2 { /** Name of tax against which the calculation was performed. */ name?: string; /** Rate at which this tax detail was calculated. */ rate?: string; /** Amount of tax for this tax detail. */ tax?: MultiCurrencyPrice$2; /** * The type of tax that was calculated * @internal */ taxType?: string | null; /** * The name of the jurisdiction in which this tax detail applies * @internal */ jurisdiction?: string | null; /** * The type of the jurisdiction in which this tax detail applies(Country,State,County,City,Special). * @internal */ jurisdictionType?: string | null; /** * The amount of this line item that was exempt from this authority. * @internal */ exemptAmount?: MultiCurrencyPrice$2; /** * ids of the used exemptions from the TaxEstimate exemptions array. * @internal */ exemptionIds?: number[]; /** * The taxable amount of this tax detail * @internal */ taxableAmount?: MultiCurrencyPrice$2; /** * The Taxes/Fee component. True if the fee is applied. * @internal */ isFee?: boolean | null; } /** * TaxBreakdown represents tax information for a line item. * It holds the tax amount and the tax rate for each tax authority that apply on the line item. */ interface TaxBreakdown$2 { /** The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". */ jurisdiction?: string | null; /** The amount of this line item price that was considered nontaxable. (Decimal value) */ nonTaxableAmount?: MultiCurrencyPrice$2; /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */ rate?: string | null; /** The amount of tax estimated for this line item. (Decimal value) */ taxAmount?: MultiCurrencyPrice$2; /** The taxable amount of this line item. */ taxableAmount?: MultiCurrencyPrice$2; /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */ taxType?: string | null; /** * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. * This name should be explicit enough to allow the merchant to understand what tax was calculated. */ taxName?: string | null; /** The type of the jurisdiction in which this tax detail applies. */ jurisdictionType?: JurisdictionType$4; } /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ enum JurisdictionType$4 { UNDEFINED = "UNDEFINED", COUNTRY = "COUNTRY", STATE = "STATE", COUNTY = "COUNTY", CITY = "CITY", SPECIAL = "SPECIAL" } interface DescriptionLine$3 extends DescriptionLineValueOneOf$3, DescriptionLineDescriptionLineValueOneOf$3 { /** Description line plain text value. */ plainText?: PlainTextValue$3; /** Description line color value. */ colorInfo?: Color$3; /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$3; /** * Description line color. * @internal * @deprecated */ color?: string; /** Description line name. */ name?: DescriptionLineName$3; /** * Description line type. * @internal * @deprecated */ lineType?: DescriptionLineType$3; } /** @oneof */ interface DescriptionLineValueOneOf$3 { /** Description line plain text value. */ plainText?: PlainTextValue$3; /** Description line color value. */ colorInfo?: Color$3; } /** @oneof */ interface DescriptionLineDescriptionLineValueOneOf$3 { /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$3; /** * Description line color. * @internal * @deprecated */ color?: string; } interface DescriptionLineName$3 { /** Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface PlainTextValue$3 { /** Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line plain text value translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface Color$3 { /** Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line color name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; /** HEX or RGB color code for display. */ code?: string | null; } enum DescriptionLineType$3 { /** Unrecognized type. */ UNRECOGNISED = "UNRECOGNISED", /** Plain text type. */ PLAIN_TEXT = "PLAIN_TEXT", /** Color type. */ COLOR = "COLOR" } interface FocalPoint$4 { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } interface ItemAvailabilityInfo$1 { /** Item availability status. */ status?: ItemAvailabilityStatus$1; /** Quantity available. */ quantityAvailable?: number | null; } enum ItemAvailabilityStatus$1 { AVAILABLE = "AVAILABLE", /** Item does not exist */ NOT_FOUND = "NOT_FOUND", /** Item not in stock */ NOT_AVAILABLE = "NOT_AVAILABLE", /** Available quantity is less than requested */ PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE" } interface PhysicalProperties$5 { /** Line item weight. Measurement unit (`"KG"` or `"LB"`) is taken from `order.weightUnit`. */ weight?: number | null; /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string | null; /** Whether this line item is shippable. */ shippable?: boolean; } interface Scope$2 { /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */ namespace?: string; /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */ group?: Group$2; } interface Group$2 { /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ name?: string; /** Item ID (when the coupon scope is limited to just one item). */ entityId?: string | null; } interface ItemType$4 extends ItemTypeItemTypeDataOneOf$4 { /** Preset item type. */ preset?: ItemTypeItemType$4; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } /** @oneof */ interface ItemTypeItemTypeDataOneOf$4 { /** Preset item type. */ preset?: ItemTypeItemType$4; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } enum ItemTypeItemType$4 { UNRECOGNISED = "UNRECOGNISED", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL", GIFT_CARD = "GIFT_CARD", SERVICE = "SERVICE" } interface SubscriptionOptionInfo$2 { /** Subscription option settings. */ subscriptionSettings?: SubscriptionSettings$5; /** Subscription option title. */ title?: Title$1; /** Subscription option description. */ description?: Description$1; } interface SubscriptionSettings$5 { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequency$5; /** * Interval of recurring payment. * * Default: `1`. * If SubscriptionFrequency is Day the minimum interval is 7 */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. */ billingCycles?: number | null; /** * Whether to allow the customer to cancel the subscription.. * @internal */ enableCustomerCancellation?: boolean; /** * Period until first cycle starts. If applied payNow will be 0 * If None => no free trial * @internal */ freeTrialPeriod?: FreeTrialPeriod$1; /** * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays. * @internal */ startDate?: Date | null; /** * Whether to generate an order each billing cycle. An order will always be generated for the first billing cycle. * Default None => will behave like true * @internal */ generateOrderEachBillingCycle?: boolean | null; } /** Frequency unit of recurring payment */ enum SubscriptionFrequency$5 { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } interface FreeTrialPeriod$1 { /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */ frequency?: SubscriptionFrequency$5; /** interval of period */ interval?: number; } interface Title$1 { /** Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Subscription option name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface Description$1 { /** Subscription option description. */ original?: string; /** Translated subscription option description. */ translated?: string | null; } interface SecuredMedia$2 { /** Media ID in Wix Media Manager. */ _id?: string; /** Original filename. */ fileName?: string; /** File type. */ fileType?: FileType$2; } enum FileType$2 { UNSPECIFIED = "UNSPECIFIED", SECURE_PICTURE = "SECURE_PICTURE", SECURE_VIDEO = "SECURE_VIDEO", SECURE_DOCUMENT = "SECURE_DOCUMENT", SECURE_MUSIC = "SECURE_MUSIC", SECURE_ARCHIVE = "SECURE_ARCHIVE" } /** Type of selected payment option for catalog item */ enum V1PaymentOptionType { /** The entire payment for this item happens as part of the checkout. */ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE", /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE", /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */ MEMBERSHIP = "MEMBERSHIP", /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */ DEPOSIT_ONLINE = "DEPOSIT_ONLINE", /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE" } interface ServiceProperties$3 { /** * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * For example, the start time of a class. */ scheduledDate?: Date | null; /** The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. */ numberOfParticipants?: number | null; } interface PriceDescription$3 { /** __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Price description translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface CatalogOverrideFields$1 { /** Item name. */ productName?: ProductName$3; /** Item price **after** discounts. */ price?: string | null; /** Item price **before** discounts. */ fullPrice?: string | null; /** Item description lines. Used when displaying the line item to customers. */ descriptionLines?: DescriptionLine$3[]; /** Physical properties of the item. */ physicalProperties?: PhysicalProperties$5; /** Item image. */ image?: string; /** Payment method selected for the item. */ paymentOption?: V1PaymentOption; /** Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`. */ depositAmount?: string | null; /** * Whether to save the payment method on the order. * * Default: `false` */ savePaymentMethod?: boolean | null; } interface V1PaymentOption { /** * + `FULL_PAYMENT_ONLINE`: The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP`: Payment for this item is done by charging a membership. When selected, `price` is `0`. * + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`. * + `MEMBERSHIP_OFFLINE`: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ value?: V1PaymentOptionType; } interface TaxableAddress$4 extends TaxableAddressTaxableAddressDataOneOf$4 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$4; } /** @oneof */ interface TaxableAddressTaxableAddressDataOneOf$4 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$4; } enum TaxableAddressType$4 { UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS", BUSINESS = "BUSINESS", BILLING = "BILLING", SHIPPING = "SHIPPING" } interface ExtendedFields$8 { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface Policy$1 { /** Policy title - should be translated */ title?: string | null; /** Policy content - should be translated */ content?: string; } /** Billing Info and shipping details */ interface AddressWithContact$3 { /** Address. */ address?: ApiAddress; /** Contact details. */ contactDetails?: FullAddressContactDetails$4; /** * Reference to address service. * @internal */ addressesServiceId?: string | null; } /** Physical address */ interface ApiAddress { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress$7; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** @internal */ location?: AddressLocation$7; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } interface StreetAddress$7 { /** Street number. */ number?: string; /** Street name. */ name?: string; /** * Apartment number. * @internal */ apt?: string; /** * Optional address line 1 * @internal */ formattedAddressLine?: string | null; } interface AddressLocation$7 { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } /** Full contact details for an address */ interface FullAddressContactDetails$4 { /** First name. */ firstName?: string | null; /** Last name. */ lastName?: string | null; /** Phone number. */ phone?: string | null; /** Company name. */ company?: string | null; /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */ vatId?: CommonVatId; } interface CommonVatId { /** Customer's tax ID. */ _id?: string; /** * Tax type. * * Supported values: * + `CPF`: for individual tax payers * + `CNPJ`: for corporations */ type?: CommonVatType; } /** tax info types */ enum CommonVatType { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } interface ShippingInfo$2 { /** Shipping address and contact details. */ shippingDestination?: AddressWithContact$3; /** Selected option out of the options allowed for the `region`. */ selectedCarrierServiceOption?: SelectedCarrierServiceOption$2; /** * Shipping region. Based on the address provided. * @readonly */ region?: ShippingRegion$4; /** * All carrier options for this shipping rule. * @readonly */ carrierServiceOptions?: CarrierServiceOption$2[]; } interface SelectedCarrierServiceOption$2 { /** Unique identifier of selected option. For example, "usps_std_overnight". */ code?: string; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". * @readonly */ title?: string; /** * Delivery logistics. * @readonly */ logistics?: DeliveryLogistics$5; /** * Shipping costs. * @readonly */ cost?: SelectedCarrierServiceOptionPrices$2; /** * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) * @readonly */ requestedShippingOption?: boolean; /** Other charges */ otherCharges?: SelectedCarrierServiceOptionOtherCharge$2[]; /** This carrier's unique ID */ carrierId?: string | null; /** * Delivery solution allocations to different delivery carriers and delivery regions * @internal */ deliveryAllocations?: DeliveryAllocation$3[]; /** * If the delivery solution is a partial and doesn't apply to all items. * @internal */ partial?: boolean | null; } interface DeliveryLogistics$5 { /** Expected delivery time, in free text. For example, "3-5 business days". */ deliveryTime?: string | null; /** Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */ instructions?: string | null; /** Pickup details. */ pickupDetails?: PickupDetails$6; /** * Expected delivery time slot (from and to time stamps representation) * @internal */ deliveryTimeSlot?: DeliveryTimeSlot$5; } interface PickupDetails$6 { /** Pickup address. */ address?: ApiAddress; /** * Whether the pickup address is that of a business - this may effect tax calculation. * @deprecated */ businessLocation?: boolean; /** Pickup method */ pickupMethod?: PickupMethod$5; } enum PickupMethod$5 { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } interface DeliveryTimeSlot$5 { /** starting time of the delivery time slot */ from?: Date | null; /** ending time of the delivery time slot */ to?: Date | null; } interface SelectedCarrierServiceOptionPrices$2 { /** Total shipping price, after discount and after tax. */ totalPriceAfterTax?: MultiCurrencyPrice$2; /** Total price of shipping after discounts (when relevant), and before tax. */ totalPriceBeforeTax?: MultiCurrencyPrice$2; /** Tax details. */ taxDetails?: ItemTaxFullDetails$4; /** Shipping discount before tax. */ totalDiscount?: MultiCurrencyPrice$2; /** Shipping price before discount and before tax. */ price?: MultiCurrencyPrice$2; } interface SelectedCarrierServiceOptionOtherCharge$2 { /** Type of additional cost. */ type?: ChargeType$4; /** Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */ details?: string | null; /** Price of added charge. */ cost?: SelectedCarrierServiceOptionPrices$2; } enum ChargeType$4 { HANDLING_FEE = "HANDLING_FEE", INSURANCE = "INSURANCE" } interface DeliveryAllocation$3 { /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */ deliveryCarrier?: Carrier$3; /** The delivery region that are relevant for this delivery solution. */ deliveryRegion?: Region$3; /** Populated if the delivery solution is a partially supplied by this carrier. */ applicableLineItems?: ApplicableLineItems$3; } interface Carrier$3 { /** The carrier app id */ appId?: string | null; /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; } interface Region$3 { /** The delivery region id. */ _id?: string | null; /** The delivery region name. */ name?: string | null; } interface ApplicableLineItems$3 { /** Line items that the delivery solution is for. */ lineItemIds?: string[]; } interface ShippingRegion$4 { /** * Shipping region ID. * @readonly */ _id?: string; /** Shipping region name. */ name?: string; } interface CarrierServiceOption$2 { /** Carrier ID. */ carrierId?: string; /** Shipping options offered by this carrier for this request. */ shippingOptions?: ShippingOption$4[]; } interface ShippingOption$4 { /** * Unique code of provided shipping option like "usps_std_overnight". * For legacy calculators this would be the UUID of the option. */ code?: string; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; /** Delivery logistics. */ logistics?: DeliveryLogistics$5; /** Sipping price information. */ cost?: ShippingPrice$4; /** * Delivery solution allocations to different delivery carriers and delivery regions * @internal */ deliveryAllocations?: DeliveryAllocation$3[]; /** * If the delivery solution is a partial and doesn't apply to all items. * @internal */ partial?: boolean | null; } interface ShippingPrice$4 { /** Shipping price. */ price?: MultiCurrencyPrice$2; /** Other costs such as insurance, handling & packaging for fragile items, etc. */ otherCharges?: OtherCharge$2[]; } interface OtherCharge$2 { /** Type of additional cost. */ type?: ChargeType$4; /** Price of added cost. */ price?: MultiCurrencyPrice$2; } interface BuyerInfo$5 extends BuyerInfoIdOneOf$3 { /** * Visitor ID - if the buyer is **not** a site member. * @readonly */ visitorId?: string; /** * Member ID - If the buyer is a site member. * @readonly */ memberId?: string; /** * + If `true`, the checkout doesn't have an owner yet and anyone can access it. The first to access it will be the new owner. * + If `false`, the value in `checkout.createdBy` is the owner. * @internal */ openAccess?: boolean; /** * Contact ID. For more information, see the Contacts API. * @readonly */ contactId?: string | null; /** Buyer email address. */ email?: string | null; } /** @oneof */ interface BuyerInfoIdOneOf$3 { /** * Visitor ID - if the buyer is **not** a site member. * @readonly */ visitorId?: string; /** * Member ID - If the buyer is a site member. * @readonly */ memberId?: string; /** * + If `true`, the checkout doesn't have an owner yet and anyone can access it. The first to access it will be the new owner. * + If `false`, the value in `checkout.createdBy` is the owner. * @internal */ openAccess?: boolean; } interface PriceSummary$4 { /** Subtotal of all line items, before discounts and before tax. */ subtotal?: MultiCurrencyPrice$2; /** Total shipping price, before discounts and before tax. */ shipping?: MultiCurrencyPrice$2; /** Total tax. */ tax?: MultiCurrencyPrice$2; /** Total calculated discount value. */ discount?: MultiCurrencyPrice$2; /** Total price after discounts, gift cards, and tax. */ total?: MultiCurrencyPrice$2; /** Total additional fees price before tax. */ additionalFees?: MultiCurrencyPrice$2; } interface CalculationErrors$3 extends CalculationErrorsShippingCalculationErrorOneOf$3 { /** General shipping calculation error. */ generalShippingCalculationError?: Details$4; /** Carrier errors. */ carrierErrors?: CarrierErrors$3; /** Tax calculation error. */ taxCalculationError?: Details$4; /** Coupon calculation error. */ couponCalculationError?: Details$4; /** Gift card calculation error. */ giftCardCalculationError?: Details$4; /** Order validation errors. */ orderValidationErrors?: ApplicationError$9[]; /** * Membership payment methods calculation errors * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid */ membershipError?: Details$4; /** Discount Rule calculation error. */ discountsCalculationError?: Details$4; } /** @oneof */ interface CalculationErrorsShippingCalculationErrorOneOf$3 { /** General shipping calculation error. */ generalShippingCalculationError?: Details$4; /** Carrier errors. */ carrierErrors?: CarrierErrors$3; } interface Details$4 extends DetailsKindOneOf$4 { applicationError?: ApplicationError$9; validationError?: ValidationError$4; systemError?: SystemError$4; /** * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response * @deprecated */ tracing?: Record; } /** @oneof */ interface DetailsKindOneOf$4 { applicationError?: ApplicationError$9; validationError?: ValidationError$4; systemError?: SystemError$4; } interface ApplicationError$9 { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } /** * example result: * { * "fieldViolations": [ * { * "field": "fieldA", * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]", * "violatedRule": "OTHER", * "ruleName": "INVALID_NOTE", * "data": { * "value": "FI" * } * }, * { * "field": "fieldB", * "description": "field value out of range. supported range: [0-20]", * "violatedRule": "MAX", * "data": { * "threshold": 20 * } * }, * { * "field": "fieldC", * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]", * "violatedRule": "FORMAT", * "data": { * "type": "PHONE" * } * } * ] * } */ interface ValidationError$4 { fieldViolations?: FieldViolation$4[]; } enum RuleType$4 { VALIDATION = "VALIDATION", OTHER = "OTHER", MAX = "MAX", MIN = "MIN", MAX_LENGTH = "MAX_LENGTH", MIN_LENGTH = "MIN_LENGTH", MAX_SIZE = "MAX_SIZE", MIN_SIZE = "MIN_SIZE", FORMAT = "FORMAT", DECIMAL_LTE = "DECIMAL_LTE", DECIMAL_GTE = "DECIMAL_GTE", DECIMAL_LT = "DECIMAL_LT", DECIMAL_GT = "DECIMAL_GT", DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE", INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE", REQUIRED_FIELD = "REQUIRED_FIELD", FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED", ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT", EXACT_LENGTH = "EXACT_LENGTH", EXACT_SIZE = "EXACT_SIZE" } interface FieldViolation$4 { field?: string; description?: string; violatedRule?: RuleType$4; /** applicable when violated_rule=OTHER */ ruleName?: string | null; data?: Record | null; } interface SystemError$4 { /** Error code. */ errorCode?: string | null; } interface CarrierErrors$3 { /** Carrier errors. */ errors?: CarrierError$4[]; } interface CarrierError$4 { /** Carrier ID. */ carrierId?: string; /** Error details. */ error?: Details$4; } interface GiftCard$4 { /** * Gift Card ID. * @deprecated */ _id?: string; /** Gift card obfuscated code. */ obfuscatedCode?: string; /** Gift card value. */ amount?: MultiCurrencyPrice$2; /** App ID of the gift card provider. */ appId?: string; /** * External ID in the gift card provider's system. * Used for integration and tracking across different platforms. */ externalId?: string | null; } interface AppliedDiscount$4 extends AppliedDiscountDiscountSourceOneOf$4 { /** Coupon details. */ coupon?: Coupon$4; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$4; /** Discount rule */ discountRule?: DiscountRule$4; /** Discount type. */ discountType?: DiscountType$4; /** * IDs of the line items the discount applies to. * @deprecated IDs of line items the discount applies to. * @replacedBy line_items_discounts * @targetRemovalDate 2024-06-01 */ lineItemIds?: string[]; /** * Discount ID. * @internal */ _id?: string | null; /** * Line items the discount applies to. * @internal */ lineItemDiscounts?: LineItemDiscount$4[]; /** * Number of subscription cycle this discount applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } /** @oneof */ interface AppliedDiscountDiscountSourceOneOf$4 { /** Coupon details. */ coupon?: Coupon$4; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$4; /** Discount rule */ discountRule?: DiscountRule$4; } enum DiscountType$4 { GLOBAL = "GLOBAL", SPECIFIC_ITEMS = "SPECIFIC_ITEMS", SHIPPING = "SHIPPING" } /** Coupon */ interface Coupon$4 { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** Coupon value. */ amount?: MultiCurrencyPrice$2; /** Coupon name. */ name?: string; /** * Coupon type: We want it to be an enum and not a string but currently we have no time to do it so we leave it as is to be aligned with cart summary. * @internal * @deprecated */ couponType?: string; } interface MerchantDiscount$4 { /** Discount value. */ amount?: MultiCurrencyPrice$2; /** Discount Percentage. Will be calculated from items price before other discounts. */ percentage?: number | null; } interface DiscountRule$4 { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: DiscountRuleName$4; /** Discount value. */ amount?: MultiCurrencyPrice$2; } interface DiscountRuleName$4 { /** Original discount rule name (in site's default language). */ original?: string; /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string | null; } interface LineItemDiscount$4 { /** ID of line item the discount applies to. */ _id?: string; /** Discount value. */ totalDiscountAmount?: MultiCurrencyPrice$2; } interface CustomField$4 { /** Custom field value. */ value?: any; /** Custom field title. */ title?: string; /** Translated custom field title. */ translatedTitle?: string | null; } enum WeightUnit$6 { /** Weight unit can't be classified, due to an error */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms */ KG = "KG", /** Pounds */ LB = "LB" } interface TaxSummary$4 { /** * Amount for which tax is calculated, added from line items. * @readonly */ taxableAmount?: MultiCurrencyPrice$2; /** * Calculated tax, added from line items. * @readonly */ totalTax?: MultiCurrencyPrice$2; /** * Manual tax rate * @internal * @readonly * @deprecated */ manualTaxRate?: string; /** * Tax calculator that was active when the order was created. * @deprecated */ calculationDetails?: TaxCalculationDetails$2; /** * Tax estimation id in tax service * @internal * @readonly */ taxEstimationId?: string | null; /** * Average Tax Rate * @internal * @readonly */ averageTaxRate?: string | null; /** * The amount of this estimate that was exempt (for all line items). * @internal * @readonly */ totalExempt?: MultiCurrencyPrice$2; /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * @internal * @readonly */ aggregatedTaxBreakdown?: AggregatedTaxBreakdown$2[]; } interface TaxCalculationDetails$2 extends TaxCalculationDetailsCalculationDetailsOneOf$2 { /** Reason the manual calculation was used. */ manualRateReason?: ManualCalculationReason$2; /** Details of the fallback rate calculation. */ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails$2; /** Rate calculation type. */ rateType?: RateType$2; } /** @oneof */ interface TaxCalculationDetailsCalculationDetailsOneOf$2 { /** Reason the manual calculation was used. */ manualRateReason?: ManualCalculationReason$2; /** Details of the fallback rate calculation. */ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails$2; } enum RateType$2 { /** no tax being collected for this request due to location of purchase */ NO_TAX_COLLECTED = "NO_TAX_COLLECTED", /** manual rate used for calculation */ MANUAL_RATE = "MANUAL_RATE", /** autotax rate used for calculation */ AUTO_RATE = "AUTO_RATE", /** fallback rate used for calculation */ FALLBACK_RATE = "FALLBACK_RATE" } enum ManualCalculationReason$2 { /** user set calculator in Business Manager to be Manual */ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL", /** specific region is on manual even though Global setting is Auto-tax */ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL" } interface AutoTaxFallbackCalculationDetails$2 { /** reason for fallback */ fallbackReason?: FallbackReason$2; /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */ error?: ApplicationError$9; } enum FallbackReason$2 { /** auto-tax failed to be calculated */ AUTO_TAX_FAILED = "AUTO_TAX_FAILED", /** auto-tax was temporarily deactivated on a system-level */ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED" } /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * Tax breakdown is the tax amount split to the tax authorities that applied on the line item. */ interface AggregatedTaxBreakdown$2 { /** The name of the tax against which this tax amount was calculated. */ taxName?: string; /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */ taxType?: string; /** The name of the jurisdiction in which this tax detail applies. */ jurisdiction?: string; /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ jurisdictionTypeEnum?: JurisdictionType$4; /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value) */ rate?: string; /** The sum of all the tax from line items that calculated by the tax identifiers. */ aggregatedTaxAmount?: MultiCurrencyPrice$2; /** * The sum of all the taxable amount from line items for tax identifiers. * @internal */ aggregatedTaxableAmount?: MultiCurrencyPrice$2; } enum ChannelType$4 { /** Unspecified sales channel. This value is not supported. */ UNSPECIFIED = "UNSPECIFIED", /** A web client. */ WEB = "WEB", /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */ POS = "POS", /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */ EBAY = "EBAY", /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */ AMAZON = "AMAZON", /** Other sales platform. */ OTHER_PLATFORM = "OTHER_PLATFORM", /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */ WIX_APP_STORE = "WIX_APP_STORE", /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */ WIX_INVOICES = "WIX_INVOICES", /** Wix merchant backoffice. */ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT", /** Wish sales channel. */ WISH = "WISH", /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */ CLASS_PASS = "CLASS_PASS", /** Global-E sales channel. */ GLOBAL_E = "GLOBAL_E", /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */ FACEBOOK = "FACEBOOK", /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */ ETSY = "ETSY", /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */ TIKTOK = "TIKTOK", /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */ FAIRE_COM = "FAIRE_COM" } interface CreatedBy$4 extends CreatedByIdOneOf$2 { /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; /** App ID - when the order was created by an external application or Wix service. */ appId?: string; } /** @oneof */ interface CreatedByIdOneOf$2 { /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; /** App ID - when the order was created by an external application or Wix service. */ appId?: string; } /** Reserved for internal use. */ interface MembershipOptions$2 { /** * Reserved for internal use. * @readonly */ eligibleMemberships?: Membership$2[]; /** * Reserved for internal use. * @readonly */ invalidMemberships?: InvalidMembership$2[]; /** Selected membership to apply to this checkout. */ selectedMemberships?: SelectedMemberships$2; } interface Membership$2 { /** Membership ID. */ _id?: string; /** ID of the application providing this payment option. */ appId?: string; /** The name of this membership. */ name?: MembershipName$4; /** Line item IDs which are "paid for" by this membership. */ lineItemIds?: string[]; /** Optional - For a membership that has limited credits, information about credit usage. */ credits?: MembershipPaymentCredits$2; /** Optional - TMembership expiry date. */ expirationDate?: Date | null; /** Additional data about this membership. */ additionalData?: Record | null; } interface MembershipName$4 { /** Membership name. */ original?: string; /** Translated membership name. Defaults to `original` when not provided. */ translated?: string | null; } interface MembershipPaymentCredits$2 { /** Membership's total amount of credits. */ total?: number; /** Membership's remaining amount of credits. */ remaining?: number; } interface InvalidMembership$2 { /** Membership details. */ membership?: Membership$2; /** Reason why this membership is invalid and cannot be used. */ reason?: string; } interface SelectedMemberships$2 { /** Selected memberships. */ memberships?: SelectedMembership$2[]; } interface SelectedMembership$2 { /** Membership ID. */ _id?: string; /** ID of the app providing this payment option. */ appId?: string; /** IDs of the line items this membership applies to. */ lineItemIds?: string[]; } interface AdditionalFee$4 { /** Additional fee's unique code (or ID) for future processing. */ code?: string | null; /** Translated additional fee's name. */ name?: string; /** Additional fee's price. */ price?: MultiCurrencyPrice$2; /** Tax details. */ taxDetails?: ItemTaxFullDetails$4; /** Provider's app id. */ providerAppId?: string | null; /** Additional fee's price before tax. */ priceBeforeTax?: MultiCurrencyPrice$2; /** Additional fee's price after tax. */ priceAfterTax?: MultiCurrencyPrice$2; /** * Optional - Line items associated with this additional fee. * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. */ lineItemIds?: string[]; /** * Number of subscription cycle this fee applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } interface ConversionInfo$1 { /** * The site currency. * @readonly */ siteCurrency?: string; /** * The rate used when converting from the site currency to the checkout currency. * @readonly */ conversionRate?: string; } interface Violation$1 { /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */ severity?: Severity$1; /** Target location on a checkout or cart page where the violation will be displayed. */ target?: Target$1; /** Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `Click me`. */ description?: string | null; } enum Severity$1 { /** The user is allowed to move forward in the flow. */ WARNING = "WARNING", /** * The user is blocked from moving forward in the flow. * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked. */ ERROR = "ERROR" } interface Target$1 extends TargetTargetTypeOneOf$1 { /** General (other) violation. */ other?: Other$1; /** Specific line item violation. */ lineItem?: TargetLineItem$1; } /** @oneof */ interface TargetTargetTypeOneOf$1 { /** General (other) violation. */ other?: Other$1; /** Specific line item violation. */ lineItem?: TargetLineItem$1; } /** Available locations on the webpage */ enum NameInOther$1 { /** Default location, in case no specific location is specified. */ OTHER_DEFAULT = "OTHER_DEFAULT", /** Delivery section. */ DELIVERY = "DELIVERY" } /** Available locations on the line item */ enum NameInLineItem$1 { /** Default location, in case no specific location is specified. */ LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT" } enum SuggestedFix$1 { /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */ UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX", /** The line item should be removed from the cart or checkout to resolve the violation. */ REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM" } /** General (other) violation. */ interface Other$1 { /** Location on a checkout or a cart page where a general (other) violation will be displayed. */ name?: NameInOther$1; } /** Specific line item violation. */ interface TargetLineItem$1 { /** Location on a checkout or a cart page where the specific line item violation will be displayed. */ name?: NameInLineItem$1; /** ID of the line item containing the violation. */ _id?: string | null; /** * Suggested fix for resolving the line item violation. * @internal */ suggestedFix?: SuggestedFix$1; } interface CustomSettings$1 { /** * Whether to restrict the option to add or remove a gift card on the checkout page. * * Default: `false` */ lockGiftCard?: boolean; /** * Whether to restrict the option to add or remove a coupon code on the checkout page. * * Default: `false` */ lockCouponCode?: boolean; /** * Whether to disable policy agreement checkout in the checkout page * * Default: `false` */ disabledPolicyAgreementCheckbox?: boolean; /** * Whether to disable manual payment option for this checkout. * * Default: `false` */ disabledManualPayment?: boolean; } interface CustomContentReference$1 { /** * ID of the app providing the content. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). */ appId?: string; /** * ID of the component within the app it belongs to. * * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). */ componentId?: string; } interface ExternalReference$2 { /** * ID of the app associated with the purchase flow. * For example, the Wix Pay Links app ID. */ appId?: string; /** * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system. * For example, a Wix Pay Link ID. */ resourceId?: string | null; } interface UpdatedCheckoutMessage { /** Previous checkout. */ oldCheckout?: Checkout$1; /** Updated checkout. */ updatedCheckout?: Checkout$1; } interface CreateCheckoutRequest { /** Checkout information. */ checkoutInfo?: Checkout$1; /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string | null; /** Catalog line items to add to the checkout. */ lineItems?: LineItem$4[]; /** * Custom line items to add to the checkout. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$2[]; /** * Sales channel that submitted the order. * + `"UNSPECIFIED"`: Unspecified sales channel. This value is not supported. * + `"WEB"`: A web client. * + `"POS"`: [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395) * + `"EBAY"`: [eBay](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop) * + `"AMAZON"`: [Amazon](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop) * + `"WISH"`: [Wish](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-a-wish-shop) * + `"WIX_INVOICES"`: Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) * + `"WIX_APP_STORE"`: [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview) * + `"BACKOFFICE_MERCHANT"`: Wix merchant backoffice * + `"OTHER_PLATFORM"`: Other sales platform. */ channelType: ChannelType$4; /** * Gift card code. * * The checkout can only hold 1 `giftCardCode` at a time. If an additional `giftCardCode` is added, it will override the existing `giftCardCode`. * * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards). */ giftCardCode?: string | null; /** * Merchant discounts to apply to specific line items. * If no `lineItemIds` are passed, the discount will be applied to the whole checkout. * * >**Note:** Merchant discounts are restricted and can only be applied if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. * @internal */ merchantDiscounts?: MerchantDiscountInput$1[]; /** * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page. * * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`. */ overrideCheckoutUrl?: string | null; } interface CustomLineItem$2 { /** * Custom line item quantity. * * Min: `1` * Max: `100000` */ quantity?: number; /** Custom line item price. For security reasons, the `price` field should come from backend Velo code, and not be passed from the frontend. */ price?: string; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription$3; /** Custom line item description lines. Used for displaying the cart, checkout and order. */ descriptionLines?: DescriptionLine$3[]; /** * Custom line item media. * + Link to an image/video from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager) - `"wix:image://v1/3c76e2_c53...4ea4~mv2.jpg#originWidth=1000&originHeight=1000"`. * + An image from the web - `"http(s)://"`. */ media?: string; /** * Custom line item ID. If passed, `id` must be unique. * * Default: auto-generated ID */ _id?: string | null; /** Tax group ID for this custom line item. */ taxGroupId?: string | null; /** Name of the item or product. */ productName?: ProductName$3; /** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */ url?: string; /** Item type. Either a preset type or custom. */ itemType?: ItemType$4; /** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: string | null; /** * Item quantity available for purchase. Only return this if inventory is managed. * Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart. */ quantityAvailable?: number | null; /** Physical properties of the item. */ physicalProperties?: PhysicalProperties$5; /** * Subscription option info. This field is internal and only used by Stores. * @internal */ subscriptionOptionInfo?: SubscriptionOptionInfo$2; /** * Digital file ID and name. Required if `itemType: DIGITAL`. * @internal */ digitalFile?: SecuredMedia$2; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * * + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field. */ paymentOption?: V1PaymentOptionType; /** * Service properties. When relevant, this contains information such as date and number of participants. * Used, among other things, when checking for valid memberships. */ serviceProperties?: ServiceProperties$3; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field is the same as `catalogReference.catalogItemId`. * + Used in membership validation. */ rootCatalogItemId?: string | null; /** * Partial payment for the given item to be paid upfront during the checkout. * * Eligible for catalog items with type `DEPOSIT_ONLINE`. * When omitted, the item's price will not be split and is expected to be paid in a single installment. */ depositAmount?: string | null; /** * Delivery Profile ID. * @internal */ deliveryProfileId?: string | null; /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$6; /** * Whether the price is not yet defined, and will be updated after the order is created. * * Default: `false` * @internal */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * * Default: `false` * @internal */ fixedQuantity?: boolean; /** * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page. * @readonly */ consentRequiredPaymentPolicy?: string | null; /** * Whether to save the payment method on the order. * * Default: `false` * @readonly */ savePaymentMethod?: boolean; /** * Policies to be displayed to the customer on the checkout page. * @internal */ policies?: Policy$1[]; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; } interface MerchantDiscountInput$1 { /** Discount amount. */ amount?: string; /** IDs of the line items the discount applies to. */ lineItemIds?: string[]; } interface CreateCheckoutResponse { /** Newly created checkout. */ checkout?: Checkout$1; } interface ShippingCalculationErrorData extends ShippingCalculationErrorDataShippingCalculationErrorOneOf { generalShippingCalculationError?: Details$4; carrierErrors?: CarrierErrors$3; } /** @oneof */ interface ShippingCalculationErrorDataShippingCalculationErrorOneOf { generalShippingCalculationError?: Details$4; carrierErrors?: CarrierErrors$3; } interface GetCheckoutRequest { /** Checkout ID. */ _id: string; /** * Whether to refresh the checkout from external sources. Defaults to true. * @internal */ refresh?: boolean | null; } interface GetCheckoutResponse { /** The requested checkout. */ checkout?: Checkout$1; } interface GetCheckoutWithAllExtendedFieldsRequest { /** Checkout ID. */ _id?: string; /** * Whether to refresh the checkout from external sources. Defaults to true. * @internal */ refresh?: boolean | null; } interface GetCheckoutWithAllExtendedFieldsResponse { /** The requested checkout. */ checkout?: Checkout$1; } interface GetCheckoutByCartIdRequest { /** Cart ID. */ _id: string; } interface GetCheckoutByCartIdResponse { /** The requested checkout. */ checkout?: Checkout$1; } interface GetWixCheckoutURLRequest { /** Checkout ID. */ _id: string; /** * cart id to compare with for migration period * @internal */ cartId?: string | null; /** * checkout currency parameter to append * @internal */ currencyCode?: string | null; } interface GetWixCheckoutURLResponse { /** Checkout URL. */ checkoutUrl?: string; } interface GetCheckoutURLRequest { /** Checkout ID. */ _id: string; /** * Checkout currency parameter to append as a query param * @internal */ currencyCode?: string | null; } interface GetCheckoutURLResponse { /** Checkout URL. */ checkoutUrl?: string; } interface UpdateCheckoutRequest { /** Checkout information. */ checkout: Checkout$1; /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string | null; /** Gift card code. */ giftCardCode?: string | null; /** * Set of fields to update. Fields are inferred. * @internal */ fieldMask?: string[]; /** * Merchant discounts to apply to specific line items. * If no `lineItemIds` are passed, the discount will be applied to the whole checkout. * * >**Note:** Merchant discounts are restricted and can only be applied if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. * @internal */ merchantDiscounts?: MerchantDiscountInput$1[]; /** * When true, calculation errors won't fail the update request. When empty or false, the update won't happen and relevant error will return * @internal */ ignoreCalculationErrors?: boolean | null; /** * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page. * * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`. */ overrideCheckoutUrl?: string | null; /** Catalog line items. */ lineItems?: LineItem$4[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$2[]; } interface UpdateCheckoutResponse { /** Updated checkout. */ checkout?: Checkout$1; } interface RemoveCouponRequest { /** ID of the checkout to remove the coupon from. */ _id: string; } interface RemoveCouponResponse { /** Updated checkout after removal of coupon. */ checkout?: Checkout$1; } interface RemoveGiftCardRequest { /** ID of the checkout to remove the gift card from. */ _id: string; } interface RemoveGiftCardResponse { /** Updated checkout after removal of gift card. */ checkout?: Checkout$1; } interface RemoveOverrideCheckoutUrlRequest { /** ID of the checkout to remove the override checkout url from. */ _id: string; } interface RemoveOverrideCheckoutUrlResponse { /** Updated checkout after removal of override checkout url. */ checkout?: Checkout$1; } interface AddToCheckoutRequest { /** Checkout ID. */ _id: string; /** Catalog line items. */ lineItems?: LineItem$4[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$2[]; } interface AddToCheckoutResponse { /** Updated checkout. */ checkout?: Checkout$1; } interface RemoveLineItemsRequest { /** ID of the checkout to remove line items from. */ _id: string; /** IDs of the line items to remove from the checkout. */ lineItemIds: string[]; } interface RemoveLineItemsResponse { /** Updated checkout after removal of line items. */ checkout?: Checkout$1; } interface CreateOrderRequest$1 { /** Checkout ID. */ _id: string; /** * Custom URL params to be added to redirect URLs. * @internal */ urlParams?: Record; /** Indicates the payment method should be saved on the order */ savePaymentMethod?: boolean; /** Indicates whether to authorize the payment and delay the capture */ delayCapture?: boolean; } interface CreateOrderResponse$1 extends CreateOrderResponseIdOneOf { /** ID of the newly created order. */ orderId?: string; /** ID of newly created subscription. Learn more about your site's [Subscriptions](https://support.wix.com/en/article/wix-stores-managing-product-subscriptions). */ subscriptionId?: string; /** * Payment gateway order ID. * * For online orders, pass this value as the `paymentId` parameter to the Wix Pay [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function so your customer can pay for the order. * * This field will be returned if money needs to be charged. In some cases, money cannot be charged: * + When the total price (the `priceSummary.total.amount` field in the checkout/order objects) is 0. For example, in the case of a free item or an item with a 100% discount. * + If the total price is not 0, but the payment is covered by alternative payment methods, such as a gift card. */ paymentGatewayOrderId?: string | null; } /** @oneof */ interface CreateOrderResponseIdOneOf { /** ID of newly created order. */ orderId?: string; /** ID of newly created subscription. Learn more about your site's [Subscriptions](https://support.wix.com/en/article/wix-stores-managing-product-subscriptions). */ subscriptionId?: string; } interface PaymentErrorResponseData { paymentResponseToken?: string | null; transactionStatus?: string; failureDetails?: string | null; } interface DoublePaymentErrorData extends DoublePaymentErrorDataIdOneOf { orderId?: string; subscriptionId?: string; } /** @oneof */ interface DoublePaymentErrorDataIdOneOf { orderId?: string; subscriptionId?: string; } interface RedeemErrorData { reason?: string; } interface ViolationsList { /** Violations risen by ValidationsSPI implementers. */ violations?: Violation$1[]; } interface CreateOrderAndChargeRequest { /** Checkout ID. */ _id: string; /** Payment token. */ paymentToken?: string | null; /** * Custom URL params to be added to redirect URLs. * @internal */ urlParams?: Record; /** Indicates the payment method should be saved on the order */ savePaymentMethod?: boolean; /** Indicates whether to authorize the payment and delay the capture */ delayCapture?: boolean; } interface CreateOrderAndChargeResponse extends CreateOrderAndChargeResponseIdOneOf { /** ID of newly created order. */ orderId?: string; /** ID of newly created subscription. */ subscriptionId?: string; /** Payment response token. */ paymentResponseToken?: string | null; /** * For online orders, send this value as a parameter to the Wix Pay [`startPayment()`](https://www.wix.com/velo/reference/wix-pay/startpayment) function to enable your buyer to pay for the order. * `paymentGatewayOrderId` will be returned if money needs to be charged. * * In some cases, money should not be charged: * + If the total price is 0. For example, in the case of a free item or an item with 100% discount. * + If the total price is not 0, but the payment is covered by alternative payment methods, such as a gift card. */ paymentGatewayOrderId?: string | null; } /** @oneof */ interface CreateOrderAndChargeResponseIdOneOf { /** ID of newly created order. */ orderId?: string; /** ID of newly created subscription. */ subscriptionId?: string; } interface MarkCheckoutAsCompletedRequest { /** Checkout ID. */ _id: string; /** * Order ID. * @internal */ orderId?: string | null; } interface MarkCheckoutAsCompletedResponse { } /** Triggered when buyer successfully completed checkout flow */ interface CheckoutMarkedAsCompleted { checkout?: Checkout$1; } interface UpdateLineItemsQuantityRequest { /** Checkout ID. */ _id: string; /** Line item info to update. */ lineItems: LineItemQuantityUpdate[]; } interface LineItemQuantityUpdate { /** ID of the line item to update. */ _id?: string; /** * New total amount of the line item, * not the amount to add to the current `quantity`. * * Min: `1` * * Max: `100000` */ quantity?: number; } interface UpdateLineItemsQuantityResponse { /** Updated checkout. */ checkout?: Checkout$1; } interface GetCheckoutPaymentSettingsRequest { /** Checkout ID. */ _id: string; } interface GetCheckoutPaymentSettingsResponse { blockedPaymentOptions?: PaymentOption$1[]; } enum PaymentOption$1 { UNKNOWN_PAYMENT_OPTION = "UNKNOWN_PAYMENT_OPTION", MANUAL = "MANUAL" } interface SubscriptionCreated { subscription?: Subscription; } interface Subscription { /** * Subscription id (auto-generated upon subscription creation) * @readonly */ _id?: string; /** id of subscription in external system */ externalId?: string | null; /** * Subscription creation date * @readonly */ dateCreated?: Date | null; /** The id of the cart this order was created from */ cartId?: string | null; /** The id of the checkout this subscriptions was created from */ checkoutId?: string | null; /** member or contact */ buyerInfo?: V1BuyerInfo; /** Line items ordered */ lineItems?: V1LineItem$1[]; /** Totals for subscription's line items */ totals?: Totals$1; /** site settings at the moment when subscription created */ storeSettings?: StoreSettings; /** Full billing address */ billingAddress?: Address$8; /** Delivery information */ shippingInfo?: V1ShippingInfo; /** Coupon that was applied to subscription */ appliedCoupon?: AppliedCoupon$1; /** Message from the customer (e.g., customization request) */ buyerNote?: string | null; /** Custom field */ customField?: V1CustomField; /** Information about subscription option from which subscription was created */ subscriptionOptionInfo?: V1SubscriptionOptionInfo; /** Sales channel that submitted this subscription */ channelInfo?: ChannelInfo$3; /** defines when subscriber will be charged: for frequency=MONTH, billingCycles=6, interval=2 payment will be done every 2 month during one year */ subscriptionSettings?: V1SubscriptionSettings; /** * information about first subscription payment * @readonly */ billingInfo?: BillingInfo$1; } /** Buyer Info */ interface V1BuyerInfo { /** Wix customer ID */ _id?: string; /** Customer type */ identityType?: IdentityType$4; /** @internal */ visitorId?: string | null; } enum IdentityType$4 { UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE", /** Site member */ MEMBER = "MEMBER", /** Contact */ CONTACT = "CONTACT" } interface V1LineItem$1 { /** Line item ID (auto-generated) */ index?: number; /** Line item quantity */ quantity?: number; /** Line item variantId (from Stores Catalog) */ variantId?: string | null; /** Line item options ordered */ options?: OptionSelection$1[]; /** Line item custom text field selections */ customTextFields?: CustomTextFieldSelection$1[]; /** Charges details */ chargeDetails?: ChargeDetails; /** Product details */ productDetails?: ProductDetails; } interface OptionSelection$1 { /** Option name */ option?: string; /** Selected choice for this option */ selection?: string; } interface CustomTextFieldSelection$1 { /** Custom text field name */ title?: string; /** Custom text field value */ value?: string; } interface ChargeDetails { /** price of line item (depends on subscription option) */ price?: number; /** Total price charged to the customer (for this line items) after computation of quantity and discount */ totalPrice?: number | null; /** Discount applied for this line item */ discount?: number | null; /** Tax applied for this line item */ tax?: number | null; /** Is tax applied for this line item */ taxIncludedInPrice?: boolean; /** Tax rate %, as a decimal point >= 0 */ taxRate?: string | null; } interface ProductDetails { /** Line item product ID (optional for POS orders) */ productId?: string | null; /** Line item name */ name?: string; /** Line item name translated to buyer's language */ translatedName?: string | null; /** Line item type (may be extended) */ lineItemType?: LineItemType$1; /** Line item primary media for preview */ mediaItem?: MediaItem$1; /** Line item SKU */ sku?: string | null; /** Line item weight */ weight?: number | null; /** Line item notes */ notes?: string | null; /** Line item fulfillerId from stores fulfillers. No value means self fulfilled */ fulfillerId?: string | null; /** Tax group id */ taxGroupId?: string | null; /** App id from the catalog reference */ appId?: string | null; } enum LineItemType$1 { /** Line item type can't be classified, due to an error */ UNSPECIFIED_LINE_ITEM_TYPE = "UNSPECIFIED_LINE_ITEM_TYPE", /** Physical item type */ PHYSICAL = "PHYSICAL", /** Digital item type */ DIGITAL = "DIGITAL", /** Custom item price */ CUSTOM_AMOUNT_ITEM = "CUSTOM_AMOUNT_ITEM" } interface MediaItem$1 { /** * Media type * @readonly */ mediaType?: MediaItemType$1; /** * Media URL * @readonly */ url?: string; /** * Media item width * @readonly */ width?: number; /** * Media item height * @readonly */ height?: number; /** Media ID (for media items previously saved in Wix Media) */ _id?: string | null; /** Media external URL */ externalImageUrl?: string | null; /** Alternative text for presentation when media cannot be displayed */ altText?: string | null; } enum MediaItemType$1 { /** Media item type can't be classified, due to an error */ UNSPECIFIED_MEDIA_TYPE_ITEM = "UNSPECIFIED_MEDIA_TYPE_ITEM", /** Image item type */ IMAGE = "IMAGE" } interface Totals$1 { /** Subtotal of all line items, before tax */ subtotal?: number; /** Total shipping price, including tax */ shipping?: number; /** * Total shipping price, after tax (identical to shipping) * @internal */ shippingAfterTax?: number; /** * Total shipping price, before tax * @internal */ shippingBeforeTax?: number; /** Total tax */ tax?: number; /** Total calculated discount value */ discount?: number; /** Total price */ total?: number; /** Total weight */ weight?: number | null; /** * Total line items quantity * @readonly */ quantity?: number; } interface StoreSettings { /** Currency used for pricing in this store */ currency?: string | null; /** Weight unit used in this store */ weightUnit?: WeightUnit$6; /** * The language to be used when communicating with the buyer * For a site that support multiple languages, this would be the language the buyer selected * Otherwise this would be the site language */ buyerLanguage?: string | null; } interface Address$8 extends AddressAddressLine1OptionsOneOf$1 { /** Address line 1 (free text) */ addressLine1?: string; /** Address line 1 (street) */ street?: Street$1; /** Addressee name */ fullName?: FullName$1; /** Country code (2 letters) */ country?: string | null; /** State or district */ subdivision?: string | null; /** City name */ city?: string | null; /** ZIP/postal code */ zipCode?: string | null; /** Phone number */ phone?: string | null; /** Company name */ company?: string | null; /** Email address */ email?: string | null; /** address line */ addressLine2?: string | null; /** Tax information (for Brazil only) */ vatId?: VatId$5; } /** @oneof */ interface AddressAddressLine1OptionsOneOf$1 { /** Address line 1 (free text) */ addressLine1?: string; /** Address line 1 (street) */ street?: Street$1; } interface FullName$1 { /** Customer's first name */ firstName?: string; /** Customer's last name */ lastName?: string; } interface Street$1 { /** Street number */ number?: string; /** Street name */ name?: string; } interface VatId$5 { /** Customer's tax ID. */ number?: string; /** * Tax type. * + `CPF`: For individual tax payers. * + `CNPJ`: For corporations. */ type?: VatType$5; } /** Brazilian tax info types */ enum VatType$5 { /** When the tax info type can't be classified, due to an error */ UNSPECIFIED_TAX_TYPE = "UNSPECIFIED_TAX_TYPE", /** CPF - for individual tax payers */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } interface V1ShippingInfo extends V1ShippingInfoDetailsOneOf { /** Shipment details (when this object describes shipment) */ shipmentDetails?: ShipmentDetails$1; /** Pickup details (when this object describes pickup) */ pickupDetails?: V1PickupDetails$1; /** Delivery option name */ deliveryOption?: string; /** Delivery option delivery time */ estimatedDeliveryTime?: string | null; } /** @oneof */ interface V1ShippingInfoDetailsOneOf { /** Shipment details (when this object describes shipment) */ shipmentDetails?: ShipmentDetails$1; /** Pickup details (when this object describes pickup) */ pickupDetails?: V1PickupDetails$1; } interface ShipmentDetails$1 { /** Shipping destination address */ address?: Address$8; /** Discount applied for shipping */ discount?: number | null; /** Tax applied for shipping */ tax?: number | null; /** Whether tax is included in the price */ taxIncludedInPrice?: boolean; /** Tax rate % for shipping, as a decimal point >= 0 */ taxRate?: string | null; } interface V1PickupDetails$1 { /** Pickup address */ address?: PickupAddress$3; /** Store owner's pickup instructions */ pickupInstructions?: string | null; } interface PickupAddress$3 { /** Country code (2 letters) */ country?: string; /** State/District */ subdivision?: string | null; /** Address */ addressLine?: string; /** City */ city?: string; /** ZIP/postal code */ zipCode?: string; } interface AppliedCoupon$1 { /** Coupon ID */ couponId?: string; /** Coupon name */ name?: string; /** Coupon code */ code?: string; } /** Custom field */ interface V1CustomField { /** Free text that the customer entered in the custom field during the checkout process */ value?: string; /** Title for the custom field */ title?: string; /** The title translated according to the buyer language */ translatedTitle?: string; } interface V1SubscriptionOptionInfo { _id?: string | null; title?: string; description?: string | null; discount?: Discount$2; } interface Discount$2 { /** Discount type. */ type?: DiscountDiscountType; /** Discount value. */ value?: number; } enum DiscountDiscountType { UNDEFINED = "UNDEFINED", /** No discount */ AMOUNT = "AMOUNT", PERCENT = "PERCENT" } interface ChannelInfo$3 { /** Sales channel that submitted the subscription */ type?: ChannelInfoChannelType; } enum ChannelInfoChannelType { UNSPECIFIED = "UNSPECIFIED", WEB = "WEB", OTHER_PLATFORM = "OTHER_PLATFORM", WIX_APP_STORE = "WIX_APP_STORE" } interface V1SubscriptionSettings { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequency$5; /** * Interval of recurring payment (optional: default value 1 will be used if not provided) * @internal */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number | null; } interface BillingInfo$1 { /** Payment method used for this order */ paymentMethod?: string | null; /** Transaction ID from payment gateway (e.g., Wix Payments) */ paymentGatewayTransactionId?: string | null; /** Order ID from payment gateway (e.g., Wix Payments) */ paymentGatewayOrderId?: string | null; } interface Empty$9 { } interface DomainEvent$g extends DomainEventBodyOneOf$g { createdEvent?: EntityCreatedEvent$g; updatedEvent?: EntityUpdatedEvent$g; deletedEvent?: EntityDeletedEvent$g; actionEvent?: ActionEvent$g; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$g { createdEvent?: EntityCreatedEvent$g; updatedEvent?: EntityUpdatedEvent$g; deletedEvent?: EntityDeletedEvent$g; actionEvent?: ActionEvent$g; } interface EntityCreatedEvent$g { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$g; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$g { deletedDate?: Date | null; } interface EntityUpdatedEvent$g { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$g { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$g { bodyAsJson?: string; } interface MessageEnvelope$f { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$g; /** Stringify payload. */ data?: string; } interface IdentificationData$g extends IdentificationDataIdOneOf$g { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$f; } /** @oneof */ interface IdentificationDataIdOneOf$g { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$f { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates a checkout. * * * The `createCheckout()` function returns a Promise that resolves to the new checkout when it's created. * * > **Notes:** * > + Checkout must include at least 1 item in the `options.lineItems` array. * > + `options.channelType` is required. * > + If `_id` for `options.lineItems` is added, make sure that each `_id` is unique. * > + If `options.checkoutInfo.customFields` are added, then `options.checkoutInfo.customFields.value` is required. * @public * @requiredField options.channelType * @requiredField options.checkoutInfo.customFields.value * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships._id * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.appId * @requiredField options.checkoutInfo.membershipOptions.selectedMemberships.memberships.lineItemIds * @requiredField options.customLineItems.descriptionLines * @requiredField options.customLineItems.descriptionLines.name * @requiredField options.customLineItems.itemType * @requiredField options.customLineItems.price * @requiredField options.customLineItems.productName * @requiredField options.customLineItems.quantity * @requiredField options.lineItems.catalogReference * @requiredField options.lineItems.catalogReference.appId * @requiredField options.lineItems.catalogReference.catalogItemId * @requiredField options.lineItems.quantity * @param options - Checkout creation options. * @permissionId ECOM.MODIFY_CHECKOUTS * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS * @returns Fulfilled - the newly created checkout. */ function createCheckout(options?: CreateCheckoutOptions): Promise; interface CreateCheckoutOptions { /** Checkout information. */ checkoutInfo?: Checkout$1; /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string | null; /** Catalog line items to add to the checkout. */ lineItems?: LineItem$4[]; /** * Custom line items to add to the checkout. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$2[]; /** * Sales channel that submitted the order. * + `"UNSPECIFIED"`: Unspecified sales channel. This value is not supported. * + `"WEB"`: A web client. * + `"POS"`: [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395) * + `"EBAY"`: [eBay](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop) * + `"AMAZON"`: [Amazon](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop) * + `"WISH"`: [Wish](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-a-wish-shop) * + `"WIX_INVOICES"`: Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) * + `"WIX_APP_STORE"`: [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview) * + `"BACKOFFICE_MERCHANT"`: Wix merchant backoffice * + `"OTHER_PLATFORM"`: Other sales platform. */ channelType: ChannelType$4; /** * Gift card code. * * The checkout can only hold 1 `giftCardCode` at a time. If an additional `giftCardCode` is added, it will override the existing `giftCardCode`. * * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards). */ giftCardCode?: string | null; /** * Merchant discounts to apply to specific line items. * If no `lineItemIds` are passed, the discount will be applied to the whole checkout. * * >**Note:** Merchant discounts are restricted and can only be applied if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. * @internal */ merchantDiscounts?: MerchantDiscountInput$1[]; /** * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page. * * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`. */ overrideCheckoutUrl?: string | null; } /** * Retrieves a checkout. * * * The `getCheckout()` function returns a Promise that resolves when the specified checkout is retrieved. * @param _id - Checkout ID. * @public * @requiredField _id * @permissionId ECOM.READ_CHECKOUTS * @returns Fulfilled - the requested checkout. */ function getCheckout(_id: string, options?: GetCheckoutOptions): Promise; interface GetCheckoutOptions { /** * Whether to refresh the checkout from external sources. Defaults to true. * @internal */ refresh?: boolean | null; } /** * Retrieves the checkout associated with a specified cart. * @param _id - Cart ID. * @public * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.READ_CHECKOUTS */ function getCheckoutByCartId(_id: string): Promise; /** * Deprecated and will be removed soon, use GetCheckoutURL * @param _id - Checkout ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.READ_CHECKOUTS */ function getWixCheckoutUrl(_id: string, options?: GetWixCheckoutUrlOptions): Promise; interface GetWixCheckoutUrlOptions { /** * cart id to compare with for migration period * @internal */ cartId?: string | null; /** * checkout currency parameter to append * @internal */ currencyCode?: string | null; } /** * Retrieves the checkout page URL of a specified checkout. * * By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. * However, if `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`. * @param _id - Checkout ID. * @public * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.READ_CHECKOUTS */ function getCheckoutUrl(_id: string, options?: GetCheckoutUrlOptions): Promise; interface GetCheckoutUrlOptions { /** * Checkout currency parameter to append as a query param * @internal */ currencyCode?: string | null; } /** * Updates a checkout. * * * The `updateCheckout()` function returns a Promise that resolves to the updated checkout when the specified properties are updated. * * >**Notes:** * > + If nothing is passed in the request, the call will fail. * > + The `checkout.buyerInfo.email` may not be removed once it is set. * @param _id - Checkout ID. * @public * @requiredField _id * @requiredField checkout * @requiredField checkout.customFields.value * @requiredField checkout.membershipOptions.selectedMemberships.memberships._id * @requiredField checkout.membershipOptions.selectedMemberships.memberships.appId * @requiredField checkout.membershipOptions.selectedMemberships.memberships.lineItemIds * @requiredField options.customLineItems.descriptionLines * @requiredField options.customLineItems.descriptionLines.name * @requiredField options.customLineItems.itemType * @requiredField options.customLineItems.productName * @requiredField options.customLineItems.quantity * @requiredField options.lineItems.catalogReference * @requiredField options.lineItems.catalogReference.appId * @requiredField options.lineItems.catalogReference.catalogItemId * @requiredField options.lineItems.quantity * @param options - Checkout update options. * @permissionId ECOM.MODIFY_CHECKOUTS * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS * @returns Updated checkout. */ function updateCheckout(_id: string | null, checkout: UpdateCheckout, options?: UpdateCheckoutOptions): Promise; interface UpdateCheckout { /** * Checkout ID. * @readonly */ _id?: string | null; /** * Line items. * * Max: 300 items * @readonly */ lineItems?: LineItem$4[]; /** Billing information. */ billingInfo?: AddressWithContact$3; /** Shipping information. */ shippingInfo?: ShippingInfo$2; /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string | null; /** Buyer information. */ buyerInfo?: BuyerInfo$5; /** * All converted prices are displayed in this currency in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. * @readonly */ conversionCurrency?: string; /** * Calculated price summary for the checkout. * @readonly */ priceSummary?: PriceSummary$4; /** * Errors when calculating totals. * @readonly */ calculationErrors?: CalculationErrors$3; /** * Applied gift card details. * * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards). * @readonly */ giftCard?: GiftCard$4; /** * Applied discounts. * @readonly */ appliedDiscounts?: AppliedDiscount$4[]; /** Custom fields. */ customFields?: CustomField$4[]; /** * Weight measurement unit - defaults to site's weight unit. * @readonly */ weightUnit?: WeightUnit$6; /** * Tax summary. * @readonly */ taxSummary?: TaxSummary$4; /** * The currency used when submitting the order. * @readonly */ currency?: string; /** * Sales channel that submitted the order. * @readonly */ channelType?: ChannelType$4; /** * Site language in which original values are shown. * @readonly */ siteLanguage?: string; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. * @readonly */ buyerLanguage?: string; /** * Whether an order was successfully created from this checkout. * For an order to be successful, it must be successfully paid for (unless the total is 0). * @readonly */ completed?: boolean; /** * Whether tax is included in line item prices. * @readonly */ taxIncludedInPrice?: boolean; /** * ID of the checkout's initiator. * @readonly */ createdBy?: CreatedBy$4; /** * Date and time the checkout was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the checkout was updated. * @readonly */ _updatedDate?: Date | null; /** * Minimal amount to pay in order to place the order. * @readonly */ payNow?: PriceSummary$4; /** * Remaining amount for the order to be fully paid. * @readonly */ payLater?: PriceSummary$4; /** Memberships to apply when creating the order. */ membershipOptions?: MembershipOptions$2; /** Additional Fees. */ additionalFees?: AdditionalFee$4[]; /** Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart. */ cartId?: string | null; /** * Information about the currency conversion that took place if at all. Empty if no conversion took place. * @internal */ conversionInfo?: ConversionInfo$1; /** * The pay now total amount after gift card reduction * @internal * @readonly */ payNowTotalAfterGiftCard?: MultiCurrencyPrice$2; /** * __Deprecated.__ Use `purchaseFlowId` instead. * @internal * @deprecated */ ecomId?: string | null; /** * List of validation violations raised by the [Validations Custom Extension SPI](https://www.wix.com/velo/reference/spis/wix-ecom/ecom-validations/introduction). * @readonly */ violations?: Violation$1[]; /** * The total payment amount after gift card reduction * @internal * @readonly */ totalAfterGiftCard?: MultiCurrencyPrice$2; /** * Custom field data for the checkout object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields$8; /** * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. * @readonly */ purchaseFlowId?: string | null; /** * Additional settings for customization of the checkout process. * * Custom settings can only be defined when [creating a checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/createcheckout). */ customSettings?: CustomSettings$1; /** * Reference IDs for the app and component providing custom checkout page content. * * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customContentReference?: CustomContentReference$1; /** * References to an external app and resource associated with this checkout. * Used for integration and tracking across different platforms. * @internal */ externalReference?: ExternalReference$2; /** * Order ID. * * This field is empty until the checkout completes and becomes an order. * @internal * @readonly */ orderId?: string | null; /** * Payment for subscriptions after free trial period. * @internal * @readonly */ payAfterFreeTrial?: PriceSummary$4; } interface UpdateCheckoutOptions { /** The code of an existing coupon to apply to checkout. For more information, see the [Coupons API](https://www.wix.com/velo/reference/wix-marketing-backend/coupons). */ couponCode?: string | null; /** Gift card code. */ giftCardCode?: string | null; /** * Set of fields to update. Fields are inferred. * @internal */ fieldMask?: string[]; /** * Merchant discounts to apply to specific line items. * If no `lineItemIds` are passed, the discount will be applied to the whole checkout. * * >**Note:** Merchant discounts are restricted and can only be applied if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function. * @internal */ merchantDiscounts?: MerchantDiscountInput$1[]; /** * When true, calculation errors won't fail the update request. When empty or false, the update won't happen and relevant error will return * @internal */ ignoreCalculationErrors?: boolean | null; /** * `overrideCheckoutUrl` allows the flexibility to redirect customers to a customized checkout page. * * This field overrides the `checkoutUrl` in a cart or checkout. `checkoutUrl` is used to send customers back to their checkouts. By default, a `checkoutUrl` generates for a checkout and directs to a standard Wix checkout page. When `overrideCheckoutUrl` has a value, it will replace and set the value of `checkoutUrl`. */ overrideCheckoutUrl?: string | null; /** Catalog line items. */ lineItems?: LineItem$4[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$2[]; } /** * Removes the coupon from a specified checkout. * * * The `removeCoupon()` function returns a Promise that resolves to the updated checkout when the coupon is removed from the specified checkout. * * >**Note:** A checkout can only hold 1 coupon. * @param _id - ID of the checkout to remove the coupon from. * @public * @requiredField _id * @permissionId ECOM.MODIFY_CHECKOUTS */ function removeCoupon(_id: string): Promise; /** * Removes the gift card from a specified checkout. * * * The `removeGiftCard()` function returns a Promise that resolves to the updated checkout when the gift card is removed from the specified checkout. * * >**Note:** A checkout can only hold 1 gift card. * @param _id - ID of the checkout to remove the gift card from. * @public * @requiredField _id * @permissionId ECOM.MODIFY_CHECKOUTS */ function removeGiftCard(_id: string): Promise; /** * Removes the `overrideCheckoutUrl` from a specified checkout. * * When `overrideCheckoutUrl` is removed, the `checkoutUrl` will be set to the default, standard * Wix checkout page URL. * @param _id - ID of the checkout to remove the override checkout url from. * @public * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_CHECKOUTS */ function removeOverrideCheckoutUrl(_id: string): Promise; /** * Adds catalog line items and/or custom line items to a checkout. * * * The `addToCheckout()` function returns a Promise that resolves to the updated checkout when the specified items have been added. * > **Note:** When adding catalog items, `options.lineItems.catalogReference` is required. * @param _id - Checkout ID. * @public * @requiredField _id * @requiredField options.customLineItems.descriptionLines * @requiredField options.customLineItems.descriptionLines.name * @requiredField options.customLineItems.itemType * @requiredField options.customLineItems.productName * @requiredField options.customLineItems.quantity * @requiredField options.lineItems.catalogReference * @requiredField options.lineItems.catalogReference.appId * @requiredField options.lineItems.catalogReference.catalogItemId * @requiredField options.lineItems.quantity * @param options - Items to be added to checkout. * @permissionId ECOM.MODIFY_CHECKOUTS * @permissionId ECOM.ADMIN_MODIFY_CHECKOUTS */ function addToCheckout(_id: string, options?: AddToCheckoutOptions): Promise; interface AddToCheckoutOptions { /** Catalog line items. */ lineItems?: LineItem$4[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * To access and manage custom line items, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customLineItems?: CustomLineItem$2[]; } /** * Removes line items from the specified checkout. * * * The `removeLineItems()` function returns a Promise that resolves to the updated checkout when the line items are removed from the specified checkout. * @param _id - ID of the checkout to remove line items from. * @public * @requiredField _id * @requiredField lineItemIds * @param lineItemIds - IDs of the line items to be removed. * To find the IDs of the checkout line items you'd like to remove, pass the `checkout._id` to [getCheckout()](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and look for the IDs under `lineItems` and/or `customLineItems`. * @permissionId ECOM.MODIFY_CHECKOUTS */ function removeLineItems(_id: string, lineItemIds: string[]): Promise; /** * Creates an order from a specified checkout. * * The `createOrder()` function returns a Promise that resolves to the new order's ID and `paymentGatewayOrderID` when the order is created. * Pass the `paymentGatewayOrderId` as the `paymentId` param to the [`startPayment()`](https://www.wix.com/velo/reference/wix-pay-frontend/startpayment) function to allow a customer to pay for their order. * * > **Note:** The following requirements must be met for an order to be created from a checkout. * > + A checkout cannot have calculation errors. Pass the `checkout._id` to [Get Checkout](https://www.wix.com/velo/reference/wix-ecom-backend/checkout/getcheckout) and take a look at the `calculationErrors` field. * > + A checkout must have at least 1 line item. * > + All of the line Items have an `availability.status` of `"AVAILABLE"` or `"PARTIALLY_AVAILABLE"`. * > + If there is a payment to be made, meaning that `priceSummary.total` is greater than 0, the `billingInfo.address` field must be provided. * > + When a checkout has line items to be shipped, the `shippingInfo.shippingDestination.address` and `shippingInfo.selectedCarrierServiceOption` fields must be provided. * > + When a checkout has line items for pickup, the `shippingInfo.selectedCarrierServiceOption.logistics.pickupDetails` field must be provided. * @param _id - Checkout ID. * @public * @requiredField _id * @param options - Further order creation options. * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT */ function createOrder$1(_id: string, options?: CreateOrderOptions$1): Promise; interface CreateOrderOptions$1 { /** * Custom URL params to be added to redirect URLs. * @internal */ urlParams?: Record; /** Indicates the payment method should be saved on the order */ savePaymentMethod?: boolean; /** Indicates whether to authorize the payment and delay the capture */ delayCapture?: boolean; } /** * Deprecated (use createOrder instead) * @param _id - Checkout ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.CREATE_ORDER_FROM_CHECKOUT */ function createOrderAndCharge(_id: string, options?: CreateOrderAndChargeOptions): Promise; interface CreateOrderAndChargeOptions { /** Payment token. */ paymentToken?: string | null; /** * Custom URL params to be added to redirect URLs. * @internal */ urlParams?: Record; /** Indicates the payment method should be saved on the order */ savePaymentMethod?: boolean; /** Indicates whether to authorize the payment and delay the capture */ delayCapture?: boolean; } /** * Marks a checkout as completed - `checkout.complete` boolean is set to `true`. * * * The `markCheckoutAsCompleted()` function returns a Promise that resolves when the specified checkout is marked as completed. * @param _id - Checkout ID. * @public * @requiredField _id * @permissionId ECOM.MODIFY_CHECKOUTS */ function markCheckoutAsCompleted(_id: string, options?: MarkCheckoutAsCompletedOptions): Promise; interface MarkCheckoutAsCompletedOptions { /** * Order ID. * @internal */ orderId?: string | null; } /** * Updates the quantity of one or more line items in a checkout. * * This endpoint is only for updating the quantity of line items. To entirely remove a line item from * the checkout, use [`removeLineItems()`](#removelineitems). * To add a new line item to the checkout, use [`addToCheckout()`](#addtocheckout). * * This endpoint checks the amount of stock remaining for this line item. If the specified `quantity` * is greater than the remaining stock, then the `quantity` returned in the response is the total amount * of remaining stock. * @param _id - Checkout ID. * @param lineItems - Line item info to update. * @public * @requiredField _id * @requiredField lineItems * @requiredField lineItems._id * @requiredField lineItems.quantity * @permissionId ECOM.MODIFY_CHECKOUTS */ function updateLineItemsQuantity(_id: string, lineItems: LineItemQuantityUpdate[]): Promise; /** @param _id - Checkout ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.READ_PAYMENT_SETTINGS * @adminMethod */ function getCheckoutPaymentSettings(_id: string): Promise; type ecomV1CheckoutCheckout_universal_d_V1PaymentOptionType = V1PaymentOptionType; const ecomV1CheckoutCheckout_universal_d_V1PaymentOptionType: typeof V1PaymentOptionType; type ecomV1CheckoutCheckout_universal_d_V1PaymentOption = V1PaymentOption; type ecomV1CheckoutCheckout_universal_d_ApiAddress = ApiAddress; type ecomV1CheckoutCheckout_universal_d_CommonVatId = CommonVatId; type ecomV1CheckoutCheckout_universal_d_CommonVatType = CommonVatType; const ecomV1CheckoutCheckout_universal_d_CommonVatType: typeof CommonVatType; type ecomV1CheckoutCheckout_universal_d_UpdatedCheckoutMessage = UpdatedCheckoutMessage; type ecomV1CheckoutCheckout_universal_d_CreateCheckoutRequest = CreateCheckoutRequest; type ecomV1CheckoutCheckout_universal_d_CreateCheckoutResponse = CreateCheckoutResponse; type ecomV1CheckoutCheckout_universal_d_ShippingCalculationErrorData = ShippingCalculationErrorData; type ecomV1CheckoutCheckout_universal_d_ShippingCalculationErrorDataShippingCalculationErrorOneOf = ShippingCalculationErrorDataShippingCalculationErrorOneOf; type ecomV1CheckoutCheckout_universal_d_GetCheckoutRequest = GetCheckoutRequest; type ecomV1CheckoutCheckout_universal_d_GetCheckoutResponse = GetCheckoutResponse; type ecomV1CheckoutCheckout_universal_d_GetCheckoutWithAllExtendedFieldsRequest = GetCheckoutWithAllExtendedFieldsRequest; type ecomV1CheckoutCheckout_universal_d_GetCheckoutWithAllExtendedFieldsResponse = GetCheckoutWithAllExtendedFieldsResponse; type ecomV1CheckoutCheckout_universal_d_GetCheckoutByCartIdRequest = GetCheckoutByCartIdRequest; type ecomV1CheckoutCheckout_universal_d_GetCheckoutByCartIdResponse = GetCheckoutByCartIdResponse; type ecomV1CheckoutCheckout_universal_d_GetWixCheckoutURLRequest = GetWixCheckoutURLRequest; type ecomV1CheckoutCheckout_universal_d_GetWixCheckoutURLResponse = GetWixCheckoutURLResponse; type ecomV1CheckoutCheckout_universal_d_GetCheckoutURLRequest = GetCheckoutURLRequest; type ecomV1CheckoutCheckout_universal_d_GetCheckoutURLResponse = GetCheckoutURLResponse; type ecomV1CheckoutCheckout_universal_d_UpdateCheckoutRequest = UpdateCheckoutRequest; type ecomV1CheckoutCheckout_universal_d_UpdateCheckoutResponse = UpdateCheckoutResponse; type ecomV1CheckoutCheckout_universal_d_RemoveCouponRequest = RemoveCouponRequest; type ecomV1CheckoutCheckout_universal_d_RemoveCouponResponse = RemoveCouponResponse; type ecomV1CheckoutCheckout_universal_d_RemoveGiftCardRequest = RemoveGiftCardRequest; type ecomV1CheckoutCheckout_universal_d_RemoveGiftCardResponse = RemoveGiftCardResponse; type ecomV1CheckoutCheckout_universal_d_RemoveOverrideCheckoutUrlRequest = RemoveOverrideCheckoutUrlRequest; type ecomV1CheckoutCheckout_universal_d_RemoveOverrideCheckoutUrlResponse = RemoveOverrideCheckoutUrlResponse; type ecomV1CheckoutCheckout_universal_d_AddToCheckoutRequest = AddToCheckoutRequest; type ecomV1CheckoutCheckout_universal_d_AddToCheckoutResponse = AddToCheckoutResponse; type ecomV1CheckoutCheckout_universal_d_RemoveLineItemsRequest = RemoveLineItemsRequest; type ecomV1CheckoutCheckout_universal_d_RemoveLineItemsResponse = RemoveLineItemsResponse; type ecomV1CheckoutCheckout_universal_d_CreateOrderResponseIdOneOf = CreateOrderResponseIdOneOf; type ecomV1CheckoutCheckout_universal_d_PaymentErrorResponseData = PaymentErrorResponseData; type ecomV1CheckoutCheckout_universal_d_DoublePaymentErrorData = DoublePaymentErrorData; type ecomV1CheckoutCheckout_universal_d_DoublePaymentErrorDataIdOneOf = DoublePaymentErrorDataIdOneOf; type ecomV1CheckoutCheckout_universal_d_RedeemErrorData = RedeemErrorData; type ecomV1CheckoutCheckout_universal_d_ViolationsList = ViolationsList; type ecomV1CheckoutCheckout_universal_d_CreateOrderAndChargeRequest = CreateOrderAndChargeRequest; type ecomV1CheckoutCheckout_universal_d_CreateOrderAndChargeResponse = CreateOrderAndChargeResponse; type ecomV1CheckoutCheckout_universal_d_CreateOrderAndChargeResponseIdOneOf = CreateOrderAndChargeResponseIdOneOf; type ecomV1CheckoutCheckout_universal_d_MarkCheckoutAsCompletedRequest = MarkCheckoutAsCompletedRequest; type ecomV1CheckoutCheckout_universal_d_MarkCheckoutAsCompletedResponse = MarkCheckoutAsCompletedResponse; type ecomV1CheckoutCheckout_universal_d_CheckoutMarkedAsCompleted = CheckoutMarkedAsCompleted; type ecomV1CheckoutCheckout_universal_d_UpdateLineItemsQuantityRequest = UpdateLineItemsQuantityRequest; type ecomV1CheckoutCheckout_universal_d_LineItemQuantityUpdate = LineItemQuantityUpdate; type ecomV1CheckoutCheckout_universal_d_UpdateLineItemsQuantityResponse = UpdateLineItemsQuantityResponse; type ecomV1CheckoutCheckout_universal_d_GetCheckoutPaymentSettingsRequest = GetCheckoutPaymentSettingsRequest; type ecomV1CheckoutCheckout_universal_d_GetCheckoutPaymentSettingsResponse = GetCheckoutPaymentSettingsResponse; type ecomV1CheckoutCheckout_universal_d_SubscriptionCreated = SubscriptionCreated; type ecomV1CheckoutCheckout_universal_d_Subscription = Subscription; type ecomV1CheckoutCheckout_universal_d_V1BuyerInfo = V1BuyerInfo; type ecomV1CheckoutCheckout_universal_d_ChargeDetails = ChargeDetails; type ecomV1CheckoutCheckout_universal_d_ProductDetails = ProductDetails; type ecomV1CheckoutCheckout_universal_d_StoreSettings = StoreSettings; type ecomV1CheckoutCheckout_universal_d_V1ShippingInfo = V1ShippingInfo; type ecomV1CheckoutCheckout_universal_d_V1ShippingInfoDetailsOneOf = V1ShippingInfoDetailsOneOf; type ecomV1CheckoutCheckout_universal_d_V1CustomField = V1CustomField; type ecomV1CheckoutCheckout_universal_d_V1SubscriptionOptionInfo = V1SubscriptionOptionInfo; type ecomV1CheckoutCheckout_universal_d_DiscountDiscountType = DiscountDiscountType; const ecomV1CheckoutCheckout_universal_d_DiscountDiscountType: typeof DiscountDiscountType; type ecomV1CheckoutCheckout_universal_d_ChannelInfoChannelType = ChannelInfoChannelType; const ecomV1CheckoutCheckout_universal_d_ChannelInfoChannelType: typeof ChannelInfoChannelType; type ecomV1CheckoutCheckout_universal_d_V1SubscriptionSettings = V1SubscriptionSettings; const ecomV1CheckoutCheckout_universal_d_createCheckout: typeof createCheckout; type ecomV1CheckoutCheckout_universal_d_CreateCheckoutOptions = CreateCheckoutOptions; const ecomV1CheckoutCheckout_universal_d_getCheckout: typeof getCheckout; type ecomV1CheckoutCheckout_universal_d_GetCheckoutOptions = GetCheckoutOptions; const ecomV1CheckoutCheckout_universal_d_getCheckoutByCartId: typeof getCheckoutByCartId; const ecomV1CheckoutCheckout_universal_d_getWixCheckoutUrl: typeof getWixCheckoutUrl; type ecomV1CheckoutCheckout_universal_d_GetWixCheckoutUrlOptions = GetWixCheckoutUrlOptions; const ecomV1CheckoutCheckout_universal_d_getCheckoutUrl: typeof getCheckoutUrl; type ecomV1CheckoutCheckout_universal_d_GetCheckoutUrlOptions = GetCheckoutUrlOptions; const ecomV1CheckoutCheckout_universal_d_updateCheckout: typeof updateCheckout; type ecomV1CheckoutCheckout_universal_d_UpdateCheckout = UpdateCheckout; type ecomV1CheckoutCheckout_universal_d_UpdateCheckoutOptions = UpdateCheckoutOptions; const ecomV1CheckoutCheckout_universal_d_removeCoupon: typeof removeCoupon; const ecomV1CheckoutCheckout_universal_d_removeGiftCard: typeof removeGiftCard; const ecomV1CheckoutCheckout_universal_d_removeOverrideCheckoutUrl: typeof removeOverrideCheckoutUrl; const ecomV1CheckoutCheckout_universal_d_addToCheckout: typeof addToCheckout; type ecomV1CheckoutCheckout_universal_d_AddToCheckoutOptions = AddToCheckoutOptions; const ecomV1CheckoutCheckout_universal_d_removeLineItems: typeof removeLineItems; const ecomV1CheckoutCheckout_universal_d_createOrderAndCharge: typeof createOrderAndCharge; type ecomV1CheckoutCheckout_universal_d_CreateOrderAndChargeOptions = CreateOrderAndChargeOptions; const ecomV1CheckoutCheckout_universal_d_markCheckoutAsCompleted: typeof markCheckoutAsCompleted; type ecomV1CheckoutCheckout_universal_d_MarkCheckoutAsCompletedOptions = MarkCheckoutAsCompletedOptions; const ecomV1CheckoutCheckout_universal_d_updateLineItemsQuantity: typeof updateLineItemsQuantity; const ecomV1CheckoutCheckout_universal_d_getCheckoutPaymentSettings: typeof getCheckoutPaymentSettings; namespace ecomV1CheckoutCheckout_universal_d { export { Checkout$1 as Checkout, LineItem$4 as LineItem, CatalogReference$6 as CatalogReference, ProductName$3 as ProductName, MultiCurrencyPrice$2 as MultiCurrencyPrice, ItemTaxFullDetails$4 as ItemTaxFullDetails, TaxRateBreakdown$2 as TaxRateBreakdown, TaxBreakdown$2 as TaxBreakdown, JurisdictionType$4 as JurisdictionType, DescriptionLine$3 as DescriptionLine, DescriptionLineValueOneOf$3 as DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf$3 as DescriptionLineDescriptionLineValueOneOf, DescriptionLineName$3 as DescriptionLineName, PlainTextValue$3 as PlainTextValue, Color$3 as Color, DescriptionLineType$3 as DescriptionLineType, FocalPoint$4 as FocalPoint, ItemAvailabilityInfo$1 as ItemAvailabilityInfo, ItemAvailabilityStatus$1 as ItemAvailabilityStatus, PhysicalProperties$5 as PhysicalProperties, Scope$2 as Scope, Group$2 as Group, ItemType$4 as ItemType, ItemTypeItemTypeDataOneOf$4 as ItemTypeItemTypeDataOneOf, ItemTypeItemType$4 as ItemTypeItemType, SubscriptionOptionInfo$2 as SubscriptionOptionInfo, SubscriptionSettings$5 as SubscriptionSettings, SubscriptionFrequency$5 as SubscriptionFrequency, FreeTrialPeriod$1 as FreeTrialPeriod, Title$1 as Title, Description$1 as Description, SecuredMedia$2 as SecuredMedia, FileType$2 as FileType, ecomV1CheckoutCheckout_universal_d_V1PaymentOptionType as V1PaymentOptionType, ServiceProperties$3 as ServiceProperties, PriceDescription$3 as PriceDescription, CatalogOverrideFields$1 as CatalogOverrideFields, ecomV1CheckoutCheckout_universal_d_V1PaymentOption as V1PaymentOption, TaxableAddress$4 as TaxableAddress, TaxableAddressTaxableAddressDataOneOf$4 as TaxableAddressTaxableAddressDataOneOf, TaxableAddressType$4 as TaxableAddressType, ExtendedFields$8 as ExtendedFields, Policy$1 as Policy, AddressWithContact$3 as AddressWithContact, ecomV1CheckoutCheckout_universal_d_ApiAddress as ApiAddress, StreetAddress$7 as StreetAddress, AddressLocation$7 as AddressLocation, FullAddressContactDetails$4 as FullAddressContactDetails, ecomV1CheckoutCheckout_universal_d_CommonVatId as CommonVatId, ecomV1CheckoutCheckout_universal_d_CommonVatType as CommonVatType, ShippingInfo$2 as ShippingInfo, SelectedCarrierServiceOption$2 as SelectedCarrierServiceOption, DeliveryLogistics$5 as DeliveryLogistics, PickupDetails$6 as PickupDetails, PickupMethod$5 as PickupMethod, DeliveryTimeSlot$5 as DeliveryTimeSlot, SelectedCarrierServiceOptionPrices$2 as SelectedCarrierServiceOptionPrices, SelectedCarrierServiceOptionOtherCharge$2 as SelectedCarrierServiceOptionOtherCharge, ChargeType$4 as ChargeType, DeliveryAllocation$3 as DeliveryAllocation, Carrier$3 as Carrier, Region$3 as Region, ApplicableLineItems$3 as ApplicableLineItems, ShippingRegion$4 as ShippingRegion, CarrierServiceOption$2 as CarrierServiceOption, ShippingOption$4 as ShippingOption, ShippingPrice$4 as ShippingPrice, OtherCharge$2 as OtherCharge, BuyerInfo$5 as BuyerInfo, BuyerInfoIdOneOf$3 as BuyerInfoIdOneOf, PriceSummary$4 as PriceSummary, CalculationErrors$3 as CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf$3 as CalculationErrorsShippingCalculationErrorOneOf, Details$4 as Details, DetailsKindOneOf$4 as DetailsKindOneOf, ApplicationError$9 as ApplicationError, ValidationError$4 as ValidationError, RuleType$4 as RuleType, FieldViolation$4 as FieldViolation, SystemError$4 as SystemError, CarrierErrors$3 as CarrierErrors, CarrierError$4 as CarrierError, GiftCard$4 as GiftCard, AppliedDiscount$4 as AppliedDiscount, AppliedDiscountDiscountSourceOneOf$4 as AppliedDiscountDiscountSourceOneOf, DiscountType$4 as DiscountType, Coupon$4 as Coupon, MerchantDiscount$4 as MerchantDiscount, DiscountRule$4 as DiscountRule, DiscountRuleName$4 as DiscountRuleName, LineItemDiscount$4 as LineItemDiscount, CustomField$4 as CustomField, WeightUnit$6 as WeightUnit, TaxSummary$4 as TaxSummary, TaxCalculationDetails$2 as TaxCalculationDetails, TaxCalculationDetailsCalculationDetailsOneOf$2 as TaxCalculationDetailsCalculationDetailsOneOf, RateType$2 as RateType, ManualCalculationReason$2 as ManualCalculationReason, AutoTaxFallbackCalculationDetails$2 as AutoTaxFallbackCalculationDetails, FallbackReason$2 as FallbackReason, AggregatedTaxBreakdown$2 as AggregatedTaxBreakdown, ChannelType$4 as ChannelType, CreatedBy$4 as CreatedBy, CreatedByIdOneOf$2 as CreatedByIdOneOf, MembershipOptions$2 as MembershipOptions, Membership$2 as Membership, MembershipName$4 as MembershipName, MembershipPaymentCredits$2 as MembershipPaymentCredits, InvalidMembership$2 as InvalidMembership, SelectedMemberships$2 as SelectedMemberships, SelectedMembership$2 as SelectedMembership, AdditionalFee$4 as AdditionalFee, ConversionInfo$1 as ConversionInfo, Violation$1 as Violation, Severity$1 as Severity, Target$1 as Target, TargetTargetTypeOneOf$1 as TargetTargetTypeOneOf, NameInOther$1 as NameInOther, NameInLineItem$1 as NameInLineItem, SuggestedFix$1 as SuggestedFix, Other$1 as Other, TargetLineItem$1 as TargetLineItem, CustomSettings$1 as CustomSettings, CustomContentReference$1 as CustomContentReference, ExternalReference$2 as ExternalReference, ecomV1CheckoutCheckout_universal_d_UpdatedCheckoutMessage as UpdatedCheckoutMessage, ecomV1CheckoutCheckout_universal_d_CreateCheckoutRequest as CreateCheckoutRequest, CustomLineItem$2 as CustomLineItem, MerchantDiscountInput$1 as MerchantDiscountInput, ecomV1CheckoutCheckout_universal_d_CreateCheckoutResponse as CreateCheckoutResponse, ecomV1CheckoutCheckout_universal_d_ShippingCalculationErrorData as ShippingCalculationErrorData, ecomV1CheckoutCheckout_universal_d_ShippingCalculationErrorDataShippingCalculationErrorOneOf as ShippingCalculationErrorDataShippingCalculationErrorOneOf, ecomV1CheckoutCheckout_universal_d_GetCheckoutRequest as GetCheckoutRequest, ecomV1CheckoutCheckout_universal_d_GetCheckoutResponse as GetCheckoutResponse, ecomV1CheckoutCheckout_universal_d_GetCheckoutWithAllExtendedFieldsRequest as GetCheckoutWithAllExtendedFieldsRequest, ecomV1CheckoutCheckout_universal_d_GetCheckoutWithAllExtendedFieldsResponse as GetCheckoutWithAllExtendedFieldsResponse, ecomV1CheckoutCheckout_universal_d_GetCheckoutByCartIdRequest as GetCheckoutByCartIdRequest, ecomV1CheckoutCheckout_universal_d_GetCheckoutByCartIdResponse as GetCheckoutByCartIdResponse, ecomV1CheckoutCheckout_universal_d_GetWixCheckoutURLRequest as GetWixCheckoutURLRequest, ecomV1CheckoutCheckout_universal_d_GetWixCheckoutURLResponse as GetWixCheckoutURLResponse, ecomV1CheckoutCheckout_universal_d_GetCheckoutURLRequest as GetCheckoutURLRequest, ecomV1CheckoutCheckout_universal_d_GetCheckoutURLResponse as GetCheckoutURLResponse, ecomV1CheckoutCheckout_universal_d_UpdateCheckoutRequest as UpdateCheckoutRequest, ecomV1CheckoutCheckout_universal_d_UpdateCheckoutResponse as UpdateCheckoutResponse, ecomV1CheckoutCheckout_universal_d_RemoveCouponRequest as RemoveCouponRequest, ecomV1CheckoutCheckout_universal_d_RemoveCouponResponse as RemoveCouponResponse, ecomV1CheckoutCheckout_universal_d_RemoveGiftCardRequest as RemoveGiftCardRequest, ecomV1CheckoutCheckout_universal_d_RemoveGiftCardResponse as RemoveGiftCardResponse, ecomV1CheckoutCheckout_universal_d_RemoveOverrideCheckoutUrlRequest as RemoveOverrideCheckoutUrlRequest, ecomV1CheckoutCheckout_universal_d_RemoveOverrideCheckoutUrlResponse as RemoveOverrideCheckoutUrlResponse, ecomV1CheckoutCheckout_universal_d_AddToCheckoutRequest as AddToCheckoutRequest, ecomV1CheckoutCheckout_universal_d_AddToCheckoutResponse as AddToCheckoutResponse, ecomV1CheckoutCheckout_universal_d_RemoveLineItemsRequest as RemoveLineItemsRequest, ecomV1CheckoutCheckout_universal_d_RemoveLineItemsResponse as RemoveLineItemsResponse, CreateOrderRequest$1 as CreateOrderRequest, CreateOrderResponse$1 as CreateOrderResponse, ecomV1CheckoutCheckout_universal_d_CreateOrderResponseIdOneOf as CreateOrderResponseIdOneOf, ecomV1CheckoutCheckout_universal_d_PaymentErrorResponseData as PaymentErrorResponseData, ecomV1CheckoutCheckout_universal_d_DoublePaymentErrorData as DoublePaymentErrorData, ecomV1CheckoutCheckout_universal_d_DoublePaymentErrorDataIdOneOf as DoublePaymentErrorDataIdOneOf, ecomV1CheckoutCheckout_universal_d_RedeemErrorData as RedeemErrorData, ecomV1CheckoutCheckout_universal_d_ViolationsList as ViolationsList, ecomV1CheckoutCheckout_universal_d_CreateOrderAndChargeRequest as CreateOrderAndChargeRequest, ecomV1CheckoutCheckout_universal_d_CreateOrderAndChargeResponse as CreateOrderAndChargeResponse, ecomV1CheckoutCheckout_universal_d_CreateOrderAndChargeResponseIdOneOf as CreateOrderAndChargeResponseIdOneOf, ecomV1CheckoutCheckout_universal_d_MarkCheckoutAsCompletedRequest as MarkCheckoutAsCompletedRequest, ecomV1CheckoutCheckout_universal_d_MarkCheckoutAsCompletedResponse as MarkCheckoutAsCompletedResponse, ecomV1CheckoutCheckout_universal_d_CheckoutMarkedAsCompleted as CheckoutMarkedAsCompleted, ecomV1CheckoutCheckout_universal_d_UpdateLineItemsQuantityRequest as UpdateLineItemsQuantityRequest, ecomV1CheckoutCheckout_universal_d_LineItemQuantityUpdate as LineItemQuantityUpdate, ecomV1CheckoutCheckout_universal_d_UpdateLineItemsQuantityResponse as UpdateLineItemsQuantityResponse, ecomV1CheckoutCheckout_universal_d_GetCheckoutPaymentSettingsRequest as GetCheckoutPaymentSettingsRequest, ecomV1CheckoutCheckout_universal_d_GetCheckoutPaymentSettingsResponse as GetCheckoutPaymentSettingsResponse, PaymentOption$1 as PaymentOption, ecomV1CheckoutCheckout_universal_d_SubscriptionCreated as SubscriptionCreated, ecomV1CheckoutCheckout_universal_d_Subscription as Subscription, ecomV1CheckoutCheckout_universal_d_V1BuyerInfo as V1BuyerInfo, IdentityType$4 as IdentityType, V1LineItem$1 as V1LineItem, OptionSelection$1 as OptionSelection, CustomTextFieldSelection$1 as CustomTextFieldSelection, ecomV1CheckoutCheckout_universal_d_ChargeDetails as ChargeDetails, ecomV1CheckoutCheckout_universal_d_ProductDetails as ProductDetails, LineItemType$1 as LineItemType, MediaItem$1 as MediaItem, MediaItemType$1 as MediaItemType, Totals$1 as Totals, ecomV1CheckoutCheckout_universal_d_StoreSettings as StoreSettings, Address$8 as Address, AddressAddressLine1OptionsOneOf$1 as AddressAddressLine1OptionsOneOf, FullName$1 as FullName, Street$1 as Street, VatId$5 as VatId, VatType$5 as VatType, ecomV1CheckoutCheckout_universal_d_V1ShippingInfo as V1ShippingInfo, ecomV1CheckoutCheckout_universal_d_V1ShippingInfoDetailsOneOf as V1ShippingInfoDetailsOneOf, ShipmentDetails$1 as ShipmentDetails, V1PickupDetails$1 as V1PickupDetails, PickupAddress$3 as PickupAddress, AppliedCoupon$1 as AppliedCoupon, ecomV1CheckoutCheckout_universal_d_V1CustomField as V1CustomField, ecomV1CheckoutCheckout_universal_d_V1SubscriptionOptionInfo as V1SubscriptionOptionInfo, Discount$2 as Discount, ecomV1CheckoutCheckout_universal_d_DiscountDiscountType as DiscountDiscountType, ChannelInfo$3 as ChannelInfo, ecomV1CheckoutCheckout_universal_d_ChannelInfoChannelType as ChannelInfoChannelType, ecomV1CheckoutCheckout_universal_d_V1SubscriptionSettings as V1SubscriptionSettings, BillingInfo$1 as BillingInfo, Empty$9 as Empty, DomainEvent$g as DomainEvent, DomainEventBodyOneOf$g as DomainEventBodyOneOf, EntityCreatedEvent$g as EntityCreatedEvent, RestoreInfo$g as RestoreInfo, EntityUpdatedEvent$g as EntityUpdatedEvent, EntityDeletedEvent$g as EntityDeletedEvent, ActionEvent$g as ActionEvent, MessageEnvelope$f as MessageEnvelope, IdentificationData$g as IdentificationData, IdentificationDataIdOneOf$g as IdentificationDataIdOneOf, WebhookIdentityType$f as WebhookIdentityType, ecomV1CheckoutCheckout_universal_d_createCheckout as createCheckout, ecomV1CheckoutCheckout_universal_d_CreateCheckoutOptions as CreateCheckoutOptions, ecomV1CheckoutCheckout_universal_d_getCheckout as getCheckout, ecomV1CheckoutCheckout_universal_d_GetCheckoutOptions as GetCheckoutOptions, ecomV1CheckoutCheckout_universal_d_getCheckoutByCartId as getCheckoutByCartId, ecomV1CheckoutCheckout_universal_d_getWixCheckoutUrl as getWixCheckoutUrl, ecomV1CheckoutCheckout_universal_d_GetWixCheckoutUrlOptions as GetWixCheckoutUrlOptions, ecomV1CheckoutCheckout_universal_d_getCheckoutUrl as getCheckoutUrl, ecomV1CheckoutCheckout_universal_d_GetCheckoutUrlOptions as GetCheckoutUrlOptions, ecomV1CheckoutCheckout_universal_d_updateCheckout as updateCheckout, ecomV1CheckoutCheckout_universal_d_UpdateCheckout as UpdateCheckout, ecomV1CheckoutCheckout_universal_d_UpdateCheckoutOptions as UpdateCheckoutOptions, ecomV1CheckoutCheckout_universal_d_removeCoupon as removeCoupon, ecomV1CheckoutCheckout_universal_d_removeGiftCard as removeGiftCard, ecomV1CheckoutCheckout_universal_d_removeOverrideCheckoutUrl as removeOverrideCheckoutUrl, ecomV1CheckoutCheckout_universal_d_addToCheckout as addToCheckout, ecomV1CheckoutCheckout_universal_d_AddToCheckoutOptions as AddToCheckoutOptions, ecomV1CheckoutCheckout_universal_d_removeLineItems as removeLineItems, createOrder$1 as createOrder, CreateOrderOptions$1 as CreateOrderOptions, ecomV1CheckoutCheckout_universal_d_createOrderAndCharge as createOrderAndCharge, ecomV1CheckoutCheckout_universal_d_CreateOrderAndChargeOptions as CreateOrderAndChargeOptions, ecomV1CheckoutCheckout_universal_d_markCheckoutAsCompleted as markCheckoutAsCompleted, ecomV1CheckoutCheckout_universal_d_MarkCheckoutAsCompletedOptions as MarkCheckoutAsCompletedOptions, ecomV1CheckoutCheckout_universal_d_updateLineItemsQuantity as updateLineItemsQuantity, ecomV1CheckoutCheckout_universal_d_getCheckoutPaymentSettings as getCheckoutPaymentSettings, }; } interface CheckoutSettings { /** Checkout policies. */ checkoutPolicies?: CheckoutPolicies; /** Settings that apply to checkout fields and the checkout process. */ checkoutFields?: CheckoutFields; /** Checkout brand settings. */ checkoutBrand?: CheckoutBrand; /** * Date and time the checkout settings were created. * @readonly */ _createdDate?: Date | null; /** * Date and time the checkout settings were updated. * @readonly */ _updatedDate?: Date | null; } interface CheckoutPolicies { /** Terms and conditions. */ termsAndConditions?: TermsAndConditionsPolicy; /** Privacy policy. */ privacyPolicy?: PrivacyPolicy; /** Return policy. */ returnPolicy?: ReturnPolicy; /** Digital item policy. */ digitalItemPolicy?: DigitalItemPolicy; /** "Contact us" information. */ contactUs?: ContactUsPolicy; /** Custom policy. */ customPolicy?: CustomCheckoutPolicy; } interface TermsAndConditionsPolicy { /** * Whether the terms & conditions policy is visible to the customer in the checkout page.

* * Default: `false` */ visible?: boolean | null; /** Terms and conditions policy content. */ content?: string | null; } interface PrivacyPolicy { /** * Whether the privacy policy is visible to the customer in the checkout page.

* * Default: `false` */ visible?: boolean | null; /** Privacy policy content. */ content?: string | null; } interface ReturnPolicy { /** * Whether the return policy is visible to the customer in the checkout page.

* * Default: `false` */ visible?: boolean | null; /** Return policy content. */ content?: string | null; } interface DigitalItemPolicy { /** * Whether the digital item policy is visible to the customer in the checkout page.

* * Default: `false` */ visible?: boolean | null; /** Digital item policy content. */ content?: string | null; } interface ContactUsPolicy { /** * Whether the contact us policy is visible to the customer in the checkout page.

* * Default: `false` */ visible?: boolean | null; /** Contact us policy content. */ content?: string | null; } interface CustomCheckoutPolicy { /** * Whether the policy is visible to the customer on the checkout page. * Default: `false`. */ visible?: boolean | null; /** Policy content. */ content?: string | null; /** Policy title. */ title?: string | null; } interface CheckoutFields { /** * Subscription checkbox. * Default: * - `visible`: `false`, * - `checkedByDefault`: `false` */ subscriptionCheckbox?: CheckboxField; /** * Policy agreement checkbox. * Default: * - `visible`: `true`, * - `checkedByDefault`: `true` */ policyAgreementCheckbox?: CheckboxField; /** * Whether the ability to redeem a gift card is enabled. * Default: `false`. */ giftCardRedeemEnabled?: boolean | null; /** * Whether to allow for MIT transactions. * Default: `false`. */ mitEnabled?: boolean | null; /** * Whether to allow for Auth & Capture transactions.

* * Default: `false` */ delayCaptureEnabled?: boolean | null; /** * Whether to automatically capture the transaction before the authorization expires. * * Default: `true` * >**Note:** this setting is only relevant when `delay_capture_enabled: true`. */ captureBeforeExpiryEnabled?: boolean | null; } interface CheckboxField { /** Whether the checkbox is visible to the customer. */ visible?: boolean | null; /** Whether the checkbox is checked by default. */ checkedByDefault?: boolean | null; } interface CheckoutBrand { /** Checkout header. */ header?: CheckoutHeader; } interface CheckoutHeader { /** * Textual content to be included in the header (e.g. Business Name) * TODO: update maxLength validation once limitation is known */ text?: string | null; /** Specifications for when a logo is included in the header. */ logo?: Logo; /** * Alignment within the header. * * >**Note:** `SIDE` alignment is decided depending on the locale's language. For example, scripts like Hebrew and Arabic will automatically align right-to-left. */ alignment?: Alignment; /** * Whether to display the 'Checkout' label within the header. * Depending on the locale, the label may be translated. */ displayCheckoutLabel?: boolean | null; } interface Logo { /** * Logo image. * @internal */ image?: string; /** Size of the logo. */ size?: LogoSize; } interface FocalPoint$3 { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } enum LogoSize { UNKNOWN_LOGO_SIZE = "UNKNOWN_LOGO_SIZE", SMALL = "SMALL", MEDIUM = "MEDIUM", LARGE = "LARGE" } enum Alignment { UNKNOWN_ALIGNMENT = "UNKNOWN_ALIGNMENT", SIDE = "SIDE", CENTER = "CENTER" } interface GetCheckoutSettingsRequest { } interface GetCheckoutSettingsResponse { /** Checkout settings. */ checkoutSettings?: CheckoutSettings; } interface UpdateCheckoutSettingsRequest { /** Checkout settings to update. */ checkoutSettings: CheckoutSettings; /** * List of exact fields to update. For example, if you define only `giftCardRedeemEnabled`, all other fields are ignored. * @internal */ fieldMask?: string[]; } interface UpdateCheckoutSettingsResponse { /** The updated checkout settings. */ checkoutSettings?: CheckoutSettings; } interface ListCheckoutSettingsRequest { } interface ListCheckoutSettingsResponse { /** List of retrieved checkout settings. */ checkoutSettings?: CheckoutSettings[]; } interface GiftCardProviderWasProvisioned { /** The gift card provider which was installed */ providerAppDefId?: string; providerInstanceId?: string; } interface Empty$8 { } interface DeleteCheckoutSettingsRequest { } interface DeleteCheckoutSettingsResponse { } interface DomainEvent$f extends DomainEventBodyOneOf$f { createdEvent?: EntityCreatedEvent$f; updatedEvent?: EntityUpdatedEvent$f; deletedEvent?: EntityDeletedEvent$f; actionEvent?: ActionEvent$f; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$f { createdEvent?: EntityCreatedEvent$f; updatedEvent?: EntityUpdatedEvent$f; deletedEvent?: EntityDeletedEvent$f; actionEvent?: ActionEvent$f; } interface EntityCreatedEvent$f { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$f; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$f { deletedDate?: Date | null; } interface EntityUpdatedEvent$f { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$f { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$f { bodyAsJson?: string; } interface MessageEnvelope$e { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$f; /** Stringify payload. */ data?: string; } interface IdentificationData$f extends IdentificationDataIdOneOf$f { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$e; } /** @oneof */ interface IdentificationDataIdOneOf$f { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$e { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Retrieves the sites' checkout settings. * * * The `getCheckoutSettings()` function returns a Promise that resolves to checkout settings. * @public * @documentationMaturity preview * @permissionId ECOM.READ_CHECKOUT_SETTINGS * @returns The requested checkout settings. */ function getCheckoutSettings(): Promise; /** * Updates the sites' checkout settings. * * * The `updateCheckoutSettings()` function returns a Promise that resolves to the newly updated checkout settings. * @param checkoutSettings - Checkout settings to update. * @public * @documentationMaturity preview * @requiredField checkoutSettings * @permissionId ECOM.UPDATE_CHECKOUT_SETTINGS * @adminMethod * @returns The updated checkout settings. */ function updateCheckoutSettings(checkoutSettings: CheckoutSettings, options?: UpdateCheckoutSettingsOptions): Promise; interface UpdateCheckoutSettingsOptions { /** * List of exact fields to update. For example, if you define only `giftCardRedeemEnabled`, all other fields are ignored. * @internal */ fieldMask?: string[]; } type ecomV1CheckoutSettings_universal_d_CheckoutSettings = CheckoutSettings; type ecomV1CheckoutSettings_universal_d_CheckoutPolicies = CheckoutPolicies; type ecomV1CheckoutSettings_universal_d_TermsAndConditionsPolicy = TermsAndConditionsPolicy; type ecomV1CheckoutSettings_universal_d_PrivacyPolicy = PrivacyPolicy; type ecomV1CheckoutSettings_universal_d_ReturnPolicy = ReturnPolicy; type ecomV1CheckoutSettings_universal_d_DigitalItemPolicy = DigitalItemPolicy; type ecomV1CheckoutSettings_universal_d_ContactUsPolicy = ContactUsPolicy; type ecomV1CheckoutSettings_universal_d_CustomCheckoutPolicy = CustomCheckoutPolicy; type ecomV1CheckoutSettings_universal_d_CheckoutFields = CheckoutFields; type ecomV1CheckoutSettings_universal_d_CheckboxField = CheckboxField; type ecomV1CheckoutSettings_universal_d_CheckoutBrand = CheckoutBrand; type ecomV1CheckoutSettings_universal_d_CheckoutHeader = CheckoutHeader; type ecomV1CheckoutSettings_universal_d_Logo = Logo; type ecomV1CheckoutSettings_universal_d_LogoSize = LogoSize; const ecomV1CheckoutSettings_universal_d_LogoSize: typeof LogoSize; type ecomV1CheckoutSettings_universal_d_Alignment = Alignment; const ecomV1CheckoutSettings_universal_d_Alignment: typeof Alignment; type ecomV1CheckoutSettings_universal_d_GetCheckoutSettingsRequest = GetCheckoutSettingsRequest; type ecomV1CheckoutSettings_universal_d_GetCheckoutSettingsResponse = GetCheckoutSettingsResponse; type ecomV1CheckoutSettings_universal_d_UpdateCheckoutSettingsRequest = UpdateCheckoutSettingsRequest; type ecomV1CheckoutSettings_universal_d_UpdateCheckoutSettingsResponse = UpdateCheckoutSettingsResponse; type ecomV1CheckoutSettings_universal_d_ListCheckoutSettingsRequest = ListCheckoutSettingsRequest; type ecomV1CheckoutSettings_universal_d_ListCheckoutSettingsResponse = ListCheckoutSettingsResponse; type ecomV1CheckoutSettings_universal_d_GiftCardProviderWasProvisioned = GiftCardProviderWasProvisioned; type ecomV1CheckoutSettings_universal_d_DeleteCheckoutSettingsRequest = DeleteCheckoutSettingsRequest; type ecomV1CheckoutSettings_universal_d_DeleteCheckoutSettingsResponse = DeleteCheckoutSettingsResponse; const ecomV1CheckoutSettings_universal_d_getCheckoutSettings: typeof getCheckoutSettings; const ecomV1CheckoutSettings_universal_d_updateCheckoutSettings: typeof updateCheckoutSettings; type ecomV1CheckoutSettings_universal_d_UpdateCheckoutSettingsOptions = UpdateCheckoutSettingsOptions; namespace ecomV1CheckoutSettings_universal_d { export { ecomV1CheckoutSettings_universal_d_CheckoutSettings as CheckoutSettings, ecomV1CheckoutSettings_universal_d_CheckoutPolicies as CheckoutPolicies, ecomV1CheckoutSettings_universal_d_TermsAndConditionsPolicy as TermsAndConditionsPolicy, ecomV1CheckoutSettings_universal_d_PrivacyPolicy as PrivacyPolicy, ecomV1CheckoutSettings_universal_d_ReturnPolicy as ReturnPolicy, ecomV1CheckoutSettings_universal_d_DigitalItemPolicy as DigitalItemPolicy, ecomV1CheckoutSettings_universal_d_ContactUsPolicy as ContactUsPolicy, ecomV1CheckoutSettings_universal_d_CustomCheckoutPolicy as CustomCheckoutPolicy, ecomV1CheckoutSettings_universal_d_CheckoutFields as CheckoutFields, ecomV1CheckoutSettings_universal_d_CheckboxField as CheckboxField, ecomV1CheckoutSettings_universal_d_CheckoutBrand as CheckoutBrand, ecomV1CheckoutSettings_universal_d_CheckoutHeader as CheckoutHeader, ecomV1CheckoutSettings_universal_d_Logo as Logo, FocalPoint$3 as FocalPoint, ecomV1CheckoutSettings_universal_d_LogoSize as LogoSize, ecomV1CheckoutSettings_universal_d_Alignment as Alignment, ecomV1CheckoutSettings_universal_d_GetCheckoutSettingsRequest as GetCheckoutSettingsRequest, ecomV1CheckoutSettings_universal_d_GetCheckoutSettingsResponse as GetCheckoutSettingsResponse, ecomV1CheckoutSettings_universal_d_UpdateCheckoutSettingsRequest as UpdateCheckoutSettingsRequest, ecomV1CheckoutSettings_universal_d_UpdateCheckoutSettingsResponse as UpdateCheckoutSettingsResponse, ecomV1CheckoutSettings_universal_d_ListCheckoutSettingsRequest as ListCheckoutSettingsRequest, ecomV1CheckoutSettings_universal_d_ListCheckoutSettingsResponse as ListCheckoutSettingsResponse, ecomV1CheckoutSettings_universal_d_GiftCardProviderWasProvisioned as GiftCardProviderWasProvisioned, Empty$8 as Empty, ecomV1CheckoutSettings_universal_d_DeleteCheckoutSettingsRequest as DeleteCheckoutSettingsRequest, ecomV1CheckoutSettings_universal_d_DeleteCheckoutSettingsResponse as DeleteCheckoutSettingsResponse, DomainEvent$f as DomainEvent, DomainEventBodyOneOf$f as DomainEventBodyOneOf, EntityCreatedEvent$f as EntityCreatedEvent, RestoreInfo$f as RestoreInfo, EntityUpdatedEvent$f as EntityUpdatedEvent, EntityDeletedEvent$f as EntityDeletedEvent, ActionEvent$f as ActionEvent, MessageEnvelope$e as MessageEnvelope, IdentificationData$f as IdentificationData, IdentificationDataIdOneOf$f as IdentificationDataIdOneOf, WebhookIdentityType$e as WebhookIdentityType, ecomV1CheckoutSettings_universal_d_getCheckoutSettings as getCheckoutSettings, ecomV1CheckoutSettings_universal_d_updateCheckoutSettings as updateCheckoutSettings, ecomV1CheckoutSettings_universal_d_UpdateCheckoutSettingsOptions as UpdateCheckoutSettingsOptions, }; } interface CheckoutTemplate { /** * Checkout template ID. * @readonly */ _id?: string | null; /** * Status of the checkout template. * * When `status` is `INACTIVE` checkouts will not be created with this template `_id`. Instead, the function will redirect to the domain site. * * Default: `ACTIVE` */ status?: Status$2; /** Custom settings to apply to the checkout page created from this template. */ customization?: CheckoutCustomization; /** * Catalog line items. * * Max: 300 items */ lineItems?: LineItem$3[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * Max: 300 items */ customLineItems?: CustomLineItem$1[]; /** * Coupon code. * * Note that a checkout can only hold one `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`. * For additional information, see the Coupons API. */ couponCode?: string | null; /** * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. * @internal */ extendedFields?: ExtendedFields$7; /** * Reference IDs for the app and component providing custom checkout page content. * * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customContentReference?: CustomContentReference; /** * References to an external app and resource associated with the checkout. * Used for integration and tracking across different platforms. * @internal */ externalReference?: ExternalReference$1; } enum Status$2 { UNKNOWN_STATUS = "UNKNOWN_STATUS", ACTIVE = "ACTIVE", INACTIVE = "INACTIVE" } interface CheckoutCustomization { /** Web client customizations. These customizations only apply to the standard Wix checkout page. */ webClient?: WebClientCustomization; /** * Whether to lock the ability to add or remove a gift card. * * Default: `false` */ lockedGiftCard?: boolean; /** * Whether to lock the ability to apply or remove a coupon code. * * Default: `false` */ lockedCoupon?: boolean; /** * Whether to disable manual payment option for this checkout. * * Default: `false` */ disabledManualPayment?: boolean; } interface WebClientCustomization { /** * Whether to disable the "Continue shopping" button. * * Default: `false` */ disabledContinueShoppingButton?: boolean; /** * Whether to disable policy agreement checkout in the checkout page * * Default: `false` */ disabledPolicyAgreementCheckbox?: boolean; } interface LineItem$3 { /** * Item quantity. * * Min: `1`
* Max: `100000` */ quantity?: number; /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$5; /** Overriding values for catalog item properties. */ catalogOverrideFields?: CatalogOverrideFields; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$5 { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration). */ options?: Record | null; } interface CatalogOverrideFields { /** Item name. */ productName?: ProductName$2; /** Item price **after** discounts. */ price?: string | null; /** Item price **before** discounts. */ fullPrice?: string | null; /** Item description lines. Used when displaying the line item to customers. */ descriptionLines?: DescriptionLine$2[]; /** Physical properties of the item. */ physicalProperties?: PhysicalProperties$4; /** Item image. */ image?: string; /** Payment method selected for the item. */ paymentOption?: PaymentOption; /** Only eligible for catalog items with `lineItem.paymentOption.value` type of `DEPOSIT_ONLINE`. */ depositAmount?: string | null; /** * Whether to save the payment method on the order. * * Default: `false` */ savePaymentMethod?: boolean | null; } interface ProductName$2 { /** * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * * Min: 1 character. * Max: 200 characters. */ original?: string; /** * Item name translated into the buyer's language. * * Min: 1 character. * Max: 400 characters. * Default: Same as `original`. */ translated?: string | null; } interface DescriptionLine$2 extends DescriptionLineValueOneOf$2, DescriptionLineDescriptionLineValueOneOf$2 { /** Description line plain text value. */ plainText?: PlainTextValue$2; /** Description line color value. */ colorInfo?: Color$2; /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$2; /** * Description line color. * @internal * @deprecated */ color?: string; /** Description line name. */ name?: DescriptionLineName$2; /** * Description line type. * @internal * @deprecated */ lineType?: DescriptionLineType$2; } /** @oneof */ interface DescriptionLineValueOneOf$2 { /** Description line plain text value. */ plainText?: PlainTextValue$2; /** Description line color value. */ colorInfo?: Color$2; } /** @oneof */ interface DescriptionLineDescriptionLineValueOneOf$2 { /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$2; /** * Description line color. * @internal * @deprecated */ color?: string; } interface DescriptionLineName$2 { /** Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface PlainTextValue$2 { /** Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line plain text value translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface Color$2 { /** Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line color name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; /** HEX or RGB color code for display. */ code?: string | null; } enum DescriptionLineType$2 { /** Unrecognized type. */ UNRECOGNISED = "UNRECOGNISED", /** Plain text type. */ PLAIN_TEXT = "PLAIN_TEXT", /** Color type. */ COLOR = "COLOR" } interface PhysicalProperties$4 { /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */ weight?: number | null; /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string | null; /** Whether this line item is shippable. */ shippable?: boolean; } interface PaymentOption { /** * + `FULL_PAYMENT_ONLINE`: The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP`: Payment for this item is done by charging a membership. When selected, `price` is `0`. * + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`. * + `MEMBERSHIP_OFFLINE`: Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ value?: PaymentOptionType$3; } /** Type of selected payment option for catalog item */ enum PaymentOptionType$3 { /** The entire payment for this item happens as part of the checkout. */ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE", /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE", /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */ MEMBERSHIP = "MEMBERSHIP", /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */ DEPOSIT_ONLINE = "DEPOSIT_ONLINE", /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE" } interface CustomLineItem$1 { /** * Custom line item quantity. * * Min: `1` * Max: `100000` */ quantity?: number; /** * Custom line item price. * * Must be a number or a decimal without symbols. */ price?: string; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription$2; /** Custom line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: DescriptionLine$2[]; /** Custom line item's media. */ media?: string; /** * Custom line item ID. If passed, `id` must be unique. * * Default: auto-generated ID */ _id?: string | null; /** Tax group ID for this custom line item. */ taxGroupId?: string | null; /** Name of the item or product. */ productName?: ProductName$2; /** URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work. */ url?: string; /** Item type. Either a preset type or custom. */ itemType?: ItemType$3; /** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: string | null; /** * Item quantity available for purchase. Only return this if inventory is managed. * Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart. */ quantityAvailable?: number | null; /** Physical properties of the item. */ physicalProperties?: PhysicalProperties$4; /** * Subscription option info. This field is internal and only used by Stores. * @internal */ subscriptionOptionInfo?: SubscriptionOptionInfo$1; /** * Digital file ID and name. Required if `itemType: DIGITAL`. * @internal */ digitalFile?: SecuredMedia$1; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * * + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field. */ paymentOption?: PaymentOptionType$3; /** * Service properties. When relevant, this contains information such as date and number of participants. * Used, among other things, when checking for valid memberships. */ serviceProperties?: ServiceProperties$2; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field is the same as `catalogReference.catalogItemId`. * + Used in membership validation. */ rootCatalogItemId?: string | null; /** * Partial payment for the given item to be paid upfront during the checkout. * * Eligible for catalog items with type `DEPOSIT_ONLINE`. * When omitted, the item's price will not be split and is expected to be paid in a single installment. */ depositAmount?: string | null; /** * Delivery Profile ID. * @internal */ deliveryProfileId?: string | null; /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$5; /** * Whether the price is not yet defined, and will be updated after the order is created. * * Default: `false` * @internal */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * * Default: `false` * @internal */ fixedQuantity?: boolean; /** * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page. * @readonly */ consentRequiredPaymentPolicy?: string | null; /** * Whether to save the payment method on the order. * * Default: `false` * @readonly */ savePaymentMethod?: boolean; /** * Policies to be displayed to the customer on the checkout page. * @internal */ policies?: Policy[]; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; } interface PriceDescription$2 { /** __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Price description translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface ItemType$3 extends ItemTypeItemTypeDataOneOf$3 { /** Preset item type. */ preset?: ItemTypeItemType$3; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } /** @oneof */ interface ItemTypeItemTypeDataOneOf$3 { /** Preset item type. */ preset?: ItemTypeItemType$3; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } enum ItemTypeItemType$3 { UNRECOGNISED = "UNRECOGNISED", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL", GIFT_CARD = "GIFT_CARD", SERVICE = "SERVICE" } interface SubscriptionOptionInfo$1 { /** Subscription option settings. */ subscriptionSettings?: SubscriptionSettings$4; /** Subscription option title. */ title?: Title; /** Subscription option description. */ description?: Description; } interface SubscriptionSettings$4 { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequency$4; /** * Interval of recurring payment. * * Default: `1`. * If SubscriptionFrequency is Day the minimum interval is 7 */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`. */ billingCycles?: number | null; /** * Whether to allow the customer to cancel the subscription.. * @internal */ enableCustomerCancellation?: boolean; /** * Period until first cycle starts. If applied payNow will be 0 * If None => no free trial * @internal */ freeTrialPeriod?: FreeTrialPeriod; /** * The date the subscription will start. The subscription will be charged either now or according to freeTrialDays. * @internal */ startDate?: Date | null; /** * Whether to generate an order each billing cycle. An order will always be generated for the first billing cycle. * Default None => will behave like true * @internal */ generateOrderEachBillingCycle?: boolean | null; } /** Frequency unit of recurring payment */ enum SubscriptionFrequency$4 { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } interface FreeTrialPeriod { /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */ frequency?: SubscriptionFrequency$4; /** interval of period */ interval?: number; } interface Title { /** Subscription option name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Subscription option name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface Description { /** Subscription option description. */ original?: string; /** Translated subscription option description. */ translated?: string | null; } interface SecuredMedia$1 { /** Media ID in Wix Media Manager. */ _id?: string; /** Original filename. */ fileName?: string; /** File type. */ fileType?: FileType$1; } enum FileType$1 { UNSPECIFIED = "UNSPECIFIED", SECURE_PICTURE = "SECURE_PICTURE", SECURE_VIDEO = "SECURE_VIDEO", SECURE_DOCUMENT = "SECURE_DOCUMENT", SECURE_MUSIC = "SECURE_MUSIC", SECURE_ARCHIVE = "SECURE_ARCHIVE" } interface ServiceProperties$2 { /** * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * For example, the start time of a class. */ scheduledDate?: Date | null; /** The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. */ numberOfParticipants?: number | null; } interface Policy { /** Policy title - should be translated */ title?: string | null; /** Policy content - should be translated */ content?: string; } interface ExtendedFields$7 { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface CustomContentReference { /** * ID of the app providing the content. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). */ appId?: string; /** * ID of the component within the app it belongs to. * * You can get your component's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). */ componentId?: string; } interface ExternalReference$1 { /** * ID of the app associated with the purchase flow. * For example, the Wix Pay Links app ID. */ appId?: string; /** * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system. * For example, a Wix Pay Link ID. */ resourceId?: string | null; } interface CreateCheckoutTemplateRequest { /** Checkout template to create. */ checkoutTemplate: CheckoutTemplate; } interface CreateCheckoutTemplateResponse { /** Created checkout template. */ checkoutTemplate?: CheckoutTemplate; } interface GetCheckoutTemplateRequest { /** ID of the checkout template to retrieve. */ checkoutTemplateId: string; } interface GetCheckoutTemplateResponse { /** Retrieved checkout template. */ checkoutTemplate?: CheckoutTemplate; } interface UpdateCheckoutTemplateRequest { /** Checkout template info to update. */ checkoutTemplate: CheckoutTemplate; /** * Set of fields to update. * @internal */ fieldMask?: string[]; } interface UpdateCheckoutTemplateResponse { /** Updated checkout template. */ checkoutTemplate?: CheckoutTemplate; } interface DeleteCheckoutTemplateRequest { /** ID of the checkout template to delete. */ checkoutTemplateId: string; } interface DeleteCheckoutTemplateResponse { } interface QueryCheckoutTemplatesRequest { /** Query options. */ query?: CursorQuery$7; } interface CursorQuery$7 extends CursorQueryPagingMethodOneOf$7 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$b; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * * Example of operators: `$eq`, `$ne`, `$in`, `$startsWith`, `$exists`, `$hasSome` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting$b[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf$7 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$b; } interface Sorting$b { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$b; } enum SortOrder$b { /** Ascending order. */ ASC = "ASC", /** Descending order. */ DESC = "DESC" } interface CursorPaging$b { /** Number of items to load. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryCheckoutTemplatesResponse { /** Retrieved checkout templates. */ checkoutTemplates?: CheckoutTemplate[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata$a; } interface CursorPagingMetadata$a { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ cursors?: Cursors$b; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. */ hasNext?: boolean | null; } interface Cursors$b { /** Cursor pointing to next page in the list of results. */ next?: string | null; /** Cursor pointing to previous page in the list of results. */ prev?: string | null; } interface CreateCheckoutFromTemplateRequest { /** ID of the checkout template to use to create a checkout from. */ checkoutTemplateId: string; /** ID of the site associated with the checkout template. */ siteId: string; } interface CreateCheckoutFromTemplateResponse { /** ID of the created checkout. */ checkoutId?: string; /** URL of the created checkout page. */ checkoutUrl?: string; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; } /** Triggered when newly checkout created successfully from checkout template */ interface CheckoutTemplateUsed { /** checkout template */ checkoutTemplate?: CheckoutTemplate; /** newly created checkout */ checkout?: Checkout; } interface Checkout { /** * Checkout ID. * @readonly */ _id?: string | null; /** * Line items. * * Max: 300 items * @readonly */ lineItems?: V1LineItem[]; /** Billing information. */ billingInfo?: AddressWithContact$2; /** Shipping information. */ shippingInfo?: ShippingInfo$1; /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string | null; /** Buyer information. */ buyerInfo?: BuyerInfo$4; /** * All converted prices are displayed in this currency in three-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. * @readonly */ conversionCurrency?: string; /** * Calculated price summary for the checkout. * @readonly */ priceSummary?: PriceSummary$3; /** * Errors when calculating totals. * @readonly */ calculationErrors?: CalculationErrors$2; /** * Applied gift card details. * * >**Note:** Gift cards are supported through the Wix UI, though the service plugin is not currently available. Learn more about [Wix Gift Cards](https://support.wix.com/en/article/wix-stores-setting-up-wix-gift-cards). * @readonly */ giftCard?: GiftCard$3; /** * Applied discounts. * @readonly */ appliedDiscounts?: AppliedDiscount$3[]; /** Custom fields. */ customFields?: CustomField$3[]; /** * Weight measurement unit - defaults to site's weight unit. * @readonly */ weightUnit?: WeightUnit$5; /** * Tax summary. * @readonly */ taxSummary?: TaxSummary$3; /** * The currency used when submitting the order. * @readonly */ currency?: string; /** * Sales channel that submitted the order. * @readonly */ channelType?: ChannelType$3; /** * Site language in which original values are shown. * @readonly */ siteLanguage?: string; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. * @readonly */ buyerLanguage?: string; /** * Whether an order was successfully created from this checkout. * For an order to be successful, it must be successfully paid for (unless the total is 0). * @readonly */ completed?: boolean; /** * Whether tax is included in line item prices. * @readonly */ taxIncludedInPrice?: boolean; /** * ID of the checkout's initiator. * @readonly */ createdBy?: CreatedBy$3; /** * Date and time the checkout was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the checkout was updated. * @readonly */ _updatedDate?: Date | null; /** * Minimal amount to pay in order to place the order. * @readonly */ payNow?: PriceSummary$3; /** * Remaining amount for the order to be fully paid. * @readonly */ payLater?: PriceSummary$3; /** Memberships to apply when creating the order. */ membershipOptions?: MembershipOptions$1; /** Additional Fees. */ additionalFees?: AdditionalFee$3[]; /** Cart ID that this checkout was created from. Empty if this checkout wasn't created from a cart. */ cartId?: string | null; /** * Information about the currency conversion that took place if at all. Empty if no conversion took place. * @internal */ conversionInfo?: ConversionInfo; /** * The pay now total amount after gift card reduction * @internal * @readonly */ payNowTotalAfterGiftCard?: MultiCurrencyPrice$1; /** * __Deprecated.__ Use `purchaseFlowId` instead. * @internal * @deprecated */ ecomId?: string | null; /** * List of validation violations raised by the [Validations service plugin](https://dev.wix.com/api/rest/wix-ecommerce/validations-integration-spi/introduction). * @readonly */ violations?: Violation[]; /** * The total payment amount after gift card reduction * @internal * @readonly */ totalAfterGiftCard?: MultiCurrencyPrice$1; /** * Custom field data for the checkout object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields$7; /** * Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. * @readonly */ purchaseFlowId?: string | null; /** * Additional settings for customization of the checkout process. * * > **Notes:** * > * Custom settings can only be set when [creating a checkout](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/checkout/create-checkout). * > * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customSettings?: CustomSettings; /** * Reference IDs for the app and component providing custom checkout page content. * * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customContentReference?: CustomContentReference; /** * References to an external app and resource associated with this checkout. * Used for integration and tracking across different platforms. * @internal */ externalReference?: ExternalReference$1; /** * Order ID. * * This field is empty until the checkout completes and becomes an order. * @internal * @readonly */ orderId?: string | null; /** * Payment for subscriptions after free trial period. * @internal * @readonly */ payAfterFreeTrial?: PriceSummary$3; } interface V1LineItem { /** * Line item ID. * @readonly */ _id?: string | null; /** * Item quantity. * * Min: `"1"` * Max: `"100000"` */ quantity?: number; /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$5; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` * @readonly */ productName?: ProductName$2; /** * URL to the item's page on the site. * @readonly */ url?: string; /** * Item price **after** catalog-defined discount and line item discounts. * @readonly */ price?: MultiCurrencyPrice$1; /** * Total line item price **after** catalog-defined discount and line item discounts. * @readonly */ lineItemPrice?: MultiCurrencyPrice$1; /** * Item price **before** catalog-defined discount. Defaults to `price` when not provided. * @readonly */ fullPrice?: MultiCurrencyPrice$1; /** * Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: MultiCurrencyPrice$1; /** * Total price after all discounts and tax. * @readonly */ totalPriceAfterTax?: MultiCurrencyPrice$1; /** * Total price after discounts, and before tax. * @readonly */ totalPriceBeforeTax?: MultiCurrencyPrice$1; /** * Tax details for this line item. * @readonly */ taxDetails?: ItemTaxFullDetails$3; /** * Discount for this line item's entire quantity. * @readonly */ discount?: MultiCurrencyPrice$1; /** * Line item description lines. Used for display purposes for the cart, checkout and order. * @readonly */ descriptionLines?: DescriptionLine$2[]; /** * Line item image details. * @readonly */ media?: string; /** * Item availability details. * @readonly */ availability?: ItemAvailabilityInfo; /** * Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. * @readonly */ physicalProperties?: PhysicalProperties$4; /** * Coupon scopes - which app and items a coupon applies to. * This field is internal to Wix, and should be used by Bookings, Stores and Events as used by the current [Coupons API](https://bo.wix.com/wix-docs/rest/stores/coupons/valid-scope-values). * @internal * @readonly */ couponScopes?: Scope$1[]; /** * Item type. Either a preset type or custom. * @readonly */ itemType?: ItemType$3; /** * Subscription option information. * @readonly */ subscriptionOptionInfo?: SubscriptionOptionInfo$1; /** * Fulfiller ID for this item. Field is empty when the item is self-fulfilled. * @internal * @readonly */ fulfillerId?: string | null; /** * Shipping group ID. * @internal * @readonly */ shippingGroupId?: string | null; /** * Digital file identifier, relevant only for items with type DIGITAL. * @internal * @readonly */ digitalFile?: SecuredMedia$1; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_ONLINE`: The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP`: Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is `0`. * + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is defined by `lineItem.deposit`. * + `MEMBERSHIP_OFFLINE`: Payment for this item can only be performed by using a membership and must be manually redeemed in the dashboard by the site owner. When this option is used, `lineItem.price.amount` is `0`. * @readonly */ paymentOption?: PaymentOptionType$3; /** * Service properties. When relevant, this contains information such as date and number of participants. * @readonly */ serviceProperties?: ServiceProperties$2; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field has the same value as `catalogReference.catalogItemId`. * + Used in membership validation. * @readonly */ rootCatalogItemId?: string | null; /** * Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". * @readonly */ priceDescription?: PriceDescription$2; /** * Partial payment to be paid upfront during the checkout. Eligible for catalog items with `lineItem.paymentOption` type `DEPOSIT_ONLINE` only. * @readonly */ depositAmount?: MultiCurrencyPrice$1; /** * Delivery Profile Id for the product * @internal * @readonly */ deliveryProfileId?: string | null; /** * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin. * @readonly */ customLineItem?: boolean; /** * Item payment policy that requires customer consent to complete purchase. The payment policy will be displayed on the checkout page. * @readonly */ consentRequiredPaymentPolicy?: string | null; /** * Overriding values for catalog item properties. * * To override catalog fields, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ catalogOverrideFields?: CatalogOverrideFields; /** * Whether the price is not yet defined, and will be updated after the order is created. * @internal * @readonly */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * @internal * @readonly */ fixedQuantity?: boolean; /** * Whether to save the payment method on the order. * * Default: `false` * @readonly */ savePaymentMethod?: boolean; /** * Address to be used for tax calculation. * @internal */ taxableAddress?: TaxableAddress$3; /** * Custom extended fields for the line item object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. * @internal */ extendedFields?: ExtendedFields$7; /** * Policies to be displayed to the customer on the checkout page. * @internal * @readonly */ policies?: Policy[]; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; } interface MultiCurrencyPrice$1 { /** Amount. */ amount?: string; /** * Converted amount. * @readonly */ convertedAmount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. * @readonly */ formattedConvertedAmount?: string; } interface ItemTaxFullDetails$3 { /** Amount for which tax is calculated. */ taxableAmount?: MultiCurrencyPrice$1; /** * Tax group ID, if specified. * @internal */ taxGroupId?: string | null; /** Tax rate %, as a decimal point between 0 and 1. */ taxRate?: string; /** Calculated tax, based on `taxable_amount` and `tax_rate`. */ totalTax?: MultiCurrencyPrice$1; /** * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead. * @readonly * @deprecated */ rateBreakdown?: TaxRateBreakdown$1[]; /** * The amount of this line item that was exempt. * @internal */ exemptAmount?: MultiCurrencyPrice$1; /** * True for items we have a tax applied on them * @internal */ isItemTaxable?: boolean | null; /** * True if the lineAmount include tax in it. * @internal */ isTaxIncluded?: boolean | null; /** * The calculator that calculated this line tax * @internal */ calculatorName?: string | null; /** * tax information for a line item. * @internal * @readonly */ taxBreakdown?: TaxBreakdown$1[]; } interface TaxRateBreakdown$1 { /** Name of tax against which the calculation was performed. */ name?: string; /** Rate at which this tax detail was calculated. */ rate?: string; /** Amount of tax for this tax detail. */ tax?: MultiCurrencyPrice$1; /** * The type of tax that was calculated * @internal */ taxType?: string | null; /** * The name of the jurisdiction in which this tax detail applies * @internal */ jurisdiction?: string | null; /** * The type of the jurisdiction in which this tax detail applies(Country,State,County,City,Special). * @internal */ jurisdictionType?: string | null; /** * The amount of this line item that was exempt from this authority. * @internal */ exemptAmount?: MultiCurrencyPrice$1; /** * ids of the used exemptions from the TaxEstimate exemptions array. * @internal */ exemptionIds?: number[]; /** * The taxable amount of this tax detail * @internal */ taxableAmount?: MultiCurrencyPrice$1; /** * The Taxes/Fee component. True if the fee is applied. * @internal */ isFee?: boolean | null; } /** * TaxBreakdown represents tax information for a line item. * It holds the tax amount and the tax rate for each tax authority that apply on the line item. */ interface TaxBreakdown$1 { /** The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". */ jurisdiction?: string | null; /** The amount of this line item price that was considered nontaxable. (Decimal value) */ nonTaxableAmount?: MultiCurrencyPrice$1; /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */ rate?: string | null; /** The amount of tax estimated for this line item. (Decimal value) */ taxAmount?: MultiCurrencyPrice$1; /** The taxable amount of this line item. */ taxableAmount?: MultiCurrencyPrice$1; /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */ taxType?: string | null; /** * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. * This name should be explicit enough to allow the merchant to understand what tax was calculated. */ taxName?: string | null; /** The type of the jurisdiction in which this tax detail applies. */ jurisdictionType?: JurisdictionType$3; } /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ enum JurisdictionType$3 { UNDEFINED = "UNDEFINED", COUNTRY = "COUNTRY", STATE = "STATE", COUNTY = "COUNTY", CITY = "CITY", SPECIAL = "SPECIAL" } interface FocalPoint$2 { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } interface ItemAvailabilityInfo { /** Item availability status. */ status?: ItemAvailabilityStatus; /** Quantity available. */ quantityAvailable?: number | null; } enum ItemAvailabilityStatus { AVAILABLE = "AVAILABLE", /** Item does not exist */ NOT_FOUND = "NOT_FOUND", /** Item not in stock */ NOT_AVAILABLE = "NOT_AVAILABLE", /** Available quantity is less than requested */ PARTIALLY_AVAILABLE = "PARTIALLY_AVAILABLE" } interface Scope$1 { /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */ namespace?: string; /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */ group?: Group$1; } interface Group$1 { /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ name?: string; /** Item ID (when the coupon scope is limited to just one item). */ entityId?: string | null; } interface TaxableAddress$3 extends TaxableAddressTaxableAddressDataOneOf$3 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$3; } /** @oneof */ interface TaxableAddressTaxableAddressDataOneOf$3 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$3; } enum TaxableAddressType$3 { UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS", BUSINESS = "BUSINESS", BILLING = "BILLING", SHIPPING = "SHIPPING" } /** Billing Info and shipping details */ interface AddressWithContact$2 { /** Address. */ address?: Address$7; /** Contact details. */ contactDetails?: FullAddressContactDetails$3; /** * Reference to address service. * @internal */ addressesServiceId?: string | null; } /** Physical address */ interface Address$7 { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress$6; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** @internal */ location?: AddressLocation$6; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } interface StreetAddress$6 { /** Street number. */ number?: string; /** Street name. */ name?: string; /** * Apartment number. * @internal */ apt?: string; /** * Optional address line 1 * @internal */ formattedAddressLine?: string | null; } interface AddressLocation$6 { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } /** Full contact details for an address */ interface FullAddressContactDetails$3 { /** First name. */ firstName?: string | null; /** Last name. */ lastName?: string | null; /** Phone number. */ phone?: string | null; /** Company name. */ company?: string | null; /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */ vatId?: VatId$4; } interface VatId$4 { /** Customer's tax ID. */ _id?: string; /** * Tax type. * * Supported values: * + `CPF`: for individual tax payers * + `CNPJ`: for corporations */ type?: VatType$4; } /** tax info types */ enum VatType$4 { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } interface ShippingInfo$1 { /** Shipping address and contact details. */ shippingDestination?: AddressWithContact$2; /** Selected option out of the options allowed for the `region`. */ selectedCarrierServiceOption?: SelectedCarrierServiceOption$1; /** * Shipping region. Based on the address provided. * @readonly */ region?: ShippingRegion$3; /** * All carrier options for this shipping rule. * @readonly */ carrierServiceOptions?: CarrierServiceOption$1[]; } interface SelectedCarrierServiceOption$1 { /** Unique identifier of selected option. For example, "usps_std_overnight". */ code?: string; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". * @readonly */ title?: string; /** * Delivery logistics. * @readonly */ logistics?: DeliveryLogistics$4; /** * Shipping costs. * @readonly */ cost?: SelectedCarrierServiceOptionPrices$1; /** * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) * @readonly */ requestedShippingOption?: boolean; /** Other charges */ otherCharges?: SelectedCarrierServiceOptionOtherCharge$1[]; /** This carrier's unique ID */ carrierId?: string | null; /** * Delivery solution allocations to different delivery carriers and delivery regions * @internal */ deliveryAllocations?: DeliveryAllocation$2[]; /** * If the delivery solution is a partial and doesn't apply to all items. * @internal */ partial?: boolean | null; } interface DeliveryLogistics$4 { /** Expected delivery time, in free text. For example, "3-5 business days". */ deliveryTime?: string | null; /** Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */ instructions?: string | null; /** Pickup details. */ pickupDetails?: PickupDetails$5; /** * Expected delivery time slot (from and to time stamps representation) * @internal */ deliveryTimeSlot?: DeliveryTimeSlot$4; } interface PickupDetails$5 { /** Pickup address. */ address?: Address$7; /** * Whether the pickup address is that of a business - this may effect tax calculation. * @deprecated */ businessLocation?: boolean; /** Pickup method */ pickupMethod?: PickupMethod$4; } enum PickupMethod$4 { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } interface DeliveryTimeSlot$4 { /** starting time of the delivery time slot */ from?: Date | null; /** ending time of the delivery time slot */ to?: Date | null; } interface SelectedCarrierServiceOptionPrices$1 { /** Total shipping price, after discount and after tax. */ totalPriceAfterTax?: MultiCurrencyPrice$1; /** Total price of shipping after discounts (when relevant), and before tax. */ totalPriceBeforeTax?: MultiCurrencyPrice$1; /** Tax details. */ taxDetails?: ItemTaxFullDetails$3; /** Shipping discount before tax. */ totalDiscount?: MultiCurrencyPrice$1; /** Shipping price before discount and before tax. */ price?: MultiCurrencyPrice$1; } interface SelectedCarrierServiceOptionOtherCharge$1 { /** Type of additional cost. */ type?: ChargeType$3; /** Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */ details?: string | null; /** Price of added charge. */ cost?: SelectedCarrierServiceOptionPrices$1; } enum ChargeType$3 { HANDLING_FEE = "HANDLING_FEE", INSURANCE = "INSURANCE" } interface DeliveryAllocation$2 { /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */ deliveryCarrier?: Carrier$2; /** The delivery region that are relevant for this delivery solution. */ deliveryRegion?: Region$2; /** Populated if the delivery solution is a partially supplied by this carrier. */ applicableLineItems?: ApplicableLineItems$2; } interface Carrier$2 { /** The carrier app id */ appId?: string | null; /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; } interface Region$2 { /** The delivery region id. */ _id?: string | null; /** The delivery region name. */ name?: string | null; } interface ApplicableLineItems$2 { /** Line items that the delivery solution is for. */ lineItemIds?: string[]; } interface ShippingRegion$3 { /** * Shipping region ID. * @readonly */ _id?: string; /** Shipping region name. */ name?: string; } interface CarrierServiceOption$1 { /** Carrier ID. */ carrierId?: string; /** Shipping options offered by this carrier for this request. */ shippingOptions?: ShippingOption$3[]; } interface ShippingOption$3 { /** * Unique code of provided shipping option like "usps_std_overnight". * For legacy calculators this would be the UUID of the option. */ code?: string; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; /** Delivery logistics. */ logistics?: DeliveryLogistics$4; /** Sipping price information. */ cost?: ShippingPrice$3; /** * Delivery solution allocations to different delivery carriers and delivery regions * @internal */ deliveryAllocations?: DeliveryAllocation$2[]; /** * If the delivery solution is a partial and doesn't apply to all items. * @internal */ partial?: boolean | null; } interface ShippingPrice$3 { /** Shipping price. */ price?: MultiCurrencyPrice$1; /** Other costs such as insurance, handling & packaging for fragile items, etc. */ otherCharges?: OtherCharge$1[]; } interface OtherCharge$1 { /** Type of additional cost. */ type?: ChargeType$3; /** Price of added cost. */ price?: MultiCurrencyPrice$1; } interface BuyerInfo$4 extends BuyerInfoIdOneOf$2 { /** * Visitor ID (if site visitor is **not** a member). * @readonly */ visitorId?: string; /** * Member ID (if site visitor is a site member). * @readonly */ memberId?: string; /** * + If `true`, the checkout doesn't have an owner yet and anyone can access it. The first to access it will be the new owner. * + If `false`, the value in `checkout.createdBy` is the owner. * @internal */ openAccess?: boolean; /** * Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction). * @readonly */ contactId?: string | null; /** Buyer email address. */ email?: string | null; } /** @oneof */ interface BuyerInfoIdOneOf$2 { /** * Visitor ID (if site visitor is **not** a member). * @readonly */ visitorId?: string; /** * Member ID (if site visitor is a site member). * @readonly */ memberId?: string; /** * + If `true`, the checkout doesn't have an owner yet and anyone can access it. The first to access it will be the new owner. * + If `false`, the value in `checkout.createdBy` is the owner. * @internal */ openAccess?: boolean; } interface PriceSummary$3 { /** Subtotal of all line items, before discounts and before tax. */ subtotal?: MultiCurrencyPrice$1; /** Total shipping price, before discounts and before tax. */ shipping?: MultiCurrencyPrice$1; /** Total tax. */ tax?: MultiCurrencyPrice$1; /** Total calculated discount value. */ discount?: MultiCurrencyPrice$1; /** Total price after discounts, gift cards, and tax. */ total?: MultiCurrencyPrice$1; /** Total additional fees price before tax. */ additionalFees?: MultiCurrencyPrice$1; } interface CalculationErrors$2 extends CalculationErrorsShippingCalculationErrorOneOf$2 { /** General shipping calculation error. */ generalShippingCalculationError?: Details$3; /** Carrier errors. */ carrierErrors?: CarrierErrors$2; /** Tax calculation error. */ taxCalculationError?: Details$3; /** Coupon calculation error. */ couponCalculationError?: Details$3; /** Gift card calculation error. */ giftCardCalculationError?: Details$3; /** Order validation errors. */ orderValidationErrors?: ApplicationError$8[]; /** * Membership payment methods calculation errors * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid */ membershipError?: Details$3; /** Discount Rule calculation error. */ discountsCalculationError?: Details$3; } /** @oneof */ interface CalculationErrorsShippingCalculationErrorOneOf$2 { /** General shipping calculation error. */ generalShippingCalculationError?: Details$3; /** Carrier errors. */ carrierErrors?: CarrierErrors$2; } interface Details$3 extends DetailsKindOneOf$3 { applicationError?: ApplicationError$8; validationError?: ValidationError$3; systemError?: SystemError$3; /** * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response * @deprecated */ tracing?: Record; } /** @oneof */ interface DetailsKindOneOf$3 { applicationError?: ApplicationError$8; validationError?: ValidationError$3; systemError?: SystemError$3; } interface ApplicationError$8 { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } /** * example result: * { * "fieldViolations": [ * { * "field": "fieldA", * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]", * "violatedRule": "OTHER", * "ruleName": "INVALID_NOTE", * "data": { * "value": "FI" * } * }, * { * "field": "fieldB", * "description": "field value out of range. supported range: [0-20]", * "violatedRule": "MAX", * "data": { * "threshold": 20 * } * }, * { * "field": "fieldC", * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]", * "violatedRule": "FORMAT", * "data": { * "type": "PHONE" * } * } * ] * } */ interface ValidationError$3 { fieldViolations?: FieldViolation$3[]; } enum RuleType$3 { VALIDATION = "VALIDATION", OTHER = "OTHER", MAX = "MAX", MIN = "MIN", MAX_LENGTH = "MAX_LENGTH", MIN_LENGTH = "MIN_LENGTH", MAX_SIZE = "MAX_SIZE", MIN_SIZE = "MIN_SIZE", FORMAT = "FORMAT", DECIMAL_LTE = "DECIMAL_LTE", DECIMAL_GTE = "DECIMAL_GTE", DECIMAL_LT = "DECIMAL_LT", DECIMAL_GT = "DECIMAL_GT", DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE", INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE", REQUIRED_FIELD = "REQUIRED_FIELD", FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED", ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT", EXACT_LENGTH = "EXACT_LENGTH", EXACT_SIZE = "EXACT_SIZE" } interface FieldViolation$3 { field?: string; description?: string; violatedRule?: RuleType$3; /** applicable when violated_rule=OTHER */ ruleName?: string | null; data?: Record | null; } interface SystemError$3 { /** Error code. */ errorCode?: string | null; } interface CarrierErrors$2 { /** Carrier errors. */ errors?: CarrierError$3[]; } interface CarrierError$3 { /** Carrier ID. */ carrierId?: string; /** Error details. */ error?: Details$3; } interface GiftCard$3 { /** * Gift Card ID. * @deprecated */ _id?: string; /** Gift card obfuscated code. */ obfuscatedCode?: string; /** Gift card value. */ amount?: MultiCurrencyPrice$1; /** App ID of the gift card provider. */ appId?: string; /** * External ID in the gift card provider's system. * Used for integration and tracking across different platforms. */ externalId?: string | null; } interface AppliedDiscount$3 extends AppliedDiscountDiscountSourceOneOf$3 { /** Coupon details. */ coupon?: Coupon$3; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$3; /** Discount rule */ discountRule?: DiscountRule$3; /** Discount type. */ discountType?: DiscountType$3; /** * IDs of line items the discount applies to. * @deprecated IDs of line items the discount applies to. * @replacedBy line_items_discounts * @targetRemovalDate 2024-06-01 */ lineItemIds?: string[]; /** * Discount ID. * @internal */ _id?: string | null; /** * Line items the discount applies to. * @internal */ lineItemDiscounts?: LineItemDiscount$3[]; /** * Number of subscription cycle this discount applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } /** @oneof */ interface AppliedDiscountDiscountSourceOneOf$3 { /** Coupon details. */ coupon?: Coupon$3; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$3; /** Discount rule */ discountRule?: DiscountRule$3; } enum DiscountType$3 { GLOBAL = "GLOBAL", SPECIFIC_ITEMS = "SPECIFIC_ITEMS", SHIPPING = "SHIPPING" } /** Coupon */ interface Coupon$3 { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** Coupon value. */ amount?: MultiCurrencyPrice$1; /** Coupon name. */ name?: string; /** * Coupon type: We want it to be an enum and not a string but currently we have no time to do it so we leave it as is to be aligned with cart summary. * @internal * @deprecated */ couponType?: string; } interface MerchantDiscount$3 { /** Discount value. */ amount?: MultiCurrencyPrice$1; /** Discount Percentage. Will be calculated from items price before other discounts. */ percentage?: number | null; } interface DiscountRule$3 { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: DiscountRuleName$3; /** Discount value. */ amount?: MultiCurrencyPrice$1; } interface DiscountRuleName$3 { /** Original discount rule name (in site's default language). */ original?: string; /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string | null; } interface LineItemDiscount$3 { /** ID of line item the discount applies to. */ _id?: string; /** Discount value. */ totalDiscountAmount?: MultiCurrencyPrice$1; } interface CustomField$3 { /** Custom field value. */ value?: any; /** Custom field title. */ title?: string; /** Translated custom field title. */ translatedTitle?: string | null; } enum WeightUnit$5 { /** Weight unit can't be classified, due to an error */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms */ KG = "KG", /** Pounds */ LB = "LB" } interface TaxSummary$3 { /** * Amount for which tax is calculated, added from line items. * @readonly */ taxableAmount?: MultiCurrencyPrice$1; /** * Calculated tax, added from line items. * @readonly */ totalTax?: MultiCurrencyPrice$1; /** * Manual tax rate * @internal * @readonly * @deprecated */ manualTaxRate?: string; /** * Tax calculator that was active when the order was created. * @deprecated */ calculationDetails?: TaxCalculationDetails$1; /** * Tax estimation id in tax service * @internal * @readonly */ taxEstimationId?: string | null; /** * Average Tax Rate * @internal * @readonly */ averageTaxRate?: string | null; /** * The amount of this estimate that was exempt (for all line items). * @internal * @readonly */ totalExempt?: MultiCurrencyPrice$1; /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * @internal * @readonly */ aggregatedTaxBreakdown?: AggregatedTaxBreakdown$1[]; } interface TaxCalculationDetails$1 extends TaxCalculationDetailsCalculationDetailsOneOf$1 { /** Reason the manual calculation was used. */ manualRateReason?: ManualCalculationReason$1; /** Details of the fallback rate calculation. */ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails$1; /** Rate calculation type. */ rateType?: RateType$1; } /** @oneof */ interface TaxCalculationDetailsCalculationDetailsOneOf$1 { /** Reason the manual calculation was used. */ manualRateReason?: ManualCalculationReason$1; /** Details of the fallback rate calculation. */ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails$1; } enum RateType$1 { /** no tax being collected for this request due to location of purchase */ NO_TAX_COLLECTED = "NO_TAX_COLLECTED", /** manual rate used for calculation */ MANUAL_RATE = "MANUAL_RATE", /** autotax rate used for calculation */ AUTO_RATE = "AUTO_RATE", /** fallback rate used for calculation */ FALLBACK_RATE = "FALLBACK_RATE" } enum ManualCalculationReason$1 { /** user set calculator in Business Manager to be Manual */ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL", /** specific region is on manual even though Global setting is Auto-tax */ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL" } interface AutoTaxFallbackCalculationDetails$1 { /** reason for fallback */ fallbackReason?: FallbackReason$1; /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */ error?: ApplicationError$8; } enum FallbackReason$1 { /** auto-tax failed to be calculated */ AUTO_TAX_FAILED = "AUTO_TAX_FAILED", /** auto-tax was temporarily deactivated on a system-level */ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED" } /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * Tax breakdown is the tax amount split to the tax authorities that applied on the line item. */ interface AggregatedTaxBreakdown$1 { /** The name of the tax against which this tax amount was calculated. */ taxName?: string; /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */ taxType?: string; /** The name of the jurisdiction in which this tax detail applies. */ jurisdiction?: string; /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ jurisdictionTypeEnum?: JurisdictionType$3; /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value) */ rate?: string; /** The sum of all the tax from line items that calculated by the tax identifiers. */ aggregatedTaxAmount?: MultiCurrencyPrice$1; /** * The sum of all the taxable amount from line items for tax identifiers. * @internal */ aggregatedTaxableAmount?: MultiCurrencyPrice$1; } enum ChannelType$3 { /** Unspecified sales channel. This value is not supported. */ UNSPECIFIED = "UNSPECIFIED", /** A web client. */ WEB = "WEB", /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */ POS = "POS", /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */ EBAY = "EBAY", /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */ AMAZON = "AMAZON", /** Other sales platform. */ OTHER_PLATFORM = "OTHER_PLATFORM", /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */ WIX_APP_STORE = "WIX_APP_STORE", /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */ WIX_INVOICES = "WIX_INVOICES", /** Wix merchant backoffice. */ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT", /** Wish sales channel. */ WISH = "WISH", /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */ CLASS_PASS = "CLASS_PASS", /** Global-E sales channel. */ GLOBAL_E = "GLOBAL_E", /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */ FACEBOOK = "FACEBOOK", /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */ ETSY = "ETSY", /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */ TIKTOK = "TIKTOK", /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */ FAIRE_COM = "FAIRE_COM" } interface CreatedBy$3 extends CreatedByIdOneOf$1 { /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; /** App ID - when the order was created by an external application or Wix service. */ appId?: string; } /** @oneof */ interface CreatedByIdOneOf$1 { /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; /** App ID - when the order was created by an external application or Wix service. */ appId?: string; } /** Reserved for internal use. */ interface MembershipOptions$1 { /** * Reserved for internal use. * @readonly */ eligibleMemberships?: Membership$1[]; /** * Reserved for internal use. * @readonly */ invalidMemberships?: InvalidMembership$1[]; /** Selected membership to apply to this checkout. */ selectedMemberships?: SelectedMemberships$1; } interface Membership$1 { /** Membership ID. */ _id?: string; /** ID of the application providing this payment option. */ appId?: string; /** The name of this membership. */ name?: MembershipName$3; /** Line item IDs which are "paid" for by this membership. */ lineItemIds?: string[]; /** Optional - For a membership that has limited credits, information about credit usage. */ credits?: MembershipPaymentCredits$1; /** Optional - TMembership expiry date. */ expirationDate?: Date | null; /** Additional data about this membership. */ additionalData?: Record | null; } interface MembershipName$3 { /** Membership name. */ original?: string; /** Translated membership name. Defaults to `original` when not provided. */ translated?: string | null; } interface MembershipPaymentCredits$1 { /** Membership's total amount of credits. */ total?: number; /** Membership's remaining amount of credits. */ remaining?: number; } interface InvalidMembership$1 { /** Membership details. */ membership?: Membership$1; /** Reason why this membership is invalid and cannot be used. */ reason?: string; } interface SelectedMemberships$1 { /** Selected memberships. */ memberships?: SelectedMembership$1[]; } interface SelectedMembership$1 { /** Membership ID. */ _id?: string; /** ID of the app providing this payment option. */ appId?: string; /** IDs of the line items this membership applies to. */ lineItemIds?: string[]; } interface AdditionalFee$3 { /** Additional fee's unique code (or ID) for future processing. */ code?: string | null; /** Translated additional fee's name. */ name?: string; /** Additional fee's price. */ price?: MultiCurrencyPrice$1; /** Tax details. */ taxDetails?: ItemTaxFullDetails$3; /** Provider's app id. */ providerAppId?: string | null; /** Additional fee's price before tax. */ priceBeforeTax?: MultiCurrencyPrice$1; /** Additional fee's price after tax. */ priceAfterTax?: MultiCurrencyPrice$1; /** * Optional - Line items associated with this additional fee. * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. */ lineItemIds?: string[]; /** * Number of subscription cycle this fee applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } interface ConversionInfo { /** * The site currency. * @readonly */ siteCurrency?: string; /** * The rate used when converting from the site currency to the checkout currency. * @readonly */ conversionRate?: string; } interface Violation { /** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */ severity?: Severity; /** Target location on a checkout or cart page where the violation will be displayed. */ target?: Target; /** Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `Click me`. */ description?: string | null; } enum Severity { /** The user is allowed to move forward in the flow. */ WARNING = "WARNING", /** * The user is blocked from moving forward in the flow. * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked. */ ERROR = "ERROR" } interface Target extends TargetTargetTypeOneOf { /** General (other) violation. */ other?: Other; /** Specific line item violation. */ lineItem?: TargetLineItem; } /** @oneof */ interface TargetTargetTypeOneOf { /** General (other) violation. */ other?: Other; /** Specific line item violation. */ lineItem?: TargetLineItem; } /** Available locations on the webpage */ enum NameInOther { /** Default location, in case no specific location is specified. */ OTHER_DEFAULT = "OTHER_DEFAULT", /** Delivery section. */ DELIVERY = "DELIVERY" } /** Available locations on the line item */ enum NameInLineItem { /** Default location, in case no specific location is specified. */ LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT" } enum SuggestedFix { /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */ UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX", /** The line item should be removed from the cart or checkout to resolve the violation. */ REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM" } /** General (other) violation. */ interface Other { /** Location on a checkout or a cart page where a general (other) violation will be displayed. */ name?: NameInOther; } /** Specific line item violation. */ interface TargetLineItem { /** Location on a checkout or a cart page where the specific line item violation will be displayed. */ name?: NameInLineItem; /** ID of the line item containing the violation. */ _id?: string | null; /** * Suggested fix for resolving the line item violation. * @internal */ suggestedFix?: SuggestedFix; } interface CustomSettings { /** * Whether to restrict the option to add or remove a gift card on the checkout page. * * Default: `false` */ lockGiftCard?: boolean; /** * Whether to restrict the option to add or remove a coupon code on the checkout page. * * Default: `false` */ lockCouponCode?: boolean; /** * Whether to disable policy agreement checkout in the checkout page * * Default: `false` */ disabledPolicyAgreementCheckbox?: boolean; /** * Whether to disable manual payment option for this checkout. * * Default: `false` */ disabledManualPayment?: boolean; } interface CreateAndRedirectToCheckoutRequest { /** ID of the checkout template to use to create a checkout. */ checkoutTemplateId: string; /** ID of the site associated with the checkout template. */ siteId: string; } interface RawHttpResponse { body?: Uint8Array; statusCode?: number | null; headers?: HeadersEntry[]; } interface HeadersEntry { key?: string; value?: string; } interface DomainEvent$e extends DomainEventBodyOneOf$e { createdEvent?: EntityCreatedEvent$e; updatedEvent?: EntityUpdatedEvent$e; deletedEvent?: EntityDeletedEvent$e; actionEvent?: ActionEvent$e; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$e { createdEvent?: EntityCreatedEvent$e; updatedEvent?: EntityUpdatedEvent$e; deletedEvent?: EntityDeletedEvent$e; actionEvent?: ActionEvent$e; } interface EntityCreatedEvent$e { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$e; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$e { deletedDate?: Date | null; } interface EntityUpdatedEvent$e { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$e { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$e { bodyAsJson?: string; } interface MessageEnvelope$d { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$e; /** Stringify payload. */ data?: string; } interface IdentificationData$e extends IdentificationDataIdOneOf$e { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$d; } /** @oneof */ interface IdentificationDataIdOneOf$e { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$d { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates a checkout template. * * A checkout template is used to create a new checkout that will include predefined information. For example, a single link with * a `checkoutTemplateId` can be shared with customers and each time the link is clicked, a new checkout page will be created * for that customer with certain checkout information already populated. * * The customizable features include the option to allow or to lock coupon codes or gift cards. For example, if a store owner is * using the checkout template to offer a flash sale to their social media followers, they may want to lock the option to apply an * additional coupon on top of the sale being offered. If so, they can set `customization.lockedCoupon` to `true`. * * A checkout can be created with a checkout template by calling `createCheckoutFromTemplate()`. The site may add further customizations to the new checkout and then redirect the customer using the new checkout's `checkoutUrl`. * @param checkoutTemplate - Checkout template to create. * @public * @documentationMaturity preview * @requiredField checkoutTemplate * @requiredField checkoutTemplate.customLineItems.descriptionLines * @requiredField checkoutTemplate.customLineItems.descriptionLines.name * @requiredField checkoutTemplate.customLineItems.itemType * @requiredField checkoutTemplate.customLineItems.productName * @requiredField checkoutTemplate.customLineItems.quantity * @requiredField checkoutTemplate.lineItems.catalogReference * @requiredField checkoutTemplate.lineItems.catalogReference.appId * @requiredField checkoutTemplate.lineItems.catalogReference.catalogItemId * @requiredField checkoutTemplate.lineItems.quantity * @permissionId ECOM.CHECKOUT_TEMPLATE_CREATE * @adminMethod * @returns Created checkout template. */ function createCheckoutTemplate(checkoutTemplate: CheckoutTemplate): Promise; /** * Retrieves a checkout template. * @param checkoutTemplateId - ID of the checkout template to retrieve. * @public * @documentationMaturity preview * @requiredField checkoutTemplateId * @permissionId ECOM.CHECKOUT_TEMPLATE_READ * @adminMethod * @returns Retrieved checkout template. */ function getCheckoutTemplate(checkoutTemplateId: string): Promise; /** * Updates a checkout template. * * If the info in a checkout template is updated, only new checkouts created from this template will include the updated items. Checkouts previously * created from this template before the update will not be affected. * @param _id - Checkout template ID. * @public * @documentationMaturity preview * @requiredField _id * @requiredField checkoutTemplate * @param checkoutTemplate - Checkout template info to update. * @permissionId ECOM.CHECKOUT_TEMPLATE_UPDATE * @adminMethod * @returns Updated checkout template. */ function updateCheckoutTemplate(_id: string | null, checkoutTemplate: UpdateCheckoutTemplate, options?: UpdateCheckoutTemplateOptions): Promise; interface UpdateCheckoutTemplate { /** * Checkout template ID. * @readonly */ _id?: string | null; /** * Status of the checkout template. * * When `status` is `INACTIVE` checkouts will not be created with this template `_id`. Instead, the function will redirect to the domain site. * * Default: `ACTIVE` */ status?: Status$2; /** Custom settings to apply to the checkout page created from this template. */ customization?: CheckoutCustomization; /** * Catalog line items. * * Max: 300 items */ lineItems?: LineItem$3[]; /** * Custom line items. Custom line items don't trigger the Catalog service plugin. * * Max: 300 items */ customLineItems?: CustomLineItem$1[]; /** * Coupon code. * * Note that a checkout can only hold one `couponCode` at a time. If an additional `couponCode` is added, it will override the existing `couponCode`. * For additional information, see the Coupons API. */ couponCode?: string | null; /** * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. * @internal */ extendedFields?: ExtendedFields$7; /** * Reference IDs for the app and component providing custom checkout page content. * * To access and manage custom checkout page content, your app must have the permission scope named "Manage eCommerce - Admin Permissions". * Learn more about [permission scopes](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/about-permissions). */ customContentReference?: CustomContentReference; /** * References to an external app and resource associated with the checkout. * Used for integration and tracking across different platforms. * @internal */ externalReference?: ExternalReference$1; } interface UpdateCheckoutTemplateOptions { /** * Set of fields to update. * @internal */ fieldMask?: string[]; } /** * Deletes a checkout template. * * If a checkout template is deleted and a customer attempts to create a checkout with that `checkoutTemplateId` then * the customer will be redirected to the domain site. * @param checkoutTemplateId - ID of the checkout template to delete. * @public * @documentationMaturity preview * @requiredField checkoutTemplateId * @permissionId ECOM.CHECKOUT_TEMPLATE_DELETE * @adminMethod */ function deleteCheckoutTemplate(checkoutTemplateId: string): Promise; /** * Creates a query to retrieve a list of checkout templates. * * The `queryCheckoutTemplates()` function builds a query to retrieve a list of checkout templates and returns a `CheckoutTemplatesQueryBuilder` object. * * The returned object contains the query definition, which is typically used to run the query using the `find()` function. * * You can refine the query by chaining `CheckoutTemplatesQueryBuilder` functions onto the query. `CheckoutTemplatesQueryBuilder` functions enable you to sort, filter, and control the results that `queryCheckoutTemplates()` returns. * * `queryCheckoutTemplates()` runs with the following `CheckoutTemplatesQueryBuilder` default that you can override: * + `ascending("_id")` * * The functions that are chained to `queryCheckoutTemplates()` are applied in the order they are called. For example, if you apply `ascending("status")` and then `ascending("_id")`, the results are sorted first by the `"status"`, and then, if there are multiple results with the same `"status"`, the items are sorted by `"_id"`. * * The following `CheckoutTemplatesQueryBuilder` functions are supported for the `queryCheckoutTemplates()` function. For a full description of the checkout template object, see the object returned for the `items` property in `CheckoutTemplatesQueryResult`. * @public * @documentationMaturity preview * @permissionId ECOM.CHECKOUT_TEMPLATE_READ * @adminMethod */ function queryCheckoutTemplates(): CheckoutTemplatesQueryBuilder; interface QueryCursorResult$b { cursors: Cursors$b; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface CheckoutTemplatesQueryResult extends QueryCursorResult$b { items: CheckoutTemplate[]; query: CheckoutTemplatesQueryBuilder; next: () => Promise; prev: () => Promise; } interface CheckoutTemplatesQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'status', value: any) => CheckoutTemplatesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'status', value: any) => CheckoutTemplatesQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id', value: string) => CheckoutTemplatesQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'status', value: any[]) => CheckoutTemplatesQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'status', value: any) => CheckoutTemplatesQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'status', value: boolean) => CheckoutTemplatesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | 'status'>) => CheckoutTemplatesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | 'status'>) => CheckoutTemplatesQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => CheckoutTemplatesQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => CheckoutTemplatesQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Creates a new checkout based on the checkout template. * * Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`. * * The customer can be directed to the new checkout using the checkout's `checkoutUrl`. * @param checkoutTemplateId - ID of the checkout template to use to create a checkout from. * @param siteId - ID of the site associated with the checkout template. * @public * @documentationMaturity preview * @requiredField checkoutTemplateId * @requiredField siteId * @permissionId ECOM.CHECKOUT_TEMPLATE_CREATE_CHECKOUT */ function createCheckoutFromTemplate(checkoutTemplateId: string, siteId: string): Promise; /** * Creates a new checkout based on the checkout template and redirects to the new checkout page. * * Before using this function, you must have a checkout template available. Create a checkout template with `createCheckoutTemplate()`. * * To build a URL that uses this function, follow this format: * `https://www.wixapis.com/ecom/v1/checkout-templates/{checkoutTemplateId}/create-and-redirect-to-checkout?siteId={siteId}` * * To create a checkout but not automatically redirect to the checkout page, use `createCheckoutFromTemplate()`. * @param checkoutTemplateId - ID of the checkout template to use to create a checkout. * @param siteId - ID of the site associated with the checkout template. * @public * @documentationMaturity preview * @requiredField checkoutTemplateId * @requiredField siteId * @adminMethod */ function createAndRedirectToCheckout(checkoutTemplateId: string, siteId: string): Promise; type ecomV1CheckoutTemplate_universal_d_CheckoutTemplate = CheckoutTemplate; type ecomV1CheckoutTemplate_universal_d_CheckoutCustomization = CheckoutCustomization; type ecomV1CheckoutTemplate_universal_d_WebClientCustomization = WebClientCustomization; type ecomV1CheckoutTemplate_universal_d_CatalogOverrideFields = CatalogOverrideFields; type ecomV1CheckoutTemplate_universal_d_PaymentOption = PaymentOption; type ecomV1CheckoutTemplate_universal_d_FreeTrialPeriod = FreeTrialPeriod; type ecomV1CheckoutTemplate_universal_d_Title = Title; type ecomV1CheckoutTemplate_universal_d_Description = Description; type ecomV1CheckoutTemplate_universal_d_Policy = Policy; type ecomV1CheckoutTemplate_universal_d_CustomContentReference = CustomContentReference; type ecomV1CheckoutTemplate_universal_d_CreateCheckoutTemplateRequest = CreateCheckoutTemplateRequest; type ecomV1CheckoutTemplate_universal_d_CreateCheckoutTemplateResponse = CreateCheckoutTemplateResponse; type ecomV1CheckoutTemplate_universal_d_GetCheckoutTemplateRequest = GetCheckoutTemplateRequest; type ecomV1CheckoutTemplate_universal_d_GetCheckoutTemplateResponse = GetCheckoutTemplateResponse; type ecomV1CheckoutTemplate_universal_d_UpdateCheckoutTemplateRequest = UpdateCheckoutTemplateRequest; type ecomV1CheckoutTemplate_universal_d_UpdateCheckoutTemplateResponse = UpdateCheckoutTemplateResponse; type ecomV1CheckoutTemplate_universal_d_DeleteCheckoutTemplateRequest = DeleteCheckoutTemplateRequest; type ecomV1CheckoutTemplate_universal_d_DeleteCheckoutTemplateResponse = DeleteCheckoutTemplateResponse; type ecomV1CheckoutTemplate_universal_d_QueryCheckoutTemplatesRequest = QueryCheckoutTemplatesRequest; type ecomV1CheckoutTemplate_universal_d_QueryCheckoutTemplatesResponse = QueryCheckoutTemplatesResponse; type ecomV1CheckoutTemplate_universal_d_CreateCheckoutFromTemplateRequest = CreateCheckoutFromTemplateRequest; type ecomV1CheckoutTemplate_universal_d_CreateCheckoutFromTemplateResponse = CreateCheckoutFromTemplateResponse; type ecomV1CheckoutTemplate_universal_d_CheckoutTemplateUsed = CheckoutTemplateUsed; type ecomV1CheckoutTemplate_universal_d_Checkout = Checkout; type ecomV1CheckoutTemplate_universal_d_V1LineItem = V1LineItem; type ecomV1CheckoutTemplate_universal_d_ItemAvailabilityInfo = ItemAvailabilityInfo; type ecomV1CheckoutTemplate_universal_d_ItemAvailabilityStatus = ItemAvailabilityStatus; const ecomV1CheckoutTemplate_universal_d_ItemAvailabilityStatus: typeof ItemAvailabilityStatus; type ecomV1CheckoutTemplate_universal_d_ConversionInfo = ConversionInfo; type ecomV1CheckoutTemplate_universal_d_Violation = Violation; type ecomV1CheckoutTemplate_universal_d_Severity = Severity; const ecomV1CheckoutTemplate_universal_d_Severity: typeof Severity; type ecomV1CheckoutTemplate_universal_d_Target = Target; type ecomV1CheckoutTemplate_universal_d_TargetTargetTypeOneOf = TargetTargetTypeOneOf; type ecomV1CheckoutTemplate_universal_d_NameInOther = NameInOther; const ecomV1CheckoutTemplate_universal_d_NameInOther: typeof NameInOther; type ecomV1CheckoutTemplate_universal_d_NameInLineItem = NameInLineItem; const ecomV1CheckoutTemplate_universal_d_NameInLineItem: typeof NameInLineItem; type ecomV1CheckoutTemplate_universal_d_SuggestedFix = SuggestedFix; const ecomV1CheckoutTemplate_universal_d_SuggestedFix: typeof SuggestedFix; type ecomV1CheckoutTemplate_universal_d_Other = Other; type ecomV1CheckoutTemplate_universal_d_TargetLineItem = TargetLineItem; type ecomV1CheckoutTemplate_universal_d_CustomSettings = CustomSettings; type ecomV1CheckoutTemplate_universal_d_CreateAndRedirectToCheckoutRequest = CreateAndRedirectToCheckoutRequest; type ecomV1CheckoutTemplate_universal_d_RawHttpResponse = RawHttpResponse; type ecomV1CheckoutTemplate_universal_d_HeadersEntry = HeadersEntry; const ecomV1CheckoutTemplate_universal_d_createCheckoutTemplate: typeof createCheckoutTemplate; const ecomV1CheckoutTemplate_universal_d_getCheckoutTemplate: typeof getCheckoutTemplate; const ecomV1CheckoutTemplate_universal_d_updateCheckoutTemplate: typeof updateCheckoutTemplate; type ecomV1CheckoutTemplate_universal_d_UpdateCheckoutTemplate = UpdateCheckoutTemplate; type ecomV1CheckoutTemplate_universal_d_UpdateCheckoutTemplateOptions = UpdateCheckoutTemplateOptions; const ecomV1CheckoutTemplate_universal_d_deleteCheckoutTemplate: typeof deleteCheckoutTemplate; const ecomV1CheckoutTemplate_universal_d_queryCheckoutTemplates: typeof queryCheckoutTemplates; type ecomV1CheckoutTemplate_universal_d_CheckoutTemplatesQueryResult = CheckoutTemplatesQueryResult; type ecomV1CheckoutTemplate_universal_d_CheckoutTemplatesQueryBuilder = CheckoutTemplatesQueryBuilder; const ecomV1CheckoutTemplate_universal_d_createCheckoutFromTemplate: typeof createCheckoutFromTemplate; const ecomV1CheckoutTemplate_universal_d_createAndRedirectToCheckout: typeof createAndRedirectToCheckout; namespace ecomV1CheckoutTemplate_universal_d { export { ecomV1CheckoutTemplate_universal_d_CheckoutTemplate as CheckoutTemplate, Status$2 as Status, ecomV1CheckoutTemplate_universal_d_CheckoutCustomization as CheckoutCustomization, ecomV1CheckoutTemplate_universal_d_WebClientCustomization as WebClientCustomization, LineItem$3 as LineItem, CatalogReference$5 as CatalogReference, ecomV1CheckoutTemplate_universal_d_CatalogOverrideFields as CatalogOverrideFields, ProductName$2 as ProductName, DescriptionLine$2 as DescriptionLine, DescriptionLineValueOneOf$2 as DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf$2 as DescriptionLineDescriptionLineValueOneOf, DescriptionLineName$2 as DescriptionLineName, PlainTextValue$2 as PlainTextValue, Color$2 as Color, DescriptionLineType$2 as DescriptionLineType, PhysicalProperties$4 as PhysicalProperties, ecomV1CheckoutTemplate_universal_d_PaymentOption as PaymentOption, PaymentOptionType$3 as PaymentOptionType, CustomLineItem$1 as CustomLineItem, PriceDescription$2 as PriceDescription, ItemType$3 as ItemType, ItemTypeItemTypeDataOneOf$3 as ItemTypeItemTypeDataOneOf, ItemTypeItemType$3 as ItemTypeItemType, SubscriptionOptionInfo$1 as SubscriptionOptionInfo, SubscriptionSettings$4 as SubscriptionSettings, SubscriptionFrequency$4 as SubscriptionFrequency, ecomV1CheckoutTemplate_universal_d_FreeTrialPeriod as FreeTrialPeriod, ecomV1CheckoutTemplate_universal_d_Title as Title, ecomV1CheckoutTemplate_universal_d_Description as Description, SecuredMedia$1 as SecuredMedia, FileType$1 as FileType, ServiceProperties$2 as ServiceProperties, ecomV1CheckoutTemplate_universal_d_Policy as Policy, ExtendedFields$7 as ExtendedFields, ecomV1CheckoutTemplate_universal_d_CustomContentReference as CustomContentReference, ExternalReference$1 as ExternalReference, ecomV1CheckoutTemplate_universal_d_CreateCheckoutTemplateRequest as CreateCheckoutTemplateRequest, ecomV1CheckoutTemplate_universal_d_CreateCheckoutTemplateResponse as CreateCheckoutTemplateResponse, ecomV1CheckoutTemplate_universal_d_GetCheckoutTemplateRequest as GetCheckoutTemplateRequest, ecomV1CheckoutTemplate_universal_d_GetCheckoutTemplateResponse as GetCheckoutTemplateResponse, ecomV1CheckoutTemplate_universal_d_UpdateCheckoutTemplateRequest as UpdateCheckoutTemplateRequest, ecomV1CheckoutTemplate_universal_d_UpdateCheckoutTemplateResponse as UpdateCheckoutTemplateResponse, ecomV1CheckoutTemplate_universal_d_DeleteCheckoutTemplateRequest as DeleteCheckoutTemplateRequest, ecomV1CheckoutTemplate_universal_d_DeleteCheckoutTemplateResponse as DeleteCheckoutTemplateResponse, ecomV1CheckoutTemplate_universal_d_QueryCheckoutTemplatesRequest as QueryCheckoutTemplatesRequest, CursorQuery$7 as CursorQuery, CursorQueryPagingMethodOneOf$7 as CursorQueryPagingMethodOneOf, Sorting$b as Sorting, SortOrder$b as SortOrder, CursorPaging$b as CursorPaging, ecomV1CheckoutTemplate_universal_d_QueryCheckoutTemplatesResponse as QueryCheckoutTemplatesResponse, CursorPagingMetadata$a as CursorPagingMetadata, Cursors$b as Cursors, ecomV1CheckoutTemplate_universal_d_CreateCheckoutFromTemplateRequest as CreateCheckoutFromTemplateRequest, ecomV1CheckoutTemplate_universal_d_CreateCheckoutFromTemplateResponse as CreateCheckoutFromTemplateResponse, ecomV1CheckoutTemplate_universal_d_CheckoutTemplateUsed as CheckoutTemplateUsed, ecomV1CheckoutTemplate_universal_d_Checkout as Checkout, ecomV1CheckoutTemplate_universal_d_V1LineItem as V1LineItem, MultiCurrencyPrice$1 as MultiCurrencyPrice, ItemTaxFullDetails$3 as ItemTaxFullDetails, TaxRateBreakdown$1 as TaxRateBreakdown, TaxBreakdown$1 as TaxBreakdown, JurisdictionType$3 as JurisdictionType, FocalPoint$2 as FocalPoint, ecomV1CheckoutTemplate_universal_d_ItemAvailabilityInfo as ItemAvailabilityInfo, ecomV1CheckoutTemplate_universal_d_ItemAvailabilityStatus as ItemAvailabilityStatus, Scope$1 as Scope, Group$1 as Group, TaxableAddress$3 as TaxableAddress, TaxableAddressTaxableAddressDataOneOf$3 as TaxableAddressTaxableAddressDataOneOf, TaxableAddressType$3 as TaxableAddressType, AddressWithContact$2 as AddressWithContact, Address$7 as Address, StreetAddress$6 as StreetAddress, AddressLocation$6 as AddressLocation, FullAddressContactDetails$3 as FullAddressContactDetails, VatId$4 as VatId, VatType$4 as VatType, ShippingInfo$1 as ShippingInfo, SelectedCarrierServiceOption$1 as SelectedCarrierServiceOption, DeliveryLogistics$4 as DeliveryLogistics, PickupDetails$5 as PickupDetails, PickupMethod$4 as PickupMethod, DeliveryTimeSlot$4 as DeliveryTimeSlot, SelectedCarrierServiceOptionPrices$1 as SelectedCarrierServiceOptionPrices, SelectedCarrierServiceOptionOtherCharge$1 as SelectedCarrierServiceOptionOtherCharge, ChargeType$3 as ChargeType, DeliveryAllocation$2 as DeliveryAllocation, Carrier$2 as Carrier, Region$2 as Region, ApplicableLineItems$2 as ApplicableLineItems, ShippingRegion$3 as ShippingRegion, CarrierServiceOption$1 as CarrierServiceOption, ShippingOption$3 as ShippingOption, ShippingPrice$3 as ShippingPrice, OtherCharge$1 as OtherCharge, BuyerInfo$4 as BuyerInfo, BuyerInfoIdOneOf$2 as BuyerInfoIdOneOf, PriceSummary$3 as PriceSummary, CalculationErrors$2 as CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf$2 as CalculationErrorsShippingCalculationErrorOneOf, Details$3 as Details, DetailsKindOneOf$3 as DetailsKindOneOf, ApplicationError$8 as ApplicationError, ValidationError$3 as ValidationError, RuleType$3 as RuleType, FieldViolation$3 as FieldViolation, SystemError$3 as SystemError, CarrierErrors$2 as CarrierErrors, CarrierError$3 as CarrierError, GiftCard$3 as GiftCard, AppliedDiscount$3 as AppliedDiscount, AppliedDiscountDiscountSourceOneOf$3 as AppliedDiscountDiscountSourceOneOf, DiscountType$3 as DiscountType, Coupon$3 as Coupon, MerchantDiscount$3 as MerchantDiscount, DiscountRule$3 as DiscountRule, DiscountRuleName$3 as DiscountRuleName, LineItemDiscount$3 as LineItemDiscount, CustomField$3 as CustomField, WeightUnit$5 as WeightUnit, TaxSummary$3 as TaxSummary, TaxCalculationDetails$1 as TaxCalculationDetails, TaxCalculationDetailsCalculationDetailsOneOf$1 as TaxCalculationDetailsCalculationDetailsOneOf, RateType$1 as RateType, ManualCalculationReason$1 as ManualCalculationReason, AutoTaxFallbackCalculationDetails$1 as AutoTaxFallbackCalculationDetails, FallbackReason$1 as FallbackReason, AggregatedTaxBreakdown$1 as AggregatedTaxBreakdown, ChannelType$3 as ChannelType, CreatedBy$3 as CreatedBy, CreatedByIdOneOf$1 as CreatedByIdOneOf, MembershipOptions$1 as MembershipOptions, Membership$1 as Membership, MembershipName$3 as MembershipName, MembershipPaymentCredits$1 as MembershipPaymentCredits, InvalidMembership$1 as InvalidMembership, SelectedMemberships$1 as SelectedMemberships, SelectedMembership$1 as SelectedMembership, AdditionalFee$3 as AdditionalFee, ecomV1CheckoutTemplate_universal_d_ConversionInfo as ConversionInfo, ecomV1CheckoutTemplate_universal_d_Violation as Violation, ecomV1CheckoutTemplate_universal_d_Severity as Severity, ecomV1CheckoutTemplate_universal_d_Target as Target, ecomV1CheckoutTemplate_universal_d_TargetTargetTypeOneOf as TargetTargetTypeOneOf, ecomV1CheckoutTemplate_universal_d_NameInOther as NameInOther, ecomV1CheckoutTemplate_universal_d_NameInLineItem as NameInLineItem, ecomV1CheckoutTemplate_universal_d_SuggestedFix as SuggestedFix, ecomV1CheckoutTemplate_universal_d_Other as Other, ecomV1CheckoutTemplate_universal_d_TargetLineItem as TargetLineItem, ecomV1CheckoutTemplate_universal_d_CustomSettings as CustomSettings, ecomV1CheckoutTemplate_universal_d_CreateAndRedirectToCheckoutRequest as CreateAndRedirectToCheckoutRequest, ecomV1CheckoutTemplate_universal_d_RawHttpResponse as RawHttpResponse, ecomV1CheckoutTemplate_universal_d_HeadersEntry as HeadersEntry, DomainEvent$e as DomainEvent, DomainEventBodyOneOf$e as DomainEventBodyOneOf, EntityCreatedEvent$e as EntityCreatedEvent, RestoreInfo$e as RestoreInfo, EntityUpdatedEvent$e as EntityUpdatedEvent, EntityDeletedEvent$e as EntityDeletedEvent, ActionEvent$e as ActionEvent, MessageEnvelope$d as MessageEnvelope, IdentificationData$e as IdentificationData, IdentificationDataIdOneOf$e as IdentificationDataIdOneOf, WebhookIdentityType$d as WebhookIdentityType, ecomV1CheckoutTemplate_universal_d_createCheckoutTemplate as createCheckoutTemplate, ecomV1CheckoutTemplate_universal_d_getCheckoutTemplate as getCheckoutTemplate, ecomV1CheckoutTemplate_universal_d_updateCheckoutTemplate as updateCheckoutTemplate, ecomV1CheckoutTemplate_universal_d_UpdateCheckoutTemplate as UpdateCheckoutTemplate, ecomV1CheckoutTemplate_universal_d_UpdateCheckoutTemplateOptions as UpdateCheckoutTemplateOptions, ecomV1CheckoutTemplate_universal_d_deleteCheckoutTemplate as deleteCheckoutTemplate, ecomV1CheckoutTemplate_universal_d_queryCheckoutTemplates as queryCheckoutTemplates, ecomV1CheckoutTemplate_universal_d_CheckoutTemplatesQueryResult as CheckoutTemplatesQueryResult, ecomV1CheckoutTemplate_universal_d_CheckoutTemplatesQueryBuilder as CheckoutTemplatesQueryBuilder, ecomV1CheckoutTemplate_universal_d_createCheckoutFromTemplate as createCheckoutFromTemplate, ecomV1CheckoutTemplate_universal_d_createAndRedirectToCheckout as createAndRedirectToCheckout, }; } /** * A DeliveryProfile is a ... * You can ... * Read more about DeliveryProfiles * in this [article](). */ interface DeliveryProfile { /** * DeliveryProfile ID. * @readonly */ _id?: string | null; /** DeliveryProfile name. */ name?: string | null; /** * Indicates that this DeliveryProfile is the default DeliveryProfile. * @readonly */ default?: boolean | null; /** A list of DeliveryProfile regions. */ deliveryRegions?: DeliveryRegion[]; /** ID of the delivery profile's creator. */ createdBy?: CreatedBy$2; /** * DeliveryProfile revision. * @readonly */ revision?: string | null; /** * Date and time the DeliveryProfile was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the DeliveryProfile was last updated. * @readonly */ _updatedDate?: Date | null; /** Extended fields. */ extendedFields?: ExtendedFields$6; } /** DeliveryRegion can be used to config a Delivery Destinations with its providers */ interface DeliveryRegion { /** * The delivery region id. * @readonly */ _id?: string | null; /** Optional name of the rule, for example: "Domestic". */ name?: string | null; /** Indicates that this rule is active, default value is true. */ active?: boolean | null; /** * The spi implementers id of shipping-rates spi, assigned to this rule. * @readonly */ deliveryCarriers?: DeliveryCarrier[]; /** The operation region of this rule, if empty than it is global. */ destinations?: Destination$1[]; /** * Represents the time this Profile was created * @readonly */ _createdDate?: Date | null; } interface DeliveryCarrier { /** AppDefId of the provider as it is registered in the [app dashboard](https://dev.wix.com/dc3/my-apps/). Can be fetched by listDeliveryProvider api. */ appId?: string; /** Backup rate to be used in case the cost returned by the provider is empty. */ backupRate?: BackupRate; /** Additional charges to add to the delivery rate for this carrier */ additionalCharges?: AdditionalCharge$1[]; } interface BackupRate { /** Default rate prefix that will concatenate to the delivery options the provider will offer. */ prefix?: string | null; /** Default rate price for all delivery options that the provider will offer. */ rate?: string | null; /** Should the default rate be used. Default value is false. */ enabled?: boolean | null; } interface AdditionalCharge$1 { /** Additional charge type. */ type?: ChargeType$2; /** Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`. */ description?: string | null; /** Cost of additional charge. For example, `12.5`. */ price?: string; } enum ChargeType$2 { HANDLING_FEE = "HANDLING_FEE" } /** Defines the area inside one country that is relevant for this rule. */ interface Destination$1 { /** 2-letters code represents the country of the delivery destinations */ countryCode?: string; /** * subdivisions - Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). * If empty, the rule applies to the entire country. */ subdivisions?: string[]; } interface CreatedBy$2 extends CreatedByIdOneOf { /** App ID - when the delivery profile was created by an external application or Wix service. */ appId?: string | null; /** User ID - when the delivery profile was created by a Wix user. */ userId?: string | null; } /** @oneof */ interface CreatedByIdOneOf { /** App ID - when the delivery profile was created by an external application or Wix service. */ appId?: string | null; /** User ID - when the delivery profile was created by a Wix user. */ userId?: string | null; } interface ExtendedFields$6 { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface DeliveryRegionAdded { /** The DeliveryProfile owns this region. */ deliveryProfileId?: string; /** * The delivery region id. * @readonly */ deliveryRegionId?: string | null; /** Optional name of the rule, for example: "Domestic". */ name?: string | null; /** Indicates that this rule is active, default value is true. */ active?: boolean | null; /** * The spi implementers id of shipping-rates spi, assigned to this rule. * @readonly */ deliveryCarriers?: DeliveryCarrier[]; /** The operation region of this rule, if empty than it is global. */ destinations?: Destination$1[]; /** * Represents the time this Profile was created * @readonly */ _createdDate?: Date | null; } interface DeliveryRegionRemoved { /** The DeliveryProfile owns this region. */ deliveryProfileId?: string; /** The removed DeliveryRegion id. */ deliveryRegionId?: string; } interface DeliveryRegionUpdated { /** The DeliveryProfile owns this DeliveryRegion. */ deliveryProfileId?: string; /** * The delivery region id. * @readonly */ deliveryRegionId?: string | null; /** Optional name of the rule, for example: "Domestic". */ name?: string | null; /** Indicates that this rule is active, default value is true. */ active?: boolean | null; /** * The spi implementers id of shipping-rates spi, assigned to this rule. * @readonly */ deliveryCarriers?: DeliveryCarrier[]; /** The operation region of this rule, if empty than it is global. */ destinations?: Destination$1[]; /** * Represents the time this Profile was created * @readonly */ _createdDate?: Date | null; } interface CreateDeliveryProfileRequest { /** DeliveryProfile to be created. */ deliveryProfile: DeliveryProfile; } interface CreateDeliveryProfileResponse { /** The created DeliveryProfile. */ deliveryProfile?: DeliveryProfile; } interface GetDeliveryProfileRequest { /** ID of the DeliveryProfile to retrieve. */ deliveryProfileId: string; } interface GetDeliveryProfileResponse { /** The requested DeliveryProfile. */ deliveryProfile?: DeliveryProfile; } interface UpdateDeliveryProfileRequest { /** DeliveryProfile to be updated, may be partial. */ deliveryProfile: DeliveryProfile; /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } interface UpdateDeliveryProfileResponse { /** Updated DeliveryProfile. */ deliveryProfile?: DeliveryProfile; } interface DeleteDeliveryProfileRequest { /** Id of the DeliveryProfile to delete. */ deliveryProfileId: string; } interface DeleteDeliveryProfileResponse { } interface QueryDeliveryProfilesRequest { /** WQL expression. */ query?: CursorQuery$6; } interface CursorQuery$6 extends CursorQueryPagingMethodOneOf$6 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$a; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting$a[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf$6 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$a; } interface Sorting$a { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$a; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$a { ASC = "ASC", DESC = "DESC" } interface CursorPaging$a { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryDeliveryProfilesResponse { /** List of DeliveryProfiles. */ deliveryProfiles?: DeliveryProfile[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata$9; } interface CursorPagingMetadata$9 { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors$a; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors$a { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface AddDeliveryRegionRequest$2 { /** delivery profile id to associated with the DeliveryRegion */ deliveryProfileId: string; /** DeliveryRegion to be created */ deliveryRegion: DeliveryRegion; /** * DeliveryProfile revision. * @readonly */ revision?: string | null; } interface AddDeliveryRegionResponse$2 { /** The updated DeliveryProfile with the new DeliveryRegion */ deliveryProfile?: DeliveryProfile; } interface UpdateDeliveryRegionRequest { /** DeliveryProfile id that owns the DeliveryRegion */ deliveryProfileId: string; /** DeliveryRegion to be updated, may be partial */ deliveryRegion: DeliveryRegion; /** * Explicit list of fields to update * @internal */ fieldMask?: string[]; /** * DeliveryProfile revision. * @readonly */ revision?: string | null; } interface UpdateDeliveryRegionResponse { /** The updated DeliveryProfile with the updated DeliveryRegion */ deliveryProfile?: DeliveryProfile; } interface RemoveDeliveryRegionRequest$2 { /** DeliveryProfile id that owns the DeliveryRegion */ deliveryProfileId: string; /** Id of the DeliveryRegion to delete */ deliveryRegionId: string; /** * DeliveryProfile revision. * @readonly */ revision?: string | null; } interface RemoveDeliveryRegionResponse$2 { /** The updated DeliveryProfile without DeliveryRegion */ deliveryProfile?: DeliveryProfile; } interface AddDeliveryCarrierRequest { /** delivery_region id to associated with the delivery_carrier. */ deliveryRegionId: string; /** delivery_carrier to be added. */ deliveryCarrier: DeliveryCarrier; } interface AddDeliveryCarrierResponse { /** The updated DeliveryProfile */ deliveryProfile?: DeliveryProfile; } interface RemoveDeliveryCarrierRequest { /** Id of the DeliveryRegion */ deliveryRegionId: string; /** DeliveryCarrier app id to be removed. */ appId: string; } interface RemoveDeliveryCarrierResponse { /** The updated DeliveryProfile */ deliveryProfile?: DeliveryProfile; } interface UpdateDeliveryCarrierRequest { /** DeliveryRegion id */ deliveryRegionId: string; /** Updated delivery_carrier */ deliveryCarrier?: DeliveryCarrier; /** * Explicit list of fields to update * @internal */ fieldMask?: string[]; } interface UpdateDeliveryCarrierResponse { /** The updated DeliveryProfile with the updated DeliveryCarrier */ deliveryProfile?: DeliveryProfile; } interface ListDeliveryCarrierDetailsRequest { } interface ListDeliveryCarrierDetailsResponse { /** The list of carrier or multi-carrier services that has implemented the spi and installed on the current context(site) */ deliveryCarrierDetails?: DeliveryCarrierDetails[]; } interface DeliveryCarrierDetails { /** The id of the provider. */ _id?: string; /** The name of the Provider. */ displayName?: string; /** Provider's description. */ description?: string | null; /** A link to learn more about the provider. */ learnMoreUrl?: string | null; /** Dashboard URL for the provider. */ dashboardUrl?: string | null; /** If the provider fallback definition is mandatory. */ fallbackDefinitionMandatory?: boolean | null; /** Thumbnail image for provider. */ thumbnailUrl?: string | null; /** feature toggle initialized with default value = false. should be true if implemented by spi provider */ toggleGetCarrierSettingsEnabled?: boolean; } interface ListDeliveryCarriersRequest { /** Delivery profile id. */ deliveryProfileId: string; /** Delivery app ids to get settings for. */ appIds?: string[]; } interface ListDeliveryCarriersResponse { /** The list of delivery settings for the given requests */ results?: ListDeliveryCarriersResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$3; } interface ListDeliveryCarriersResult { /** Information about successful action or error for failure. */ deliveryCarrierMetadata?: ItemMetadata$3; /** The delivery carrier details */ deliveryCarrierDetails?: DeliveryCarrierDetails; /** The delivery settings for the delivery profile and delivery region. */ deliveryCarrierRegionalSettings?: DeliveryCarrierRegionalSettings[]; } interface ItemMetadata$3 { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string | null; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError$7; } interface ApplicationError$7 { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface DeliveryCarrierRegionalSettings { /** The delivery rule id. */ deliveryRegionId?: string; /** The shipping table values that are associated with the delivery rule. Can be multiple if the provider is an aggregator of multiple carriers. */ dashboardTables?: DashboardTable[]; } interface DashboardTable { /** The title of the delivery settings that will be displayed in the UI. */ title?: string; /** The columns of the delivery settings that will be displayed in the UI. */ columns?: Column[]; /** The content of the delivery settings. Each row is a map of column name to value. */ rows?: Row[]; } interface Column { /** The name of the column. This is used to get the data from the row. */ key?: string; /** The title of the column that will be displayed in the UI. */ name?: string; } interface Row { /** The external key of the data presented in a row. This is used to identify the row in the UI for editing. */ key?: string; /** * The data presented in the row. The key is the column `name` and the value is the data in the specific row and column. * Data will be in JSON format. */ data?: Record | null; } interface BulkActionMetadata$3 { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface UpdateExtendedFieldsRequest$4 { /** ID of the entity to update. */ _id: string; /** Identifier for the app whose extended fields are being updated. */ namespace: string; /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } interface UpdateExtendedFieldsResponse$4 { /** Updated DeliveryProfile. */ deliveryProfile?: DeliveryProfile; } interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf { /** Emitted on a meta site creation. */ siteCreated?: SiteCreated; /** Emitted on a meta site transfer completion. */ siteTransferred?: SiteTransferred; /** Emitted on a meta site deletion. */ siteDeleted?: SiteDeleted; /** Emitted on a meta site restoration. */ siteUndeleted?: SiteUndeleted; /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */ sitePublished?: SitePublished; /** Emitted on a meta site unpublish. */ siteUnpublished?: SiteUnpublished; /** Emitted when meta site is marked as template. */ siteMarkedAsTemplate?: SiteMarkedAsTemplate; /** Emitted when meta site is marked as a WixSite. */ siteMarkedAsWixSite?: SiteMarkedAsWixSite; /** Emitted when an application is provisioned (installed). */ serviceProvisioned?: ServiceProvisioned; /** Emitted when an application is removed (uninstalled). */ serviceRemoved?: ServiceRemoved; /** Emitted when meta site name (URL slug) is changed. */ siteRenamedPayload?: SiteRenamed; /** Emitted when meta site was permanently deleted. */ hardDeleted?: SiteHardDeleted; /** Emitted on a namespace change. */ namespaceChanged?: NamespaceChanged; /** Emitted when Studio is attached. */ studioAssigned?: StudioAssigned; /** Emitted when Studio is detached. */ studioUnassigned?: StudioUnassigned; /** A meta site id. */ metaSiteId?: string; /** A meta site version. Monotonically increasing. */ version?: string; /** A timestamp of the event. */ timestamp?: string; /** * TODO(meta-site): Change validation once validations are disabled for consumers * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659 */ assets?: Asset[]; } /** @oneof */ interface MetaSiteSpecialEventPayloadOneOf { /** Emitted on a meta site creation. */ siteCreated?: SiteCreated; /** Emitted on a meta site transfer completion. */ siteTransferred?: SiteTransferred; /** Emitted on a meta site deletion. */ siteDeleted?: SiteDeleted; /** Emitted on a meta site restoration. */ siteUndeleted?: SiteUndeleted; /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */ sitePublished?: SitePublished; /** Emitted on a meta site unpublish. */ siteUnpublished?: SiteUnpublished; /** Emitted when meta site is marked as template. */ siteMarkedAsTemplate?: SiteMarkedAsTemplate; /** Emitted when meta site is marked as a WixSite. */ siteMarkedAsWixSite?: SiteMarkedAsWixSite; /** Emitted when an application is provisioned (installed). */ serviceProvisioned?: ServiceProvisioned; /** Emitted when an application is removed (uninstalled). */ serviceRemoved?: ServiceRemoved; /** Emitted when meta site name (URL slug) is changed. */ siteRenamedPayload?: SiteRenamed; /** Emitted when meta site was permanently deleted. */ hardDeleted?: SiteHardDeleted; /** Emitted on a namespace change. */ namespaceChanged?: NamespaceChanged; /** Emitted when Studio is attached. */ studioAssigned?: StudioAssigned; /** Emitted when Studio is detached. */ studioUnassigned?: StudioUnassigned; } interface Asset { /** An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum). */ appDefId?: string; /** An instance id. For legacy reasons may be UUID or a string. */ instanceId?: string; /** An application state. */ state?: State$1; } enum State$1 { UNKNOWN = "UNKNOWN", ENABLED = "ENABLED", DISABLED = "DISABLED", PENDING = "PENDING", DEMO = "DEMO" } interface SiteCreated { /** A template identifier (empty if not created from a template). */ originTemplateId?: string; /** An account id of the owner. */ ownerId?: string; /** A context in which meta site was created. */ context?: SiteCreatedContext; /** * A meta site id from which this site was created. * * In case of a creation from a template it's a template id. * In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site. */ originMetaSiteId?: string | null; /** A meta site name (URL slug). */ siteName?: string; /** A namespace. */ namespace?: Namespace$1; } enum SiteCreatedContext { /** A valid option, we don't expose all reasons why site might be created. */ OTHER = "OTHER", /** A meta site was created from template. */ FROM_TEMPLATE = "FROM_TEMPLATE", /** A meta site was created by copying of the transfferred meta site. */ DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER", /** A copy of existing meta site. */ DUPLICATE = "DUPLICATE", /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */ OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER", /** deprecated A meta site was created for Flash editor. */ FLASH = "FLASH" } enum Namespace$1 { UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE", /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */ WIX = "WIX", /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */ SHOUT_OUT = "SHOUT_OUT", /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */ ALBUMS = "ALBUMS", /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */ WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE", /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */ HOTELS = "HOTELS", /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */ CLUBS = "CLUBS", /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */ ONBOARDING_DRAFT = "ONBOARDING_DRAFT", /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */ DEV_SITE = "DEV_SITE", /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */ LOGOS = "LOGOS", /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */ VIDEO_MAKER = "VIDEO_MAKER", /** MetaSites with this namespace will *not* be shown in a user's site list by default. */ PARTNER_DASHBOARD = "PARTNER_DASHBOARD", /** MetaSites with this namespace will *not* be shown in a user's site list by default. */ DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY", /** * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain. * * Meta site with this namespace will *not* be shown in a user's site list by default. */ HTML_DRAFT = "HTML_DRAFT", /** * the user-journey for Fitness users who want to start from managing their business instead of designing their website. * Will be accessible from Site List and will not have a website app. * Once the user attaches a site, the site will become a regular wixsite. */ SITELESS_BUSINESS = "SITELESS_BUSINESS", /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */ CREATOR_ECONOMY = "CREATOR_ECONOMY", /** It is to be used in the Business First efforts. */ DASHBOARD_FIRST = "DASHBOARD_FIRST", /** Bookings business flow with no site. */ ANYWHERE = "ANYWHERE", /** Namespace for Headless Backoffice with no editor */ HEADLESS = "HEADLESS", /** * Namespace for master site that will exist in parent account that will be referenced by subaccounts * The site will be used for account level CSM feature for enterprise */ ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS", /** Rise.ai Siteless account management for Gift Cards and Store Credit. */ RISE = "RISE", /** * As part of the branded app new funnel, users now can create a meta site that will be branded app first. * There's a blank site behind the scene but it's blank). * The Mobile company will be the owner of this namespace. */ BRANDED_FIRST = "BRANDED_FIRST", /** Nownia.com Siteless account management for Ai Scheduling Assistant. */ NOWNIA = "NOWNIA", /** * UGC Templates are templates that are created by users for personal use and to sale to other users. * The Partners company owns this namespace. */ UGC_TEMPLATE = "UGC_TEMPLATE", /** Codux Headless Sites */ CODUX = "CODUX", /** Bobb - AI Design Creator. */ MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR" } /** Site transferred to another user. */ interface SiteTransferred { /** A previous owner id (user that transfers meta site). */ oldOwnerId?: string; /** A new owner id (user that accepts meta site). */ newOwnerId?: string; } /** Soft deletion of the meta site. Could be restored. */ interface SiteDeleted { /** A deletion context. */ deleteContext?: DeleteContext; } interface DeleteContext { /** When the meta site was deleted. */ dateDeleted?: Date | null; /** A status. */ deleteStatus?: DeleteStatus; /** A reason (flow). */ deleteOrigin?: string; /** A service that deleted it. */ initiatorId?: string | null; } enum DeleteStatus { UNKNOWN = "UNKNOWN", TRASH = "TRASH", DELETED = "DELETED", PENDING_PURGE = "PENDING_PURGE" } /** Restoration of the meta site. */ interface SiteUndeleted { } /** First publish of a meta site. Or subsequent publish after unpublish. */ interface SitePublished { } interface SiteUnpublished { /** A list of URLs previously associated with the meta site. */ urls?: string[]; } interface SiteMarkedAsTemplate { } interface SiteMarkedAsWixSite { } /** * Represents a service provisioned a site. * * Note on `origin_instance_id`: * There is no guarantee that you will be able to find a meta site using `origin_instance_id`. * This is because of the following scenario: * * Imagine you have a template where a third-party application (TPA) includes some stub data, * such as a product catalog. When you create a site from this template, you inherit this * default product catalog. However, if the template's product catalog is modified, * your site will retain the catalog as it was at the time of site creation. This ensures that * your site remains consistent with what you initially received and does not include any * changes made to the original template afterward. * To ensure this, the TPA on the template gets a new instance_id. */ interface ServiceProvisioned { /** Either UUID or EmbeddedServiceType. */ appDefId?: string; /** Not only UUID. Something here could be something weird. */ instanceId?: string; /** An instance id from which this instance is originated. */ originInstanceId?: string; /** A version. */ version?: string | null; /** The origin meta site id */ originMetaSiteId?: string | null; } interface ServiceRemoved { /** Either UUID or EmbeddedServiceType. */ appDefId?: string; /** Not only UUID. Something here could be something weird. */ instanceId?: string; /** A version. */ version?: string | null; } /** Rename of the site. Meaning, free public url has been changed as well. */ interface SiteRenamed { /** A new meta site name (URL slug). */ newSiteName?: string; /** A previous meta site name (URL slug). */ oldSiteName?: string; } /** * Hard deletion of the meta site. * * Could not be restored. Therefore it's desirable to cleanup data. */ interface SiteHardDeleted { /** A deletion context. */ deleteContext?: DeleteContext; } interface NamespaceChanged { /** A previous namespace. */ oldNamespace?: Namespace$1; /** A new namespace. */ newNamespace?: Namespace$1; } /** Assigned Studio editor */ interface StudioAssigned { } /** Unassigned Studio editor */ interface StudioUnassigned { } interface Empty$7 { } interface DomainEvent$d extends DomainEventBodyOneOf$d { createdEvent?: EntityCreatedEvent$d; updatedEvent?: EntityUpdatedEvent$d; deletedEvent?: EntityDeletedEvent$d; actionEvent?: ActionEvent$d; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$d { createdEvent?: EntityCreatedEvent$d; updatedEvent?: EntityUpdatedEvent$d; deletedEvent?: EntityDeletedEvent$d; actionEvent?: ActionEvent$d; } interface EntityCreatedEvent$d { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$d; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$d { deletedDate?: Date | null; } interface EntityUpdatedEvent$d { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$d { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$d { bodyAsJson?: string; } interface MessageEnvelope$c { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$d; /** Stringify payload. */ data?: string; } interface IdentificationData$d extends IdentificationDataIdOneOf$d { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$c; } /** @oneof */ interface IdentificationDataIdOneOf$d { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$c { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates a DeliveryProfile. * * The request body must include the DeliveryProfiles name. DeliveryRegions are optional. * @param deliveryProfile - DeliveryProfile to be created. * @public * @documentationMaturity preview * @requiredField deliveryProfile * @requiredField deliveryProfile.deliveryRegions.deliveryCarriers.backupRate.rate * @requiredField deliveryProfile.deliveryRegions.destinations * @requiredField deliveryProfile.deliveryRegions.destinations.countryCode * @requiredField deliveryProfile.deliveryRegions.name * @requiredField deliveryProfile.name * @permissionId ECOM.DELIVERY_PROFILE_CREATE * @adminMethod * @returns The created DeliveryProfile. */ function createDeliveryProfile(deliveryProfile: DeliveryProfile): Promise; /** * Retrieves a DeliveryProfile. * @param deliveryProfileId - ID of the DeliveryProfile to retrieve. * @public * @documentationMaturity preview * @requiredField deliveryProfileId * @permissionId ECOM.DELIVERY_PROFILE_READ * @returns The requested DeliveryProfile. */ function getDeliveryProfile(deliveryProfileId: string): Promise; /** * Updates a DeliveryProfile. * * * Each time the DeliveryProfile is updated, * `revision` increments by 1. * The current `revision` must be passed when updating the DeliveryProfile. * This ensures you're working with the latest DeliveryProfile * and prevents unintended overwrites. * * This method does not allow updating the DeliveryRegions in this DeliveryProfile. * Use AddDeliveryRegion, UpdateDeliveryRegion and RemoveDeliveryRegion for these functionalities. * @param _id - DeliveryProfile ID. * @public * @documentationMaturity preview * @requiredField _id * @requiredField deliveryProfile * @requiredField deliveryProfile.revision * @permissionId ECOM.DELIVERY_PROFILE_UPDATE * @adminMethod * @returns Updated DeliveryProfile. */ function updateDeliveryProfile(_id: string | null, deliveryProfile: UpdateDeliveryProfile, options?: UpdateDeliveryProfileOptions): Promise; interface UpdateDeliveryProfile { /** * DeliveryProfile ID. * @readonly */ _id?: string | null; /** DeliveryProfile name. */ name?: string | null; /** * Indicates that this DeliveryProfile is the default DeliveryProfile. * @readonly */ default?: boolean | null; /** A list of DeliveryProfile regions. */ deliveryRegions?: DeliveryRegion[]; /** ID of the delivery profile's creator. */ createdBy?: CreatedBy$2; /** * DeliveryProfile revision. * @readonly */ revision?: string | null; /** * Date and time the DeliveryProfile was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the DeliveryProfile was last updated. * @readonly */ _updatedDate?: Date | null; /** Extended fields. */ extendedFields?: ExtendedFields$6; } interface UpdateDeliveryProfileOptions { /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } /** * Deletes a DeliveryProfile. * * Deleting a DeliveryProfile permanently removes them from the DeliveryProfile List. * @param deliveryProfileId - Id of the DeliveryProfile to delete. * @public * @documentationMaturity preview * @requiredField deliveryProfileId * @permissionId ECOM.DELIVERY_PROFILE_DELETE * @adminMethod */ function deleteDeliveryProfile(deliveryProfileId: string): Promise; /** * Retrieves a list of DeliveryProfiles, given the provided [paging, filtering, and sorting][1]. * * Up to 1,000 DeliveryProfiles can be returned per request. * * To learn how to query DeliveryProfiles, see [API Query Language][2]. * * [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging * [2]: https://dev.wix.com/api/rest/getting-started/api-query-language * @public * @documentationMaturity preview * @permissionId ECOM.DELIVERY_PROFILE_READ */ function queryDeliveryProfiles(): DeliveryProfilesQueryBuilder; interface QueryCursorResult$a { cursors: Cursors$a; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface DeliveryProfilesQueryResult extends QueryCursorResult$a { items: DeliveryProfile[]; query: DeliveryProfilesQueryBuilder; next: () => Promise; prev: () => Promise; } interface DeliveryProfilesQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'name' | 'default' | 'deliveryRegions.id' | 'deliveryRegions.active' | 'deliveryRegions.createdDate' | '_createdDate', value: any) => DeliveryProfilesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'name' | 'default' | 'deliveryRegions.id' | 'deliveryRegions.active' | 'deliveryRegions.createdDate' | '_createdDate', value: any) => DeliveryProfilesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: 'deliveryRegions.createdDate' | '_createdDate', value: any) => DeliveryProfilesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: 'deliveryRegions.createdDate' | '_createdDate', value: any) => DeliveryProfilesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: 'deliveryRegions.createdDate' | '_createdDate', value: any) => DeliveryProfilesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: 'deliveryRegions.createdDate' | '_createdDate', value: any) => DeliveryProfilesQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'name' | 'deliveryRegions.id', value: string) => DeliveryProfilesQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'name' | 'default' | 'deliveryRegions.id' | 'deliveryRegions.active' | 'deliveryRegions.createdDate' | '_createdDate', value: any[]) => DeliveryProfilesQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'name' | 'default' | 'deliveryRegions.id' | 'deliveryRegions.active' | 'deliveryRegions.createdDate' | '_createdDate', value: any) => DeliveryProfilesQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'name' | 'default' | 'deliveryRegions.id' | 'deliveryRegions.active' | 'deliveryRegions.createdDate' | '_createdDate', value: boolean) => DeliveryProfilesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | 'name' | 'default' | 'deliveryRegions.id' | 'deliveryRegions.active' | 'deliveryRegions.destinations' | 'deliveryRegions.createdDate' | '_createdDate'>) => DeliveryProfilesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | 'name' | 'default' | 'deliveryRegions.id' | 'deliveryRegions.active' | 'deliveryRegions.destinations' | 'deliveryRegions.createdDate' | '_createdDate'>) => DeliveryProfilesQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => DeliveryProfilesQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => DeliveryProfilesQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Creates a new DeliveryRegion in an existing DeliveryProfile. * @param deliveryProfileId - delivery profile id to associated with the DeliveryRegion * @param deliveryRegion - DeliveryRegion to be created * @public * @documentationMaturity preview * @requiredField deliveryProfileId * @requiredField deliveryRegion * @requiredField deliveryRegion.deliveryCarriers.backupRate.rate * @requiredField deliveryRegion.destinations.countryCode * @requiredField deliveryRegion.name * @permissionId ECOM.DELIVERY_REGION_CREATE * @adminMethod */ function addDeliveryRegion$2(deliveryProfileId: string, deliveryRegion: DeliveryRegion, options?: AddDeliveryRegionOptions$2): Promise; interface AddDeliveryRegionOptions$2 { /** * DeliveryProfile revision. * @readonly */ revision?: string | null; } /** * Update a DeliveryRegion, supports partial update * Pass the latest `revision` for a successful update * * This method does not allow setting or updating the delivery delivery_carriers in this delivery_region. * Use AddDeliveryCarrier, UpdateDeliveryCarrier and RemoveDeliveryCarrier for these functionalities. * @public * @documentationMaturity preview * @requiredField deliveryRegion * @requiredField identifiers * @requiredField identifiers.deliveryProfileId * @requiredField identifiers.deliveryRegionId * @permissionId ECOM.DELIVERY_REGION_UPDATE * @adminMethod */ function updateDeliveryRegion(identifiers: UpdateDeliveryRegionIdentifiers, deliveryRegion: UpdateDeliveryRegion, options?: UpdateDeliveryRegionOptions): Promise; interface UpdateDeliveryRegionIdentifiers { /** DeliveryProfile id that owns the DeliveryRegion */ deliveryProfileId: string; /** * The delivery region id. * @readonly */ deliveryRegionId?: string | null; } interface UpdateDeliveryRegion { /** * The delivery region id. * @readonly */ _id?: string | null; /** Optional name of the rule, for example: "Domestic". */ name?: string | null; /** Indicates that this rule is active, default value is true. */ active?: boolean | null; /** * The spi implementers id of shipping-rates spi, assigned to this rule. * @readonly */ deliveryCarriers?: DeliveryCarrier[]; /** The operation region of this rule, if empty than it is global. */ destinations?: Destination$1[]; /** * Represents the time this Profile was created * @readonly */ _createdDate?: Date | null; } interface UpdateDeliveryRegionOptions { /** * Explicit list of fields to update * @internal */ fieldMask?: string[]; /** * DeliveryProfile revision. * @readonly */ revision?: string | null; } /** * Delete a DeliveryRegion * @public * @documentationMaturity preview * @requiredField identifiers * @requiredField identifiers.deliveryProfileId * @requiredField identifiers.deliveryRegionId * @permissionId ECOM.DELIVERY_REGION_DELETE * @adminMethod */ function removeDeliveryRegion$2(identifiers: RemoveDeliveryRegionIdentifiers, options?: RemoveDeliveryRegionOptions$2): Promise; interface RemoveDeliveryRegionIdentifiers { /** DeliveryProfile id that owns the DeliveryRegion */ deliveryProfileId: string; /** Id of the DeliveryRegion to delete */ deliveryRegionId: string; } interface RemoveDeliveryRegionOptions$2 { /** * DeliveryProfile revision. * @readonly */ revision?: string | null; } /** * Add a delivery_carrier to a delivery region * @param deliveryRegionId - delivery_region id to associated with the delivery_carrier. * @public * @documentationMaturity preview * @requiredField deliveryRegionId * @requiredField options * @requiredField options.deliveryCarrier * @requiredField options.deliveryCarrier.backupRate.rate * @permissionId ECOM.DELIVERY_CARRIER_ADD * @adminMethod */ function addDeliveryCarrier(deliveryRegionId: string, options: AddDeliveryCarrierOptions): Promise; interface AddDeliveryCarrierOptions { /** delivery_carrier to be added. */ deliveryCarrier: DeliveryCarrier; } /** * Remove a delivery_carrier from a delivery region * @param deliveryRegionId - Id of the DeliveryRegion * @public * @documentationMaturity preview * @requiredField deliveryRegionId * @requiredField options * @requiredField options.appId * @permissionId ECOM.DELIVERY_CARRIER_REMOVE * @adminMethod */ function removeDeliveryCarrier(deliveryRegionId: string, options: RemoveDeliveryCarrierOptions): Promise; interface RemoveDeliveryCarrierOptions { /** DeliveryCarrier app id to be removed. */ appId: string; } /** * Update a delivery carrier in a delivery region * @param deliveryRegionId - DeliveryRegion id * @public * @documentationMaturity preview * @requiredField deliveryRegionId * @requiredField options.deliveryCarrier.appId * @permissionId ECOM.DELIVERY_CARRIER_UPDATE * @adminMethod */ function updateDeliveryCarrier(deliveryRegionId: string, options?: UpdateDeliveryCarrierOptions): Promise; interface UpdateDeliveryCarrierOptions { /** Updated delivery_carrier */ deliveryCarrier?: DeliveryCarrier; /** * Explicit list of fields to update * @internal */ fieldMask?: string[]; } /** * List all installed delivery carriers in order to set their ids in delivery rules * @public * @documentationMaturity preview * @permissionId ECOM.DELIVERY_CARRIER_DETAILS_READ * @adminMethod */ function listDeliveryCarrierDetails(): Promise; /** * Get delivery carrier settings for a delivery profile and delivery region. * These are returned in a table format for the dashboard. * @param deliveryProfileId - Delivery profile id. * @public * @documentationMaturity preview * @requiredField deliveryProfileId * @permissionId ECOM.DELIVERY_CARRIER_READ * @adminMethod */ function listDeliveryCarriers(deliveryProfileId: string, options?: ListDeliveryCarriersOptions): Promise; interface ListDeliveryCarriersOptions { /** Delivery app ids to get settings for. */ appIds?: string[]; } /** * Updates extended fields of a DeliveryProfile without incrementing revision * @param _id - ID of the entity to update. * @param namespace - Identifier for the app whose extended fields are being updated. * @public * @documentationMaturity preview * @requiredField _id * @requiredField namespace * @requiredField options * @requiredField options.namespaceData * @permissionId ECOM.DELIVERY_PROFILE_UPDATE * @adminMethod */ function updateExtendedFields$4(_id: string, namespace: string, options: UpdateExtendedFieldsOptions$4): Promise; interface UpdateExtendedFieldsOptions$4 { /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } type ecomV1DeliveryProfile_universal_d_DeliveryProfile = DeliveryProfile; type ecomV1DeliveryProfile_universal_d_DeliveryRegion = DeliveryRegion; type ecomV1DeliveryProfile_universal_d_DeliveryCarrier = DeliveryCarrier; type ecomV1DeliveryProfile_universal_d_BackupRate = BackupRate; type ecomV1DeliveryProfile_universal_d_CreatedByIdOneOf = CreatedByIdOneOf; type ecomV1DeliveryProfile_universal_d_DeliveryRegionAdded = DeliveryRegionAdded; type ecomV1DeliveryProfile_universal_d_DeliveryRegionRemoved = DeliveryRegionRemoved; type ecomV1DeliveryProfile_universal_d_DeliveryRegionUpdated = DeliveryRegionUpdated; type ecomV1DeliveryProfile_universal_d_CreateDeliveryProfileRequest = CreateDeliveryProfileRequest; type ecomV1DeliveryProfile_universal_d_CreateDeliveryProfileResponse = CreateDeliveryProfileResponse; type ecomV1DeliveryProfile_universal_d_GetDeliveryProfileRequest = GetDeliveryProfileRequest; type ecomV1DeliveryProfile_universal_d_GetDeliveryProfileResponse = GetDeliveryProfileResponse; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryProfileRequest = UpdateDeliveryProfileRequest; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryProfileResponse = UpdateDeliveryProfileResponse; type ecomV1DeliveryProfile_universal_d_DeleteDeliveryProfileRequest = DeleteDeliveryProfileRequest; type ecomV1DeliveryProfile_universal_d_DeleteDeliveryProfileResponse = DeleteDeliveryProfileResponse; type ecomV1DeliveryProfile_universal_d_QueryDeliveryProfilesRequest = QueryDeliveryProfilesRequest; type ecomV1DeliveryProfile_universal_d_QueryDeliveryProfilesResponse = QueryDeliveryProfilesResponse; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryRegionRequest = UpdateDeliveryRegionRequest; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryRegionResponse = UpdateDeliveryRegionResponse; type ecomV1DeliveryProfile_universal_d_AddDeliveryCarrierRequest = AddDeliveryCarrierRequest; type ecomV1DeliveryProfile_universal_d_AddDeliveryCarrierResponse = AddDeliveryCarrierResponse; type ecomV1DeliveryProfile_universal_d_RemoveDeliveryCarrierRequest = RemoveDeliveryCarrierRequest; type ecomV1DeliveryProfile_universal_d_RemoveDeliveryCarrierResponse = RemoveDeliveryCarrierResponse; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryCarrierRequest = UpdateDeliveryCarrierRequest; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryCarrierResponse = UpdateDeliveryCarrierResponse; type ecomV1DeliveryProfile_universal_d_ListDeliveryCarrierDetailsRequest = ListDeliveryCarrierDetailsRequest; type ecomV1DeliveryProfile_universal_d_ListDeliveryCarrierDetailsResponse = ListDeliveryCarrierDetailsResponse; type ecomV1DeliveryProfile_universal_d_DeliveryCarrierDetails = DeliveryCarrierDetails; type ecomV1DeliveryProfile_universal_d_ListDeliveryCarriersRequest = ListDeliveryCarriersRequest; type ecomV1DeliveryProfile_universal_d_ListDeliveryCarriersResponse = ListDeliveryCarriersResponse; type ecomV1DeliveryProfile_universal_d_ListDeliveryCarriersResult = ListDeliveryCarriersResult; type ecomV1DeliveryProfile_universal_d_DeliveryCarrierRegionalSettings = DeliveryCarrierRegionalSettings; type ecomV1DeliveryProfile_universal_d_DashboardTable = DashboardTable; type ecomV1DeliveryProfile_universal_d_Column = Column; type ecomV1DeliveryProfile_universal_d_Row = Row; type ecomV1DeliveryProfile_universal_d_MetaSiteSpecialEvent = MetaSiteSpecialEvent; type ecomV1DeliveryProfile_universal_d_MetaSiteSpecialEventPayloadOneOf = MetaSiteSpecialEventPayloadOneOf; type ecomV1DeliveryProfile_universal_d_Asset = Asset; type ecomV1DeliveryProfile_universal_d_SiteCreated = SiteCreated; type ecomV1DeliveryProfile_universal_d_SiteCreatedContext = SiteCreatedContext; const ecomV1DeliveryProfile_universal_d_SiteCreatedContext: typeof SiteCreatedContext; type ecomV1DeliveryProfile_universal_d_SiteTransferred = SiteTransferred; type ecomV1DeliveryProfile_universal_d_SiteDeleted = SiteDeleted; type ecomV1DeliveryProfile_universal_d_DeleteContext = DeleteContext; type ecomV1DeliveryProfile_universal_d_DeleteStatus = DeleteStatus; const ecomV1DeliveryProfile_universal_d_DeleteStatus: typeof DeleteStatus; type ecomV1DeliveryProfile_universal_d_SiteUndeleted = SiteUndeleted; type ecomV1DeliveryProfile_universal_d_SitePublished = SitePublished; type ecomV1DeliveryProfile_universal_d_SiteUnpublished = SiteUnpublished; type ecomV1DeliveryProfile_universal_d_SiteMarkedAsTemplate = SiteMarkedAsTemplate; type ecomV1DeliveryProfile_universal_d_SiteMarkedAsWixSite = SiteMarkedAsWixSite; type ecomV1DeliveryProfile_universal_d_ServiceProvisioned = ServiceProvisioned; type ecomV1DeliveryProfile_universal_d_ServiceRemoved = ServiceRemoved; type ecomV1DeliveryProfile_universal_d_SiteRenamed = SiteRenamed; type ecomV1DeliveryProfile_universal_d_SiteHardDeleted = SiteHardDeleted; type ecomV1DeliveryProfile_universal_d_NamespaceChanged = NamespaceChanged; type ecomV1DeliveryProfile_universal_d_StudioAssigned = StudioAssigned; type ecomV1DeliveryProfile_universal_d_StudioUnassigned = StudioUnassigned; const ecomV1DeliveryProfile_universal_d_createDeliveryProfile: typeof createDeliveryProfile; const ecomV1DeliveryProfile_universal_d_getDeliveryProfile: typeof getDeliveryProfile; const ecomV1DeliveryProfile_universal_d_updateDeliveryProfile: typeof updateDeliveryProfile; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryProfile = UpdateDeliveryProfile; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryProfileOptions = UpdateDeliveryProfileOptions; const ecomV1DeliveryProfile_universal_d_deleteDeliveryProfile: typeof deleteDeliveryProfile; const ecomV1DeliveryProfile_universal_d_queryDeliveryProfiles: typeof queryDeliveryProfiles; type ecomV1DeliveryProfile_universal_d_DeliveryProfilesQueryResult = DeliveryProfilesQueryResult; type ecomV1DeliveryProfile_universal_d_DeliveryProfilesQueryBuilder = DeliveryProfilesQueryBuilder; const ecomV1DeliveryProfile_universal_d_updateDeliveryRegion: typeof updateDeliveryRegion; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryRegionIdentifiers = UpdateDeliveryRegionIdentifiers; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryRegion = UpdateDeliveryRegion; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryRegionOptions = UpdateDeliveryRegionOptions; type ecomV1DeliveryProfile_universal_d_RemoveDeliveryRegionIdentifiers = RemoveDeliveryRegionIdentifiers; const ecomV1DeliveryProfile_universal_d_addDeliveryCarrier: typeof addDeliveryCarrier; type ecomV1DeliveryProfile_universal_d_AddDeliveryCarrierOptions = AddDeliveryCarrierOptions; const ecomV1DeliveryProfile_universal_d_removeDeliveryCarrier: typeof removeDeliveryCarrier; type ecomV1DeliveryProfile_universal_d_RemoveDeliveryCarrierOptions = RemoveDeliveryCarrierOptions; const ecomV1DeliveryProfile_universal_d_updateDeliveryCarrier: typeof updateDeliveryCarrier; type ecomV1DeliveryProfile_universal_d_UpdateDeliveryCarrierOptions = UpdateDeliveryCarrierOptions; const ecomV1DeliveryProfile_universal_d_listDeliveryCarrierDetails: typeof listDeliveryCarrierDetails; const ecomV1DeliveryProfile_universal_d_listDeliveryCarriers: typeof listDeliveryCarriers; type ecomV1DeliveryProfile_universal_d_ListDeliveryCarriersOptions = ListDeliveryCarriersOptions; namespace ecomV1DeliveryProfile_universal_d { export { ecomV1DeliveryProfile_universal_d_DeliveryProfile as DeliveryProfile, ecomV1DeliveryProfile_universal_d_DeliveryRegion as DeliveryRegion, ecomV1DeliveryProfile_universal_d_DeliveryCarrier as DeliveryCarrier, ecomV1DeliveryProfile_universal_d_BackupRate as BackupRate, AdditionalCharge$1 as AdditionalCharge, ChargeType$2 as ChargeType, Destination$1 as Destination, CreatedBy$2 as CreatedBy, ecomV1DeliveryProfile_universal_d_CreatedByIdOneOf as CreatedByIdOneOf, ExtendedFields$6 as ExtendedFields, ecomV1DeliveryProfile_universal_d_DeliveryRegionAdded as DeliveryRegionAdded, ecomV1DeliveryProfile_universal_d_DeliveryRegionRemoved as DeliveryRegionRemoved, ecomV1DeliveryProfile_universal_d_DeliveryRegionUpdated as DeliveryRegionUpdated, ecomV1DeliveryProfile_universal_d_CreateDeliveryProfileRequest as CreateDeliveryProfileRequest, ecomV1DeliveryProfile_universal_d_CreateDeliveryProfileResponse as CreateDeliveryProfileResponse, ecomV1DeliveryProfile_universal_d_GetDeliveryProfileRequest as GetDeliveryProfileRequest, ecomV1DeliveryProfile_universal_d_GetDeliveryProfileResponse as GetDeliveryProfileResponse, ecomV1DeliveryProfile_universal_d_UpdateDeliveryProfileRequest as UpdateDeliveryProfileRequest, ecomV1DeliveryProfile_universal_d_UpdateDeliveryProfileResponse as UpdateDeliveryProfileResponse, ecomV1DeliveryProfile_universal_d_DeleteDeliveryProfileRequest as DeleteDeliveryProfileRequest, ecomV1DeliveryProfile_universal_d_DeleteDeliveryProfileResponse as DeleteDeliveryProfileResponse, ecomV1DeliveryProfile_universal_d_QueryDeliveryProfilesRequest as QueryDeliveryProfilesRequest, CursorQuery$6 as CursorQuery, CursorQueryPagingMethodOneOf$6 as CursorQueryPagingMethodOneOf, Sorting$a as Sorting, SortOrder$a as SortOrder, CursorPaging$a as CursorPaging, ecomV1DeliveryProfile_universal_d_QueryDeliveryProfilesResponse as QueryDeliveryProfilesResponse, CursorPagingMetadata$9 as CursorPagingMetadata, Cursors$a as Cursors, AddDeliveryRegionRequest$2 as AddDeliveryRegionRequest, AddDeliveryRegionResponse$2 as AddDeliveryRegionResponse, ecomV1DeliveryProfile_universal_d_UpdateDeliveryRegionRequest as UpdateDeliveryRegionRequest, ecomV1DeliveryProfile_universal_d_UpdateDeliveryRegionResponse as UpdateDeliveryRegionResponse, RemoveDeliveryRegionRequest$2 as RemoveDeliveryRegionRequest, RemoveDeliveryRegionResponse$2 as RemoveDeliveryRegionResponse, ecomV1DeliveryProfile_universal_d_AddDeliveryCarrierRequest as AddDeliveryCarrierRequest, ecomV1DeliveryProfile_universal_d_AddDeliveryCarrierResponse as AddDeliveryCarrierResponse, ecomV1DeliveryProfile_universal_d_RemoveDeliveryCarrierRequest as RemoveDeliveryCarrierRequest, ecomV1DeliveryProfile_universal_d_RemoveDeliveryCarrierResponse as RemoveDeliveryCarrierResponse, ecomV1DeliveryProfile_universal_d_UpdateDeliveryCarrierRequest as UpdateDeliveryCarrierRequest, ecomV1DeliveryProfile_universal_d_UpdateDeliveryCarrierResponse as UpdateDeliveryCarrierResponse, ecomV1DeliveryProfile_universal_d_ListDeliveryCarrierDetailsRequest as ListDeliveryCarrierDetailsRequest, ecomV1DeliveryProfile_universal_d_ListDeliveryCarrierDetailsResponse as ListDeliveryCarrierDetailsResponse, ecomV1DeliveryProfile_universal_d_DeliveryCarrierDetails as DeliveryCarrierDetails, ecomV1DeliveryProfile_universal_d_ListDeliveryCarriersRequest as ListDeliveryCarriersRequest, ecomV1DeliveryProfile_universal_d_ListDeliveryCarriersResponse as ListDeliveryCarriersResponse, ecomV1DeliveryProfile_universal_d_ListDeliveryCarriersResult as ListDeliveryCarriersResult, ItemMetadata$3 as ItemMetadata, ApplicationError$7 as ApplicationError, ecomV1DeliveryProfile_universal_d_DeliveryCarrierRegionalSettings as DeliveryCarrierRegionalSettings, ecomV1DeliveryProfile_universal_d_DashboardTable as DashboardTable, ecomV1DeliveryProfile_universal_d_Column as Column, ecomV1DeliveryProfile_universal_d_Row as Row, BulkActionMetadata$3 as BulkActionMetadata, UpdateExtendedFieldsRequest$4 as UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse$4 as UpdateExtendedFieldsResponse, ecomV1DeliveryProfile_universal_d_MetaSiteSpecialEvent as MetaSiteSpecialEvent, ecomV1DeliveryProfile_universal_d_MetaSiteSpecialEventPayloadOneOf as MetaSiteSpecialEventPayloadOneOf, ecomV1DeliveryProfile_universal_d_Asset as Asset, State$1 as State, ecomV1DeliveryProfile_universal_d_SiteCreated as SiteCreated, ecomV1DeliveryProfile_universal_d_SiteCreatedContext as SiteCreatedContext, Namespace$1 as Namespace, ecomV1DeliveryProfile_universal_d_SiteTransferred as SiteTransferred, ecomV1DeliveryProfile_universal_d_SiteDeleted as SiteDeleted, ecomV1DeliveryProfile_universal_d_DeleteContext as DeleteContext, ecomV1DeliveryProfile_universal_d_DeleteStatus as DeleteStatus, ecomV1DeliveryProfile_universal_d_SiteUndeleted as SiteUndeleted, ecomV1DeliveryProfile_universal_d_SitePublished as SitePublished, ecomV1DeliveryProfile_universal_d_SiteUnpublished as SiteUnpublished, ecomV1DeliveryProfile_universal_d_SiteMarkedAsTemplate as SiteMarkedAsTemplate, ecomV1DeliveryProfile_universal_d_SiteMarkedAsWixSite as SiteMarkedAsWixSite, ecomV1DeliveryProfile_universal_d_ServiceProvisioned as ServiceProvisioned, ecomV1DeliveryProfile_universal_d_ServiceRemoved as ServiceRemoved, ecomV1DeliveryProfile_universal_d_SiteRenamed as SiteRenamed, ecomV1DeliveryProfile_universal_d_SiteHardDeleted as SiteHardDeleted, ecomV1DeliveryProfile_universal_d_NamespaceChanged as NamespaceChanged, ecomV1DeliveryProfile_universal_d_StudioAssigned as StudioAssigned, ecomV1DeliveryProfile_universal_d_StudioUnassigned as StudioUnassigned, Empty$7 as Empty, DomainEvent$d as DomainEvent, DomainEventBodyOneOf$d as DomainEventBodyOneOf, EntityCreatedEvent$d as EntityCreatedEvent, RestoreInfo$d as RestoreInfo, EntityUpdatedEvent$d as EntityUpdatedEvent, EntityDeletedEvent$d as EntityDeletedEvent, ActionEvent$d as ActionEvent, MessageEnvelope$c as MessageEnvelope, IdentificationData$d as IdentificationData, IdentificationDataIdOneOf$d as IdentificationDataIdOneOf, WebhookIdentityType$c as WebhookIdentityType, ecomV1DeliveryProfile_universal_d_createDeliveryProfile as createDeliveryProfile, ecomV1DeliveryProfile_universal_d_getDeliveryProfile as getDeliveryProfile, ecomV1DeliveryProfile_universal_d_updateDeliveryProfile as updateDeliveryProfile, ecomV1DeliveryProfile_universal_d_UpdateDeliveryProfile as UpdateDeliveryProfile, ecomV1DeliveryProfile_universal_d_UpdateDeliveryProfileOptions as UpdateDeliveryProfileOptions, ecomV1DeliveryProfile_universal_d_deleteDeliveryProfile as deleteDeliveryProfile, ecomV1DeliveryProfile_universal_d_queryDeliveryProfiles as queryDeliveryProfiles, ecomV1DeliveryProfile_universal_d_DeliveryProfilesQueryResult as DeliveryProfilesQueryResult, ecomV1DeliveryProfile_universal_d_DeliveryProfilesQueryBuilder as DeliveryProfilesQueryBuilder, addDeliveryRegion$2 as addDeliveryRegion, AddDeliveryRegionOptions$2 as AddDeliveryRegionOptions, ecomV1DeliveryProfile_universal_d_updateDeliveryRegion as updateDeliveryRegion, ecomV1DeliveryProfile_universal_d_UpdateDeliveryRegionIdentifiers as UpdateDeliveryRegionIdentifiers, ecomV1DeliveryProfile_universal_d_UpdateDeliveryRegion as UpdateDeliveryRegion, ecomV1DeliveryProfile_universal_d_UpdateDeliveryRegionOptions as UpdateDeliveryRegionOptions, removeDeliveryRegion$2 as removeDeliveryRegion, ecomV1DeliveryProfile_universal_d_RemoveDeliveryRegionIdentifiers as RemoveDeliveryRegionIdentifiers, RemoveDeliveryRegionOptions$2 as RemoveDeliveryRegionOptions, ecomV1DeliveryProfile_universal_d_addDeliveryCarrier as addDeliveryCarrier, ecomV1DeliveryProfile_universal_d_AddDeliveryCarrierOptions as AddDeliveryCarrierOptions, ecomV1DeliveryProfile_universal_d_removeDeliveryCarrier as removeDeliveryCarrier, ecomV1DeliveryProfile_universal_d_RemoveDeliveryCarrierOptions as RemoveDeliveryCarrierOptions, ecomV1DeliveryProfile_universal_d_updateDeliveryCarrier as updateDeliveryCarrier, ecomV1DeliveryProfile_universal_d_UpdateDeliveryCarrierOptions as UpdateDeliveryCarrierOptions, ecomV1DeliveryProfile_universal_d_listDeliveryCarrierDetails as listDeliveryCarrierDetails, ecomV1DeliveryProfile_universal_d_listDeliveryCarriers as listDeliveryCarriers, ecomV1DeliveryProfile_universal_d_ListDeliveryCarriersOptions as ListDeliveryCarriersOptions, updateExtendedFields$4 as updateExtendedFields, UpdateExtendedFieldsOptions$4 as UpdateExtendedFieldsOptions, }; } /** DraftOrder is the main entity of DraftOrders service. It represents a single edit order. */ interface DraftOrder { /** * Draft order ID. * @readonly */ _id?: string | null; /** ID of the order this draft commits to. */ orderId?: string | null; /** * Line items. * Includes details about changes when relevant. */ lineItems?: ItemDetails[]; /** * Shipping info. * Includes details about changes when relevant. */ shippingInfo?: ShippingDetails; /** * Buyer information. * @deprecated Buyer information. * @replacedBy buyer_info_details * @targetRemovalDate 2024-08-30 */ buyerInfo?: BuyerInfo$3; /** * Billing address and contact details. * @deprecated Billing address and contact details. * @replacedBy billing_info_details * @targetRemovalDate 2024-08-30 */ billingInfo?: AddressWithContact$1; /** * Additional fees. * Includes details about the source, and whether the additional fee is applied to the order. */ additionalFees?: AdditionalFeeDetails[]; /** * Discounts. * Includes details about the source, and whether the discount is applied to the order. */ discounts?: DiscountDetails[]; /** * Date and time the draft order was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the draft order was updated. * @readonly */ _updatedDate?: Date | null; /** * Identity of the draft order's initiator. * @readonly */ createdBy?: CreatedBy$1; /** * Draft order status. * @readonly */ status?: EditingStatus; /** Weight measurement unit. Defaults to the site's weight unit. */ weightUnit?: WeightUnit$4; /** Currency used for pricing. */ currency?: string | null; /** * Price summary. * @readonly */ priceSummary?: PriceSummary$2; /** * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax summary. * @readonly * @deprecated Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax summary. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxSummary?: TaxSummary$2; /** * Balance summary. * @readonly */ balanceSummary?: BalanceSummary$1; /** Side effects to perform on commit. */ commitSettings?: DraftOrderCommitSettings$1; /** Member ID (if order created by a member). */ memberId?: string | null; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; recipientInfo?: RecipientInfoDetails; /** * Tax information. * @internal */ taxInfo?: OrderTaxInfo$1; /** * Custom field data for the draft order object. * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */ extendedFields?: ExtendedFields$5; /** * Buyer information. * Includes details about changes when relevant. * @internal */ buyerDetails?: BuyerDetails$1; /** * Billing address and contact details. * Includes details about changes when relevant. * @internal */ billingDetails?: BillingDetails; /** * Order business location * Includes details about changes when relevant. * @internal */ businessLocationDetails?: BusinessLocationDetails; } interface ItemDetails extends ItemDetailsChangeTypeOneOf { /** Whether the line item was added as part of the draft. */ added?: boolean; /** Line item fields before the change. */ changedDetails?: ItemChangedDetails$1; /** Whether the line item was removed as part of the draft. */ removed?: boolean; /** Line item details after applied changes. */ lineItem?: OrderLineItem$1; } /** @oneof */ interface ItemDetailsChangeTypeOneOf { /** Whether the line item was added as part of the draft. */ added?: boolean; /** Line item fields before the change. */ changedDetails?: ItemChangedDetails$1; /** Whether the line item was removed as part of the draft. */ removed?: boolean; } interface Price$4 { /** Amount. */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } interface PriceDescription$1 { /** __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Price description translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface OrderLineItem$1 { /** Line item ID. */ _id?: string; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: ProductName$1; /** * References to the line item's origin catalog. * This field may be empty in the case of a custom line item. */ catalogReference?: CatalogReference$4; /** Line item quantity. */ quantity?: number; /** * Total discount for this line item's entire quantity. * @readonly */ totalDiscount?: Price$4; /** Line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: DescriptionLine$1[]; /** Line item image. */ image?: string; /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */ physicalProperties?: PhysicalProperties$3; /** Item type. Either a preset type or custom. */ itemType?: ItemType$2; /** * Fulfiller ID. Field is empty when the line item is self-fulfilled. * To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order). */ fulfillerId?: string | null; /** Number of items that were refunded. */ refundQuantity?: number | null; /** Number of items restocked. */ restockQuantity?: number | null; /** Line item price after line item discounts for display purposes. */ price?: Price$4; /** * Line item price before line item discounts for display purposes. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: Price$4; /** * Total price after discounts, and before tax. * @readonly */ totalPriceBeforeTax?: Price$4; /** * Total price after all discounts and tax. * @readonly */ totalPriceAfterTax?: Price$4; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only. */ paymentOption?: PaymentOptionType$2; /** * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @deprecated Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxDetails?: ItemTaxFullDetails$2; /** Represents all the relevant tax details for a specific line item. */ taxInfo?: LineItemTaxInfo$1; /** Digital file identifier, relevant only for items with type DIGITAL. */ digitalFile?: DigitalFile$2; /** Subscription info. */ subscriptionInfo?: SubscriptionInfo$2; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription$1; /** * Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`. * @readonly */ depositAmount?: Price$4; /** * The Item's Delivery Profile Id * @internal */ deliveryProfileId?: string | null; /** @internal */ shippingGroupId?: string | null; /** * Source locations for this line item. The location's total quantity must not exceed the line item quantity. * @internal */ locations?: LocationAndQuantity$1[]; /** * Total price **after** catalog discounts and line item discounts. * @internal */ lineItemPrice?: Price$4; /** * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin. * @internal * @readonly */ customLineItem?: boolean | null; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field has the same value as `catalogReference.catalogItemId`. * @internal * @readonly */ rootCatalogItemId?: string | null; /** * Address used for tax calculation. * @internal */ taxableAddress?: TaxableAddress$2; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; /** * Whether the price is not yet defined, and will be updated after the order is created. * * Default: `false` * @internal */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * * Default: `false` * @internal */ fixedQuantity?: boolean; /** * Custom extended fields for the line item object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. * @internal */ extendedFields?: ExtendedFields$5; } interface ProductName$1 { /** * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * * Min: 1 character. * Max: 200 characters. */ original?: string; /** * Item name translated into the buyer's language. * * Min: 1 character. * Max: 400 characters. * Default: Same as `original`. */ translated?: string | null; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$4 { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration). */ options?: Record | null; } interface DescriptionLine$1 extends DescriptionLineValueOneOf$1, DescriptionLineDescriptionLineValueOneOf$1 { /** Description line plain text value. */ plainText?: PlainTextValue$1; /** Description line color value. */ colorInfo?: Color$1; /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$1; /** * Description line color. * @internal * @deprecated */ color?: string; /** Description line name. */ name?: DescriptionLineName$1; /** * Description line type. * @internal * @deprecated */ lineType?: DescriptionLineType$1; } /** @oneof */ interface DescriptionLineValueOneOf$1 { /** Description line plain text value. */ plainText?: PlainTextValue$1; /** Description line color value. */ colorInfo?: Color$1; } /** @oneof */ interface DescriptionLineDescriptionLineValueOneOf$1 { /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue$1; /** * Description line color. * @internal * @deprecated */ color?: string; } interface DescriptionLineName$1 { /** Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface PlainTextValue$1 { /** Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line plain text value translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface Color$1 { /** Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line color name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; /** HEX or RGB color code for display. */ code?: string | null; } enum DescriptionLineType$1 { /** Unrecognized type. */ UNRECOGNISED = "UNRECOGNISED", /** Plain text type. */ PLAIN_TEXT = "PLAIN_TEXT", /** Color type. */ COLOR = "COLOR" } interface FocalPoint$1 { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } interface PhysicalProperties$3 { /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */ weight?: number | null; /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string | null; /** Whether this line item is shippable. */ shippable?: boolean; } interface ItemType$2 extends ItemTypeItemTypeDataOneOf$2 { /** Preset item type. */ preset?: ItemTypeItemType$2; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } /** @oneof */ interface ItemTypeItemTypeDataOneOf$2 { /** Preset item type. */ preset?: ItemTypeItemType$2; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } enum ItemTypeItemType$2 { UNRECOGNISED = "UNRECOGNISED", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL", GIFT_CARD = "GIFT_CARD", SERVICE = "SERVICE" } /** Type of selected payment option for catalog item */ enum PaymentOptionType$2 { /** The entire payment for this item happens as part of the checkout. */ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE", /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE", /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */ MEMBERSHIP = "MEMBERSHIP", /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */ DEPOSIT_ONLINE = "DEPOSIT_ONLINE", /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE" } interface ItemTaxFullDetails$2 { /** Taxable amount of this line item. */ taxableAmount?: Price$4; /** * ID of the item's tax group, if specified. * @internal */ taxGroupId?: string | null; /** Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`. */ taxRate?: string; /** The calculated tax, based on the `taxableAmount` and `taxRate`. */ totalTax?: Price$4; } interface LineItemTaxInfo$1 { /** Calculated tax, based on `taxable_amount` and `tax_rate`. */ taxAmount?: Price$4; /** Amount for which tax is calculated. */ taxableAmount?: Price$4; /** Tax rate %, as a decimal point. */ taxRate?: string | null; /** * Tax group ID. * Learn more about [Tax Groups](https://dev.wix.com/docs/rest/business-management/payments/tax/tax-groups/introduction). */ taxGroupId?: string | null; /** Indicates whether the price already includes tax. */ taxIncludedInPrice?: boolean; /** Tax information for a line item. */ taxBreakdown?: LineItemTaxBreakdown$1[]; } /** * TaxBreakdown represents tax information for a line item. * It holds the tax amount and the tax rate for each tax authority that apply on the line item. */ interface LineItemTaxBreakdown$1 { /** Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec". */ jurisdiction?: string | null; /** Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000. */ rate?: string | null; /** Amount of tax calculated for this line item. */ taxAmount?: Price$4; /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */ taxType?: string | null; /** * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. * This name should be explicit enough to allow the merchant to understand what tax was calculated. */ taxName?: string | null; /** Type of jurisdiction that taxes were calculated for. */ jurisdictionType?: JurisdictionType$2; /** Non-taxable amount of the line item price. */ nonTaxableAmount?: Price$4; /** Taxable amount of the line item price. */ taxableAmount?: Price$4; } /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ enum JurisdictionType$2 { UNDEFINED = "UNDEFINED", COUNTRY = "COUNTRY", STATE = "STATE", COUNTY = "COUNTY", CITY = "CITY", SPECIAL = "SPECIAL" } interface DigitalFile$2 { /** ID of the secure file in media. */ fileId?: string; /** Link will exist after the digital links have been generated on the order. */ link?: string | null; /** * Link expiration time and date. * @readonly */ expirationDate?: Date | null; } interface SubscriptionInfo$2 { /** Subscription ID. */ _id?: string | null; /** Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`. */ cycleNumber?: number; /** Subscription option title. For example, `"Monthly coffee Subscription"`. */ subscriptionOptionTitle?: string; /** Subscription option description. For example, `"1kg of selected coffee, once a month"`. */ subscriptionOptionDescription?: string | null; /** Subscription detailed information. */ subscriptionSettings?: SubscriptionSettings$3; } interface SubscriptionSettings$3 { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequency$3; /** Interval of recurring payment. */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number | null; /** * Whether to allow the customer to cancel the subscription. * @internal */ enableCustomerCancellation?: boolean; } /** Frequency unit of recurring payment */ enum SubscriptionFrequency$3 { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } interface LocationAndQuantity$1 { /** Location id in the associated owner app. */ _id?: string; /** Location owner app, if not provided then the site business info locations will be used. */ appId?: string | null; /** Quantity for specific location. */ quantity?: number; } interface TaxableAddress$2 extends TaxableAddressTaxableAddressDataOneOf$2 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$2; } /** @oneof */ interface TaxableAddressTaxableAddressDataOneOf$2 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$2; } enum TaxableAddressType$2 { UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS", BUSINESS = "BUSINESS", BILLING = "BILLING", SHIPPING = "SHIPPING" } interface ExtendedFields$5 { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface ItemChangedDetails$1 { /** Line item quantity before change. */ quantityBeforeChange?: number | null; /** Line item price before change. */ priceBeforeChange?: Price$4; /** Line item price description before change. */ priceDescriptionBeforeChange?: PriceDescription$1; } interface ShippingDetails extends ShippingDetailsChangeTypeOneOf { /** Whether shipping info was added as part of the draft. */ added?: boolean; /** Shipping info before the change. */ changedDetails?: ShippingChangedDetails; /** Whether shipping info was removed as part of the draft. */ removed?: boolean; /** Selected Shipping details. */ shippingInfo?: ShippingInformation$2; } /** @oneof */ interface ShippingDetailsChangeTypeOneOf { /** Whether shipping info was added as part of the draft. */ added?: boolean; /** Shipping info before the change. */ changedDetails?: ShippingChangedDetails; /** Whether shipping info was removed as part of the draft. */ removed?: boolean; } interface ShippingInformation$2 { /** App Def Id of external provider which was a source of shipping info */ carrierId?: string | null; /** Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`. */ code?: string | null; /** * Shipping option title. * For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`. */ title?: string; /** Shipping logistics. */ logistics?: V1DeliveryLogistics; /** Shipping costs. */ cost?: V1ShippingPrice; /** Shipping region. */ region?: ShippingRegion$2; } interface V1DeliveryLogistics extends V1DeliveryLogisticsAddressOneOf { /** Shipping address and contact details. */ shippingDestination?: AddressWithContact$1; /** Pickup details. */ pickupDetails?: V1PickupDetails; /** Expected delivery time in free text. For example, `"3-5 business days"`. */ deliveryTime?: string | null; /** Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`. */ instructions?: string | null; /** * Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @deprecated */ deliverByDate?: Date | null; /** Expected delivery time. */ deliveryTimeSlot?: V1DeliveryTimeSlot; } /** @oneof */ interface V1DeliveryLogisticsAddressOneOf { /** Shipping address and contact details. */ shippingDestination?: AddressWithContact$1; /** Pickup details. */ pickupDetails?: V1PickupDetails; } /** Billing Info and shipping details */ interface AddressWithContact$1 { /** Address. */ address?: Address$6; /** Contact details. */ contactDetails?: FullAddressContactDetails$2; } /** Physical address */ interface Address$6 { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress$5; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** @internal */ location?: AddressLocation$5; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } interface StreetAddress$5 { /** Street number. */ number?: string; /** Street name. */ name?: string; /** * Apartment number. * @internal */ apt?: string; /** * Optional address line 1 * @internal */ formattedAddressLine?: string | null; } interface AddressLocation$5 { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } /** Full contact details for an address */ interface FullAddressContactDetails$2 { /** First name. */ firstName?: string | null; /** Last name. */ lastName?: string | null; /** Phone number. */ phone?: string | null; /** Company name. */ company?: string | null; /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */ vatId?: VatId$3; } interface VatId$3 { /** Customer's tax ID. */ _id?: string; /** * Tax type. * * Supported values: * + `CPF`: for individual tax payers * + `CNPJ`: for corporations */ type?: VatType$3; } /** tax info types */ enum VatType$3 { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } interface V1PickupDetails { /** Pickup address. */ address?: PickupAddress$2; /** Pickup method */ pickupMethod?: PickupDetailsPickupMethod; } /** Physical address */ interface PickupAddress$2 { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: StreetAddress$5; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; /** @internal */ location?: AddressLocation$5; } enum PickupDetailsPickupMethod { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } interface V1DeliveryTimeSlot { /** Delivery slot starting time. */ from?: Date | null; /** Delivery slot ending time. */ to?: Date | null; } interface V1ShippingPrice { /** Shipping price for display purposes. */ price?: Price$4; /** * Total price of shipping after discounts (when relevant), and before tax. * @readonly */ totalPriceBeforeTax?: Price$4; /** * Shipping price after all discounts (if any exist), and after tax. * @readonly */ totalPriceAfterTax?: Price$4; /** Tax details. */ taxDetails?: ItemTaxFullDetails$2; /** * Shipping discount before tax. * @readonly */ discount?: Price$4; } interface ShippingRegion$2 { /** Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. */ name?: string | null; } interface ShippingChangedDetails { /** Shipping info before the change. */ shippingInfoBeforeChange?: ShippingInformation$2; } /** Buyer Info */ interface BuyerInfo$3 extends BuyerInfoIdOneOf$1 { /** Visitor ID (if site visitor is not a member). */ visitorId?: string; /** Member ID (if site visitor is a site member). */ memberId?: string; /** Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://dev.wix.com/api/rest/contacts/contacts/introduction). */ contactId?: string | null; /** Buyer email address. */ email?: string | null; } /** @oneof */ interface BuyerInfoIdOneOf$1 { /** Visitor ID (if site visitor is not a member). */ visitorId?: string; /** Member ID (if site visitor is a site member). */ memberId?: string; } interface AdditionalFeeDetails { /** Additional fee. */ additionalFee?: AdditionalFee$2; /** Tax details related to the additional fee. */ taxDetails?: TaxDetails$1; /** * Source of the additional fee. * * Supported values: * + `ORIGINAL_ORDER`: This additional fee is part of the original order. * + `CUSTOM`: This additional fee was created by the [Create Custom Additional Fees](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/draft-orders/create-custom-additional-fees) API. */ source?: SourceType$1; /** Whether this additional fee is applied to the order. */ applied?: boolean; } interface AdditionalFee$2 { /** Additional fee's unique code for future processing. */ code?: string | null; /** Name of additional fee. */ name?: string; /** Additional fee's price. */ price?: Price$4; /** Tax details. */ taxDetails?: ItemTaxFullDetails$2; /** SPI implementer's `appId`. */ providerAppId?: string | null; /** Additional fee's price before tax. */ priceBeforeTax?: Price$4; /** Additional fee's price after tax. */ priceAfterTax?: Price$4; /** Additional fee's id. */ _id?: string; /** * Optional - Line items associated with this additional fee. * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. */ lineItemIds?: string[]; } interface TaxDetails$1 { /** Indication if additional fee is taxable or not */ taxable?: boolean; /** Optional tax group ID to use when calculating tax for this additional fee */ taxGroupId?: string | null; } enum SourceType$1 { /** Part of the original order */ ORIGINAL_ORDER = "ORIGINAL_ORDER", /** Added by estimate * */ AUTOMATIC = "AUTOMATIC", /** Added manually to current draft order */ CUSTOM = "CUSTOM" } interface DiscountDetails { /** Discount details. */ discount?: AppliedDiscount$2; /** * Source of the discount. * * Supported values: * + `ORIGINAL_ORDER`: This discount is part of the original order. * + `CUSTOM`: This discount was created by the [Create Custom Discounts](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/draft-orders/create-custom-discounts) API. */ source?: SourceType$1; /** Whether this discount is applied to the order. */ applied?: boolean; } interface AppliedDiscount$2 extends AppliedDiscountDiscountSourceOneOf$2 { /** Applied coupon info. */ coupon?: Coupon$2; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$2; /** Automatic Discount */ discountRule?: DiscountRule$2; /** * Discount type. * * `"GLOBAL"` - discount applies to entire order. * * `"SPECIFIC-ITEMS"` - discount applies to specific items. * * `"SHIPPING"` - discount applies to shipping. For example, free shipping. */ discountType?: AppliedDiscountDiscountType; /** * IDs of line items discount applies to. * Deprecated. Use `line_item_discounts` instead. * @deprecated IDs of line items discount applies to. * Deprecated. Use `line_item_discounts` instead. * @replacedBy line_item_discounts * @targetRemovalDate 2024-10-30 */ lineItemIds?: string[]; /** Discount id. */ _id?: string | null; /** * Line items the discount applies to. * @internal */ lineItemDiscounts?: LineItemDiscount$2[]; } /** @oneof */ interface AppliedDiscountDiscountSourceOneOf$2 { /** Applied coupon info. */ coupon?: Coupon$2; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$2; /** Automatic Discount */ discountRule?: DiscountRule$2; } enum AppliedDiscountDiscountType { GLOBAL = "GLOBAL", SPECIFIC_ITEMS = "SPECIFIC_ITEMS", SHIPPING = "SHIPPING" } /** Coupon */ interface Coupon$2 { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** Coupon name. */ name?: string; /** Coupon value. */ amount?: Price$4; } interface MerchantDiscount$2 extends MerchantDiscountMerchantDiscountReasonOneOf$1 { /** * Pre-defined discount reason (optional). * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange. */ discountReason?: DiscountReason$1; /** Discount description as free text (optional). */ description?: string | null; /** Discount amount. */ amount?: Price$4; /** * Discount percentage. * @internal */ percentage?: string | null; } /** @oneof */ interface MerchantDiscountMerchantDiscountReasonOneOf$1 { /** * Pre-defined discount reason (optional). * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange. */ discountReason?: DiscountReason$1; /** Discount description as free text (optional). */ description?: string | null; } enum DiscountReason$1 { UNSPECIFIED = "UNSPECIFIED", EXCHANGED_ITEMS = "EXCHANGED_ITEMS" } interface DiscountRule$2 { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: DiscountRuleName$2; /** Discount value. */ amount?: Price$4; } interface DiscountRuleName$2 { /** Original discount rule name (in site's default language). */ original?: string; /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string | null; } interface LineItemDiscount$2 { /** ID of line item the discount applies to. */ _id?: string; /** Total discount for this line item. */ totalDiscount?: Price$4; } interface CreatedBy$1 extends CreatedByStringOneOf$1 { /** User ID. When the draft order was created by a Wix user. */ userId?: string; /** App ID. When the draft order was created by an app. */ appId?: string; } /** @oneof */ interface CreatedByStringOneOf$1 { /** User ID. When the draft order was created by a Wix user. */ userId?: string; /** App ID. When the draft order was created by an app. */ appId?: string; } enum EditingStatus { /** DraftOrder is in draft state. */ DRAFT = "DRAFT", /** DraftOrder is in committed state. */ COMMITTED = "COMMITTED" } enum WeightUnit$4 { /** Weight unit can't be classified, due to an error */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms */ KG = "KG", /** Pounds */ LB = "LB" } interface PriceSummary$2 { /** Subtotal of all the line items, before discounts and before tax. */ subtotal?: Price$4; /** Total shipping price, before discounts and before tax. */ shipping?: Price$4; /** Total tax on this order. */ tax?: Price$4; /** Total calculated discount value. */ discount?: Price$4; /** * Deprecated - use `total` instead. * @internal * @deprecated */ totalPrice?: Price$4; /** Order’s total price after discounts and tax. */ total?: Price$4; /** * Order's total price including gift card. * @internal * @deprecated */ totalWithGiftCard?: Price$4; /** * Order's total price after without gift card. * @internal * @deprecated */ totalWithoutGiftCard?: Price$4; /** Total price of additional fees before tax. */ totalAdditionalFees?: Price$4; } interface TaxSummary$2 { /** * Total tax. * @readonly */ totalTax?: Price$4; /** * manual tax rate * @internal * @readonly */ manualTaxRate?: string | null; } interface BalanceSummary$1 { /** * Amount left to pay for order to be considered paid. * @readonly */ balance?: Balance$1; /** * Sum of all approved and successful payments. * * The value includes payments that have subsequently been fully or partially refunded. * @internal * @readonly */ paid?: Price$4; /** * Sum of all successfully refunded payments. * @internal * @readonly */ refunded?: Price$4; /** * Sum of all authorized payments. * @readonly */ authorized?: Price$4; } /** * Order balance. Reflects amount left to be paid on order and is calculated dynamically. Can be negative per balance definition. * `amount` field depends on order payment status: * + UNSPECIFIED, NOT_PAID: price_summary.total_price * + PARTIALLY_PAID : price_summary.total_price - pay_now.total_price * + PENDING, REFUNDED, PARTIALLY_REFUNDED, PAID : 0 */ interface Balance$1 { /** * Balance amount. * * A negative `amount` represents the amount to be refunded. This can happen due to overcharging or the order being modified after a payment has been made. * @readonly */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } /** Side-effects upon committing a draft order. */ interface DraftOrderCommitSettings$1 { /** * Whether to send notifications to the buyer. * * Default: `true` */ sendNotificationsToBuyer?: boolean | null; /** * Whether to send notifications to the business. * * Default: `true` */ sendNotificationsToBusiness?: boolean | null; /** * Whether to add activities to the order. * * Default: `true` */ addActivitiesToOrder?: boolean | null; /** * Whether to send email notifications to custom fulfillers when there is a change in the shippable items they fulfill. * * Default: `true` */ sendNotificationsToCustomFulfillers?: boolean | null; /** * Line item IDs for which to perform an inventory change. * When not provided, inventory will not change. */ updateInventory?: InventoryUpdate[]; } interface InventoryUpdate { /** Line item ID. */ lineItemId?: string; } interface RecipientInfoDetails extends RecipientInfoDetailsChangeTypeOneOf { /** Indicates that recipient information was added during draft. */ added?: boolean; /** Indicates that recipient information was changed. Contains recipient information before draft. */ changedDetails?: RecipientInfoChangedDetails; /** Indicates that recipient information was removed during draft. */ removed?: boolean; /** Order recipient address and contact details. */ recipientInfo?: AddressWithContact$1; } /** @oneof */ interface RecipientInfoDetailsChangeTypeOneOf { /** Indicates that recipient information was added during draft. */ added?: boolean; /** Indicates that recipient information was changed. Contains recipient information before draft. */ changedDetails?: RecipientInfoChangedDetails; /** Indicates that recipient information was removed during draft. */ removed?: boolean; } interface RecipientInfoChangedDetails { /** Order recipient address and contact details before draft. */ recipientInfoBeforeChange?: AddressWithContact$1; } interface OrderTaxInfo$1 { /** Calculated tax, added from line items. */ totalTax?: Price$4; /** The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. */ taxBreakdown?: OrderTaxBreakdown$1[]; /** * Manual tax rate * @internal * @readonly */ manualTaxRate?: string | null; /** * Whether the draft order is exempt from tax calculations. * * Default: `false` * @readonly */ taxExempt?: boolean | null; } /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * Tax breakdown is the tax amount split to the tax authorities that applied on the line item. */ interface OrderTaxBreakdown$1 { /** The name of the tax against which this tax amount was calculated. */ taxName?: string; /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */ taxType?: string; /** The name of the jurisdiction in which this tax detail applies. */ jurisdiction?: string; /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ jurisdictionType?: JurisdictionType$2; /** The rate at which this tax detail was calculated. */ rate?: string; /** The sum of all the tax from line items that calculated by the tax identifiers. */ aggregatedTaxAmount?: Price$4; /** * The sum of all the taxable amount from line items for tax identifiers. * @internal */ aggregatedTaxableAmount?: Price$4; } interface BuyerDetails$1 extends BuyerDetailsChangeTypeOneOf { /** * Indicates that buyer information was added during draft. * @internal */ added?: boolean; /** * Indicates that buyer information was changed. Contains billing information before draft. * @internal */ changedDetails?: BuyerChangedDetails; /** * Indicates that buyer information was removed during draft. * @internal */ removed?: boolean; /** * Buyer information. * @internal */ buyerInfo?: BuyerInfo$3; } /** @oneof */ interface BuyerDetailsChangeTypeOneOf { /** * Indicates that buyer information was added during draft. * @internal */ added?: boolean; /** * Indicates that buyer information was changed. Contains billing information before draft. * @internal */ changedDetails?: BuyerChangedDetails; /** * Indicates that buyer information was removed during draft. * @internal */ removed?: boolean; } interface BuyerChangedDetails { /** * Buyer information before draft. * @internal */ buyerInfoBeforeChange?: BuyerInfo$3; } interface BillingDetails extends BillingDetailsChangeTypeOneOf { /** * Indicates that billing information was added during draft. * @internal */ added?: boolean; /** * Indicates that billing information was changed. Contains billing information before draft. * @internal */ changedDetails?: BillingChangedDetails; /** * Indicates that billing information was removed during draft. * @internal */ removed?: boolean; /** * Billing address and contact details. * @internal */ billingInfo?: AddressWithContact$1; } /** @oneof */ interface BillingDetailsChangeTypeOneOf { /** * Indicates that billing information was added during draft. * @internal */ added?: boolean; /** * Indicates that billing information was changed. Contains billing information before draft. * @internal */ changedDetails?: BillingChangedDetails; /** * Indicates that billing information was removed during draft. * @internal */ removed?: boolean; } interface BillingChangedDetails { /** * Billing address and contact details before draft. * @internal */ billingInfoBeforeChange?: AddressWithContact$1; } interface BusinessLocationDetails extends BusinessLocationDetailsChangeTypeOneOf { /** * Indicates that business location was added during draft. * @internal */ added?: boolean; /** * Indicates that business location was changed. Contains business location before draft. * @internal */ changedDetails?: BusinessLocationChangedDetails; /** * Indicates that business location was removed during draft. * @internal */ removed?: boolean; /** * Business location. * @internal */ businessLocation?: Location$1; } /** @oneof */ interface BusinessLocationDetailsChangeTypeOneOf { /** * Indicates that business location was added during draft. * @internal */ added?: boolean; /** * Indicates that business location was changed. Contains business location before draft. * @internal */ changedDetails?: BusinessLocationChangedDetails; /** * Indicates that business location was removed during draft. * @internal */ removed?: boolean; } interface Location$1 { /** * Location ID. * Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction). */ _id?: string; /** * Location name. * @readonly */ name?: string; } interface BusinessLocationChangedDetails { /** * Business location before draft. * @internal */ businessLocationBeforeChange?: Location$1; } interface CreateDraftOrderRequest { /** To create a draft from existing order, provide its id. Otherwise, an empty draft will be created. */ orderId: string | null; /** * If true and draft order already exists, it will be reset to the baseline order. * should this be a bool? will it always be private? * @internal */ resetIfExists?: string | null; } interface CreateDraftOrderResponse { /** The draft order details calculated with latest content */ calculatedDraftOrder?: CalculatedDraftOrder; /** * Whether the draft order already exists. * @internal */ preexistingDraftOrder?: boolean | null; } interface CalculatedDraftOrder { /** * The draft order full details with calculations based on it's content. * Discount and additional fee options are also included. */ draftOrder?: DraftOrder; /** Shipping options for the order. */ shippingOptions?: ShippingOption$2[]; /** Errors that occurred during calculation. */ calculationErrors?: CalculationErrors$1; } interface ShippingOption$2 { /** This carrier's unique ID */ carrierId?: string | null; /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; /** Shipping rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`. */ title?: string; /** Shipping logistics. */ logistics?: DeliveryLogistics$3; /** Shipping cost. */ cost?: ShippingPrice$2; } interface DeliveryLogistics$3 { /** When the item is expected to be delivered in free text, e.g "3-5 business days" */ deliveryTime?: string | null; /** Instructions for caller, e.g for pickup: "Ensure to come during Opening Hours, and please don't park in disabled-spot" */ instructions?: string | null; /** Additional pickup details if it's a pickup */ pickupDetails?: PickupDetails$4; /** Expected delivery time slot (from and to time stamps representation) */ deliveryTimeSlot?: DeliveryTimeSlot$3; } interface PickupDetails$4 { /** Pickup address */ address?: Address$6; /** * Pickup method. * * Supported values: * + `"STORE_PICKUP"` * + `"PICKUP_POINT"` */ pickupMethod?: PickupMethod$3; } enum PickupMethod$3 { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } interface DeliveryTimeSlot$3 { /** starting time of the delivery time slot */ from?: Date | null; /** ending time of the delivery time slot */ to?: Date | null; } interface ShippingPrice$2 { /** The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */ price?: Price$4; /** Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function. */ currency?: string; } interface CalculationErrors$1 extends CalculationErrorsShippingCalculationErrorOneOf$1 { /** General shipping calculation error. */ generalShippingCalculationError?: Details$2; /** Carrier errors. */ carrierErrors?: CarrierErrors$1; /** Tax calculation error. */ taxCalculationError?: Details$2; /** Order validation errors. */ orderValidationErrors?: ApplicationError$6[]; } /** @oneof */ interface CalculationErrorsShippingCalculationErrorOneOf$1 { /** General shipping calculation error. */ generalShippingCalculationError?: Details$2; /** Carrier errors. */ carrierErrors?: CarrierErrors$1; } interface Details$2 extends DetailsKindOneOf$2 { applicationError?: ApplicationError$6; validationError?: ValidationError$2; systemError?: SystemError$2; /** * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response * @deprecated */ tracing?: Record; } /** @oneof */ interface DetailsKindOneOf$2 { applicationError?: ApplicationError$6; validationError?: ValidationError$2; systemError?: SystemError$2; } interface ApplicationError$6 { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } /** * example result: * { * "fieldViolations": [ * { * "field": "fieldA", * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]", * "violatedRule": "OTHER", * "ruleName": "INVALID_NOTE", * "data": { * "value": "FI" * } * }, * { * "field": "fieldB", * "description": "field value out of range. supported range: [0-20]", * "violatedRule": "MAX", * "data": { * "threshold": 20 * } * }, * { * "field": "fieldC", * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]", * "violatedRule": "FORMAT", * "data": { * "type": "PHONE" * } * } * ] * } */ interface ValidationError$2 { fieldViolations?: FieldViolation$2[]; } enum RuleType$2 { VALIDATION = "VALIDATION", OTHER = "OTHER", MAX = "MAX", MIN = "MIN", MAX_LENGTH = "MAX_LENGTH", MIN_LENGTH = "MIN_LENGTH", MAX_SIZE = "MAX_SIZE", MIN_SIZE = "MIN_SIZE", FORMAT = "FORMAT", DECIMAL_LTE = "DECIMAL_LTE", DECIMAL_GTE = "DECIMAL_GTE", DECIMAL_LT = "DECIMAL_LT", DECIMAL_GT = "DECIMAL_GT", DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE", INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE", REQUIRED_FIELD = "REQUIRED_FIELD", FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED", ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT", EXACT_LENGTH = "EXACT_LENGTH", EXACT_SIZE = "EXACT_SIZE" } interface FieldViolation$2 { field?: string; description?: string; violatedRule?: RuleType$2; /** applicable when violated_rule=OTHER */ ruleName?: string | null; data?: Record | null; } interface SystemError$2 { /** Error code. */ errorCode?: string | null; } interface CarrierErrors$1 { /** Carrier errors. */ errors?: CarrierError$2[]; } interface CarrierError$2 { /** Carrier ID. */ carrierId?: string; /** Error details. */ error?: Details$2; } interface CreateEmptyDraftOrderRequest { } interface CreateEmptyDraftOrderResponse { /** The draft order details calculated with latest content */ calculatedDraftOrder?: CalculatedDraftOrder; } interface AddLineItemsToDraftOrderRequest { /** The draft order id */ draftOrderId: string; /** Catalog line items to add to draft order. */ catalogLineItems?: CatalogReferenceLineItem[]; /** Custom line items to add to draft order. Custom line items don't trigger the Catalog service plugin. */ customLineItems?: CustomLineItem[]; } interface CatalogReferenceLineItem { /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$4; /** Item quantity. */ quantity?: number; /** Item price override. */ price?: Price$4; /** * Whether the price is not yet defined, and will be updated after the order is created. * * Default: `false` * @internal */ priceUndetermined?: boolean; } interface CustomLineItem { /** Line item ID. */ _id?: string | null; /** * Item quantity. * * Min: `"1"` * Max: `"100000"` */ quantity?: number; /** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$4; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: ProductName$1; /** URL to the item's page on the site. */ url?: string; /** Item price **after** catalog-defined discount and line item discounts. */ price?: Price$4; /** Total line item price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: Price$4; /** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: Price$4; /** Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: Price$4; /** Line item description lines. Used for display purposes for order. */ descriptionLines?: DescriptionLine$1[]; /** Line item image details. */ media?: string; /** Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */ physicalProperties?: PhysicalProperties$3; /** Item type. Either a preset type or custom. */ itemType?: ItemType$2; /** * Fulfiller ID for this item. Field is empty when the item is self-fulfilled. * @internal */ fulfillerId?: string | null; /** * Shipping group ID. * @internal */ shippingGroupId?: string | null; /** * Digital file identifier, relevant only for items with type DIGITAL. * @internal */ digitalFile?: SecuredMedia; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription$1; /** Delivery Profile Id for the product */ deliveryProfileId?: string | null; } interface SecuredMedia { /** Media ID in Wix Media Manager. */ _id?: string; /** Original filename. */ fileName?: string; /** File type. */ fileType?: FileType; } enum FileType { UNSPECIFIED = "UNSPECIFIED", SECURE_PICTURE = "SECURE_PICTURE", SECURE_VIDEO = "SECURE_VIDEO", SECURE_DOCUMENT = "SECURE_DOCUMENT", SECURE_MUSIC = "SECURE_MUSIC", SECURE_ARCHIVE = "SECURE_ARCHIVE" } interface AddLineItemsToDraftOrderResponse { /** The draft order details calculated with latest content */ calculatedDraftOrder?: CalculatedDraftOrder; } interface UpdateLineItemsRequest { /** The draft order id */ draftOrderId: string; /** Details of changes to apply per line item */ lineItemChanges?: LineItemChangeDetails[]; } interface LineItemChangeDetails { /** The line item id to change */ lineItemId?: string; /** The new quantity for the line item. quantity zero means to remove the line item. */ newQuantity?: number | null; /** The new price for 1 unit of the line item */ newPrice?: string | null; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ newPriceDescription?: PriceDescription$1; } interface UpdateLineItemsResponse { /** The draft order details calculated with latest content */ calculatedDraftOrder?: CalculatedDraftOrder; } interface SetDiscountsRequest { /** The draft order id */ draftOrderId: string; /** The discount ids to opt-in. all existing discounts not listed are to be opted-out. */ discounts: IdAndApplied[]; } interface IdAndApplied { /** Discount ID. */ _id?: string; /** Whether to apply the discount to the draft order. */ applied?: boolean; } interface SetDiscountsResponse { /** The draft order details calculated with latest content */ calculatedDraftOrder?: CalculatedDraftOrder; } interface CreateCustomDiscountsRequest { /** The draft order id */ draftOrderId: string; /** The discounts to add. */ discounts?: DiscountOption[]; } interface DiscountOption extends DiscountOptionDiscountAmountOneOf { /** * Discount price amount. * @internal */ priceAmount?: Price$4; /** * Discount percentage amount. * @internal */ percentage?: string | null; /** * Discount type. * * `"GLOBAL"` - discount applies to entire order. * * `"SPECIFIC-ITEMS"` - discount applies to a specific item. * * `"SHIPPING"` - discount applies to shipping. For example, free shipping. */ discountType?: DiscountType$2; /** * ID of line item discount applies to. * @deprecated ID of line item discount applies to. * @replacedBy line_item_discounts * @targetRemovalDate 2024-10-30 */ lineItemId?: string | null; /** * Discount amount. * @deprecated Discount amount. * @replacedBy price_amount and percentage * @targetRemovalDate 2024-08-30 */ amount?: Price$4; /** Discount description as free text (optional). */ description?: string | null; /** * Should opt-in the added discount. default = false. * if not set or false, then to opt-in them, please call SetDiscounts with the added discounts ids */ applyToDraftOrder?: boolean | null; /** * Line items the discount applies to. * @internal */ lineItemDiscounts?: LineItemDiscount$2[]; } /** @oneof */ interface DiscountOptionDiscountAmountOneOf { /** * Discount price amount. * @internal */ priceAmount?: Price$4; /** * Discount percentage amount. * @internal */ percentage?: string | null; } enum DiscountType$2 { UNKNOWN_TYPE = "UNKNOWN_TYPE", GLOBAL = "GLOBAL", SPECIFIC_ITEMS = "SPECIFIC_ITEMS", SHIPPING = "SHIPPING" } interface CreateCustomDiscountsResponse { /** The draft order details with the added discounts */ calculatedDraftOrder?: CalculatedDraftOrder; } interface DeleteCustomDiscountsRequest { /** The draft order id */ draftOrderId: string; /** The discounts to remove */ discountIds: string[]; } interface DeleteCustomDiscountsResponse { /** The draft order details calculated with latest content */ calculatedDraftOrder?: CalculatedDraftOrder; } interface SetAdditionalFeesRequest { /** The draft order id */ draftOrderId: string; /** The additional fees ids to opt-in. all existing additional fees not listed are to be opted-out */ additionalFees: IdAndApplied[]; } interface SetAdditionalFeesResponse { /** The draft order details calculated with modified additional fees */ calculatedDraftOrder?: CalculatedDraftOrder; } interface CreateCustomAdditionalFeesRequest { /** The draft order id */ draftOrderId: string; /** The additional fees to add. added with opted-out setting */ customAdditionalFees?: AdditionalFeeOption[]; } interface AdditionalFeeOption { /** Translated additional fee's name */ name?: string; /** Additional fee's price */ price?: Price$4; /** Tax calculation details */ taxDetails?: TaxDetails$1; /** * Should apply the additional fee. default = false. * if not set or false, then to apply them, please call ApplyAdditionalFees with the added additional fee ids */ applyToDraftOrder?: boolean | null; /** Additional fee's unique code (or ID) for future processing */ code?: string | null; /** * Optional - Line items associated with this additional fee. * If no `lineItemIds` are provided, the fee will be associated with the whole order. * @internal */ lineItemIds?: string[]; } interface CreateCustomAdditionalFeesResponse { /** The draft order details with added custom additional fees */ calculatedDraftOrder?: CalculatedDraftOrder; } interface DeleteCustomAdditionalFeesRequest { /** The draft order id */ draftOrderId: string; /** The additional fees to remove */ customAdditionalFees: string[]; } interface DeleteCustomAdditionalFeesResponse { /** The draft order details calculated with latest content */ calculatedDraftOrder?: CalculatedDraftOrder; } interface SetShippingInfoRequest { /** * The draft order id * @internal */ draftOrderId: string; /** * The shipping info to be set. If passed empty value - value will be reset * @internal */ shippingInfo?: ShippingInformation$2; } interface SetShippingInfoResponse { /** * The draft order details calculated with updated shipping info * @internal */ calculatedDraftOrder?: CalculatedDraftOrder; } interface SetBuyerInfoRequest { /** * The draft order id * @internal */ draftOrderId: string; /** * Buyer information. If passed empty value - value will be reset * @internal */ buyerInfo?: BuyerInfo$3; } interface SetBuyerInfoResponse { /** * The draft order details calculated with updated buyer info * @internal */ calculatedDraftOrder?: CalculatedDraftOrder; } interface SetRecipientInfoRequest { /** * The draft order id * @internal */ draftOrderId: string; /** * Order recipient address and contact details. If passed empty value - value will be reset * @internal */ recipientInfo?: AddressWithContact$1; } interface SetRecipientInfoResponse { /** * The draft order details calculated with updated recipient info * @internal */ calculatedDraftOrder?: CalculatedDraftOrder; } interface SetBillingInfoRequest { /** * The draft order id * @internal */ draftOrderId: string; /** * Billing address and contact details. If passed empty value - value will be reset * @internal */ billingInfo?: AddressWithContact$1; } interface SetBillingInfoResponse { /** * The draft order details calculated with updated billing info * @internal */ calculatedDraftOrder?: CalculatedDraftOrder; } interface UpdateShippingInfoRequest { /** The draft order id */ draftOrderId: string; /** update the shipping option on the order. if not set then the selected shipping is removed */ shippingOption?: ShippingOption$2; } interface UpdateShippingInfoResponse { /** The draft order details calculated with de/selected shipping info */ calculatedDraftOrder?: CalculatedDraftOrder; } interface GetDraftOrderRequest { /** The draft order id */ draftOrderId: string; } interface GetDraftOrderResponse { /** The draft order details calculated with latest content */ calculatedDraftOrder?: CalculatedDraftOrder; } interface GetOrderDraftabilityStatusRequest { /** Order ID. */ orderId: string; } interface GetOrderDraftabilityStatusResponse { /** Order ID. */ orderId?: string; /** Whether a draft can be created from this order */ orderDraftable?: boolean; /** Reasons why the order is not draftable */ nonDraftableReasons?: NonDraftableReason[]; } enum NonDraftableReason { UNSPECIFIED = "UNSPECIFIED", PARTIALLY_OR_FULLY_REFUNDED = "PARTIALLY_OR_FULLY_REFUNDED", UNSUPPORTED_CHANNEL_TYPE = "UNSUPPORTED_CHANNEL_TYPE", ORDER_STATUS_IS_NOT_SUPPORTED = "ORDER_STATUS_IS_NOT_SUPPORTED", ORDER_AND_SITE_CURRENCIES_ARE_INCONSISTENT = "ORDER_AND_SITE_CURRENCIES_ARE_INCONSISTENT", ORDER_AND_SITE_WEIGHT_UNITS_ARE_INCONSISTENT = "ORDER_AND_SITE_WEIGHT_UNITS_ARE_INCONSISTENT", AMOUNTS_DO_NOT_ADD_UP = "AMOUNTS_DO_NOT_ADD_UP", /** remove - this is not a reason, it's an error */ ORDER_NOT_FOUND = "ORDER_NOT_FOUND", SUBSCRIPTION_LINE_ITEM_EXISTS = "SUBSCRIPTION_LINE_ITEM_EXISTS", UNSUPPORTED_CATALOG_ITEM = "UNSUPPORTED_CATALOG_ITEM", TAXABLE_EXISTING_ADDITIONAL_FEE = "TAXABLE_EXISTING_ADDITIONAL_FEE" } interface CommitDraftOrderRequest { /** The draft order id */ draftOrderId: string; /** Optional side effects to trigger */ commitSettings?: DraftOrderCommitSettings$1; /** Reason for edit, given by user (optional). */ reason?: string | null; } interface CommitDraftOrderResponse { /** The draft order after commit. */ committedDraftOrder?: DraftOrder; /** The updated order after commit. */ orderAfterCommit?: Order$2; } interface Order$2 { /** * Order ID. * @readonly */ _id?: string | null; /** * Order number displayed in the site owner's dashboard (auto-generated). * @readonly */ number?: string; /** * Date and time the order was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _createdDate?: Date | null; /** * Date and time the order was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _updatedDate?: Date | null; /** * Order line items. * @readonly */ lineItems?: OrderLineItem$1[]; /** Buyer information. */ buyerInfo?: BuyerInfo$3; /** * Order payment status. * + `NOT_PAID` - This can be an order made online, but not yet paid. In such cases `order.status` will be `INITIALIZED`. * + This status also applies when an offline order needs to be manually marked as paid. In such cases `order.status` will be `APPROVED`. * + `PAID` - All payments associated with this order are paid. For online payments: [`payment.regularPaymentDetails.status: APPROVED`](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-transactions/order-transactions-object). For gift cards: [`payment.giftCardPaymentDetails.voided: false`](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-transactions/order-transactions-object). * + `PARTIALLY_REFUNDED` - Order was refunded, but refund amount is less than order total price. * + `FULLY_REFUNDED` - Order fully refunded. Refund amount equals total price. * + `PENDING` - Payments received but not yet confirmed by the payment provider. * + `PARTIALLY_PAID` - At least one payment was received and approved, covering less than total price amount. */ paymentStatus?: PaymentStatus$2; /** * Order fulfillment status. * @readonly */ fulfillmentStatus?: FulfillmentStatus$3; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string | null; /** Weight measurement unit - defaults to site's weight unit. */ weightUnit?: WeightUnit$4; /** Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format. */ currency?: string | null; /** Whether tax is included in line item prices. */ taxIncludedInPrices?: boolean; /** * Site language in which original values are shown. * @readonly */ siteLanguage?: string | null; /** * Order price summary. * @readonly */ priceSummary?: PriceSummary$2; /** Billing address and contact details. */ billingInfo?: AddressWithContact$1; /** Shipping info and selected shipping option details. */ shippingInfo?: ShippingInformation$2; /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string | null; /** * Order status. * + `INITIALIZED`: Order created, but not yet approved or canceled. * + `APPROVED`: Order approved. This happens when either an online payment is received **or** when `order.priceSummary.total = 0` (a zero-total order). Offline orders (cash payment) are automatically approved. * + `CANCELED`: Order canceled by the user. */ status?: OrderStatus$1; /** Whether order is archived. */ archived?: boolean | null; /** * Tax summary. * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * @deprecated Tax summary. * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxSummary?: TaxSummary$2; /** Tax information. */ taxInfo?: OrderTaxInfo$1; /** Applied discounts. */ appliedDiscounts?: AppliedDiscount$2[]; /** * Order activities. * @readonly */ activities?: Activity$2[]; /** Order attribution source. */ attributionSource?: AttributionSource$1; /** * ID of the order's initiator. * @readonly */ createdBy?: V1CreatedBy; /** Information about the sales channel that submitted this order. */ channelInfo?: ChannelInfo$2; /** Whether a human has seen the order. Set when an order is clicked on in the dashboard. */ seenByAHuman?: boolean | null; /** Checkout ID. */ checkoutId?: string | null; /** Custom fields. */ customFields?: CustomField$2[]; /** * Cart ID - required by TYP OOI for legacy orders. * @internal */ cartId?: string | null; /** * Private API flag that allows using read-only "id" during order creation. * @internal */ isInternalOrderCreate?: boolean; /** * Pay now price summary. Part of price_summary that must be payed at checkout * @internal * @readonly */ payNow?: PriceSummary$2; /** * Balance summary. * @readonly */ balanceSummary?: V1BalanceSummary; /** Additional fees applied to the order. */ additionalFees?: AdditionalFee$2[]; /** * Custom string status values aggregated from every fulfillment entity associated with current order * @internal * @readonly */ fulfillmentStatusesAggregate?: FulfillmentStatusesAggregate$1; /** * Custom field data for the order object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields$5; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; /** * Order recipient address and contact details. * * This field may differ from the address in `shippingInfo.logistics` when: * + The chosen shipping option is pickup point or store pickup. * + No shipping option is selected. */ recipientInfo?: AddressWithContact$1; /** * Tag ids collections associated with current entity. private_tags requires separate permissions to be accessible and modifiable. * @internal */ tags?: Tags$1; /** * Date and time the order was originally purchased in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * Used for migration from external systems. */ purchasedDate?: Date | null; /** * Order Location * @internal */ businessLocation?: Location$1; } enum PaymentStatus$2 { UNSPECIFIED = "UNSPECIFIED", /** Order is not paid */ NOT_PAID = "NOT_PAID", /** Order is paid */ PAID = "PAID", /** Order was refunded, refund amount less than order total price */ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", /** Full order total price was refunded */ FULLY_REFUNDED = "FULLY_REFUNDED", /** Payments received but not yet confirmed by the payment provider */ PENDING = "PENDING", /** At least one payment was received and approved, covering less than total price amount */ PARTIALLY_PAID = "PARTIALLY_PAID", /** * Payment received but not yet confirmed by the payment provider and waits for some user action * @documentationMaturity preview */ PENDING_MERCHANT = "PENDING_MERCHANT", /** * Payment was canceled by user on payment provider side * @documentationMaturity preview */ CANCELED = "CANCELED", /** * Payment was declined by payment provider * @documentationMaturity preview */ DECLINED = "DECLINED" } enum FulfillmentStatus$3 { /** None of the order items are fulfilled or the order was manually marked as unfulfilled. */ NOT_FULFILLED = "NOT_FULFILLED", /** * All of the order items are fulfilled or the order was manually marked as fulfilled. * Orders without shipping info are fulfilled automatically. */ FULFILLED = "FULFILLED", /** Some, but not all, of the order items are fulfilled. */ PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED" } enum OrderStatus$1 { INITIALIZED = "INITIALIZED", APPROVED = "APPROVED", CANCELED = "CANCELED", /** @documentationMaturity preview */ PENDING = "PENDING", /** @documentationMaturity preview */ REJECTED = "REJECTED" } interface Activity$2 extends ActivityContentOneOf$1 { /** Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */ customActivity?: CustomActivity$1; /** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */ merchantComment?: MerchantComment$1; /** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */ orderRefunded?: OrderRefunded$2; /** * Details of the original order for this exchange order. `activity.type` must be `ORDER_CREATED_FROM_EXCHANGE`. * @internal */ orderCreatedFromExchange?: OrderCreatedFromExchange$1; /** * Details of an order that was created as a result of an exchange of items in this order. `activity.type` must be `NEW_EXCHANGE_ORDER_CREATED`. * @internal */ newExchangeOrderCreated?: NewExchangeOrderCreated$1; /** * Details of changes made by the Draft Orders API. * @internal */ draftOrderChangesApplied?: DraftOrderChangesApplied$1; /** * Details of the payment method saved for order * @internal */ savedPaymentMethod?: SavedPaymentMethod$1; /** * Details of an authorized payment created. * @internal */ authorizedPaymentCreated?: AuthorizedPaymentCreated$1; /** * Details of an authorized payment captured. * @internal */ authorizedPaymentCaptured?: AuthorizedPaymentCaptured$1; /** * Details of an authorized payment voided. * @internal */ authorizedPaymentVoided?: AuthorizedPaymentVoided$1; /** * Details of an initiated refund process. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ refundInitiated?: RefundInitiated$1; /** * Details of a refunded payment. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefunded?: PaymentRefunded$1; /** * Details of a failed payment refund. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefundFailed?: PaymentRefundFailed$1; /** * Details of refund to store credit. * @internal */ refundedAsStoreCredit?: RefundedAsStoreCredit$1; /** * Details of a pending payment * @internal */ paymentPending?: PaymentPending$1; /** * Details of a canceled payment * @internal */ paymentCanceled?: PaymentCanceled$1; /** * Details of a declined payment * @internal */ paymentDeclined?: PaymentDeclined$1; /** * Activity ID. * @readonly */ _id?: string | null; /** * Activity author's email. * @readonly */ authorEmail?: string | null; /** * Activity creation date and time. * @readonly */ _createdDate?: Date | null; /** Activity type. */ type?: ActivityType$2; } /** @oneof */ interface ActivityContentOneOf$1 { /** Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */ customActivity?: CustomActivity$1; /** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */ merchantComment?: MerchantComment$1; /** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */ orderRefunded?: OrderRefunded$2; /** * Details of the original order for this exchange order. `activity.type` must be `ORDER_CREATED_FROM_EXCHANGE`. * @internal */ orderCreatedFromExchange?: OrderCreatedFromExchange$1; /** * Details of an order that was created as a result of an exchange of items in this order. `activity.type` must be `NEW_EXCHANGE_ORDER_CREATED`. * @internal */ newExchangeOrderCreated?: NewExchangeOrderCreated$1; /** * Details of changes made by the Draft Orders API. * @internal */ draftOrderChangesApplied?: DraftOrderChangesApplied$1; /** * Details of the payment method saved for order * @internal */ savedPaymentMethod?: SavedPaymentMethod$1; /** * Details of an authorized payment created. * @internal */ authorizedPaymentCreated?: AuthorizedPaymentCreated$1; /** * Details of an authorized payment captured. * @internal */ authorizedPaymentCaptured?: AuthorizedPaymentCaptured$1; /** * Details of an authorized payment voided. * @internal */ authorizedPaymentVoided?: AuthorizedPaymentVoided$1; /** * Details of an initiated refund process. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ refundInitiated?: RefundInitiated$1; /** * Details of a refunded payment. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefunded?: PaymentRefunded$1; /** * Details of a failed payment refund. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefundFailed?: PaymentRefundFailed$1; /** * Details of refund to store credit. * @internal */ refundedAsStoreCredit?: RefundedAsStoreCredit$1; /** * Details of a pending payment * @internal */ paymentPending?: PaymentPending$1; /** * Details of a canceled payment * @internal */ paymentCanceled?: PaymentCanceled$1; /** * Details of a declined payment * @internal */ paymentDeclined?: PaymentDeclined$1; } interface CustomActivity$1 { /** ID of the app that created the custom activity. */ appId?: string; /** Custom activity type. For example, `"Ticket number set"`. */ type?: string; /** Additional data in key-value form. For example, `{ "Ticket number": "123456" }`. */ additionalData?: Record; } /** Store owner added a comment */ interface MerchantComment$1 { /** Merchant comment message. */ message?: string; } interface OrderRefunded$2 { /** Whether order was refunded manually. For example, via payment provider or using cash. */ manual?: boolean; /** Refund amount. */ amount?: Price$4; /** Reason for refund. */ reason?: string; } interface OrderCreatedFromExchange$1 { /** ID of the original order for which the exchange happened. */ originalOrderId?: string; } interface NewExchangeOrderCreated$1 { /** ID of the new order created as a result of an exchange of items. */ exchangeOrderId?: string; /** IDs of the items that were exchanged. */ lineItems?: LineItemExchangeData$1[]; } interface LineItemExchangeData$1 { /** ID of the exchanged line item. */ lineItemId?: string; /** Line item quantity being exchanged. */ quantity?: number; } interface DraftOrderChangesApplied$1 { /** Draft order id. */ draftOrderId?: string; /** Reason for edit, given by user (optional). */ reason?: string | null; /** Changes applied to order. */ changes?: OrderChange$1[]; } interface OrderChange$1 extends OrderChangeValueOneOf$1 { lineItemChanged?: LineItemChanges$1; lineItemAdded?: ManagedLineItem$1; lineItemRemoved?: ManagedLineItem$1; discountAdded?: ManagedDiscount$1; discountRemoved?: ManagedDiscount$1; additionalFeeAdded?: ManagedAdditionalFee$1; additionalFeeRemoved?: ManagedAdditionalFee$1; totalPriceChanged?: TotalPriceChange$1; shippingInformationChanged?: ShippingInformationChange$1; } /** @oneof */ interface OrderChangeValueOneOf$1 { lineItemChanged?: LineItemChanges$1; lineItemAdded?: ManagedLineItem$1; lineItemRemoved?: ManagedLineItem$1; discountAdded?: ManagedDiscount$1; discountRemoved?: ManagedDiscount$1; additionalFeeAdded?: ManagedAdditionalFee$1; additionalFeeRemoved?: ManagedAdditionalFee$1; totalPriceChanged?: TotalPriceChange$1; shippingInformationChanged?: ShippingInformationChange$1; } interface LineItemChanges$1 { /** Line item ID. */ _id?: string; /** Item name. */ name?: ProductName$1; /** Item quantity change. */ quantity?: LineItemQuantityChange$1; /** Item price change. */ price?: LineItemPriceChange$1; } interface LineItemQuantityChange$1 { /** Item quantity before update. */ originalQuantity?: number; /** Item quantity after update. */ newQuantity?: number; /** Difference between original and new quantity. Absolute value. */ diff?: number; /** Type of quantity change: increase or decrease. */ deltaType?: LineItemQuantityChangeType$1; } enum LineItemQuantityChangeType$1 { /** Quantity increased. */ QUANTITY_INCREASED = "QUANTITY_INCREASED", /** Quantity decreased. */ QUANTITY_DECREASED = "QUANTITY_DECREASED" } interface LineItemPriceChange$1 { /** Item price before update. */ originalPrice?: Price$4; /** Item price after update. */ newPrice?: Price$4; } interface ManagedLineItem$1 { /** Line item ID. */ _id?: string; /** Item name. */ name?: ProductName$1; /** Added or removed item quantity. */ quantity?: number; } interface ManagedDiscount$1 { /** Discount id. */ _id?: string; /** Discount name: coupon name / discount rule name / merchant discount description. */ name?: TranslatedValue$1; /** Line items discount applies to. */ affectedLineItems?: LineItemAmount$1[]; /** Discount amount. */ totalAmount?: Price$4; } interface TranslatedValue$1 { /** Value in site default language. */ original?: string; /** Translated value. */ translated?: string | null; } interface LineItemAmount$1 { /** Order line item id */ _id?: string; /** Item name. */ name?: ProductName$1; /** Amount associated with this item. (Discount amount for item / additional fee amount for item) */ amount?: Price$4; } interface ManagedAdditionalFee$1 { /** Additional fee id. */ _id?: string; /** Additional fee name. */ name?: TranslatedValue$1; /** Line items additional fee applies to. */ affectedLineItems?: LineItemAmount$1[]; /** Additional fee amount. */ totalAmount?: Price$4; } interface TotalPriceChange$1 { /** Order’s total price after discounts and tax. Before update */ originalTotal?: Price$4; /** Order’s total price after discounts and tax. After update */ newTotal?: Price$4; } interface ShippingInformationChange$1 { /** Order’s Shipping Information. Before update */ originalShippingInfo?: ShippingInformationChangeShippingInformation$1; /** Order’s Shipping Information. After update */ newShippingInfo?: ShippingInformationChangeShippingInformation$1; } interface ShippingInformationChangeShippingInformation$1 { /** Order’s shipping price. */ total?: Price$4; /** Order’s shipping title. */ shippingTitle?: string; } /** Payment method is saved for order */ interface SavedPaymentMethod$1 { /** Payment method name */ name?: string; /** Payment method description */ description?: string | null; } interface AuthorizedPaymentCreated$1 { /** Payment ID of payment associated with this activity */ paymentId?: string; /** Payment amount */ amount?: Price$4; /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface AuthorizedPaymentCaptured$1 { /** Payment ID of payment associated with this activity */ paymentId?: string; /** Payment amount */ amount?: Price$4; /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface AuthorizedPaymentVoided$1 { /** Payment ID of payment associated with this activity */ paymentId?: string; /** Payment amount */ amount?: Price$4; /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface RefundInitiated$1 { /** Refund ID. */ refundId?: string; /** Refund amount. */ amount?: Price$4; /** Details about the payments being refunded. */ payments?: RefundedPayment$1[]; /** Reason for refund. */ reason?: string | null; } interface RefundedPayment$1 extends RefundedPaymentKindOneOf$1 { /** Regular payment refund. */ regular?: RegularPaymentRefund$1; /** Gift card payment refund. */ giftCard?: GiftCardPaymentRefund$1; /** Membership payment refund. */ membership?: MembershipPaymentRefund$1; /** Payment ID. */ paymentId?: string; /** Whether refund was made externally and manually on the payment provider's side. */ externalRefund?: boolean; } /** @oneof */ interface RefundedPaymentKindOneOf$1 { /** Regular payment refund. */ regular?: RegularPaymentRefund$1; /** Gift card payment refund. */ giftCard?: GiftCardPaymentRefund$1; /** Membership payment refund. */ membership?: MembershipPaymentRefund$1; } interface RegularPaymentRefund$1 { /** Refund amount */ amount?: Price$4; /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface GiftCardPaymentRefund$1 { /** Gift card payment ID */ giftCardPaymentId?: string | null; /** Refund amount */ amount?: Price$4; } interface MembershipPaymentRefund$1 { /** Membership ID */ membershipId?: string | null; } interface PaymentRefunded$1 { /** Refund ID. */ refundId?: string; /** Details about the refunded payment. */ payment?: RefundedPayment$1; } interface PaymentRefundFailed$1 { /** Refund ID. */ refundId?: string; /** Details about the failed payment refund. */ payment?: RefundedPayment$1; } interface RefundedAsStoreCredit$1 { /** Refund amount */ amount?: Price$4; /** Reason for refund */ reason?: string | null; } interface PaymentPending$1 extends PaymentPendingPaymentDetailsOneOf$1 { /** Regular payment. */ regular?: RegularPayment$1; /** Payment ID of payment associated with this activity */ paymentId?: string; } /** @oneof */ interface PaymentPendingPaymentDetailsOneOf$1 { /** Regular payment. */ regular?: RegularPayment$1; } interface RegularPayment$1 extends RegularPaymentPaymentMethodDetailsOneOf$1 { /** Whether regular card used */ creditCardDetails?: CreditCardDetails$1; /** Payment amount */ amount?: Price$4; } /** @oneof */ interface RegularPaymentPaymentMethodDetailsOneOf$1 { /** Whether regular card used */ creditCardDetails?: CreditCardDetails$1; } interface CreditCardDetails$1 { /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface PaymentCanceled$1 extends PaymentCanceledPaymentDetailsOneOf$1 { /** Regular payment. */ regular?: RegularPayment$1; /** Payment ID of payment associated with this activity */ paymentId?: string; } /** @oneof */ interface PaymentCanceledPaymentDetailsOneOf$1 { /** Regular payment. */ regular?: RegularPayment$1; } interface PaymentDeclined$1 extends PaymentDeclinedPaymentDetailsOneOf$1 { /** Regular payment. */ regular?: RegularPayment$1; /** Payment ID of payment associated with this activity */ paymentId?: string; } /** @oneof */ interface PaymentDeclinedPaymentDetailsOneOf$1 { /** Regular payment. */ regular?: RegularPayment$1; } enum ActivityType$2 { ORDER_REFUNDED = "ORDER_REFUNDED", ORDER_PLACED = "ORDER_PLACED", ORDER_PAID = "ORDER_PAID", ORDER_FULFILLED = "ORDER_FULFILLED", ORDER_NOT_FULFILLED = "ORDER_NOT_FULFILLED", ORDER_CANCELED = "ORDER_CANCELED", DOWNLOAD_LINK_SENT = "DOWNLOAD_LINK_SENT", TRACKING_NUMBER_ADDED = "TRACKING_NUMBER_ADDED", TRACKING_NUMBER_EDITED = "TRACKING_NUMBER_EDITED", TRACKING_LINK_ADDED = "TRACKING_LINK_ADDED", SHIPPING_CONFIRMATION_EMAIL_SENT = "SHIPPING_CONFIRMATION_EMAIL_SENT", INVOICE_ADDED = "INVOICE_ADDED", INVOICE_REMOVED = "INVOICE_REMOVED", INVOICE_SENT = "INVOICE_SENT", FULFILLER_EMAIL_SENT = "FULFILLER_EMAIL_SENT", SHIPPING_ADDRESS_EDITED = "SHIPPING_ADDRESS_EDITED", EMAIL_EDITED = "EMAIL_EDITED", PICKUP_READY_EMAIL_SENT = "PICKUP_READY_EMAIL_SENT", CUSTOM_ACTIVITY = "CUSTOM_ACTIVITY", MERCHANT_COMMENT = "MERCHANT_COMMENT", ORDER_CREATED_FROM_EXCHANGE = "ORDER_CREATED_FROM_EXCHANGE", NEW_EXCHANGE_ORDER_CREATED = "NEW_EXCHANGE_ORDER_CREATED", ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID", DRAFT_ORDER_CHANGES_APPLIED = "DRAFT_ORDER_CHANGES_APPLIED", SAVED_PAYMENT_METHOD = "SAVED_PAYMENT_METHOD", AUTHORIZED_PAYMENT_CREATED = "AUTHORIZED_PAYMENT_CREATED", AUTHORIZED_PAYMENT_CAPTURED = "AUTHORIZED_PAYMENT_CAPTURED", AUTHORIZED_PAYMENT_VOIDED = "AUTHORIZED_PAYMENT_VOIDED", REFUND_INITIATED = "REFUND_INITIATED", PAYMENT_REFUNDED = "PAYMENT_REFUNDED", PAYMENT_REFUND_FAILED = "PAYMENT_REFUND_FAILED", REFUNDED_AS_STORE_CREDIT = "REFUNDED_AS_STORE_CREDIT", /** @documentationMaturity preview */ PAYMENT_PENDING = "PAYMENT_PENDING", /** @documentationMaturity preview */ PAYMENT_CANCELED = "PAYMENT_CANCELED", /** @documentationMaturity preview */ PAYMENT_DECLINED = "PAYMENT_DECLINED", /** @documentationMaturity preview */ ORDER_PENDING = "ORDER_PENDING", /** @documentationMaturity preview */ ORDER_REJECTED = "ORDER_REJECTED" } enum AttributionSource$1 { UNSPECIFIED = "UNSPECIFIED", FACEBOOK_ADS = "FACEBOOK_ADS" } interface V1CreatedBy extends V1CreatedByStringOneOf { /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; /** App ID - when the order was created by an external application. */ appId?: string; } /** @oneof */ interface V1CreatedByStringOneOf { /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; /** App ID - when the order was created by an external application. */ appId?: string; } interface ChannelInfo$2 { /** Sales channel that submitted the order. */ type?: ChannelType$2; /** Reference to an order ID from an external system. */ externalOrderId?: string | null; /** URL to the order in the external system. */ externalOrderUrl?: string | null; } enum ChannelType$2 { /** Unspecified sales channel. This value is not supported. */ UNSPECIFIED = "UNSPECIFIED", /** A web client. */ WEB = "WEB", /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */ POS = "POS", /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */ EBAY = "EBAY", /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */ AMAZON = "AMAZON", /** Other sales platform. */ OTHER_PLATFORM = "OTHER_PLATFORM", /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */ WIX_APP_STORE = "WIX_APP_STORE", /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */ WIX_INVOICES = "WIX_INVOICES", /** Wix merchant backoffice. */ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT", /** Wish sales channel. */ WISH = "WISH", /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */ CLASS_PASS = "CLASS_PASS", /** Global-E sales channel. */ GLOBAL_E = "GLOBAL_E", /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */ FACEBOOK = "FACEBOOK", /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */ ETSY = "ETSY", /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */ TIKTOK = "TIKTOK", /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */ FAIRE_COM = "FAIRE_COM" } interface CustomField$2 { /** Custom field value. */ value?: any; /** Custom field title. */ title?: string; /** Translated custom field title. */ translatedTitle?: string | null; } interface V1BalanceSummary { /** * Current amount left to pay. * @readonly */ balance?: Balance$1; /** * Sum of all approved and successful payments. * * The value includes payments that have subsequently been fully or partially refunded. * @readonly */ paid?: Price$4; /** * Sum of all successfully refunded payments. * @readonly */ refunded?: Price$4; /** * Sum of all authorized payments. * @readonly */ authorized?: Price$4; /** * Sum of all pending refund transactions. * @internal * @readonly */ pendingRefund?: Price$4; /** * Sum of all pending transactions. * @readonly */ pending?: Price$4; } interface FulfillmentStatusesAggregate$1 { /** Unique string values based on Fulfillment entities statuses */ statuses?: string[] | null; } /** * Common object for tags. * Should be use as in this example: * message Foo { * string id = 1; * ... * Tags tags = 5 * } * * example of taggable entity * { * id: "123" * tags: { * tags: { * tag_ids:["11","22"] * }, * private_tags: { * tag_ids: ["33", "44"] * } * } * } */ interface Tags$1 { /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */ privateTags?: TagList$1; /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */ tags?: TagList$1; } interface TagList$1 { /** List of tag IDs */ tagIds?: string[]; } interface CreateOrderFromDraftRequest { /** * The draft order id * @internal */ draftOrderId: string; /** * Optional side effects to trigger * @internal */ createSettings?: OrderCreateSettings; /** * Reason for order creation, given by user (optional). * @internal */ reason?: string | null; /** * Information about the sales channel that submitted this order * @internal */ channelInfo?: ChannelInfo$2; } interface OrderCreateSettings { /** * Notification settings to be applied on order creation * @internal */ notifications?: OrderCreateNotifications$1; } interface OrderCreateNotifications$1 { /** * Whether to send notification to the buyer. * * Default: `true` * @internal */ sendNotificationToBuyer?: boolean | null; /** * Whether to send notifications to the business. * * Default: `true` * @internal */ sendNotificationsToBusiness?: boolean | null; } interface CreateOrderFromDraftResponse { /** * The draft order after commit. * @internal */ committedDraftOrder?: DraftOrder; /** * Created order * @internal */ createdOrder?: Order$2; } interface DeleteDraftOrderRequest { /** The draft order id */ draftOrderId: string; } interface DeleteDraftOrderResponse { } interface QueryDraftOrdersRequest { /** WQL expression */ query?: CursorQuery$5; } interface CursorQuery$5 extends CursorQueryPagingMethodOneOf$5 { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging$9; /** * Filter object. * * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Sort object. * * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sort?: Sorting$9[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf$5 { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging$9; } interface Sorting$9 { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$9; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$9 { ASC = "ASC", DESC = "DESC" } interface CursorPaging$9 { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryDraftOrdersResponse { /** list of edits per order */ draftOrders?: DraftOrder[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata$8; } interface CursorPagingMetadata$8 { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors$9; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; /** * Total number of items matching the filter. * Available only on the first page of *Search* results, not included in *Query* or *List* results. * If the Search results span multiple pages, the value of `total` will exceed the number of items returned on the first page. * @internal */ total?: number | null; } interface Cursors$9 { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface UpdateExtendedFieldsRequest$3 { /** ID of the entity to update. */ _id: string; /** Identifier for the app whose extended fields are being updated. */ namespace: string; /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } interface UpdateExtendedFieldsResponse$3 { /** Updated DraftOrder */ draftOrder?: DraftOrder; } interface SetTaxExemptionRequest { /** * Draft order ID. * @internal */ draftOrderId: string; /** * Whether the draft order is exempt from tax calculations. * * Default: `false` * @internal */ taxExempt: boolean | null; } interface SetTaxExemptionResponse { /** * The draft order details calculated with updated tax exemption. * @internal */ calculatedDraftOrder?: CalculatedDraftOrder; } interface GetDraftEditabilityStatusRequest { /** Draft order ID. */ draftOrderId?: string | null; } interface GetDraftEditabilityStatusResponse { /** Draft order ID. */ draftOrderId?: string | null; /** * Draft order status. * @readonly */ status?: EditingStatus; } interface SetBusinessLocationRequest { /** * Draft order ID. * @internal */ draftOrderId: string; /** * Business location. * @internal */ businessLocation?: Location$1; } interface SetBusinessLocationResponse { /** * The draft order details calculated with updated business location. * @internal */ calculatedDraftOrder?: CalculatedDraftOrder; } interface DomainEvent$c extends DomainEventBodyOneOf$c { createdEvent?: EntityCreatedEvent$c; updatedEvent?: EntityUpdatedEvent$c; deletedEvent?: EntityDeletedEvent$c; actionEvent?: ActionEvent$c; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$c { createdEvent?: EntityCreatedEvent$c; updatedEvent?: EntityUpdatedEvent$c; deletedEvent?: EntityDeletedEvent$c; actionEvent?: ActionEvent$c; } interface EntityCreatedEvent$c { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$c; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$c { deletedDate?: Date | null; } interface EntityUpdatedEvent$c { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$c { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$c { bodyAsJson?: string; } interface MessageEnvelope$b { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$c; /** Stringify payload. */ data?: string; } interface IdentificationData$c extends IdentificationDataIdOneOf$c { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$b; } /** @oneof */ interface IdentificationDataIdOneOf$c { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$b { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates or gets a draft order. * * When passing the ID of an order that is already in draft, the existing draft order will be returned. * To complete a draft and update the order, call [Commit Draft Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/draft-orders/commit-draft-order). * @param orderId - To create a draft from existing order, provide its id. Otherwise, an empty draft will be created. * @public * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.DRAFT_ORDERS_CREATE * @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS * @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS * @adminMethod */ function createDraftOrder(orderId: string | null, options?: CreateDraftOrderOptions): Promise; interface CreateDraftOrderOptions { /** * If true and draft order already exists, it will be reset to the baseline order. * should this be a bool? will it always be private? * @internal */ resetIfExists?: string | null; } /** * Creates an empty draft order. * @public * @documentationMaturity preview * @permissionId ECOM.DRAFT_ORDERS_CREATE * @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS * @permissionId DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS * @adminMethod */ function createEmptyDraftOrder(): Promise; /** * Adds line items to a draft order. * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @requiredField options.catalogLineItems.catalogReference * @permissionId ECOM.DRAFT_ORDERS_ADD_LINE_ITEMS * @adminMethod */ function addLineItemsToDraftOrder(draftOrderId: string, options?: AddLineItemsToDraftOrderOptions): Promise; interface AddLineItemsToDraftOrderOptions { /** Catalog line items to add to draft order. */ catalogLineItems?: CatalogReferenceLineItem[]; /** Custom line items to add to draft order. Custom line items don't trigger the Catalog service plugin. */ customLineItems?: CustomLineItem[]; } /** * Updates a draft order's line items. * * Using this API, you can update a line item's quantity, price, and description. * > **Notes:** * > + Passing a quantity of `0` will remove the line item. * > + Price cannot be updated for line items with `paymentOption: MEMBERSHIP`. * > + Quantity cannot be decreased fulfilled line items. To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order). * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDERS_MODIFY_ITEMS * @adminMethod */ function updateLineItems(draftOrderId: string, options?: UpdateLineItemsOptions): Promise; interface UpdateLineItemsOptions { /** Details of changes to apply per line item */ lineItemChanges?: LineItemChangeDetails[]; } /** * Sets and enables or disables discounts on a draft order. * * Any discounts not passed will not change. * @param draftOrderId - The draft order id * @param discounts - The discount ids to opt-in. all existing discounts not listed are to be opted-out. * @public * @documentationMaturity preview * @requiredField discounts * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDERS_SET_DISCOUNTS * @adminMethod */ function setDiscounts(draftOrderId: string, discounts: IdAndApplied[]): Promise; /** * Adds merchant discounts to the order. * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @requiredField options.discounts.amount * @requiredField options.discounts.amount.amount * @requiredField options.discounts.discountType * @permissionId ECOM.DRAFT_ORDERS_ADD_DISCOUNTS * @adminMethod */ function createCustomDiscounts(draftOrderId: string, options?: CreateCustomDiscountsOptions): Promise; interface CreateCustomDiscountsOptions { /** The discounts to add. */ discounts?: DiscountOption[]; } /** * Remove custom discounts from the order. * @param draftOrderId - The draft order id * @param discountIds - The discounts to remove * @public * @documentationMaturity preview * @requiredField discountIds * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDERS_DELETE_DISCOUNTS * @adminMethod */ function deleteCustomDiscounts(draftOrderId: string, discountIds: string[]): Promise; /** * Set which additional fees existing on the draft order are to be opt-in. * All existing additional fees not provided on the call are opted-out. * @param draftOrderId - The draft order id * @param additionalFees - The additional fees ids to opt-in. all existing additional fees not listed are to be opted-out * @public * @documentationMaturity preview * @requiredField additionalFees * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDERS_SET_ADDITIONAL_FEES * @adminMethod */ function setAdditionalFees(draftOrderId: string, additionalFees: IdAndApplied[]): Promise; /** * Create custom additional fees to the order. * added additional fees are by default opted-out. * To opt-in them, please call SetAdditionalFees with the added additional fee ids. * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @requiredField options.customAdditionalFees.name * @requiredField options.customAdditionalFees.price * @requiredField options.customAdditionalFees.price.amount * @permissionId ECOM.DRAFT_ORDERS_CREATE_ADDITIONAL_FEES * @adminMethod */ function createCustomAdditionalFees(draftOrderId: string, options?: CreateCustomAdditionalFeesOptions): Promise; interface CreateCustomAdditionalFeesOptions { /** The additional fees to add. added with opted-out setting */ customAdditionalFees?: AdditionalFeeOption[]; } /** * Remove custom additional fees from the order. * @param draftOrderId - The draft order id * @param customAdditionalFees - The additional fees to remove * @public * @documentationMaturity preview * @requiredField customAdditionalFees * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDERS_DELETE_ADDITIONAL_FEES * @adminMethod */ function deleteCustomAdditionalFees(draftOrderId: string, customAdditionalFees: string[]): Promise; /** * Sets shipping info to a draft order. * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDERS_SET_SHIPPING_INFO * @adminMethod */ function setShippingInfo(draftOrderId: string, options?: SetShippingInfoOptions): Promise; interface SetShippingInfoOptions { /** * The shipping info to be set. If passed empty value - value will be reset * @internal */ shippingInfo?: ShippingInformation$2; } /** * Sets buyer info to a draft order. * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDER_SET_BUYER_INFO * @adminMethod */ function setBuyerInfo(draftOrderId: string, options?: SetBuyerInfoOptions): Promise; interface SetBuyerInfoOptions { /** * Buyer information. If passed empty value - value will be reset * @internal */ buyerInfo?: BuyerInfo$3; } /** * Sets recipient info to a draft order. * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDER_SET_RECIPIENT_INFO * @adminMethod */ function setRecipientInfo(draftOrderId: string, options?: SetRecipientInfoOptions): Promise; interface SetRecipientInfoOptions { /** * Order recipient address and contact details. If passed empty value - value will be reset * @internal */ recipientInfo?: AddressWithContact$1; } /** * Sets billing info to a draft order. * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDER_SET_BILLING_INFO * @adminMethod */ function setBillingInfo(draftOrderId: string, options?: SetBillingInfoOptions): Promise; interface SetBillingInfoOptions { /** * Billing address and contact details. If passed empty value - value will be reset * @internal */ billingInfo?: AddressWithContact$1; } /** * Update shipping information on the order. * Allows also to remove the order shipping info. * @param draftOrderId - The draft order id * @internal * @documentationMaturity preview * @requiredField draftOrderId * @requiredField options.shippingOption.cost * @requiredField options.shippingOption.cost.price * @requiredField options.shippingOption.logistics * @permissionId ECOM.DRAFT_ORDERS_SET_SHIPPING * @adminMethod * @deprecated * @replacedBy set-shipping-info * @targetRemovalDate 2024-08-30 */ function updateShippingInfo(draftOrderId: string, options?: UpdateShippingInfoOptions): Promise; interface UpdateShippingInfoOptions { /** update the shipping option on the order. if not set then the selected shipping is removed */ shippingOption?: ShippingOption$2; } /** * Get an order. * When order is in draft status, it's re-estimated and return with latest tax and totals * Automatic discounts and automatic additional fees will reflect the latest prices and eligibility. * Calculation will be based on current draft order content - items, shipping info and eligible discounts and additional fees. * When order is in committed status, it's returned with it's calculation at the moment it was committed. * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDERS_READ * @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS * @adminMethod */ function getDraftOrder(draftOrderId: string): Promise; /** * Checks whether a draft can be created for this order * @param orderId - Order ID. * @public * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.DRAFT_ORDERS_READ * @adminMethod */ function getOrderDraftabilityStatus(orderId: string): Promise; /** * Commit latest changes to the baseline order and control what side-effects will be applied. * Commit cannot be undone or reverted. * Order-edit become closed for editing, however it's kept for reference and can be retrieved. * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDERS_COMMIT * @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS * @adminMethod */ function commitDraftOrder(draftOrderId: string, options?: CommitDraftOrderOptions): Promise; interface CommitDraftOrderOptions { /** Optional side effects to trigger */ commitSettings?: DraftOrderCommitSettings$1; /** Reason for edit, given by user (optional). */ reason?: string | null; } /** * Create new order and control what side-effects will be applied * Commit cannot be undone or reverted. * Order-edit become closed for editing, however it's kept for reference and can be retrieved. * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDER_CREATE_ORDER_FROM_DRAFT * @permissionId ECOM.DRAFT_ORDER_READ_ALL_EXTENDED_FIELDS * @adminMethod */ function createOrderFromDraft(draftOrderId: string, options?: CreateOrderFromDraftOptions): Promise; interface CreateOrderFromDraftOptions { /** * Optional side effects to trigger * @internal */ createSettings?: OrderCreateSettings; /** * Reason for order creation, given by user (optional). * @internal */ reason?: string | null; /** * Information about the sales channel that submitted this order * @internal */ channelInfo?: ChannelInfo$2; } /** * Delete order-edit entity with all pending changes. * Order-edit in status 'COMMITTED' cannot be deleted. * @param draftOrderId - The draft order id * @public * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDERS_DELETE * @permissionId ECOM.DRAFT_ORDERS_ADMIN_DELETE * @adminMethod */ function deleteDraftOrder(draftOrderId: string): Promise; /** * Query draft orders by order id or by date range or status. * @public * @documentationMaturity preview * @permissionId ECOM.DRAFT_ORDERS_READ * @adminMethod */ function queryDraftOrders(): DraftOrdersQueryBuilder; interface QueryCursorResult$9 { cursors: Cursors$9; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface DraftOrdersQueryResult extends QueryCursorResult$9 { items: DraftOrder[]; query: DraftOrdersQueryBuilder; next: () => Promise; prev: () => Promise; } interface DraftOrdersQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: 'orderId' | '_createdDate' | '_updatedDate' | 'status', value: any) => DraftOrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: 'orderId' | '_createdDate' | '_updatedDate' | 'status', value: any) => DraftOrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => DraftOrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => DraftOrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => DraftOrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => DraftOrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: 'orderId', value: string) => DraftOrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: 'orderId' | '_createdDate' | '_updatedDate' | 'status', value: any[]) => DraftOrdersQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: 'orderId' | '_createdDate' | '_updatedDate' | 'status', value: any) => DraftOrdersQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: 'orderId' | '_createdDate' | '_updatedDate' | 'status', value: boolean) => DraftOrdersQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_createdDate' | '_updatedDate' | 'status'>) => DraftOrdersQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_createdDate' | '_updatedDate' | 'status'>) => DraftOrdersQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => DraftOrdersQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => DraftOrdersQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Updates extended fields of a DraftOrder * @param _id - ID of the entity to update. * @param namespace - Identifier for the app whose extended fields are being updated. * @internal * @documentationMaturity preview * @requiredField _id * @requiredField namespace * @requiredField options * @requiredField options.namespaceData * @permissionId ECOM.DRAFT_ORDER_UPDATE_EXTENDED_FIELDS * @permissionId ECOM.DRAFT_ORDER_WRITE_ALL_EXTENDED_FIELDS * @adminMethod */ function updateExtendedFields$3(_id: string, namespace: string, options: UpdateExtendedFieldsOptions$3): Promise; interface UpdateExtendedFieldsOptions$3 { /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } /** * Sets tax exemption to a draft order. * @param draftOrderId - Draft order ID. * @public * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDER_SET_TAX_EXEMPTION * @adminMethod */ function setTaxExemption(draftOrderId: string, options?: SetTaxExemptionOptions): Promise; interface SetTaxExemptionOptions { /** * Whether the draft order is exempt from tax calculations. * * Default: `false` * @internal */ taxExempt: boolean | null; } /** * This is a test endpoint to test additional_bindings * @param draftOrderId - Draft order ID. * @internal * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDERS_READ * @adminMethod */ function getDraftEditabilityStatus(draftOrderId: string | null): Promise; /** * Sets business location to a draft order. * @param draftOrderId - Draft order ID. * @internal * @documentationMaturity preview * @requiredField draftOrderId * @permissionId ECOM.DRAFT_ORDER_SET_BUSINESS_LOCATION * @adminMethod */ function setBusinessLocation(draftOrderId: string, options?: SetBusinessLocationOptions): Promise; interface SetBusinessLocationOptions { /** * Business location. * @internal */ businessLocation?: Location$1; } type ecomV1DraftOrder_universal_d_DraftOrder = DraftOrder; type ecomV1DraftOrder_universal_d_ItemDetails = ItemDetails; type ecomV1DraftOrder_universal_d_ItemDetailsChangeTypeOneOf = ItemDetailsChangeTypeOneOf; type ecomV1DraftOrder_universal_d_ShippingDetails = ShippingDetails; type ecomV1DraftOrder_universal_d_ShippingDetailsChangeTypeOneOf = ShippingDetailsChangeTypeOneOf; type ecomV1DraftOrder_universal_d_V1DeliveryLogistics = V1DeliveryLogistics; type ecomV1DraftOrder_universal_d_V1DeliveryLogisticsAddressOneOf = V1DeliveryLogisticsAddressOneOf; type ecomV1DraftOrder_universal_d_V1PickupDetails = V1PickupDetails; type ecomV1DraftOrder_universal_d_PickupDetailsPickupMethod = PickupDetailsPickupMethod; const ecomV1DraftOrder_universal_d_PickupDetailsPickupMethod: typeof PickupDetailsPickupMethod; type ecomV1DraftOrder_universal_d_V1DeliveryTimeSlot = V1DeliveryTimeSlot; type ecomV1DraftOrder_universal_d_V1ShippingPrice = V1ShippingPrice; type ecomV1DraftOrder_universal_d_ShippingChangedDetails = ShippingChangedDetails; type ecomV1DraftOrder_universal_d_AdditionalFeeDetails = AdditionalFeeDetails; type ecomV1DraftOrder_universal_d_DiscountDetails = DiscountDetails; type ecomV1DraftOrder_universal_d_AppliedDiscountDiscountType = AppliedDiscountDiscountType; const ecomV1DraftOrder_universal_d_AppliedDiscountDiscountType: typeof AppliedDiscountDiscountType; type ecomV1DraftOrder_universal_d_EditingStatus = EditingStatus; const ecomV1DraftOrder_universal_d_EditingStatus: typeof EditingStatus; type ecomV1DraftOrder_universal_d_InventoryUpdate = InventoryUpdate; type ecomV1DraftOrder_universal_d_RecipientInfoDetails = RecipientInfoDetails; type ecomV1DraftOrder_universal_d_RecipientInfoDetailsChangeTypeOneOf = RecipientInfoDetailsChangeTypeOneOf; type ecomV1DraftOrder_universal_d_RecipientInfoChangedDetails = RecipientInfoChangedDetails; type ecomV1DraftOrder_universal_d_BuyerDetailsChangeTypeOneOf = BuyerDetailsChangeTypeOneOf; type ecomV1DraftOrder_universal_d_BuyerChangedDetails = BuyerChangedDetails; type ecomV1DraftOrder_universal_d_BillingDetails = BillingDetails; type ecomV1DraftOrder_universal_d_BillingDetailsChangeTypeOneOf = BillingDetailsChangeTypeOneOf; type ecomV1DraftOrder_universal_d_BillingChangedDetails = BillingChangedDetails; type ecomV1DraftOrder_universal_d_BusinessLocationDetails = BusinessLocationDetails; type ecomV1DraftOrder_universal_d_BusinessLocationDetailsChangeTypeOneOf = BusinessLocationDetailsChangeTypeOneOf; type ecomV1DraftOrder_universal_d_BusinessLocationChangedDetails = BusinessLocationChangedDetails; type ecomV1DraftOrder_universal_d_CreateDraftOrderRequest = CreateDraftOrderRequest; type ecomV1DraftOrder_universal_d_CreateDraftOrderResponse = CreateDraftOrderResponse; type ecomV1DraftOrder_universal_d_CalculatedDraftOrder = CalculatedDraftOrder; type ecomV1DraftOrder_universal_d_CreateEmptyDraftOrderRequest = CreateEmptyDraftOrderRequest; type ecomV1DraftOrder_universal_d_CreateEmptyDraftOrderResponse = CreateEmptyDraftOrderResponse; type ecomV1DraftOrder_universal_d_AddLineItemsToDraftOrderRequest = AddLineItemsToDraftOrderRequest; type ecomV1DraftOrder_universal_d_CatalogReferenceLineItem = CatalogReferenceLineItem; type ecomV1DraftOrder_universal_d_CustomLineItem = CustomLineItem; type ecomV1DraftOrder_universal_d_SecuredMedia = SecuredMedia; type ecomV1DraftOrder_universal_d_FileType = FileType; const ecomV1DraftOrder_universal_d_FileType: typeof FileType; type ecomV1DraftOrder_universal_d_AddLineItemsToDraftOrderResponse = AddLineItemsToDraftOrderResponse; type ecomV1DraftOrder_universal_d_UpdateLineItemsRequest = UpdateLineItemsRequest; type ecomV1DraftOrder_universal_d_LineItemChangeDetails = LineItemChangeDetails; type ecomV1DraftOrder_universal_d_UpdateLineItemsResponse = UpdateLineItemsResponse; type ecomV1DraftOrder_universal_d_SetDiscountsRequest = SetDiscountsRequest; type ecomV1DraftOrder_universal_d_IdAndApplied = IdAndApplied; type ecomV1DraftOrder_universal_d_SetDiscountsResponse = SetDiscountsResponse; type ecomV1DraftOrder_universal_d_CreateCustomDiscountsRequest = CreateCustomDiscountsRequest; type ecomV1DraftOrder_universal_d_DiscountOption = DiscountOption; type ecomV1DraftOrder_universal_d_DiscountOptionDiscountAmountOneOf = DiscountOptionDiscountAmountOneOf; type ecomV1DraftOrder_universal_d_CreateCustomDiscountsResponse = CreateCustomDiscountsResponse; type ecomV1DraftOrder_universal_d_DeleteCustomDiscountsRequest = DeleteCustomDiscountsRequest; type ecomV1DraftOrder_universal_d_DeleteCustomDiscountsResponse = DeleteCustomDiscountsResponse; type ecomV1DraftOrder_universal_d_SetAdditionalFeesRequest = SetAdditionalFeesRequest; type ecomV1DraftOrder_universal_d_SetAdditionalFeesResponse = SetAdditionalFeesResponse; type ecomV1DraftOrder_universal_d_CreateCustomAdditionalFeesRequest = CreateCustomAdditionalFeesRequest; type ecomV1DraftOrder_universal_d_AdditionalFeeOption = AdditionalFeeOption; type ecomV1DraftOrder_universal_d_CreateCustomAdditionalFeesResponse = CreateCustomAdditionalFeesResponse; type ecomV1DraftOrder_universal_d_DeleteCustomAdditionalFeesRequest = DeleteCustomAdditionalFeesRequest; type ecomV1DraftOrder_universal_d_DeleteCustomAdditionalFeesResponse = DeleteCustomAdditionalFeesResponse; type ecomV1DraftOrder_universal_d_SetShippingInfoRequest = SetShippingInfoRequest; type ecomV1DraftOrder_universal_d_SetShippingInfoResponse = SetShippingInfoResponse; type ecomV1DraftOrder_universal_d_SetBuyerInfoRequest = SetBuyerInfoRequest; type ecomV1DraftOrder_universal_d_SetBuyerInfoResponse = SetBuyerInfoResponse; type ecomV1DraftOrder_universal_d_SetRecipientInfoRequest = SetRecipientInfoRequest; type ecomV1DraftOrder_universal_d_SetRecipientInfoResponse = SetRecipientInfoResponse; type ecomV1DraftOrder_universal_d_SetBillingInfoRequest = SetBillingInfoRequest; type ecomV1DraftOrder_universal_d_SetBillingInfoResponse = SetBillingInfoResponse; type ecomV1DraftOrder_universal_d_UpdateShippingInfoRequest = UpdateShippingInfoRequest; type ecomV1DraftOrder_universal_d_UpdateShippingInfoResponse = UpdateShippingInfoResponse; type ecomV1DraftOrder_universal_d_GetDraftOrderRequest = GetDraftOrderRequest; type ecomV1DraftOrder_universal_d_GetDraftOrderResponse = GetDraftOrderResponse; type ecomV1DraftOrder_universal_d_GetOrderDraftabilityStatusRequest = GetOrderDraftabilityStatusRequest; type ecomV1DraftOrder_universal_d_GetOrderDraftabilityStatusResponse = GetOrderDraftabilityStatusResponse; type ecomV1DraftOrder_universal_d_NonDraftableReason = NonDraftableReason; const ecomV1DraftOrder_universal_d_NonDraftableReason: typeof NonDraftableReason; type ecomV1DraftOrder_universal_d_CommitDraftOrderRequest = CommitDraftOrderRequest; type ecomV1DraftOrder_universal_d_CommitDraftOrderResponse = CommitDraftOrderResponse; type ecomV1DraftOrder_universal_d_V1CreatedBy = V1CreatedBy; type ecomV1DraftOrder_universal_d_V1CreatedByStringOneOf = V1CreatedByStringOneOf; type ecomV1DraftOrder_universal_d_V1BalanceSummary = V1BalanceSummary; type ecomV1DraftOrder_universal_d_CreateOrderFromDraftRequest = CreateOrderFromDraftRequest; type ecomV1DraftOrder_universal_d_OrderCreateSettings = OrderCreateSettings; type ecomV1DraftOrder_universal_d_CreateOrderFromDraftResponse = CreateOrderFromDraftResponse; type ecomV1DraftOrder_universal_d_DeleteDraftOrderRequest = DeleteDraftOrderRequest; type ecomV1DraftOrder_universal_d_DeleteDraftOrderResponse = DeleteDraftOrderResponse; type ecomV1DraftOrder_universal_d_QueryDraftOrdersRequest = QueryDraftOrdersRequest; type ecomV1DraftOrder_universal_d_QueryDraftOrdersResponse = QueryDraftOrdersResponse; type ecomV1DraftOrder_universal_d_SetTaxExemptionRequest = SetTaxExemptionRequest; type ecomV1DraftOrder_universal_d_SetTaxExemptionResponse = SetTaxExemptionResponse; type ecomV1DraftOrder_universal_d_GetDraftEditabilityStatusRequest = GetDraftEditabilityStatusRequest; type ecomV1DraftOrder_universal_d_GetDraftEditabilityStatusResponse = GetDraftEditabilityStatusResponse; type ecomV1DraftOrder_universal_d_SetBusinessLocationRequest = SetBusinessLocationRequest; type ecomV1DraftOrder_universal_d_SetBusinessLocationResponse = SetBusinessLocationResponse; const ecomV1DraftOrder_universal_d_createDraftOrder: typeof createDraftOrder; type ecomV1DraftOrder_universal_d_CreateDraftOrderOptions = CreateDraftOrderOptions; const ecomV1DraftOrder_universal_d_createEmptyDraftOrder: typeof createEmptyDraftOrder; const ecomV1DraftOrder_universal_d_addLineItemsToDraftOrder: typeof addLineItemsToDraftOrder; type ecomV1DraftOrder_universal_d_AddLineItemsToDraftOrderOptions = AddLineItemsToDraftOrderOptions; const ecomV1DraftOrder_universal_d_updateLineItems: typeof updateLineItems; type ecomV1DraftOrder_universal_d_UpdateLineItemsOptions = UpdateLineItemsOptions; const ecomV1DraftOrder_universal_d_setDiscounts: typeof setDiscounts; const ecomV1DraftOrder_universal_d_createCustomDiscounts: typeof createCustomDiscounts; type ecomV1DraftOrder_universal_d_CreateCustomDiscountsOptions = CreateCustomDiscountsOptions; const ecomV1DraftOrder_universal_d_deleteCustomDiscounts: typeof deleteCustomDiscounts; const ecomV1DraftOrder_universal_d_setAdditionalFees: typeof setAdditionalFees; const ecomV1DraftOrder_universal_d_createCustomAdditionalFees: typeof createCustomAdditionalFees; type ecomV1DraftOrder_universal_d_CreateCustomAdditionalFeesOptions = CreateCustomAdditionalFeesOptions; const ecomV1DraftOrder_universal_d_deleteCustomAdditionalFees: typeof deleteCustomAdditionalFees; const ecomV1DraftOrder_universal_d_setShippingInfo: typeof setShippingInfo; type ecomV1DraftOrder_universal_d_SetShippingInfoOptions = SetShippingInfoOptions; const ecomV1DraftOrder_universal_d_setBuyerInfo: typeof setBuyerInfo; type ecomV1DraftOrder_universal_d_SetBuyerInfoOptions = SetBuyerInfoOptions; const ecomV1DraftOrder_universal_d_setRecipientInfo: typeof setRecipientInfo; type ecomV1DraftOrder_universal_d_SetRecipientInfoOptions = SetRecipientInfoOptions; const ecomV1DraftOrder_universal_d_setBillingInfo: typeof setBillingInfo; type ecomV1DraftOrder_universal_d_SetBillingInfoOptions = SetBillingInfoOptions; const ecomV1DraftOrder_universal_d_updateShippingInfo: typeof updateShippingInfo; type ecomV1DraftOrder_universal_d_UpdateShippingInfoOptions = UpdateShippingInfoOptions; const ecomV1DraftOrder_universal_d_getDraftOrder: typeof getDraftOrder; const ecomV1DraftOrder_universal_d_getOrderDraftabilityStatus: typeof getOrderDraftabilityStatus; const ecomV1DraftOrder_universal_d_commitDraftOrder: typeof commitDraftOrder; type ecomV1DraftOrder_universal_d_CommitDraftOrderOptions = CommitDraftOrderOptions; const ecomV1DraftOrder_universal_d_createOrderFromDraft: typeof createOrderFromDraft; type ecomV1DraftOrder_universal_d_CreateOrderFromDraftOptions = CreateOrderFromDraftOptions; const ecomV1DraftOrder_universal_d_deleteDraftOrder: typeof deleteDraftOrder; const ecomV1DraftOrder_universal_d_queryDraftOrders: typeof queryDraftOrders; type ecomV1DraftOrder_universal_d_DraftOrdersQueryResult = DraftOrdersQueryResult; type ecomV1DraftOrder_universal_d_DraftOrdersQueryBuilder = DraftOrdersQueryBuilder; const ecomV1DraftOrder_universal_d_setTaxExemption: typeof setTaxExemption; type ecomV1DraftOrder_universal_d_SetTaxExemptionOptions = SetTaxExemptionOptions; const ecomV1DraftOrder_universal_d_getDraftEditabilityStatus: typeof getDraftEditabilityStatus; const ecomV1DraftOrder_universal_d_setBusinessLocation: typeof setBusinessLocation; type ecomV1DraftOrder_universal_d_SetBusinessLocationOptions = SetBusinessLocationOptions; namespace ecomV1DraftOrder_universal_d { export { ecomV1DraftOrder_universal_d_DraftOrder as DraftOrder, ecomV1DraftOrder_universal_d_ItemDetails as ItemDetails, ecomV1DraftOrder_universal_d_ItemDetailsChangeTypeOneOf as ItemDetailsChangeTypeOneOf, Price$4 as Price, PriceDescription$1 as PriceDescription, OrderLineItem$1 as OrderLineItem, ProductName$1 as ProductName, CatalogReference$4 as CatalogReference, DescriptionLine$1 as DescriptionLine, DescriptionLineValueOneOf$1 as DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf$1 as DescriptionLineDescriptionLineValueOneOf, DescriptionLineName$1 as DescriptionLineName, PlainTextValue$1 as PlainTextValue, Color$1 as Color, DescriptionLineType$1 as DescriptionLineType, FocalPoint$1 as FocalPoint, PhysicalProperties$3 as PhysicalProperties, ItemType$2 as ItemType, ItemTypeItemTypeDataOneOf$2 as ItemTypeItemTypeDataOneOf, ItemTypeItemType$2 as ItemTypeItemType, PaymentOptionType$2 as PaymentOptionType, ItemTaxFullDetails$2 as ItemTaxFullDetails, LineItemTaxInfo$1 as LineItemTaxInfo, LineItemTaxBreakdown$1 as LineItemTaxBreakdown, JurisdictionType$2 as JurisdictionType, DigitalFile$2 as DigitalFile, SubscriptionInfo$2 as SubscriptionInfo, SubscriptionSettings$3 as SubscriptionSettings, SubscriptionFrequency$3 as SubscriptionFrequency, LocationAndQuantity$1 as LocationAndQuantity, TaxableAddress$2 as TaxableAddress, TaxableAddressTaxableAddressDataOneOf$2 as TaxableAddressTaxableAddressDataOneOf, TaxableAddressType$2 as TaxableAddressType, ExtendedFields$5 as ExtendedFields, ItemChangedDetails$1 as ItemChangedDetails, ecomV1DraftOrder_universal_d_ShippingDetails as ShippingDetails, ecomV1DraftOrder_universal_d_ShippingDetailsChangeTypeOneOf as ShippingDetailsChangeTypeOneOf, ShippingInformation$2 as ShippingInformation, ecomV1DraftOrder_universal_d_V1DeliveryLogistics as V1DeliveryLogistics, ecomV1DraftOrder_universal_d_V1DeliveryLogisticsAddressOneOf as V1DeliveryLogisticsAddressOneOf, AddressWithContact$1 as AddressWithContact, Address$6 as Address, StreetAddress$5 as StreetAddress, AddressLocation$5 as AddressLocation, FullAddressContactDetails$2 as FullAddressContactDetails, VatId$3 as VatId, VatType$3 as VatType, ecomV1DraftOrder_universal_d_V1PickupDetails as V1PickupDetails, PickupAddress$2 as PickupAddress, ecomV1DraftOrder_universal_d_PickupDetailsPickupMethod as PickupDetailsPickupMethod, ecomV1DraftOrder_universal_d_V1DeliveryTimeSlot as V1DeliveryTimeSlot, ecomV1DraftOrder_universal_d_V1ShippingPrice as V1ShippingPrice, ShippingRegion$2 as ShippingRegion, ecomV1DraftOrder_universal_d_ShippingChangedDetails as ShippingChangedDetails, BuyerInfo$3 as BuyerInfo, BuyerInfoIdOneOf$1 as BuyerInfoIdOneOf, ecomV1DraftOrder_universal_d_AdditionalFeeDetails as AdditionalFeeDetails, AdditionalFee$2 as AdditionalFee, TaxDetails$1 as TaxDetails, SourceType$1 as SourceType, ecomV1DraftOrder_universal_d_DiscountDetails as DiscountDetails, AppliedDiscount$2 as AppliedDiscount, AppliedDiscountDiscountSourceOneOf$2 as AppliedDiscountDiscountSourceOneOf, ecomV1DraftOrder_universal_d_AppliedDiscountDiscountType as AppliedDiscountDiscountType, Coupon$2 as Coupon, MerchantDiscount$2 as MerchantDiscount, MerchantDiscountMerchantDiscountReasonOneOf$1 as MerchantDiscountMerchantDiscountReasonOneOf, DiscountReason$1 as DiscountReason, DiscountRule$2 as DiscountRule, DiscountRuleName$2 as DiscountRuleName, LineItemDiscount$2 as LineItemDiscount, CreatedBy$1 as CreatedBy, CreatedByStringOneOf$1 as CreatedByStringOneOf, ecomV1DraftOrder_universal_d_EditingStatus as EditingStatus, WeightUnit$4 as WeightUnit, PriceSummary$2 as PriceSummary, TaxSummary$2 as TaxSummary, BalanceSummary$1 as BalanceSummary, Balance$1 as Balance, DraftOrderCommitSettings$1 as DraftOrderCommitSettings, ecomV1DraftOrder_universal_d_InventoryUpdate as InventoryUpdate, ecomV1DraftOrder_universal_d_RecipientInfoDetails as RecipientInfoDetails, ecomV1DraftOrder_universal_d_RecipientInfoDetailsChangeTypeOneOf as RecipientInfoDetailsChangeTypeOneOf, ecomV1DraftOrder_universal_d_RecipientInfoChangedDetails as RecipientInfoChangedDetails, OrderTaxInfo$1 as OrderTaxInfo, OrderTaxBreakdown$1 as OrderTaxBreakdown, BuyerDetails$1 as BuyerDetails, ecomV1DraftOrder_universal_d_BuyerDetailsChangeTypeOneOf as BuyerDetailsChangeTypeOneOf, ecomV1DraftOrder_universal_d_BuyerChangedDetails as BuyerChangedDetails, ecomV1DraftOrder_universal_d_BillingDetails as BillingDetails, ecomV1DraftOrder_universal_d_BillingDetailsChangeTypeOneOf as BillingDetailsChangeTypeOneOf, ecomV1DraftOrder_universal_d_BillingChangedDetails as BillingChangedDetails, ecomV1DraftOrder_universal_d_BusinessLocationDetails as BusinessLocationDetails, ecomV1DraftOrder_universal_d_BusinessLocationDetailsChangeTypeOneOf as BusinessLocationDetailsChangeTypeOneOf, Location$1 as Location, ecomV1DraftOrder_universal_d_BusinessLocationChangedDetails as BusinessLocationChangedDetails, ecomV1DraftOrder_universal_d_CreateDraftOrderRequest as CreateDraftOrderRequest, ecomV1DraftOrder_universal_d_CreateDraftOrderResponse as CreateDraftOrderResponse, ecomV1DraftOrder_universal_d_CalculatedDraftOrder as CalculatedDraftOrder, ShippingOption$2 as ShippingOption, DeliveryLogistics$3 as DeliveryLogistics, PickupDetails$4 as PickupDetails, PickupMethod$3 as PickupMethod, DeliveryTimeSlot$3 as DeliveryTimeSlot, ShippingPrice$2 as ShippingPrice, CalculationErrors$1 as CalculationErrors, CalculationErrorsShippingCalculationErrorOneOf$1 as CalculationErrorsShippingCalculationErrorOneOf, Details$2 as Details, DetailsKindOneOf$2 as DetailsKindOneOf, ApplicationError$6 as ApplicationError, ValidationError$2 as ValidationError, RuleType$2 as RuleType, FieldViolation$2 as FieldViolation, SystemError$2 as SystemError, CarrierErrors$1 as CarrierErrors, CarrierError$2 as CarrierError, ecomV1DraftOrder_universal_d_CreateEmptyDraftOrderRequest as CreateEmptyDraftOrderRequest, ecomV1DraftOrder_universal_d_CreateEmptyDraftOrderResponse as CreateEmptyDraftOrderResponse, ecomV1DraftOrder_universal_d_AddLineItemsToDraftOrderRequest as AddLineItemsToDraftOrderRequest, ecomV1DraftOrder_universal_d_CatalogReferenceLineItem as CatalogReferenceLineItem, ecomV1DraftOrder_universal_d_CustomLineItem as CustomLineItem, ecomV1DraftOrder_universal_d_SecuredMedia as SecuredMedia, ecomV1DraftOrder_universal_d_FileType as FileType, ecomV1DraftOrder_universal_d_AddLineItemsToDraftOrderResponse as AddLineItemsToDraftOrderResponse, ecomV1DraftOrder_universal_d_UpdateLineItemsRequest as UpdateLineItemsRequest, ecomV1DraftOrder_universal_d_LineItemChangeDetails as LineItemChangeDetails, ecomV1DraftOrder_universal_d_UpdateLineItemsResponse as UpdateLineItemsResponse, ecomV1DraftOrder_universal_d_SetDiscountsRequest as SetDiscountsRequest, ecomV1DraftOrder_universal_d_IdAndApplied as IdAndApplied, ecomV1DraftOrder_universal_d_SetDiscountsResponse as SetDiscountsResponse, ecomV1DraftOrder_universal_d_CreateCustomDiscountsRequest as CreateCustomDiscountsRequest, ecomV1DraftOrder_universal_d_DiscountOption as DiscountOption, ecomV1DraftOrder_universal_d_DiscountOptionDiscountAmountOneOf as DiscountOptionDiscountAmountOneOf, DiscountType$2 as DiscountType, ecomV1DraftOrder_universal_d_CreateCustomDiscountsResponse as CreateCustomDiscountsResponse, ecomV1DraftOrder_universal_d_DeleteCustomDiscountsRequest as DeleteCustomDiscountsRequest, ecomV1DraftOrder_universal_d_DeleteCustomDiscountsResponse as DeleteCustomDiscountsResponse, ecomV1DraftOrder_universal_d_SetAdditionalFeesRequest as SetAdditionalFeesRequest, ecomV1DraftOrder_universal_d_SetAdditionalFeesResponse as SetAdditionalFeesResponse, ecomV1DraftOrder_universal_d_CreateCustomAdditionalFeesRequest as CreateCustomAdditionalFeesRequest, ecomV1DraftOrder_universal_d_AdditionalFeeOption as AdditionalFeeOption, ecomV1DraftOrder_universal_d_CreateCustomAdditionalFeesResponse as CreateCustomAdditionalFeesResponse, ecomV1DraftOrder_universal_d_DeleteCustomAdditionalFeesRequest as DeleteCustomAdditionalFeesRequest, ecomV1DraftOrder_universal_d_DeleteCustomAdditionalFeesResponse as DeleteCustomAdditionalFeesResponse, ecomV1DraftOrder_universal_d_SetShippingInfoRequest as SetShippingInfoRequest, ecomV1DraftOrder_universal_d_SetShippingInfoResponse as SetShippingInfoResponse, ecomV1DraftOrder_universal_d_SetBuyerInfoRequest as SetBuyerInfoRequest, ecomV1DraftOrder_universal_d_SetBuyerInfoResponse as SetBuyerInfoResponse, ecomV1DraftOrder_universal_d_SetRecipientInfoRequest as SetRecipientInfoRequest, ecomV1DraftOrder_universal_d_SetRecipientInfoResponse as SetRecipientInfoResponse, ecomV1DraftOrder_universal_d_SetBillingInfoRequest as SetBillingInfoRequest, ecomV1DraftOrder_universal_d_SetBillingInfoResponse as SetBillingInfoResponse, ecomV1DraftOrder_universal_d_UpdateShippingInfoRequest as UpdateShippingInfoRequest, ecomV1DraftOrder_universal_d_UpdateShippingInfoResponse as UpdateShippingInfoResponse, ecomV1DraftOrder_universal_d_GetDraftOrderRequest as GetDraftOrderRequest, ecomV1DraftOrder_universal_d_GetDraftOrderResponse as GetDraftOrderResponse, ecomV1DraftOrder_universal_d_GetOrderDraftabilityStatusRequest as GetOrderDraftabilityStatusRequest, ecomV1DraftOrder_universal_d_GetOrderDraftabilityStatusResponse as GetOrderDraftabilityStatusResponse, ecomV1DraftOrder_universal_d_NonDraftableReason as NonDraftableReason, ecomV1DraftOrder_universal_d_CommitDraftOrderRequest as CommitDraftOrderRequest, ecomV1DraftOrder_universal_d_CommitDraftOrderResponse as CommitDraftOrderResponse, Order$2 as Order, PaymentStatus$2 as PaymentStatus, FulfillmentStatus$3 as FulfillmentStatus, OrderStatus$1 as OrderStatus, Activity$2 as Activity, ActivityContentOneOf$1 as ActivityContentOneOf, CustomActivity$1 as CustomActivity, MerchantComment$1 as MerchantComment, OrderRefunded$2 as OrderRefunded, OrderCreatedFromExchange$1 as OrderCreatedFromExchange, NewExchangeOrderCreated$1 as NewExchangeOrderCreated, LineItemExchangeData$1 as LineItemExchangeData, DraftOrderChangesApplied$1 as DraftOrderChangesApplied, OrderChange$1 as OrderChange, OrderChangeValueOneOf$1 as OrderChangeValueOneOf, LineItemChanges$1 as LineItemChanges, LineItemQuantityChange$1 as LineItemQuantityChange, LineItemQuantityChangeType$1 as LineItemQuantityChangeType, LineItemPriceChange$1 as LineItemPriceChange, ManagedLineItem$1 as ManagedLineItem, ManagedDiscount$1 as ManagedDiscount, TranslatedValue$1 as TranslatedValue, LineItemAmount$1 as LineItemAmount, ManagedAdditionalFee$1 as ManagedAdditionalFee, TotalPriceChange$1 as TotalPriceChange, ShippingInformationChange$1 as ShippingInformationChange, ShippingInformationChangeShippingInformation$1 as ShippingInformationChangeShippingInformation, SavedPaymentMethod$1 as SavedPaymentMethod, AuthorizedPaymentCreated$1 as AuthorizedPaymentCreated, AuthorizedPaymentCaptured$1 as AuthorizedPaymentCaptured, AuthorizedPaymentVoided$1 as AuthorizedPaymentVoided, RefundInitiated$1 as RefundInitiated, RefundedPayment$1 as RefundedPayment, RefundedPaymentKindOneOf$1 as RefundedPaymentKindOneOf, RegularPaymentRefund$1 as RegularPaymentRefund, GiftCardPaymentRefund$1 as GiftCardPaymentRefund, MembershipPaymentRefund$1 as MembershipPaymentRefund, PaymentRefunded$1 as PaymentRefunded, PaymentRefundFailed$1 as PaymentRefundFailed, RefundedAsStoreCredit$1 as RefundedAsStoreCredit, PaymentPending$1 as PaymentPending, PaymentPendingPaymentDetailsOneOf$1 as PaymentPendingPaymentDetailsOneOf, RegularPayment$1 as RegularPayment, RegularPaymentPaymentMethodDetailsOneOf$1 as RegularPaymentPaymentMethodDetailsOneOf, CreditCardDetails$1 as CreditCardDetails, PaymentCanceled$1 as PaymentCanceled, PaymentCanceledPaymentDetailsOneOf$1 as PaymentCanceledPaymentDetailsOneOf, PaymentDeclined$1 as PaymentDeclined, PaymentDeclinedPaymentDetailsOneOf$1 as PaymentDeclinedPaymentDetailsOneOf, ActivityType$2 as ActivityType, AttributionSource$1 as AttributionSource, ecomV1DraftOrder_universal_d_V1CreatedBy as V1CreatedBy, ecomV1DraftOrder_universal_d_V1CreatedByStringOneOf as V1CreatedByStringOneOf, ChannelInfo$2 as ChannelInfo, ChannelType$2 as ChannelType, CustomField$2 as CustomField, ecomV1DraftOrder_universal_d_V1BalanceSummary as V1BalanceSummary, FulfillmentStatusesAggregate$1 as FulfillmentStatusesAggregate, Tags$1 as Tags, TagList$1 as TagList, ecomV1DraftOrder_universal_d_CreateOrderFromDraftRequest as CreateOrderFromDraftRequest, ecomV1DraftOrder_universal_d_OrderCreateSettings as OrderCreateSettings, OrderCreateNotifications$1 as OrderCreateNotifications, ecomV1DraftOrder_universal_d_CreateOrderFromDraftResponse as CreateOrderFromDraftResponse, ecomV1DraftOrder_universal_d_DeleteDraftOrderRequest as DeleteDraftOrderRequest, ecomV1DraftOrder_universal_d_DeleteDraftOrderResponse as DeleteDraftOrderResponse, ecomV1DraftOrder_universal_d_QueryDraftOrdersRequest as QueryDraftOrdersRequest, CursorQuery$5 as CursorQuery, CursorQueryPagingMethodOneOf$5 as CursorQueryPagingMethodOneOf, Sorting$9 as Sorting, SortOrder$9 as SortOrder, CursorPaging$9 as CursorPaging, ecomV1DraftOrder_universal_d_QueryDraftOrdersResponse as QueryDraftOrdersResponse, CursorPagingMetadata$8 as CursorPagingMetadata, Cursors$9 as Cursors, UpdateExtendedFieldsRequest$3 as UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse$3 as UpdateExtendedFieldsResponse, ecomV1DraftOrder_universal_d_SetTaxExemptionRequest as SetTaxExemptionRequest, ecomV1DraftOrder_universal_d_SetTaxExemptionResponse as SetTaxExemptionResponse, ecomV1DraftOrder_universal_d_GetDraftEditabilityStatusRequest as GetDraftEditabilityStatusRequest, ecomV1DraftOrder_universal_d_GetDraftEditabilityStatusResponse as GetDraftEditabilityStatusResponse, ecomV1DraftOrder_universal_d_SetBusinessLocationRequest as SetBusinessLocationRequest, ecomV1DraftOrder_universal_d_SetBusinessLocationResponse as SetBusinessLocationResponse, DomainEvent$c as DomainEvent, DomainEventBodyOneOf$c as DomainEventBodyOneOf, EntityCreatedEvent$c as EntityCreatedEvent, RestoreInfo$c as RestoreInfo, EntityUpdatedEvent$c as EntityUpdatedEvent, EntityDeletedEvent$c as EntityDeletedEvent, ActionEvent$c as ActionEvent, MessageEnvelope$b as MessageEnvelope, IdentificationData$c as IdentificationData, IdentificationDataIdOneOf$c as IdentificationDataIdOneOf, WebhookIdentityType$b as WebhookIdentityType, ecomV1DraftOrder_universal_d_createDraftOrder as createDraftOrder, ecomV1DraftOrder_universal_d_CreateDraftOrderOptions as CreateDraftOrderOptions, ecomV1DraftOrder_universal_d_createEmptyDraftOrder as createEmptyDraftOrder, ecomV1DraftOrder_universal_d_addLineItemsToDraftOrder as addLineItemsToDraftOrder, ecomV1DraftOrder_universal_d_AddLineItemsToDraftOrderOptions as AddLineItemsToDraftOrderOptions, ecomV1DraftOrder_universal_d_updateLineItems as updateLineItems, ecomV1DraftOrder_universal_d_UpdateLineItemsOptions as UpdateLineItemsOptions, ecomV1DraftOrder_universal_d_setDiscounts as setDiscounts, ecomV1DraftOrder_universal_d_createCustomDiscounts as createCustomDiscounts, ecomV1DraftOrder_universal_d_CreateCustomDiscountsOptions as CreateCustomDiscountsOptions, ecomV1DraftOrder_universal_d_deleteCustomDiscounts as deleteCustomDiscounts, ecomV1DraftOrder_universal_d_setAdditionalFees as setAdditionalFees, ecomV1DraftOrder_universal_d_createCustomAdditionalFees as createCustomAdditionalFees, ecomV1DraftOrder_universal_d_CreateCustomAdditionalFeesOptions as CreateCustomAdditionalFeesOptions, ecomV1DraftOrder_universal_d_deleteCustomAdditionalFees as deleteCustomAdditionalFees, ecomV1DraftOrder_universal_d_setShippingInfo as setShippingInfo, ecomV1DraftOrder_universal_d_SetShippingInfoOptions as SetShippingInfoOptions, ecomV1DraftOrder_universal_d_setBuyerInfo as setBuyerInfo, ecomV1DraftOrder_universal_d_SetBuyerInfoOptions as SetBuyerInfoOptions, ecomV1DraftOrder_universal_d_setRecipientInfo as setRecipientInfo, ecomV1DraftOrder_universal_d_SetRecipientInfoOptions as SetRecipientInfoOptions, ecomV1DraftOrder_universal_d_setBillingInfo as setBillingInfo, ecomV1DraftOrder_universal_d_SetBillingInfoOptions as SetBillingInfoOptions, ecomV1DraftOrder_universal_d_updateShippingInfo as updateShippingInfo, ecomV1DraftOrder_universal_d_UpdateShippingInfoOptions as UpdateShippingInfoOptions, ecomV1DraftOrder_universal_d_getDraftOrder as getDraftOrder, ecomV1DraftOrder_universal_d_getOrderDraftabilityStatus as getOrderDraftabilityStatus, ecomV1DraftOrder_universal_d_commitDraftOrder as commitDraftOrder, ecomV1DraftOrder_universal_d_CommitDraftOrderOptions as CommitDraftOrderOptions, ecomV1DraftOrder_universal_d_createOrderFromDraft as createOrderFromDraft, ecomV1DraftOrder_universal_d_CreateOrderFromDraftOptions as CreateOrderFromDraftOptions, ecomV1DraftOrder_universal_d_deleteDraftOrder as deleteDraftOrder, ecomV1DraftOrder_universal_d_queryDraftOrders as queryDraftOrders, ecomV1DraftOrder_universal_d_DraftOrdersQueryResult as DraftOrdersQueryResult, ecomV1DraftOrder_universal_d_DraftOrdersQueryBuilder as DraftOrdersQueryBuilder, updateExtendedFields$3 as updateExtendedFields, UpdateExtendedFieldsOptions$3 as UpdateExtendedFieldsOptions, ecomV1DraftOrder_universal_d_setTaxExemption as setTaxExemption, ecomV1DraftOrder_universal_d_SetTaxExemptionOptions as SetTaxExemptionOptions, ecomV1DraftOrder_universal_d_getDraftEditabilityStatus as getDraftEditabilityStatus, ecomV1DraftOrder_universal_d_setBusinessLocation as setBusinessLocation, ecomV1DraftOrder_universal_d_SetBusinessLocationOptions as SetBusinessLocationOptions, }; } interface OrderWithFulfillments { /** Order ID. */ orderId?: string; /** Fulfillments associated with the order. */ fulfillments?: Fulfillment$1[]; } /** for now, this is a sub-object of Orders, so can refer to order line items by id. */ interface Fulfillment$1 extends FulfillmentFulfillmentInfoOneOf { /** Tracking info. */ trackingInfo?: FulfillmentTrackingInfo$1; /** Custom fulfillment info. */ customInfo?: CustomFulfillmentInfo; /** * Fulfillment ID. * @readonly */ _id?: string | null; /** * Fulfillment creation date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _createdDate?: Date | null; /** Line items being fulfilled. */ lineItems?: FulfillmentLineItem$1[]; /** * Fulfillment status. * * Supported values: * + `"Pending"` * + `"Accepted"` * + `"Ready"` * + `"In_Delivery"` * + `"Fulfilled"` */ status?: string | null; /** Fulfillment handling complete. */ completed?: boolean | null; } /** @oneof */ interface FulfillmentFulfillmentInfoOneOf { /** Tracking info. */ trackingInfo?: FulfillmentTrackingInfo$1; /** Custom fulfillment info. */ customInfo?: CustomFulfillmentInfo; } interface FulfillmentLineItem$1 { /** Line item ID (mirrors the ID of the order line item). */ _id?: string; /** * Line item quantity. * * If this property isn't passed on creation, it defaults to the number of items not already linked to a fulfillment. * * If the order does not have the requested quantity of line items available to add to this fulfillment, the fulfillment will not be created and an error is returned. * * Min: `1` * Max: `100000` */ quantity?: number | null; } interface FulfillmentTrackingInfo$1 { /** Shipping/delivery tracking number. */ trackingNumber?: string | null; /** * Shipping provider. Using one of the following shipping providers will allow for auto-filling the tracking link: * * `'fedex'` * * `'ups'` * * `'usps'` * * `'dhl'` * * `'canadaPost'` */ shippingProvider?: string | null; /** Tracking link. Auto-filled if a predefined shipping provider is used, otherwise provided on creation. */ trackingLink?: string | null; } interface CustomFulfillmentInfo { /** Custom fulfillment info in key:value form. */ fieldsData?: Record; } interface FulfillmentCreated { /** Order ID (auto generated upon order creation). */ orderId?: string; /** ID of the newly created fulfillment. */ fulfillmentId?: string; /** Fulfillment creation date and time. */ dateCreated?: Date | null; /** Buyer information. */ buyerInfo?: BuyerInfo$2; /** Order fulfillment status. */ fulfillmentStatus?: FulfillmentStatus$2; /** Fulfillment tracking information. */ trackingInfo?: V2FulfillmentTrackingInfo; } /** Buyer Info */ interface BuyerInfo$2 { /** Wix customer ID */ _id?: string | null; /** * Deprecated (use identityType instead) * @readonly * @deprecated */ type?: IdentityType$3; /** Customer type */ identityType?: IdentityType$3; /** * Customer's first name * @readonly */ firstName?: string; /** * Customer's last name * @readonly */ lastName?: string; /** * Customer's phone number * @readonly */ phone?: string | null; /** * Customer's email address * @readonly */ email?: string; /** * Contact Id. needed for cases where the user is the buyer and so it doesn't exist on the buyer info * @internal * @readonly */ contactId?: string | null; } enum IdentityType$3 { UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE", /** Site member */ MEMBER = "MEMBER", /** Contact */ CONTACT = "CONTACT" } enum FulfillmentStatus$2 { /** None of the order items are fulfilled */ NOT_FULFILLED = "NOT_FULFILLED", /** * All of the order items are fulfilled * Orders without shipping info are fulfilled automatically */ FULFILLED = "FULFILLED", /** Order is canceled */ CANCELED = "CANCELED", /** Some, but not all of the order items are fulfilled */ PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED" } interface V2FulfillmentTrackingInfo { /** Tracking number. */ trackingNumber?: string; /** * Shipping provider. Using the following shipping providers will allow for autofilling the tracking link: * * `fedex` * * `ups` * * `usps` * * `dhl` * * `canadaPost` */ shippingProvider?: string; /** Tracking link - autofilled if using a predefined shipping provider, otherwise provided on creation. */ trackingLink?: string | null; } interface FulfillmentUpdated { /** Order ID (auto generated upon order creation). */ orderId?: string; /** ID of the updated fulfillment. */ fulfillmentId?: string; /** Fulfillment tracking information. */ trackingInfo?: V2FulfillmentTrackingInfo; } interface FulfillmentDeleted { /** Order ID (auto generated upon order creation). */ orderId?: string; /** ID of the deleted fulfillment. */ fulfillmentId?: string; /** Order fulfillment status. */ fulfillmentStatus?: FulfillmentStatus$2; } interface ListFulfillmentsForSingleOrderRequest { /** Order ID for which to retrieve fulfillments. */ orderId: string; } interface ListFulfillmentsForSingleOrderResponse { /** List of fulfillments associated with the order. */ orderWithFulfillments?: OrderWithFulfillments; } interface ListFulfillmentsForMultipleOrdersRequest { /** List of order IDs for which to retrieve fulfillments. */ orderIds: string[]; } interface ListFulfillmentsForMultipleOrdersResponse { /** List of order IDs and their associated fulfillments. */ ordersWithFulfillments?: OrderWithFulfillments[]; } interface CreateFulfillmentRequest { /** Order ID. */ orderId: string; /** Fulfillment info. */ fulfillment: Fulfillment$1; } interface CreateFulfillmentResponse { /** Order ID and the orders' fulfillments. */ orderWithFulfillments?: OrderWithFulfillments; /** ID of created fulfillment. */ fulfillmentId?: string; } interface UpdateFulfillmentRequest { /** Order ID. */ orderId: string; /** Fulfillment info to update. */ fulfillment?: Fulfillment$1; /** * Set of fields to update. Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } interface UpdateFulfillmentResponse { /** Order ID and the orders' associated fulfillments after update. */ orderWithFulfillments?: OrderWithFulfillments; } interface DeleteFulfillmentRequest { /** Order ID. */ orderId: string; /** ID of the fulfillment to delete. */ fulfillmentId: string; } interface DeleteFulfillmentResponse { /** Order ID and the order's associated fulfillments after deletion. */ orderWithFulfillments?: OrderWithFulfillments; } interface BulkCreateFulfillmentRequest { /** List of order IDs and their associated fulfillments' info. */ ordersWithFulfillments: BulkCreateOrderWithFulfillments[]; } interface BulkCreateOrderWithFulfillments { /** Order ID. */ orderId?: string; /** Fulfillments associated with the order. */ fulfillments?: Fulfillment$1[]; } interface BulkCreateFulfillmentResponse { /** Items updated by bulk action. */ results?: BulkOrderFulfillmentsResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$2; } interface BulkOrderFulfillmentsResult { /** Item metadata. */ itemMetadata?: ItemMetadata$2; /** List of order IDs and their associated fulfillments. */ ordersWithFulfillments?: OrderWithFulfillments; } interface ItemMetadata$2 { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError$5; } interface ApplicationError$5 { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkActionMetadata$2 { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface DomainEvent$b extends DomainEventBodyOneOf$b { createdEvent?: EntityCreatedEvent$b; updatedEvent?: EntityUpdatedEvent$b; deletedEvent?: EntityDeletedEvent$b; actionEvent?: ActionEvent$b; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$b { createdEvent?: EntityCreatedEvent$b; updatedEvent?: EntityUpdatedEvent$b; deletedEvent?: EntityDeletedEvent$b; actionEvent?: ActionEvent$b; } interface EntityCreatedEvent$b { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$b; } interface RestoreInfo$b { deletedDate?: Date | null; } interface EntityUpdatedEvent$b { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; } interface EntityDeletedEvent$b { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; } interface ActionEvent$b { bodyAsJson?: string; } interface MessageEnvelope$a { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$b; /** Stringify payload. */ data?: string; } interface IdentificationData$b extends IdentificationDataIdOneOf$b { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$a; } /** @oneof */ interface IdentificationDataIdOneOf$b { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$a { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Retrieves fulfillments associated with a specified order. * * * The `listFulfillmentsForSingleOrder()` function returns a Promise that resolves when the fulfillments are retrieved. * @param orderId - Order ID for which to retrieve fulfillments. * @public * @requiredField orderId * @permissionId ECOM.READ_FULFILLMENTS */ function listFulfillmentsForSingleOrder(orderId: string): Promise; /** * Retrieves fulfillments associated with multiple specified orders. * * * The `listFulfillmentsForMultipleOrders()` function returns a Promise that resolves when the fulfillments are retrieved. * @param orderIds - List of order IDs for which to retrieve fulfillments. * @public * @requiredField orderIds * @permissionId ECOM.READ_FULFILLMENTS */ function listFulfillmentsForMultipleOrders(orderIds: string[]): Promise; /** * Creates an order fulfillment. * * * The `createFulfillment()` function returns a Promise that resolves when the fulfillment is created. * @param orderId - Order ID. * @param fulfillment - Fulfillment info. * @public * @requiredField fulfillment * @requiredField fulfillment.lineItems * @requiredField fulfillment.lineItems._id * @requiredField orderId * @permissionId ECOM.MODIFY_FULFILLMENTS * @adminMethod */ function createFulfillment(orderId: string, fulfillment: Fulfillment$1): Promise; /** * Updates a fulfillment's properties. * To update a field's value, include the new value in the `fulfillment` field in the body params. * To remove a field's value, pass `null`. * * * The `updateFulfillment()` function returns a Promise that resolves when the fulfillment is updated. * * > **Note:** Updating line item IDs or fulfilled quantities is not allowed. To update line item IDs or quantities, delete the fulfillment and create it again. * @public * @requiredField identifiers * @requiredField identifiers.fulfillmentId * @requiredField identifiers.orderId * @param identifiers - Order and fulfillment IDs to be updated. * @param options - Available options to use when updating a fulfillment. * @permissionId ECOM.MODIFY_FULFILLMENTS * @adminMethod * @returns Order ID and the orders' associated fulfillments after update. */ function updateFulfillment(identifiers: UpdateFulfillmentIdentifiers, options?: UpdateFulfillmentOptions): Promise; interface UpdateFulfillmentOptions { /** Fulfillment info. */ fulfillment: { /** Tracking info. */ trackingInfo?: FulfillmentTrackingInfo$1; /** Custom fulfillment info. */ customInfo?: CustomFulfillmentInfo; /** * Fulfillment ID. * @readonly */ _id?: string | null; /** * Fulfillment creation date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _createdDate?: Date | null; /** Line items being fulfilled. */ lineItems?: FulfillmentLineItem$1[]; /** * Fulfillment status. * * Supported values: * + `"Pending"` * + `"Accepted"` * + `"Ready"` * + `"In_Delivery"` * + `"Fulfilled"` */ status?: string | null; /** Fulfillment handling complete. */ completed?: boolean | null; }; /** * Set of fields to update. Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } interface UpdateFulfillmentIdentifiers { /** * ID of the fulfillment to be updated. * @readonly */ fulfillmentId?: string | null; /** Order ID. */ orderId: string; } /** * Deletes an existing order fulfillment. * * * The `deleteFulfillment()` function returns a Promise that resolves when the fulfillment is deleted. * @public * @requiredField identifiers * @requiredField identifiers.fulfillmentId * @requiredField identifiers.orderId * @param identifiers - Order and fulfillment IDs. * @permissionId ECOM.MODIFY_FULFILLMENTS * @adminMethod */ function deleteFulfillment(identifiers: DeleteFulfillmentIdentifiers): Promise; interface DeleteFulfillmentIdentifiers { /** ID of the fulfillment to delete. */ fulfillmentId: string; /** Order ID. */ orderId: string; } /** * Creates multiple fulfillments for one or more orders. * * * The `bulkCreateFulfillments()` function returns a Promise that resolves when the fulfillments are created. * @param ordersWithFulfillments - List of order IDs and their associated fulfillments' info. * @public * @requiredField ordersWithFulfillments * @requiredField ordersWithFulfillments.fulfillments * @requiredField ordersWithFulfillments.fulfillments.lineItems * @requiredField ordersWithFulfillments.fulfillments.lineItems._id * @requiredField ordersWithFulfillments.orderId * @permissionId ECOM.MODIFY_FULFILLMENTS * @adminMethod */ function bulkCreateFulfillments(ordersWithFulfillments: BulkCreateOrderWithFulfillments[]): Promise; type ecomV1Fulfillments_universal_d_OrderWithFulfillments = OrderWithFulfillments; type ecomV1Fulfillments_universal_d_FulfillmentFulfillmentInfoOneOf = FulfillmentFulfillmentInfoOneOf; type ecomV1Fulfillments_universal_d_CustomFulfillmentInfo = CustomFulfillmentInfo; type ecomV1Fulfillments_universal_d_FulfillmentCreated = FulfillmentCreated; type ecomV1Fulfillments_universal_d_V2FulfillmentTrackingInfo = V2FulfillmentTrackingInfo; type ecomV1Fulfillments_universal_d_FulfillmentUpdated = FulfillmentUpdated; type ecomV1Fulfillments_universal_d_FulfillmentDeleted = FulfillmentDeleted; type ecomV1Fulfillments_universal_d_ListFulfillmentsForSingleOrderRequest = ListFulfillmentsForSingleOrderRequest; type ecomV1Fulfillments_universal_d_ListFulfillmentsForSingleOrderResponse = ListFulfillmentsForSingleOrderResponse; type ecomV1Fulfillments_universal_d_ListFulfillmentsForMultipleOrdersRequest = ListFulfillmentsForMultipleOrdersRequest; type ecomV1Fulfillments_universal_d_ListFulfillmentsForMultipleOrdersResponse = ListFulfillmentsForMultipleOrdersResponse; type ecomV1Fulfillments_universal_d_CreateFulfillmentRequest = CreateFulfillmentRequest; type ecomV1Fulfillments_universal_d_CreateFulfillmentResponse = CreateFulfillmentResponse; type ecomV1Fulfillments_universal_d_UpdateFulfillmentRequest = UpdateFulfillmentRequest; type ecomV1Fulfillments_universal_d_UpdateFulfillmentResponse = UpdateFulfillmentResponse; type ecomV1Fulfillments_universal_d_DeleteFulfillmentRequest = DeleteFulfillmentRequest; type ecomV1Fulfillments_universal_d_DeleteFulfillmentResponse = DeleteFulfillmentResponse; type ecomV1Fulfillments_universal_d_BulkCreateFulfillmentRequest = BulkCreateFulfillmentRequest; type ecomV1Fulfillments_universal_d_BulkCreateOrderWithFulfillments = BulkCreateOrderWithFulfillments; type ecomV1Fulfillments_universal_d_BulkCreateFulfillmentResponse = BulkCreateFulfillmentResponse; type ecomV1Fulfillments_universal_d_BulkOrderFulfillmentsResult = BulkOrderFulfillmentsResult; const ecomV1Fulfillments_universal_d_listFulfillmentsForSingleOrder: typeof listFulfillmentsForSingleOrder; const ecomV1Fulfillments_universal_d_listFulfillmentsForMultipleOrders: typeof listFulfillmentsForMultipleOrders; const ecomV1Fulfillments_universal_d_createFulfillment: typeof createFulfillment; const ecomV1Fulfillments_universal_d_updateFulfillment: typeof updateFulfillment; type ecomV1Fulfillments_universal_d_UpdateFulfillmentOptions = UpdateFulfillmentOptions; type ecomV1Fulfillments_universal_d_UpdateFulfillmentIdentifiers = UpdateFulfillmentIdentifiers; const ecomV1Fulfillments_universal_d_deleteFulfillment: typeof deleteFulfillment; type ecomV1Fulfillments_universal_d_DeleteFulfillmentIdentifiers = DeleteFulfillmentIdentifiers; const ecomV1Fulfillments_universal_d_bulkCreateFulfillments: typeof bulkCreateFulfillments; namespace ecomV1Fulfillments_universal_d { export { ecomV1Fulfillments_universal_d_OrderWithFulfillments as OrderWithFulfillments, Fulfillment$1 as Fulfillment, ecomV1Fulfillments_universal_d_FulfillmentFulfillmentInfoOneOf as FulfillmentFulfillmentInfoOneOf, FulfillmentLineItem$1 as FulfillmentLineItem, FulfillmentTrackingInfo$1 as FulfillmentTrackingInfo, ecomV1Fulfillments_universal_d_CustomFulfillmentInfo as CustomFulfillmentInfo, ecomV1Fulfillments_universal_d_FulfillmentCreated as FulfillmentCreated, BuyerInfo$2 as BuyerInfo, IdentityType$3 as IdentityType, FulfillmentStatus$2 as FulfillmentStatus, ecomV1Fulfillments_universal_d_V2FulfillmentTrackingInfo as V2FulfillmentTrackingInfo, ecomV1Fulfillments_universal_d_FulfillmentUpdated as FulfillmentUpdated, ecomV1Fulfillments_universal_d_FulfillmentDeleted as FulfillmentDeleted, ecomV1Fulfillments_universal_d_ListFulfillmentsForSingleOrderRequest as ListFulfillmentsForSingleOrderRequest, ecomV1Fulfillments_universal_d_ListFulfillmentsForSingleOrderResponse as ListFulfillmentsForSingleOrderResponse, ecomV1Fulfillments_universal_d_ListFulfillmentsForMultipleOrdersRequest as ListFulfillmentsForMultipleOrdersRequest, ecomV1Fulfillments_universal_d_ListFulfillmentsForMultipleOrdersResponse as ListFulfillmentsForMultipleOrdersResponse, ecomV1Fulfillments_universal_d_CreateFulfillmentRequest as CreateFulfillmentRequest, ecomV1Fulfillments_universal_d_CreateFulfillmentResponse as CreateFulfillmentResponse, ecomV1Fulfillments_universal_d_UpdateFulfillmentRequest as UpdateFulfillmentRequest, ecomV1Fulfillments_universal_d_UpdateFulfillmentResponse as UpdateFulfillmentResponse, ecomV1Fulfillments_universal_d_DeleteFulfillmentRequest as DeleteFulfillmentRequest, ecomV1Fulfillments_universal_d_DeleteFulfillmentResponse as DeleteFulfillmentResponse, ecomV1Fulfillments_universal_d_BulkCreateFulfillmentRequest as BulkCreateFulfillmentRequest, ecomV1Fulfillments_universal_d_BulkCreateOrderWithFulfillments as BulkCreateOrderWithFulfillments, ecomV1Fulfillments_universal_d_BulkCreateFulfillmentResponse as BulkCreateFulfillmentResponse, ecomV1Fulfillments_universal_d_BulkOrderFulfillmentsResult as BulkOrderFulfillmentsResult, ItemMetadata$2 as ItemMetadata, ApplicationError$5 as ApplicationError, BulkActionMetadata$2 as BulkActionMetadata, DomainEvent$b as DomainEvent, DomainEventBodyOneOf$b as DomainEventBodyOneOf, EntityCreatedEvent$b as EntityCreatedEvent, RestoreInfo$b as RestoreInfo, EntityUpdatedEvent$b as EntityUpdatedEvent, EntityDeletedEvent$b as EntityDeletedEvent, ActionEvent$b as ActionEvent, MessageEnvelope$a as MessageEnvelope, IdentificationData$b as IdentificationData, IdentificationDataIdOneOf$b as IdentificationDataIdOneOf, WebhookIdentityType$a as WebhookIdentityType, ecomV1Fulfillments_universal_d_listFulfillmentsForSingleOrder as listFulfillmentsForSingleOrder, ecomV1Fulfillments_universal_d_listFulfillmentsForMultipleOrders as listFulfillmentsForMultipleOrders, ecomV1Fulfillments_universal_d_createFulfillment as createFulfillment, ecomV1Fulfillments_universal_d_updateFulfillment as updateFulfillment, ecomV1Fulfillments_universal_d_UpdateFulfillmentOptions as UpdateFulfillmentOptions, ecomV1Fulfillments_universal_d_UpdateFulfillmentIdentifiers as UpdateFulfillmentIdentifiers, ecomV1Fulfillments_universal_d_deleteFulfillment as deleteFulfillment, ecomV1Fulfillments_universal_d_DeleteFulfillmentIdentifiers as DeleteFulfillmentIdentifiers, ecomV1Fulfillments_universal_d_bulkCreateFulfillments as bulkCreateFulfillments, }; } interface GiftCard$2 { /** * Gift card obfuscated code. * * For example: "****-****-****-1234". */ obfuscatedCode?: string; /** Gift card balance. */ balance?: Money; /** Current gift card status. */ status?: Status$1; /** App ID of the gift card provider, as returned in eCommerce Get Checkout or List Transactions for Single Order. */ appId?: string; /** * External ID in the gift card provider's system. * Used for integration and tracking across different platforms. */ externalId?: string | null; } interface Money { /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative. */ value?: string; /** Currency code. Must be valid ISO 4217 currency code (e.g., USD). */ currency?: string; } enum Status$1 { UNKNOWN_STATUS = "UNKNOWN_STATUS", /** Gift card is active and can be used for purchases. */ VALID = "VALID", /** Gift card expiration date has passed and can no longer be used. */ EXPIRED = "EXPIRED", /** Gift card has been disabled by the merchant and can no longer be used. */ DISABLED = "DISABLED" } interface GetGiftCardRequest { /** Gift card code. */ code: string; /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; } interface Context { /** Physical location ID. Can be based on the Locations API or an external provider. */ locationId?: string | null; } interface GetGiftCardResponse { /** Retrieved gift card. */ giftCard?: GiftCard$2; } interface RedeemGiftCardRequest { /** Gift card code. */ code: string; /** Amount to redeem from the gift card. */ amount: Money; /** Order ID to apply the gift card transaction, when applying a gift card after order creation. Order ID can be collected from the eCommerce Order Created webhook or by calling eCommerce Search Orders. */ orderId?: string; /** App ID of the gift card provider. */ appId: string; /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; } interface RedeemGiftCardResponse { /** Gift card transaction ID. */ transactionId?: string; } interface VoidTransactionRequest { /** Gift card transaction ID, as returned from Redeem Gift Card. */ transactionId: string; /** App ID of the gift card provider. */ appId: string; /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; } interface VoidTransactionResponse { } /** * Retrieves a gift card. * @param code - Gift card code. * @public * @documentationMaturity preview * @requiredField code * @param options - Field options. * @permissionId ECOM.GIFT_CARD_READ * @adminMethod */ function getGiftCard(code: string, options?: GetGiftCardOptions): Promise; interface GetGiftCardOptions { /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; } /** * Redeems a gift card. * Creates a transaction and lowers the card balance by the transaction amount. * @param code - Gift card code. * @public * @documentationMaturity preview * @requiredField code * @requiredField options.amount * @requiredField options.amount.value * @requiredField options.appId * @param options - Field options. `amount` and `appId` **must** be passed. * @permissionId ECOM.GIFT_CARD_REDEEM * @adminMethod */ function redeemGiftCard(code: string, options?: RedeemGiftCardOptions): Promise; interface RedeemGiftCardOptions { /** Amount to redeem from the gift card. */ amount: Money; /** Order ID to apply the gift card transaction, when applying a gift card after order creation. Order ID can be collected from the eCommerce Order Created webhook or by calling eCommerce Search Orders. */ orderId?: string; /** App ID of the gift card provider. */ appId: string; /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; } /** * Voids a gift card transaction. * Transaction IDs are returned in Redeem Gift Card. * @param transactionId - Gift card transaction ID, as returned from Redeem Gift Card. * @public * @documentationMaturity preview * @requiredField options.appId * @requiredField transactionId * @param options - Field options. `appId` **must** be passed. * @permissionId ECOM.GIFT_CARD_TRANSACTION_VOID * @adminMethod */ function voidTransaction(transactionId: string, options?: VoidTransactionOptions): Promise; interface VoidTransactionOptions { /** App ID of the gift card provider. */ appId: string; /** Contextual information for the request, including the physical location ID if applicable. */ context?: Context; } type ecomV1GiftCard_universal_d_Money = Money; type ecomV1GiftCard_universal_d_GetGiftCardRequest = GetGiftCardRequest; type ecomV1GiftCard_universal_d_Context = Context; type ecomV1GiftCard_universal_d_GetGiftCardResponse = GetGiftCardResponse; type ecomV1GiftCard_universal_d_RedeemGiftCardRequest = RedeemGiftCardRequest; type ecomV1GiftCard_universal_d_RedeemGiftCardResponse = RedeemGiftCardResponse; type ecomV1GiftCard_universal_d_VoidTransactionRequest = VoidTransactionRequest; type ecomV1GiftCard_universal_d_VoidTransactionResponse = VoidTransactionResponse; const ecomV1GiftCard_universal_d_getGiftCard: typeof getGiftCard; type ecomV1GiftCard_universal_d_GetGiftCardOptions = GetGiftCardOptions; const ecomV1GiftCard_universal_d_redeemGiftCard: typeof redeemGiftCard; type ecomV1GiftCard_universal_d_RedeemGiftCardOptions = RedeemGiftCardOptions; const ecomV1GiftCard_universal_d_voidTransaction: typeof voidTransaction; type ecomV1GiftCard_universal_d_VoidTransactionOptions = VoidTransactionOptions; namespace ecomV1GiftCard_universal_d { export { GiftCard$2 as GiftCard, ecomV1GiftCard_universal_d_Money as Money, Status$1 as Status, ecomV1GiftCard_universal_d_GetGiftCardRequest as GetGiftCardRequest, ecomV1GiftCard_universal_d_Context as Context, ecomV1GiftCard_universal_d_GetGiftCardResponse as GetGiftCardResponse, ecomV1GiftCard_universal_d_RedeemGiftCardRequest as RedeemGiftCardRequest, ecomV1GiftCard_universal_d_RedeemGiftCardResponse as RedeemGiftCardResponse, ecomV1GiftCard_universal_d_VoidTransactionRequest as VoidTransactionRequest, ecomV1GiftCard_universal_d_VoidTransactionResponse as VoidTransactionResponse, ecomV1GiftCard_universal_d_getGiftCard as getGiftCard, ecomV1GiftCard_universal_d_GetGiftCardOptions as GetGiftCardOptions, ecomV1GiftCard_universal_d_redeemGiftCard as redeemGiftCard, ecomV1GiftCard_universal_d_RedeemGiftCardOptions as RedeemGiftCardOptions, ecomV1GiftCard_universal_d_voidTransaction as voidTransaction, ecomV1GiftCard_universal_d_VoidTransactionOptions as VoidTransactionOptions, }; } interface LocalDeliveryOption extends LocalDeliveryOptionConfigOneOf { zipConfig?: ZipCodeConfig; radiusConfig?: RadiusConfig; customAreaConfig?: CustomAreaConfig; /** * LocalDeliveryOptionId - unique identifier of local delivery option * @readonly */ _id?: string | null; /** * External id of shipping rule which LocalDeliveryOption is linked to. Most commonly it would be shippingRuleId from WixStores * @internal * @deprecated External id of shipping rule which LocalDeliveryOption is linked to. Most commonly it would be shippingRuleId from WixStores * @targetRemovalDate 2025-01-12 */ externalId?: string | null; /** Area name of Local Delivery Option */ areaName?: string | null; /** * Flat price of local delivery * @deprecated Flat price of local delivery * @targetRemovalDate 2025-01-12 */ rate?: string | null; /** Estimated delivery time description text */ estimatedDeliveryTime?: string | null; /** * Minimum order total to be eligible for free delivery * @deprecated Minimum order total to be eligible for free delivery * @targetRemovalDate 2025-01-12 */ minimumFreeDeliveryOrderAmount?: number | null; /** List of countries with subdivisions */ destinations?: Destination[]; /** * Database revision of LocalDeliveryOption entity. Incremented on each modification * @readonly */ revision?: string | null; scheduledDeliveryConfig?: ScheduledDelivery; /** at runtime for a given shipment input, up to one rate (price) should be returned in an option. If more than one rate is valid then we return the lowest one. */ rates?: ConditionalRates$2[]; /** * Date and time the LocalDeliveryOption was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the LocalDeliveryOption was last updated. * @readonly */ _updatedDate?: Date | null; /** This local delivery is active for the following delivery regions. */ deliveryRegionIds?: string[]; } /** @oneof */ interface LocalDeliveryOptionConfigOneOf { zipConfig?: ZipCodeConfig; radiusConfig?: RadiusConfig; customAreaConfig?: CustomAreaConfig; } interface Destination { /** Country ISO code */ code?: string; /** List of subdivisions, empty means all */ subdivisions?: string[]; } interface ZipCodeConfig { /** List of ZipCodes and ZipCode regexes. Examples: 10001, 10002 or 1000* */ zipCodes?: string[]; } interface RadiusConfig { /** Delivery-from address */ address?: LocalDeliveryAddress; /** Delivery circle's radius */ radius?: number; /** * Radius' unit, taken from site properties * @readonly */ lengthUnit?: LengthUnit; } interface LocalDeliveryAddress { /** A string containing the human-readable address of this location */ formatted?: string | null; /** coordinates of the physical address */ location?: AddressLocation$4; } interface AddressLocation$4 { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } enum LengthUnit { /** Length unit can't be classified, due to an error */ UNSPECIFIED_LENGTH_UNIT = "UNSPECIFIED_LENGTH_UNIT", /** Kilometers */ KM = "KM", /** Miles */ MI = "MI" } interface CustomAreaConfig { /** Geocodes of the polygon defining the delivery area. */ geocodes?: AddressLocation$4[]; } interface ScheduledDelivery { /** * Days config which contain days when delivery is enabled with it's time slots * @deprecated Days config which contain days when delivery is enabled with it's time slots * @replacedBy time_windows * @targetRemovalDate 2025-01-01 */ days?: Days; /** Amount of days before first delivery option date */ handlingDays?: number | null; /** Cut off time after which first delivery option would be for next day */ cutOffTime?: TimePoint; /** availability times configuration. */ timeWindows?: TimeWindow[]; } interface Days { monday?: DaySlot; tuesday?: DaySlot; wednesday?: DaySlot; thursday?: DaySlot; friday?: DaySlot; saturday?: DaySlot; sunday?: DaySlot; } interface DaySlot { /** Shows whether this day slot is enabled for delivery */ enabledForDelivery?: boolean | null; /** Time slots for scheduled delivery during day */ timeSlots?: TimeSlot[]; } interface TimeSlot { /** Starting time point of time slot */ from?: TimePoint; /** End time point of time slot */ to?: TimePoint; } interface TimePoint { /** Hours in format 0-23 */ hours?: number | null; /** Minutes 0-59 */ minutes?: number | null; } interface TimeWindow { /** The day of week this availability relates to. */ day?: DayOfWeek; /** The start time in time of day representation. */ start?: TimeOfDay; /** The end time in time of day representation. */ end?: TimeOfDay; /** Whether this timeWindow availability is enabled. */ enabled?: boolean | null; } enum DayOfWeek { /** Monday. */ MON = "MON", /** Tuesday. */ TUE = "TUE", /** Wednesday. */ WED = "WED", /** Thursday. */ THU = "THU", /** Friday. */ FRI = "FRI", /** Saturday. */ SAT = "SAT", /** Sunday. */ SUN = "SUN" } interface TimeOfDay { /** Hours */ hours?: number; /** Minutes */ minutes?: number; } interface ConditionalRates$2 { /** * there is an AND logic between all the conditions. Empty conditions means true. * For example: weight > 0 and weight <= 10 */ conditions?: Condition$2[]; amount?: string; } interface Condition$2 { type?: ConditionType$2; /** * The value in respective to the condition type * Weight values should be in the same weight units of the store: KG / LB * Total price is according to the store currency * Quantity of items should be integers */ value?: string; operator?: LogicalOperator$2; } enum ConditionType$2 { UNKNOWN_TYPE = "UNKNOWN_TYPE", BY_TOTAL_WEIGHT = "BY_TOTAL_WEIGHT", BY_TOTAL_PRICE = "BY_TOTAL_PRICE", BY_TOTAL_QUANTITY = "BY_TOTAL_QUANTITY" } enum LogicalOperator$2 { UNKNOWN_LOGICAL_OPERATOR_TYPE = "UNKNOWN_LOGICAL_OPERATOR_TYPE", EQ = "EQ", GT = "GT", GTE = "GTE", LT = "LT", LTE = "LTE" } interface CreateLocalDeliveryOptionRequest { localDeliveryOption: LocalDeliveryOption; } interface CreateLocalDeliveryOptionResponse { localDeliveryOption?: LocalDeliveryOption; } interface GetLocalDeliveryOptionRequest { /** * @deprecated * @targetRemovalDate 2025-01-12 */ _id?: string; localDeliveryOptionId: string; } interface GetLocalDeliveryOptionResponse { localDeliveryOption?: LocalDeliveryOption; } interface ListLocalDeliveryOptionsRequest { externalId: string; } interface ListLocalDeliveryOptionsResponse { localDeliveryOptions?: LocalDeliveryOption[]; } interface QueryLocalDeliveryOptionsRequest { /** WQL expression */ query: QueryV2$2; } interface QueryV2$2 extends QueryV2PagingMethodOneOf$2 { /** Paging options to limit and skip the number of items. */ paging?: Paging$2; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$8; /** * Filter object. * * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Sort object. * * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sort?: Sorting$8[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ interface QueryV2PagingMethodOneOf$2 { /** Paging options to limit and skip the number of items. */ paging?: Paging$2; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$8; } interface Sorting$8 { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$8; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$8 { ASC = "ASC", DESC = "DESC" } interface Paging$2 { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CursorPaging$8 { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryLocalDeliveryOptionsResponse { /** Retrieved local delivery options. */ localDeliveryOptions?: LocalDeliveryOption[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata$7; } interface CursorPagingMetadata$7 { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors$8; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; /** * Total number of items matching the filter. * Available only on the first page of *Search* results, not included in *Query* or *List* results. * If the Search results span multiple pages, the value of `total` will exceed the number of items returned on the first page. * @internal */ total?: number | null; } interface Cursors$8 { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface UpdateLocalDeliveryOptionRequest { /** LocalDeliveryOption to be updated, may be partial. */ localDeliveryOption: LocalDeliveryOption; /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } interface UpdateLocalDeliveryOptionResponse { localDeliveryOption?: LocalDeliveryOption; } interface DeleteLocalDeliveryOptionRequest { /** * @deprecated * @targetRemovalDate 2025-01-12 */ _id?: string; localDeliveryOptionId: string; } interface DeleteLocalDeliveryOptionResponse { } interface BulkCreateLocalDeliveryOptionRequest { localDeliveryOptions: LocalDeliveryOption[]; } interface BulkCreateLocalDeliveryOptionResponse { localDeliveryOptions?: LocalDeliveryOption[]; errors?: LocalDeliveryOptionError[]; } interface LocalDeliveryOptionError { _id?: string; error?: string; } interface BulkUpdateLocalDeliveryOptionRequest { localDeliveryOptions: LocalDeliveryOption[]; } interface BulkUpdateLocalDeliveryOptionResponse { localDeliveryOptions?: LocalDeliveryOption[]; errors?: LocalDeliveryOptionError[]; } interface BulkDeleteLocalDeliveryOptionRequest { ids: string[]; } interface BulkDeleteLocalDeliveryOptionResponse { } interface Empty$6 { } interface DomainEvent$a extends DomainEventBodyOneOf$a { createdEvent?: EntityCreatedEvent$a; updatedEvent?: EntityUpdatedEvent$a; deletedEvent?: EntityDeletedEvent$a; actionEvent?: ActionEvent$a; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$a { createdEvent?: EntityCreatedEvent$a; updatedEvent?: EntityUpdatedEvent$a; deletedEvent?: EntityDeletedEvent$a; actionEvent?: ActionEvent$a; } interface EntityCreatedEvent$a { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$a; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$a { deletedDate?: Date | null; } interface EntityUpdatedEvent$a { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$a { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$a { bodyAsJson?: string; } interface AddDeliveryRegionRequest$1 { deliveryRegionId: string; localDeliveryOptionId: string; /** Revision of the PickupLocation */ revision?: string | null; } interface AddDeliveryRegionResponse$1 { localDeliveryOption?: LocalDeliveryOption; } interface RemoveDeliveryRegionRequest$1 { deliveryRegionId: string; localDeliveryOptionId: string; /** Revision of the PickupLocation */ revision?: string | null; } interface RemoveDeliveryRegionResponse$1 { localDeliveryOption?: LocalDeliveryOption; } interface MessageEnvelope$9 { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$a; /** Stringify payload. */ data?: string; } interface IdentificationData$a extends IdentificationDataIdOneOf$a { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$9; } /** @oneof */ interface IdentificationDataIdOneOf$a { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$9 { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @public * @documentationMaturity preview * @requiredField localDeliveryOption * @requiredField localDeliveryOption.areaName * @requiredField localDeliveryOption.radiusConfig.address * @requiredField localDeliveryOption.radiusConfig.address.formatted * @requiredField localDeliveryOption.radiusConfig.address.location * @requiredField localDeliveryOption.rate * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.handlingDays * @permissionId ECOM.LOCAL_DELIVERY_OPTION_CREATE * @adminMethod */ function createLocalDeliveryOption(localDeliveryOption: LocalDeliveryOption): Promise; /** @public * @documentationMaturity preview * @requiredField localDeliveryOptionId * @permissionId ECOM.LOCAL_DELIVERY_OPTION_READ * @adminMethod */ function getLocalDeliveryOption(localDeliveryOptionId: string, options?: GetLocalDeliveryOptionOptions): Promise; interface GetLocalDeliveryOptionOptions { /** * @deprecated * @targetRemovalDate 2025-01-12 */ _id?: string; } /** @public * @documentationMaturity preview * @requiredField externalId * @permissionId ECOM.LOCAL_DELIVERY_OPTION_READ * @adminMethod * @deprecated method is deprecated due to the fact that external_id is deprecated * @replacedBy ListLocalDeliveryOptionsByDeliveryRegion * @targetRemovalDate 2024-11-01 */ function listLocalDeliveryOptions(externalId: string): Promise; /** * Retrieves a list of local delivery options, given the provided paging, filtering, and sorting. * * For field support for filters and sorting, see [Local Delivery: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-management/payments/tax/tax-regions/supported-filters-and-sorting). * * To learn about working with _Query_ endpoints, see * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language), * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging), * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection). * @public * @documentationMaturity preview * @permissionId ECOM.LOCAL_DELIVERY_OPTION_READ * @adminMethod */ function queryLocalDeliveryOptions(): LocalDeliveryOptionsQueryBuilder; interface QueryCursorResult$8 { cursors: Cursors$8; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface LocalDeliveryOptionsQueryResult extends QueryCursorResult$8 { items: LocalDeliveryOption[]; query: LocalDeliveryOptionsQueryBuilder; next: () => Promise; prev: () => Promise; } interface LocalDeliveryOptionsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'areaName' | 'estimatedDeliveryTime' | 'deliveryRegionIds', value: any) => LocalDeliveryOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'areaName' | 'estimatedDeliveryTime' | 'deliveryRegionIds', value: any) => LocalDeliveryOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'areaName' | 'estimatedDeliveryTime', value: string) => LocalDeliveryOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'areaName' | 'estimatedDeliveryTime' | 'deliveryRegionIds', value: any[]) => LocalDeliveryOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasAll: (propertyName: 'deliveryRegionIds', value: any[]) => LocalDeliveryOptionsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'areaName' | 'estimatedDeliveryTime' | 'deliveryRegionIds', value: any) => LocalDeliveryOptionsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'areaName' | 'estimatedDeliveryTime' | 'deliveryRegionIds', value: boolean) => LocalDeliveryOptionsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => LocalDeliveryOptionsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => LocalDeliveryOptionsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** @param _id - LocalDeliveryOptionId - unique identifier of local delivery option * @public * @documentationMaturity preview * @requiredField _id * @requiredField localDeliveryOption * @requiredField localDeliveryOption.radiusConfig.address * @requiredField localDeliveryOption.radiusConfig.address.formatted * @requiredField localDeliveryOption.radiusConfig.address.location * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.friday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.monday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.saturday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.sunday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.thursday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.tuesday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.enabledForDelivery * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.from * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.from.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.from.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.to * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.to.hours * @requiredField localDeliveryOption.scheduledDeliveryConfig.days.wednesday.timeSlots.to.minutes * @requiredField localDeliveryOption.scheduledDeliveryConfig.handlingDays * @permissionId ECOM.LOCAL_DELIVERY_OPTION_UPDATE * @adminMethod */ function updateLocalDeliveryOption(_id: string | null, localDeliveryOption: UpdateLocalDeliveryOption, options?: UpdateLocalDeliveryOptionOptions): Promise; interface UpdateLocalDeliveryOption { zipConfig?: ZipCodeConfig; radiusConfig?: RadiusConfig; customAreaConfig?: CustomAreaConfig; /** * LocalDeliveryOptionId - unique identifier of local delivery option * @readonly */ _id?: string | null; /** * External id of shipping rule which LocalDeliveryOption is linked to. Most commonly it would be shippingRuleId from WixStores * @internal * @deprecated External id of shipping rule which LocalDeliveryOption is linked to. Most commonly it would be shippingRuleId from WixStores * @targetRemovalDate 2025-01-12 */ externalId?: string | null; /** Area name of Local Delivery Option */ areaName?: string | null; /** * Flat price of local delivery * @deprecated Flat price of local delivery * @targetRemovalDate 2025-01-12 */ rate?: string | null; /** Estimated delivery time description text */ estimatedDeliveryTime?: string | null; /** * Minimum order total to be eligible for free delivery * @deprecated Minimum order total to be eligible for free delivery * @targetRemovalDate 2025-01-12 */ minimumFreeDeliveryOrderAmount?: number | null; /** List of countries with subdivisions */ destinations?: Destination[]; /** * Database revision of LocalDeliveryOption entity. Incremented on each modification * @readonly */ revision?: string | null; scheduledDeliveryConfig?: ScheduledDelivery; /** at runtime for a given shipment input, up to one rate (price) should be returned in an option. If more than one rate is valid then we return the lowest one. */ rates?: ConditionalRates$2[]; /** * Date and time the LocalDeliveryOption was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the LocalDeliveryOption was last updated. * @readonly */ _updatedDate?: Date | null; /** This local delivery is active for the following delivery regions. */ deliveryRegionIds?: string[]; } interface UpdateLocalDeliveryOptionOptions { /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } /** @public * @documentationMaturity preview * @requiredField localDeliveryOptionId * @permissionId ECOM.LOCAL_DELIVERY_OPTION_DELETE * @adminMethod */ function deleteLocalDeliveryOption(localDeliveryOptionId: string, options?: DeleteLocalDeliveryOptionOptions): Promise; interface DeleteLocalDeliveryOptionOptions { /** * @deprecated * @targetRemovalDate 2025-01-12 */ _id?: string; } /** @public * @documentationMaturity preview * @requiredField localDeliveryOptions * @requiredField localDeliveryOptions.radiusConfig.address * @requiredField localDeliveryOptions.radiusConfig.address.formatted * @requiredField localDeliveryOptions.radiusConfig.address.location * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.handlingDays * @permissionId ECOM.LOCAL_DELIVERY_OPTION_CREATE * @adminMethod */ function bulkCreateLocalDeliveryOption(localDeliveryOptions: LocalDeliveryOption[]): Promise; /** @public * @documentationMaturity preview * @requiredField localDeliveryOptions * @requiredField localDeliveryOptions.radiusConfig.address * @requiredField localDeliveryOptions.radiusConfig.address.formatted * @requiredField localDeliveryOptions.radiusConfig.address.location * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.friday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.monday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.saturday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.sunday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.thursday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.tuesday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.enabledForDelivery * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.from * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.from.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.from.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.to * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.to.hours * @requiredField localDeliveryOptions.scheduledDeliveryConfig.days.wednesday.timeSlots.to.minutes * @requiredField localDeliveryOptions.scheduledDeliveryConfig.handlingDays * @permissionId ECOM.LOCAL_DELIVERY_OPTION_UPDATE * @adminMethod */ function bulkUpdateLocalDeliveryOption(localDeliveryOptions: LocalDeliveryOption[]): Promise; /** @public * @documentationMaturity preview * @requiredField ids * @permissionId ECOM.LOCAL_DELIVERY_OPTION_DELETE * @adminMethod */ function bulkDeleteLocalDeliveryOption(ids: string[]): Promise; /** @public * @documentationMaturity preview * @requiredField deliveryRegionId * @requiredField options.localDeliveryOptionId * @permissionId ECOM.LOCAL_DELIVERY_OPTION_UPDATE * @adminMethod */ function addDeliveryRegion$1(deliveryRegionId: string, options?: AddDeliveryRegionOptions$1): Promise; interface AddDeliveryRegionOptions$1 { localDeliveryOptionId: string; /** Revision of the PickupLocation */ revision?: string | null; } /** @public * @documentationMaturity preview * @requiredField deliveryRegionId * @requiredField options.localDeliveryOptionId * @permissionId ECOM.LOCAL_DELIVERY_OPTION_UPDATE * @adminMethod */ function removeDeliveryRegion$1(deliveryRegionId: string, options?: RemoveDeliveryRegionOptions$1): Promise; interface RemoveDeliveryRegionOptions$1 { localDeliveryOptionId: string; /** Revision of the PickupLocation */ revision?: string | null; } type ecomV1LocalDeliveryOption_universal_d_LocalDeliveryOption = LocalDeliveryOption; type ecomV1LocalDeliveryOption_universal_d_LocalDeliveryOptionConfigOneOf = LocalDeliveryOptionConfigOneOf; type ecomV1LocalDeliveryOption_universal_d_Destination = Destination; type ecomV1LocalDeliveryOption_universal_d_ZipCodeConfig = ZipCodeConfig; type ecomV1LocalDeliveryOption_universal_d_RadiusConfig = RadiusConfig; type ecomV1LocalDeliveryOption_universal_d_LocalDeliveryAddress = LocalDeliveryAddress; type ecomV1LocalDeliveryOption_universal_d_LengthUnit = LengthUnit; const ecomV1LocalDeliveryOption_universal_d_LengthUnit: typeof LengthUnit; type ecomV1LocalDeliveryOption_universal_d_CustomAreaConfig = CustomAreaConfig; type ecomV1LocalDeliveryOption_universal_d_ScheduledDelivery = ScheduledDelivery; type ecomV1LocalDeliveryOption_universal_d_Days = Days; type ecomV1LocalDeliveryOption_universal_d_DaySlot = DaySlot; type ecomV1LocalDeliveryOption_universal_d_TimeSlot = TimeSlot; type ecomV1LocalDeliveryOption_universal_d_TimePoint = TimePoint; type ecomV1LocalDeliveryOption_universal_d_TimeWindow = TimeWindow; type ecomV1LocalDeliveryOption_universal_d_DayOfWeek = DayOfWeek; const ecomV1LocalDeliveryOption_universal_d_DayOfWeek: typeof DayOfWeek; type ecomV1LocalDeliveryOption_universal_d_TimeOfDay = TimeOfDay; type ecomV1LocalDeliveryOption_universal_d_CreateLocalDeliveryOptionRequest = CreateLocalDeliveryOptionRequest; type ecomV1LocalDeliveryOption_universal_d_CreateLocalDeliveryOptionResponse = CreateLocalDeliveryOptionResponse; type ecomV1LocalDeliveryOption_universal_d_GetLocalDeliveryOptionRequest = GetLocalDeliveryOptionRequest; type ecomV1LocalDeliveryOption_universal_d_GetLocalDeliveryOptionResponse = GetLocalDeliveryOptionResponse; type ecomV1LocalDeliveryOption_universal_d_ListLocalDeliveryOptionsRequest = ListLocalDeliveryOptionsRequest; type ecomV1LocalDeliveryOption_universal_d_ListLocalDeliveryOptionsResponse = ListLocalDeliveryOptionsResponse; type ecomV1LocalDeliveryOption_universal_d_QueryLocalDeliveryOptionsRequest = QueryLocalDeliveryOptionsRequest; type ecomV1LocalDeliveryOption_universal_d_QueryLocalDeliveryOptionsResponse = QueryLocalDeliveryOptionsResponse; type ecomV1LocalDeliveryOption_universal_d_UpdateLocalDeliveryOptionRequest = UpdateLocalDeliveryOptionRequest; type ecomV1LocalDeliveryOption_universal_d_UpdateLocalDeliveryOptionResponse = UpdateLocalDeliveryOptionResponse; type ecomV1LocalDeliveryOption_universal_d_DeleteLocalDeliveryOptionRequest = DeleteLocalDeliveryOptionRequest; type ecomV1LocalDeliveryOption_universal_d_DeleteLocalDeliveryOptionResponse = DeleteLocalDeliveryOptionResponse; type ecomV1LocalDeliveryOption_universal_d_BulkCreateLocalDeliveryOptionRequest = BulkCreateLocalDeliveryOptionRequest; type ecomV1LocalDeliveryOption_universal_d_BulkCreateLocalDeliveryOptionResponse = BulkCreateLocalDeliveryOptionResponse; type ecomV1LocalDeliveryOption_universal_d_LocalDeliveryOptionError = LocalDeliveryOptionError; type ecomV1LocalDeliveryOption_universal_d_BulkUpdateLocalDeliveryOptionRequest = BulkUpdateLocalDeliveryOptionRequest; type ecomV1LocalDeliveryOption_universal_d_BulkUpdateLocalDeliveryOptionResponse = BulkUpdateLocalDeliveryOptionResponse; type ecomV1LocalDeliveryOption_universal_d_BulkDeleteLocalDeliveryOptionRequest = BulkDeleteLocalDeliveryOptionRequest; type ecomV1LocalDeliveryOption_universal_d_BulkDeleteLocalDeliveryOptionResponse = BulkDeleteLocalDeliveryOptionResponse; const ecomV1LocalDeliveryOption_universal_d_createLocalDeliveryOption: typeof createLocalDeliveryOption; const ecomV1LocalDeliveryOption_universal_d_getLocalDeliveryOption: typeof getLocalDeliveryOption; type ecomV1LocalDeliveryOption_universal_d_GetLocalDeliveryOptionOptions = GetLocalDeliveryOptionOptions; const ecomV1LocalDeliveryOption_universal_d_listLocalDeliveryOptions: typeof listLocalDeliveryOptions; const ecomV1LocalDeliveryOption_universal_d_queryLocalDeliveryOptions: typeof queryLocalDeliveryOptions; type ecomV1LocalDeliveryOption_universal_d_LocalDeliveryOptionsQueryResult = LocalDeliveryOptionsQueryResult; type ecomV1LocalDeliveryOption_universal_d_LocalDeliveryOptionsQueryBuilder = LocalDeliveryOptionsQueryBuilder; const ecomV1LocalDeliveryOption_universal_d_updateLocalDeliveryOption: typeof updateLocalDeliveryOption; type ecomV1LocalDeliveryOption_universal_d_UpdateLocalDeliveryOption = UpdateLocalDeliveryOption; type ecomV1LocalDeliveryOption_universal_d_UpdateLocalDeliveryOptionOptions = UpdateLocalDeliveryOptionOptions; const ecomV1LocalDeliveryOption_universal_d_deleteLocalDeliveryOption: typeof deleteLocalDeliveryOption; type ecomV1LocalDeliveryOption_universal_d_DeleteLocalDeliveryOptionOptions = DeleteLocalDeliveryOptionOptions; const ecomV1LocalDeliveryOption_universal_d_bulkCreateLocalDeliveryOption: typeof bulkCreateLocalDeliveryOption; const ecomV1LocalDeliveryOption_universal_d_bulkUpdateLocalDeliveryOption: typeof bulkUpdateLocalDeliveryOption; const ecomV1LocalDeliveryOption_universal_d_bulkDeleteLocalDeliveryOption: typeof bulkDeleteLocalDeliveryOption; namespace ecomV1LocalDeliveryOption_universal_d { export { ecomV1LocalDeliveryOption_universal_d_LocalDeliveryOption as LocalDeliveryOption, ecomV1LocalDeliveryOption_universal_d_LocalDeliveryOptionConfigOneOf as LocalDeliveryOptionConfigOneOf, ecomV1LocalDeliveryOption_universal_d_Destination as Destination, ecomV1LocalDeliveryOption_universal_d_ZipCodeConfig as ZipCodeConfig, ecomV1LocalDeliveryOption_universal_d_RadiusConfig as RadiusConfig, ecomV1LocalDeliveryOption_universal_d_LocalDeliveryAddress as LocalDeliveryAddress, AddressLocation$4 as AddressLocation, ecomV1LocalDeliveryOption_universal_d_LengthUnit as LengthUnit, ecomV1LocalDeliveryOption_universal_d_CustomAreaConfig as CustomAreaConfig, ecomV1LocalDeliveryOption_universal_d_ScheduledDelivery as ScheduledDelivery, ecomV1LocalDeliveryOption_universal_d_Days as Days, ecomV1LocalDeliveryOption_universal_d_DaySlot as DaySlot, ecomV1LocalDeliveryOption_universal_d_TimeSlot as TimeSlot, ecomV1LocalDeliveryOption_universal_d_TimePoint as TimePoint, ecomV1LocalDeliveryOption_universal_d_TimeWindow as TimeWindow, ecomV1LocalDeliveryOption_universal_d_DayOfWeek as DayOfWeek, ecomV1LocalDeliveryOption_universal_d_TimeOfDay as TimeOfDay, ConditionalRates$2 as ConditionalRates, Condition$2 as Condition, ConditionType$2 as ConditionType, LogicalOperator$2 as LogicalOperator, ecomV1LocalDeliveryOption_universal_d_CreateLocalDeliveryOptionRequest as CreateLocalDeliveryOptionRequest, ecomV1LocalDeliveryOption_universal_d_CreateLocalDeliveryOptionResponse as CreateLocalDeliveryOptionResponse, ecomV1LocalDeliveryOption_universal_d_GetLocalDeliveryOptionRequest as GetLocalDeliveryOptionRequest, ecomV1LocalDeliveryOption_universal_d_GetLocalDeliveryOptionResponse as GetLocalDeliveryOptionResponse, ecomV1LocalDeliveryOption_universal_d_ListLocalDeliveryOptionsRequest as ListLocalDeliveryOptionsRequest, ecomV1LocalDeliveryOption_universal_d_ListLocalDeliveryOptionsResponse as ListLocalDeliveryOptionsResponse, ecomV1LocalDeliveryOption_universal_d_QueryLocalDeliveryOptionsRequest as QueryLocalDeliveryOptionsRequest, QueryV2$2 as QueryV2, QueryV2PagingMethodOneOf$2 as QueryV2PagingMethodOneOf, Sorting$8 as Sorting, SortOrder$8 as SortOrder, Paging$2 as Paging, CursorPaging$8 as CursorPaging, ecomV1LocalDeliveryOption_universal_d_QueryLocalDeliveryOptionsResponse as QueryLocalDeliveryOptionsResponse, CursorPagingMetadata$7 as CursorPagingMetadata, Cursors$8 as Cursors, ecomV1LocalDeliveryOption_universal_d_UpdateLocalDeliveryOptionRequest as UpdateLocalDeliveryOptionRequest, ecomV1LocalDeliveryOption_universal_d_UpdateLocalDeliveryOptionResponse as UpdateLocalDeliveryOptionResponse, ecomV1LocalDeliveryOption_universal_d_DeleteLocalDeliveryOptionRequest as DeleteLocalDeliveryOptionRequest, ecomV1LocalDeliveryOption_universal_d_DeleteLocalDeliveryOptionResponse as DeleteLocalDeliveryOptionResponse, ecomV1LocalDeliveryOption_universal_d_BulkCreateLocalDeliveryOptionRequest as BulkCreateLocalDeliveryOptionRequest, ecomV1LocalDeliveryOption_universal_d_BulkCreateLocalDeliveryOptionResponse as BulkCreateLocalDeliveryOptionResponse, ecomV1LocalDeliveryOption_universal_d_LocalDeliveryOptionError as LocalDeliveryOptionError, ecomV1LocalDeliveryOption_universal_d_BulkUpdateLocalDeliveryOptionRequest as BulkUpdateLocalDeliveryOptionRequest, ecomV1LocalDeliveryOption_universal_d_BulkUpdateLocalDeliveryOptionResponse as BulkUpdateLocalDeliveryOptionResponse, ecomV1LocalDeliveryOption_universal_d_BulkDeleteLocalDeliveryOptionRequest as BulkDeleteLocalDeliveryOptionRequest, ecomV1LocalDeliveryOption_universal_d_BulkDeleteLocalDeliveryOptionResponse as BulkDeleteLocalDeliveryOptionResponse, Empty$6 as Empty, DomainEvent$a as DomainEvent, DomainEventBodyOneOf$a as DomainEventBodyOneOf, EntityCreatedEvent$a as EntityCreatedEvent, RestoreInfo$a as RestoreInfo, EntityUpdatedEvent$a as EntityUpdatedEvent, EntityDeletedEvent$a as EntityDeletedEvent, ActionEvent$a as ActionEvent, AddDeliveryRegionRequest$1 as AddDeliveryRegionRequest, AddDeliveryRegionResponse$1 as AddDeliveryRegionResponse, RemoveDeliveryRegionRequest$1 as RemoveDeliveryRegionRequest, RemoveDeliveryRegionResponse$1 as RemoveDeliveryRegionResponse, MessageEnvelope$9 as MessageEnvelope, IdentificationData$a as IdentificationData, IdentificationDataIdOneOf$a as IdentificationDataIdOneOf, WebhookIdentityType$9 as WebhookIdentityType, ecomV1LocalDeliveryOption_universal_d_createLocalDeliveryOption as createLocalDeliveryOption, ecomV1LocalDeliveryOption_universal_d_getLocalDeliveryOption as getLocalDeliveryOption, ecomV1LocalDeliveryOption_universal_d_GetLocalDeliveryOptionOptions as GetLocalDeliveryOptionOptions, ecomV1LocalDeliveryOption_universal_d_listLocalDeliveryOptions as listLocalDeliveryOptions, ecomV1LocalDeliveryOption_universal_d_queryLocalDeliveryOptions as queryLocalDeliveryOptions, ecomV1LocalDeliveryOption_universal_d_LocalDeliveryOptionsQueryResult as LocalDeliveryOptionsQueryResult, ecomV1LocalDeliveryOption_universal_d_LocalDeliveryOptionsQueryBuilder as LocalDeliveryOptionsQueryBuilder, ecomV1LocalDeliveryOption_universal_d_updateLocalDeliveryOption as updateLocalDeliveryOption, ecomV1LocalDeliveryOption_universal_d_UpdateLocalDeliveryOption as UpdateLocalDeliveryOption, ecomV1LocalDeliveryOption_universal_d_UpdateLocalDeliveryOptionOptions as UpdateLocalDeliveryOptionOptions, ecomV1LocalDeliveryOption_universal_d_deleteLocalDeliveryOption as deleteLocalDeliveryOption, ecomV1LocalDeliveryOption_universal_d_DeleteLocalDeliveryOptionOptions as DeleteLocalDeliveryOptionOptions, ecomV1LocalDeliveryOption_universal_d_bulkCreateLocalDeliveryOption as bulkCreateLocalDeliveryOption, ecomV1LocalDeliveryOption_universal_d_bulkUpdateLocalDeliveryOption as bulkUpdateLocalDeliveryOption, ecomV1LocalDeliveryOption_universal_d_bulkDeleteLocalDeliveryOption as bulkDeleteLocalDeliveryOption, addDeliveryRegion$1 as addDeliveryRegion, AddDeliveryRegionOptions$1 as AddDeliveryRegionOptions, removeDeliveryRegion$1 as removeDeliveryRegion, RemoveDeliveryRegionOptions$1 as RemoveDeliveryRegionOptions, }; } interface Order$1 { /** * Order ID. * @readonly */ _id?: string | null; /** * Order number displayed in the site owner's dashboard (auto-generated). * @readonly */ number?: string; /** * Date and time the order was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the order was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _updatedDate?: Date | null; /** * Order line items. * @readonly */ lineItems?: OrderLineItem[]; /** Buyer information. */ buyerInfo?: BuyerInfo$1; /** * Order payment status. * + `NOT_PAID` - This can be an order made online, but not yet paid. In such cases `order.status` will be `INITIALIZED`. * + This status also applies when an offline order needs to be manually marked as paid. In such cases `order.status` will be `APPROVED`. * + `PAID` - All payments associated with this order are paid. For online payments: [`payment.regularPaymentDetails.status: APPROVED`](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-transactions/order-transactions-object). For gift cards: [`payment.giftCardPaymentDetails.voided: false`](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-transactions/order-transactions-object). * + `PARTIALLY_REFUNDED` - Order was refunded, but refund amount is less than order total price. * + `FULLY_REFUNDED` - Order fully refunded. Refund amount equals total price. * + `PENDING` - Payments received but not yet confirmed by the payment provider. * + `PARTIALLY_PAID` - At least one payment was received and approved, covering less than total price amount. */ paymentStatus?: PaymentStatus$1; /** * Order fulfillment status. * @readonly */ fulfillmentStatus?: FulfillmentStatus$1; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string | null; /** Weight measurement unit - defaults to site's weight unit. */ weightUnit?: WeightUnit$3; /** Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format. */ currency?: string | null; /** Whether tax is included in line item prices. */ taxIncludedInPrices?: boolean; /** * Site language in which original values are shown. * @readonly */ siteLanguage?: string | null; /** * Order price summary. * @readonly */ priceSummary?: PriceSummary$1; /** Billing address and contact details. */ billingInfo?: AddressWithContact; /** Shipping info and selected shipping option details. */ shippingInfo?: ShippingInformation$1; /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string | null; /** * Order status. * + `INITIALIZED`: Order created, but not yet approved or canceled. * + `APPROVED`: Order approved. This happens when either an online payment is received **or** when `order.priceSummary.total = 0` (a zero-total order). Offline orders (cash payment) are automatically approved. * + `CANCELED`: Order canceled by the user. */ status?: OrderStatus; /** Whether order is archived. */ archived?: boolean | null; /** * Tax summary. * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * @deprecated Tax summary. * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxSummary?: TaxSummary$1; /** Tax information. */ taxInfo?: OrderTaxInfo; /** Applied discounts. */ appliedDiscounts?: AppliedDiscount$1[]; /** * Order activities. * @readonly */ activities?: Activity$1[]; /** Order attribution source. */ attributionSource?: AttributionSource; /** * ID of the order's initiator. * @readonly */ createdBy?: CreatedBy; /** Information about the sales channel that submitted this order. */ channelInfo?: ChannelInfo$1; /** Whether a human has seen the order. Set when an order is clicked on in the dashboard. */ seenByAHuman?: boolean | null; /** Checkout ID. */ checkoutId?: string | null; /** Custom fields. */ customFields?: CustomField$1[]; /** * Cart ID - required by TYP OOI for legacy orders. * @internal */ cartId?: string | null; /** * Private API flag that allows using read-only "id" during order creation. * @internal */ isInternalOrderCreate?: boolean; /** * Pay now price summary. Part of price_summary that must be payed at checkout * @internal * @readonly */ payNow?: PriceSummary$1; /** * Balance summary. * @readonly */ balanceSummary?: BalanceSummary; /** Additional fees applied to the order. */ additionalFees?: AdditionalFee$1[]; /** * Custom string status values aggregated from every fulfillment entity associated with current order * @internal * @readonly */ fulfillmentStatusesAggregate?: FulfillmentStatusesAggregate; /** * Custom field data for the order object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields$4; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; /** * Order recipient address and contact details. * * This field may differ from the address in `shippingInfo.logistics` when: * + The chosen shipping option is pickup point or store pickup. * + No shipping option is selected. */ recipientInfo?: AddressWithContact; /** * Tag ids collections associated with current entity. private_tags requires separate permissions to be accessible and modifiable. * @internal */ tags?: Tags; /** * Date and time the order was originally purchased in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * Used for migration from external systems. */ purchasedDate?: Date | null; /** * Order Location * @internal */ businessLocation?: Location; } interface OrderLineItem { /** Line item ID. */ _id?: string; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: ProductName; /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$3; /** Line item quantity. */ quantity?: number; /** * Total discount for this line item's entire quantity. * @readonly */ totalDiscount?: Price$3; /** Line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: DescriptionLine[]; /** Line item image. */ image?: string; /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */ physicalProperties?: PhysicalProperties$2; /** Item type. Either a preset type or custom. */ itemType?: ItemType$1; /** * Fulfiller ID. Field is empty when the line item is self-fulfilled. * * To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://www.wix.com/velo/reference/wix-ecom-backend/orderfulfillments/listfulfillmentsforsingleorder). */ fulfillerId?: string | null; /** Number of items that were refunded. */ refundQuantity?: number | null; /** Number of items restocked. */ restockQuantity?: number | null; /** Line item price after line item discounts for display purposes. */ price?: Price$3; /** * Line item price before line item discounts for display purposes. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: Price$3; /** * Total price after discounts, and before tax. * @readonly */ totalPriceBeforeTax?: Price$3; /** * Total price after all discounts and tax. * @readonly */ totalPriceAfterTax?: Price$3; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only. */ paymentOption?: PaymentOptionType$1; /** * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @deprecated Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxDetails?: ItemTaxFullDetails$1; /** Represents all the relevant tax details for a specific line item. */ taxInfo?: LineItemTaxInfo; /** Digital file identifier, relevant only for items with type DIGITAL. */ digitalFile?: DigitalFile$1; /** Subscription info. */ subscriptionInfo?: SubscriptionInfo$1; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription; /** * Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`. * @readonly */ depositAmount?: Price$3; /** * The Item's Delivery Profile Id * @internal */ deliveryProfileId?: string | null; /** @internal */ shippingGroupId?: string | null; /** * Source locations for this line item. The location's total quantity must not exceed the line item quantity. * @internal */ locations?: LocationAndQuantity[]; /** * Total price **after** catalog discounts and line item discounts. * @internal */ lineItemPrice?: Price$3; /** * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin. * @internal * @readonly */ customLineItem?: boolean | null; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field has the same value as `catalogReference.catalogItemId`. * @internal * @readonly */ rootCatalogItemId?: string | null; /** * Address used for tax calculation. * @internal */ taxableAddress?: TaxableAddress$1; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; /** * Whether the price is not yet defined, and will be updated after the order is created. * * Default: `false` * @internal */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * * Default: `false` * @internal */ fixedQuantity?: boolean; /** * Custom extended fields for the line item object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. * @internal */ extendedFields?: ExtendedFields$4; } interface ProductName { /** * __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). * * Min: 1 character. * Max: 200 characters. */ original?: string; /** * Item name translated into the buyer's language. * * Min: 1 character. * Max: 400 characters. * Default: Same as `original`. */ translated?: string | null; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$3 { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. * * Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from your Wix Stores catalog, learn more about [eCommerce integration](https://www.wix.com/velo/reference/wix-stores-backend/ecommerce-integration). */ options?: Record | null; } interface Price$3 { /** Amount. */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf { /** Description line plain text value. */ plainText?: PlainTextValue; /** Description line color value. */ colorInfo?: Color; /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue; /** * Description line color. * @internal * @deprecated */ color?: string; /** Description line name. */ name?: DescriptionLineName; /** * Description line type. * @internal * @deprecated */ lineType?: DescriptionLineType; } /** @oneof */ interface DescriptionLineValueOneOf { /** Description line plain text value. */ plainText?: PlainTextValue; /** Description line color value. */ colorInfo?: Color; } /** @oneof */ interface DescriptionLineDescriptionLineValueOneOf { /** * Description line plain text value. * @internal * @deprecated */ plainTextValue?: PlainTextValue; /** * Description line color. * @internal * @deprecated */ color?: string; } interface DescriptionLineName { /** Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface PlainTextValue { /** Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line plain text value translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface Color { /** Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Description line color name translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; /** HEX or RGB color code for display. */ code?: string | null; } enum DescriptionLineType { /** Unrecognized type. */ UNRECOGNISED = "UNRECOGNISED", /** Plain text type. */ PLAIN_TEXT = "PLAIN_TEXT", /** Color type. */ COLOR = "COLOR" } interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } interface PhysicalProperties$2 { /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */ weight?: number | null; /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string | null; /** Whether this line item is shippable. */ shippable?: boolean; } interface ItemType$1 extends ItemTypeItemTypeDataOneOf$1 { /** Preset item type. */ preset?: ItemTypeItemType$1; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } /** @oneof */ interface ItemTypeItemTypeDataOneOf$1 { /** Preset item type. */ preset?: ItemTypeItemType$1; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } enum ItemTypeItemType$1 { UNRECOGNISED = "UNRECOGNISED", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL", GIFT_CARD = "GIFT_CARD", SERVICE = "SERVICE" } /** Type of selected payment option for catalog item */ enum PaymentOptionType$1 { /** The entire payment for this item happens as part of the checkout. */ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE", /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE", /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */ MEMBERSHIP = "MEMBERSHIP", /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */ DEPOSIT_ONLINE = "DEPOSIT_ONLINE", /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE" } interface ItemTaxFullDetails$1 { /** Taxable amount of this line item. */ taxableAmount?: Price$3; /** * ID of the item's tax group, if specified. * @internal */ taxGroupId?: string | null; /** Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`. */ taxRate?: string; /** The calculated tax, based on the `taxableAmount` and `taxRate`. */ totalTax?: Price$3; } interface LineItemTaxInfo { /** Calculated tax, based on `taxable_amount` and `tax_rate`. */ taxAmount?: Price$3; /** Amount for which tax is calculated. */ taxableAmount?: Price$3; /** Tax rate %, as a decimal point. */ taxRate?: string | null; /** * Tax group ID. * Learn more about [Tax Groups](https://dev.wix.com/docs/rest/business-management/payments/tax/tax-groups/introduction). */ taxGroupId?: string | null; /** Indicates whether the price already includes tax. */ taxIncludedInPrice?: boolean; /** Tax information for a line item. */ taxBreakdown?: LineItemTaxBreakdown[]; } /** * TaxBreakdown represents tax information for a line item. * It holds the tax amount and the tax rate for each tax authority that apply on the line item. */ interface LineItemTaxBreakdown { /** Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec". */ jurisdiction?: string | null; /** Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000. */ rate?: string | null; /** Amount of tax calculated for this line item. */ taxAmount?: Price$3; /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */ taxType?: string | null; /** * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. * This name should be explicit enough to allow the merchant to understand what tax was calculated. */ taxName?: string | null; /** Type of jurisdiction that taxes were calculated for. */ jurisdictionType?: JurisdictionType$1; /** Non-taxable amount of the line item price. */ nonTaxableAmount?: Price$3; /** Taxable amount of the line item price. */ taxableAmount?: Price$3; } /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ enum JurisdictionType$1 { UNDEFINED = "UNDEFINED", COUNTRY = "COUNTRY", STATE = "STATE", COUNTY = "COUNTY", CITY = "CITY", SPECIAL = "SPECIAL" } interface DigitalFile$1 { /** ID of the secure file in media. */ fileId?: string; /** Link will exist after the digital links have been generated on the order. */ link?: string | null; /** * Link expiration time and date. * @readonly */ expirationDate?: Date | null; } interface SubscriptionInfo$1 { /** Subscription ID. */ _id?: string | null; /** Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`. */ cycleNumber?: number; /** Subscription option title. For example, `"Monthly coffee Subscription"`. */ subscriptionOptionTitle?: string; /** Subscription option description. For example, `"1kg of selected coffee, once a month"`. */ subscriptionOptionDescription?: string | null; /** Subscription detailed information. */ subscriptionSettings?: SubscriptionSettings$2; } interface SubscriptionSettings$2 { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequency$2; /** Interval of recurring payment. */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number | null; /** * Whether to allow the customer to cancel the subscription. * @internal */ enableCustomerCancellation?: boolean; } /** Frequency unit of recurring payment */ enum SubscriptionFrequency$2 { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } interface PriceDescription { /** __Required.__ Price description in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions#request-envelope). */ original?: string; /** * Price description translated into the buyer's language. * * Default: Same as `original`. */ translated?: string | null; } interface LocationAndQuantity { /** Location id in the associated owner app. */ _id?: string; /** Location owner app, if not provided then the site business info locations will be used. */ appId?: string | null; /** Quantity for specific location. */ quantity?: number; } interface TaxableAddress$1 extends TaxableAddressTaxableAddressDataOneOf$1 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$1; } /** @oneof */ interface TaxableAddressTaxableAddressDataOneOf$1 { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType$1; } enum TaxableAddressType$1 { UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS", BUSINESS = "BUSINESS", BILLING = "BILLING", SHIPPING = "SHIPPING" } interface ExtendedFields$4 { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } /** Buyer Info */ interface BuyerInfo$1 extends BuyerInfoIdOneOf { /** Visitor ID (if site visitor is not a member). */ visitorId?: string; /** Member ID (if site visitor is a site member). */ memberId?: string; /** Contact ID. Auto-created if one does not yet exist. For more information, see [Contacts API](https://www.wix.com/velo/reference/wix-crm-backend/contacts/introduction). */ contactId?: string | null; /** Buyer email address. */ email?: string | null; } /** @oneof */ interface BuyerInfoIdOneOf { /** Visitor ID (if site visitor is not a member). */ visitorId?: string; /** Member ID (if site visitor is a site member). */ memberId?: string; } enum PaymentStatus$1 { UNSPECIFIED = "UNSPECIFIED", /** Order is not paid */ NOT_PAID = "NOT_PAID", /** Order is paid */ PAID = "PAID", /** Order was refunded, refund amount less than order total price */ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", /** Full order total price was refunded */ FULLY_REFUNDED = "FULLY_REFUNDED", /** Payments received but not yet confirmed by the payment provider */ PENDING = "PENDING", /** At least one payment was received and approved, covering less than total price amount */ PARTIALLY_PAID = "PARTIALLY_PAID", /** * Payment received but not yet confirmed by the payment provider and waits for some user action * @documentationMaturity preview */ PENDING_MERCHANT = "PENDING_MERCHANT", /** * Payment was canceled by user on payment provider side * @documentationMaturity preview */ CANCELED = "CANCELED", /** * Payment was declined by payment provider * @documentationMaturity preview */ DECLINED = "DECLINED" } enum FulfillmentStatus$1 { /** None of the order items are fulfilled or the order was manually marked as unfulfilled. */ NOT_FULFILLED = "NOT_FULFILLED", /** * All of the order items are fulfilled or the order was manually marked as fulfilled. * Orders without shipping info are fulfilled automatically. */ FULFILLED = "FULFILLED", /** Some, but not all, of the order items are fulfilled. */ PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED" } enum WeightUnit$3 { /** Weight unit can't be classified, due to an error */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms */ KG = "KG", /** Pounds */ LB = "LB" } interface PriceSummary$1 { /** Subtotal of all the line items, before discounts and before tax. */ subtotal?: Price$3; /** Total shipping price, before discounts and before tax. */ shipping?: Price$3; /** Total tax on this order. */ tax?: Price$3; /** Total calculated discount value. */ discount?: Price$3; /** * Deprecated - use `total` instead. * @internal * @deprecated */ totalPrice?: Price$3; /** Order’s total price after discounts and tax. */ total?: Price$3; /** * Order's total price including gift card. * @internal * @deprecated */ totalWithGiftCard?: Price$3; /** * Order's total price after without gift card. * @internal * @deprecated */ totalWithoutGiftCard?: Price$3; /** Total price of additional fees before tax. */ totalAdditionalFees?: Price$3; } /** Billing Info and shipping details */ interface AddressWithContact { /** Address. */ address?: Address$5; /** Contact details. */ contactDetails?: FullAddressContactDetails$1; } /** Physical address */ interface Address$5 { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress$4; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** @internal */ location?: AddressLocation$3; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } interface StreetAddress$4 { /** Street number. */ number?: string; /** Street name. */ name?: string; /** * Apartment number. * @internal */ apt?: string; /** * Optional address line 1 * @internal */ formattedAddressLine?: string | null; } interface AddressLocation$3 { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } /** Full contact details for an address */ interface FullAddressContactDetails$1 { /** First name. */ firstName?: string | null; /** Last name. */ lastName?: string | null; /** Phone number. */ phone?: string | null; /** Company name. */ company?: string | null; /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */ vatId?: VatId$2; } interface VatId$2 { /** Customer's tax ID. */ _id?: string; /** * Tax type. * * Supported values: * + `CPF`: for individual tax payers * + `CNPJ`: for corporations */ type?: VatType$2; } /** tax info types */ enum VatType$2 { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } interface ShippingInformation$1 { /** App Def Id of external provider which was a source of shipping info */ carrierId?: string | null; /** Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`. */ code?: string | null; /** * Shipping option title. * For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`. */ title?: string; /** Shipping logistics. */ logistics?: DeliveryLogistics$2; /** Shipping costs. */ cost?: ShippingPrice$1; /** Shipping region. */ region?: ShippingRegion$1; } interface DeliveryLogistics$2 extends DeliveryLogisticsAddressOneOf { /** Shipping address and contact details. */ shippingDestination?: AddressWithContact; /** Pickup details. */ pickupDetails?: PickupDetails$3; /** Expected delivery time in free text. For example, `"3-5 business days"`. */ deliveryTime?: string | null; /** Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`. */ instructions?: string | null; /** * Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @deprecated */ deliverByDate?: Date | null; /** Expected delivery time. */ deliveryTimeSlot?: DeliveryTimeSlot$2; } /** @oneof */ interface DeliveryLogisticsAddressOneOf { /** Shipping address and contact details. */ shippingDestination?: AddressWithContact; /** Pickup details. */ pickupDetails?: PickupDetails$3; } interface PickupDetails$3 { /** Pickup address. */ address?: PickupAddress$1; /** Pickup method */ pickupMethod?: PickupMethod$2; } /** Physical address */ interface PickupAddress$1 { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: StreetAddress$4; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; /** @internal */ location?: AddressLocation$3; } enum PickupMethod$2 { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } interface DeliveryTimeSlot$2 { /** Delivery slot starting time. */ from?: Date | null; /** Delivery slot ending time. */ to?: Date | null; } interface ShippingPrice$1 { /** Shipping price for display purposes. */ price?: Price$3; /** * Total price of shipping after discounts (when relevant), and before tax. * @readonly */ totalPriceBeforeTax?: Price$3; /** * Shipping price after all discounts (if any exist), and after tax. * @readonly */ totalPriceAfterTax?: Price$3; /** Tax details. */ taxDetails?: ItemTaxFullDetails$1; /** * Shipping discount before tax. * @readonly */ discount?: Price$3; } interface ShippingRegion$1 { /** Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. */ name?: string | null; } enum OrderStatus { INITIALIZED = "INITIALIZED", APPROVED = "APPROVED", CANCELED = "CANCELED", /** @documentationMaturity preview */ PENDING = "PENDING", /** @documentationMaturity preview */ REJECTED = "REJECTED" } interface TaxSummary$1 { /** * Total tax. * @readonly */ totalTax?: Price$3; /** * manual tax rate * @internal * @readonly */ manualTaxRate?: string | null; } interface OrderTaxInfo { /** Calculated tax, added from line items. */ totalTax?: Price$3; /** The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. */ taxBreakdown?: OrderTaxBreakdown[]; /** * Manual tax rate * @internal * @readonly */ manualTaxRate?: string | null; /** * Whether the draft order is exempt from tax calculations. * * Default: `false` * @readonly */ taxExempt?: boolean | null; } /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * Tax breakdown is the tax amount split to the tax authorities that applied on the line item. */ interface OrderTaxBreakdown { /** The name of the tax against which this tax amount was calculated. */ taxName?: string; /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */ taxType?: string; /** The name of the jurisdiction in which this tax detail applies. */ jurisdiction?: string; /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ jurisdictionType?: JurisdictionType$1; /** The rate at which this tax detail was calculated. */ rate?: string; /** The sum of all the tax from line items that calculated by the tax identifiers. */ aggregatedTaxAmount?: Price$3; /** * The sum of all the taxable amount from line items for tax identifiers. * @internal */ aggregatedTaxableAmount?: Price$3; } interface AppliedDiscount$1 extends AppliedDiscountDiscountSourceOneOf$1 { /** Applied coupon info. */ coupon?: Coupon$1; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$1; /** Automatic Discount */ discountRule?: DiscountRule$1; /** * Discount type. * * `"GLOBAL"` - discount applies to entire order. * * `"SPECIFIC-ITEMS"` - discount applies to specific items. * * `"SHIPPING"` - discount applies to shipping. For example, free shipping. */ discountType?: DiscountType$1; /** * IDs of line items discount applies to. * Deprecated. Use `line_item_discounts` instead. * @deprecated IDs of line items discount applies to. * Deprecated. Use `line_item_discounts` instead. * @replacedBy line_item_discounts * @targetRemovalDate 2024-10-30 */ lineItemIds?: string[]; /** Discount id. */ _id?: string | null; /** * Line items the discount applies to. * @internal */ lineItemDiscounts?: LineItemDiscount$1[]; } /** @oneof */ interface AppliedDiscountDiscountSourceOneOf$1 { /** Applied coupon info. */ coupon?: Coupon$1; /** Merchant discount. */ merchantDiscount?: MerchantDiscount$1; /** Automatic Discount */ discountRule?: DiscountRule$1; } enum DiscountType$1 { GLOBAL = "GLOBAL", SPECIFIC_ITEMS = "SPECIFIC_ITEMS", SHIPPING = "SHIPPING" } /** Coupon */ interface Coupon$1 { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** Coupon name. */ name?: string; /** Coupon value. */ amount?: Price$3; } interface MerchantDiscount$1 extends MerchantDiscountMerchantDiscountReasonOneOf { /** * Pre-defined discount reason (optional). * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange. */ discountReason?: DiscountReason; /** Discount description as free text (optional). */ description?: string | null; /** Discount amount. */ amount?: Price$3; /** * Discount percentage. * @internal */ percentage?: string | null; } /** @oneof */ interface MerchantDiscountMerchantDiscountReasonOneOf { /** * Pre-defined discount reason (optional). * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange. */ discountReason?: DiscountReason; /** Discount description as free text (optional). */ description?: string | null; } enum DiscountReason { UNSPECIFIED = "UNSPECIFIED", EXCHANGED_ITEMS = "EXCHANGED_ITEMS" } interface DiscountRule$1 { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: DiscountRuleName$1; /** Discount value. */ amount?: Price$3; } interface DiscountRuleName$1 { /** Original discount rule name (in site's default language). */ original?: string; /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string | null; } interface LineItemDiscount$1 { /** ID of line item the discount applies to. */ _id?: string; /** Total discount for this line item. */ totalDiscount?: Price$3; } interface Activity$1 extends ActivityContentOneOf { /** Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */ customActivity?: CustomActivity; /** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */ merchantComment?: MerchantComment; /** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */ orderRefunded?: OrderRefunded$1; /** * Details of the original order for this exchange order. `activity.type` must be `ORDER_CREATED_FROM_EXCHANGE`. * @internal */ orderCreatedFromExchange?: OrderCreatedFromExchange; /** * Details of an order that was created as a result of an exchange of items in this order. `activity.type` must be `NEW_EXCHANGE_ORDER_CREATED`. * @internal */ newExchangeOrderCreated?: NewExchangeOrderCreated; /** * Details of changes made by the Draft Orders API. * @internal */ draftOrderChangesApplied?: DraftOrderChangesApplied; /** * Details of the payment method saved for order * @internal */ savedPaymentMethod?: SavedPaymentMethod; /** * Details of an authorized payment created. * @internal */ authorizedPaymentCreated?: AuthorizedPaymentCreated; /** * Details of an authorized payment captured. * @internal */ authorizedPaymentCaptured?: AuthorizedPaymentCaptured; /** * Details of an authorized payment voided. * @internal */ authorizedPaymentVoided?: AuthorizedPaymentVoided; /** * Details of an initiated refund process. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ refundInitiated?: RefundInitiated; /** * Details of a refunded payment. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefunded?: PaymentRefunded; /** * Details of a failed payment refund. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefundFailed?: PaymentRefundFailed; /** * Details of refund to store credit. * @internal */ refundedAsStoreCredit?: RefundedAsStoreCredit; /** * Details of a pending payment * @internal */ paymentPending?: PaymentPending; /** * Details of a canceled payment * @internal */ paymentCanceled?: PaymentCanceled; /** * Details of a declined payment * @internal */ paymentDeclined?: PaymentDeclined; /** * Activity ID. * @readonly */ _id?: string | null; /** * Activity author's email. * @readonly */ authorEmail?: string | null; /** * Activity creation date and time. * @readonly */ _createdDate?: Date | null; /** Activity type. */ type?: ActivityType$1; } /** @oneof */ interface ActivityContentOneOf { /** Custom activity details (optional). `activity.type` must be `CUSTOM_ACTIVITY`. */ customActivity?: CustomActivity; /** Merchant comment details (optional). `activity.type` must be `MERCHANT_COMMENT`. */ merchantComment?: MerchantComment; /** Additional info about order refunded activity (optional). `activity.type` must be `ORDER_REFUNDED`. */ orderRefunded?: OrderRefunded$1; /** * Details of the original order for this exchange order. `activity.type` must be `ORDER_CREATED_FROM_EXCHANGE`. * @internal */ orderCreatedFromExchange?: OrderCreatedFromExchange; /** * Details of an order that was created as a result of an exchange of items in this order. `activity.type` must be `NEW_EXCHANGE_ORDER_CREATED`. * @internal */ newExchangeOrderCreated?: NewExchangeOrderCreated; /** * Details of changes made by the Draft Orders API. * @internal */ draftOrderChangesApplied?: DraftOrderChangesApplied; /** * Details of the payment method saved for order * @internal */ savedPaymentMethod?: SavedPaymentMethod; /** * Details of an authorized payment created. * @internal */ authorizedPaymentCreated?: AuthorizedPaymentCreated; /** * Details of an authorized payment captured. * @internal */ authorizedPaymentCaptured?: AuthorizedPaymentCaptured; /** * Details of an authorized payment voided. * @internal */ authorizedPaymentVoided?: AuthorizedPaymentVoided; /** * Details of an initiated refund process. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ refundInitiated?: RefundInitiated; /** * Details of a refunded payment. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefunded?: PaymentRefunded; /** * Details of a failed payment refund. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefundFailed?: PaymentRefundFailed; /** * Details of refund to store credit. * @internal */ refundedAsStoreCredit?: RefundedAsStoreCredit; /** * Details of a pending payment * @internal */ paymentPending?: PaymentPending; /** * Details of a canceled payment * @internal */ paymentCanceled?: PaymentCanceled; /** * Details of a declined payment * @internal */ paymentDeclined?: PaymentDeclined; } interface CustomActivity { /** ID of the app that created the custom activity. */ appId?: string; /** Custom activity type. For example, `"Ticket number set"`. */ type?: string; /** Additional data in key-value form. For example, `{ "Ticket number": "123456" }`. */ additionalData?: Record; } /** Store owner added a comment */ interface MerchantComment { /** Merchant comment message. */ message?: string; } interface OrderRefunded$1 { /** Whether order was refunded manually. For example, via payment provider or using cash. */ manual?: boolean; /** Refund amount. */ amount?: Price$3; /** Reason for refund. */ reason?: string; } interface OrderCreatedFromExchange { /** ID of the original order for which the exchange happened. */ originalOrderId?: string; } interface NewExchangeOrderCreated { /** ID of the new order created as a result of an exchange of items. */ exchangeOrderId?: string; /** IDs of the items that were exchanged. */ lineItems?: LineItemExchangeData[]; } interface LineItemExchangeData { /** ID of the exchanged line item. */ lineItemId?: string; /** Line item quantity being exchanged. */ quantity?: number; } interface DraftOrderChangesApplied { /** Draft order id. */ draftOrderId?: string; /** Reason for edit, given by user (optional). */ reason?: string | null; /** Changes applied to order. */ changes?: OrderChange[]; } interface OrderChange extends OrderChangeValueOneOf { lineItemChanged?: LineItemChanges; lineItemAdded?: ManagedLineItem; lineItemRemoved?: ManagedLineItem; discountAdded?: ManagedDiscount; discountRemoved?: ManagedDiscount; additionalFeeAdded?: ManagedAdditionalFee; additionalFeeRemoved?: ManagedAdditionalFee; totalPriceChanged?: TotalPriceChange; shippingInformationChanged?: ShippingInformationChange; } /** @oneof */ interface OrderChangeValueOneOf { lineItemChanged?: LineItemChanges; lineItemAdded?: ManagedLineItem; lineItemRemoved?: ManagedLineItem; discountAdded?: ManagedDiscount; discountRemoved?: ManagedDiscount; additionalFeeAdded?: ManagedAdditionalFee; additionalFeeRemoved?: ManagedAdditionalFee; totalPriceChanged?: TotalPriceChange; shippingInformationChanged?: ShippingInformationChange; } interface LineItemChanges { /** Line item ID. */ _id?: string; /** Item name. */ name?: ProductName; /** Item quantity change. */ quantity?: LineItemQuantityChange; /** Item price change. */ price?: LineItemPriceChange; } interface LineItemQuantityChange { /** Item quantity before update. */ originalQuantity?: number; /** Item quantity after update. */ newQuantity?: number; /** Difference between original and new quantity. Absolute value. */ diff?: number; /** Type of quantity change: increase or decrease. */ deltaType?: LineItemQuantityChangeType; } enum LineItemQuantityChangeType { /** Quantity increased. */ QUANTITY_INCREASED = "QUANTITY_INCREASED", /** Quantity decreased. */ QUANTITY_DECREASED = "QUANTITY_DECREASED" } interface LineItemPriceChange { /** Item price before update. */ originalPrice?: Price$3; /** Item price after update. */ newPrice?: Price$3; } interface ManagedLineItem { /** Line item ID. */ _id?: string; /** Item name. */ name?: ProductName; /** Added or removed item quantity. */ quantity?: number; } interface ManagedDiscount { /** Discount id. */ _id?: string; /** Discount name: coupon name / discount rule name / merchant discount description. */ name?: TranslatedValue; /** Line items discount applies to. */ affectedLineItems?: LineItemAmount[]; /** Discount amount. */ totalAmount?: Price$3; } interface TranslatedValue { /** Value in site default language. */ original?: string; /** Translated value. */ translated?: string | null; } interface LineItemAmount { /** Order line item id */ _id?: string; /** Item name. */ name?: ProductName; /** Amount associated with this item. (Discount amount for item / additional fee amount for item) */ amount?: Price$3; } interface ManagedAdditionalFee { /** Additional fee id. */ _id?: string; /** Additional fee name. */ name?: TranslatedValue; /** Line items additional fee applies to. */ affectedLineItems?: LineItemAmount[]; /** Additional fee amount. */ totalAmount?: Price$3; } interface TotalPriceChange { /** Order’s total price after discounts and tax. Before update */ originalTotal?: Price$3; /** Order’s total price after discounts and tax. After update */ newTotal?: Price$3; } interface ShippingInformationChange { /** Order’s Shipping Information. Before update */ originalShippingInfo?: ShippingInformationChangeShippingInformation; /** Order’s Shipping Information. After update */ newShippingInfo?: ShippingInformationChangeShippingInformation; } interface ShippingInformationChangeShippingInformation { /** Order’s shipping price. */ total?: Price$3; /** Order’s shipping title. */ shippingTitle?: string; } /** Payment method is saved for order */ interface SavedPaymentMethod { /** Payment method name */ name?: string; /** Payment method description */ description?: string | null; } interface AuthorizedPaymentCreated { /** Payment ID of payment associated with this activity */ paymentId?: string; /** Payment amount */ amount?: Price$3; /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface AuthorizedPaymentCaptured { /** Payment ID of payment associated with this activity */ paymentId?: string; /** Payment amount */ amount?: Price$3; /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface AuthorizedPaymentVoided { /** Payment ID of payment associated with this activity */ paymentId?: string; /** Payment amount */ amount?: Price$3; /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface RefundInitiated { /** Refund ID. */ refundId?: string; /** Refund amount. */ amount?: Price$3; /** Details about the payments being refunded. */ payments?: RefundedPayment[]; /** Reason for refund. */ reason?: string | null; } interface RefundedPayment extends RefundedPaymentKindOneOf { /** Regular payment refund. */ regular?: RegularPaymentRefund; /** Gift card payment refund. */ giftCard?: GiftCardPaymentRefund; /** Membership payment refund. */ membership?: MembershipPaymentRefund; /** Payment ID. */ paymentId?: string; /** Whether refund was made externally and manually on the payment provider's side. */ externalRefund?: boolean; } /** @oneof */ interface RefundedPaymentKindOneOf { /** Regular payment refund. */ regular?: RegularPaymentRefund; /** Gift card payment refund. */ giftCard?: GiftCardPaymentRefund; /** Membership payment refund. */ membership?: MembershipPaymentRefund; } interface RegularPaymentRefund { /** Refund amount */ amount?: Price$3; /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface GiftCardPaymentRefund { /** Gift card payment ID */ giftCardPaymentId?: string | null; /** Refund amount */ amount?: Price$3; } interface MembershipPaymentRefund { /** Membership ID */ membershipId?: string | null; } interface PaymentRefunded { /** Refund ID. */ refundId?: string; /** Details about the refunded payment. */ payment?: RefundedPayment; } interface PaymentRefundFailed { /** Refund ID. */ refundId?: string; /** Details about the failed payment refund. */ payment?: RefundedPayment; } interface RefundedAsStoreCredit { /** Refund amount */ amount?: Price$3; /** Reason for refund */ reason?: string | null; } interface PaymentPending extends PaymentPendingPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; /** Payment ID of payment associated with this activity */ paymentId?: string; } /** @oneof */ interface PaymentPendingPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; } interface RegularPayment extends RegularPaymentPaymentMethodDetailsOneOf { /** Whether regular card used */ creditCardDetails?: CreditCardDetails; /** Payment amount */ amount?: Price$3; } /** @oneof */ interface RegularPaymentPaymentMethodDetailsOneOf { /** Whether regular card used */ creditCardDetails?: CreditCardDetails; } interface CreditCardDetails { /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface PaymentCanceled extends PaymentCanceledPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; /** Payment ID of payment associated with this activity */ paymentId?: string; } /** @oneof */ interface PaymentCanceledPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; } interface PaymentDeclined extends PaymentDeclinedPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; /** Payment ID of payment associated with this activity */ paymentId?: string; } /** @oneof */ interface PaymentDeclinedPaymentDetailsOneOf { /** Regular payment. */ regular?: RegularPayment; } enum ActivityType$1 { ORDER_REFUNDED = "ORDER_REFUNDED", ORDER_PLACED = "ORDER_PLACED", ORDER_PAID = "ORDER_PAID", ORDER_FULFILLED = "ORDER_FULFILLED", ORDER_NOT_FULFILLED = "ORDER_NOT_FULFILLED", ORDER_CANCELED = "ORDER_CANCELED", DOWNLOAD_LINK_SENT = "DOWNLOAD_LINK_SENT", TRACKING_NUMBER_ADDED = "TRACKING_NUMBER_ADDED", TRACKING_NUMBER_EDITED = "TRACKING_NUMBER_EDITED", TRACKING_LINK_ADDED = "TRACKING_LINK_ADDED", SHIPPING_CONFIRMATION_EMAIL_SENT = "SHIPPING_CONFIRMATION_EMAIL_SENT", INVOICE_ADDED = "INVOICE_ADDED", INVOICE_REMOVED = "INVOICE_REMOVED", INVOICE_SENT = "INVOICE_SENT", FULFILLER_EMAIL_SENT = "FULFILLER_EMAIL_SENT", SHIPPING_ADDRESS_EDITED = "SHIPPING_ADDRESS_EDITED", EMAIL_EDITED = "EMAIL_EDITED", PICKUP_READY_EMAIL_SENT = "PICKUP_READY_EMAIL_SENT", CUSTOM_ACTIVITY = "CUSTOM_ACTIVITY", MERCHANT_COMMENT = "MERCHANT_COMMENT", ORDER_CREATED_FROM_EXCHANGE = "ORDER_CREATED_FROM_EXCHANGE", NEW_EXCHANGE_ORDER_CREATED = "NEW_EXCHANGE_ORDER_CREATED", ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID", DRAFT_ORDER_CHANGES_APPLIED = "DRAFT_ORDER_CHANGES_APPLIED", SAVED_PAYMENT_METHOD = "SAVED_PAYMENT_METHOD", AUTHORIZED_PAYMENT_CREATED = "AUTHORIZED_PAYMENT_CREATED", AUTHORIZED_PAYMENT_CAPTURED = "AUTHORIZED_PAYMENT_CAPTURED", AUTHORIZED_PAYMENT_VOIDED = "AUTHORIZED_PAYMENT_VOIDED", REFUND_INITIATED = "REFUND_INITIATED", PAYMENT_REFUNDED = "PAYMENT_REFUNDED", PAYMENT_REFUND_FAILED = "PAYMENT_REFUND_FAILED", REFUNDED_AS_STORE_CREDIT = "REFUNDED_AS_STORE_CREDIT", /** @documentationMaturity preview */ PAYMENT_PENDING = "PAYMENT_PENDING", /** @documentationMaturity preview */ PAYMENT_CANCELED = "PAYMENT_CANCELED", /** @documentationMaturity preview */ PAYMENT_DECLINED = "PAYMENT_DECLINED", /** @documentationMaturity preview */ ORDER_PENDING = "ORDER_PENDING", /** @documentationMaturity preview */ ORDER_REJECTED = "ORDER_REJECTED" } enum AttributionSource { UNSPECIFIED = "UNSPECIFIED", FACEBOOK_ADS = "FACEBOOK_ADS" } interface CreatedBy extends CreatedByStringOneOf { /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; /** App ID - when the order was created by an external application. */ appId?: string; } /** @oneof */ interface CreatedByStringOneOf { /** * User ID - when the order was created by a Wix user on behalf of a buyer. * For example, via POS (point of service). */ userId?: string; /** Member ID - when the order was created by a **logged in** site visitor. */ memberId?: string; /** Visitor ID - when the order was created by a site visitor that was **not** logged in. */ visitorId?: string; /** App ID - when the order was created by an external application. */ appId?: string; } interface ChannelInfo$1 { /** Sales channel that submitted the order. */ type?: ChannelType$1; /** Reference to an order ID from an external system. */ externalOrderId?: string | null; /** URL to the order in the external system. */ externalOrderUrl?: string | null; } enum ChannelType$1 { /** Unspecified sales channel. This value is not supported. */ UNSPECIFIED = "UNSPECIFIED", /** A web client. */ WEB = "WEB", /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */ POS = "POS", /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */ EBAY = "EBAY", /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */ AMAZON = "AMAZON", /** Other sales platform. */ OTHER_PLATFORM = "OTHER_PLATFORM", /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */ WIX_APP_STORE = "WIX_APP_STORE", /** Wix Invoices app in [your dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Finvoices/settings/general-settings) */ WIX_INVOICES = "WIX_INVOICES", /** Wix merchant backoffice. */ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT", /** Wish sales channel. */ WISH = "WISH", /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */ CLASS_PASS = "CLASS_PASS", /** Global-E sales channel. */ GLOBAL_E = "GLOBAL_E", /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */ FACEBOOK = "FACEBOOK", /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */ ETSY = "ETSY", /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */ TIKTOK = "TIKTOK", /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */ FAIRE_COM = "FAIRE_COM" } interface CustomField$1 { /** Custom field value. */ value?: any; /** Custom field title. */ title?: string; /** Translated custom field title. */ translatedTitle?: string | null; } interface BalanceSummary { /** * Current amount left to pay. * @readonly */ balance?: Balance; /** * Sum of all approved and successful payments. * * The value includes payments that have subsequently been fully or partially refunded. * @readonly */ paid?: Price$3; /** * Sum of all successfully refunded payments. * @readonly */ refunded?: Price$3; /** * Sum of all authorized payments. * @readonly */ authorized?: Price$3; /** * Sum of all pending refund transactions. * @internal * @readonly */ pendingRefund?: Price$3; /** * Sum of all pending transactions. * @readonly */ pending?: Price$3; } /** * Order balance. Reflects amount left to be paid on order and is calculated dynamically. Can be negative per balance definition. * `amount` field depends on order payment status: * + UNSPECIFIED, NOT_PAID: price_summary.total_price * + PARTIALLY_PAID : price_summary.total_price - pay_now.total_price * + PENDING, REFUNDED, PARTIALLY_REFUNDED, PAID : 0 */ interface Balance { /** * Balance amount. * * A negative `amount` represents the amount to be refunded. This can happen due to overcharging or the order being modified after a payment has been made. * @readonly */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } interface AdditionalFee$1 { /** Additional fee's unique code for future processing. */ code?: string | null; /** Name of additional fee. */ name?: string; /** Additional fee's price. */ price?: Price$3; /** Tax details. */ taxDetails?: ItemTaxFullDetails$1; /** SPI implementer's `appId`. */ providerAppId?: string | null; /** Additional fee's price before tax. */ priceBeforeTax?: Price$3; /** Additional fee's price after tax. */ priceAfterTax?: Price$3; /** Additional fee's id. */ _id?: string; /** * Optional - Line items associated with this additional fee. * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. */ lineItemIds?: string[]; } interface FulfillmentStatusesAggregate { /** Unique string values based on Fulfillment entities statuses */ statuses?: string[] | null; } /** * Common object for tags. * Should be use as in this example: * message Foo { * string id = 1; * ... * Tags tags = 5 * } * * example of taggable entity * { * id: "123" * tags: { * tags: { * tag_ids:["11","22"] * }, * private_tags: { * tag_ids: ["33", "44"] * } * } * } */ interface Tags { /** Tags that require an additional permission in order to access them, normally not given to site members or visitors. */ privateTags?: TagList; /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */ tags?: TagList; } interface TagList { /** List of tag IDs */ tagIds?: string[]; } interface Location { /** * Location ID. * Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction). */ _id?: string; /** * Location name. * @readonly */ name?: string; } interface TriggerReindexOrderRequest { metasiteId?: string; orderId?: string; } interface SnapshotMessage$1 { _id?: string; opType?: number; } /** Triggered when the payment status of an order is updated */ interface PaymentStatusUpdated { /** The order that was updated */ order?: Order$1; /** The previous status (before the update) */ previousPaymentStatus?: PaymentStatus$1; } interface OrderRejectedEventOrderRejected { /** The order that was rejected */ order?: Order$1; } /** Triggered when order items are marked as restocked */ interface OrderItemsRestocked { /** The order which items were restocked */ order?: Order$1; /** Restocked items and quantities */ restockItems?: V1RestockItem[]; } interface V1RestockItem { /** ID of the line item being restocked. */ lineItemId?: string; /** Line item quantity being restocked. */ quantity?: number; } interface GetMetasiteDataRequest { /** meta site Id for data to retrieve */ metasiteId: string; } interface GetMetasiteDataResponse { /** meta site data */ metasite?: MetaSite; /** is metasite added to new SDL population via population manager */ isInNewPopulation?: boolean; /** metasite url */ metasiteUrl?: string; /** owner data */ userDataResponse?: UserDataResponse; } /** * Represents Meta Site. * * Meta Site is a legacy concept, it aggregates data from several domains. Generally, it contains and manages * relations between different entities related to the site (or, as a new concept, to the container). * * We prefer to pronounce it as 2 separate words, therefore we use terms "meta site" or "metaSite" or "meta_site" in code. */ interface MetaSite { /** * Identifier of meta site. * @readonly */ metaSiteId?: string; /** * Internal version of meta site. Monotonically increasing number. * * If passed within update request, it will be used for optimistic locking. In this case, * StaleStateException will be thrown if current version doesn't match. * * In old MetaSiteDTO -- revision. * @readonly */ version?: string; /** * Identifier of account that owns this meta site. * @readonly */ ownerId?: string; /** * Date and time when meta site was created. * @readonly */ dateCreated?: Date | null; /** * Date and time when meta site was updated for the last time. * @readonly */ dateUpdated?: Date | null; /** * All "applications" of this meta site. * * In old MetaSiteDTO -- embeddedServices. */ apps?: App[]; /** Namespace of meta site. */ namespace?: Namespace; /** * Indicates whether https should be used for viewing a site. * * In old MetaSiteDTO -- flags.UseHttps. */ useHttps?: boolean; defaultSeoData?: SeoData; /** * Information about HTML application. * * In old MetaSiteDTO -- appplications.find(_.applicationType == HtmlWeb). */ htmlApp?: HtmlApplication; /** @deprecated */ externalUriMappings?: ExternalUriMapping[]; /** Indicates whether meta site was published. If true - site should be accessible for viewing. */ published?: boolean; /** * The name of meta site. * * Matches this regular expression: [a-z0-9_\-]{4,20} (but for some legacy sites might be shorted/longer). */ name?: string; /** * Indicates whether this site is managed by ADI editor * * Values: * None - not managed. * Some(false) - site was created via ADI editor, but later on user switched to regular editor. * Some(true) - site was created and still is managed by ADI editor. * * In old MetaSiteDTO: embeddedService[embeddedServiceType=Onboarding].attributes.isInUse. */ adi?: boolean | null; /** * Indicates whether this meta site is template. * * In old MetaSiteDTO: documentType == Template. * @readonly */ template?: boolean | null; /** * Identifier of a template (meta site) from which this site was created. * * If it's empty it either means that site wasn't created from a template OR it's very old, so we didn't store * it back then. * * For example, if "site" was created from "template", then "template"'s id will be in origin_template_id. * When "site" is cloned, clone will also have "template"'s id in origin_instance_id. * @readonly */ originTemplateId?: string | null; /** * Indicates meta site blocked from publishing and added additional filtering in listing API (MSS). READ_ONLY. * @readonly */ blocked?: boolean; /** * If true - default meta site routing (connected domains, free url, ML) is not used for this meta site. * * Meaning, that if `example.org` is connected to this meta site, `router-server` will return 404 for `example.org` * anyway. * * This flag is set for some sites that have custom mapping in Routes API / wix-pages-bo. */ dontUseDefaultRouting?: boolean; /** * Indicates the site is used as critical asset and as such is protected. You would be only able to provision applications to this meta site. READ_ONLY. * @readonly */ criticalAsset?: boolean; } interface App { /** * Identifier of application type (application definition id). * * Can be both UUID and non-UUID, for example: SiteMembers, Onboarding, CloudSiteExtension etc. */ appDefId?: string; /** * Identifier of the instance (concrete application, installed on a site). * * Mostly UUID, but for some specific legacy cases might be something else. */ instanceId?: string; /** * State of this app (see docs for state). * @readonly */ state?: State; /** * Identifier of the originating application. For example, if this app was part of a template, * then an app will get instance_id of that app as origin instance id. * * If application was provisioned not from some template, it should be empty. * * Note, it could be == to instance_id (for old sites). */ originInstanceId?: string; } /** * Represents the actual state of the application on site. Do not confuse with the State in the old MetaSiteDTO, * which has less values and doesn't have 1-to-1 correspondence with this one (this one is exact and correct!) */ enum State { UNKNOWN = "UNKNOWN", /** App is installed on a site. */ ENABLED = "ENABLED", /** App is removed from a site (but we preserve it just in case). */ DISABLED = "DISABLED", /** App is in "demo" mode, meaning that it's in read-only mode (it's in a template OR not installed yet). */ TEMPLATE = "TEMPLATE", /** App is not installed, there is a user intention for it only (user will see the pimpl in the editor). */ PENDING = "PENDING" } enum Namespace { UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE", /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */ WIX = "WIX", /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */ SHOUT_OUT = "SHOUT_OUT", /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */ ALBUMS = "ALBUMS", /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */ WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE", /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */ HOTELS = "HOTELS", /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */ CLUBS = "CLUBS", /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */ ONBOARDING_DRAFT = "ONBOARDING_DRAFT", /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */ DEV_SITE = "DEV_SITE", /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */ LOGOS = "LOGOS", /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */ VIDEO_MAKER = "VIDEO_MAKER", /** MetaSites with this namespace will *not* be shown in a user's site list by default. */ PARTNER_DASHBOARD = "PARTNER_DASHBOARD", /** MetaSites with this namespace will *not* be shown in a user's site list by default. */ DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY", /** * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain. * * Meta site with this namespace will *not* be shown in a user's site list by default. */ HTML_DRAFT = "HTML_DRAFT", /** * the user-journey for Fitness users who want to start from managing their business instead of designing their website. * Will be accessible from Site List and will not have a website app. * Once the user attaches a site, the site will become a regular wixsite. */ SITELESS_BUSINESS = "SITELESS_BUSINESS", /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */ CREATOR_ECONOMY = "CREATOR_ECONOMY", /** It is to be used in the Business First efforts. */ DASHBOARD_FIRST = "DASHBOARD_FIRST", /** Bookings business flow with no site. */ ANYWHERE = "ANYWHERE", /** Namespace for Headless Backoffice with no editor */ HEADLESS = "HEADLESS", /** * Namespace for master site that will exist in parent account that will be referenced by subaccounts * The site will be used for account level CSM feature for enterprise */ ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS", /** Rise.ai Siteless account management for Gift Cards and Store Credit. */ RISE = "RISE", /** * As part of the branded app new funnel, users now can create a meta site that will be branded app first. * There's a blank site behind the scene but it's blank). * The Mobile company will be the owner of this namespace. */ BRANDED_FIRST = "BRANDED_FIRST", /** Nownia.com Siteless account management for Ai Scheduling Assistant. */ NOWNIA = "NOWNIA", /** * UGC Templates are templates that are created by users for personal use and to sale to other users. * The Partners company owns this namespace. */ UGC_TEMPLATE = "UGC_TEMPLATE", /** Codux Headless Sites */ CODUX = "CODUX", /** Bobb - AI Design Creator. */ MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR" } interface SeoData { /** A title. */ title?: string | null; /** Indicates whether the site should be indexable by bots. */ indexable?: boolean; /** TDB. */ suppressTrackingCookies?: boolean; /** TDB. */ ogImage?: string | null; /** A list of meta tags. */ metaTags?: MetaTag[]; /** A canonical URL for a site. */ canonicalUrl?: string | null; } interface MetaTag { /** A name. */ name?: string; /** A value. */ value?: string; /** Indicates whether should be rendered as property. */ property?: boolean; } /** Represents an HTML application (HTML site). */ interface HtmlApplication { /** Legacy, don't use it if you can. */ intId?: number; /** Identifier of the instance. */ instanceId?: string; seoData?: SeoData; /** Language of this site. */ languageCode?: string; /** File name for thumbnail. */ thumbnail?: string | null; /** Indicates whether this site is managed by EditorX. */ editorX?: boolean; /** Indicates whether this site is managed by Wix Studio. */ studio?: boolean; } interface ExternalUriMapping { /** Deprecated. */ fromExternalUri?: string; /** Deprecated. */ toWixUri?: string; /** Deprecated. */ oldToWixUri?: string | null; /** Deprecated. */ requireDomain?: boolean | null; } interface UserDataResponse { userEmail?: string; /** owner name */ userName?: string; /** owner status */ userStatus?: string; /** owner language */ userLanguage?: string; } interface QueryOrdersForMetasiteRequest { /** meta site Id for EP orders to retrieve */ metasiteId: string; /** paginated internal orders query request */ internalQueryOrdersRequest?: InternalQueryOrdersRequest; } interface InternalQueryOrdersRequest { /** Query options. */ query?: PlatformQuery; } interface PlatformQuery extends PlatformQueryPagingMethodOneOf { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging$7; /** Filter object. */ filter?: Record | null; /** Sorting options. For example, `[{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]`. */ sort?: Sorting$7[]; } /** @oneof */ interface PlatformQueryPagingMethodOneOf { /** Pointer to page of results using offset. Cannot be used together with `cursorPaging`. */ paging?: PlatformPaging; /** Cursor pointing to page of results. Cannot be used together with `paging`. `cursorPaging.cursor` can not be used together with `filter` or `sort`. */ cursorPaging?: CursorPaging$7; } interface Sorting$7 { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$7; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$7 { ASC = "ASC", DESC = "DESC" } interface PlatformPaging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CursorPaging$7 { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryOrdersForMetasiteResponse { /** found exisitng orders according to pagination and query provided. */ orders?: Order$1[]; /** Details on the paged set of results returned. */ pagingMetadata?: PlatformPagingMetadata; } interface PlatformPagingMetadata { /** The number of items returned in this response. */ count?: number | null; /** The offset which was requested. Returned if offset paging was used. */ offset?: number | null; /** The total number of items that match the query. Returned if offset paging was used. */ total?: number | null; /** Cursors to navigate through result pages. Returned if cursor paging was used. */ cursors?: Cursors$7; } interface Cursors$7 { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface GetOrderForMetasiteRequest { /** meta site Id for EP order to retrieve */ metasiteId: string; /** Order Id for EP order to retrieve */ orderId: string; } interface GetOrderForMetasiteResponse { /** Existing EP order */ order?: Order$1; } interface ListOrderTransactionsForMetasiteRequest { /** meta site Id for EP order transactions to retrieve */ metasiteId: string; /** Order Id for EP order transactions to retrieve */ orderId: string; } interface ListOrderTransactionsForMetasiteResponse { /** Order ID and its associated transactions. */ orderTransactions?: OrderTransactions$1; } interface OrderTransactions$1 { /** Order ID. */ orderId?: string; /** Record of payments made to the merchant. */ payments?: Payment$1[]; /** Record of refunds made to the buyer. */ refunds?: Refund$1[]; } interface Payment$1 extends PaymentPaymentDetailsOneOf$1 { /** Regular payment details. */ regularPaymentDetails?: RegularPaymentDetails$1; /** Gift card payment details. */ giftcardPaymentDetails?: GiftCardPaymentDetails$1; /** * Membership payment details. * @internal */ membershipPaymentDetails?: MembershipPaymentDetails$1; /** * Payment ID. * @readonly */ _id?: string | null; /** Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. */ _createdDate?: Date | null; /** * Date and time the payment was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _updatedDate?: Date | null; /** Payment amount. */ amount?: Price$3; /** * Whether refunds for this payment are disabled. * + `true`: This payment is not refundable. * + `false`: This payment may be refunded. However, this ultimately depends on the payment provider. */ refundDisabled?: boolean; } /** @oneof */ interface PaymentPaymentDetailsOneOf$1 { /** Regular payment details. */ regularPaymentDetails?: RegularPaymentDetails$1; /** Gift card payment details. */ giftcardPaymentDetails?: GiftCardPaymentDetails$1; /** * Membership payment details. * @internal */ membershipPaymentDetails?: MembershipPaymentDetails$1; } interface RegularPaymentDetails$1 extends RegularPaymentDetailsPaymentMethodDetailsOneOf$1 { /** Whether regular card used */ creditCardDetails?: CreditCardPaymentMethodDetails$1; /** Wix Payments order ID. */ paymentOrderId?: string | null; /** * Payment gateway's transaction ID. This ID can be used with the Wix Payments [Transactions API](https://dev.wix.com/docs/rest/api-reference/wix-payments/transactions/introduction). * This field is only returned when the value of `offline_payment` is `false`. */ gatewayTransactionId?: string | null; /** * Payment method. Non-exhaustive list of supported values: * + `CreditCard`, `Alipay`, `AstropayCash`, `AstropayDBT`, `AstropayMBT`, `Bitcoin`, `BitPay`, `Cash`, `ConvenienceStore`, `EPay`, `Fake`, `Giropay`, `IDeal`, `InPerson`, `Klarna`, `MercadoPago`, `Netpay`, `NordeaSolo`, `Offline`, `PagSeguro`, `PayEasy`, `PayPal`, `Paysafecard`, `Paysafecash`, `PointOfSale`, `Poli`, `Privat24`, `Przelewy24`, `RapidTransfer`, `Sepa`, `Skrill`, `Sofort`, `Trustly`, `Neteller`, `Unionpay`, `UniPay`, `Yandex` */ paymentMethod?: string | null; /** Transaction ID in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for offline payments. */ providerTransactionId?: string | null; /** Whether the payment was made offline. For example, when using cash or when marked as paid in the Business Manager. */ offlinePayment?: boolean; /** Payment status. */ status?: TransactionStatus$1; /** Whether there is a payment agreement that allows for future charges. */ savedPaymentMethod?: boolean; /** Authorization details. */ authorizationDetails?: AuthorizationDetails$1; } /** @oneof */ interface RegularPaymentDetailsPaymentMethodDetailsOneOf$1 { /** Whether regular card used */ creditCardDetails?: CreditCardPaymentMethodDetails$1; } enum TransactionStatus$1 { UNDEFINED = "UNDEFINED", APPROVED = "APPROVED", PENDING = "PENDING", PENDING_MERCHANT = "PENDING_MERCHANT", CANCELED = "CANCELED", DECLINED = "DECLINED", REFUNDED = "REFUNDED", PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", AUTHORIZED = "AUTHORIZED", VOIDED = "VOIDED" } interface CreditCardPaymentMethodDetails$1 { /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface AuthorizationDetails$1 { /** * Whether the authorized payment is of a delayed capture. * @readonly */ delayedCapture?: boolean; /** Date and time the payment was authorized in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ authorizedDate?: Date | null; /** * List of captures associated with payment * In case of failed it can be replaced with new one with PENDING or SUCCESS statuses */ captures?: AuthorizationCapture$1[]; /** Void associated with payment */ void?: AuthorizationVoid$1; /** Scheduled action for this transaction */ scheduledAction?: ScheduledAction$1; } interface AuthorizationCapture$1 { /** * Capture ID. * @readonly */ _id?: string | null; /** Status of this capture action */ status?: AuthorizationCaptureStatus$1; /** Amount of this capture */ amount?: Price$3; /** Date and time the capture was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ _createdDate?: Date | null; /** In case of status is FAILED may contain failure details */ failureDetails?: AuthorizationActionFailureDetails$1; } enum AuthorizationCaptureStatus$1 { UNKNOWN_STATUS = "UNKNOWN_STATUS", /** Capture operation still in progress. */ PENDING = "PENDING", /** Capture operation succeeded. */ SUCCEEDED = "SUCCEEDED", /** Capture operation failed. */ FAILED = "FAILED" } interface AuthorizationActionFailureDetails$1 { failureCode?: string; } interface AuthorizationVoid$1 { /** Status of this void action */ status?: AuthorizationVoidStatus$1; /** Date and time the void was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ voidedDate?: Date | null; /** In case of status is FAILED may contain failure details */ failureDetails?: AuthorizationActionFailureDetails$1; /** Reason of void action */ reason?: Reason$1; } enum AuthorizationVoidStatus$1 { UNKNOWN_STATUS = "UNKNOWN_STATUS", /** Void operation still in progress. */ PENDING = "PENDING", /** Void operation succeeded. */ SUCCEEDED = "SUCCEEDED", /** Void operation failed. */ FAILED = "FAILED" } /** Reason the authorization was voided. */ enum Reason$1 { UNKNOWN_REASON = "UNKNOWN_REASON", /** Authorization was voided by user. */ MANUAL = "MANUAL", /** Authorization passed execution date. */ SCHEDULED = "SCHEDULED" } interface ScheduledAction$1 { /** Type of the action. */ actionType?: ActionType$1; /** The date and time of the action. */ executionDate?: Date | null; } enum ActionType$1 { UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE", VOID = "VOID", CAPTURE = "CAPTURE" } interface GiftCardPaymentDetails$1 { /** Gift card payment ID. */ giftCardPaymentId?: string; /** * Gift card ID. * @internal * @deprecated */ giftCardId?: string; /** ID of the app that created the gift card. */ appId?: string; /** * Whether the gift card is voided. * @readonly */ voided?: boolean; /** * Gift card obfuscated code. * @internal */ obfuscatedCode?: string | null; } interface MembershipPaymentDetails$1 { /** Membership ID. */ membershipId?: string; /** ID of the line item this membership applies to. */ lineItemId?: string; /** Payment status. */ status?: MembershipPaymentStatus$1; /** Membership name. */ name?: MembershipName$2; /** The transaction ID in the membership system. Can be used to void the transaction. */ externalTransactionId?: string | null; /** * Whether the membership is voided. * @readonly */ voided?: boolean; /** ID of the application providing this payment option. */ providerAppId?: string; } enum MembershipPaymentStatus$1 { /** Payment was charged. */ CHARGED = "CHARGED", /** The attempt to charge the payment failed, for example, due to lack of credits. */ CHARGE_FAILED = "CHARGE_FAILED" } interface MembershipName$2 { /** Membership name. */ original?: string; /** Translated membership name. Defaults to `original` when not provided. */ translated?: string | null; } interface Refund$1 { /** * Refund ID. * @readonly */ _id?: string; /** List of transactions. */ transactions?: RefundTransaction$1[]; /** Refund business details. */ details?: RefundDetails$1; /** * Date and time the refund was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. * @readonly */ _createdDate?: Date | null; /** * Aggregated refund status * @internal * @readonly */ summary?: AggregatedRefundSummary$1; } interface RefundTransaction$1 { /** ID of the payment associated with this refund. */ paymentId?: string; /** Refund amount. */ amount?: Price$3; /** Refund status. */ refundStatus?: RefundStatus$1; /** * Payment gateway's refund ID. This ID can be used with the Wix Payments [Transactions API](https://dev.wix.com/docs/rest/api-reference/wix-payments/transactions/introduction). * This field is only returned when the value of `external_refund` is `false`. */ gatewayRefundId?: string | null; /** ID of the refund in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for external refunds. */ providerRefundId?: string | null; /** Whether refund was made externally and manually on the payment provider's side. */ externalRefund?: boolean; } /** Refund transaction status. */ enum RefundStatus$1 { /** Refund was initiated on payment provider side. PENDING status was assigned by provider. */ PENDING = "PENDING", /** Refund transaction succeeded. */ SUCCEEDED = "SUCCEEDED", /** Refund transaction failed. */ FAILED = "FAILED", /** Refund request acknowledged, and will be executed soon. */ SCHEDULED = "SCHEDULED", /** Refund was initiated on payment provider side. */ STARTED = "STARTED" } /** Business model of a refund request */ interface RefundDetails$1 { /** Order line item IDs and quantities that were refunded. */ items?: RefundItem$1[]; /** Whether the shipping fee was also refunded. */ shippingIncluded?: boolean; /** Reason for the refund, provided by customer (optional). */ reason?: string | null; /** * Line items that were refunded. * @internal */ lineItems?: V1LineItemRefund[]; /** * Additional fees that were refunded. * @internal */ additionalFees?: V1AdditionalFeeRefund[]; /** * Shipping amount that was refunded. * @internal */ shipping?: V1ShippingRefund; } interface RefundItem$1 { /** Line item ID the refunded line item. */ lineItemId?: string; /** Line item quantity refunded. */ quantity?: number; } interface V1LineItemRefund { /** * Line item ID. * @internal */ lineItemId?: string; /** * Refund quantity. * @internal */ quantity?: number; } interface V1AdditionalFeeRefund { /** * Additional fee ID. * @internal */ additionalFeeId?: string; /** * Refund amount. * @internal */ amount?: Price$3; } interface V1ShippingRefund { /** * Refund amount. * @internal */ amount?: Price$3; } interface AggregatedRefundSummary$1 { /** * Total refund amount requested * @internal */ requestedRefund?: Price$3; /** * Pending refund amount * @internal */ pendingRefund?: Price$3; /** * Refunded amount: portion of requested_refund_amount that succeeded * @internal */ refunded?: Price$3; /** * Failed refund amount: portion of requested_refund_amount that failed * @internal */ failedRefundAmount?: Price$3; /** * `true`: at least one refund transaction is still in PENDING status * @internal */ pending?: boolean; } interface UpsertRefundRequest { /** Meta site ID. */ metasiteId?: string; /** Order ID associated with refund. */ orderId?: string; /** Refund to upsert. */ refund?: Refund$1; } interface UpsertRefundResponse { /** Updated order transactions. */ orderTransactions?: OrderTransactions$1; } interface DomainEvent$9 extends DomainEventBodyOneOf$9 { createdEvent?: EntityCreatedEvent$9; updatedEvent?: EntityUpdatedEvent$9; deletedEvent?: EntityDeletedEvent$9; actionEvent?: ActionEvent$9; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$9 { createdEvent?: EntityCreatedEvent$9; updatedEvent?: EntityUpdatedEvent$9; deletedEvent?: EntityDeletedEvent$9; actionEvent?: ActionEvent$9; } interface EntityCreatedEvent$9 { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$9; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$9 { deletedDate?: Date | null; } interface EntityUpdatedEvent$9 { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$9 { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$9 { bodyAsJson?: string; } interface MessageEnvelope$8 { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$9; /** Stringify payload. */ data?: string; } interface IdentificationData$9 extends IdentificationDataIdOneOf$9 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$8; } /** @oneof */ interface IdentificationDataIdOneOf$9 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$8 { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface UpdateInternalDocumentsEvent extends UpdateInternalDocumentsEventOperationOneOf { /** insert/update documents */ update?: InternalDocumentUpdateOperation; /** delete by document ids */ deleteByIds?: DeleteByIdsOperation; /** delete documents matching filter */ deleteByFilter?: DeleteByFilterOperation; /** update internal documents matching filter */ updateByFilter?: InternalDocumentUpdateByFilterOperation; /** update only existing documents */ updateExisting?: InternalUpdateExistingOperation; /** insert/update documents with versioning */ versionedUpdate?: VersionedDocumentUpdateOperation; /** delete by document ids with versioning */ versionedDeleteByIds?: VersionedDeleteByIdsOperation; /** type of the documents */ documentType?: string; /** language of the documents (mandatory) */ language?: string | null; /** * one or more search documents * @deprecated */ addDocuments?: InternalDocument[]; /** * one or more ids of indexed documents to be removed. Removal will happen before addition (if both provided) * @deprecated */ removeDocumentIds?: string[]; /** id to pass to processing notification */ correlationId?: string | null; /** when event was created / issued */ issuedAt?: Date | null; } /** @oneof */ interface UpdateInternalDocumentsEventOperationOneOf { /** insert/update documents */ update?: InternalDocumentUpdateOperation; /** delete by document ids */ deleteByIds?: DeleteByIdsOperation; /** delete documents matching filter */ deleteByFilter?: DeleteByFilterOperation; /** update internal documents matching filter */ updateByFilter?: InternalDocumentUpdateByFilterOperation; /** update only existing documents */ updateExisting?: InternalUpdateExistingOperation; /** insert/update documents with versioning */ versionedUpdate?: VersionedDocumentUpdateOperation; /** delete by document ids with versioning */ versionedDeleteByIds?: VersionedDeleteByIdsOperation; } interface InternalDocument { /** document with mandatory fields (id) and with fields specific to the type of the document */ document?: Record | null; } interface InternalDocumentUpdateOperation { /** documents to index or update */ documents?: InternalDocument[]; } interface DeleteByIdsOperation { /** ids of the documents to delete */ documentIds?: string[]; } interface DeleteByFilterOperation { /** documents matching this filter wil be deleted. only filterable documents defined in document_type can be used for filtering */ filter?: Record | null; } interface InternalDocumentUpdateByFilterOperation { /** documents matching this filter will be updated */ filter?: Record | null; /** partial document to apply */ document?: InternalDocument; } interface InternalUpdateExistingOperation { /** documents to update */ documents?: InternalDocument[]; } interface VersionedDocumentUpdateOperation { /** documents to create or overwrite */ documents?: InternalDocument[]; /** versioning mode to use instead of default */ versioningMode?: VersioningMode; } enum VersioningMode { /** use default versioning mode agreed with search team */ DEFAULT = "DEFAULT", /** execute only if version is greater than existing */ GREATER_THAN = "GREATER_THAN", /** execute only if version is greater or equal to existing */ GREATER_OR_EQUAL = "GREATER_OR_EQUAL" } interface VersionedDeleteByIdsOperation { /** ids with version of the documents to delete */ documentIds?: VersionedDocumentId[]; } interface VersionedDocumentId { /** document id */ documentId?: string; /** document version */ version?: string; /** versioning mode to use instead of default */ versioningMode?: VersioningMode; } interface TriggerReindexRequest { metasiteId: string; orderIds?: string[]; } interface TriggerReindexResponse { } interface Empty$5 { } interface BatchOfTriggerReindexOrderRequest { requests?: TriggerReindexOrderRequest[]; } interface SendBuyerConfirmationEmailRequest { orderId: string; } interface SendBuyerConfirmationEmailResponse { } interface SendBuyerPaymentsReceivedEmailRequest { orderId: string; } interface SendBuyerPaymentsReceivedEmailResponse { } interface SendBuyerPickupConfirmationEmailRequest { orderId: string; } interface SendBuyerPickupConfirmationEmailResponse { } interface BulkSendBuyerPickupConfirmationEmailsRequest { /** IDs of orders to send pickup emails for. */ orderIds?: string[]; } interface BulkSendBuyerPickupConfirmationEmailsResponse { } interface SendBuyerShippingConfirmationEmailRequest { orderId: string; } interface SendBuyerShippingConfirmationEmailResponse { } interface BulkSendBuyerShippingConfirmationEmailsRequest { /** IDs of orders to send pickup emails for. */ orderIds?: string[]; } interface BulkSendBuyerShippingConfirmationEmailsResponse { } interface SendMerchantOrderReceivedNotificationRequest { orderId: string; } interface SendMerchantOrderReceivedNotificationResponse { } interface SendCancelRefundEmailRequest { /** The ID of order that is canceled/refunded */ orderId: string; /** Personal note added to the email (optional) */ customMessage?: string | null; /** Refund amount */ refundAmount: Price$3; /** Refund ID. (Optional) */ refundId?: string | null; } interface SendCancelRefundEmailResponse { } interface SendRefundEmailRequest { /** The ID of order that is refunded */ orderId?: string; /** Refund ID */ refundId?: string; /** Personal note added to the email (optional) */ customMessage?: string | null; } interface SendRefundEmailResponse { } interface SendMerchantOrderReceivedPushRequest { orderId: string; } interface SendMerchantOrderReceivedPushResponse { } interface PreviewEmailByTypeRequest { emailType: PreviewEmailType; } enum PreviewEmailType { ORDER_PLACED = "ORDER_PLACED", DOWNLOAD_LINKS = "DOWNLOAD_LINKS", ORDER_SHIPPED = "ORDER_SHIPPED", ORDER_READY_FOR_PICKUP = "ORDER_READY_FOR_PICKUP" } interface PreviewEmailByTypeResponse { emailPreview?: string; } interface PreviewRefundEmailRequest { orderId: string; /** Refund amount */ refundAmount: Price$3; /** Refund business details */ details?: RefundDetails$1; /** Personal note added to the email (optional) */ customMessage?: string | null; /** Refund ID. (Optional) */ refundId?: string | null; } interface PreviewRefundEmailResponse { emailPreview?: string; } interface PreviewCancelEmailRequest { orderId: string; /** Personal note added to the email (optional) */ customMessage?: string | null; } interface PreviewCancelEmailResponse { emailPreview?: string; } interface PreviewCancelRefundEmailRequest { orderId: string; /** Personal note added to the email (optional) */ customMessage?: string | null; /** Refund amount */ refundAmount?: Price$3; /** Refund ID. (Optional) */ refundId?: string | null; } interface PreviewCancelRefundEmailResponse { emailPreview?: string; } interface PreviewBuyerPaymentsReceivedEmailRequest { } interface PreviewBuyerPaymentsReceivedEmailResponse { emailPreview?: string; } interface PreviewBuyerConfirmationEmailRequest { } interface PreviewBuyerConfirmationEmailResponse { emailPreview?: string; } interface PreviewBuyerPickupConfirmationEmailRequest { } interface PreviewBuyerPickupConfirmationEmailResponse { emailPreview?: string; } interface PreviewShippingConfirmationEmailRequest { } interface PreviewShippingConfirmationEmailResponse { emailPreview?: string; } interface PreviewResendDownloadLinksEmailRequest { } interface PreviewResendDownloadLinksEmailResponse { emailPreview?: string; } interface PreparePaymentCollectionRequest { /** Ecom order ID. */ ecomOrderId: string; /** Amount to collect */ amount: Price$3; /** * Optional parameter. When present, payment collection will be performed using given payment gateway order. * Existing payment gateway order will be updated with a new amount. * When parameter is absent, new payment gateway order will be created and used for payment collection. */ paymentGatewayOrderId?: string | null; /** * Whether to delay capture of the payment. * Default: false * @deprecated Whether to delay capture of the payment. * Default: false * @replacedBy delayed_capture_settings.scheduled_action * @targetRemovalDate 2024-09-30 */ delayedCapture?: boolean; /** * Specifies whether payment collection is initiated by Merchant or User of User * Default: `true` * @internal */ merchantInitiated?: boolean | null; /** * Redirect urls which are used to return buyer to third party system. * @internal */ redirectUrls?: RedirectUrls; /** Delayed capture payment settings */ delayedCaptureSettings?: DelayedCaptureSettings; } interface RedirectUrls { /** URL to redirect buyer in case of approved (successful) transaction */ successUrl?: string | null; /** URL to redirect buyer in case of buyer canceled the transaction */ cancelUrl?: string | null; /** URL to redirect buyer in case of failed/rejected transaction */ errorUrl?: string | null; /** URL to redirect buyer in case of pending transaction (that might take some time to process) */ pendingUrl?: string | null; } interface DelayedCaptureSettings { /** Specifies the automatic action (void/capture) for authorized transaction after the specified duration */ scheduledAction?: DelayedCaptureSettingsScheduledAction; /** Delay duration before execution. Optional - if not set, providers default period will be used */ delayDuration?: Duration; } enum DelayedCaptureSettingsScheduledAction { UNSPECIFIED = "UNSPECIFIED", /** Whether payment will be auto-voided when duration passes */ VOID = "VOID", /** Whether payment will be auto-captured when duration passes */ CAPTURE = "CAPTURE" } interface Duration { /** Amount of units. For example, 30 MINUTES, 1 HOURS, 7 DAYS, etc */ count?: number; /** Duration unit: MINUTES, HOURS and DAYS */ unit?: DurationUnit; } enum DurationUnit { UNKNOWN_DURATION_UNIT = "UNKNOWN_DURATION_UNIT", MINUTES = "MINUTES", HOURS = "HOURS", DAYS = "DAYS" } interface PreparePaymentCollectionResponse { /** Payment gateway order id which is associated with given payment */ paymentGatewayOrderId?: string; } interface GetPaymentCollectabilityStatusRequest { /** Ecom order ID. */ ecomOrderId: string; } interface GetPaymentCollectabilityStatusResponse { /** Payment collectability status */ status?: PaymentCollectabilityStatus; /** Collectable order amount */ amount?: Price$3; /** * Whether authorization supported * @internal */ authorizationSupported?: boolean; } enum PaymentCollectabilityStatus { UNKNOWN = "UNKNOWN", COLLECTABLE = "COLLECTABLE", NONCOLLECTABLE_ORDER_IS_CANCELLED = "NONCOLLECTABLE_ORDER_IS_CANCELLED", NONCOLLECTABLE_ORDER_IS_PAID = "NONCOLLECTABLE_ORDER_IS_PAID", NONCOLLECTABLE_MISSING_PAYMENT_METHOD = "NONCOLLECTABLE_MISSING_PAYMENT_METHOD", NONCOLLECTABLE_ORDER_IS_PENDING = "NONCOLLECTABLE_ORDER_IS_PENDING", NONCOLLECTABLE_ORDER_IS_REJECTED = "NONCOLLECTABLE_ORDER_IS_REJECTED" } interface RecordManuallyCollectedPaymentRequest { /** Order ID. */ orderId: string; /** Amount to be recorded as approved manual payment for given order */ amount: Price$3; } interface RecordManuallyCollectedPaymentResponse { } interface MarkOrderAsPaidRequest { /** Ecom order ID. */ ecomOrderId: string; } interface MarkOrderAsPaidResponse { /** Updated order. */ order?: Order$1; } interface BulkMarkOrdersAsPaidRequest { /** IDs of orders to mark as paid. */ ecomOrderIds: string[]; } interface BulkMarkOrdersAsPaidResponse { /** * Items updated by the bulk action. * The Order entity within the results optimistically changes its payment status to paid, however this process is async. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$1; } interface BulkOrderResult { /** Item metadata. */ itemMetadata?: ItemMetadata$1; /** * Updated order. * * Returned when `returnFullEntity = true`. */ item?: Order$1; } interface ItemMetadata$1 { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError$4; } interface ApplicationError$4 { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkActionMetadata$1 { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface GetRefundabilityStatusRequest$1 { /** Order ID. */ ecomOrderId: string; } interface GetRefundabilityStatusResponse$1 { /** Refundability details. */ refundabilities?: Refundability$1[]; /** * Whether the order supports refunding per item. * @deprecated */ refundablePerItem?: boolean; } interface Refundability$1 extends RefundabilityAdditionalRefundabilityInfoOneOf$1 { /** Reason why payment is not refundable. */ nonRefundableReason?: NonRefundableReason$1; /** Reason why payment is only refundable manually. */ manuallyRefundableReason?: ManuallyRefundableReason$1; /** Payment ID. */ paymentId?: string; /** Payment refundability status. */ refundabilityStatus?: RefundableStatus$1; /** Link to payment provider dashboard. */ providerLink?: string | null; } /** @oneof */ interface RefundabilityAdditionalRefundabilityInfoOneOf$1 { /** Reason why payment is not refundable. */ nonRefundableReason?: NonRefundableReason$1; /** Reason why payment is only refundable manually. */ manuallyRefundableReason?: ManuallyRefundableReason$1; } enum RefundableStatus$1 { NOT_REFUNDABLE = "NOT_REFUNDABLE", MANUAL = "MANUAL", REFUNDABLE = "REFUNDABLE" } enum NonRefundableReason$1 { NONE = "NONE", ALREADY_REFUNDED = "ALREADY_REFUNDED", PROVIDER_IS_DOWN = "PROVIDER_IS_DOWN", INTERNAL_ERROR = "INTERNAL_ERROR", NOT_PAID = "NOT_PAID", ACCESS_DENIED = "ACCESS_DENIED", ZERO_PRICE = "ZERO_PRICE", DISABLED_BY_PROVIDER = "DISABLED_BY_PROVIDER", PENDING_REFUND = "PENDING_REFUND", FORBIDDEN = "FORBIDDEN", TRANSACTION_NOT_FOUND = "TRANSACTION_NOT_FOUND", ORDER_IS_PENDING = "ORDER_IS_PENDING", ORDER_IS_REJECTED = "ORDER_IS_REJECTED" } enum ManuallyRefundableReason$1 { EXPIRED = "EXPIRED", NOT_SUPPORTED = "NOT_SUPPORTED", OFFLINE = "OFFLINE" } interface CreatePaymentGatewayOrderRequest { /** Ecom order ID. */ ecomOrderId: string; /** Information about the user who initiated the payment. */ chargedBy?: ChargedBy; /** * Whether to delay capture of the payment. * * Default: false * @internal */ delayedCapture?: boolean; } interface ChargedBy { /** ID - id of the user who initiated the payment */ _id?: string; /** Full name - name of the user who initiated the payment */ fullName?: string | null; } interface CreatePaymentGatewayOrderResponse { /** ID of the order created in the payment gateway */ paymentGatewayOrderId?: string; } interface ChargeMembershipsRequest { /** Order ID. */ ecomOrderId: string; /** * The member id. Do not attempt to get it from the request context, since in some cases the caller is not a member * but a user which is using the membership on behalf of the a member */ memberId: string; /** List of items to be paid by memberships */ membershipCharges?: MembershipChargeItem[]; } interface MembershipChargeItem { /** The id of used membership */ membershipId?: string; /** ID of the application providing this payment option */ appId?: string; /** The name of used membership */ membershipName?: MembershipName$2; /** Additional data about this membership */ membershipAdditionalData?: Record | null; /** Catalog and item reference info. */ catalogReference?: CatalogReference$3; /** Properties of the service. When relevant, contains information such as date and number of participants. */ serviceProperties?: ServiceProperties$1; /** * Usually would be the same as catalogReference.catalogItemId * For cases when these are not the same, this field would return the actual id of the item in the catalog * For example, for Wix bookings, catalogReference.catalogItemId is the booking id, and this value is being set to be the service id */ rootCatalogItemId?: string | null; /** line item id of Checkout/Order line item */ lineItemId?: string; } interface ServiceProperties$1 { /** * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * For example, the start time of a class. */ scheduledDate?: Date | null; /** The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. */ numberOfParticipants?: number | null; } interface ChargeMembershipsResponse { } interface TriggerRefundRequest$1 { /** The order this refund related to */ ecomOrderId: string; /** Refund operations information */ payments: PaymentRefund$1[]; /** Business model of a refund */ details?: RefundDetails$1; /** Side effect details related to refund */ sideEffects?: RefundSideEffects$1; } interface PaymentRefund$1 { /** Specific payment within the order to refund */ paymentId?: string; /** Refund amount. Not relevant for membership and gift card refunds. */ amount?: Price$3; /** * Whether refund is made externally and manually (on the payment provider's side) * When false (default), the payment gateway will be called in order to make an actual refund, and then the payment will be marked as refunded. * When true, the payment will only be *marked* as refunded, and no actual refund will be performed. */ externalRefund?: boolean; /** * Gateway refund id. When param is present, new refund is not created. * Instead if order has a refund transaction with given gateway refund id, this refund will be updated with details from request, * and all side effects from request will be executed. * @internal */ gatewayRefundId?: string | null; } interface RefundSideEffects$1 { /** Inventory restock details as part of this refund. */ restockInfo?: RestockInfo$1; /** Whether to send a refund confirmation email to the customer. */ sendOrderRefundedEmail?: boolean; /** Custom message added to the refund confirmation email. */ customMessage?: string | null; } interface RestockInfo$1 { /** Restock type. */ type?: RestockType$1; /** * Deprecated, use items instead * @internal * @deprecated */ lineItemIds?: string[]; /** Restocked line items and quantities. Only relevant for `{"type": "SOME_ITEMS"}`. */ items?: RestockItem$1[]; } enum RestockType$1 { NO_ITEMS = "NO_ITEMS", ALL_ITEMS = "ALL_ITEMS", SOME_ITEMS = "SOME_ITEMS" } interface RestockItem$1 { /** ID of the line item being restocked. */ lineItemId?: string; /** Line item quantity being restocked. */ quantity?: number; } interface TriggerRefundResponse$1 { /** All order's transactions after the refunds were added */ orderTransactions?: OrderTransactions$1; /** Created refund ID */ refundId?: string | null; /** Payment ID's that the refund execution had failed for */ failedPaymentIds?: ItemMetadata$1[]; } interface CalculateRefundRequest$1 { /** Order ID */ ecomOrderId: string; /** Refunded line items and quantity */ refundItems?: CalculateRefundItemRequest$1[]; /** Should include shipping in refund calculation */ refundShipping?: boolean; } interface CalculateRefundItemRequest$1 { /** ID of the line item being refunded */ _id?: string; /** How much of that line item is being refunded */ quantity?: number; } interface CalculateRefundResponse$1 { /** Total refundable amount */ total?: Price$3; /** Tax cost of the order */ tax?: Price$3; /** Discount given for this order */ discount?: Price$3; /** Total cost of the order (without tax) */ subtotal?: Price$3; /** Total shipping cost for order */ shipping?: Price$3; /** Previous refund given on that order */ previouslyRefundedAmount?: Price$3; /** The refundable items of that order */ items?: CalculateRefundItemResponse$1[]; } interface CalculateRefundItemResponse$1 { /** Line item ID */ _id?: string; /** Refundable amount for requested quantity of items (price of requested quantity of items without tax and discount) */ price?: Price$3; } interface VoidAuthorizedPaymentsRequest { /** Wix eCommerce order ID */ ecomOrderId: string; /** Payment IDs */ paymentIds: string[]; } interface VoidAuthorizedPaymentsResponse { /** All order's transactions after the void was triggered */ orderTransactions?: OrderTransactions$1; } interface CaptureAuthorizedPaymentsRequest { /** Wix eCommerce order ID */ ecomOrderId: string; /** Capture payments information */ payments: PaymentCapture[]; } interface PaymentCapture { /** Payment ID */ paymentId?: string | null; /** * Capture amount. * If not provided - full authorized amount will be captured. */ amount?: Price$3; } interface CaptureAuthorizedPaymentsResponse { /** All order's transactions after the capture was triggered */ orderTransactions?: OrderTransactions$1; } interface ChargeSavedPaymentMethodRequest { /** Ecom Order ID. */ ecomOrderId: string; /** Amount to be charged */ amount: Price$3; } interface ChargeSavedPaymentMethodResponse { /** Payment gateway's order ID (e.g Wix Payments) */ paymentGatewayOrderId?: string; } interface DiffmatokyPayload$2 { left?: string; right?: string; compareChannel?: string; entityId?: string; errorInformation?: ErrorInformation$2; tags?: string[]; } interface ErrorInformation$2 { stackTrace?: string; } interface ContinueSideEffectsFlowInLegacyData { storeId?: string; orderId?: string; ordersExperiments?: OrdersExperiments; } interface OrdersExperiments { epCommitTax?: boolean; moveMerchantEmailToEp?: boolean; moveBuyerOrderConfirmationEmailToEp?: boolean; producedByEpBridge?: boolean; enableRewrittenSideEffects?: boolean; } interface IndexingMessage$1 { _id?: string; opType?: number; requiredVersions?: string[]; } interface GetOrderRequest { /** ID of the order to retrieve. */ _id: string; } interface GetOrderResponse { /** The requested order. */ order?: Order$1; } interface InternalQueryOrdersResponse { /** List of orders. */ orders?: Order$1[]; /** Details on the paged set of results returned. */ metadata?: PlatformPagingMetadata; } interface QueryOrderRequest { /** Query options. */ query?: PlatformQuery; } interface QueryOrderResponse { /** List of orders. */ orders?: Order$1[]; /** Details on the paged set of results returned. */ metadata?: PlatformPagingMetadata; } interface SearchOrdersRequest { /** Search options. */ search?: CursorSearch; } interface CursorSearch extends CursorSearchPagingMethodOneOf { /** * Cursor paging options. * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging$7; /** * Filter object. * * For example, the following `filter` object will only return orders with payment statuses of paid and/or partially paid: * * `"filter": {"paymentStatus": {"$in": ["PAID", "PARTIALLY_PAID"]}}` * * Learn more about the [filter format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Array of sort objects that specify the order in which results should be sorted. * * For example, the following `sort` array will sort by `createdDate` in descending order: * * `"sort": [{"fieldName": "createdDate", "order":"DESC"}]`. * * Learn more about the [sort format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sort?: Sorting$7[]; } /** @oneof */ interface CursorSearchPagingMethodOneOf { /** * Cursor paging options. * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging$7; } interface SearchOrdersResponse { /** List of orders. */ orders?: Order$1[]; /** Details on the paged set of results returned. */ metadata?: CursorPagingMetadata$6; } interface CursorPagingMetadata$6 { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors$7; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; /** * Total number of items matching the filter. * Available only on the first page of *Search* results, not included in *Query* or *List* results. * If the Search results span multiple pages, the value of `total` will exceed the number of items returned on the first page. * @internal */ total?: number | null; } interface CreateOrderRequest { /** Order info. */ order: Order$1; /** * Determine order lifecycle * @internal */ settings?: OrderCreationSettings; } interface OrderCreationSettings { /** * Condition for the order to be approved. * Default: `DEFAULT` * @internal */ orderApprovalStrategy?: OrderApprovalStrategy; /** * Notification settings to be applied on order creation * @internal */ notifications?: OrderCreateNotifications; } enum OrderApprovalStrategy { /** When `order.priceSummary.total = 0`, **or** after receiving payment. */ DEFAULT = "DEFAULT", /** Order is approved **only** after receiving payment. */ PAYMENT_RECEIVED = "PAYMENT_RECEIVED", PAYMENT_METHOD_SAVED = "PAYMENT_METHOD_SAVED" } interface OrderCreateNotifications { /** * Whether to send notification to the buyer. * * Default: `true` * @internal */ sendNotificationToBuyer?: boolean | null; /** * Whether to send notifications to the business. * * Default: `true` * @internal */ sendNotificationsToBusiness?: boolean | null; } interface CreateOrderResponse { /** Newly created order. */ order?: Order$1; } interface UpdateOrderRequest { /** Order to be updated. */ order: Order$1; /** * Field mask of fields to update. * @internal */ fieldMask?: string[]; } interface UpdateOrderResponse { /** Newly created order. */ order?: Order$1; } interface BulkUpdateOrdersRequest { /** Orders to update. */ orders: MaskedOrder[]; /** * Whether to return the full order entities. * * Default: `false` */ returnEntity?: boolean; } interface MaskedOrder { /** Order to be updated. */ order?: Order$1; /** * Field mask of fields to update. * @internal */ fieldMask?: string[]; } interface BulkUpdateOrdersResponse { /** Bulk action results. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$1; } interface CommitDeltasRequest { /** Order id to be updated */ _id: string; /** * Draft order Id representing this change. * Use this ID to get this specific draft content. call .../v1/draft-orders/{draft_order_id}/get */ draftOrderId?: string; /** Draft order changes to be applied */ changes: DraftOrderDiffs; /** Side-effects to happen after order is updated */ commitSettings?: DraftOrderCommitSettings; /** Reason for edit, given by user (optional). */ reason?: string | null; } interface DraftOrderDiffs extends DraftOrderDiffsShippingUpdateInfoOneOf, DraftOrderDiffsBuyerUpdateInfoOneOf, DraftOrderDiffsBillingUpdateInfoOneOf, DraftOrderDiffsRecipientUpdateInfoOneOf { /** Shipping info and selected shipping option details. */ changedShippingInfo?: ShippingInformation$1; /** Remove existing shipping info. */ shippingInfoRemoved?: boolean; /** * Buyer info and selected buyer option details. * @internal */ changedBuyerInfo?: BuyerInfo$1; /** * Remove existing buyer info. * @internal */ buyerInfoRemoved?: boolean; /** * Updated billing info. * @internal */ changedBillingInfo?: AddressWithContact; /** * Remove existing billing info. * @internal */ billingInfoRemoved?: boolean; /** * Updated recipient info. * @internal */ changedRecipientInfo?: AddressWithContact; /** * Remove existing recipient info. * @internal */ recipientInfoRemoved?: boolean; /** Added/updated/removed order line items. */ lineItems?: V1LineItemDelta[]; /** Added/updated/removed discounts. */ appliedDiscounts?: AppliedDiscountDelta[]; /** Added/updated/removed additional fee. */ additionalFees?: AdditionalFeeDelta[]; /** * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Updated Tax summary. overwrites existing tax summary. * @deprecated Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Updated Tax summary. overwrites existing tax summary. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxSummary?: TaxSummary$1; /** * Updated order price summary. overwrites existing price summary. * balance will be updated automatically. */ priceSummary?: PriceSummary$1; /** * Tax information. * @internal */ taxInfo?: OrderTaxInfo; /** * Updated order extended fields. Overrides existing extended fields. todo fully? partially? * @internal */ extendedFields?: ExtendedFields$4; } /** @oneof */ interface DraftOrderDiffsShippingUpdateInfoOneOf { /** Shipping info and selected shipping option details. */ changedShippingInfo?: ShippingInformation$1; /** Remove existing shipping info. */ shippingInfoRemoved?: boolean; } /** @oneof */ interface DraftOrderDiffsBuyerUpdateInfoOneOf { /** * Buyer info and selected buyer option details. * @internal */ changedBuyerInfo?: BuyerInfo$1; /** * Remove existing buyer info. * @internal */ buyerInfoRemoved?: boolean; } /** @oneof */ interface DraftOrderDiffsBillingUpdateInfoOneOf { /** * Updated billing info. * @internal */ changedBillingInfo?: AddressWithContact; /** * Remove existing billing info. * @internal */ billingInfoRemoved?: boolean; } /** @oneof */ interface DraftOrderDiffsRecipientUpdateInfoOneOf { /** * Updated recipient info. * @internal */ changedRecipientInfo?: AddressWithContact; /** * Remove existing recipient info. * @internal */ recipientInfoRemoved?: boolean; } interface V1LineItemDelta extends V1LineItemDeltaDeltaOneOf { /** The line item was added. */ lineItemAdded?: boolean; /** The line item was modified. */ changedDetails?: ItemChangedDetails; /** The line item was added. */ lineItemRemoved?: boolean; /** Line item ID. */ lineItemId?: string; lineItem?: OrderLineItemChangedDetails; } /** @oneof */ interface V1LineItemDeltaDeltaOneOf { /** The line item was added. */ lineItemAdded?: boolean; /** The line item was modified. */ changedDetails?: ItemChangedDetails; /** The line item was added. */ lineItemRemoved?: boolean; } interface OrderLineItemChangedDetails { /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: ProductName; /** * References to the line item's origin catalog. * This field may be empty in the case of a custom line item. */ catalogReference?: CatalogReference$3; /** Line item quantity. */ quantity?: number; /** Total discount for this line item's entire quantity. */ totalDiscount?: Price$3; /** Line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: DescriptionLine[]; /** Line item image. */ image?: string; /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */ physicalProperties?: PhysicalProperties$2; /** Item type. Either a preset type or custom. */ itemType?: ItemType$1; /** * Fulfiller ID. Field is empty when the line item is self-fulfilled. * * To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://www.wix.com/velo/reference/wix-ecom-backend/orderfulfillments/listfulfillmentsforsingleorder). */ fulfillerId?: string | null; /** Line item price after line item discounts for display purposes. */ price?: Price$3; /** Line item price before line item discounts for display purposes. Defaults to `price` when not provided. */ priceBeforeDiscounts?: Price$3; /** Total price after all discounts and tax. */ totalPriceAfterTax?: Price$3; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. */ paymentOption?: DeltaPaymentOptionType; /** * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @deprecated Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxDetails?: ItemTaxFullDetails$1; /** * Represents all the relevant tax details for a specific line item. * @internal */ taxInfo?: LineItemTaxInfo; /** * Digital file identifier, relevant only for items with type DIGITAL. * @internal */ digitalFile?: DigitalFile$1; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription; /** Total price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: Price$3; /** Total price after all discounts excluding tax. */ totalPriceBeforeTax?: Price$3; /** * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin. * @internal */ customLineItem?: boolean | null; /** * Source locations for this line item. The location's total quantity must not exceed the line item quantity. * @internal */ locations?: LocationAndQuantity[]; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; /** Subscription info. */ subscriptionInfo?: SubscriptionInfo$1; } /** Type of selected payment option for catalog item */ enum DeltaPaymentOptionType { /** Irrelevant */ UNKNOWN_PAYMENT_OPTION = "UNKNOWN_PAYMENT_OPTION", /** The entire payment for the given item will happen after checkout. */ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE", /** * Payment for this item can only be done using a membership and must be manually redeemed in the dashboard by the site owner. * Note: when this option is used, the price will be 0. */ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE" } interface ItemChangedDetails { /** The quantity before the change. */ quantityBeforeChange?: number | null; /** The price before the change. */ priceBeforeChange?: Price$3; /** The price description before the change */ priceDescriptionBeforeChange?: PriceDescription; } interface AppliedDiscountDelta extends AppliedDiscountDeltaDeltaOneOf { editedDiscount?: AppliedDiscount$1; discountRemoved?: boolean; /** Discount id. */ discountId?: string; } /** @oneof */ interface AppliedDiscountDeltaDeltaOneOf { editedDiscount?: AppliedDiscount$1; discountRemoved?: boolean; } interface AdditionalFeeDelta extends AdditionalFeeDeltaDeltaOneOf { editedAdditionalFee?: AdditionalFee$1; additionalFeeRemoved?: boolean; /** Additional fee id. */ additionalFeeId?: string; } /** @oneof */ interface AdditionalFeeDeltaDeltaOneOf { editedAdditionalFee?: AdditionalFee$1; additionalFeeRemoved?: boolean; } interface DraftOrderCommitSettings { /** If false, do not send notifications to buyer. Default is true. */ sendNotificationsToBuyer?: boolean | null; /** If false, do not send notifications to business. Default is true. */ sendNotificationsToBusiness?: boolean | null; /** If false, do not add activities to the order. Default is true. */ addActivitiesToOrder?: boolean | null; /** If false, do not send mails to custom fulfillers in case of a change of shippable items fulfilled by custom fulfillers. Default is true. */ sendNotificationsToCustomFulfillers?: boolean | null; /** Inventory changes to be applied. Either to restock, or decrease. */ inventoryUpdates?: InventoryUpdateDetails[]; } interface InventoryUpdateDetails { /** Action to be applied - decrease or restock */ actionType?: InventoryAction; /** Order line item id */ lineItemId?: string; /** The amount to be increased or restocked */ quantityChange?: number; } enum InventoryAction { /** Restock inventory */ RESTOCK = "RESTOCK", /** Decrease inventory. Without failing on negative inventory. */ DECREASE = "DECREASE" } interface CommitDeltasResponse { /** Order after deltas are applied */ order?: Order$1; } /** Triggered when order is edited by draftOrders */ interface OrderDeltasCommitted { /** The order after committed changes. */ order?: Order$1; /** Draft order Id representing this change. */ draftOrderId?: string; /** Applied changes. */ changes?: CommittedDiffs; /** Side-effects requested to happen as a result of this edit. */ commitSettings?: DraftOrderCommitSettings; /** * Date and time when order deltas were committed. * @readonly */ commitDate?: Date | null; } interface CommittedDiffs extends CommittedDiffsShippingUpdateInfoOneOf { /** Shipping info and selected shipping option details. */ changedShippingInfo?: ShippingInformation$1; /** Remove existing shipping info. */ shippingInfoRemoved?: boolean; /** Added/updated/removed order line items. */ lineItems?: LineItemDelta[]; /** Added/updated/removed discounts. */ appliedDiscounts?: AppliedDiscountDelta[]; /** Added/updated/removed additional fee. */ additionalFees?: AdditionalFeeDelta[]; } /** @oneof */ interface CommittedDiffsShippingUpdateInfoOneOf { /** Shipping info and selected shipping option details. */ changedShippingInfo?: ShippingInformation$1; /** Remove existing shipping info. */ shippingInfoRemoved?: boolean; } interface LineItemDelta extends LineItemDeltaDeltaOneOf { lineItemAdded?: boolean; changedDetails?: ItemChangedDetails; lineItemRemoved?: OrderLineItemChangedDetails; /** Line item ID. */ lineItemId?: string; } /** @oneof */ interface LineItemDeltaDeltaOneOf { lineItemAdded?: boolean; changedDetails?: ItemChangedDetails; lineItemRemoved?: OrderLineItemChangedDetails; } interface ArchiveOrderRequest { /** Order ID. */ _id: string; } interface ArchiveOrderResponse { /** Archived order. */ order?: Order$1; } interface BulkArchiveOrdersRequest { /** IDs of orders to archive. */ ids: string[]; /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } interface BulkArchiveOrdersResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$1; } interface BulkArchiveOrdersByFilterRequest { /** Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Record | null; } interface BulkArchiveOrdersByFilterResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$1; } interface UnArchiveOrderRequest { /** Order ID. */ _id: string; } interface UnArchiveOrderResponse { /** Unarchived order. */ order?: Order$1; } interface BulkUnArchiveOrdersRequest { /** IDs or orders to unarchive. */ ids: string[]; /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } interface BulkUnArchiveOrdersResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$1; } interface BulkUnArchiveOrdersByFilterRequest { /** Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Record | null; } interface BulkUnArchiveOrdersByFilterResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$1; } interface UpdateBuyerInfoRequest { /** * Order ID. * @readonly */ _id: string; /** * Field mask of buyerInfo fields to update. * @internal */ fieldMask?: string[]; /** Buyer info. */ buyerInfo?: BuyerInfoUpdate; } interface BuyerInfoUpdate { /** Contact ID. */ contactId?: string | null; /** Email associated with the buyer. */ email?: string | null; } interface UpdateBuyerInfoResponse { /** Updated order. */ order?: Order$1; } interface UpdateBuyerEmailRequest { /** @readonly */ _id: string; email?: string | null; } interface UpdateBuyerEmailResponse { order?: Order$1; } interface UpdateOrderShippingAddressRequest { /** Order ID. */ _id: string; /** * mask of shipping address fields to update * @internal */ fieldMask?: string[]; /** Shipping address and contact details to be updated. */ shippingAddress: AddressWithContact; } interface UpdateOrderShippingAddressResponse { /** Updated order. */ order?: Order$1; } interface UpdateBillingContactDetailsRequest { /** * Order ID. * @readonly */ _id: string; /** * mask of contact details fields to update * @internal */ fieldMask?: string[]; /** Contact details. */ addressContactDetails?: FullAddressContactDetails$1; } interface UpdateBillingContactDetailsResponse { /** Updated order. */ order?: Order$1; } interface UpdateOrderLineItemRequest { /** Order ID */ _id: string; /** Order line item to update */ lineItem: OrderLineItem; /** * Field mask of fields to update. * @internal */ fieldMask?: string[]; } interface UpdateOrderLineItemResponse { /** Updated order data */ order?: Order$1; } interface UpdateOrderLineItemsRequest { /** Order ID */ orderId: string; /** Order line items to update */ lineItems: MaskedOrderLineItem[]; } interface MaskedOrderLineItem { /** Order line item to update */ lineItem?: OrderLineItem; /** * Field mask of fields to update. * @internal */ fieldMask?: string[]; } interface UpdateOrderLineItemsResponse { /** Updated order data */ order?: Order$1; } interface AddInternalActivityRequest { /** Order ID. */ _id: string; /** Activity info. */ activity: InternalActivity; } interface InternalActivity extends InternalActivityContentOneOf { /** Order refunded. */ orderRefunded?: OrderRefunded$1; /** Order placed. */ orderPlaced?: OrderPlaced; /** Order paid. Either by the store owner (for offline orders), or when an online transaction was confirmed. */ orderPaid?: OrderPaid; /** Order shipping status set as fulfilled. */ orderFulfilled?: OrderFulfilled; /** Order shipping status set as not fulfilled. */ orderNotFulfilled?: OrderNotFulfilled; /** Order canceled. */ orderCanceled?: OrderCanceled; /** Download link was sent (relevant for orders with digital line items). */ downloadLinkSent?: DownloadLinkSent; /** Shipping tracking number added to order. */ trackingNumberAdded?: TrackingNumberAdded; /** Shipping tracking number was edited. */ trackingNumberEdited?: TrackingNumberEdited; /** Shipping tracking link added to order. */ trackingLinkAdded?: TrackingLinkAdded; /** An email confirmation of order shipment was sent. */ shippingConfirmationEmailSent?: ShippingConfirmationEmailSent; /** Invoice was added to order. */ invoiceAdded?: InvoiceAdded; /** Invoice sent to customer via email. */ invoiceSent?: InvoiceSent; /** Email sent to fulfiller. */ fulfillerEmailSent?: FulfillerEmailSent; /** Shipping address was updated. */ shippingAddressEdited?: ShippingAddressEdited; /** Order email was updated. */ emailEdited?: EmailEdited; /** Email notification for pickup sent. */ pickupReadyEmailSent?: PickupReadyEmailSent; /** Order created as a result of items exchange. */ orderCreatedFromExchange?: OrderCreatedFromExchange; /** New exchange order created. */ newExchangeOrderCreated?: NewExchangeOrderCreated; /** Order partially paid. During the checkout for orders with deposit items. */ orderPartiallyPaid?: OrderPartiallyPaid; /** Draft order changes applied */ draftOrderChangesApplied?: DraftOrderChangesApplied; /** Payment method is saved for order */ savedPaymentMethod?: SavedPaymentMethod; /** * Details of an authorized payment created. * @internal */ authorizedPaymentCreated?: AuthorizedPaymentCreated; /** * Details of an authorized payment captured. * @internal */ authorizedPaymentCaptured?: AuthorizedPaymentCaptured; /** * Details of an authorized payment voided. * @internal */ authorizedPaymentVoided?: AuthorizedPaymentVoided; /** * Details of an initiated refund process. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ refundInitiated?: RefundInitiated; /** * Details of a refunded payment. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefunded?: PaymentRefunded; /** * Details of a failed payment refund. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefundFailed?: PaymentRefundFailed; /** * Details of refund to store credit. * @internal */ refundedAsStoreCredit?: RefundedAsStoreCredit; /** Details of a pending payment */ paymentPending?: PaymentPending; /** Details of a canceled payment */ paymentCanceled?: PaymentCanceled; /** Details of a declined payment */ paymentDeclined?: PaymentDeclined; /** Order pending */ orderPending?: OrderPending; /** Order rejected */ orderRejected?: OrderRejected; /** * Internal activity ID. * @readonly */ _id?: string | null; /** * Internal activity author's email. * @readonly */ authorEmail?: string | null; /** * Internal activity creation date and time. * @readonly */ _createdDate?: Date | null; } /** @oneof */ interface InternalActivityContentOneOf { /** Order refunded. */ orderRefunded?: OrderRefunded$1; /** Order placed. */ orderPlaced?: OrderPlaced; /** Order paid. Either by the store owner (for offline orders), or when an online transaction was confirmed. */ orderPaid?: OrderPaid; /** Order shipping status set as fulfilled. */ orderFulfilled?: OrderFulfilled; /** Order shipping status set as not fulfilled. */ orderNotFulfilled?: OrderNotFulfilled; /** Order canceled. */ orderCanceled?: OrderCanceled; /** Download link was sent (relevant for orders with digital line items). */ downloadLinkSent?: DownloadLinkSent; /** Shipping tracking number added to order. */ trackingNumberAdded?: TrackingNumberAdded; /** Shipping tracking number was edited. */ trackingNumberEdited?: TrackingNumberEdited; /** Shipping tracking link added to order. */ trackingLinkAdded?: TrackingLinkAdded; /** An email confirmation of order shipment was sent. */ shippingConfirmationEmailSent?: ShippingConfirmationEmailSent; /** Invoice was added to order. */ invoiceAdded?: InvoiceAdded; /** Invoice sent to customer via email. */ invoiceSent?: InvoiceSent; /** Email sent to fulfiller. */ fulfillerEmailSent?: FulfillerEmailSent; /** Shipping address was updated. */ shippingAddressEdited?: ShippingAddressEdited; /** Order email was updated. */ emailEdited?: EmailEdited; /** Email notification for pickup sent. */ pickupReadyEmailSent?: PickupReadyEmailSent; /** Order created as a result of items exchange. */ orderCreatedFromExchange?: OrderCreatedFromExchange; /** New exchange order created. */ newExchangeOrderCreated?: NewExchangeOrderCreated; /** Order partially paid. During the checkout for orders with deposit items. */ orderPartiallyPaid?: OrderPartiallyPaid; /** Draft order changes applied */ draftOrderChangesApplied?: DraftOrderChangesApplied; /** Payment method is saved for order */ savedPaymentMethod?: SavedPaymentMethod; /** * Details of an authorized payment created. * @internal */ authorizedPaymentCreated?: AuthorizedPaymentCreated; /** * Details of an authorized payment captured. * @internal */ authorizedPaymentCaptured?: AuthorizedPaymentCaptured; /** * Details of an authorized payment voided. * @internal */ authorizedPaymentVoided?: AuthorizedPaymentVoided; /** * Details of an initiated refund process. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ refundInitiated?: RefundInitiated; /** * Details of a refunded payment. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefunded?: PaymentRefunded; /** * Details of a failed payment refund. * * > **Note:** A single `refund_initiated` activity can result in multiple `payment_refunded` or `payment_refund_failed` activities. * > In these cases, the `refund_id` will be identical across the activities. * @internal */ paymentRefundFailed?: PaymentRefundFailed; /** * Details of refund to store credit. * @internal */ refundedAsStoreCredit?: RefundedAsStoreCredit; /** Details of a pending payment */ paymentPending?: PaymentPending; /** Details of a canceled payment */ paymentCanceled?: PaymentCanceled; /** Details of a declined payment */ paymentDeclined?: PaymentDeclined; /** Order pending */ orderPending?: OrderPending; /** Order rejected */ orderRejected?: OrderRejected; } /** Order placed */ interface OrderPlaced { } /** Order marked as paid, either by the store owner (for offline orders), or when an online transaction was confirmed */ interface OrderPaid { } /** Order shipping status set as fulfilled */ interface OrderFulfilled { } /** Order shipping status set as not fulfilled */ interface OrderNotFulfilled { } /** Order canceled */ interface OrderCanceled { } /** A download link was sent (relevant for orders with digital line items) */ interface DownloadLinkSent { } /** Shipping tracking number was set */ interface TrackingNumberAdded { } /** Shipping tracking number was edited */ interface TrackingNumberEdited { } /** Shipping tracking link was set */ interface TrackingLinkAdded { } /** An email confirmation of order shipment was sent */ interface ShippingConfirmationEmailSent { } /** Invoice was set in the order */ interface InvoiceAdded { } /** Invoice sent to customer via email */ interface InvoiceSent { } /** Email was sent to fulfiller */ interface FulfillerEmailSent { } /** Shipping address was updated */ interface ShippingAddressEdited { } /** Order email was updated */ interface EmailEdited { } /** An email notification for pickup was sent */ interface PickupReadyEmailSent { } /** Order marked as partially paid when an online transaction was confirmed with partial minimal required amount of total sum */ interface OrderPartiallyPaid { } /** Order reject */ interface OrderPending { } /** Order reject */ interface OrderRejected { } interface AddInternalActivityResponse { /** Updated order. */ order?: Order$1; /** * ID of the added internal activity. * Use this ID to either [update](https://bo.wix.com/wix-docs/rest/ecommerce/orders/update-activity) or [delete](https://bo.wix.com/wix-docs/rest/ecommerce/orders/delete-activity) the activity. */ activityId?: string; } interface AddActivityRequest { /** Order ID. */ _id: string; /** Activity info. */ activity: PublicActivity; } interface PublicActivity extends PublicActivityContentOneOf { /** Custom activity details. */ customActivity?: CustomActivity; /** Merchant commment. */ merchantComment?: MerchantComment; } /** @oneof */ interface PublicActivityContentOneOf { /** Custom activity details. */ customActivity?: CustomActivity; /** Merchant commment. */ merchantComment?: MerchantComment; } interface AddActivityResponse { /** Updated order. */ order?: Order$1; /** * ID of the added activity. * Use this ID to either [update](https://bo.wix.com/wix-docs/rest/ecommerce/orders/update-activity) or [delete](https://bo.wix.com/wix-docs/rest/ecommerce/orders/delete-activity) the activity. */ activityId?: string; } interface AddActivitiesRequest { /** Order ID. */ orderId: string; /** Activities to add. */ activities: PublicActivity[]; } interface AddActivitiesResponse { /** Updated order. */ order?: Order$1; /** * IDs of the added activities. * Use this IDs to either [update](https://bo.wix.com/wix-docs/rest/ecommerce/orders/update-activities) or [delete](https://bo.wix.com/wix-docs/rest/ecommerce/orders/delete-activities) the activities. */ activityIds?: string[]; } interface UpdateActivityRequest { /** Order ID. */ _id: string; /** ID of the activity to update. */ activityId: string; /** Activity info. */ activity: PublicActivity; } interface UpdateActivityResponse { /** Updated order. */ order?: Order$1; } interface DeleteActivityRequest { /** Order ID. */ _id: string; /** ID of the activity to delete. */ activityId: string; } interface DeleteActivityResponse { /** Updated order. */ order?: Order$1; } interface UpdateLineItemsDescriptionLinesRequest { /** Order ID. */ _id: string; /** Line items. */ lineItems: LineItemUpdate[]; } interface LineItemUpdate { /** Line item ID. */ lineItemId?: string; /** * Description lines' info. * If description line already exists for this name, it will be replaced. */ descriptionLines?: DescriptionLine[]; } interface UpdateLineItemsDescriptionLinesResponse { /** Updated order. */ order?: Order$1; } interface MarkOrderAsSeenByHumanRequest { /** Order ID. */ _id: string; } interface MarkOrderAsSeenByHumanResponse { /** Updated order. */ order?: Order$1; } interface CancelOrderRequest { /** Order ID. */ _id: string; /** Whether to send an order canceled email to the buyer. */ sendOrderCanceledEmail?: boolean; /** Custom note to be added to the email (optional). */ customMessage?: string | null; /** Whether to restock all items in the order. This will only apply to products in the Wix Stores inventory. */ restockAllItems?: boolean; } interface CancelOrderResponse { /** Canceled order. */ order?: Order$1; } interface OrderCanceledEventOrderCanceled { /** The order that was cancelled */ order?: Order$1; /** Should restock all items on that order */ restockAllItems?: boolean; /** Should send a confirmation mail to the customer */ sendOrderCanceledEmail?: boolean; /** Personal note added to the email */ customMessage?: string | null; } interface MarkAsFulfilledRequest { /** Order ID. */ _id: string; } interface MarkAsFulfilledResponse { /** Updated order. */ order?: Order$1; } /** Triggered when the fulfillment status of an order is updated */ interface FulfillmentStatusUpdated { /** The order that was updated */ order?: Order$1; /** The previous status (before the update) */ previousFulfillmentStatus?: FulfillmentStatus$1; /** the new status (after the update) */ newFulfillmentStatus?: FulfillmentStatus$1; /** the action that caused this update */ action?: string; } interface BulkMarkAsFulfilledRequest { /** IDs of orders to be marked as fulfilled. */ ids: string[]; /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } interface BulkMarkAsFulfilledResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$1; } interface BulkMarkAsFulfilledByFilterRequest { /** Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Record | null; } interface BulkMarkAsFulfilledByFilterResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$1; } interface MarkAsUnfulfilledRequest { /** Order ID. */ _id: string; } interface MarkAsUnfulfilledResponse { /** Updated order. */ order?: Order$1; } interface BulkMarkAsUnfulfilledRequest { /** IDs of orders to be marked as not fulfilled. */ ids: string[]; /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } interface BulkMarkAsUnfulfilledResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$1; } interface BulkMarkAsUnfulfilledByFilterRequest { /** Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). */ filter: Record | null; } interface BulkMarkAsUnfulfilledByFilterResponse { /** Items updated by bulk action. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$1; } interface V1MarkOrderAsPaidRequest { /** Order ID. */ _id: string; } interface V1MarkOrderAsPaidResponse { /** Updated order. */ order?: Order$1; } interface V1BulkMarkOrdersAsPaidRequest { /** IDs of orders to mark as paid. */ ids: string[]; } interface V1BulkMarkOrdersAsPaidResponse { /** * Items updated by the bulk action. * The Order entity within the results optimistically changes its payment status to paid, however this process is async. */ results?: BulkOrderResult[]; /** Bulk action metadata. */ bulkActionMetadata?: BulkActionMetadata$1; } interface V1CreatePaymentGatewayOrderRequest { /** eCom Order ID */ ecomOrderId: string; } interface V1CreatePaymentGatewayOrderResponse { /** ID of the order created in the payment gateway */ paymentGatewayOrderId?: string; } interface GetShipmentsRequest { _id: string; } interface GetShipmentsResponse { shipmentIds?: string[]; } interface AggregateOrdersRequest { /** Filter applied to original data */ filter?: Record | null; /** This is an object defining aggregation itself */ aggregation: Record | null; /** * Optional custom separator string that can be used to override default separator value '|' * for hierarchical responses of multifaceted aggregation requests like: * '{"aggregation": {"example_request_key": {"$count" : ["deliveryMethod", "shippingRegion"]}}}' * with example response for default '|' separator like: * '{"aggregates" :{"example_request_key": {"(Mail|Region 1)": 5, "(Pickup|Region 2)": 10}}}' */ hierarchySeparatorOverride?: string | null; } interface AggregateOrdersResponse { aggregates?: Record | null; } interface DecrementItemsQuantityRequest { /** Order ID */ _id: string; /** Which items to decrement, and how much to decrement from each one */ decrementData: DecrementData[]; } interface DecrementData { /** ID of the line item being decremented. */ lineItemId?: string; /** Line item quantity being decremented. */ decrementBy?: number; /** Whether to restock the line item (triggers inventory update). */ restock?: boolean; } interface DecrementItemsQuantityResponse { /** Updated order data */ order?: Order$1; } interface BulkUpdateOrderTagsRequest { /** IDs of orders to update tags for. */ orderIds: string[]; /** Tags to be added to orders */ assignTags?: Tags; /** Tags to be removed from orders */ unassignTags?: Tags; } interface BulkUpdateOrderTagsResponse { results?: BulkUpdateOrderTagsResult[]; bulkActionMetadata?: BulkActionMetadata$1; } interface BulkUpdateOrderTagsResult { itemMetadata?: ItemMetadata$1; } /** Triggered when the the order status changes to approved */ interface OrderApproved { /** The order that was updated */ order?: Order$1; /** @internal */ ordersExperiments?: OrdersExperiments; } interface Task { key?: TaskKey; executeAt?: Date | null; payload?: string | null; } interface TaskKey { appId?: string; instanceId?: string; subjectId?: string | null; } interface TaskAction extends TaskActionActionOneOf { complete?: Complete; cancel?: Cancel; reschedule?: Reschedule; } /** @oneof */ interface TaskActionActionOneOf { complete?: Complete; cancel?: Cancel; reschedule?: Reschedule; } interface Complete { } interface Cancel { } interface Reschedule { executeAt?: Date | null; payload?: string | null; } interface InvoiceSentEvent { _id?: IdAndVersion; /** @readonly */ data?: InvoiceFields; /** @readonly */ status?: InvoiceStatus; } interface IdAndVersion { _id?: string | null; version?: number | null; } interface InvoiceFields { /** The invoice number allocated the invoice by the server. The number is limited to at most 11 digits. */ number?: string | null; /** The invoice 3-letter currency code in [ISO-4217 alphabetic](https://www.iso.org/iso-4217-currency-codes.html) format. */ currencyCode?: string | null; /** The invoice customer. The customer must be a contact of the site, with an email. */ customer?: Customer; /** * Invoice dates: issue date and due date are mandatory and provided when the invoice is created. * Last seen date is the optional date when the invoice was last seen be UoU. */ dates?: InvoiceDates; /** * Line items containing the details of the products or services relevant to the invoice, with their name, prices, * and quantity. There must be at least one line item on the invoice. */ lineItems?: LineItems; /** * Locale of the invoice, containing the language. * This field is not mandatory but is used for display purposes, to determine the appearance of numbers and dates * on the invoice. */ locale?: Locale; /** * The totals on the invoice. * The totals.subtotal, totals.total and totals.taxed_amount are calculated by the server based on the line items. * Alternatively, these fields can be provided in the invoice creation request, in this case, these values are fixed. * The totals contain fees and a discount, that apply to the invoice. */ totals?: TotalPrice; /** An optional discount on the invoice. */ discount?: Discount$1; /** The taxes of the invoice. */ taxes?: CalculatedTaxes; /** The payments on the invoice. The invoice has status paid if its payments cover the invoice total. */ payments?: Payments; /** Invoice metadata */ metaData?: MetaData; /** * Not used * @deprecated */ creationAdditional_BIInformation?: string | null; /** * The balance and amount paid on the invoice. * This read-only field is calculated based on the invoice totals and payments. * @readonly */ dynamicTotals?: InvoiceDynamicPriceTotals; /** The invoice title */ title?: string | null; /** Invoice custom fields */ customFields?: CustomFieldValue[]; /** * Not used * @deprecated */ designTemplateId?: string | null; /** * Not used * @deprecated */ createOrder?: boolean | null; /** The optional deposit of the invoice */ deposit?: Deposit; /** Associated checkout for this invoice */ ecomCheckoutId?: string | null; /** * Deduct taxes from line items. * Used in cases where line items already include taxes. * @internal */ deductTaxes?: boolean | null; } interface Customer { contactId?: string | null; name?: string | null; email?: Email; address?: QuotesAddress; phone?: Phone; company?: Company; firstName?: string | null; lastName?: string | null; billingAddress?: CommonAddress; shippingAddress?: CommonAddress; } interface Email { address?: string; } interface QuotesAddress { street?: string | null; city?: string | null; zip?: string | null; state?: string | null; country?: string | null; /** @readonly */ description?: AddressDescription; } interface AddressDescription { content?: string; placement?: Placement; } enum Placement { Unknown = "Unknown", Replace = "Replace", Before = "Before", After = "After" } interface Phone { number?: string; } interface Company { name?: string; _id?: string | null; } /** Physical address */ interface CommonAddress extends CommonAddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress$4; /** Main address line, usually street and number as free text. */ addressLine1?: string | null; /** Country code. */ country?: string | null; /** Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. e.g. NY */ subdivision?: string | null; /** City name. */ city?: string | null; /** Zip/postal code. */ postalCode?: string | null; /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2?: string | null; /** * A string containing the full address of this location. * @internal */ formatted?: string | null; /** * Coordinates of the physical address. * @internal */ location?: AddressLocation$3; /** * Country full name. * @internal */ countryFullname?: string | null; /** * Subdivision full name. * @internal */ subdivisionFullname?: string | null; /** * Multi-level subdivisions from top to bottom. * @internal */ subdivisions?: Subdivision$1[]; } /** @oneof */ interface CommonAddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress$4; /** Main address line, usually street and number as free text. */ addressLine?: string | null; } interface Subdivision$1 { /** Short subdivision code. */ code?: string; /** Subdivision full name. */ name?: string; /** * Subdivision level * @internal */ type?: SubdivisionType$1; /** * Free text description of subdivision type. * @internal */ typeInfo?: string | null; /** * Standard organizations details (e.g. ISO). * @internal */ standardDetails?: StandardDetails; } enum SubdivisionType$1 { UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE", /** State */ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1", /** County */ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2", /** City/town */ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3", /** Neighborhood/quarter */ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4", /** Street/block */ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5", /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */ COUNTRY = "COUNTRY" } /** Subdivision Concordance values */ interface StandardDetails { /** subdivision iso-3166-2 code according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). e.g. US-NY, GB-SCT, NO-30 */ iso31662?: string | null; } interface InvoiceDates { /** use UTC midnight date to set the issue date according to the site time zone */ issueDate?: Date | null; /** use UTC midnight date to set the due date according to the site time zone */ dueDate?: Date | null; /** Valid time zones */ timeZoneCode?: string | null; /** * ignored in request use in response to get the site time zone * @readonly */ lastSeenDate?: Date | null; } interface LineItems { lineItems?: LineItem$2[]; } interface LineItem$2 { _id?: string; name?: string; description?: string | null; price?: BigDecimalWrapper; taxedTotal?: BigDecimalWrapper; quantity?: BigDecimalWrapper; taxes?: LineItemTax[]; /** The source of the line item */ source?: Source$2; /** The line-item level metadata. */ metadata?: LineItemMetaData; } interface BigDecimalWrapper { serializedValue?: number; } interface LineItemTax { name?: string; rate?: BigDecimalWrapper; code?: string | null; } interface Source$2 { /** * Source app or service ID. * @readonly */ sourceId?: string; /** * App or service type. * @readonly */ sourceType?: SourceType; } enum SourceType { UNKNOWN_SOURCE_TYPE = "UNKNOWN_SOURCE_TYPE", WIX_APP = "WIX_APP", EXTERNAL = "EXTERNAL", ADMIN = "ADMIN", OTHER = "OTHER" } interface LineItemMetaData { metadata?: Record; } interface Locale { /** ISO 639 alpha-2 or alpha-3 language code, or a language subtag */ language?: string; /** An ISO 3166 alpha-2 country code or a UN M.49 numeric-3 area code. */ country?: string | null; invariant?: string | null; } interface TotalPrice { /** the subtotal of the line items without the tax reduction */ subtotal?: BigDecimalWrapper; /** the total price taking into account the itemized fees and the taxes */ total?: BigDecimalWrapper; fees?: ItemizedFee[]; discountAmount?: BigDecimalWrapper; taxedAmount?: BigDecimalWrapper; } interface ItemizedFee { name?: string; price?: BigDecimalWrapper; } interface Discount$1 extends DiscountOneDiscountTypeOneOf { /** * Discount as fixed value. Currently only for internal use. * @internal */ fixed?: BigDecimalWrapper; /** Discount as percentage value. */ percentage?: BigDecimalWrapper; } /** @oneof */ interface DiscountOneDiscountTypeOneOf { /** * Discount as fixed value. Currently only for internal use. * @internal */ fixed?: BigDecimalWrapper; /** Discount as percentage value. */ percentage?: BigDecimalWrapper; } interface CalculatedTaxes { /** consider calculated or not - cannot enforce set */ taxes?: CalculatedTax[]; } interface CalculatedTax { name?: string; rate?: BigDecimalWrapper; /** the costs on which the taxes are applied */ taxable?: BigDecimalWrapper; /** the taxes as a result of the */ taxed?: BigDecimalWrapper; code?: string | null; } interface Payments { payments?: InvoicesPayment[]; } interface InvoicesPayment { /** document */ _id?: string; type?: string; amount?: BigDecimalWrapper; date?: Date | null; /** * The orderId of the order in cashier associated with the payment. * This field is populated for external payments that are charged by invoices via AddPayment endpoint. */ orderId?: string | null; /** * The transactionId corresponding to the orderId of the payment which are returned by cashier. * This field is populated for external payments that are charged by invoices via AddPayment endpoint as well. */ transactionId?: string | null; } interface MetaData { notes?: string | null; legalTerms?: string | null; sourceUrl?: string | null; sourceProperties?: Record; source?: string | null; sourceRefId?: string | null; /** Optional indicator whether to allow editing of the invoice by other applications other than the source. Default is true. */ allowEditByOthers?: boolean | null; } interface InvoiceDynamicPriceTotals { paidAmount?: BigDecimalWrapper; balance?: BigDecimalWrapper; } /** * A custom field value is used to add additional data to a financial document or to a financial document template. * The custom field value may be based on a custom field definition. */ interface CustomFieldValue { /** * The unique id of the custom field value * @readonly */ _id?: string | null; /** The display name of the custom field value */ displayName?: string; /** The optional namespace of the custom field value. This field may be used to indicate intended usage or source. */ namespace?: string | null; /** The group of the custom field indicates its intended placement in the financial document */ group?: CustomFieldGroup; /** The value of the custom field */ value?: Value; /** The optional key of the custom field definition on which the custom field value is based */ originCustomFieldKey?: string | null; } enum CustomFieldGroup { UNKNOWN_CUSTOM_FIELD_GROUP = "UNKNOWN_CUSTOM_FIELD_GROUP", BUSINESS_DETAILS = "BUSINESS_DETAILS", CUSTOMER_DETAILS = "CUSTOMER_DETAILS", DOCUMENT = "DOCUMENT", FOOTER = "FOOTER", OTHER = "OTHER" } interface Value { value?: string; valueType?: ValueType; } enum ValueType { UNKNOWN_VALUE_TYPE = "UNKNOWN_VALUE_TYPE", STRING = "STRING", DATE = "DATE", BOOLEAN = "BOOLEAN", NUMBER = "NUMBER" } interface Deposit { /** The flat amount of the deposit. The flat amount of the deposit must be less than the invoice total. */ flatAmount?: string; /** * The read-only percentage value of the deposit. * It is computed according to the flat_amount and the invoice total and is rounded to 2 digits precision. * @readonly */ percentage?: string; /** The type of the deposit. The default is FLAT. */ type?: DepositType; } enum DepositType { UNKNOWN = "UNKNOWN", FLAT = "FLAT", PERCENTAGE = "PERCENTAGE" } /** * InvoiceStatus allowed transitions based on current status: * Draft -> Deleted, Paid, Partially Paid, Sent * Sent -> Draft, Deleted, Void, Paid, Partially Paid, Processing, (Overdue) * Processing -> PartiallyPaid, Paid, Sent * Paid -> Void * PartiallyPaid -> Void, (PartialAndOverdue) * Void -> Deleted * Deleted */ enum InvoiceStatus { Draft = "Draft", Sent = "Sent", Processing = "Processing", Paid = "Paid", Overdue = "Overdue", Void = "Void", Deleted = "Deleted", PartiallyPaid = "PartiallyPaid", PartialAndOverdue = "PartialAndOverdue" } interface TriggerSideEffectsFromLegacyData { storeId?: string; orderId?: string; ordersExperiments?: OrdersExperiments; } /** * Retrieves metadata for given metasiteID using metasiteReadApi get RPC call * Target msid must be provided * @param metasiteId - meta site Id for data to retrieve * @internal * @documentationMaturity preview * @requiredField metasiteId * @adminMethod */ function getMetasiteData(metasiteId: string): Promise; /** * Retrieves orders for given metasiteID using ep-orders internalQueryOrders RPC call * Target msid must be provided * @param metasiteId - meta site Id for EP orders to retrieve * @internal * @documentationMaturity preview * @requiredField metasiteId * @adminMethod */ function queryOrdersForMetasite(metasiteId: string, options?: QueryOrdersForMetasiteOptions): Promise; interface QueryOrdersForMetasiteOptions { /** paginated internal orders query request */ internalQueryOrdersRequest?: InternalQueryOrdersRequest; } /** * Retrieves order for given metasiteId and orderId using ep-orders getOrder RPC call * Target msid and orderId must be provided * @internal * @documentationMaturity preview * @requiredField identifiers * @requiredField identifiers.metasiteId * @requiredField identifiers.orderId * @adminMethod */ function getOrderForMetasite(identifiers: GetOrderForMetasiteIdentifiers): Promise; interface GetOrderForMetasiteIdentifiers { /** meta site Id for EP order to retrieve */ metasiteId: string; /** Order Id for EP order to retrieve */ orderId: string; } /** * Retrieves order transactions for given metasiteId and orderId using ep-payments listTransactionsForSingleOrder RPC call * Target msid and orderId must be provided * @internal * @documentationMaturity preview * @requiredField identifiers * @requiredField identifiers.metasiteId * @requiredField identifiers.orderId * @adminMethod */ function listOrderTransactionsForMetasite(identifiers: ListOrderTransactionsForMetasiteIdentifiers): Promise; interface ListOrderTransactionsForMetasiteIdentifiers { /** meta site Id for EP order transactions to retrieve */ metasiteId: string; /** Order Id for EP order transactions to retrieve */ orderId: string; } /** @internal * @documentationMaturity preview * @requiredField metasiteId * @permissionId ECOM.REINDEX_ORDERS * @adminMethod */ function triggerReindex(metasiteId: string, options?: TriggerReindexOptions): Promise; interface TriggerReindexOptions { orderIds?: string[]; } /** @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.SEND_ORDER_MAIL */ function sendBuyerConfirmationEmail(orderId: string): Promise; /** @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.SEND_ORDER_MAIL */ function sendBuyerPaymentsReceivedEmail(orderId: string): Promise; /** @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.SEND_ORDER_MAIL */ function sendBuyerPickupConfirmationEmail(orderId: string): Promise; /** @internal * @documentationMaturity preview * @permissionId ECOM.SEND_ORDER_MAIL * @deprecated * @targetRemovalDate 2025-03-02 */ function bulkSendBuyerPickupConfirmationEmails(options?: BulkSendBuyerPickupConfirmationEmailsOptions): Promise; interface BulkSendBuyerPickupConfirmationEmailsOptions { /** IDs of orders to send pickup emails for. */ orderIds?: string[]; } /** @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.SEND_ORDER_MAIL */ function sendBuyerShippingConfirmationEmail(orderId: string): Promise; /** @internal * @documentationMaturity preview * @permissionId ECOM.SEND_ORDER_MAIL * @deprecated * @targetRemovalDate 2025-03-02 */ function bulkSendBuyerShippingConfirmationEmails(options?: BulkSendBuyerShippingConfirmationEmailsOptions): Promise; interface BulkSendBuyerShippingConfirmationEmailsOptions { /** IDs of orders to send pickup emails for. */ orderIds?: string[]; } /** * this will send notification to merchant via both email and via Notification Hub * @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.SEND_ORDER_MAIL */ function sendMerchantOrderReceivedNotification(orderId: string): Promise; /** @param orderId - The ID of order that is canceled/refunded * @internal * @documentationMaturity preview * @requiredField options.refundAmount * @requiredField options.refundAmount.amount * @requiredField orderId * @permissionId ECOM.SEND_ORDER_MAIL */ function sendCancelRefundEmail(orderId: string, options?: SendCancelRefundEmailOptions): Promise; interface SendCancelRefundEmailOptions { /** Personal note added to the email (optional) */ customMessage?: string | null; /** Refund amount */ refundAmount: Price$3; /** Refund ID. (Optional) */ refundId?: string | null; } /** @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.SEND_ORDER_MAIL */ function sendMerchantOrderReceivedPush(orderId: string): Promise; /** @internal * @documentationMaturity preview * @requiredField emailType * @permissionId ECOM.VIEW_ORDER_EMAIL_TEMPLATES * @adminMethod * @deprecated * @targetRemovalDate 2025-03-02 */ function previewEmailByType(emailType: PreviewEmailType): Promise; /** @internal * @documentationMaturity preview * @requiredField options.refundAmount * @requiredField options.refundAmount.amount * @requiredField orderId * @permissionId ECOM.VIEW_ORDER_EMAIL_TEMPLATES * @adminMethod */ function previewRefundEmail(orderId: string, options?: PreviewRefundEmailOptions): Promise; interface PreviewRefundEmailOptions { /** Refund amount */ refundAmount: Price$3; /** Refund business details */ details?: RefundDetails$1; /** Personal note added to the email (optional) */ customMessage?: string | null; /** Refund ID. (Optional) */ refundId?: string | null; } /** @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.VIEW_ORDER_EMAIL_TEMPLATES * @adminMethod */ function previewCancelEmail(orderId: string, options?: PreviewCancelEmailOptions): Promise; interface PreviewCancelEmailOptions { /** Personal note added to the email (optional) */ customMessage?: string | null; } /** @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.VIEW_ORDER_EMAIL_TEMPLATES * @adminMethod */ function previewCancelRefundEmail(orderId: string, options?: PreviewCancelRefundEmailOptions): Promise; interface PreviewCancelRefundEmailOptions { /** Personal note added to the email (optional) */ customMessage?: string | null; /** Refund amount */ refundAmount?: Price$3; /** Refund ID. (Optional) */ refundId?: string | null; } /** @internal * @documentationMaturity preview * @permissionId ECOM.VIEW_ORDER_EMAIL_TEMPLATES * @adminMethod */ function previewBuyerPaymentsReceivedEmail(): Promise; /** * Deprecated, use PreviewEmailByType with ORDER_PLACED type instead * @internal * @documentationMaturity preview * @permissionId ECOM.VIEW_ORDER_EMAIL_TEMPLATES * @adminMethod * @deprecated */ function previewBuyerConfirmationEmail(): Promise; /** * Deprecated, use PreviewEmailByType with ORDER_READY_FOR_PICKUP type instead * @internal * @documentationMaturity preview * @permissionId ECOM.VIEW_ORDER_EMAIL_TEMPLATES * @adminMethod * @deprecated */ function previewBuyerPickupConfirmationEmail(): Promise; /** * Deprecated, use PreviewEmailByType with ORDER_SHIPPED type instead * @internal * @documentationMaturity preview * @permissionId ECOM.VIEW_ORDER_EMAIL_TEMPLATES * @adminMethod * @deprecated */ function previewShippingConfirmationEmail(): Promise; /** * Deprecated, use PreviewEmailByType with DOWNLOAD_LINKS type instead * @internal * @documentationMaturity preview * @permissionId ECOM.VIEW_ORDER_EMAIL_TEMPLATES * @adminMethod * @deprecated */ function previewResendDownloadLinksEmail(): Promise; /** * Prepares payment collection for given ecom order. This is the first of 2-step process of payment collection. * Here we ensure that payment collection is possible for given order and store and prepare payment gateway order for future charge. * 2nd step is an actual charge of prepared payment gateway order. This could be done either * via Wix-Cashier's API (https://bo.wix.com/wix-docs/rest/wix-cashier/pay/charge/charge-for-order) * or using Cashier Payments Widget (https://github.com/wix-private/cashier-client/tree/master/packages/cashier-payments-widget) * @param ecomOrderId - Ecom order ID. * @param amount - Amount to collect * @public * @documentationMaturity preview * @requiredField amount * @requiredField ecomOrderId * @permissionId ECOM.COLLECT_PAYMENTS * @adminMethod */ function preparePaymentCollection(ecomOrderId: string, amount: Price$3, options?: PreparePaymentCollectionOptions): Promise; interface PreparePaymentCollectionOptions { /** * Optional parameter. When present, payment collection will be performed using given payment gateway order. * Existing payment gateway order will be updated with a new amount. * When parameter is absent, new payment gateway order will be created and used for payment collection. */ paymentGatewayOrderId?: string | null; /** * Whether to delay capture of the payment. * Default: false * @deprecated Whether to delay capture of the payment. * Default: false * @replacedBy delayed_capture_settings.scheduled_action * @targetRemovalDate 2024-09-30 */ delayedCapture?: boolean; /** * Specifies whether payment collection is initiated by Merchant or User of User * Default: `true` * @internal */ merchantInitiated?: boolean | null; /** * Redirect urls which are used to return buyer to third party system. * @internal */ redirectUrls?: RedirectUrls; /** Delayed capture payment settings */ delayedCaptureSettings?: DelayedCaptureSettings; } /** * Provides payment collectability status for given order. If payment collection is possible * response will contain collectable amount for given ecom order. If not - response will contain * reason why payment collection is not possible. * @param ecomOrderId - Ecom order ID. * @public * @documentationMaturity preview * @requiredField ecomOrderId * @permissionId ECOM.COLLECT_PAYMENTS * @adminMethod */ function getPaymentCollectabilityStatus(ecomOrderId: string): Promise; /** * Records and approves new manual payment with provided custom amount on given order. * Existing pending payments are ignored. * Custom amount is expected to be less or equal remaining amount to be paid on order (affected by approved payments, refunds and gift card payments) * @param orderId - Order ID. * @param amount - Amount to be recorded as approved manual payment for given order * @internal * @documentationMaturity preview * @requiredField amount * @requiredField orderId * @permissionId ECOM.COLLECT_PAYMENTS * @adminMethod */ function recordManuallyCollectedPayment(orderId: string, amount: Price$3): Promise; /** * Marks the order as paid. `order.paymentStatus` field *eventually* changes to `PAID`. * In case the order already has an offline payment transaction associated with it * (usually when manual payment method is chosen at checkout) - This transaction will become approved. * In case the order has no payment transactions associated with it * (usually when the item is set to be paid offline after checkout or when an order is created from the backoffice) - A payment transaction * will be created and approved. * @param ecomOrderId - Ecom order ID. * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function paymentCollectionMarkOrderAsPaid(ecomOrderId: string): Promise; /** * Marks multiple orders as paid. `order.paymentStatus` field *eventually* changes to `PAID`. * @param ecomOrderIds - IDs of orders to mark as paid. * @internal * @documentationMaturity preview * @requiredField ecomOrderIds * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function paymentCollectionBulkMarkOrdersAsPaid(ecomOrderIds: string[]): Promise; /** * Checks whether this order can be refunded. * @param ecomOrderId - Order ID. * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @permissionId ECOM.READ_TRANSACTIONS * @adminMethod */ function getRefundabilityStatus$1(ecomOrderId: string): Promise; /** * Call this endpoint to create an order in the payment gateway system. The amount of the order would be either: * 1. An explicit amount provided in the request, or; * 2. If an explicit amount is not provided - the remaining amount to complete the payment of that eCom order. * As a result, an ID of the created payment gateway order would be returned. * You can then use Wix Payments APIs to approve that order or collect payment, which will eventually change the eCom order state (e.g mark it as paid). * @param ecomOrderId - Ecom order ID. * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function paymentCollectionCreatePaymentGatewayOrder(ecomOrderId: string, options?: PaymentCollectionCreatePaymentGatewayOrderOptions): Promise; interface PaymentCollectionCreatePaymentGatewayOrderOptions { /** Information about the user who initiated the payment. */ chargedBy?: ChargedBy; /** * Whether to delay capture of the payment. * * Default: false * @internal */ delayedCapture?: boolean; } /** @param ecomOrderId - Order ID. * @param memberId - The member id. Do not attempt to get it from the request context, since in some cases the caller is not a member * but a user which is using the membership on behalf of the a member * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @requiredField memberId * @requiredField options.membershipCharges.appId * @requiredField options.membershipCharges.catalogReference * @requiredField options.membershipCharges.catalogReference.appId * @requiredField options.membershipCharges.catalogReference.catalogItemId * @requiredField options.membershipCharges.membershipId * @requiredField options.membershipCharges.membershipName * @requiredField options.membershipCharges.membershipName.original * @requiredField options.membershipCharges.rootCatalogItemId * @permissionId ECOM.MODIFY_TRANSACTIONS * @adminMethod */ function chargeMemberships(ecomOrderId: string, memberId: string, options?: ChargeMembershipsOptions): Promise; interface ChargeMembershipsOptions { /** List of items to be paid by memberships */ membershipCharges?: MembershipChargeItem[]; } /** * Calls corresponding payment providers and creates refund transactions for requested payments. * Updates order transactions based on refund results. * For requested payments with `TriggerRefundRequest.payments.external_refund = true` will not call payment providers and * will only update order transactions. * @param ecomOrderId - The order this refund related to * @param payments - Refund operations information * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @requiredField payments * @requiredField payments.paymentId * @permissionId ECOM.MODIFY_TRANSACTIONS * @adminMethod */ function triggerRefund$1(ecomOrderId: string, payments: PaymentRefund$1[], options?: TriggerRefundOptions$1): Promise; interface TriggerRefundOptions$1 { /** Business model of a refund */ details?: RefundDetails$1; /** Side effect details related to refund */ sideEffects?: RefundSideEffects$1; } /** * Calculates refundable amount for order items specified in request. * @param ecomOrderId - Order ID * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @permissionId ECOM.READ_TRANSACTIONS * @adminMethod */ function calculateRefund$1(ecomOrderId: string, options?: CalculateRefundOptions$1): Promise; interface CalculateRefundOptions$1 { /** Refunded line items and quantity */ refundItems?: CalculateRefundItemRequest$1[]; /** Should include shipping in refund calculation */ refundShipping?: boolean; } /** * Void authorized payments * Transaction statuses for related payments will be updated in async way * @param ecomOrderId - Wix eCommerce order ID * @param paymentIds - Payment IDs * @public * @documentationMaturity preview * @requiredField ecomOrderId * @requiredField paymentIds * @permissionId ECOM.ORDER_VOID_AUTHORIZED_PAYMENT * @adminMethod */ function voidAuthorizedPayments(ecomOrderId: string, paymentIds: string[]): Promise; /** * Capture authorized payments * Transaction statuses for related payments will be updated in async way * @param ecomOrderId - Wix eCommerce order ID * @param payments - Capture payments information * @public * @documentationMaturity preview * @requiredField ecomOrderId * @requiredField payments * @requiredField payments.paymentId * @permissionId ECOM.ORDER_CAPTURE_AUTHORIZED_PAYMENT * @adminMethod */ function captureAuthorizedPayments(ecomOrderId: string, payments: PaymentCapture[]): Promise; /** @param ecomOrderId - Ecom Order ID. * @param amount - Amount to be charged * @internal * @documentationMaturity preview * @requiredField amount * @requiredField ecomOrderId * @permissionId ECOM.ORDER_CHARGE_SAVED_PAYMENT_METHOD * @adminMethod */ function chargeSavedPaymentMethod(ecomOrderId: string, amount: Price$3): Promise; /** * Retrieves an order. * * * The `getOrder()` function returns a Promise that resolves when the specified order is retrieved. * * To retrieve an order's payment and refund details, including amounts, payment methods, and payment statuses, pass the order ID to [`listTransactionsForSingleOrder( )`](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/listtransactionsforsingleorder). * @param _id - ID of the order to retrieve. * @public * @requiredField _id * @permissionId ECOM.READ_ORDERS * @permissionId ECOM.ORDER_READ_ALL_EXTENDED_FIELDS * @adminMethod * @returns Fulfilled - The requested order. */ function getOrder(_id: string): Promise; /** * * Internal query orders endpoint without additional logic to hide INIT orders. * Returns a list of up to 100 orders, given the provided paging, filtering and sorting. * * To learn how to query orders, see * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language). * * @internal * @documentationMaturity preview * @permissionId ECOM.READ_ALL_ORDERS * @adminMethod */ function internalQueryOrders(options?: InternalQueryOrdersOptions): Promise; interface InternalQueryOrdersOptions { /** Query options. */ query?: PlatformQuery; } /** * > **Note:** Use SearchOrders instead * Retrieves a list of orders, given the provided paging, filtering, and sorting. * * * Query Orders runs with these defaults, which you can override: * * - `createdDate` is sorted in `DESC` order * - `paging.limit` is `100` * - `paging.offset` is `0` * - `filter: {"status": {"$ne": "INITIALIZED"}}` - other order statuses can be queried, but orders with `status: "INITIALIZED"` are never returned * * For field support for filters and sorting, see [Orders: Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/orders/filter-and-sort). * * To learn about working with _Query_ endpoints, see * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and * [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging). * @internal * @documentationMaturity preview * @permissionId ECOM.READ_ORDERS * @adminMethod * @deprecated * @replacedBy com.wix.ecom.orders.v1.Orders.SearchOrders * @targetRemovalDate 2025-03-02 */ function queryOrders(): OrdersQueryBuilder; interface QueryCursorResult$7 { cursors: Cursors$7; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface OrdersQueryResult extends QueryCursorResult$7 { items: Order$1[]; query: OrdersQueryBuilder; next: () => Promise; prev: () => Promise; } interface OrdersQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'number' | '_createdDate' | '_updatedDate' | 'lineItems.subscriptionInfo.id' | 'buyerInfo.memberId' | 'buyerInfo.contactId' | 'buyerInfo.email' | 'paymentStatus' | 'fulfillmentStatus' | 'priceSummary.total' | 'billingInfo.contactDetails.firstName' | 'billingInfo.contactDetails.lastName' | 'shippingInfo.title' | 'shippingInfo.logistics.deliveryTime' | 'shippingInfo.logistics.deliveryTimeSlot.from' | 'shippingInfo.logistics.deliveryTimeSlot.to' | 'shippingInfo.region.name' | 'status' | 'archived' | 'createdBy.userId' | 'channelInfo.type' | 'channelInfo.externalOrderId' | 'seenByAHuman' | 'checkoutId' | 'balanceSummary.authorized.amount' | 'balanceSummary.pendingRefund.amount' | 'balanceSummary.pending.amount' | 'purchasedDate' | 'businessLocation.id' | 'businessLocation.name', value: any) => OrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'number' | '_createdDate' | '_updatedDate' | 'lineItems.subscriptionInfo.id' | 'buyerInfo.memberId' | 'buyerInfo.contactId' | 'buyerInfo.email' | 'paymentStatus' | 'fulfillmentStatus' | 'priceSummary.total' | 'billingInfo.contactDetails.firstName' | 'billingInfo.contactDetails.lastName' | 'shippingInfo.title' | 'shippingInfo.logistics.deliveryTime' | 'shippingInfo.logistics.deliveryTimeSlot.from' | 'shippingInfo.logistics.deliveryTimeSlot.to' | 'shippingInfo.region.name' | 'status' | 'archived' | 'createdBy.userId' | 'channelInfo.type' | 'channelInfo.externalOrderId' | 'seenByAHuman' | 'checkoutId' | 'balanceSummary.authorized.amount' | 'balanceSummary.pendingRefund.amount' | 'balanceSummary.pending.amount' | 'purchasedDate' | 'businessLocation.id' | 'businessLocation.name', value: any) => OrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: 'number' | '_createdDate' | '_updatedDate' | 'shippingInfo.logistics.deliveryTimeSlot.from' | 'shippingInfo.logistics.deliveryTimeSlot.to' | 'purchasedDate', value: any) => OrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: 'number' | '_createdDate' | '_updatedDate' | 'shippingInfo.logistics.deliveryTimeSlot.from' | 'shippingInfo.logistics.deliveryTimeSlot.to' | 'purchasedDate', value: any) => OrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: 'number' | '_createdDate' | '_updatedDate' | 'shippingInfo.logistics.deliveryTimeSlot.from' | 'shippingInfo.logistics.deliveryTimeSlot.to' | 'purchasedDate', value: any) => OrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: 'number' | '_createdDate' | '_updatedDate' | 'shippingInfo.logistics.deliveryTimeSlot.from' | 'shippingInfo.logistics.deliveryTimeSlot.to' | 'purchasedDate', value: any) => OrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: 'buyerInfo.email' | 'billingInfo.contactDetails.firstName' | 'billingInfo.contactDetails.lastName' | 'shippingInfo.logistics.deliveryTime' | 'balanceSummary.authorized.amount' | 'balanceSummary.pendingRefund.amount' | 'balanceSummary.pending.amount' | 'businessLocation.id' | 'businessLocation.name', value: string) => OrdersQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: 'number' | '_createdDate' | '_updatedDate' | 'buyerInfo.email' | 'priceSummary.total' | 'billingInfo.contactDetails.firstName' | 'billingInfo.contactDetails.lastName' | 'shippingInfo.logistics.deliveryTime' | 'shippingInfo.logistics.deliveryTimeSlot.from' | 'shippingInfo.logistics.deliveryTimeSlot.to' | 'archived' | 'seenByAHuman' | 'balanceSummary.authorized.amount' | 'balanceSummary.pendingRefund.amount' | 'balanceSummary.pending.amount' | 'purchasedDate' | 'businessLocation.id' | 'businessLocation.name', value: any[]) => OrdersQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'number' | '_createdDate' | '_updatedDate' | 'lineItems.subscriptionInfo.id' | 'buyerInfo.memberId' | 'buyerInfo.contactId' | 'buyerInfo.email' | 'paymentStatus' | 'fulfillmentStatus' | 'priceSummary.total' | 'billingInfo.contactDetails.firstName' | 'billingInfo.contactDetails.lastName' | 'shippingInfo.title' | 'shippingInfo.logistics.deliveryTime' | 'shippingInfo.logistics.deliveryTimeSlot.from' | 'shippingInfo.logistics.deliveryTimeSlot.to' | 'shippingInfo.region.name' | 'status' | 'archived' | 'createdBy.userId' | 'channelInfo.type' | 'channelInfo.externalOrderId' | 'seenByAHuman' | 'checkoutId' | 'balanceSummary.authorized.amount' | 'balanceSummary.pendingRefund.amount' | 'balanceSummary.pending.amount' | 'purchasedDate' | 'businessLocation.id' | 'businessLocation.name', value: any) => OrdersQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: 'number' | '_createdDate' | '_updatedDate' | 'buyerInfo.email' | 'priceSummary.total' | 'billingInfo.contactDetails.firstName' | 'billingInfo.contactDetails.lastName' | 'shippingInfo.logistics.deliveryTime' | 'shippingInfo.logistics.deliveryTimeSlot.from' | 'shippingInfo.logistics.deliveryTimeSlot.to' | 'archived' | 'seenByAHuman' | 'balanceSummary.authorized.amount' | 'balanceSummary.pendingRefund.amount' | 'balanceSummary.pending.amount' | 'purchasedDate' | 'businessLocation.id' | 'businessLocation.name', value: boolean) => OrdersQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | 'number' | '_createdDate' | '_updatedDate' | 'buyerInfo.email' | 'paymentStatus' | 'fulfillmentStatus' | 'priceSummary.totalPrice' | 'priceSummary.total' | 'billingInfo.contactDetails.firstName' | 'billingInfo.contactDetails.lastName' | 'status' | 'balanceSummary.authorized.amount' | 'balanceSummary.pendingRefund.amount' | 'balanceSummary.pending.amount' | 'purchasedDate' | 'businessLocation.id' | 'businessLocation.name'>) => OrdersQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | 'number' | '_createdDate' | '_updatedDate' | 'buyerInfo.email' | 'paymentStatus' | 'fulfillmentStatus' | 'priceSummary.totalPrice' | 'priceSummary.total' | 'billingInfo.contactDetails.firstName' | 'billingInfo.contactDetails.lastName' | 'status' | 'balanceSummary.authorized.amount' | 'balanceSummary.pendingRefund.amount' | 'balanceSummary.pending.amount' | 'purchasedDate' | 'businessLocation.id' | 'businessLocation.name'>) => OrdersQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => OrdersQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => OrdersQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Retrieves a list of orders, given the provided paging, filtering, and sorting. * * * Search Orders runs with these defaults, which you can override: * * - `createdDate` is sorted in `DESC` order * - `cursorPaging.limit` is `100` * - `filter: {"status": {"$ne": "INITIALIZED"}}` - other order statuses can be queried, but orders with `status: "INITIALIZED"` are never returned * * For field support for filters and sorting, see [Orders: Supported Filters and Sorting](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/orders/supported-filters-and-sorting). * * To learn about working with _Search_ endpoints, see * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and * [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging). * @public * @documentationMaturity preview * @permissionId ECOM.READ_ORDERS * @adminMethod */ function searchOrders(options?: SearchOrdersOptions): Promise; interface SearchOrdersOptions { /** Search options. */ search?: CursorSearch; } /** * Creates an order. * * * The `createOrder()` function returns a Promise that resolves when the order is created. * * > **Notes:** * > + If an item is digital - `lineItems[i].itemType.preset: DIGITAL` - then `lineItems[i].digitalFile` must be provided. * > + If `lineItems[i].id` is passed, it must be either a valid GUID, or empty. * @param order - Order info. * @public * @requiredField order * @requiredField order.billingInfo.contactDetails * @requiredField order.billingInfo.contactDetails.firstName * @requiredField order.channelInfo * @requiredField order.lineItems * @requiredField order.lineItems.catalogReference.appId * @requiredField order.lineItems.catalogReference.catalogItemId * @requiredField order.lineItems.itemType * @requiredField order.lineItems.price * @requiredField order.lineItems.productName * @requiredField order.lineItems.productName.original * @requiredField order.lineItems.quantity * @requiredField order.lineItems.subscriptionInfo.subscriptionSettings.interval * @requiredField order.priceSummary * @permissionId ECOM.CREATE_ORDERS * @permissionId ECOM.ORDER_WRITE_ALL_EXTENDED_FIELDS * @adminMethod * @returns Newly created order. */ function createOrder(order: Order$1, options?: CreateOrderOptions): Promise; interface CreateOrderOptions { /** * Determine order lifecycle * @internal */ settings?: OrderCreationSettings; } /** * Updates an order. * * * The `updateOrder()` function returns a Promise that resolves when the specified order's information is updated. * * Currently, the following fields can be updated: * + `order.buyerInfo.email` * + `order.buyerLanguage` * + `order.weightUnit` * + `order.billingInfo.address` * + `order.billingInfo.contactDetails` * + `order.archived` * + `order.attributionSource` * + `order.seenByAHuman` * + `order.recipientInfo.address` * + `order.recipientInfo.contactDetails` * + `order.shippingInfo.logistics.shippingDestination.address` * + `order.shippingInfo.logistics.shippingDestination.contactDetails` * * To update a field's value, include the new value in the `order` object in the method parameters. * To remove a field's value, pass `null`. * * > **Note:** Removing `buyerInfo` or `contactDetails` fields results in an error. * * To update an order's payment status, use [`updatePaymentStatus( )`](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/updatepaymentstatus). * @param _id - Order ID. * @public * @requiredField _id * @requiredField order * @permissionId ECOM.MODIFY_ORDERS * @permissionId ECOM.ORDER_WRITE_ALL_EXTENDED_FIELDS * @adminMethod * @returns Newly created order. */ function updateOrder(_id: string | null, order: UpdateOrder, options?: UpdateOrderOptions): Promise; interface UpdateOrder { /** * Order ID. * @readonly */ _id?: string | null; /** * Order number displayed in the site owner's dashboard (auto-generated). * @readonly */ number?: string; /** * Date and time the order was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the order was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _updatedDate?: Date | null; /** * Order line items. * @readonly */ lineItems?: OrderLineItem[]; /** Buyer information. */ buyerInfo?: BuyerInfo$1; /** * Order payment status. * + `NOT_PAID` - This can be an order made online, but not yet paid. In such cases `order.status` will be `INITIALIZED`. * + This status also applies when an offline order needs to be manually marked as paid. In such cases `order.status` will be `APPROVED`. * + `PAID` - All payments associated with this order are paid. For online payments: [`payment.regularPaymentDetails.status: APPROVED`](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-transactions/order-transactions-object). For gift cards: [`payment.giftCardPaymentDetails.voided: false`](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-transactions/order-transactions-object). * + `PARTIALLY_REFUNDED` - Order was refunded, but refund amount is less than order total price. * + `FULLY_REFUNDED` - Order fully refunded. Refund amount equals total price. * + `PENDING` - Payments received but not yet confirmed by the payment provider. * + `PARTIALLY_PAID` - At least one payment was received and approved, covering less than total price amount. */ paymentStatus?: PaymentStatus$1; /** * Order fulfillment status. * @readonly */ fulfillmentStatus?: FulfillmentStatus$1; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string | null; /** Weight measurement unit - defaults to site's weight unit. */ weightUnit?: WeightUnit$3; /** Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format. */ currency?: string | null; /** Whether tax is included in line item prices. */ taxIncludedInPrices?: boolean; /** * Site language in which original values are shown. * @readonly */ siteLanguage?: string | null; /** * Order price summary. * @readonly */ priceSummary?: PriceSummary$1; /** Billing address and contact details. */ billingInfo?: AddressWithContact; /** Shipping info and selected shipping option details. */ shippingInfo?: ShippingInformation$1; /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string | null; /** * Order status. * + `INITIALIZED`: Order created, but not yet approved or canceled. * + `APPROVED`: Order approved. This happens when either an online payment is received **or** when `order.priceSummary.total = 0` (a zero-total order). Offline orders (cash payment) are automatically approved. * + `CANCELED`: Order canceled by the user. */ status?: OrderStatus; /** Whether order is archived. */ archived?: boolean | null; /** * Tax summary. * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * @deprecated Tax summary. * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxSummary?: TaxSummary$1; /** Tax information. */ taxInfo?: OrderTaxInfo; /** Applied discounts. */ appliedDiscounts?: AppliedDiscount$1[]; /** * Order activities. * @readonly */ activities?: Activity$1[]; /** Order attribution source. */ attributionSource?: AttributionSource; /** * ID of the order's initiator. * @readonly */ createdBy?: CreatedBy; /** Information about the sales channel that submitted this order. */ channelInfo?: ChannelInfo$1; /** Whether a human has seen the order. Set when an order is clicked on in the dashboard. */ seenByAHuman?: boolean | null; /** Checkout ID. */ checkoutId?: string | null; /** Custom fields. */ customFields?: CustomField$1[]; /** * Cart ID - required by TYP OOI for legacy orders. * @internal */ cartId?: string | null; /** * Private API flag that allows using read-only "id" during order creation. * @internal */ isInternalOrderCreate?: boolean; /** * Pay now price summary. Part of price_summary that must be payed at checkout * @internal * @readonly */ payNow?: PriceSummary$1; /** * Balance summary. * @readonly */ balanceSummary?: BalanceSummary; /** Additional fees applied to the order. */ additionalFees?: AdditionalFee$1[]; /** * Custom string status values aggregated from every fulfillment entity associated with current order * @internal * @readonly */ fulfillmentStatusesAggregate?: FulfillmentStatusesAggregate; /** * Custom field data for the order object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields$4; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; /** * Order recipient address and contact details. * * This field may differ from the address in `shippingInfo.logistics` when: * + The chosen shipping option is pickup point or store pickup. * + No shipping option is selected. */ recipientInfo?: AddressWithContact; /** * Tag ids collections associated with current entity. private_tags requires separate permissions to be accessible and modifiable. * @internal */ tags?: Tags; /** * Date and time the order was originally purchased in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * Used for migration from external systems. */ purchasedDate?: Date | null; /** * Order Location * @internal */ businessLocation?: Location; } interface UpdateOrderOptions { /** * Field mask of fields to update. * @internal */ fieldMask?: string[]; } /** * Updates up to 100 orders. * * * The `bulkUpdateOrders()` function returns a Promise that resolves when the specified orders' information is updated. * * Currently, the following fields can be updated: * + `order.buyerInfo.email` * + `order.buyerLanguage` * + `order.weightUnit` * + `order.billingInfo.address` * + `order.billingInfo.contactDetails` * + `order.archived` * + `order.attributionSource` * + `order.seenByAHuman` * + `order.recipientInfo.address` * + `order.recipientInfo.contactDetails` * + `order.shippingInfo.logistics.shippingDestination.address` * + `order.shippingInfo.logistics.shippingDestination.contactDetails` * * To update a field's value, include the new value in the `orders.order` object in the method parameters. * To remove a field's value, pass `null`. * * > **Note:** Removing `buyerInfo` or `contactDetails` fields results in an error. * * To update an order's payment status, use [`updatePaymentStatus( )`](https://www.wix.com/velo/reference/wix-ecom-backend/ordertransactions/updatepaymentstatus). * @param orders - Orders to update. * @public * @requiredField orders * @requiredField orders.order * @requiredField orders.order._id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function bulkUpdateOrders(orders: MaskedOrder[], options?: BulkUpdateOrdersOptions): Promise; interface BulkUpdateOrdersOptions { /** * Whether to return the full order entities. * * Default: `false` */ returnEntity?: boolean; } /** @param _id - Order id to be updated * @internal * @documentationMaturity preview * @requiredField _id * @requiredField options.changes * @requiredField options.changes.priceSummary.subtotal * @requiredField options.changes.priceSummary.total * @permissionId ECOM.ORDERS_DELTAS_COMMIT * @permissionId ECOM.ORDER_WRITE_ALL_EXTENDED_FIELDS * @adminMethod */ function commitDeltas(_id: string, options?: CommitDeltasOptions): Promise; interface CommitDeltasOptions { /** * Draft order Id representing this change. * Use this ID to get this specific draft content. call .../v1/draft-orders/{draft_order_id}/get */ draftOrderId?: string; /** Draft order changes to be applied */ changes: DraftOrderDiffs; /** Side-effects to happen after order is updated */ commitSettings?: DraftOrderCommitSettings; /** Reason for edit, given by user (optional). */ reason?: string | null; } /** * Archives an order. `order.archived` field changes to `true`. * @param _id - Order ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function archiveOrder(_id: string): Promise; /** * Archives multiple orders. `order.archived` field changes to `true`. * @param ids - IDs of orders to archive. * @internal * @documentationMaturity preview * @requiredField ids * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function bulkArchiveOrders(ids: string[], options?: BulkArchiveOrdersOptions): Promise; interface BulkArchiveOrdersOptions { /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } /** * Archives multiple orders, selected by filter. `order.archived` field changes to `true`. * @param filter - Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). * @internal * @documentationMaturity preview * @requiredField filter * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function bulkArchiveOrdersByFilter(filter: Record | null): Promise; /** * Unarchives an order. `order.archived` field changes to `false`. * @param _id - Order ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function unArchiveOrder(_id: string): Promise; /** * Unarchives multiple orders. `order.archived` field changes to `false`. * @param ids - IDs or orders to unarchive. * @internal * @documentationMaturity preview * @requiredField ids * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function bulkUnArchiveOrders(ids: string[], options?: BulkUnArchiveOrdersOptions): Promise; interface BulkUnArchiveOrdersOptions { /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } /** * Unarchives multiple orders, selected by filter. `order.archived` field changes to `false`. * @param filter - Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). * @internal * @documentationMaturity preview * @requiredField filter * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function bulkUnArchiveOrdersByFilter(filter: Record | null): Promise; /** * Updates an order's contact ID and/or email. * > **Note:** Neither `email`, nor `contactId` can be removed, only updated. * @param _id - Order ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function updateBuyerInfo(_id: string, options?: UpdateBuyerInfoOptions): Promise; interface UpdateBuyerInfoOptions { /** * Field mask of buyerInfo fields to update. * @internal */ fieldMask?: string[]; /** Buyer info. */ buyerInfo?: BuyerInfoUpdate; } /** @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod * @deprecated * @targetRemovalDate 2023-09-25 */ function updateBuyerEmail(_id: string, options?: UpdateBuyerEmailOptions): Promise; interface UpdateBuyerEmailOptions { email?: string | null; } /** * Updates an order's shipping address and/or contact details. * > **Notes:** * > + Original order must have existing address to update - `order.shippingInfo.logistics.shippingDestination.address` must have existing value. * > + Neither `address`, nor `contactDetails` can be removed, only updated. * @param _id - Order ID. * @internal * @documentationMaturity preview * @requiredField _id * @requiredField options.shippingAddress * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function updateOrderShippingAddress(_id: string, options?: UpdateOrderShippingAddressOptions): Promise; interface UpdateOrderShippingAddressOptions { /** * mask of shipping address fields to update * @internal */ fieldMask?: string[]; /** Shipping address and contact details to be updated. */ shippingAddress: AddressWithContact; } /** * Updates an order's billing contact details. * @param _id - Order ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function updateBillingContactDetails(_id: string, options?: UpdateBillingContactDetailsOptions): Promise; interface UpdateBillingContactDetailsOptions { /** * mask of contact details fields to update * @internal */ fieldMask?: string[]; /** Contact details. */ addressContactDetails?: FullAddressContactDetails$1; } /** @internal * @documentationMaturity preview * @requiredField identifiers * @requiredField identifiers.id * @requiredField identifiers.lineItemId * @requiredField lineItem * @permissionId ECOM.MODIFY_ORDERS * @adminMethod * @deprecated * @targetRemovalDate 2024-02-15 */ function updateOrderLineItem(identifiers: UpdateOrderLineItemIdentifiers, lineItem: UpdateOrderLineItem, options?: UpdateOrderLineItemOptions): Promise; interface UpdateOrderLineItemIdentifiers { /** Order ID */ _id: string; /** Line item ID. */ lineItemId?: string; } interface UpdateOrderLineItem { /** Line item ID. */ _id?: string; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: ProductName; /** Catalog and item reference. Holds IDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. */ catalogReference?: CatalogReference$3; /** Line item quantity. */ quantity?: number; /** * Total discount for this line item's entire quantity. * @readonly */ totalDiscount?: Price$3; /** Line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: DescriptionLine[]; /** Line item image. */ image?: string; /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */ physicalProperties?: PhysicalProperties$2; /** Item type. Either a preset type or custom. */ itemType?: ItemType$1; /** * Fulfiller ID. Field is empty when the line item is self-fulfilled. * * To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://www.wix.com/velo/reference/wix-ecom-backend/orderfulfillments/listfulfillmentsforsingleorder). */ fulfillerId?: string | null; /** Number of items that were refunded. */ refundQuantity?: number | null; /** Number of items restocked. */ restockQuantity?: number | null; /** Line item price after line item discounts for display purposes. */ price?: Price$3; /** * Line item price before line item discounts for display purposes. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: Price$3; /** * Total price after discounts, and before tax. * @readonly */ totalPriceBeforeTax?: Price$3; /** * Total price after all discounts and tax. * @readonly */ totalPriceAfterTax?: Price$3; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only. */ paymentOption?: PaymentOptionType$1; /** * Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @deprecated Deprecated. Use `taxInfo` instead. * This field will be removed on September 30, 2024. * Tax details for this line item. * @replacedBy tax_info * @targetRemovalDate 2024-09-30 */ taxDetails?: ItemTaxFullDetails$1; /** Represents all the relevant tax details for a specific line item. */ taxInfo?: LineItemTaxInfo; /** Digital file identifier, relevant only for items with type DIGITAL. */ digitalFile?: DigitalFile$1; /** Subscription info. */ subscriptionInfo?: SubscriptionInfo$1; /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */ priceDescription?: PriceDescription; /** * Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`. * @readonly */ depositAmount?: Price$3; /** * The Item's Delivery Profile Id * @internal */ deliveryProfileId?: string | null; /** @internal */ shippingGroupId?: string | null; /** * Source locations for this line item. The location's total quantity must not exceed the line item quantity. * @internal */ locations?: LocationAndQuantity[]; /** * Total price **after** catalog discounts and line item discounts. * @internal */ lineItemPrice?: Price$3; /** * Whether the line item is a custom line item. Custom line items don't trigger the Catalog service plugin. * @internal * @readonly */ customLineItem?: boolean | null; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field has the same value as `catalogReference.catalogItemId`. * @internal * @readonly */ rootCatalogItemId?: string | null; /** * Address used for tax calculation. * @internal */ taxableAddress?: TaxableAddress$1; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; /** * Whether the price is not yet defined, and will be updated after the order is created. * * Default: `false` * @internal */ priceUndetermined?: boolean; /** * Whether the line item quantity is fixed and cannot be changed. * * Default: `false` * @internal */ fixedQuantity?: boolean; /** * Custom extended fields for the line item object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. * @internal */ extendedFields?: ExtendedFields$4; } interface UpdateOrderLineItemOptions { /** * Field mask of fields to update. * @internal */ fieldMask?: string[]; } /** * Updates multiple items of an order. * Currently, the following fields can be updated: * + `lineItem.productName` * + `lineItem.descriptionLines` (full replacement) * + `lineItem.digitalFile` * + `lineItem.priceDescription` * @param orderId - Order ID * @param lineItems - Order line items to update * @internal * @documentationMaturity preview * @requiredField lineItems * @requiredField lineItems.lineItem * @requiredField lineItems.lineItem._id * @requiredField orderId * @permissionId ECOM.MODIFY_ORDERS * @permissionId ECOM.ORDER_MODIFY_DIGITAL_FILE * @adminMethod */ function updateOrderLineItems(orderId: string, lineItems: MaskedOrderLineItem[]): Promise; /** @param _id - Order ID. * @param activity - Activity info. * @internal * @documentationMaturity preview * @requiredField _id * @requiredField activity * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function addInternalActivity(_id: string, activity: InternalActivity): Promise; /** * Adds a merchant comment to an order. * > **Note:** Activities with type CustomActivity not supported * @param _id - Order ID. * @param activity - Activity info. * @internal * @documentationMaturity preview * @requiredField _id * @requiredField activity * @permissionId ECOM.MODIFY_ORDERS * @adminMethod * @deprecated * @replacedBy com.wix.ecom.orders.v1.OrdersService.AddActivities * @targetRemovalDate 2024-11-01 */ function addActivity(_id: string, activity: PublicActivity): Promise; /** * Adds merchant comments to an order. * > **Note:** Activities with type CustomActivity not supported * @param orderId - Order ID. * @param activities - Activities to add. * @internal * @documentationMaturity preview * @requiredField activities * @requiredField orderId * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function addActivities(orderId: string, activities: PublicActivity[]): Promise; /** * Updates an order's activity. * @param activity - Activity info. * @internal * @documentationMaturity preview * @requiredField activity * @requiredField identifiers * @requiredField identifiers.activityId * @requiredField identifiers.id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function updateActivity(identifiers: UpdateActivityIdentifiers, activity: PublicActivity): Promise; interface UpdateActivityIdentifiers { /** Order ID. */ _id: string; /** ID of the activity to update. */ activityId: string; } /** * Delete's an order's activity. * * Only custom activities and merchant comments can be deleted. * @internal * @documentationMaturity preview * @requiredField identifiers * @requiredField identifiers.activityId * @requiredField identifiers.id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function deleteActivity(identifiers: DeleteActivityIdentifiers): Promise; interface DeleteActivityIdentifiers { /** Order ID. */ _id: string; /** ID of the activity to delete. */ activityId: string; } /** * Updates an order's line item descriptions. * @param _id - Order ID. * @param lineItems - Line items. * @internal * @documentationMaturity preview * @requiredField _id * @requiredField lineItems * @requiredField lineItems.descriptionLines.name * @requiredField lineItems.lineItemId * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function updateLineItemsDescriptionLines(_id: string, lineItems: LineItemUpdate[]): Promise; /** * Marks an order as read in the dashboard. `order.seenByAHuman` field changes to `true`. * @param _id - Order ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function markOrderAsSeenByHuman(_id: string): Promise; /** * Cancels an order. * * * The `cancelOrder()` function returns a Promise that resolves when the specified order is canceled and the `order.status` field changes to `CANCELED`. * @param _id - Order ID. * @public * @requiredField _id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function cancelOrder(_id: string, options?: CancelOrderOptions): Promise; interface CancelOrderOptions { /** Whether to send an order canceled email to the buyer. */ sendOrderCanceledEmail?: boolean; /** Custom note to be added to the email (optional). */ customMessage?: string | null; /** Whether to restock all items in the order. This will only apply to products in the Wix Stores inventory. */ restockAllItems?: boolean; } /** * Marks an order as fulfilled. `order.fulfillmentStatus` field changes to `FULFILLED`. * @param _id - Order ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function markAsFulfilled(_id: string): Promise; /** * Marks multiple orders as fulfilled. `order.fulfillmentStatus` field changes to `FULFILLED`. * @param ids - IDs of orders to be marked as fulfilled. * @internal * @documentationMaturity preview * @requiredField ids * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function bulkMarkAsFulfilled(ids: string[], options?: BulkMarkAsFulfilledOptions): Promise; interface BulkMarkAsFulfilledOptions { /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } /** * Marks multiple orders as fulfilled, selected by filter. `order.fulfillmentStatus` field changes to `FULFILLED`. * @param filter - Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). * @internal * @documentationMaturity preview * @requiredField filter * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function bulkMarkAsFulfilledByFilter(filter: Record | null): Promise; /** * Marks an order as not fulfilled. `order.fulfillmentStatus` field changes to `NOT_FULFILLED`. * @param _id - Order ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function markAsUnfulfilled(_id: string): Promise; /** * Marks multiple orders as not fulfilled. `order.fulfillmentStatus` field changes to `NOT_FULFILLED`. * @param ids - IDs of orders to be marked as not fulfilled. * @internal * @documentationMaturity preview * @requiredField ids * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function bulkMarkAsUnfulfilled(ids: string[], options?: BulkMarkAsUnfulfilledOptions): Promise; interface BulkMarkAsUnfulfilledOptions { /** Whether to return the full updated order entities in the response. */ returnFullEntity?: boolean; } /** * Marks multiple orders as not fulfilled, selected by filter. `order.fulfillmentStatus` field changes to `NOT_FULFILLED`. * @param filter - Filter object. Learn more about supported filters [here](https://bo.wix.com/wix-docs/rest/ecommerce/orders/filter-and-sort). * @internal * @documentationMaturity preview * @requiredField filter * @permissionId ECOM.MODIFY_FULFILLMENTS * @adminMethod */ function bulkMarkAsUnfulfilledByFilter(filter: Record | null): Promise; /** * Marks the order as paid. `order.paymentStatus` field *eventually* changes to `PAID`. * In case the order already has an offline payment transaction associated with it (usually when manual payment method is chosen at checkout) - This transaction will become approved. * In case the order has no payment transactions associated with it (usually when the item is set to be paid offline after checkout or when an order is created from the backoffice) - A payment transaction will be created and approved. * @param _id - Order ID. * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function markOrderAsPaid(_id: string): Promise; /** * Marks multiple orders as paid. `order.paymentStatus` field *eventually* changes to `PAID`. * @param ids - IDs of orders to mark as paid. * @internal * @documentationMaturity preview * @requiredField ids * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function bulkMarkOrdersAsPaid(ids: string[]): Promise; /** * Call this endpoint to create an order in the payment gateway system. The amount of the order would be either: * 1. An explicit amount provided in the request, or; * 2. If an explicit amount is not provided - the remaining amount to complete the payment of that eCom order. * As a result, an ID of the created payment gateway order would be returned. * You can then use Wix Payments APIs to approve that order or collect payment, which will eventually change the eCom order state (e.g mark it as paid). * @param ecomOrderId - eCom Order ID * @internal * @documentationMaturity preview * @requiredField ecomOrderId * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function createPaymentGatewayOrder(ecomOrderId: string): Promise; /** * returns shipping label ids - temporarily until fully modeled in fulfillments service * @internal * @documentationMaturity preview * @requiredField _id * @permissionId ECOM.READ_ORDERS * @adminMethod * @deprecated * @targetRemovalDate 2023-05-15 */ function getShipments(_id: string): Promise; /** @internal * @documentationMaturity preview * @requiredField options.aggregation * @permissionId ECOM.READ_ORDERS * @adminMethod */ function aggregateOrders(options?: AggregateOrdersOptions): Promise; interface AggregateOrdersOptions { /** Filter applied to original data */ filter?: Record | null; /** This is an object defining aggregation itself */ aggregation: Record | null; /** * Optional custom separator string that can be used to override default separator value '|' * for hierarchical responses of multifaceted aggregation requests like: * '{"aggregation": {"example_request_key": {"$count" : ["deliveryMethod", "shippingRegion"]}}}' * with example response for default '|' separator like: * '{"aggregates" :{"example_request_key": {"(Mail|Region 1)": 5, "(Pickup|Region 2)": 10}}}' */ hierarchySeparatorOverride?: string | null; } /** * Restock items on order - temporary solution for POS * @param _id - Order ID * @param decrementData - Which items to decrement, and how much to decrement from each one * @internal * @documentationMaturity preview * @requiredField _id * @requiredField decrementData * @permissionId ECOM.MODIFY_ORDERS * @adminMethod */ function decrementItemsQuantity(_id: string, decrementData: DecrementData[]): Promise; /** * Synchronously update tags on multiple orders, by list of order ids * A tag that appears both in the list of assign and unassign tags, will be assigned * @param orderIds - IDs of orders to update tags for. * @public * @documentationMaturity preview * @requiredField orderIds * @permissionId ECOM.MODIFY_ORDERS * @permissionId ECOM.ORDER_MODIFY_PRIVATE_TAGS * @adminMethod */ function bulkUpdateOrderTags(orderIds: string[], options?: BulkUpdateOrderTagsOptions): Promise; interface BulkUpdateOrderTagsOptions { /** Tags to be added to orders */ assignTags?: Tags; /** Tags to be removed from orders */ unassignTags?: Tags; } type ecomV1Order_universal_d_OrderLineItem = OrderLineItem; type ecomV1Order_universal_d_ProductName = ProductName; type ecomV1Order_universal_d_DescriptionLine = DescriptionLine; type ecomV1Order_universal_d_DescriptionLineValueOneOf = DescriptionLineValueOneOf; type ecomV1Order_universal_d_DescriptionLineDescriptionLineValueOneOf = DescriptionLineDescriptionLineValueOneOf; type ecomV1Order_universal_d_DescriptionLineName = DescriptionLineName; type ecomV1Order_universal_d_PlainTextValue = PlainTextValue; type ecomV1Order_universal_d_Color = Color; type ecomV1Order_universal_d_DescriptionLineType = DescriptionLineType; const ecomV1Order_universal_d_DescriptionLineType: typeof DescriptionLineType; type ecomV1Order_universal_d_FocalPoint = FocalPoint; type ecomV1Order_universal_d_LineItemTaxInfo = LineItemTaxInfo; type ecomV1Order_universal_d_LineItemTaxBreakdown = LineItemTaxBreakdown; type ecomV1Order_universal_d_PriceDescription = PriceDescription; type ecomV1Order_universal_d_LocationAndQuantity = LocationAndQuantity; type ecomV1Order_universal_d_BuyerInfoIdOneOf = BuyerInfoIdOneOf; type ecomV1Order_universal_d_AddressWithContact = AddressWithContact; type ecomV1Order_universal_d_DeliveryLogisticsAddressOneOf = DeliveryLogisticsAddressOneOf; type ecomV1Order_universal_d_OrderStatus = OrderStatus; const ecomV1Order_universal_d_OrderStatus: typeof OrderStatus; type ecomV1Order_universal_d_OrderTaxInfo = OrderTaxInfo; type ecomV1Order_universal_d_OrderTaxBreakdown = OrderTaxBreakdown; type ecomV1Order_universal_d_MerchantDiscountMerchantDiscountReasonOneOf = MerchantDiscountMerchantDiscountReasonOneOf; type ecomV1Order_universal_d_DiscountReason = DiscountReason; const ecomV1Order_universal_d_DiscountReason: typeof DiscountReason; type ecomV1Order_universal_d_ActivityContentOneOf = ActivityContentOneOf; type ecomV1Order_universal_d_CustomActivity = CustomActivity; type ecomV1Order_universal_d_MerchantComment = MerchantComment; type ecomV1Order_universal_d_OrderCreatedFromExchange = OrderCreatedFromExchange; type ecomV1Order_universal_d_NewExchangeOrderCreated = NewExchangeOrderCreated; type ecomV1Order_universal_d_LineItemExchangeData = LineItemExchangeData; type ecomV1Order_universal_d_DraftOrderChangesApplied = DraftOrderChangesApplied; type ecomV1Order_universal_d_OrderChange = OrderChange; type ecomV1Order_universal_d_OrderChangeValueOneOf = OrderChangeValueOneOf; type ecomV1Order_universal_d_LineItemChanges = LineItemChanges; type ecomV1Order_universal_d_LineItemQuantityChange = LineItemQuantityChange; type ecomV1Order_universal_d_LineItemQuantityChangeType = LineItemQuantityChangeType; const ecomV1Order_universal_d_LineItemQuantityChangeType: typeof LineItemQuantityChangeType; type ecomV1Order_universal_d_LineItemPriceChange = LineItemPriceChange; type ecomV1Order_universal_d_ManagedLineItem = ManagedLineItem; type ecomV1Order_universal_d_ManagedDiscount = ManagedDiscount; type ecomV1Order_universal_d_TranslatedValue = TranslatedValue; type ecomV1Order_universal_d_LineItemAmount = LineItemAmount; type ecomV1Order_universal_d_ManagedAdditionalFee = ManagedAdditionalFee; type ecomV1Order_universal_d_TotalPriceChange = TotalPriceChange; type ecomV1Order_universal_d_ShippingInformationChange = ShippingInformationChange; type ecomV1Order_universal_d_ShippingInformationChangeShippingInformation = ShippingInformationChangeShippingInformation; type ecomV1Order_universal_d_SavedPaymentMethod = SavedPaymentMethod; type ecomV1Order_universal_d_AuthorizedPaymentCreated = AuthorizedPaymentCreated; type ecomV1Order_universal_d_AuthorizedPaymentCaptured = AuthorizedPaymentCaptured; type ecomV1Order_universal_d_AuthorizedPaymentVoided = AuthorizedPaymentVoided; type ecomV1Order_universal_d_RefundInitiated = RefundInitiated; type ecomV1Order_universal_d_RefundedPayment = RefundedPayment; type ecomV1Order_universal_d_RefundedPaymentKindOneOf = RefundedPaymentKindOneOf; type ecomV1Order_universal_d_RegularPaymentRefund = RegularPaymentRefund; type ecomV1Order_universal_d_GiftCardPaymentRefund = GiftCardPaymentRefund; type ecomV1Order_universal_d_MembershipPaymentRefund = MembershipPaymentRefund; type ecomV1Order_universal_d_PaymentRefunded = PaymentRefunded; type ecomV1Order_universal_d_PaymentRefundFailed = PaymentRefundFailed; type ecomV1Order_universal_d_RefundedAsStoreCredit = RefundedAsStoreCredit; type ecomV1Order_universal_d_PaymentPending = PaymentPending; type ecomV1Order_universal_d_PaymentPendingPaymentDetailsOneOf = PaymentPendingPaymentDetailsOneOf; type ecomV1Order_universal_d_RegularPayment = RegularPayment; type ecomV1Order_universal_d_RegularPaymentPaymentMethodDetailsOneOf = RegularPaymentPaymentMethodDetailsOneOf; type ecomV1Order_universal_d_CreditCardDetails = CreditCardDetails; type ecomV1Order_universal_d_PaymentCanceled = PaymentCanceled; type ecomV1Order_universal_d_PaymentCanceledPaymentDetailsOneOf = PaymentCanceledPaymentDetailsOneOf; type ecomV1Order_universal_d_PaymentDeclined = PaymentDeclined; type ecomV1Order_universal_d_PaymentDeclinedPaymentDetailsOneOf = PaymentDeclinedPaymentDetailsOneOf; type ecomV1Order_universal_d_AttributionSource = AttributionSource; const ecomV1Order_universal_d_AttributionSource: typeof AttributionSource; type ecomV1Order_universal_d_CreatedBy = CreatedBy; type ecomV1Order_universal_d_CreatedByStringOneOf = CreatedByStringOneOf; type ecomV1Order_universal_d_BalanceSummary = BalanceSummary; type ecomV1Order_universal_d_Balance = Balance; type ecomV1Order_universal_d_FulfillmentStatusesAggregate = FulfillmentStatusesAggregate; type ecomV1Order_universal_d_Tags = Tags; type ecomV1Order_universal_d_TagList = TagList; type ecomV1Order_universal_d_Location = Location; type ecomV1Order_universal_d_TriggerReindexOrderRequest = TriggerReindexOrderRequest; type ecomV1Order_universal_d_PaymentStatusUpdated = PaymentStatusUpdated; type ecomV1Order_universal_d_OrderRejectedEventOrderRejected = OrderRejectedEventOrderRejected; type ecomV1Order_universal_d_OrderItemsRestocked = OrderItemsRestocked; type ecomV1Order_universal_d_V1RestockItem = V1RestockItem; type ecomV1Order_universal_d_GetMetasiteDataRequest = GetMetasiteDataRequest; type ecomV1Order_universal_d_GetMetasiteDataResponse = GetMetasiteDataResponse; type ecomV1Order_universal_d_MetaSite = MetaSite; type ecomV1Order_universal_d_App = App; type ecomV1Order_universal_d_State = State; const ecomV1Order_universal_d_State: typeof State; type ecomV1Order_universal_d_Namespace = Namespace; const ecomV1Order_universal_d_Namespace: typeof Namespace; type ecomV1Order_universal_d_SeoData = SeoData; type ecomV1Order_universal_d_MetaTag = MetaTag; type ecomV1Order_universal_d_HtmlApplication = HtmlApplication; type ecomV1Order_universal_d_ExternalUriMapping = ExternalUriMapping; type ecomV1Order_universal_d_UserDataResponse = UserDataResponse; type ecomV1Order_universal_d_QueryOrdersForMetasiteRequest = QueryOrdersForMetasiteRequest; type ecomV1Order_universal_d_InternalQueryOrdersRequest = InternalQueryOrdersRequest; type ecomV1Order_universal_d_PlatformQuery = PlatformQuery; type ecomV1Order_universal_d_PlatformQueryPagingMethodOneOf = PlatformQueryPagingMethodOneOf; type ecomV1Order_universal_d_PlatformPaging = PlatformPaging; type ecomV1Order_universal_d_QueryOrdersForMetasiteResponse = QueryOrdersForMetasiteResponse; type ecomV1Order_universal_d_PlatformPagingMetadata = PlatformPagingMetadata; type ecomV1Order_universal_d_GetOrderForMetasiteRequest = GetOrderForMetasiteRequest; type ecomV1Order_universal_d_GetOrderForMetasiteResponse = GetOrderForMetasiteResponse; type ecomV1Order_universal_d_ListOrderTransactionsForMetasiteRequest = ListOrderTransactionsForMetasiteRequest; type ecomV1Order_universal_d_ListOrderTransactionsForMetasiteResponse = ListOrderTransactionsForMetasiteResponse; type ecomV1Order_universal_d_V1LineItemRefund = V1LineItemRefund; type ecomV1Order_universal_d_V1AdditionalFeeRefund = V1AdditionalFeeRefund; type ecomV1Order_universal_d_V1ShippingRefund = V1ShippingRefund; type ecomV1Order_universal_d_UpsertRefundRequest = UpsertRefundRequest; type ecomV1Order_universal_d_UpsertRefundResponse = UpsertRefundResponse; type ecomV1Order_universal_d_UpdateInternalDocumentsEvent = UpdateInternalDocumentsEvent; type ecomV1Order_universal_d_UpdateInternalDocumentsEventOperationOneOf = UpdateInternalDocumentsEventOperationOneOf; type ecomV1Order_universal_d_InternalDocument = InternalDocument; type ecomV1Order_universal_d_InternalDocumentUpdateOperation = InternalDocumentUpdateOperation; type ecomV1Order_universal_d_DeleteByIdsOperation = DeleteByIdsOperation; type ecomV1Order_universal_d_DeleteByFilterOperation = DeleteByFilterOperation; type ecomV1Order_universal_d_InternalDocumentUpdateByFilterOperation = InternalDocumentUpdateByFilterOperation; type ecomV1Order_universal_d_InternalUpdateExistingOperation = InternalUpdateExistingOperation; type ecomV1Order_universal_d_VersionedDocumentUpdateOperation = VersionedDocumentUpdateOperation; type ecomV1Order_universal_d_VersioningMode = VersioningMode; const ecomV1Order_universal_d_VersioningMode: typeof VersioningMode; type ecomV1Order_universal_d_VersionedDeleteByIdsOperation = VersionedDeleteByIdsOperation; type ecomV1Order_universal_d_VersionedDocumentId = VersionedDocumentId; type ecomV1Order_universal_d_TriggerReindexRequest = TriggerReindexRequest; type ecomV1Order_universal_d_TriggerReindexResponse = TriggerReindexResponse; type ecomV1Order_universal_d_BatchOfTriggerReindexOrderRequest = BatchOfTriggerReindexOrderRequest; type ecomV1Order_universal_d_SendBuyerConfirmationEmailRequest = SendBuyerConfirmationEmailRequest; type ecomV1Order_universal_d_SendBuyerConfirmationEmailResponse = SendBuyerConfirmationEmailResponse; type ecomV1Order_universal_d_SendBuyerPaymentsReceivedEmailRequest = SendBuyerPaymentsReceivedEmailRequest; type ecomV1Order_universal_d_SendBuyerPaymentsReceivedEmailResponse = SendBuyerPaymentsReceivedEmailResponse; type ecomV1Order_universal_d_SendBuyerPickupConfirmationEmailRequest = SendBuyerPickupConfirmationEmailRequest; type ecomV1Order_universal_d_SendBuyerPickupConfirmationEmailResponse = SendBuyerPickupConfirmationEmailResponse; type ecomV1Order_universal_d_BulkSendBuyerPickupConfirmationEmailsRequest = BulkSendBuyerPickupConfirmationEmailsRequest; type ecomV1Order_universal_d_BulkSendBuyerPickupConfirmationEmailsResponse = BulkSendBuyerPickupConfirmationEmailsResponse; type ecomV1Order_universal_d_SendBuyerShippingConfirmationEmailRequest = SendBuyerShippingConfirmationEmailRequest; type ecomV1Order_universal_d_SendBuyerShippingConfirmationEmailResponse = SendBuyerShippingConfirmationEmailResponse; type ecomV1Order_universal_d_BulkSendBuyerShippingConfirmationEmailsRequest = BulkSendBuyerShippingConfirmationEmailsRequest; type ecomV1Order_universal_d_BulkSendBuyerShippingConfirmationEmailsResponse = BulkSendBuyerShippingConfirmationEmailsResponse; type ecomV1Order_universal_d_SendMerchantOrderReceivedNotificationRequest = SendMerchantOrderReceivedNotificationRequest; type ecomV1Order_universal_d_SendMerchantOrderReceivedNotificationResponse = SendMerchantOrderReceivedNotificationResponse; type ecomV1Order_universal_d_SendCancelRefundEmailRequest = SendCancelRefundEmailRequest; type ecomV1Order_universal_d_SendCancelRefundEmailResponse = SendCancelRefundEmailResponse; type ecomV1Order_universal_d_SendRefundEmailRequest = SendRefundEmailRequest; type ecomV1Order_universal_d_SendRefundEmailResponse = SendRefundEmailResponse; type ecomV1Order_universal_d_SendMerchantOrderReceivedPushRequest = SendMerchantOrderReceivedPushRequest; type ecomV1Order_universal_d_SendMerchantOrderReceivedPushResponse = SendMerchantOrderReceivedPushResponse; type ecomV1Order_universal_d_PreviewEmailByTypeRequest = PreviewEmailByTypeRequest; type ecomV1Order_universal_d_PreviewEmailType = PreviewEmailType; const ecomV1Order_universal_d_PreviewEmailType: typeof PreviewEmailType; type ecomV1Order_universal_d_PreviewEmailByTypeResponse = PreviewEmailByTypeResponse; type ecomV1Order_universal_d_PreviewRefundEmailRequest = PreviewRefundEmailRequest; type ecomV1Order_universal_d_PreviewRefundEmailResponse = PreviewRefundEmailResponse; type ecomV1Order_universal_d_PreviewCancelEmailRequest = PreviewCancelEmailRequest; type ecomV1Order_universal_d_PreviewCancelEmailResponse = PreviewCancelEmailResponse; type ecomV1Order_universal_d_PreviewCancelRefundEmailRequest = PreviewCancelRefundEmailRequest; type ecomV1Order_universal_d_PreviewCancelRefundEmailResponse = PreviewCancelRefundEmailResponse; type ecomV1Order_universal_d_PreviewBuyerPaymentsReceivedEmailRequest = PreviewBuyerPaymentsReceivedEmailRequest; type ecomV1Order_universal_d_PreviewBuyerPaymentsReceivedEmailResponse = PreviewBuyerPaymentsReceivedEmailResponse; type ecomV1Order_universal_d_PreviewBuyerConfirmationEmailRequest = PreviewBuyerConfirmationEmailRequest; type ecomV1Order_universal_d_PreviewBuyerConfirmationEmailResponse = PreviewBuyerConfirmationEmailResponse; type ecomV1Order_universal_d_PreviewBuyerPickupConfirmationEmailRequest = PreviewBuyerPickupConfirmationEmailRequest; type ecomV1Order_universal_d_PreviewBuyerPickupConfirmationEmailResponse = PreviewBuyerPickupConfirmationEmailResponse; type ecomV1Order_universal_d_PreviewShippingConfirmationEmailRequest = PreviewShippingConfirmationEmailRequest; type ecomV1Order_universal_d_PreviewShippingConfirmationEmailResponse = PreviewShippingConfirmationEmailResponse; type ecomV1Order_universal_d_PreviewResendDownloadLinksEmailRequest = PreviewResendDownloadLinksEmailRequest; type ecomV1Order_universal_d_PreviewResendDownloadLinksEmailResponse = PreviewResendDownloadLinksEmailResponse; type ecomV1Order_universal_d_PreparePaymentCollectionRequest = PreparePaymentCollectionRequest; type ecomV1Order_universal_d_RedirectUrls = RedirectUrls; type ecomV1Order_universal_d_DelayedCaptureSettings = DelayedCaptureSettings; type ecomV1Order_universal_d_DelayedCaptureSettingsScheduledAction = DelayedCaptureSettingsScheduledAction; const ecomV1Order_universal_d_DelayedCaptureSettingsScheduledAction: typeof DelayedCaptureSettingsScheduledAction; type ecomV1Order_universal_d_Duration = Duration; type ecomV1Order_universal_d_DurationUnit = DurationUnit; const ecomV1Order_universal_d_DurationUnit: typeof DurationUnit; type ecomV1Order_universal_d_PreparePaymentCollectionResponse = PreparePaymentCollectionResponse; type ecomV1Order_universal_d_GetPaymentCollectabilityStatusRequest = GetPaymentCollectabilityStatusRequest; type ecomV1Order_universal_d_GetPaymentCollectabilityStatusResponse = GetPaymentCollectabilityStatusResponse; type ecomV1Order_universal_d_PaymentCollectabilityStatus = PaymentCollectabilityStatus; const ecomV1Order_universal_d_PaymentCollectabilityStatus: typeof PaymentCollectabilityStatus; type ecomV1Order_universal_d_RecordManuallyCollectedPaymentRequest = RecordManuallyCollectedPaymentRequest; type ecomV1Order_universal_d_RecordManuallyCollectedPaymentResponse = RecordManuallyCollectedPaymentResponse; type ecomV1Order_universal_d_MarkOrderAsPaidRequest = MarkOrderAsPaidRequest; type ecomV1Order_universal_d_MarkOrderAsPaidResponse = MarkOrderAsPaidResponse; type ecomV1Order_universal_d_BulkMarkOrdersAsPaidRequest = BulkMarkOrdersAsPaidRequest; type ecomV1Order_universal_d_BulkMarkOrdersAsPaidResponse = BulkMarkOrdersAsPaidResponse; type ecomV1Order_universal_d_BulkOrderResult = BulkOrderResult; type ecomV1Order_universal_d_CreatePaymentGatewayOrderRequest = CreatePaymentGatewayOrderRequest; type ecomV1Order_universal_d_ChargedBy = ChargedBy; type ecomV1Order_universal_d_CreatePaymentGatewayOrderResponse = CreatePaymentGatewayOrderResponse; type ecomV1Order_universal_d_ChargeMembershipsRequest = ChargeMembershipsRequest; type ecomV1Order_universal_d_MembershipChargeItem = MembershipChargeItem; type ecomV1Order_universal_d_ChargeMembershipsResponse = ChargeMembershipsResponse; type ecomV1Order_universal_d_VoidAuthorizedPaymentsRequest = VoidAuthorizedPaymentsRequest; type ecomV1Order_universal_d_VoidAuthorizedPaymentsResponse = VoidAuthorizedPaymentsResponse; type ecomV1Order_universal_d_CaptureAuthorizedPaymentsRequest = CaptureAuthorizedPaymentsRequest; type ecomV1Order_universal_d_PaymentCapture = PaymentCapture; type ecomV1Order_universal_d_CaptureAuthorizedPaymentsResponse = CaptureAuthorizedPaymentsResponse; type ecomV1Order_universal_d_ChargeSavedPaymentMethodRequest = ChargeSavedPaymentMethodRequest; type ecomV1Order_universal_d_ChargeSavedPaymentMethodResponse = ChargeSavedPaymentMethodResponse; type ecomV1Order_universal_d_ContinueSideEffectsFlowInLegacyData = ContinueSideEffectsFlowInLegacyData; type ecomV1Order_universal_d_OrdersExperiments = OrdersExperiments; type ecomV1Order_universal_d_GetOrderRequest = GetOrderRequest; type ecomV1Order_universal_d_GetOrderResponse = GetOrderResponse; type ecomV1Order_universal_d_InternalQueryOrdersResponse = InternalQueryOrdersResponse; type ecomV1Order_universal_d_QueryOrderRequest = QueryOrderRequest; type ecomV1Order_universal_d_QueryOrderResponse = QueryOrderResponse; type ecomV1Order_universal_d_SearchOrdersRequest = SearchOrdersRequest; type ecomV1Order_universal_d_CursorSearch = CursorSearch; type ecomV1Order_universal_d_CursorSearchPagingMethodOneOf = CursorSearchPagingMethodOneOf; type ecomV1Order_universal_d_SearchOrdersResponse = SearchOrdersResponse; type ecomV1Order_universal_d_CreateOrderRequest = CreateOrderRequest; type ecomV1Order_universal_d_OrderCreationSettings = OrderCreationSettings; type ecomV1Order_universal_d_OrderApprovalStrategy = OrderApprovalStrategy; const ecomV1Order_universal_d_OrderApprovalStrategy: typeof OrderApprovalStrategy; type ecomV1Order_universal_d_OrderCreateNotifications = OrderCreateNotifications; type ecomV1Order_universal_d_CreateOrderResponse = CreateOrderResponse; type ecomV1Order_universal_d_UpdateOrderRequest = UpdateOrderRequest; type ecomV1Order_universal_d_UpdateOrderResponse = UpdateOrderResponse; type ecomV1Order_universal_d_BulkUpdateOrdersRequest = BulkUpdateOrdersRequest; type ecomV1Order_universal_d_MaskedOrder = MaskedOrder; type ecomV1Order_universal_d_BulkUpdateOrdersResponse = BulkUpdateOrdersResponse; type ecomV1Order_universal_d_CommitDeltasRequest = CommitDeltasRequest; type ecomV1Order_universal_d_DraftOrderDiffs = DraftOrderDiffs; type ecomV1Order_universal_d_DraftOrderDiffsShippingUpdateInfoOneOf = DraftOrderDiffsShippingUpdateInfoOneOf; type ecomV1Order_universal_d_DraftOrderDiffsBuyerUpdateInfoOneOf = DraftOrderDiffsBuyerUpdateInfoOneOf; type ecomV1Order_universal_d_DraftOrderDiffsBillingUpdateInfoOneOf = DraftOrderDiffsBillingUpdateInfoOneOf; type ecomV1Order_universal_d_DraftOrderDiffsRecipientUpdateInfoOneOf = DraftOrderDiffsRecipientUpdateInfoOneOf; type ecomV1Order_universal_d_V1LineItemDelta = V1LineItemDelta; type ecomV1Order_universal_d_V1LineItemDeltaDeltaOneOf = V1LineItemDeltaDeltaOneOf; type ecomV1Order_universal_d_OrderLineItemChangedDetails = OrderLineItemChangedDetails; type ecomV1Order_universal_d_DeltaPaymentOptionType = DeltaPaymentOptionType; const ecomV1Order_universal_d_DeltaPaymentOptionType: typeof DeltaPaymentOptionType; type ecomV1Order_universal_d_ItemChangedDetails = ItemChangedDetails; type ecomV1Order_universal_d_AppliedDiscountDelta = AppliedDiscountDelta; type ecomV1Order_universal_d_AppliedDiscountDeltaDeltaOneOf = AppliedDiscountDeltaDeltaOneOf; type ecomV1Order_universal_d_AdditionalFeeDelta = AdditionalFeeDelta; type ecomV1Order_universal_d_AdditionalFeeDeltaDeltaOneOf = AdditionalFeeDeltaDeltaOneOf; type ecomV1Order_universal_d_DraftOrderCommitSettings = DraftOrderCommitSettings; type ecomV1Order_universal_d_InventoryUpdateDetails = InventoryUpdateDetails; type ecomV1Order_universal_d_InventoryAction = InventoryAction; const ecomV1Order_universal_d_InventoryAction: typeof InventoryAction; type ecomV1Order_universal_d_CommitDeltasResponse = CommitDeltasResponse; type ecomV1Order_universal_d_OrderDeltasCommitted = OrderDeltasCommitted; type ecomV1Order_universal_d_CommittedDiffs = CommittedDiffs; type ecomV1Order_universal_d_CommittedDiffsShippingUpdateInfoOneOf = CommittedDiffsShippingUpdateInfoOneOf; type ecomV1Order_universal_d_LineItemDelta = LineItemDelta; type ecomV1Order_universal_d_LineItemDeltaDeltaOneOf = LineItemDeltaDeltaOneOf; type ecomV1Order_universal_d_ArchiveOrderRequest = ArchiveOrderRequest; type ecomV1Order_universal_d_ArchiveOrderResponse = ArchiveOrderResponse; type ecomV1Order_universal_d_BulkArchiveOrdersRequest = BulkArchiveOrdersRequest; type ecomV1Order_universal_d_BulkArchiveOrdersResponse = BulkArchiveOrdersResponse; type ecomV1Order_universal_d_BulkArchiveOrdersByFilterRequest = BulkArchiveOrdersByFilterRequest; type ecomV1Order_universal_d_BulkArchiveOrdersByFilterResponse = BulkArchiveOrdersByFilterResponse; type ecomV1Order_universal_d_UnArchiveOrderRequest = UnArchiveOrderRequest; type ecomV1Order_universal_d_UnArchiveOrderResponse = UnArchiveOrderResponse; type ecomV1Order_universal_d_BulkUnArchiveOrdersRequest = BulkUnArchiveOrdersRequest; type ecomV1Order_universal_d_BulkUnArchiveOrdersResponse = BulkUnArchiveOrdersResponse; type ecomV1Order_universal_d_BulkUnArchiveOrdersByFilterRequest = BulkUnArchiveOrdersByFilterRequest; type ecomV1Order_universal_d_BulkUnArchiveOrdersByFilterResponse = BulkUnArchiveOrdersByFilterResponse; type ecomV1Order_universal_d_UpdateBuyerInfoRequest = UpdateBuyerInfoRequest; type ecomV1Order_universal_d_BuyerInfoUpdate = BuyerInfoUpdate; type ecomV1Order_universal_d_UpdateBuyerInfoResponse = UpdateBuyerInfoResponse; type ecomV1Order_universal_d_UpdateBuyerEmailRequest = UpdateBuyerEmailRequest; type ecomV1Order_universal_d_UpdateBuyerEmailResponse = UpdateBuyerEmailResponse; type ecomV1Order_universal_d_UpdateOrderShippingAddressRequest = UpdateOrderShippingAddressRequest; type ecomV1Order_universal_d_UpdateOrderShippingAddressResponse = UpdateOrderShippingAddressResponse; type ecomV1Order_universal_d_UpdateBillingContactDetailsRequest = UpdateBillingContactDetailsRequest; type ecomV1Order_universal_d_UpdateBillingContactDetailsResponse = UpdateBillingContactDetailsResponse; type ecomV1Order_universal_d_UpdateOrderLineItemRequest = UpdateOrderLineItemRequest; type ecomV1Order_universal_d_UpdateOrderLineItemResponse = UpdateOrderLineItemResponse; type ecomV1Order_universal_d_UpdateOrderLineItemsRequest = UpdateOrderLineItemsRequest; type ecomV1Order_universal_d_MaskedOrderLineItem = MaskedOrderLineItem; type ecomV1Order_universal_d_UpdateOrderLineItemsResponse = UpdateOrderLineItemsResponse; type ecomV1Order_universal_d_AddInternalActivityRequest = AddInternalActivityRequest; type ecomV1Order_universal_d_InternalActivity = InternalActivity; type ecomV1Order_universal_d_InternalActivityContentOneOf = InternalActivityContentOneOf; type ecomV1Order_universal_d_OrderPlaced = OrderPlaced; type ecomV1Order_universal_d_OrderPaid = OrderPaid; type ecomV1Order_universal_d_OrderFulfilled = OrderFulfilled; type ecomV1Order_universal_d_OrderNotFulfilled = OrderNotFulfilled; type ecomV1Order_universal_d_OrderCanceled = OrderCanceled; type ecomV1Order_universal_d_DownloadLinkSent = DownloadLinkSent; type ecomV1Order_universal_d_TrackingNumberAdded = TrackingNumberAdded; type ecomV1Order_universal_d_TrackingNumberEdited = TrackingNumberEdited; type ecomV1Order_universal_d_TrackingLinkAdded = TrackingLinkAdded; type ecomV1Order_universal_d_ShippingConfirmationEmailSent = ShippingConfirmationEmailSent; type ecomV1Order_universal_d_InvoiceAdded = InvoiceAdded; type ecomV1Order_universal_d_InvoiceSent = InvoiceSent; type ecomV1Order_universal_d_FulfillerEmailSent = FulfillerEmailSent; type ecomV1Order_universal_d_ShippingAddressEdited = ShippingAddressEdited; type ecomV1Order_universal_d_EmailEdited = EmailEdited; type ecomV1Order_universal_d_PickupReadyEmailSent = PickupReadyEmailSent; type ecomV1Order_universal_d_OrderPartiallyPaid = OrderPartiallyPaid; type ecomV1Order_universal_d_OrderPending = OrderPending; type ecomV1Order_universal_d_OrderRejected = OrderRejected; type ecomV1Order_universal_d_AddInternalActivityResponse = AddInternalActivityResponse; type ecomV1Order_universal_d_AddActivityRequest = AddActivityRequest; type ecomV1Order_universal_d_PublicActivity = PublicActivity; type ecomV1Order_universal_d_PublicActivityContentOneOf = PublicActivityContentOneOf; type ecomV1Order_universal_d_AddActivityResponse = AddActivityResponse; type ecomV1Order_universal_d_AddActivitiesRequest = AddActivitiesRequest; type ecomV1Order_universal_d_AddActivitiesResponse = AddActivitiesResponse; type ecomV1Order_universal_d_UpdateActivityRequest = UpdateActivityRequest; type ecomV1Order_universal_d_UpdateActivityResponse = UpdateActivityResponse; type ecomV1Order_universal_d_DeleteActivityRequest = DeleteActivityRequest; type ecomV1Order_universal_d_DeleteActivityResponse = DeleteActivityResponse; type ecomV1Order_universal_d_UpdateLineItemsDescriptionLinesRequest = UpdateLineItemsDescriptionLinesRequest; type ecomV1Order_universal_d_LineItemUpdate = LineItemUpdate; type ecomV1Order_universal_d_UpdateLineItemsDescriptionLinesResponse = UpdateLineItemsDescriptionLinesResponse; type ecomV1Order_universal_d_MarkOrderAsSeenByHumanRequest = MarkOrderAsSeenByHumanRequest; type ecomV1Order_universal_d_MarkOrderAsSeenByHumanResponse = MarkOrderAsSeenByHumanResponse; type ecomV1Order_universal_d_CancelOrderRequest = CancelOrderRequest; type ecomV1Order_universal_d_CancelOrderResponse = CancelOrderResponse; type ecomV1Order_universal_d_OrderCanceledEventOrderCanceled = OrderCanceledEventOrderCanceled; type ecomV1Order_universal_d_MarkAsFulfilledRequest = MarkAsFulfilledRequest; type ecomV1Order_universal_d_MarkAsFulfilledResponse = MarkAsFulfilledResponse; type ecomV1Order_universal_d_FulfillmentStatusUpdated = FulfillmentStatusUpdated; type ecomV1Order_universal_d_BulkMarkAsFulfilledRequest = BulkMarkAsFulfilledRequest; type ecomV1Order_universal_d_BulkMarkAsFulfilledResponse = BulkMarkAsFulfilledResponse; type ecomV1Order_universal_d_BulkMarkAsFulfilledByFilterRequest = BulkMarkAsFulfilledByFilterRequest; type ecomV1Order_universal_d_BulkMarkAsFulfilledByFilterResponse = BulkMarkAsFulfilledByFilterResponse; type ecomV1Order_universal_d_MarkAsUnfulfilledRequest = MarkAsUnfulfilledRequest; type ecomV1Order_universal_d_MarkAsUnfulfilledResponse = MarkAsUnfulfilledResponse; type ecomV1Order_universal_d_BulkMarkAsUnfulfilledRequest = BulkMarkAsUnfulfilledRequest; type ecomV1Order_universal_d_BulkMarkAsUnfulfilledResponse = BulkMarkAsUnfulfilledResponse; type ecomV1Order_universal_d_BulkMarkAsUnfulfilledByFilterRequest = BulkMarkAsUnfulfilledByFilterRequest; type ecomV1Order_universal_d_BulkMarkAsUnfulfilledByFilterResponse = BulkMarkAsUnfulfilledByFilterResponse; type ecomV1Order_universal_d_V1MarkOrderAsPaidRequest = V1MarkOrderAsPaidRequest; type ecomV1Order_universal_d_V1MarkOrderAsPaidResponse = V1MarkOrderAsPaidResponse; type ecomV1Order_universal_d_V1BulkMarkOrdersAsPaidRequest = V1BulkMarkOrdersAsPaidRequest; type ecomV1Order_universal_d_V1BulkMarkOrdersAsPaidResponse = V1BulkMarkOrdersAsPaidResponse; type ecomV1Order_universal_d_V1CreatePaymentGatewayOrderRequest = V1CreatePaymentGatewayOrderRequest; type ecomV1Order_universal_d_V1CreatePaymentGatewayOrderResponse = V1CreatePaymentGatewayOrderResponse; type ecomV1Order_universal_d_GetShipmentsRequest = GetShipmentsRequest; type ecomV1Order_universal_d_GetShipmentsResponse = GetShipmentsResponse; type ecomV1Order_universal_d_AggregateOrdersRequest = AggregateOrdersRequest; type ecomV1Order_universal_d_AggregateOrdersResponse = AggregateOrdersResponse; type ecomV1Order_universal_d_DecrementItemsQuantityRequest = DecrementItemsQuantityRequest; type ecomV1Order_universal_d_DecrementData = DecrementData; type ecomV1Order_universal_d_DecrementItemsQuantityResponse = DecrementItemsQuantityResponse; type ecomV1Order_universal_d_BulkUpdateOrderTagsRequest = BulkUpdateOrderTagsRequest; type ecomV1Order_universal_d_BulkUpdateOrderTagsResponse = BulkUpdateOrderTagsResponse; type ecomV1Order_universal_d_BulkUpdateOrderTagsResult = BulkUpdateOrderTagsResult; type ecomV1Order_universal_d_OrderApproved = OrderApproved; type ecomV1Order_universal_d_Task = Task; type ecomV1Order_universal_d_TaskKey = TaskKey; type ecomV1Order_universal_d_TaskAction = TaskAction; type ecomV1Order_universal_d_TaskActionActionOneOf = TaskActionActionOneOf; type ecomV1Order_universal_d_Complete = Complete; type ecomV1Order_universal_d_Cancel = Cancel; type ecomV1Order_universal_d_Reschedule = Reschedule; type ecomV1Order_universal_d_InvoiceSentEvent = InvoiceSentEvent; type ecomV1Order_universal_d_IdAndVersion = IdAndVersion; type ecomV1Order_universal_d_InvoiceFields = InvoiceFields; type ecomV1Order_universal_d_Customer = Customer; type ecomV1Order_universal_d_Email = Email; type ecomV1Order_universal_d_QuotesAddress = QuotesAddress; type ecomV1Order_universal_d_AddressDescription = AddressDescription; type ecomV1Order_universal_d_Placement = Placement; const ecomV1Order_universal_d_Placement: typeof Placement; type ecomV1Order_universal_d_Phone = Phone; type ecomV1Order_universal_d_Company = Company; type ecomV1Order_universal_d_CommonAddress = CommonAddress; type ecomV1Order_universal_d_CommonAddressStreetOneOf = CommonAddressStreetOneOf; type ecomV1Order_universal_d_StandardDetails = StandardDetails; type ecomV1Order_universal_d_InvoiceDates = InvoiceDates; type ecomV1Order_universal_d_LineItems = LineItems; type ecomV1Order_universal_d_BigDecimalWrapper = BigDecimalWrapper; type ecomV1Order_universal_d_LineItemTax = LineItemTax; type ecomV1Order_universal_d_SourceType = SourceType; const ecomV1Order_universal_d_SourceType: typeof SourceType; type ecomV1Order_universal_d_LineItemMetaData = LineItemMetaData; type ecomV1Order_universal_d_Locale = Locale; type ecomV1Order_universal_d_TotalPrice = TotalPrice; type ecomV1Order_universal_d_ItemizedFee = ItemizedFee; type ecomV1Order_universal_d_DiscountOneDiscountTypeOneOf = DiscountOneDiscountTypeOneOf; type ecomV1Order_universal_d_CalculatedTaxes = CalculatedTaxes; type ecomV1Order_universal_d_CalculatedTax = CalculatedTax; type ecomV1Order_universal_d_Payments = Payments; type ecomV1Order_universal_d_InvoicesPayment = InvoicesPayment; type ecomV1Order_universal_d_MetaData = MetaData; type ecomV1Order_universal_d_InvoiceDynamicPriceTotals = InvoiceDynamicPriceTotals; type ecomV1Order_universal_d_CustomFieldValue = CustomFieldValue; type ecomV1Order_universal_d_CustomFieldGroup = CustomFieldGroup; const ecomV1Order_universal_d_CustomFieldGroup: typeof CustomFieldGroup; type ecomV1Order_universal_d_Value = Value; type ecomV1Order_universal_d_ValueType = ValueType; const ecomV1Order_universal_d_ValueType: typeof ValueType; type ecomV1Order_universal_d_Deposit = Deposit; type ecomV1Order_universal_d_DepositType = DepositType; const ecomV1Order_universal_d_DepositType: typeof DepositType; type ecomV1Order_universal_d_InvoiceStatus = InvoiceStatus; const ecomV1Order_universal_d_InvoiceStatus: typeof InvoiceStatus; type ecomV1Order_universal_d_TriggerSideEffectsFromLegacyData = TriggerSideEffectsFromLegacyData; const ecomV1Order_universal_d_getMetasiteData: typeof getMetasiteData; const ecomV1Order_universal_d_queryOrdersForMetasite: typeof queryOrdersForMetasite; type ecomV1Order_universal_d_QueryOrdersForMetasiteOptions = QueryOrdersForMetasiteOptions; const ecomV1Order_universal_d_getOrderForMetasite: typeof getOrderForMetasite; type ecomV1Order_universal_d_GetOrderForMetasiteIdentifiers = GetOrderForMetasiteIdentifiers; const ecomV1Order_universal_d_listOrderTransactionsForMetasite: typeof listOrderTransactionsForMetasite; type ecomV1Order_universal_d_ListOrderTransactionsForMetasiteIdentifiers = ListOrderTransactionsForMetasiteIdentifiers; const ecomV1Order_universal_d_triggerReindex: typeof triggerReindex; type ecomV1Order_universal_d_TriggerReindexOptions = TriggerReindexOptions; const ecomV1Order_universal_d_sendBuyerConfirmationEmail: typeof sendBuyerConfirmationEmail; const ecomV1Order_universal_d_sendBuyerPaymentsReceivedEmail: typeof sendBuyerPaymentsReceivedEmail; const ecomV1Order_universal_d_sendBuyerPickupConfirmationEmail: typeof sendBuyerPickupConfirmationEmail; const ecomV1Order_universal_d_bulkSendBuyerPickupConfirmationEmails: typeof bulkSendBuyerPickupConfirmationEmails; type ecomV1Order_universal_d_BulkSendBuyerPickupConfirmationEmailsOptions = BulkSendBuyerPickupConfirmationEmailsOptions; const ecomV1Order_universal_d_sendBuyerShippingConfirmationEmail: typeof sendBuyerShippingConfirmationEmail; const ecomV1Order_universal_d_bulkSendBuyerShippingConfirmationEmails: typeof bulkSendBuyerShippingConfirmationEmails; type ecomV1Order_universal_d_BulkSendBuyerShippingConfirmationEmailsOptions = BulkSendBuyerShippingConfirmationEmailsOptions; const ecomV1Order_universal_d_sendMerchantOrderReceivedNotification: typeof sendMerchantOrderReceivedNotification; const ecomV1Order_universal_d_sendCancelRefundEmail: typeof sendCancelRefundEmail; type ecomV1Order_universal_d_SendCancelRefundEmailOptions = SendCancelRefundEmailOptions; const ecomV1Order_universal_d_sendMerchantOrderReceivedPush: typeof sendMerchantOrderReceivedPush; const ecomV1Order_universal_d_previewEmailByType: typeof previewEmailByType; const ecomV1Order_universal_d_previewRefundEmail: typeof previewRefundEmail; type ecomV1Order_universal_d_PreviewRefundEmailOptions = PreviewRefundEmailOptions; const ecomV1Order_universal_d_previewCancelEmail: typeof previewCancelEmail; type ecomV1Order_universal_d_PreviewCancelEmailOptions = PreviewCancelEmailOptions; const ecomV1Order_universal_d_previewCancelRefundEmail: typeof previewCancelRefundEmail; type ecomV1Order_universal_d_PreviewCancelRefundEmailOptions = PreviewCancelRefundEmailOptions; const ecomV1Order_universal_d_previewBuyerPaymentsReceivedEmail: typeof previewBuyerPaymentsReceivedEmail; const ecomV1Order_universal_d_previewBuyerConfirmationEmail: typeof previewBuyerConfirmationEmail; const ecomV1Order_universal_d_previewBuyerPickupConfirmationEmail: typeof previewBuyerPickupConfirmationEmail; const ecomV1Order_universal_d_previewShippingConfirmationEmail: typeof previewShippingConfirmationEmail; const ecomV1Order_universal_d_previewResendDownloadLinksEmail: typeof previewResendDownloadLinksEmail; const ecomV1Order_universal_d_preparePaymentCollection: typeof preparePaymentCollection; type ecomV1Order_universal_d_PreparePaymentCollectionOptions = PreparePaymentCollectionOptions; const ecomV1Order_universal_d_getPaymentCollectabilityStatus: typeof getPaymentCollectabilityStatus; const ecomV1Order_universal_d_recordManuallyCollectedPayment: typeof recordManuallyCollectedPayment; const ecomV1Order_universal_d_paymentCollectionMarkOrderAsPaid: typeof paymentCollectionMarkOrderAsPaid; const ecomV1Order_universal_d_paymentCollectionBulkMarkOrdersAsPaid: typeof paymentCollectionBulkMarkOrdersAsPaid; const ecomV1Order_universal_d_paymentCollectionCreatePaymentGatewayOrder: typeof paymentCollectionCreatePaymentGatewayOrder; type ecomV1Order_universal_d_PaymentCollectionCreatePaymentGatewayOrderOptions = PaymentCollectionCreatePaymentGatewayOrderOptions; const ecomV1Order_universal_d_chargeMemberships: typeof chargeMemberships; type ecomV1Order_universal_d_ChargeMembershipsOptions = ChargeMembershipsOptions; const ecomV1Order_universal_d_voidAuthorizedPayments: typeof voidAuthorizedPayments; const ecomV1Order_universal_d_captureAuthorizedPayments: typeof captureAuthorizedPayments; const ecomV1Order_universal_d_chargeSavedPaymentMethod: typeof chargeSavedPaymentMethod; const ecomV1Order_universal_d_getOrder: typeof getOrder; const ecomV1Order_universal_d_internalQueryOrders: typeof internalQueryOrders; type ecomV1Order_universal_d_InternalQueryOrdersOptions = InternalQueryOrdersOptions; const ecomV1Order_universal_d_queryOrders: typeof queryOrders; type ecomV1Order_universal_d_OrdersQueryResult = OrdersQueryResult; type ecomV1Order_universal_d_OrdersQueryBuilder = OrdersQueryBuilder; const ecomV1Order_universal_d_searchOrders: typeof searchOrders; type ecomV1Order_universal_d_SearchOrdersOptions = SearchOrdersOptions; const ecomV1Order_universal_d_createOrder: typeof createOrder; type ecomV1Order_universal_d_CreateOrderOptions = CreateOrderOptions; const ecomV1Order_universal_d_updateOrder: typeof updateOrder; type ecomV1Order_universal_d_UpdateOrder = UpdateOrder; type ecomV1Order_universal_d_UpdateOrderOptions = UpdateOrderOptions; const ecomV1Order_universal_d_bulkUpdateOrders: typeof bulkUpdateOrders; type ecomV1Order_universal_d_BulkUpdateOrdersOptions = BulkUpdateOrdersOptions; const ecomV1Order_universal_d_commitDeltas: typeof commitDeltas; type ecomV1Order_universal_d_CommitDeltasOptions = CommitDeltasOptions; const ecomV1Order_universal_d_archiveOrder: typeof archiveOrder; const ecomV1Order_universal_d_bulkArchiveOrders: typeof bulkArchiveOrders; type ecomV1Order_universal_d_BulkArchiveOrdersOptions = BulkArchiveOrdersOptions; const ecomV1Order_universal_d_bulkArchiveOrdersByFilter: typeof bulkArchiveOrdersByFilter; const ecomV1Order_universal_d_unArchiveOrder: typeof unArchiveOrder; const ecomV1Order_universal_d_bulkUnArchiveOrders: typeof bulkUnArchiveOrders; type ecomV1Order_universal_d_BulkUnArchiveOrdersOptions = BulkUnArchiveOrdersOptions; const ecomV1Order_universal_d_bulkUnArchiveOrdersByFilter: typeof bulkUnArchiveOrdersByFilter; const ecomV1Order_universal_d_updateBuyerInfo: typeof updateBuyerInfo; type ecomV1Order_universal_d_UpdateBuyerInfoOptions = UpdateBuyerInfoOptions; const ecomV1Order_universal_d_updateBuyerEmail: typeof updateBuyerEmail; type ecomV1Order_universal_d_UpdateBuyerEmailOptions = UpdateBuyerEmailOptions; const ecomV1Order_universal_d_updateOrderShippingAddress: typeof updateOrderShippingAddress; type ecomV1Order_universal_d_UpdateOrderShippingAddressOptions = UpdateOrderShippingAddressOptions; const ecomV1Order_universal_d_updateBillingContactDetails: typeof updateBillingContactDetails; type ecomV1Order_universal_d_UpdateBillingContactDetailsOptions = UpdateBillingContactDetailsOptions; const ecomV1Order_universal_d_updateOrderLineItem: typeof updateOrderLineItem; type ecomV1Order_universal_d_UpdateOrderLineItemIdentifiers = UpdateOrderLineItemIdentifiers; type ecomV1Order_universal_d_UpdateOrderLineItem = UpdateOrderLineItem; type ecomV1Order_universal_d_UpdateOrderLineItemOptions = UpdateOrderLineItemOptions; const ecomV1Order_universal_d_updateOrderLineItems: typeof updateOrderLineItems; const ecomV1Order_universal_d_addInternalActivity: typeof addInternalActivity; const ecomV1Order_universal_d_addActivity: typeof addActivity; const ecomV1Order_universal_d_addActivities: typeof addActivities; const ecomV1Order_universal_d_updateActivity: typeof updateActivity; type ecomV1Order_universal_d_UpdateActivityIdentifiers = UpdateActivityIdentifiers; const ecomV1Order_universal_d_deleteActivity: typeof deleteActivity; type ecomV1Order_universal_d_DeleteActivityIdentifiers = DeleteActivityIdentifiers; const ecomV1Order_universal_d_updateLineItemsDescriptionLines: typeof updateLineItemsDescriptionLines; const ecomV1Order_universal_d_markOrderAsSeenByHuman: typeof markOrderAsSeenByHuman; const ecomV1Order_universal_d_cancelOrder: typeof cancelOrder; type ecomV1Order_universal_d_CancelOrderOptions = CancelOrderOptions; const ecomV1Order_universal_d_markAsFulfilled: typeof markAsFulfilled; const ecomV1Order_universal_d_bulkMarkAsFulfilled: typeof bulkMarkAsFulfilled; type ecomV1Order_universal_d_BulkMarkAsFulfilledOptions = BulkMarkAsFulfilledOptions; const ecomV1Order_universal_d_bulkMarkAsFulfilledByFilter: typeof bulkMarkAsFulfilledByFilter; const ecomV1Order_universal_d_markAsUnfulfilled: typeof markAsUnfulfilled; const ecomV1Order_universal_d_bulkMarkAsUnfulfilled: typeof bulkMarkAsUnfulfilled; type ecomV1Order_universal_d_BulkMarkAsUnfulfilledOptions = BulkMarkAsUnfulfilledOptions; const ecomV1Order_universal_d_bulkMarkAsUnfulfilledByFilter: typeof bulkMarkAsUnfulfilledByFilter; const ecomV1Order_universal_d_markOrderAsPaid: typeof markOrderAsPaid; const ecomV1Order_universal_d_bulkMarkOrdersAsPaid: typeof bulkMarkOrdersAsPaid; const ecomV1Order_universal_d_createPaymentGatewayOrder: typeof createPaymentGatewayOrder; const ecomV1Order_universal_d_getShipments: typeof getShipments; const ecomV1Order_universal_d_aggregateOrders: typeof aggregateOrders; type ecomV1Order_universal_d_AggregateOrdersOptions = AggregateOrdersOptions; const ecomV1Order_universal_d_decrementItemsQuantity: typeof decrementItemsQuantity; const ecomV1Order_universal_d_bulkUpdateOrderTags: typeof bulkUpdateOrderTags; type ecomV1Order_universal_d_BulkUpdateOrderTagsOptions = BulkUpdateOrderTagsOptions; namespace ecomV1Order_universal_d { export { Order$1 as Order, ecomV1Order_universal_d_OrderLineItem as OrderLineItem, ecomV1Order_universal_d_ProductName as ProductName, CatalogReference$3 as CatalogReference, Price$3 as Price, ecomV1Order_universal_d_DescriptionLine as DescriptionLine, ecomV1Order_universal_d_DescriptionLineValueOneOf as DescriptionLineValueOneOf, ecomV1Order_universal_d_DescriptionLineDescriptionLineValueOneOf as DescriptionLineDescriptionLineValueOneOf, ecomV1Order_universal_d_DescriptionLineName as DescriptionLineName, ecomV1Order_universal_d_PlainTextValue as PlainTextValue, ecomV1Order_universal_d_Color as Color, ecomV1Order_universal_d_DescriptionLineType as DescriptionLineType, ecomV1Order_universal_d_FocalPoint as FocalPoint, PhysicalProperties$2 as PhysicalProperties, ItemType$1 as ItemType, ItemTypeItemTypeDataOneOf$1 as ItemTypeItemTypeDataOneOf, ItemTypeItemType$1 as ItemTypeItemType, PaymentOptionType$1 as PaymentOptionType, ItemTaxFullDetails$1 as ItemTaxFullDetails, ecomV1Order_universal_d_LineItemTaxInfo as LineItemTaxInfo, ecomV1Order_universal_d_LineItemTaxBreakdown as LineItemTaxBreakdown, JurisdictionType$1 as JurisdictionType, DigitalFile$1 as DigitalFile, SubscriptionInfo$1 as SubscriptionInfo, SubscriptionSettings$2 as SubscriptionSettings, SubscriptionFrequency$2 as SubscriptionFrequency, ecomV1Order_universal_d_PriceDescription as PriceDescription, ecomV1Order_universal_d_LocationAndQuantity as LocationAndQuantity, TaxableAddress$1 as TaxableAddress, TaxableAddressTaxableAddressDataOneOf$1 as TaxableAddressTaxableAddressDataOneOf, TaxableAddressType$1 as TaxableAddressType, ExtendedFields$4 as ExtendedFields, BuyerInfo$1 as BuyerInfo, ecomV1Order_universal_d_BuyerInfoIdOneOf as BuyerInfoIdOneOf, PaymentStatus$1 as PaymentStatus, FulfillmentStatus$1 as FulfillmentStatus, WeightUnit$3 as WeightUnit, PriceSummary$1 as PriceSummary, ecomV1Order_universal_d_AddressWithContact as AddressWithContact, Address$5 as Address, StreetAddress$4 as StreetAddress, AddressLocation$3 as AddressLocation, FullAddressContactDetails$1 as FullAddressContactDetails, VatId$2 as VatId, VatType$2 as VatType, ShippingInformation$1 as ShippingInformation, DeliveryLogistics$2 as DeliveryLogistics, ecomV1Order_universal_d_DeliveryLogisticsAddressOneOf as DeliveryLogisticsAddressOneOf, PickupDetails$3 as PickupDetails, PickupAddress$1 as PickupAddress, PickupMethod$2 as PickupMethod, DeliveryTimeSlot$2 as DeliveryTimeSlot, ShippingPrice$1 as ShippingPrice, ShippingRegion$1 as ShippingRegion, ecomV1Order_universal_d_OrderStatus as OrderStatus, TaxSummary$1 as TaxSummary, ecomV1Order_universal_d_OrderTaxInfo as OrderTaxInfo, ecomV1Order_universal_d_OrderTaxBreakdown as OrderTaxBreakdown, AppliedDiscount$1 as AppliedDiscount, AppliedDiscountDiscountSourceOneOf$1 as AppliedDiscountDiscountSourceOneOf, DiscountType$1 as DiscountType, Coupon$1 as Coupon, MerchantDiscount$1 as MerchantDiscount, ecomV1Order_universal_d_MerchantDiscountMerchantDiscountReasonOneOf as MerchantDiscountMerchantDiscountReasonOneOf, ecomV1Order_universal_d_DiscountReason as DiscountReason, DiscountRule$1 as DiscountRule, DiscountRuleName$1 as DiscountRuleName, LineItemDiscount$1 as LineItemDiscount, Activity$1 as Activity, ecomV1Order_universal_d_ActivityContentOneOf as ActivityContentOneOf, ecomV1Order_universal_d_CustomActivity as CustomActivity, ecomV1Order_universal_d_MerchantComment as MerchantComment, OrderRefunded$1 as OrderRefunded, ecomV1Order_universal_d_OrderCreatedFromExchange as OrderCreatedFromExchange, ecomV1Order_universal_d_NewExchangeOrderCreated as NewExchangeOrderCreated, ecomV1Order_universal_d_LineItemExchangeData as LineItemExchangeData, ecomV1Order_universal_d_DraftOrderChangesApplied as DraftOrderChangesApplied, ecomV1Order_universal_d_OrderChange as OrderChange, ecomV1Order_universal_d_OrderChangeValueOneOf as OrderChangeValueOneOf, ecomV1Order_universal_d_LineItemChanges as LineItemChanges, ecomV1Order_universal_d_LineItemQuantityChange as LineItemQuantityChange, ecomV1Order_universal_d_LineItemQuantityChangeType as LineItemQuantityChangeType, ecomV1Order_universal_d_LineItemPriceChange as LineItemPriceChange, ecomV1Order_universal_d_ManagedLineItem as ManagedLineItem, ecomV1Order_universal_d_ManagedDiscount as ManagedDiscount, ecomV1Order_universal_d_TranslatedValue as TranslatedValue, ecomV1Order_universal_d_LineItemAmount as LineItemAmount, ecomV1Order_universal_d_ManagedAdditionalFee as ManagedAdditionalFee, ecomV1Order_universal_d_TotalPriceChange as TotalPriceChange, ecomV1Order_universal_d_ShippingInformationChange as ShippingInformationChange, ecomV1Order_universal_d_ShippingInformationChangeShippingInformation as ShippingInformationChangeShippingInformation, ecomV1Order_universal_d_SavedPaymentMethod as SavedPaymentMethod, ecomV1Order_universal_d_AuthorizedPaymentCreated as AuthorizedPaymentCreated, ecomV1Order_universal_d_AuthorizedPaymentCaptured as AuthorizedPaymentCaptured, ecomV1Order_universal_d_AuthorizedPaymentVoided as AuthorizedPaymentVoided, ecomV1Order_universal_d_RefundInitiated as RefundInitiated, ecomV1Order_universal_d_RefundedPayment as RefundedPayment, ecomV1Order_universal_d_RefundedPaymentKindOneOf as RefundedPaymentKindOneOf, ecomV1Order_universal_d_RegularPaymentRefund as RegularPaymentRefund, ecomV1Order_universal_d_GiftCardPaymentRefund as GiftCardPaymentRefund, ecomV1Order_universal_d_MembershipPaymentRefund as MembershipPaymentRefund, ecomV1Order_universal_d_PaymentRefunded as PaymentRefunded, ecomV1Order_universal_d_PaymentRefundFailed as PaymentRefundFailed, ecomV1Order_universal_d_RefundedAsStoreCredit as RefundedAsStoreCredit, ecomV1Order_universal_d_PaymentPending as PaymentPending, ecomV1Order_universal_d_PaymentPendingPaymentDetailsOneOf as PaymentPendingPaymentDetailsOneOf, ecomV1Order_universal_d_RegularPayment as RegularPayment, ecomV1Order_universal_d_RegularPaymentPaymentMethodDetailsOneOf as RegularPaymentPaymentMethodDetailsOneOf, ecomV1Order_universal_d_CreditCardDetails as CreditCardDetails, ecomV1Order_universal_d_PaymentCanceled as PaymentCanceled, ecomV1Order_universal_d_PaymentCanceledPaymentDetailsOneOf as PaymentCanceledPaymentDetailsOneOf, ecomV1Order_universal_d_PaymentDeclined as PaymentDeclined, ecomV1Order_universal_d_PaymentDeclinedPaymentDetailsOneOf as PaymentDeclinedPaymentDetailsOneOf, ActivityType$1 as ActivityType, ecomV1Order_universal_d_AttributionSource as AttributionSource, ecomV1Order_universal_d_CreatedBy as CreatedBy, ecomV1Order_universal_d_CreatedByStringOneOf as CreatedByStringOneOf, ChannelInfo$1 as ChannelInfo, ChannelType$1 as ChannelType, CustomField$1 as CustomField, ecomV1Order_universal_d_BalanceSummary as BalanceSummary, ecomV1Order_universal_d_Balance as Balance, AdditionalFee$1 as AdditionalFee, ecomV1Order_universal_d_FulfillmentStatusesAggregate as FulfillmentStatusesAggregate, ecomV1Order_universal_d_Tags as Tags, ecomV1Order_universal_d_TagList as TagList, ecomV1Order_universal_d_Location as Location, ecomV1Order_universal_d_TriggerReindexOrderRequest as TriggerReindexOrderRequest, SnapshotMessage$1 as SnapshotMessage, ecomV1Order_universal_d_PaymentStatusUpdated as PaymentStatusUpdated, ecomV1Order_universal_d_OrderRejectedEventOrderRejected as OrderRejectedEventOrderRejected, ecomV1Order_universal_d_OrderItemsRestocked as OrderItemsRestocked, ecomV1Order_universal_d_V1RestockItem as V1RestockItem, ecomV1Order_universal_d_GetMetasiteDataRequest as GetMetasiteDataRequest, ecomV1Order_universal_d_GetMetasiteDataResponse as GetMetasiteDataResponse, ecomV1Order_universal_d_MetaSite as MetaSite, ecomV1Order_universal_d_App as App, ecomV1Order_universal_d_State as State, ecomV1Order_universal_d_Namespace as Namespace, ecomV1Order_universal_d_SeoData as SeoData, ecomV1Order_universal_d_MetaTag as MetaTag, ecomV1Order_universal_d_HtmlApplication as HtmlApplication, ecomV1Order_universal_d_ExternalUriMapping as ExternalUriMapping, ecomV1Order_universal_d_UserDataResponse as UserDataResponse, ecomV1Order_universal_d_QueryOrdersForMetasiteRequest as QueryOrdersForMetasiteRequest, ecomV1Order_universal_d_InternalQueryOrdersRequest as InternalQueryOrdersRequest, ecomV1Order_universal_d_PlatformQuery as PlatformQuery, ecomV1Order_universal_d_PlatformQueryPagingMethodOneOf as PlatformQueryPagingMethodOneOf, Sorting$7 as Sorting, SortOrder$7 as SortOrder, ecomV1Order_universal_d_PlatformPaging as PlatformPaging, CursorPaging$7 as CursorPaging, ecomV1Order_universal_d_QueryOrdersForMetasiteResponse as QueryOrdersForMetasiteResponse, ecomV1Order_universal_d_PlatformPagingMetadata as PlatformPagingMetadata, Cursors$7 as Cursors, ecomV1Order_universal_d_GetOrderForMetasiteRequest as GetOrderForMetasiteRequest, ecomV1Order_universal_d_GetOrderForMetasiteResponse as GetOrderForMetasiteResponse, ecomV1Order_universal_d_ListOrderTransactionsForMetasiteRequest as ListOrderTransactionsForMetasiteRequest, ecomV1Order_universal_d_ListOrderTransactionsForMetasiteResponse as ListOrderTransactionsForMetasiteResponse, OrderTransactions$1 as OrderTransactions, Payment$1 as Payment, PaymentPaymentDetailsOneOf$1 as PaymentPaymentDetailsOneOf, RegularPaymentDetails$1 as RegularPaymentDetails, RegularPaymentDetailsPaymentMethodDetailsOneOf$1 as RegularPaymentDetailsPaymentMethodDetailsOneOf, TransactionStatus$1 as TransactionStatus, CreditCardPaymentMethodDetails$1 as CreditCardPaymentMethodDetails, AuthorizationDetails$1 as AuthorizationDetails, AuthorizationCapture$1 as AuthorizationCapture, AuthorizationCaptureStatus$1 as AuthorizationCaptureStatus, AuthorizationActionFailureDetails$1 as AuthorizationActionFailureDetails, AuthorizationVoid$1 as AuthorizationVoid, AuthorizationVoidStatus$1 as AuthorizationVoidStatus, Reason$1 as Reason, ScheduledAction$1 as ScheduledAction, ActionType$1 as ActionType, GiftCardPaymentDetails$1 as GiftCardPaymentDetails, MembershipPaymentDetails$1 as MembershipPaymentDetails, MembershipPaymentStatus$1 as MembershipPaymentStatus, MembershipName$2 as MembershipName, Refund$1 as Refund, RefundTransaction$1 as RefundTransaction, RefundStatus$1 as RefundStatus, RefundDetails$1 as RefundDetails, RefundItem$1 as RefundItem, ecomV1Order_universal_d_V1LineItemRefund as V1LineItemRefund, ecomV1Order_universal_d_V1AdditionalFeeRefund as V1AdditionalFeeRefund, ecomV1Order_universal_d_V1ShippingRefund as V1ShippingRefund, AggregatedRefundSummary$1 as AggregatedRefundSummary, ecomV1Order_universal_d_UpsertRefundRequest as UpsertRefundRequest, ecomV1Order_universal_d_UpsertRefundResponse as UpsertRefundResponse, DomainEvent$9 as DomainEvent, DomainEventBodyOneOf$9 as DomainEventBodyOneOf, EntityCreatedEvent$9 as EntityCreatedEvent, RestoreInfo$9 as RestoreInfo, EntityUpdatedEvent$9 as EntityUpdatedEvent, EntityDeletedEvent$9 as EntityDeletedEvent, ActionEvent$9 as ActionEvent, MessageEnvelope$8 as MessageEnvelope, IdentificationData$9 as IdentificationData, IdentificationDataIdOneOf$9 as IdentificationDataIdOneOf, WebhookIdentityType$8 as WebhookIdentityType, ecomV1Order_universal_d_UpdateInternalDocumentsEvent as UpdateInternalDocumentsEvent, ecomV1Order_universal_d_UpdateInternalDocumentsEventOperationOneOf as UpdateInternalDocumentsEventOperationOneOf, ecomV1Order_universal_d_InternalDocument as InternalDocument, ecomV1Order_universal_d_InternalDocumentUpdateOperation as InternalDocumentUpdateOperation, ecomV1Order_universal_d_DeleteByIdsOperation as DeleteByIdsOperation, ecomV1Order_universal_d_DeleteByFilterOperation as DeleteByFilterOperation, ecomV1Order_universal_d_InternalDocumentUpdateByFilterOperation as InternalDocumentUpdateByFilterOperation, ecomV1Order_universal_d_InternalUpdateExistingOperation as InternalUpdateExistingOperation, ecomV1Order_universal_d_VersionedDocumentUpdateOperation as VersionedDocumentUpdateOperation, ecomV1Order_universal_d_VersioningMode as VersioningMode, ecomV1Order_universal_d_VersionedDeleteByIdsOperation as VersionedDeleteByIdsOperation, ecomV1Order_universal_d_VersionedDocumentId as VersionedDocumentId, ecomV1Order_universal_d_TriggerReindexRequest as TriggerReindexRequest, ecomV1Order_universal_d_TriggerReindexResponse as TriggerReindexResponse, Empty$5 as Empty, ecomV1Order_universal_d_BatchOfTriggerReindexOrderRequest as BatchOfTriggerReindexOrderRequest, ecomV1Order_universal_d_SendBuyerConfirmationEmailRequest as SendBuyerConfirmationEmailRequest, ecomV1Order_universal_d_SendBuyerConfirmationEmailResponse as SendBuyerConfirmationEmailResponse, ecomV1Order_universal_d_SendBuyerPaymentsReceivedEmailRequest as SendBuyerPaymentsReceivedEmailRequest, ecomV1Order_universal_d_SendBuyerPaymentsReceivedEmailResponse as SendBuyerPaymentsReceivedEmailResponse, ecomV1Order_universal_d_SendBuyerPickupConfirmationEmailRequest as SendBuyerPickupConfirmationEmailRequest, ecomV1Order_universal_d_SendBuyerPickupConfirmationEmailResponse as SendBuyerPickupConfirmationEmailResponse, ecomV1Order_universal_d_BulkSendBuyerPickupConfirmationEmailsRequest as BulkSendBuyerPickupConfirmationEmailsRequest, ecomV1Order_universal_d_BulkSendBuyerPickupConfirmationEmailsResponse as BulkSendBuyerPickupConfirmationEmailsResponse, ecomV1Order_universal_d_SendBuyerShippingConfirmationEmailRequest as SendBuyerShippingConfirmationEmailRequest, ecomV1Order_universal_d_SendBuyerShippingConfirmationEmailResponse as SendBuyerShippingConfirmationEmailResponse, ecomV1Order_universal_d_BulkSendBuyerShippingConfirmationEmailsRequest as BulkSendBuyerShippingConfirmationEmailsRequest, ecomV1Order_universal_d_BulkSendBuyerShippingConfirmationEmailsResponse as BulkSendBuyerShippingConfirmationEmailsResponse, ecomV1Order_universal_d_SendMerchantOrderReceivedNotificationRequest as SendMerchantOrderReceivedNotificationRequest, ecomV1Order_universal_d_SendMerchantOrderReceivedNotificationResponse as SendMerchantOrderReceivedNotificationResponse, ecomV1Order_universal_d_SendCancelRefundEmailRequest as SendCancelRefundEmailRequest, ecomV1Order_universal_d_SendCancelRefundEmailResponse as SendCancelRefundEmailResponse, ecomV1Order_universal_d_SendRefundEmailRequest as SendRefundEmailRequest, ecomV1Order_universal_d_SendRefundEmailResponse as SendRefundEmailResponse, ecomV1Order_universal_d_SendMerchantOrderReceivedPushRequest as SendMerchantOrderReceivedPushRequest, ecomV1Order_universal_d_SendMerchantOrderReceivedPushResponse as SendMerchantOrderReceivedPushResponse, ecomV1Order_universal_d_PreviewEmailByTypeRequest as PreviewEmailByTypeRequest, ecomV1Order_universal_d_PreviewEmailType as PreviewEmailType, ecomV1Order_universal_d_PreviewEmailByTypeResponse as PreviewEmailByTypeResponse, ecomV1Order_universal_d_PreviewRefundEmailRequest as PreviewRefundEmailRequest, ecomV1Order_universal_d_PreviewRefundEmailResponse as PreviewRefundEmailResponse, ecomV1Order_universal_d_PreviewCancelEmailRequest as PreviewCancelEmailRequest, ecomV1Order_universal_d_PreviewCancelEmailResponse as PreviewCancelEmailResponse, ecomV1Order_universal_d_PreviewCancelRefundEmailRequest as PreviewCancelRefundEmailRequest, ecomV1Order_universal_d_PreviewCancelRefundEmailResponse as PreviewCancelRefundEmailResponse, ecomV1Order_universal_d_PreviewBuyerPaymentsReceivedEmailRequest as PreviewBuyerPaymentsReceivedEmailRequest, ecomV1Order_universal_d_PreviewBuyerPaymentsReceivedEmailResponse as PreviewBuyerPaymentsReceivedEmailResponse, ecomV1Order_universal_d_PreviewBuyerConfirmationEmailRequest as PreviewBuyerConfirmationEmailRequest, ecomV1Order_universal_d_PreviewBuyerConfirmationEmailResponse as PreviewBuyerConfirmationEmailResponse, ecomV1Order_universal_d_PreviewBuyerPickupConfirmationEmailRequest as PreviewBuyerPickupConfirmationEmailRequest, ecomV1Order_universal_d_PreviewBuyerPickupConfirmationEmailResponse as PreviewBuyerPickupConfirmationEmailResponse, ecomV1Order_universal_d_PreviewShippingConfirmationEmailRequest as PreviewShippingConfirmationEmailRequest, ecomV1Order_universal_d_PreviewShippingConfirmationEmailResponse as PreviewShippingConfirmationEmailResponse, ecomV1Order_universal_d_PreviewResendDownloadLinksEmailRequest as PreviewResendDownloadLinksEmailRequest, ecomV1Order_universal_d_PreviewResendDownloadLinksEmailResponse as PreviewResendDownloadLinksEmailResponse, ecomV1Order_universal_d_PreparePaymentCollectionRequest as PreparePaymentCollectionRequest, ecomV1Order_universal_d_RedirectUrls as RedirectUrls, ecomV1Order_universal_d_DelayedCaptureSettings as DelayedCaptureSettings, ecomV1Order_universal_d_DelayedCaptureSettingsScheduledAction as DelayedCaptureSettingsScheduledAction, ecomV1Order_universal_d_Duration as Duration, ecomV1Order_universal_d_DurationUnit as DurationUnit, ecomV1Order_universal_d_PreparePaymentCollectionResponse as PreparePaymentCollectionResponse, ecomV1Order_universal_d_GetPaymentCollectabilityStatusRequest as GetPaymentCollectabilityStatusRequest, ecomV1Order_universal_d_GetPaymentCollectabilityStatusResponse as GetPaymentCollectabilityStatusResponse, ecomV1Order_universal_d_PaymentCollectabilityStatus as PaymentCollectabilityStatus, ecomV1Order_universal_d_RecordManuallyCollectedPaymentRequest as RecordManuallyCollectedPaymentRequest, ecomV1Order_universal_d_RecordManuallyCollectedPaymentResponse as RecordManuallyCollectedPaymentResponse, ecomV1Order_universal_d_MarkOrderAsPaidRequest as MarkOrderAsPaidRequest, ecomV1Order_universal_d_MarkOrderAsPaidResponse as MarkOrderAsPaidResponse, ecomV1Order_universal_d_BulkMarkOrdersAsPaidRequest as BulkMarkOrdersAsPaidRequest, ecomV1Order_universal_d_BulkMarkOrdersAsPaidResponse as BulkMarkOrdersAsPaidResponse, ecomV1Order_universal_d_BulkOrderResult as BulkOrderResult, ItemMetadata$1 as ItemMetadata, ApplicationError$4 as ApplicationError, BulkActionMetadata$1 as BulkActionMetadata, GetRefundabilityStatusRequest$1 as GetRefundabilityStatusRequest, GetRefundabilityStatusResponse$1 as GetRefundabilityStatusResponse, Refundability$1 as Refundability, RefundabilityAdditionalRefundabilityInfoOneOf$1 as RefundabilityAdditionalRefundabilityInfoOneOf, RefundableStatus$1 as RefundableStatus, NonRefundableReason$1 as NonRefundableReason, ManuallyRefundableReason$1 as ManuallyRefundableReason, ecomV1Order_universal_d_CreatePaymentGatewayOrderRequest as CreatePaymentGatewayOrderRequest, ecomV1Order_universal_d_ChargedBy as ChargedBy, ecomV1Order_universal_d_CreatePaymentGatewayOrderResponse as CreatePaymentGatewayOrderResponse, ecomV1Order_universal_d_ChargeMembershipsRequest as ChargeMembershipsRequest, ecomV1Order_universal_d_MembershipChargeItem as MembershipChargeItem, ServiceProperties$1 as ServiceProperties, ecomV1Order_universal_d_ChargeMembershipsResponse as ChargeMembershipsResponse, TriggerRefundRequest$1 as TriggerRefundRequest, PaymentRefund$1 as PaymentRefund, RefundSideEffects$1 as RefundSideEffects, RestockInfo$1 as RestockInfo, RestockType$1 as RestockType, RestockItem$1 as RestockItem, TriggerRefundResponse$1 as TriggerRefundResponse, CalculateRefundRequest$1 as CalculateRefundRequest, CalculateRefundItemRequest$1 as CalculateRefundItemRequest, CalculateRefundResponse$1 as CalculateRefundResponse, CalculateRefundItemResponse$1 as CalculateRefundItemResponse, ecomV1Order_universal_d_VoidAuthorizedPaymentsRequest as VoidAuthorizedPaymentsRequest, ecomV1Order_universal_d_VoidAuthorizedPaymentsResponse as VoidAuthorizedPaymentsResponse, ecomV1Order_universal_d_CaptureAuthorizedPaymentsRequest as CaptureAuthorizedPaymentsRequest, ecomV1Order_universal_d_PaymentCapture as PaymentCapture, ecomV1Order_universal_d_CaptureAuthorizedPaymentsResponse as CaptureAuthorizedPaymentsResponse, ecomV1Order_universal_d_ChargeSavedPaymentMethodRequest as ChargeSavedPaymentMethodRequest, ecomV1Order_universal_d_ChargeSavedPaymentMethodResponse as ChargeSavedPaymentMethodResponse, DiffmatokyPayload$2 as DiffmatokyPayload, ErrorInformation$2 as ErrorInformation, ecomV1Order_universal_d_ContinueSideEffectsFlowInLegacyData as ContinueSideEffectsFlowInLegacyData, ecomV1Order_universal_d_OrdersExperiments as OrdersExperiments, IndexingMessage$1 as IndexingMessage, ecomV1Order_universal_d_GetOrderRequest as GetOrderRequest, ecomV1Order_universal_d_GetOrderResponse as GetOrderResponse, ecomV1Order_universal_d_InternalQueryOrdersResponse as InternalQueryOrdersResponse, ecomV1Order_universal_d_QueryOrderRequest as QueryOrderRequest, ecomV1Order_universal_d_QueryOrderResponse as QueryOrderResponse, ecomV1Order_universal_d_SearchOrdersRequest as SearchOrdersRequest, ecomV1Order_universal_d_CursorSearch as CursorSearch, ecomV1Order_universal_d_CursorSearchPagingMethodOneOf as CursorSearchPagingMethodOneOf, ecomV1Order_universal_d_SearchOrdersResponse as SearchOrdersResponse, CursorPagingMetadata$6 as CursorPagingMetadata, ecomV1Order_universal_d_CreateOrderRequest as CreateOrderRequest, ecomV1Order_universal_d_OrderCreationSettings as OrderCreationSettings, ecomV1Order_universal_d_OrderApprovalStrategy as OrderApprovalStrategy, ecomV1Order_universal_d_OrderCreateNotifications as OrderCreateNotifications, ecomV1Order_universal_d_CreateOrderResponse as CreateOrderResponse, ecomV1Order_universal_d_UpdateOrderRequest as UpdateOrderRequest, ecomV1Order_universal_d_UpdateOrderResponse as UpdateOrderResponse, ecomV1Order_universal_d_BulkUpdateOrdersRequest as BulkUpdateOrdersRequest, ecomV1Order_universal_d_MaskedOrder as MaskedOrder, ecomV1Order_universal_d_BulkUpdateOrdersResponse as BulkUpdateOrdersResponse, ecomV1Order_universal_d_CommitDeltasRequest as CommitDeltasRequest, ecomV1Order_universal_d_DraftOrderDiffs as DraftOrderDiffs, ecomV1Order_universal_d_DraftOrderDiffsShippingUpdateInfoOneOf as DraftOrderDiffsShippingUpdateInfoOneOf, ecomV1Order_universal_d_DraftOrderDiffsBuyerUpdateInfoOneOf as DraftOrderDiffsBuyerUpdateInfoOneOf, ecomV1Order_universal_d_DraftOrderDiffsBillingUpdateInfoOneOf as DraftOrderDiffsBillingUpdateInfoOneOf, ecomV1Order_universal_d_DraftOrderDiffsRecipientUpdateInfoOneOf as DraftOrderDiffsRecipientUpdateInfoOneOf, ecomV1Order_universal_d_V1LineItemDelta as V1LineItemDelta, ecomV1Order_universal_d_V1LineItemDeltaDeltaOneOf as V1LineItemDeltaDeltaOneOf, ecomV1Order_universal_d_OrderLineItemChangedDetails as OrderLineItemChangedDetails, ecomV1Order_universal_d_DeltaPaymentOptionType as DeltaPaymentOptionType, ecomV1Order_universal_d_ItemChangedDetails as ItemChangedDetails, ecomV1Order_universal_d_AppliedDiscountDelta as AppliedDiscountDelta, ecomV1Order_universal_d_AppliedDiscountDeltaDeltaOneOf as AppliedDiscountDeltaDeltaOneOf, ecomV1Order_universal_d_AdditionalFeeDelta as AdditionalFeeDelta, ecomV1Order_universal_d_AdditionalFeeDeltaDeltaOneOf as AdditionalFeeDeltaDeltaOneOf, ecomV1Order_universal_d_DraftOrderCommitSettings as DraftOrderCommitSettings, ecomV1Order_universal_d_InventoryUpdateDetails as InventoryUpdateDetails, ecomV1Order_universal_d_InventoryAction as InventoryAction, ecomV1Order_universal_d_CommitDeltasResponse as CommitDeltasResponse, ecomV1Order_universal_d_OrderDeltasCommitted as OrderDeltasCommitted, ecomV1Order_universal_d_CommittedDiffs as CommittedDiffs, ecomV1Order_universal_d_CommittedDiffsShippingUpdateInfoOneOf as CommittedDiffsShippingUpdateInfoOneOf, ecomV1Order_universal_d_LineItemDelta as LineItemDelta, ecomV1Order_universal_d_LineItemDeltaDeltaOneOf as LineItemDeltaDeltaOneOf, ecomV1Order_universal_d_ArchiveOrderRequest as ArchiveOrderRequest, ecomV1Order_universal_d_ArchiveOrderResponse as ArchiveOrderResponse, ecomV1Order_universal_d_BulkArchiveOrdersRequest as BulkArchiveOrdersRequest, ecomV1Order_universal_d_BulkArchiveOrdersResponse as BulkArchiveOrdersResponse, ecomV1Order_universal_d_BulkArchiveOrdersByFilterRequest as BulkArchiveOrdersByFilterRequest, ecomV1Order_universal_d_BulkArchiveOrdersByFilterResponse as BulkArchiveOrdersByFilterResponse, ecomV1Order_universal_d_UnArchiveOrderRequest as UnArchiveOrderRequest, ecomV1Order_universal_d_UnArchiveOrderResponse as UnArchiveOrderResponse, ecomV1Order_universal_d_BulkUnArchiveOrdersRequest as BulkUnArchiveOrdersRequest, ecomV1Order_universal_d_BulkUnArchiveOrdersResponse as BulkUnArchiveOrdersResponse, ecomV1Order_universal_d_BulkUnArchiveOrdersByFilterRequest as BulkUnArchiveOrdersByFilterRequest, ecomV1Order_universal_d_BulkUnArchiveOrdersByFilterResponse as BulkUnArchiveOrdersByFilterResponse, ecomV1Order_universal_d_UpdateBuyerInfoRequest as UpdateBuyerInfoRequest, ecomV1Order_universal_d_BuyerInfoUpdate as BuyerInfoUpdate, ecomV1Order_universal_d_UpdateBuyerInfoResponse as UpdateBuyerInfoResponse, ecomV1Order_universal_d_UpdateBuyerEmailRequest as UpdateBuyerEmailRequest, ecomV1Order_universal_d_UpdateBuyerEmailResponse as UpdateBuyerEmailResponse, ecomV1Order_universal_d_UpdateOrderShippingAddressRequest as UpdateOrderShippingAddressRequest, ecomV1Order_universal_d_UpdateOrderShippingAddressResponse as UpdateOrderShippingAddressResponse, ecomV1Order_universal_d_UpdateBillingContactDetailsRequest as UpdateBillingContactDetailsRequest, ecomV1Order_universal_d_UpdateBillingContactDetailsResponse as UpdateBillingContactDetailsResponse, ecomV1Order_universal_d_UpdateOrderLineItemRequest as UpdateOrderLineItemRequest, ecomV1Order_universal_d_UpdateOrderLineItemResponse as UpdateOrderLineItemResponse, ecomV1Order_universal_d_UpdateOrderLineItemsRequest as UpdateOrderLineItemsRequest, ecomV1Order_universal_d_MaskedOrderLineItem as MaskedOrderLineItem, ecomV1Order_universal_d_UpdateOrderLineItemsResponse as UpdateOrderLineItemsResponse, ecomV1Order_universal_d_AddInternalActivityRequest as AddInternalActivityRequest, ecomV1Order_universal_d_InternalActivity as InternalActivity, ecomV1Order_universal_d_InternalActivityContentOneOf as InternalActivityContentOneOf, ecomV1Order_universal_d_OrderPlaced as OrderPlaced, ecomV1Order_universal_d_OrderPaid as OrderPaid, ecomV1Order_universal_d_OrderFulfilled as OrderFulfilled, ecomV1Order_universal_d_OrderNotFulfilled as OrderNotFulfilled, ecomV1Order_universal_d_OrderCanceled as OrderCanceled, ecomV1Order_universal_d_DownloadLinkSent as DownloadLinkSent, ecomV1Order_universal_d_TrackingNumberAdded as TrackingNumberAdded, ecomV1Order_universal_d_TrackingNumberEdited as TrackingNumberEdited, ecomV1Order_universal_d_TrackingLinkAdded as TrackingLinkAdded, ecomV1Order_universal_d_ShippingConfirmationEmailSent as ShippingConfirmationEmailSent, ecomV1Order_universal_d_InvoiceAdded as InvoiceAdded, ecomV1Order_universal_d_InvoiceSent as InvoiceSent, ecomV1Order_universal_d_FulfillerEmailSent as FulfillerEmailSent, ecomV1Order_universal_d_ShippingAddressEdited as ShippingAddressEdited, ecomV1Order_universal_d_EmailEdited as EmailEdited, ecomV1Order_universal_d_PickupReadyEmailSent as PickupReadyEmailSent, ecomV1Order_universal_d_OrderPartiallyPaid as OrderPartiallyPaid, ecomV1Order_universal_d_OrderPending as OrderPending, ecomV1Order_universal_d_OrderRejected as OrderRejected, ecomV1Order_universal_d_AddInternalActivityResponse as AddInternalActivityResponse, ecomV1Order_universal_d_AddActivityRequest as AddActivityRequest, ecomV1Order_universal_d_PublicActivity as PublicActivity, ecomV1Order_universal_d_PublicActivityContentOneOf as PublicActivityContentOneOf, ecomV1Order_universal_d_AddActivityResponse as AddActivityResponse, ecomV1Order_universal_d_AddActivitiesRequest as AddActivitiesRequest, ecomV1Order_universal_d_AddActivitiesResponse as AddActivitiesResponse, ecomV1Order_universal_d_UpdateActivityRequest as UpdateActivityRequest, ecomV1Order_universal_d_UpdateActivityResponse as UpdateActivityResponse, ecomV1Order_universal_d_DeleteActivityRequest as DeleteActivityRequest, ecomV1Order_universal_d_DeleteActivityResponse as DeleteActivityResponse, ecomV1Order_universal_d_UpdateLineItemsDescriptionLinesRequest as UpdateLineItemsDescriptionLinesRequest, ecomV1Order_universal_d_LineItemUpdate as LineItemUpdate, ecomV1Order_universal_d_UpdateLineItemsDescriptionLinesResponse as UpdateLineItemsDescriptionLinesResponse, ecomV1Order_universal_d_MarkOrderAsSeenByHumanRequest as MarkOrderAsSeenByHumanRequest, ecomV1Order_universal_d_MarkOrderAsSeenByHumanResponse as MarkOrderAsSeenByHumanResponse, ecomV1Order_universal_d_CancelOrderRequest as CancelOrderRequest, ecomV1Order_universal_d_CancelOrderResponse as CancelOrderResponse, ecomV1Order_universal_d_OrderCanceledEventOrderCanceled as OrderCanceledEventOrderCanceled, ecomV1Order_universal_d_MarkAsFulfilledRequest as MarkAsFulfilledRequest, ecomV1Order_universal_d_MarkAsFulfilledResponse as MarkAsFulfilledResponse, ecomV1Order_universal_d_FulfillmentStatusUpdated as FulfillmentStatusUpdated, ecomV1Order_universal_d_BulkMarkAsFulfilledRequest as BulkMarkAsFulfilledRequest, ecomV1Order_universal_d_BulkMarkAsFulfilledResponse as BulkMarkAsFulfilledResponse, ecomV1Order_universal_d_BulkMarkAsFulfilledByFilterRequest as BulkMarkAsFulfilledByFilterRequest, ecomV1Order_universal_d_BulkMarkAsFulfilledByFilterResponse as BulkMarkAsFulfilledByFilterResponse, ecomV1Order_universal_d_MarkAsUnfulfilledRequest as MarkAsUnfulfilledRequest, ecomV1Order_universal_d_MarkAsUnfulfilledResponse as MarkAsUnfulfilledResponse, ecomV1Order_universal_d_BulkMarkAsUnfulfilledRequest as BulkMarkAsUnfulfilledRequest, ecomV1Order_universal_d_BulkMarkAsUnfulfilledResponse as BulkMarkAsUnfulfilledResponse, ecomV1Order_universal_d_BulkMarkAsUnfulfilledByFilterRequest as BulkMarkAsUnfulfilledByFilterRequest, ecomV1Order_universal_d_BulkMarkAsUnfulfilledByFilterResponse as BulkMarkAsUnfulfilledByFilterResponse, ecomV1Order_universal_d_V1MarkOrderAsPaidRequest as V1MarkOrderAsPaidRequest, ecomV1Order_universal_d_V1MarkOrderAsPaidResponse as V1MarkOrderAsPaidResponse, ecomV1Order_universal_d_V1BulkMarkOrdersAsPaidRequest as V1BulkMarkOrdersAsPaidRequest, ecomV1Order_universal_d_V1BulkMarkOrdersAsPaidResponse as V1BulkMarkOrdersAsPaidResponse, ecomV1Order_universal_d_V1CreatePaymentGatewayOrderRequest as V1CreatePaymentGatewayOrderRequest, ecomV1Order_universal_d_V1CreatePaymentGatewayOrderResponse as V1CreatePaymentGatewayOrderResponse, ecomV1Order_universal_d_GetShipmentsRequest as GetShipmentsRequest, ecomV1Order_universal_d_GetShipmentsResponse as GetShipmentsResponse, ecomV1Order_universal_d_AggregateOrdersRequest as AggregateOrdersRequest, ecomV1Order_universal_d_AggregateOrdersResponse as AggregateOrdersResponse, ecomV1Order_universal_d_DecrementItemsQuantityRequest as DecrementItemsQuantityRequest, ecomV1Order_universal_d_DecrementData as DecrementData, ecomV1Order_universal_d_DecrementItemsQuantityResponse as DecrementItemsQuantityResponse, ecomV1Order_universal_d_BulkUpdateOrderTagsRequest as BulkUpdateOrderTagsRequest, ecomV1Order_universal_d_BulkUpdateOrderTagsResponse as BulkUpdateOrderTagsResponse, ecomV1Order_universal_d_BulkUpdateOrderTagsResult as BulkUpdateOrderTagsResult, ecomV1Order_universal_d_OrderApproved as OrderApproved, ecomV1Order_universal_d_Task as Task, ecomV1Order_universal_d_TaskKey as TaskKey, ecomV1Order_universal_d_TaskAction as TaskAction, ecomV1Order_universal_d_TaskActionActionOneOf as TaskActionActionOneOf, ecomV1Order_universal_d_Complete as Complete, ecomV1Order_universal_d_Cancel as Cancel, ecomV1Order_universal_d_Reschedule as Reschedule, ecomV1Order_universal_d_InvoiceSentEvent as InvoiceSentEvent, ecomV1Order_universal_d_IdAndVersion as IdAndVersion, ecomV1Order_universal_d_InvoiceFields as InvoiceFields, ecomV1Order_universal_d_Customer as Customer, ecomV1Order_universal_d_Email as Email, ecomV1Order_universal_d_QuotesAddress as QuotesAddress, ecomV1Order_universal_d_AddressDescription as AddressDescription, ecomV1Order_universal_d_Placement as Placement, ecomV1Order_universal_d_Phone as Phone, ecomV1Order_universal_d_Company as Company, ecomV1Order_universal_d_CommonAddress as CommonAddress, ecomV1Order_universal_d_CommonAddressStreetOneOf as CommonAddressStreetOneOf, Subdivision$1 as Subdivision, SubdivisionType$1 as SubdivisionType, ecomV1Order_universal_d_StandardDetails as StandardDetails, ecomV1Order_universal_d_InvoiceDates as InvoiceDates, ecomV1Order_universal_d_LineItems as LineItems, LineItem$2 as LineItem, ecomV1Order_universal_d_BigDecimalWrapper as BigDecimalWrapper, ecomV1Order_universal_d_LineItemTax as LineItemTax, Source$2 as Source, ecomV1Order_universal_d_SourceType as SourceType, ecomV1Order_universal_d_LineItemMetaData as LineItemMetaData, ecomV1Order_universal_d_Locale as Locale, ecomV1Order_universal_d_TotalPrice as TotalPrice, ecomV1Order_universal_d_ItemizedFee as ItemizedFee, Discount$1 as Discount, ecomV1Order_universal_d_DiscountOneDiscountTypeOneOf as DiscountOneDiscountTypeOneOf, ecomV1Order_universal_d_CalculatedTaxes as CalculatedTaxes, ecomV1Order_universal_d_CalculatedTax as CalculatedTax, ecomV1Order_universal_d_Payments as Payments, ecomV1Order_universal_d_InvoicesPayment as InvoicesPayment, ecomV1Order_universal_d_MetaData as MetaData, ecomV1Order_universal_d_InvoiceDynamicPriceTotals as InvoiceDynamicPriceTotals, ecomV1Order_universal_d_CustomFieldValue as CustomFieldValue, ecomV1Order_universal_d_CustomFieldGroup as CustomFieldGroup, ecomV1Order_universal_d_Value as Value, ecomV1Order_universal_d_ValueType as ValueType, ecomV1Order_universal_d_Deposit as Deposit, ecomV1Order_universal_d_DepositType as DepositType, ecomV1Order_universal_d_InvoiceStatus as InvoiceStatus, ecomV1Order_universal_d_TriggerSideEffectsFromLegacyData as TriggerSideEffectsFromLegacyData, ecomV1Order_universal_d_getMetasiteData as getMetasiteData, ecomV1Order_universal_d_queryOrdersForMetasite as queryOrdersForMetasite, ecomV1Order_universal_d_QueryOrdersForMetasiteOptions as QueryOrdersForMetasiteOptions, ecomV1Order_universal_d_getOrderForMetasite as getOrderForMetasite, ecomV1Order_universal_d_GetOrderForMetasiteIdentifiers as GetOrderForMetasiteIdentifiers, ecomV1Order_universal_d_listOrderTransactionsForMetasite as listOrderTransactionsForMetasite, ecomV1Order_universal_d_ListOrderTransactionsForMetasiteIdentifiers as ListOrderTransactionsForMetasiteIdentifiers, ecomV1Order_universal_d_triggerReindex as triggerReindex, ecomV1Order_universal_d_TriggerReindexOptions as TriggerReindexOptions, ecomV1Order_universal_d_sendBuyerConfirmationEmail as sendBuyerConfirmationEmail, ecomV1Order_universal_d_sendBuyerPaymentsReceivedEmail as sendBuyerPaymentsReceivedEmail, ecomV1Order_universal_d_sendBuyerPickupConfirmationEmail as sendBuyerPickupConfirmationEmail, ecomV1Order_universal_d_bulkSendBuyerPickupConfirmationEmails as bulkSendBuyerPickupConfirmationEmails, ecomV1Order_universal_d_BulkSendBuyerPickupConfirmationEmailsOptions as BulkSendBuyerPickupConfirmationEmailsOptions, ecomV1Order_universal_d_sendBuyerShippingConfirmationEmail as sendBuyerShippingConfirmationEmail, ecomV1Order_universal_d_bulkSendBuyerShippingConfirmationEmails as bulkSendBuyerShippingConfirmationEmails, ecomV1Order_universal_d_BulkSendBuyerShippingConfirmationEmailsOptions as BulkSendBuyerShippingConfirmationEmailsOptions, ecomV1Order_universal_d_sendMerchantOrderReceivedNotification as sendMerchantOrderReceivedNotification, ecomV1Order_universal_d_sendCancelRefundEmail as sendCancelRefundEmail, ecomV1Order_universal_d_SendCancelRefundEmailOptions as SendCancelRefundEmailOptions, ecomV1Order_universal_d_sendMerchantOrderReceivedPush as sendMerchantOrderReceivedPush, ecomV1Order_universal_d_previewEmailByType as previewEmailByType, ecomV1Order_universal_d_previewRefundEmail as previewRefundEmail, ecomV1Order_universal_d_PreviewRefundEmailOptions as PreviewRefundEmailOptions, ecomV1Order_universal_d_previewCancelEmail as previewCancelEmail, ecomV1Order_universal_d_PreviewCancelEmailOptions as PreviewCancelEmailOptions, ecomV1Order_universal_d_previewCancelRefundEmail as previewCancelRefundEmail, ecomV1Order_universal_d_PreviewCancelRefundEmailOptions as PreviewCancelRefundEmailOptions, ecomV1Order_universal_d_previewBuyerPaymentsReceivedEmail as previewBuyerPaymentsReceivedEmail, ecomV1Order_universal_d_previewBuyerConfirmationEmail as previewBuyerConfirmationEmail, ecomV1Order_universal_d_previewBuyerPickupConfirmationEmail as previewBuyerPickupConfirmationEmail, ecomV1Order_universal_d_previewShippingConfirmationEmail as previewShippingConfirmationEmail, ecomV1Order_universal_d_previewResendDownloadLinksEmail as previewResendDownloadLinksEmail, ecomV1Order_universal_d_preparePaymentCollection as preparePaymentCollection, ecomV1Order_universal_d_PreparePaymentCollectionOptions as PreparePaymentCollectionOptions, ecomV1Order_universal_d_getPaymentCollectabilityStatus as getPaymentCollectabilityStatus, ecomV1Order_universal_d_recordManuallyCollectedPayment as recordManuallyCollectedPayment, ecomV1Order_universal_d_paymentCollectionMarkOrderAsPaid as paymentCollectionMarkOrderAsPaid, ecomV1Order_universal_d_paymentCollectionBulkMarkOrdersAsPaid as paymentCollectionBulkMarkOrdersAsPaid, getRefundabilityStatus$1 as getRefundabilityStatus, ecomV1Order_universal_d_paymentCollectionCreatePaymentGatewayOrder as paymentCollectionCreatePaymentGatewayOrder, ecomV1Order_universal_d_PaymentCollectionCreatePaymentGatewayOrderOptions as PaymentCollectionCreatePaymentGatewayOrderOptions, ecomV1Order_universal_d_chargeMemberships as chargeMemberships, ecomV1Order_universal_d_ChargeMembershipsOptions as ChargeMembershipsOptions, triggerRefund$1 as triggerRefund, TriggerRefundOptions$1 as TriggerRefundOptions, calculateRefund$1 as calculateRefund, CalculateRefundOptions$1 as CalculateRefundOptions, ecomV1Order_universal_d_voidAuthorizedPayments as voidAuthorizedPayments, ecomV1Order_universal_d_captureAuthorizedPayments as captureAuthorizedPayments, ecomV1Order_universal_d_chargeSavedPaymentMethod as chargeSavedPaymentMethod, ecomV1Order_universal_d_getOrder as getOrder, ecomV1Order_universal_d_internalQueryOrders as internalQueryOrders, ecomV1Order_universal_d_InternalQueryOrdersOptions as InternalQueryOrdersOptions, ecomV1Order_universal_d_queryOrders as queryOrders, ecomV1Order_universal_d_OrdersQueryResult as OrdersQueryResult, ecomV1Order_universal_d_OrdersQueryBuilder as OrdersQueryBuilder, ecomV1Order_universal_d_searchOrders as searchOrders, ecomV1Order_universal_d_SearchOrdersOptions as SearchOrdersOptions, ecomV1Order_universal_d_createOrder as createOrder, ecomV1Order_universal_d_CreateOrderOptions as CreateOrderOptions, ecomV1Order_universal_d_updateOrder as updateOrder, ecomV1Order_universal_d_UpdateOrder as UpdateOrder, ecomV1Order_universal_d_UpdateOrderOptions as UpdateOrderOptions, ecomV1Order_universal_d_bulkUpdateOrders as bulkUpdateOrders, ecomV1Order_universal_d_BulkUpdateOrdersOptions as BulkUpdateOrdersOptions, ecomV1Order_universal_d_commitDeltas as commitDeltas, ecomV1Order_universal_d_CommitDeltasOptions as CommitDeltasOptions, ecomV1Order_universal_d_archiveOrder as archiveOrder, ecomV1Order_universal_d_bulkArchiveOrders as bulkArchiveOrders, ecomV1Order_universal_d_BulkArchiveOrdersOptions as BulkArchiveOrdersOptions, ecomV1Order_universal_d_bulkArchiveOrdersByFilter as bulkArchiveOrdersByFilter, ecomV1Order_universal_d_unArchiveOrder as unArchiveOrder, ecomV1Order_universal_d_bulkUnArchiveOrders as bulkUnArchiveOrders, ecomV1Order_universal_d_BulkUnArchiveOrdersOptions as BulkUnArchiveOrdersOptions, ecomV1Order_universal_d_bulkUnArchiveOrdersByFilter as bulkUnArchiveOrdersByFilter, ecomV1Order_universal_d_updateBuyerInfo as updateBuyerInfo, ecomV1Order_universal_d_UpdateBuyerInfoOptions as UpdateBuyerInfoOptions, ecomV1Order_universal_d_updateBuyerEmail as updateBuyerEmail, ecomV1Order_universal_d_UpdateBuyerEmailOptions as UpdateBuyerEmailOptions, ecomV1Order_universal_d_updateOrderShippingAddress as updateOrderShippingAddress, ecomV1Order_universal_d_UpdateOrderShippingAddressOptions as UpdateOrderShippingAddressOptions, ecomV1Order_universal_d_updateBillingContactDetails as updateBillingContactDetails, ecomV1Order_universal_d_UpdateBillingContactDetailsOptions as UpdateBillingContactDetailsOptions, ecomV1Order_universal_d_updateOrderLineItem as updateOrderLineItem, ecomV1Order_universal_d_UpdateOrderLineItemIdentifiers as UpdateOrderLineItemIdentifiers, ecomV1Order_universal_d_UpdateOrderLineItem as UpdateOrderLineItem, ecomV1Order_universal_d_UpdateOrderLineItemOptions as UpdateOrderLineItemOptions, ecomV1Order_universal_d_updateOrderLineItems as updateOrderLineItems, ecomV1Order_universal_d_addInternalActivity as addInternalActivity, ecomV1Order_universal_d_addActivity as addActivity, ecomV1Order_universal_d_addActivities as addActivities, ecomV1Order_universal_d_updateActivity as updateActivity, ecomV1Order_universal_d_UpdateActivityIdentifiers as UpdateActivityIdentifiers, ecomV1Order_universal_d_deleteActivity as deleteActivity, ecomV1Order_universal_d_DeleteActivityIdentifiers as DeleteActivityIdentifiers, ecomV1Order_universal_d_updateLineItemsDescriptionLines as updateLineItemsDescriptionLines, ecomV1Order_universal_d_markOrderAsSeenByHuman as markOrderAsSeenByHuman, ecomV1Order_universal_d_cancelOrder as cancelOrder, ecomV1Order_universal_d_CancelOrderOptions as CancelOrderOptions, ecomV1Order_universal_d_markAsFulfilled as markAsFulfilled, ecomV1Order_universal_d_bulkMarkAsFulfilled as bulkMarkAsFulfilled, ecomV1Order_universal_d_BulkMarkAsFulfilledOptions as BulkMarkAsFulfilledOptions, ecomV1Order_universal_d_bulkMarkAsFulfilledByFilter as bulkMarkAsFulfilledByFilter, ecomV1Order_universal_d_markAsUnfulfilled as markAsUnfulfilled, ecomV1Order_universal_d_bulkMarkAsUnfulfilled as bulkMarkAsUnfulfilled, ecomV1Order_universal_d_BulkMarkAsUnfulfilledOptions as BulkMarkAsUnfulfilledOptions, ecomV1Order_universal_d_bulkMarkAsUnfulfilledByFilter as bulkMarkAsUnfulfilledByFilter, ecomV1Order_universal_d_markOrderAsPaid as markOrderAsPaid, ecomV1Order_universal_d_bulkMarkOrdersAsPaid as bulkMarkOrdersAsPaid, ecomV1Order_universal_d_createPaymentGatewayOrder as createPaymentGatewayOrder, ecomV1Order_universal_d_getShipments as getShipments, ecomV1Order_universal_d_aggregateOrders as aggregateOrders, ecomV1Order_universal_d_AggregateOrdersOptions as AggregateOrdersOptions, ecomV1Order_universal_d_decrementItemsQuantity as decrementItemsQuantity, ecomV1Order_universal_d_bulkUpdateOrderTags as bulkUpdateOrderTags, ecomV1Order_universal_d_BulkUpdateOrderTagsOptions as BulkUpdateOrderTagsOptions, }; } interface OrderPaymentRequest { /** * Order payment request ID. * @readonly */ _id?: string | null; /** Additional parameters to identify the source of the order payment request. */ source?: Source$1; /** * status. * @readonly */ status?: Status; /** Order ID. */ orderId?: string; /** * Order number. * @readonly */ orderNumber?: string | null; /** * Amount to collect. * > **Note:** The amount can only be set once. */ amount?: Price$2; /** * Currency code. The value will always match the currency used in the order. * @readonly */ currency?: string; /** * Payment gateway order id which is associated with this payment request * @readonly */ paymentGatewayOrderId?: string | null; /** Title to be displayed to the customer on the payment page. Provide a clear and descriptive title to inform the customer about what they are paying for. */ title?: string; /** Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for. */ description?: string | null; /** Image to be displayed to the customer on the payment page. */ image?: string; /** Time and date the order payment request expires. */ expirationDate?: Date | null; /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */ extendedFields?: ExtendedFields$3; /** * Date and time the OrderPaymentRequest was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the OrderPaymentRequest was last updated. * @readonly */ _updatedDate?: Date | null; } interface Source$1 { /** App Def ID that created the order payment request. */ appId?: string | null; /** Reference to an ID from an external system, indicating the original source of the order payment request. */ externalId?: string; } enum Status { UNKNOWN_STATUS = "UNKNOWN_STATUS", UNPAID = "UNPAID", PAID = "PAID", EXPIRED = "EXPIRED" } interface Price$2 { /** Amount. */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } interface ExtendedFields$3 { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } /** Triggered when the the order payment request status changes to paid */ interface OrderPaymentRequestPaid { /** The order that was updated */ orderPaymentRequest?: OrderPaymentRequest; } /** Triggered when the the order payment request status changes to expired */ interface OrderPaymentRequestExpired { /** The order that was updated */ orderPaymentRequest?: OrderPaymentRequest; } interface CreateOrderPaymentRequestRequest { /** OrderPaymentRequest to be created. */ orderPaymentRequest?: OrderPaymentRequest; } interface CreateOrderPaymentRequestResponse { /** The created OrderPaymentRequest. */ orderPaymentRequest?: OrderPaymentRequest; /** Order payment request URL. */ orderPaymentRequestUrl?: string; } interface GetOrderPaymentRequestRequest { /** ID of the OrderPaymentRequest to retrieve. */ orderPaymentRequestId: string; } interface GetOrderPaymentRequestResponse { /** The requested OrderPaymentRequest. */ orderPaymentRequest?: OrderPaymentRequest; } interface UpdateOrderPaymentRequestRequest { /** OrderPaymentRequest to be updated, may be partial. */ orderPaymentRequest: OrderPaymentRequest; /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } interface UpdateOrderPaymentRequestResponse { /** Updated OrderPaymentRequest. */ orderPaymentRequest?: OrderPaymentRequest; } interface DeleteOrderPaymentRequestRequest { /** Id of the OrderPaymentRequest to delete. */ orderPaymentRequestId: string; } interface DeleteOrderPaymentRequestResponse { } interface QueryOrderPaymentRequestsRequest { /** WQL expression. */ query?: CursorQuery$4; } interface CursorQuery$4 extends CursorQueryPagingMethodOneOf$4 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$6; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting$6[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf$4 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$6; } interface Sorting$6 { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$6; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$6 { ASC = "ASC", DESC = "DESC" } interface CursorPaging$6 { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryOrderPaymentRequestsResponse { /** List of payment requests. */ orderPaymentRequests?: OrderPaymentRequest[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata$5; } interface CursorPagingMetadata$5 { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors$6; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors$6 { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface GetOrderPaymentRequestURLRequest { /** Order Payment Request ID. */ orderPaymentRequestId: string; } interface GetOrderPaymentRequestURLResponse { /** Order Payment Request URL. */ orderPaymentRequestUrl?: string; } interface UpdateExtendedFieldsRequest$2 { /** ID of the entity to update. */ _id: string; /** Identifier for the app whose extended fields are being updated. */ namespace: string; /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } interface UpdateExtendedFieldsResponse$2 { /** Updated OrderPaymentRequest. */ orderPaymentRequest?: OrderPaymentRequest; } interface DomainEvent$8 extends DomainEventBodyOneOf$8 { createdEvent?: EntityCreatedEvent$8; updatedEvent?: EntityUpdatedEvent$8; deletedEvent?: EntityDeletedEvent$8; actionEvent?: ActionEvent$8; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$8 { createdEvent?: EntityCreatedEvent$8; updatedEvent?: EntityUpdatedEvent$8; deletedEvent?: EntityDeletedEvent$8; actionEvent?: ActionEvent$8; } interface EntityCreatedEvent$8 { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$8; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$8 { deletedDate?: Date | null; } interface EntityUpdatedEvent$8 { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$8 { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$8 { bodyAsJson?: string; } interface Empty$4 { } interface MessageEnvelope$7 { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$8; /** Stringify payload. */ data?: string; } interface IdentificationData$8 extends IdentificationDataIdOneOf$8 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$7; } /** @oneof */ interface IdentificationDataIdOneOf$8 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$7 { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates a order payment request. * @public * @documentationMaturity preview * @requiredField options.orderPaymentRequest.amount * @requiredField options.orderPaymentRequest.orderId * @requiredField options.orderPaymentRequest.title * @permissionId ECOM.ORDER_PAYMENT_REQUEST_CREATE * @adminMethod * @returns The created OrderPaymentRequest. */ function createOrderPaymentRequest(options?: CreateOrderPaymentRequestOptions): Promise; interface CreateOrderPaymentRequestOptions { /** OrderPaymentRequest to be created. */ orderPaymentRequest?: OrderPaymentRequest; } /** * Retrieves a order payment request. * @param orderPaymentRequestId - ID of the OrderPaymentRequest to retrieve. * @public * @documentationMaturity preview * @requiredField orderPaymentRequestId * @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ * @returns The requested OrderPaymentRequest. */ function getOrderPaymentRequest(orderPaymentRequestId: string): Promise; /** * Updates a order payment request. * * Please note that only `UNPAID` payment requests can be updated. * @param _id - Order payment request ID. * @public * @documentationMaturity preview * @requiredField _id * @requiredField orderPaymentRequest * @permissionId ECOM.ORDER_PAYMENT_REQUEST_UPDATE * @adminMethod * @returns Updated OrderPaymentRequest. */ function updateOrderPaymentRequest(_id: string | null, orderPaymentRequest: UpdateOrderPaymentRequest, options?: UpdateOrderPaymentRequestOptions): Promise; interface UpdateOrderPaymentRequest { /** * Order payment request ID. * @readonly */ _id?: string | null; /** Additional parameters to identify the source of the order payment request. */ source?: Source$1; /** * status. * @readonly */ status?: Status; /** Order ID. */ orderId?: string; /** * Order number. * @readonly */ orderNumber?: string | null; /** * Amount to collect. * > **Note:** The amount can only be set once. */ amount?: Price$2; /** * Currency code. The value will always match the currency used in the order. * @readonly */ currency?: string; /** * Payment gateway order id which is associated with this payment request * @readonly */ paymentGatewayOrderId?: string | null; /** Title to be displayed to the customer on the payment page. Provide a clear and descriptive title to inform the customer about what they are paying for. */ title?: string; /** Description to be displayed to the customer on the payment page. Write a detailed description so the customer understands what they are paying for. */ description?: string | null; /** Image to be displayed to the customer on the payment page. */ image?: string; /** Time and date the order payment request expires. */ expirationDate?: Date | null; /** [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */ extendedFields?: ExtendedFields$3; /** * Date and time the OrderPaymentRequest was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the OrderPaymentRequest was last updated. * @readonly */ _updatedDate?: Date | null; } interface UpdateOrderPaymentRequestOptions { /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } /** * Deletes a order payment request. * * Please note that only `UNPAID` payment requests can be deleted. * @param orderPaymentRequestId - Id of the OrderPaymentRequest to delete. * @public * @documentationMaturity preview * @requiredField orderPaymentRequestId * @permissionId ECOM.ORDER_PAYMENT_REQUEST_DELETE * @adminMethod */ function deleteOrderPaymentRequest(orderPaymentRequestId: string): Promise; /** * Retrieves a list of Payment Requests, given the provided [paging, filtering, and sorting][1]. * * Query Payment Requests runs with these defaults, which you can override: * - `createdDate` is sorted in DESC order * - `cursorPaging.limit` is 100 * * To learn about working with _Query_ endpoints, see * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and * [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging). * @public * @documentationMaturity preview * @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ */ function queryOrderPaymentRequests(): OrderPaymentRequestsQueryBuilder; interface QueryCursorResult$6 { cursors: Cursors$6; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface OrderPaymentRequestsQueryResult extends QueryCursorResult$6 { items: OrderPaymentRequest[]; query: OrderPaymentRequestsQueryBuilder; next: () => Promise; prev: () => Promise; } interface OrderPaymentRequestsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'amount.amount' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description', value: string) => OrderPaymentRequestsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any[]) => OrderPaymentRequestsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: any) => OrderPaymentRequestsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'source.appId' | 'source.externalId' | 'status' | 'orderId' | 'orderNumber' | 'paymentGatewayOrderId' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate', value: boolean) => OrderPaymentRequestsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'status' | 'orderNumber' | 'amount.amount' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate'>) => OrderPaymentRequestsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'status' | 'orderNumber' | 'amount.amount' | 'title' | 'description' | 'expirationDate' | '_createdDate' | '_updatedDate'>) => OrderPaymentRequestsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => OrderPaymentRequestsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => OrderPaymentRequestsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Retrieves the order payment request page URL of a specified order payment request. * @param orderPaymentRequestId - Order Payment Request ID. * @public * @documentationMaturity preview * @requiredField orderPaymentRequestId * @permissionId ECOM.ORDER_PAYMENT_REQUEST_READ */ function getOrderPaymentRequestUrl(orderPaymentRequestId: string): Promise; /** * Updates extended fields of a order payment request * @param _id - ID of the entity to update. * @param namespace - Identifier for the app whose extended fields are being updated. * @public * @documentationMaturity preview * @requiredField _id * @requiredField namespace * @requiredField options * @requiredField options.namespaceData * @permissionId ECOM.ORDER_PAYMENT_REQUEST_UPDATE * @adminMethod */ function updateExtendedFields$2(_id: string, namespace: string, options: UpdateExtendedFieldsOptions$2): Promise; interface UpdateExtendedFieldsOptions$2 { /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } type ecomV1OrderPaymentRequest_universal_d_OrderPaymentRequest = OrderPaymentRequest; type ecomV1OrderPaymentRequest_universal_d_Status = Status; const ecomV1OrderPaymentRequest_universal_d_Status: typeof Status; type ecomV1OrderPaymentRequest_universal_d_OrderPaymentRequestPaid = OrderPaymentRequestPaid; type ecomV1OrderPaymentRequest_universal_d_OrderPaymentRequestExpired = OrderPaymentRequestExpired; type ecomV1OrderPaymentRequest_universal_d_CreateOrderPaymentRequestRequest = CreateOrderPaymentRequestRequest; type ecomV1OrderPaymentRequest_universal_d_CreateOrderPaymentRequestResponse = CreateOrderPaymentRequestResponse; type ecomV1OrderPaymentRequest_universal_d_GetOrderPaymentRequestRequest = GetOrderPaymentRequestRequest; type ecomV1OrderPaymentRequest_universal_d_GetOrderPaymentRequestResponse = GetOrderPaymentRequestResponse; type ecomV1OrderPaymentRequest_universal_d_UpdateOrderPaymentRequestRequest = UpdateOrderPaymentRequestRequest; type ecomV1OrderPaymentRequest_universal_d_UpdateOrderPaymentRequestResponse = UpdateOrderPaymentRequestResponse; type ecomV1OrderPaymentRequest_universal_d_DeleteOrderPaymentRequestRequest = DeleteOrderPaymentRequestRequest; type ecomV1OrderPaymentRequest_universal_d_DeleteOrderPaymentRequestResponse = DeleteOrderPaymentRequestResponse; type ecomV1OrderPaymentRequest_universal_d_QueryOrderPaymentRequestsRequest = QueryOrderPaymentRequestsRequest; type ecomV1OrderPaymentRequest_universal_d_QueryOrderPaymentRequestsResponse = QueryOrderPaymentRequestsResponse; type ecomV1OrderPaymentRequest_universal_d_GetOrderPaymentRequestURLRequest = GetOrderPaymentRequestURLRequest; type ecomV1OrderPaymentRequest_universal_d_GetOrderPaymentRequestURLResponse = GetOrderPaymentRequestURLResponse; const ecomV1OrderPaymentRequest_universal_d_createOrderPaymentRequest: typeof createOrderPaymentRequest; type ecomV1OrderPaymentRequest_universal_d_CreateOrderPaymentRequestOptions = CreateOrderPaymentRequestOptions; const ecomV1OrderPaymentRequest_universal_d_getOrderPaymentRequest: typeof getOrderPaymentRequest; const ecomV1OrderPaymentRequest_universal_d_updateOrderPaymentRequest: typeof updateOrderPaymentRequest; type ecomV1OrderPaymentRequest_universal_d_UpdateOrderPaymentRequest = UpdateOrderPaymentRequest; type ecomV1OrderPaymentRequest_universal_d_UpdateOrderPaymentRequestOptions = UpdateOrderPaymentRequestOptions; const ecomV1OrderPaymentRequest_universal_d_deleteOrderPaymentRequest: typeof deleteOrderPaymentRequest; const ecomV1OrderPaymentRequest_universal_d_queryOrderPaymentRequests: typeof queryOrderPaymentRequests; type ecomV1OrderPaymentRequest_universal_d_OrderPaymentRequestsQueryResult = OrderPaymentRequestsQueryResult; type ecomV1OrderPaymentRequest_universal_d_OrderPaymentRequestsQueryBuilder = OrderPaymentRequestsQueryBuilder; const ecomV1OrderPaymentRequest_universal_d_getOrderPaymentRequestUrl: typeof getOrderPaymentRequestUrl; namespace ecomV1OrderPaymentRequest_universal_d { export { ecomV1OrderPaymentRequest_universal_d_OrderPaymentRequest as OrderPaymentRequest, Source$1 as Source, ecomV1OrderPaymentRequest_universal_d_Status as Status, Price$2 as Price, ExtendedFields$3 as ExtendedFields, ecomV1OrderPaymentRequest_universal_d_OrderPaymentRequestPaid as OrderPaymentRequestPaid, ecomV1OrderPaymentRequest_universal_d_OrderPaymentRequestExpired as OrderPaymentRequestExpired, ecomV1OrderPaymentRequest_universal_d_CreateOrderPaymentRequestRequest as CreateOrderPaymentRequestRequest, ecomV1OrderPaymentRequest_universal_d_CreateOrderPaymentRequestResponse as CreateOrderPaymentRequestResponse, ecomV1OrderPaymentRequest_universal_d_GetOrderPaymentRequestRequest as GetOrderPaymentRequestRequest, ecomV1OrderPaymentRequest_universal_d_GetOrderPaymentRequestResponse as GetOrderPaymentRequestResponse, ecomV1OrderPaymentRequest_universal_d_UpdateOrderPaymentRequestRequest as UpdateOrderPaymentRequestRequest, ecomV1OrderPaymentRequest_universal_d_UpdateOrderPaymentRequestResponse as UpdateOrderPaymentRequestResponse, ecomV1OrderPaymentRequest_universal_d_DeleteOrderPaymentRequestRequest as DeleteOrderPaymentRequestRequest, ecomV1OrderPaymentRequest_universal_d_DeleteOrderPaymentRequestResponse as DeleteOrderPaymentRequestResponse, ecomV1OrderPaymentRequest_universal_d_QueryOrderPaymentRequestsRequest as QueryOrderPaymentRequestsRequest, CursorQuery$4 as CursorQuery, CursorQueryPagingMethodOneOf$4 as CursorQueryPagingMethodOneOf, Sorting$6 as Sorting, SortOrder$6 as SortOrder, CursorPaging$6 as CursorPaging, ecomV1OrderPaymentRequest_universal_d_QueryOrderPaymentRequestsResponse as QueryOrderPaymentRequestsResponse, CursorPagingMetadata$5 as CursorPagingMetadata, Cursors$6 as Cursors, ecomV1OrderPaymentRequest_universal_d_GetOrderPaymentRequestURLRequest as GetOrderPaymentRequestURLRequest, ecomV1OrderPaymentRequest_universal_d_GetOrderPaymentRequestURLResponse as GetOrderPaymentRequestURLResponse, UpdateExtendedFieldsRequest$2 as UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse$2 as UpdateExtendedFieldsResponse, DomainEvent$8 as DomainEvent, DomainEventBodyOneOf$8 as DomainEventBodyOneOf, EntityCreatedEvent$8 as EntityCreatedEvent, RestoreInfo$8 as RestoreInfo, EntityUpdatedEvent$8 as EntityUpdatedEvent, EntityDeletedEvent$8 as EntityDeletedEvent, ActionEvent$8 as ActionEvent, Empty$4 as Empty, MessageEnvelope$7 as MessageEnvelope, IdentificationData$8 as IdentificationData, IdentificationDataIdOneOf$8 as IdentificationDataIdOneOf, WebhookIdentityType$7 as WebhookIdentityType, ecomV1OrderPaymentRequest_universal_d_createOrderPaymentRequest as createOrderPaymentRequest, ecomV1OrderPaymentRequest_universal_d_CreateOrderPaymentRequestOptions as CreateOrderPaymentRequestOptions, ecomV1OrderPaymentRequest_universal_d_getOrderPaymentRequest as getOrderPaymentRequest, ecomV1OrderPaymentRequest_universal_d_updateOrderPaymentRequest as updateOrderPaymentRequest, ecomV1OrderPaymentRequest_universal_d_UpdateOrderPaymentRequest as UpdateOrderPaymentRequest, ecomV1OrderPaymentRequest_universal_d_UpdateOrderPaymentRequestOptions as UpdateOrderPaymentRequestOptions, ecomV1OrderPaymentRequest_universal_d_deleteOrderPaymentRequest as deleteOrderPaymentRequest, ecomV1OrderPaymentRequest_universal_d_queryOrderPaymentRequests as queryOrderPaymentRequests, ecomV1OrderPaymentRequest_universal_d_OrderPaymentRequestsQueryResult as OrderPaymentRequestsQueryResult, ecomV1OrderPaymentRequest_universal_d_OrderPaymentRequestsQueryBuilder as OrderPaymentRequestsQueryBuilder, ecomV1OrderPaymentRequest_universal_d_getOrderPaymentRequestUrl as getOrderPaymentRequestUrl, updateExtendedFields$2 as updateExtendedFields, UpdateExtendedFieldsOptions$2 as UpdateExtendedFieldsOptions, }; } interface OrderTransactions { /** Order ID. */ orderId?: string; /** Record of payments made to the merchant. */ payments?: Payment[]; /** Record of refunds made to the buyer. */ refunds?: Refund[]; } interface Payment extends PaymentPaymentDetailsOneOf { /** Regular payment details. */ regularPaymentDetails?: RegularPaymentDetails; /** Gift card payment details. */ giftcardPaymentDetails?: GiftCardPaymentDetails; /** * Membership payment details. * @internal */ membershipPaymentDetails?: MembershipPaymentDetails; /** * Payment ID. * @readonly */ _id?: string | null; /** Date and time the payment was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. */ _createdDate?: Date | null; /** * Date and time the payment was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _updatedDate?: Date | null; /** Payment amount. */ amount?: Price$1; /** * Whether refunds for this payment are disabled. * + `true`: This payment is not refundable. * + `false`: This payment may be refunded. However, this ultimately depends on the payment provider. */ refundDisabled?: boolean; } /** @oneof */ interface PaymentPaymentDetailsOneOf { /** Regular payment details. */ regularPaymentDetails?: RegularPaymentDetails; /** Gift card payment details. */ giftcardPaymentDetails?: GiftCardPaymentDetails; /** * Membership payment details. * @internal */ membershipPaymentDetails?: MembershipPaymentDetails; } interface RegularPaymentDetails extends RegularPaymentDetailsPaymentMethodDetailsOneOf { /** Whether regular card used */ creditCardDetails?: CreditCardPaymentMethodDetails; /** Wix Payments order ID. */ paymentOrderId?: string | null; /** * Payment gateway's transaction ID. This ID can be used with the Wix Payments [Transactions API](https://dev.wix.com/docs/rest/api-reference/wix-payments/transactions/introduction). * This field is only returned when the value of `offline_payment` is `false`. */ gatewayTransactionId?: string | null; /** * Payment method. Non-exhaustive list of supported values: * + `CreditCard`, `Alipay`, `AstropayCash`, `AstropayDBT`, `AstropayMBT`, `Bitcoin`, `BitPay`, `Cash`, `ConvenienceStore`, `EPay`, `Fake`, `Giropay`, `IDeal`, `InPerson`, `Klarna`, `MercadoPago`, `Netpay`, `NordeaSolo`, `Offline`, `PagSeguro`, `PayEasy`, `PayPal`, `Paysafecard`, `Paysafecash`, `PointOfSale`, `Poli`, `Privat24`, `Przelewy24`, `RapidTransfer`, `Sepa`, `Skrill`, `Sofort`, `Trustly`, `Neteller`, `Unionpay`, `UniPay`, `Yandex` */ paymentMethod?: string | null; /** Transaction ID in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for offline payments. */ providerTransactionId?: string | null; /** Whether the payment was made offline. For example, when using cash or when marked as paid in the Business Manager. */ offlinePayment?: boolean; /** Payment status. */ status?: TransactionStatus; /** Whether there is a payment agreement that allows for future charges. */ savedPaymentMethod?: boolean; /** Authorization details. */ authorizationDetails?: AuthorizationDetails; } /** @oneof */ interface RegularPaymentDetailsPaymentMethodDetailsOneOf { /** Whether regular card used */ creditCardDetails?: CreditCardPaymentMethodDetails; } enum TransactionStatus { UNDEFINED = "UNDEFINED", APPROVED = "APPROVED", PENDING = "PENDING", PENDING_MERCHANT = "PENDING_MERCHANT", CANCELED = "CANCELED", DECLINED = "DECLINED", REFUNDED = "REFUNDED", PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", AUTHORIZED = "AUTHORIZED", VOIDED = "VOIDED" } interface CreditCardPaymentMethodDetails { /** The last 4 digits of the card number. */ lastFourDigits?: string | null; /** Card issuer's brand. */ brand?: string | null; } interface AuthorizationDetails { /** * Whether the authorized payment is of a delayed capture. * @readonly */ delayedCapture?: boolean; /** Date and time the payment was authorized in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ authorizedDate?: Date | null; /** * List of captures associated with payment * In case of failed it can be replaced with new one with PENDING or SUCCESS statuses */ captures?: AuthorizationCapture[]; /** Void associated with payment */ void?: AuthorizationVoid; /** Scheduled action for this transaction */ scheduledAction?: ScheduledAction; } interface AuthorizationCapture { /** * Capture ID. * @readonly */ _id?: string | null; /** Status of this capture action */ status?: AuthorizationCaptureStatus; /** Amount of this capture */ amount?: Price$1; /** Date and time the capture was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ _createdDate?: Date | null; /** In case of status is FAILED may contain failure details */ failureDetails?: AuthorizationActionFailureDetails; } enum AuthorizationCaptureStatus { UNKNOWN_STATUS = "UNKNOWN_STATUS", /** Capture operation still in progress. */ PENDING = "PENDING", /** Capture operation succeeded. */ SUCCEEDED = "SUCCEEDED", /** Capture operation failed. */ FAILED = "FAILED" } interface Price$1 { /** Amount. */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } interface AuthorizationActionFailureDetails { failureCode?: string; } interface AuthorizationVoid { /** Status of this void action */ status?: AuthorizationVoidStatus; /** Date and time the void was initiated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. */ voidedDate?: Date | null; /** In case of status is FAILED may contain failure details */ failureDetails?: AuthorizationActionFailureDetails; /** Reason of void action */ reason?: Reason; } enum AuthorizationVoidStatus { UNKNOWN_STATUS = "UNKNOWN_STATUS", /** Void operation still in progress. */ PENDING = "PENDING", /** Void operation succeeded. */ SUCCEEDED = "SUCCEEDED", /** Void operation failed. */ FAILED = "FAILED" } /** Reason the authorization was voided. */ enum Reason { UNKNOWN_REASON = "UNKNOWN_REASON", /** Authorization was voided by user. */ MANUAL = "MANUAL", /** Authorization passed execution date. */ SCHEDULED = "SCHEDULED" } interface ScheduledAction { /** Type of the action. */ actionType?: ActionType; /** The date and time of the action. */ executionDate?: Date | null; } enum ActionType { UNKNOWN_ACTION_TYPE = "UNKNOWN_ACTION_TYPE", VOID = "VOID", CAPTURE = "CAPTURE" } interface GiftCardPaymentDetails { /** Gift card payment ID. */ giftCardPaymentId?: string; /** * Gift card ID. * @internal * @deprecated */ giftCardId?: string; /** ID of the app that created the gift card. */ appId?: string; /** * Whether the gift card is voided. * @readonly */ voided?: boolean; /** * Gift card obfuscated code. * @internal */ obfuscatedCode?: string | null; } interface MembershipPaymentDetails { /** Membership ID. */ membershipId?: string; /** ID of the line item this membership applies to. */ lineItemId?: string; /** Payment status. */ status?: MembershipPaymentStatus; /** Membership name. */ name?: MembershipName$1; /** The transaction ID in the membership system. Can be used to void the transaction. */ externalTransactionId?: string | null; /** * Whether the membership is voided. * @readonly */ voided?: boolean; /** ID of the application providing this payment option. */ providerAppId?: string; } enum MembershipPaymentStatus { /** Payment was charged. */ CHARGED = "CHARGED", /** The attempt to charge the payment failed, for example, due to lack of credits. */ CHARGE_FAILED = "CHARGE_FAILED" } interface MembershipName$1 { /** Membership name. */ original?: string; /** Translated membership name. Defaults to `original` when not provided. */ translated?: string | null; } interface Refund { /** * Refund ID. * @readonly */ _id?: string; /** List of transactions. */ transactions?: RefundTransaction[]; /** Refund business details. */ details?: RefundDetails; /** * Date and time the refund was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. Defaults to current time when not provided. * @readonly */ _createdDate?: Date | null; /** * Aggregated refund status * @internal * @readonly */ summary?: AggregatedRefundSummary; } interface RefundTransaction { /** ID of the payment associated with this refund. */ paymentId?: string; /** Refund amount. */ amount?: Price$1; /** Refund status. */ refundStatus?: RefundStatus; /** * Payment gateway's refund ID. This ID can be used with the Wix Payments [Transactions API](https://dev.wix.com/docs/rest/api-reference/wix-payments/transactions/introduction). * This field is only returned when the value of `external_refund` is `false`. */ gatewayRefundId?: string | null; /** ID of the refund in the payment provider's system. For example, at PayPal, Square, Stripe, etc. Not returned for external refunds. */ providerRefundId?: string | null; /** Whether refund was made externally and manually on the payment provider's side. */ externalRefund?: boolean; } /** Refund transaction status. */ enum RefundStatus { /** Refund was initiated on payment provider side. PENDING status was assigned by provider. */ PENDING = "PENDING", /** Refund transaction succeeded. */ SUCCEEDED = "SUCCEEDED", /** Refund transaction failed. */ FAILED = "FAILED", /** Refund request acknowledged, and will be executed soon. */ SCHEDULED = "SCHEDULED", /** Refund was initiated on payment provider side. */ STARTED = "STARTED" } /** Business model of a refund request */ interface RefundDetails { /** Order line item IDs and quantities that were refunded. */ items?: RefundItem[]; /** Whether the shipping fee was also refunded. */ shippingIncluded?: boolean; /** Reason for the refund, provided by customer (optional). */ reason?: string | null; /** * Line items that were refunded. * @internal */ lineItems?: LineItemRefund[]; /** * Additional fees that were refunded. * @internal */ additionalFees?: AdditionalFeeRefund[]; /** * Shipping amount that was refunded. * @internal */ shipping?: ShippingRefund; } interface RefundItem { /** Line item ID the refunded line item. */ lineItemId?: string; /** Line item quantity refunded. */ quantity?: number; } interface LineItemRefund { /** * Line item ID. * @internal */ lineItemId?: string; /** * Refund quantity. * @internal */ quantity?: number; } interface AdditionalFeeRefund { /** * Additional fee ID. * @internal */ additionalFeeId?: string; /** * Refund amount. * @internal */ amount?: Price$1; } interface ShippingRefund { /** * Refund amount. * @internal */ amount?: Price$1; } interface AggregatedRefundSummary { /** * Total refund amount requested * @internal */ requestedRefund?: Price$1; /** * Pending refund amount * @internal */ pendingRefund?: Price$1; /** * Refunded amount: portion of requested_refund_amount that succeeded * @internal */ refunded?: Price$1; /** * Failed refund amount: portion of requested_refund_amount that failed * @internal */ failedRefundAmount?: Price$1; /** * `true`: at least one refund transaction is still in PENDING status * @internal */ pending?: boolean; } interface SnapshotMessage { _id?: string; opType?: number; } interface IndexingMessage { _id?: string; opType?: number; requiredVersions?: string[]; } interface DiffmatokyPayload$1 { left?: string; right?: string; compareChannel?: string; entityId?: string; errorInformation?: ErrorInformation$1; tags?: string[]; } interface ErrorInformation$1 { stackTrace?: string; } interface OrderRefunded { /** * Refund ID. * @readonly */ refundId?: string; /** * Refunded order data. * @readonly */ order?: Order; } interface Order { /** * Order ID (auto-generated upon order creation). * @readonly */ _id?: string | null; /** * Order number displayed in the owner's store (auto-generated). * @readonly */ number?: number; /** * Order creation date and time. * @readonly */ dateCreated?: Date | null; /** Buyer information. */ buyerInfo?: BuyerInfo; /** Currency used for the pricing of this order in [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes) format. */ currency?: string | null; /** Weight unit used in this store. */ weightUnit?: WeightUnit$2; /** Totals for order's line items. */ totals?: Totals; /** Billing information. */ billingInfo?: BillingInfo; /** Shipping information. */ shippingInfo?: ShippingInfo; /** A note added by the buyer. */ buyerNote?: string | null; /** * Deprecated. * @readonly * @deprecated */ read?: boolean; /** * Whether or not the order was archived. * @readonly */ archived?: boolean; /** Current status of the payment. */ paymentStatus?: PaymentStatus; /** * Order's current fulfillment status (whether the order received a tracking number or was delivered/picked up). * @readonly */ fulfillmentStatus?: FulfillmentStatus; /** Line items ordered. */ lineItems?: LineItem$1[]; /** * Log of updates related to the order. * @readonly */ activities?: Activity[]; /** Invoice information. */ invoiceInfo?: V2InvoiceInfo; /** * Order fulfillment information. * @readonly */ fulfillments?: Fulfillment[]; /** Discount information. */ discount?: Discount; /** Custom field information. */ customField?: CustomField; /** Shopping cart ID. */ cartId?: string | null; /** * Language for communication with the buyer. Defaults to the site language. * For a site that supports multiple languages, this is the language the buyer selected. */ buyerLanguage?: string | null; /** Information about the sales channel that submitted this order. */ channelInfo?: ChannelInfo; /** * Identity of the order's initiator. * @readonly */ enteredBy?: EnteredBy; /** * Date and time of latest update. * @readonly */ lastUpdated?: Date | null; /** Subscription information. */ subscriptionInfo?: SubscriptionInfo; /** * Order’s unique numeric ID. * Primarily used for sorting and filtering when crawling all orders. * @readonly */ numericId?: string; /** * Refund information. * @readonly */ refunds?: V2Refund[]; /** * Gift card information. * @internal */ giftCard?: GiftCard$1; /** * ID of the checkout associated with this order. * @internal */ checkoutId?: string | null; /** * Private API flag that allows using read-only "id" during order creation * @internal */ isInternalOrderCreate?: boolean; } /** Buyer Info */ interface BuyerInfo { /** Wix customer ID */ _id?: string | null; /** * Deprecated (use identityType instead) * @readonly * @deprecated */ type?: IdentityType$2; /** Customer type */ identityType?: IdentityType$2; /** * Customer's first name * @readonly */ firstName?: string; /** * Customer's last name * @readonly */ lastName?: string; /** * Customer's phone number * @readonly */ phone?: string | null; /** * Customer's email address * @readonly */ email?: string; /** * Contact Id. needed for cases where the user is the buyer and so it doesn't exist on the buyer info * @internal * @readonly */ contactId?: string | null; } enum IdentityType$2 { UNSPECIFIED_IDENTITY_TYPE = "UNSPECIFIED_IDENTITY_TYPE", /** Site member */ MEMBER = "MEMBER", /** Contact */ CONTACT = "CONTACT" } enum WeightUnit$2 { /** Weight unit can't be classified, due to an error */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms */ KG = "KG", /** Pounds */ LB = "LB" } interface Totals { /** Subtotal of all the line items, before tax. */ subtotal?: string; /** Total shipping price, before tax. */ shipping?: string | null; /** Total tax. */ tax?: string | null; /** Total calculated discount value. */ discount?: string | null; /** Total price charged. */ total?: string; /** * Total items weight. * @readonly */ weight?: string; /** * Total number of line items. * @readonly */ quantity?: number; /** * Total refund. * @readonly */ refund?: string | null; /** Total calculated gift card value. */ giftCard?: string | null; } interface BillingInfo { /** Payment method used for this order */ paymentMethod?: string | null; /** * Deprecated (use paymentProviderTransactionId instead) * @readonly * @deprecated */ externalTransactionId?: string | null; /** Transaction ID from payment provider (e.g., PayPal, Square, Stripe) transaction ID */ paymentProviderTransactionId?: string | null; /** Transaction ID from payment gateway (e.g., Wix Payments) */ paymentGatewayTransactionId?: string | null; /** Full billing address */ address?: Address$4; /** * Payment date * @readonly */ paidDate?: Date | null; /** Whether order can be refunded by payment provider (manually or automatic) */ refundableByPaymentProvider?: boolean | null; } interface Address$4 extends AddressAddressLine1OptionsOneOf { /** Address line 1 (free text) */ addressLine1?: string; /** Address line 1 (street) */ street?: Street; /** Addressee name */ fullName?: FullName; /** Country code (2 letters) */ country?: string | null; /** State or district */ subdivision?: string | null; /** City name */ city?: string | null; /** ZIP/postal code */ zipCode?: string | null; /** Phone number */ phone?: string | null; /** Company name */ company?: string | null; /** Email address */ email?: string | null; /** address line */ addressLine2?: string | null; /** Tax information (for Brazil only) */ vatId?: VatId$1; } /** @oneof */ interface AddressAddressLine1OptionsOneOf { /** Address line 1 (free text) */ addressLine1?: string; /** Address line 1 (street) */ street?: Street; } interface FullName { /** Customer's first name */ firstName?: string; /** Customer's last name */ lastName?: string; } interface Street { /** Street number */ number?: string; /** Street name */ name?: string; } interface VatId$1 { /** Customer's tax ID. */ number?: string; /** * Tax type. * + `CPF`: For individual tax payers. * + `CNPJ`: For corporations. */ type?: VatType$1; } /** Brazilian tax info types */ enum VatType$1 { /** When the tax info type can't be classified, due to an error */ UNSPECIFIED_TAX_TYPE = "UNSPECIFIED_TAX_TYPE", /** CPF - for individual tax payers */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } interface ShippingInfo extends ShippingInfoDetailsOneOf { /** Shipment details (when this object describes shipment). */ shipmentDetails?: ShipmentDetails; /** Pickup details (when this object describes pickup). */ pickupDetails?: PickupDetails$2; /** Shipping option name. */ deliveryOption?: string; /** Shipping option delivery time. */ estimatedDeliveryTime?: string | null; /** * Deprecated - Latest expected delivery date. * @deprecated */ deliverByDate?: Date | null; /** Shipping region. */ shippingRegion?: string | null; /** * Unique code of provided shipping option. For example, `"usps_std_overnight"`. * @readonly */ code?: string | null; } /** @oneof */ interface ShippingInfoDetailsOneOf { /** Shipment details (when this object describes shipment). */ shipmentDetails?: ShipmentDetails; /** Pickup details (when this object describes pickup). */ pickupDetails?: PickupDetails$2; } interface ShipmentDetails { /** Shipping destination address. */ address?: Address$4; /** * Deprecated (use fulfillments instead). * @readonly * @deprecated */ trackingInfo?: TrackingInfo; /** Discount applied for shipping. */ discount?: string | null; /** Tax applied for shipping. */ tax?: string | null; /** Price data. */ priceData?: ShippingPriceData; } interface TrackingInfo { /** * Tracking number * @readonly */ trackingNumber?: string | null; /** * Shipping provider * @readonly */ shippingProvider?: string | null; /** * Tracking link * @readonly */ trackingLink?: string | null; } interface ShippingPriceData { /** Whether tax is included in the price. */ taxIncludedInPrice?: boolean; /** Shipping price. */ price?: string | null; } interface PickupDetails$2 { /** Pickup address. */ pickupAddress?: PickupAddress; /** * Deprecated (use billingInfo instead). * @readonly * @deprecated */ buyerDetails?: BuyerDetails; /** Store owner's pickup instructions. */ pickupInstructions?: string | null; } interface PickupAddress { /** Country code (3 letters) */ country?: string; /** State/District */ subdivision?: string | null; /** Address */ addressLine1?: string; /** City */ city?: string; /** ZIP/postal code */ zipCode?: string; } interface BuyerDetails { /** Addressee name */ fullName?: FullName; /** Email address */ email?: string; /** Phone number */ phone?: string; } /** This might be extended in the future with pending orders statuses */ enum PaymentStatus { /** Payment status can't be classified, due to an error */ UNSPECIFIED_PAYMENT_STATUS = "UNSPECIFIED_PAYMENT_STATUS", /** Order is pending response from the payment provider */ PENDING = "PENDING", /** Order is marked as not paid, and can be marked as paid later on. This is relevant for POS and offline orders */ NOT_PAID = "NOT_PAID", /** The order is marked as paid */ PAID = "PAID", /** Order was refunded, refund amount less than order total price */ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", /** Full order total price was refunded */ FULLY_REFUNDED = "FULLY_REFUNDED", /** At least one payment was received and approved, covering less than total price amount */ PARTIALLY_PAID = "PARTIALLY_PAID" } enum FulfillmentStatus { /** None of the order items are fulfilled */ NOT_FULFILLED = "NOT_FULFILLED", /** * All of the order items are fulfilled * Orders without shipping info are fulfilled automatically */ FULFILLED = "FULFILLED", /** Order is canceled */ CANCELED = "CANCELED", /** Some, but not all of the order items are fulfilled */ PARTIALLY_FULFILLED = "PARTIALLY_FULFILLED" } interface LineItem$1 { /** * Line item ID (auto-generated, stable within this order only) * @readonly */ index?: number | null; /** Line item quantity */ quantity?: number; /** * Deprecated (use priceData instead) * @readonly * @deprecated */ price?: string | null; /** Line item name */ name?: string | null; /** Product name, translated into the customer's language */ translatedName?: string | null; /** Line item product ID (optional for POS orders) */ productId?: string | null; /** * Deprecated (use priceData instead) * @readonly * @deprecated */ totalPrice?: string | null; /** Line item type (may be extended) */ lineItemType?: LineItemType; /** Line item options ordered */ options?: OptionSelection[]; /** Line item custom text field entry */ customTextFields?: CustomTextFieldSelection[]; /** Line item weight */ weight?: string | null; /** Primary media for preview of the line item */ mediaItem?: MediaItem; /** Line item SKU */ sku?: string | null; /** Line item notes */ notes?: string | null; /** Line item variantId (from Stores Catalog) */ variantId?: string | null; /** Line item fulfillerId from stores fulfillers. No value equals self fulfilled */ fulfillerId?: string | null; /** Discount applied for this line item */ discount?: string | null; /** Tax applied for this line item */ tax?: string | null; /** * Deprecated (use priceData instead) * @readonly * @deprecated */ taxIncludedInPrice?: boolean; /** Tax group ID */ taxGroupId?: string | null; /** Price data */ priceData?: LineItemPriceData; /** * Line item refundedQuantity (from refund). No value means not refunded. Shows the number of line items that were refunded * @internal * @readonly */ refundedQuantity?: number | null; /** * Digital file identifier, relevant only for items with type DIGITAL * @internal */ digitalFile?: DigitalFile; } enum LineItemType { /** Line item type can't be classified, due to an error */ UNSPECIFIED_LINE_ITEM_TYPE = "UNSPECIFIED_LINE_ITEM_TYPE", /** Physical item type */ PHYSICAL = "PHYSICAL", /** Digital item type */ DIGITAL = "DIGITAL", /** Custom item price */ CUSTOM_AMOUNT_ITEM = "CUSTOM_AMOUNT_ITEM" } interface OptionSelection { /** Option name */ option?: string; /** Selected choice for this option */ selection?: string; } interface CustomTextFieldSelection { /** Custom text field name */ title?: string; /** Custom text field value */ value?: string; } interface MediaItem { /** * Media type * @readonly */ mediaType?: MediaItemType; /** * Media URL * @readonly */ url?: string; /** * Media item width * @readonly */ width?: number; /** * Media item height * @readonly */ height?: number; /** * Deprecated * @deprecated */ mediaId?: string | null; /** Media ID (for media items previously saved in Wix Media) */ _id?: string | null; /** Media external URL */ externalImageUrl?: string | null; /** Alternative text for presentation when media cannot be displayed */ altText?: string | null; } enum MediaItemType { /** Media item type can't be classified, due to an error */ UNSPECIFIED_MEDIA_TYPE_ITEM = "UNSPECIFIED_MEDIA_TYPE_ITEM", /** Image item type */ IMAGE = "IMAGE" } interface LineItemPriceData { /** Whether tax is included in the price set for this line item */ taxIncludedInPrice?: boolean; /** Line item price */ price?: string; /** * Total price charged to the customer (per line item) after computation of quantity and discount * @readonly */ totalPrice?: string | null; } interface DigitalFile { /** id of the secure file in media */ fileId?: string; } interface Activity { /** * Activity item type * @readonly */ type?: ActivityType; /** * Activity item author * @readonly */ author?: string | null; /** * Comment added to activity item * @readonly */ message?: string | null; /** * Activity item timestamp * @readonly */ timestamp?: Date | null; } enum ActivityType { /** Activity item type can't be classified, due to an error */ UNSPECIFIED_ORDER_HISTORY_ITEM_TYPE = "UNSPECIFIED_ORDER_HISTORY_ITEM_TYPE", /** Store owner added a comment */ MERCHANT_COMMENT = "MERCHANT_COMMENT", /** Order placed */ ORDER_PLACED = "ORDER_PLACED", /** Order marked as paid, either by the store owner (for offline orders), or when an online transaction was confirmed */ ORDER_PAID = "ORDER_PAID", /** Order shipping status set as fulfilled */ ORDER_FULFILLED = "ORDER_FULFILLED", /** Order shipping status set as not fulfilled */ ORDER_NOT_FULFILLED = "ORDER_NOT_FULFILLED", /** A download link was sent (relevant for orders with digital line items) */ DOWNLOAD_LINK_SENT = "DOWNLOAD_LINK_SENT", /** An email notification for pickup was sent */ PICKUP_READY_EMAIL_SENT = "PICKUP_READY_EMAIL_SENT", /** Shipping tracking number was set */ TRACKING_NUMBER_ADDED = "TRACKING_NUMBER_ADDED", /** Shipping tracking number was edited */ TRACKING_NUMBER_EDITED = "TRACKING_NUMBER_EDITED", /** Shipping tracking link was set */ TRACKING_LINK_WAS_SET = "TRACKING_LINK_WAS_SET", /** An email confirmation of order shipment was sent */ SHIPPING_CONFIRMATION_EMAIL_SENT = "SHIPPING_CONFIRMATION_EMAIL_SENT", /** Invoice was set in the order */ INVOICE_WAS_SET = "INVOICE_WAS_SET", /** Invoice was removed from the order */ INVOICE_WAS_REMOVED = "INVOICE_WAS_REMOVED", /** Invoice was sent to customer via email */ INVOICE_WAS_SENT = "INVOICE_WAS_SENT", /** Email was sent to fulfiller */ FULFILLER_EMAIL_SENT = "FULFILLER_EMAIL_SENT", /** Shipping address was updated */ SHIPPING_ADDRESS_EDITED = "SHIPPING_ADDRESS_EDITED", /** Order email was updated */ EMAIL_EDITED = "EMAIL_EDITED", /** Order partially paid. During the checkout for orders with deposit items. */ ORDER_PARTIALLY_PAID = "ORDER_PARTIALLY_PAID" } interface V2InvoiceInfo { /** Invoice ID */ _id?: string; /** Invoice source */ source?: InvoiceSource; } enum InvoiceSource { /** Invoice source can't be classified, due to an error */ UNSPECIFIED_INVOICE_SOURCE = "UNSPECIFIED_INVOICE_SOURCE", /** Invoice created using the Invoices API */ WIX = "WIX" } interface Fulfillment { /** * Fulfillment ID (auto generated upon fulfillment creation). * @readonly */ _id?: string | null; /** * Fulfillment creation date and time. * @readonly */ dateCreated?: Date | null; /** Information about the line items in the fulfilled order. */ lineItems?: FulfillmentLineItem[]; /** Tracking information. */ trackingInfo?: FulfillmentTrackingInfo; } interface FulfillmentLineItem { /** Line item ID (mirrors the line item index of the order). */ index?: number; /** * Line item quantity. * On creation, if this parameter isn't passed, the new fulfillment will automatically include all items of this line item that have not already been linked to a fulfillment. * If the order does not have the requested quantity of line items available to add to this fulfillment, the fulfillment will not be created and an error will be returned. * This property will always have a value when returned. */ quantity?: number | null; } interface FulfillmentTrackingInfo { /** Tracking number. */ trackingNumber?: string; /** * Shipping provider. Using the following shipping providers will allow for autofilling the tracking link: * * `fedex` * * `ups` * * `usps` * * `dhl` * * `canadaPost` */ shippingProvider?: string; /** Tracking link - autofilled if using a predefined shipping provider, otherwise provided on creation. */ trackingLink?: string | null; } interface Discount { /** * Deprecated (use Totals.discount instead) * @readonly * @deprecated */ value?: string; /** Applied coupon */ appliedCoupon?: AppliedCoupon; } interface AppliedCoupon { /** Coupon ID */ couponId?: string; /** Coupon name */ name?: string; /** Coupon code */ code?: string; } /** Custom field */ interface CustomField { /** Free text that the customer entered in the custom field during the checkout process */ value?: string; /** Title for the custom field */ title?: string; /** The title translated according to the buyer language */ translatedTitle?: string; } interface ChannelInfo { /** Sales channel that submitted the order */ type?: ChannelType; /** Reference to an order ID from an external system, as defined in channelInfo (e.g., eBay or Amazon) */ externalOrderId?: string | null; /** URL to the order in the external system, as defined in channelInfo (e.g., eBay or Amazon) */ externalOrderUrl?: string | null; } enum ChannelType { UNSPECIFIED = "UNSPECIFIED", WEB = "WEB", POS = "POS", EBAY = "EBAY", AMAZON = "AMAZON", OTHER_PLATFORM = "OTHER_PLATFORM", WIX_APP_STORE = "WIX_APP_STORE", WIX_INVOICES = "WIX_INVOICES", BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT", WISH = "WISH", CLASS_PASS = "CLASS_PASS", GLOBAL_E = "GLOBAL_E", FACEBOOK = "FACEBOOK", ETSY = "ETSY", TIKTOK = "TIKTOK", FAIRE_COM = "FAIRE_COM" } interface EnteredBy { _id?: string; identityType?: EnteredByIdentityType; } enum EnteredByIdentityType { USER = "USER", MEMBER = "MEMBER", CONTACT = "CONTACT", APP = "APP" } interface SubscriptionInfo { /** Subscription ID. */ _id?: string | null; /** Current cycle number. For example, if the subscription is in the 3rd month of a 4-month subscription, the value will be `3`. */ cycleNumber?: number; /** Subscription settings. */ subscriptionSettings?: SubscriptionSettings$1; /** Subscription options info. */ subscriptionOptionInfo?: SubscriptionOptionInfo; } interface SubscriptionSettings$1 { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequency$1; /** * Interval of recurring payment (optional: default value 1 will be used if not provided) * @internal */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number | null; } /** Frequency unit of recurring payment */ enum SubscriptionFrequency$1 { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } interface SubscriptionOptionInfo { /** * Subscription option ID. * @internal */ _id?: string | null; /** Subscription option title. */ title?: string; /** Subscription option description. */ description?: string | null; } interface V2Refund { /** Refund created timestamp. */ dateCreated?: Date | null; /** Refund amount. */ amount?: string; /** Reason for refund, given by user (optional). */ reason?: string | null; /** * Deprecated. Use externalRefund. * @internal * @deprecated */ isManual?: boolean; /** * Deprecated. Use payment_provider_transaction_id. * @internal * @deprecated */ providerTransactionId?: string | null; /** * Deprecated. Use id. * @internal * @deprecated */ refundId?: string; /** Payment provider transaction ID. Used to find refund transaction info on the payment provider's side. */ paymentProviderTransactionId?: string | null; /** Refund ID. */ _id?: string; /** Whether refund was made externally (on the payment provider's side). */ externalRefund?: boolean; } interface GiftCard$1 { transactionId?: string; /** * giftcard internal ID * @deprecated giftcard internal ID * @targetRemovalDate 2024-12-31 */ _id?: string; /** giftcard provider appid */ providerId?: string; /** giftcard amount */ amount?: string; } /** Triggered when a payment is updated. */ interface PaymentsUpdated { /** Updated order transactions. */ orderTransactions?: OrderTransactions; /** List of IDs of the updated payments. */ paymentIds?: string[]; /** List of IDs of the updated refunds. */ refundIds?: string[]; } /** Triggered when a refund is created. */ interface RefundCreated { /** Updated order transactions. */ orderTransactions?: OrderTransactions; /** ID of the created refund. */ refundId?: string; /** Inventory restock details as part of this refund.. */ restockInfo?: RestockInfo; /** Whether to send a refund confirmation email to the customer. */ sendOrderRefundedEmail?: boolean; /** Custom message added to the refund confirmation email. */ customMessage?: string | null; /** Refunded line items and quantities that are part of the created refund. */ refundItems?: RefundItem[]; } interface RestockInfo { /** Restock type. */ type?: RestockType; /** * Deprecated, use items instead * @internal * @deprecated */ lineItemIds?: string[]; /** Restocked line items and quantities. Only relevant for `{"type": "SOME_ITEMS"}`. */ items?: RestockItem[]; } enum RestockType { NO_ITEMS = "NO_ITEMS", ALL_ITEMS = "ALL_ITEMS", SOME_ITEMS = "SOME_ITEMS" } interface RestockItem { /** ID of the line item being restocked. */ lineItemId?: string; /** Line item quantity being restocked. */ quantity?: number; } interface RefundCompleted { /** Order ID. */ orderId?: string; /** Completed refund. */ refund?: Refund; /** Refund side effects. */ sideEffects?: RefundSideEffects; /** Order transactions after refund is completed. */ orderTransactions?: OrderTransactions; } interface RefundSideEffects { /** Inventory restock details as part of this refund. */ restockInfo?: RestockInfo; /** Whether to send a refund confirmation email to the customer. */ sendOrderRefundedEmail?: boolean; /** Custom message added to the refund confirmation email. */ customMessage?: string | null; } interface ListTransactionsForSingleOrderRequest { /** Order ID. */ orderId: string; } interface ListTransactionsForSingleOrderResponse { /** Order ID and its associated transactions. */ orderTransactions?: OrderTransactions; } interface ListTransactionsForMultipleOrdersRequest { /** Order IDs for which to retrieve transactions. */ orderIds: string[]; } interface ListTransactionsForMultipleOrdersResponse { /** List of order IDs and their associated transactions. */ orderTransactions?: OrderTransactions[]; } interface AddPaymentsRequest { /** Order ID. */ orderId: string; /** Payments to be added to order. */ payments: Payment[]; } interface AddPaymentsResponse { /** Order ID and its associated transactions. */ orderTransactions?: OrderTransactions; /** IDs of added order payments. */ paymentsIds?: string[]; } interface AddRefundRequest { /** Order ID this refunds related to */ orderId: string; /** Refund with refund transactions to be added to order. */ refund: Refund; /** Side effect details related to refund */ sideEffects?: RefundSideEffects; } interface AddRefundResponse { /** Order ID and its associated transactions. */ orderTransactions?: OrderTransactions; /** Created refund ID */ refundId?: string; } interface UpdatePaymentStatusRequest { /** Order ID. */ orderId: string; /** Payment ID. */ paymentId: string; /** Payment status. */ status?: TransactionStatus; /** * *TBD** NOT IMPLEMENTED * Status update date * When defined -> the update will be applied only if it's newer than existing one, otherwise will throw 409 * Not defined -> apply the update without any verification. * @internal */ statusUpdatedDate?: Date | null; } interface UpdatePaymentStatusResponse { /** Order ID and its associated transactions after update. */ orderTransactions?: OrderTransactions; } interface BulkUpdatePaymentStatusesRequest { /** Order and payment IDs for which to update payment status. */ paymentAndOrderIds: PaymentAndOrderId[]; /** Whether to return the full payment entity (`results.item`) in the response. */ returnFullEntity?: boolean; /** Payment status. */ status?: TransactionStatus; /** * *TBD** NOT IMPLEMENTED * Status update date * When defined -> the update will be applied only if it's newer than existing one, otherwise will throw 409 * Not defined -> apply the update without any verification. * @internal */ statusUpdatedDate?: Date | null; } interface PaymentAndOrderId { /** Order ID. */ orderId?: string; /** * Payment ID. * todo: remove comment once UI will use BulkMarkOrderAsPaid */ paymentId?: string; } interface BulkUpdatePaymentStatusesResponse { /** Bulk operation results. */ results?: BulkPaymentResult[]; /** Bulk operation metadata. */ bulkActionMetadata?: BulkActionMetadata; } interface BulkPaymentResult { /** Item metadata. */ itemMetadata?: ItemMetadata; /** Updated payment. Returned if `return_full_entity` set to `true`. */ item?: Payment; } interface ItemMetadata { /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError$3; } interface ApplicationError$3 { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface UpdateRefundRequest { /** Order ID. */ orderId: string; /** Refund with updated field values. */ refund: Refund; /** * Field mask of fields to update. * @internal */ fieldMask?: string[]; } interface UpdateRefundResponse { /** Refund after update. */ refund?: Refund; /** Order transactions after update. */ orderTransactions?: OrderTransactions; } interface UpdateRefundTransactionRequest { /** * Order ID. * @internal */ orderId: string; /** * Payment ID. * @internal */ refundId: string; /** * Updated refund transaction * @internal */ transaction: RefundTransaction; /** * Field mask of fields to update. * @internal */ fieldMask?: string[]; } interface UpdateRefundTransactionResponse { /** * OrderTransactions with updated refund transaction * @internal */ orderTransactions?: OrderTransactions; } interface UpdatePaymentsRequest { /** * Order ID. * @internal */ orderId: string; /** * Payments to be updated * @internal */ payments: MaskedPayment[]; } interface MaskedPayment { /** * Updated payment * @internal */ payment?: Payment; /** * Field mask of fields to update. * @internal */ fieldMask?: string[]; /** * Status update date * When defined -> the update will be applied only if it's newer than existing one, otherwise will throw error * Not defined -> apply the update without any verification. * @internal */ statusUpdatedDate?: Date | null; } interface UpdatePaymentsResponse { /** * OrderTransactions with updated payments * @internal */ orderTransactions?: OrderTransactions; } interface QueryOrderTransactionsRequest { /** * Query options. * @internal */ query?: CursorQuery$3; } interface CursorQuery$3 extends CursorQueryPagingMethodOneOf$3 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$5; /** A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf) */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting$5[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf$3 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$5; } interface Sorting$5 { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$5; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$5 { /** Ascending order. */ ASC = "ASC", /** Descending order. */ DESC = "DESC" } interface CursorPaging$5 { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryOrderTransactionsResponse { /** * Order transactions. * @internal */ orderTransactions?: OrderTransactions[]; /** * Details on the paged set of results returned. * @internal */ metadata?: CursorPagingMetadata$4; } interface CursorPagingMetadata$4 { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors$5; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors$5 { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface TriggerRefundRequest { /** The order this refund related to */ orderId: string; /** * Refund operations information * Currently, only *one* payment refund is supported per request */ payments: PaymentRefund[]; /** Business model of a refund */ details?: RefundDetails; /** How to restock items as part of this refund */ restockInfo?: RestockInfo; /** Should send a confirmation mail to the customer */ sendOrderRefundedEmail?: boolean; /** Personal note added to the email */ customMessage?: string | null; } interface PaymentRefund { /** Specific payment within the order to refund */ paymentId?: string; /** Refund amount. Not relevant for membership and gift card refunds. */ amount?: Price$1; /** * Whether refund is made externally and manually (on the payment provider's side) * When false (default), the payment gateway will be called in order to make an actual refund, and then the payment will be marked as refunded. * When true, the payment will only be *marked* as refunded, and no actual refund will be performed. */ externalRefund?: boolean; /** * Gateway refund id. When param is present, new refund is not created. * Instead if order has a refund transaction with given gateway refund id, this refund will be updated with details from request, * and all side effects from request will be executed. * @internal */ gatewayRefundId?: string | null; } interface TriggerRefundResponse { /** All order's transactions after the refunds were added */ orderTransactions?: OrderTransactions; /** Created refund ID */ refundId?: string; /** * Payment ID's that the refund execution had failed for * @internal * @deprecated */ failedPaymentIds?: string[]; } interface CalculateRefundRequest { /** Order ID */ orderId: string; /** Refunded line items and quantity */ refundItems?: CalculateRefundItemRequest[]; /** Should include shipping in refund calculation */ refundShipping?: boolean; } interface CalculateRefundItemRequest { /** ID of the line item being refunded */ lineItemId?: string; /** How much of that line item is being refunded */ quantity?: number; /** Should this item be restocked (used for validation purposes) */ restock?: boolean; } interface CalculateRefundResponse { /** Total refundable amount */ total?: string; /** Tax cost of the order */ tax?: string; /** Discount given for this order */ discount?: string; /** Total cost of the order (without tax) */ subtotal?: string; /** Previous refund given on that order */ previouslyRefundedAmount?: string | null; /** The refundable items of that order */ items?: CalculateRefundItemResponse[]; } interface CalculateRefundItemResponse { /** Line item ID */ lineItemId?: string; /** The line item's price */ lineItemPrice?: number; } interface GetRefundabilityStatusRequest { /** Order ID. */ orderId: string; } interface GetRefundabilityStatusResponse { /** Refundability details. */ refundabilities?: Refundability[]; /** Whether the order supports refunding per item. */ refundablePerItem?: boolean; } interface Refundability extends RefundabilityAdditionalRefundabilityInfoOneOf { /** Reason why payment is not refundable. */ nonRefundableReason?: NonRefundableReason; /** Reason why payment is only refundable manually. */ manuallyRefundableReason?: ManuallyRefundableReason; /** Payment ID. */ paymentId?: string; /** Payment refundability status. */ refundabilityStatus?: RefundableStatus; /** Link to payment provider dashboard. */ providerLink?: string | null; } /** @oneof */ interface RefundabilityAdditionalRefundabilityInfoOneOf { /** Reason why payment is not refundable. */ nonRefundableReason?: NonRefundableReason; /** Reason why payment is only refundable manually. */ manuallyRefundableReason?: ManuallyRefundableReason; } enum RefundableStatus { /** Not refundable. */ NOT_REFUNDABLE = "NOT_REFUNDABLE", /** Refundable manually. */ MANUAL = "MANUAL", /** Refundable. */ REFUNDABLE = "REFUNDABLE" } enum NonRefundableReason { /** No reason. */ NONE = "NONE", /** Payment already refunded. */ ALREADY_REFUNDED = "ALREADY_REFUNDED", /** Payment provider is down. */ PROVIDER_IS_DOWN = "PROVIDER_IS_DOWN", /** Internal error occurred. */ INTERNAL_ERROR = "INTERNAL_ERROR", /** Payment not made. */ NOT_PAID = "NOT_PAID", /** Access denied. */ ACCESS_DENIED = "ACCESS_DENIED", /** Payment amount is zero. */ ZERO_PRICE = "ZERO_PRICE", /** Disabled by provider. */ DISABLED_BY_PROVIDER = "DISABLED_BY_PROVIDER", /** Payment partially paid. */ PARTIALLY_PAID = "PARTIALLY_PAID", /** Deposit for online item. */ DEPOSIT_ONLINE_ITEM = "DEPOSIT_ONLINE_ITEM", /** Refund is pending. */ PENDING_REFUND = "PENDING_REFUND", /** Action forbidden. */ FORBIDDEN = "FORBIDDEN" } enum ManuallyRefundableReason { /** Payment expired. */ EXPIRED = "EXPIRED", /** Payment method not supported. */ NOT_SUPPORTED = "NOT_SUPPORTED", /** Payment not found. */ NOT_FOUND = "NOT_FOUND", /** Payment made offline. */ OFFLINE = "OFFLINE" } interface ListInvoicesForSingleOrderRequest { /** Order ID. */ orderId: string; } interface ListInvoicesForSingleOrderResponse { /** List of invoices. */ invoices?: InvoiceInfo[]; } interface InvoiceInfo { /** Invoice ID. */ _id?: string; /** ID of the app that set the invoice. */ appId?: string; /** * Invoice URL. * @deprecated */ url?: string | null; /** * Invoice creation date and time. * @deprecated */ _createdDate?: Date | null; } interface ListInvoicesForMultipleOrdersRequest { /** Order IDs for which to retrieve invoices. */ orderIds: string[]; } interface ListInvoicesForMultipleOrdersResponse { /** List of order IDs and their associated invoices. */ invoicesForOrder?: InvoicesForOrder[]; } interface InvoicesForOrder { /** Order ID. */ orderId?: string; /** Invoices info. */ invoicesInfo?: InvoiceInfo[]; } interface GenerateInvoiceRequest { /** Order ID. */ orderId: string; } interface GenerateInvoiceResponse { /** Invoice ID. */ invoiceId?: string; } interface BulkGenerateInvoicesRequest { /** Order IDs. */ orderIds: string[]; } interface BulkGenerateInvoicesResponse { results?: BulkInvoiceResult[]; bulkActionMetadata?: BulkActionMetadata; } interface BulkInvoiceResult { itemMetadata?: ItemMetadata; item?: InvoiceForOrder; } interface InvoiceForOrder { /** Order ID. */ orderId?: string; /** Invoice ID. */ invoiceId?: string; } interface AddInvoiceToOrderRequest { /** Order ID. */ orderId: string; /** Invoice info. */ invoiceInfo: InvoiceInfo; } interface AddInvoiceToOrderResponse { /** List of order invoices. */ orderInvoices?: InvoiceInfo[]; } interface DomainEvent$7 extends DomainEventBodyOneOf$7 { createdEvent?: EntityCreatedEvent$7; updatedEvent?: EntityUpdatedEvent$7; deletedEvent?: EntityDeletedEvent$7; actionEvent?: ActionEvent$7; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$7 { createdEvent?: EntityCreatedEvent$7; updatedEvent?: EntityUpdatedEvent$7; deletedEvent?: EntityDeletedEvent$7; actionEvent?: ActionEvent$7; } interface EntityCreatedEvent$7 { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$7; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$7 { deletedDate?: Date | null; } interface EntityUpdatedEvent$7 { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$7 { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$7 { bodyAsJson?: string; } interface MessageEnvelope$6 { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$7; /** Stringify payload. */ data?: string; } interface IdentificationData$7 extends IdentificationDataIdOneOf$7 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$6; } /** @oneof */ interface IdentificationDataIdOneOf$7 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$6 { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Retrieves information about payments and refunds associated with a specified order. * * * The `listTransactionsForSingleOrder()` function returns a Promise that resolves when the specified order's transaction records are retrieved. * @param orderId - Order ID. * @public * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.READ_TRANSACTIONS * @adminMethod */ function listTransactionsForSingleOrder(orderId: string): Promise; /** * Retrieves information about payments and refunds associated with all specified orders. * * * The `listTransactionsForMultipleOrders()` function returns a Promise that resolves when the specified orders' transaction records are retrieved. * @param orderIds - Order IDs for which to retrieve transactions. * @public * @documentationMaturity preview * @requiredField orderIds * @permissionId ECOM.READ_TRANSACTIONS * @adminMethod */ function listTransactionsForMultipleOrders(orderIds: string[]): Promise; /** * Adds up to 50 payment records to an order. * * * The `addPayments()` function returns a Promise that resolves when the payment records are added to an order. * * > **Note:** This does **NOT** perform the actual charging - the order is only updated with records of the payments. * @param orderId - Order ID. * @param payments - Payments to be added to order. * @public * @documentationMaturity preview * @requiredField orderId * @requiredField payments * @requiredField payments.amount * @requiredField payments.giftcardPaymentDetails.giftCardPaymentId * @permissionId ECOM.MODIFY_TRANSACTIONS * @adminMethod */ function addPayments(orderId: string, payments: Payment[]): Promise; /** * Add refunds for payments for an order and changes payments statuses accordingly * @param orderId - Order ID this refunds related to * @param refund - Refund with refund transactions to be added to order. * @internal * @documentationMaturity preview * @requiredField orderId * @requiredField refund * @requiredField refund.transactions * @requiredField refund.transactions.paymentId * @permissionId ECOM.MODIFY_TRANSACTIONS * @adminMethod */ function addRefund(orderId: string, refund: Refund, options?: AddRefundOptions): Promise; interface AddRefundOptions { /** Side effect details related to refund */ sideEffects?: RefundSideEffects; } /** * Updates the status of an order's payment. * * * The `updatePaymentStatus()` function returns a Promise that resolves when the payment status is updated. * @public * @documentationMaturity preview * @requiredField identifiers * @requiredField identifiers.orderId * @requiredField identifiers.paymentId * @permissionId ECOM.MODIFY_TRANSACTIONS * @adminMethod */ function updatePaymentStatus(identifiers: UpdatePaymentStatusIdentifiers, options?: UpdatePaymentStatusOptions): Promise; interface UpdatePaymentStatusIdentifiers { /** Payment ID. */ paymentId: string; /** Order ID. */ orderId: string; } interface UpdatePaymentStatusOptions { /** Payment status. */ status?: TransactionStatus; /** * *TBD** NOT IMPLEMENTED * Status update date * When defined -> the update will be applied only if it's newer than existing one, otherwise will throw 409 * Not defined -> apply the update without any verification. * @internal */ statusUpdatedDate?: Date | null; } /** * Updates multiple order payments with a specified status. * * * The `bulkUpdatePaymentStatus()` function returns a Promise that resolves when the payment statuses are updated. * @param paymentAndOrderIds - Order and payment IDs for which to update payment status. * @public * @documentationMaturity preview * @requiredField paymentAndOrderIds * @permissionId ECOM.MODIFY_TRANSACTIONS * @adminMethod */ function bulkUpdatePaymentStatuses(paymentAndOrderIds: PaymentAndOrderId[], options?: BulkUpdatePaymentStatusesOptions): Promise; interface BulkUpdatePaymentStatusesOptions { /** Whether to return the full payment entity (`results.item`) in the response. */ returnFullEntity?: boolean; /** Payment status. */ status?: TransactionStatus; /** * *TBD** NOT IMPLEMENTED * Status update date * When defined -> the update will be applied only if it's newer than existing one, otherwise will throw 409 * Not defined -> apply the update without any verification. * @internal */ statusUpdatedDate?: Date | null; } /** * Updates OrderTransactions.refunds properties, except OrderTransactions.refunds.transactions, which are updated * via UpdateRefundTransaction endpoint * @param orderId - Order ID. * @param refund - Refund with updated field values. * @internal * @documentationMaturity preview * @requiredField orderId * @requiredField refund * @requiredField refund._id * @requiredField refund.details.items.lineItemId * @requiredField refund.details.items.quantity * @permissionId ECOM.ORDER_TRANSACTIONS_UPDATE_REFUND * @adminMethod */ function updateRefund(orderId: string, refund: Refund, options?: UpdateRefundOptions): Promise; interface UpdateRefundOptions { /** * Field mask of fields to update. * @internal */ fieldMask?: string[]; } /** * Updates OrderTransactions.refunds.transactions properties * @param orderId - Order ID. * @param refundId - Payment ID. * @internal * @documentationMaturity preview * @requiredField orderId * @requiredField refundId * @permissionId ECOM.MODIFY_TRANSACTIONS * @adminMethod */ function updateRefundTransaction(orderId: string, refundId: string, options?: UpdateRefundTransactionOptions): Promise; interface UpdateRefundTransactionOptions { /** * Updated refund transaction * @internal */ transaction: RefundTransaction; /** * Field mask of fields to update. * @internal */ fieldMask?: string[]; } /** * Updates properties of payments associated to order. * * Currently, the following fields can be updated: * + `payment.payment_details.regular_payment_details.provider_transaction_id` * + `payment.payment_details.regular_payment_details.status` * + `payment.payment_details.regular_payment_details.payment_method_details.credit_card_details` * + `payment.payment_details.regular_payment_details.authorization_details` * + `payment.payment_details.regular_payment_details.authorization_details.scheduled_action` * + `payment.payment_details.regular_payment_details.authorization_details.authorized_date` * + `payment.payment_details.regular_payment_details.authorization_details.captures` * + `payment.payment_details.regular_payment_details.authorization_details.captures.status` * + `payment.payment_details.regular_payment_details.authorization_details.captures.created_date` * + `payment.payment_details.regular_payment_details.authorization_details.captures.failure_details` * + `payment.payment_details.regular_payment_details.authorization_details.void` * + `payment.payment_details.regular_payment_details.authorization_details.void.status` * + `payment.payment_details.regular_payment_details.authorization_details.void.voided_date` * + `payment.payment_details.regular_payment_details.authorization_details.void.reason` * + `payment.payment_details.regular_payment_details.authorization_details.void.failure_details` * * To update a field's value, include the new value in the `payment` object in the body params. * * > **Note:** Removing fields value results in an error. * @param orderId - Order ID. * @param payments - Payments to be updated * @internal * @documentationMaturity preview * @requiredField orderId * @requiredField payments * @permissionId ECOM.MODIFY_TRANSACTIONS * @adminMethod */ function updatePayments(orderId: string, payments: MaskedPayment[]): Promise; /** * Retrieves a list of order transactions, given the provided paging, filtering, and sorting. * * To learn about working with _Query_ endpoints, see * [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language), and * [Sorting and Paging](https://dev.wix.com/docs/rest/articles/getting-started/sorting-and-paging). * @internal * @documentationMaturity preview * @permissionId ECOM.READ_TRANSACTIONS * @adminMethod */ function queryOrderTransactions(): OrderTransactionsQueryBuilder; interface QueryCursorResult$5 { cursors: Cursors$5; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface OrderTransactionsQueryResult extends QueryCursorResult$5 { items: OrderTransactions[]; query: OrderTransactionsQueryBuilder; next: () => Promise; prev: () => Promise; } interface OrderTransactionsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: 'orderId', value: any) => OrderTransactionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: 'orderId', value: any) => OrderTransactionsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: 'orderId', value: string) => OrderTransactionsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: 'orderId', value: any[]) => OrderTransactionsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: 'orderId', value: any) => OrderTransactionsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: 'orderId', value: boolean) => OrderTransactionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'orderId'>) => OrderTransactionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'orderId'>) => OrderTransactionsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => OrderTransactionsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => OrderTransactionsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Triggers one or more refunds on an order and updates the order's transactions record. * @param orderId - The order this refund related to * @param payments - Refund operations information * Currently, only *one* payment refund is supported per request * @internal * @documentationMaturity preview * @requiredField orderId * @requiredField payments * @requiredField payments.paymentId * @permissionId ECOM.MODIFY_TRANSACTIONS * @adminMethod */ function triggerRefund(orderId: string, payments: PaymentRefund[], options?: TriggerRefundOptions): Promise; interface TriggerRefundOptions { /** Business model of a refund */ details?: RefundDetails; /** How to restock items as part of this refund */ restockInfo?: RestockInfo; /** Should send a confirmation mail to the customer */ sendOrderRefundedEmail?: boolean; /** Personal note added to the email */ customMessage?: string | null; } /** * Calculates what amount can still be refunded on this order. * @param orderId - Order ID * @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.READ_TRANSACTIONS * @adminMethod */ function calculateRefund(orderId: string, options?: CalculateRefundOptions): Promise; interface CalculateRefundOptions { /** Refunded line items and quantity */ refundItems?: CalculateRefundItemRequest[]; /** Should include shipping in refund calculation */ refundShipping?: boolean; } /** * Checks whether this order can be refunded. * @param orderId - Order ID. * @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.READ_TRANSACTIONS * @adminMethod */ function getRefundabilityStatus(orderId: string): Promise; /** * Retrieves invoices associated with a specified order. * !!! Deprecated !!! * @param orderId - Order ID. * @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.READ_INVOICES */ function listInvoicesForSingleOrder(orderId: string): Promise; /** * Retrieves invoices associated with all specified orders. * !!! Deprecated !!! * @param orderIds - Order IDs for which to retrieve invoices. * @internal * @documentationMaturity preview * @requiredField orderIds * @permissionId ECOM.READ_INVOICES */ function listInvoicesForMultipleOrders(orderIds: string[]): Promise; /** * Retrieves invoices associated with all specified orders. * !!! Deprecated !!! * @param orderIds - Order IDs for which to retrieve invoices. * @internal * @documentationMaturity preview * @requiredField orderIds * @permissionId ECOM.READ_INVOICES */ function listInvoicesForMultipleOrdersOld(orderIds: string[]): Promise; /** * Generates and adds an invoice to a specified order. * @param orderId - Order ID. * @internal * @documentationMaturity preview * @requiredField orderId * @permissionId ECOM.MODIFY_INVOICES * @adminMethod */ function generateInvoice(orderId: string): Promise; /** * Generates and adds invoices to all specified orders. * @param orderIds - Order IDs. * @internal * @documentationMaturity preview * @requiredField orderIds * @permissionId ECOM.MODIFY_INVOICES * @adminMethod */ function bulkGenerateInvoices(orderIds: string[]): Promise; /** * Adds an invoice to a specified order. * @param orderId - Order ID. * @param invoiceInfo - Invoice info. * @internal * @documentationMaturity preview * @requiredField invoiceInfo * @requiredField invoiceInfo._id * @requiredField invoiceInfo.appId * @requiredField orderId * @permissionId ECOM.ADD_INVOICE * @adminMethod */ function addInvoiceToOrder(orderId: string, invoiceInfo: InvoiceInfo): Promise; type ecomV1OrderTransactions_universal_d_OrderTransactions = OrderTransactions; type ecomV1OrderTransactions_universal_d_Payment = Payment; type ecomV1OrderTransactions_universal_d_PaymentPaymentDetailsOneOf = PaymentPaymentDetailsOneOf; type ecomV1OrderTransactions_universal_d_RegularPaymentDetails = RegularPaymentDetails; type ecomV1OrderTransactions_universal_d_RegularPaymentDetailsPaymentMethodDetailsOneOf = RegularPaymentDetailsPaymentMethodDetailsOneOf; type ecomV1OrderTransactions_universal_d_TransactionStatus = TransactionStatus; const ecomV1OrderTransactions_universal_d_TransactionStatus: typeof TransactionStatus; type ecomV1OrderTransactions_universal_d_CreditCardPaymentMethodDetails = CreditCardPaymentMethodDetails; type ecomV1OrderTransactions_universal_d_AuthorizationDetails = AuthorizationDetails; type ecomV1OrderTransactions_universal_d_AuthorizationCapture = AuthorizationCapture; type ecomV1OrderTransactions_universal_d_AuthorizationCaptureStatus = AuthorizationCaptureStatus; const ecomV1OrderTransactions_universal_d_AuthorizationCaptureStatus: typeof AuthorizationCaptureStatus; type ecomV1OrderTransactions_universal_d_AuthorizationActionFailureDetails = AuthorizationActionFailureDetails; type ecomV1OrderTransactions_universal_d_AuthorizationVoid = AuthorizationVoid; type ecomV1OrderTransactions_universal_d_AuthorizationVoidStatus = AuthorizationVoidStatus; const ecomV1OrderTransactions_universal_d_AuthorizationVoidStatus: typeof AuthorizationVoidStatus; type ecomV1OrderTransactions_universal_d_Reason = Reason; const ecomV1OrderTransactions_universal_d_Reason: typeof Reason; type ecomV1OrderTransactions_universal_d_ScheduledAction = ScheduledAction; type ecomV1OrderTransactions_universal_d_ActionType = ActionType; const ecomV1OrderTransactions_universal_d_ActionType: typeof ActionType; type ecomV1OrderTransactions_universal_d_GiftCardPaymentDetails = GiftCardPaymentDetails; type ecomV1OrderTransactions_universal_d_MembershipPaymentDetails = MembershipPaymentDetails; type ecomV1OrderTransactions_universal_d_MembershipPaymentStatus = MembershipPaymentStatus; const ecomV1OrderTransactions_universal_d_MembershipPaymentStatus: typeof MembershipPaymentStatus; type ecomV1OrderTransactions_universal_d_Refund = Refund; type ecomV1OrderTransactions_universal_d_RefundTransaction = RefundTransaction; type ecomV1OrderTransactions_universal_d_RefundStatus = RefundStatus; const ecomV1OrderTransactions_universal_d_RefundStatus: typeof RefundStatus; type ecomV1OrderTransactions_universal_d_RefundDetails = RefundDetails; type ecomV1OrderTransactions_universal_d_RefundItem = RefundItem; type ecomV1OrderTransactions_universal_d_LineItemRefund = LineItemRefund; type ecomV1OrderTransactions_universal_d_AdditionalFeeRefund = AdditionalFeeRefund; type ecomV1OrderTransactions_universal_d_ShippingRefund = ShippingRefund; type ecomV1OrderTransactions_universal_d_AggregatedRefundSummary = AggregatedRefundSummary; type ecomV1OrderTransactions_universal_d_SnapshotMessage = SnapshotMessage; type ecomV1OrderTransactions_universal_d_IndexingMessage = IndexingMessage; type ecomV1OrderTransactions_universal_d_OrderRefunded = OrderRefunded; type ecomV1OrderTransactions_universal_d_Order = Order; type ecomV1OrderTransactions_universal_d_BuyerInfo = BuyerInfo; type ecomV1OrderTransactions_universal_d_Totals = Totals; type ecomV1OrderTransactions_universal_d_BillingInfo = BillingInfo; type ecomV1OrderTransactions_universal_d_AddressAddressLine1OptionsOneOf = AddressAddressLine1OptionsOneOf; type ecomV1OrderTransactions_universal_d_FullName = FullName; type ecomV1OrderTransactions_universal_d_Street = Street; type ecomV1OrderTransactions_universal_d_ShippingInfo = ShippingInfo; type ecomV1OrderTransactions_universal_d_ShippingInfoDetailsOneOf = ShippingInfoDetailsOneOf; type ecomV1OrderTransactions_universal_d_ShipmentDetails = ShipmentDetails; type ecomV1OrderTransactions_universal_d_TrackingInfo = TrackingInfo; type ecomV1OrderTransactions_universal_d_ShippingPriceData = ShippingPriceData; type ecomV1OrderTransactions_universal_d_PickupAddress = PickupAddress; type ecomV1OrderTransactions_universal_d_BuyerDetails = BuyerDetails; type ecomV1OrderTransactions_universal_d_PaymentStatus = PaymentStatus; const ecomV1OrderTransactions_universal_d_PaymentStatus: typeof PaymentStatus; type ecomV1OrderTransactions_universal_d_FulfillmentStatus = FulfillmentStatus; const ecomV1OrderTransactions_universal_d_FulfillmentStatus: typeof FulfillmentStatus; type ecomV1OrderTransactions_universal_d_LineItemType = LineItemType; const ecomV1OrderTransactions_universal_d_LineItemType: typeof LineItemType; type ecomV1OrderTransactions_universal_d_OptionSelection = OptionSelection; type ecomV1OrderTransactions_universal_d_CustomTextFieldSelection = CustomTextFieldSelection; type ecomV1OrderTransactions_universal_d_MediaItem = MediaItem; type ecomV1OrderTransactions_universal_d_MediaItemType = MediaItemType; const ecomV1OrderTransactions_universal_d_MediaItemType: typeof MediaItemType; type ecomV1OrderTransactions_universal_d_LineItemPriceData = LineItemPriceData; type ecomV1OrderTransactions_universal_d_DigitalFile = DigitalFile; type ecomV1OrderTransactions_universal_d_Activity = Activity; type ecomV1OrderTransactions_universal_d_ActivityType = ActivityType; const ecomV1OrderTransactions_universal_d_ActivityType: typeof ActivityType; type ecomV1OrderTransactions_universal_d_V2InvoiceInfo = V2InvoiceInfo; type ecomV1OrderTransactions_universal_d_InvoiceSource = InvoiceSource; const ecomV1OrderTransactions_universal_d_InvoiceSource: typeof InvoiceSource; type ecomV1OrderTransactions_universal_d_Fulfillment = Fulfillment; type ecomV1OrderTransactions_universal_d_FulfillmentLineItem = FulfillmentLineItem; type ecomV1OrderTransactions_universal_d_FulfillmentTrackingInfo = FulfillmentTrackingInfo; type ecomV1OrderTransactions_universal_d_Discount = Discount; type ecomV1OrderTransactions_universal_d_AppliedCoupon = AppliedCoupon; type ecomV1OrderTransactions_universal_d_CustomField = CustomField; type ecomV1OrderTransactions_universal_d_ChannelInfo = ChannelInfo; type ecomV1OrderTransactions_universal_d_ChannelType = ChannelType; const ecomV1OrderTransactions_universal_d_ChannelType: typeof ChannelType; type ecomV1OrderTransactions_universal_d_EnteredBy = EnteredBy; type ecomV1OrderTransactions_universal_d_EnteredByIdentityType = EnteredByIdentityType; const ecomV1OrderTransactions_universal_d_EnteredByIdentityType: typeof EnteredByIdentityType; type ecomV1OrderTransactions_universal_d_SubscriptionInfo = SubscriptionInfo; type ecomV1OrderTransactions_universal_d_SubscriptionOptionInfo = SubscriptionOptionInfo; type ecomV1OrderTransactions_universal_d_V2Refund = V2Refund; type ecomV1OrderTransactions_universal_d_PaymentsUpdated = PaymentsUpdated; type ecomV1OrderTransactions_universal_d_RefundCreated = RefundCreated; type ecomV1OrderTransactions_universal_d_RestockInfo = RestockInfo; type ecomV1OrderTransactions_universal_d_RestockType = RestockType; const ecomV1OrderTransactions_universal_d_RestockType: typeof RestockType; type ecomV1OrderTransactions_universal_d_RestockItem = RestockItem; type ecomV1OrderTransactions_universal_d_RefundCompleted = RefundCompleted; type ecomV1OrderTransactions_universal_d_RefundSideEffects = RefundSideEffects; type ecomV1OrderTransactions_universal_d_ListTransactionsForSingleOrderRequest = ListTransactionsForSingleOrderRequest; type ecomV1OrderTransactions_universal_d_ListTransactionsForSingleOrderResponse = ListTransactionsForSingleOrderResponse; type ecomV1OrderTransactions_universal_d_ListTransactionsForMultipleOrdersRequest = ListTransactionsForMultipleOrdersRequest; type ecomV1OrderTransactions_universal_d_ListTransactionsForMultipleOrdersResponse = ListTransactionsForMultipleOrdersResponse; type ecomV1OrderTransactions_universal_d_AddPaymentsRequest = AddPaymentsRequest; type ecomV1OrderTransactions_universal_d_AddPaymentsResponse = AddPaymentsResponse; type ecomV1OrderTransactions_universal_d_AddRefundRequest = AddRefundRequest; type ecomV1OrderTransactions_universal_d_AddRefundResponse = AddRefundResponse; type ecomV1OrderTransactions_universal_d_UpdatePaymentStatusRequest = UpdatePaymentStatusRequest; type ecomV1OrderTransactions_universal_d_UpdatePaymentStatusResponse = UpdatePaymentStatusResponse; type ecomV1OrderTransactions_universal_d_BulkUpdatePaymentStatusesRequest = BulkUpdatePaymentStatusesRequest; type ecomV1OrderTransactions_universal_d_PaymentAndOrderId = PaymentAndOrderId; type ecomV1OrderTransactions_universal_d_BulkUpdatePaymentStatusesResponse = BulkUpdatePaymentStatusesResponse; type ecomV1OrderTransactions_universal_d_BulkPaymentResult = BulkPaymentResult; type ecomV1OrderTransactions_universal_d_ItemMetadata = ItemMetadata; type ecomV1OrderTransactions_universal_d_BulkActionMetadata = BulkActionMetadata; type ecomV1OrderTransactions_universal_d_UpdateRefundRequest = UpdateRefundRequest; type ecomV1OrderTransactions_universal_d_UpdateRefundResponse = UpdateRefundResponse; type ecomV1OrderTransactions_universal_d_UpdateRefundTransactionRequest = UpdateRefundTransactionRequest; type ecomV1OrderTransactions_universal_d_UpdateRefundTransactionResponse = UpdateRefundTransactionResponse; type ecomV1OrderTransactions_universal_d_UpdatePaymentsRequest = UpdatePaymentsRequest; type ecomV1OrderTransactions_universal_d_MaskedPayment = MaskedPayment; type ecomV1OrderTransactions_universal_d_UpdatePaymentsResponse = UpdatePaymentsResponse; type ecomV1OrderTransactions_universal_d_QueryOrderTransactionsRequest = QueryOrderTransactionsRequest; type ecomV1OrderTransactions_universal_d_QueryOrderTransactionsResponse = QueryOrderTransactionsResponse; type ecomV1OrderTransactions_universal_d_TriggerRefundRequest = TriggerRefundRequest; type ecomV1OrderTransactions_universal_d_PaymentRefund = PaymentRefund; type ecomV1OrderTransactions_universal_d_TriggerRefundResponse = TriggerRefundResponse; type ecomV1OrderTransactions_universal_d_CalculateRefundRequest = CalculateRefundRequest; type ecomV1OrderTransactions_universal_d_CalculateRefundItemRequest = CalculateRefundItemRequest; type ecomV1OrderTransactions_universal_d_CalculateRefundResponse = CalculateRefundResponse; type ecomV1OrderTransactions_universal_d_CalculateRefundItemResponse = CalculateRefundItemResponse; type ecomV1OrderTransactions_universal_d_GetRefundabilityStatusRequest = GetRefundabilityStatusRequest; type ecomV1OrderTransactions_universal_d_GetRefundabilityStatusResponse = GetRefundabilityStatusResponse; type ecomV1OrderTransactions_universal_d_Refundability = Refundability; type ecomV1OrderTransactions_universal_d_RefundabilityAdditionalRefundabilityInfoOneOf = RefundabilityAdditionalRefundabilityInfoOneOf; type ecomV1OrderTransactions_universal_d_RefundableStatus = RefundableStatus; const ecomV1OrderTransactions_universal_d_RefundableStatus: typeof RefundableStatus; type ecomV1OrderTransactions_universal_d_NonRefundableReason = NonRefundableReason; const ecomV1OrderTransactions_universal_d_NonRefundableReason: typeof NonRefundableReason; type ecomV1OrderTransactions_universal_d_ManuallyRefundableReason = ManuallyRefundableReason; const ecomV1OrderTransactions_universal_d_ManuallyRefundableReason: typeof ManuallyRefundableReason; type ecomV1OrderTransactions_universal_d_ListInvoicesForSingleOrderRequest = ListInvoicesForSingleOrderRequest; type ecomV1OrderTransactions_universal_d_ListInvoicesForSingleOrderResponse = ListInvoicesForSingleOrderResponse; type ecomV1OrderTransactions_universal_d_InvoiceInfo = InvoiceInfo; type ecomV1OrderTransactions_universal_d_ListInvoicesForMultipleOrdersRequest = ListInvoicesForMultipleOrdersRequest; type ecomV1OrderTransactions_universal_d_ListInvoicesForMultipleOrdersResponse = ListInvoicesForMultipleOrdersResponse; type ecomV1OrderTransactions_universal_d_InvoicesForOrder = InvoicesForOrder; type ecomV1OrderTransactions_universal_d_GenerateInvoiceRequest = GenerateInvoiceRequest; type ecomV1OrderTransactions_universal_d_GenerateInvoiceResponse = GenerateInvoiceResponse; type ecomV1OrderTransactions_universal_d_BulkGenerateInvoicesRequest = BulkGenerateInvoicesRequest; type ecomV1OrderTransactions_universal_d_BulkGenerateInvoicesResponse = BulkGenerateInvoicesResponse; type ecomV1OrderTransactions_universal_d_BulkInvoiceResult = BulkInvoiceResult; type ecomV1OrderTransactions_universal_d_InvoiceForOrder = InvoiceForOrder; type ecomV1OrderTransactions_universal_d_AddInvoiceToOrderRequest = AddInvoiceToOrderRequest; type ecomV1OrderTransactions_universal_d_AddInvoiceToOrderResponse = AddInvoiceToOrderResponse; const ecomV1OrderTransactions_universal_d_listTransactionsForSingleOrder: typeof listTransactionsForSingleOrder; const ecomV1OrderTransactions_universal_d_listTransactionsForMultipleOrders: typeof listTransactionsForMultipleOrders; const ecomV1OrderTransactions_universal_d_addPayments: typeof addPayments; const ecomV1OrderTransactions_universal_d_addRefund: typeof addRefund; type ecomV1OrderTransactions_universal_d_AddRefundOptions = AddRefundOptions; const ecomV1OrderTransactions_universal_d_updatePaymentStatus: typeof updatePaymentStatus; type ecomV1OrderTransactions_universal_d_UpdatePaymentStatusIdentifiers = UpdatePaymentStatusIdentifiers; type ecomV1OrderTransactions_universal_d_UpdatePaymentStatusOptions = UpdatePaymentStatusOptions; const ecomV1OrderTransactions_universal_d_bulkUpdatePaymentStatuses: typeof bulkUpdatePaymentStatuses; type ecomV1OrderTransactions_universal_d_BulkUpdatePaymentStatusesOptions = BulkUpdatePaymentStatusesOptions; const ecomV1OrderTransactions_universal_d_updateRefund: typeof updateRefund; type ecomV1OrderTransactions_universal_d_UpdateRefundOptions = UpdateRefundOptions; const ecomV1OrderTransactions_universal_d_updateRefundTransaction: typeof updateRefundTransaction; type ecomV1OrderTransactions_universal_d_UpdateRefundTransactionOptions = UpdateRefundTransactionOptions; const ecomV1OrderTransactions_universal_d_updatePayments: typeof updatePayments; const ecomV1OrderTransactions_universal_d_queryOrderTransactions: typeof queryOrderTransactions; type ecomV1OrderTransactions_universal_d_OrderTransactionsQueryResult = OrderTransactionsQueryResult; type ecomV1OrderTransactions_universal_d_OrderTransactionsQueryBuilder = OrderTransactionsQueryBuilder; const ecomV1OrderTransactions_universal_d_triggerRefund: typeof triggerRefund; type ecomV1OrderTransactions_universal_d_TriggerRefundOptions = TriggerRefundOptions; const ecomV1OrderTransactions_universal_d_calculateRefund: typeof calculateRefund; type ecomV1OrderTransactions_universal_d_CalculateRefundOptions = CalculateRefundOptions; const ecomV1OrderTransactions_universal_d_getRefundabilityStatus: typeof getRefundabilityStatus; const ecomV1OrderTransactions_universal_d_listInvoicesForSingleOrder: typeof listInvoicesForSingleOrder; const ecomV1OrderTransactions_universal_d_listInvoicesForMultipleOrders: typeof listInvoicesForMultipleOrders; const ecomV1OrderTransactions_universal_d_listInvoicesForMultipleOrdersOld: typeof listInvoicesForMultipleOrdersOld; const ecomV1OrderTransactions_universal_d_generateInvoice: typeof generateInvoice; const ecomV1OrderTransactions_universal_d_bulkGenerateInvoices: typeof bulkGenerateInvoices; const ecomV1OrderTransactions_universal_d_addInvoiceToOrder: typeof addInvoiceToOrder; namespace ecomV1OrderTransactions_universal_d { export { ecomV1OrderTransactions_universal_d_OrderTransactions as OrderTransactions, ecomV1OrderTransactions_universal_d_Payment as Payment, ecomV1OrderTransactions_universal_d_PaymentPaymentDetailsOneOf as PaymentPaymentDetailsOneOf, ecomV1OrderTransactions_universal_d_RegularPaymentDetails as RegularPaymentDetails, ecomV1OrderTransactions_universal_d_RegularPaymentDetailsPaymentMethodDetailsOneOf as RegularPaymentDetailsPaymentMethodDetailsOneOf, ecomV1OrderTransactions_universal_d_TransactionStatus as TransactionStatus, ecomV1OrderTransactions_universal_d_CreditCardPaymentMethodDetails as CreditCardPaymentMethodDetails, ecomV1OrderTransactions_universal_d_AuthorizationDetails as AuthorizationDetails, ecomV1OrderTransactions_universal_d_AuthorizationCapture as AuthorizationCapture, ecomV1OrderTransactions_universal_d_AuthorizationCaptureStatus as AuthorizationCaptureStatus, Price$1 as Price, ecomV1OrderTransactions_universal_d_AuthorizationActionFailureDetails as AuthorizationActionFailureDetails, ecomV1OrderTransactions_universal_d_AuthorizationVoid as AuthorizationVoid, ecomV1OrderTransactions_universal_d_AuthorizationVoidStatus as AuthorizationVoidStatus, ecomV1OrderTransactions_universal_d_Reason as Reason, ecomV1OrderTransactions_universal_d_ScheduledAction as ScheduledAction, ecomV1OrderTransactions_universal_d_ActionType as ActionType, ecomV1OrderTransactions_universal_d_GiftCardPaymentDetails as GiftCardPaymentDetails, ecomV1OrderTransactions_universal_d_MembershipPaymentDetails as MembershipPaymentDetails, ecomV1OrderTransactions_universal_d_MembershipPaymentStatus as MembershipPaymentStatus, MembershipName$1 as MembershipName, ecomV1OrderTransactions_universal_d_Refund as Refund, ecomV1OrderTransactions_universal_d_RefundTransaction as RefundTransaction, ecomV1OrderTransactions_universal_d_RefundStatus as RefundStatus, ecomV1OrderTransactions_universal_d_RefundDetails as RefundDetails, ecomV1OrderTransactions_universal_d_RefundItem as RefundItem, ecomV1OrderTransactions_universal_d_LineItemRefund as LineItemRefund, ecomV1OrderTransactions_universal_d_AdditionalFeeRefund as AdditionalFeeRefund, ecomV1OrderTransactions_universal_d_ShippingRefund as ShippingRefund, ecomV1OrderTransactions_universal_d_AggregatedRefundSummary as AggregatedRefundSummary, ecomV1OrderTransactions_universal_d_SnapshotMessage as SnapshotMessage, ecomV1OrderTransactions_universal_d_IndexingMessage as IndexingMessage, DiffmatokyPayload$1 as DiffmatokyPayload, ErrorInformation$1 as ErrorInformation, ecomV1OrderTransactions_universal_d_OrderRefunded as OrderRefunded, ecomV1OrderTransactions_universal_d_Order as Order, ecomV1OrderTransactions_universal_d_BuyerInfo as BuyerInfo, IdentityType$2 as IdentityType, WeightUnit$2 as WeightUnit, ecomV1OrderTransactions_universal_d_Totals as Totals, ecomV1OrderTransactions_universal_d_BillingInfo as BillingInfo, Address$4 as Address, ecomV1OrderTransactions_universal_d_AddressAddressLine1OptionsOneOf as AddressAddressLine1OptionsOneOf, ecomV1OrderTransactions_universal_d_FullName as FullName, ecomV1OrderTransactions_universal_d_Street as Street, VatId$1 as VatId, VatType$1 as VatType, ecomV1OrderTransactions_universal_d_ShippingInfo as ShippingInfo, ecomV1OrderTransactions_universal_d_ShippingInfoDetailsOneOf as ShippingInfoDetailsOneOf, ecomV1OrderTransactions_universal_d_ShipmentDetails as ShipmentDetails, ecomV1OrderTransactions_universal_d_TrackingInfo as TrackingInfo, ecomV1OrderTransactions_universal_d_ShippingPriceData as ShippingPriceData, PickupDetails$2 as PickupDetails, ecomV1OrderTransactions_universal_d_PickupAddress as PickupAddress, ecomV1OrderTransactions_universal_d_BuyerDetails as BuyerDetails, ecomV1OrderTransactions_universal_d_PaymentStatus as PaymentStatus, ecomV1OrderTransactions_universal_d_FulfillmentStatus as FulfillmentStatus, LineItem$1 as LineItem, ecomV1OrderTransactions_universal_d_LineItemType as LineItemType, ecomV1OrderTransactions_universal_d_OptionSelection as OptionSelection, ecomV1OrderTransactions_universal_d_CustomTextFieldSelection as CustomTextFieldSelection, ecomV1OrderTransactions_universal_d_MediaItem as MediaItem, ecomV1OrderTransactions_universal_d_MediaItemType as MediaItemType, ecomV1OrderTransactions_universal_d_LineItemPriceData as LineItemPriceData, ecomV1OrderTransactions_universal_d_DigitalFile as DigitalFile, ecomV1OrderTransactions_universal_d_Activity as Activity, ecomV1OrderTransactions_universal_d_ActivityType as ActivityType, ecomV1OrderTransactions_universal_d_V2InvoiceInfo as V2InvoiceInfo, ecomV1OrderTransactions_universal_d_InvoiceSource as InvoiceSource, ecomV1OrderTransactions_universal_d_Fulfillment as Fulfillment, ecomV1OrderTransactions_universal_d_FulfillmentLineItem as FulfillmentLineItem, ecomV1OrderTransactions_universal_d_FulfillmentTrackingInfo as FulfillmentTrackingInfo, ecomV1OrderTransactions_universal_d_Discount as Discount, ecomV1OrderTransactions_universal_d_AppliedCoupon as AppliedCoupon, ecomV1OrderTransactions_universal_d_CustomField as CustomField, ecomV1OrderTransactions_universal_d_ChannelInfo as ChannelInfo, ecomV1OrderTransactions_universal_d_ChannelType as ChannelType, ecomV1OrderTransactions_universal_d_EnteredBy as EnteredBy, ecomV1OrderTransactions_universal_d_EnteredByIdentityType as EnteredByIdentityType, ecomV1OrderTransactions_universal_d_SubscriptionInfo as SubscriptionInfo, SubscriptionSettings$1 as SubscriptionSettings, SubscriptionFrequency$1 as SubscriptionFrequency, ecomV1OrderTransactions_universal_d_SubscriptionOptionInfo as SubscriptionOptionInfo, ecomV1OrderTransactions_universal_d_V2Refund as V2Refund, GiftCard$1 as GiftCard, ecomV1OrderTransactions_universal_d_PaymentsUpdated as PaymentsUpdated, ecomV1OrderTransactions_universal_d_RefundCreated as RefundCreated, ecomV1OrderTransactions_universal_d_RestockInfo as RestockInfo, ecomV1OrderTransactions_universal_d_RestockType as RestockType, ecomV1OrderTransactions_universal_d_RestockItem as RestockItem, ecomV1OrderTransactions_universal_d_RefundCompleted as RefundCompleted, ecomV1OrderTransactions_universal_d_RefundSideEffects as RefundSideEffects, ecomV1OrderTransactions_universal_d_ListTransactionsForSingleOrderRequest as ListTransactionsForSingleOrderRequest, ecomV1OrderTransactions_universal_d_ListTransactionsForSingleOrderResponse as ListTransactionsForSingleOrderResponse, ecomV1OrderTransactions_universal_d_ListTransactionsForMultipleOrdersRequest as ListTransactionsForMultipleOrdersRequest, ecomV1OrderTransactions_universal_d_ListTransactionsForMultipleOrdersResponse as ListTransactionsForMultipleOrdersResponse, ecomV1OrderTransactions_universal_d_AddPaymentsRequest as AddPaymentsRequest, ecomV1OrderTransactions_universal_d_AddPaymentsResponse as AddPaymentsResponse, ecomV1OrderTransactions_universal_d_AddRefundRequest as AddRefundRequest, ecomV1OrderTransactions_universal_d_AddRefundResponse as AddRefundResponse, ecomV1OrderTransactions_universal_d_UpdatePaymentStatusRequest as UpdatePaymentStatusRequest, ecomV1OrderTransactions_universal_d_UpdatePaymentStatusResponse as UpdatePaymentStatusResponse, ecomV1OrderTransactions_universal_d_BulkUpdatePaymentStatusesRequest as BulkUpdatePaymentStatusesRequest, ecomV1OrderTransactions_universal_d_PaymentAndOrderId as PaymentAndOrderId, ecomV1OrderTransactions_universal_d_BulkUpdatePaymentStatusesResponse as BulkUpdatePaymentStatusesResponse, ecomV1OrderTransactions_universal_d_BulkPaymentResult as BulkPaymentResult, ecomV1OrderTransactions_universal_d_ItemMetadata as ItemMetadata, ApplicationError$3 as ApplicationError, ecomV1OrderTransactions_universal_d_BulkActionMetadata as BulkActionMetadata, ecomV1OrderTransactions_universal_d_UpdateRefundRequest as UpdateRefundRequest, ecomV1OrderTransactions_universal_d_UpdateRefundResponse as UpdateRefundResponse, ecomV1OrderTransactions_universal_d_UpdateRefundTransactionRequest as UpdateRefundTransactionRequest, ecomV1OrderTransactions_universal_d_UpdateRefundTransactionResponse as UpdateRefundTransactionResponse, ecomV1OrderTransactions_universal_d_UpdatePaymentsRequest as UpdatePaymentsRequest, ecomV1OrderTransactions_universal_d_MaskedPayment as MaskedPayment, ecomV1OrderTransactions_universal_d_UpdatePaymentsResponse as UpdatePaymentsResponse, ecomV1OrderTransactions_universal_d_QueryOrderTransactionsRequest as QueryOrderTransactionsRequest, CursorQuery$3 as CursorQuery, CursorQueryPagingMethodOneOf$3 as CursorQueryPagingMethodOneOf, Sorting$5 as Sorting, SortOrder$5 as SortOrder, CursorPaging$5 as CursorPaging, ecomV1OrderTransactions_universal_d_QueryOrderTransactionsResponse as QueryOrderTransactionsResponse, CursorPagingMetadata$4 as CursorPagingMetadata, Cursors$5 as Cursors, ecomV1OrderTransactions_universal_d_TriggerRefundRequest as TriggerRefundRequest, ecomV1OrderTransactions_universal_d_PaymentRefund as PaymentRefund, ecomV1OrderTransactions_universal_d_TriggerRefundResponse as TriggerRefundResponse, ecomV1OrderTransactions_universal_d_CalculateRefundRequest as CalculateRefundRequest, ecomV1OrderTransactions_universal_d_CalculateRefundItemRequest as CalculateRefundItemRequest, ecomV1OrderTransactions_universal_d_CalculateRefundResponse as CalculateRefundResponse, ecomV1OrderTransactions_universal_d_CalculateRefundItemResponse as CalculateRefundItemResponse, ecomV1OrderTransactions_universal_d_GetRefundabilityStatusRequest as GetRefundabilityStatusRequest, ecomV1OrderTransactions_universal_d_GetRefundabilityStatusResponse as GetRefundabilityStatusResponse, ecomV1OrderTransactions_universal_d_Refundability as Refundability, ecomV1OrderTransactions_universal_d_RefundabilityAdditionalRefundabilityInfoOneOf as RefundabilityAdditionalRefundabilityInfoOneOf, ecomV1OrderTransactions_universal_d_RefundableStatus as RefundableStatus, ecomV1OrderTransactions_universal_d_NonRefundableReason as NonRefundableReason, ecomV1OrderTransactions_universal_d_ManuallyRefundableReason as ManuallyRefundableReason, ecomV1OrderTransactions_universal_d_ListInvoicesForSingleOrderRequest as ListInvoicesForSingleOrderRequest, ecomV1OrderTransactions_universal_d_ListInvoicesForSingleOrderResponse as ListInvoicesForSingleOrderResponse, ecomV1OrderTransactions_universal_d_InvoiceInfo as InvoiceInfo, ecomV1OrderTransactions_universal_d_ListInvoicesForMultipleOrdersRequest as ListInvoicesForMultipleOrdersRequest, ecomV1OrderTransactions_universal_d_ListInvoicesForMultipleOrdersResponse as ListInvoicesForMultipleOrdersResponse, ecomV1OrderTransactions_universal_d_InvoicesForOrder as InvoicesForOrder, ecomV1OrderTransactions_universal_d_GenerateInvoiceRequest as GenerateInvoiceRequest, ecomV1OrderTransactions_universal_d_GenerateInvoiceResponse as GenerateInvoiceResponse, ecomV1OrderTransactions_universal_d_BulkGenerateInvoicesRequest as BulkGenerateInvoicesRequest, ecomV1OrderTransactions_universal_d_BulkGenerateInvoicesResponse as BulkGenerateInvoicesResponse, ecomV1OrderTransactions_universal_d_BulkInvoiceResult as BulkInvoiceResult, ecomV1OrderTransactions_universal_d_InvoiceForOrder as InvoiceForOrder, ecomV1OrderTransactions_universal_d_AddInvoiceToOrderRequest as AddInvoiceToOrderRequest, ecomV1OrderTransactions_universal_d_AddInvoiceToOrderResponse as AddInvoiceToOrderResponse, DomainEvent$7 as DomainEvent, DomainEventBodyOneOf$7 as DomainEventBodyOneOf, EntityCreatedEvent$7 as EntityCreatedEvent, RestoreInfo$7 as RestoreInfo, EntityUpdatedEvent$7 as EntityUpdatedEvent, EntityDeletedEvent$7 as EntityDeletedEvent, ActionEvent$7 as ActionEvent, MessageEnvelope$6 as MessageEnvelope, IdentificationData$7 as IdentificationData, IdentificationDataIdOneOf$7 as IdentificationDataIdOneOf, WebhookIdentityType$6 as WebhookIdentityType, ecomV1OrderTransactions_universal_d_listTransactionsForSingleOrder as listTransactionsForSingleOrder, ecomV1OrderTransactions_universal_d_listTransactionsForMultipleOrders as listTransactionsForMultipleOrders, ecomV1OrderTransactions_universal_d_addPayments as addPayments, ecomV1OrderTransactions_universal_d_addRefund as addRefund, ecomV1OrderTransactions_universal_d_AddRefundOptions as AddRefundOptions, ecomV1OrderTransactions_universal_d_updatePaymentStatus as updatePaymentStatus, ecomV1OrderTransactions_universal_d_UpdatePaymentStatusIdentifiers as UpdatePaymentStatusIdentifiers, ecomV1OrderTransactions_universal_d_UpdatePaymentStatusOptions as UpdatePaymentStatusOptions, ecomV1OrderTransactions_universal_d_bulkUpdatePaymentStatuses as bulkUpdatePaymentStatuses, ecomV1OrderTransactions_universal_d_BulkUpdatePaymentStatusesOptions as BulkUpdatePaymentStatusesOptions, ecomV1OrderTransactions_universal_d_updateRefund as updateRefund, ecomV1OrderTransactions_universal_d_UpdateRefundOptions as UpdateRefundOptions, ecomV1OrderTransactions_universal_d_updateRefundTransaction as updateRefundTransaction, ecomV1OrderTransactions_universal_d_UpdateRefundTransactionOptions as UpdateRefundTransactionOptions, ecomV1OrderTransactions_universal_d_updatePayments as updatePayments, ecomV1OrderTransactions_universal_d_queryOrderTransactions as queryOrderTransactions, ecomV1OrderTransactions_universal_d_OrderTransactionsQueryResult as OrderTransactionsQueryResult, ecomV1OrderTransactions_universal_d_OrderTransactionsQueryBuilder as OrderTransactionsQueryBuilder, ecomV1OrderTransactions_universal_d_triggerRefund as triggerRefund, ecomV1OrderTransactions_universal_d_TriggerRefundOptions as TriggerRefundOptions, ecomV1OrderTransactions_universal_d_calculateRefund as calculateRefund, ecomV1OrderTransactions_universal_d_CalculateRefundOptions as CalculateRefundOptions, ecomV1OrderTransactions_universal_d_getRefundabilityStatus as getRefundabilityStatus, ecomV1OrderTransactions_universal_d_listInvoicesForSingleOrder as listInvoicesForSingleOrder, ecomV1OrderTransactions_universal_d_listInvoicesForMultipleOrders as listInvoicesForMultipleOrders, ecomV1OrderTransactions_universal_d_listInvoicesForMultipleOrdersOld as listInvoicesForMultipleOrdersOld, ecomV1OrderTransactions_universal_d_generateInvoice as generateInvoice, ecomV1OrderTransactions_universal_d_bulkGenerateInvoices as bulkGenerateInvoices, ecomV1OrderTransactions_universal_d_addInvoiceToOrder as addInvoiceToOrder, }; } interface OrdersSettings { /** * Defines when to update the store inventory. * * - `ON_ORDER_PAID`: Stock quantities will update only after the payment is approved. * - `ON_ORDER_PLACED`: Stock quantities will update while the payment is being processed. If the payment did not go through, items will restock. * * Default: `ON_ORDER_PLACED` */ inventoryUpdateTrigger?: InventoryUpdateTrigger; /** * Whether to automatically create invoices for every new order paid online. * Default: `false` */ createInvoice?: boolean | null; /** * Date and time the orders settings were created. * @readonly */ _createdDate?: Date | null; /** * Date and time the orders settings were updated. * @readonly */ _updatedDate?: Date | null; } enum InventoryUpdateTrigger { UNKNOWN_INVENTORY_UPDATE_TRIGGER = "UNKNOWN_INVENTORY_UPDATE_TRIGGER", /** Stock quantities will update only after the payment is approved. */ ON_ORDER_PAID = "ON_ORDER_PAID", /** Stock quantities will update while the payment is being processed. If the payment did not go through, items will restock. */ ON_ORDER_PLACED = "ON_ORDER_PLACED" } interface GetOrdersSettingsRequest { } interface GetOrdersSettingsResponse { /** Orders settings. */ ordersSettings?: OrdersSettings; } interface UpdateOrdersSettingsRequest { /** Orders settings to update. */ ordersSettings: OrdersSettings; /** * The list of fields to update. * @internal */ fieldMask?: string[]; } interface UpdateOrdersSettingsResponse { /** The updated orders settings. */ ordersSettings?: OrdersSettings; } interface DeleteOrdersSettingsRequest { } interface DeleteOrdersSettingsResponse { } interface ListOrdersSettingsRequest { } interface ListOrdersSettingsResponse { /** List of retrieved orders settings. */ ordersSettings?: OrdersSettings[]; } interface DomainEvent$6 extends DomainEventBodyOneOf$6 { createdEvent?: EntityCreatedEvent$6; updatedEvent?: EntityUpdatedEvent$6; deletedEvent?: EntityDeletedEvent$6; actionEvent?: ActionEvent$6; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$6 { createdEvent?: EntityCreatedEvent$6; updatedEvent?: EntityUpdatedEvent$6; deletedEvent?: EntityDeletedEvent$6; actionEvent?: ActionEvent$6; } interface EntityCreatedEvent$6 { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$6; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$6 { deletedDate?: Date | null; } interface EntityUpdatedEvent$6 { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$6 { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$6 { bodyAsJson?: string; } interface MessageEnvelope$5 { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$6; /** Stringify payload. */ data?: string; } interface IdentificationData$6 extends IdentificationDataIdOneOf$6 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$5; } /** @oneof */ interface IdentificationDataIdOneOf$6 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$5 { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Retrieves the sites' order settings. * * * The `getOrdersSettings()` function returns a Promise that resolves to orders settings. * @public * @documentationMaturity preview * @permissionId ECOM.READ_ORDERS_SETTINGS * @returns The requested orders settings. */ function getOrdersSettings(): Promise; /** * Updates the sites' orders settings. * * * The `updateOrdersSettings()` function returns a Promise that resolves to the newly updated orders settings. * @public * @documentationMaturity preview * @requiredField ordersSettings * @param ordersSettings - Orders settings to update. * @permissionId ECOM.UPDATE_ORDERS_SETTINGS * @adminMethod * @returns The updated orders settings. */ function updateOrdersSettings(ordersSettings: OrdersSettings, options?: UpdateOrdersSettingsOptions): Promise; interface UpdateOrdersSettingsOptions { /** * The list of fields to update. * @internal */ fieldMask?: string[]; } type ecomV1OrdersSettings_universal_d_OrdersSettings = OrdersSettings; type ecomV1OrdersSettings_universal_d_InventoryUpdateTrigger = InventoryUpdateTrigger; const ecomV1OrdersSettings_universal_d_InventoryUpdateTrigger: typeof InventoryUpdateTrigger; type ecomV1OrdersSettings_universal_d_GetOrdersSettingsRequest = GetOrdersSettingsRequest; type ecomV1OrdersSettings_universal_d_GetOrdersSettingsResponse = GetOrdersSettingsResponse; type ecomV1OrdersSettings_universal_d_UpdateOrdersSettingsRequest = UpdateOrdersSettingsRequest; type ecomV1OrdersSettings_universal_d_UpdateOrdersSettingsResponse = UpdateOrdersSettingsResponse; type ecomV1OrdersSettings_universal_d_DeleteOrdersSettingsRequest = DeleteOrdersSettingsRequest; type ecomV1OrdersSettings_universal_d_DeleteOrdersSettingsResponse = DeleteOrdersSettingsResponse; type ecomV1OrdersSettings_universal_d_ListOrdersSettingsRequest = ListOrdersSettingsRequest; type ecomV1OrdersSettings_universal_d_ListOrdersSettingsResponse = ListOrdersSettingsResponse; const ecomV1OrdersSettings_universal_d_getOrdersSettings: typeof getOrdersSettings; const ecomV1OrdersSettings_universal_d_updateOrdersSettings: typeof updateOrdersSettings; type ecomV1OrdersSettings_universal_d_UpdateOrdersSettingsOptions = UpdateOrdersSettingsOptions; namespace ecomV1OrdersSettings_universal_d { export { ecomV1OrdersSettings_universal_d_OrdersSettings as OrdersSettings, ecomV1OrdersSettings_universal_d_InventoryUpdateTrigger as InventoryUpdateTrigger, ecomV1OrdersSettings_universal_d_GetOrdersSettingsRequest as GetOrdersSettingsRequest, ecomV1OrdersSettings_universal_d_GetOrdersSettingsResponse as GetOrdersSettingsResponse, ecomV1OrdersSettings_universal_d_UpdateOrdersSettingsRequest as UpdateOrdersSettingsRequest, ecomV1OrdersSettings_universal_d_UpdateOrdersSettingsResponse as UpdateOrdersSettingsResponse, ecomV1OrdersSettings_universal_d_DeleteOrdersSettingsRequest as DeleteOrdersSettingsRequest, ecomV1OrdersSettings_universal_d_DeleteOrdersSettingsResponse as DeleteOrdersSettingsResponse, ecomV1OrdersSettings_universal_d_ListOrdersSettingsRequest as ListOrdersSettingsRequest, ecomV1OrdersSettings_universal_d_ListOrdersSettingsResponse as ListOrdersSettingsResponse, DomainEvent$6 as DomainEvent, DomainEventBodyOneOf$6 as DomainEventBodyOneOf, EntityCreatedEvent$6 as EntityCreatedEvent, RestoreInfo$6 as RestoreInfo, EntityUpdatedEvent$6 as EntityUpdatedEvent, EntityDeletedEvent$6 as EntityDeletedEvent, ActionEvent$6 as ActionEvent, MessageEnvelope$5 as MessageEnvelope, IdentificationData$6 as IdentificationData, IdentificationDataIdOneOf$6 as IdentificationDataIdOneOf, WebhookIdentityType$5 as WebhookIdentityType, ecomV1OrdersSettings_universal_d_getOrdersSettings as getOrdersSettings, ecomV1OrdersSettings_universal_d_updateOrdersSettings as updateOrdersSettings, ecomV1OrdersSettings_universal_d_UpdateOrdersSettingsOptions as UpdateOrdersSettingsOptions, }; } /** PickupLocation is the main entity of PickupLocations that can be used for lorem ipsum dolor */ interface PickupLocation { /** * PickupLocation ID * @readonly */ _id?: string | null; /** * ShippingRuleId from ecom * @internal * @deprecated ShippingRuleId from ecom * @replacedBy delivery_region_ids * @targetRemovalDate 2024-11-01 */ shippingRuleId?: string | null; /** * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision * @readonly */ revision?: string | null; /** * Represents the time this PickupLocation was created * @readonly */ _createdDate?: Date | null; /** * Represents the time this PickupLocation was last updated * @readonly */ _updatedDate?: Date | null; /** Pickup Location Name */ name?: string | null; /** Pickup Location Address */ address?: Address$3; /** Expected delivery time in free text. For example, `"3-5 business days"`. */ deliveryTime?: string | null; /** Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`. */ instructions?: string | null; /** inactive pickup locations should not be shown in checkout */ active?: boolean | null; /** at runtime for a given pickup input, up to one rate (price) should be returned in an option. If more than one rate is valid then we return the lowest one. */ rates?: ConditionalRates$1[]; /** This pickup location is active for the following delivery regions. */ deliveryRegionIds?: string[]; } /** Physical address */ interface Address$3 extends AddressStreetOneOf$1 { /** Street name and number. */ streetAddress?: StreetAddress$3; addressLine1?: string | null; /** Country code. */ country?: string | null; /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision?: string | null; city?: string | null; /** Zip/postal code. */ postalCode?: string | null; addressLine2?: string | null; /** * A string containing the full address of this location. * @internal */ formatted?: string | null; } /** @oneof */ interface AddressStreetOneOf$1 { /** Street name and number. */ streetAddress?: StreetAddress$3; addressLine?: string | null; } interface StreetAddress$3 { number?: string; name?: string; /** @internal */ apt?: string; } interface ConditionalRates$1 { /** * there is an AND logic between all the conditions. Empty conditions means true. * For example: weight > 0 and weight <= 10 */ conditions?: Condition$1[]; amount?: string; } interface Condition$1 { type?: ConditionType$1; /** * The value in respective to the condition type * Weight values should be in the same weight units of the store: KG / LB * Total price is according to the store currency * Quantity of items should be integers */ value?: string; operator?: LogicalOperator$1; } enum ConditionType$1 { UNKNOWN_TYPE = "UNKNOWN_TYPE", BY_TOTAL_WEIGHT = "BY_TOTAL_WEIGHT", BY_TOTAL_PRICE = "BY_TOTAL_PRICE", BY_TOTAL_QUANTITY = "BY_TOTAL_QUANTITY" } enum LogicalOperator$1 { UNKNOWN_LOGICAL_OPERATOR_TYPE = "UNKNOWN_LOGICAL_OPERATOR_TYPE", EQ = "EQ", GT = "GT", GTE = "GTE", LT = "LT", LTE = "LTE" } interface DiffmatokyPayload { left?: string; right?: string; compareChannel?: string; entityId?: string; errorInformation?: ErrorInformation; tags?: string[]; } interface ErrorInformation { stackTrace?: string; } interface CreatePickupLocationRequest { /** PickupLocation to be created */ pickupLocation: PickupLocation; } interface CreatePickupLocationResponse { /** The created PickupLocation */ pickupLocation?: PickupLocation; } interface GetPickupLocationRequest { /** Id of the PickupLocation to retrieve */ pickupLocationId: string; } interface GetPickupLocationResponse { /** The retrieved PickupLocation */ pickupLocation?: PickupLocation; } interface UpdatePickupLocationRequest { /** PickupLocation to be updated, may be partial */ pickupLocation: PickupLocation; /** * FieldMask for partial update * @internal */ fieldMask?: string[]; } interface UpdatePickupLocationResponse { /** The updated PickupLocation */ pickupLocation?: PickupLocation; } interface DeletePickupLocationRequest { /** Id of the PickupLocation to delete */ pickupLocationId: string; } interface DeletePickupLocationResponse { } interface QueryPickupLocationRequest { /** WQL expression */ query: QueryV2$1; } interface QueryV2$1 extends QueryV2PagingMethodOneOf$1 { /** Paging options to limit and skip the number of items. */ paging?: Paging$1; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$4; /** * Filter object. * * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Sort object. * * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sort?: Sorting$4[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ interface QueryV2PagingMethodOneOf$1 { /** Paging options to limit and skip the number of items. */ paging?: Paging$1; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$4; } interface Sorting$4 { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$4; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$4 { ASC = "ASC", DESC = "DESC" } interface Paging$1 { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CursorPaging$4 { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryPickupLocationResponse { /** The retrieved PickupLocations */ pickupLocations?: PickupLocation[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata$3; } interface CursorPagingMetadata$3 { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors$4; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; /** * Total number of items matching the filter. * Available only on the first page of *Search* results, not included in *Query* or *List* results. * If the Search results span multiple pages, the value of `total` will exceed the number of items returned on the first page. * @internal */ total?: number | null; } interface Cursors$4 { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface AddDeliveryRegionRequest { /** Id of the PickupLocation to add to the delivery region */ pickupLocationId: string; /** Id of the DeliveryRegion to add the PickupLocation to */ deliveryRegionId: string; /** Revision of the PickupLocation */ revision: string | null; } interface AddDeliveryRegionResponse { /** The updated PickupLocation */ pickupLocation?: PickupLocation; } interface RemoveDeliveryRegionRequest { /** Id of the PickupLocation to add to the delivery region */ pickupLocationId: string; /** Id of the DeliveryRegion to add the PickupLocation to */ deliveryRegionId: string; /** Revision of the PickupLocation */ revision: string | null; } interface RemoveDeliveryRegionResponse { /** The updated PickupLocation */ pickupLocation?: PickupLocation; } interface BulkCreatePickupLocationRequest { pickupLocations: PickupLocation[]; } interface BulkCreatePickupLocationResponse { pickupLocations?: PickupLocation[]; errors?: PickupLocationError[]; } interface PickupLocationError { _id?: string; error?: ApplicationError$2; } interface ApplicationError$2 { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkUpdatePickupLocationRequest { pickupLocations: PickupLocation[]; } interface BulkUpdatePickupLocationResponse { pickupLocations?: PickupLocation[]; errors?: PickupLocationError[]; } interface BulkDeletePickupLocationRequest { pickupLocationIds: string[]; } interface BulkDeletePickupLocationResponse { errors?: PickupLocationError[]; } interface Empty$3 { } interface DomainEvent$5 extends DomainEventBodyOneOf$5 { createdEvent?: EntityCreatedEvent$5; updatedEvent?: EntityUpdatedEvent$5; deletedEvent?: EntityDeletedEvent$5; actionEvent?: ActionEvent$5; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$5 { createdEvent?: EntityCreatedEvent$5; updatedEvent?: EntityUpdatedEvent$5; deletedEvent?: EntityDeletedEvent$5; actionEvent?: ActionEvent$5; } interface EntityCreatedEvent$5 { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$5; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$5 { deletedDate?: Date | null; } interface EntityUpdatedEvent$5 { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$5 { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$5 { bodyAsJson?: string; } interface MessageEnvelope$4 { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$5; /** Stringify payload. */ data?: string; } interface IdentificationData$5 extends IdentificationDataIdOneOf$5 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$4; } /** @oneof */ interface IdentificationDataIdOneOf$5 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$4 { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates a new PickupLocation * @param pickupLocation - PickupLocation to be created * @public * @documentationMaturity preview * @requiredField pickupLocation * @requiredField pickupLocation.address * @permissionId ECOM.PICKUP_LOCATION_CREATE * @adminMethod * @returns The created PickupLocation */ function createPickupLocation(pickupLocation: PickupLocation): Promise; /** * Get a PickupLocation by id * @param pickupLocationId - Id of the PickupLocation to retrieve * @public * @documentationMaturity preview * @requiredField pickupLocationId * @permissionId ECOM.PICKUP_LOCATION_READ * @adminMethod * @returns The retrieved PickupLocation */ function getPickupLocation(pickupLocationId: string): Promise; /** * Update a PickupLocation * Delivery regions cannot be updated using this method, use AddDeliveryRegion and RemoveDeliveryRegion instead. * @param _id - PickupLocation ID * @public * @documentationMaturity preview * @requiredField _id * @requiredField pickupLocation * @requiredField pickupLocation.revision * @permissionId ECOM.PICKUP_LOCATION_UPDATE * @adminMethod * @returns The updated PickupLocation */ function updatePickupLocation(_id: string | null, pickupLocation: UpdatePickupLocation, options?: UpdatePickupLocationOptions): Promise; interface UpdatePickupLocation { /** * PickupLocation ID * @readonly */ _id?: string | null; /** * ShippingRuleId from ecom * @internal * @deprecated ShippingRuleId from ecom * @replacedBy delivery_region_ids * @targetRemovalDate 2024-11-01 */ shippingRuleId?: string | null; /** * Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision * @readonly */ revision?: string | null; /** * Represents the time this PickupLocation was created * @readonly */ _createdDate?: Date | null; /** * Represents the time this PickupLocation was last updated * @readonly */ _updatedDate?: Date | null; /** Pickup Location Name */ name?: string | null; /** Pickup Location Address */ address?: Address$3; /** Expected delivery time in free text. For example, `"3-5 business days"`. */ deliveryTime?: string | null; /** Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`. */ instructions?: string | null; /** inactive pickup locations should not be shown in checkout */ active?: boolean | null; /** at runtime for a given pickup input, up to one rate (price) should be returned in an option. If more than one rate is valid then we return the lowest one. */ rates?: ConditionalRates$1[]; /** This pickup location is active for the following delivery regions. */ deliveryRegionIds?: string[]; } interface UpdatePickupLocationOptions { /** * FieldMask for partial update * @internal */ fieldMask?: string[]; } /** * Delete a PickupLocation * @param pickupLocationId - Id of the PickupLocation to delete * @public * @documentationMaturity preview * @requiredField pickupLocationId * @permissionId ECOM.PICKUP_LOCATION_DELETE * @adminMethod */ function deletePickupLocation(pickupLocationId: string): Promise; /** * Query PickupLocations using [WQL - Wix Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) * @public * @documentationMaturity preview * @permissionId ECOM.PICKUP_LOCATION_READ * @adminMethod */ function queryPickupLocation(): PickupLocationsQueryBuilder; interface QueryCursorResult$4 { cursors: Cursors$4; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface PickupLocationsQueryResult extends QueryCursorResult$4 { items: PickupLocation[]; query: PickupLocationsQueryBuilder; next: () => Promise; prev: () => Promise; } interface PickupLocationsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_createdDate' | '_updatedDate' | 'name' | 'address.country' | 'address.subdivision' | 'address.city' | 'deliveryRegionIds', value: any) => PickupLocationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_createdDate' | '_updatedDate' | 'name' | 'address.country' | 'address.subdivision' | 'address.city' | 'deliveryRegionIds', value: any) => PickupLocationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => PickupLocationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => PickupLocationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_createdDate' | '_updatedDate', value: any) => PickupLocationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => PickupLocationsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: 'name' | 'address.country' | 'address.subdivision' | 'address.city', value: string) => PickupLocationsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_createdDate' | '_updatedDate' | 'name' | 'address.country' | 'address.subdivision' | 'address.city' | 'deliveryRegionIds', value: any[]) => PickupLocationsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasAll: (propertyName: 'deliveryRegionIds', value: any[]) => PickupLocationsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_createdDate' | '_updatedDate' | 'name' | 'address.country' | 'address.subdivision' | 'address.city' | 'deliveryRegionIds', value: any) => PickupLocationsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_createdDate' | '_updatedDate' | 'name' | 'address.country' | 'address.subdivision' | 'address.city' | 'deliveryRegionIds', value: boolean) => PickupLocationsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => PickupLocationsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => PickupLocationsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Add a DeliveryRegion to a PickupLocation * @param pickupLocationId - Id of the PickupLocation to add to the delivery region * @param deliveryRegionId - Id of the DeliveryRegion to add the PickupLocation to * @public * @documentationMaturity preview * @requiredField deliveryRegionId * @requiredField options * @requiredField options.revision * @requiredField pickupLocationId * @permissionId ECOM.PICKUP_LOCATION_UPDATE * @adminMethod */ function addDeliveryRegion(pickupLocationId: string, deliveryRegionId: string, options: AddDeliveryRegionOptions): Promise; interface AddDeliveryRegionOptions { /** Revision of the PickupLocation */ revision: string | null; } /** * Remove a DeliveryRegion from a PickupLocation * @param pickupLocationId - Id of the PickupLocation to add to the delivery region * @param deliveryRegionId - Id of the DeliveryRegion to add the PickupLocation to * @public * @documentationMaturity preview * @requiredField deliveryRegionId * @requiredField options * @requiredField options.revision * @requiredField pickupLocationId * @permissionId ECOM.PICKUP_LOCATION_UPDATE * @adminMethod */ function removeDeliveryRegion(pickupLocationId: string, deliveryRegionId: string, options: RemoveDeliveryRegionOptions): Promise; interface RemoveDeliveryRegionOptions { /** Revision of the PickupLocation */ revision: string | null; } /** * Bulk Create for new PickupLocation * @public * @documentationMaturity preview * @requiredField pickupLocations * @requiredField pickupLocations.address * @permissionId ECOM.PICKUP_LOCATION_CREATE * @adminMethod */ function bulkCreatePickupLocation(pickupLocations: PickupLocation[]): Promise; /** * Update a PickupLocation * @public * @documentationMaturity preview * @requiredField pickupLocations * @requiredField pickupLocations._id * @requiredField pickupLocations.revision * @permissionId ECOM.PICKUP_LOCATION_UPDATE * @adminMethod */ function bulkUpdatePickupLocation(pickupLocations: PickupLocation[]): Promise; /** * Delete a PickupLocation * @public * @documentationMaturity preview * @requiredField pickupLocationIds * @permissionId ECOM.PICKUP_LOCATION_DELETE * @adminMethod */ function bulkDeletePickupLocation(pickupLocationIds: string[]): Promise; type ecomV1PickupLocation_universal_d_PickupLocation = PickupLocation; type ecomV1PickupLocation_universal_d_DiffmatokyPayload = DiffmatokyPayload; type ecomV1PickupLocation_universal_d_ErrorInformation = ErrorInformation; type ecomV1PickupLocation_universal_d_CreatePickupLocationRequest = CreatePickupLocationRequest; type ecomV1PickupLocation_universal_d_CreatePickupLocationResponse = CreatePickupLocationResponse; type ecomV1PickupLocation_universal_d_GetPickupLocationRequest = GetPickupLocationRequest; type ecomV1PickupLocation_universal_d_GetPickupLocationResponse = GetPickupLocationResponse; type ecomV1PickupLocation_universal_d_UpdatePickupLocationRequest = UpdatePickupLocationRequest; type ecomV1PickupLocation_universal_d_UpdatePickupLocationResponse = UpdatePickupLocationResponse; type ecomV1PickupLocation_universal_d_DeletePickupLocationRequest = DeletePickupLocationRequest; type ecomV1PickupLocation_universal_d_DeletePickupLocationResponse = DeletePickupLocationResponse; type ecomV1PickupLocation_universal_d_QueryPickupLocationRequest = QueryPickupLocationRequest; type ecomV1PickupLocation_universal_d_QueryPickupLocationResponse = QueryPickupLocationResponse; type ecomV1PickupLocation_universal_d_AddDeliveryRegionRequest = AddDeliveryRegionRequest; type ecomV1PickupLocation_universal_d_AddDeliveryRegionResponse = AddDeliveryRegionResponse; type ecomV1PickupLocation_universal_d_RemoveDeliveryRegionRequest = RemoveDeliveryRegionRequest; type ecomV1PickupLocation_universal_d_RemoveDeliveryRegionResponse = RemoveDeliveryRegionResponse; type ecomV1PickupLocation_universal_d_BulkCreatePickupLocationRequest = BulkCreatePickupLocationRequest; type ecomV1PickupLocation_universal_d_BulkCreatePickupLocationResponse = BulkCreatePickupLocationResponse; type ecomV1PickupLocation_universal_d_PickupLocationError = PickupLocationError; type ecomV1PickupLocation_universal_d_BulkUpdatePickupLocationRequest = BulkUpdatePickupLocationRequest; type ecomV1PickupLocation_universal_d_BulkUpdatePickupLocationResponse = BulkUpdatePickupLocationResponse; type ecomV1PickupLocation_universal_d_BulkDeletePickupLocationRequest = BulkDeletePickupLocationRequest; type ecomV1PickupLocation_universal_d_BulkDeletePickupLocationResponse = BulkDeletePickupLocationResponse; const ecomV1PickupLocation_universal_d_createPickupLocation: typeof createPickupLocation; const ecomV1PickupLocation_universal_d_getPickupLocation: typeof getPickupLocation; const ecomV1PickupLocation_universal_d_updatePickupLocation: typeof updatePickupLocation; type ecomV1PickupLocation_universal_d_UpdatePickupLocation = UpdatePickupLocation; type ecomV1PickupLocation_universal_d_UpdatePickupLocationOptions = UpdatePickupLocationOptions; const ecomV1PickupLocation_universal_d_deletePickupLocation: typeof deletePickupLocation; const ecomV1PickupLocation_universal_d_queryPickupLocation: typeof queryPickupLocation; type ecomV1PickupLocation_universal_d_PickupLocationsQueryResult = PickupLocationsQueryResult; type ecomV1PickupLocation_universal_d_PickupLocationsQueryBuilder = PickupLocationsQueryBuilder; const ecomV1PickupLocation_universal_d_addDeliveryRegion: typeof addDeliveryRegion; type ecomV1PickupLocation_universal_d_AddDeliveryRegionOptions = AddDeliveryRegionOptions; const ecomV1PickupLocation_universal_d_removeDeliveryRegion: typeof removeDeliveryRegion; type ecomV1PickupLocation_universal_d_RemoveDeliveryRegionOptions = RemoveDeliveryRegionOptions; const ecomV1PickupLocation_universal_d_bulkCreatePickupLocation: typeof bulkCreatePickupLocation; const ecomV1PickupLocation_universal_d_bulkUpdatePickupLocation: typeof bulkUpdatePickupLocation; const ecomV1PickupLocation_universal_d_bulkDeletePickupLocation: typeof bulkDeletePickupLocation; namespace ecomV1PickupLocation_universal_d { export { ecomV1PickupLocation_universal_d_PickupLocation as PickupLocation, Address$3 as Address, AddressStreetOneOf$1 as AddressStreetOneOf, StreetAddress$3 as StreetAddress, ConditionalRates$1 as ConditionalRates, Condition$1 as Condition, ConditionType$1 as ConditionType, LogicalOperator$1 as LogicalOperator, ecomV1PickupLocation_universal_d_DiffmatokyPayload as DiffmatokyPayload, ecomV1PickupLocation_universal_d_ErrorInformation as ErrorInformation, ecomV1PickupLocation_universal_d_CreatePickupLocationRequest as CreatePickupLocationRequest, ecomV1PickupLocation_universal_d_CreatePickupLocationResponse as CreatePickupLocationResponse, ecomV1PickupLocation_universal_d_GetPickupLocationRequest as GetPickupLocationRequest, ecomV1PickupLocation_universal_d_GetPickupLocationResponse as GetPickupLocationResponse, ecomV1PickupLocation_universal_d_UpdatePickupLocationRequest as UpdatePickupLocationRequest, ecomV1PickupLocation_universal_d_UpdatePickupLocationResponse as UpdatePickupLocationResponse, ecomV1PickupLocation_universal_d_DeletePickupLocationRequest as DeletePickupLocationRequest, ecomV1PickupLocation_universal_d_DeletePickupLocationResponse as DeletePickupLocationResponse, ecomV1PickupLocation_universal_d_QueryPickupLocationRequest as QueryPickupLocationRequest, QueryV2$1 as QueryV2, QueryV2PagingMethodOneOf$1 as QueryV2PagingMethodOneOf, Sorting$4 as Sorting, SortOrder$4 as SortOrder, Paging$1 as Paging, CursorPaging$4 as CursorPaging, ecomV1PickupLocation_universal_d_QueryPickupLocationResponse as QueryPickupLocationResponse, CursorPagingMetadata$3 as CursorPagingMetadata, Cursors$4 as Cursors, ecomV1PickupLocation_universal_d_AddDeliveryRegionRequest as AddDeliveryRegionRequest, ecomV1PickupLocation_universal_d_AddDeliveryRegionResponse as AddDeliveryRegionResponse, ecomV1PickupLocation_universal_d_RemoveDeliveryRegionRequest as RemoveDeliveryRegionRequest, ecomV1PickupLocation_universal_d_RemoveDeliveryRegionResponse as RemoveDeliveryRegionResponse, ecomV1PickupLocation_universal_d_BulkCreatePickupLocationRequest as BulkCreatePickupLocationRequest, ecomV1PickupLocation_universal_d_BulkCreatePickupLocationResponse as BulkCreatePickupLocationResponse, ecomV1PickupLocation_universal_d_PickupLocationError as PickupLocationError, ApplicationError$2 as ApplicationError, ecomV1PickupLocation_universal_d_BulkUpdatePickupLocationRequest as BulkUpdatePickupLocationRequest, ecomV1PickupLocation_universal_d_BulkUpdatePickupLocationResponse as BulkUpdatePickupLocationResponse, ecomV1PickupLocation_universal_d_BulkDeletePickupLocationRequest as BulkDeletePickupLocationRequest, ecomV1PickupLocation_universal_d_BulkDeletePickupLocationResponse as BulkDeletePickupLocationResponse, Empty$3 as Empty, DomainEvent$5 as DomainEvent, DomainEventBodyOneOf$5 as DomainEventBodyOneOf, EntityCreatedEvent$5 as EntityCreatedEvent, RestoreInfo$5 as RestoreInfo, EntityUpdatedEvent$5 as EntityUpdatedEvent, EntityDeletedEvent$5 as EntityDeletedEvent, ActionEvent$5 as ActionEvent, MessageEnvelope$4 as MessageEnvelope, IdentificationData$5 as IdentificationData, IdentificationDataIdOneOf$5 as IdentificationDataIdOneOf, WebhookIdentityType$4 as WebhookIdentityType, ecomV1PickupLocation_universal_d_createPickupLocation as createPickupLocation, ecomV1PickupLocation_universal_d_getPickupLocation as getPickupLocation, ecomV1PickupLocation_universal_d_updatePickupLocation as updatePickupLocation, ecomV1PickupLocation_universal_d_UpdatePickupLocation as UpdatePickupLocation, ecomV1PickupLocation_universal_d_UpdatePickupLocationOptions as UpdatePickupLocationOptions, ecomV1PickupLocation_universal_d_deletePickupLocation as deletePickupLocation, ecomV1PickupLocation_universal_d_queryPickupLocation as queryPickupLocation, ecomV1PickupLocation_universal_d_PickupLocationsQueryResult as PickupLocationsQueryResult, ecomV1PickupLocation_universal_d_PickupLocationsQueryBuilder as PickupLocationsQueryBuilder, ecomV1PickupLocation_universal_d_addDeliveryRegion as addDeliveryRegion, ecomV1PickupLocation_universal_d_AddDeliveryRegionOptions as AddDeliveryRegionOptions, ecomV1PickupLocation_universal_d_removeDeliveryRegion as removeDeliveryRegion, ecomV1PickupLocation_universal_d_RemoveDeliveryRegionOptions as RemoveDeliveryRegionOptions, ecomV1PickupLocation_universal_d_bulkCreatePickupLocation as bulkCreatePickupLocation, ecomV1PickupLocation_universal_d_bulkUpdatePickupLocation as bulkUpdatePickupLocation, ecomV1PickupLocation_universal_d_bulkDeletePickupLocation as bulkDeletePickupLocation, }; } interface ShippingOption$1 { /** * ShippingOption ID. * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the ShippingOption is updated. * To prevent conflicting changes, * the current revision must be passed when updating the ShippingOption. * * Ignored when creating a ShippingOption. * @readonly */ revision?: string | null; /** * Date and time the ShippingOption was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the ShippingOption was last updated. * @readonly */ _updatedDate?: Date | null; /** Associated delivery region id. */ deliveryRegionId?: string; /** Delivery option configured for the ShippingOption */ title?: string | null; estimateDeliveryTime?: string | null; /** at runtime for a given shipment input, up to one rate (price) should be returned in an option. If more than one rate is valid then we return the lowest one. */ rates?: ConditionalRates[]; /** Data Extensions */ extendedFields?: ExtendedFields$2; } interface ConditionalRates { /** * there is an AND logic between all the conditions. Empty conditions means true. * For example: weight > 0 and weight <= 10 */ conditions?: Condition[]; amount?: string; } interface Condition { type?: ConditionType; /** * The value in respective to the condition type * Weight values should be in the same weight units of the store: KG / LB * Total price is according to the store currency * Quantity of items should be integers */ value?: string; operator?: LogicalOperator; } enum ConditionType { UNKNOWN_TYPE = "UNKNOWN_TYPE", BY_TOTAL_WEIGHT = "BY_TOTAL_WEIGHT", BY_TOTAL_PRICE = "BY_TOTAL_PRICE", BY_TOTAL_QUANTITY = "BY_TOTAL_QUANTITY" } enum LogicalOperator { UNKNOWN_LOGICAL_OPERATOR_TYPE = "UNKNOWN_LOGICAL_OPERATOR_TYPE", EQ = "EQ", GT = "GT", GTE = "GTE", LT = "LT", LTE = "LTE" } interface ExtendedFields$2 { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface CreateShippingOptionRequest { /** ShippingOption to be created. */ shippingOption: ShippingOption$1; } interface CreateShippingOptionResponse { /** The created ShippingOption. */ shippingOption?: ShippingOption$1; } interface GetShippingOptionRequest { /** ID of the ShippingOption to retrieve. */ shippingOptionId: string; } interface GetShippingOptionResponse { /** The requested ShippingOption. */ shippingOption?: ShippingOption$1; } interface UpdateShippingOptionRequest { /** ShippingOption to be updated, may be partial. */ shippingOption: ShippingOption$1; /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } interface UpdateShippingOptionResponse { /** Updated ShippingOption. */ shippingOption?: ShippingOption$1; } interface DeleteShippingOptionRequest { /** Id of the ShippingOption to delete. */ shippingOptionId: string; } interface DeleteShippingOptionResponse { } interface QueryShippingOptionsRequest { /** WQL expression. */ query?: CursorQuery$2; } interface CursorQuery$2 extends CursorQueryPagingMethodOneOf$2 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$3; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting$3[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf$2 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$3; } interface Sorting$3 { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$3; } enum SortOrder$3 { ASC = "ASC", DESC = "DESC" } interface CursorPaging$3 { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryShippingOptionsResponse { /** List of ShippingOptions. */ shippingOptions?: ShippingOption$1[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata$2; } interface CursorPagingMetadata$2 { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors$3; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors$3 { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface UpdateExtendedFieldsRequest$1 { /** ID of the entity to update. */ _id: string; /** Identifier for the app whose extended fields are being updated. */ namespace: string; /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } interface UpdateExtendedFieldsResponse$1 { /** Updated ShippingOption. */ shippingOption?: ShippingOption$1; } interface DomainEvent$4 extends DomainEventBodyOneOf$4 { createdEvent?: EntityCreatedEvent$4; updatedEvent?: EntityUpdatedEvent$4; deletedEvent?: EntityDeletedEvent$4; actionEvent?: ActionEvent$4; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$4 { createdEvent?: EntityCreatedEvent$4; updatedEvent?: EntityUpdatedEvent$4; deletedEvent?: EntityDeletedEvent$4; actionEvent?: ActionEvent$4; } interface EntityCreatedEvent$4 { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$4; } interface RestoreInfo$4 { deletedDate?: Date | null; } interface EntityUpdatedEvent$4 { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; } interface EntityDeletedEvent$4 { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; } interface ActionEvent$4 { bodyAsJson?: string; } interface Empty$2 { } interface MessageEnvelope$3 { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$4; /** Stringify payload. */ data?: string; } interface IdentificationData$4 extends IdentificationDataIdOneOf$4 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$3; } /** @oneof */ interface IdentificationDataIdOneOf$4 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$3 { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates a ShippingOption. * * The request body must include shipping option and delivery region associated to. * @param shippingOption - ShippingOption to be created. * @public * @documentationMaturity preview * @requiredField shippingOption * @permissionId ECOM.SHIPPING_OPTION_CREATE * @adminMethod * @returns The created ShippingOption. */ function createShippingOption(shippingOption: ShippingOption$1): Promise; /** * Retrieves a ShippingOption. * @param shippingOptionId - ID of the ShippingOption to retrieve. * @public * @documentationMaturity preview * @requiredField shippingOptionId * @permissionId ECOM.SHIPPING_OPTION_READ * @adminMethod * @returns The requested ShippingOption. */ function getShippingOption(shippingOptionId: string): Promise; /** * Updates a ShippingOption. * * * Each time the ShippingOption is updated, * `revision` increments by 1. * The current `revision` must be passed when updating the ShippingOption. * This ensures you're working with the latest ShippingOption * and prevents unintended overwrites. * @param _id - ShippingOption ID. * @public * @documentationMaturity preview * @requiredField _id * @requiredField shippingOption * @requiredField shippingOption.revision * @permissionId ECOM.SHIPPING_OPTION_UPDATE * @adminMethod * @returns Updated ShippingOption. */ function updateShippingOption(_id: string | null, shippingOption: UpdateShippingOption, options?: UpdateShippingOptionOptions): Promise; interface UpdateShippingOption { /** * ShippingOption ID. * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the ShippingOption is updated. * To prevent conflicting changes, * the current revision must be passed when updating the ShippingOption. * * Ignored when creating a ShippingOption. * @readonly */ revision?: string | null; /** * Date and time the ShippingOption was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the ShippingOption was last updated. * @readonly */ _updatedDate?: Date | null; /** Associated delivery region id. */ deliveryRegionId?: string; /** Delivery option configured for the ShippingOption */ title?: string | null; estimateDeliveryTime?: string | null; /** at runtime for a given shipment input, up to one rate (price) should be returned in an option. If more than one rate is valid then we return the lowest one. */ rates?: ConditionalRates[]; /** Data Extensions */ extendedFields?: ExtendedFields$2; } interface UpdateShippingOptionOptions { /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } /** * Deletes a ShippingOption. * Deleting a ShippingOption permanently removes them from the ShippingOption List. * @param shippingOptionId - Id of the ShippingOption to delete. * @public * @documentationMaturity preview * @requiredField shippingOptionId * @permissionId ECOM.SHIPPING_OPTION_DELETE * @adminMethod */ function deleteShippingOption(shippingOptionId: string): Promise; /** * Retrieves a list of ShippingOptions, given the provided [paging, filtering, and sorting][1]. * * Up to 1,000 ShippingOptions can be returned per request. * * To learn how to query ShippingOptions, see [API Query Language][2]. * * [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging * [2]: https://dev.wix.com/api/rest/getting-started/api-query-language * @public * @documentationMaturity preview * @permissionId ECOM.SHIPPING_OPTION_READ * @adminMethod */ function queryShippingOptions(): ShippingOptionsQueryBuilder; interface QueryCursorResult$3 { cursors: Cursors$3; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface ShippingOptionsQueryResult extends QueryCursorResult$3 { items: ShippingOption$1[]; query: ShippingOptionsQueryBuilder; next: () => Promise; prev: () => Promise; } interface ShippingOptionsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'deliveryRegionId', value: any) => ShippingOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'deliveryRegionId', value: any) => ShippingOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'deliveryRegionId', value: string) => ShippingOptionsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'deliveryRegionId', value: any[]) => ShippingOptionsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'deliveryRegionId', value: any) => ShippingOptionsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'deliveryRegionId', value: boolean) => ShippingOptionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | 'deliveryRegionId'>) => ShippingOptionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | 'deliveryRegionId'>) => ShippingOptionsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => ShippingOptionsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => ShippingOptionsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Updates extended fields of a ShippingOption without incrementing revision * @param _id - ID of the entity to update. * @param namespace - Identifier for the app whose extended fields are being updated. * @public * @documentationMaturity preview * @requiredField _id * @requiredField namespace * @requiredField options * @requiredField options.namespaceData * @permissionId ECOM.SHIPPING_OPTION_UPDATE * @adminMethod */ function updateExtendedFields$1(_id: string, namespace: string, options: UpdateExtendedFieldsOptions$1): Promise; interface UpdateExtendedFieldsOptions$1 { /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } type ecomV1ShippingOption_universal_d_ConditionalRates = ConditionalRates; type ecomV1ShippingOption_universal_d_Condition = Condition; type ecomV1ShippingOption_universal_d_ConditionType = ConditionType; const ecomV1ShippingOption_universal_d_ConditionType: typeof ConditionType; type ecomV1ShippingOption_universal_d_LogicalOperator = LogicalOperator; const ecomV1ShippingOption_universal_d_LogicalOperator: typeof LogicalOperator; type ecomV1ShippingOption_universal_d_CreateShippingOptionRequest = CreateShippingOptionRequest; type ecomV1ShippingOption_universal_d_CreateShippingOptionResponse = CreateShippingOptionResponse; type ecomV1ShippingOption_universal_d_GetShippingOptionRequest = GetShippingOptionRequest; type ecomV1ShippingOption_universal_d_GetShippingOptionResponse = GetShippingOptionResponse; type ecomV1ShippingOption_universal_d_UpdateShippingOptionRequest = UpdateShippingOptionRequest; type ecomV1ShippingOption_universal_d_UpdateShippingOptionResponse = UpdateShippingOptionResponse; type ecomV1ShippingOption_universal_d_DeleteShippingOptionRequest = DeleteShippingOptionRequest; type ecomV1ShippingOption_universal_d_DeleteShippingOptionResponse = DeleteShippingOptionResponse; type ecomV1ShippingOption_universal_d_QueryShippingOptionsRequest = QueryShippingOptionsRequest; type ecomV1ShippingOption_universal_d_QueryShippingOptionsResponse = QueryShippingOptionsResponse; const ecomV1ShippingOption_universal_d_createShippingOption: typeof createShippingOption; const ecomV1ShippingOption_universal_d_getShippingOption: typeof getShippingOption; const ecomV1ShippingOption_universal_d_updateShippingOption: typeof updateShippingOption; type ecomV1ShippingOption_universal_d_UpdateShippingOption = UpdateShippingOption; type ecomV1ShippingOption_universal_d_UpdateShippingOptionOptions = UpdateShippingOptionOptions; const ecomV1ShippingOption_universal_d_deleteShippingOption: typeof deleteShippingOption; const ecomV1ShippingOption_universal_d_queryShippingOptions: typeof queryShippingOptions; type ecomV1ShippingOption_universal_d_ShippingOptionsQueryResult = ShippingOptionsQueryResult; type ecomV1ShippingOption_universal_d_ShippingOptionsQueryBuilder = ShippingOptionsQueryBuilder; namespace ecomV1ShippingOption_universal_d { export { ShippingOption$1 as ShippingOption, ecomV1ShippingOption_universal_d_ConditionalRates as ConditionalRates, ecomV1ShippingOption_universal_d_Condition as Condition, ecomV1ShippingOption_universal_d_ConditionType as ConditionType, ecomV1ShippingOption_universal_d_LogicalOperator as LogicalOperator, ExtendedFields$2 as ExtendedFields, ecomV1ShippingOption_universal_d_CreateShippingOptionRequest as CreateShippingOptionRequest, ecomV1ShippingOption_universal_d_CreateShippingOptionResponse as CreateShippingOptionResponse, ecomV1ShippingOption_universal_d_GetShippingOptionRequest as GetShippingOptionRequest, ecomV1ShippingOption_universal_d_GetShippingOptionResponse as GetShippingOptionResponse, ecomV1ShippingOption_universal_d_UpdateShippingOptionRequest as UpdateShippingOptionRequest, ecomV1ShippingOption_universal_d_UpdateShippingOptionResponse as UpdateShippingOptionResponse, ecomV1ShippingOption_universal_d_DeleteShippingOptionRequest as DeleteShippingOptionRequest, ecomV1ShippingOption_universal_d_DeleteShippingOptionResponse as DeleteShippingOptionResponse, ecomV1ShippingOption_universal_d_QueryShippingOptionsRequest as QueryShippingOptionsRequest, CursorQuery$2 as CursorQuery, CursorQueryPagingMethodOneOf$2 as CursorQueryPagingMethodOneOf, Sorting$3 as Sorting, SortOrder$3 as SortOrder, CursorPaging$3 as CursorPaging, ecomV1ShippingOption_universal_d_QueryShippingOptionsResponse as QueryShippingOptionsResponse, CursorPagingMetadata$2 as CursorPagingMetadata, Cursors$3 as Cursors, UpdateExtendedFieldsRequest$1 as UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse$1 as UpdateExtendedFieldsResponse, DomainEvent$4 as DomainEvent, DomainEventBodyOneOf$4 as DomainEventBodyOneOf, EntityCreatedEvent$4 as EntityCreatedEvent, RestoreInfo$4 as RestoreInfo, EntityUpdatedEvent$4 as EntityUpdatedEvent, EntityDeletedEvent$4 as EntityDeletedEvent, ActionEvent$4 as ActionEvent, Empty$2 as Empty, MessageEnvelope$3 as MessageEnvelope, IdentificationData$4 as IdentificationData, IdentificationDataIdOneOf$4 as IdentificationDataIdOneOf, WebhookIdentityType$3 as WebhookIdentityType, ecomV1ShippingOption_universal_d_createShippingOption as createShippingOption, ecomV1ShippingOption_universal_d_getShippingOption as getShippingOption, ecomV1ShippingOption_universal_d_updateShippingOption as updateShippingOption, ecomV1ShippingOption_universal_d_UpdateShippingOption as UpdateShippingOption, ecomV1ShippingOption_universal_d_UpdateShippingOptionOptions as UpdateShippingOptionOptions, ecomV1ShippingOption_universal_d_deleteShippingOption as deleteShippingOption, ecomV1ShippingOption_universal_d_queryShippingOptions as queryShippingOptions, ecomV1ShippingOption_universal_d_ShippingOptionsQueryResult as ShippingOptionsQueryResult, ecomV1ShippingOption_universal_d_ShippingOptionsQueryBuilder as ShippingOptionsQueryBuilder, updateExtendedFields$1 as updateExtendedFields, UpdateExtendedFieldsOptions$1 as UpdateExtendedFieldsOptions, }; } interface ShippoConfiguration { /** * ShippoConfiguration ID. * @readonly */ _id?: string | null; /** @readonly */ revision?: string | null; /** * Date and time the ShippoConfiguration was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the ShippoConfiguration was last updated. * @readonly */ _updatedDate?: Date | null; /** Associated delivery region ID. */ deliveryRegionId?: string | null; /** Settings of USPS domestic services. */ domesticServices?: DomesticServiceSettings[]; /** Settings of USPS international services. */ internationalServices?: InternationalServiceSettings[]; /** Package type. */ packageType?: PackageType; /** Package details. */ packageDetails?: PackageDetails; /** Location ID from OS location service. */ osLocationId?: string | null; /** * Ship from address materialized from OS location. * @readonly */ shipFromAddress?: Address$2; /** Backup weight. */ backupWeight?: string | null; /** Data extensions. */ extendedFields?: ExtendedFields$1; } interface DomesticServiceSettings { /** USPS domestic service. */ service?: DomesticService; /** Service settings. */ serviceSettings?: ServiceSettings; } enum DomesticService { UNKNOWN_DOMESTIC_SERVICE = "UNKNOWN_DOMESTIC_SERVICE", GROUND_ADVANTAGE = "GROUND_ADVANTAGE", PRIORITY_MAIL = "PRIORITY_MAIL", PRIORITY_MAIL_EXPRESS = "PRIORITY_MAIL_EXPRESS" } interface ServiceSettings { /** Estimated delivery time. */ estimatedDeliveryTime?: string | null; /** Handling fee. */ handlingFee?: HandlingFee; /** Amount above which free delivery is offered. */ freeDeliveryMinimumAmount?: string | null; } interface HandlingFee { /** Value that will be used to calculate the fee. For example, percentage fee with value 5% to calculate the fee. */ value?: string; /** How to calculate the fee: fixed amount or by percentage. */ calculationType?: CalculationType; } enum CalculationType { UNKNOWN_TYPE = "UNKNOWN_TYPE", FIXED = "FIXED", PERCENTAGE = "PERCENTAGE" } interface InternationalServiceSettings { /** USPS international service. */ service?: InternationalService; /** Service settings. */ serviceSettings?: ServiceSettings; } enum InternationalService { UNKNOWN_INTERNATIONAL_SERVICE = "UNKNOWN_INTERNATIONAL_SERVICE", FIRST_CLASS_PACKAGE_INTERNATIONAL = "FIRST_CLASS_PACKAGE_INTERNATIONAL", PRIORITY_MAIL_INTERNATIONAL = "PRIORITY_MAIL_INTERNATIONAL", PRIORITY_MAIL_EXPRESS_INTERNATIONAL = "PRIORITY_MAIL_EXPRESS_INTERNATIONAL" } enum PackageType { UNKNOWN_PACKAGE_TYPE = "UNKNOWN_PACKAGE_TYPE", CUSTOM = "CUSTOM", FLAT_RATE_ENVELOPE = "FLAT_RATE_ENVELOPE", PADDED_FLAT_RATE_ENVELOPE = "PADDED_FLAT_RATE_ENVELOPE", SMALL_FLAT_RATE_BOX = "SMALL_FLAT_RATE_BOX", MEDIUM_FLAT_RATE_BOX_1 = "MEDIUM_FLAT_RATE_BOX_1", MEDIUM_FLAT_RATE_BOX_2 = "MEDIUM_FLAT_RATE_BOX_2", LARGE_FLAT_RATE_BOX = "LARGE_FLAT_RATE_BOX" } interface PackageDetails { /** * Package name. Must be set when package type is CUSTOM. * For other package types, it is read-only, and an exception will be thrown * if it set when creating a ShippoConfiguration. */ name?: string | null; /** * Package dimensions. Can only be set when package type is CUSTOM. * For other package types, it is read-only, and an exception will be thrown * if it set when creating a ShippoConfiguration. */ dimensions?: PackageDimensions; /** * Maximum number of products. Must be set when package type is NOT CUSTOM. * Otherwise, if the package type is CUSTOM, this field cannot be set and an * exception will be thrown if it is set when creating a ShippoConfiguration. */ maxNumberOfProducts?: string | null; } interface PackageDimensions { /** Package length. */ length?: string; /** Package width. */ width?: string; /** Package height. */ height?: string; } /** Physical address */ interface Address$2 { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress$2; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** @internal */ location?: AddressLocation$2; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } interface StreetAddress$2 { /** Street number. */ number?: string; /** Street name. */ name?: string; /** * Apartment number. * @internal */ apt?: string; /** * Optional address line 1 * @internal */ formattedAddressLine?: string | null; } interface AddressLocation$2 { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface ExtendedFields$1 { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface CreateShippoConfigurationRequest { /** ShippoConfiguration to be created. */ shippoConfiguration: ShippoConfiguration; backupRate?: string | null; } interface CreateShippoConfigurationResponse { /** The created ShippoConfiguration. */ shippoConfiguration?: ShippoConfiguration; } interface GetShippoConfigurationRequest { /** ID of the ShippoConfiguration to retrieve. */ shippoConfigurationId: string; } interface GetShippoConfigurationResponse { /** The requested ShippoConfiguration. */ shippoConfiguration?: ShippoConfiguration; } interface UpdateShippoConfigurationRequest { /** ShippoConfiguration to be updated, may be partial. */ shippoConfiguration: ShippoConfiguration; /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } interface UpdateShippoConfigurationResponse { /** Updated ShippoConfiguration. */ shippoConfiguration?: ShippoConfiguration; } interface DeleteShippoConfigurationRequest { /** ID of the ShippoConfiguration to delete. */ shippoConfigurationId: string; } interface DeleteShippoConfigurationResponse { } interface QueryShippoConfigurationsRequest { /** WQL expression. */ query?: CursorQuery$1; } interface CursorQuery$1 extends CursorQueryPagingMethodOneOf$1 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$2; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting$2[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf$1 { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$2; } interface Sorting$2 { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$2; } enum SortOrder$2 { ASC = "ASC", DESC = "DESC" } interface CursorPaging$2 { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryShippoConfigurationsResponse { /** List of ShippoConfigurations. */ shippoConfigurations?: ShippoConfiguration[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata$1; } interface CursorPagingMetadata$1 { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors$2; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors$2 { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface UpdateExtendedFieldsRequest { /** ID of the entity to update. */ _id: string; /** Identifier for the app whose extended fields are being updated. */ namespace: string; /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } interface UpdateExtendedFieldsResponse { /** Updated ShippoConfiguration. */ shippoConfiguration?: ShippoConfiguration; } interface DomainEvent$3 extends DomainEventBodyOneOf$3 { createdEvent?: EntityCreatedEvent$3; updatedEvent?: EntityUpdatedEvent$3; deletedEvent?: EntityDeletedEvent$3; actionEvent?: ActionEvent$3; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$3 { createdEvent?: EntityCreatedEvent$3; updatedEvent?: EntityUpdatedEvent$3; deletedEvent?: EntityDeletedEvent$3; actionEvent?: ActionEvent$3; } interface EntityCreatedEvent$3 { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$3; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$3 { deletedDate?: Date | null; } interface EntityUpdatedEvent$3 { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$3 { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$3 { bodyAsJson?: string; } interface Empty$1 { } interface MessageEnvelope$2 { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$3; /** Stringify payload. */ data?: string; } interface IdentificationData$3 extends IdentificationDataIdOneOf$3 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$2; } /** @oneof */ interface IdentificationDataIdOneOf$3 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$2 { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates a ShippoConfiguration. * @param shippoConfiguration - ShippoConfiguration to be created. * @public * @documentationMaturity preview * @requiredField shippoConfiguration * @requiredField shippoConfiguration.deliveryRegionId * @requiredField shippoConfiguration.osLocationId * @requiredField shippoConfiguration.packageDetails * @requiredField shippoConfiguration.packageDetails.dimensions.height * @requiredField shippoConfiguration.packageDetails.dimensions.length * @requiredField shippoConfiguration.packageDetails.dimensions.width * @requiredField shippoConfiguration.packageType * @permissionId ECOM.SHIPPO_CONFIGURATION_CREATE * @adminMethod * @returns The created ShippoConfiguration. */ function createShippoConfiguration(shippoConfiguration: ShippoConfiguration, options?: CreateShippoConfigurationOptions): Promise; interface CreateShippoConfigurationOptions { backupRate?: string | null; } /** * Retrieves a ShippoConfiguration. * @param shippoConfigurationId - ID of the ShippoConfiguration to retrieve. * @public * @documentationMaturity preview * @requiredField shippoConfigurationId * @permissionId ECOM.SHIPPO_CONFIGURATION_READ * @adminMethod * @returns The requested ShippoConfiguration. */ function getShippoConfiguration(shippoConfigurationId: string): Promise; /** * Updates a ShippoConfiguration. * @param _id - ShippoConfiguration ID. * @public * @documentationMaturity preview * @requiredField _id * @requiredField shippoConfiguration * @requiredField shippoConfiguration.revision * @permissionId ECOM.SHIPPO_CONFIGURATION_UPDATE * @adminMethod * @returns Updated ShippoConfiguration. */ function updateShippoConfiguration(_id: string | null, shippoConfiguration: UpdateShippoConfiguration, options?: UpdateShippoConfigurationOptions): Promise; interface UpdateShippoConfiguration { /** * ShippoConfiguration ID. * @readonly */ _id?: string | null; /** @readonly */ revision?: string | null; /** * Date and time the ShippoConfiguration was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the ShippoConfiguration was last updated. * @readonly */ _updatedDate?: Date | null; /** Associated delivery region ID. */ deliveryRegionId?: string | null; /** Settings of USPS domestic services. */ domesticServices?: DomesticServiceSettings[]; /** Settings of USPS international services. */ internationalServices?: InternationalServiceSettings[]; /** Package type. */ packageType?: PackageType; /** Package details. */ packageDetails?: PackageDetails; /** Location ID from OS location service. */ osLocationId?: string | null; /** * Ship from address materialized from OS location. * @readonly */ shipFromAddress?: Address$2; /** Backup weight. */ backupWeight?: string | null; /** Data extensions. */ extendedFields?: ExtendedFields$1; } interface UpdateShippoConfigurationOptions { /** * Set of fields to update. * * Fields that aren't included in `fieldMask.paths` are ignored. * @internal */ fieldMask?: string[]; } /** * Deletes a ShippoConfiguration. * @param shippoConfigurationId - ID of the ShippoConfiguration to delete. * @public * @documentationMaturity preview * @requiredField shippoConfigurationId * @permissionId ECOM.SHIPPO_CONFIGURATION_DELETE * @adminMethod */ function deleteShippoConfiguration(shippoConfigurationId: string): Promise; /** * Retrieves a list of ShippoConfigurations, given the provided [paging, filtering, and sorting][1]. * * Up to 1,000 ShippoConfigurations can be returned per request. * * To learn how to query ShippoConfigurations, see [API Query Language][2]. * * [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging * [2]: https://dev.wix.com/api/rest/getting-started/api-query-language * @public * @documentationMaturity preview * @permissionId ECOM.SHIPPO_CONFIGURATION_READ * @adminMethod */ function queryShippoConfigurations(): ShippoConfigurationsQueryBuilder; interface QueryCursorResult$2 { cursors: Cursors$2; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface ShippoConfigurationsQueryResult extends QueryCursorResult$2 { items: ShippoConfiguration[]; query: ShippoConfigurationsQueryBuilder; next: () => Promise; prev: () => Promise; } interface ShippoConfigurationsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'deliveryRegionId', value: any) => ShippoConfigurationsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'deliveryRegionId', value: any) => ShippoConfigurationsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'deliveryRegionId', value: string) => ShippoConfigurationsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'deliveryRegionId', value: any[]) => ShippoConfigurationsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'deliveryRegionId', value: any) => ShippoConfigurationsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'deliveryRegionId', value: boolean) => ShippoConfigurationsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | 'deliveryRegionId'>) => ShippoConfigurationsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | 'deliveryRegionId'>) => ShippoConfigurationsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => ShippoConfigurationsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => ShippoConfigurationsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Updates extended fields of a ShippoConfiguration without incrementing revision * @param _id - ID of the entity to update. * @param namespace - Identifier for the app whose extended fields are being updated. * @public * @documentationMaturity preview * @requiredField _id * @requiredField namespace * @requiredField options * @requiredField options.namespaceData * @permissionId ECOM.SHIPPO_CONFIGURATION_UPDATE * @adminMethod */ function updateExtendedFields(_id: string, namespace: string, options: UpdateExtendedFieldsOptions): Promise; interface UpdateExtendedFieldsOptions { /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } type ecomV1ShippoConfiguration_universal_d_ShippoConfiguration = ShippoConfiguration; type ecomV1ShippoConfiguration_universal_d_DomesticServiceSettings = DomesticServiceSettings; type ecomV1ShippoConfiguration_universal_d_DomesticService = DomesticService; const ecomV1ShippoConfiguration_universal_d_DomesticService: typeof DomesticService; type ecomV1ShippoConfiguration_universal_d_ServiceSettings = ServiceSettings; type ecomV1ShippoConfiguration_universal_d_HandlingFee = HandlingFee; type ecomV1ShippoConfiguration_universal_d_CalculationType = CalculationType; const ecomV1ShippoConfiguration_universal_d_CalculationType: typeof CalculationType; type ecomV1ShippoConfiguration_universal_d_InternationalServiceSettings = InternationalServiceSettings; type ecomV1ShippoConfiguration_universal_d_InternationalService = InternationalService; const ecomV1ShippoConfiguration_universal_d_InternationalService: typeof InternationalService; type ecomV1ShippoConfiguration_universal_d_PackageType = PackageType; const ecomV1ShippoConfiguration_universal_d_PackageType: typeof PackageType; type ecomV1ShippoConfiguration_universal_d_PackageDetails = PackageDetails; type ecomV1ShippoConfiguration_universal_d_PackageDimensions = PackageDimensions; type ecomV1ShippoConfiguration_universal_d_CreateShippoConfigurationRequest = CreateShippoConfigurationRequest; type ecomV1ShippoConfiguration_universal_d_CreateShippoConfigurationResponse = CreateShippoConfigurationResponse; type ecomV1ShippoConfiguration_universal_d_GetShippoConfigurationRequest = GetShippoConfigurationRequest; type ecomV1ShippoConfiguration_universal_d_GetShippoConfigurationResponse = GetShippoConfigurationResponse; type ecomV1ShippoConfiguration_universal_d_UpdateShippoConfigurationRequest = UpdateShippoConfigurationRequest; type ecomV1ShippoConfiguration_universal_d_UpdateShippoConfigurationResponse = UpdateShippoConfigurationResponse; type ecomV1ShippoConfiguration_universal_d_DeleteShippoConfigurationRequest = DeleteShippoConfigurationRequest; type ecomV1ShippoConfiguration_universal_d_DeleteShippoConfigurationResponse = DeleteShippoConfigurationResponse; type ecomV1ShippoConfiguration_universal_d_QueryShippoConfigurationsRequest = QueryShippoConfigurationsRequest; type ecomV1ShippoConfiguration_universal_d_QueryShippoConfigurationsResponse = QueryShippoConfigurationsResponse; type ecomV1ShippoConfiguration_universal_d_UpdateExtendedFieldsRequest = UpdateExtendedFieldsRequest; type ecomV1ShippoConfiguration_universal_d_UpdateExtendedFieldsResponse = UpdateExtendedFieldsResponse; const ecomV1ShippoConfiguration_universal_d_createShippoConfiguration: typeof createShippoConfiguration; type ecomV1ShippoConfiguration_universal_d_CreateShippoConfigurationOptions = CreateShippoConfigurationOptions; const ecomV1ShippoConfiguration_universal_d_getShippoConfiguration: typeof getShippoConfiguration; const ecomV1ShippoConfiguration_universal_d_updateShippoConfiguration: typeof updateShippoConfiguration; type ecomV1ShippoConfiguration_universal_d_UpdateShippoConfiguration = UpdateShippoConfiguration; type ecomV1ShippoConfiguration_universal_d_UpdateShippoConfigurationOptions = UpdateShippoConfigurationOptions; const ecomV1ShippoConfiguration_universal_d_deleteShippoConfiguration: typeof deleteShippoConfiguration; const ecomV1ShippoConfiguration_universal_d_queryShippoConfigurations: typeof queryShippoConfigurations; type ecomV1ShippoConfiguration_universal_d_ShippoConfigurationsQueryResult = ShippoConfigurationsQueryResult; type ecomV1ShippoConfiguration_universal_d_ShippoConfigurationsQueryBuilder = ShippoConfigurationsQueryBuilder; const ecomV1ShippoConfiguration_universal_d_updateExtendedFields: typeof updateExtendedFields; type ecomV1ShippoConfiguration_universal_d_UpdateExtendedFieldsOptions = UpdateExtendedFieldsOptions; namespace ecomV1ShippoConfiguration_universal_d { export { ecomV1ShippoConfiguration_universal_d_ShippoConfiguration as ShippoConfiguration, ecomV1ShippoConfiguration_universal_d_DomesticServiceSettings as DomesticServiceSettings, ecomV1ShippoConfiguration_universal_d_DomesticService as DomesticService, ecomV1ShippoConfiguration_universal_d_ServiceSettings as ServiceSettings, ecomV1ShippoConfiguration_universal_d_HandlingFee as HandlingFee, ecomV1ShippoConfiguration_universal_d_CalculationType as CalculationType, ecomV1ShippoConfiguration_universal_d_InternationalServiceSettings as InternationalServiceSettings, ecomV1ShippoConfiguration_universal_d_InternationalService as InternationalService, ecomV1ShippoConfiguration_universal_d_PackageType as PackageType, ecomV1ShippoConfiguration_universal_d_PackageDetails as PackageDetails, ecomV1ShippoConfiguration_universal_d_PackageDimensions as PackageDimensions, Address$2 as Address, StreetAddress$2 as StreetAddress, AddressLocation$2 as AddressLocation, ExtendedFields$1 as ExtendedFields, ecomV1ShippoConfiguration_universal_d_CreateShippoConfigurationRequest as CreateShippoConfigurationRequest, ecomV1ShippoConfiguration_universal_d_CreateShippoConfigurationResponse as CreateShippoConfigurationResponse, ecomV1ShippoConfiguration_universal_d_GetShippoConfigurationRequest as GetShippoConfigurationRequest, ecomV1ShippoConfiguration_universal_d_GetShippoConfigurationResponse as GetShippoConfigurationResponse, ecomV1ShippoConfiguration_universal_d_UpdateShippoConfigurationRequest as UpdateShippoConfigurationRequest, ecomV1ShippoConfiguration_universal_d_UpdateShippoConfigurationResponse as UpdateShippoConfigurationResponse, ecomV1ShippoConfiguration_universal_d_DeleteShippoConfigurationRequest as DeleteShippoConfigurationRequest, ecomV1ShippoConfiguration_universal_d_DeleteShippoConfigurationResponse as DeleteShippoConfigurationResponse, ecomV1ShippoConfiguration_universal_d_QueryShippoConfigurationsRequest as QueryShippoConfigurationsRequest, CursorQuery$1 as CursorQuery, CursorQueryPagingMethodOneOf$1 as CursorQueryPagingMethodOneOf, Sorting$2 as Sorting, SortOrder$2 as SortOrder, CursorPaging$2 as CursorPaging, ecomV1ShippoConfiguration_universal_d_QueryShippoConfigurationsResponse as QueryShippoConfigurationsResponse, CursorPagingMetadata$1 as CursorPagingMetadata, Cursors$2 as Cursors, ecomV1ShippoConfiguration_universal_d_UpdateExtendedFieldsRequest as UpdateExtendedFieldsRequest, ecomV1ShippoConfiguration_universal_d_UpdateExtendedFieldsResponse as UpdateExtendedFieldsResponse, DomainEvent$3 as DomainEvent, DomainEventBodyOneOf$3 as DomainEventBodyOneOf, EntityCreatedEvent$3 as EntityCreatedEvent, RestoreInfo$3 as RestoreInfo, EntityUpdatedEvent$3 as EntityUpdatedEvent, EntityDeletedEvent$3 as EntityDeletedEvent, ActionEvent$3 as ActionEvent, Empty$1 as Empty, MessageEnvelope$2 as MessageEnvelope, IdentificationData$3 as IdentificationData, IdentificationDataIdOneOf$3 as IdentificationDataIdOneOf, WebhookIdentityType$2 as WebhookIdentityType, ecomV1ShippoConfiguration_universal_d_createShippoConfiguration as createShippoConfiguration, ecomV1ShippoConfiguration_universal_d_CreateShippoConfigurationOptions as CreateShippoConfigurationOptions, ecomV1ShippoConfiguration_universal_d_getShippoConfiguration as getShippoConfiguration, ecomV1ShippoConfiguration_universal_d_updateShippoConfiguration as updateShippoConfiguration, ecomV1ShippoConfiguration_universal_d_UpdateShippoConfiguration as UpdateShippoConfiguration, ecomV1ShippoConfiguration_universal_d_UpdateShippoConfigurationOptions as UpdateShippoConfigurationOptions, ecomV1ShippoConfiguration_universal_d_deleteShippoConfiguration as deleteShippoConfiguration, ecomV1ShippoConfiguration_universal_d_queryShippoConfigurations as queryShippoConfigurations, ecomV1ShippoConfiguration_universal_d_ShippoConfigurationsQueryResult as ShippoConfigurationsQueryResult, ecomV1ShippoConfiguration_universal_d_ShippoConfigurationsQueryBuilder as ShippoConfigurationsQueryBuilder, ecomV1ShippoConfiguration_universal_d_updateExtendedFields as updateExtendedFields, ecomV1ShippoConfiguration_universal_d_UpdateExtendedFieldsOptions as UpdateExtendedFieldsOptions, }; } interface TotalsCalculationEntity { } interface CalculateTotalsRequest extends CalculateTotalsRequestCouponOneOf, CalculateTotalsRequestGiftCardOneOf { /** Coupon ID. */ couponId?: string | null; /** Coupon code. */ couponCode?: string | null; /** Gift card ID. */ giftCardId?: string | null; /** Gift card code. */ giftCardCode?: string | null; /** * Calculation ID. An identifier of the entity that you are calculating totals for, for example, cart ID or checkout ID. * This value will be used in order to optimise calculations by caching. * If not passed, calculation might be slower in some cases. */ calculationId?: string | null; /** Line items for calculation. */ lineItems?: LineItem[]; /** Shipping address for tax and shipping calculation (if applicable). */ shippingAddress?: Address$1; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$1; /** Details about selected shipping option. */ selectedShippingOption?: SelectedShippingOption; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart/checkout. * @deprecated */ merchantDiscounts?: MerchantDiscountInput[]; /** Buyer email. Used to enforce coupon [single-use per customer](https://support.wix.com/en/article/wix-stores-limiting-coupon-usage). If not passed, single coupon usage per customer will not be enforced. */ buyerEmail?: string | null; /** * Whether to calculate tax in the calculation request. * * Default: `true` * @internal */ calculateTax?: boolean | null; /** * Member id to use for this calculation * When not provided, given that the caller is a member, its member id will be used * Providing this require elevated permissions - ECOM.ADMIN_CALCULATE_TOTALS */ memberId?: string | null; /** * The selected memberships and which line items they apply to * When not provided, default selection will be returned * You can also set it to empty selection */ selectedMemberships?: SelectedMemberships; /** * Whether to calculate shipping in the calculation request. * * Default: `true` * @internal */ calculateShipping?: boolean | null; /** Buyer phone number. Used to get shipping rates. */ buyerPhone?: string | null; /** * Whether to calculate discount rules in the calculation request. If not passed, discount rules are being calculated. * @internal */ calculateDiscountRules?: boolean | null; /** * Shipping information that will be used instead of calculated shipping info. * @internal */ shippingOptions?: CarrierShippingOption[]; /** * Applied discounts that will be used instead of calculated discounts. * @internal */ appliedDiscounts?: AppliedDiscount[]; /** * Additional Fees that will be used instead of calculated additional fees * @internal */ additionalFees?: AdditionalFee[]; /** * List of data that should not be fetched by Totals calculator * @internal */ skipDataFetch?: DataFetchType[]; /** * __Deprecated.__ Use `purchaseFlowId` instead. * @internal * @deprecated */ ecomId?: string | null; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; /** * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system. * For example, a Wix Pay Link ID. * @internal */ externalReferences?: ExternalReference[]; /** * The business location ID to be used as the basis for some calculations. * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction). * @internal */ businessLocationId?: string | null; } /** @oneof */ interface CalculateTotalsRequestCouponOneOf { /** Coupon ID. */ couponId?: string | null; /** Coupon code. */ couponCode?: string | null; } /** @oneof */ interface CalculateTotalsRequestGiftCardOneOf { /** Gift card ID. */ giftCardId?: string | null; /** Gift card code. */ giftCardCode?: string | null; } interface LineItem { /** Line item ID. */ _id?: string; /** Quantity. */ quantity?: number | null; /** * Optional references to the line item's origin catalog. * See [Catalog SPI](https://bo.wix.com/wix-docs/rest/ecommerce/catalog-spi/introduction) for more details. * This field may be empty in the case of a custom line item. * currently we only use the catalog app id to set tax=0 for specific apps. */ catalogReference?: CatalogReference$2; /** Product/booking/event name. */ productName?: string | null; /** Price. */ price?: string; /** Physical properties (if applicable). */ physicalProperties?: PhysicalProperties$1; /** * Coupon scopes - which app and items a coupon applies to. * This field is internal to Wix, and should be used by Bookings, Stores and Events as used by the current [Coupons API](https://bo.wix.com/wix-docs/rest/stores/coupons/valid-scope-values). * @internal */ couponScopes?: Scope[]; /** * Tax group ID. * @internal */ taxGroupId?: string | null; /** * Shipping group ID. * @internal */ shippingGroupId?: string | null; /** Subscription settings. */ subscriptionSettings?: SubscriptionSettings; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field. */ paymentOption?: PaymentOptionType; /** Service properties. When relevant, this contains information such as date and number of participants. */ serviceProperties?: ServiceProperties; /** * In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID. * + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID. * + In most cases, this field has the same value as `catalogReference.catalogItemId`. * + Used in membership validation. */ rootCatalogItemId?: string | null; /** * Optional - partial amount of item's price to be paid now for checkout cases with DEPOSIT_ONLINE payment option * If omitted - item's price will not be split and is expected to be paid in single installment */ depositAmount?: string | null; /** full price of the item before all the discounts */ fullPrice?: string | null; /** The Item's Delivery Profile Id */ deliveryProfileId?: string | null; /** Item type. Either a preset type or custom. */ itemType?: ItemType; /** * Address to be used for tax calculation. * @internal */ taxableAddress?: TaxableAddress; /** * Additional Fees to be added to used for calculation. * @internal * @readonly */ additionalFees?: ApiV1AdditionalFee[]; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$2 { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration). */ options?: Record | null; } interface PhysicalProperties$1 { /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */ weight?: number | null; /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string | null; /** Whether this line item is shippable. */ shippable?: boolean; } interface Scope { /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */ namespace?: string; /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */ group?: Group; } interface Group { /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */ name?: string; /** Item ID (when the coupon scope is limited to just one item). */ entityId?: string | null; } interface SubscriptionSettings { /** Frequency of recurring payment. Every day/week/month/year. */ frequency?: SubscriptionFrequency; /** * *Optional** - Interval of recurring payment. Defaults to 1 if not provided. * @internal */ interval?: number | null; /** * Whether this subscription offers a free trial period. * @internal */ freeTrial?: boolean; } /** Frequency unit of recurring payment */ enum SubscriptionFrequency { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } /** Type of selected payment option for catalog item */ enum PaymentOptionType { /** The entire payment for this item happens as part of the checkout. */ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE", /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE", /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */ MEMBERSHIP = "MEMBERSHIP", /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */ DEPOSIT_ONLINE = "DEPOSIT_ONLINE", /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE" } interface ServiceProperties { /** * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * For example, the start time of a class. */ scheduledDate?: Date | null; /** The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room. */ numberOfParticipants?: number | null; } interface ItemType extends ItemTypeItemTypeDataOneOf { /** Preset item type. */ preset?: ItemTypeItemType; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } /** @oneof */ interface ItemTypeItemTypeDataOneOf { /** Preset item type. */ preset?: ItemTypeItemType; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } enum ItemTypeItemType { UNRECOGNISED = "UNRECOGNISED", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL", GIFT_CARD = "GIFT_CARD", SERVICE = "SERVICE" } interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType; } /** @oneof */ interface TaxableAddressTaxableAddressDataOneOf { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType; } enum TaxableAddressType { UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS", BUSINESS = "BUSINESS", BILLING = "BILLING", SHIPPING = "SHIPPING" } interface ApiV1AdditionalFee { /** Additional fee's unique code or ID. */ code?: string | null; /** * Additional fee's name. * * Max: 50 characters */ name?: string; /** Total additional fees. This `price` does not include any taxes that may apply to these additional fees. */ price?: string; /** * Tax details. * * > **Note:** Tax is not calculated in the returned `price` even when `taxDetails.taxable` is `true`. */ taxDetails?: V1TaxDetails; /** * Number of subscription cycle this fee applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } /** Tax details. */ interface V1TaxDetails { /** Whether additional fee is taxable. */ taxable?: boolean; /** Reserved for internal use. */ taxGroupId?: string | null; } /** Physical address */ interface Address$1 { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress$1; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** @internal */ location?: AddressLocation$1; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } interface StreetAddress$1 { /** Street number. */ number?: string; /** Street name. */ name?: string; /** * Apartment number. * @internal */ apt?: string; /** * Optional address line 1 * @internal */ formattedAddressLine?: string | null; } interface AddressLocation$1 { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface SelectedShippingOption { /** Carrier ID. */ carrierId?: string | null; /** Selected shipping option code. For example, "usps_std_overnight". */ code?: string; } interface MerchantDiscountInput { /** Discount amount. */ amount?: string; /** IDs of line items the discount applies to. */ lineItemIds?: string[]; } interface SelectedMemberships { /** Selected memberships. */ memberships?: SelectedMembership[]; } interface SelectedMembership { /** Membership ID. */ _id?: string; /** ID of the app providing this payment option. */ appId?: string; /** IDs of the line items this membership applies to. */ lineItemIds?: string[]; } interface CarrierShippingOption { /** This carrier's unique ID */ carrierId?: string | null; /** Shipping service options offered by this carrier for this request */ shippingOptions?: ShippingOption; } interface ShippingOption { /** * Unique code of provided shipping option like "usps_std_overnight". * For legacy calculators this would be the UUID of the option. */ code?: string; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". */ title?: string; /** Delivery logistics. */ logistics?: DeliveryLogistics$1; /** Sipping price information. */ cost?: ShippingPrice; /** * Delivery solution allocations to different delivery carriers and delivery regions * @internal */ deliveryAllocations?: DeliveryAllocation$1[]; /** * If the delivery solution is a partial and doesn't apply to all items. * @internal */ partial?: boolean | null; } interface DeliveryLogistics$1 { /** Expected delivery time, in free text. For example, "3-5 business days". */ deliveryTime?: string | null; /** Instructions for caller, e.g for pickup: "Please deliver during opening hours, and please don't park in disabled parking spot". */ instructions?: string | null; /** Pickup details. */ pickupDetails?: PickupDetails$1; /** * Expected delivery time slot (from and to time stamps representation) * @internal */ deliveryTimeSlot?: DeliveryTimeSlot$1; } interface PickupDetails$1 { /** Pickup address. */ address?: Address$1; /** * Whether the pickup address is that of a business - this may effect tax calculation. * @deprecated */ businessLocation?: boolean; /** Pickup method */ pickupMethod?: PickupMethod$1; } enum PickupMethod$1 { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } interface DeliveryTimeSlot$1 { /** starting time of the delivery time slot */ from?: Date | null; /** ending time of the delivery time slot */ to?: Date | null; } interface ShippingPrice { /** Shipping price. */ price?: MultiCurrencyPrice; /** Other costs such as insurance, handling & packaging for fragile items, etc. */ otherCharges?: OtherCharge[]; } interface MultiCurrencyPrice { /** Amount. */ amount?: string; /** * Converted amount. * @readonly */ convertedAmount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; /** * Converted amount formatted with currency symbol. * @readonly */ formattedConvertedAmount?: string; } interface OtherCharge { /** Type of additional cost. */ type?: ChargeType$1; /** Price of added cost. */ price?: MultiCurrencyPrice; } enum ChargeType$1 { HANDLING_FEE = "HANDLING_FEE", INSURANCE = "INSURANCE" } interface DeliveryAllocation$1 { /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */ deliveryCarrier?: Carrier$1; /** The delivery region that are relevant for this delivery solution. */ deliveryRegion?: Region$1; /** Populated if the delivery solution is a partially supplied by this carrier. */ applicableLineItems?: ApplicableLineItems$1; } interface Carrier$1 { /** The carrier app id */ appId?: string | null; /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; } interface Region$1 { /** The delivery region id. */ _id?: string | null; /** The delivery region name. */ name?: string | null; } interface ApplicableLineItems$1 { /** Line items that the delivery solution is for. */ lineItemIds?: string[]; } interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf { /** Coupon details. */ coupon?: Coupon; /** Merchant discount. */ merchantDiscount?: MerchantDiscount; /** Discount rule */ discountRule?: DiscountRule; /** Discount type. */ discountType?: DiscountType; /** * IDs of line items the discount applies to. * @deprecated IDs of line items the discount applies to. * @replacedBy line_items_discounts * @targetRemovalDate 2024-06-01 */ lineItemIds?: string[]; /** * Discount ID. * @internal */ _id?: string | null; /** * Line items the discount applies to. * @internal */ lineItemDiscounts?: LineItemDiscount[]; /** * Number of subscription cycle this discount applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } /** @oneof */ interface AppliedDiscountDiscountSourceOneOf { /** Coupon details. */ coupon?: Coupon; /** Merchant discount. */ merchantDiscount?: MerchantDiscount; /** Discount rule */ discountRule?: DiscountRule; } enum DiscountType { GLOBAL = "GLOBAL", SPECIFIC_ITEMS = "SPECIFIC_ITEMS", SHIPPING = "SHIPPING" } /** Coupon */ interface Coupon { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** Coupon value. */ amount?: MultiCurrencyPrice; /** Coupon name. */ name?: string; /** * Coupon type: We want it to be an enum and not a string but currently we have no time to do it so we leave it as is to be aligned with cart summary. * @internal * @deprecated */ couponType?: string; } interface MerchantDiscount { /** Discount value. */ amount?: MultiCurrencyPrice; /** Discount Percentage. Will be calculated from items price before other discounts. */ percentage?: number | null; } interface DiscountRule { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: DiscountRuleName; /** Discount value. */ amount?: MultiCurrencyPrice; } interface DiscountRuleName { /** Original discount rule name (in site's default language). */ original?: string; /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */ translated?: string | null; } interface LineItemDiscount { /** ID of line item the discount applies to. */ _id?: string; /** Discount value. */ totalDiscountAmount?: MultiCurrencyPrice; } interface AdditionalFee { /** Additional fee's unique code (or ID) for future processing */ code?: string | null; /** Translated additional fee's name */ name?: string; /** Additional fee's price */ price?: string; /** Currency */ currency?: string; /** Tax details */ taxDetails?: TaxDetails; /** Provider's app id */ providerAppId?: string | null; /** * Optional - Line items associated with this additional fee. * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. */ lineItemIds?: string[]; /** * Number of subscription cycle this fee applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } /** Tax Details. */ interface TaxDetails { /** Indication if additional fee is taxable or not */ taxable?: boolean; /** Optional tax group ID to use when calculating tax for this additional fee */ taxGroupId?: string | null; } enum DataFetchType { SHIPPING = "SHIPPING", DISCOUNT = "DISCOUNT", ADDITIONAL_FEES = "ADDITIONAL_FEES", ORDER_VALIDATION = "ORDER_VALIDATION" } interface ExternalReference { /** * ID of the app associated with the purchase flow. * For example, the Wix Pay Links app ID. */ appId?: string; /** * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system. * For example, a Wix Pay Link ID. */ resourceId?: string | null; } interface CalculateTotalsResponse { /** Calculate line items. */ calculatedLineItems?: CalculatedLineItem[]; /** Price summary. */ priceSummary?: PriceSummary; /** Details of applied gift card. */ giftCard?: GiftCard; /** Tax summary. */ taxSummary?: TaxSummary; /** Shipping information. */ shippingInfo?: ShippingInformation; /** Applied discounts. */ appliedDiscounts?: AppliedDiscount[]; /** Calculation errors. */ calculationErrors?: CalculationErrors; /** Weight unit. */ weightUnit?: WeightUnit$1; /** Currency. */ currency?: string; /** * This is the display currency. Converted prices are presented in this currency. * @readonly */ conversionCurrency?: string; /** Whether tax is included in price. */ taxIncludedInPrice?: boolean; /** * Minimal amount to pay in order to place the order. * @readonly */ payNow?: PriceSummary; /** * Remaining amount for the order to be fully paid. * @readonly */ payLater?: PriceSummary; /** Information about valid and invalid memberships, and which ones are selected for usage. */ membershipOptions?: MembershipOptions; /** Additional Fees */ additionalFees?: V1AdditionalFee[]; /** * The site currency. * @readonly */ siteCurrency?: string; /** * The rate used when converting from the site currency to the checkout currency. * @readonly */ checkoutConversionRate?: string | null; /** * The pay now total amount after the gift card is applied. * @readonly */ payNowTotalAfterGiftCard?: MultiCurrencyPrice; /** * The total amount after gift card is applied. * @readonly */ totalAfterGiftCard?: MultiCurrencyPrice; /** * Payment for subscriptions after free trial period. * @internal * @readonly */ payAfterFreeTrial?: PriceSummary; } interface CalculatedLineItem { /** Line item ID. */ lineItemId?: string; /** Price breakdown for this line item. */ pricesBreakdown?: LineItemPricesData; /** * Type of selected payment option for current item. Supported values: * + `"FULL_PAYMENT_ONLINE"` - The entire payment for this item will happen as part of the checkout * + `"FULL_PAYMENT_OFFLINE"` - The entire payment for this item will happen after the checkout * + `"MEMBERSHIP"` - This item cannot be paid via monetary payment options, only via non monetary option such membership. When this option is used, price must be set to 0 * + `"DEPOSIT_ONLINE"` - Partial payment of the given item will happen as part of the checkout. Amount to be paid is defined by deposit_amount field. */ paymentOption?: PaymentOptionType; /** * tax calculation address. * @internal */ taxableAddress?: TaxableAddress; } interface LineItemPricesData { /** Total price after discounts and after tax. */ totalPriceAfterTax?: MultiCurrencyPrice; /** Total price after discounts, and before tax. */ totalPriceBeforeTax?: MultiCurrencyPrice; /** Tax details. */ taxDetails?: ItemTaxFullDetails; /** Total discount for all line items. */ totalDiscount?: MultiCurrencyPrice; /** Catalog price after catalog discount and automatic discounts. */ price?: MultiCurrencyPrice; /** Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: MultiCurrencyPrice; /** Total price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: MultiCurrencyPrice; /** Item price **before** line item discounts and **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: MultiCurrencyPrice; } interface ItemTaxFullDetails { /** Amount for which tax is calculated. */ taxableAmount?: MultiCurrencyPrice; /** * Tax group ID, if specified. * @internal */ taxGroupId?: string | null; /** Tax rate %, as a decimal point between 0 and 1. */ taxRate?: string; /** Calculated tax, based on `taxable_amount` and `tax_rate`. */ totalTax?: MultiCurrencyPrice; /** * If breakdown exists, the sum of rates in the breakdown must equal `tax_rate`. Deprecated - use 'tax_breakdown' instead. * @readonly * @deprecated */ rateBreakdown?: TaxRateBreakdown[]; /** * The amount of this line item that was exempt. * @internal */ exemptAmount?: MultiCurrencyPrice; /** * True for items we have a tax applied on them * @internal */ isItemTaxable?: boolean | null; /** * True if the lineAmount include tax in it. * @internal */ isTaxIncluded?: boolean | null; /** * The calculator that calculated this line tax * @internal */ calculatorName?: string | null; /** * tax information for a line item. * @internal * @readonly */ taxBreakdown?: TaxBreakdown[]; } interface TaxRateBreakdown { /** Name of tax against which the calculation was performed. */ name?: string; /** Rate at which this tax detail was calculated. */ rate?: string; /** Amount of tax for this tax detail. */ tax?: MultiCurrencyPrice; /** * The type of tax that was calculated * @internal */ taxType?: string | null; /** * The name of the jurisdiction in which this tax detail applies * @internal */ jurisdiction?: string | null; /** * The type of the jurisdiction in which this tax detail applies(Country,State,County,City,Special). * @internal */ jurisdictionType?: string | null; /** * The amount of this line item that was exempt from this authority. * @internal */ exemptAmount?: MultiCurrencyPrice; /** * ids of the used exemptions from the TaxEstimate exemptions array. * @internal */ exemptionIds?: number[]; /** * The taxable amount of this tax detail * @internal */ taxableAmount?: MultiCurrencyPrice; /** * The Taxes/Fee component. True if the fee is applied. * @internal */ isFee?: boolean | null; } /** * TaxBreakdown represents tax information for a line item. * It holds the tax amount and the tax rate for each tax authority that apply on the line item. */ interface TaxBreakdown { /** The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec". */ jurisdiction?: string | null; /** The amount of this line item price that was considered nontaxable. (Decimal value) */ nonTaxableAmount?: MultiCurrencyPrice; /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value) */ rate?: string | null; /** The amount of tax estimated for this line item. (Decimal value) */ taxAmount?: MultiCurrencyPrice; /** The taxable amount of this line item. */ taxableAmount?: MultiCurrencyPrice; /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */ taxType?: string | null; /** * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc. * This name should be explicit enough to allow the merchant to understand what tax was calculated. */ taxName?: string | null; /** The type of the jurisdiction in which this tax detail applies. */ jurisdictionType?: JurisdictionType; } /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ enum JurisdictionType { UNDEFINED = "UNDEFINED", COUNTRY = "COUNTRY", STATE = "STATE", COUNTY = "COUNTY", CITY = "CITY", SPECIAL = "SPECIAL" } interface PriceSummary { /** Subtotal of all line items, before discounts and before tax. */ subtotal?: MultiCurrencyPrice; /** Total shipping price, before discounts and before tax. */ shipping?: MultiCurrencyPrice; /** Total tax. */ tax?: MultiCurrencyPrice; /** Total calculated discount value. */ discount?: MultiCurrencyPrice; /** Total price after discounts, gift cards, and tax. */ total?: MultiCurrencyPrice; /** Total additional fees price before tax. */ additionalFees?: MultiCurrencyPrice; } interface GiftCard { /** * Gift Card ID. * @deprecated */ _id?: string; /** Gift card obfuscated code. */ obfuscatedCode?: string; /** Gift card value. */ amount?: MultiCurrencyPrice; /** App ID of the gift card provider. */ appId?: string; /** * External ID in the gift card provider's system. * Used for integration and tracking across different platforms. */ externalId?: string | null; } interface TaxSummary { /** * Amount for which tax is calculated, added from line items. * @readonly */ taxableAmount?: MultiCurrencyPrice; /** * Calculated tax, added from line items. * @readonly */ totalTax?: MultiCurrencyPrice; /** * Manual tax rate * @internal * @readonly * @deprecated */ manualTaxRate?: string; /** * Tax calculator that was active when the order was created. * @deprecated */ calculationDetails?: TaxCalculationDetails; /** * Tax estimation id in tax service * @internal * @readonly */ taxEstimationId?: string | null; /** * Average Tax Rate * @internal * @readonly */ averageTaxRate?: string | null; /** * The amount of this estimate that was exempt (for all line items). * @internal * @readonly */ totalExempt?: MultiCurrencyPrice; /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * @internal * @readonly */ aggregatedTaxBreakdown?: AggregatedTaxBreakdown[]; } interface TaxCalculationDetails extends TaxCalculationDetailsCalculationDetailsOneOf { /** Reason the manual calculation was used. */ manualRateReason?: ManualCalculationReason; /** Details of the fallback rate calculation. */ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails; /** Rate calculation type. */ rateType?: RateType; } /** @oneof */ interface TaxCalculationDetailsCalculationDetailsOneOf { /** Reason the manual calculation was used. */ manualRateReason?: ManualCalculationReason; /** Details of the fallback rate calculation. */ autoTaxFallbackDetails?: AutoTaxFallbackCalculationDetails; } enum RateType { /** no tax being collected for this request due to location of purchase */ NO_TAX_COLLECTED = "NO_TAX_COLLECTED", /** manual rate used for calculation */ MANUAL_RATE = "MANUAL_RATE", /** autotax rate used for calculation */ AUTO_RATE = "AUTO_RATE", /** fallback rate used for calculation */ FALLBACK_RATE = "FALLBACK_RATE" } enum ManualCalculationReason { /** user set calculator in Business Manager to be Manual */ GLOBAL_SETTING_TO_MANUAL = "GLOBAL_SETTING_TO_MANUAL", /** specific region is on manual even though Global setting is Auto-tax */ REGION_SETTING_TO_MANUAL = "REGION_SETTING_TO_MANUAL" } interface AutoTaxFallbackCalculationDetails { /** reason for fallback */ fallbackReason?: FallbackReason; /** invalid request (i.e. address), timeout, internal error, license error, and others will be encoded here */ error?: ApplicationError$1; } enum FallbackReason { /** auto-tax failed to be calculated */ AUTO_TAX_FAILED = "AUTO_TAX_FAILED", /** auto-tax was temporarily deactivated on a system-level */ AUTO_TAX_DEACTIVATED = "AUTO_TAX_DEACTIVATED" } interface ApplicationError$1 { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } /** * The summary of the tax breakdown for all the line items. It will hold for each tax name, the aggregated tax amount paid for it and the tax rate. * Tax breakdown is the tax amount split to the tax authorities that applied on the line item. */ interface AggregatedTaxBreakdown { /** The name of the tax against which this tax amount was calculated. */ taxName?: string; /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */ taxType?: string; /** The name of the jurisdiction in which this tax detail applies. */ jurisdiction?: string; /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ jurisdictionTypeEnum?: JurisdictionType; /** The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.000 signifies 200% tax. (Decimal value) */ rate?: string; /** The sum of all the tax from line items that calculated by the tax identifiers. */ aggregatedTaxAmount?: MultiCurrencyPrice; /** * The sum of all the taxable amount from line items for tax identifiers. * @internal */ aggregatedTaxableAmount?: MultiCurrencyPrice; } interface ShippingInformation { /** Shipping region. */ region?: ShippingRegion; /** Selected shipping option. */ selectedCarrierServiceOption?: SelectedCarrierServiceOption; /** All shipping options. */ carrierServiceOptions?: CarrierServiceOption[]; } interface ShippingRegion { /** * Shipping region ID. * @readonly */ _id?: string; /** Shipping region name. */ name?: string; } interface SelectedCarrierServiceOption { /** Unique identifier of selected option. For example, "usps_std_overnight". */ code?: string; /** * Title of the option, such as USPS Standard Overnight Delivery (in the requested locale). * For example, "Standard" or "First-Class Package International". * @readonly */ title?: string; /** * Delivery logistics. * @readonly */ logistics?: DeliveryLogistics$1; /** * Shipping costs. * @readonly */ cost?: SelectedCarrierServiceOptionPrices; /** * Were we able to find the requested shipping option, or otherwise we fallback to the default one (the first) * @readonly */ requestedShippingOption?: boolean; /** Other charges */ otherCharges?: SelectedCarrierServiceOptionOtherCharge[]; /** This carrier's unique ID */ carrierId?: string | null; /** * Delivery solution allocations to different delivery carriers and delivery regions * @internal */ deliveryAllocations?: DeliveryAllocation$1[]; /** * If the delivery solution is a partial and doesn't apply to all items. * @internal */ partial?: boolean | null; } interface SelectedCarrierServiceOptionPrices { /** Total shipping price, after discount and after tax. */ totalPriceAfterTax?: MultiCurrencyPrice; /** Total price of shipping after discounts (when relevant), and before tax. */ totalPriceBeforeTax?: MultiCurrencyPrice; /** Tax details. */ taxDetails?: ItemTaxFullDetails; /** Shipping discount before tax. */ totalDiscount?: MultiCurrencyPrice; /** Shipping price before discount and before tax. */ price?: MultiCurrencyPrice; } interface SelectedCarrierServiceOptionOtherCharge { /** Type of additional cost. */ type?: ChargeType$1; /** Details of the charge, such as 'Full Coverage Insurance of up to 80% of value of shipment'. */ details?: string | null; /** Price of added charge. */ cost?: SelectedCarrierServiceOptionPrices; } interface CarrierServiceOption { /** Carrier ID. */ carrierId?: string; /** Shipping options offered by this carrier for this request. */ shippingOptions?: ShippingOption[]; } interface CalculationErrors extends CalculationErrorsShippingCalculationErrorOneOf { /** General shipping calculation error. */ generalShippingCalculationError?: Details$1; /** Carrier errors. */ carrierErrors?: CarrierErrors; /** Tax calculation error. */ taxCalculationError?: Details$1; /** Coupon calculation error. */ couponCalculationError?: Details$1; /** Gift card calculation error. */ giftCardCalculationError?: Details$1; /** Order validation errors. */ orderValidationErrors?: ApplicationError$1[]; /** * Membership payment methods calculation errors * For example, will indicate that a line item that must be paid with membership payment doesn't have one or selected memberships are invalid */ membershipError?: Details$1; /** Discount Rule calculation error. */ discountsCalculationError?: Details$1; } /** @oneof */ interface CalculationErrorsShippingCalculationErrorOneOf { /** General shipping calculation error. */ generalShippingCalculationError?: Details$1; /** Carrier errors. */ carrierErrors?: CarrierErrors; } interface Details$1 extends DetailsKindOneOf$1 { applicationError?: ApplicationError$1; validationError?: ValidationError$1; systemError?: SystemError$1; /** * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response * @deprecated */ tracing?: Record; } /** @oneof */ interface DetailsKindOneOf$1 { applicationError?: ApplicationError$1; validationError?: ValidationError$1; systemError?: SystemError$1; } /** * example result: * { * "fieldViolations": [ * { * "field": "fieldA", * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]", * "violatedRule": "OTHER", * "ruleName": "INVALID_NOTE", * "data": { * "value": "FI" * } * }, * { * "field": "fieldB", * "description": "field value out of range. supported range: [0-20]", * "violatedRule": "MAX", * "data": { * "threshold": 20 * } * }, * { * "field": "fieldC", * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]", * "violatedRule": "FORMAT", * "data": { * "type": "PHONE" * } * } * ] * } */ interface ValidationError$1 { fieldViolations?: FieldViolation$1[]; } enum RuleType$1 { VALIDATION = "VALIDATION", OTHER = "OTHER", MAX = "MAX", MIN = "MIN", MAX_LENGTH = "MAX_LENGTH", MIN_LENGTH = "MIN_LENGTH", MAX_SIZE = "MAX_SIZE", MIN_SIZE = "MIN_SIZE", FORMAT = "FORMAT", DECIMAL_LTE = "DECIMAL_LTE", DECIMAL_GTE = "DECIMAL_GTE", DECIMAL_LT = "DECIMAL_LT", DECIMAL_GT = "DECIMAL_GT", DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE", INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE", REQUIRED_FIELD = "REQUIRED_FIELD", FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED", ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT", EXACT_LENGTH = "EXACT_LENGTH", EXACT_SIZE = "EXACT_SIZE" } interface FieldViolation$1 { field?: string; description?: string; violatedRule?: RuleType$1; /** applicable when violated_rule=OTHER */ ruleName?: string | null; data?: Record | null; } interface SystemError$1 { /** Error code. */ errorCode?: string | null; } interface CarrierErrors { /** Carrier errors. */ errors?: CarrierError$1[]; } interface CarrierError$1 { /** Carrier ID. */ carrierId?: string; /** Error details. */ error?: Details$1; } enum WeightUnit$1 { /** Weight unit can't be classified, due to an error */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms */ KG = "KG", /** Pounds */ LB = "LB" } interface MembershipOptions { /** List of payment options that can be used. */ eligibleMemberships?: Membership[]; /** List of payment options that are owned by the member, but cannot be used due to reason provided. */ invalidMemberships?: InvalidMembership[]; /** The selected membership payment options and which line items they apply to. */ selectedMemberships?: SelectedMembership[]; } interface Membership { /** Membership ID. */ _id?: string; /** ID of the application providing this payment option. */ appId?: string; /** The name of this membership. */ name?: MembershipName; /** Line item IDs which are "paid" for by this membership. */ lineItemIds?: string[]; /** Optional - For a membership that has limited credits, information about credit usage. */ credits?: MembershipPaymentCredits; /** Optional - TMembership expiry date. */ expirationDate?: Date | null; /** Additional data about this membership. */ additionalData?: Record | null; } interface MembershipName { /** Membership name. */ original?: string; /** Translated membership name. Defaults to `original` when not provided. */ translated?: string | null; } interface MembershipPaymentCredits { /** Membership's total amount of credits. */ total?: number; /** Membership's remaining amount of credits. */ remaining?: number; } interface InvalidMembership { /** Membership details. */ membership?: Membership; /** Reason why this membership is invalid and cannot be used. */ reason?: string; } interface V1AdditionalFee { /** Additional fee's unique code (or ID) for future processing. */ code?: string | null; /** Translated additional fee's name. */ name?: string; /** Additional fee's price. */ price?: MultiCurrencyPrice; /** Tax details. */ taxDetails?: ItemTaxFullDetails; /** Provider's app id. */ providerAppId?: string | null; /** Additional fee's price before tax. */ priceBeforeTax?: MultiCurrencyPrice; /** Additional fee's price after tax. */ priceAfterTax?: MultiCurrencyPrice; /** * Optional - Line items associated with this additional fee. * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order. */ lineItemIds?: string[]; /** * Number of subscription cycle this fee applies to * default None - all billing cycle * @internal */ subscriptionCycles?: number | null; } /** * Returns a totals calculation for specified line items. * @public * @documentationMaturity preview * @requiredField options.lineItems._id * @requiredField options.lineItems.price * @requiredField options.lineItems.quantity * @requiredField options.merchantDiscounts.amount * @requiredField options.selectedMemberships.memberships._id * @requiredField options.selectedMemberships.memberships.appId * @requiredField options.selectedMemberships.memberships.lineItemIds * @requiredField options.selectedShippingOption.code * @permissionId ECOM.CALCULATE_TOTALS * @adminMethod */ function calculateTotals(options?: CalculateTotalsOptions): Promise; interface CalculateTotalsOptions extends CalculateTotalsRequestCouponOneOf, CalculateTotalsRequestGiftCardOneOf { /** * Calculation ID. An identifier of the entity that you are calculating totals for, for example, cart ID or checkout ID. * This value will be used in order to optimise calculations by caching. * If not passed, calculation might be slower in some cases. */ calculationId?: string | null; /** Line items for calculation. */ lineItems?: LineItem[]; /** Shipping address for tax and shipping calculation (if applicable). */ shippingAddress?: Address$1; /** Billing address. Used for calculating tax if all the items in the cart are not shippable. */ billingAddress?: Address$1; /** Details about selected shipping option. */ selectedShippingOption?: SelectedShippingOption; /** Coupon ID. */ couponId?: string | null; /** Coupon code. */ couponCode?: string | null; /** Gift card ID. */ giftCardId?: string | null; /** Gift card code. */ giftCardCode?: string | null; /** * Merchant discounts to apply to specific line items. If no `lineItemIds` are passed, the discount will be applied to the whole cart/checkout. * @deprecated */ merchantDiscounts?: MerchantDiscountInput[]; /** Buyer email. Used to enforce coupon [single-use per customer](https://support.wix.com/en/article/wix-stores-limiting-coupon-usage). If not passed, single coupon usage per customer will not be enforced. */ buyerEmail?: string | null; /** * Whether to calculate tax in the calculation request. * * Default: `true` * @internal */ calculateTax?: boolean | null; /** * Member id to use for this calculation * When not provided, given that the caller is a member, its member id will be used * Providing this require elevated permissions - ECOM.ADMIN_CALCULATE_TOTALS */ memberId?: string | null; /** * The selected memberships and which line items they apply to * When not provided, default selection will be returned * You can also set it to empty selection */ selectedMemberships?: SelectedMemberships; /** * Whether to calculate shipping in the calculation request. * * Default: `true` * @internal */ calculateShipping?: boolean | null; /** Buyer phone number. Used to get shipping rates. */ buyerPhone?: string | null; /** * Whether to calculate discount rules in the calculation request. If not passed, discount rules are being calculated. * @internal */ calculateDiscountRules?: boolean | null; /** * Shipping information that will be used instead of calculated shipping info. * @internal */ shippingOptions?: CarrierShippingOption[]; /** * Applied discounts that will be used instead of calculated discounts. * @internal */ appliedDiscounts?: AppliedDiscount[]; /** * Additional Fees that will be used instead of calculated additional fees * @internal */ additionalFees?: AdditionalFee[]; /** * List of data that should not be fetched by Totals calculator * @internal */ skipDataFetch?: DataFetchType[]; /** * __Deprecated.__ Use `purchaseFlowId` instead. * @internal * @deprecated */ ecomId?: string | null; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; /** * Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system. * For example, a Wix Pay Link ID. * @internal */ externalReferences?: ExternalReference[]; /** * The business location ID to be used as the basis for some calculations. * Learn more about the [Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction). * @internal */ businessLocationId?: string | null; } type ecomV1TotalsCalculation_universal_d_TotalsCalculationEntity = TotalsCalculationEntity; type ecomV1TotalsCalculation_universal_d_CalculateTotalsRequest = CalculateTotalsRequest; type ecomV1TotalsCalculation_universal_d_CalculateTotalsRequestCouponOneOf = CalculateTotalsRequestCouponOneOf; type ecomV1TotalsCalculation_universal_d_CalculateTotalsRequestGiftCardOneOf = CalculateTotalsRequestGiftCardOneOf; type ecomV1TotalsCalculation_universal_d_LineItem = LineItem; type ecomV1TotalsCalculation_universal_d_Scope = Scope; type ecomV1TotalsCalculation_universal_d_Group = Group; type ecomV1TotalsCalculation_universal_d_SubscriptionSettings = SubscriptionSettings; type ecomV1TotalsCalculation_universal_d_SubscriptionFrequency = SubscriptionFrequency; const ecomV1TotalsCalculation_universal_d_SubscriptionFrequency: typeof SubscriptionFrequency; type ecomV1TotalsCalculation_universal_d_PaymentOptionType = PaymentOptionType; const ecomV1TotalsCalculation_universal_d_PaymentOptionType: typeof PaymentOptionType; type ecomV1TotalsCalculation_universal_d_ServiceProperties = ServiceProperties; type ecomV1TotalsCalculation_universal_d_ItemType = ItemType; type ecomV1TotalsCalculation_universal_d_ItemTypeItemTypeDataOneOf = ItemTypeItemTypeDataOneOf; type ecomV1TotalsCalculation_universal_d_ItemTypeItemType = ItemTypeItemType; const ecomV1TotalsCalculation_universal_d_ItemTypeItemType: typeof ItemTypeItemType; type ecomV1TotalsCalculation_universal_d_TaxableAddress = TaxableAddress; type ecomV1TotalsCalculation_universal_d_TaxableAddressTaxableAddressDataOneOf = TaxableAddressTaxableAddressDataOneOf; type ecomV1TotalsCalculation_universal_d_TaxableAddressType = TaxableAddressType; const ecomV1TotalsCalculation_universal_d_TaxableAddressType: typeof TaxableAddressType; type ecomV1TotalsCalculation_universal_d_ApiV1AdditionalFee = ApiV1AdditionalFee; type ecomV1TotalsCalculation_universal_d_V1TaxDetails = V1TaxDetails; type ecomV1TotalsCalculation_universal_d_SelectedShippingOption = SelectedShippingOption; type ecomV1TotalsCalculation_universal_d_MerchantDiscountInput = MerchantDiscountInput; type ecomV1TotalsCalculation_universal_d_SelectedMemberships = SelectedMemberships; type ecomV1TotalsCalculation_universal_d_SelectedMembership = SelectedMembership; type ecomV1TotalsCalculation_universal_d_CarrierShippingOption = CarrierShippingOption; type ecomV1TotalsCalculation_universal_d_ShippingOption = ShippingOption; type ecomV1TotalsCalculation_universal_d_ShippingPrice = ShippingPrice; type ecomV1TotalsCalculation_universal_d_MultiCurrencyPrice = MultiCurrencyPrice; type ecomV1TotalsCalculation_universal_d_OtherCharge = OtherCharge; type ecomV1TotalsCalculation_universal_d_AppliedDiscount = AppliedDiscount; type ecomV1TotalsCalculation_universal_d_AppliedDiscountDiscountSourceOneOf = AppliedDiscountDiscountSourceOneOf; type ecomV1TotalsCalculation_universal_d_DiscountType = DiscountType; const ecomV1TotalsCalculation_universal_d_DiscountType: typeof DiscountType; type ecomV1TotalsCalculation_universal_d_Coupon = Coupon; type ecomV1TotalsCalculation_universal_d_MerchantDiscount = MerchantDiscount; type ecomV1TotalsCalculation_universal_d_DiscountRule = DiscountRule; type ecomV1TotalsCalculation_universal_d_DiscountRuleName = DiscountRuleName; type ecomV1TotalsCalculation_universal_d_LineItemDiscount = LineItemDiscount; type ecomV1TotalsCalculation_universal_d_AdditionalFee = AdditionalFee; type ecomV1TotalsCalculation_universal_d_TaxDetails = TaxDetails; type ecomV1TotalsCalculation_universal_d_DataFetchType = DataFetchType; const ecomV1TotalsCalculation_universal_d_DataFetchType: typeof DataFetchType; type ecomV1TotalsCalculation_universal_d_ExternalReference = ExternalReference; type ecomV1TotalsCalculation_universal_d_CalculateTotalsResponse = CalculateTotalsResponse; type ecomV1TotalsCalculation_universal_d_CalculatedLineItem = CalculatedLineItem; type ecomV1TotalsCalculation_universal_d_LineItemPricesData = LineItemPricesData; type ecomV1TotalsCalculation_universal_d_ItemTaxFullDetails = ItemTaxFullDetails; type ecomV1TotalsCalculation_universal_d_TaxRateBreakdown = TaxRateBreakdown; type ecomV1TotalsCalculation_universal_d_TaxBreakdown = TaxBreakdown; type ecomV1TotalsCalculation_universal_d_JurisdictionType = JurisdictionType; const ecomV1TotalsCalculation_universal_d_JurisdictionType: typeof JurisdictionType; type ecomV1TotalsCalculation_universal_d_PriceSummary = PriceSummary; type ecomV1TotalsCalculation_universal_d_GiftCard = GiftCard; type ecomV1TotalsCalculation_universal_d_TaxSummary = TaxSummary; type ecomV1TotalsCalculation_universal_d_TaxCalculationDetails = TaxCalculationDetails; type ecomV1TotalsCalculation_universal_d_TaxCalculationDetailsCalculationDetailsOneOf = TaxCalculationDetailsCalculationDetailsOneOf; type ecomV1TotalsCalculation_universal_d_RateType = RateType; const ecomV1TotalsCalculation_universal_d_RateType: typeof RateType; type ecomV1TotalsCalculation_universal_d_ManualCalculationReason = ManualCalculationReason; const ecomV1TotalsCalculation_universal_d_ManualCalculationReason: typeof ManualCalculationReason; type ecomV1TotalsCalculation_universal_d_AutoTaxFallbackCalculationDetails = AutoTaxFallbackCalculationDetails; type ecomV1TotalsCalculation_universal_d_FallbackReason = FallbackReason; const ecomV1TotalsCalculation_universal_d_FallbackReason: typeof FallbackReason; type ecomV1TotalsCalculation_universal_d_AggregatedTaxBreakdown = AggregatedTaxBreakdown; type ecomV1TotalsCalculation_universal_d_ShippingInformation = ShippingInformation; type ecomV1TotalsCalculation_universal_d_ShippingRegion = ShippingRegion; type ecomV1TotalsCalculation_universal_d_SelectedCarrierServiceOption = SelectedCarrierServiceOption; type ecomV1TotalsCalculation_universal_d_SelectedCarrierServiceOptionPrices = SelectedCarrierServiceOptionPrices; type ecomV1TotalsCalculation_universal_d_SelectedCarrierServiceOptionOtherCharge = SelectedCarrierServiceOptionOtherCharge; type ecomV1TotalsCalculation_universal_d_CarrierServiceOption = CarrierServiceOption; type ecomV1TotalsCalculation_universal_d_CalculationErrors = CalculationErrors; type ecomV1TotalsCalculation_universal_d_CalculationErrorsShippingCalculationErrorOneOf = CalculationErrorsShippingCalculationErrorOneOf; type ecomV1TotalsCalculation_universal_d_CarrierErrors = CarrierErrors; type ecomV1TotalsCalculation_universal_d_MembershipOptions = MembershipOptions; type ecomV1TotalsCalculation_universal_d_Membership = Membership; type ecomV1TotalsCalculation_universal_d_MembershipName = MembershipName; type ecomV1TotalsCalculation_universal_d_MembershipPaymentCredits = MembershipPaymentCredits; type ecomV1TotalsCalculation_universal_d_InvalidMembership = InvalidMembership; type ecomV1TotalsCalculation_universal_d_V1AdditionalFee = V1AdditionalFee; const ecomV1TotalsCalculation_universal_d_calculateTotals: typeof calculateTotals; type ecomV1TotalsCalculation_universal_d_CalculateTotalsOptions = CalculateTotalsOptions; namespace ecomV1TotalsCalculation_universal_d { export { ecomV1TotalsCalculation_universal_d_TotalsCalculationEntity as TotalsCalculationEntity, ecomV1TotalsCalculation_universal_d_CalculateTotalsRequest as CalculateTotalsRequest, ecomV1TotalsCalculation_universal_d_CalculateTotalsRequestCouponOneOf as CalculateTotalsRequestCouponOneOf, ecomV1TotalsCalculation_universal_d_CalculateTotalsRequestGiftCardOneOf as CalculateTotalsRequestGiftCardOneOf, ecomV1TotalsCalculation_universal_d_LineItem as LineItem, CatalogReference$2 as CatalogReference, PhysicalProperties$1 as PhysicalProperties, ecomV1TotalsCalculation_universal_d_Scope as Scope, ecomV1TotalsCalculation_universal_d_Group as Group, ecomV1TotalsCalculation_universal_d_SubscriptionSettings as SubscriptionSettings, ecomV1TotalsCalculation_universal_d_SubscriptionFrequency as SubscriptionFrequency, ecomV1TotalsCalculation_universal_d_PaymentOptionType as PaymentOptionType, ecomV1TotalsCalculation_universal_d_ServiceProperties as ServiceProperties, ecomV1TotalsCalculation_universal_d_ItemType as ItemType, ecomV1TotalsCalculation_universal_d_ItemTypeItemTypeDataOneOf as ItemTypeItemTypeDataOneOf, ecomV1TotalsCalculation_universal_d_ItemTypeItemType as ItemTypeItemType, ecomV1TotalsCalculation_universal_d_TaxableAddress as TaxableAddress, ecomV1TotalsCalculation_universal_d_TaxableAddressTaxableAddressDataOneOf as TaxableAddressTaxableAddressDataOneOf, ecomV1TotalsCalculation_universal_d_TaxableAddressType as TaxableAddressType, ecomV1TotalsCalculation_universal_d_ApiV1AdditionalFee as ApiV1AdditionalFee, ecomV1TotalsCalculation_universal_d_V1TaxDetails as V1TaxDetails, Address$1 as Address, StreetAddress$1 as StreetAddress, AddressLocation$1 as AddressLocation, ecomV1TotalsCalculation_universal_d_SelectedShippingOption as SelectedShippingOption, ecomV1TotalsCalculation_universal_d_MerchantDiscountInput as MerchantDiscountInput, ecomV1TotalsCalculation_universal_d_SelectedMemberships as SelectedMemberships, ecomV1TotalsCalculation_universal_d_SelectedMembership as SelectedMembership, ecomV1TotalsCalculation_universal_d_CarrierShippingOption as CarrierShippingOption, ecomV1TotalsCalculation_universal_d_ShippingOption as ShippingOption, DeliveryLogistics$1 as DeliveryLogistics, PickupDetails$1 as PickupDetails, PickupMethod$1 as PickupMethod, DeliveryTimeSlot$1 as DeliveryTimeSlot, ecomV1TotalsCalculation_universal_d_ShippingPrice as ShippingPrice, ecomV1TotalsCalculation_universal_d_MultiCurrencyPrice as MultiCurrencyPrice, ecomV1TotalsCalculation_universal_d_OtherCharge as OtherCharge, ChargeType$1 as ChargeType, DeliveryAllocation$1 as DeliveryAllocation, Carrier$1 as Carrier, Region$1 as Region, ApplicableLineItems$1 as ApplicableLineItems, ecomV1TotalsCalculation_universal_d_AppliedDiscount as AppliedDiscount, ecomV1TotalsCalculation_universal_d_AppliedDiscountDiscountSourceOneOf as AppliedDiscountDiscountSourceOneOf, ecomV1TotalsCalculation_universal_d_DiscountType as DiscountType, ecomV1TotalsCalculation_universal_d_Coupon as Coupon, ecomV1TotalsCalculation_universal_d_MerchantDiscount as MerchantDiscount, ecomV1TotalsCalculation_universal_d_DiscountRule as DiscountRule, ecomV1TotalsCalculation_universal_d_DiscountRuleName as DiscountRuleName, ecomV1TotalsCalculation_universal_d_LineItemDiscount as LineItemDiscount, ecomV1TotalsCalculation_universal_d_AdditionalFee as AdditionalFee, ecomV1TotalsCalculation_universal_d_TaxDetails as TaxDetails, ecomV1TotalsCalculation_universal_d_DataFetchType as DataFetchType, ecomV1TotalsCalculation_universal_d_ExternalReference as ExternalReference, ecomV1TotalsCalculation_universal_d_CalculateTotalsResponse as CalculateTotalsResponse, ecomV1TotalsCalculation_universal_d_CalculatedLineItem as CalculatedLineItem, ecomV1TotalsCalculation_universal_d_LineItemPricesData as LineItemPricesData, ecomV1TotalsCalculation_universal_d_ItemTaxFullDetails as ItemTaxFullDetails, ecomV1TotalsCalculation_universal_d_TaxRateBreakdown as TaxRateBreakdown, ecomV1TotalsCalculation_universal_d_TaxBreakdown as TaxBreakdown, ecomV1TotalsCalculation_universal_d_JurisdictionType as JurisdictionType, ecomV1TotalsCalculation_universal_d_PriceSummary as PriceSummary, ecomV1TotalsCalculation_universal_d_GiftCard as GiftCard, ecomV1TotalsCalculation_universal_d_TaxSummary as TaxSummary, ecomV1TotalsCalculation_universal_d_TaxCalculationDetails as TaxCalculationDetails, ecomV1TotalsCalculation_universal_d_TaxCalculationDetailsCalculationDetailsOneOf as TaxCalculationDetailsCalculationDetailsOneOf, ecomV1TotalsCalculation_universal_d_RateType as RateType, ecomV1TotalsCalculation_universal_d_ManualCalculationReason as ManualCalculationReason, ecomV1TotalsCalculation_universal_d_AutoTaxFallbackCalculationDetails as AutoTaxFallbackCalculationDetails, ecomV1TotalsCalculation_universal_d_FallbackReason as FallbackReason, ApplicationError$1 as ApplicationError, ecomV1TotalsCalculation_universal_d_AggregatedTaxBreakdown as AggregatedTaxBreakdown, ecomV1TotalsCalculation_universal_d_ShippingInformation as ShippingInformation, ecomV1TotalsCalculation_universal_d_ShippingRegion as ShippingRegion, ecomV1TotalsCalculation_universal_d_SelectedCarrierServiceOption as SelectedCarrierServiceOption, ecomV1TotalsCalculation_universal_d_SelectedCarrierServiceOptionPrices as SelectedCarrierServiceOptionPrices, ecomV1TotalsCalculation_universal_d_SelectedCarrierServiceOptionOtherCharge as SelectedCarrierServiceOptionOtherCharge, ecomV1TotalsCalculation_universal_d_CarrierServiceOption as CarrierServiceOption, ecomV1TotalsCalculation_universal_d_CalculationErrors as CalculationErrors, ecomV1TotalsCalculation_universal_d_CalculationErrorsShippingCalculationErrorOneOf as CalculationErrorsShippingCalculationErrorOneOf, Details$1 as Details, DetailsKindOneOf$1 as DetailsKindOneOf, ValidationError$1 as ValidationError, RuleType$1 as RuleType, FieldViolation$1 as FieldViolation, SystemError$1 as SystemError, ecomV1TotalsCalculation_universal_d_CarrierErrors as CarrierErrors, CarrierError$1 as CarrierError, WeightUnit$1 as WeightUnit, ecomV1TotalsCalculation_universal_d_MembershipOptions as MembershipOptions, ecomV1TotalsCalculation_universal_d_Membership as Membership, ecomV1TotalsCalculation_universal_d_MembershipName as MembershipName, ecomV1TotalsCalculation_universal_d_MembershipPaymentCredits as MembershipPaymentCredits, ecomV1TotalsCalculation_universal_d_InvalidMembership as InvalidMembership, ecomV1TotalsCalculation_universal_d_V1AdditionalFee as V1AdditionalFee, ecomV1TotalsCalculation_universal_d_calculateTotals as calculateTotals, ecomV1TotalsCalculation_universal_d_CalculateTotalsOptions as CalculateTotalsOptions, }; } interface DeliveryRatesGateway { /** @readonly */ _id?: string | null; } interface GetDeliveryOptionsRequest { /** list of items to delivery that each of them points to delivery profile and delivery rule. */ items: DeliverableItem[]; /** Destination the items should deliver to */ destination: Address; /** Origin the items should deliver from */ origin?: Address; /** Currency - Defaults to site's currency */ currency: string | null; /** Contact details */ buyerDetails?: FullAddressContactDetails; /** Measure unit - defaults to site's weight unit */ weightUnit?: WeightUnit; /** list of delivery preferences which are delivery options codes combined with provider app id */ userIntent?: UserIntent[]; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; /** Whether tax is included in the items' prices. */ taxIncludedInPrices?: boolean | null; } interface DeliverableItem { /** The ID of the line item. */ _id?: string; /** Item name. */ name?: string; /** The number of items ordered. */ quantity?: number; /** Reference to the item's origin catalog. */ catalogReference?: CatalogReference$1; /** Physical properties of the item. */ physicalProperties?: PhysicalProperties; /** Price of a single item after discounts. */ price?: string; /** Total line item price before discounts. */ totalPriceBeforeDiscount?: string | null; /** Price of a single item before discounts. */ priceBeforeDiscount?: string | null; /** Total line item price after discounts. This is equal to `price` multiplied by `quantity`. */ totalPrice?: string | null; /** For delivery rates by delivery profile id */ deliveryProfileId?: string | null; /** whether tax is included in line item price */ taxIncludedInPrice?: boolean | null; } /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */ interface CatalogReference$1 { /** ID of the item within the catalog it belongs to. */ catalogItemId?: string; /** * ID of the app providing the catalog. * * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). * * For items from Wix catalogs, the following values always apply: * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` */ appId?: string; /** * Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items. * * For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration). */ options?: Record | null; } interface PhysicalProperties { /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */ weight?: number | null; /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */ sku?: string | null; /** Whether this line item is shippable. */ shippable?: boolean; } /** Physical address */ interface Address extends AddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress; /** Main address line, usually street and number as free text. */ addressLine1?: string | null; /** Country code. */ country?: string | null; /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision?: string | null; /** City name. */ city?: string | null; /** Zip/postal code. */ postalCode?: string | null; /** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */ addressLine2?: string | null; /** * A string containing the full address of this location. * @internal */ formatted?: string | null; /** * Coordinates of the physical address. * @internal */ location?: AddressLocation; /** * Country full name. * @internal */ countryFullname?: string | null; /** * Subdivision full name. * @internal */ subdivisionFullname?: string | null; /** * Multi-level subdivisions from top to bottom. * @internal */ subdivisions?: Subdivision[]; } /** @oneof */ interface AddressStreetOneOf { /** Street name and number. */ streetAddress?: StreetAddress; /** Main address line, usually street and number as free text. */ addressLine?: string | null; } interface StreetAddress { /** Street number. */ number?: string; /** Street name. */ name?: string; /** * Apartment number. * @internal */ apt?: string; /** * Optional address line 1 * @internal */ formattedAddressLine?: string | null; } interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } interface Subdivision { /** Short subdivision code. */ code?: string; /** Subdivision full name. */ name?: string; /** * Subdivision level * @internal */ type?: SubdivisionType; /** * Free text description of subdivision type. * @internal */ typeInfo?: string | null; } enum SubdivisionType { UNKNOWN_SUBDIVISION_TYPE = "UNKNOWN_SUBDIVISION_TYPE", /** State */ ADMINISTRATIVE_AREA_LEVEL_1 = "ADMINISTRATIVE_AREA_LEVEL_1", /** County */ ADMINISTRATIVE_AREA_LEVEL_2 = "ADMINISTRATIVE_AREA_LEVEL_2", /** City/town */ ADMINISTRATIVE_AREA_LEVEL_3 = "ADMINISTRATIVE_AREA_LEVEL_3", /** Neighborhood/quarter */ ADMINISTRATIVE_AREA_LEVEL_4 = "ADMINISTRATIVE_AREA_LEVEL_4", /** Street/block */ ADMINISTRATIVE_AREA_LEVEL_5 = "ADMINISTRATIVE_AREA_LEVEL_5", /** ADMINISTRATIVE_AREA_LEVEL_0. Indicates the national political entity, and is typically the highest order type returned by the Geocoder. */ COUNTRY = "COUNTRY" } /** Full contact details for an address */ interface FullAddressContactDetails { /** Contact's first name. */ firstName?: string | null; /** Contact's last name. */ lastName?: string | null; /** * Contact's full name. * @internal */ fullName?: string | null; /** Contact's phone number. */ phone?: string | null; /** Contact's company name. */ company?: string | null; /** Email associated with the address. */ email?: string | null; /** Tax info. Currently usable only in Brazil. */ vatId?: VatId; } interface VatId { /** Customer's tax ID. */ _id?: string; /** * Tax type. * * Supported values: * + `CPF`: for individual tax payers * + `CNPJ`: for corporations */ type?: VatType; } /** tax info types */ enum VatType { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } enum WeightUnit { /** Weight unit can't be classified, due to an error */ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT", /** Kilograms */ KG = "KG", /** Pounds */ LB = "LB" } interface UserIntent { /** The provider app id */ appId?: string | null; /** Delivery option code to be used by the TPA as a hint to what delivery option to use */ code?: string; } /** * Each delivery option has a list of items that can be delivered by it - the chosen one * on Errors throw a business error from TC to catch and trigger destination completion */ interface GetDeliveryOptionsResponse { /** Delivery Options with their associated items */ deliveryOptions?: DeliveryOption[]; /** If a carrier could not calculate shipping rates, the error will be detailed here */ errors?: CarrierError[]; } interface DeliveryOption { /** If the delivery option is a partial and doesn't apply to all items, this field will be populated. */ partial?: PartialDeliveryOption; /** The delivery option details */ details?: DeliveryDetails; /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */ carrierDetails?: CarrierDetails[]; /** The delivery option's region details, could be multiple if the delivery option is a combination of multiple profiles */ regionDetails?: RegionDetails[]; } interface PartialDeliveryOption { /** Items that the delivery option is for. If empty, the delivery option is for all items. */ itemIds?: string[]; } interface DeliveryDetails { /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; /** Delivery rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`. */ title?: string; /** Delivery logistics. */ logistics?: DeliveryLogistics; /** Delivery cost. */ cost?: DeliveryCost; } interface DeliveryLogistics { /** When the item is expected to be delivered in free text. For example, `"3-5 business days"`. */ deliveryTime?: string | null; /** Instructions for delivery. For example, for pickup: `"Ensure to come during business hours, and please don't park in the disabled spot"`. */ instructions?: string | null; /** Pickup details. Should be returned only if order is for pickup. */ pickupDetails?: PickupDetails; /** Date and Time of the delivery option */ deliveryTimeSlot?: DeliveryTimeSlot; } interface PickupDetails { /** Pickup address. */ address?: Address; /** * Pickup method. * * Supported values: * + `"STORE_PICKUP"`: When pickup is from the merchant's brick and mortar store. * + `"PICKUP_POINT"`: When item is shipped to a specified pickup point. */ pickupMethod?: PickupMethod; } enum PickupMethod { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } interface DeliveryTimeSlot { /** starting time of the delivery time slot */ from?: Date | null; /** ending time of the delivery time slot */ to?: Date | null; } interface DeliveryCost { /** The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */ price?: string; /** Currency of the shipping rate price as a 3-letter [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217). Must align with the `currency` passed to the function under the `metadata` field. */ currency?: string; /** Additional costs. For example, a handling fee for packaging fragile items. */ additionalCharges?: AdditionalCharge[]; } interface AdditionalCharge { /** Additional charge type. */ type?: ChargeType; /** Description of the additional charge. For example, `"Handling fee of $5 applied for gift wrapping"`. */ description?: string | null; /** Cost of additional charge. For example, `12.5`. */ price?: string; } enum ChargeType { HANDLING_FEE = "HANDLING_FEE" } interface CarrierDetails { /** The carrier app id */ appId?: string | null; /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; } interface RegionDetails { /** The delivery region id. */ _id?: string | null; /** The delivery region name. */ name?: string | null; } interface CarrierError { /** The carrier app id */ appId?: string | null; /** The error details */ errorDetails?: Details; } interface Details extends DetailsKindOneOf { applicationError?: ApplicationError; validationError?: ValidationError; systemError?: SystemError; /** * deprecated in API's - to enable migration from rendering arbitrary tracing to rest response * @deprecated */ tracing?: Record; } /** @oneof */ interface DetailsKindOneOf { applicationError?: ApplicationError; validationError?: ValidationError; systemError?: SystemError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } /** * example result: * { * "fieldViolations": [ * { * "field": "fieldA", * "description": "invalid music note. supported notes: [do,re,mi,fa,sol,la,ti]", * "violatedRule": "OTHER", * "ruleName": "INVALID_NOTE", * "data": { * "value": "FI" * } * }, * { * "field": "fieldB", * "description": "field value out of range. supported range: [0-20]", * "violatedRule": "MAX", * "data": { * "threshold": 20 * } * }, * { * "field": "fieldC", * "description": "invalid phone number. provide a valid phone number of size: [7-12], supported characters: [0-9, +, -, (, )]", * "violatedRule": "FORMAT", * "data": { * "type": "PHONE" * } * } * ] * } */ interface ValidationError { fieldViolations?: FieldViolation[]; } enum RuleType { VALIDATION = "VALIDATION", OTHER = "OTHER", MAX = "MAX", MIN = "MIN", MAX_LENGTH = "MAX_LENGTH", MIN_LENGTH = "MIN_LENGTH", MAX_SIZE = "MAX_SIZE", MIN_SIZE = "MIN_SIZE", FORMAT = "FORMAT", DECIMAL_LTE = "DECIMAL_LTE", DECIMAL_GTE = "DECIMAL_GTE", DECIMAL_LT = "DECIMAL_LT", DECIMAL_GT = "DECIMAL_GT", DECIMAL_MAX_SCALE = "DECIMAL_MAX_SCALE", INVALID_ENUM_VALUE = "INVALID_ENUM_VALUE", REQUIRED_FIELD = "REQUIRED_FIELD", FIELD_NOT_ALLOWED = "FIELD_NOT_ALLOWED", ONE_OF_ALIGNMENT = "ONE_OF_ALIGNMENT", EXACT_LENGTH = "EXACT_LENGTH", EXACT_SIZE = "EXACT_SIZE" } interface FieldViolation { field?: string; description?: string; violatedRule?: RuleType; /** applicable when violated_rule=OTHER */ ruleName?: string | null; data?: Record | null; } interface SystemError { /** Error code. */ errorCode?: string | null; } interface ProviderErrors { /** The list of errors the providers returned. */ errors?: CarrierError[]; } interface GetDeliverySolutionsRequest { /** list of items to delivery that each of them points to delivery profile and delivery rule. */ lineItems: DeliverableItem[]; /** Destination the items should deliver to */ destination: Address; /** Origin the items should deliver from */ origin?: Address; /** Currency - Defaults to site's currency */ currency: string | null; /** Contact details */ contactDetails?: FullAddressContactDetails; /** Measure unit - defaults to site's weight unit */ weightUnit?: WeightUnit; /** list of user preferences which are delivery options codes combined with delivery carrier app id */ userPreferences?: UserPreference[]; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; } interface UserPreference { /** The delivery carrier app id */ appId?: string | null; /** The delivery option code */ code?: string; } /** * Each delivery option has a list of items that can be delivered by it - the chosen one * on Errors throw a business error from TC to catch and trigger destination completion */ interface GetDeliverySolutionsResponse { /** Delivery Options with their associated items */ deliverySolutions?: DeliverySolution[]; /** If a delivery carrier could not calculate rates, the error will be detailed here */ errors?: DeliveryCarrierError[]; } interface DeliverySolution { /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; /** Delivery rate title. For example, `"USPS Standard Overnight Delivery"`, `"Standard"`, or `"First-Class Package International"`. */ title?: string; /** Delivery logistics. */ logistics?: DeliveryLogistics; /** Delivery cost. */ cost?: DeliveryCost; /** Delivery solution allocations to different delivery carriers and delivery regions */ deliveryAllocations?: DeliveryAllocation[]; /** If the delivery solution is a partial and doesn't apply to all items. */ partial?: boolean | null; } interface DeliveryAllocation { /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */ deliveryCarrier?: Carrier; /** The delivery region that are relevant for this delivery solution. */ deliveryRegion?: Region; /** Populated if the delivery solution is a partially supplied by this carrier. */ applicableLineItems?: ApplicableLineItems; } interface Carrier { /** The carrier app id */ appId?: string | null; /** Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`. */ code?: string; } interface Region { /** The delivery region id. */ _id?: string | null; /** The delivery region name. */ name?: string | null; } interface ApplicableLineItems { /** Line items that the delivery solution is for. */ lineItemIds?: string[]; } interface DeliveryCarrierError { /** The carrier app id */ appId?: string | null; /** The error details */ errorDetails?: Details; } interface DomainEvent$2 extends DomainEventBodyOneOf$2 { createdEvent?: EntityCreatedEvent$2; updatedEvent?: EntityUpdatedEvent$2; deletedEvent?: EntityDeletedEvent$2; actionEvent?: ActionEvent$2; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$2 { createdEvent?: EntityCreatedEvent$2; updatedEvent?: EntityUpdatedEvent$2; deletedEvent?: EntityDeletedEvent$2; actionEvent?: ActionEvent$2; } interface EntityCreatedEvent$2 { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$2; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$2 { deletedDate?: Date | null; } interface EntityUpdatedEvent$2 { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$2 { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$2 { bodyAsJson?: string; } interface Empty { } /** * Get Delivery Options for the given items from all relevant providers, by destination * @param items - list of items to delivery that each of them points to delivery profile and delivery rule. * @internal * @documentationMaturity preview * @requiredField items * @requiredField options.currency * @requiredField options.destination * @requiredField options.destination.country * @permissionId ECOM.CALCULATE_DELIVERY * @adminMethod * @returns Each delivery option has a list of items that can be delivered by it - the chosen one * on Errors throw a business error from TC to catch and trigger destination completion * @deprecated * @targetRemovalDate 2024-11-01 */ function getDeliveryOptions(items: DeliverableItem[], options?: GetDeliveryOptions): Promise; interface GetDeliveryOptions { /** Destination the items should deliver to */ destination: Address; /** Origin the items should deliver from */ origin?: Address; /** Currency - Defaults to site's currency */ currency: string | null; /** Contact details */ buyerDetails?: FullAddressContactDetails; /** Measure unit - defaults to site's weight unit */ weightUnit?: WeightUnit; /** list of delivery preferences which are delivery options codes combined with provider app id */ userIntent?: UserIntent[]; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; /** Whether tax is included in the items' prices. */ taxIncludedInPrices?: boolean | null; } /** * Get Delivery Solutions for the given line items from all relevant delivery carriers * @param lineItems - list of items to delivery that each of them points to delivery profile and delivery rule. * @public * @documentationMaturity preview * @requiredField lineItems * @requiredField options.currency * @requiredField options.destination * @requiredField options.destination.country * @permissionId ECOM.DELIVERY_SOLUTION_READ * @returns Each delivery option has a list of items that can be delivered by it - the chosen one * on Errors throw a business error from TC to catch and trigger destination completion */ function getDeliverySolutions(lineItems: DeliverableItem[], options?: GetDeliverySolutionsOptions): Promise; interface GetDeliverySolutionsOptions { /** Destination the items should deliver to */ destination: Address; /** Origin the items should deliver from */ origin?: Address; /** Currency - Defaults to site's currency */ currency: string | null; /** Contact details */ contactDetails?: FullAddressContactDetails; /** Measure unit - defaults to site's weight unit */ weightUnit?: WeightUnit; /** list of user preferences which are delivery options codes combined with delivery carrier app id */ userPreferences?: UserPreference[]; /** Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order. */ purchaseFlowId?: string | null; } type gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryRatesGateway = DeliveryRatesGateway; type gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliveryOptionsRequest = GetDeliveryOptionsRequest; type gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliverableItem = DeliverableItem; type gatewaysEcomV1DeliveryRatesGateway_universal_d_PhysicalProperties = PhysicalProperties; type gatewaysEcomV1DeliveryRatesGateway_universal_d_Address = Address; type gatewaysEcomV1DeliveryRatesGateway_universal_d_AddressStreetOneOf = AddressStreetOneOf; type gatewaysEcomV1DeliveryRatesGateway_universal_d_StreetAddress = StreetAddress; type gatewaysEcomV1DeliveryRatesGateway_universal_d_AddressLocation = AddressLocation; type gatewaysEcomV1DeliveryRatesGateway_universal_d_Subdivision = Subdivision; type gatewaysEcomV1DeliveryRatesGateway_universal_d_SubdivisionType = SubdivisionType; const gatewaysEcomV1DeliveryRatesGateway_universal_d_SubdivisionType: typeof SubdivisionType; type gatewaysEcomV1DeliveryRatesGateway_universal_d_FullAddressContactDetails = FullAddressContactDetails; type gatewaysEcomV1DeliveryRatesGateway_universal_d_VatId = VatId; type gatewaysEcomV1DeliveryRatesGateway_universal_d_VatType = VatType; const gatewaysEcomV1DeliveryRatesGateway_universal_d_VatType: typeof VatType; type gatewaysEcomV1DeliveryRatesGateway_universal_d_WeightUnit = WeightUnit; const gatewaysEcomV1DeliveryRatesGateway_universal_d_WeightUnit: typeof WeightUnit; type gatewaysEcomV1DeliveryRatesGateway_universal_d_UserIntent = UserIntent; type gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliveryOptionsResponse = GetDeliveryOptionsResponse; type gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryOption = DeliveryOption; type gatewaysEcomV1DeliveryRatesGateway_universal_d_PartialDeliveryOption = PartialDeliveryOption; type gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryDetails = DeliveryDetails; type gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryLogistics = DeliveryLogistics; type gatewaysEcomV1DeliveryRatesGateway_universal_d_PickupDetails = PickupDetails; type gatewaysEcomV1DeliveryRatesGateway_universal_d_PickupMethod = PickupMethod; const gatewaysEcomV1DeliveryRatesGateway_universal_d_PickupMethod: typeof PickupMethod; type gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryTimeSlot = DeliveryTimeSlot; type gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryCost = DeliveryCost; type gatewaysEcomV1DeliveryRatesGateway_universal_d_AdditionalCharge = AdditionalCharge; type gatewaysEcomV1DeliveryRatesGateway_universal_d_ChargeType = ChargeType; const gatewaysEcomV1DeliveryRatesGateway_universal_d_ChargeType: typeof ChargeType; type gatewaysEcomV1DeliveryRatesGateway_universal_d_CarrierDetails = CarrierDetails; type gatewaysEcomV1DeliveryRatesGateway_universal_d_RegionDetails = RegionDetails; type gatewaysEcomV1DeliveryRatesGateway_universal_d_CarrierError = CarrierError; type gatewaysEcomV1DeliveryRatesGateway_universal_d_Details = Details; type gatewaysEcomV1DeliveryRatesGateway_universal_d_DetailsKindOneOf = DetailsKindOneOf; type gatewaysEcomV1DeliveryRatesGateway_universal_d_ApplicationError = ApplicationError; type gatewaysEcomV1DeliveryRatesGateway_universal_d_ValidationError = ValidationError; type gatewaysEcomV1DeliveryRatesGateway_universal_d_RuleType = RuleType; const gatewaysEcomV1DeliveryRatesGateway_universal_d_RuleType: typeof RuleType; type gatewaysEcomV1DeliveryRatesGateway_universal_d_FieldViolation = FieldViolation; type gatewaysEcomV1DeliveryRatesGateway_universal_d_SystemError = SystemError; type gatewaysEcomV1DeliveryRatesGateway_universal_d_ProviderErrors = ProviderErrors; type gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliverySolutionsRequest = GetDeliverySolutionsRequest; type gatewaysEcomV1DeliveryRatesGateway_universal_d_UserPreference = UserPreference; type gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliverySolutionsResponse = GetDeliverySolutionsResponse; type gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliverySolution = DeliverySolution; type gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryAllocation = DeliveryAllocation; type gatewaysEcomV1DeliveryRatesGateway_universal_d_Carrier = Carrier; type gatewaysEcomV1DeliveryRatesGateway_universal_d_Region = Region; type gatewaysEcomV1DeliveryRatesGateway_universal_d_ApplicableLineItems = ApplicableLineItems; type gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryCarrierError = DeliveryCarrierError; type gatewaysEcomV1DeliveryRatesGateway_universal_d_Empty = Empty; const gatewaysEcomV1DeliveryRatesGateway_universal_d_getDeliveryOptions: typeof getDeliveryOptions; type gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliveryOptions = GetDeliveryOptions; const gatewaysEcomV1DeliveryRatesGateway_universal_d_getDeliverySolutions: typeof getDeliverySolutions; type gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliverySolutionsOptions = GetDeliverySolutionsOptions; namespace gatewaysEcomV1DeliveryRatesGateway_universal_d { export { gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryRatesGateway as DeliveryRatesGateway, gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliveryOptionsRequest as GetDeliveryOptionsRequest, gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliverableItem as DeliverableItem, CatalogReference$1 as CatalogReference, gatewaysEcomV1DeliveryRatesGateway_universal_d_PhysicalProperties as PhysicalProperties, gatewaysEcomV1DeliveryRatesGateway_universal_d_Address as Address, gatewaysEcomV1DeliveryRatesGateway_universal_d_AddressStreetOneOf as AddressStreetOneOf, gatewaysEcomV1DeliveryRatesGateway_universal_d_StreetAddress as StreetAddress, gatewaysEcomV1DeliveryRatesGateway_universal_d_AddressLocation as AddressLocation, gatewaysEcomV1DeliveryRatesGateway_universal_d_Subdivision as Subdivision, gatewaysEcomV1DeliveryRatesGateway_universal_d_SubdivisionType as SubdivisionType, gatewaysEcomV1DeliveryRatesGateway_universal_d_FullAddressContactDetails as FullAddressContactDetails, gatewaysEcomV1DeliveryRatesGateway_universal_d_VatId as VatId, gatewaysEcomV1DeliveryRatesGateway_universal_d_VatType as VatType, gatewaysEcomV1DeliveryRatesGateway_universal_d_WeightUnit as WeightUnit, gatewaysEcomV1DeliveryRatesGateway_universal_d_UserIntent as UserIntent, gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliveryOptionsResponse as GetDeliveryOptionsResponse, gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryOption as DeliveryOption, gatewaysEcomV1DeliveryRatesGateway_universal_d_PartialDeliveryOption as PartialDeliveryOption, gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryDetails as DeliveryDetails, gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryLogistics as DeliveryLogistics, gatewaysEcomV1DeliveryRatesGateway_universal_d_PickupDetails as PickupDetails, gatewaysEcomV1DeliveryRatesGateway_universal_d_PickupMethod as PickupMethod, gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryTimeSlot as DeliveryTimeSlot, gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryCost as DeliveryCost, gatewaysEcomV1DeliveryRatesGateway_universal_d_AdditionalCharge as AdditionalCharge, gatewaysEcomV1DeliveryRatesGateway_universal_d_ChargeType as ChargeType, gatewaysEcomV1DeliveryRatesGateway_universal_d_CarrierDetails as CarrierDetails, gatewaysEcomV1DeliveryRatesGateway_universal_d_RegionDetails as RegionDetails, gatewaysEcomV1DeliveryRatesGateway_universal_d_CarrierError as CarrierError, gatewaysEcomV1DeliveryRatesGateway_universal_d_Details as Details, gatewaysEcomV1DeliveryRatesGateway_universal_d_DetailsKindOneOf as DetailsKindOneOf, gatewaysEcomV1DeliveryRatesGateway_universal_d_ApplicationError as ApplicationError, gatewaysEcomV1DeliveryRatesGateway_universal_d_ValidationError as ValidationError, gatewaysEcomV1DeliveryRatesGateway_universal_d_RuleType as RuleType, gatewaysEcomV1DeliveryRatesGateway_universal_d_FieldViolation as FieldViolation, gatewaysEcomV1DeliveryRatesGateway_universal_d_SystemError as SystemError, gatewaysEcomV1DeliveryRatesGateway_universal_d_ProviderErrors as ProviderErrors, gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliverySolutionsRequest as GetDeliverySolutionsRequest, gatewaysEcomV1DeliveryRatesGateway_universal_d_UserPreference as UserPreference, gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliverySolutionsResponse as GetDeliverySolutionsResponse, gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliverySolution as DeliverySolution, gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryAllocation as DeliveryAllocation, gatewaysEcomV1DeliveryRatesGateway_universal_d_Carrier as Carrier, gatewaysEcomV1DeliveryRatesGateway_universal_d_Region as Region, gatewaysEcomV1DeliveryRatesGateway_universal_d_ApplicableLineItems as ApplicableLineItems, gatewaysEcomV1DeliveryRatesGateway_universal_d_DeliveryCarrierError as DeliveryCarrierError, DomainEvent$2 as DomainEvent, DomainEventBodyOneOf$2 as DomainEventBodyOneOf, EntityCreatedEvent$2 as EntityCreatedEvent, RestoreInfo$2 as RestoreInfo, EntityUpdatedEvent$2 as EntityUpdatedEvent, EntityDeletedEvent$2 as EntityDeletedEvent, ActionEvent$2 as ActionEvent, gatewaysEcomV1DeliveryRatesGateway_universal_d_Empty as Empty, gatewaysEcomV1DeliveryRatesGateway_universal_d_getDeliveryOptions as getDeliveryOptions, gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliveryOptions as GetDeliveryOptions, gatewaysEcomV1DeliveryRatesGateway_universal_d_getDeliverySolutions as getDeliverySolutions, gatewaysEcomV1DeliveryRatesGateway_universal_d_GetDeliverySolutionsOptions as GetDeliverySolutionsOptions, }; } /** * Tip settings define how tips are calculated and distributed among staff. When * Wix Tips is installed, default settings are automatically created. You can't * delete these default settings but you can update them. Creating additional * settings allows business owners to customize tip screens for different payment * terminals or set specific presets for various products or services. */ interface TipSettings extends TipSettingsIdentifierOneOf { /** * ID of the [location](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) * for which the tip settings apply. */ locationId?: string | null; /** * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't * validate the ID you provide. * * Max: 30 characters */ paymentTerminalId?: string | null; /** * ID of the Wix user for whom the tip settings apply. For example, the site owner or a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). */ userId?: string | null; /** * ID of the tip settings. * @readonly */ _id?: string | null; /** * Tip type. * * Supported values: * + `UNKNOWN_TIP_TYPE`: There is no information about the tip type. * + `PERCENTAGE`: The tip is calculated as a percentage of the subtotal for all related line items. * + `AMOUNT`: The tip is a fixed amount. */ tipType?: TipType$1; /** * Information about the tip choices that Wix Tips displays to customers during the * [eCommerce checkout](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup). * * Min: `1` preset * Max: `3` presets */ presets?: Preset[]; /** * Whether customer are allowed to tip during the * [eCommerce checkout](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup). */ allowCustomerTip?: boolean | null; /** * Whether the business owners are given the option to add a tip during the * payment collection flow in their dashboard. * * Default: `true` */ allowBusinessTipAtPayment?: boolean | null; /** * Whether customers can enter a custom tip amount. If set to `false`, customers * can only select a tip value from the available `presets` and can't enter a * custom amount. * * Default: `true` */ allowCustomAmount?: boolean | null; /** * Whether business owners are allowed to edit tip distributions. If set to * `false`, owners can't edit distributions after they were created. * * Default: `true` */ allowEditDistribution?: boolean | null; /** * How the tip is distributed among staff. * * Supported values: * `UNKNOWN_SPLIT_METHOD`: There is no information about the staff distribution method. * `EQUAL`: The tip is distributed equally among all staff. * `PROPORTIONAL`: The tip is distributed proportionally among staff. */ staffDistributionMethod?: StaffDistributionMethod; /** * Revision number, which increments by 1 each time `tipSettings` object is * updated. To prevent conflicting changes, the current revision must be passed * when updating `tipSettings`. Ignored when creating a `tipSettings` object. * @readonly */ revision?: string | null; /** * Date and time the tip settings were created in * `YYYY-MM-DDThh:mm:ss.sssZ` format. * @readonly */ _createdDate?: Date | null; /** * Date and time the tip settings were last updated * `YYYY-MM-DDThh:mm:ss.sssZ` format. * @readonly */ _updatedDate?: Date | null; /** * Whether these are the default tip settings. Wix Tips automatically creates * the default settings during the app's installation. You can't delete these * default settings but you can update them. Wix Tips uses the default settings * to calculate tips, unless you specify other settings. * @readonly */ default?: boolean | null; /** * ID of the app that has created the settings. See the list of app IDs for * [Wix business solutions](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions). */ appId?: string | null; /** * Custom field data for the `tipSettings` object. Extended fields must be * configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; } /** @oneof */ interface TipSettingsIdentifierOneOf { /** * ID of the [location](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) * for which the tip settings apply. */ locationId?: string | null; /** * ID of the payment terminal for which the tip settings apply. Wix Tips doesn't * validate the ID you provide. * * Max: 30 characters */ paymentTerminalId?: string | null; /** * ID of the Wix user for whom the tip settings apply. For example, the site owner or a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). */ userId?: string | null; } enum TipType$1 { /** There is no information about the tip type. */ UNKNOWN_TIP_TYPE = "UNKNOWN_TIP_TYPE", /** The tip is calculated as a percentage of the subtotal of all related line items. */ PERCENTAGE = "PERCENTAGE", /** The tip is a fixed amount. */ AMOUNT = "AMOUNT" } interface Preset { /** * Value of the preset tip choice that's displayed to customers in the * [eCommerce checkout](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup). * For example, `5`, `10`, and `15` percent or `1`, `3`, and `5` USD. * * Min: `0` */ value?: number | null; /** * Whether this tip choice value is the dafault preset that's highlighted automatically in the * [eCommerce checkout](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup). * * Default: `false` */ default?: boolean | null; } enum StaffDistributionMethod { /** There is no information about the staff distribution method. */ UNKNOWN_SPLIT_METHOD = "UNKNOWN_SPLIT_METHOD", /** All staff receive an equal amount of the tip. */ EQUAL = "EQUAL", /** Staff receive a proportional amount of the tip. */ PROPORTIONAL = "PROPORTIONAL" } interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface QueryTipSettingsRequest { /** WQL expression */ query: QueryV2; } interface QueryV2 extends QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$1; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting$1[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ interface QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging$1; } interface Sorting$1 { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder$1; /** * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked. * * If multiple filters are provided, they are combined with AND operator. * * Example: * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]} * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] } * @internal */ selectItemsBy?: Record[] | null; } enum SortOrder$1 { ASC = "ASC", DESC = "DESC" } interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface CursorPaging$1 { /** Maximum number of items to return in the results. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryTipSettingsResponse { /** Retrieved `tipSettings` objects. */ tipSettings?: TipSettings[]; /** Metadate for the paged set of retrieved `tipSettings` objects. */ pagingMetadata?: PagingMetadataV2; } interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors$1; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. * @internal */ hasNext?: boolean | null; } interface Cursors$1 { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } interface UpdateTipSettingsRequest { /** Tip settings to update. */ tipSettings: TipSettings; /** * Field mask. * @internal */ fieldMask?: string[]; } interface UpdateTipSettingsResponse { /** Updated tip settings. */ tipSettings?: TipSettings; } interface CreateTipSettingsRequest { /** Tip settings to create. */ tipSettings: TipSettings; } interface CreateTipSettingsResponse { /** Created tip settings. */ tipSettings?: TipSettings; } interface CreateDefaultTipSettingsRequest { /** Dafault tip settings to create. */ tipSettings: TipSettings; } interface CreateDefaultTipSettingsResponse { /** Created default tip settings. */ tipSettings?: TipSettings; } interface DeleteTipSettingsRequest { /** ID of the `tipSettings` object to delete. */ tipSettingsId: string | null; } interface DeleteTipSettingsResponse { } interface DomainEvent$1 extends DomainEventBodyOneOf$1 { createdEvent?: EntityCreatedEvent$1; updatedEvent?: EntityUpdatedEvent$1; deletedEvent?: EntityDeletedEvent$1; actionEvent?: ActionEvent$1; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf$1 { createdEvent?: EntityCreatedEvent$1; updatedEvent?: EntityUpdatedEvent$1; deletedEvent?: EntityDeletedEvent$1; actionEvent?: ActionEvent$1; } interface EntityCreatedEvent$1 { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo$1; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo$1 { deletedDate?: Date | null; } interface EntityUpdatedEvent$1 { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent$1 { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent$1 { bodyAsJson?: string; } interface MessageEnvelope$1 { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData$2; /** Stringify payload. */ data?: string; } interface IdentificationData$2 extends IdentificationDataIdOneOf$2 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType$1; } /** @oneof */ interface IdentificationDataIdOneOf$2 { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType$1 { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Creates a query to retrieve a list of tip settings. * * The `queryTipSettings()` function builds a query to retrieve a list of tip settings and returns a `TipSettingsQueryBuilder` object. * * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-builder/find) function. * * You can refine the query by chaining `TipSettingsQueryBuilder` functions onto the query. `TipSettingsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTipSettings()` returns. * * `queryTipSettings()` runs with the following `TipSettingsQueryBuilder` default that you can override: * * + `limit` is `50`. * + Sorted by `id` in ascending order. * * The functions that are chained to `queryTipSettings()` are applied in the order they are called. For example, if you apply `ascending("tipType")` and then `ascending("locationId")`, the results are sorted first by the `"tipType"`, and then, if there are multiple results with the same `"tipType"`, the items are sorted by `"locationId"`. * * The following `TipSettingsQueryBuilder` functions are supported for the `queryTipSettings()` function. For a full description of the tip settings object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/ecom/tip-settings/tip-settings-query-result/items) property in `TipSettingsQueryResult`. * @public * @documentationMaturity preview * @permissionId WIX_TIPS.TIP_SETTINGS_READ */ function queryTipSettings(): TipSettingsQueryBuilder; interface QueryCursorResult$1 { cursors: Cursors$1; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface TipSettingsQueryResult extends QueryCursorResult$1 { items: TipSettings[]; query: TipSettingsQueryBuilder; next: () => Promise; prev: () => Promise; } interface TipSettingsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: 'locationId' | 'paymentTerminalId' | '_id' | 'tipType' | 'allowCustomerTip' | 'allowBusinessTipAtPayment' | 'allowCustomAmount' | 'allowEditDistribution' | 'default', value: any) => TipSettingsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: 'locationId' | 'paymentTerminalId' | '_id' | 'tipType' | 'allowCustomerTip' | 'allowBusinessTipAtPayment' | 'allowCustomAmount' | 'allowEditDistribution' | 'default', value: any) => TipSettingsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: 'locationId' | 'paymentTerminalId' | '_id', value: string) => TipSettingsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: 'locationId' | 'paymentTerminalId' | '_id' | 'tipType' | 'allowCustomerTip' | 'allowBusinessTipAtPayment' | 'allowCustomAmount' | 'allowEditDistribution' | 'default', value: any[]) => TipSettingsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: 'locationId' | 'paymentTerminalId' | '_id' | 'tipType' | 'allowCustomerTip' | 'allowBusinessTipAtPayment' | 'allowCustomAmount' | 'allowEditDistribution' | 'default', value: any) => TipSettingsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: 'locationId' | 'paymentTerminalId' | '_id' | 'tipType' | 'allowCustomerTip' | 'allowBusinessTipAtPayment' | 'allowCustomAmount' | 'allowEditDistribution' | 'default', value: boolean) => TipSettingsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'locationId' | 'paymentTerminalId' | '_id' | 'tipType' | 'allowCustomerTip' | 'allowBusinessTipAtPayment' | 'allowCustomAmount' | 'allowEditDistribution' | 'default'>) => TipSettingsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'locationId' | 'paymentTerminalId' | '_id' | 'tipType' | 'allowCustomerTip' | 'allowBusinessTipAtPayment' | 'allowCustomAmount' | 'allowEditDistribution' | 'default'>) => TipSettingsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => TipSettingsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => TipSettingsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Updates a `tipSettings` object. * * * You can't update the `default` field. * @param tipSettings - Tip settings to update. * @public * @documentationMaturity preview * @requiredField tipSettings * @param options - Options to use when updating tip settings. * @permissionId WIX_TIPS.TIP_SETTINGS_UPDATE * @adminMethod * @returns Updated tip settings. */ function updateTipSettings(tipSettings: TipSettings, options?: UpdateTipSettingsOptions): Promise; interface UpdateTipSettingsOptions { /** * Field mask. * @internal */ fieldMask?: string[]; } /** * Creates a `tipSettings` object. * * * You can't create a `tipSettings` object with `{"default": true}`. * @param tipSettings - Tip settings to create. * @public * @documentationMaturity preview * @requiredField tipSettings * @permissionId WIX_TIPS.TIP_SETTINGS_CREATE * @adminMethod * @returns Created tip settings. */ function createTipSettings(tipSettings: TipSettings): Promise; /** * Creates a default `tipSettings` object. * * * The call fails if there is already an existing default `tipSettings` object. * @param tipSettings - Dafault tip settings to create. * @public * @documentationMaturity preview * @requiredField tipSettings * @permissionId WIX_TIPS.TIP_SETTINGS_CREATE * @adminMethod */ function createDefaultTipSettings(tipSettings: TipSettings): Promise; /** * Deletes a `tipSettings` object. * * * You can't delete the default `tipSettings` object. * @param tipSettingsId - ID of the `tipSettings` object to delete. * @public * @documentationMaturity preview * @requiredField tipSettingsId * @permissionId WIX_TIPS.TIP_SETTINGS_DELETE * @adminMethod */ function deleteTipSettings(tipSettingsId: string | null): Promise; type tipsSettingsV1TipSettings_universal_d_TipSettings = TipSettings; type tipsSettingsV1TipSettings_universal_d_TipSettingsIdentifierOneOf = TipSettingsIdentifierOneOf; type tipsSettingsV1TipSettings_universal_d_Preset = Preset; type tipsSettingsV1TipSettings_universal_d_StaffDistributionMethod = StaffDistributionMethod; const tipsSettingsV1TipSettings_universal_d_StaffDistributionMethod: typeof StaffDistributionMethod; type tipsSettingsV1TipSettings_universal_d_ExtendedFields = ExtendedFields; type tipsSettingsV1TipSettings_universal_d_QueryTipSettingsRequest = QueryTipSettingsRequest; type tipsSettingsV1TipSettings_universal_d_QueryV2 = QueryV2; type tipsSettingsV1TipSettings_universal_d_QueryV2PagingMethodOneOf = QueryV2PagingMethodOneOf; type tipsSettingsV1TipSettings_universal_d_Paging = Paging; type tipsSettingsV1TipSettings_universal_d_QueryTipSettingsResponse = QueryTipSettingsResponse; type tipsSettingsV1TipSettings_universal_d_PagingMetadataV2 = PagingMetadataV2; type tipsSettingsV1TipSettings_universal_d_UpdateTipSettingsRequest = UpdateTipSettingsRequest; type tipsSettingsV1TipSettings_universal_d_UpdateTipSettingsResponse = UpdateTipSettingsResponse; type tipsSettingsV1TipSettings_universal_d_CreateTipSettingsRequest = CreateTipSettingsRequest; type tipsSettingsV1TipSettings_universal_d_CreateTipSettingsResponse = CreateTipSettingsResponse; type tipsSettingsV1TipSettings_universal_d_CreateDefaultTipSettingsRequest = CreateDefaultTipSettingsRequest; type tipsSettingsV1TipSettings_universal_d_CreateDefaultTipSettingsResponse = CreateDefaultTipSettingsResponse; type tipsSettingsV1TipSettings_universal_d_DeleteTipSettingsRequest = DeleteTipSettingsRequest; type tipsSettingsV1TipSettings_universal_d_DeleteTipSettingsResponse = DeleteTipSettingsResponse; const tipsSettingsV1TipSettings_universal_d_queryTipSettings: typeof queryTipSettings; type tipsSettingsV1TipSettings_universal_d_TipSettingsQueryResult = TipSettingsQueryResult; type tipsSettingsV1TipSettings_universal_d_TipSettingsQueryBuilder = TipSettingsQueryBuilder; const tipsSettingsV1TipSettings_universal_d_updateTipSettings: typeof updateTipSettings; type tipsSettingsV1TipSettings_universal_d_UpdateTipSettingsOptions = UpdateTipSettingsOptions; const tipsSettingsV1TipSettings_universal_d_createTipSettings: typeof createTipSettings; const tipsSettingsV1TipSettings_universal_d_createDefaultTipSettings: typeof createDefaultTipSettings; const tipsSettingsV1TipSettings_universal_d_deleteTipSettings: typeof deleteTipSettings; namespace tipsSettingsV1TipSettings_universal_d { export { tipsSettingsV1TipSettings_universal_d_TipSettings as TipSettings, tipsSettingsV1TipSettings_universal_d_TipSettingsIdentifierOneOf as TipSettingsIdentifierOneOf, TipType$1 as TipType, tipsSettingsV1TipSettings_universal_d_Preset as Preset, tipsSettingsV1TipSettings_universal_d_StaffDistributionMethod as StaffDistributionMethod, tipsSettingsV1TipSettings_universal_d_ExtendedFields as ExtendedFields, tipsSettingsV1TipSettings_universal_d_QueryTipSettingsRequest as QueryTipSettingsRequest, tipsSettingsV1TipSettings_universal_d_QueryV2 as QueryV2, tipsSettingsV1TipSettings_universal_d_QueryV2PagingMethodOneOf as QueryV2PagingMethodOneOf, Sorting$1 as Sorting, SortOrder$1 as SortOrder, tipsSettingsV1TipSettings_universal_d_Paging as Paging, CursorPaging$1 as CursorPaging, tipsSettingsV1TipSettings_universal_d_QueryTipSettingsResponse as QueryTipSettingsResponse, tipsSettingsV1TipSettings_universal_d_PagingMetadataV2 as PagingMetadataV2, Cursors$1 as Cursors, tipsSettingsV1TipSettings_universal_d_UpdateTipSettingsRequest as UpdateTipSettingsRequest, tipsSettingsV1TipSettings_universal_d_UpdateTipSettingsResponse as UpdateTipSettingsResponse, tipsSettingsV1TipSettings_universal_d_CreateTipSettingsRequest as CreateTipSettingsRequest, tipsSettingsV1TipSettings_universal_d_CreateTipSettingsResponse as CreateTipSettingsResponse, tipsSettingsV1TipSettings_universal_d_CreateDefaultTipSettingsRequest as CreateDefaultTipSettingsRequest, tipsSettingsV1TipSettings_universal_d_CreateDefaultTipSettingsResponse as CreateDefaultTipSettingsResponse, tipsSettingsV1TipSettings_universal_d_DeleteTipSettingsRequest as DeleteTipSettingsRequest, tipsSettingsV1TipSettings_universal_d_DeleteTipSettingsResponse as DeleteTipSettingsResponse, DomainEvent$1 as DomainEvent, DomainEventBodyOneOf$1 as DomainEventBodyOneOf, EntityCreatedEvent$1 as EntityCreatedEvent, RestoreInfo$1 as RestoreInfo, EntityUpdatedEvent$1 as EntityUpdatedEvent, EntityDeletedEvent$1 as EntityDeletedEvent, ActionEvent$1 as ActionEvent, MessageEnvelope$1 as MessageEnvelope, IdentificationData$2 as IdentificationData, IdentificationDataIdOneOf$2 as IdentificationDataIdOneOf, WebhookIdentityType$1 as WebhookIdentityType, tipsSettingsV1TipSettings_universal_d_queryTipSettings as queryTipSettings, tipsSettingsV1TipSettings_universal_d_TipSettingsQueryResult as TipSettingsQueryResult, tipsSettingsV1TipSettings_universal_d_TipSettingsQueryBuilder as TipSettingsQueryBuilder, tipsSettingsV1TipSettings_universal_d_updateTipSettings as updateTipSettings, tipsSettingsV1TipSettings_universal_d_UpdateTipSettingsOptions as UpdateTipSettingsOptions, tipsSettingsV1TipSettings_universal_d_createTipSettings as createTipSettings, tipsSettingsV1TipSettings_universal_d_createDefaultTipSettings as createDefaultTipSettings, tipsSettingsV1TipSettings_universal_d_deleteTipSettings as deleteTipSettings, }; } /** * Information about a team member who's eligible to receive a portion of the tip. * Currently, only [Bookings staff members](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction) * and [site collaborators](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site) * are eligible for tip distributions. */ interface Staff$1 { /** * Staff ID. Matches `staffMemberId` if available, or * `identificationData.wixUserId` if not. * @readonly */ _id?: string | null; /** Staff name. Matches the name of the Bookings staff member if available. */ name?: string | null; /** * Staff member ID. Available only if the staff is connected to a * Bookings staff member. */ staffMemberId?: string | null; /** * Identification data of the staff. Available only if the staff is a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). */ identificationData?: IdentificationData$1; } interface IdentificationData$1 extends IdentificationDataIdOneOf$1 { /** ID of a site visitor who hasn't logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor who has logged in to the site. */ memberId?: string; /** * ID of a Wix user. For example, the site owner or a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** * ID of the [contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction) * in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system. */ contactId?: string | null; /** * @internal * @readonly */ identityType?: IdentityType$1; } /** @oneof */ interface IdentificationDataIdOneOf$1 { /** ID of a site visitor who hasn't logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor who has logged in to the site. */ memberId?: string; /** * ID of a Wix user. For example, the site owner or a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum IdentityType$1 { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface ListTippableStaffRequest { /** * Whether to include staff who are only Wix users and not * Bookings staff members in the response. Setting `{"includeWixUsers": true}` returns all tippable * staff, including Bookings staff, site collaborators, or those who are both. * By default, or if you provide `{"includeWixUsers": false}`, only Bookings * staff members or those who are both are returned. * * Default: `false`. */ includeWixUsers?: boolean; /** * Filters the returned staff by name. If you provide a name as filter, only * staff whose names start with the given input are returned. The filter isn't * case sensitive. * * Max: 500 characters */ filterByName?: string | null; /** * Filters the returned staff by ID. If you provide a list of IDs as filter, * only staff members with exact matching IDs are returned. * * Max: 100 IDs */ filterByIds?: string[] | null; } interface ListTippableStaffResponse { /** Retrieved staff. */ staff?: Staff$1[]; } /** * Retrieves a list of up to 100 staff who are eligible to receive tips, given * the provided filtering. * @public * @documentationMaturity preview * @param options - Options to use when listing tippable staff. * @permissionId WIX_TIPS.STAFF_READ * @adminMethod */ function listTippableStaff(options?: ListTippableStaffOptions): Promise; interface ListTippableStaffOptions { /** * Whether to include staff who are only Wix users and not Bookings staff members in the response. Setting `{"includeWixUsers": true}` returns all tippable * staff, including Bookings staff, site collaborators, or those who are both. * By default, or if you provide `{"includeWixUsers": false}`, only Bookings * staff members or those who are both are returned. * * Default: `false`. */ includeWixUsers?: boolean; /** * Filters the returned staff by name. If you provide a name as filter, only * staff whose names start with the given input are returned. The filter isn't * case sensitive. * * Max: 500 characters */ filterByName?: string | null; /** * Filters the returned staff by ID. If you provide a list of IDs as filter, * only staff members with exact matching IDs are returned. * * Max: 100 IDs */ filterByIds?: string[] | null; } type tipsStaffV1Staff_universal_d_ListTippableStaffRequest = ListTippableStaffRequest; type tipsStaffV1Staff_universal_d_ListTippableStaffResponse = ListTippableStaffResponse; const tipsStaffV1Staff_universal_d_listTippableStaff: typeof listTippableStaff; type tipsStaffV1Staff_universal_d_ListTippableStaffOptions = ListTippableStaffOptions; namespace tipsStaffV1Staff_universal_d { export { Staff$1 as Staff, IdentificationData$1 as IdentificationData, IdentificationDataIdOneOf$1 as IdentificationDataIdOneOf, IdentityType$1 as IdentityType, tipsStaffV1Staff_universal_d_ListTippableStaffRequest as ListTippableStaffRequest, tipsStaffV1Staff_universal_d_ListTippableStaffResponse as ListTippableStaffResponse, tipsStaffV1Staff_universal_d_listTippableStaff as listTippableStaff, tipsStaffV1Staff_universal_d_ListTippableStaffOptions as ListTippableStaffOptions, }; } /** * A tip holds information about how much a customer has tipped, how the tip is * distributed among staff, and the associated order’s line item subtotal. */ interface Tip { /** * ID of the tip. Identical to the `code` of the related `order.additionalFee`. * @readonly */ _id?: string | null; /** * Subtotal of all line items from the [eCommerce order](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) * that's related to the tip. In the response of * [previewTip()](https://dev.wix.com/docs/sdk/backend-modules/ecom/tips/preview-tip), * there is no related eCommerce order. Then, value of this field corresponds to * the sum of all line item prices passed in the request. * @readonly */ lineItemSubtotal?: string | null; /** * Total amount of the tip. * * Min: `0.00` */ amount?: string | null; /** * Details about how the tip is shared among staff. Available only if at least * one staff member receives part of the tip, and it's not entirely allocated to * the business. * * Max: 50 distributions */ distributions?: TipDistribution[]; /** * Undistributed tip amount. Calculated as the difference between `tip.amount` * and the sum of all `tip.tipDistributions.amount` values. * * Min: `0.01` * @readonly */ undistributedAmount?: string | null; } interface TipDistribution { /** * ID of the tip distribution. * @readonly */ _id?: string | null; /** * ID of the tip associated with the distribution. Matches the corresponding * `order.additionalFee.code`. * @readonly */ tipId?: string | null; /** Information about the business staff receiving the tip distribution. */ staff?: Staff; /** * Amount of the tip distribution. * * Min: `0.00` */ amount?: string | null; /** * Details about the related line items from the * [eCommerce order](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup). * */ lineItemInfo?: LineItemInfo[]; /** * Details of how the customer is charged for the tip. Available only if the * [transcation](https://dev.wix.com/docs/sdk/backend-modules/ecom/order-transactions/setup) * has been created. */ transaction?: Transaction; /** * ID of the [eCommerce order](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup) * associated with the tip distribution. Identical for all distributions that * belong to the same tip. * @readonly */ orderId?: string | null; /** * Date and time the distribution was created in * `YYYY-MM-DDThh:mm:ss.sssZ` format. * @readonly */ _createdDate?: Date | null; /** * Information about who created the tip distributions. * * Supported values: * + `UNKNOWN_SOURCE`: There is no information about who created the tip distributions. * + `POS`: The customer added the tip distributions via an external payment terminal. * + `WEB`: The customer added the tip distributions during an online [ecommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction). * + `DASHBOARD`: The business added the tip distributions on behalf of the customer in the site's dashboard. * @internal */ source?: Source; } interface CommonIdentificationData extends CommonIdentificationDataIdOneOf { /** ID of a site visitor who hasn't logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor who has logged in to the site. */ memberId?: string; /** * ID of a Wix user. For example, the site owner or a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** * ID of the [contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction) * in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system. */ contactId?: string | null; /** * @internal * @readonly */ identityType?: IdentityType; } /** @oneof */ interface CommonIdentificationDataIdOneOf { /** ID of a site visitor who hasn't logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor who has logged in to the site. */ memberId?: string; /** * ID of a Wix user. For example, the site owner or a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum IdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface Staff { /** * ID of the staff receiving the tip. Matches `staffMemberId` if available, or * `identificationData.wixUserId` if not. * @readonly */ _id?: string | null; /** * Staff name. Matches `staffMember.name` if the staff is a * Bookings staff member, * or the [contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction)'s * `info.name` if not. * * Max: 500 characters * @readonly */ name?: string | null; /** * ID of the Bookings staff member. * Available only if the staff is a staff member and not a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). */ staffMemberId?: string | null; /** * Identification data. Available only if the staff is a * [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object) * on the Wix site. Note that not all site collaborators are also * [staff members](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members/introduction). */ identificationData?: CommonIdentificationData; } interface LineItemInfo { /** * IDs of the line items associated with the tip. * * Min: 1 character * Max: 100 characters */ lineItemId?: string | null; /** * Information about the line item and the corresponding catalog. Catalogs * include Wix Bookings and Wix Stores. */ catalogReference?: CatalogReference; /** * Price of the line item. * * Min: `0.00` */ price?: string | null; /** * Name of the line item, which is identical to: * + `product.name` for [Stores](https://dev.wix.com/docs/sdk/backend-modules/stores/products/introduction). * + `service.name` for [Bookings](https://dev.wix.com/docs/sdk/backend-modules/bookings/introduction). * * Min: 1 character * Max: 200 characters */ name?: string | null; /** * Quantity of the line item. * * Min: `1` * Max: `100000` (one hundred thousand) */ quantity?: number | null; } interface CatalogReference { /** * ID of the line item within its catalog, corresponding to: * + `product.id` for [Stores](https://dev.wix.com/docs/rest/business-solutions/stores/about-wix-stores). * + `service.id` for [Bookings](https://dev.wix.com/docs/rest/business-solutions/bookings/about-wix-bookings). */ catalogItemId?: string | null; /** * ID of the [app](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions) * to which the catalog belongs. * * Supported app IDs: * + [Wix Tips](https://www.wix.com/app-market/wix-tips): `"869a50c8-dd38-4324-b201-e33dc0747a5f"` * + [Wix Stores](https://www.wix.com/app-market/wix-stores): `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` * + [Wix Bookings](https://www.wix.com/app-market/bookings): `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` * + [Wix Restaurants Orders](https://www.wix.com/app-market/web-solution/wix-restaurants-orders-new): `"13e8d036-5516-6104-b456-c8466db39542"` */ appId?: string | null; } interface Transaction { /** ID of the transaction that's associated with the tip distribution. */ _id?: string | null; /** * Date and time the transaction was created in `YYYY-MM-DDThh:mm:ss.sssZ` * format. Isn't identical to the time the customer was actually charged. */ date?: Date | null; } enum Source { /** There is no information about who created the tip distributions. */ UNKNOWN_SOURCE = "UNKNOWN_SOURCE", /** The customer added the tip distributions via an external payment terminal. */ POS = "POS", /** The customer added the tip distributions during an online [ecommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction). */ WEB = "WEB", /** The business added the tip distributions on behalf of the customer in the site's dashboard. */ DASHBOARD = "DASHBOARD" } interface PreviewTipRequest { /** * Information about the line items to preview the tip for. * * Min: 1 line item * Max: 50 line items */ lineItemInfo: LineItemInfo[]; /** * Information about how to calculate the total tip amount and the distribution * amounts. */ tipChoice: TipChoice; /** * ID of the tip settings used to preview the tip. If you don't provide a * `tipSettingsId`, the `staffDistributionMethod` is based on the site's * default tip settings. */ tipSettingsId?: string | null; } interface TipChoice { /** Value of the tip choice. */ value?: string | null; /** * Type of the tip choice. * * Supported values: * + `UNKNOWN_TIP_TYPE`: There is no information about the tip type. * + `PERCENTAGE`: The tip is calculated as a percentage of the subtotal of associated line items. * + `AMOUNT`: The tip is a fixed value, pre-configured from the relevant settings presets. * + `CUSTOM`: The customer, or the business on behalf of the customer, manually set a tip amount, which may not match any preset values. */ tipType?: TipType; } enum TipType { /** There is no information about the tip type. */ UNKNOWN_TIP_TYPE = "UNKNOWN_TIP_TYPE", /** The tip is calculated as a percentage of the subtotal of associated line items. */ PERCENTAGE = "PERCENTAGE", /** The tip is a fixed value, pre-configured from the relevant settings presets. */ AMOUNT = "AMOUNT", /** The customer, or the business on behalf of the customer, manually set a tip amount, which may not match any preset values. */ CUSTOM = "CUSTOM" } interface PreviewTipResponse { /** Tip. */ tip?: Tip; } interface GetTipByOrderIdRequest { /** ID of the order to retrieve the tip for. */ orderId: string | null; } interface GetTipByOrderIdResponse { /** Retrieved tip. */ tip?: Tip; } interface GetTipByDraftOrderIdRequest { /** ID of the draft order to retrieve the tip for. */ draftOrderId: string | null; } interface GetTipByDraftOrderIdResponse { /** Retrieved tip. */ tip?: Tip; } interface GetTipChoiceRequest { /** * ID of the [eCommerce purchase flow](https://dev.wix.com/docs/rest/business-solutions/e-commerce/wix-e-commerce-platform-handbook/overview/architecture-data-flow) * to retrieve the tip choice for. */ purchaseFlowId: string | null; } interface GetTipChoiceResponse { /** Tip choice that's currently selected for the given purchase flow. */ tipChoice?: TipChoice; } interface UpdateTipChoiceRequest { /** * Tip choice to select for the purchase flow. The call fails if you provide a * value for `tipChoice.tipType` that doesn't match the relevant tip settings * configuration. For example: * + `AMOUNT` when `tipSettings.tipType` isn't `AMOUNT`. * + `PERCENTAGE` when `tipSettings.tipType` isn't `PERCENTAGE`. * + `CUSTOM` when `tipSettings.allowCustomTip` is `false`. */ tipChoice: TipChoice; /** * ID of the purchase flow that's associated with the * [eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/order/introduction) */ purchaseFlowId: string | null; } interface UpdateTipChoiceResponse { /** * Tip choice currently selected in the * [eCommerce checkout](https://dev.wix.com/docs/rest/business-solutions/e-commerce/checkout/introduction) * for the given purchase flow. */ tipChoice?: TipChoice; } interface SetTipOnOrderRequest extends SetTipOnOrderRequestIdentifierOneOf { /** ID of the order for which to set the tip. */ orderId?: string | null; /** * ID of the draft order for which to set the tip. * @internal */ draftOrderId?: string | null; /** Tip to set on the order. */ tip: Tip; } /** @oneof */ interface SetTipOnOrderRequestIdentifierOneOf { /** ID of the order for which to set the tip. */ orderId?: string | null; /** * ID of the draft order for which to set the tip. * @internal */ draftOrderId?: string | null; } interface SetTipOnOrderResponse { /** Set tip. */ tip?: Tip; /** Information about the order on which the tip was set. */ orderInfo?: OrderInfo; } interface OrderInfo extends OrderInfoIdentifierOneOf { /** Order ID. */ orderId?: string | null; /** * Draft order ID. * @internal */ draftOrderId?: string | null; /** ID of the order's additional fee that's associated with the tip. */ additionalFeeId?: string | null; /** Price of the order's additional fee that's associated with the tip. */ additionalFeePrice?: Price; } /** @oneof */ interface OrderInfoIdentifierOneOf { /** Order ID. */ orderId?: string | null; /** * Draft order ID. * @internal */ draftOrderId?: string | null; } interface Price { /** Amount of the additional fee that's associated with the tip. */ amount?: string; /** * Amount formatted with currency symbol. * * Max: 100 characters * @readonly */ formattedAmount?: string; } interface RemoveTipFromOrderRequest extends RemoveTipFromOrderRequestIdentifierOneOf { /** ID of the order from which to remove the tip. */ orderId?: string | null; /** * ID of the draft order from which to remove the tip. * @internal */ draftOrderId?: string | null; } /** @oneof */ interface RemoveTipFromOrderRequestIdentifierOneOf { /** ID of the order from which to remove the tip. */ orderId?: string | null; /** * ID of the draft order from which to remove the tip. * @internal */ draftOrderId?: string | null; } interface RemoveTipFromOrderResponse { /** Information about the order from which the tip was removed. */ orderInfo?: OrderInfo; } interface CreateTipDistributionsRequest { /** * Tip distributions to create. * * Min: 1 distribution * Max: 50 distributions */ tipDistributions: TipDistribution[]; /** * ID of the order for which to create tip distributions. * @internal */ orderId?: string | null; /** ID of the tip for which to create distributions. */ tipId: string | null; } interface CreateTipDistributionsResponse { /** * ID of the tip for which the distributions were created. * @readonly */ tipId?: string | null; /** Created tip distributions. */ tipDistributions?: TipDistribution[]; } interface DeleteTipDistributionsRequest extends DeleteTipDistributionsRequestDeleteByOneOf { /** ID of the tip for which to delete all associated tip distributions. */ tipId: string | null; /** ID of the order for which to delete all associated tip distributions. */ orderId?: string | null; } /** @oneof */ interface DeleteTipDistributionsRequestDeleteByOneOf { /** ID of the tip for which to delete all associated tip distributions. */ tipId?: string | null; /** ID of the order for which to delete all associated tip distributions. */ orderId?: string | null; } interface DeleteTipDistributionsResponse { } interface AddTipDistributionsToOrderRequest extends AddTipDistributionsToOrderRequestIdentifierOneOf { /** ID of the order for which to add tip distributions. */ orderId?: string | null; /** * ID of the draft order for which to add tip distributions. * @internal */ draftOrderId?: string | null; /** Tip distributions to add to the order. */ tipDistributions: TipDistribution[]; } /** @oneof */ interface AddTipDistributionsToOrderRequestIdentifierOneOf { /** ID of the order for which to add tip distributions. */ orderId?: string | null; /** * ID of the draft order for which to add tip distributions. * @internal */ draftOrderId?: string | null; } interface AddTipDistributionsToOrderResponse { /** Tip distributions that were added to the order. */ tipDistributions?: TipDistribution[]; /** Information about the order to which the tip distributions were added. */ orderInfo?: OrderInfo; } interface QueryTipDistributionsRequest { /** WQL expression. */ query: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } enum SortOrder { ASC = "ASC", DESC = "DESC" } interface CursorPaging { /** Number of items to load. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } interface QueryTipDistributionsResponse { /** Retrieved tip distributions. */ tipDistributions?: TipDistribution[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ cursors?: Cursors; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. */ hasNext?: boolean | null; } interface Cursors { /** Cursor pointing to next page in the list of results. */ next?: string | null; /** Cursor pointing to previous page in the list of results. */ prev?: string | null; } interface SumTipDistributionAmountsRequest { /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter: Record | null; } interface SumTipDistributionAmountsResponse { /** Total amount of tip distributions matching the filter. */ totalAmount?: string | null; } interface ApplyTipDistributionsRequest { /** ID of the tip for which all tip distributions are applied to the order. */ tipId: string | null; /** ID of the order for which to apply all tip distributions. */ orderId: string | null; /** Whether to query by order ID or tip ID. */ queryBy?: QueryBy; } enum QueryBy { UNKNOWN_QUERY_BY = "UNKNOWN_QUERY_BY", ORDER = "ORDER", TIP = "TIP" } interface ApplyTipDistributionsResponse { /** Applied tip distributions. */ tipDistributions?: TipDistribution[]; } interface PublishTipDistributionsCreatedEventRequest { /** The tip distributions that will be published on the event. */ tipDistributions?: TipDistribution[]; /** The tip ID of the distributions */ tipId: string | null; /** The order ID that the tip is connected to */ orderId: string | null; } interface PublishTipDistributionsCreatedEventResponse { } interface TipDistributionsCreated { /** ID of the tip to which the distribution belongs. */ tipId?: string | null; /** * Created tip distributions. * * Min: 1 tip distribution * Max: 100 tip distributions */ tipDistributions?: TipDistribution[]; /** The order ID that the tip is connected to */ orderId?: string | null; /** The undistributed tip amount */ undistributedAmount?: string | null; } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** * Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity * @internal */ triggeredByUndelete?: boolean | null; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; /** * This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard * wont populate it / have any reference to it in the API. * The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed, * the developer should send only the new (current) entity. * An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big * Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message. * @internal * @deprecated */ previousEntityAsJson?: string | null; /** * WIP - This property will hold both names and previous values of the updated fields of the entity. * For more details please see [adr](https://docs.google.com/document/d/1PdqsOM20Ph2HAkmx8zvUnzzk3Sekp3BR9h34wSvsRnI/edit#heading=h.phlw87mh2imx) or [issue](https://github.com/wix-private/nile-tracker/issues/363) * @internal */ modifiedFields?: Record; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface EntityDeletedEvent { /** * Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled * @internal */ movedToTrash?: boolean | null; /** Entity that was deleted */ deletedEntityAsJson?: string | null; /** * WIP * @internal */ additionalMetadataAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** * Previews a tip for a list of line items. * * * If you provide the Wix Bookings app ID `13d21c63-b5ec-5912-8397-c3a5ddb27a97` as `lineItemInfo.catalogReference.appId`, the response includes tip * distributions for each associated Bookings staff member. * * If you don't provide a `tipSettingsId`, the `staffDistributionMethod` is * based on the site's default tip settings. * @param lineItemInfo - Information about the line items to preview the tip for. * * Min: 1 line item * Max: 50 line items * @public * @documentationMaturity preview * @requiredField lineItemInfo * @requiredField lineItemInfo.catalogReference.appId * @requiredField lineItemInfo.catalogReference.catalogItemId * @requiredField lineItemInfo.price * @requiredField options.tipChoice * @requiredField options.tipChoice.tipType * @requiredField options.tipChoice.value * @param options - Options to use when previewing a tip. * @permissionId WIX_TIPS.TIP_PREVIEW * @adminMethod */ function previewTip(lineItemInfo: LineItemInfo[], options?: PreviewTipOptions): Promise; interface PreviewTipOptions { /** * Information about how to calculate the total tip amount and the distribution * amounts. */ tipChoice: TipChoice; /** * ID of the tip settings used to preview the tip. If you don't provide a * `tipSettingsId`, the `staffDistributionMethod` is based on the site's * default tip settings. */ tipSettingsId?: string | null; } /** * Retrieves the tip that's associated with an * [eCommerce order](https://dev.wix.com/docs/sdk/backend-modules/ecom/orders/setup). * @param orderId - ID of the order to retrieve the tip for. * @public * @documentationMaturity preview * @requiredField orderId * @permissionId WIX_TIPS.TIP_READ * @adminMethod */ function getTipByOrderId(orderId: string | null): Promise; /** * Retrieves the tip that's associated with an eCommerce draft order. * * *
* * __Important:__ * The eCommerce Draft Orders API is currently under development and not yet available to users. * *
* @param draftOrderId - ID of the draft order to retrieve the tip for. * @public * @documentationMaturity preview * @requiredField draftOrderId * @permissionId WIX_TIPS.TIP_READ * @adminMethod */ function getTipByDraftOrderId(draftOrderId: string | null): Promise; /** * Retrieves the tip choice that's currently selected by the customer for a specific [eCommerce checkout](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup). * If the customer hasn't yet selected a tip choice, the response is empty. * @param purchaseFlowId - ID of the [eCommerce purchase flow](https://dev.wix.com/docs/rest/business-solutions/e-commerce/wix-e-commerce-platform-handbook/overview/architecture-data-flow) * to retrieve the tip choice for. * @public * @documentationMaturity preview * @requiredField purchaseFlowId * @permissionId WIX_TIPS.TIP_GET_CHOICE */ function getTipChoice(purchaseFlowId: string | null): Promise; /** * Updates the tip choice that's currently selected by the customer for a specific [eCommerce checkout](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup). * @param tipChoice - Tip choice to select for the purchase flow. The call fails if you provide a * value for `tipChoice.tipType` that doesn't match the relevant tip settings * configuration. For example: * + `AMOUNT` when `tipSettings.tipType` isn't `AMOUNT`. * + `PERCENTAGE` when `tipSettings.tipType` isn't `PERCENTAGE`. * + `CUSTOM` when `tipSettings.allowCustomTip` is `false`. * @public * @documentationMaturity preview * @requiredField options * @requiredField options.purchaseFlowId * @requiredField tipChoice * @param options - Options to use when updating a tip choice. * @permissionId WIX_TIPS.TIP_UPDATE_CHOICE */ function updateTipChoice(tipChoice: TipChoice, options: UpdateTipChoiceOptions): Promise; interface UpdateTipChoiceOptions { /** * ID of the purchase flow that's associated with the * [eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/order/introduction) */ purchaseFlowId: string | null; } /** * Updates the tip choice that's currently selected by the customer for a specific [eCommerce checkout](https://dev.wix.com/docs/sdk/backend-modules/ecom/checkout/setup). * @public * @documentationMaturity preview * @requiredField options.tip * @requiredField options.tip.distributions.transaction._id * @requiredField options.tip.distributions.transaction.date * @param options - Options to use when setting a tip on an order. * @permissionId WIX_TIPS.TIP_SET * @adminMethod */ function setTipOnOrder(options?: SetTipOnOrderOptions): Promise; interface SetTipOnOrderOptions extends SetTipOnOrderRequestIdentifierOneOf { /** ID of the order for which to set the tip. */ orderId?: string | null; /** * ID of the draft order for which to set the tip. * @internal */ draftOrderId?: string | null; /** Tip to set on the order. */ tip: Tip; } /** * Removes a tip from an * [eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction). * * * If no tip exists on the order, the call succeeds and the response contains an * empty `OrderInfo` object. * * The call fails if the customer has already been charged for at least one of * the associated tip distributions. * @public * @documentationMaturity preview * @param options - Options to use when removing a tip from an order. * @permissionId WIX_TIPS.TIP_REMOVE * @adminMethod */ function removeTipFromOrder(options?: RemoveTipFromOrderOptions): Promise; interface RemoveTipFromOrderOptions extends RemoveTipFromOrderRequestIdentifierOneOf { /** ID of the order from which to remove the tip. */ orderId?: string | null; /** * ID of the draft order from which to remove the tip. * @internal */ draftOrderId?: string | null; } /** * Adds new distributions to a tip. * * * The total tip amount and `undistributedAmount` remain unchanged. * * All tip distributions must belong to the same tip. * * You must provide either a `staffMemberId` or `identificationData.wixUserId` * for every distribution to create. * @param tipDistributions - Tip distributions to create. * * Min: 1 distribution * Max: 50 distributions * @internal * @documentationMaturity preview * @requiredField options.tipId * @requiredField tipDistributions * @requiredField tipDistributions.transaction._id * @requiredField tipDistributions.transaction.date * @param options - Options to use when creating tip distributions. * @permissionId WIX_TIPS.TIP_DISTRIBUTION_CREATE * @adminMethod */ function createTipDistributions(tipDistributions: TipDistribution[], options?: CreateTipDistributionsOptions): Promise; interface CreateTipDistributionsOptions { /** * ID of the order for which to create tip distributions. * @internal */ orderId?: string | null; /** ID of the tip for which to create distributions. */ tipId: string | null; } /** * Deletes a tip distribution. * * * The total tip amount and `undistributedAmount` remain unchanged. * @param tipId - ID of the tip for which to delete all associated tip distributions. * @internal * @documentationMaturity preview * @requiredField tipId * @param options - Options to use when deleting tip distributions. * @permissionId WIX_TIPS.TIP_DISTRIBUTION_DELETE * @adminMethod */ function deleteTipDistributions(tipId: string | null, options?: DeleteTipDistributionsOptions): Promise; interface DeleteTipDistributionsOptions extends DeleteTipDistributionsRequestDeleteByOneOf { /** ID of the order for which to delete all associated tip distributions. */ orderId?: string | null; } /** * Adds tip distributions to an * [eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction). * * * If no tip exists on the order, an `additionalFee` is added and the total tip * amount is equal to the sum of all distribution amounts. If a tip is already * present, the existing `additionalFee` is replaced and the total tip amount is * increased by the sum of the new tip distributions. * * The call fails if: * + The order's `paymentStatus` is either `FULLY_REFUNDED` or `PARTIALLY_REFUNDED`. * + Any of the tip distribution amounts is zero or negative. * @public * @documentationMaturity preview * @requiredField options.tipDistributions * @requiredField options.tipDistributions.transaction._id * @requiredField options.tipDistributions.transaction.date * @param options - Options to use when adding tip distributions to an order. * @permissionId WIX_TIPS.TIP_DISTRIBUTION_ADD * @adminMethod */ function addTipDistributionsToOrder(options?: AddTipDistributionsToOrderOptions): Promise; interface AddTipDistributionsToOrderOptions extends AddTipDistributionsToOrderRequestIdentifierOneOf { /** ID of the order for which to add tip distributions. */ orderId?: string | null; /** * ID of the draft order for which to add tip distributions. * @internal */ draftOrderId?: string | null; /** Tip distributions to add to the order. */ tipDistributions: TipDistribution[]; } /** * Creates a query to retrieve a list of tip distributions. * * The `queryTipDistributions()` function builds a query to retrieve a list of tip distributions and returns a `TipDistributionsQueryBuilder` object. * * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/ecom/tips/tip-distributions-query-builder/find) function. * * You can refine the query by chaining `TipDistributionsQueryBuilder` functions onto the query. `TipDistributionsQueryBuilder` functions enable you to sort, filter, and control the results that `queryTipDistributions()` returns. * * `queryTipDistributions()` runs with the following `TipDistributionsQueryBuilder` default that you can override: * * + `limit` is `50` * * The functions that are chained to `queryTipDistributions()` are applied in the order they are called. For example, if you apply `ascending("transaction.transactionDate")` and then `ascending("staff.id")`, the results are sorted first by the `"transaction.transactionDate"`, and then, if there are multiple results with the same `"transaction.transactionDate"`, the items are sorted by `"staff.id"`. * * When setting a date filter remember to use * [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). * * The following `TipDistributionsQueryBuilder` functions are supported for the `queryTipDistributions()` function. For a full description of the tip distributions object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/ecom/tips/tip-distributions-query-result/items) property in `TipDistributionsQueryResult`. * * @public * @documentationMaturity preview * @permissionId WIX_TIPS.TIP_DISTRIBUTION_READ * @adminMethod */ function queryTipDistributions(): TipDistributionsQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface TipDistributionsQueryResult extends QueryCursorResult { items: TipDistribution[]; query: TipDistributionsQueryBuilder; next: () => Promise; prev: () => Promise; } interface TipDistributionsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id', value: any) => TipDistributionsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id', value: any) => TipDistributionsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id', value: string) => TipDistributionsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id', value: any[]) => TipDistributionsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id', value: any) => TipDistributionsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id', value: boolean) => TipDistributionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id'>) => TipDistributionsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id'>) => TipDistributionsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => TipDistributionsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => TipDistributionsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Sums tip distribution amounts, given the provided filtering. * @param filter - Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` * @public * @documentationMaturity preview * @requiredField filter * @permissionId WIX_TIPS.TIP_DISTRIBUTION_READ * @adminMethod */ function sumTipDistributionAmounts(filter: Record | null): Promise; /** * Applies all tip distributions associated with the given tip as a single * `additionalFee` to an * [eCommerce order](https://dev.wix.com/docs/rest/business-solutions/e-commerce/orders/introduction). * * * You don't need to provide an order ID, it's automatically determined from the tip * distributions. * * Any existing tip distributions linked to the same order, but associated with * a different tip, are deleted. * @param tipId - ID of the tip for which all tip distributions are applied to the order. * @internal * @documentationMaturity preview * @requiredField options.orderId * @requiredField tipId * @param options - Options to use when applying tip distributions. * @permissionId WIX_TIPS.TIP_DISTRIBUTION_SET * @adminMethod */ function applyTipDistributions(tipId: string | null, options?: ApplyTipDistributionsOptions): Promise; interface ApplyTipDistributionsOptions { /** ID of the order for which to apply all tip distributions. */ orderId: string | null; /** Whether to query by order ID or tip ID. */ queryBy?: QueryBy; } /** @internal * @documentationMaturity preview * @requiredField options.orderId * @requiredField options.tipId * @permissionId WIX_TIPS.TIP_DISTRIBUTION_PUBLISH * @adminMethod */ function publishTipDistributionsCreatedEvent(options?: PublishTipDistributionsCreatedEventOptions): Promise; interface PublishTipDistributionsCreatedEventOptions { /** The tip distributions that will be published on the event. */ tipDistributions?: TipDistribution[]; /** The tip ID of the distributions */ tipId: string | null; /** The order ID that the tip is connected to */ orderId: string | null; } type tipsV1Tip_universal_d_Tip = Tip; type tipsV1Tip_universal_d_TipDistribution = TipDistribution; type tipsV1Tip_universal_d_CommonIdentificationData = CommonIdentificationData; type tipsV1Tip_universal_d_CommonIdentificationDataIdOneOf = CommonIdentificationDataIdOneOf; type tipsV1Tip_universal_d_IdentityType = IdentityType; const tipsV1Tip_universal_d_IdentityType: typeof IdentityType; type tipsV1Tip_universal_d_Staff = Staff; type tipsV1Tip_universal_d_LineItemInfo = LineItemInfo; type tipsV1Tip_universal_d_CatalogReference = CatalogReference; type tipsV1Tip_universal_d_Transaction = Transaction; type tipsV1Tip_universal_d_Source = Source; const tipsV1Tip_universal_d_Source: typeof Source; type tipsV1Tip_universal_d_PreviewTipRequest = PreviewTipRequest; type tipsV1Tip_universal_d_TipChoice = TipChoice; type tipsV1Tip_universal_d_TipType = TipType; const tipsV1Tip_universal_d_TipType: typeof TipType; type tipsV1Tip_universal_d_PreviewTipResponse = PreviewTipResponse; type tipsV1Tip_universal_d_GetTipByOrderIdRequest = GetTipByOrderIdRequest; type tipsV1Tip_universal_d_GetTipByOrderIdResponse = GetTipByOrderIdResponse; type tipsV1Tip_universal_d_GetTipByDraftOrderIdRequest = GetTipByDraftOrderIdRequest; type tipsV1Tip_universal_d_GetTipByDraftOrderIdResponse = GetTipByDraftOrderIdResponse; type tipsV1Tip_universal_d_GetTipChoiceRequest = GetTipChoiceRequest; type tipsV1Tip_universal_d_GetTipChoiceResponse = GetTipChoiceResponse; type tipsV1Tip_universal_d_UpdateTipChoiceRequest = UpdateTipChoiceRequest; type tipsV1Tip_universal_d_UpdateTipChoiceResponse = UpdateTipChoiceResponse; type tipsV1Tip_universal_d_SetTipOnOrderRequest = SetTipOnOrderRequest; type tipsV1Tip_universal_d_SetTipOnOrderRequestIdentifierOneOf = SetTipOnOrderRequestIdentifierOneOf; type tipsV1Tip_universal_d_SetTipOnOrderResponse = SetTipOnOrderResponse; type tipsV1Tip_universal_d_OrderInfo = OrderInfo; type tipsV1Tip_universal_d_OrderInfoIdentifierOneOf = OrderInfoIdentifierOneOf; type tipsV1Tip_universal_d_Price = Price; type tipsV1Tip_universal_d_RemoveTipFromOrderRequest = RemoveTipFromOrderRequest; type tipsV1Tip_universal_d_RemoveTipFromOrderRequestIdentifierOneOf = RemoveTipFromOrderRequestIdentifierOneOf; type tipsV1Tip_universal_d_RemoveTipFromOrderResponse = RemoveTipFromOrderResponse; type tipsV1Tip_universal_d_CreateTipDistributionsRequest = CreateTipDistributionsRequest; type tipsV1Tip_universal_d_CreateTipDistributionsResponse = CreateTipDistributionsResponse; type tipsV1Tip_universal_d_DeleteTipDistributionsRequest = DeleteTipDistributionsRequest; type tipsV1Tip_universal_d_DeleteTipDistributionsRequestDeleteByOneOf = DeleteTipDistributionsRequestDeleteByOneOf; type tipsV1Tip_universal_d_DeleteTipDistributionsResponse = DeleteTipDistributionsResponse; type tipsV1Tip_universal_d_AddTipDistributionsToOrderRequest = AddTipDistributionsToOrderRequest; type tipsV1Tip_universal_d_AddTipDistributionsToOrderRequestIdentifierOneOf = AddTipDistributionsToOrderRequestIdentifierOneOf; type tipsV1Tip_universal_d_AddTipDistributionsToOrderResponse = AddTipDistributionsToOrderResponse; type tipsV1Tip_universal_d_QueryTipDistributionsRequest = QueryTipDistributionsRequest; type tipsV1Tip_universal_d_CursorQuery = CursorQuery; type tipsV1Tip_universal_d_CursorQueryPagingMethodOneOf = CursorQueryPagingMethodOneOf; type tipsV1Tip_universal_d_Sorting = Sorting; type tipsV1Tip_universal_d_SortOrder = SortOrder; const tipsV1Tip_universal_d_SortOrder: typeof SortOrder; type tipsV1Tip_universal_d_CursorPaging = CursorPaging; type tipsV1Tip_universal_d_QueryTipDistributionsResponse = QueryTipDistributionsResponse; type tipsV1Tip_universal_d_CursorPagingMetadata = CursorPagingMetadata; type tipsV1Tip_universal_d_Cursors = Cursors; type tipsV1Tip_universal_d_SumTipDistributionAmountsRequest = SumTipDistributionAmountsRequest; type tipsV1Tip_universal_d_SumTipDistributionAmountsResponse = SumTipDistributionAmountsResponse; type tipsV1Tip_universal_d_ApplyTipDistributionsRequest = ApplyTipDistributionsRequest; type tipsV1Tip_universal_d_QueryBy = QueryBy; const tipsV1Tip_universal_d_QueryBy: typeof QueryBy; type tipsV1Tip_universal_d_ApplyTipDistributionsResponse = ApplyTipDistributionsResponse; type tipsV1Tip_universal_d_PublishTipDistributionsCreatedEventRequest = PublishTipDistributionsCreatedEventRequest; type tipsV1Tip_universal_d_PublishTipDistributionsCreatedEventResponse = PublishTipDistributionsCreatedEventResponse; type tipsV1Tip_universal_d_TipDistributionsCreated = TipDistributionsCreated; type tipsV1Tip_universal_d_DomainEvent = DomainEvent; type tipsV1Tip_universal_d_DomainEventBodyOneOf = DomainEventBodyOneOf; type tipsV1Tip_universal_d_EntityCreatedEvent = EntityCreatedEvent; type tipsV1Tip_universal_d_RestoreInfo = RestoreInfo; type tipsV1Tip_universal_d_EntityUpdatedEvent = EntityUpdatedEvent; type tipsV1Tip_universal_d_EntityDeletedEvent = EntityDeletedEvent; type tipsV1Tip_universal_d_ActionEvent = ActionEvent; type tipsV1Tip_universal_d_MessageEnvelope = MessageEnvelope; type tipsV1Tip_universal_d_IdentificationData = IdentificationData; type tipsV1Tip_universal_d_IdentificationDataIdOneOf = IdentificationDataIdOneOf; type tipsV1Tip_universal_d_WebhookIdentityType = WebhookIdentityType; const tipsV1Tip_universal_d_WebhookIdentityType: typeof WebhookIdentityType; const tipsV1Tip_universal_d_previewTip: typeof previewTip; type tipsV1Tip_universal_d_PreviewTipOptions = PreviewTipOptions; const tipsV1Tip_universal_d_getTipByOrderId: typeof getTipByOrderId; const tipsV1Tip_universal_d_getTipByDraftOrderId: typeof getTipByDraftOrderId; const tipsV1Tip_universal_d_getTipChoice: typeof getTipChoice; const tipsV1Tip_universal_d_updateTipChoice: typeof updateTipChoice; type tipsV1Tip_universal_d_UpdateTipChoiceOptions = UpdateTipChoiceOptions; const tipsV1Tip_universal_d_setTipOnOrder: typeof setTipOnOrder; type tipsV1Tip_universal_d_SetTipOnOrderOptions = SetTipOnOrderOptions; const tipsV1Tip_universal_d_removeTipFromOrder: typeof removeTipFromOrder; type tipsV1Tip_universal_d_RemoveTipFromOrderOptions = RemoveTipFromOrderOptions; const tipsV1Tip_universal_d_createTipDistributions: typeof createTipDistributions; type tipsV1Tip_universal_d_CreateTipDistributionsOptions = CreateTipDistributionsOptions; const tipsV1Tip_universal_d_deleteTipDistributions: typeof deleteTipDistributions; type tipsV1Tip_universal_d_DeleteTipDistributionsOptions = DeleteTipDistributionsOptions; const tipsV1Tip_universal_d_addTipDistributionsToOrder: typeof addTipDistributionsToOrder; type tipsV1Tip_universal_d_AddTipDistributionsToOrderOptions = AddTipDistributionsToOrderOptions; const tipsV1Tip_universal_d_queryTipDistributions: typeof queryTipDistributions; type tipsV1Tip_universal_d_TipDistributionsQueryResult = TipDistributionsQueryResult; type tipsV1Tip_universal_d_TipDistributionsQueryBuilder = TipDistributionsQueryBuilder; const tipsV1Tip_universal_d_sumTipDistributionAmounts: typeof sumTipDistributionAmounts; const tipsV1Tip_universal_d_applyTipDistributions: typeof applyTipDistributions; type tipsV1Tip_universal_d_ApplyTipDistributionsOptions = ApplyTipDistributionsOptions; const tipsV1Tip_universal_d_publishTipDistributionsCreatedEvent: typeof publishTipDistributionsCreatedEvent; type tipsV1Tip_universal_d_PublishTipDistributionsCreatedEventOptions = PublishTipDistributionsCreatedEventOptions; namespace tipsV1Tip_universal_d { export { tipsV1Tip_universal_d_Tip as Tip, tipsV1Tip_universal_d_TipDistribution as TipDistribution, tipsV1Tip_universal_d_CommonIdentificationData as CommonIdentificationData, tipsV1Tip_universal_d_CommonIdentificationDataIdOneOf as CommonIdentificationDataIdOneOf, tipsV1Tip_universal_d_IdentityType as IdentityType, tipsV1Tip_universal_d_Staff as Staff, tipsV1Tip_universal_d_LineItemInfo as LineItemInfo, tipsV1Tip_universal_d_CatalogReference as CatalogReference, tipsV1Tip_universal_d_Transaction as Transaction, tipsV1Tip_universal_d_Source as Source, tipsV1Tip_universal_d_PreviewTipRequest as PreviewTipRequest, tipsV1Tip_universal_d_TipChoice as TipChoice, tipsV1Tip_universal_d_TipType as TipType, tipsV1Tip_universal_d_PreviewTipResponse as PreviewTipResponse, tipsV1Tip_universal_d_GetTipByOrderIdRequest as GetTipByOrderIdRequest, tipsV1Tip_universal_d_GetTipByOrderIdResponse as GetTipByOrderIdResponse, tipsV1Tip_universal_d_GetTipByDraftOrderIdRequest as GetTipByDraftOrderIdRequest, tipsV1Tip_universal_d_GetTipByDraftOrderIdResponse as GetTipByDraftOrderIdResponse, tipsV1Tip_universal_d_GetTipChoiceRequest as GetTipChoiceRequest, tipsV1Tip_universal_d_GetTipChoiceResponse as GetTipChoiceResponse, tipsV1Tip_universal_d_UpdateTipChoiceRequest as UpdateTipChoiceRequest, tipsV1Tip_universal_d_UpdateTipChoiceResponse as UpdateTipChoiceResponse, tipsV1Tip_universal_d_SetTipOnOrderRequest as SetTipOnOrderRequest, tipsV1Tip_universal_d_SetTipOnOrderRequestIdentifierOneOf as SetTipOnOrderRequestIdentifierOneOf, tipsV1Tip_universal_d_SetTipOnOrderResponse as SetTipOnOrderResponse, tipsV1Tip_universal_d_OrderInfo as OrderInfo, tipsV1Tip_universal_d_OrderInfoIdentifierOneOf as OrderInfoIdentifierOneOf, tipsV1Tip_universal_d_Price as Price, tipsV1Tip_universal_d_RemoveTipFromOrderRequest as RemoveTipFromOrderRequest, tipsV1Tip_universal_d_RemoveTipFromOrderRequestIdentifierOneOf as RemoveTipFromOrderRequestIdentifierOneOf, tipsV1Tip_universal_d_RemoveTipFromOrderResponse as RemoveTipFromOrderResponse, tipsV1Tip_universal_d_CreateTipDistributionsRequest as CreateTipDistributionsRequest, tipsV1Tip_universal_d_CreateTipDistributionsResponse as CreateTipDistributionsResponse, tipsV1Tip_universal_d_DeleteTipDistributionsRequest as DeleteTipDistributionsRequest, tipsV1Tip_universal_d_DeleteTipDistributionsRequestDeleteByOneOf as DeleteTipDistributionsRequestDeleteByOneOf, tipsV1Tip_universal_d_DeleteTipDistributionsResponse as DeleteTipDistributionsResponse, tipsV1Tip_universal_d_AddTipDistributionsToOrderRequest as AddTipDistributionsToOrderRequest, tipsV1Tip_universal_d_AddTipDistributionsToOrderRequestIdentifierOneOf as AddTipDistributionsToOrderRequestIdentifierOneOf, tipsV1Tip_universal_d_AddTipDistributionsToOrderResponse as AddTipDistributionsToOrderResponse, tipsV1Tip_universal_d_QueryTipDistributionsRequest as QueryTipDistributionsRequest, tipsV1Tip_universal_d_CursorQuery as CursorQuery, tipsV1Tip_universal_d_CursorQueryPagingMethodOneOf as CursorQueryPagingMethodOneOf, tipsV1Tip_universal_d_Sorting as Sorting, tipsV1Tip_universal_d_SortOrder as SortOrder, tipsV1Tip_universal_d_CursorPaging as CursorPaging, tipsV1Tip_universal_d_QueryTipDistributionsResponse as QueryTipDistributionsResponse, tipsV1Tip_universal_d_CursorPagingMetadata as CursorPagingMetadata, tipsV1Tip_universal_d_Cursors as Cursors, tipsV1Tip_universal_d_SumTipDistributionAmountsRequest as SumTipDistributionAmountsRequest, tipsV1Tip_universal_d_SumTipDistributionAmountsResponse as SumTipDistributionAmountsResponse, tipsV1Tip_universal_d_ApplyTipDistributionsRequest as ApplyTipDistributionsRequest, tipsV1Tip_universal_d_QueryBy as QueryBy, tipsV1Tip_universal_d_ApplyTipDistributionsResponse as ApplyTipDistributionsResponse, tipsV1Tip_universal_d_PublishTipDistributionsCreatedEventRequest as PublishTipDistributionsCreatedEventRequest, tipsV1Tip_universal_d_PublishTipDistributionsCreatedEventResponse as PublishTipDistributionsCreatedEventResponse, tipsV1Tip_universal_d_TipDistributionsCreated as TipDistributionsCreated, tipsV1Tip_universal_d_DomainEvent as DomainEvent, tipsV1Tip_universal_d_DomainEventBodyOneOf as DomainEventBodyOneOf, tipsV1Tip_universal_d_EntityCreatedEvent as EntityCreatedEvent, tipsV1Tip_universal_d_RestoreInfo as RestoreInfo, tipsV1Tip_universal_d_EntityUpdatedEvent as EntityUpdatedEvent, tipsV1Tip_universal_d_EntityDeletedEvent as EntityDeletedEvent, tipsV1Tip_universal_d_ActionEvent as ActionEvent, tipsV1Tip_universal_d_MessageEnvelope as MessageEnvelope, tipsV1Tip_universal_d_IdentificationData as IdentificationData, tipsV1Tip_universal_d_IdentificationDataIdOneOf as IdentificationDataIdOneOf, tipsV1Tip_universal_d_WebhookIdentityType as WebhookIdentityType, tipsV1Tip_universal_d_previewTip as previewTip, tipsV1Tip_universal_d_PreviewTipOptions as PreviewTipOptions, tipsV1Tip_universal_d_getTipByOrderId as getTipByOrderId, tipsV1Tip_universal_d_getTipByDraftOrderId as getTipByDraftOrderId, tipsV1Tip_universal_d_getTipChoice as getTipChoice, tipsV1Tip_universal_d_updateTipChoice as updateTipChoice, tipsV1Tip_universal_d_UpdateTipChoiceOptions as UpdateTipChoiceOptions, tipsV1Tip_universal_d_setTipOnOrder as setTipOnOrder, tipsV1Tip_universal_d_SetTipOnOrderOptions as SetTipOnOrderOptions, tipsV1Tip_universal_d_removeTipFromOrder as removeTipFromOrder, tipsV1Tip_universal_d_RemoveTipFromOrderOptions as RemoveTipFromOrderOptions, tipsV1Tip_universal_d_createTipDistributions as createTipDistributions, tipsV1Tip_universal_d_CreateTipDistributionsOptions as CreateTipDistributionsOptions, tipsV1Tip_universal_d_deleteTipDistributions as deleteTipDistributions, tipsV1Tip_universal_d_DeleteTipDistributionsOptions as DeleteTipDistributionsOptions, tipsV1Tip_universal_d_addTipDistributionsToOrder as addTipDistributionsToOrder, tipsV1Tip_universal_d_AddTipDistributionsToOrderOptions as AddTipDistributionsToOrderOptions, tipsV1Tip_universal_d_queryTipDistributions as queryTipDistributions, tipsV1Tip_universal_d_TipDistributionsQueryResult as TipDistributionsQueryResult, tipsV1Tip_universal_d_TipDistributionsQueryBuilder as TipDistributionsQueryBuilder, tipsV1Tip_universal_d_sumTipDistributionAmounts as sumTipDistributionAmounts, tipsV1Tip_universal_d_applyTipDistributions as applyTipDistributions, tipsV1Tip_universal_d_ApplyTipDistributionsOptions as ApplyTipDistributionsOptions, tipsV1Tip_universal_d_publishTipDistributionsCreatedEvent as publishTipDistributionsCreatedEvent, tipsV1Tip_universal_d_PublishTipDistributionsCreatedEventOptions as PublishTipDistributionsCreatedEventOptions, }; } export { ecomV1AbandonedCheckout_universal_d as abandonedCheckouts, ecomV1BackInStockNotificationRequest_universal_d as backInStockNotifications, ecomV1BackInStockSettings_universal_d as backInStockSettings, ecomV1CartCart_universal_d as cart, ecomV1CheckoutCheckout_universal_d as checkout, ecomApiV1CheckoutContentProvider_universal_d as checkoutContent, ecomV1CheckoutSettings_universal_d as checkoutSettings, ecomV1CheckoutTemplate_universal_d as checkoutTemplates, ecomV1CartCurrentCart_universal_d as currentCart, ecomV1DeliveryProfile_universal_d as deliveryProfile, gatewaysEcomV1DeliveryRatesGateway_universal_d as deliverySolutions, ecomDiscountsV1DiscountRule_universal_d as discountRules, ecomCustomTriggerV1CustomTrigger_universal_d as discountsCustomTrigger, ecomV1DraftOrder_universal_d as draftOrders, ecommerceGiftCardsProxyV1GiftCard_universal_d as giftCards, ecomV1GiftCard_universal_d as giftVouchers, ecomV1LocalDeliveryOption_universal_d as localDeliveryOptions, ecomV1Fulfillments_universal_d as orderFulfillments, ecomOrdersV1Invoice_universal_d as orderInvoices, ecomV1OrderPaymentRequest_universal_d as orderPaymentRequests, ecomV1OrderTransactions_universal_d as orderTransactions, ecomV1Order_universal_d as orders, ecomV1OrdersSettings_universal_d as ordersSettings, ecomV1PickupLocation_universal_d as pickupLocations, ecomRecommendationsV1Recommendation_universal_d as recommendations, ecomV1ShippingOption_universal_d as shippingOptions, ecomV1ShippoConfiguration_universal_d as shippoConfigurations, ecomSubscriptionContractsV1SubscriptionContract_universal_d as subscriptionContracts, tipsSettingsV1TipSettings_universal_d as tipSettings, tipsStaffV1Staff_universal_d as tippableStaff, tipsV1Tip_universal_d as tips, ecomV1TotalsCalculation_universal_d as totalsCalculator }; }