@wix/auto_sdk_ecom_subscription-contracts 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.d.ts +16 -0
  11. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js +34 -0
  12. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js.map +1 -0
  13. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.d.ts +14 -0
  14. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js +198 -0
  15. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js.map +1 -0
  16. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.d.ts +16 -0
  17. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js +66 -0
  18. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js.map +1 -0
  19. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.d.ts +32 -0
  20. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js +152 -0
  21. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js.map +1 -0
  22. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +1437 -0
  23. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js +152 -0
  24. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -0
  25. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts +1591 -0
  26. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +325 -0
  27. package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.d.ts +16 -0
  39. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js +16 -0
  40. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js.map +1 -0
  41. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.d.ts +14 -0
  42. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js +193 -0
  43. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js.map +1 -0
  44. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.d.ts +16 -0
  45. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js +38 -0
  46. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js.map +1 -0
  47. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.d.ts +32 -0
  48. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js +132 -0
  49. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js.map +1 -0
  50. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +1437 -0
  51. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js +149 -0
  52. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -0
  53. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts +1591 -0
  54. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +297 -0
  55. package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.d.ts +16 -0
  66. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js +34 -0
  67. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js.map +1 -0
  68. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.d.ts +14 -0
  69. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js +198 -0
  70. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js.map +1 -0
  71. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.d.ts +16 -0
  72. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js +66 -0
  73. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js.map +1 -0
  74. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.d.ts +32 -0
  75. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js +152 -0
  76. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js.map +1 -0
  77. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +1478 -0
  78. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js +152 -0
  79. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -0
  80. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts +1690 -0
  81. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +325 -0
  82. package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.d.ts +16 -0
  93. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js +16 -0
  94. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.context.js.map +1 -0
  95. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.d.ts +14 -0
  96. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js +193 -0
  97. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.http.js.map +1 -0
  98. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.d.ts +16 -0
  99. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js +38 -0
  100. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.meta.js.map +1 -0
  101. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.d.ts +32 -0
  102. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js +132 -0
  103. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.public.js.map +1 -0
  104. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +1478 -0
  105. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js +149 -0
  106. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -0
  107. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts +1690 -0
  108. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +297 -0
  109. package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1591 @@
1
+ /**
2
+ * A SubscriptionContract is a ...
3
+ * You can ...
4
+ * Read more about SubscriptionContracts
5
+ * in this [article](<LINK_TO_KB_ARTICLE>).
6
+ */
7
+ export interface SubscriptionContract {
8
+ /**
9
+ * SubscriptionContract ID.
10
+ * @readonly
11
+ */
12
+ _id?: string | null;
13
+ /**
14
+ * Revision number, which increments by 1 each time the SubscriptionContract is updated.
15
+ * To prevent conflicting changes, the current revision must be passed when updating the SubscriptionContract.
16
+ *
17
+ * Ignored when creating a SubscriptionOrderContract.
18
+ * @readonly
19
+ */
20
+ revision?: string | null;
21
+ /**
22
+ * Date and time the subscription contract was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
23
+ * @readonly
24
+ */
25
+ _createdDate?: Date | null;
26
+ /**
27
+ * 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.
28
+ * @readonly
29
+ */
30
+ _updatedDate?: Date | null;
31
+ /** Subscription option description. For example, `"1kg of selected coffee, once a month"`. */
32
+ description?: string | null;
33
+ /** Subscription detailed information. */
34
+ subscriptionSettings?: V1SubscriptionSettings;
35
+ /**
36
+ * Order line items.
37
+ * @readonly
38
+ */
39
+ lineItems?: OrderLineItem[];
40
+ /** Buyer information. */
41
+ buyerInfo?: BuyerInfo;
42
+ /**
43
+ * Language for communication with the buyer. Defaults to the site language.
44
+ * For a site that supports multiple languages, this is the language the buyer selected.
45
+ */
46
+ buyerLanguage?: string | null;
47
+ /** Weight measurement unit - defaults to site's weight unit. */
48
+ weightUnit?: WeightUnit;
49
+ /** 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. */
50
+ currency?: string | null;
51
+ /**
52
+ * Whether tax is included in line item prices.
53
+ *
54
+ * Default: `false`
55
+ */
56
+ taxIncludedInPrices?: boolean;
57
+ /**
58
+ * Order price summary.
59
+ * @readonly
60
+ */
61
+ priceSummary?: PriceSummary;
62
+ /** Billing address and contact details. */
63
+ billingInfo?: AddressWithContact;
64
+ /** Shipping info and selected shipping option details. */
65
+ shippingInfo?: ShippingInformation;
66
+ /** Applied discounts. */
67
+ appliedDiscounts?: AppliedDiscount[];
68
+ /** Information about the sales channel that submitted this order. */
69
+ channelInfo?: ChannelInfo;
70
+ /** Custom fields. */
71
+ customFields?: CustomField[];
72
+ /**
73
+ * Order recipient address and contact details.
74
+ *
75
+ * This field may differ from the address in `shippingInfo.logistics` when:
76
+ * + The chosen shipping option is pickup point or store pickup.
77
+ * + No shipping option is selected.
78
+ */
79
+ recipientInfo?: AddressWithContact;
80
+ /**
81
+ * Custom field data for the subscription contract object.
82
+ *
83
+ * [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.
84
+ */
85
+ extendedFields?: ExtendedFields;
86
+ /** Subscription option title. For example, `"Monthly coffee Subscription"`. */
87
+ title?: string | null;
88
+ /** Additional fees applied to subscription contract. */
89
+ additionalFees?: AdditionalFee[];
90
+ }
91
+ export interface V1SubscriptionSettings {
92
+ /** Frequency of recurring payment. */
93
+ frequency?: SubscriptionFrequency;
94
+ /** Interval of recurring payment. */
95
+ interval?: number | null;
96
+ /** Whether subscription is renewed automatically at the end of each period. */
97
+ autoRenewal?: boolean;
98
+ /** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */
99
+ billingCycles?: number | null;
100
+ /** Whether to allow the customer to cancel the subscription. */
101
+ enableCustomerCancellation?: boolean;
102
+ }
103
+ export declare enum SubscriptionFrequency {
104
+ UNDEFINED = "UNDEFINED",
105
+ DAY = "DAY",
106
+ WEEK = "WEEK",
107
+ MONTH = "MONTH",
108
+ YEAR = "YEAR"
109
+ }
110
+ export interface V1FreeTrialPeriod {
111
+ /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
112
+ frequency?: SubscriptionFrequency;
113
+ /** interval of period */
114
+ interval?: number;
115
+ }
116
+ export interface OrderLineItem {
117
+ /** Line item ID. */
118
+ _id?: string;
119
+ /**
120
+ * Item name.
121
+ * + Stores - `product.name`
122
+ * + Bookings - `service.info.name`
123
+ * + Events - `ticket.name`
124
+ */
125
+ productName?: ProductName;
126
+ /**
127
+ * References to the line item's origin catalog.
128
+ * This field may be empty in the case of a custom line item.
129
+ */
130
+ catalogReference?: CatalogReference;
131
+ /** Line item quantity. */
132
+ quantity?: number;
133
+ /**
134
+ * Total discount for this line item's entire quantity.
135
+ * @readonly
136
+ */
137
+ totalDiscount?: Price;
138
+ /** Line item description lines. Used for display purposes for the cart, checkout and order. */
139
+ descriptionLines?: DescriptionLine[];
140
+ /** Line item image. */
141
+ image?: string;
142
+ /** Physical properties of the item. When relevant, contains information such as SKU and item weight. */
143
+ physicalProperties?: PhysicalProperties;
144
+ /** Item type. Either a preset type or custom. */
145
+ itemType?: ItemType;
146
+ /**
147
+ * Fulfiller ID. Field is empty when the line item is self-fulfilled.
148
+ * 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).
149
+ */
150
+ fulfillerId?: string | null;
151
+ /** Number of items that were refunded. */
152
+ refundQuantity?: number | null;
153
+ /** Number of items restocked. */
154
+ restockQuantity?: number | null;
155
+ /** Line item price after line item discounts for display purposes. */
156
+ price?: Price;
157
+ /**
158
+ * Line item price before line item discounts for display purposes. Defaults to `price` when not provided.
159
+ * @readonly
160
+ */
161
+ priceBeforeDiscounts?: Price;
162
+ /**
163
+ * Total price after discounts, and before tax.
164
+ * @readonly
165
+ */
166
+ totalPriceBeforeTax?: Price;
167
+ /**
168
+ * Total price after all discounts and tax.
169
+ * @readonly
170
+ */
171
+ totalPriceAfterTax?: Price;
172
+ /**
173
+ * Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
174
+ * + `FULL_PAYMENT_ONLINE` - The entire payment for this item happens as part of the checkout.
175
+ * + `FULL_PAYMENT_OFFLINE` - The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
176
+ * + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
177
+ * + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only.
178
+ */
179
+ paymentOption?: PaymentOptionType;
180
+ /**
181
+ * Deprecated. Use `taxInfo` instead.
182
+ * This field will be removed on September 30, 2024.
183
+ * Tax details for this line item.
184
+ * @deprecated Deprecated. Use `taxInfo` instead.
185
+ * This field will be removed on September 30, 2024.
186
+ * Tax details for this line item.
187
+ * @replacedBy tax_info
188
+ * @targetRemovalDate 2024-09-30
189
+ */
190
+ taxDetails?: ItemTaxFullDetails;
191
+ /** Represents all the relevant tax details for a specific line item. */
192
+ taxInfo?: LineItemTaxInfo;
193
+ /** Digital file identifier, relevant only for items with type DIGITAL. */
194
+ digitalFile?: DigitalFile;
195
+ /** Subscription info. */
196
+ subscriptionInfo?: SubscriptionInfo;
197
+ /** Additional description for the price. For example, when price is 0 but additional details about the actual price are needed - "Starts at $67". */
198
+ priceDescription?: PriceDescription;
199
+ /**
200
+ * Item's price amount to be charged during checkout. Relevant for items with a `paymentOption` value of `"DEPOSIT_ONLINE"`.
201
+ * @readonly
202
+ */
203
+ depositAmount?: Price;
204
+ /**
205
+ * Custom extended fields for the line item object.
206
+ *
207
+ * [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.
208
+ */
209
+ extendedFields?: ExtendedFields;
210
+ }
211
+ export interface ProductName {
212
+ /**
213
+ * __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).
214
+ *
215
+ * Min: 1 character.
216
+ * Max: 200 characters.
217
+ */
218
+ original?: string;
219
+ /**
220
+ * Item name translated into the buyer's language.
221
+ *
222
+ * Min: 1 character.
223
+ * Max: 400 characters.
224
+ * Default: Same as `original`.
225
+ */
226
+ translated?: string | null;
227
+ }
228
+ /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
229
+ export interface CatalogReference {
230
+ /** ID of the item within the catalog it belongs to. */
231
+ catalogItemId?: string;
232
+ /**
233
+ * ID of the app providing the catalog.
234
+ *
235
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
236
+ *
237
+ * For items from Wix catalogs, the following values always apply:
238
+ * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
239
+ * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
240
+ * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
241
+ */
242
+ appId?: string;
243
+ /**
244
+ * 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.
245
+ *
246
+ * 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).
247
+ */
248
+ options?: Record<string, any> | null;
249
+ }
250
+ export interface Price {
251
+ /** Amount. */
252
+ amount?: string;
253
+ /**
254
+ * Amount formatted with currency symbol.
255
+ * @readonly
256
+ */
257
+ formattedAmount?: string;
258
+ }
259
+ export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
260
+ /** Description line plain text value. */
261
+ plainText?: PlainTextValue;
262
+ /** Description line color value. */
263
+ colorInfo?: Color;
264
+ /** Description line name. */
265
+ name?: DescriptionLineName;
266
+ }
267
+ /** @oneof */
268
+ export interface DescriptionLineValueOneOf {
269
+ /** Description line plain text value. */
270
+ plainText?: PlainTextValue;
271
+ /** Description line color value. */
272
+ colorInfo?: Color;
273
+ }
274
+ /** @oneof */
275
+ export interface DescriptionLineDescriptionLineValueOneOf {
276
+ }
277
+ export interface DescriptionLineName {
278
+ /** 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). */
279
+ original?: string;
280
+ /**
281
+ * Description line name translated into the buyer's language.
282
+ *
283
+ * Default: Same as `original`.
284
+ */
285
+ translated?: string | null;
286
+ }
287
+ export interface PlainTextValue {
288
+ /** 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). */
289
+ original?: string;
290
+ /**
291
+ * Description line plain text value translated into the buyer's language.
292
+ *
293
+ * Default: Same as `original`.
294
+ */
295
+ translated?: string | null;
296
+ }
297
+ export interface Color {
298
+ /** 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). */
299
+ original?: string;
300
+ /**
301
+ * Description line color name translated into the buyer's language.
302
+ *
303
+ * Default: Same as `original`.
304
+ */
305
+ translated?: string | null;
306
+ /** HEX or RGB color code for display. */
307
+ code?: string | null;
308
+ }
309
+ export declare enum DescriptionLineType {
310
+ /** Unrecognized type. */
311
+ UNRECOGNISED = "UNRECOGNISED",
312
+ /** Plain text type. */
313
+ PLAIN_TEXT = "PLAIN_TEXT",
314
+ /** Color type. */
315
+ COLOR = "COLOR"
316
+ }
317
+ export interface FocalPoint {
318
+ /** X-coordinate of the focal point. */
319
+ x?: number;
320
+ /** Y-coordinate of the focal point. */
321
+ y?: number;
322
+ /** crop by height */
323
+ height?: number | null;
324
+ /** crop by width */
325
+ width?: number | null;
326
+ }
327
+ export interface PhysicalProperties {
328
+ /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
329
+ weight?: number | null;
330
+ /** Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). */
331
+ sku?: string | null;
332
+ /** Whether this line item is shippable. */
333
+ shippable?: boolean;
334
+ }
335
+ export interface ItemType extends ItemTypeItemTypeDataOneOf {
336
+ /** Preset item type. */
337
+ preset?: ItemTypeItemType;
338
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
339
+ custom?: string;
340
+ }
341
+ /** @oneof */
342
+ export interface ItemTypeItemTypeDataOneOf {
343
+ /** Preset item type. */
344
+ preset?: ItemTypeItemType;
345
+ /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
346
+ custom?: string;
347
+ }
348
+ export declare enum ItemTypeItemType {
349
+ UNRECOGNISED = "UNRECOGNISED",
350
+ PHYSICAL = "PHYSICAL",
351
+ DIGITAL = "DIGITAL",
352
+ GIFT_CARD = "GIFT_CARD",
353
+ SERVICE = "SERVICE"
354
+ }
355
+ /** Type of selected payment option for catalog item */
356
+ export declare enum PaymentOptionType {
357
+ /** The entire payment for this item happens as part of the checkout. */
358
+ FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
359
+ /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
360
+ FULL_PAYMENT_OFFLINE = "FULL_PAYMENT_OFFLINE",
361
+ /** Payment for this item is done by charging a membership. When selected, `price` is `0`. */
362
+ MEMBERSHIP = "MEMBERSHIP",
363
+ /** Partial payment to be paid upfront during checkout. The initial amount to be paid for each line item is specified in `depositAmount`. */
364
+ DEPOSIT_ONLINE = "DEPOSIT_ONLINE",
365
+ /** 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`. */
366
+ MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
367
+ }
368
+ export interface ItemTaxFullDetails {
369
+ /** Taxable amount of this line item. */
370
+ taxableAmount?: Price;
371
+ /** Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`. */
372
+ taxRate?: string;
373
+ /** The calculated tax, based on the `taxableAmount` and `taxRate`. */
374
+ totalTax?: Price;
375
+ }
376
+ export interface LineItemTaxInfo {
377
+ /** Calculated tax, based on `taxable_amount` and `tax_rate`. */
378
+ taxAmount?: Price;
379
+ /** Amount for which tax is calculated. */
380
+ taxableAmount?: Price;
381
+ /** Tax rate %, as a decimal point. */
382
+ taxRate?: string | null;
383
+ /**
384
+ * Tax group ID.
385
+ * Learn more about [Tax Groups](https://dev.wix.com/docs/rest/business-management/payments/tax/tax-groups/introduction).
386
+ */
387
+ taxGroupId?: string | null;
388
+ /** Indicates whether the price already includes tax. */
389
+ taxIncludedInPrice?: boolean;
390
+ /** Tax information for a line item. */
391
+ taxBreakdown?: LineItemTaxBreakdown[];
392
+ }
393
+ /**
394
+ * TaxBreakdown represents tax information for a line item.
395
+ * It holds the tax amount and the tax rate for each tax authority that apply on the line item.
396
+ */
397
+ export interface LineItemTaxBreakdown {
398
+ /** Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec". */
399
+ jurisdiction?: string | null;
400
+ /** Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000. */
401
+ rate?: string | null;
402
+ /** Amount of tax calculated for this line item. */
403
+ taxAmount?: Price;
404
+ /** The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc. */
405
+ taxType?: string | null;
406
+ /**
407
+ * The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
408
+ * This name should be explicit enough to allow the merchant to understand what tax was calculated.
409
+ */
410
+ taxName?: string | null;
411
+ /** Type of jurisdiction that taxes were calculated for. */
412
+ jurisdictionType?: JurisdictionType;
413
+ /** Non-taxable amount of the line item price. */
414
+ nonTaxableAmount?: Price;
415
+ /** Taxable amount of the line item price. */
416
+ taxableAmount?: Price;
417
+ }
418
+ /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
419
+ export declare enum JurisdictionType {
420
+ UNDEFINED = "UNDEFINED",
421
+ COUNTRY = "COUNTRY",
422
+ STATE = "STATE",
423
+ COUNTY = "COUNTY",
424
+ CITY = "CITY",
425
+ SPECIAL = "SPECIAL"
426
+ }
427
+ export interface DigitalFile {
428
+ /** ID of the secure file in media. */
429
+ fileId?: string;
430
+ /** Link will exist after the digital links have been generated on the order. */
431
+ link?: string | null;
432
+ /**
433
+ * Link expiration time and date.
434
+ * @readonly
435
+ */
436
+ expirationDate?: Date | null;
437
+ }
438
+ export interface SubscriptionInfo {
439
+ /** Subscription ID. */
440
+ _id?: string | null;
441
+ /** Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`. */
442
+ cycleNumber?: number;
443
+ /** Subscription option title. For example, `"Monthly coffee Subscription"`. */
444
+ subscriptionOptionTitle?: string;
445
+ /** Subscription option description. For example, `"1kg of selected coffee, once a month"`. */
446
+ subscriptionOptionDescription?: string | null;
447
+ /** Subscription detailed information. */
448
+ subscriptionSettings?: SubscriptionSettings;
449
+ }
450
+ export interface SubscriptionSettings {
451
+ /** Frequency of recurring payment. */
452
+ frequency?: V2SubscriptionFrequency;
453
+ /** Interval of recurring payment. */
454
+ interval?: number | null;
455
+ /** Whether subscription is renewed automatically at the end of each period. */
456
+ autoRenewal?: boolean;
457
+ /** Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`. */
458
+ billingCycles?: number | null;
459
+ }
460
+ /** Frequency unit of recurring payment */
461
+ export declare enum V2SubscriptionFrequency {
462
+ UNDEFINED = "UNDEFINED",
463
+ DAY = "DAY",
464
+ WEEK = "WEEK",
465
+ MONTH = "MONTH",
466
+ YEAR = "YEAR"
467
+ }
468
+ export interface FreeTrialPeriod {
469
+ /** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
470
+ frequency?: V2SubscriptionFrequency;
471
+ /** interval of period */
472
+ interval?: number;
473
+ }
474
+ export interface PriceDescription {
475
+ /** __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). */
476
+ original?: string;
477
+ /**
478
+ * Price description translated into the buyer's language.
479
+ *
480
+ * Default: Same as `original`.
481
+ */
482
+ translated?: string | null;
483
+ }
484
+ export interface LocationAndQuantity {
485
+ /** Location id in the associated owner app. */
486
+ _id?: string;
487
+ /**
488
+ * Location owner app, if not provided then the site business info locations will be used.
489
+ * @deprecated Location owner app, if not provided then the site business info locations will be used.
490
+ * @targetRemovalDate 2025-03-01
491
+ */
492
+ appId?: string | null;
493
+ /** Quantity for specific location. */
494
+ quantity?: number;
495
+ }
496
+ export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
497
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
498
+ addressType?: TaxableAddressType;
499
+ }
500
+ /** @oneof */
501
+ export interface TaxableAddressTaxableAddressDataOneOf {
502
+ /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
503
+ addressType?: TaxableAddressType;
504
+ }
505
+ export declare enum TaxableAddressType {
506
+ UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
507
+ BUSINESS = "BUSINESS",
508
+ BILLING = "BILLING",
509
+ SHIPPING = "SHIPPING"
510
+ }
511
+ export interface ExtendedFields {
512
+ /**
513
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
514
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
515
+ *
516
+ * You can only access fields for which you have the appropriate permissions.
517
+ *
518
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
519
+ */
520
+ namespaces?: Record<string, Record<string, any>>;
521
+ }
522
+ /** Buyer Info */
523
+ export interface BuyerInfo extends BuyerInfoIdOneOf {
524
+ /** Visitor ID (if site visitor is not a member). */
525
+ visitorId?: string;
526
+ /** Member ID (if site visitor is a site member). */
527
+ memberId?: string;
528
+ /** 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). */
529
+ contactId?: string | null;
530
+ /** Buyer email address. */
531
+ email?: string | null;
532
+ }
533
+ /** @oneof */
534
+ export interface BuyerInfoIdOneOf {
535
+ /** Visitor ID (if site visitor is not a member). */
536
+ visitorId?: string;
537
+ /** Member ID (if site visitor is a site member). */
538
+ memberId?: string;
539
+ }
540
+ export declare enum WeightUnit {
541
+ /** Weight unit can't be classified, due to an error */
542
+ UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
543
+ /** Kilograms */
544
+ KG = "KG",
545
+ /** Pounds */
546
+ LB = "LB"
547
+ }
548
+ export interface PriceSummary {
549
+ /** Subtotal of all the line items, before discounts and before tax. */
550
+ subtotal?: Price;
551
+ /** Total shipping price, before discounts and before tax. */
552
+ shipping?: Price;
553
+ /** Total tax on this order. */
554
+ tax?: Price;
555
+ /** Total calculated discount value. */
556
+ discount?: Price;
557
+ /** Order’s total price after discounts and tax. */
558
+ total?: Price;
559
+ /** Total price of additional fees before tax. */
560
+ totalAdditionalFees?: Price;
561
+ }
562
+ /** Billing Info and shipping details */
563
+ export interface AddressWithContact {
564
+ /** Address. */
565
+ address?: Address;
566
+ /** Contact details. */
567
+ contactDetails?: FullAddressContactDetails;
568
+ }
569
+ /** Physical address */
570
+ export interface Address {
571
+ /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */
572
+ country?: string | null;
573
+ /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */
574
+ subdivision?: string | null;
575
+ /** City name. */
576
+ city?: string | null;
577
+ /** Postal or zip code. */
578
+ postalCode?: string | null;
579
+ /** Street address. */
580
+ streetAddress?: StreetAddress;
581
+ /** Main address line (usually street name and number). */
582
+ addressLine1?: string | null;
583
+ /** Free text providing more detailed address info. Usually contains apt, suite, floor. */
584
+ addressLine2?: string | null;
585
+ /**
586
+ * Country's full name.
587
+ * @readonly
588
+ */
589
+ countryFullname?: string | null;
590
+ /**
591
+ * Subdivision full-name.
592
+ * @readonly
593
+ */
594
+ subdivisionFullname?: string | null;
595
+ }
596
+ export interface StreetAddress {
597
+ /** Street number. */
598
+ number?: string;
599
+ /** Street name. */
600
+ name?: string;
601
+ }
602
+ export interface AddressLocation {
603
+ /** Address latitude. */
604
+ latitude?: number | null;
605
+ /** Address longitude. */
606
+ longitude?: number | null;
607
+ }
608
+ /** Full contact details for an address */
609
+ export interface FullAddressContactDetails {
610
+ /** First name. */
611
+ firstName?: string | null;
612
+ /** Last name. */
613
+ lastName?: string | null;
614
+ /** Phone number. */
615
+ phone?: string | null;
616
+ /** Company name. */
617
+ company?: string | null;
618
+ /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
619
+ vatId?: VatId;
620
+ }
621
+ export interface VatId {
622
+ /** Customer's tax ID. */
623
+ _id?: string;
624
+ /**
625
+ * Tax type.
626
+ *
627
+ * Supported values:
628
+ * + `CPF`: for individual tax payers
629
+ * + `CNPJ`: for corporations
630
+ */
631
+ type?: VatType;
632
+ }
633
+ /** tax info types */
634
+ export declare enum VatType {
635
+ UNSPECIFIED = "UNSPECIFIED",
636
+ /** CPF - for individual tax payers. */
637
+ CPF = "CPF",
638
+ /** CNPJ - for corporations */
639
+ CNPJ = "CNPJ"
640
+ }
641
+ export interface ShippingInformation {
642
+ /** App Def Id of external provider which was a source of shipping info */
643
+ carrierId?: string | null;
644
+ /** Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`. */
645
+ code?: string | null;
646
+ /**
647
+ * Shipping option title.
648
+ * For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`.
649
+ */
650
+ title?: string;
651
+ /** Shipping logistics. */
652
+ logistics?: DeliveryLogistics;
653
+ /** Shipping costs. */
654
+ cost?: ShippingPrice;
655
+ /** Shipping region. */
656
+ region?: ShippingRegion;
657
+ }
658
+ export interface DeliveryLogistics extends DeliveryLogisticsAddressOneOf {
659
+ /** Shipping address and contact details. */
660
+ shippingDestination?: AddressWithContact;
661
+ /** Pickup details. */
662
+ pickupDetails?: PickupDetails;
663
+ /** Expected delivery time in free text. For example, `"3-5 business days"`. */
664
+ deliveryTime?: string | null;
665
+ /** Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`. */
666
+ instructions?: string | null;
667
+ /**
668
+ * Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
669
+ * @deprecated
670
+ */
671
+ deliverByDate?: Date | null;
672
+ /** Expected delivery time. */
673
+ deliveryTimeSlot?: DeliveryTimeSlot;
674
+ }
675
+ /** @oneof */
676
+ export interface DeliveryLogisticsAddressOneOf {
677
+ /** Shipping address and contact details. */
678
+ shippingDestination?: AddressWithContact;
679
+ /** Pickup details. */
680
+ pickupDetails?: PickupDetails;
681
+ }
682
+ export interface PickupDetails {
683
+ /** Pickup address. */
684
+ address?: PickupAddress;
685
+ /** Pickup method */
686
+ pickupMethod?: PickupMethod;
687
+ }
688
+ /** Physical address */
689
+ export interface PickupAddress {
690
+ /** Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format. */
691
+ country?: string | null;
692
+ /** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format. */
693
+ subdivision?: string | null;
694
+ /** City name. */
695
+ city?: string | null;
696
+ /** Postal or zip code. */
697
+ postalCode?: string | null;
698
+ /** Street address object, with number, name, and apartment number in separate fields. */
699
+ streetAddress?: StreetAddress;
700
+ /** Main address line (usually street name and number). */
701
+ addressLine1?: string | null;
702
+ /** Free text providing more detailed address info. Usually contains apt, suite, floor. */
703
+ addressLine2?: string | null;
704
+ /**
705
+ * Country's full name.
706
+ * @readonly
707
+ */
708
+ countryFullname?: string | null;
709
+ /**
710
+ * Subdivision full-name.
711
+ * @readonly
712
+ */
713
+ subdivisionFullname?: string | null;
714
+ }
715
+ export declare enum PickupMethod {
716
+ UNKNOWN_METHOD = "UNKNOWN_METHOD",
717
+ STORE_PICKUP = "STORE_PICKUP",
718
+ PICKUP_POINT = "PICKUP_POINT"
719
+ }
720
+ export interface DeliveryTimeSlot {
721
+ /** Delivery slot starting time. */
722
+ from?: Date | null;
723
+ /** Delivery slot ending time. */
724
+ to?: Date | null;
725
+ }
726
+ export interface ShippingPrice {
727
+ /** Shipping price for display purposes. */
728
+ price?: Price;
729
+ /**
730
+ * Total price of shipping after discounts (when relevant), and before tax.
731
+ * @readonly
732
+ */
733
+ totalPriceBeforeTax?: Price;
734
+ /**
735
+ * Shipping price after all discounts (if any exist), and after tax.
736
+ * @readonly
737
+ */
738
+ totalPriceAfterTax?: Price;
739
+ /** Tax details. */
740
+ taxDetails?: ItemTaxFullDetails;
741
+ /**
742
+ * Shipping discount before tax.
743
+ * @readonly
744
+ */
745
+ discount?: Price;
746
+ }
747
+ export interface ShippingRegion {
748
+ /** Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`. */
749
+ name?: string | null;
750
+ }
751
+ export interface OrderTaxInfo {
752
+ /** Calculated tax, added from line items. */
753
+ totalTax?: Price;
754
+ /** 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. */
755
+ taxBreakdown?: OrderTaxBreakdown[];
756
+ /**
757
+ * Whether the order is exempt from tax calculations.
758
+ *
759
+ * Default: `false`
760
+ * @readonly
761
+ */
762
+ taxExempt?: boolean | null;
763
+ }
764
+ /**
765
+ * 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.
766
+ * Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
767
+ */
768
+ export interface OrderTaxBreakdown {
769
+ /** The name of the tax against which this tax amount was calculated. */
770
+ taxName?: string;
771
+ /** The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */
772
+ taxType?: string;
773
+ /** The name of the jurisdiction in which this tax detail applies. */
774
+ jurisdiction?: string;
775
+ /** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
776
+ jurisdictionType?: JurisdictionType;
777
+ /** The rate at which this tax detail was calculated. */
778
+ rate?: string;
779
+ /** The sum of all the tax from line items that calculated by the tax identifiers. */
780
+ aggregatedTaxAmount?: Price;
781
+ }
782
+ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
783
+ /** Applied coupon info. */
784
+ coupon?: Coupon;
785
+ /** Merchant discount. */
786
+ merchantDiscount?: MerchantDiscount;
787
+ /** Automatic Discount */
788
+ discountRule?: DiscountRule;
789
+ /**
790
+ * Discount type.
791
+ * * `"GLOBAL"` - discount applies to entire order.
792
+ * * `"SPECIFIC-ITEMS"` - discount applies to specific items.
793
+ * * `"SHIPPING"` - discount applies to shipping. For example, free shipping.
794
+ */
795
+ discountType?: DiscountType;
796
+ /**
797
+ * IDs of line items discount applies to.
798
+ * Deprecated. Use `line_item_discounts` instead.
799
+ * @deprecated IDs of line items discount applies to.
800
+ * Deprecated. Use `line_item_discounts` instead.
801
+ * @replacedBy line_item_discounts
802
+ * @targetRemovalDate 2024-10-30
803
+ */
804
+ lineItemIds?: string[];
805
+ /** Discount id. */
806
+ _id?: string | null;
807
+ }
808
+ /** @oneof */
809
+ export interface AppliedDiscountDiscountSourceOneOf {
810
+ /** Applied coupon info. */
811
+ coupon?: Coupon;
812
+ /** Merchant discount. */
813
+ merchantDiscount?: MerchantDiscount;
814
+ /** Automatic Discount */
815
+ discountRule?: DiscountRule;
816
+ }
817
+ export declare enum DiscountType {
818
+ GLOBAL = "GLOBAL",
819
+ SPECIFIC_ITEMS = "SPECIFIC_ITEMS",
820
+ SHIPPING = "SHIPPING"
821
+ }
822
+ /** Coupon */
823
+ export interface Coupon {
824
+ /** Coupon ID. */
825
+ _id?: string;
826
+ /** Coupon code. */
827
+ code?: string;
828
+ /** Coupon name. */
829
+ name?: string;
830
+ /** Coupon value. */
831
+ amount?: Price;
832
+ }
833
+ export interface MerchantDiscount extends MerchantDiscountMerchantDiscountReasonOneOf {
834
+ /**
835
+ * Pre-defined discount reason (optional).
836
+ * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
837
+ */
838
+ discountReason?: DiscountReason;
839
+ /** Discount description as free text (optional). */
840
+ description?: string | null;
841
+ /** Discount amount. */
842
+ amount?: Price;
843
+ }
844
+ /** @oneof */
845
+ export interface MerchantDiscountMerchantDiscountReasonOneOf {
846
+ /**
847
+ * Pre-defined discount reason (optional).
848
+ * * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
849
+ */
850
+ discountReason?: DiscountReason;
851
+ /** Discount description as free text (optional). */
852
+ description?: string | null;
853
+ }
854
+ export declare enum DiscountReason {
855
+ UNSPECIFIED = "UNSPECIFIED",
856
+ EXCHANGED_ITEMS = "EXCHANGED_ITEMS"
857
+ }
858
+ export interface DiscountRule {
859
+ /** Discount rule ID */
860
+ _id?: string;
861
+ /** Discount rule name */
862
+ name?: DiscountRuleName;
863
+ /** Discount value. */
864
+ amount?: Price;
865
+ }
866
+ export interface DiscountRuleName {
867
+ /** Original discount rule name (in site's default language). */
868
+ original?: string;
869
+ /** Translated discount rule name according to buyer language. Defaults to `original` when not provided. */
870
+ translated?: string | null;
871
+ }
872
+ export interface LineItemDiscount {
873
+ /** ID of line item the discount applies to. */
874
+ _id?: string;
875
+ /** Total discount for this line item. */
876
+ totalDiscount?: Price;
877
+ }
878
+ export interface ChannelInfo {
879
+ /** Sales channel that submitted the order. */
880
+ type?: ChannelType;
881
+ /** Reference to an order ID from an external system. */
882
+ externalOrderId?: string | null;
883
+ /** URL to the order in the external system. */
884
+ externalOrderUrl?: string | null;
885
+ }
886
+ export declare enum ChannelType {
887
+ /** Unspecified sales channel. This value is not supported. */
888
+ UNSPECIFIED = "UNSPECIFIED",
889
+ /** A web client. */
890
+ WEB = "WEB",
891
+ /** [Point of sale solutions](https://support.wix.com/en/wix-mobile-pos-2196395). */
892
+ POS = "POS",
893
+ /** [eBay shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-ebay-shop). */
894
+ EBAY = "EBAY",
895
+ /** [Amazon shop](https://support.wix.com/en/article/wix-stores-connecting-and-setting-up-an-amazon-shop). */
896
+ AMAZON = "AMAZON",
897
+ /** Other sales platform. */
898
+ OTHER_PLATFORM = "OTHER_PLATFORM",
899
+ /** [Wix Owner app](https://support.wix.com/article/wix-owner-app-an-overview). */
900
+ WIX_APP_STORE = "WIX_APP_STORE",
901
+ /** 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) */
902
+ WIX_INVOICES = "WIX_INVOICES",
903
+ /** Wix merchant backoffice. */
904
+ BACKOFFICE_MERCHANT = "BACKOFFICE_MERCHANT",
905
+ /** Wish sales channel. */
906
+ WISH = "WISH",
907
+ /** [ClassPass sales channel](https://support.wix.com/en/article/wix-bookings-letting-clients-book-your-services-with-classpass). */
908
+ CLASS_PASS = "CLASS_PASS",
909
+ /** Global-E sales channel. */
910
+ GLOBAL_E = "GLOBAL_E",
911
+ /** [Facebook shop](https://support.wix.com/en/article/wix-stores-changes-to-facebook-shops). */
912
+ FACEBOOK = "FACEBOOK",
913
+ /** [Etsy sales channel](https://support.wix.com/en/article/wix-stores-request-adding-etsy-as-a-sales-channel). */
914
+ ETSY = "ETSY",
915
+ /** [TikTok sales channel](https://support.wix.com/en/article/wix-stores-request-adding-tiktok-as-a-sales-channel). */
916
+ TIKTOK = "TIKTOK",
917
+ /** [Faire marketplace integration](https://support.wix.com/en/article/wix-stores-creating-a-faire-store-using-the-faire-integration-app). */
918
+ FAIRE_COM = "FAIRE_COM"
919
+ }
920
+ export interface CustomField {
921
+ /** Custom field value. */
922
+ value?: any;
923
+ /** Custom field title. */
924
+ title?: string;
925
+ /** Translated custom field title. */
926
+ translatedTitle?: string | null;
927
+ }
928
+ export interface AdditionalFee {
929
+ /** Additional fee's unique code for future processing. */
930
+ code?: string | null;
931
+ /** Name of additional fee. */
932
+ name?: string;
933
+ /** Additional fee's price. */
934
+ price?: Price;
935
+ /** Tax details. */
936
+ taxDetails?: ItemTaxFullDetails;
937
+ /** SPI implementer's `appId`. */
938
+ providerAppId?: string | null;
939
+ /** Additional fee's price before tax. */
940
+ priceBeforeTax?: Price;
941
+ /** Additional fee's price after tax. */
942
+ priceAfterTax?: Price;
943
+ /** Additional fee's id. */
944
+ _id?: string;
945
+ /**
946
+ * Optional - Line items associated with this additional fee.
947
+ * If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
948
+ */
949
+ lineItemIds?: string[];
950
+ }
951
+ export interface Location {
952
+ /**
953
+ * Location ID.
954
+ * Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
955
+ */
956
+ _id?: string;
957
+ /**
958
+ * Location name.
959
+ * @readonly
960
+ */
961
+ name?: string;
962
+ }
963
+ export interface CreateSubscriptionContractRequest {
964
+ /** SubscriptionContract to be created. */
965
+ subscriptionContract?: SubscriptionContract;
966
+ }
967
+ export interface CreateSubscriptionContractResponse {
968
+ /** The created SubscriptionContract. */
969
+ subscriptionContract?: SubscriptionContract;
970
+ }
971
+ export interface GetSubscriptionContractRequest {
972
+ /** ID of the SubscriptionContract to retrieve. */
973
+ subscriptionContractId: string;
974
+ }
975
+ export interface GetSubscriptionContractResponse {
976
+ /** The requested SubscriptionContract. */
977
+ subscriptionContract?: SubscriptionContract;
978
+ }
979
+ export interface UpdateSubscriptionContractRequest {
980
+ /** SubscriptionContract to be updated, may be partial. */
981
+ subscriptionContract?: SubscriptionContract;
982
+ }
983
+ export interface UpdateSubscriptionContractResponse {
984
+ /** Updated SubscriptionContract. */
985
+ subscriptionContract?: SubscriptionContract;
986
+ }
987
+ export interface QuerySubscriptionContractsRequest {
988
+ /** WQL expression. */
989
+ query?: CursorQuery;
990
+ }
991
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
992
+ /** 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`. */
993
+ cursorPaging?: CursorPaging;
994
+ /**
995
+ * Filter object in the following format:
996
+ * `"filter" : {
997
+ * "fieldName1": "value1",
998
+ * "fieldName2":{"$operator":"value2"}
999
+ * }`
1000
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
1001
+ * Learn more about the [filter format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
1002
+ */
1003
+ filter?: Record<string, any> | null;
1004
+ /**
1005
+ * Sort object in the following format:
1006
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
1007
+ * Learn more about the [sort format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
1008
+ */
1009
+ sort?: Sorting[];
1010
+ }
1011
+ /** @oneof */
1012
+ export interface CursorQueryPagingMethodOneOf {
1013
+ /** 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`. */
1014
+ cursorPaging?: CursorPaging;
1015
+ }
1016
+ export interface Sorting {
1017
+ /** Name of the field to sort by. */
1018
+ fieldName?: string;
1019
+ /** Sort order. */
1020
+ order?: SortOrder;
1021
+ }
1022
+ export declare enum SortOrder {
1023
+ ASC = "ASC",
1024
+ DESC = "DESC"
1025
+ }
1026
+ export interface CursorPaging {
1027
+ /** Maximum number of items to return in the results. */
1028
+ limit?: number | null;
1029
+ /**
1030
+ * Pointer to the next or previous page in the list of results.
1031
+ *
1032
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1033
+ * Not relevant for the first request.
1034
+ */
1035
+ cursor?: string | null;
1036
+ }
1037
+ export interface QuerySubscriptionContractsResponse {
1038
+ /** List of SubscriptionContracts. */
1039
+ subscriptionContracts?: SubscriptionContract[];
1040
+ /** Paging metadata */
1041
+ pagingMetadata?: CursorPagingMetadata;
1042
+ }
1043
+ export interface CursorPagingMetadata {
1044
+ /** Number of items returned in the response. */
1045
+ count?: number | null;
1046
+ /** Cursor strings that point to the next page, previous page, or both. */
1047
+ cursors?: Cursors;
1048
+ /**
1049
+ * Whether there are more pages to retrieve following the current page.
1050
+ *
1051
+ * + `true`: Another page of results can be retrieved.
1052
+ * + `false`: This is the last page.
1053
+ */
1054
+ hasNext?: boolean | null;
1055
+ }
1056
+ export interface Cursors {
1057
+ /** Cursor string pointing to the next page in the list of results. */
1058
+ next?: string | null;
1059
+ /** Cursor pointing to the previous page in the list of results. */
1060
+ prev?: string | null;
1061
+ }
1062
+ export interface DomainEvent extends DomainEventBodyOneOf {
1063
+ createdEvent?: EntityCreatedEvent;
1064
+ updatedEvent?: EntityUpdatedEvent;
1065
+ deletedEvent?: EntityDeletedEvent;
1066
+ actionEvent?: ActionEvent;
1067
+ /**
1068
+ * Unique event ID.
1069
+ * Allows clients to ignore duplicate webhooks.
1070
+ */
1071
+ _id?: string;
1072
+ /**
1073
+ * Assumes actions are also always typed to an entity_type
1074
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1075
+ */
1076
+ entityFqdn?: string;
1077
+ /**
1078
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1079
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1080
+ * Example: created/updated/deleted/started/completed/email_opened
1081
+ */
1082
+ slug?: string;
1083
+ /** ID of the entity associated with the event. */
1084
+ entityId?: string;
1085
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1086
+ eventTime?: Date | null;
1087
+ /**
1088
+ * Whether the event was triggered as a result of a privacy regulation application
1089
+ * (for example, GDPR).
1090
+ */
1091
+ triggeredByAnonymizeRequest?: boolean | null;
1092
+ /** If present, indicates the action that triggered the event. */
1093
+ originatedFrom?: string | null;
1094
+ /**
1095
+ * A sequence number defining the order of updates to the underlying entity.
1096
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1097
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1098
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1099
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1100
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1101
+ */
1102
+ entityEventSequence?: string | null;
1103
+ }
1104
+ /** @oneof */
1105
+ export interface DomainEventBodyOneOf {
1106
+ createdEvent?: EntityCreatedEvent;
1107
+ updatedEvent?: EntityUpdatedEvent;
1108
+ deletedEvent?: EntityDeletedEvent;
1109
+ actionEvent?: ActionEvent;
1110
+ }
1111
+ export interface EntityCreatedEvent {
1112
+ entity?: string;
1113
+ }
1114
+ export interface RestoreInfo {
1115
+ deletedDate?: Date | null;
1116
+ }
1117
+ export interface EntityUpdatedEvent {
1118
+ /**
1119
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
1120
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
1121
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
1122
+ */
1123
+ currentEntity?: string;
1124
+ }
1125
+ export interface EntityDeletedEvent {
1126
+ /** Entity that was deleted */
1127
+ deletedEntity?: string | null;
1128
+ }
1129
+ export interface ActionEvent {
1130
+ body?: string;
1131
+ }
1132
+ export interface Empty {
1133
+ }
1134
+ export interface MessageEnvelope {
1135
+ /** App instance ID. */
1136
+ instanceId?: string | null;
1137
+ /** Event type. */
1138
+ eventType?: string;
1139
+ /** The identification type and identity data. */
1140
+ identity?: IdentificationData;
1141
+ /** Stringify payload. */
1142
+ data?: string;
1143
+ }
1144
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1145
+ /** ID of a site visitor that has not logged in to the site. */
1146
+ anonymousVisitorId?: string;
1147
+ /** ID of a site visitor that has logged in to the site. */
1148
+ memberId?: string;
1149
+ /** ID of a Wix user (site owner, contributor, etc.). */
1150
+ wixUserId?: string;
1151
+ /** ID of an app. */
1152
+ appId?: string;
1153
+ /** @readonly */
1154
+ identityType?: WebhookIdentityType;
1155
+ }
1156
+ /** @oneof */
1157
+ export interface IdentificationDataIdOneOf {
1158
+ /** ID of a site visitor that has not logged in to the site. */
1159
+ anonymousVisitorId?: string;
1160
+ /** ID of a site visitor that has logged in to the site. */
1161
+ memberId?: string;
1162
+ /** ID of a Wix user (site owner, contributor, etc.). */
1163
+ wixUserId?: string;
1164
+ /** ID of an app. */
1165
+ appId?: string;
1166
+ }
1167
+ export declare enum WebhookIdentityType {
1168
+ UNKNOWN = "UNKNOWN",
1169
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1170
+ MEMBER = "MEMBER",
1171
+ WIX_USER = "WIX_USER",
1172
+ APP = "APP"
1173
+ }
1174
+ interface V1SubscriptionSettingsNonNullableFields {
1175
+ frequency: SubscriptionFrequency;
1176
+ autoRenewal: boolean;
1177
+ enableCustomerCancellation: boolean;
1178
+ }
1179
+ interface ProductNameNonNullableFields {
1180
+ original: string;
1181
+ }
1182
+ interface CatalogReferenceNonNullableFields {
1183
+ catalogItemId: string;
1184
+ appId: string;
1185
+ }
1186
+ interface PriceNonNullableFields {
1187
+ amount: string;
1188
+ formattedAmount: string;
1189
+ }
1190
+ interface PlainTextValueNonNullableFields {
1191
+ original: string;
1192
+ }
1193
+ interface ColorNonNullableFields {
1194
+ original: string;
1195
+ }
1196
+ interface DescriptionLineNameNonNullableFields {
1197
+ original: string;
1198
+ }
1199
+ interface DescriptionLineNonNullableFields {
1200
+ plainText?: PlainTextValueNonNullableFields;
1201
+ colorInfo?: ColorNonNullableFields;
1202
+ plainTextValue?: PlainTextValueNonNullableFields;
1203
+ color: string;
1204
+ name?: DescriptionLineNameNonNullableFields;
1205
+ lineType: DescriptionLineType;
1206
+ }
1207
+ interface PhysicalPropertiesNonNullableFields {
1208
+ shippable: boolean;
1209
+ }
1210
+ interface ItemTypeNonNullableFields {
1211
+ preset: ItemTypeItemType;
1212
+ custom: string;
1213
+ }
1214
+ interface ItemTaxFullDetailsNonNullableFields {
1215
+ taxableAmount?: PriceNonNullableFields;
1216
+ taxRate: string;
1217
+ totalTax?: PriceNonNullableFields;
1218
+ }
1219
+ interface LineItemTaxBreakdownNonNullableFields {
1220
+ taxAmount?: PriceNonNullableFields;
1221
+ jurisdictionType: JurisdictionType;
1222
+ nonTaxableAmount?: PriceNonNullableFields;
1223
+ taxableAmount?: PriceNonNullableFields;
1224
+ }
1225
+ interface LineItemTaxInfoNonNullableFields {
1226
+ taxAmount?: PriceNonNullableFields;
1227
+ taxableAmount?: PriceNonNullableFields;
1228
+ taxIncludedInPrice: boolean;
1229
+ taxBreakdown: LineItemTaxBreakdownNonNullableFields[];
1230
+ }
1231
+ interface DigitalFileNonNullableFields {
1232
+ fileId: string;
1233
+ }
1234
+ interface SubscriptionSettingsNonNullableFields {
1235
+ frequency: V2SubscriptionFrequency;
1236
+ autoRenewal: boolean;
1237
+ }
1238
+ interface SubscriptionInfoNonNullableFields {
1239
+ cycleNumber: number;
1240
+ subscriptionOptionTitle: string;
1241
+ subscriptionSettings?: SubscriptionSettingsNonNullableFields;
1242
+ }
1243
+ interface PriceDescriptionNonNullableFields {
1244
+ original: string;
1245
+ }
1246
+ interface OrderLineItemNonNullableFields {
1247
+ _id: string;
1248
+ productName?: ProductNameNonNullableFields;
1249
+ catalogReference?: CatalogReferenceNonNullableFields;
1250
+ quantity: number;
1251
+ totalDiscount?: PriceNonNullableFields;
1252
+ descriptionLines: DescriptionLineNonNullableFields[];
1253
+ image: string;
1254
+ physicalProperties?: PhysicalPropertiesNonNullableFields;
1255
+ itemType?: ItemTypeNonNullableFields;
1256
+ price?: PriceNonNullableFields;
1257
+ priceBeforeDiscounts?: PriceNonNullableFields;
1258
+ totalPriceBeforeTax?: PriceNonNullableFields;
1259
+ totalPriceAfterTax?: PriceNonNullableFields;
1260
+ paymentOption: PaymentOptionType;
1261
+ taxDetails?: ItemTaxFullDetailsNonNullableFields;
1262
+ taxInfo?: LineItemTaxInfoNonNullableFields;
1263
+ digitalFile?: DigitalFileNonNullableFields;
1264
+ subscriptionInfo?: SubscriptionInfoNonNullableFields;
1265
+ priceDescription?: PriceDescriptionNonNullableFields;
1266
+ depositAmount?: PriceNonNullableFields;
1267
+ lineItemPrice?: PriceNonNullableFields;
1268
+ }
1269
+ interface BuyerInfoNonNullableFields {
1270
+ visitorId: string;
1271
+ memberId: string;
1272
+ }
1273
+ interface PriceSummaryNonNullableFields {
1274
+ subtotal?: PriceNonNullableFields;
1275
+ shipping?: PriceNonNullableFields;
1276
+ tax?: PriceNonNullableFields;
1277
+ discount?: PriceNonNullableFields;
1278
+ totalPrice?: PriceNonNullableFields;
1279
+ total?: PriceNonNullableFields;
1280
+ totalWithGiftCard?: PriceNonNullableFields;
1281
+ totalWithoutGiftCard?: PriceNonNullableFields;
1282
+ totalAdditionalFees?: PriceNonNullableFields;
1283
+ }
1284
+ interface StreetAddressNonNullableFields {
1285
+ number: string;
1286
+ name: string;
1287
+ apt: string;
1288
+ }
1289
+ interface AddressNonNullableFields {
1290
+ streetAddress?: StreetAddressNonNullableFields;
1291
+ }
1292
+ interface VatIdNonNullableFields {
1293
+ _id: string;
1294
+ type: VatType;
1295
+ }
1296
+ interface FullAddressContactDetailsNonNullableFields {
1297
+ vatId?: VatIdNonNullableFields;
1298
+ }
1299
+ interface AddressWithContactNonNullableFields {
1300
+ address?: AddressNonNullableFields;
1301
+ contactDetails?: FullAddressContactDetailsNonNullableFields;
1302
+ }
1303
+ interface PickupAddressNonNullableFields {
1304
+ streetAddress?: StreetAddressNonNullableFields;
1305
+ }
1306
+ interface PickupDetailsNonNullableFields {
1307
+ address?: PickupAddressNonNullableFields;
1308
+ pickupMethod: PickupMethod;
1309
+ }
1310
+ interface DeliveryLogisticsNonNullableFields {
1311
+ shippingDestination?: AddressWithContactNonNullableFields;
1312
+ pickupDetails?: PickupDetailsNonNullableFields;
1313
+ }
1314
+ interface ShippingPriceNonNullableFields {
1315
+ price?: PriceNonNullableFields;
1316
+ totalPriceBeforeTax?: PriceNonNullableFields;
1317
+ totalPriceAfterTax?: PriceNonNullableFields;
1318
+ taxDetails?: ItemTaxFullDetailsNonNullableFields;
1319
+ discount?: PriceNonNullableFields;
1320
+ }
1321
+ interface ShippingInformationNonNullableFields {
1322
+ title: string;
1323
+ logistics?: DeliveryLogisticsNonNullableFields;
1324
+ cost?: ShippingPriceNonNullableFields;
1325
+ }
1326
+ interface OrderTaxBreakdownNonNullableFields {
1327
+ taxName: string;
1328
+ taxType: string;
1329
+ jurisdiction: string;
1330
+ jurisdictionType: JurisdictionType;
1331
+ rate: string;
1332
+ aggregatedTaxAmount?: PriceNonNullableFields;
1333
+ aggregatedTaxableAmount?: PriceNonNullableFields;
1334
+ }
1335
+ interface OrderTaxInfoNonNullableFields {
1336
+ totalTax?: PriceNonNullableFields;
1337
+ taxBreakdown: OrderTaxBreakdownNonNullableFields[];
1338
+ }
1339
+ interface CouponNonNullableFields {
1340
+ _id: string;
1341
+ code: string;
1342
+ name: string;
1343
+ amount?: PriceNonNullableFields;
1344
+ }
1345
+ interface MerchantDiscountNonNullableFields {
1346
+ discountReason: DiscountReason;
1347
+ amount?: PriceNonNullableFields;
1348
+ }
1349
+ interface DiscountRuleNameNonNullableFields {
1350
+ original: string;
1351
+ }
1352
+ interface DiscountRuleNonNullableFields {
1353
+ _id: string;
1354
+ name?: DiscountRuleNameNonNullableFields;
1355
+ amount?: PriceNonNullableFields;
1356
+ }
1357
+ interface AppliedDiscountNonNullableFields {
1358
+ coupon?: CouponNonNullableFields;
1359
+ merchantDiscount?: MerchantDiscountNonNullableFields;
1360
+ discountRule?: DiscountRuleNonNullableFields;
1361
+ discountType: DiscountType;
1362
+ lineItemIds: string[];
1363
+ }
1364
+ interface ChannelInfoNonNullableFields {
1365
+ type: ChannelType;
1366
+ }
1367
+ interface CustomFieldNonNullableFields {
1368
+ title: string;
1369
+ }
1370
+ interface AdditionalFeeNonNullableFields {
1371
+ name: string;
1372
+ price?: PriceNonNullableFields;
1373
+ taxDetails?: ItemTaxFullDetailsNonNullableFields;
1374
+ priceBeforeTax?: PriceNonNullableFields;
1375
+ priceAfterTax?: PriceNonNullableFields;
1376
+ _id: string;
1377
+ lineItemIds: string[];
1378
+ }
1379
+ export interface SubscriptionContractNonNullableFields {
1380
+ subscriptionSettings?: V1SubscriptionSettingsNonNullableFields;
1381
+ lineItems: OrderLineItemNonNullableFields[];
1382
+ buyerInfo?: BuyerInfoNonNullableFields;
1383
+ weightUnit: WeightUnit;
1384
+ taxIncludedInPrices: boolean;
1385
+ priceSummary?: PriceSummaryNonNullableFields;
1386
+ billingInfo?: AddressWithContactNonNullableFields;
1387
+ shippingInfo?: ShippingInformationNonNullableFields;
1388
+ taxInfo?: OrderTaxInfoNonNullableFields;
1389
+ appliedDiscounts: AppliedDiscountNonNullableFields[];
1390
+ channelInfo?: ChannelInfoNonNullableFields;
1391
+ customFields: CustomFieldNonNullableFields[];
1392
+ recipientInfo?: AddressWithContactNonNullableFields;
1393
+ additionalFees: AdditionalFeeNonNullableFields[];
1394
+ }
1395
+ export interface GetSubscriptionContractResponseNonNullableFields {
1396
+ subscriptionContract?: SubscriptionContractNonNullableFields;
1397
+ }
1398
+ export interface QuerySubscriptionContractsResponseNonNullableFields {
1399
+ subscriptionContracts: SubscriptionContractNonNullableFields[];
1400
+ }
1401
+ export interface BaseEventMetadata {
1402
+ /** App instance ID. */
1403
+ instanceId?: string | null;
1404
+ /** Event type. */
1405
+ eventType?: string;
1406
+ /** The identification type and identity data. */
1407
+ identity?: IdentificationData;
1408
+ }
1409
+ export interface EventMetadata extends BaseEventMetadata {
1410
+ /**
1411
+ * Unique event ID.
1412
+ * Allows clients to ignore duplicate webhooks.
1413
+ */
1414
+ _id?: string;
1415
+ /**
1416
+ * Assumes actions are also always typed to an entity_type
1417
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1418
+ */
1419
+ entityFqdn?: string;
1420
+ /**
1421
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1422
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1423
+ * Example: created/updated/deleted/started/completed/email_opened
1424
+ */
1425
+ slug?: string;
1426
+ /** ID of the entity associated with the event. */
1427
+ entityId?: string;
1428
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1429
+ eventTime?: Date | null;
1430
+ /**
1431
+ * Whether the event was triggered as a result of a privacy regulation application
1432
+ * (for example, GDPR).
1433
+ */
1434
+ triggeredByAnonymizeRequest?: boolean | null;
1435
+ /** If present, indicates the action that triggered the event. */
1436
+ originatedFrom?: string | null;
1437
+ /**
1438
+ * A sequence number defining the order of updates to the underlying entity.
1439
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1440
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1441
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1442
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1443
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1444
+ */
1445
+ entityEventSequence?: string | null;
1446
+ }
1447
+ export interface SubscriptionContractCreatedEnvelope {
1448
+ entity: SubscriptionContract;
1449
+ metadata: EventMetadata;
1450
+ }
1451
+ /** @permissionScope Manage Stores - all permissions
1452
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1453
+ * @permissionScope Read eCommerce - all read permissions
1454
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1455
+ * @permissionScope Manage eCommerce - all permissions
1456
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1457
+ * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
1458
+ * @webhook
1459
+ * @eventType wix.ecom.subscription_contracts.v1.subscription_contract_created
1460
+ * @documentationMaturity preview
1461
+ */
1462
+ export declare function onSubscriptionContractCreated(handler: (event: SubscriptionContractCreatedEnvelope) => void | Promise<void>): void;
1463
+ export interface SubscriptionContractDeletedEnvelope {
1464
+ metadata: EventMetadata;
1465
+ }
1466
+ /** @permissionScope Manage Stores - all permissions
1467
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1468
+ * @permissionScope Read eCommerce - all read permissions
1469
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1470
+ * @permissionScope Manage eCommerce - all permissions
1471
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1472
+ * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
1473
+ * @webhook
1474
+ * @eventType wix.ecom.subscription_contracts.v1.subscription_contract_deleted
1475
+ * @documentationMaturity preview
1476
+ */
1477
+ export declare function onSubscriptionContractDeleted(handler: (event: SubscriptionContractDeletedEnvelope) => void | Promise<void>): void;
1478
+ export interface SubscriptionContractUpdatedEnvelope {
1479
+ entity: SubscriptionContract;
1480
+ metadata: EventMetadata;
1481
+ }
1482
+ /** @permissionScope Manage Stores - all permissions
1483
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1484
+ * @permissionScope Read eCommerce - all read permissions
1485
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1486
+ * @permissionScope Manage eCommerce - all permissions
1487
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1488
+ * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
1489
+ * @webhook
1490
+ * @eventType wix.ecom.subscription_contracts.v1.subscription_contract_updated
1491
+ * @documentationMaturity preview
1492
+ */
1493
+ export declare function onSubscriptionContractUpdated(handler: (event: SubscriptionContractUpdatedEnvelope) => void | Promise<void>): void;
1494
+ /**
1495
+ * Retrieves a SubscriptionContract.
1496
+ * @param subscriptionContractId - ID of the SubscriptionContract to retrieve.
1497
+ * @public
1498
+ * @documentationMaturity preview
1499
+ * @requiredField subscriptionContractId
1500
+ * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
1501
+ * @permissionScope Manage Stores - all permissions
1502
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1503
+ * @permissionScope Read eCommerce - all read permissions
1504
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1505
+ * @permissionScope Manage eCommerce - all permissions
1506
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1507
+ * @applicableIdentity APP
1508
+ * @returns The requested SubscriptionContract.
1509
+ * @fqn wix.ecom.subscription_contracts.v1.SubscriptionContracts.GetSubscriptionContract
1510
+ */
1511
+ export declare function getSubscriptionContract(subscriptionContractId: string): Promise<SubscriptionContract & SubscriptionContractNonNullableFields>;
1512
+ /**
1513
+ * Retrieves a list of SubscriptionContracts, given the provided [paging, filtering, and sorting][1].
1514
+ *
1515
+ * Up to 300 SubscriptionContracts can be returned per request.
1516
+ *
1517
+ * To learn how to query SubscriptionContracts, see [API Query Language][2].
1518
+ *
1519
+ * [1]: https://dev.wix.com/api/rest/getting-started/sorting-and-paging
1520
+ * [2]: https://dev.wix.com/api/rest/getting-started/api-query-language
1521
+ * @public
1522
+ * @documentationMaturity preview
1523
+ * @permissionScope Manage Stores - all permissions
1524
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
1525
+ * @permissionScope Read eCommerce - all read permissions
1526
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
1527
+ * @permissionScope Manage eCommerce - all permissions
1528
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
1529
+ * @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
1530
+ * @applicableIdentity APP
1531
+ * @fqn wix.ecom.subscription_contracts.v1.SubscriptionContracts.QuerySubscriptionContracts
1532
+ */
1533
+ export declare function querySubscriptionContracts(): SubscriptionContractsQueryBuilder;
1534
+ interface QueryCursorResult {
1535
+ cursors: Cursors;
1536
+ hasNext: () => boolean;
1537
+ hasPrev: () => boolean;
1538
+ length: number;
1539
+ pageSize: number;
1540
+ }
1541
+ export interface SubscriptionContractsQueryResult extends QueryCursorResult {
1542
+ items: SubscriptionContract[];
1543
+ query: SubscriptionContractsQueryBuilder;
1544
+ next: () => Promise<SubscriptionContractsQueryResult>;
1545
+ prev: () => Promise<SubscriptionContractsQueryResult>;
1546
+ }
1547
+ export interface SubscriptionContractsQueryBuilder {
1548
+ /** @param propertyName - Property whose value is compared with `value`.
1549
+ * @param value - Value to compare against.
1550
+ * @documentationMaturity preview
1551
+ */
1552
+ eq: (propertyName: '_id' | 'buyerInfo.contactId', value: any) => SubscriptionContractsQueryBuilder;
1553
+ /** @param propertyName - Property whose value is compared with `value`.
1554
+ * @param value - Value to compare against.
1555
+ * @documentationMaturity preview
1556
+ */
1557
+ ne: (propertyName: '_id' | 'buyerInfo.contactId', value: any) => SubscriptionContractsQueryBuilder;
1558
+ /** @param propertyName - Property whose value is compared with `string`.
1559
+ * @param string - String to compare against. Case-insensitive.
1560
+ * @documentationMaturity preview
1561
+ */
1562
+ startsWith: (propertyName: '_id' | 'buyerInfo.contactId', value: string) => SubscriptionContractsQueryBuilder;
1563
+ /** @param propertyName - Property whose value is compared with `values`.
1564
+ * @param values - List of values to compare against.
1565
+ * @documentationMaturity preview
1566
+ */
1567
+ hasSome: (propertyName: '_id' | 'buyerInfo.contactId', value: any[]) => SubscriptionContractsQueryBuilder;
1568
+ /** @documentationMaturity preview */
1569
+ in: (propertyName: '_id' | 'buyerInfo.contactId', value: any) => SubscriptionContractsQueryBuilder;
1570
+ /** @documentationMaturity preview */
1571
+ exists: (propertyName: '_id' | 'buyerInfo.contactId', value: boolean) => SubscriptionContractsQueryBuilder;
1572
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1573
+ * @documentationMaturity preview
1574
+ */
1575
+ ascending: (...propertyNames: Array<'_id' | 'buyerInfo.contactId'>) => SubscriptionContractsQueryBuilder;
1576
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
1577
+ * @documentationMaturity preview
1578
+ */
1579
+ descending: (...propertyNames: Array<'_id' | 'buyerInfo.contactId'>) => SubscriptionContractsQueryBuilder;
1580
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
1581
+ * @documentationMaturity preview
1582
+ */
1583
+ limit: (limit: number) => SubscriptionContractsQueryBuilder;
1584
+ /** @param cursor - A pointer to specific record
1585
+ * @documentationMaturity preview
1586
+ */
1587
+ skipTo: (cursor: string) => SubscriptionContractsQueryBuilder;
1588
+ /** @documentationMaturity preview */
1589
+ find: () => Promise<SubscriptionContractsQueryResult>;
1590
+ }
1591
+ export {};