@wix/auto_sdk_ecom_subscription-contracts 1.0.0 → 1.0.2
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 +457 -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 +478 -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 +457 -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 +478 -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 +457 -105
- 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 +492 -107
- 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 +457 -105
- 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 +492 -107
- 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
|
/**
|
|
@@ -214,6 +261,8 @@ export interface ProductName {
|
|
|
214
261
|
*
|
|
215
262
|
* Min: 1 character.
|
|
216
263
|
* Max: 200 characters.
|
|
264
|
+
* @minLength 1
|
|
265
|
+
* @maxLength 200
|
|
217
266
|
*/
|
|
218
267
|
original?: string;
|
|
219
268
|
/**
|
|
@@ -222,12 +271,18 @@ export interface ProductName {
|
|
|
222
271
|
* Min: 1 character.
|
|
223
272
|
* Max: 400 characters.
|
|
224
273
|
* Default: Same as `original`.
|
|
274
|
+
* @minLength 1
|
|
275
|
+
* @maxLength 400
|
|
225
276
|
*/
|
|
226
277
|
translated?: string | null;
|
|
227
278
|
}
|
|
228
279
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
229
280
|
export interface CatalogReference {
|
|
230
|
-
/**
|
|
281
|
+
/**
|
|
282
|
+
* ID of the item within the catalog it belongs to.
|
|
283
|
+
* @minLength 1
|
|
284
|
+
* @maxLength 36
|
|
285
|
+
*/
|
|
231
286
|
catalogItemId?: string;
|
|
232
287
|
/**
|
|
233
288
|
* ID of the app providing the catalog.
|
|
@@ -238,6 +293,7 @@ export interface CatalogReference {
|
|
|
238
293
|
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
239
294
|
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
240
295
|
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
296
|
+
* @minLength 1
|
|
241
297
|
*/
|
|
242
298
|
appId?: string;
|
|
243
299
|
/**
|
|
@@ -248,7 +304,10 @@ export interface CatalogReference {
|
|
|
248
304
|
options?: Record<string, any> | null;
|
|
249
305
|
}
|
|
250
306
|
export interface Price {
|
|
251
|
-
/**
|
|
307
|
+
/**
|
|
308
|
+
* Amount.
|
|
309
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
310
|
+
*/
|
|
252
311
|
amount?: string;
|
|
253
312
|
/**
|
|
254
313
|
* Amount formatted with currency symbol.
|
|
@@ -275,32 +334,44 @@ export interface DescriptionLineValueOneOf {
|
|
|
275
334
|
export interface DescriptionLineDescriptionLineValueOneOf {
|
|
276
335
|
}
|
|
277
336
|
export interface DescriptionLineName {
|
|
278
|
-
/**
|
|
337
|
+
/**
|
|
338
|
+
* 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).
|
|
339
|
+
* @maxLength 100
|
|
340
|
+
*/
|
|
279
341
|
original?: string;
|
|
280
342
|
/**
|
|
281
343
|
* Description line name translated into the buyer's language.
|
|
282
344
|
*
|
|
283
345
|
* Default: Same as `original`.
|
|
346
|
+
* @maxLength 200
|
|
284
347
|
*/
|
|
285
348
|
translated?: string | null;
|
|
286
349
|
}
|
|
287
350
|
export interface PlainTextValue {
|
|
288
|
-
/**
|
|
351
|
+
/**
|
|
352
|
+
* 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).
|
|
353
|
+
* @maxLength 600
|
|
354
|
+
*/
|
|
289
355
|
original?: string;
|
|
290
356
|
/**
|
|
291
357
|
* Description line plain text value translated into the buyer's language.
|
|
292
358
|
*
|
|
293
359
|
* Default: Same as `original`.
|
|
360
|
+
* @maxLength 600
|
|
294
361
|
*/
|
|
295
362
|
translated?: string | null;
|
|
296
363
|
}
|
|
297
364
|
export interface Color {
|
|
298
|
-
/**
|
|
365
|
+
/**
|
|
366
|
+
* 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).
|
|
367
|
+
* @maxLength 500
|
|
368
|
+
*/
|
|
299
369
|
original?: string;
|
|
300
370
|
/**
|
|
301
371
|
* Description line color name translated into the buyer's language.
|
|
302
372
|
*
|
|
303
373
|
* Default: Same as `original`.
|
|
374
|
+
* @maxLength 500
|
|
304
375
|
*/
|
|
305
376
|
translated?: string | null;
|
|
306
377
|
/** HEX or RGB color code for display. */
|
|
@@ -327,7 +398,10 @@ export interface FocalPoint {
|
|
|
327
398
|
export interface PhysicalProperties {
|
|
328
399
|
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
329
400
|
weight?: number | null;
|
|
330
|
-
/**
|
|
401
|
+
/**
|
|
402
|
+
* Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
|
|
403
|
+
* @maxLength 40
|
|
404
|
+
*/
|
|
331
405
|
sku?: string | null;
|
|
332
406
|
/** Whether this line item is shippable. */
|
|
333
407
|
shippable?: boolean;
|
|
@@ -368,7 +442,10 @@ export declare enum PaymentOptionType {
|
|
|
368
442
|
export interface ItemTaxFullDetails {
|
|
369
443
|
/** Taxable amount of this line item. */
|
|
370
444
|
taxableAmount?: Price;
|
|
371
|
-
/**
|
|
445
|
+
/**
|
|
446
|
+
* Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`.
|
|
447
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
448
|
+
*/
|
|
372
449
|
taxRate?: string;
|
|
373
450
|
/** The calculated tax, based on the `taxableAmount` and `taxRate`. */
|
|
374
451
|
totalTax?: Price;
|
|
@@ -378,16 +455,24 @@ export interface LineItemTaxInfo {
|
|
|
378
455
|
taxAmount?: Price;
|
|
379
456
|
/** Amount for which tax is calculated. */
|
|
380
457
|
taxableAmount?: Price;
|
|
381
|
-
/**
|
|
458
|
+
/**
|
|
459
|
+
* Tax rate %, as a decimal point.
|
|
460
|
+
* @format DECIMAL_VALUE
|
|
461
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
462
|
+
*/
|
|
382
463
|
taxRate?: string | null;
|
|
383
464
|
/**
|
|
384
465
|
* Tax group ID.
|
|
385
466
|
* Learn more about [Tax Groups](https://dev.wix.com/docs/rest/business-management/payments/tax/tax-groups/introduction).
|
|
467
|
+
* @format GUID
|
|
386
468
|
*/
|
|
387
469
|
taxGroupId?: string | null;
|
|
388
470
|
/** Indicates whether the price already includes tax. */
|
|
389
471
|
taxIncludedInPrice?: boolean;
|
|
390
|
-
/**
|
|
472
|
+
/**
|
|
473
|
+
* Tax information for a line item.
|
|
474
|
+
* @maxSize 7
|
|
475
|
+
*/
|
|
391
476
|
taxBreakdown?: LineItemTaxBreakdown[];
|
|
392
477
|
}
|
|
393
478
|
/**
|
|
@@ -395,17 +480,28 @@ export interface LineItemTaxInfo {
|
|
|
395
480
|
* It holds the tax amount and the tax rate for each tax authority that apply on the line item.
|
|
396
481
|
*/
|
|
397
482
|
export interface LineItemTaxBreakdown {
|
|
398
|
-
/**
|
|
483
|
+
/**
|
|
484
|
+
* Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec".
|
|
485
|
+
* @maxLength 200
|
|
486
|
+
*/
|
|
399
487
|
jurisdiction?: string | null;
|
|
400
|
-
/**
|
|
488
|
+
/**
|
|
489
|
+
* Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000.
|
|
490
|
+
* @format DECIMAL_VALUE
|
|
491
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
492
|
+
*/
|
|
401
493
|
rate?: string | null;
|
|
402
494
|
/** Amount of tax calculated for this line item. */
|
|
403
495
|
taxAmount?: Price;
|
|
404
|
-
/**
|
|
496
|
+
/**
|
|
497
|
+
* The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
|
|
498
|
+
* @maxLength 200
|
|
499
|
+
*/
|
|
405
500
|
taxType?: string | null;
|
|
406
501
|
/**
|
|
407
502
|
* The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
408
503
|
* This name should be explicit enough to allow the merchant to understand what tax was calculated.
|
|
504
|
+
* @maxLength 200
|
|
409
505
|
*/
|
|
410
506
|
taxName?: string | null;
|
|
411
507
|
/** Type of jurisdiction that taxes were calculated for. */
|
|
@@ -425,9 +521,18 @@ export declare enum JurisdictionType {
|
|
|
425
521
|
SPECIAL = "SPECIAL"
|
|
426
522
|
}
|
|
427
523
|
export interface DigitalFile {
|
|
428
|
-
/**
|
|
524
|
+
/**
|
|
525
|
+
* ID of the secure file in media.
|
|
526
|
+
* @minLength 1
|
|
527
|
+
* @maxLength 100
|
|
528
|
+
*/
|
|
429
529
|
fileId?: string;
|
|
430
|
-
/**
|
|
530
|
+
/**
|
|
531
|
+
* Link will exist after the digital links have been generated on the order.
|
|
532
|
+
* @format WEB_URL
|
|
533
|
+
* @minLength 1
|
|
534
|
+
* @maxLength 2000
|
|
535
|
+
*/
|
|
431
536
|
link?: string | null;
|
|
432
537
|
/**
|
|
433
538
|
* Link expiration time and date.
|
|
@@ -436,25 +541,48 @@ export interface DigitalFile {
|
|
|
436
541
|
expirationDate?: Date | null;
|
|
437
542
|
}
|
|
438
543
|
export interface SubscriptionInfo {
|
|
439
|
-
/**
|
|
544
|
+
/**
|
|
545
|
+
* Subscription ID.
|
|
546
|
+
* @format GUID
|
|
547
|
+
*/
|
|
440
548
|
_id?: string | null;
|
|
441
|
-
/**
|
|
549
|
+
/**
|
|
550
|
+
* Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`.
|
|
551
|
+
* @min 1
|
|
552
|
+
*/
|
|
442
553
|
cycleNumber?: number;
|
|
443
|
-
/**
|
|
554
|
+
/**
|
|
555
|
+
* Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
556
|
+
* @minLength 1
|
|
557
|
+
* @maxLength 20
|
|
558
|
+
*/
|
|
444
559
|
subscriptionOptionTitle?: string;
|
|
445
|
-
/**
|
|
560
|
+
/**
|
|
561
|
+
* Subscription option description. For example, `"1kg of selected coffee, once a month"`.
|
|
562
|
+
* @maxLength 60
|
|
563
|
+
*/
|
|
446
564
|
subscriptionOptionDescription?: string | null;
|
|
447
|
-
/**
|
|
565
|
+
/**
|
|
566
|
+
* Subscription detailed information.
|
|
567
|
+
* @immutable
|
|
568
|
+
*/
|
|
448
569
|
subscriptionSettings?: SubscriptionSettings;
|
|
449
570
|
}
|
|
450
571
|
export interface SubscriptionSettings {
|
|
451
572
|
/** Frequency of recurring payment. */
|
|
452
573
|
frequency?: V2SubscriptionFrequency;
|
|
453
|
-
/**
|
|
574
|
+
/**
|
|
575
|
+
* Interval of recurring payment.
|
|
576
|
+
* @min 1
|
|
577
|
+
* @max 50
|
|
578
|
+
*/
|
|
454
579
|
interval?: number | null;
|
|
455
580
|
/** Whether subscription is renewed automatically at the end of each period. */
|
|
456
581
|
autoRenewal?: boolean;
|
|
457
|
-
/**
|
|
582
|
+
/**
|
|
583
|
+
* Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
|
|
584
|
+
* @min 1
|
|
585
|
+
*/
|
|
458
586
|
billingCycles?: number | null;
|
|
459
587
|
}
|
|
460
588
|
/** Frequency unit of recurring payment */
|
|
@@ -468,29 +596,47 @@ export declare enum V2SubscriptionFrequency {
|
|
|
468
596
|
export interface FreeTrialPeriod {
|
|
469
597
|
/** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
|
|
470
598
|
frequency?: V2SubscriptionFrequency;
|
|
471
|
-
/**
|
|
599
|
+
/**
|
|
600
|
+
* interval of period
|
|
601
|
+
* @min 1
|
|
602
|
+
* @max 50
|
|
603
|
+
*/
|
|
472
604
|
interval?: number;
|
|
473
605
|
}
|
|
474
606
|
export interface PriceDescription {
|
|
475
|
-
/**
|
|
607
|
+
/**
|
|
608
|
+
* __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).
|
|
609
|
+
* @minLength 1
|
|
610
|
+
* @maxLength 100
|
|
611
|
+
*/
|
|
476
612
|
original?: string;
|
|
477
613
|
/**
|
|
478
614
|
* Price description translated into the buyer's language.
|
|
479
615
|
*
|
|
480
616
|
* Default: Same as `original`.
|
|
617
|
+
* @minLength 1
|
|
618
|
+
* @maxLength 100
|
|
481
619
|
*/
|
|
482
620
|
translated?: string | null;
|
|
483
621
|
}
|
|
484
622
|
export interface LocationAndQuantity {
|
|
485
|
-
/**
|
|
623
|
+
/**
|
|
624
|
+
* Location id in the associated owner app.
|
|
625
|
+
* @format GUID
|
|
626
|
+
*/
|
|
486
627
|
_id?: string;
|
|
487
628
|
/**
|
|
488
629
|
* Location owner app, if not provided then the site business info locations will be used.
|
|
630
|
+
* @format GUID
|
|
489
631
|
* @deprecated Location owner app, if not provided then the site business info locations will be used.
|
|
490
632
|
* @targetRemovalDate 2025-03-01
|
|
491
633
|
*/
|
|
492
634
|
appId?: string | null;
|
|
493
|
-
/**
|
|
635
|
+
/**
|
|
636
|
+
* Quantity for specific location.
|
|
637
|
+
* @min 1
|
|
638
|
+
* @max 100000
|
|
639
|
+
*/
|
|
494
640
|
quantity?: number;
|
|
495
641
|
}
|
|
496
642
|
export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
|
|
@@ -521,20 +667,38 @@ export interface ExtendedFields {
|
|
|
521
667
|
}
|
|
522
668
|
/** Buyer Info */
|
|
523
669
|
export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
524
|
-
/**
|
|
670
|
+
/**
|
|
671
|
+
* Visitor ID (if site visitor is not a member).
|
|
672
|
+
* @format GUID
|
|
673
|
+
*/
|
|
525
674
|
visitorId?: string;
|
|
526
|
-
/**
|
|
675
|
+
/**
|
|
676
|
+
* Member ID (if site visitor is a site member).
|
|
677
|
+
* @format GUID
|
|
678
|
+
*/
|
|
527
679
|
memberId?: string;
|
|
528
|
-
/**
|
|
680
|
+
/**
|
|
681
|
+
* 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).
|
|
682
|
+
* @format GUID
|
|
683
|
+
*/
|
|
529
684
|
contactId?: string | null;
|
|
530
|
-
/**
|
|
685
|
+
/**
|
|
686
|
+
* Buyer email address.
|
|
687
|
+
* @format EMAIL
|
|
688
|
+
*/
|
|
531
689
|
email?: string | null;
|
|
532
690
|
}
|
|
533
691
|
/** @oneof */
|
|
534
692
|
export interface BuyerInfoIdOneOf {
|
|
535
|
-
/**
|
|
693
|
+
/**
|
|
694
|
+
* Visitor ID (if site visitor is not a member).
|
|
695
|
+
* @format GUID
|
|
696
|
+
*/
|
|
536
697
|
visitorId?: string;
|
|
537
|
-
/**
|
|
698
|
+
/**
|
|
699
|
+
* Member ID (if site visitor is a site member).
|
|
700
|
+
* @format GUID
|
|
701
|
+
*/
|
|
538
702
|
memberId?: string;
|
|
539
703
|
}
|
|
540
704
|
export declare enum WeightUnit {
|
|
@@ -568,19 +732,37 @@ export interface AddressWithContact {
|
|
|
568
732
|
}
|
|
569
733
|
/** Physical address */
|
|
570
734
|
export interface Address {
|
|
571
|
-
/**
|
|
735
|
+
/**
|
|
736
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
737
|
+
* @format COUNTRY
|
|
738
|
+
*/
|
|
572
739
|
country?: string | null;
|
|
573
|
-
/**
|
|
740
|
+
/**
|
|
741
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
742
|
+
* @maxLength 50
|
|
743
|
+
*/
|
|
574
744
|
subdivision?: string | null;
|
|
575
|
-
/**
|
|
745
|
+
/**
|
|
746
|
+
* City name.
|
|
747
|
+
* @maxLength 50
|
|
748
|
+
*/
|
|
576
749
|
city?: string | null;
|
|
577
|
-
/**
|
|
750
|
+
/**
|
|
751
|
+
* Postal or zip code.
|
|
752
|
+
* @maxLength 50
|
|
753
|
+
*/
|
|
578
754
|
postalCode?: string | null;
|
|
579
755
|
/** Street address. */
|
|
580
756
|
streetAddress?: StreetAddress;
|
|
581
|
-
/**
|
|
757
|
+
/**
|
|
758
|
+
* Main address line (usually street name and number).
|
|
759
|
+
* @maxLength 150
|
|
760
|
+
*/
|
|
582
761
|
addressLine1?: string | null;
|
|
583
|
-
/**
|
|
762
|
+
/**
|
|
763
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
764
|
+
* @maxLength 100
|
|
765
|
+
*/
|
|
584
766
|
addressLine2?: string | null;
|
|
585
767
|
/**
|
|
586
768
|
* Country's full name.
|
|
@@ -607,13 +789,25 @@ export interface AddressLocation {
|
|
|
607
789
|
}
|
|
608
790
|
/** Full contact details for an address */
|
|
609
791
|
export interface FullAddressContactDetails {
|
|
610
|
-
/**
|
|
792
|
+
/**
|
|
793
|
+
* First name.
|
|
794
|
+
* @maxLength 100
|
|
795
|
+
*/
|
|
611
796
|
firstName?: string | null;
|
|
612
|
-
/**
|
|
797
|
+
/**
|
|
798
|
+
* Last name.
|
|
799
|
+
* @maxLength 100
|
|
800
|
+
*/
|
|
613
801
|
lastName?: string | null;
|
|
614
|
-
/**
|
|
802
|
+
/**
|
|
803
|
+
* Phone number.
|
|
804
|
+
* @format PHONE
|
|
805
|
+
*/
|
|
615
806
|
phone?: string | null;
|
|
616
|
-
/**
|
|
807
|
+
/**
|
|
808
|
+
* Company name.
|
|
809
|
+
* @maxLength 1000
|
|
810
|
+
*/
|
|
617
811
|
company?: string | null;
|
|
618
812
|
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
619
813
|
vatId?: VatId;
|
|
@@ -639,13 +833,22 @@ export declare enum VatType {
|
|
|
639
833
|
CNPJ = "CNPJ"
|
|
640
834
|
}
|
|
641
835
|
export interface ShippingInformation {
|
|
642
|
-
/**
|
|
836
|
+
/**
|
|
837
|
+
* App Def Id of external provider which was a source of shipping info
|
|
838
|
+
* @minLength 1
|
|
839
|
+
* @maxLength 100
|
|
840
|
+
*/
|
|
643
841
|
carrierId?: string | null;
|
|
644
|
-
/**
|
|
842
|
+
/**
|
|
843
|
+
* Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`.
|
|
844
|
+
* @minLength 1
|
|
845
|
+
* @maxLength 100
|
|
846
|
+
*/
|
|
645
847
|
code?: string | null;
|
|
646
848
|
/**
|
|
647
849
|
* Shipping option title.
|
|
648
850
|
* For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`.
|
|
851
|
+
* @maxLength 250
|
|
649
852
|
*/
|
|
650
853
|
title?: string;
|
|
651
854
|
/** Shipping logistics. */
|
|
@@ -660,9 +863,15 @@ export interface DeliveryLogistics extends DeliveryLogisticsAddressOneOf {
|
|
|
660
863
|
shippingDestination?: AddressWithContact;
|
|
661
864
|
/** Pickup details. */
|
|
662
865
|
pickupDetails?: PickupDetails;
|
|
663
|
-
/**
|
|
866
|
+
/**
|
|
867
|
+
* Expected delivery time in free text. For example, `"3-5 business days"`.
|
|
868
|
+
* @maxLength 500
|
|
869
|
+
*/
|
|
664
870
|
deliveryTime?: string | null;
|
|
665
|
-
/**
|
|
871
|
+
/**
|
|
872
|
+
* Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`.
|
|
873
|
+
* @maxLength 1000
|
|
874
|
+
*/
|
|
666
875
|
instructions?: string | null;
|
|
667
876
|
/**
|
|
668
877
|
* 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 +896,37 @@ export interface PickupDetails {
|
|
|
687
896
|
}
|
|
688
897
|
/** Physical address */
|
|
689
898
|
export interface PickupAddress {
|
|
690
|
-
/**
|
|
899
|
+
/**
|
|
900
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
901
|
+
* @format COUNTRY
|
|
902
|
+
*/
|
|
691
903
|
country?: string | null;
|
|
692
|
-
/**
|
|
904
|
+
/**
|
|
905
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
906
|
+
* @maxLength 50
|
|
907
|
+
*/
|
|
693
908
|
subdivision?: string | null;
|
|
694
|
-
/**
|
|
909
|
+
/**
|
|
910
|
+
* City name.
|
|
911
|
+
* @maxLength 1000
|
|
912
|
+
*/
|
|
695
913
|
city?: string | null;
|
|
696
|
-
/**
|
|
914
|
+
/**
|
|
915
|
+
* Postal or zip code.
|
|
916
|
+
* @maxLength 1000
|
|
917
|
+
*/
|
|
697
918
|
postalCode?: string | null;
|
|
698
919
|
/** Street address object, with number, name, and apartment number in separate fields. */
|
|
699
920
|
streetAddress?: StreetAddress;
|
|
700
|
-
/**
|
|
921
|
+
/**
|
|
922
|
+
* Main address line (usually street name and number).
|
|
923
|
+
* @maxLength 1000
|
|
924
|
+
*/
|
|
701
925
|
addressLine1?: string | null;
|
|
702
|
-
/**
|
|
926
|
+
/**
|
|
927
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
928
|
+
* @maxLength 1000
|
|
929
|
+
*/
|
|
703
930
|
addressLine2?: string | null;
|
|
704
931
|
/**
|
|
705
932
|
* Country's full name.
|
|
@@ -745,13 +972,19 @@ export interface ShippingPrice {
|
|
|
745
972
|
discount?: Price;
|
|
746
973
|
}
|
|
747
974
|
export interface ShippingRegion {
|
|
748
|
-
/**
|
|
975
|
+
/**
|
|
976
|
+
* Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`.
|
|
977
|
+
* @maxLength 100
|
|
978
|
+
*/
|
|
749
979
|
name?: string | null;
|
|
750
980
|
}
|
|
751
981
|
export interface OrderTaxInfo {
|
|
752
982
|
/** Calculated tax, added from line items. */
|
|
753
983
|
totalTax?: Price;
|
|
754
|
-
/**
|
|
984
|
+
/**
|
|
985
|
+
* 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.
|
|
986
|
+
* @maxSize 50
|
|
987
|
+
*/
|
|
755
988
|
taxBreakdown?: OrderTaxBreakdown[];
|
|
756
989
|
/**
|
|
757
990
|
* Whether the order is exempt from tax calculations.
|
|
@@ -766,15 +999,28 @@ export interface OrderTaxInfo {
|
|
|
766
999
|
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
767
1000
|
*/
|
|
768
1001
|
export interface OrderTaxBreakdown {
|
|
769
|
-
/**
|
|
1002
|
+
/**
|
|
1003
|
+
* The name of the tax against which this tax amount was calculated.
|
|
1004
|
+
* @maxLength 200
|
|
1005
|
+
*/
|
|
770
1006
|
taxName?: string;
|
|
771
|
-
/**
|
|
1007
|
+
/**
|
|
1008
|
+
* The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
|
|
1009
|
+
* @maxLength 200
|
|
1010
|
+
*/
|
|
772
1011
|
taxType?: string;
|
|
773
|
-
/**
|
|
1012
|
+
/**
|
|
1013
|
+
* The name of the jurisdiction in which this tax detail applies.
|
|
1014
|
+
* @maxLength 200
|
|
1015
|
+
*/
|
|
774
1016
|
jurisdiction?: string;
|
|
775
1017
|
/** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
776
1018
|
jurisdictionType?: JurisdictionType;
|
|
777
|
-
/**
|
|
1019
|
+
/**
|
|
1020
|
+
* The rate at which this tax detail was calculated.
|
|
1021
|
+
* @format DECIMAL_VALUE
|
|
1022
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
1023
|
+
*/
|
|
778
1024
|
rate?: string;
|
|
779
1025
|
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
780
1026
|
aggregatedTaxAmount?: Price;
|
|
@@ -796,13 +1042,19 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
796
1042
|
/**
|
|
797
1043
|
* IDs of line items discount applies to.
|
|
798
1044
|
* Deprecated. Use `line_item_discounts` instead.
|
|
1045
|
+
* @format GUID
|
|
1046
|
+
* @maxSize 1
|
|
799
1047
|
* @deprecated IDs of line items discount applies to.
|
|
800
1048
|
* Deprecated. Use `line_item_discounts` instead.
|
|
801
1049
|
* @replacedBy line_item_discounts
|
|
802
1050
|
* @targetRemovalDate 2024-10-30
|
|
803
1051
|
*/
|
|
804
1052
|
lineItemIds?: string[];
|
|
805
|
-
/**
|
|
1053
|
+
/**
|
|
1054
|
+
* Discount id.
|
|
1055
|
+
* @format GUID
|
|
1056
|
+
* @immutable
|
|
1057
|
+
*/
|
|
806
1058
|
_id?: string | null;
|
|
807
1059
|
}
|
|
808
1060
|
/** @oneof */
|
|
@@ -836,7 +1088,10 @@ export interface MerchantDiscount extends MerchantDiscountMerchantDiscountReason
|
|
|
836
1088
|
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
837
1089
|
*/
|
|
838
1090
|
discountReason?: DiscountReason;
|
|
839
|
-
/**
|
|
1091
|
+
/**
|
|
1092
|
+
* Discount description as free text (optional).
|
|
1093
|
+
* @maxLength 200
|
|
1094
|
+
*/
|
|
840
1095
|
description?: string | null;
|
|
841
1096
|
/** Discount amount. */
|
|
842
1097
|
amount?: Price;
|
|
@@ -848,7 +1103,10 @@ export interface MerchantDiscountMerchantDiscountReasonOneOf {
|
|
|
848
1103
|
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
849
1104
|
*/
|
|
850
1105
|
discountReason?: DiscountReason;
|
|
851
|
-
/**
|
|
1106
|
+
/**
|
|
1107
|
+
* Discount description as free text (optional).
|
|
1108
|
+
* @maxLength 200
|
|
1109
|
+
*/
|
|
852
1110
|
description?: string | null;
|
|
853
1111
|
}
|
|
854
1112
|
export declare enum DiscountReason {
|
|
@@ -856,7 +1114,10 @@ export declare enum DiscountReason {
|
|
|
856
1114
|
EXCHANGED_ITEMS = "EXCHANGED_ITEMS"
|
|
857
1115
|
}
|
|
858
1116
|
export interface DiscountRule {
|
|
859
|
-
/**
|
|
1117
|
+
/**
|
|
1118
|
+
* Discount rule ID
|
|
1119
|
+
* @format GUID
|
|
1120
|
+
*/
|
|
860
1121
|
_id?: string;
|
|
861
1122
|
/** Discount rule name */
|
|
862
1123
|
name?: DiscountRuleName;
|
|
@@ -864,13 +1125,24 @@ export interface DiscountRule {
|
|
|
864
1125
|
amount?: Price;
|
|
865
1126
|
}
|
|
866
1127
|
export interface DiscountRuleName {
|
|
867
|
-
/**
|
|
1128
|
+
/**
|
|
1129
|
+
* Original discount rule name (in site's default language).
|
|
1130
|
+
* @minLength 1
|
|
1131
|
+
* @maxLength 256
|
|
1132
|
+
*/
|
|
868
1133
|
original?: string;
|
|
869
|
-
/**
|
|
1134
|
+
/**
|
|
1135
|
+
* Translated discount rule name according to buyer language. Defaults to `original` when not provided.
|
|
1136
|
+
* @minLength 1
|
|
1137
|
+
* @maxLength 500
|
|
1138
|
+
*/
|
|
870
1139
|
translated?: string | null;
|
|
871
1140
|
}
|
|
872
1141
|
export interface LineItemDiscount {
|
|
873
|
-
/**
|
|
1142
|
+
/**
|
|
1143
|
+
* ID of line item the discount applies to.
|
|
1144
|
+
* @format GUID
|
|
1145
|
+
*/
|
|
874
1146
|
_id?: string;
|
|
875
1147
|
/** Total discount for this line item. */
|
|
876
1148
|
totalDiscount?: Price;
|
|
@@ -878,9 +1150,15 @@ export interface LineItemDiscount {
|
|
|
878
1150
|
export interface ChannelInfo {
|
|
879
1151
|
/** Sales channel that submitted the order. */
|
|
880
1152
|
type?: ChannelType;
|
|
881
|
-
/**
|
|
1153
|
+
/**
|
|
1154
|
+
* Reference to an order ID from an external system.
|
|
1155
|
+
* @maxLength 100
|
|
1156
|
+
*/
|
|
882
1157
|
externalOrderId?: string | null;
|
|
883
|
-
/**
|
|
1158
|
+
/**
|
|
1159
|
+
* URL to the order in the external system.
|
|
1160
|
+
* @maxLength 300
|
|
1161
|
+
*/
|
|
884
1162
|
externalOrderUrl?: string | null;
|
|
885
1163
|
}
|
|
886
1164
|
export declare enum ChannelType {
|
|
@@ -920,31 +1198,55 @@ export declare enum ChannelType {
|
|
|
920
1198
|
export interface CustomField {
|
|
921
1199
|
/** Custom field value. */
|
|
922
1200
|
value?: any;
|
|
923
|
-
/**
|
|
1201
|
+
/**
|
|
1202
|
+
* Custom field title.
|
|
1203
|
+
* @minLength 1
|
|
1204
|
+
* @maxLength 500
|
|
1205
|
+
*/
|
|
924
1206
|
title?: string;
|
|
925
|
-
/**
|
|
1207
|
+
/**
|
|
1208
|
+
* Translated custom field title.
|
|
1209
|
+
* @minLength 1
|
|
1210
|
+
* @maxLength 500
|
|
1211
|
+
*/
|
|
926
1212
|
translatedTitle?: string | null;
|
|
927
1213
|
}
|
|
928
1214
|
export interface AdditionalFee {
|
|
929
|
-
/**
|
|
1215
|
+
/**
|
|
1216
|
+
* Additional fee's unique code for future processing.
|
|
1217
|
+
* @minLength 1
|
|
1218
|
+
* @maxLength 100
|
|
1219
|
+
*/
|
|
930
1220
|
code?: string | null;
|
|
931
|
-
/**
|
|
1221
|
+
/**
|
|
1222
|
+
* Name of additional fee.
|
|
1223
|
+
* @minLength 1
|
|
1224
|
+
* @maxLength 50
|
|
1225
|
+
*/
|
|
932
1226
|
name?: string;
|
|
933
1227
|
/** Additional fee's price. */
|
|
934
1228
|
price?: Price;
|
|
935
1229
|
/** Tax details. */
|
|
936
1230
|
taxDetails?: ItemTaxFullDetails;
|
|
937
|
-
/**
|
|
1231
|
+
/**
|
|
1232
|
+
* SPI implementer's `appId`.
|
|
1233
|
+
* @format GUID
|
|
1234
|
+
*/
|
|
938
1235
|
providerAppId?: string | null;
|
|
939
1236
|
/** Additional fee's price before tax. */
|
|
940
1237
|
priceBeforeTax?: Price;
|
|
941
1238
|
/** Additional fee's price after tax. */
|
|
942
1239
|
priceAfterTax?: Price;
|
|
943
|
-
/**
|
|
1240
|
+
/**
|
|
1241
|
+
* Additional fee's id.
|
|
1242
|
+
* @format GUID
|
|
1243
|
+
* @immutable
|
|
1244
|
+
*/
|
|
944
1245
|
_id?: string;
|
|
945
1246
|
/**
|
|
946
1247
|
* Optional - Line items associated with this additional fee.
|
|
947
1248
|
* If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
|
|
1249
|
+
* @format GUID
|
|
948
1250
|
*/
|
|
949
1251
|
lineItemIds?: string[];
|
|
950
1252
|
}
|
|
@@ -952,10 +1254,13 @@ export interface Location {
|
|
|
952
1254
|
/**
|
|
953
1255
|
* Location ID.
|
|
954
1256
|
* Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
1257
|
+
* @format GUID
|
|
955
1258
|
*/
|
|
956
1259
|
_id?: string;
|
|
957
1260
|
/**
|
|
958
1261
|
* Location name.
|
|
1262
|
+
* @minLength 1
|
|
1263
|
+
* @maxLength 500
|
|
959
1264
|
* @readonly
|
|
960
1265
|
*/
|
|
961
1266
|
name?: string;
|
|
@@ -969,7 +1274,10 @@ export interface CreateSubscriptionContractResponse {
|
|
|
969
1274
|
subscriptionContract?: SubscriptionContract;
|
|
970
1275
|
}
|
|
971
1276
|
export interface GetSubscriptionContractRequest {
|
|
972
|
-
/**
|
|
1277
|
+
/**
|
|
1278
|
+
* ID of the SubscriptionContract to retrieve.
|
|
1279
|
+
* @format GUID
|
|
1280
|
+
*/
|
|
973
1281
|
subscriptionContractId: string;
|
|
974
1282
|
}
|
|
975
1283
|
export interface GetSubscriptionContractResponse {
|
|
@@ -1005,6 +1313,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
1005
1313
|
* Sort object in the following format:
|
|
1006
1314
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1007
1315
|
* Learn more about the [sort format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1316
|
+
* @maxSize 5
|
|
1008
1317
|
*/
|
|
1009
1318
|
sort?: Sorting[];
|
|
1010
1319
|
}
|
|
@@ -1014,7 +1323,10 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
1014
1323
|
cursorPaging?: CursorPaging;
|
|
1015
1324
|
}
|
|
1016
1325
|
export interface Sorting {
|
|
1017
|
-
/**
|
|
1326
|
+
/**
|
|
1327
|
+
* Name of the field to sort by.
|
|
1328
|
+
* @maxLength 512
|
|
1329
|
+
*/
|
|
1018
1330
|
fieldName?: string;
|
|
1019
1331
|
/** Sort order. */
|
|
1020
1332
|
order?: SortOrder;
|
|
@@ -1024,13 +1336,17 @@ export declare enum SortOrder {
|
|
|
1024
1336
|
DESC = "DESC"
|
|
1025
1337
|
}
|
|
1026
1338
|
export interface CursorPaging {
|
|
1027
|
-
/**
|
|
1339
|
+
/**
|
|
1340
|
+
* Maximum number of items to return in the results.
|
|
1341
|
+
* @max 100
|
|
1342
|
+
*/
|
|
1028
1343
|
limit?: number | null;
|
|
1029
1344
|
/**
|
|
1030
1345
|
* Pointer to the next or previous page in the list of results.
|
|
1031
1346
|
*
|
|
1032
1347
|
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1033
1348
|
* Not relevant for the first request.
|
|
1349
|
+
* @maxLength 16000
|
|
1034
1350
|
*/
|
|
1035
1351
|
cursor?: string | null;
|
|
1036
1352
|
}
|
|
@@ -1054,9 +1370,15 @@ export interface CursorPagingMetadata {
|
|
|
1054
1370
|
hasNext?: boolean | null;
|
|
1055
1371
|
}
|
|
1056
1372
|
export interface Cursors {
|
|
1057
|
-
/**
|
|
1373
|
+
/**
|
|
1374
|
+
* Cursor string pointing to the next page in the list of results.
|
|
1375
|
+
* @maxLength 16000
|
|
1376
|
+
*/
|
|
1058
1377
|
next?: string | null;
|
|
1059
|
-
/**
|
|
1378
|
+
/**
|
|
1379
|
+
* Cursor pointing to the previous page in the list of results.
|
|
1380
|
+
* @maxLength 16000
|
|
1381
|
+
*/
|
|
1060
1382
|
prev?: string | null;
|
|
1061
1383
|
}
|
|
1062
1384
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -1132,9 +1454,15 @@ export interface ActionEvent {
|
|
|
1132
1454
|
export interface Empty {
|
|
1133
1455
|
}
|
|
1134
1456
|
export interface MessageEnvelope {
|
|
1135
|
-
/**
|
|
1457
|
+
/**
|
|
1458
|
+
* App instance ID.
|
|
1459
|
+
* @format GUID
|
|
1460
|
+
*/
|
|
1136
1461
|
instanceId?: string | null;
|
|
1137
|
-
/**
|
|
1462
|
+
/**
|
|
1463
|
+
* Event type.
|
|
1464
|
+
* @maxLength 150
|
|
1465
|
+
*/
|
|
1138
1466
|
eventType?: string;
|
|
1139
1467
|
/** The identification type and identity data. */
|
|
1140
1468
|
identity?: IdentificationData;
|
|
@@ -1142,26 +1470,50 @@ export interface MessageEnvelope {
|
|
|
1142
1470
|
data?: string;
|
|
1143
1471
|
}
|
|
1144
1472
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1145
|
-
/**
|
|
1473
|
+
/**
|
|
1474
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1475
|
+
* @format GUID
|
|
1476
|
+
*/
|
|
1146
1477
|
anonymousVisitorId?: string;
|
|
1147
|
-
/**
|
|
1478
|
+
/**
|
|
1479
|
+
* ID of a site visitor that has logged in to the site.
|
|
1480
|
+
* @format GUID
|
|
1481
|
+
*/
|
|
1148
1482
|
memberId?: string;
|
|
1149
|
-
/**
|
|
1483
|
+
/**
|
|
1484
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1485
|
+
* @format GUID
|
|
1486
|
+
*/
|
|
1150
1487
|
wixUserId?: string;
|
|
1151
|
-
/**
|
|
1488
|
+
/**
|
|
1489
|
+
* ID of an app.
|
|
1490
|
+
* @format GUID
|
|
1491
|
+
*/
|
|
1152
1492
|
appId?: string;
|
|
1153
1493
|
/** @readonly */
|
|
1154
1494
|
identityType?: WebhookIdentityType;
|
|
1155
1495
|
}
|
|
1156
1496
|
/** @oneof */
|
|
1157
1497
|
export interface IdentificationDataIdOneOf {
|
|
1158
|
-
/**
|
|
1498
|
+
/**
|
|
1499
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1500
|
+
* @format GUID
|
|
1501
|
+
*/
|
|
1159
1502
|
anonymousVisitorId?: string;
|
|
1160
|
-
/**
|
|
1503
|
+
/**
|
|
1504
|
+
* ID of a site visitor that has logged in to the site.
|
|
1505
|
+
* @format GUID
|
|
1506
|
+
*/
|
|
1161
1507
|
memberId?: string;
|
|
1162
|
-
/**
|
|
1508
|
+
/**
|
|
1509
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1510
|
+
* @format GUID
|
|
1511
|
+
*/
|
|
1163
1512
|
wixUserId?: string;
|
|
1164
|
-
/**
|
|
1513
|
+
/**
|
|
1514
|
+
* ID of an app.
|
|
1515
|
+
* @format GUID
|
|
1516
|
+
*/
|
|
1165
1517
|
appId?: string;
|
|
1166
1518
|
}
|
|
1167
1519
|
export declare enum WebhookIdentityType {
|
|
@@ -1399,9 +1751,15 @@ export interface QuerySubscriptionContractsResponseNonNullableFields {
|
|
|
1399
1751
|
subscriptionContracts: SubscriptionContractNonNullableFields[];
|
|
1400
1752
|
}
|
|
1401
1753
|
export interface BaseEventMetadata {
|
|
1402
|
-
/**
|
|
1754
|
+
/**
|
|
1755
|
+
* App instance ID.
|
|
1756
|
+
* @format GUID
|
|
1757
|
+
*/
|
|
1403
1758
|
instanceId?: string | null;
|
|
1404
|
-
/**
|
|
1759
|
+
/**
|
|
1760
|
+
* Event type.
|
|
1761
|
+
* @maxLength 150
|
|
1762
|
+
*/
|
|
1405
1763
|
eventType?: string;
|
|
1406
1764
|
/** The identification type and identity data. */
|
|
1407
1765
|
identity?: IdentificationData;
|
|
@@ -1452,11 +1810,14 @@ export interface SubscriptionContractCreatedEnvelope {
|
|
|
1452
1810
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1453
1811
|
* @permissionScope Read eCommerce - all read permissions
|
|
1454
1812
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1813
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1814
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1455
1815
|
* @permissionScope Manage eCommerce - all permissions
|
|
1456
1816
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1457
1817
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1458
1818
|
* @webhook
|
|
1459
1819
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_created
|
|
1820
|
+
* @slug created
|
|
1460
1821
|
* @documentationMaturity preview
|
|
1461
1822
|
*/
|
|
1462
1823
|
export declare function onSubscriptionContractCreated(handler: (event: SubscriptionContractCreatedEnvelope) => void | Promise<void>): void;
|
|
@@ -1467,11 +1828,14 @@ export interface SubscriptionContractDeletedEnvelope {
|
|
|
1467
1828
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1468
1829
|
* @permissionScope Read eCommerce - all read permissions
|
|
1469
1830
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1831
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1832
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1470
1833
|
* @permissionScope Manage eCommerce - all permissions
|
|
1471
1834
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1472
1835
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1473
1836
|
* @webhook
|
|
1474
1837
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_deleted
|
|
1838
|
+
* @slug deleted
|
|
1475
1839
|
* @documentationMaturity preview
|
|
1476
1840
|
*/
|
|
1477
1841
|
export declare function onSubscriptionContractDeleted(handler: (event: SubscriptionContractDeletedEnvelope) => void | Promise<void>): void;
|
|
@@ -1483,11 +1847,14 @@ export interface SubscriptionContractUpdatedEnvelope {
|
|
|
1483
1847
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1484
1848
|
* @permissionScope Read eCommerce - all read permissions
|
|
1485
1849
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1850
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1851
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1486
1852
|
* @permissionScope Manage eCommerce - all permissions
|
|
1487
1853
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1488
1854
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1489
1855
|
* @webhook
|
|
1490
1856
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_updated
|
|
1857
|
+
* @slug updated
|
|
1491
1858
|
* @documentationMaturity preview
|
|
1492
1859
|
*/
|
|
1493
1860
|
export declare function onSubscriptionContractUpdated(handler: (event: SubscriptionContractUpdatedEnvelope) => void | Promise<void>): void;
|
|
@@ -1502,6 +1869,8 @@ export declare function onSubscriptionContractUpdated(handler: (event: Subscript
|
|
|
1502
1869
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1503
1870
|
* @permissionScope Read eCommerce - all read permissions
|
|
1504
1871
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1872
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1873
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1505
1874
|
* @permissionScope Manage eCommerce - all permissions
|
|
1506
1875
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1507
1876
|
* @applicableIdentity APP
|
|
@@ -1524,6 +1893,8 @@ export declare function getSubscriptionContract(subscriptionContractId: string):
|
|
|
1524
1893
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1525
1894
|
* @permissionScope Read eCommerce - all read permissions
|
|
1526
1895
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1896
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1897
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1527
1898
|
* @permissionScope Manage eCommerce - all permissions
|
|
1528
1899
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1529
1900
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|