@wix/auto_sdk_ecom_validations 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/src/service-plugins-types.d.ts +252 -58
- package/build/cjs/src/service-plugins-types.js +3 -3
- package/build/cjs/src/service-plugins-types.js.map +1 -1
- package/build/es/src/service-plugins-types.d.ts +252 -58
- package/build/es/src/service-plugins-types.js +3 -3
- package/build/es/src/service-plugins-types.js.map +1 -1
- package/build/internal/cjs/src/service-plugins-types.d.ts +252 -58
- package/build/internal/cjs/src/service-plugins-types.js +3 -3
- package/build/internal/cjs/src/service-plugins-types.js.map +1 -1
- package/build/internal/es/src/service-plugins-types.d.ts +252 -58
- package/build/internal/es/src/service-plugins-types.js +3 -3
- package/build/internal/es/src/service-plugins-types.js.map +1 -1
- package/package.json +2 -2
|
@@ -7,7 +7,10 @@ export interface GetValidationViolationsRequest {
|
|
|
7
7
|
export interface SourceInfo {
|
|
8
8
|
/** Source of the request. */
|
|
9
9
|
source?: Source;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Persistent ID that correlates between the various eCommerce elements: cart, checkout, and order.
|
|
12
|
+
* @format GUID
|
|
13
|
+
*/
|
|
11
14
|
purchaseFlowId?: string | null;
|
|
12
15
|
/** The stage at which the service plugin is called. */
|
|
13
16
|
stage?: Stage;
|
|
@@ -43,7 +46,10 @@ export declare enum CheckoutStage {
|
|
|
43
46
|
export interface ValidationInfo {
|
|
44
47
|
/** Buyer details. */
|
|
45
48
|
buyerDetails?: BuyerDetails;
|
|
46
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Line items. Max: 300 line items
|
|
51
|
+
* @maxSize 300
|
|
52
|
+
*/
|
|
47
53
|
lineItems?: LineItem[];
|
|
48
54
|
/**
|
|
49
55
|
* Applied gift card details.
|
|
@@ -66,22 +72,35 @@ export interface ValidationInfo {
|
|
|
66
72
|
shippingInfo?: ShippingInfo;
|
|
67
73
|
/** Custom fields. */
|
|
68
74
|
customFields?: CustomFields;
|
|
69
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Applied discounts.
|
|
77
|
+
* @maxSize 320
|
|
78
|
+
*/
|
|
70
79
|
appliedDiscounts?: AppliedDiscount[];
|
|
71
80
|
}
|
|
72
81
|
export interface BuyerDetails {
|
|
73
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Buyer's email address.
|
|
84
|
+
* @format EMAIL
|
|
85
|
+
*/
|
|
74
86
|
email?: string | null;
|
|
75
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Contact ID if one exists.
|
|
89
|
+
* @format GUID
|
|
90
|
+
*/
|
|
76
91
|
contactId?: string | null;
|
|
77
92
|
}
|
|
78
93
|
export interface LineItem {
|
|
79
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* Line item ID.
|
|
96
|
+
* @format GUID
|
|
97
|
+
*/
|
|
80
98
|
_id?: string | null;
|
|
81
99
|
/**
|
|
82
100
|
* Item quantity.
|
|
83
101
|
* Min: `0`
|
|
84
102
|
* Max: `100000`
|
|
103
|
+
* @max 100000
|
|
85
104
|
*/
|
|
86
105
|
quantity?: number;
|
|
87
106
|
/** Catalog and item reference. Includes IDs for the item and the catalog it came from, as well as further optional info. */
|
|
@@ -106,7 +125,11 @@ export interface LineItem {
|
|
|
106
125
|
}
|
|
107
126
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
108
127
|
export interface CatalogReference {
|
|
109
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* ID of the item within the catalog it belongs to.
|
|
130
|
+
* @minLength 1
|
|
131
|
+
* @maxLength 36
|
|
132
|
+
*/
|
|
110
133
|
catalogItemId?: string;
|
|
111
134
|
/**
|
|
112
135
|
* ID of the app providing the catalog.
|
|
@@ -117,12 +140,13 @@ export interface CatalogReference {
|
|
|
117
140
|
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
118
141
|
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
119
142
|
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
143
|
+
* @minLength 1
|
|
120
144
|
*/
|
|
121
145
|
appId?: string;
|
|
122
146
|
/**
|
|
123
147
|
* Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
|
|
124
148
|
*
|
|
125
|
-
* For products and variants from a Wix Stores catalog, learn more about
|
|
149
|
+
* For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
|
|
126
150
|
*/
|
|
127
151
|
options?: Record<string, any> | null;
|
|
128
152
|
}
|
|
@@ -132,6 +156,8 @@ export interface ProductName {
|
|
|
132
156
|
*
|
|
133
157
|
* Min: 1 character.
|
|
134
158
|
* Max: 200 characters.
|
|
159
|
+
* @minLength 1
|
|
160
|
+
* @maxLength 200
|
|
135
161
|
*/
|
|
136
162
|
original?: string;
|
|
137
163
|
/**
|
|
@@ -140,15 +166,21 @@ export interface ProductName {
|
|
|
140
166
|
* Min: 1 character.
|
|
141
167
|
* Max: 400 characters.
|
|
142
168
|
* Default: Same as `original`.
|
|
169
|
+
* @minLength 1
|
|
170
|
+
* @maxLength 400
|
|
143
171
|
*/
|
|
144
172
|
translated?: string | null;
|
|
145
173
|
}
|
|
146
174
|
export interface MultiCurrencyPrice {
|
|
147
|
-
/**
|
|
175
|
+
/**
|
|
176
|
+
* Amount.
|
|
177
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
178
|
+
*/
|
|
148
179
|
amount?: string;
|
|
149
180
|
/**
|
|
150
181
|
* Converted amount.
|
|
151
182
|
* @readonly
|
|
183
|
+
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
152
184
|
*/
|
|
153
185
|
convertedAmount?: string;
|
|
154
186
|
/**
|
|
@@ -165,7 +197,10 @@ export interface MultiCurrencyPrice {
|
|
|
165
197
|
export interface PhysicalProperties {
|
|
166
198
|
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
167
199
|
weight?: number | null;
|
|
168
|
-
/**
|
|
200
|
+
/**
|
|
201
|
+
* Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
|
|
202
|
+
* @maxLength 40
|
|
203
|
+
*/
|
|
169
204
|
sku?: string | null;
|
|
170
205
|
/** Whether this line item is shippable. */
|
|
171
206
|
shippable?: boolean;
|
|
@@ -206,11 +241,16 @@ export interface SubscriptionSettings {
|
|
|
206
241
|
*
|
|
207
242
|
* Default: `1`.
|
|
208
243
|
* If SubscriptionFrequency is Day the minimum interval is 7
|
|
244
|
+
* @min 1
|
|
245
|
+
* @max 50
|
|
209
246
|
*/
|
|
210
247
|
interval?: number | null;
|
|
211
248
|
/** Whether subscription is renewed automatically at the end of each period. */
|
|
212
249
|
autoRenewal?: boolean;
|
|
213
|
-
/**
|
|
250
|
+
/**
|
|
251
|
+
* Number of billing cycles before subscription ends. Ignored if `autoRenewal` is `true`.
|
|
252
|
+
* @min 1
|
|
253
|
+
*/
|
|
214
254
|
billingCycles?: number | null;
|
|
215
255
|
}
|
|
216
256
|
/** Frequency unit of recurring payment */
|
|
@@ -224,23 +264,39 @@ export declare enum SubscriptionFrequency {
|
|
|
224
264
|
export interface FreeTrialPeriod {
|
|
225
265
|
/** Frequency of priod. Values: DAY, WEEK, MONTH, YEAR */
|
|
226
266
|
frequency?: SubscriptionFrequency;
|
|
227
|
-
/**
|
|
267
|
+
/**
|
|
268
|
+
* interval of period
|
|
269
|
+
* @min 1
|
|
270
|
+
* @max 50
|
|
271
|
+
*/
|
|
228
272
|
interval?: number;
|
|
229
273
|
}
|
|
230
274
|
export interface Title {
|
|
231
|
-
/**
|
|
275
|
+
/**
|
|
276
|
+
* Subscription option 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).
|
|
277
|
+
* @minLength 1
|
|
278
|
+
* @maxLength 150
|
|
279
|
+
*/
|
|
232
280
|
original?: string;
|
|
233
281
|
/**
|
|
234
282
|
* Subscription option name translated into the buyer's language.
|
|
235
283
|
*
|
|
236
284
|
* Default: Same as `original`.
|
|
285
|
+
* @minLength 1
|
|
286
|
+
* @maxLength 150
|
|
237
287
|
*/
|
|
238
288
|
translated?: string | null;
|
|
239
289
|
}
|
|
240
290
|
export interface Description {
|
|
241
|
-
/**
|
|
291
|
+
/**
|
|
292
|
+
* Subscription option description.
|
|
293
|
+
* @maxLength 500
|
|
294
|
+
*/
|
|
242
295
|
original?: string;
|
|
243
|
-
/**
|
|
296
|
+
/**
|
|
297
|
+
* Translated subscription option description.
|
|
298
|
+
* @maxLength 500
|
|
299
|
+
*/
|
|
244
300
|
translated?: string | null;
|
|
245
301
|
}
|
|
246
302
|
export interface LineItemPricesData {
|
|
@@ -268,25 +324,38 @@ export interface ItemTaxFullDetails {
|
|
|
268
324
|
totalTax?: MultiCurrencyPrice;
|
|
269
325
|
/** Indicates whether the price already includes tax. */
|
|
270
326
|
isTaxIncluded?: boolean | null;
|
|
271
|
-
/**
|
|
327
|
+
/**
|
|
328
|
+
* A detailed description of all the tax authorities applied on this item.
|
|
329
|
+
* @maxSize 1000
|
|
330
|
+
*/
|
|
272
331
|
taxBreakdown?: TaxBreakdown[];
|
|
273
332
|
}
|
|
274
333
|
export interface TaxBreakdown {
|
|
275
|
-
/**
|
|
334
|
+
/**
|
|
335
|
+
* The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
|
|
336
|
+
* @maxLength 200
|
|
337
|
+
*/
|
|
276
338
|
jurisdiction?: string | null;
|
|
277
339
|
/** The amount of this line item price that was considered nontaxable. (Decimal value) */
|
|
278
340
|
nonTaxableAmount?: MultiCurrencyPrice;
|
|
279
|
-
/**
|
|
341
|
+
/**
|
|
342
|
+
* The rate at which this tax detail was calculated, e.g 0.1000 signifies 10% tax and 2.0000 signifies 200% tax. (Decimal value)
|
|
343
|
+
* @decimalValue options { maxScale:6 }
|
|
344
|
+
*/
|
|
280
345
|
rate?: string | null;
|
|
281
346
|
/** The amount of tax estimated for this line item. (Decimal value) */
|
|
282
347
|
taxAmount?: MultiCurrencyPrice;
|
|
283
348
|
/** The taxable amount of this line item. */
|
|
284
349
|
taxableAmount?: MultiCurrencyPrice;
|
|
285
|
-
/**
|
|
350
|
+
/**
|
|
351
|
+
* The type of tax that was calculated. Depends on the jurisdiction's tax laws. For example, "Sales Tax", "Income Tax", "Value Added Tax", etc.
|
|
352
|
+
* @maxLength 200
|
|
353
|
+
*/
|
|
286
354
|
taxType?: string | null;
|
|
287
355
|
/**
|
|
288
356
|
* The name of the tax against which this tax amount was calculated. For example, "NY State Sales Tax", "Quebec GST", etc.
|
|
289
357
|
* This name should be explicit enough to allow the merchant to understand what tax was calculated.
|
|
358
|
+
* @maxLength 200
|
|
290
359
|
*/
|
|
291
360
|
taxName?: string | null;
|
|
292
361
|
/** The type of the jurisdiction in which this tax detail applies. */
|
|
@@ -317,15 +386,18 @@ export interface GiftCard {
|
|
|
317
386
|
obfuscatedCode?: string;
|
|
318
387
|
/** Gift card value. */
|
|
319
388
|
amount?: MultiCurrencyPrice;
|
|
320
|
-
/**
|
|
389
|
+
/**
|
|
390
|
+
* App ID of the gift card provider.
|
|
391
|
+
* @format GUID
|
|
392
|
+
*/
|
|
321
393
|
appId?: string;
|
|
322
394
|
}
|
|
323
395
|
export declare enum WeightUnit {
|
|
324
|
-
/** Weight unit can't be classified
|
|
396
|
+
/** Weight unit can't be classified due to an error. */
|
|
325
397
|
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
326
|
-
/** Kilograms */
|
|
398
|
+
/** Kilograms. */
|
|
327
399
|
KG = "KG",
|
|
328
|
-
/** Pounds */
|
|
400
|
+
/** Pounds. */
|
|
329
401
|
LB = "LB"
|
|
330
402
|
}
|
|
331
403
|
export interface PriceSummary {
|
|
@@ -351,19 +423,37 @@ export interface AddressWithContact {
|
|
|
351
423
|
}
|
|
352
424
|
/** Physical address */
|
|
353
425
|
export interface Address {
|
|
354
|
-
/**
|
|
426
|
+
/**
|
|
427
|
+
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
428
|
+
* @format COUNTRY
|
|
429
|
+
*/
|
|
355
430
|
country?: string | null;
|
|
356
|
-
/**
|
|
431
|
+
/**
|
|
432
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://www.iso.org/standard/72483.html) format.
|
|
433
|
+
* @maxLength 50
|
|
434
|
+
*/
|
|
357
435
|
subdivision?: string | null;
|
|
358
|
-
/**
|
|
436
|
+
/**
|
|
437
|
+
* City name.
|
|
438
|
+
* @maxLength 50
|
|
439
|
+
*/
|
|
359
440
|
city?: string | null;
|
|
360
|
-
/**
|
|
441
|
+
/**
|
|
442
|
+
* Postal or zip code.
|
|
443
|
+
* @maxLength 50
|
|
444
|
+
*/
|
|
361
445
|
postalCode?: string | null;
|
|
362
446
|
/** Street address. */
|
|
363
447
|
streetAddress?: StreetAddress;
|
|
364
|
-
/**
|
|
448
|
+
/**
|
|
449
|
+
* Main address line (usually street name and number).
|
|
450
|
+
* @maxLength 150
|
|
451
|
+
*/
|
|
365
452
|
addressLine1?: string | null;
|
|
366
|
-
/**
|
|
453
|
+
/**
|
|
454
|
+
* Free text providing more detailed address info. Usually contains apt, suite, floor.
|
|
455
|
+
* @maxLength 100
|
|
456
|
+
*/
|
|
367
457
|
addressLine2?: string | null;
|
|
368
458
|
/**
|
|
369
459
|
* Country's full name.
|
|
@@ -390,13 +480,25 @@ export interface AddressLocation {
|
|
|
390
480
|
}
|
|
391
481
|
/** Full contact details for an address */
|
|
392
482
|
export interface FullAddressContactDetails {
|
|
393
|
-
/**
|
|
483
|
+
/**
|
|
484
|
+
* First name.
|
|
485
|
+
* @maxLength 100
|
|
486
|
+
*/
|
|
394
487
|
firstName?: string | null;
|
|
395
|
-
/**
|
|
488
|
+
/**
|
|
489
|
+
* Last name.
|
|
490
|
+
* @maxLength 100
|
|
491
|
+
*/
|
|
396
492
|
lastName?: string | null;
|
|
397
|
-
/**
|
|
493
|
+
/**
|
|
494
|
+
* Phone number.
|
|
495
|
+
* @format PHONE
|
|
496
|
+
*/
|
|
398
497
|
phone?: string | null;
|
|
399
|
-
/**
|
|
498
|
+
/**
|
|
499
|
+
* Company name.
|
|
500
|
+
* @maxLength 1000
|
|
501
|
+
*/
|
|
400
502
|
company?: string | null;
|
|
401
503
|
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
402
504
|
vatId?: VatId;
|
|
@@ -426,16 +528,23 @@ export interface ShippingInfo {
|
|
|
426
528
|
selectedCarrierServiceOption?: SelectedCarrierServiceOption;
|
|
427
529
|
}
|
|
428
530
|
export interface SelectedCarrierServiceOption {
|
|
429
|
-
/**
|
|
531
|
+
/**
|
|
532
|
+
* Unique identifier of selected option. For example, `usps_std_overnight`.
|
|
533
|
+
* @maxLength 100
|
|
534
|
+
*/
|
|
430
535
|
code?: string;
|
|
431
536
|
/**
|
|
432
537
|
* Title of the option, such as USPS Standard Overnight Delivery (in the requested locale).
|
|
433
538
|
* For example, "Standard" or "First-Class Package International".
|
|
539
|
+
* @maxLength 250
|
|
434
540
|
*/
|
|
435
541
|
title?: string;
|
|
436
542
|
/** Shipping costs. */
|
|
437
543
|
cost?: SelectedCarrierServiceOptionPrices;
|
|
438
|
-
/**
|
|
544
|
+
/**
|
|
545
|
+
* Delivery solution allocations to different delivery carriers and delivery regions
|
|
546
|
+
* @maxSize 300
|
|
547
|
+
*/
|
|
439
548
|
deliveryAllocations?: DeliveryAllocation[];
|
|
440
549
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
441
550
|
partial?: boolean | null;
|
|
@@ -461,31 +570,59 @@ export interface DeliveryAllocation {
|
|
|
461
570
|
applicableLineItems?: ApplicableLineItems;
|
|
462
571
|
}
|
|
463
572
|
export interface Carrier {
|
|
464
|
-
/**
|
|
573
|
+
/**
|
|
574
|
+
* The carrier app id
|
|
575
|
+
* @format GUID
|
|
576
|
+
*/
|
|
465
577
|
appId?: string | null;
|
|
466
|
-
/**
|
|
578
|
+
/**
|
|
579
|
+
* Unique code that acts as an ID for a shipping rate. For example, `"usps_std_overnight"`.
|
|
580
|
+
* @maxLength 250
|
|
581
|
+
*/
|
|
467
582
|
code?: string;
|
|
468
583
|
}
|
|
469
584
|
export interface Region {
|
|
470
|
-
/**
|
|
585
|
+
/**
|
|
586
|
+
* The delivery region id.
|
|
587
|
+
* @format GUID
|
|
588
|
+
*/
|
|
471
589
|
_id?: string | null;
|
|
472
|
-
/**
|
|
590
|
+
/**
|
|
591
|
+
* The delivery region name.
|
|
592
|
+
* @maxLength 100
|
|
593
|
+
*/
|
|
473
594
|
name?: string | null;
|
|
474
595
|
}
|
|
475
596
|
export interface ApplicableLineItems {
|
|
476
|
-
/**
|
|
597
|
+
/**
|
|
598
|
+
* Line items that the delivery solution is for.
|
|
599
|
+
* @maxSize 300
|
|
600
|
+
* @minLength 1
|
|
601
|
+
* @maxLength 100
|
|
602
|
+
*/
|
|
477
603
|
lineItemIds?: string[];
|
|
478
604
|
}
|
|
479
605
|
export interface CustomFields {
|
|
480
|
-
/**
|
|
606
|
+
/**
|
|
607
|
+
* List of custom fields
|
|
608
|
+
* @maxSize 50
|
|
609
|
+
*/
|
|
481
610
|
fields?: CustomField[];
|
|
482
611
|
}
|
|
483
612
|
export interface CustomField {
|
|
484
613
|
/** Custom field value. */
|
|
485
614
|
value?: any;
|
|
486
|
-
/**
|
|
615
|
+
/**
|
|
616
|
+
* Custom field title.
|
|
617
|
+
* @minLength 1
|
|
618
|
+
* @maxLength 500
|
|
619
|
+
*/
|
|
487
620
|
title?: string;
|
|
488
|
-
/**
|
|
621
|
+
/**
|
|
622
|
+
* Translated custom field title.
|
|
623
|
+
* @minLength 1
|
|
624
|
+
* @maxLength 500
|
|
625
|
+
*/
|
|
489
626
|
translatedTitle?: string | null;
|
|
490
627
|
}
|
|
491
628
|
export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
@@ -497,7 +634,10 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
497
634
|
discountRule?: DiscountRule;
|
|
498
635
|
/** Discount type. */
|
|
499
636
|
discountType?: DiscountType;
|
|
500
|
-
/**
|
|
637
|
+
/**
|
|
638
|
+
* IDs of the line items the discount applies to.
|
|
639
|
+
* @format GUID
|
|
640
|
+
*/
|
|
501
641
|
lineItemIds?: string[];
|
|
502
642
|
}
|
|
503
643
|
/** @oneof */
|
|
@@ -525,33 +665,52 @@ export interface Coupon {
|
|
|
525
665
|
code?: string;
|
|
526
666
|
/** Coupon name. */
|
|
527
667
|
name?: string;
|
|
668
|
+
/** @decimalValue options { gte:0, lte:1000000000000000 } */
|
|
528
669
|
amount?: string;
|
|
529
670
|
}
|
|
530
671
|
export interface MerchantDiscount {
|
|
672
|
+
/** @decimalValue options { gte:0, lte:1000000000000000 } */
|
|
531
673
|
amount?: string;
|
|
532
674
|
}
|
|
533
675
|
export interface DiscountRule {
|
|
534
|
-
/**
|
|
676
|
+
/**
|
|
677
|
+
* Discount rule ID.
|
|
678
|
+
* @format GUID
|
|
679
|
+
*/
|
|
535
680
|
_id?: string;
|
|
536
681
|
/** Discount rule name. */
|
|
537
682
|
name?: DiscountRuleName;
|
|
683
|
+
/** @decimalValue options { gte:0, lte:1000000000000000 } */
|
|
538
684
|
amount?: string;
|
|
539
685
|
}
|
|
540
686
|
export interface DiscountRuleName {
|
|
541
|
-
/**
|
|
687
|
+
/**
|
|
688
|
+
* Original discount rule name (in site's default language).
|
|
689
|
+
* @minLength 1
|
|
690
|
+
* @maxLength 256
|
|
691
|
+
*/
|
|
542
692
|
original?: string;
|
|
543
|
-
/**
|
|
693
|
+
/**
|
|
694
|
+
* Translated discount rule name according to buyer language. Defaults to `original` when not provided.
|
|
695
|
+
* @minLength 1
|
|
696
|
+
* @maxLength 500
|
|
697
|
+
*/
|
|
544
698
|
translated?: string | null;
|
|
545
699
|
}
|
|
546
700
|
export interface ExternalReference {
|
|
547
701
|
/**
|
|
548
702
|
* ID of the app associated with the purchase flow.
|
|
549
703
|
* For example, the Wix Pay Links app ID.
|
|
704
|
+
* @format GUID
|
|
705
|
+
* @immutable
|
|
550
706
|
*/
|
|
551
707
|
appId?: string;
|
|
552
708
|
/**
|
|
553
709
|
* Reference to an external resource ID. Used to link the purchase flow to a specific entity in an external system.
|
|
554
710
|
* For example, a Wix Pay Link ID.
|
|
711
|
+
* @minLength 1
|
|
712
|
+
* @maxLength 100
|
|
713
|
+
* @immutable
|
|
555
714
|
*/
|
|
556
715
|
resourceId?: string | null;
|
|
557
716
|
}
|
|
@@ -575,7 +734,11 @@ export interface Violation {
|
|
|
575
734
|
severity?: Severity;
|
|
576
735
|
/** Target location on a checkout or cart page where the violation will be displayed. */
|
|
577
736
|
target?: Target;
|
|
578
|
-
/**
|
|
737
|
+
/**
|
|
738
|
+
* Violation description. Can include rich text. Only HTTP or HTTPS links in the following format are allowed: `<a href="https://www.wix.com">Click me</a>`.
|
|
739
|
+
* @minLength 1
|
|
740
|
+
* @maxLength 1000
|
|
741
|
+
*/
|
|
579
742
|
description?: string | null;
|
|
580
743
|
}
|
|
581
744
|
export declare enum Severity {
|
|
@@ -634,6 +797,7 @@ export interface ValidationsSPIConfig {
|
|
|
634
797
|
/**
|
|
635
798
|
* Required. Base URI where the endpoints are called. Wix appends the endpoint path to the base URI.
|
|
636
799
|
* For example, to call the Get Validation Violations endpoint at `https://my-validations.com/v1/get-violations`, the base URI you provide here is `https://my-validations.com`.
|
|
800
|
+
* @minLength 1
|
|
637
801
|
*/
|
|
638
802
|
deploymentUri?: string;
|
|
639
803
|
}
|
|
@@ -653,13 +817,19 @@ export interface ValidationsSPIConfig {
|
|
|
653
817
|
export interface Context {
|
|
654
818
|
/** A unique identifier of the request. You may print this ID to your logs to help with future debugging and easier correlation with Wix's logs. */
|
|
655
819
|
requestId?: string | null;
|
|
656
|
-
/**
|
|
820
|
+
/**
|
|
821
|
+
* [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) 3-letter currency code.
|
|
822
|
+
* @format CURRENCY
|
|
823
|
+
*/
|
|
657
824
|
currency?: string | null;
|
|
658
825
|
/** An object that describes the identity that triggered this request. */
|
|
659
826
|
identity?: IdentificationData;
|
|
660
827
|
/** A string representing a language and region in the format of `"xx-XX"`. First 2 letters represent the language code according to ISO 639-1. This is followed by a dash "-", and then a by 2 capital letters representing the region according to ISO 3166-2. For example, `"en-US"`. */
|
|
661
828
|
languages?: string[];
|
|
662
|
-
/**
|
|
829
|
+
/**
|
|
830
|
+
* The service provider app's instance ID.
|
|
831
|
+
* @format GUID
|
|
832
|
+
*/
|
|
663
833
|
instanceId?: string | null;
|
|
664
834
|
}
|
|
665
835
|
export declare enum IdentityType {
|
|
@@ -670,25 +840,49 @@ export declare enum IdentityType {
|
|
|
670
840
|
APP = "APP"
|
|
671
841
|
}
|
|
672
842
|
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
673
|
-
/**
|
|
843
|
+
/**
|
|
844
|
+
* ID of a site visitor that has not logged in to the site.
|
|
845
|
+
* @format GUID
|
|
846
|
+
*/
|
|
674
847
|
anonymousVisitorId?: string;
|
|
675
|
-
/**
|
|
848
|
+
/**
|
|
849
|
+
* ID of a site visitor that has logged in to the site.
|
|
850
|
+
* @format GUID
|
|
851
|
+
*/
|
|
676
852
|
memberId?: string;
|
|
677
|
-
/**
|
|
853
|
+
/**
|
|
854
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
855
|
+
* @format GUID
|
|
856
|
+
*/
|
|
678
857
|
wixUserId?: string;
|
|
679
|
-
/**
|
|
858
|
+
/**
|
|
859
|
+
* ID of an app.
|
|
860
|
+
* @format GUID
|
|
861
|
+
*/
|
|
680
862
|
appId?: string;
|
|
681
863
|
/** @readonly */
|
|
682
864
|
identityType?: IdentityType;
|
|
683
865
|
}
|
|
684
866
|
/** @oneof */
|
|
685
867
|
export interface IdentificationDataIdOneOf {
|
|
686
|
-
/**
|
|
868
|
+
/**
|
|
869
|
+
* ID of a site visitor that has not logged in to the site.
|
|
870
|
+
* @format GUID
|
|
871
|
+
*/
|
|
687
872
|
anonymousVisitorId?: string;
|
|
688
|
-
/**
|
|
873
|
+
/**
|
|
874
|
+
* ID of a site visitor that has logged in to the site.
|
|
875
|
+
* @format GUID
|
|
876
|
+
*/
|
|
689
877
|
memberId?: string;
|
|
690
|
-
/**
|
|
878
|
+
/**
|
|
879
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
880
|
+
* @format GUID
|
|
881
|
+
*/
|
|
691
882
|
wixUserId?: string;
|
|
692
|
-
/**
|
|
883
|
+
/**
|
|
884
|
+
* ID of an app.
|
|
885
|
+
* @format GUID
|
|
886
|
+
*/
|
|
693
887
|
appId?: string;
|
|
694
888
|
}
|
|
@@ -53,11 +53,11 @@ export var JurisdictionType;
|
|
|
53
53
|
})(JurisdictionType || (JurisdictionType = {}));
|
|
54
54
|
export var WeightUnit;
|
|
55
55
|
(function (WeightUnit) {
|
|
56
|
-
/** Weight unit can't be classified
|
|
56
|
+
/** Weight unit can't be classified due to an error. */
|
|
57
57
|
WeightUnit["UNSPECIFIED_WEIGHT_UNIT"] = "UNSPECIFIED_WEIGHT_UNIT";
|
|
58
|
-
/** Kilograms */
|
|
58
|
+
/** Kilograms. */
|
|
59
59
|
WeightUnit["KG"] = "KG";
|
|
60
|
-
/** Pounds */
|
|
60
|
+
/** Pounds. */
|
|
61
61
|
WeightUnit["LB"] = "LB";
|
|
62
62
|
})(WeightUnit || (WeightUnit = {}));
|
|
63
63
|
/** tax info types */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../src/service-plugins-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../src/service-plugins-types.ts"],"names":[],"mappings":"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"}
|