/** * A SubscriptionContract is a ... * You can ... * Read more about SubscriptionContracts * in this [article](). */ export interface SubscriptionContract { /** * SubscriptionContract ID. * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the SubscriptionContract is updated. * To prevent conflicting changes, the current revision must be passed when updating the SubscriptionContract. * * Ignored when creating a SubscriptionOrderContract. * @readonly */ revision?: string | null; /** * Date and time the subscription contract was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _createdDate?: Date | null; /** * Date and time the subscription contract was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @readonly */ _updatedDate?: Date | null; /** Subscription option description. For example, `"1kg of selected coffee, once a month"`. */ description?: string | null; /** Subscription detailed information. */ subscriptionSettings?: V1SubscriptionSettings; /** * Order line items. * @readonly */ lineItems?: OrderLineItem[]; /** Buyer information. */ buyerInfo?: BuyerInfo; /** * 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. * * Default: `false` */ taxIncludedInPrices?: boolean; /** * Order price summary. * @readonly */ priceSummary?: PriceSummary; /** Billing address and contact details. */ billingInfo?: AddressWithContact; /** Shipping info and selected shipping option details. */ shippingInfo?: ShippingInformation; /** Applied discounts. */ appliedDiscounts?: AppliedDiscount[]; /** Information about the sales channel that submitted this order. */ channelInfo?: ChannelInfo; /** Custom fields. */ customFields?: CustomField[]; /** * 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; /** * Custom field data for the subscription contract object. * * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the [app dashboard](https://dev.wix.com/dc3/my-apps/) before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** Subscription option title. For example, `"Monthly coffee Subscription"`. */ title?: string | null; /** Additional fees applied to subscription contract. */ additionalFees?: AdditionalFee[]; } export interface V1SubscriptionSettings { /** Frequency of recurring payment. */ frequency?: SubscriptionFrequency; /** Interval of recurring payment. */ interval?: number | null; /** Whether subscription is renewed automatically at the end of each period. */ autoRenewal?: boolean; /** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */ billingCycles?: number | null; /** Whether to allow the customer to cancel the subscription. */ enableCustomerCancellation?: boolean; } export declare enum SubscriptionFrequency { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } export interface V1FreeTrialPeriod { /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */ frequency?: SubscriptionFrequency; /** interval of period */ interval?: number; } export interface OrderLineItem { /** Line item ID. */ _id?: string; /** * Item name. * + Stores - `product.name` * + Bookings - `service.info.name` * + Events - `ticket.name` */ productName?: ProductName; /** * References to the line item's origin catalog. * This field may be empty in the case of a custom line item. */ catalogReference?: CatalogReference; /** Line item quantity. */ quantity?: number; /** * Total discount for this line item's entire quantity. * @readonly */ totalDiscount?: Price; /** Line item description lines. Used for display purposes for the cart, checkout and order. */ descriptionLines?: DescriptionLine[]; /** Line item image. */ image?: string; /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */ physicalProperties?: PhysicalProperties; /** Item type. Either a preset type or custom. */ itemType?: ItemType; /** * Fulfiller ID. Field is empty when the line item is self-fulfilled. * To get fulfillment information, pass the order ID to [List Fulfillments For Single Order](https://dev.wix.com/docs/rest/api-reference/wix-e-commerce/order-fulfillments/list-fulfillments-for-single-order). */ fulfillerId?: string | null; /** Number of items that were refunded. */ refundQuantity?: number | null; /** Number of items restocked. */ restockQuantity?: number | null; /** Line item price after line item discounts for display purposes. */ price?: Price; /** * Line item price before line item discounts for display purposes. Defaults to `price` when not provided. * @readonly */ priceBeforeDiscounts?: Price; /** * Total price after discounts, and before tax. * @readonly */ totalPriceBeforeTax?: Price; /** * Total price after all discounts and tax. * @readonly */ totalPriceAfterTax?: Price; /** * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`. * + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout. * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods. * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0. * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only. */ paymentOption?: PaymentOptionType; /** * 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; } export 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. */ export 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; } export interface Price { /** Amount. */ amount?: string; /** * Amount formatted with currency symbol. * @readonly */ formattedAmount?: string; } export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf { /** Description line plain text value. */ plainText?: PlainTextValue; /** Description line color value. */ colorInfo?: Color; /** Description line name. */ name?: DescriptionLineName; } /** @oneof */ export interface DescriptionLineValueOneOf { /** Description line plain text value. */ plainText?: PlainTextValue; /** Description line color value. */ colorInfo?: Color; } /** @oneof */ export interface DescriptionLineDescriptionLineValueOneOf { } export 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; } export 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; } export 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; } export declare enum DescriptionLineType { /** Unrecognized type. */ UNRECOGNISED = "UNRECOGNISED", /** Plain text type. */ PLAIN_TEXT = "PLAIN_TEXT", /** Color type. */ COLOR = "COLOR" } export interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; /** crop by height */ height?: number | null; /** crop by width */ width?: number | null; } export 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; } export 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 */ export interface ItemTypeItemTypeDataOneOf { /** Preset item type. */ preset?: ItemTypeItemType; /** Custom item type. When none of the preset types are suitable, specifies the custom type. */ custom?: string; } export declare enum ItemTypeItemType { UNRECOGNISED = "UNRECOGNISED", PHYSICAL = "PHYSICAL", DIGITAL = "DIGITAL", GIFT_CARD = "GIFT_CARD", SERVICE = "SERVICE" } /** Type of selected payment option for catalog item */ export 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" } export 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; } export 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. */ export 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). */ export declare enum JurisdictionType { UNDEFINED = "UNDEFINED", COUNTRY = "COUNTRY", STATE = "STATE", COUNTY = "COUNTY", CITY = "CITY", SPECIAL = "SPECIAL" } export 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; } export 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; } export interface SubscriptionSettings { /** Frequency of recurring payment. */ frequency?: V2SubscriptionFrequency; /** 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 */ export declare enum V2SubscriptionFrequency { UNDEFINED = "UNDEFINED", DAY = "DAY", WEEK = "WEEK", MONTH = "MONTH", YEAR = "YEAR" } export interface FreeTrialPeriod { /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */ frequency?: V2SubscriptionFrequency; /** interval of period */ interval?: number; } export 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; } export interface LocationAndQuantity { /** Location id in the associated owner app. */ _id?: string; /** * Location owner app, if not provided then the site business info locations will be used. * @deprecated Location owner app, if not provided then the site business info locations will be used. * @targetRemovalDate 2025-03-01 */ appId?: string | null; /** Quantity for specific location. */ quantity?: number; } export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType; } /** @oneof */ export interface TaxableAddressTaxableAddressDataOneOf { /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */ addressType?: TaxableAddressType; } export declare enum TaxableAddressType { UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS", BUSINESS = "BUSINESS", BILLING = "BILLING", SHIPPING = "SHIPPING" } export 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>; } /** Buyer Info */ export 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 */ export interface BuyerInfoIdOneOf { /** Visitor ID (if site visitor is not a member). */ visitorId?: string; /** Member ID (if site visitor is a site member). */ memberId?: string; } export 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" } export 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; } /** Billing Info and shipping details */ export interface AddressWithContact { /** Address. */ address?: Address; /** Contact details. */ contactDetails?: FullAddressContactDetails; } /** Physical address */ export interface Address { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address. */ streetAddress?: StreetAddress; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } export interface StreetAddress { /** Street number. */ number?: string; /** Street name. */ name?: string; } export interface AddressLocation { /** Address latitude. */ latitude?: number | null; /** Address longitude. */ longitude?: number | null; } /** Full contact details for an address */ export 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; } export 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 */ export declare enum VatType { UNSPECIFIED = "UNSPECIFIED", /** CPF - for individual tax payers. */ CPF = "CPF", /** CNPJ - for corporations */ CNPJ = "CNPJ" } export interface ShippingInformation { /** App Def Id of external provider which was a source of shipping info */ carrierId?: string | null; /** Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`. */ code?: string | null; /** * Shipping option title. * For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`. */ title?: string; /** Shipping logistics. */ logistics?: DeliveryLogistics; /** Shipping costs. */ cost?: ShippingPrice; /** Shipping region. */ region?: ShippingRegion; } export interface DeliveryLogistics extends DeliveryLogisticsAddressOneOf { /** Shipping address and contact details. */ shippingDestination?: AddressWithContact; /** Pickup details. */ pickupDetails?: PickupDetails; /** Expected delivery time in free text. For example, `"3-5 business days"`. */ deliveryTime?: string | null; /** Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`. */ instructions?: string | null; /** * Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. * @deprecated */ deliverByDate?: Date | null; /** Expected delivery time. */ deliveryTimeSlot?: DeliveryTimeSlot; } /** @oneof */ export interface DeliveryLogisticsAddressOneOf { /** Shipping address and contact details. */ shippingDestination?: AddressWithContact; /** Pickup details. */ pickupDetails?: PickupDetails; } export interface PickupDetails { /** Pickup address. */ address?: PickupAddress; /** Pickup method */ pickupMethod?: PickupMethod; } /** Physical address */ export interface PickupAddress { /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */ country?: string | null; /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */ subdivision?: string | null; /** City name. */ city?: string | null; /** Postal or zip code. */ postalCode?: string | null; /** Street address object, with number, name, and apartment number in separate fields. */ streetAddress?: StreetAddress; /** Main address line (usually street name and number). */ addressLine1?: string | null; /** Free text providing more detailed address info. Usually contains apt, suite, floor. */ addressLine2?: string | null; /** * Country's full name. * @readonly */ countryFullname?: string | null; /** * Subdivision full-name. * @readonly */ subdivisionFullname?: string | null; } export declare enum PickupMethod { UNKNOWN_METHOD = "UNKNOWN_METHOD", STORE_PICKUP = "STORE_PICKUP", PICKUP_POINT = "PICKUP_POINT" } export interface DeliveryTimeSlot { /** Delivery slot starting time. */ from?: Date | null; /** Delivery slot ending time. */ to?: Date | null; } export interface ShippingPrice { /** 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; } export interface ShippingRegion { /** Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. */ name?: string | null; } export 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. */ export 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; } export 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?: DiscountType; /** * 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 */ export interface AppliedDiscountDiscountSourceOneOf { /** Applied coupon info. */ coupon?: Coupon; /** Merchant discount. */ merchantDiscount?: MerchantDiscount; /** Automatic Discount */ discountRule?: DiscountRule; } export declare enum DiscountType { GLOBAL = "GLOBAL", SPECIFIC_ITEMS = "SPECIFIC_ITEMS", SHIPPING = "SHIPPING" } /** Coupon */ export interface Coupon { /** Coupon ID. */ _id?: string; /** Coupon code. */ code?: string; /** Coupon name. */ name?: string; /** Coupon value. */ amount?: Price; } export 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 */ export 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; } export declare enum DiscountReason { UNSPECIFIED = "UNSPECIFIED", EXCHANGED_ITEMS = "EXCHANGED_ITEMS" } export interface DiscountRule { /** Discount rule ID */ _id?: string; /** Discount rule name */ name?: DiscountRuleName; /** Discount value. */ amount?: Price; } export 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; } export interface LineItemDiscount { /** ID of line item the discount applies to. */ _id?: string; /** Total discount for this line item. */ totalDiscount?: Price; } export 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; } export 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" } export interface CustomField { /** Custom field value. */ value?: any; /** Custom field title. */ title?: string; /** Translated custom field title. */ translatedTitle?: string | null; } export 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[]; } export 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; } export interface CreateSubscriptionContractRequest { /** SubscriptionContract to be created. */ subscriptionContract?: SubscriptionContract; } export interface CreateSubscriptionContractResponse { /** The created SubscriptionContract. */ subscriptionContract?: SubscriptionContract; } export interface GetSubscriptionContractRequest { /** ID of the SubscriptionContract to retrieve. */ subscriptionContractId: string; } export interface GetSubscriptionContractResponse { /** The requested SubscriptionContract. */ subscriptionContract?: SubscriptionContract; } export interface UpdateSubscriptionContractRequest { /** SubscriptionContract to be updated, may be partial. */ subscriptionContract?: SubscriptionContract; } export interface UpdateSubscriptionContractResponse { /** Updated SubscriptionContract. */ subscriptionContract?: SubscriptionContract; } export interface QuerySubscriptionContractsRequest { /** WQL expression. */ query?: CursorQuery; } export interface CursorQuery extends CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` * Learn more about the [filter format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * Learn more about the [sort format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sort?: Sorting[]; } /** @oneof */ export interface CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } export interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } export 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; } export interface QuerySubscriptionContractsResponse { /** List of SubscriptionContracts. */ subscriptionContracts?: SubscriptionContract[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata; } export interface CursorPagingMetadata { /** Number of items returned in the response. */ 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; } export 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; } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entity?: string; } export interface RestoreInfo { deletedDate?: Date | null; } export interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } export interface ActionEvent { body?: string; } export interface Empty { } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface V1FreeTrialPeriodNonNullableFields { frequency: SubscriptionFrequency; interval: number; } interface V1SubscriptionSettingsNonNullableFields { frequency: SubscriptionFrequency; autoRenewal: boolean; enableCustomerCancellation: boolean; freeTrialPeriod?: V1FreeTrialPeriodNonNullableFields; } interface ProductNameNonNullableFields { original: string; } interface CatalogReferenceNonNullableFields { catalogItemId: string; appId: string; } interface PriceNonNullableFields { amount: string; formattedAmount: string; } interface PlainTextValueNonNullableFields { original: string; } interface ColorNonNullableFields { original: string; } interface DescriptionLineNameNonNullableFields { original: string; } interface DescriptionLineNonNullableFields { plainText?: PlainTextValueNonNullableFields; colorInfo?: ColorNonNullableFields; plainTextValue?: PlainTextValueNonNullableFields; color: string; name?: DescriptionLineNameNonNullableFields; lineType: DescriptionLineType; } interface PhysicalPropertiesNonNullableFields { shippable: boolean; } interface ItemTypeNonNullableFields { preset: ItemTypeItemType; custom: string; } interface ItemTaxFullDetailsNonNullableFields { taxableAmount?: PriceNonNullableFields; taxRate: string; totalTax?: PriceNonNullableFields; } interface LineItemTaxBreakdownNonNullableFields { taxAmount?: PriceNonNullableFields; jurisdictionType: JurisdictionType; nonTaxableAmount?: PriceNonNullableFields; taxableAmount?: PriceNonNullableFields; } interface LineItemTaxInfoNonNullableFields { taxAmount?: PriceNonNullableFields; taxableAmount?: PriceNonNullableFields; taxIncludedInPrice: boolean; taxBreakdown: LineItemTaxBreakdownNonNullableFields[]; } interface DigitalFileNonNullableFields { fileId: string; } interface FreeTrialPeriodNonNullableFields { frequency: V2SubscriptionFrequency; interval: number; } interface SubscriptionSettingsNonNullableFields { frequency: V2SubscriptionFrequency; autoRenewal: boolean; enableCustomerCancellation: boolean; freeTrialPeriod?: FreeTrialPeriodNonNullableFields; } interface SubscriptionInfoNonNullableFields { cycleNumber: number; subscriptionOptionTitle: string; subscriptionSettings?: SubscriptionSettingsNonNullableFields; } interface PriceDescriptionNonNullableFields { original: string; } interface LocationAndQuantityNonNullableFields { _id: string; quantity: number; } interface TaxableAddressNonNullableFields { addressType: TaxableAddressType; } interface OrderLineItemNonNullableFields { _id: string; productName?: ProductNameNonNullableFields; catalogReference?: CatalogReferenceNonNullableFields; quantity: number; totalDiscount?: PriceNonNullableFields; descriptionLines: DescriptionLineNonNullableFields[]; image: string; physicalProperties?: PhysicalPropertiesNonNullableFields; itemType?: ItemTypeNonNullableFields; price?: PriceNonNullableFields; priceBeforeDiscounts?: PriceNonNullableFields; totalPriceBeforeTax?: PriceNonNullableFields; totalPriceAfterTax?: PriceNonNullableFields; paymentOption: PaymentOptionType; taxDetails?: ItemTaxFullDetailsNonNullableFields; taxInfo?: LineItemTaxInfoNonNullableFields; digitalFile?: DigitalFileNonNullableFields; subscriptionInfo?: SubscriptionInfoNonNullableFields; priceDescription?: PriceDescriptionNonNullableFields; depositAmount?: PriceNonNullableFields; locations: LocationAndQuantityNonNullableFields[]; lineItemPrice?: PriceNonNullableFields; taxableAddress?: TaxableAddressNonNullableFields; priceUndetermined: boolean; fixedQuantity: boolean; } interface BuyerInfoNonNullableFields { visitorId: string; memberId: string; } interface PriceSummaryNonNullableFields { subtotal?: PriceNonNullableFields; shipping?: PriceNonNullableFields; tax?: PriceNonNullableFields; discount?: PriceNonNullableFields; totalPrice?: PriceNonNullableFields; total?: PriceNonNullableFields; totalWithGiftCard?: PriceNonNullableFields; totalWithoutGiftCard?: PriceNonNullableFields; totalAdditionalFees?: PriceNonNullableFields; } 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 PickupDetailsNonNullableFields { address?: PickupAddressNonNullableFields; pickupMethod: PickupMethod; } interface DeliveryLogisticsNonNullableFields { shippingDestination?: AddressWithContactNonNullableFields; pickupDetails?: PickupDetailsNonNullableFields; } interface ShippingPriceNonNullableFields { price?: PriceNonNullableFields; totalPriceBeforeTax?: PriceNonNullableFields; totalPriceAfterTax?: PriceNonNullableFields; taxDetails?: ItemTaxFullDetailsNonNullableFields; discount?: PriceNonNullableFields; } interface ShippingInformationNonNullableFields { title: string; logistics?: DeliveryLogisticsNonNullableFields; cost?: ShippingPriceNonNullableFields; } interface OrderTaxBreakdownNonNullableFields { taxName: string; taxType: string; jurisdiction: string; jurisdictionType: JurisdictionType; rate: string; aggregatedTaxAmount?: PriceNonNullableFields; aggregatedTaxableAmount?: PriceNonNullableFields; } interface OrderTaxInfoNonNullableFields { totalTax?: PriceNonNullableFields; taxBreakdown: OrderTaxBreakdownNonNullableFields[]; } interface CouponNonNullableFields { _id: string; code: string; name: string; amount?: PriceNonNullableFields; } interface MerchantDiscountNonNullableFields { discountReason: DiscountReason; amount?: PriceNonNullableFields; } interface DiscountRuleNameNonNullableFields { original: string; } interface DiscountRuleNonNullableFields { _id: string; name?: DiscountRuleNameNonNullableFields; amount?: PriceNonNullableFields; } interface LineItemDiscountNonNullableFields { _id: string; totalDiscount?: PriceNonNullableFields; } interface AppliedDiscountNonNullableFields { coupon?: CouponNonNullableFields; merchantDiscount?: MerchantDiscountNonNullableFields; discountRule?: DiscountRuleNonNullableFields; discountType: DiscountType; lineItemIds: string[]; lineItemDiscounts: LineItemDiscountNonNullableFields[]; } interface ChannelInfoNonNullableFields { type: ChannelType; } interface CustomFieldNonNullableFields { title: string; } interface AdditionalFeeNonNullableFields { name: string; price?: PriceNonNullableFields; taxDetails?: ItemTaxFullDetailsNonNullableFields; priceBeforeTax?: PriceNonNullableFields; priceAfterTax?: PriceNonNullableFields; _id: string; lineItemIds: string[]; } interface LocationNonNullableFields { _id: string; name: string; } export interface SubscriptionContractNonNullableFields { subscriptionSettings?: V1SubscriptionSettingsNonNullableFields; lineItems: OrderLineItemNonNullableFields[]; buyerInfo?: BuyerInfoNonNullableFields; weightUnit: WeightUnit; taxIncludedInPrices: boolean; priceSummary?: PriceSummaryNonNullableFields; billingInfo?: AddressWithContactNonNullableFields; shippingInfo?: ShippingInformationNonNullableFields; taxInfo?: OrderTaxInfoNonNullableFields; appliedDiscounts: AppliedDiscountNonNullableFields[]; channelInfo?: ChannelInfoNonNullableFields; customFields: CustomFieldNonNullableFields[]; recipientInfo?: AddressWithContactNonNullableFields; additionalFees: AdditionalFeeNonNullableFields[]; businessLocation?: LocationNonNullableFields; } export interface GetSubscriptionContractResponseNonNullableFields { subscriptionContract?: SubscriptionContractNonNullableFields; } export interface QuerySubscriptionContractsResponseNonNullableFields { subscriptionContracts: SubscriptionContractNonNullableFields[]; } export interface BaseEventMetadata { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; } export interface EventMetadata extends BaseEventMetadata { /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } export interface SubscriptionContractCreatedEnvelope { entity: SubscriptionContract; metadata: EventMetadata; } /** @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ * @webhook * @eventType wix.ecom.subscription_contracts.v1.subscription_contract_created * @documentationMaturity preview */ export declare function onSubscriptionContractCreated(handler: (event: SubscriptionContractCreatedEnvelope) => void | Promise): void; export interface SubscriptionContractDeletedEnvelope { metadata: EventMetadata; } /** @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ * @webhook * @eventType wix.ecom.subscription_contracts.v1.subscription_contract_deleted * @documentationMaturity preview */ export declare function onSubscriptionContractDeleted(handler: (event: SubscriptionContractDeletedEnvelope) => void | Promise): void; export interface SubscriptionContractUpdatedEnvelope { entity: SubscriptionContract; metadata: EventMetadata; } /** @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ * @webhook * @eventType wix.ecom.subscription_contracts.v1.subscription_contract_updated * @documentationMaturity preview */ export declare function onSubscriptionContractUpdated(handler: (event: SubscriptionContractUpdatedEnvelope) => void | Promise): void; /** * Retrieves a SubscriptionContract. * @param subscriptionContractId - ID of the SubscriptionContract to retrieve. * @public * @documentationMaturity preview * @requiredField subscriptionContractId * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @applicableIdentity APP * @returns The requested SubscriptionContract. * @fqn wix.ecom.subscription_contracts.v1.SubscriptionContracts.GetSubscriptionContract */ export declare function getSubscriptionContract(subscriptionContractId: string): Promise; /** * Retrieves a list of SubscriptionContracts, given the provided [paging, filtering, and sorting][1]. * * Up to 300 SubscriptionContracts can be returned per request. * * To learn how to query SubscriptionContracts, see [API Query Language][2]. * * [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging * [2]: https://dev.wix.com/api/rest/getting-started/api-query-language * @public * @documentationMaturity preview * @permissionScope Manage Stores - all permissions * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES * @permissionScope Read eCommerce - all read permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM * @permissionScope Manage eCommerce - all permissions * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ * @applicableIdentity APP * @fqn wix.ecom.subscription_contracts.v1.SubscriptionContracts.QuerySubscriptionContracts */ export declare function querySubscriptionContracts(): SubscriptionContractsQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } export interface SubscriptionContractsQueryResult extends QueryCursorResult { items: SubscriptionContract[]; query: SubscriptionContractsQueryBuilder; next: () => Promise; prev: () => Promise; } export interface SubscriptionContractsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'buyerInfo.contactId', value: any) => SubscriptionContractsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'buyerInfo.contactId', value: any) => SubscriptionContractsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'buyerInfo.contactId', value: string) => SubscriptionContractsQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. * @documentationMaturity preview */ hasSome: (propertyName: '_id' | 'buyerInfo.contactId', value: any[]) => SubscriptionContractsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'buyerInfo.contactId', value: any) => SubscriptionContractsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'buyerInfo.contactId', value: boolean) => SubscriptionContractsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | 'buyerInfo.contactId'>) => SubscriptionContractsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | 'buyerInfo.contactId'>) => SubscriptionContractsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => SubscriptionContractsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => SubscriptionContractsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } export {};