/** 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; /** * Billing address and contact details. * @deprecated Billing address and contact details. * @replacedBy billing_info_details * @targetRemovalDate 2024-08-30 */ billingInfo?: AddressWithContact; /** * 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; /** * Draft order status. * @readonly */ status?: EditingStatus; /** Weight measurement unit. Defaults to the site's weight unit. */ weightUnit?: WeightUnit; /** Currency used for pricing. */ currency?: string | null; /** * Price summary. * @readonly */ priceSummary?: PriceSummary; /** * 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; /** * Balance summary. * @readonly */ balanceSummary?: BalanceSummary; /** Side effects to perform on commit. */ commitSettings?: DraftOrderCommitSettings; /** 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; /** * 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; /** * Buyer information. * Includes details about changes when relevant. * @internal */ buyerDetails?: BuyerDetails; /** * Billing address and contact details. * Includes details about changes when relevant. * @internal */ billingDetails?: BillingDetails; /** * Order business location * Includes details about changes when relevant. */ 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; /** Whether the line item was removed as part of the draft. */ removed?: boolean; /** Line item details after applied changes. */ lineItem?: OrderLineItem; } /** @oneof */ interface ItemDetailsChangeTypeOneOf { /** Whether the line item was added as part of the draft. */ added?: boolean; /** Line item fields before the change. */ changedDetails?: ItemChangedDetails; /** Whether the line item was removed as part of the draft. */ removed?: boolean; } interface Price { /** Amount. */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } 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 OrderLineItem { /** Line item ID. */ _id?: string; /** * 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; /** Line item quantity. */ quantity?: number; /** * Total discount for this line item's entire quantity. * @readonly */ totalDiscount?: Price; /** 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; /** Item type. Either a preset type or custom. */ itemType?: ItemType; /** * 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; /** * Line item price before line item discounts for display purposes. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: Price; /** * Total price after discounts, and before tax. * @readonly */ totalPriceBeforeTax?: Price; /** * Total price after all discounts and tax. * @readonly */ totalPriceAfterTax?: Price; /** * Type of selected payment option for current item. * * Default: `FULL_PAYMENT_ONLINE` */ paymentOption?: PaymentOptionType; /** * 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; /** 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; /** Subscription info. */ subscriptionInfo?: SubscriptionInfo; /** 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; /** * Address used for tax calculation. * @internal */ taxableAddress?: TaxableAddress; /** * ID of the app managing the inventory. * @internal */ inventoryAppId?: string | null; /** * 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. */ extendedFields?: ExtendedFields; } 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 { /** 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 extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf { /** Description line plain text value. */ plainText?: PlainTextValue; /** Description line color value. */ colorInfo?: Color; /** Description line name. */ name?: DescriptionLineName; } /** @oneof */ interface DescriptionLineValueOneOf { /** Description line plain text value. */ plainText?: PlainTextValue; /** Description line color value. */ colorInfo?: Color; } /** @oneof */ interface DescriptionLineDescriptionLineValueOneOf { } 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; } declare 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 { /** 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 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; } declare enum ItemTypeItemType { UNRECOGNISED = "UNRECOGNISED", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL", GIFT_CARD = "GIFT_CARD", SERVICE = "SERVICE" } /** Type of selected payment option for catalog item */ declare 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 ItemTaxFullDetails { /** Taxable amount of this line item. */ taxableAmount?: Price; /** 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; } interface LineItemTaxInfo { /** Calculated tax, based on `taxable_amount` and `tax_rate`. */ taxAmount?: Price; /** Amount for which tax is calculated. */ taxableAmount?: Price; /** 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; /** 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; /** Non-taxable amount of the line item price. */ nonTaxableAmount?: Price; /** Taxable amount of the line item price. */ taxableAmount?: Price; } /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */ declare enum JurisdictionType { UNDEFINED = "UNDEFINED", COUNTRY = "COUNTRY", STATE = "STATE", COUNTY = "COUNTY", CITY = "CITY", SPECIAL = "SPECIAL" } interface DigitalFile { /** 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 { /** 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; /** * Description of the charges that will be applied for subscription. * @internal */ chargesDescription?: string | null; } interface SubscriptionSettings { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequency; /** 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; /** * Period until first cycle starts. 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; } /** Frequency unit of recurring payment */ declare enum SubscriptionFrequency { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } interface FreeTrialPeriod { /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */ frequency?: SubscriptionFrequency; /** interval of period */ interval?: number; } 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. * @deprecated Location owner app, if not provided then the site business info locations will be used. * @targetRemovalDate 2025-03-01 */ appId?: string | null; /** Quantity for specific location. */ quantity?: number; /** * Location name. * @internal * @readonly */ name?: string | null; } 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; } declare enum TaxableAddressType { UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS", BUSINESS = "BUSINESS", BILLING = "BILLING", SHIPPING = "SHIPPING" } 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 ItemChangedDetails { /** Line item quantity before change. */ quantityBeforeChange?: number | null; /** Line item price before change. */ priceBeforeChange?: Price; /** Line item price description before change. */ priceDescriptionBeforeChange?: PriceDescription; } 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?: V1ShippingInformation; } /** @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 V1ShippingInformation { /** 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; } interface V1DeliveryLogistics extends V1DeliveryLogisticsAddressOneOf { /** Shipping address and contact details. */ shippingDestination?: AddressWithContact; /** 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; /** Pickup details. */ pickupDetails?: V1PickupDetails; } /** Billing Info and shipping details */ interface AddressWithContact { /** Address. */ address?: Address; /** Contact details. */ contactDetails?: FullAddressContactDetails; } /** Physical address */ interface Address { /** 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; /** 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; } interface StreetAddress { /** Street number. */ number?: string; /** Street name. */ name?: string; } interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } /** Full contact details for an address */ interface FullAddressContactDetails { /** 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; } 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 */ declare enum VatType { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } interface V1PickupDetails { /** Pickup address. */ address?: PickupAddress; /** Pickup method */ pickupMethod?: PickupDetailsPickupMethod; } /** Physical address */ interface PickupAddress { /** 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; /** 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; } declare 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; /** * Total price of shipping after discounts (when relevant), and before tax. * @readonly */ totalPriceBeforeTax?: Price; /** * Shipping price after all discounts (if any exist), and after tax. * @readonly */ totalPriceAfterTax?: Price; /** Tax details. */ taxDetails?: ItemTaxFullDetails; /** * Shipping discount before tax. * @readonly */ discount?: Price; } interface ShippingRegion { /** Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. */ name?: string | null; } interface ShippingChangedDetails { /** Shipping info before the change. */ shippingInfoBeforeChange?: V1ShippingInformation; } /** Buyer Info */ interface BuyerInfo 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://dev.wix.com/api/rest/contacts/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; } interface AdditionalFeeDetails { /** Additional fee. */ additionalFee?: AdditionalFee; /** Tax details related to the additional fee. */ taxDetails?: TaxDetails; /** * 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; /** Whether this additional fee is applied to the order. */ applied?: boolean; } interface AdditionalFee { /** Additional fee's unique code for future processing. */ code?: string | null; /** Name of additional fee. */ name?: string; /** Additional fee's price. */ price?: Price; /** Tax details. */ taxDetails?: ItemTaxFullDetails; /** SPI implementer's `appId`. */ providerAppId?: string | null; /** Additional fee's price before tax. */ priceBeforeTax?: Price; /** Additional fee's price after tax. */ priceAfterTax?: Price; /** 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[]; /** * Number of subscription billing cycles the additional fee applies to. * If None and additional fee is linked to subscription line item, it applies to all cycles. * @internal */ subscriptionCycles?: number | null; } 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; } declare enum SourceType { /** 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; /** * 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; /** Whether this discount is applied to the order. */ applied?: boolean; } interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf { /** Applied coupon info. */ coupon?: Coupon; /** Merchant discount. */ merchantDiscount?: MerchantDiscount; /** Automatic Discount */ discountRule?: DiscountRule; /** * 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; /** * Number of subscription billing cycles the discount applies to. * If None and discount is linked to subscription line item, it applies to all cycles. * @internal */ subscriptionCycles?: number | null; } /** @oneof */ interface AppliedDiscountDiscountSourceOneOf { /** Applied coupon info. */ coupon?: Coupon; /** Merchant discount. */ merchantDiscount?: MerchantDiscount; /** Automatic Discount */ discountRule?: DiscountRule; } declare enum AppliedDiscountDiscountType { GLOBAL = "GLOBAL", SPECIFIC_ITEMS = "SPECIFIC_ITEMS", SHIPPING = "SHIPPING" } /** Coupon */ interface Coupon { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** Coupon name. */ name?: string; /** Coupon value. */ amount?: Price; } interface MerchantDiscount 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; /** * 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; } declare enum DiscountReason { UNSPECIFIED = "UNSPECIFIED", EXCHANGED_ITEMS = "EXCHANGED_ITEMS" } interface DiscountRule { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: DiscountRuleName; /** Discount value. */ amount?: Price; } 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; /** Total discount for this line item. */ totalDiscount?: Price; } interface CreatedBy extends CreatedByStringOneOf { /** 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 { /** 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; } declare enum EditingStatus { /** DraftOrder is in draft state. */ DRAFT = "DRAFT", /** DraftOrder is in committed state. */ COMMITTED = "COMMITTED" } declare 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 PriceSummary { /** Subtotal of all the line items, before discounts and before tax. */ subtotal?: Price; /** Total shipping price, before discounts and before tax. */ shipping?: Price; /** Total tax on this order. */ tax?: Price; /** Total calculated discount value. */ discount?: Price; /** Order’s total price after discounts and tax. */ total?: Price; /** Total price of additional fees before tax. */ totalAdditionalFees?: Price; } interface TaxSummary { /** * Total tax. * @readonly */ totalTax?: Price; } interface BalanceSummary { /** * Amount left to pay for order to be considered paid. * @readonly */ balance?: Balance; /** * Sum of all authorized payments. * @readonly */ authorized?: Price; } /** * 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; } /** Side-effects upon committing a draft order. */ interface DraftOrderCommitSettings { /** * 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; } /** @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; } interface OrderTaxInfo { /** Calculated tax, added from line items. */ totalTax?: Price; /** 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[]; /** * Whether the 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; /** 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; } interface BuyerDetails 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; } /** @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; } 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; } /** @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; } interface BusinessLocationDetails extends BusinessLocationDetailsChangeTypeOneOf { /** Indicates that business location was added during draft. */ added?: boolean; /** Indicates that business location was changed. Contains business location before draft. */ changedDetails?: BusinessLocationChangedDetails; /** Indicates that business location was removed during draft. */ removed?: boolean; /** Business location. */ businessLocation?: Location; } /** @oneof */ interface BusinessLocationDetailsChangeTypeOneOf { /** Indicates that business location was added during draft. */ added?: boolean; /** Indicates that business location was changed. Contains business location before draft. */ changedDetails?: BusinessLocationChangedDetails; /** Indicates that business location was removed during draft. */ removed?: boolean; } 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 BusinessLocationChangedDetails { /** Business location before draft. */ businessLocationBeforeChange?: Location; } interface CreateDraftOrderRequest { /** To create a draft from existing order, provide its id. Otherwise, an empty draft will be created. */ orderId: 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[]; /** Errors that occurred during calculation. */ calculationErrors?: CalculationErrors; } interface ShippingOption { /** 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; /** Shipping cost. */ cost?: ShippingPrice; } interface DeliveryLogistics { /** 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; /** Expected delivery time slot (from and to time stamps representation) */ deliveryTimeSlot?: DeliveryTimeSlot; } interface PickupDetails { /** Pickup address */ address?: Address; /** * Pickup method. * * Supported values: * + `"STORE_PICKUP"` * + `"PICKUP_POINT"` */ pickupMethod?: PickupMethod; } declare 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 ShippingPrice { /** The shipping rate's price. Must align with the [currency's decimal separator](https://en.wikipedia.org/wiki/ISO_4217#Active_codes). */ price?: Price; /** 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 extends CalculationErrorsShippingCalculationErrorOneOf { /** General shipping calculation error. */ generalShippingCalculationError?: Details; /** Carrier errors. */ carrierErrors?: CarrierErrors; /** Tax calculation error. */ taxCalculationError?: Details; /** Order validation errors. */ orderValidationErrors?: ApplicationError[]; } /** @oneof */ interface CalculationErrorsShippingCalculationErrorOneOf { /** General shipping calculation error. */ generalShippingCalculationError?: Details; /** Carrier errors. */ carrierErrors?: CarrierErrors; } 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[]; } declare 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", REQUIRED_ONE_OF_FIELD = "REQUIRED_ONE_OF_FIELD" } 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 CarrierErrors { /** Carrier errors. */ errors?: CarrierError[]; } interface CarrierError { /** Carrier ID. */ carrierId?: string; /** Error details. */ error?: Details; } 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; /** Item quantity. */ quantity?: number; /** Item price override. */ price?: Price; } 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; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: ProductName; /** URL to the item's page on the site. */ url?: string; /** Item price **after** catalog-defined discount and line item discounts. */ price?: Price; /** Total line item price **after** catalog-defined discount and line item discounts. */ lineItemPrice?: Price; /** Item price **before** catalog-defined discount. Defaults to `price` when not provided. */ fullPrice?: Price; /** Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. */ priceBeforeDiscounts?: Price; /** Line item description lines. Used for display purposes for order. */ descriptionLines?: DescriptionLine[]; /** Line item image details. */ media?: string; /** Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. */ physicalProperties?: PhysicalProperties; /** Item type. Either a preset type or custom. */ itemType?: ItemType; /** 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; /** 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; } declare 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; } 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; /** * 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; /** * 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; /** 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; } /** @oneof */ interface DiscountOptionDiscountAmountOneOf { /** * Discount price amount. * @internal */ priceAmount?: Price; /** * Discount percentage amount. * @internal */ percentage?: string | null; } declare enum DiscountType { 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; /** Tax calculation details */ taxDetails?: TaxDetails; /** * 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; } 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?: V1ShippingInformation; } 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; } 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; } 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; } 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; } 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[]; } declare 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; /** 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; } interface Order { /** * 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[]; /** Buyer information. */ buyerInfo?: BuyerInfo; /** Order payment status. */ paymentStatus?: PaymentStatus; /** * Order fulfillment status. * @readonly */ fulfillmentStatus?: FulfillmentStatus; /** * 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; /** 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; /** Billing address and contact details. */ billingInfo?: AddressWithContact; /** Shipping info and selected shipping option details. */ shippingInfo?: V1ShippingInformation; /** [Buyer note](https://support.wix.com/en/article/wix-stores-viewing-buyer-notes) left by the customer. */ buyerNote?: string | null; /** Order status. */ 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; /** Tax information. */ taxInfo?: OrderTaxInfo; /** Applied discounts. */ appliedDiscounts?: AppliedDiscount[]; /** * Order activities. * @readonly */ activities?: Activity[]; /** Order attribution source. */ attributionSource?: AttributionSource; /** * ID of the order's initiator. * @readonly */ createdBy?: V1CreatedBy; /** Information about the sales channel that submitted this order. */ channelInfo?: ChannelInfo; /** 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[]; /** * Balance summary. * @readonly */ balanceSummary?: V1BalanceSummary; /** Additional fees applied to the order. */ additionalFees?: AdditionalFee[]; /** * 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; /** 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; /** * 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 */ businessLocation?: Location; /** * Pay after free trial price summary. Price summary that should be paid for subscriptions after free trial period. * @internal * @readonly */ payAfterFreeTrial?: PriceSummary; } declare enum PaymentStatus { UNSPECIFIED = "UNSPECIFIED", /** * `NOT_PAID` can apply to 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`. */ NOT_PAID = "NOT_PAID", /** All required payments associated with this order are paid. */ PAID = "PAID", /** Order partially refunded, but the refunded amount is less than the order's total price. See `order.balanceSummary` for more details. */ PARTIALLY_REFUNDED = "PARTIALLY_REFUNDED", /** Order fully refunded. Refund amount equals total price. See `order.balanceSummary` for more details. */ FULLY_REFUNDED = "FULLY_REFUNDED", /** * All payments pending. * * This can happen with two-step payments, when a payment requires manual review, or when a payment is in progress and will be concluded shortly. * Learn more about [pending orders](https://support.wix.com/en/article/pending-orders). */ PENDING = "PENDING", /** At least one payment received and approved, but it covers less than the order's total price. See `order.balanceSummary` for more details. */ PARTIALLY_PAID = "PARTIALLY_PAID", /** * Payment received, but not yet confirmed by the payment provider. * * In most cases, when a payment provider is holding payment it's because setup hasn't been successfully completed by the merchant/site owner. * To solve this, the merchant/site owner should log in to the payment provider's dashboard and make sure their account is set up correctly, or contact their support for further assistance. * @documentationMaturity preview */ PENDING_MERCHANT = "PENDING_MERCHANT", /** * One or more payments canceled. * @documentationMaturity preview */ CANCELED = "CANCELED", /** * One or more payments declined. * @documentationMaturity preview */ DECLINED = "DECLINED" } declare enum FulfillmentStatus { /** 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" } declare enum OrderStatus { /** Order created, but not yet approved or canceled. */ INITIALIZED = "INITIALIZED", /** * 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. */ APPROVED = "APPROVED", /** Order canceled by the user. */ CANCELED = "CANCELED", /** * Order pending. * @documentationMaturity preview */ PENDING = "PENDING", /** * Order rejected. * * This happens when pending payments fail. * @documentationMaturity preview */ REJECTED = "REJECTED" } interface Activity 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; /** * 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; /** * Receipt was added for associated payment * @internal */ receiptCreated?: ReceiptCreated; /** * Receipt sent to customer * @internal */ receiptSent?: ReceiptSent; /** * 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; } /** @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; /** * 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; /** * Receipt was added for associated payment * @internal */ receiptCreated?: ReceiptCreated; /** * Receipt sent to customer * @internal */ receiptSent?: ReceiptSent; } 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 { /** Whether order was refunded manually. For example, via payment provider or using cash. */ manual?: boolean; /** Refund amount. */ amount?: Price; /** 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; } declare enum LineItemQuantityChangeType { /** Quantity increased. */ QUANTITY_INCREASED = "QUANTITY_INCREASED", /** Quantity decreased. */ QUANTITY_DECREASED = "QUANTITY_DECREASED" } interface LineItemPriceChange { /** Item price before update. */ originalPrice?: Price; /** Item price after update. */ newPrice?: Price; } 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; } 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; } 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; } interface TotalPriceChange { /** Order’s total price after discounts and tax. Before update */ originalTotal?: Price; /** Order’s total price after discounts and tax. After update */ newTotal?: Price; } interface ShippingInformationChange { /** Order’s Shipping Information. Before update */ originalShippingInfo?: ShippingInformation; /** Order’s Shipping Information. After update */ newShippingInfo?: ShippingInformation; } interface ShippingInformation { /** Order’s shipping price. */ total?: Price; /** 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; /** 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; /** 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; /** 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; /** 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; /** 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; } 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; /** 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; } /** @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; } interface ReceiptCreated extends ReceiptCreatedReceiptInfoOneOf { /** Receipt created by Wix */ wixReceipt?: WixReceipt; /** Receipt created by an external system. */ externalReceipt?: ExternalReceipt; /** Payment ID of payment associated with this activity */ paymentId?: string; } /** @oneof */ interface ReceiptCreatedReceiptInfoOneOf { /** Receipt created by Wix */ wixReceipt?: WixReceipt; /** Receipt created by an external system. */ externalReceipt?: ExternalReceipt; } interface WixReceipt { /** Receipt ID */ receiptId?: string; /** Display number of receipt */ displayNumber?: string | null; } interface ExternalReceipt { /** Receipt ID */ receiptId?: string | null; /** Display number of receipt */ displayNumber?: string | null; } interface ReceiptSent extends ReceiptSentReceiptInfoOneOf { /** Receipt created by Wix */ wixReceipt?: WixReceipt; /** Receipt created by an external system. */ externalReceipt?: ExternalReceipt; /** Payment ID of payment associated with this activity */ paymentId?: string; } /** @oneof */ interface ReceiptSentReceiptInfoOneOf { /** Receipt created by Wix */ wixReceipt?: WixReceipt; /** Receipt created by an external system. */ externalReceipt?: ExternalReceipt; } declare enum ActivityType { 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", /** @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" } declare enum AttributionSource { 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 { /** Sales channel that submitted the order. */ type?: ChannelType; /** Reference to an order ID from an external system. */ externalOrderId?: string | null; /** URL to the order in the external system. */ externalOrderUrl?: string | null; } declare enum ChannelType { /** 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 { /** 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; /** * Sum of all approved and successful payments. * * The value includes payments that have subsequently been fully or partially refunded. * @readonly */ paid?: Price; /** * Sum of all successfully refunded payments. * @readonly */ refunded?: Price; /** * Sum of all authorized payments. * @readonly */ authorized?: Price; /** * Sum of all pending refund transactions. * @internal * @readonly */ pendingRefund?: Price; /** * Sum of all pending transactions. * @readonly */ pending?: Price; } 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 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; } interface OrderCreateSettings { /** * Notification settings to be applied on order creation * @internal */ notifications?: OrderCreateNotifications; } 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 CreateOrderFromDraftResponse { /** * The draft order after commit. * @internal */ committedDraftOrder?: DraftOrder; /** * Created order * @internal */ createdOrder?: Order; } interface DeleteDraftOrderRequest { /** The draft order id */ draftOrderId: string; } interface DeleteDraftOrderResponse { } interface QueryDraftOrdersRequest { /** WQL expression */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * 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[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; } interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } interface CursorPaging { /** 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; } interface CursorPagingMetadata { /** Number of items returned in current page. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * 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 { /** 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 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; } interface SetBusinessLocationResponse { /** * The draft order details calculated with updated business location. * @internal */ calculatedDraftOrder?: CalculatedDraftOrder; } 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 { entity?: string; } 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. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } interface ActionEvent { body?: 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; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface PriceNonNullableFields { amount: string; formattedAmount: string; } interface PriceDescriptionNonNullableFields { original: string; } interface ItemChangedDetailsNonNullableFields { priceBeforeChange?: PriceNonNullableFields; priceDescriptionBeforeChange?: PriceDescriptionNonNullableFields; } interface ProductNameNonNullableFields { original: string; } interface CatalogReferenceNonNullableFields { catalogItemId: string; appId: string; } interface PlainTextValueNonNullableFields { original: string; } interface ColorNonNullableFields { original: string; } interface DescriptionLineNameNonNullableFields { original: string; } interface DescriptionLineNonNullableFields { plainText?: PlainTextValueNonNullableFields; colorInfo?: ColorNonNullableFields; plainTextValue?: PlainTextValueNonNullableFields; color: string; name?: DescriptionLineNameNonNullableFields; lineType: DescriptionLineType; } interface PhysicalPropertiesNonNullableFields { shippable: boolean; } interface ItemTypeNonNullableFields { preset: ItemTypeItemType; custom: string; } interface ItemTaxFullDetailsNonNullableFields { taxableAmount?: PriceNonNullableFields; taxRate: string; totalTax?: PriceNonNullableFields; } interface LineItemTaxBreakdownNonNullableFields { taxAmount?: PriceNonNullableFields; jurisdictionType: JurisdictionType; nonTaxableAmount?: PriceNonNullableFields; taxableAmount?: PriceNonNullableFields; } interface LineItemTaxInfoNonNullableFields { taxAmount?: PriceNonNullableFields; taxableAmount?: PriceNonNullableFields; taxIncludedInPrice: boolean; taxBreakdown: LineItemTaxBreakdownNonNullableFields[]; } interface DigitalFileNonNullableFields { fileId: string; } interface FreeTrialPeriodNonNullableFields { frequency: SubscriptionFrequency; interval: number; } interface SubscriptionSettingsNonNullableFields { frequency: SubscriptionFrequency; autoRenewal: boolean; /** @internal */ enableCustomerCancellation: boolean; /** @internal */ freeTrialPeriod?: FreeTrialPeriodNonNullableFields; } interface SubscriptionInfoNonNullableFields { cycleNumber: number; subscriptionOptionTitle: string; subscriptionSettings?: SubscriptionSettingsNonNullableFields; } interface LocationAndQuantityNonNullableFields { _id: string; quantity: number; } interface TaxableAddressNonNullableFields { addressType: TaxableAddressType; } interface OrderLineItemNonNullableFields { _id: string; productName?: ProductNameNonNullableFields; catalogReference?: CatalogReferenceNonNullableFields; quantity: number; totalDiscount?: PriceNonNullableFields; descriptionLines: DescriptionLineNonNullableFields[]; image: string; physicalProperties?: PhysicalPropertiesNonNullableFields; itemType?: ItemTypeNonNullableFields; price?: PriceNonNullableFields; priceBeforeDiscounts?: PriceNonNullableFields; totalPriceBeforeTax?: PriceNonNullableFields; totalPriceAfterTax?: PriceNonNullableFields; paymentOption: PaymentOptionType; taxDetails?: ItemTaxFullDetailsNonNullableFields; taxInfo?: LineItemTaxInfoNonNullableFields; digitalFile?: DigitalFileNonNullableFields; subscriptionInfo?: SubscriptionInfoNonNullableFields; priceDescription?: PriceDescriptionNonNullableFields; depositAmount?: PriceNonNullableFields; /** @internal */ locations: LocationAndQuantityNonNullableFields[]; lineItemPrice?: PriceNonNullableFields; /** @internal */ taxableAddress?: TaxableAddressNonNullableFields; /** @internal */ priceUndetermined: boolean; /** @internal */ fixedQuantity: boolean; } interface ItemDetailsNonNullableFields { added: boolean; changedDetails?: ItemChangedDetailsNonNullableFields; removed: boolean; lineItem?: OrderLineItemNonNullableFields; } interface StreetAddressNonNullableFields { number: string; name: string; apt: string; } interface AddressNonNullableFields { streetAddress?: StreetAddressNonNullableFields; } interface VatIdNonNullableFields { _id: string; type: VatType; } interface FullAddressContactDetailsNonNullableFields { vatId?: VatIdNonNullableFields; } interface AddressWithContactNonNullableFields { address?: AddressNonNullableFields; contactDetails?: FullAddressContactDetailsNonNullableFields; } interface PickupAddressNonNullableFields { streetAddress?: StreetAddressNonNullableFields; } interface V1PickupDetailsNonNullableFields { address?: PickupAddressNonNullableFields; pickupMethod: PickupDetailsPickupMethod; } interface V1DeliveryLogisticsNonNullableFields { shippingDestination?: AddressWithContactNonNullableFields; pickupDetails?: V1PickupDetailsNonNullableFields; } interface V1ShippingPriceNonNullableFields { price?: PriceNonNullableFields; totalPriceBeforeTax?: PriceNonNullableFields; totalPriceAfterTax?: PriceNonNullableFields; taxDetails?: ItemTaxFullDetailsNonNullableFields; discount?: PriceNonNullableFields; } interface V1ShippingInformationNonNullableFields { title: string; logistics?: V1DeliveryLogisticsNonNullableFields; cost?: V1ShippingPriceNonNullableFields; } interface ShippingChangedDetailsNonNullableFields { shippingInfoBeforeChange?: V1ShippingInformationNonNullableFields; } interface ShippingDetailsNonNullableFields { added: boolean; changedDetails?: ShippingChangedDetailsNonNullableFields; removed: boolean; shippingInfo?: V1ShippingInformationNonNullableFields; } interface BuyerInfoNonNullableFields { visitorId: string; memberId: string; } interface AdditionalFeeNonNullableFields { name: string; price?: PriceNonNullableFields; taxDetails?: ItemTaxFullDetailsNonNullableFields; priceBeforeTax?: PriceNonNullableFields; priceAfterTax?: PriceNonNullableFields; _id: string; lineItemIds: string[]; } interface TaxDetailsNonNullableFields { taxable: boolean; } interface AdditionalFeeDetailsNonNullableFields { additionalFee?: AdditionalFeeNonNullableFields; taxDetails?: TaxDetailsNonNullableFields; source: SourceType; applied: boolean; } interface CouponNonNullableFields { _id: string; code: string; name: string; amount?: PriceNonNullableFields; } interface MerchantDiscountNonNullableFields { discountReason: DiscountReason; amount?: PriceNonNullableFields; } interface DiscountRuleNameNonNullableFields { original: string; } interface DiscountRuleNonNullableFields { _id: string; name?: DiscountRuleNameNonNullableFields; amount?: PriceNonNullableFields; } interface LineItemDiscountNonNullableFields { _id: string; totalDiscount?: PriceNonNullableFields; } interface AppliedDiscountNonNullableFields { coupon?: CouponNonNullableFields; merchantDiscount?: MerchantDiscountNonNullableFields; discountRule?: DiscountRuleNonNullableFields; discountType: AppliedDiscountDiscountType; lineItemIds: string[]; /** @internal */ lineItemDiscounts: LineItemDiscountNonNullableFields[]; } interface DiscountDetailsNonNullableFields { discount?: AppliedDiscountNonNullableFields; source: SourceType; applied: boolean; } interface CreatedByNonNullableFields { userId: string; appId: string; } interface PriceSummaryNonNullableFields { subtotal?: PriceNonNullableFields; shipping?: PriceNonNullableFields; tax?: PriceNonNullableFields; discount?: PriceNonNullableFields; totalPrice?: PriceNonNullableFields; total?: PriceNonNullableFields; totalWithGiftCard?: PriceNonNullableFields; totalWithoutGiftCard?: PriceNonNullableFields; totalAdditionalFees?: PriceNonNullableFields; } interface TaxSummaryNonNullableFields { totalTax?: PriceNonNullableFields; } interface BalanceNonNullableFields { amount: string; formattedAmount: string; } interface BalanceSummaryNonNullableFields { balance?: BalanceNonNullableFields; paid?: PriceNonNullableFields; refunded?: PriceNonNullableFields; authorized?: PriceNonNullableFields; } interface InventoryUpdateNonNullableFields { lineItemId: string; } interface DraftOrderCommitSettingsNonNullableFields { updateInventory: InventoryUpdateNonNullableFields[]; } interface RecipientInfoChangedDetailsNonNullableFields { recipientInfoBeforeChange?: AddressWithContactNonNullableFields; } interface RecipientInfoDetailsNonNullableFields { added: boolean; changedDetails?: RecipientInfoChangedDetailsNonNullableFields; removed: boolean; recipientInfo?: AddressWithContactNonNullableFields; } interface OrderTaxBreakdownNonNullableFields { taxName: string; taxType: string; jurisdiction: string; jurisdictionType: JurisdictionType; rate: string; aggregatedTaxAmount?: PriceNonNullableFields; aggregatedTaxableAmount?: PriceNonNullableFields; } interface OrderTaxInfoNonNullableFields { totalTax?: PriceNonNullableFields; taxBreakdown: OrderTaxBreakdownNonNullableFields[]; } interface BuyerChangedDetailsNonNullableFields { /** @internal */ buyerInfoBeforeChange?: BuyerInfoNonNullableFields; } interface BuyerDetailsNonNullableFields { /** @internal */ added: boolean; /** @internal */ changedDetails?: BuyerChangedDetailsNonNullableFields; /** @internal */ removed: boolean; /** @internal */ buyerInfo?: BuyerInfoNonNullableFields; } interface BillingChangedDetailsNonNullableFields { /** @internal */ billingInfoBeforeChange?: AddressWithContactNonNullableFields; } interface BillingDetailsNonNullableFields { /** @internal */ added: boolean; /** @internal */ changedDetails?: BillingChangedDetailsNonNullableFields; /** @internal */ removed: boolean; /** @internal */ billingInfo?: AddressWithContactNonNullableFields; } interface LocationNonNullableFields { _id: string; name: string; } interface BusinessLocationChangedDetailsNonNullableFields { businessLocationBeforeChange?: LocationNonNullableFields; } interface BusinessLocationDetailsNonNullableFields { added: boolean; changedDetails?: BusinessLocationChangedDetailsNonNullableFields; removed: boolean; businessLocation?: LocationNonNullableFields; } interface DraftOrderNonNullableFields { lineItems: ItemDetailsNonNullableFields[]; shippingInfo?: ShippingDetailsNonNullableFields; buyerInfo?: BuyerInfoNonNullableFields; billingInfo?: AddressWithContactNonNullableFields; additionalFees: AdditionalFeeDetailsNonNullableFields[]; discounts: DiscountDetailsNonNullableFields[]; createdBy?: CreatedByNonNullableFields; status: EditingStatus; weightUnit: WeightUnit; priceSummary?: PriceSummaryNonNullableFields; taxSummary?: TaxSummaryNonNullableFields; balanceSummary?: BalanceSummaryNonNullableFields; commitSettings?: DraftOrderCommitSettingsNonNullableFields; recipientInfo?: RecipientInfoDetailsNonNullableFields; /** @internal */ taxInfo?: OrderTaxInfoNonNullableFields; /** @internal */ buyerDetails?: BuyerDetailsNonNullableFields; /** @internal */ billingDetails?: BillingDetailsNonNullableFields; businessLocationDetails?: BusinessLocationDetailsNonNullableFields; } interface PickupDetailsNonNullableFields { address?: AddressNonNullableFields; pickupMethod: PickupMethod; } interface DeliveryLogisticsNonNullableFields { pickupDetails?: PickupDetailsNonNullableFields; } interface ShippingPriceNonNullableFields { price?: PriceNonNullableFields; currency: string; } interface ShippingOptionNonNullableFields { code: string; title: string; logistics?: DeliveryLogisticsNonNullableFields; cost?: ShippingPriceNonNullableFields; } interface ApplicationErrorNonNullableFields { code: string; description: string; } interface FieldViolationNonNullableFields { field: string; description: string; violatedRule: RuleType; } interface ValidationErrorNonNullableFields { fieldViolations: FieldViolationNonNullableFields[]; } interface DetailsNonNullableFields { applicationError?: ApplicationErrorNonNullableFields; validationError?: ValidationErrorNonNullableFields; } interface CarrierErrorNonNullableFields { carrierId: string; error?: DetailsNonNullableFields; } interface CarrierErrorsNonNullableFields { errors: CarrierErrorNonNullableFields[]; } interface CalculationErrorsNonNullableFields { generalShippingCalculationError?: DetailsNonNullableFields; carrierErrors?: CarrierErrorsNonNullableFields; taxCalculationError?: DetailsNonNullableFields; orderValidationErrors: ApplicationErrorNonNullableFields[]; } interface CalculatedDraftOrderNonNullableFields { draftOrder?: DraftOrderNonNullableFields; shippingOptions: ShippingOptionNonNullableFields[]; calculationErrors?: CalculationErrorsNonNullableFields; } interface CreateDraftOrderResponseNonNullableFields { calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface CreateEmptyDraftOrderResponseNonNullableFields { calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface AddLineItemsToDraftOrderResponseNonNullableFields { calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface UpdateLineItemsResponseNonNullableFields { calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface SetDiscountsResponseNonNullableFields { calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface CreateCustomDiscountsResponseNonNullableFields { calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface DeleteCustomDiscountsResponseNonNullableFields { calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface SetAdditionalFeesResponseNonNullableFields { calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface CreateCustomAdditionalFeesResponseNonNullableFields { calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface DeleteCustomAdditionalFeesResponseNonNullableFields { calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface SetShippingInfoResponseNonNullableFields { /** @internal */ calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface SetBuyerInfoResponseNonNullableFields { /** @internal */ calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface SetRecipientInfoResponseNonNullableFields { /** @internal */ calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface SetBillingInfoResponseNonNullableFields { /** @internal */ calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface GetDraftOrderResponseNonNullableFields { calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface GetOrderDraftabilityStatusResponseNonNullableFields { orderId: string; orderDraftable: boolean; nonDraftableReasons: NonDraftableReason[]; } interface CustomActivityNonNullableFields { appId: string; type: string; } interface MerchantCommentNonNullableFields { message: string; } interface OrderRefundedNonNullableFields { manual: boolean; amount?: PriceNonNullableFields; reason: string; } interface OrderCreatedFromExchangeNonNullableFields { originalOrderId: string; } interface LineItemExchangeDataNonNullableFields { lineItemId: string; quantity: number; } interface NewExchangeOrderCreatedNonNullableFields { exchangeOrderId: string; lineItems: LineItemExchangeDataNonNullableFields[]; } interface LineItemQuantityChangeNonNullableFields { originalQuantity: number; newQuantity: number; diff: number; deltaType: LineItemQuantityChangeType; } interface LineItemPriceChangeNonNullableFields { originalPrice?: PriceNonNullableFields; newPrice?: PriceNonNullableFields; } interface LineItemChangesNonNullableFields { _id: string; name?: ProductNameNonNullableFields; quantity?: LineItemQuantityChangeNonNullableFields; price?: LineItemPriceChangeNonNullableFields; } interface ManagedLineItemNonNullableFields { _id: string; name?: ProductNameNonNullableFields; quantity: number; } interface TranslatedValueNonNullableFields { original: string; } interface LineItemAmountNonNullableFields { _id: string; name?: ProductNameNonNullableFields; amount?: PriceNonNullableFields; } interface ManagedDiscountNonNullableFields { _id: string; name?: TranslatedValueNonNullableFields; affectedLineItems: LineItemAmountNonNullableFields[]; totalAmount?: PriceNonNullableFields; } interface ManagedAdditionalFeeNonNullableFields { _id: string; name?: TranslatedValueNonNullableFields; affectedLineItems: LineItemAmountNonNullableFields[]; totalAmount?: PriceNonNullableFields; } interface TotalPriceChangeNonNullableFields { originalTotal?: PriceNonNullableFields; newTotal?: PriceNonNullableFields; } interface ShippingInformationNonNullableFields { total?: PriceNonNullableFields; shippingTitle: string; } interface ShippingInformationChangeNonNullableFields { originalShippingInfo?: ShippingInformationNonNullableFields; newShippingInfo?: ShippingInformationNonNullableFields; } interface OrderChangeNonNullableFields { lineItemChanged?: LineItemChangesNonNullableFields; lineItemAdded?: ManagedLineItemNonNullableFields; lineItemRemoved?: ManagedLineItemNonNullableFields; discountAdded?: ManagedDiscountNonNullableFields; discountRemoved?: ManagedDiscountNonNullableFields; additionalFeeAdded?: ManagedAdditionalFeeNonNullableFields; additionalFeeRemoved?: ManagedAdditionalFeeNonNullableFields; totalPriceChanged?: TotalPriceChangeNonNullableFields; shippingInformationChanged?: ShippingInformationChangeNonNullableFields; } interface DraftOrderChangesAppliedNonNullableFields { draftOrderId: string; changes: OrderChangeNonNullableFields[]; } interface SavedPaymentMethodNonNullableFields { name: string; } interface AuthorizedPaymentCreatedNonNullableFields { paymentId: string; amount?: PriceNonNullableFields; } interface AuthorizedPaymentCapturedNonNullableFields { paymentId: string; amount?: PriceNonNullableFields; } interface AuthorizedPaymentVoidedNonNullableFields { paymentId: string; amount?: PriceNonNullableFields; } interface RegularPaymentRefundNonNullableFields { amount?: PriceNonNullableFields; } interface GiftCardPaymentRefundNonNullableFields { amount?: PriceNonNullableFields; } interface RefundedPaymentNonNullableFields { regular?: RegularPaymentRefundNonNullableFields; giftCard?: GiftCardPaymentRefundNonNullableFields; paymentId: string; externalRefund: boolean; } interface RefundInitiatedNonNullableFields { refundId: string; amount?: PriceNonNullableFields; payments: RefundedPaymentNonNullableFields[]; } interface PaymentRefundedNonNullableFields { refundId: string; payment?: RefundedPaymentNonNullableFields; } interface PaymentRefundFailedNonNullableFields { refundId: string; payment?: RefundedPaymentNonNullableFields; } interface RefundedAsStoreCreditNonNullableFields { amount?: PriceNonNullableFields; } interface RegularPaymentNonNullableFields { amount?: PriceNonNullableFields; } interface PaymentPendingNonNullableFields { regular?: RegularPaymentNonNullableFields; paymentId: string; } interface PaymentCanceledNonNullableFields { regular?: RegularPaymentNonNullableFields; paymentId: string; } interface PaymentDeclinedNonNullableFields { regular?: RegularPaymentNonNullableFields; paymentId: string; } interface WixReceiptNonNullableFields { receiptId: string; } interface ReceiptCreatedNonNullableFields { wixReceipt?: WixReceiptNonNullableFields; paymentId: string; } interface ReceiptSentNonNullableFields { wixReceipt?: WixReceiptNonNullableFields; paymentId: string; } interface ActivityNonNullableFields { customActivity?: CustomActivityNonNullableFields; merchantComment?: MerchantCommentNonNullableFields; orderRefunded?: OrderRefundedNonNullableFields; orderCreatedFromExchange?: OrderCreatedFromExchangeNonNullableFields; newExchangeOrderCreated?: NewExchangeOrderCreatedNonNullableFields; /** @internal */ draftOrderChangesApplied?: DraftOrderChangesAppliedNonNullableFields; /** @internal */ savedPaymentMethod?: SavedPaymentMethodNonNullableFields; /** @internal */ authorizedPaymentCreated?: AuthorizedPaymentCreatedNonNullableFields; /** @internal */ authorizedPaymentCaptured?: AuthorizedPaymentCapturedNonNullableFields; /** @internal */ authorizedPaymentVoided?: AuthorizedPaymentVoidedNonNullableFields; /** @internal */ refundInitiated?: RefundInitiatedNonNullableFields; /** @internal */ paymentRefunded?: PaymentRefundedNonNullableFields; /** @internal */ paymentRefundFailed?: PaymentRefundFailedNonNullableFields; /** @internal */ refundedAsStoreCredit?: RefundedAsStoreCreditNonNullableFields; /** @internal */ paymentPending?: PaymentPendingNonNullableFields; /** @internal */ paymentCanceled?: PaymentCanceledNonNullableFields; /** @internal */ paymentDeclined?: PaymentDeclinedNonNullableFields; /** @internal */ receiptCreated?: ReceiptCreatedNonNullableFields; /** @internal */ receiptSent?: ReceiptSentNonNullableFields; type: ActivityType; } interface V1CreatedByNonNullableFields { userId: string; memberId: string; visitorId: string; appId: string; } interface ChannelInfoNonNullableFields { type: ChannelType; } interface CustomFieldNonNullableFields { title: string; } interface V1BalanceSummaryNonNullableFields { balance?: BalanceNonNullableFields; paid?: PriceNonNullableFields; refunded?: PriceNonNullableFields; authorized?: PriceNonNullableFields; /** @internal */ pendingRefund?: PriceNonNullableFields; pending?: PriceNonNullableFields; } interface TagListNonNullableFields { tagIds: string[]; } interface TagsNonNullableFields { privateTags?: TagListNonNullableFields; tags?: TagListNonNullableFields; } interface OrderNonNullableFields { number: string; lineItems: OrderLineItemNonNullableFields[]; buyerInfo?: BuyerInfoNonNullableFields; paymentStatus: PaymentStatus; fulfillmentStatus: FulfillmentStatus; weightUnit: WeightUnit; taxIncludedInPrices: boolean; priceSummary?: PriceSummaryNonNullableFields; billingInfo?: AddressWithContactNonNullableFields; shippingInfo?: V1ShippingInformationNonNullableFields; status: OrderStatus; taxSummary?: TaxSummaryNonNullableFields; taxInfo?: OrderTaxInfoNonNullableFields; appliedDiscounts: AppliedDiscountNonNullableFields[]; activities: ActivityNonNullableFields[]; attributionSource: AttributionSource; createdBy?: V1CreatedByNonNullableFields; channelInfo?: ChannelInfoNonNullableFields; customFields: CustomFieldNonNullableFields[]; isInternalOrderCreate: boolean; payNow?: PriceSummaryNonNullableFields; balanceSummary?: V1BalanceSummaryNonNullableFields; additionalFees: AdditionalFeeNonNullableFields[]; recipientInfo?: AddressWithContactNonNullableFields; /** @internal */ tags?: TagsNonNullableFields; businessLocation?: LocationNonNullableFields; /** @internal */ payAfterFreeTrial?: PriceSummaryNonNullableFields; } interface CommitDraftOrderResponseNonNullableFields { committedDraftOrder?: DraftOrderNonNullableFields; orderAfterCommit?: OrderNonNullableFields; } interface CreateOrderFromDraftResponseNonNullableFields { /** @internal */ committedDraftOrder?: DraftOrderNonNullableFields; /** @internal */ createdOrder?: OrderNonNullableFields; } interface QueryDraftOrdersResponseNonNullableFields { draftOrders: DraftOrderNonNullableFields[]; } interface SetTaxExemptionResponseNonNullableFields { /** @internal */ calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } interface SetBusinessLocationResponseNonNullableFields { /** @internal */ calculatedDraftOrder?: CalculatedDraftOrderNonNullableFields; } 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[]; } interface UpdateLineItemsOptions { /** Details of changes to apply per line item */ lineItemChanges?: LineItemChangeDetails[]; } interface CreateCustomDiscountsOptions { /** The discounts to add. */ discounts?: DiscountOption[]; } interface CreateCustomAdditionalFeesOptions { /** The additional fees to add. added with opted-out setting */ customAdditionalFees?: AdditionalFeeOption[]; } interface CommitDraftOrderOptions { /** Optional side effects to trigger */ commitSettings?: DraftOrderCommitSettings; /** Reason for edit, given by user (optional). */ reason?: string | null; } interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface DraftOrdersQueryResult extends QueryCursorResult { 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; } export { OrderStatus as $, type AddLineItemsToDraftOrderOptions as A, DescriptionLineType as B, type CreateDraftOrderResponse as C, type DeleteCustomDiscountsResponse as D, ItemTypeItemType as E, SubscriptionFrequency as F, type GetDraftOrderResponse as G, PickupDetailsPickupMethod as H, type IdAndApplied as I, JurisdictionType as J, SourceType as K, AppliedDiscountDiscountType as L, DiscountReason as M, EditingStatus as N, PickupMethod as O, PaymentOptionType as P, FileType as Q, RuleType as R, type SetDiscountsResponse as S, TaxableAddressType as T, type UpdateLineItemsOptions as U, VatType as V, WeightUnit as W, DiscountType as X, NonDraftableReason as Y, PaymentStatus as Z, FulfillmentStatus as _, type CreateDraftOrderResponseNonNullableFields as a, type MerchantDiscountMerchantDiscountReasonOneOf as a$, LineItemQuantityChangeType as a0, ActivityType as a1, AttributionSource as a2, ChannelType as a3, SortOrder as a4, WebhookIdentityType as a5, type DraftOrder as a6, type ItemDetails as a7, type ItemDetailsChangeTypeOneOf as a8, type Price as a9, type ShippingDetails as aA, type ShippingDetailsChangeTypeOneOf as aB, type V1ShippingInformation as aC, type V1DeliveryLogistics as aD, type V1DeliveryLogisticsAddressOneOf as aE, type AddressWithContact as aF, type Address as aG, type StreetAddress as aH, type AddressLocation as aI, type FullAddressContactDetails as aJ, type VatId as aK, type V1PickupDetails as aL, type PickupAddress as aM, type V1DeliveryTimeSlot as aN, type V1ShippingPrice as aO, type ShippingRegion as aP, type ShippingChangedDetails as aQ, type BuyerInfo as aR, type BuyerInfoIdOneOf as aS, type AdditionalFeeDetails as aT, type AdditionalFee as aU, type TaxDetails as aV, type DiscountDetails as aW, type AppliedDiscount as aX, type AppliedDiscountDiscountSourceOneOf as aY, type Coupon as aZ, type MerchantDiscount as a_, type PriceDescription as aa, type OrderLineItem as ab, type ProductName as ac, type CatalogReference as ad, type DescriptionLine as ae, type DescriptionLineValueOneOf as af, type DescriptionLineDescriptionLineValueOneOf as ag, type DescriptionLineName as ah, type PlainTextValue as ai, type Color as aj, type FocalPoint as ak, type PhysicalProperties as al, type ItemType as am, type ItemTypeItemTypeDataOneOf as an, type ItemTaxFullDetails as ao, type LineItemTaxInfo as ap, type LineItemTaxBreakdown as aq, type DigitalFile as ar, type SubscriptionInfo as as, type SubscriptionSettings as at, type FreeTrialPeriod as au, type LocationAndQuantity as av, type TaxableAddress as aw, type TaxableAddressTaxableAddressDataOneOf as ax, type ExtendedFields as ay, type ItemChangedDetails as az, type CreateEmptyDraftOrderResponse as b, type SetRecipientInfoRequest as b$, type DiscountRule as b0, type DiscountRuleName as b1, type LineItemDiscount as b2, type CreatedBy as b3, type CreatedByStringOneOf as b4, type PriceSummary as b5, type TaxSummary as b6, type BalanceSummary as b7, type Balance as b8, type DraftOrderCommitSettings as b9, type DetailsKindOneOf as bA, type ApplicationError as bB, type ValidationError as bC, type FieldViolation as bD, type SystemError as bE, type CarrierErrors as bF, type CarrierError as bG, type CreateEmptyDraftOrderRequest as bH, type AddLineItemsToDraftOrderRequest as bI, type CatalogReferenceLineItem as bJ, type CustomLineItem as bK, type SecuredMedia as bL, type UpdateLineItemsRequest as bM, type LineItemChangeDetails as bN, type SetDiscountsRequest as bO, type CreateCustomDiscountsRequest as bP, type DiscountOption as bQ, type DiscountOptionDiscountAmountOneOf as bR, type DeleteCustomDiscountsRequest as bS, type SetAdditionalFeesRequest as bT, type CreateCustomAdditionalFeesRequest as bU, type AdditionalFeeOption as bV, type DeleteCustomAdditionalFeesRequest as bW, type SetShippingInfoRequest as bX, type SetShippingInfoResponse as bY, type SetBuyerInfoRequest as bZ, type SetBuyerInfoResponse as b_, type InventoryUpdate as ba, type RecipientInfoDetails as bb, type RecipientInfoDetailsChangeTypeOneOf as bc, type RecipientInfoChangedDetails as bd, type OrderTaxInfo as be, type OrderTaxBreakdown as bf, type BuyerDetails as bg, type BuyerDetailsChangeTypeOneOf as bh, type BuyerChangedDetails as bi, type BillingDetails as bj, type BillingDetailsChangeTypeOneOf as bk, type BillingChangedDetails as bl, type BusinessLocationDetails as bm, type BusinessLocationDetailsChangeTypeOneOf as bn, type Location as bo, type BusinessLocationChangedDetails as bp, type CreateDraftOrderRequest as bq, type CalculatedDraftOrder as br, type ShippingOption as bs, type DeliveryLogistics as bt, type PickupDetails as bu, type DeliveryTimeSlot as bv, type ShippingPrice as bw, type CalculationErrors as bx, type CalculationErrorsShippingCalculationErrorOneOf as by, type Details as bz, type CreateEmptyDraftOrderResponseNonNullableFields as c, type V1BalanceSummary as c$, type SetRecipientInfoResponse as c0, type SetBillingInfoRequest as c1, type SetBillingInfoResponse as c2, type UpdateShippingInfoRequest as c3, type UpdateShippingInfoResponse as c4, type GetDraftOrderRequest as c5, type GetOrderDraftabilityStatusRequest as c6, type CommitDraftOrderRequest as c7, type Order as c8, type Activity as c9, type RefundedPayment as cA, type RefundedPaymentKindOneOf as cB, type RegularPaymentRefund as cC, type GiftCardPaymentRefund as cD, type MembershipPaymentRefund as cE, type PaymentRefunded as cF, type PaymentRefundFailed as cG, type RefundedAsStoreCredit as cH, type PaymentPending as cI, type PaymentPendingPaymentDetailsOneOf as cJ, type RegularPayment as cK, type RegularPaymentPaymentMethodDetailsOneOf as cL, type CreditCardDetails as cM, type PaymentCanceled as cN, type PaymentCanceledPaymentDetailsOneOf as cO, type PaymentDeclined as cP, type PaymentDeclinedPaymentDetailsOneOf as cQ, type ReceiptCreated as cR, type ReceiptCreatedReceiptInfoOneOf as cS, type WixReceipt as cT, type ExternalReceipt as cU, type ReceiptSent as cV, type ReceiptSentReceiptInfoOneOf as cW, type V1CreatedBy as cX, type V1CreatedByStringOneOf as cY, type ChannelInfo as cZ, type CustomField as c_, type ActivityContentOneOf as ca, type CustomActivity as cb, type MerchantComment as cc, type OrderRefunded as cd, type OrderCreatedFromExchange as ce, type NewExchangeOrderCreated as cf, type LineItemExchangeData as cg, type DraftOrderChangesApplied as ch, type OrderChange as ci, type OrderChangeValueOneOf as cj, type LineItemChanges as ck, type LineItemQuantityChange as cl, type LineItemPriceChange as cm, type ManagedLineItem as cn, type ManagedDiscount as co, type TranslatedValue as cp, type LineItemAmount as cq, type ManagedAdditionalFee as cr, type TotalPriceChange as cs, type ShippingInformationChange as ct, type ShippingInformation as cu, type SavedPaymentMethod as cv, type AuthorizedPaymentCreated as cw, type AuthorizedPaymentCaptured as cx, type AuthorizedPaymentVoided as cy, type RefundInitiated as cz, type AddLineItemsToDraftOrderResponse as d, type FulfillmentStatusesAggregate as d0, type Tags as d1, type TagList as d2, type CreateOrderFromDraftRequest as d3, type OrderCreateSettings as d4, type OrderCreateNotifications as d5, type CreateOrderFromDraftResponse as d6, type DeleteDraftOrderRequest as d7, type DeleteDraftOrderResponse as d8, type QueryDraftOrdersRequest as d9, type SetShippingInfoResponseNonNullableFields as dA, type SetBuyerInfoResponseNonNullableFields as dB, type SetRecipientInfoResponseNonNullableFields as dC, type SetBillingInfoResponseNonNullableFields as dD, type CreateOrderFromDraftResponseNonNullableFields as dE, type QueryDraftOrdersResponseNonNullableFields as dF, type SetTaxExemptionResponseNonNullableFields as dG, type SetBusinessLocationResponseNonNullableFields as dH, type DraftOrdersQueryResult as dI, type CursorQuery as da, type CursorQueryPagingMethodOneOf as db, type Sorting as dc, type CursorPaging as dd, type QueryDraftOrdersResponse as de, type CursorPagingMetadata as df, type Cursors as dg, type UpdateExtendedFieldsRequest as dh, type UpdateExtendedFieldsResponse as di, type SetTaxExemptionRequest as dj, type SetTaxExemptionResponse as dk, type GetDraftEditabilityStatusRequest as dl, type GetDraftEditabilityStatusResponse as dm, type SetBusinessLocationRequest as dn, type SetBusinessLocationResponse as dp, type DomainEvent as dq, type DomainEventBodyOneOf as dr, type EntityCreatedEvent as ds, type RestoreInfo as dt, type EntityUpdatedEvent as du, type EntityDeletedEvent as dv, type ActionEvent as dw, type MessageEnvelope as dx, type IdentificationData as dy, type IdentificationDataIdOneOf as dz, type AddLineItemsToDraftOrderResponseNonNullableFields as e, type UpdateLineItemsResponse as f, type UpdateLineItemsResponseNonNullableFields as g, type SetDiscountsResponseNonNullableFields as h, type CreateCustomDiscountsOptions as i, type CreateCustomDiscountsResponse as j, type CreateCustomDiscountsResponseNonNullableFields as k, type DeleteCustomDiscountsResponseNonNullableFields as l, type SetAdditionalFeesResponse as m, type SetAdditionalFeesResponseNonNullableFields as n, type CreateCustomAdditionalFeesOptions as o, type CreateCustomAdditionalFeesResponse as p, type CreateCustomAdditionalFeesResponseNonNullableFields as q, type DeleteCustomAdditionalFeesResponse as r, type DeleteCustomAdditionalFeesResponseNonNullableFields as s, type GetDraftOrderResponseNonNullableFields as t, type GetOrderDraftabilityStatusResponse as u, type GetOrderDraftabilityStatusResponseNonNullableFields as v, type CommitDraftOrderOptions as w, type CommitDraftOrderResponse as x, type CommitDraftOrderResponseNonNullableFields as y, type DraftOrdersQueryBuilder as z };