import { bq as CreateDraftOrderRequest$1, C as CreateDraftOrderResponse$1, a as CreateDraftOrderResponseNonNullableFields$1, bH as CreateEmptyDraftOrderRequest$1, b as CreateEmptyDraftOrderResponse$1, c as CreateEmptyDraftOrderResponseNonNullableFields$1, bI as AddLineItemsToDraftOrderRequest$1, d as AddLineItemsToDraftOrderResponse$1, e as AddLineItemsToDraftOrderResponseNonNullableFields$1, bM as UpdateLineItemsRequest$1, f as UpdateLineItemsResponse$1, g as UpdateLineItemsResponseNonNullableFields$1, bO as SetDiscountsRequest$1, S as SetDiscountsResponse$1, h as SetDiscountsResponseNonNullableFields$1, bP as CreateCustomDiscountsRequest$1, j as CreateCustomDiscountsResponse$1, k as CreateCustomDiscountsResponseNonNullableFields$1, bS as DeleteCustomDiscountsRequest$1, D as DeleteCustomDiscountsResponse$1, l as DeleteCustomDiscountsResponseNonNullableFields$1, bT as SetAdditionalFeesRequest$1, m as SetAdditionalFeesResponse$1, n as SetAdditionalFeesResponseNonNullableFields$1, bU as CreateCustomAdditionalFeesRequest$1, p as CreateCustomAdditionalFeesResponse$1, q as CreateCustomAdditionalFeesResponseNonNullableFields$1, bW as DeleteCustomAdditionalFeesRequest$1, r as DeleteCustomAdditionalFeesResponse$1, s as DeleteCustomAdditionalFeesResponseNonNullableFields$1, bX as SetShippingInfoRequest$1, bY as SetShippingInfoResponse$1, dA as SetShippingInfoResponseNonNullableFields$1, bZ as SetBuyerInfoRequest$1, b_ as SetBuyerInfoResponse$1, dB as SetBuyerInfoResponseNonNullableFields$1, b$ as SetRecipientInfoRequest$1, c0 as SetRecipientInfoResponse$1, dC as SetRecipientInfoResponseNonNullableFields$1, c1 as SetBillingInfoRequest$1, c2 as SetBillingInfoResponse$1, dD as SetBillingInfoResponseNonNullableFields$1, c5 as GetDraftOrderRequest$1, G as GetDraftOrderResponse$1, t as GetDraftOrderResponseNonNullableFields$1, c6 as GetOrderDraftabilityStatusRequest$1, u as GetOrderDraftabilityStatusResponse$1, v as GetOrderDraftabilityStatusResponseNonNullableFields$1, c7 as CommitDraftOrderRequest$1, x as CommitDraftOrderResponse$1, y as CommitDraftOrderResponseNonNullableFields$1, d3 as CreateOrderFromDraftRequest$1, d6 as CreateOrderFromDraftResponse$1, dE as CreateOrderFromDraftResponseNonNullableFields$1, d7 as DeleteDraftOrderRequest$1, d8 as DeleteDraftOrderResponse$1, d9 as QueryDraftOrdersRequest$1, de as QueryDraftOrdersResponse$1, dF as QueryDraftOrdersResponseNonNullableFields$1, dj as SetTaxExemptionRequest$1, dk as SetTaxExemptionResponse$1, dG as SetTaxExemptionResponseNonNullableFields$1, dn as SetBusinessLocationRequest$1, dp as SetBusinessLocationResponse$1, dH as SetBusinessLocationResponseNonNullableFields$1 } from './ecom-v1-draft-order-draft-orders.universal-VzJASiqs.js'; /** 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; /** * 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?: Image; /** 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; /** * 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 Image { /** WixMedia image ID. */ id?: string; /** Image URL. */ url?: string; /** * Original image height. * @readonly */ height?: number; /** * Original image width. * @readonly */ width?: number; /** Image alt text. */ altText?: string | null; /** * Image filename. * @readonly */ filename?: string | 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; } 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; } /** Frequency unit of recurring payment */ declare enum SubscriptionFrequency { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } 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). */ addressLine?: 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; } /** 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). */ addressLine?: 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[]; } 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; } /** @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; } /** @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 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 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; } 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?: PageUrlV2; /** 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?: Image; /** 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 PageUrlV2 { /** The relative path for the page within the site. For example, `/product-page/a-product`. */ relativePath?: string; /** The page's full URL. For example, `https://mysite.com/product-page/a-product`. */ url?: string | null; } 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 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 { } 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 { } interface SetShippingInfoResponse { } interface SetBuyerInfoRequest { } interface SetBuyerInfoResponse { } interface SetRecipientInfoRequest { } interface SetRecipientInfoResponse { } interface SetBillingInfoRequest { } interface SetBillingInfoResponse { } 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; } 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; /** * 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; } 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; } 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 transactions. * @readonly */ pending?: Price; } interface CreateOrderFromDraftRequest { } interface CreateOrderFromDraftResponse { } 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 SetTaxExemptionRequest { } interface SetTaxExemptionResponse { } interface SetBusinessLocationRequest { } interface SetBusinessLocationResponse { } 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 FocalPointNonNullableFields { x: number; y: number; } interface ImageNonNullableFields { id: string; url: string; height: number; width: number; focalPoint?: FocalPointNonNullableFields; } 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 SubscriptionSettingsNonNullableFields { frequency: SubscriptionFrequency; autoRenewal: boolean; } interface SubscriptionInfoNonNullableFields { cycleNumber: number; subscriptionOptionTitle: string; subscriptionSettings?: SubscriptionSettingsNonNullableFields; } interface OrderLineItemNonNullableFields { id: string; productName?: ProductNameNonNullableFields; catalogReference?: CatalogReferenceNonNullableFields; quantity: number; totalDiscount?: PriceNonNullableFields; descriptionLines: DescriptionLineNonNullableFields[]; image?: ImageNonNullableFields; 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; lineItemPrice?: PriceNonNullableFields; } 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 AppliedDiscountNonNullableFields { coupon?: CouponNonNullableFields; merchantDiscount?: MerchantDiscountNonNullableFields; discountRule?: DiscountRuleNonNullableFields; discountType: AppliedDiscountDiscountType; lineItemIds: string[]; } 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 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; 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 { } interface SetBuyerInfoResponseNonNullableFields { } interface SetRecipientInfoResponseNonNullableFields { } interface SetBillingInfoResponseNonNullableFields { } 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 ActivityNonNullableFields { customActivity?: CustomActivityNonNullableFields; merchantComment?: MerchantCommentNonNullableFields; orderRefunded?: OrderRefundedNonNullableFields; orderCreatedFromExchange?: OrderCreatedFromExchangeNonNullableFields; newExchangeOrderCreated?: NewExchangeOrderCreatedNonNullableFields; 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; pending?: PriceNonNullableFields; } 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; businessLocation?: LocationNonNullableFields; } interface CommitDraftOrderResponseNonNullableFields { committedDraftOrder?: DraftOrderNonNullableFields; orderAfterCommit?: OrderNonNullableFields; } interface CreateOrderFromDraftResponseNonNullableFields { } interface QueryDraftOrdersResponseNonNullableFields { draftOrders: DraftOrderNonNullableFields[]; } interface SetTaxExemptionResponseNonNullableFields { } interface SetBusinessLocationResponseNonNullableFields { } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function createDraftOrder(): __PublicMethodMetaInfo<'POST', {}, CreateDraftOrderRequest$1, CreateDraftOrderRequest, CreateDraftOrderResponse$1 & CreateDraftOrderResponseNonNullableFields$1, CreateDraftOrderResponse & CreateDraftOrderResponseNonNullableFields>; declare function createEmptyDraftOrder(): __PublicMethodMetaInfo<'POST', {}, CreateEmptyDraftOrderRequest$1, CreateEmptyDraftOrderRequest, CreateEmptyDraftOrderResponse$1 & CreateEmptyDraftOrderResponseNonNullableFields$1, CreateEmptyDraftOrderResponse & CreateEmptyDraftOrderResponseNonNullableFields>; declare function addLineItemsToDraftOrder(): __PublicMethodMetaInfo<'POST', { draftOrderId: string; }, AddLineItemsToDraftOrderRequest$1, AddLineItemsToDraftOrderRequest, AddLineItemsToDraftOrderResponse$1 & AddLineItemsToDraftOrderResponseNonNullableFields$1, AddLineItemsToDraftOrderResponse & AddLineItemsToDraftOrderResponseNonNullableFields>; declare function updateLineItems(): __PublicMethodMetaInfo<'POST', { draftOrderId: string; }, UpdateLineItemsRequest$1, UpdateLineItemsRequest, UpdateLineItemsResponse$1 & UpdateLineItemsResponseNonNullableFields$1, UpdateLineItemsResponse & UpdateLineItemsResponseNonNullableFields>; declare function setDiscounts(): __PublicMethodMetaInfo<'POST', { draftOrderId: string; }, SetDiscountsRequest$1, SetDiscountsRequest, SetDiscountsResponse$1 & SetDiscountsResponseNonNullableFields$1, SetDiscountsResponse & SetDiscountsResponseNonNullableFields>; declare function createCustomDiscounts(): __PublicMethodMetaInfo<'POST', { draftOrderId: string; }, CreateCustomDiscountsRequest$1, CreateCustomDiscountsRequest, CreateCustomDiscountsResponse$1 & CreateCustomDiscountsResponseNonNullableFields$1, CreateCustomDiscountsResponse & CreateCustomDiscountsResponseNonNullableFields>; declare function deleteCustomDiscounts(): __PublicMethodMetaInfo<'POST', { draftOrderId: string; }, DeleteCustomDiscountsRequest$1, DeleteCustomDiscountsRequest, DeleteCustomDiscountsResponse$1 & DeleteCustomDiscountsResponseNonNullableFields$1, DeleteCustomDiscountsResponse & DeleteCustomDiscountsResponseNonNullableFields>; declare function setAdditionalFees(): __PublicMethodMetaInfo<'POST', { draftOrderId: string; }, SetAdditionalFeesRequest$1, SetAdditionalFeesRequest, SetAdditionalFeesResponse$1 & SetAdditionalFeesResponseNonNullableFields$1, SetAdditionalFeesResponse & SetAdditionalFeesResponseNonNullableFields>; declare function createCustomAdditionalFees(): __PublicMethodMetaInfo<'POST', { draftOrderId: string; }, CreateCustomAdditionalFeesRequest$1, CreateCustomAdditionalFeesRequest, CreateCustomAdditionalFeesResponse$1 & CreateCustomAdditionalFeesResponseNonNullableFields$1, CreateCustomAdditionalFeesResponse & CreateCustomAdditionalFeesResponseNonNullableFields>; declare function deleteCustomAdditionalFees(): __PublicMethodMetaInfo<'POST', { draftOrderId: string; }, DeleteCustomAdditionalFeesRequest$1, DeleteCustomAdditionalFeesRequest, DeleteCustomAdditionalFeesResponse$1 & DeleteCustomAdditionalFeesResponseNonNullableFields$1, DeleteCustomAdditionalFeesResponse & DeleteCustomAdditionalFeesResponseNonNullableFields>; declare function setShippingInfo(): __PublicMethodMetaInfo<'PUT', {}, SetShippingInfoRequest$1, SetShippingInfoRequest, SetShippingInfoResponse$1 & SetShippingInfoResponseNonNullableFields$1, SetShippingInfoResponse & SetShippingInfoResponseNonNullableFields>; declare function setBuyerInfo(): __PublicMethodMetaInfo<'PUT', {}, SetBuyerInfoRequest$1, SetBuyerInfoRequest, SetBuyerInfoResponse$1 & SetBuyerInfoResponseNonNullableFields$1, SetBuyerInfoResponse & SetBuyerInfoResponseNonNullableFields>; declare function setRecipientInfo(): __PublicMethodMetaInfo<'PUT', {}, SetRecipientInfoRequest$1, SetRecipientInfoRequest, SetRecipientInfoResponse$1 & SetRecipientInfoResponseNonNullableFields$1, SetRecipientInfoResponse & SetRecipientInfoResponseNonNullableFields>; declare function setBillingInfo(): __PublicMethodMetaInfo<'PUT', {}, SetBillingInfoRequest$1, SetBillingInfoRequest, SetBillingInfoResponse$1 & SetBillingInfoResponseNonNullableFields$1, SetBillingInfoResponse & SetBillingInfoResponseNonNullableFields>; declare function getDraftOrder(): __PublicMethodMetaInfo<'GET', { draftOrderId: string; }, GetDraftOrderRequest$1, GetDraftOrderRequest, GetDraftOrderResponse$1 & GetDraftOrderResponseNonNullableFields$1, GetDraftOrderResponse & GetDraftOrderResponseNonNullableFields>; declare function getOrderDraftabilityStatus(): __PublicMethodMetaInfo<'GET', { orderId: string; }, GetOrderDraftabilityStatusRequest$1, GetOrderDraftabilityStatusRequest, GetOrderDraftabilityStatusResponse$1 & GetOrderDraftabilityStatusResponseNonNullableFields$1, GetOrderDraftabilityStatusResponse & GetOrderDraftabilityStatusResponseNonNullableFields>; declare function commitDraftOrder(): __PublicMethodMetaInfo<'POST', { draftOrderId: string; }, CommitDraftOrderRequest$1, CommitDraftOrderRequest, CommitDraftOrderResponse$1 & CommitDraftOrderResponseNonNullableFields$1, CommitDraftOrderResponse & CommitDraftOrderResponseNonNullableFields>; declare function createOrderFromDraft(): __PublicMethodMetaInfo<'POST', { draftOrderId: string; }, CreateOrderFromDraftRequest$1, CreateOrderFromDraftRequest, CreateOrderFromDraftResponse$1 & CreateOrderFromDraftResponseNonNullableFields$1, CreateOrderFromDraftResponse & CreateOrderFromDraftResponseNonNullableFields>; declare function deleteDraftOrder(): __PublicMethodMetaInfo<'DELETE', { draftOrderId: string; }, DeleteDraftOrderRequest$1, DeleteDraftOrderRequest, DeleteDraftOrderResponse$1, DeleteDraftOrderResponse>; declare function queryDraftOrders(): __PublicMethodMetaInfo<'POST', {}, QueryDraftOrdersRequest$1, QueryDraftOrdersRequest, QueryDraftOrdersResponse$1 & QueryDraftOrdersResponseNonNullableFields$1, QueryDraftOrdersResponse & QueryDraftOrdersResponseNonNullableFields>; declare function setTaxExemption(): __PublicMethodMetaInfo<'PUT', {}, SetTaxExemptionRequest$1, SetTaxExemptionRequest, SetTaxExemptionResponse$1 & SetTaxExemptionResponseNonNullableFields$1, SetTaxExemptionResponse & SetTaxExemptionResponseNonNullableFields>; declare function setBusinessLocation(): __PublicMethodMetaInfo<'PUT', {}, SetBusinessLocationRequest$1, SetBusinessLocationRequest, SetBusinessLocationResponse$1 & SetBusinessLocationResponseNonNullableFields$1, SetBusinessLocationResponse & SetBusinessLocationResponseNonNullableFields>; export { type __PublicMethodMetaInfo, addLineItemsToDraftOrder, commitDraftOrder, createCustomAdditionalFees, createCustomDiscounts, createDraftOrder, createEmptyDraftOrder, createOrderFromDraft, deleteCustomAdditionalFees, deleteCustomDiscounts, deleteDraftOrder, getDraftOrder, getOrderDraftabilityStatus, queryDraftOrders, setAdditionalFees, setBillingInfo, setBusinessLocation, setBuyerInfo, setDiscounts, setRecipientInfo, setShippingInfo, setTaxExemption, updateLineItems };