@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;
|
|
@@ -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,25 +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;
|
|
591
|
+
/**
|
|
592
|
+
* Description of the charges that will be applied for subscription.
|
|
593
|
+
* @internal
|
|
594
|
+
* @maxLength 1000
|
|
595
|
+
*/
|
|
596
|
+
chargesDescription?: string | null;
|
|
469
597
|
}
|
|
470
598
|
export interface SubscriptionSettings {
|
|
471
599
|
/** Frequency of recurring payment. */
|
|
472
600
|
frequency?: V2SubscriptionFrequency;
|
|
473
|
-
/**
|
|
601
|
+
/**
|
|
602
|
+
* Interval of recurring payment.
|
|
603
|
+
* @min 1
|
|
604
|
+
* @max 50
|
|
605
|
+
*/
|
|
474
606
|
interval?: number | null;
|
|
475
607
|
/** Whether subscription is renewed automatically at the end of each period. */
|
|
476
608
|
autoRenewal?: boolean;
|
|
477
|
-
/**
|
|
609
|
+
/**
|
|
610
|
+
* Number of billing cycles before subscription ends. Ignored if `autoRenewal: true`.
|
|
611
|
+
* @min 1
|
|
612
|
+
*/
|
|
478
613
|
billingCycles?: number | null;
|
|
479
614
|
/**
|
|
480
615
|
* Whether to allow the customer to cancel the subscription.
|
|
@@ -503,33 +638,52 @@ export declare enum V2SubscriptionFrequency {
|
|
|
503
638
|
export interface FreeTrialPeriod {
|
|
504
639
|
/** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
|
|
505
640
|
frequency?: V2SubscriptionFrequency;
|
|
506
|
-
/**
|
|
641
|
+
/**
|
|
642
|
+
* interval of period
|
|
643
|
+
* @min 1
|
|
644
|
+
* @max 50
|
|
645
|
+
*/
|
|
507
646
|
interval?: number;
|
|
508
647
|
}
|
|
509
648
|
export interface PriceDescription {
|
|
510
|
-
/**
|
|
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
|
+
*/
|
|
511
654
|
original?: string;
|
|
512
655
|
/**
|
|
513
656
|
* Price description translated into the buyer's language.
|
|
514
657
|
*
|
|
515
658
|
* Default: Same as `original`.
|
|
659
|
+
* @minLength 1
|
|
660
|
+
* @maxLength 100
|
|
516
661
|
*/
|
|
517
662
|
translated?: string | null;
|
|
518
663
|
}
|
|
519
664
|
export interface LocationAndQuantity {
|
|
520
|
-
/**
|
|
665
|
+
/**
|
|
666
|
+
* Location id in the associated owner app.
|
|
667
|
+
* @format GUID
|
|
668
|
+
*/
|
|
521
669
|
_id?: string;
|
|
522
670
|
/**
|
|
523
671
|
* Location owner app, if not provided then the site business info locations will be used.
|
|
672
|
+
* @format GUID
|
|
524
673
|
* @deprecated Location owner app, if not provided then the site business info locations will be used.
|
|
525
674
|
* @targetRemovalDate 2025-03-01
|
|
526
675
|
*/
|
|
527
676
|
appId?: string | null;
|
|
528
|
-
/**
|
|
677
|
+
/**
|
|
678
|
+
* Quantity for specific location.
|
|
679
|
+
* @min 1
|
|
680
|
+
* @max 100000
|
|
681
|
+
*/
|
|
529
682
|
quantity?: number;
|
|
530
683
|
/**
|
|
531
684
|
* Location name.
|
|
532
685
|
* @internal
|
|
686
|
+
* @maxLength 500
|
|
533
687
|
* @readonly
|
|
534
688
|
*/
|
|
535
689
|
name?: string | null;
|
|
@@ -562,20 +716,38 @@ export interface ExtendedFields {
|
|
|
562
716
|
}
|
|
563
717
|
/** Buyer Info */
|
|
564
718
|
export interface BuyerInfo extends BuyerInfoIdOneOf {
|
|
565
|
-
/**
|
|
719
|
+
/**
|
|
720
|
+
* Visitor ID (if site visitor is not a member).
|
|
721
|
+
* @format GUID
|
|
722
|
+
*/
|
|
566
723
|
visitorId?: string;
|
|
567
|
-
/**
|
|
724
|
+
/**
|
|
725
|
+
* Member ID (if site visitor is a site member).
|
|
726
|
+
* @format GUID
|
|
727
|
+
*/
|
|
568
728
|
memberId?: string;
|
|
569
|
-
/**
|
|
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
|
+
*/
|
|
570
733
|
contactId?: string | null;
|
|
571
|
-
/**
|
|
734
|
+
/**
|
|
735
|
+
* Buyer email address.
|
|
736
|
+
* @format EMAIL
|
|
737
|
+
*/
|
|
572
738
|
email?: string | null;
|
|
573
739
|
}
|
|
574
740
|
/** @oneof */
|
|
575
741
|
export interface BuyerInfoIdOneOf {
|
|
576
|
-
/**
|
|
742
|
+
/**
|
|
743
|
+
* Visitor ID (if site visitor is not a member).
|
|
744
|
+
* @format GUID
|
|
745
|
+
*/
|
|
577
746
|
visitorId?: string;
|
|
578
|
-
/**
|
|
747
|
+
/**
|
|
748
|
+
* Member ID (if site visitor is a site member).
|
|
749
|
+
* @format GUID
|
|
750
|
+
*/
|
|
579
751
|
memberId?: string;
|
|
580
752
|
}
|
|
581
753
|
export declare enum WeightUnit {
|
|
@@ -609,19 +781,37 @@ export interface AddressWithContact {
|
|
|
609
781
|
}
|
|
610
782
|
/** Physical address */
|
|
611
783
|
export interface Address {
|
|
612
|
-
/**
|
|
784
|
+
/**
|
|
785
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
786
|
+
* @format COUNTRY
|
|
787
|
+
*/
|
|
613
788
|
country?: string | null;
|
|
614
|
-
/**
|
|
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
|
+
*/
|
|
615
793
|
subdivision?: string | null;
|
|
616
|
-
/**
|
|
794
|
+
/**
|
|
795
|
+
* City name.
|
|
796
|
+
* @maxLength 50
|
|
797
|
+
*/
|
|
617
798
|
city?: string | null;
|
|
618
|
-
/**
|
|
799
|
+
/**
|
|
800
|
+
* Postal or zip code.
|
|
801
|
+
* @maxLength 50
|
|
802
|
+
*/
|
|
619
803
|
postalCode?: string | null;
|
|
620
804
|
/** Street address. */
|
|
621
805
|
streetAddress?: StreetAddress;
|
|
622
|
-
/**
|
|
806
|
+
/**
|
|
807
|
+
* Main address line (usually street name and number).
|
|
808
|
+
* @maxLength 150
|
|
809
|
+
*/
|
|
623
810
|
addressLine1?: string | null;
|
|
624
|
-
/**
|
|
811
|
+
/**
|
|
812
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
813
|
+
* @maxLength 100
|
|
814
|
+
*/
|
|
625
815
|
addressLine2?: string | null;
|
|
626
816
|
/**
|
|
627
817
|
* Country's full name.
|
|
@@ -648,13 +838,25 @@ export interface AddressLocation {
|
|
|
648
838
|
}
|
|
649
839
|
/** Full contact details for an address */
|
|
650
840
|
export interface FullAddressContactDetails {
|
|
651
|
-
/**
|
|
841
|
+
/**
|
|
842
|
+
* First name.
|
|
843
|
+
* @maxLength 100
|
|
844
|
+
*/
|
|
652
845
|
firstName?: string | null;
|
|
653
|
-
/**
|
|
846
|
+
/**
|
|
847
|
+
* Last name.
|
|
848
|
+
* @maxLength 100
|
|
849
|
+
*/
|
|
654
850
|
lastName?: string | null;
|
|
655
|
-
/**
|
|
851
|
+
/**
|
|
852
|
+
* Phone number.
|
|
853
|
+
* @format PHONE
|
|
854
|
+
*/
|
|
656
855
|
phone?: string | null;
|
|
657
|
-
/**
|
|
856
|
+
/**
|
|
857
|
+
* Company name.
|
|
858
|
+
* @maxLength 1000
|
|
859
|
+
*/
|
|
658
860
|
company?: string | null;
|
|
659
861
|
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
660
862
|
vatId?: VatId;
|
|
@@ -680,13 +882,22 @@ export declare enum VatType {
|
|
|
680
882
|
CNPJ = "CNPJ"
|
|
681
883
|
}
|
|
682
884
|
export interface ShippingInformation {
|
|
683
|
-
/**
|
|
885
|
+
/**
|
|
886
|
+
* App Def Id of external provider which was a source of shipping info
|
|
887
|
+
* @minLength 1
|
|
888
|
+
* @maxLength 100
|
|
889
|
+
*/
|
|
684
890
|
carrierId?: string | null;
|
|
685
|
-
/**
|
|
891
|
+
/**
|
|
892
|
+
* Unique code (or ID) of selected shipping option. For example, `"usps_std_overnight"`.
|
|
893
|
+
* @minLength 1
|
|
894
|
+
* @maxLength 100
|
|
895
|
+
*/
|
|
686
896
|
code?: string | null;
|
|
687
897
|
/**
|
|
688
898
|
* Shipping option title.
|
|
689
899
|
* For example, `"USPS Standard Overnight Delivery"`, `"Standard"` or `"First-Class Package International"`.
|
|
900
|
+
* @maxLength 250
|
|
690
901
|
*/
|
|
691
902
|
title?: string;
|
|
692
903
|
/** Shipping logistics. */
|
|
@@ -701,9 +912,15 @@ export interface DeliveryLogistics extends DeliveryLogisticsAddressOneOf {
|
|
|
701
912
|
shippingDestination?: AddressWithContact;
|
|
702
913
|
/** Pickup details. */
|
|
703
914
|
pickupDetails?: PickupDetails;
|
|
704
|
-
/**
|
|
915
|
+
/**
|
|
916
|
+
* Expected delivery time in free text. For example, `"3-5 business days"`.
|
|
917
|
+
* @maxLength 500
|
|
918
|
+
*/
|
|
705
919
|
deliveryTime?: string | null;
|
|
706
|
-
/**
|
|
920
|
+
/**
|
|
921
|
+
* Instructions for carrier. For example, `"Please knock on the door. If unanswered, please call contact number. Thanks."`.
|
|
922
|
+
* @maxLength 1000
|
|
923
|
+
*/
|
|
707
924
|
instructions?: string | null;
|
|
708
925
|
/**
|
|
709
926
|
* Deprecated - Latest expected delivery date and time in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
|
|
@@ -728,19 +945,37 @@ export interface PickupDetails {
|
|
|
728
945
|
}
|
|
729
946
|
/** Physical address */
|
|
730
947
|
export interface PickupAddress {
|
|
731
|
-
/**
|
|
948
|
+
/**
|
|
949
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
950
|
+
* @format COUNTRY
|
|
951
|
+
*/
|
|
732
952
|
country?: string | null;
|
|
733
|
-
/**
|
|
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
|
+
*/
|
|
734
957
|
subdivision?: string | null;
|
|
735
|
-
/**
|
|
958
|
+
/**
|
|
959
|
+
* City name.
|
|
960
|
+
* @maxLength 1000
|
|
961
|
+
*/
|
|
736
962
|
city?: string | null;
|
|
737
|
-
/**
|
|
963
|
+
/**
|
|
964
|
+
* Postal or zip code.
|
|
965
|
+
* @maxLength 1000
|
|
966
|
+
*/
|
|
738
967
|
postalCode?: string | null;
|
|
739
968
|
/** Street address object, with number, name, and apartment number in separate fields. */
|
|
740
969
|
streetAddress?: StreetAddress;
|
|
741
|
-
/**
|
|
970
|
+
/**
|
|
971
|
+
* Main address line (usually street name and number).
|
|
972
|
+
* @maxLength 1000
|
|
973
|
+
*/
|
|
742
974
|
addressLine1?: string | null;
|
|
743
|
-
/**
|
|
975
|
+
/**
|
|
976
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
977
|
+
* @maxLength 1000
|
|
978
|
+
*/
|
|
744
979
|
addressLine2?: string | null;
|
|
745
980
|
/**
|
|
746
981
|
* Country's full name.
|
|
@@ -786,13 +1021,19 @@ export interface ShippingPrice {
|
|
|
786
1021
|
discount?: Price;
|
|
787
1022
|
}
|
|
788
1023
|
export interface ShippingRegion {
|
|
789
|
-
/**
|
|
1024
|
+
/**
|
|
1025
|
+
* Name of shipping region. For example, `"Metropolitan London"`, or `"Outer Melbourne suburbs"`.
|
|
1026
|
+
* @maxLength 100
|
|
1027
|
+
*/
|
|
790
1028
|
name?: string | null;
|
|
791
1029
|
}
|
|
792
1030
|
export interface OrderTaxInfo {
|
|
793
1031
|
/** Calculated tax, added from line items. */
|
|
794
1032
|
totalTax?: Price;
|
|
795
|
-
/**
|
|
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
|
+
*/
|
|
796
1037
|
taxBreakdown?: OrderTaxBreakdown[];
|
|
797
1038
|
/**
|
|
798
1039
|
* Whether the order is exempt from tax calculations.
|
|
@@ -807,15 +1048,28 @@ export interface OrderTaxInfo {
|
|
|
807
1048
|
* Tax breakdown is the tax amount split to the tax authorities that applied on the line item.
|
|
808
1049
|
*/
|
|
809
1050
|
export interface OrderTaxBreakdown {
|
|
810
|
-
/**
|
|
1051
|
+
/**
|
|
1052
|
+
* The name of the tax against which this tax amount was calculated.
|
|
1053
|
+
* @maxLength 200
|
|
1054
|
+
*/
|
|
811
1055
|
taxName?: string;
|
|
812
|
-
/**
|
|
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
|
+
*/
|
|
813
1060
|
taxType?: string;
|
|
814
|
-
/**
|
|
1061
|
+
/**
|
|
1062
|
+
* The name of the jurisdiction in which this tax detail applies.
|
|
1063
|
+
* @maxLength 200
|
|
1064
|
+
*/
|
|
815
1065
|
jurisdiction?: string;
|
|
816
1066
|
/** The type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
817
1067
|
jurisdictionType?: JurisdictionType;
|
|
818
|
-
/**
|
|
1068
|
+
/**
|
|
1069
|
+
* The rate at which this tax detail was calculated.
|
|
1070
|
+
* @format DECIMAL_VALUE
|
|
1071
|
+
* @decimalValue options { gte:0, maxScale:6 }
|
|
1072
|
+
*/
|
|
819
1073
|
rate?: string;
|
|
820
1074
|
/** The sum of all the tax from line items that calculated by the tax identifiers. */
|
|
821
1075
|
aggregatedTaxAmount?: Price;
|
|
@@ -837,18 +1091,26 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
837
1091
|
/**
|
|
838
1092
|
* IDs of line items discount applies to.
|
|
839
1093
|
* Deprecated. Use `line_item_discounts` instead.
|
|
1094
|
+
* @format GUID
|
|
1095
|
+
* @maxSize 1
|
|
840
1096
|
* @deprecated IDs of line items discount applies to.
|
|
841
1097
|
* Deprecated. Use `line_item_discounts` instead.
|
|
842
1098
|
* @replacedBy line_item_discounts
|
|
843
1099
|
* @targetRemovalDate 2024-10-30
|
|
844
1100
|
*/
|
|
845
1101
|
lineItemIds?: string[];
|
|
846
|
-
/**
|
|
1102
|
+
/**
|
|
1103
|
+
* Discount id.
|
|
1104
|
+
* @format GUID
|
|
1105
|
+
* @immutable
|
|
1106
|
+
*/
|
|
847
1107
|
_id?: string | null;
|
|
848
1108
|
/**
|
|
849
1109
|
* Number of subscription billing cycles the discount applies to.
|
|
850
1110
|
* If None and discount is linked to subscription line item, it applies to all cycles.
|
|
851
1111
|
* @internal
|
|
1112
|
+
* @min 1
|
|
1113
|
+
* @max 999
|
|
852
1114
|
*/
|
|
853
1115
|
subscriptionCycles?: number | null;
|
|
854
1116
|
}
|
|
@@ -883,13 +1145,18 @@ export interface MerchantDiscount extends MerchantDiscountMerchantDiscountReason
|
|
|
883
1145
|
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
884
1146
|
*/
|
|
885
1147
|
discountReason?: DiscountReason;
|
|
886
|
-
/**
|
|
1148
|
+
/**
|
|
1149
|
+
* Discount description as free text (optional).
|
|
1150
|
+
* @maxLength 200
|
|
1151
|
+
*/
|
|
887
1152
|
description?: string | null;
|
|
888
1153
|
/** Discount amount. */
|
|
889
1154
|
amount?: Price;
|
|
890
1155
|
/**
|
|
891
1156
|
* Discount percentage.
|
|
892
1157
|
* @internal
|
|
1158
|
+
* @format DECIMAL_VALUE
|
|
1159
|
+
* @decimalValue options { gte:0, lte:100, maxScale:2 }
|
|
893
1160
|
*/
|
|
894
1161
|
percentage?: string | null;
|
|
895
1162
|
}
|
|
@@ -900,7 +1167,10 @@ export interface MerchantDiscountMerchantDiscountReasonOneOf {
|
|
|
900
1167
|
* * `"ITEMS_EXCHANGE"` - exchange balance acquired as a result of items exchange.
|
|
901
1168
|
*/
|
|
902
1169
|
discountReason?: DiscountReason;
|
|
903
|
-
/**
|
|
1170
|
+
/**
|
|
1171
|
+
* Discount description as free text (optional).
|
|
1172
|
+
* @maxLength 200
|
|
1173
|
+
*/
|
|
904
1174
|
description?: string | null;
|
|
905
1175
|
}
|
|
906
1176
|
export declare enum DiscountReason {
|
|
@@ -908,7 +1178,10 @@ export declare enum DiscountReason {
|
|
|
908
1178
|
EXCHANGED_ITEMS = "EXCHANGED_ITEMS"
|
|
909
1179
|
}
|
|
910
1180
|
export interface DiscountRule {
|
|
911
|
-
/**
|
|
1181
|
+
/**
|
|
1182
|
+
* Discount rule ID
|
|
1183
|
+
* @format GUID
|
|
1184
|
+
*/
|
|
912
1185
|
_id?: string;
|
|
913
1186
|
/** Discount rule name */
|
|
914
1187
|
name?: DiscountRuleName;
|
|
@@ -916,13 +1189,24 @@ export interface DiscountRule {
|
|
|
916
1189
|
amount?: Price;
|
|
917
1190
|
}
|
|
918
1191
|
export interface DiscountRuleName {
|
|
919
|
-
/**
|
|
1192
|
+
/**
|
|
1193
|
+
* Original discount rule name (in site's default language).
|
|
1194
|
+
* @minLength 1
|
|
1195
|
+
* @maxLength 256
|
|
1196
|
+
*/
|
|
920
1197
|
original?: string;
|
|
921
|
-
/**
|
|
1198
|
+
/**
|
|
1199
|
+
* Translated discount rule name according to buyer language. Defaults to `original` when not provided.
|
|
1200
|
+
* @minLength 1
|
|
1201
|
+
* @maxLength 500
|
|
1202
|
+
*/
|
|
922
1203
|
translated?: string | null;
|
|
923
1204
|
}
|
|
924
1205
|
export interface LineItemDiscount {
|
|
925
|
-
/**
|
|
1206
|
+
/**
|
|
1207
|
+
* ID of line item the discount applies to.
|
|
1208
|
+
* @format GUID
|
|
1209
|
+
*/
|
|
926
1210
|
_id?: string;
|
|
927
1211
|
/** Total discount for this line item. */
|
|
928
1212
|
totalDiscount?: Price;
|
|
@@ -930,9 +1214,15 @@ export interface LineItemDiscount {
|
|
|
930
1214
|
export interface ChannelInfo {
|
|
931
1215
|
/** Sales channel that submitted the order. */
|
|
932
1216
|
type?: ChannelType;
|
|
933
|
-
/**
|
|
1217
|
+
/**
|
|
1218
|
+
* Reference to an order ID from an external system.
|
|
1219
|
+
* @maxLength 100
|
|
1220
|
+
*/
|
|
934
1221
|
externalOrderId?: string | null;
|
|
935
|
-
/**
|
|
1222
|
+
/**
|
|
1223
|
+
* URL to the order in the external system.
|
|
1224
|
+
* @maxLength 300
|
|
1225
|
+
*/
|
|
936
1226
|
externalOrderUrl?: string | null;
|
|
937
1227
|
}
|
|
938
1228
|
export declare enum ChannelType {
|
|
@@ -972,37 +1262,63 @@ export declare enum ChannelType {
|
|
|
972
1262
|
export interface CustomField {
|
|
973
1263
|
/** Custom field value. */
|
|
974
1264
|
value?: any;
|
|
975
|
-
/**
|
|
1265
|
+
/**
|
|
1266
|
+
* Custom field title.
|
|
1267
|
+
* @minLength 1
|
|
1268
|
+
* @maxLength 500
|
|
1269
|
+
*/
|
|
976
1270
|
title?: string;
|
|
977
|
-
/**
|
|
1271
|
+
/**
|
|
1272
|
+
* Translated custom field title.
|
|
1273
|
+
* @minLength 1
|
|
1274
|
+
* @maxLength 500
|
|
1275
|
+
*/
|
|
978
1276
|
translatedTitle?: string | null;
|
|
979
1277
|
}
|
|
980
1278
|
export interface AdditionalFee {
|
|
981
|
-
/**
|
|
1279
|
+
/**
|
|
1280
|
+
* Additional fee's unique code for future processing.
|
|
1281
|
+
* @minLength 1
|
|
1282
|
+
* @maxLength 100
|
|
1283
|
+
*/
|
|
982
1284
|
code?: string | null;
|
|
983
|
-
/**
|
|
1285
|
+
/**
|
|
1286
|
+
* Name of additional fee.
|
|
1287
|
+
* @minLength 1
|
|
1288
|
+
* @maxLength 50
|
|
1289
|
+
*/
|
|
984
1290
|
name?: string;
|
|
985
1291
|
/** Additional fee's price. */
|
|
986
1292
|
price?: Price;
|
|
987
1293
|
/** Tax details. */
|
|
988
1294
|
taxDetails?: ItemTaxFullDetails;
|
|
989
|
-
/**
|
|
1295
|
+
/**
|
|
1296
|
+
* SPI implementer's `appId`.
|
|
1297
|
+
* @format GUID
|
|
1298
|
+
*/
|
|
990
1299
|
providerAppId?: string | null;
|
|
991
1300
|
/** Additional fee's price before tax. */
|
|
992
1301
|
priceBeforeTax?: Price;
|
|
993
1302
|
/** Additional fee's price after tax. */
|
|
994
1303
|
priceAfterTax?: Price;
|
|
995
|
-
/**
|
|
1304
|
+
/**
|
|
1305
|
+
* Additional fee's id.
|
|
1306
|
+
* @format GUID
|
|
1307
|
+
* @immutable
|
|
1308
|
+
*/
|
|
996
1309
|
_id?: string;
|
|
997
1310
|
/**
|
|
998
1311
|
* Optional - Line items associated with this additional fee.
|
|
999
1312
|
* If no `lineItemIds` are provided, the fee will be associated with the whole cart/checkout/order.
|
|
1313
|
+
* @format GUID
|
|
1000
1314
|
*/
|
|
1001
1315
|
lineItemIds?: string[];
|
|
1002
1316
|
/**
|
|
1003
1317
|
* Number of subscription billing cycles the additional fee applies to.
|
|
1004
1318
|
* If None and additional fee is linked to subscription line item, it applies to all cycles.
|
|
1005
1319
|
* @internal
|
|
1320
|
+
* @min 1
|
|
1321
|
+
* @max 999
|
|
1006
1322
|
*/
|
|
1007
1323
|
subscriptionCycles?: number | null;
|
|
1008
1324
|
}
|
|
@@ -1010,10 +1326,13 @@ export interface Location {
|
|
|
1010
1326
|
/**
|
|
1011
1327
|
* Location ID.
|
|
1012
1328
|
* Learn more about the [Wix Locations API](https://dev.wix.com/docs/rest/business-management/locations/introduction).
|
|
1329
|
+
* @format GUID
|
|
1013
1330
|
*/
|
|
1014
1331
|
_id?: string;
|
|
1015
1332
|
/**
|
|
1016
1333
|
* Location name.
|
|
1334
|
+
* @minLength 1
|
|
1335
|
+
* @maxLength 500
|
|
1017
1336
|
* @readonly
|
|
1018
1337
|
*/
|
|
1019
1338
|
name?: string;
|
|
@@ -1027,7 +1346,10 @@ export interface CreateSubscriptionContractResponse {
|
|
|
1027
1346
|
subscriptionContract?: SubscriptionContract;
|
|
1028
1347
|
}
|
|
1029
1348
|
export interface GetSubscriptionContractRequest {
|
|
1030
|
-
/**
|
|
1349
|
+
/**
|
|
1350
|
+
* ID of the SubscriptionContract to retrieve.
|
|
1351
|
+
* @format GUID
|
|
1352
|
+
*/
|
|
1031
1353
|
subscriptionContractId: string;
|
|
1032
1354
|
}
|
|
1033
1355
|
export interface GetSubscriptionContractResponse {
|
|
@@ -1063,6 +1385,7 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
1063
1385
|
* Sort object in the following format:
|
|
1064
1386
|
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
1065
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
|
|
1066
1389
|
*/
|
|
1067
1390
|
sort?: Sorting[];
|
|
1068
1391
|
}
|
|
@@ -1072,7 +1395,10 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
1072
1395
|
cursorPaging?: CursorPaging;
|
|
1073
1396
|
}
|
|
1074
1397
|
export interface Sorting {
|
|
1075
|
-
/**
|
|
1398
|
+
/**
|
|
1399
|
+
* Name of the field to sort by.
|
|
1400
|
+
* @maxLength 512
|
|
1401
|
+
*/
|
|
1076
1402
|
fieldName?: string;
|
|
1077
1403
|
/** Sort order. */
|
|
1078
1404
|
order?: SortOrder;
|
|
@@ -1082,13 +1408,17 @@ export declare enum SortOrder {
|
|
|
1082
1408
|
DESC = "DESC"
|
|
1083
1409
|
}
|
|
1084
1410
|
export interface CursorPaging {
|
|
1085
|
-
/**
|
|
1411
|
+
/**
|
|
1412
|
+
* Maximum number of items to return in the results.
|
|
1413
|
+
* @max 100
|
|
1414
|
+
*/
|
|
1086
1415
|
limit?: number | null;
|
|
1087
1416
|
/**
|
|
1088
1417
|
* Pointer to the next or previous page in the list of results.
|
|
1089
1418
|
*
|
|
1090
1419
|
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1091
1420
|
* Not relevant for the first request.
|
|
1421
|
+
* @maxLength 16000
|
|
1092
1422
|
*/
|
|
1093
1423
|
cursor?: string | null;
|
|
1094
1424
|
}
|
|
@@ -1112,9 +1442,15 @@ export interface CursorPagingMetadata {
|
|
|
1112
1442
|
hasNext?: boolean | null;
|
|
1113
1443
|
}
|
|
1114
1444
|
export interface Cursors {
|
|
1115
|
-
/**
|
|
1445
|
+
/**
|
|
1446
|
+
* Cursor string pointing to the next page in the list of results.
|
|
1447
|
+
* @maxLength 16000
|
|
1448
|
+
*/
|
|
1116
1449
|
next?: string | null;
|
|
1117
|
-
/**
|
|
1450
|
+
/**
|
|
1451
|
+
* Cursor pointing to the previous page in the list of results.
|
|
1452
|
+
* @maxLength 16000
|
|
1453
|
+
*/
|
|
1118
1454
|
prev?: string | null;
|
|
1119
1455
|
}
|
|
1120
1456
|
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
@@ -1190,9 +1526,15 @@ export interface ActionEvent {
|
|
|
1190
1526
|
export interface Empty {
|
|
1191
1527
|
}
|
|
1192
1528
|
export interface MessageEnvelope {
|
|
1193
|
-
/**
|
|
1529
|
+
/**
|
|
1530
|
+
* App instance ID.
|
|
1531
|
+
* @format GUID
|
|
1532
|
+
*/
|
|
1194
1533
|
instanceId?: string | null;
|
|
1195
|
-
/**
|
|
1534
|
+
/**
|
|
1535
|
+
* Event type.
|
|
1536
|
+
* @maxLength 150
|
|
1537
|
+
*/
|
|
1196
1538
|
eventType?: string;
|
|
1197
1539
|
/** The identification type and identity data. */
|
|
1198
1540
|
identity?: IdentificationData;
|
|
@@ -1200,26 +1542,50 @@ export interface MessageEnvelope {
|
|
|
1200
1542
|
data?: string;
|
|
1201
1543
|
}
|
|
1202
1544
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1203
|
-
/**
|
|
1545
|
+
/**
|
|
1546
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1547
|
+
* @format GUID
|
|
1548
|
+
*/
|
|
1204
1549
|
anonymousVisitorId?: string;
|
|
1205
|
-
/**
|
|
1550
|
+
/**
|
|
1551
|
+
* ID of a site visitor that has logged in to the site.
|
|
1552
|
+
* @format GUID
|
|
1553
|
+
*/
|
|
1206
1554
|
memberId?: string;
|
|
1207
|
-
/**
|
|
1555
|
+
/**
|
|
1556
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1557
|
+
* @format GUID
|
|
1558
|
+
*/
|
|
1208
1559
|
wixUserId?: string;
|
|
1209
|
-
/**
|
|
1560
|
+
/**
|
|
1561
|
+
* ID of an app.
|
|
1562
|
+
* @format GUID
|
|
1563
|
+
*/
|
|
1210
1564
|
appId?: string;
|
|
1211
1565
|
/** @readonly */
|
|
1212
1566
|
identityType?: WebhookIdentityType;
|
|
1213
1567
|
}
|
|
1214
1568
|
/** @oneof */
|
|
1215
1569
|
export interface IdentificationDataIdOneOf {
|
|
1216
|
-
/**
|
|
1570
|
+
/**
|
|
1571
|
+
* ID of a site visitor that has not logged in to the site.
|
|
1572
|
+
* @format GUID
|
|
1573
|
+
*/
|
|
1217
1574
|
anonymousVisitorId?: string;
|
|
1218
|
-
/**
|
|
1575
|
+
/**
|
|
1576
|
+
* ID of a site visitor that has logged in to the site.
|
|
1577
|
+
* @format GUID
|
|
1578
|
+
*/
|
|
1219
1579
|
memberId?: string;
|
|
1220
|
-
/**
|
|
1580
|
+
/**
|
|
1581
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
1582
|
+
* @format GUID
|
|
1583
|
+
*/
|
|
1221
1584
|
wixUserId?: string;
|
|
1222
|
-
/**
|
|
1585
|
+
/**
|
|
1586
|
+
* ID of an app.
|
|
1587
|
+
* @format GUID
|
|
1588
|
+
*/
|
|
1223
1589
|
appId?: string;
|
|
1224
1590
|
}
|
|
1225
1591
|
export declare enum WebhookIdentityType {
|
|
@@ -1498,9 +1864,15 @@ export interface QuerySubscriptionContractsResponseNonNullableFields {
|
|
|
1498
1864
|
subscriptionContracts: SubscriptionContractNonNullableFields[];
|
|
1499
1865
|
}
|
|
1500
1866
|
export interface BaseEventMetadata {
|
|
1501
|
-
/**
|
|
1867
|
+
/**
|
|
1868
|
+
* App instance ID.
|
|
1869
|
+
* @format GUID
|
|
1870
|
+
*/
|
|
1502
1871
|
instanceId?: string | null;
|
|
1503
|
-
/**
|
|
1872
|
+
/**
|
|
1873
|
+
* Event type.
|
|
1874
|
+
* @maxLength 150
|
|
1875
|
+
*/
|
|
1504
1876
|
eventType?: string;
|
|
1505
1877
|
/** The identification type and identity data. */
|
|
1506
1878
|
identity?: IdentificationData;
|
|
@@ -1551,11 +1923,14 @@ export interface SubscriptionContractCreatedEnvelope {
|
|
|
1551
1923
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1552
1924
|
* @permissionScope Read eCommerce - all read permissions
|
|
1553
1925
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1926
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1927
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1554
1928
|
* @permissionScope Manage eCommerce - all permissions
|
|
1555
1929
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1556
1930
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1557
1931
|
* @webhook
|
|
1558
1932
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_created
|
|
1933
|
+
* @slug created
|
|
1559
1934
|
* @documentationMaturity preview
|
|
1560
1935
|
*/
|
|
1561
1936
|
export declare function onSubscriptionContractCreated(handler: (event: SubscriptionContractCreatedEnvelope) => void | Promise<void>): void;
|
|
@@ -1566,11 +1941,14 @@ export interface SubscriptionContractDeletedEnvelope {
|
|
|
1566
1941
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1567
1942
|
* @permissionScope Read eCommerce - all read permissions
|
|
1568
1943
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1944
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1945
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1569
1946
|
* @permissionScope Manage eCommerce - all permissions
|
|
1570
1947
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1571
1948
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1572
1949
|
* @webhook
|
|
1573
1950
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_deleted
|
|
1951
|
+
* @slug deleted
|
|
1574
1952
|
* @documentationMaturity preview
|
|
1575
1953
|
*/
|
|
1576
1954
|
export declare function onSubscriptionContractDeleted(handler: (event: SubscriptionContractDeletedEnvelope) => void | Promise<void>): void;
|
|
@@ -1582,11 +1960,14 @@ export interface SubscriptionContractUpdatedEnvelope {
|
|
|
1582
1960
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1583
1961
|
* @permissionScope Read eCommerce - all read permissions
|
|
1584
1962
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1963
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1964
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1585
1965
|
* @permissionScope Manage eCommerce - all permissions
|
|
1586
1966
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1587
1967
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|
|
1588
1968
|
* @webhook
|
|
1589
1969
|
* @eventType wix.ecom.subscription_contracts.v1.subscription_contract_updated
|
|
1970
|
+
* @slug updated
|
|
1590
1971
|
* @documentationMaturity preview
|
|
1591
1972
|
*/
|
|
1592
1973
|
export declare function onSubscriptionContractUpdated(handler: (event: SubscriptionContractUpdatedEnvelope) => void | Promise<void>): void;
|
|
@@ -1601,6 +1982,8 @@ export declare function onSubscriptionContractUpdated(handler: (event: Subscript
|
|
|
1601
1982
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1602
1983
|
* @permissionScope Read eCommerce - all read permissions
|
|
1603
1984
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
1985
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
1986
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1604
1987
|
* @permissionScope Manage eCommerce - all permissions
|
|
1605
1988
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1606
1989
|
* @applicableIdentity APP
|
|
@@ -1623,6 +2006,8 @@ export declare function getSubscriptionContract(subscriptionContractId: string):
|
|
|
1623
2006
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
1624
2007
|
* @permissionScope Read eCommerce - all read permissions
|
|
1625
2008
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
|
|
2009
|
+
* @permissionScope Manage Restaurants - all permissions
|
|
2010
|
+
* @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
|
|
1626
2011
|
* @permissionScope Manage eCommerce - all permissions
|
|
1627
2012
|
* @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
|
|
1628
2013
|
* @permissionId ECOM.SUBSCRIPTION_CONTRACT_READ
|