@wix/auto_sdk_ecom_subscription-contracts 1.0.1 → 1.0.3
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.
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +475 -105
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -1
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts +496 -107
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +4 -0
- package/build/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -1
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +475 -105
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -1
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts +496 -107
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +4 -0
- package/build/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -1
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +470 -106
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -1
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts +494 -109
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +4 -0
- package/build/internal/cjs/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -1
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.d.ts +470 -106
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.types.js.map +1 -1
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.d.ts +494 -109
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js +4 -0
- package/build/internal/es/src/ecom-subscription-contracts-v1-subscription-contract-subscription-contracts.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export interface SubscriptionContract {
|
|
8
8
|
/**
|
|
9
9
|
* SubscriptionContract ID.
|
|
10
|
+
* @format GUID
|
|
10
11
|
* @readonly
|
|
11
12
|
*/
|
|
12
13
|
_id?: string | null;
|
|
@@ -28,12 +29,20 @@ export interface SubscriptionContract {
|
|
|
28
29
|
* @readonly
|
|
29
30
|
*/
|
|
30
31
|
_updatedDate?: Date | null;
|
|
31
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Subscription option description. For example, `"1kg of selected coffee, once a month"`.
|
|
34
|
+
* @maxLength 500
|
|
35
|
+
*/
|
|
32
36
|
description?: string | null;
|
|
33
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Subscription detailed information.
|
|
39
|
+
* @immutable
|
|
40
|
+
*/
|
|
34
41
|
subscriptionSettings?: V1SubscriptionSettings;
|
|
35
42
|
/**
|
|
36
43
|
* Order line items.
|
|
44
|
+
* @minSize 1
|
|
45
|
+
* @maxSize 1
|
|
37
46
|
* @readonly
|
|
38
47
|
*/
|
|
39
48
|
lineItems?: OrderLineItem[];
|
|
@@ -46,12 +55,17 @@ export interface SubscriptionContract {
|
|
|
46
55
|
buyerLanguage?: string | null;
|
|
47
56
|
/** Weight measurement unit - defaults to site's weight unit. */
|
|
48
57
|
weightUnit?: WeightUnit;
|
|
49
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* 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.
|
|
60
|
+
* @format CURRENCY
|
|
61
|
+
* @immutable
|
|
62
|
+
*/
|
|
50
63
|
currency?: string | null;
|
|
51
64
|
/**
|
|
52
65
|
* Whether tax is included in line item prices.
|
|
53
66
|
*
|
|
54
67
|
* Default: `false`
|
|
68
|
+
* @immutable
|
|
55
69
|
*/
|
|
56
70
|
taxIncludedInPrices?: boolean;
|
|
57
71
|
/**
|
|
@@ -83,19 +97,33 @@ export interface SubscriptionContract {
|
|
|
83
97
|
* [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
98
|
*/
|
|
85
99
|
extendedFields?: ExtendedFields;
|
|
86
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
102
|
+
* @minLength 1
|
|
103
|
+
* @maxLength 150
|
|
104
|
+
*/
|
|
87
105
|
title?: string | null;
|
|
88
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Additional fees applied to subscription contract.
|
|
108
|
+
* @maxSize 100
|
|
109
|
+
*/
|
|
89
110
|
additionalFees?: AdditionalFee[];
|
|
90
111
|
}
|
|
91
112
|
export interface V1SubscriptionSettings {
|
|
92
113
|
/** Frequency of recurring payment. */
|
|
93
114
|
frequency?: SubscriptionFrequency;
|
|
94
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Interval of recurring payment.
|
|
117
|
+
* @min 1
|
|
118
|
+
* @max 50
|
|
119
|
+
*/
|
|
95
120
|
interval?: number | null;
|
|
96
121
|
/** Whether subscription is renewed automatically at the end of each period. */
|
|
97
122
|
autoRenewal?: boolean;
|
|
98
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
|
|
125
|
+
* @min 1
|
|
126
|
+
*/
|
|
99
127
|
billingCycles?: number | null;
|
|
100
128
|
/** Whether to allow the customer to cancel the subscription. */
|
|
101
129
|
enableCustomerCancellation?: boolean;
|
|
@@ -110,11 +138,18 @@ export declare enum SubscriptionFrequency {
|
|
|
110
138
|
export interface V1FreeTrialPeriod {
|
|
111
139
|
/** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
|
|
112
140
|
frequency?: SubscriptionFrequency;
|
|
113
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* interval of period
|
|
143
|
+
* @min 1
|
|
144
|
+
* @max 50
|
|
145
|
+
*/
|
|
114
146
|
interval?: number;
|
|
115
147
|
}
|
|
116
148
|
export interface OrderLineItem {
|
|
117
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* Line item ID.
|
|
151
|
+
* @immutable
|
|
152
|
+
*/
|
|
118
153
|
_id?: string;
|
|
119
154
|
/**
|
|
120
155
|
* Item name.
|
|
@@ -128,14 +163,21 @@ export interface OrderLineItem {
|
|
|
128
163
|
* This field may be empty in the case of a custom line item.
|
|
129
164
|
*/
|
|
130
165
|
catalogReference?: CatalogReference;
|
|
131
|
-
/**
|
|
166
|
+
/**
|
|
167
|
+
* Line item quantity.
|
|
168
|
+
* @min 1
|
|
169
|
+
* @max 100000
|
|
170
|
+
*/
|
|
132
171
|
quantity?: number;
|
|
133
172
|
/**
|
|
134
173
|
* Total discount for this line item's entire quantity.
|
|
135
174
|
* @readonly
|
|
136
175
|
*/
|
|
137
176
|
totalDiscount?: Price;
|
|
138
|
-
/**
|
|
177
|
+
/**
|
|
178
|
+
* Line item description lines. Used for display purposes for the cart, checkout and order.
|
|
179
|
+
* @maxSize 20
|
|
180
|
+
*/
|
|
139
181
|
descriptionLines?: DescriptionLine[];
|
|
140
182
|
/** Line item image. */
|
|
141
183
|
image?: string;
|
|
@@ -146,11 +188,18 @@ export interface OrderLineItem {
|
|
|
146
188
|
/**
|
|
147
189
|
* Fulfiller ID. Field is empty when the line item is self-fulfilled.
|
|
148
190
|
* 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).
|
|
191
|
+
* @format GUID
|
|
149
192
|
*/
|
|
150
193
|
fulfillerId?: string | null;
|
|
151
|
-
/**
|
|
194
|
+
/**
|
|
195
|
+
* Number of items that were refunded.
|
|
196
|
+
* @max 100000
|
|
197
|
+
*/
|
|
152
198
|
refundQuantity?: number | null;
|
|
153
|
-
/**
|
|
199
|
+
/**
|
|
200
|
+
* Number of items restocked.
|
|
201
|
+
* @max 100000
|
|
202
|
+
*/
|
|
154
203
|
restockQuantity?: number | null;
|
|
155
204
|
/** Line item price after line item discounts for display purposes. */
|
|
156
205
|
price?: Price;
|
|
@@ -170,11 +219,9 @@ export interface OrderLineItem {
|
|
|
170
219
|
*/
|
|
171
220
|
totalPriceAfterTax?: Price;
|
|
172
221
|
/**
|
|
173
|
-
* Type of selected payment option for current item.
|
|
174
|
-
*
|
|
175
|
-
*
|
|
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.
|
|
222
|
+
* Type of selected payment option for current item.
|
|
223
|
+
*
|
|
224
|
+
* Default: `FULL_PAYMENT_ONLINE`
|
|
178
225
|
*/
|
|
179
226
|
paymentOption?: PaymentOptionType;
|
|
180
227
|
/**
|
|
@@ -201,6 +248,13 @@ export interface OrderLineItem {
|
|
|
201
248
|
* @readonly
|
|
202
249
|
*/
|
|
203
250
|
depositAmount?: Price;
|
|
251
|
+
/**
|
|
252
|
+
* Line item locations.
|
|
253
|
+
*
|
|
254
|
+
* The location's total quantity must not exceed the line item quantity.
|
|
255
|
+
* @maxSize 5
|
|
256
|
+
*/
|
|
257
|
+
locations?: LocationAndQuantity[];
|
|
204
258
|
/**
|
|
205
259
|
* Custom extended fields for the line item object.
|
|
206
260
|
*
|
|
@@ -214,6 +268,8 @@ export interface ProductName {
|
|
|
214
268
|
*
|
|
215
269
|
* Min: 1 character.
|
|
216
270
|
* Max: 200 characters.
|
|
271
|
+
* @minLength 1
|
|
272
|
+
* @maxLength 200
|
|
217
273
|
*/
|
|
218
274
|
original?: string;
|
|
219
275
|
/**
|
|
@@ -222,12 +278,18 @@ export interface ProductName {
|
|
|
222
278
|
* Min: 1 character.
|
|
223
279
|
* Max: 400 characters.
|
|
224
280
|
* Default: Same as `original`.
|
|
281
|
+
* @minLength 1
|
|
282
|
+
* @maxLength 400
|
|
225
283
|
*/
|
|
226
284
|
translated?: string | null;
|
|
227
285
|
}
|
|
228
286
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
229
287
|
export interface CatalogReference {
|
|
230
|
-
/**
|
|
288
|
+
/**
|
|
289
|
+
* ID of the item within the catalog it belongs to.
|
|
290
|
+
* @minLength 1
|
|
291
|
+
* @maxLength 36
|
|
292
|
+
*/
|
|
231
293
|
catalogItemId?: string;
|
|
232
294
|
/**
|
|
233
295
|
* ID of the app providing the catalog.
|
|
@@ -238,6 +300,7 @@ export interface CatalogReference {
|
|
|
238
300
|
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
239
301
|
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
240
302
|
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
303
|
+
* @minLength 1
|
|
241
304
|
*/
|
|
242
305
|
appId?: string;
|
|
243
306
|
/**
|
|
@@ -248,7 +311,10 @@ export interface CatalogReference {
|
|
|
248
311
|
options?: Record<string, any> | null;
|
|
249
312
|
}
|
|
250
313
|
export interface Price {
|
|
251
|
-
/**
|
|
314
|
+
/**
|
|
315
|
+
* Amount.
|
|
316
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
317
|
+
*/
|
|
252
318
|
amount?: string;
|
|
253
319
|
/**
|
|
254
320
|
* Amount formatted with currency symbol.
|
|
@@ -275,32 +341,44 @@ export interface DescriptionLineValueOneOf {
|
|
|
275
341
|
export interface DescriptionLineDescriptionLineValueOneOf {
|
|
276
342
|
}
|
|
277
343
|
export interface DescriptionLineName {
|
|
278
|
-
/**
|
|
344
|
+
/**
|
|
345
|
+
* 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).
|
|
346
|
+
* @maxLength 100
|
|
347
|
+
*/
|
|
279
348
|
original?: string;
|
|
280
349
|
/**
|
|
281
350
|
* Description line name translated into the buyer's language.
|
|
282
351
|
*
|
|
283
352
|
* Default: Same as `original`.
|
|
353
|
+
* @maxLength 200
|
|
284
354
|
*/
|
|
285
355
|
translated?: string | null;
|
|
286
356
|
}
|
|
287
357
|
export interface PlainTextValue {
|
|
288
|
-
/**
|
|
358
|
+
/**
|
|
359
|
+
* 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).
|
|
360
|
+
* @maxLength 600
|
|
361
|
+
*/
|
|
289
362
|
original?: string;
|
|
290
363
|
/**
|
|
291
364
|
* Description line plain text value translated into the buyer's language.
|
|
292
365
|
*
|
|
293
366
|
* Default: Same as `original`.
|
|
367
|
+
* @maxLength 600
|
|
294
368
|
*/
|
|
295
369
|
translated?: string | null;
|
|
296
370
|
}
|
|
297
371
|
export interface Color {
|
|
298
|
-
/**
|
|
372
|
+
/**
|
|
373
|
+
* 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).
|
|
374
|
+
* @maxLength 500
|
|
375
|
+
*/
|
|
299
376
|
original?: string;
|
|
300
377
|
/**
|
|
301
378
|
* Description line color name translated into the buyer's language.
|
|
302
379
|
*
|
|
303
380
|
* Default: Same as `original`.
|
|
381
|
+
* @maxLength 500
|
|
304
382
|
*/
|
|
305
383
|
translated?: string | null;
|
|
306
384
|
/** HEX or RGB color code for display. */
|
|
@@ -327,7 +405,10 @@ export interface FocalPoint {
|
|
|
327
405
|
export interface PhysicalProperties {
|
|
328
406
|
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
329
407
|
weight?: number | null;
|
|
330
|
-
/**
|
|
408
|
+
/**
|
|
409
|
+
* Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
|
|
410
|
+
* @maxLength 40
|
|
411
|
+
*/
|
|
331
412
|
sku?: string | null;
|
|
332
413
|
/** Whether this line item is shippable. */
|
|
333
414
|
shippable?: boolean;
|
|
@@ -368,7 +449,10 @@ export declare enum PaymentOptionType {
|
|
|
368
449
|
export interface ItemTaxFullDetails {
|
|
369
450
|
/** Taxable amount of this line item. */
|
|
370
451
|
taxableAmount?: Price;
|
|
371
|
-
/**
|
|
452
|
+
/**
|
|
453
|
+
* Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`.
|
|
454
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
455
|
+
*/
|
|
372
456
|
taxRate?: string;
|
|
373
457
|
/** The calculated tax, based on the `taxableAmount` and `taxRate`. */
|
|
374
458
|
totalTax?: Price;
|
|
@@ -378,16 +462,24 @@ export interface LineItemTaxInfo {
|
|
|
378
462
|
taxAmount?: Price;
|
|
379
463
|
/** Amount for which tax is calculated. */
|
|
380
464
|
taxableAmount?: Price;
|
|
381
|
-
/**
|
|
465
|
+
/**
|
|
466
|
+
* Tax rate %, as a decimal point.
|
|
467
|
+
* @format DECIMAL_VALUE
|
|
468
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
469
|
+
*/
|
|
382
470
|
taxRate?: string | null;
|
|
383
471
|
/**
|
|
384
472
|
* Tax group ID.
|
|
385
473
|
* Learn more about [Tax Groups](https://dev.wix.com/docs/rest/business-management/payments/tax/tax-groups/introduction).
|
|
474
|
+
* @format GUID
|
|
386
475
|
*/
|
|
387
476
|
taxGroupId?: string | null;
|
|
388
477
|
/** Indicates whether the price already includes tax. */
|
|
389
478
|
taxIncludedInPrice?: boolean;
|
|
390
|
-
/**
|
|
479
|
+
/**
|
|
480
|
+
* Tax information for a line item.
|
|
481
|
+
* @maxSize 7
|
|
482
|
+
*/
|
|
391
483
|
taxBreakdown?: LineItemTaxBreakdown[];
|
|
392
484
|
}
|
|
393
485
|
/**
|
|
@@ -395,17 +487,28 @@ export interface LineItemTaxInfo {
|
|
|
395
487
|
* It holds the tax amount and the tax rate for each tax authority that apply on the line item.
|
|
396
488
|
*/
|
|
397
489
|
export interface LineItemTaxBreakdown {
|
|
398
|
-
/**
|
|
490
|
+
/**
|
|
491
|
+
* Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec".
|
|
492
|
+
* @maxLength 200
|
|
493
|
+
*/
|
|
399
494
|
jurisdiction?: string | null;
|
|
400
|
-
/**
|
|
495
|
+
/**
|
|
496
|
+
* Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000.
|
|
497
|
+
* @format DECIMAL_VALUE
|
|
498
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
499
|
+
*/
|
|
401
500
|
rate?: string | null;
|
|
402
501
|
/** Amount of tax calculated for this line item. */
|
|
403
502
|
taxAmount?: Price;
|
|
404
|
-
/**
|
|
503
|
+
/**
|
|
504
|
+
* The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
|
|
505
|
+
* @maxLength 200
|
|
506
|
+
*/
|
|
405
507
|
taxType?: string | null;
|
|
406
508
|
/**
|
|
407
509
|
* The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
408
510
|
* This name should be explicit enough to allow the merchant to understand what tax was calculated.
|
|
511
|
+
* @maxLength 200
|
|
409
512
|
*/
|
|
410
513
|
taxName?: string | null;
|
|
411
514
|
/** Type of jurisdiction that taxes were calculated for. */
|
|
@@ -425,9 +528,18 @@ export declare enum JurisdictionType {
|
|
|
425
528
|
SPECIAL = "SPECIAL"
|
|
426
529
|
}
|
|
427
530
|
export interface DigitalFile {
|
|
428
|
-
/**
|
|
531
|
+
/**
|
|
532
|
+
* ID of the secure file in media.
|
|
533
|
+
* @minLength 1
|
|
534
|
+
* @maxLength 100
|
|
535
|
+
*/
|
|
429
536
|
fileId?: string;
|
|
430
|
-
/**
|
|
537
|
+
/**
|
|
538
|
+
* Link will exist after the digital links have been generated on the order.
|
|
539
|
+
* @format WEB_URL
|
|
540
|
+
* @minLength 1
|
|
541
|
+
* @maxLength 2000
|
|
542
|
+
*/
|
|
431
543
|
link?: string | null;
|
|
432
544
|
/**
|
|
433
545
|
* Link expiration time and date.
|
|
@@ -436,25 +548,48 @@ export interface DigitalFile {
|
|
|
436
548
|
expirationDate?: Date | null;
|
|
437
549
|
}
|
|
438
550
|
export interface SubscriptionInfo {
|
|
439
|
-
/**
|
|
551
|
+
/**
|
|
552
|
+
* Subscription ID.
|
|
553
|
+
* @format GUID
|
|
554
|
+
*/
|
|
440
555
|
_id?: string | null;
|
|
441
|
-
/**
|
|
556
|
+
/**
|
|
557
|
+
* Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`.
|
|
558
|
+
* @min 1
|
|
559
|
+
*/
|
|
442
560
|
cycleNumber?: number;
|
|
443
|
-
/**
|
|
561
|
+
/**
|
|
562
|
+
* Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
563
|
+
* @minLength 1
|
|
564
|
+
* @maxLength 20
|
|
565
|
+
*/
|
|
444
566
|
subscriptionOptionTitle?: string;
|
|
445
|
-
/**
|
|
567
|
+
/**
|
|
568
|
+
* Subscription option description. For example, `"1kg of selected coffee, once a month"`.
|
|
569
|
+
* @maxLength 60
|
|
570
|
+
*/
|
|
446
571
|
subscriptionOptionDescription?: string | null;
|
|
447
|
-
/**
|
|
572
|
+
/**
|
|
573
|
+
* Subscription detailed information.
|
|
574
|
+
* @immutable
|
|
575
|
+
*/
|
|
448
576
|
subscriptionSettings?: SubscriptionSettings;
|
|
449
577
|
}
|
|
450
578
|
export interface SubscriptionSettings {
|
|
451
579
|
/** Frequency of recurring payment. */
|
|
452
580
|
frequency?: V2SubscriptionFrequency;
|
|
453
|
-
/**
|
|
581
|
+
/**
|
|
582
|
+
* Interval of recurring payment.
|
|
583
|
+
* @min 1
|
|
584
|
+
* @max 50
|
|
585
|
+
*/
|
|
454
586
|
interval?: number | null;
|
|
455
587
|
/** Whether subscription is renewed automatically at the end of each period. */
|
|
456
588
|
autoRenewal?: boolean;
|
|
457
|
-
/**
|
|
589
|
+
/**
|
|
590
|
+
* Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
|
|
591
|
+
* @min 1
|
|
592
|
+
*/
|
|
458
593
|
billingCycles?: number | null;
|
|
459
594
|
}
|
|
460
595
|
/** Frequency unit of recurring payment */
|
|
@@ -468,30 +603,54 @@ export declare enum V2SubscriptionFrequency {
|
|
|
468
603
|
export interface FreeTrialPeriod {
|
|
469
604
|
/** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
|
|
470
605
|
frequency?: V2SubscriptionFrequency;
|
|
471
|
-
/**
|
|
606
|
+
/**
|
|
607
|
+
* interval of period
|
|
608
|
+
* @min 1
|
|
609
|
+
* @max 50
|
|
610
|
+
*/
|
|
472
611
|
interval?: number;
|
|
473
612
|
}
|
|
474
613
|
export interface PriceDescription {
|
|
475
|
-
/**
|
|
614
|
+
/**
|
|
615
|
+
* __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).
|
|
616
|
+
* @minLength 1
|
|
617
|
+
* @maxLength 100
|
|
618
|
+
*/
|
|
476
619
|
original?: string;
|
|
477
620
|
/**
|
|
478
621
|
* Price description translated into the buyer's language.
|
|
479
622
|
*
|
|
480
623
|
* Default: Same as `original`.
|
|
624
|
+
* @minLength 1
|
|
625
|
+
* @maxLength 100
|
|
481
626
|
*/
|
|
482
627
|
translated?: string | null;
|
|
483
628
|
}
|
|
484
629
|
export interface LocationAndQuantity {
|
|
485
|
-
/**
|
|
630
|
+
/**
|
|
631
|
+
* Location id in the associated owner app.
|
|
632
|
+
* @format GUID
|
|
633
|
+
*/
|
|
486
634
|
_id?: string;
|
|
487
635
|
/**
|
|
488
636
|
* Location owner app, if not provided then the site business info locations will be used.
|
|
637
|
+
* @format GUID
|
|
489
638
|
* @deprecated Location owner app, if not provided then the site business info locations will be used.
|
|
490
639
|
* @targetRemovalDate 2025-03-01
|
|
491
640
|
*/
|
|
492
641
|
appId?: string | null;
|
|
493
|
-
/**
|
|
642
|
+
/**
|
|
643
|
+
* Quantity for specific location.
|
|
644
|
+
* @min 1
|
|
645
|
+
* @max 100000
|
|
646
|
+
*/
|
|
494
647
|
quantity?: number;
|
|
648
|
+
/**
|
|
649
|
+
* Location name.
|
|
650
|
+
* @maxLength 500
|
|
651
|
+
* @readonly
|
|
652
|
+
*/
|
|
653
|
+
name?: string | null;
|
|
495
654
|
}
|
|
496
655
|
export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
|
|
497
656
|
/** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
|
|
@@ -521,20 +680,38 @@ export interface ExtendedFields {
|
|
|
521
680
|
}
|
|
522
681
|
/** Buyer Info */
|
|
523
682
|
export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
524
|
-
/**
|
|
683
|
+
/**
|
|
684
|
+
* Visitor ID (if site visitor is not a member).
|
|
685
|
+
* @format GUID
|
|
686
|
+
*/
|
|
525
687
|
visitorId?: string;
|
|
526
|
-
/**
|
|
688
|
+
/**
|
|
689
|
+
* Member ID (if site visitor is a site member).
|
|
690
|
+
* @format GUID
|
|
691
|
+
*/
|
|
527
692
|
memberId?: string;
|
|
528
|
-
/**
|
|
693
|
+
/**
|
|
694
|
+
* 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).
|
|
695
|
+
* @format GUID
|
|
696
|
+
*/
|
|
529
697
|
contactId?: string | null;
|
|
530
|
-
/**
|
|
698
|
+
/**
|
|
699
|
+
* Buyer email address.
|
|
700
|
+
* @format EMAIL
|
|
701
|
+
*/
|
|
531
702
|
email?: string | null;
|
|
532
703
|
}
|
|
533
704
|
/** @oneof */
|
|
534
705
|
export interface BuyerInfoIdOneOf {
|
|
535
|
-
/**
|
|
706
|
+
/**
|
|
707
|
+
* Visitor ID (if site visitor is not a member).
|
|
708
|
+
* @format GUID
|
|
709
|
+
*/
|
|
536
710
|
visitorId?: string;
|
|
537
|
-
/**
|
|
711
|
+
/**
|
|
712
|
+
* Member ID (if site visitor is a site member).
|
|
713
|
+
* @format GUID
|
|
714
|
+
*/
|
|
538
715
|
memberId?: string;
|
|
539
716
|
}
|
|
540
717
|
export declare enum WeightUnit {
|
|
@@ -568,19 +745,37 @@ export interface AddressWithContact {
|
|
|
568
745
|
}
|
|
569
746
|
/** Physical address */
|
|
570
747
|
export interface Address {
|
|
571
|
-
/**
|
|
748
|
+
/**
|
|
749
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
750
|
+
* @format COUNTRY
|
|
751
|
+
*/
|
|
572
752
|
country?: string | null;
|
|
573
|
-
/**
|
|
753
|
+
/**
|
|
754
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
755
|
+
* @maxLength 50
|
|
756
|
+
*/
|
|
574
757
|
subdivision?: string | null;
|
|
575
|
-
/**
|
|
758
|
+
/**
|
|
759
|
+
* City name.
|
|
760
|
+
* @maxLength 50
|
|
761
|
+
*/
|
|
576
762
|
city?: string | null;
|
|
577
|
-
/**
|
|
763
|
+
/**
|
|
764
|
+
* Postal or zip code.
|
|
765
|
+
* @maxLength 50
|
|
766
|
+
*/
|
|
578
767
|
postalCode?: string | null;
|
|
579
768
|
/** Street address. */
|
|
580
769
|
streetAddress?: StreetAddress;
|
|
581
|
-
/**
|
|
770
|
+
/**
|
|
771
|
+
* Main address line (usually street name and number).
|
|
772
|
+
* @maxLength 150
|
|
773
|
+
*/
|
|
582
774
|
addressLine1?: string | null;
|
|
583
|
-
/**
|
|
775
|
+
/**
|
|
776
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
777
|
+
* @maxLength 100
|
|
778
|
+
*/
|
|
584
779
|
addressLine2?: string | null;
|
|
585
780
|
/**
|
|
586
781
|
* Country's full name.
|
|
@@ -607,13 +802,25 @@ export interface AddressLocation {
|
|
|
607
802
|
}
|
|
608
803
|
/** Full contact details for an address */
|
|
609
804
|
export interface FullAddressContactDetails {
|
|
610
|
-
/**
|
|
805
|
+
/**
|
|
806
|
+
* First name.
|
|
807
|
+
* @maxLength 100
|
|
808
|
+
*/
|
|
611
809
|
firstName?: string | null;
|
|
612
|
-
/**
|
|
810
|
+
/**
|
|
811
|
+
* Last name.
|
|
812
|
+
* @maxLength 100
|
|
813
|
+
*/
|
|
613
814
|
lastName?: string | null;
|
|
614
|
-
/**
|
|
815
|
+
/**
|
|
816
|
+
* Phone number.
|
|
817
|
+
* @format PHONE
|
|
818
|
+
*/
|
|
615
819
|
phone?: string | null;
|
|
616
|
-
/**
|
|
820
|
+
/**
|
|
821
|
+
* Company name.
|
|
822
|
+
* @maxLength 1000
|
|
823
|
+
*/
|
|
617
824
|
company?: string | null;
|
|
618
825
|
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
619
826
|
vatId?: VatId;
|
|
@@ -639,13 +846,22 @@ export declare enum VatType {
|
|
|
639
846
|
CNPJ = "CNPJ"
|
|
640
847
|
}
|
|
641
848
|
export interface ShippingInformation {
|
|
642
|
-
/**
|
|
849
|
+
/**
|
|
850
|
+
* App Def Id of external provider which was a source of shipping info
|
|
851
|
+
* @minLength 1
|
|
852
|
+
* @maxLength 100
|
|
853
|
+
*/
|
|
643
854
|
carrierId?: string | null;
|
|
644
|
-
/**
|
|
855
|
+
/**
|
|
856
|
+
* Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`.
|
|
857
|
+
* @minLength 1
|
|
858
|
+
* @maxLength 100
|
|
859
|
+
*/
|
|
645
860
|
code?: string | null;
|
|
646
861
|
/**
|
|
647
862
|
* Shipping option title.
|
|
648
863
|
* For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`.
|
|
864
|
+
* @maxLength 250
|
|
649
865
|
*/
|
|
650
866
|
title?: string;
|
|
651
867
|
/** Shipping logistics. */
|
|
@@ -660,9 +876,15 @@ export interface DeliveryLogistics extends DeliveryLogisticsAddressOneOf {
|
|
|
660
876
|
shippingDestination?: AddressWithContact;
|
|
661
877
|
/** Pickup details. */
|
|
662
878
|
pickupDetails?: PickupDetails;
|
|
663
|
-
/**
|
|
879
|
+
/**
|
|
880
|
+
* Expected delivery time in free text. For example, `"3-5 business days"`.
|
|
881
|
+
* @maxLength 500
|
|
882
|
+
*/
|
|
664
883
|
deliveryTime?: string | null;
|
|
665
|
-
/**
|
|
884
|
+
/**
|
|
885
|
+
* Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`.
|
|
886
|
+
* @maxLength 1000
|
|
887
|
+
*/
|
|
666
888
|
instructions?: string | null;
|
|
667
889
|
/**
|
|
668
890
|
* Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
@@ -687,19 +909,37 @@ export interface PickupDetails {
|
|
|
687
909
|
}
|
|
688
910
|
/** Physical address */
|
|
689
911
|
export interface PickupAddress {
|
|
690
|
-
/**
|
|
912
|
+
/**
|
|
913
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
914
|
+
* @format COUNTRY
|
|
915
|
+
*/
|
|
691
916
|
country?: string | null;
|
|
692
|
-
/**
|
|
917
|
+
/**
|
|
918
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
919
|
+
* @maxLength 50
|
|
920
|
+
*/
|
|
693
921
|
subdivision?: string | null;
|
|
694
|
-
/**
|
|
922
|
+
/**
|
|
923
|
+
* City name.
|
|
924
|
+
* @maxLength 1000
|
|
925
|
+
*/
|
|
695
926
|
city?: string | null;
|
|
696
|
-
/**
|
|
927
|
+
/**
|
|
928
|
+
* Postal or zip code.
|
|
929
|
+
* @maxLength 1000
|
|
930
|
+
*/
|
|
697
931
|
postalCode?: string | null;
|
|
698
932
|
/** Street address object, with number, name, and apartment number in separate fields. */
|
|
699
933
|
streetAddress?: StreetAddress;
|
|
700
|
-
/**
|
|
934
|
+
/**
|
|
935
|
+
* Main address line (usually street name and number).
|
|
936
|
+
* @maxLength 1000
|
|
937
|
+
*/
|
|
701
938
|
addressLine1?: string | null;
|
|
702
|
-
/**
|
|
939
|
+
/**
|
|
940
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
941
|
+
* @maxLength 1000
|
|
942
|
+
*/
|
|
703
943
|
addressLine2?: string | null;
|
|
704
944
|
/**
|
|
705
945
|
* Country's full name.
|
|
@@ -745,13 +985,19 @@ export interface ShippingPrice {
|
|
|
745
985
|
discount?: Price;
|
|
746
986
|
}
|
|
747
987
|
export interface ShippingRegion {
|
|
748
|
-
/**
|
|
988
|
+
/**
|
|
989
|
+
* Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`.
|
|
990
|
+
* @maxLength 100
|
|
991
|
+
*/
|
|
749
992
|
name?: string | null;
|
|
750
993
|
}
|
|
751
994
|
export interface OrderTaxInfo {
|
|
752
995
|
/** Calculated tax, added from line items. */
|
|
753
996
|
totalTax?: Price;
|
|
754
|
-
/**
|
|
997
|
+
/**
|
|
998
|
+
* 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.
|
|
999
|
+
* @maxSize 50
|
|
1000
|
+
*/
|
|
755
1001
|
taxBreakdown?: OrderTaxBreakdown[];
|
|
756
1002
|
/**
|
|
757
1003
|
* Whether the order is exempt from tax calculations.
|
|
@@ -766,15 +1012,28 @@ export interface OrderTaxInfo {
|
|
|
766
1012
|
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
767
1013
|
*/
|
|
768
1014
|
export interface OrderTaxBreakdown {
|
|
769
|
-
/**
|
|
1015
|
+
/**
|
|
1016
|
+
* The name of the tax against which this tax amount was calculated.
|
|
1017
|
+
* @maxLength 200
|
|
1018
|
+
*/
|
|
770
1019
|
taxName?: string;
|
|
771
|
-
/**
|
|
1020
|
+
/**
|
|
1021
|
+
* The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
|
|
1022
|
+
* @maxLength 200
|
|
1023
|
+
*/
|
|
772
1024
|
taxType?: string;
|
|
773
|
-
/**
|
|
1025
|
+
/**
|
|
1026
|
+
* The name of the jurisdiction in which this tax detail applies.
|
|
1027
|
+
* @maxLength 200
|
|
1028
|
+
*/
|
|
774
1029
|
jurisdiction?: string;
|
|
775
1030
|
/** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
776
1031
|
jurisdictionType?: JurisdictionType;
|
|
777
|
-
/**
|
|
1032
|
+
/**
|
|
1033
|
+
* The rate at which this tax detail was calculated.
|
|
1034
|
+
* @format DECIMAL_VALUE
|
|
1035
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
1036
|
+
*/
|
|
778
1037
|
rate?: string;
|
|
779
1038
|
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
780
1039
|
aggregatedTaxAmount?: Price;
|
|
@@ -796,13 +1055,19 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
796
1055
|
/**
|
|
797
1056
|
* IDs of line items discount applies to.
|
|
798
1057
|
* Deprecated. Use `line_item_discounts` instead.
|
|
1058
|
+
* @format GUID
|
|
1059
|
+
* @maxSize 1
|
|
799
1060
|
* @deprecated IDs of line items discount applies to.
|
|
800
1061
|
* Deprecated. Use `line_item_discounts` instead.
|
|
801
1062
|
* @replacedBy line_item_discounts
|
|
802
1063
|
* @targetRemovalDate 2024-10-30
|
|
803
1064
|
*/
|
|
804
1065
|
lineItemIds?: string[];
|
|
805
|
-
/**
|
|
1066
|
+
/**
|
|
1067
|
+
* Discount id.
|
|
1068
|
+
* @format GUID
|
|
1069
|
+
* @immutable
|
|
1070
|
+
*/
|
|
806
1071
|
_id?: string | null;
|
|
807
1072
|
}
|
|
808
1073
|
/** @oneof */
|
|
@@ -836,7 +1101,10 @@ export interface MerchantDiscount extends MerchantDiscountMerchantDiscountReason
|
|
|
836
1101
|
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
837
1102
|
*/
|
|
838
1103
|
discountReason?: DiscountReason;
|
|
839
|
-
/**
|
|
1104
|
+
/**
|
|
1105
|
+
* Discount description as free text (optional).
|
|
1106
|
+
* @maxLength 200
|
|
1107
|
+
*/
|
|
840
1108
|
description?: string | null;
|
|
841
1109
|
/** Discount amount. */
|
|
842
1110
|
amount?: Price;
|
|
@@ -848,7 +1116,10 @@ export interface MerchantDiscountMerchantDiscountReasonOneOf {
|
|
|
848
1116
|
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
849
1117
|
*/
|
|
850
1118
|
discountReason?: DiscountReason;
|
|
851
|
-
/**
|
|
1119
|
+
/**
|
|
1120
|
+
* Discount description as free text (optional).
|
|
1121
|
+
* @maxLength 200
|
|
1122
|
+
*/
|
|
852
1123
|
description?: string | null;
|
|
853
1124
|
}
|
|
854
1125
|
export declare enum DiscountReason {
|
|
@@ -856,7 +1127,10 @@ export declare enum DiscountReason {
|
|
|
856
1127
|
EXCHANGED_ITEMS = "EXCHANGED_ITEMS"
|
|
857
1128
|
}
|
|
858
1129
|
export interface DiscountRule {
|
|
859
|
-
/**
|
|
1130
|
+
/**
|
|
1131
|
+
* Discount rule ID
|
|
1132
|
+
* @format GUID
|
|
1133
|
+
*/
|
|
860
1134
|
_id?: string;
|
|
861
1135
|
/** Discount rule name */
|
|
862
1136
|
name?: DiscountRuleName;
|
|
@@ -864,13 +1138,24 @@ export interface DiscountRule {
|
|
|
864
1138
|
amount?: Price;
|
|
865
1139
|
}
|
|
866
1140
|
export interface DiscountRuleName {
|
|
867
|
-
/**
|
|
1141
|
+
/**
|
|
1142
|
+
* Original discount rule name (in site's default language).
|
|
1143
|
+
* @minLength 1
|
|
1144
|
+
* @maxLength 256
|
|
1145
|
+
*/
|
|
868
1146
|
original?: string;
|
|
869
|
-
/**
|
|
1147
|
+
/**
|
|
1148
|
+
* Translated discount rule name according to buyer language. Defaults to `original` when not provided.
|
|
1149
|
+
* @minLength 1
|
|
1150
|
+
* @maxLength 500
|
|
1151
|
+
*/
|
|
870
1152
|
translated?: string | null;
|
|
871
1153
|
}
|
|
872
1154
|
export interface LineItemDiscount {
|
|
873
|
-
/**
|
|
1155
|
+
/**
|
|
1156
|
+
* ID of line item the discount applies to.
|
|
1157
|
+
* @format GUID
|
|
1158
|
+
*/
|
|
874
1159
|
_id?: string;
|
|
875
1160
|
/** Total discount for this line item. */
|
|
876
1161
|
totalDiscount?: Price;
|
|
@@ -878,9 +1163,15 @@ export interface LineItemDiscount {
|
|
|
878
1163
|
export interface ChannelInfo {
|
|
879
1164
|
/** Sales channel that submitted the order. */
|
|
880
1165
|
type?: ChannelType;
|
|
881
|
-
/**
|
|
1166
|
+
/**
|
|
1167
|
+
* Reference to an order ID from an external system.
|
|
1168
|
+
* @maxLength 100
|
|
1169
|
+
*/
|
|
882
1170
|
externalOrderId?: string | null;
|
|
883
|
-
/**
|
|
1171
|
+
/**
|
|
1172
|
+
* URL to the order in the external system.
|
|
1173
|
+
* @maxLength 300
|
|
1174
|
+
*/
|
|
884
1175
|
externalOrderUrl?: string | null;
|
|
885
1176
|
}
|
|
886
1177
|
export declare enum ChannelType {
|
|
@@ -920,31 +1211,55 @@ export declare enum ChannelType {
|
|
|
920
1211
|
export interface CustomField {
|
|
921
1212
|
/** Custom field value. */
|
|
922
1213
|
value?: any;
|
|
923
|
-
/**
|
|
1214
|
+
/**
|
|
1215
|
+
* Custom field title.
|
|
1216
|
+
* @minLength 1
|
|
1217
|
+
* @maxLength 500
|
|
1218
|
+
*/
|
|
924
1219
|
title?: string;
|
|
925
|
-
/**
|
|
1220
|
+
/**
|
|
1221
|
+
* Translated custom field title.
|
|
1222
|
+
* @minLength 1
|
|
1223
|
+
* @maxLength 500
|
|
1224
|
+
*/
|
|
926
1225
|
translatedTitle?: string | null;
|
|
927
1226
|
}
|
|
928
1227
|
export interface AdditionalFee {
|
|
929
|
-
/**
|
|
1228
|
+
/**
|
|
1229
|
+
* Additional fee's unique code for future processing.
|
|
1230
|
+
* @minLength 1
|
|
1231
|
+
* @maxLength 100
|
|
1232
|
+
*/
|
|
930
1233
|
code?: string | null;
|
|
931
|
-
/**
|
|
1234
|
+
/**
|
|
1235
|
+
* Name of additional fee.
|
|
1236
|
+
* @minLength 1
|
|
1237
|
+
* @maxLength 50
|
|
1238
|
+
*/
|
|
932
1239
|
name?: string;
|
|
933
1240
|
/** Additional fee's price. */
|
|
934
1241
|
price?: Price;
|
|
935
1242
|
/** Tax details. */
|
|
936
1243
|
taxDetails?: ItemTaxFullDetails;
|
|
937
|
-
/**
|
|
1244
|
+
/**
|
|
1245
|
+
* SPI implementer's `appId`.
|
|
1246
|
+
* @format GUID
|
|
1247
|
+
*/
|
|
938
1248
|
providerAppId?: string | null;
|
|
939
1249
|
/** Additional fee's price before tax. */
|
|
940
1250
|
priceBeforeTax?: Price;
|
|
941
1251
|
/** Additional fee's price after tax. */
|
|
942
1252
|
priceAfterTax?: Price;
|
|
943
|
-
/**
|
|
1253
|
+
/**
|
|
1254
|
+
* Additional fee's id.
|
|
1255
|
+
* @format GUID
|
|
1256
|
+
* @immutable
|
|
1257
|
+
*/
|
|
944
1258
|
_id?: string;
|
|
945
1259
|
/**
|
|
946
1260
|
* Optional - Line items associated with this additional fee.
|
|
947
1261
|
* If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
|
|
1262
|
+
* @format GUID
|
|
948
1263
|
*/
|
|
949
1264
|
lineItemIds?: string[];
|
|
950
1265
|
}
|
|
@@ -952,10 +1267,13 @@ export interface Location {
|
|
|
952
1267
|
/**
|
|
953
1268
|
* Location ID.
|
|
954
1269
|
* Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
1270
|
+
* @format GUID
|
|
955
1271
|
*/
|
|
956
1272
|
_id?: string;
|
|
957
1273
|
/**
|
|
958
1274
|
* Location name.
|
|
1275
|
+
* @minLength 1
|
|
1276
|
+
* @maxLength 500
|
|
959
1277
|
* @readonly
|
|
960
1278
|
*/
|
|
961
1279
|
name?: string;
|
|
@@ -969,7 +1287,10 @@ export interface CreateSubscriptionContractResponse {
|
|
|
969
1287
|
subscriptionContract?: SubscriptionContract;
|
|
970
1288
|
}
|
|
971
1289
|
export interface GetSubscriptionContractRequest {
|
|
972
|
-
/**
|
|
1290
|
+
/**
|
|
1291
|
+
* ID of the SubscriptionContract to retrieve.
|
|
1292
|
+
* @format GUID
|
|
1293
|
+
*/
|
|
973
1294
|
subscriptionContractId: string;
|
|
974
1295
|
}
|
|
975
1296
|
export interface GetSubscriptionContractResponse {
|
|
@@ -1005,6 +1326,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
1005
1326
|
* Sort object in the following format:
|
|
1006
1327
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1007
1328
|
* Learn more about the [sort format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1329
|
+
* @maxSize 5
|
|
1008
1330
|
*/
|
|
1009
1331
|
sort?: Sorting[];
|
|
1010
1332
|
}
|
|
@@ -1014,7 +1336,10 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
1014
1336
|
cursorPaging?: CursorPaging;
|
|
1015
1337
|
}
|
|
1016
1338
|
export interface Sorting {
|
|
1017
|
-
/**
|
|
1339
|
+
/**
|
|
1340
|
+
* Name of the field to sort by.
|
|
1341
|
+
* @maxLength 512
|
|
1342
|
+
*/
|
|
1018
1343
|
fieldName?: string;
|
|
1019
1344
|
/** Sort order. */
|
|
1020
1345
|
order?: SortOrder;
|
|
@@ -1024,13 +1349,17 @@ export declare enum SortOrder {
|
|
|
1024
1349
|
DESC = "DESC"
|
|
1025
1350
|
}
|
|
1026
1351
|
export interface CursorPaging {
|
|
1027
|
-
/**
|
|
1352
|
+
/**
|
|
1353
|
+
* Maximum number of items to return in the results.
|
|
1354
|
+
* @max 100
|
|
1355
|
+
*/
|
|
1028
1356
|
limit?: number | null;
|
|
1029
1357
|
/**
|
|
1030
1358
|
* Pointer to the next or previous page in the list of results.
|
|
1031
1359
|
*
|
|
1032
1360
|
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1033
1361
|
* Not relevant for the first request.
|
|
1362
|
+
* @maxLength 16000
|
|
1034
1363
|
*/
|
|
1035
1364
|
cursor?: string | null;
|
|
1036
1365
|
}
|
|
@@ -1054,9 +1383,15 @@ export interface CursorPagingMetadata {
|
|
|
1054
1383
|
hasNext?: boolean | null;
|
|
1055
1384
|
}
|
|
1056
1385
|
export interface Cursors {
|
|
1057
|
-
/**
|
|
1386
|
+
/**
|
|
1387
|
+
* Cursor string pointing to the next page in the list of results.
|
|
1388
|
+
* @maxLength 16000
|
|
1389
|
+
*/
|
|
1058
1390
|
next?: string | null;
|
|
1059
|
-
/**
|
|
1391
|
+
/**
|
|
1392
|
+
* Cursor pointing to the previous page in the list of results.
|
|
1393
|
+
* @maxLength 16000
|
|
1394
|
+
*/
|
|
1060
1395
|
prev?: string | null;
|
|
1061
1396
|
}
|
|
1062
1397
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -1132,9 +1467,15 @@ export interface ActionEvent {
|
|
|
1132
1467
|
export interface Empty {
|
|
1133
1468
|
}
|
|
1134
1469
|
export interface MessageEnvelope {
|
|
1135
|
-
/**
|
|
1470
|
+
/**
|
|
1471
|
+
* App instance ID.
|
|
1472
|
+
* @format GUID
|
|
1473
|
+
*/
|
|
1136
1474
|
instanceId?: string | null;
|
|
1137
|
-
/**
|
|
1475
|
+
/**
|
|
1476
|
+
* Event type.
|
|
1477
|
+
* @maxLength 150
|
|
1478
|
+
*/
|
|
1138
1479
|
eventType?: string;
|
|
1139
1480
|
/** The identification type and identity data. */
|
|
1140
1481
|
identity?: IdentificationData;
|
|
@@ -1142,26 +1483,50 @@ export interface MessageEnvelope {
|
|
|
1142
1483
|
data?: string;
|
|
1143
1484
|
}
|
|
1144
1485
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1145
|
-
/**
|
|
1486
|
+
/**
|
|
1487
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1488
|
+
* @format GUID
|
|
1489
|
+
*/
|
|
1146
1490
|
anonymousVisitorId?: string;
|
|
1147
|
-
/**
|
|
1491
|
+
/**
|
|
1492
|
+
* ID of a site visitor that has logged in to the site.
|
|
1493
|
+
* @format GUID
|
|
1494
|
+
*/
|
|
1148
1495
|
memberId?: string;
|
|
1149
|
-
/**
|
|
1496
|
+
/**
|
|
1497
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1498
|
+
* @format GUID
|
|
1499
|
+
*/
|
|
1150
1500
|
wixUserId?: string;
|
|
1151
|
-
/**
|
|
1501
|
+
/**
|
|
1502
|
+
* ID of an app.
|
|
1503
|
+
* @format GUID
|
|
1504
|
+
*/
|
|
1152
1505
|
appId?: string;
|
|
1153
1506
|
/** @readonly */
|
|
1154
1507
|
identityType?: WebhookIdentityType;
|
|
1155
1508
|
}
|
|
1156
1509
|
/** @oneof */
|
|
1157
1510
|
export interface IdentificationDataIdOneOf {
|
|
1158
|
-
/**
|
|
1511
|
+
/**
|
|
1512
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1513
|
+
* @format GUID
|
|
1514
|
+
*/
|
|
1159
1515
|
anonymousVisitorId?: string;
|
|
1160
|
-
/**
|
|
1516
|
+
/**
|
|
1517
|
+
* ID of a site visitor that has logged in to the site.
|
|
1518
|
+
* @format GUID
|
|
1519
|
+
*/
|
|
1161
1520
|
memberId?: string;
|
|
1162
|
-
/**
|
|
1521
|
+
/**
|
|
1522
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1523
|
+
* @format GUID
|
|
1524
|
+
*/
|
|
1163
1525
|
wixUserId?: string;
|
|
1164
|
-
/**
|
|
1526
|
+
/**
|
|
1527
|
+
* ID of an app.
|
|
1528
|
+
* @format GUID
|
|
1529
|
+
*/
|
|
1165
1530
|
appId?: string;
|
|
1166
1531
|
}
|
|
1167
1532
|
export declare enum WebhookIdentityType {
|
|
@@ -1243,6 +1608,10 @@ interface SubscriptionInfoNonNullableFields {
|
|
|
1243
1608
|
interface PriceDescriptionNonNullableFields {
|
|
1244
1609
|
original: string;
|
|
1245
1610
|
}
|
|
1611
|
+
interface LocationAndQuantityNonNullableFields {
|
|
1612
|
+
_id: string;
|
|
1613
|
+
quantity: number;
|
|
1614
|
+
}
|
|
1246
1615
|
interface OrderLineItemNonNullableFields {
|
|
1247
1616
|
_id: string;
|
|
1248
1617
|
productName?: ProductNameNonNullableFields;
|
|
@@ -1264,6 +1633,7 @@ interface OrderLineItemNonNullableFields {
|
|
|
1264
1633
|
subscriptionInfo?: SubscriptionInfoNonNullableFields;
|
|
1265
1634
|
priceDescription?: PriceDescriptionNonNullableFields;
|
|
1266
1635
|
depositAmount?: PriceNonNullableFields;
|
|
1636
|
+
locations: LocationAndQuantityNonNullableFields[];
|
|
1267
1637
|
lineItemPrice?: PriceNonNullableFields;
|
|
1268
1638
|
}
|
|
1269
1639
|
interface BuyerInfoNonNullableFields {
|
|
@@ -1399,9 +1769,15 @@ export interface QuerySubscriptionContractsResponseNonNullableFields {
|
|
|
1399
1769
|
subscriptionContracts: SubscriptionContractNonNullableFields[];
|
|
1400
1770
|
}
|
|
1401
1771
|
export interface BaseEventMetadata {
|
|
1402
|
-
/**
|
|
1772
|
+
/**
|
|
1773
|
+
* App instance ID.
|
|
1774
|
+
* @format GUID
|
|
1775
|
+
*/
|
|
1403
1776
|
instanceId?: string | null;
|
|
1404
|
-
/**
|
|
1777
|
+
/**
|
|
1778
|
+
* Event type.
|
|
1779
|
+
* @maxLength 150
|
|
1780
|
+
*/
|
|
1405
1781
|
eventType?: string;
|
|
1406
1782
|
/** The identification type and identity data. */
|
|
1407
1783
|
identity?: IdentificationData;
|
|
@@ -1452,11 +1828,14 @@ export interface SubscriptionContractCreatedEnvelope {
|
|
|
1452
1828
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1453
1829
|
* @permissionScope Read eCommerce - all read permissions
|
|
1454
1830
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1831
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1832
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1455
1833
|
* @permissionScope Manage eCommerce - all permissions
|
|
1456
1834
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1457
1835
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1458
1836
|
* @webhook
|
|
1459
1837
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_created
|
|
1838
|
+
* @slug created
|
|
1460
1839
|
* @documentationMaturity preview
|
|
1461
1840
|
*/
|
|
1462
1841
|
export declare function onSubscriptionContractCreated(handler: (event: SubscriptionContractCreatedEnvelope) => void | Promise<void>): void;
|
|
@@ -1467,11 +1846,14 @@ export interface SubscriptionContractDeletedEnvelope {
|
|
|
1467
1846
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1468
1847
|
* @permissionScope Read eCommerce - all read permissions
|
|
1469
1848
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1849
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1850
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1470
1851
|
* @permissionScope Manage eCommerce - all permissions
|
|
1471
1852
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1472
1853
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1473
1854
|
* @webhook
|
|
1474
1855
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_deleted
|
|
1856
|
+
* @slug deleted
|
|
1475
1857
|
* @documentationMaturity preview
|
|
1476
1858
|
*/
|
|
1477
1859
|
export declare function onSubscriptionContractDeleted(handler: (event: SubscriptionContractDeletedEnvelope) => void | Promise<void>): void;
|
|
@@ -1483,11 +1865,14 @@ export interface SubscriptionContractUpdatedEnvelope {
|
|
|
1483
1865
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1484
1866
|
* @permissionScope Read eCommerce - all read permissions
|
|
1485
1867
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1868
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1869
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1486
1870
|
* @permissionScope Manage eCommerce - all permissions
|
|
1487
1871
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1488
1872
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1489
1873
|
* @webhook
|
|
1490
1874
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_updated
|
|
1875
|
+
* @slug updated
|
|
1491
1876
|
* @documentationMaturity preview
|
|
1492
1877
|
*/
|
|
1493
1878
|
export declare function onSubscriptionContractUpdated(handler: (event: SubscriptionContractUpdatedEnvelope) => void | Promise<void>): void;
|
|
@@ -1502,6 +1887,8 @@ export declare function onSubscriptionContractUpdated(handler: (event: Subscript
|
|
|
1502
1887
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1503
1888
|
* @permissionScope Read eCommerce - all read permissions
|
|
1504
1889
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1890
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1891
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1505
1892
|
* @permissionScope Manage eCommerce - all permissions
|
|
1506
1893
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1507
1894
|
* @applicableIdentity APP
|
|
@@ -1524,6 +1911,8 @@ export declare function getSubscriptionContract(subscriptionContractId: string):
|
|
|
1524
1911
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1525
1912
|
* @permissionScope Read eCommerce - all read permissions
|
|
1526
1913
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1914
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1915
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1527
1916
|
* @permissionScope Manage eCommerce - all permissions
|
|
1528
1917
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1529
1918
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|