@wix/auto_sdk_ecom_subscription-contracts 1.0.1 → 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 +487 -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 +487 -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;
|
|
@@ -120,11 +148,18 @@ export declare enum SubscriptionFrequency {
|
|
|
120
148
|
export interface V1FreeTrialPeriod {
|
|
121
149
|
/** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
|
|
122
150
|
frequency?: SubscriptionFrequency;
|
|
123
|
-
/**
|
|
151
|
+
/**
|
|
152
|
+
* interval of period
|
|
153
|
+
* @min 1
|
|
154
|
+
* @max 50
|
|
155
|
+
*/
|
|
124
156
|
interval?: number;
|
|
125
157
|
}
|
|
126
158
|
export interface OrderLineItem {
|
|
127
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* Line item ID.
|
|
161
|
+
* @immutable
|
|
162
|
+
*/
|
|
128
163
|
_id?: string;
|
|
129
164
|
/**
|
|
130
165
|
* Item name.
|
|
@@ -138,14 +173,21 @@ export interface OrderLineItem {
|
|
|
138
173
|
* This field may be empty in the case of a custom line item.
|
|
139
174
|
*/
|
|
140
175
|
catalogReference?: CatalogReference;
|
|
141
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* Line item quantity.
|
|
178
|
+
* @min 1
|
|
179
|
+
* @max 100000
|
|
180
|
+
*/
|
|
142
181
|
quantity?: number;
|
|
143
182
|
/**
|
|
144
183
|
* Total discount for this line item's entire quantity.
|
|
145
184
|
* @readonly
|
|
146
185
|
*/
|
|
147
186
|
totalDiscount?: Price;
|
|
148
|
-
/**
|
|
187
|
+
/**
|
|
188
|
+
* Line item description lines. Used for display purposes for the cart, checkout and order.
|
|
189
|
+
* @maxSize 20
|
|
190
|
+
*/
|
|
149
191
|
descriptionLines?: DescriptionLine[];
|
|
150
192
|
/** Line item image. */
|
|
151
193
|
image?: string;
|
|
@@ -156,11 +198,18 @@ export interface OrderLineItem {
|
|
|
156
198
|
/**
|
|
157
199
|
* Fulfiller ID. Field is empty when the line item is self-fulfilled.
|
|
158
200
|
* 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).
|
|
201
|
+
* @format GUID
|
|
159
202
|
*/
|
|
160
203
|
fulfillerId?: string | null;
|
|
161
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* Number of items that were refunded.
|
|
206
|
+
* @max 100000
|
|
207
|
+
*/
|
|
162
208
|
refundQuantity?: number | null;
|
|
163
|
-
/**
|
|
209
|
+
/**
|
|
210
|
+
* Number of items restocked.
|
|
211
|
+
* @max 100000
|
|
212
|
+
*/
|
|
164
213
|
restockQuantity?: number | null;
|
|
165
214
|
/** Line item price after line item discounts for display purposes. */
|
|
166
215
|
price?: Price;
|
|
@@ -180,11 +229,9 @@ export interface OrderLineItem {
|
|
|
180
229
|
*/
|
|
181
230
|
totalPriceAfterTax?: Price;
|
|
182
231
|
/**
|
|
183
|
-
* Type of selected payment option for current item.
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
* + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
|
|
187
|
-
* + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Eligible for catalog items with type `DEPOSIT_ONLINE` only.
|
|
232
|
+
* Type of selected payment option for current item.
|
|
233
|
+
*
|
|
234
|
+
* Default: `FULL_PAYMENT_ONLINE`
|
|
188
235
|
*/
|
|
189
236
|
paymentOption?: PaymentOptionType;
|
|
190
237
|
/**
|
|
@@ -219,6 +266,7 @@ export interface OrderLineItem {
|
|
|
219
266
|
/**
|
|
220
267
|
* ID of the app managing the inventory.
|
|
221
268
|
* @internal
|
|
269
|
+
* @format GUID
|
|
222
270
|
*/
|
|
223
271
|
inventoryAppId?: string | null;
|
|
224
272
|
/**
|
|
@@ -234,6 +282,8 @@ export interface ProductName {
|
|
|
234
282
|
*
|
|
235
283
|
* Min: 1 character.
|
|
236
284
|
* Max: 200 characters.
|
|
285
|
+
* @minLength 1
|
|
286
|
+
* @maxLength 200
|
|
237
287
|
*/
|
|
238
288
|
original?: string;
|
|
239
289
|
/**
|
|
@@ -242,12 +292,18 @@ export interface ProductName {
|
|
|
242
292
|
* Min: 1 character.
|
|
243
293
|
* Max: 400 characters.
|
|
244
294
|
* Default: Same as `original`.
|
|
295
|
+
* @minLength 1
|
|
296
|
+
* @maxLength 400
|
|
245
297
|
*/
|
|
246
298
|
translated?: string | null;
|
|
247
299
|
}
|
|
248
300
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
249
301
|
export interface CatalogReference {
|
|
250
|
-
/**
|
|
302
|
+
/**
|
|
303
|
+
* ID of the item within the catalog it belongs to.
|
|
304
|
+
* @minLength 1
|
|
305
|
+
* @maxLength 36
|
|
306
|
+
*/
|
|
251
307
|
catalogItemId?: string;
|
|
252
308
|
/**
|
|
253
309
|
* ID of the app providing the catalog.
|
|
@@ -258,6 +314,7 @@ export interface CatalogReference {
|
|
|
258
314
|
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
259
315
|
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
260
316
|
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
317
|
+
* @minLength 1
|
|
261
318
|
*/
|
|
262
319
|
appId?: string;
|
|
263
320
|
/**
|
|
@@ -268,7 +325,10 @@ export interface CatalogReference {
|
|
|
268
325
|
options?: Record<string, any> | null;
|
|
269
326
|
}
|
|
270
327
|
export interface Price {
|
|
271
|
-
/**
|
|
328
|
+
/**
|
|
329
|
+
* Amount.
|
|
330
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
331
|
+
*/
|
|
272
332
|
amount?: string;
|
|
273
333
|
/**
|
|
274
334
|
* Amount formatted with currency symbol.
|
|
@@ -295,32 +355,44 @@ export interface DescriptionLineValueOneOf {
|
|
|
295
355
|
export interface DescriptionLineDescriptionLineValueOneOf {
|
|
296
356
|
}
|
|
297
357
|
export interface DescriptionLineName {
|
|
298
|
-
/**
|
|
358
|
+
/**
|
|
359
|
+
* 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).
|
|
360
|
+
* @maxLength 100
|
|
361
|
+
*/
|
|
299
362
|
original?: string;
|
|
300
363
|
/**
|
|
301
364
|
* Description line name translated into the buyer's language.
|
|
302
365
|
*
|
|
303
366
|
* Default: Same as `original`.
|
|
367
|
+
* @maxLength 200
|
|
304
368
|
*/
|
|
305
369
|
translated?: string | null;
|
|
306
370
|
}
|
|
307
371
|
export interface PlainTextValue {
|
|
308
|
-
/**
|
|
372
|
+
/**
|
|
373
|
+
* 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).
|
|
374
|
+
* @maxLength 600
|
|
375
|
+
*/
|
|
309
376
|
original?: string;
|
|
310
377
|
/**
|
|
311
378
|
* Description line plain text value translated into the buyer's language.
|
|
312
379
|
*
|
|
313
380
|
* Default: Same as `original`.
|
|
381
|
+
* @maxLength 600
|
|
314
382
|
*/
|
|
315
383
|
translated?: string | null;
|
|
316
384
|
}
|
|
317
385
|
export interface Color {
|
|
318
|
-
/**
|
|
386
|
+
/**
|
|
387
|
+
* 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).
|
|
388
|
+
* @maxLength 500
|
|
389
|
+
*/
|
|
319
390
|
original?: string;
|
|
320
391
|
/**
|
|
321
392
|
* Description line color name translated into the buyer's language.
|
|
322
393
|
*
|
|
323
394
|
* Default: Same as `original`.
|
|
395
|
+
* @maxLength 500
|
|
324
396
|
*/
|
|
325
397
|
translated?: string | null;
|
|
326
398
|
/** HEX or RGB color code for display. */
|
|
@@ -347,7 +419,10 @@ export interface FocalPoint {
|
|
|
347
419
|
export interface PhysicalProperties {
|
|
348
420
|
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
349
421
|
weight?: number | null;
|
|
350
|
-
/**
|
|
422
|
+
/**
|
|
423
|
+
* Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
|
|
424
|
+
* @maxLength 40
|
|
425
|
+
*/
|
|
351
426
|
sku?: string | null;
|
|
352
427
|
/** Whether this line item is shippable. */
|
|
353
428
|
shippable?: boolean;
|
|
@@ -388,7 +463,10 @@ export declare enum PaymentOptionType {
|
|
|
388
463
|
export interface ItemTaxFullDetails {
|
|
389
464
|
/** Taxable amount of this line item. */
|
|
390
465
|
taxableAmount?: Price;
|
|
391
|
-
/**
|
|
466
|
+
/**
|
|
467
|
+
* Tax rate percentage, as a decimal numeral between 0 and 1. For example, `"0.13"`.
|
|
468
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
469
|
+
*/
|
|
392
470
|
taxRate?: string;
|
|
393
471
|
/** The calculated tax, based on the `taxableAmount` and `taxRate`. */
|
|
394
472
|
totalTax?: Price;
|
|
@@ -398,16 +476,24 @@ export interface LineItemTaxInfo {
|
|
|
398
476
|
taxAmount?: Price;
|
|
399
477
|
/** Amount for which tax is calculated. */
|
|
400
478
|
taxableAmount?: Price;
|
|
401
|
-
/**
|
|
479
|
+
/**
|
|
480
|
+
* Tax rate %, as a decimal point.
|
|
481
|
+
* @format DECIMAL_VALUE
|
|
482
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
483
|
+
*/
|
|
402
484
|
taxRate?: string | null;
|
|
403
485
|
/**
|
|
404
486
|
* Tax group ID.
|
|
405
487
|
* Learn more about [Tax Groups](https://dev.wix.com/docs/rest/business-management/payments/tax/tax-groups/introduction).
|
|
488
|
+
* @format GUID
|
|
406
489
|
*/
|
|
407
490
|
taxGroupId?: string | null;
|
|
408
491
|
/** Indicates whether the price already includes tax. */
|
|
409
492
|
taxIncludedInPrice?: boolean;
|
|
410
|
-
/**
|
|
493
|
+
/**
|
|
494
|
+
* Tax information for a line item.
|
|
495
|
+
* @maxSize 7
|
|
496
|
+
*/
|
|
411
497
|
taxBreakdown?: LineItemTaxBreakdown[];
|
|
412
498
|
}
|
|
413
499
|
/**
|
|
@@ -415,17 +501,28 @@ export interface LineItemTaxInfo {
|
|
|
415
501
|
* It holds the tax amount and the tax rate for each tax authority that apply on the line item.
|
|
416
502
|
*/
|
|
417
503
|
export interface LineItemTaxBreakdown {
|
|
418
|
-
/**
|
|
504
|
+
/**
|
|
505
|
+
* Jurisdiction that taxes were calculated for. For example, "New York", or "Quebec".
|
|
506
|
+
* @maxLength 200
|
|
507
|
+
*/
|
|
419
508
|
jurisdiction?: string | null;
|
|
420
|
-
/**
|
|
509
|
+
/**
|
|
510
|
+
* Tax rate used for this jurisdiction, as a decimal. For example, 10% tax is 0.1000.
|
|
511
|
+
* @format DECIMAL_VALUE
|
|
512
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
513
|
+
*/
|
|
421
514
|
rate?: string | null;
|
|
422
515
|
/** Amount of tax calculated for this line item. */
|
|
423
516
|
taxAmount?: Price;
|
|
424
|
-
/**
|
|
517
|
+
/**
|
|
518
|
+
* The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
|
|
519
|
+
* @maxLength 200
|
|
520
|
+
*/
|
|
425
521
|
taxType?: string | null;
|
|
426
522
|
/**
|
|
427
523
|
* The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
428
524
|
* This name should be explicit enough to allow the merchant to understand what tax was calculated.
|
|
525
|
+
* @maxLength 200
|
|
429
526
|
*/
|
|
430
527
|
taxName?: string | null;
|
|
431
528
|
/** Type of jurisdiction that taxes were calculated for. */
|
|
@@ -445,9 +542,18 @@ export declare enum JurisdictionType {
|
|
|
445
542
|
SPECIAL = "SPECIAL"
|
|
446
543
|
}
|
|
447
544
|
export interface DigitalFile {
|
|
448
|
-
/**
|
|
545
|
+
/**
|
|
546
|
+
* ID of the secure file in media.
|
|
547
|
+
* @minLength 1
|
|
548
|
+
* @maxLength 100
|
|
549
|
+
*/
|
|
449
550
|
fileId?: string;
|
|
450
|
-
/**
|
|
551
|
+
/**
|
|
552
|
+
* Link will exist after the digital links have been generated on the order.
|
|
553
|
+
* @format WEB_URL
|
|
554
|
+
* @minLength 1
|
|
555
|
+
* @maxLength 2000
|
|
556
|
+
*/
|
|
451
557
|
link?: string | null;
|
|
452
558
|
/**
|
|
453
559
|
* Link expiration time and date.
|
|
@@ -456,30 +562,54 @@ export interface DigitalFile {
|
|
|
456
562
|
expirationDate?: Date | null;
|
|
457
563
|
}
|
|
458
564
|
export interface SubscriptionInfo {
|
|
459
|
-
/**
|
|
565
|
+
/**
|
|
566
|
+
* Subscription ID.
|
|
567
|
+
* @format GUID
|
|
568
|
+
*/
|
|
460
569
|
_id?: string | null;
|
|
461
|
-
/**
|
|
570
|
+
/**
|
|
571
|
+
* Subscription cycle. For example, if this order is for the 3rd cycle of a subscription, value will be `3`.
|
|
572
|
+
* @min 1
|
|
573
|
+
*/
|
|
462
574
|
cycleNumber?: number;
|
|
463
|
-
/**
|
|
575
|
+
/**
|
|
576
|
+
* Subscription option title. For example, `"Monthly coffee Subscription"`.
|
|
577
|
+
* @minLength 1
|
|
578
|
+
* @maxLength 20
|
|
579
|
+
*/
|
|
464
580
|
subscriptionOptionTitle?: string;
|
|
465
|
-
/**
|
|
581
|
+
/**
|
|
582
|
+
* Subscription option description. For example, `"1kg of selected coffee, once a month"`.
|
|
583
|
+
* @maxLength 60
|
|
584
|
+
*/
|
|
466
585
|
subscriptionOptionDescription?: string | null;
|
|
467
|
-
/**
|
|
586
|
+
/**
|
|
587
|
+
* Subscription detailed information.
|
|
588
|
+
* @immutable
|
|
589
|
+
*/
|
|
468
590
|
subscriptionSettings?: SubscriptionSettings;
|
|
469
591
|
/**
|
|
470
592
|
* Description of the charges that will be applied for subscription.
|
|
471
593
|
* @internal
|
|
594
|
+
* @maxLength 1000
|
|
472
595
|
*/
|
|
473
596
|
chargesDescription?: string | null;
|
|
474
597
|
}
|
|
475
598
|
export interface SubscriptionSettings {
|
|
476
599
|
/** Frequency of recurring payment. */
|
|
477
600
|
frequency?: V2SubscriptionFrequency;
|
|
478
|
-
/**
|
|
601
|
+
/**
|
|
602
|
+
* Interval of recurring payment.
|
|
603
|
+
* @min 1
|
|
604
|
+
* @max 50
|
|
605
|
+
*/
|
|
479
606
|
interval?: number | null;
|
|
480
607
|
/** Whether subscription is renewed automatically at the end of each period. */
|
|
481
608
|
autoRenewal?: boolean;
|
|
482
|
-
/**
|
|
609
|
+
/**
|
|
610
|
+
* Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
|
|
611
|
+
* @min 1
|
|
612
|
+
*/
|
|
483
613
|
billingCycles?: number | null;
|
|
484
614
|
/**
|
|
485
615
|
* Whether to allow the customer to cancel the subscription.
|
|
@@ -508,33 +638,52 @@ export declare enum V2SubscriptionFrequency {
|
|
|
508
638
|
export interface FreeTrialPeriod {
|
|
509
639
|
/** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
|
|
510
640
|
frequency?: V2SubscriptionFrequency;
|
|
511
|
-
/**
|
|
641
|
+
/**
|
|
642
|
+
* interval of period
|
|
643
|
+
* @min 1
|
|
644
|
+
* @max 50
|
|
645
|
+
*/
|
|
512
646
|
interval?: number;
|
|
513
647
|
}
|
|
514
648
|
export interface PriceDescription {
|
|
515
|
-
/**
|
|
649
|
+
/**
|
|
650
|
+
* __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).
|
|
651
|
+
* @minLength 1
|
|
652
|
+
* @maxLength 100
|
|
653
|
+
*/
|
|
516
654
|
original?: string;
|
|
517
655
|
/**
|
|
518
656
|
* Price description translated into the buyer's language.
|
|
519
657
|
*
|
|
520
658
|
* Default: Same as `original`.
|
|
659
|
+
* @minLength 1
|
|
660
|
+
* @maxLength 100
|
|
521
661
|
*/
|
|
522
662
|
translated?: string | null;
|
|
523
663
|
}
|
|
524
664
|
export interface LocationAndQuantity {
|
|
525
|
-
/**
|
|
665
|
+
/**
|
|
666
|
+
* Location id in the associated owner app.
|
|
667
|
+
* @format GUID
|
|
668
|
+
*/
|
|
526
669
|
_id?: string;
|
|
527
670
|
/**
|
|
528
671
|
* Location owner app, if not provided then the site business info locations will be used.
|
|
672
|
+
* @format GUID
|
|
529
673
|
* @deprecated Location owner app, if not provided then the site business info locations will be used.
|
|
530
674
|
* @targetRemovalDate 2025-03-01
|
|
531
675
|
*/
|
|
532
676
|
appId?: string | null;
|
|
533
|
-
/**
|
|
677
|
+
/**
|
|
678
|
+
* Quantity for specific location.
|
|
679
|
+
* @min 1
|
|
680
|
+
* @max 100000
|
|
681
|
+
*/
|
|
534
682
|
quantity?: number;
|
|
535
683
|
/**
|
|
536
684
|
* Location name.
|
|
537
685
|
* @internal
|
|
686
|
+
* @maxLength 500
|
|
538
687
|
* @readonly
|
|
539
688
|
*/
|
|
540
689
|
name?: string | null;
|
|
@@ -567,20 +716,38 @@ export interface ExtendedFields {
|
|
|
567
716
|
}
|
|
568
717
|
/** Buyer Info */
|
|
569
718
|
export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
570
|
-
/**
|
|
719
|
+
/**
|
|
720
|
+
* Visitor ID (if site visitor is not a member).
|
|
721
|
+
* @format GUID
|
|
722
|
+
*/
|
|
571
723
|
visitorId?: string;
|
|
572
|
-
/**
|
|
724
|
+
/**
|
|
725
|
+
* Member ID (if site visitor is a site member).
|
|
726
|
+
* @format GUID
|
|
727
|
+
*/
|
|
573
728
|
memberId?: string;
|
|
574
|
-
/**
|
|
729
|
+
/**
|
|
730
|
+
* 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).
|
|
731
|
+
* @format GUID
|
|
732
|
+
*/
|
|
575
733
|
contactId?: string | null;
|
|
576
|
-
/**
|
|
734
|
+
/**
|
|
735
|
+
* Buyer email address.
|
|
736
|
+
* @format EMAIL
|
|
737
|
+
*/
|
|
577
738
|
email?: string | null;
|
|
578
739
|
}
|
|
579
740
|
/** @oneof */
|
|
580
741
|
export interface BuyerInfoIdOneOf {
|
|
581
|
-
/**
|
|
742
|
+
/**
|
|
743
|
+
* Visitor ID (if site visitor is not a member).
|
|
744
|
+
* @format GUID
|
|
745
|
+
*/
|
|
582
746
|
visitorId?: string;
|
|
583
|
-
/**
|
|
747
|
+
/**
|
|
748
|
+
* Member ID (if site visitor is a site member).
|
|
749
|
+
* @format GUID
|
|
750
|
+
*/
|
|
584
751
|
memberId?: string;
|
|
585
752
|
}
|
|
586
753
|
export declare enum WeightUnit {
|
|
@@ -614,19 +781,37 @@ export interface AddressWithContact {
|
|
|
614
781
|
}
|
|
615
782
|
/** Physical address */
|
|
616
783
|
export interface Address {
|
|
617
|
-
/**
|
|
784
|
+
/**
|
|
785
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
786
|
+
* @format COUNTRY
|
|
787
|
+
*/
|
|
618
788
|
country?: string | null;
|
|
619
|
-
/**
|
|
789
|
+
/**
|
|
790
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
791
|
+
* @maxLength 50
|
|
792
|
+
*/
|
|
620
793
|
subdivision?: string | null;
|
|
621
|
-
/**
|
|
794
|
+
/**
|
|
795
|
+
* City name.
|
|
796
|
+
* @maxLength 50
|
|
797
|
+
*/
|
|
622
798
|
city?: string | null;
|
|
623
|
-
/**
|
|
799
|
+
/**
|
|
800
|
+
* Postal or zip code.
|
|
801
|
+
* @maxLength 50
|
|
802
|
+
*/
|
|
624
803
|
postalCode?: string | null;
|
|
625
804
|
/** Street address. */
|
|
626
805
|
streetAddress?: StreetAddress;
|
|
627
|
-
/**
|
|
806
|
+
/**
|
|
807
|
+
* Main address line (usually street name and number).
|
|
808
|
+
* @maxLength 150
|
|
809
|
+
*/
|
|
628
810
|
addressLine1?: string | null;
|
|
629
|
-
/**
|
|
811
|
+
/**
|
|
812
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
813
|
+
* @maxLength 100
|
|
814
|
+
*/
|
|
630
815
|
addressLine2?: string | null;
|
|
631
816
|
/**
|
|
632
817
|
* Country's full name.
|
|
@@ -653,13 +838,25 @@ export interface AddressLocation {
|
|
|
653
838
|
}
|
|
654
839
|
/** Full contact details for an address */
|
|
655
840
|
export interface FullAddressContactDetails {
|
|
656
|
-
/**
|
|
841
|
+
/**
|
|
842
|
+
* First name.
|
|
843
|
+
* @maxLength 100
|
|
844
|
+
*/
|
|
657
845
|
firstName?: string | null;
|
|
658
|
-
/**
|
|
846
|
+
/**
|
|
847
|
+
* Last name.
|
|
848
|
+
* @maxLength 100
|
|
849
|
+
*/
|
|
659
850
|
lastName?: string | null;
|
|
660
|
-
/**
|
|
851
|
+
/**
|
|
852
|
+
* Phone number.
|
|
853
|
+
* @format PHONE
|
|
854
|
+
*/
|
|
661
855
|
phone?: string | null;
|
|
662
|
-
/**
|
|
856
|
+
/**
|
|
857
|
+
* Company name.
|
|
858
|
+
* @maxLength 1000
|
|
859
|
+
*/
|
|
663
860
|
company?: string | null;
|
|
664
861
|
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
665
862
|
vatId?: VatId;
|
|
@@ -685,13 +882,22 @@ export declare enum VatType {
|
|
|
685
882
|
CNPJ = "CNPJ"
|
|
686
883
|
}
|
|
687
884
|
export interface ShippingInformation {
|
|
688
|
-
/**
|
|
885
|
+
/**
|
|
886
|
+
* App Def Id of external provider which was a source of shipping info
|
|
887
|
+
* @minLength 1
|
|
888
|
+
* @maxLength 100
|
|
889
|
+
*/
|
|
689
890
|
carrierId?: string | null;
|
|
690
|
-
/**
|
|
891
|
+
/**
|
|
892
|
+
* Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`.
|
|
893
|
+
* @minLength 1
|
|
894
|
+
* @maxLength 100
|
|
895
|
+
*/
|
|
691
896
|
code?: string | null;
|
|
692
897
|
/**
|
|
693
898
|
* Shipping option title.
|
|
694
899
|
* For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`.
|
|
900
|
+
* @maxLength 250
|
|
695
901
|
*/
|
|
696
902
|
title?: string;
|
|
697
903
|
/** Shipping logistics. */
|
|
@@ -706,9 +912,15 @@ export interface DeliveryLogistics extends DeliveryLogisticsAddressOneOf {
|
|
|
706
912
|
shippingDestination?: AddressWithContact;
|
|
707
913
|
/** Pickup details. */
|
|
708
914
|
pickupDetails?: PickupDetails;
|
|
709
|
-
/**
|
|
915
|
+
/**
|
|
916
|
+
* Expected delivery time in free text. For example, `"3-5 business days"`.
|
|
917
|
+
* @maxLength 500
|
|
918
|
+
*/
|
|
710
919
|
deliveryTime?: string | null;
|
|
711
|
-
/**
|
|
920
|
+
/**
|
|
921
|
+
* Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`.
|
|
922
|
+
* @maxLength 1000
|
|
923
|
+
*/
|
|
712
924
|
instructions?: string | null;
|
|
713
925
|
/**
|
|
714
926
|
* Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
@@ -733,19 +945,37 @@ export interface PickupDetails {
|
|
|
733
945
|
}
|
|
734
946
|
/** Physical address */
|
|
735
947
|
export interface PickupAddress {
|
|
736
|
-
/**
|
|
948
|
+
/**
|
|
949
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
950
|
+
* @format COUNTRY
|
|
951
|
+
*/
|
|
737
952
|
country?: string | null;
|
|
738
|
-
/**
|
|
953
|
+
/**
|
|
954
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
955
|
+
* @maxLength 50
|
|
956
|
+
*/
|
|
739
957
|
subdivision?: string | null;
|
|
740
|
-
/**
|
|
958
|
+
/**
|
|
959
|
+
* City name.
|
|
960
|
+
* @maxLength 1000
|
|
961
|
+
*/
|
|
741
962
|
city?: string | null;
|
|
742
|
-
/**
|
|
963
|
+
/**
|
|
964
|
+
* Postal or zip code.
|
|
965
|
+
* @maxLength 1000
|
|
966
|
+
*/
|
|
743
967
|
postalCode?: string | null;
|
|
744
968
|
/** Street address object, with number, name, and apartment number in separate fields. */
|
|
745
969
|
streetAddress?: StreetAddress;
|
|
746
|
-
/**
|
|
970
|
+
/**
|
|
971
|
+
* Main address line (usually street name and number).
|
|
972
|
+
* @maxLength 1000
|
|
973
|
+
*/
|
|
747
974
|
addressLine1?: string | null;
|
|
748
|
-
/**
|
|
975
|
+
/**
|
|
976
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
977
|
+
* @maxLength 1000
|
|
978
|
+
*/
|
|
749
979
|
addressLine2?: string | null;
|
|
750
980
|
/**
|
|
751
981
|
* Country's full name.
|
|
@@ -791,13 +1021,19 @@ export interface ShippingPrice {
|
|
|
791
1021
|
discount?: Price;
|
|
792
1022
|
}
|
|
793
1023
|
export interface ShippingRegion {
|
|
794
|
-
/**
|
|
1024
|
+
/**
|
|
1025
|
+
* Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`.
|
|
1026
|
+
* @maxLength 100
|
|
1027
|
+
*/
|
|
795
1028
|
name?: string | null;
|
|
796
1029
|
}
|
|
797
1030
|
export interface OrderTaxInfo {
|
|
798
1031
|
/** Calculated tax, added from line items. */
|
|
799
1032
|
totalTax?: Price;
|
|
800
|
-
/**
|
|
1033
|
+
/**
|
|
1034
|
+
* 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.
|
|
1035
|
+
* @maxSize 50
|
|
1036
|
+
*/
|
|
801
1037
|
taxBreakdown?: OrderTaxBreakdown[];
|
|
802
1038
|
/**
|
|
803
1039
|
* Whether the order is exempt from tax calculations.
|
|
@@ -812,15 +1048,28 @@ export interface OrderTaxInfo {
|
|
|
812
1048
|
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
813
1049
|
*/
|
|
814
1050
|
export interface OrderTaxBreakdown {
|
|
815
|
-
/**
|
|
1051
|
+
/**
|
|
1052
|
+
* The name of the tax against which this tax amount was calculated.
|
|
1053
|
+
* @maxLength 200
|
|
1054
|
+
*/
|
|
816
1055
|
taxName?: string;
|
|
817
|
-
/**
|
|
1056
|
+
/**
|
|
1057
|
+
* The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws.
|
|
1058
|
+
* @maxLength 200
|
|
1059
|
+
*/
|
|
818
1060
|
taxType?: string;
|
|
819
|
-
/**
|
|
1061
|
+
/**
|
|
1062
|
+
* The name of the jurisdiction in which this tax detail applies.
|
|
1063
|
+
* @maxLength 200
|
|
1064
|
+
*/
|
|
820
1065
|
jurisdiction?: string;
|
|
821
1066
|
/** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
822
1067
|
jurisdictionType?: JurisdictionType;
|
|
823
|
-
/**
|
|
1068
|
+
/**
|
|
1069
|
+
* The rate at which this tax detail was calculated.
|
|
1070
|
+
* @format DECIMAL_VALUE
|
|
1071
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
1072
|
+
*/
|
|
824
1073
|
rate?: string;
|
|
825
1074
|
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
826
1075
|
aggregatedTaxAmount?: Price;
|
|
@@ -842,18 +1091,26 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
842
1091
|
/**
|
|
843
1092
|
* IDs of line items discount applies to.
|
|
844
1093
|
* Deprecated. Use `line_item_discounts` instead.
|
|
1094
|
+
* @format GUID
|
|
1095
|
+
* @maxSize 1
|
|
845
1096
|
* @deprecated IDs of line items discount applies to.
|
|
846
1097
|
* Deprecated. Use `line_item_discounts` instead.
|
|
847
1098
|
* @replacedBy line_item_discounts
|
|
848
1099
|
* @targetRemovalDate 2024-10-30
|
|
849
1100
|
*/
|
|
850
1101
|
lineItemIds?: string[];
|
|
851
|
-
/**
|
|
1102
|
+
/**
|
|
1103
|
+
* Discount id.
|
|
1104
|
+
* @format GUID
|
|
1105
|
+
* @immutable
|
|
1106
|
+
*/
|
|
852
1107
|
_id?: string | null;
|
|
853
1108
|
/**
|
|
854
1109
|
* Number of subscription billing cycles the discount applies to.
|
|
855
1110
|
* If None and discount is linked to subscription line item, it applies to all cycles.
|
|
856
1111
|
* @internal
|
|
1112
|
+
* @min 1
|
|
1113
|
+
* @max 999
|
|
857
1114
|
*/
|
|
858
1115
|
subscriptionCycles?: number | null;
|
|
859
1116
|
}
|
|
@@ -888,13 +1145,18 @@ export interface MerchantDiscount extends MerchantDiscountMerchantDiscountReason
|
|
|
888
1145
|
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
889
1146
|
*/
|
|
890
1147
|
discountReason?: DiscountReason;
|
|
891
|
-
/**
|
|
1148
|
+
/**
|
|
1149
|
+
* Discount description as free text (optional).
|
|
1150
|
+
* @maxLength 200
|
|
1151
|
+
*/
|
|
892
1152
|
description?: string | null;
|
|
893
1153
|
/** Discount amount. */
|
|
894
1154
|
amount?: Price;
|
|
895
1155
|
/**
|
|
896
1156
|
* Discount percentage.
|
|
897
1157
|
* @internal
|
|
1158
|
+
* @format DECIMAL_VALUE
|
|
1159
|
+
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
898
1160
|
*/
|
|
899
1161
|
percentage?: string | null;
|
|
900
1162
|
}
|
|
@@ -905,7 +1167,10 @@ export interface MerchantDiscountMerchantDiscountReasonOneOf {
|
|
|
905
1167
|
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
906
1168
|
*/
|
|
907
1169
|
discountReason?: DiscountReason;
|
|
908
|
-
/**
|
|
1170
|
+
/**
|
|
1171
|
+
* Discount description as free text (optional).
|
|
1172
|
+
* @maxLength 200
|
|
1173
|
+
*/
|
|
909
1174
|
description?: string | null;
|
|
910
1175
|
}
|
|
911
1176
|
export declare enum DiscountReason {
|
|
@@ -913,7 +1178,10 @@ export declare enum DiscountReason {
|
|
|
913
1178
|
EXCHANGED_ITEMS = "EXCHANGED_ITEMS"
|
|
914
1179
|
}
|
|
915
1180
|
export interface DiscountRule {
|
|
916
|
-
/**
|
|
1181
|
+
/**
|
|
1182
|
+
* Discount rule ID
|
|
1183
|
+
* @format GUID
|
|
1184
|
+
*/
|
|
917
1185
|
_id?: string;
|
|
918
1186
|
/** Discount rule name */
|
|
919
1187
|
name?: DiscountRuleName;
|
|
@@ -921,13 +1189,24 @@ export interface DiscountRule {
|
|
|
921
1189
|
amount?: Price;
|
|
922
1190
|
}
|
|
923
1191
|
export interface DiscountRuleName {
|
|
924
|
-
/**
|
|
1192
|
+
/**
|
|
1193
|
+
* Original discount rule name (in site's default language).
|
|
1194
|
+
* @minLength 1
|
|
1195
|
+
* @maxLength 256
|
|
1196
|
+
*/
|
|
925
1197
|
original?: string;
|
|
926
|
-
/**
|
|
1198
|
+
/**
|
|
1199
|
+
* Translated discount rule name according to buyer language. Defaults to `original` when not provided.
|
|
1200
|
+
* @minLength 1
|
|
1201
|
+
* @maxLength 500
|
|
1202
|
+
*/
|
|
927
1203
|
translated?: string | null;
|
|
928
1204
|
}
|
|
929
1205
|
export interface LineItemDiscount {
|
|
930
|
-
/**
|
|
1206
|
+
/**
|
|
1207
|
+
* ID of line item the discount applies to.
|
|
1208
|
+
* @format GUID
|
|
1209
|
+
*/
|
|
931
1210
|
_id?: string;
|
|
932
1211
|
/** Total discount for this line item. */
|
|
933
1212
|
totalDiscount?: Price;
|
|
@@ -935,9 +1214,15 @@ export interface LineItemDiscount {
|
|
|
935
1214
|
export interface ChannelInfo {
|
|
936
1215
|
/** Sales channel that submitted the order. */
|
|
937
1216
|
type?: ChannelType;
|
|
938
|
-
/**
|
|
1217
|
+
/**
|
|
1218
|
+
* Reference to an order ID from an external system.
|
|
1219
|
+
* @maxLength 100
|
|
1220
|
+
*/
|
|
939
1221
|
externalOrderId?: string | null;
|
|
940
|
-
/**
|
|
1222
|
+
/**
|
|
1223
|
+
* URL to the order in the external system.
|
|
1224
|
+
* @maxLength 300
|
|
1225
|
+
*/
|
|
941
1226
|
externalOrderUrl?: string | null;
|
|
942
1227
|
}
|
|
943
1228
|
export declare enum ChannelType {
|
|
@@ -977,37 +1262,63 @@ export declare enum ChannelType {
|
|
|
977
1262
|
export interface CustomField {
|
|
978
1263
|
/** Custom field value. */
|
|
979
1264
|
value?: any;
|
|
980
|
-
/**
|
|
1265
|
+
/**
|
|
1266
|
+
* Custom field title.
|
|
1267
|
+
* @minLength 1
|
|
1268
|
+
* @maxLength 500
|
|
1269
|
+
*/
|
|
981
1270
|
title?: string;
|
|
982
|
-
/**
|
|
1271
|
+
/**
|
|
1272
|
+
* Translated custom field title.
|
|
1273
|
+
* @minLength 1
|
|
1274
|
+
* @maxLength 500
|
|
1275
|
+
*/
|
|
983
1276
|
translatedTitle?: string | null;
|
|
984
1277
|
}
|
|
985
1278
|
export interface AdditionalFee {
|
|
986
|
-
/**
|
|
1279
|
+
/**
|
|
1280
|
+
* Additional fee's unique code for future processing.
|
|
1281
|
+
* @minLength 1
|
|
1282
|
+
* @maxLength 100
|
|
1283
|
+
*/
|
|
987
1284
|
code?: string | null;
|
|
988
|
-
/**
|
|
1285
|
+
/**
|
|
1286
|
+
* Name of additional fee.
|
|
1287
|
+
* @minLength 1
|
|
1288
|
+
* @maxLength 50
|
|
1289
|
+
*/
|
|
989
1290
|
name?: string;
|
|
990
1291
|
/** Additional fee's price. */
|
|
991
1292
|
price?: Price;
|
|
992
1293
|
/** Tax details. */
|
|
993
1294
|
taxDetails?: ItemTaxFullDetails;
|
|
994
|
-
/**
|
|
1295
|
+
/**
|
|
1296
|
+
* SPI implementer's `appId`.
|
|
1297
|
+
* @format GUID
|
|
1298
|
+
*/
|
|
995
1299
|
providerAppId?: string | null;
|
|
996
1300
|
/** Additional fee's price before tax. */
|
|
997
1301
|
priceBeforeTax?: Price;
|
|
998
1302
|
/** Additional fee's price after tax. */
|
|
999
1303
|
priceAfterTax?: Price;
|
|
1000
|
-
/**
|
|
1304
|
+
/**
|
|
1305
|
+
* Additional fee's id.
|
|
1306
|
+
* @format GUID
|
|
1307
|
+
* @immutable
|
|
1308
|
+
*/
|
|
1001
1309
|
_id?: string;
|
|
1002
1310
|
/**
|
|
1003
1311
|
* Optional - Line items associated with this additional fee.
|
|
1004
1312
|
* If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
|
|
1313
|
+
* @format GUID
|
|
1005
1314
|
*/
|
|
1006
1315
|
lineItemIds?: string[];
|
|
1007
1316
|
/**
|
|
1008
1317
|
* Number of subscription billing cycles the additional fee applies to.
|
|
1009
1318
|
* If None and additional fee is linked to subscription line item, it applies to all cycles.
|
|
1010
1319
|
* @internal
|
|
1320
|
+
* @min 1
|
|
1321
|
+
* @max 999
|
|
1011
1322
|
*/
|
|
1012
1323
|
subscriptionCycles?: number | null;
|
|
1013
1324
|
}
|
|
@@ -1015,10 +1326,13 @@ export interface Location {
|
|
|
1015
1326
|
/**
|
|
1016
1327
|
* Location ID.
|
|
1017
1328
|
* Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
1329
|
+
* @format GUID
|
|
1018
1330
|
*/
|
|
1019
1331
|
_id?: string;
|
|
1020
1332
|
/**
|
|
1021
1333
|
* Location name.
|
|
1334
|
+
* @minLength 1
|
|
1335
|
+
* @maxLength 500
|
|
1022
1336
|
* @readonly
|
|
1023
1337
|
*/
|
|
1024
1338
|
name?: string;
|
|
@@ -1032,7 +1346,10 @@ export interface CreateSubscriptionContractResponse {
|
|
|
1032
1346
|
subscriptionContract?: SubscriptionContract;
|
|
1033
1347
|
}
|
|
1034
1348
|
export interface GetSubscriptionContractRequest {
|
|
1035
|
-
/**
|
|
1349
|
+
/**
|
|
1350
|
+
* ID of the SubscriptionContract to retrieve.
|
|
1351
|
+
* @format GUID
|
|
1352
|
+
*/
|
|
1036
1353
|
subscriptionContractId: string;
|
|
1037
1354
|
}
|
|
1038
1355
|
export interface GetSubscriptionContractResponse {
|
|
@@ -1068,6 +1385,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
1068
1385
|
* Sort object in the following format:
|
|
1069
1386
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1070
1387
|
* Learn more about the [sort format](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
|
|
1388
|
+
* @maxSize 5
|
|
1071
1389
|
*/
|
|
1072
1390
|
sort?: Sorting[];
|
|
1073
1391
|
}
|
|
@@ -1077,7 +1395,10 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
1077
1395
|
cursorPaging?: CursorPaging;
|
|
1078
1396
|
}
|
|
1079
1397
|
export interface Sorting {
|
|
1080
|
-
/**
|
|
1398
|
+
/**
|
|
1399
|
+
* Name of the field to sort by.
|
|
1400
|
+
* @maxLength 512
|
|
1401
|
+
*/
|
|
1081
1402
|
fieldName?: string;
|
|
1082
1403
|
/** Sort order. */
|
|
1083
1404
|
order?: SortOrder;
|
|
@@ -1087,13 +1408,17 @@ export declare enum SortOrder {
|
|
|
1087
1408
|
DESC = "DESC"
|
|
1088
1409
|
}
|
|
1089
1410
|
export interface CursorPaging {
|
|
1090
|
-
/**
|
|
1411
|
+
/**
|
|
1412
|
+
* Maximum number of items to return in the results.
|
|
1413
|
+
* @max 100
|
|
1414
|
+
*/
|
|
1091
1415
|
limit?: number | null;
|
|
1092
1416
|
/**
|
|
1093
1417
|
* Pointer to the next or previous page in the list of results.
|
|
1094
1418
|
*
|
|
1095
1419
|
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1096
1420
|
* Not relevant for the first request.
|
|
1421
|
+
* @maxLength 16000
|
|
1097
1422
|
*/
|
|
1098
1423
|
cursor?: string | null;
|
|
1099
1424
|
}
|
|
@@ -1117,9 +1442,15 @@ export interface CursorPagingMetadata {
|
|
|
1117
1442
|
hasNext?: boolean | null;
|
|
1118
1443
|
}
|
|
1119
1444
|
export interface Cursors {
|
|
1120
|
-
/**
|
|
1445
|
+
/**
|
|
1446
|
+
* Cursor string pointing to the next page in the list of results.
|
|
1447
|
+
* @maxLength 16000
|
|
1448
|
+
*/
|
|
1121
1449
|
next?: string | null;
|
|
1122
|
-
/**
|
|
1450
|
+
/**
|
|
1451
|
+
* Cursor pointing to the previous page in the list of results.
|
|
1452
|
+
* @maxLength 16000
|
|
1453
|
+
*/
|
|
1123
1454
|
prev?: string | null;
|
|
1124
1455
|
}
|
|
1125
1456
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -1195,9 +1526,15 @@ export interface ActionEvent {
|
|
|
1195
1526
|
export interface Empty {
|
|
1196
1527
|
}
|
|
1197
1528
|
export interface MessageEnvelope {
|
|
1198
|
-
/**
|
|
1529
|
+
/**
|
|
1530
|
+
* App instance ID.
|
|
1531
|
+
* @format GUID
|
|
1532
|
+
*/
|
|
1199
1533
|
instanceId?: string | null;
|
|
1200
|
-
/**
|
|
1534
|
+
/**
|
|
1535
|
+
* Event type.
|
|
1536
|
+
* @maxLength 150
|
|
1537
|
+
*/
|
|
1201
1538
|
eventType?: string;
|
|
1202
1539
|
/** The identification type and identity data. */
|
|
1203
1540
|
identity?: IdentificationData;
|
|
@@ -1205,26 +1542,50 @@ export interface MessageEnvelope {
|
|
|
1205
1542
|
data?: string;
|
|
1206
1543
|
}
|
|
1207
1544
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1208
|
-
/**
|
|
1545
|
+
/**
|
|
1546
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1547
|
+
* @format GUID
|
|
1548
|
+
*/
|
|
1209
1549
|
anonymousVisitorId?: string;
|
|
1210
|
-
/**
|
|
1550
|
+
/**
|
|
1551
|
+
* ID of a site visitor that has logged in to the site.
|
|
1552
|
+
* @format GUID
|
|
1553
|
+
*/
|
|
1211
1554
|
memberId?: string;
|
|
1212
|
-
/**
|
|
1555
|
+
/**
|
|
1556
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1557
|
+
* @format GUID
|
|
1558
|
+
*/
|
|
1213
1559
|
wixUserId?: string;
|
|
1214
|
-
/**
|
|
1560
|
+
/**
|
|
1561
|
+
* ID of an app.
|
|
1562
|
+
* @format GUID
|
|
1563
|
+
*/
|
|
1215
1564
|
appId?: string;
|
|
1216
1565
|
/** @readonly */
|
|
1217
1566
|
identityType?: WebhookIdentityType;
|
|
1218
1567
|
}
|
|
1219
1568
|
/** @oneof */
|
|
1220
1569
|
export interface IdentificationDataIdOneOf {
|
|
1221
|
-
/**
|
|
1570
|
+
/**
|
|
1571
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1572
|
+
* @format GUID
|
|
1573
|
+
*/
|
|
1222
1574
|
anonymousVisitorId?: string;
|
|
1223
|
-
/**
|
|
1575
|
+
/**
|
|
1576
|
+
* ID of a site visitor that has logged in to the site.
|
|
1577
|
+
* @format GUID
|
|
1578
|
+
*/
|
|
1224
1579
|
memberId?: string;
|
|
1225
|
-
/**
|
|
1580
|
+
/**
|
|
1581
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1582
|
+
* @format GUID
|
|
1583
|
+
*/
|
|
1226
1584
|
wixUserId?: string;
|
|
1227
|
-
/**
|
|
1585
|
+
/**
|
|
1586
|
+
* ID of an app.
|
|
1587
|
+
* @format GUID
|
|
1588
|
+
*/
|
|
1228
1589
|
appId?: string;
|
|
1229
1590
|
}
|
|
1230
1591
|
export declare enum WebhookIdentityType {
|
|
@@ -1503,9 +1864,15 @@ export interface QuerySubscriptionContractsResponseNonNullableFields {
|
|
|
1503
1864
|
subscriptionContracts: SubscriptionContractNonNullableFields[];
|
|
1504
1865
|
}
|
|
1505
1866
|
export interface BaseEventMetadata {
|
|
1506
|
-
/**
|
|
1867
|
+
/**
|
|
1868
|
+
* App instance ID.
|
|
1869
|
+
* @format GUID
|
|
1870
|
+
*/
|
|
1507
1871
|
instanceId?: string | null;
|
|
1508
|
-
/**
|
|
1872
|
+
/**
|
|
1873
|
+
* Event type.
|
|
1874
|
+
* @maxLength 150
|
|
1875
|
+
*/
|
|
1509
1876
|
eventType?: string;
|
|
1510
1877
|
/** The identification type and identity data. */
|
|
1511
1878
|
identity?: IdentificationData;
|
|
@@ -1556,11 +1923,14 @@ export interface SubscriptionContractCreatedEnvelope {
|
|
|
1556
1923
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1557
1924
|
* @permissionScope Read eCommerce - all read permissions
|
|
1558
1925
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1926
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1927
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1559
1928
|
* @permissionScope Manage eCommerce - all permissions
|
|
1560
1929
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1561
1930
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1562
1931
|
* @webhook
|
|
1563
1932
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_created
|
|
1933
|
+
* @slug created
|
|
1564
1934
|
* @documentationMaturity preview
|
|
1565
1935
|
*/
|
|
1566
1936
|
export declare function onSubscriptionContractCreated(handler: (event: SubscriptionContractCreatedEnvelope) => void | Promise<void>): void;
|
|
@@ -1571,11 +1941,14 @@ export interface SubscriptionContractDeletedEnvelope {
|
|
|
1571
1941
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1572
1942
|
* @permissionScope Read eCommerce - all read permissions
|
|
1573
1943
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1944
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1945
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1574
1946
|
* @permissionScope Manage eCommerce - all permissions
|
|
1575
1947
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1576
1948
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1577
1949
|
* @webhook
|
|
1578
1950
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_deleted
|
|
1951
|
+
* @slug deleted
|
|
1579
1952
|
* @documentationMaturity preview
|
|
1580
1953
|
*/
|
|
1581
1954
|
export declare function onSubscriptionContractDeleted(handler: (event: SubscriptionContractDeletedEnvelope) => void | Promise<void>): void;
|
|
@@ -1587,11 +1960,14 @@ export interface SubscriptionContractUpdatedEnvelope {
|
|
|
1587
1960
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1588
1961
|
* @permissionScope Read eCommerce - all read permissions
|
|
1589
1962
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1963
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1964
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1590
1965
|
* @permissionScope Manage eCommerce - all permissions
|
|
1591
1966
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1592
1967
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1593
1968
|
* @webhook
|
|
1594
1969
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_updated
|
|
1970
|
+
* @slug updated
|
|
1595
1971
|
* @documentationMaturity preview
|
|
1596
1972
|
*/
|
|
1597
1973
|
export declare function onSubscriptionContractUpdated(handler: (event: SubscriptionContractUpdatedEnvelope) => void | Promise<void>): void;
|
|
@@ -1606,6 +1982,8 @@ export declare function onSubscriptionContractUpdated(handler: (event: Subscript
|
|
|
1606
1982
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1607
1983
|
* @permissionScope Read eCommerce - all read permissions
|
|
1608
1984
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1985
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1986
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1609
1987
|
* @permissionScope Manage eCommerce - all permissions
|
|
1610
1988
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1611
1989
|
* @applicableIdentity APP
|
|
@@ -1628,6 +2006,8 @@ export declare function getSubscriptionContract(subscriptionContractId: string):
|
|
|
1628
2006
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1629
2007
|
* @permissionScope Read eCommerce - all read permissions
|
|
1630
2008
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
2009
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
2010
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1631
2011
|
* @permissionScope Manage eCommerce - all permissions
|
|
1632
2012
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1633
2013
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|