@wix/auto_sdk_ecom_validations 1.0.8 → 1.0.9
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/index.d.ts +2 -0
- package/build/cjs/index.js +19 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +15 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +5 -0
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js +9 -0
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js.map +1 -0
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +19 -0
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js +50 -0
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js.map +1 -0
- package/build/{index.d.mts → cjs/src/service-plugins-types.d.ts} +69 -94
- package/build/cjs/src/service-plugins-types.js +121 -0
- package/build/cjs/src/service-plugins-types.js.map +1 -0
- package/build/es/index.d.ts +2 -0
- package/build/es/index.js +3 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +15 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +5 -0
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.js +6 -0
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.js.map +1 -0
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +19 -0
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.js +47 -0
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.js.map +1 -0
- package/build/{index.d.ts → es/src/service-plugins-types.d.ts} +69 -94
- package/build/es/src/service-plugins-types.js +118 -0
- package/build/es/src/service-plugins-types.js.map +1 -0
- package/build/internal/cjs/index.d.ts +2 -0
- package/build/internal/cjs/index.js +19 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +15 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +5 -0
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js +9 -0
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js.map +1 -0
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +19 -0
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js +50 -0
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js.map +1 -0
- package/build/internal/{index.d.mts → cjs/src/service-plugins-types.d.ts} +69 -94
- package/build/internal/cjs/src/service-plugins-types.js +121 -0
- package/build/internal/cjs/src/service-plugins-types.js.map +1 -0
- package/build/internal/es/index.d.ts +2 -0
- package/build/internal/es/index.js +3 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +15 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +5 -0
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.js +6 -0
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.js.map +1 -0
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +19 -0
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.js +47 -0
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.js.map +1 -0
- package/build/internal/{index.d.ts → es/src/service-plugins-types.d.ts} +69 -94
- package/build/internal/es/src/service-plugins-types.js +118 -0
- package/build/internal/es/src/service-plugins-types.js.map +1 -0
- package/package.json +11 -12
- package/build/index.js +0 -194
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -156
- package/build/index.mjs.map +0 -1
- package/build/internal/index.js +0 -194
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -156
- package/build/internal/index.mjs.map +0 -1
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { ServicePluginDefinition } from '@wix/sdk-types';
|
|
3
|
-
|
|
4
|
-
interface GetValidationViolationsRequest {
|
|
1
|
+
export interface GetValidationViolationsRequest {
|
|
5
2
|
/** Information about the source of the request. */
|
|
6
3
|
sourceInfo?: SourceInfo;
|
|
7
4
|
/** Information to validate. */
|
|
8
5
|
validationInfo?: ValidationInfo;
|
|
9
6
|
}
|
|
10
|
-
interface SourceInfo {
|
|
7
|
+
export interface SourceInfo {
|
|
11
8
|
/** Source of the request. */
|
|
12
9
|
source?: Source;
|
|
13
10
|
/**
|
|
@@ -18,7 +15,7 @@ interface SourceInfo {
|
|
|
18
15
|
/** The stage at which the service plugin is called. */
|
|
19
16
|
stage?: Stage;
|
|
20
17
|
}
|
|
21
|
-
declare enum Source {
|
|
18
|
+
export declare enum Source {
|
|
22
19
|
/** Context cannot be recognized */
|
|
23
20
|
OTHER = "OTHER",
|
|
24
21
|
/** Called from Ecom's Cart service */
|
|
@@ -26,16 +23,16 @@ declare enum Source {
|
|
|
26
23
|
/** Called from Ecom's Checkout service */
|
|
27
24
|
CHECKOUT = "CHECKOUT"
|
|
28
25
|
}
|
|
29
|
-
interface Stage extends StageStagesOneOf {
|
|
26
|
+
export interface Stage extends StageStagesOneOf {
|
|
30
27
|
/** Supported values: */
|
|
31
28
|
checkoutStage?: CheckoutStage;
|
|
32
29
|
}
|
|
33
30
|
/** @oneof */
|
|
34
|
-
interface StageStagesOneOf {
|
|
31
|
+
export interface StageStagesOneOf {
|
|
35
32
|
/** Supported values: */
|
|
36
33
|
checkoutStage?: CheckoutStage;
|
|
37
34
|
}
|
|
38
|
-
declare enum CheckoutStage {
|
|
35
|
+
export declare enum CheckoutStage {
|
|
39
36
|
/** Not implemented. */
|
|
40
37
|
UNKNOWN_CHECKOUT_STAGE = "UNKNOWN_CHECKOUT_STAGE",
|
|
41
38
|
/** Used during the initialization of the checkout (Create Checkout). */
|
|
@@ -46,7 +43,7 @@ declare enum CheckoutStage {
|
|
|
46
43
|
ORDER_CREATION = "ORDER_CREATION"
|
|
47
44
|
}
|
|
48
45
|
/** ValidationsData is the main entity of ValidationsSPI, which contains all the data required for validations */
|
|
49
|
-
interface ValidationInfo {
|
|
46
|
+
export interface ValidationInfo {
|
|
50
47
|
/** Buyer details. */
|
|
51
48
|
buyerDetails?: BuyerDetails;
|
|
52
49
|
/**
|
|
@@ -86,7 +83,7 @@ interface ValidationInfo {
|
|
|
86
83
|
*/
|
|
87
84
|
externalReference?: ExternalReference;
|
|
88
85
|
}
|
|
89
|
-
interface BuyerDetails {
|
|
86
|
+
export interface BuyerDetails {
|
|
90
87
|
/**
|
|
91
88
|
* Buyer's email address.
|
|
92
89
|
* @format EMAIL
|
|
@@ -98,7 +95,7 @@ interface BuyerDetails {
|
|
|
98
95
|
*/
|
|
99
96
|
contactId?: string | null;
|
|
100
97
|
}
|
|
101
|
-
interface LineItem {
|
|
98
|
+
export interface LineItem {
|
|
102
99
|
/**
|
|
103
100
|
* Line item ID.
|
|
104
101
|
* @format GUID
|
|
@@ -132,7 +129,7 @@ interface LineItem {
|
|
|
132
129
|
pricesBreakdown?: LineItemPricesData;
|
|
133
130
|
}
|
|
134
131
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
135
|
-
interface CatalogReference {
|
|
132
|
+
export interface CatalogReference {
|
|
136
133
|
/**
|
|
137
134
|
* ID of the item within the catalog it belongs to.
|
|
138
135
|
* @minLength 1
|
|
@@ -158,7 +155,7 @@ interface CatalogReference {
|
|
|
158
155
|
*/
|
|
159
156
|
options?: Record<string, any> | null;
|
|
160
157
|
}
|
|
161
|
-
interface ProductName {
|
|
158
|
+
export interface ProductName {
|
|
162
159
|
/**
|
|
163
160
|
* __Required.__ Item 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).
|
|
164
161
|
*
|
|
@@ -179,7 +176,7 @@ interface ProductName {
|
|
|
179
176
|
*/
|
|
180
177
|
translated?: string | null;
|
|
181
178
|
}
|
|
182
|
-
interface MultiCurrencyPrice {
|
|
179
|
+
export interface MultiCurrencyPrice {
|
|
183
180
|
/**
|
|
184
181
|
* Amount.
|
|
185
182
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
@@ -202,7 +199,7 @@ interface MultiCurrencyPrice {
|
|
|
202
199
|
*/
|
|
203
200
|
formattedConvertedAmount?: string;
|
|
204
201
|
}
|
|
205
|
-
interface PhysicalProperties {
|
|
202
|
+
export interface PhysicalProperties {
|
|
206
203
|
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
207
204
|
weight?: number | null;
|
|
208
205
|
/**
|
|
@@ -213,27 +210,27 @@ interface PhysicalProperties {
|
|
|
213
210
|
/** Whether this line item is shippable. */
|
|
214
211
|
shippable?: boolean;
|
|
215
212
|
}
|
|
216
|
-
interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
213
|
+
export interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
217
214
|
/** Preset item type. */
|
|
218
215
|
preset?: ItemTypeItemType;
|
|
219
216
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
220
217
|
custom?: string;
|
|
221
218
|
}
|
|
222
219
|
/** @oneof */
|
|
223
|
-
interface ItemTypeItemTypeDataOneOf {
|
|
220
|
+
export interface ItemTypeItemTypeDataOneOf {
|
|
224
221
|
/** Preset item type. */
|
|
225
222
|
preset?: ItemTypeItemType;
|
|
226
223
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
227
224
|
custom?: string;
|
|
228
225
|
}
|
|
229
|
-
declare enum ItemTypeItemType {
|
|
226
|
+
export declare enum ItemTypeItemType {
|
|
230
227
|
UNRECOGNISED = "UNRECOGNISED",
|
|
231
228
|
PHYSICAL = "PHYSICAL",
|
|
232
229
|
DIGITAL = "DIGITAL",
|
|
233
230
|
GIFT_CARD = "GIFT_CARD",
|
|
234
231
|
SERVICE = "SERVICE"
|
|
235
232
|
}
|
|
236
|
-
interface SubscriptionOptionInfo {
|
|
233
|
+
export interface SubscriptionOptionInfo {
|
|
237
234
|
/** Subscription option settings. */
|
|
238
235
|
subscriptionSettings?: SubscriptionSettings;
|
|
239
236
|
/** Subscription option title. */
|
|
@@ -241,7 +238,7 @@ interface SubscriptionOptionInfo {
|
|
|
241
238
|
/** Subscription option description. */
|
|
242
239
|
description?: Description;
|
|
243
240
|
}
|
|
244
|
-
interface SubscriptionSettings {
|
|
241
|
+
export interface SubscriptionSettings {
|
|
245
242
|
/** Frequency of recurring payment. */
|
|
246
243
|
frequency?: SubscriptionFrequency;
|
|
247
244
|
/**
|
|
@@ -262,14 +259,14 @@ interface SubscriptionSettings {
|
|
|
262
259
|
billingCycles?: number | null;
|
|
263
260
|
}
|
|
264
261
|
/** Frequency unit of recurring payment */
|
|
265
|
-
declare enum SubscriptionFrequency {
|
|
262
|
+
export declare enum SubscriptionFrequency {
|
|
266
263
|
UNDEFINED = "UNDEFINED",
|
|
267
264
|
DAY = "DAY",
|
|
268
265
|
WEEK = "WEEK",
|
|
269
266
|
MONTH = "MONTH",
|
|
270
267
|
YEAR = "YEAR"
|
|
271
268
|
}
|
|
272
|
-
interface FreeTrialPeriod {
|
|
269
|
+
export interface FreeTrialPeriod {
|
|
273
270
|
/** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
|
|
274
271
|
frequency?: SubscriptionFrequency;
|
|
275
272
|
/**
|
|
@@ -279,7 +276,7 @@ interface FreeTrialPeriod {
|
|
|
279
276
|
*/
|
|
280
277
|
interval?: number;
|
|
281
278
|
}
|
|
282
|
-
interface Title {
|
|
279
|
+
export interface Title {
|
|
283
280
|
/**
|
|
284
281
|
* 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).
|
|
285
282
|
* @minLength 1
|
|
@@ -295,7 +292,7 @@ interface Title {
|
|
|
295
292
|
*/
|
|
296
293
|
translated?: string | null;
|
|
297
294
|
}
|
|
298
|
-
interface Description {
|
|
295
|
+
export interface Description {
|
|
299
296
|
/**
|
|
300
297
|
* Subscription option description.
|
|
301
298
|
* @maxLength 500
|
|
@@ -307,7 +304,7 @@ interface Description {
|
|
|
307
304
|
*/
|
|
308
305
|
translated?: string | null;
|
|
309
306
|
}
|
|
310
|
-
interface LineItemPricesData {
|
|
307
|
+
export interface LineItemPricesData {
|
|
311
308
|
/** Total price after discounts and after tax. */
|
|
312
309
|
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
313
310
|
/** Total price after discounts, and before tax. */
|
|
@@ -325,7 +322,7 @@ interface LineItemPricesData {
|
|
|
325
322
|
/** Item price **before** all discounts. Defaults to `price` when not provided. */
|
|
326
323
|
fullPrice?: MultiCurrencyPrice;
|
|
327
324
|
}
|
|
328
|
-
interface ItemTaxFullDetails {
|
|
325
|
+
export interface ItemTaxFullDetails {
|
|
329
326
|
/** The portion of the total amount of this estimate that was taxable. */
|
|
330
327
|
taxableAmount?: MultiCurrencyPrice;
|
|
331
328
|
/** Calculated tax, based on `taxable_amount`. */
|
|
@@ -338,7 +335,7 @@ interface ItemTaxFullDetails {
|
|
|
338
335
|
*/
|
|
339
336
|
taxBreakdown?: TaxBreakdown[];
|
|
340
337
|
}
|
|
341
|
-
interface TaxBreakdown {
|
|
338
|
+
export interface TaxBreakdown {
|
|
342
339
|
/**
|
|
343
340
|
* The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
|
|
344
341
|
* @maxLength 200
|
|
@@ -370,7 +367,7 @@ interface TaxBreakdown {
|
|
|
370
367
|
jurisdictionType?: JurisdictionType;
|
|
371
368
|
}
|
|
372
369
|
/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
373
|
-
declare enum JurisdictionType {
|
|
370
|
+
export declare enum JurisdictionType {
|
|
374
371
|
/** Undefined jurisdiction type. */
|
|
375
372
|
UNDEFINED = "UNDEFINED",
|
|
376
373
|
/** Country jurisdiction. */
|
|
@@ -384,7 +381,7 @@ declare enum JurisdictionType {
|
|
|
384
381
|
/** Special jurisdiction. */
|
|
385
382
|
SPECIAL = "SPECIAL"
|
|
386
383
|
}
|
|
387
|
-
interface GiftCard {
|
|
384
|
+
export interface GiftCard {
|
|
388
385
|
/**
|
|
389
386
|
* Gift card ID.
|
|
390
387
|
* @deprecated
|
|
@@ -400,7 +397,7 @@ interface GiftCard {
|
|
|
400
397
|
*/
|
|
401
398
|
appId?: string;
|
|
402
399
|
}
|
|
403
|
-
declare enum WeightUnit {
|
|
400
|
+
export declare enum WeightUnit {
|
|
404
401
|
/** Weight unit can't be classified due to an error. */
|
|
405
402
|
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
406
403
|
/** Kilograms. */
|
|
@@ -408,7 +405,7 @@ declare enum WeightUnit {
|
|
|
408
405
|
/** Pounds. */
|
|
409
406
|
LB = "LB"
|
|
410
407
|
}
|
|
411
|
-
interface PriceSummary {
|
|
408
|
+
export interface PriceSummary {
|
|
412
409
|
/** Subtotal of all line items, before discounts and before tax. */
|
|
413
410
|
subtotal?: MultiCurrencyPrice;
|
|
414
411
|
/** Total shipping price, before discounts and before tax. */
|
|
@@ -423,14 +420,14 @@ interface PriceSummary {
|
|
|
423
420
|
additionalFees?: MultiCurrencyPrice;
|
|
424
421
|
}
|
|
425
422
|
/** Billing Info and shipping details */
|
|
426
|
-
interface AddressWithContact {
|
|
423
|
+
export interface AddressWithContact {
|
|
427
424
|
/** Address. */
|
|
428
425
|
address?: Address;
|
|
429
426
|
/** Contact details. */
|
|
430
427
|
contactDetails?: FullAddressContactDetails;
|
|
431
428
|
}
|
|
432
429
|
/** Physical address */
|
|
433
|
-
interface Address {
|
|
430
|
+
export interface Address {
|
|
434
431
|
/**
|
|
435
432
|
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
436
433
|
* @format COUNTRY
|
|
@@ -474,20 +471,20 @@ interface Address {
|
|
|
474
471
|
*/
|
|
475
472
|
subdivisionFullname?: string | null;
|
|
476
473
|
}
|
|
477
|
-
interface StreetAddress {
|
|
474
|
+
export interface StreetAddress {
|
|
478
475
|
/** Street number. */
|
|
479
476
|
number?: string;
|
|
480
477
|
/** Street name. */
|
|
481
478
|
name?: string;
|
|
482
479
|
}
|
|
483
|
-
interface AddressLocation {
|
|
480
|
+
export interface AddressLocation {
|
|
484
481
|
/** Address latitude. */
|
|
485
482
|
latitude?: number | null;
|
|
486
483
|
/** Address longitude. */
|
|
487
484
|
longitude?: number | null;
|
|
488
485
|
}
|
|
489
486
|
/** Full contact details for an address */
|
|
490
|
-
interface FullAddressContactDetails {
|
|
487
|
+
export interface FullAddressContactDetails {
|
|
491
488
|
/**
|
|
492
489
|
* First name.
|
|
493
490
|
* @maxLength 100
|
|
@@ -511,7 +508,7 @@ interface FullAddressContactDetails {
|
|
|
511
508
|
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
512
509
|
vatId?: VatId;
|
|
513
510
|
}
|
|
514
|
-
interface VatId {
|
|
511
|
+
export interface VatId {
|
|
515
512
|
/** Customer's tax ID. */
|
|
516
513
|
_id?: string;
|
|
517
514
|
/**
|
|
@@ -524,18 +521,18 @@ interface VatId {
|
|
|
524
521
|
type?: VatType;
|
|
525
522
|
}
|
|
526
523
|
/** tax info types */
|
|
527
|
-
declare enum VatType {
|
|
524
|
+
export declare enum VatType {
|
|
528
525
|
UNSPECIFIED = "UNSPECIFIED",
|
|
529
526
|
/** CPF - for individual tax payers. */
|
|
530
527
|
CPF = "CPF",
|
|
531
528
|
/** CNPJ - for corporations */
|
|
532
529
|
CNPJ = "CNPJ"
|
|
533
530
|
}
|
|
534
|
-
interface ShippingInfo {
|
|
531
|
+
export interface ShippingInfo {
|
|
535
532
|
/** Selected option out of the options allowed for the `region`. */
|
|
536
533
|
selectedCarrierServiceOption?: SelectedCarrierServiceOption;
|
|
537
534
|
}
|
|
538
|
-
interface SelectedCarrierServiceOption {
|
|
535
|
+
export interface SelectedCarrierServiceOption {
|
|
539
536
|
/**
|
|
540
537
|
* Unique identifier of selected option. For example, `usps_std_overnight`.
|
|
541
538
|
* @maxLength 100
|
|
@@ -557,7 +554,7 @@ interface SelectedCarrierServiceOption {
|
|
|
557
554
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
558
555
|
partial?: boolean | null;
|
|
559
556
|
}
|
|
560
|
-
interface SelectedCarrierServiceOptionPrices {
|
|
557
|
+
export interface SelectedCarrierServiceOptionPrices {
|
|
561
558
|
/** Total shipping price, after discount and after tax. */
|
|
562
559
|
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
563
560
|
/** Total price of shipping after discounts (when relevant), and before tax. */
|
|
@@ -569,7 +566,7 @@ interface SelectedCarrierServiceOptionPrices {
|
|
|
569
566
|
/** Shipping price before discount and before tax. */
|
|
570
567
|
price?: MultiCurrencyPrice;
|
|
571
568
|
}
|
|
572
|
-
interface DeliveryAllocation {
|
|
569
|
+
export interface DeliveryAllocation {
|
|
573
570
|
/** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
|
|
574
571
|
deliveryCarrier?: Carrier;
|
|
575
572
|
/** The delivery region that are relevant for this delivery solution. */
|
|
@@ -577,7 +574,7 @@ interface DeliveryAllocation {
|
|
|
577
574
|
/** Populated if the delivery solution is a partially supplied by this carrier. */
|
|
578
575
|
applicableLineItems?: ApplicableLineItems;
|
|
579
576
|
}
|
|
580
|
-
interface Carrier {
|
|
577
|
+
export interface Carrier {
|
|
581
578
|
/**
|
|
582
579
|
* The carrier app id
|
|
583
580
|
* @format GUID
|
|
@@ -589,7 +586,7 @@ interface Carrier {
|
|
|
589
586
|
*/
|
|
590
587
|
code?: string;
|
|
591
588
|
}
|
|
592
|
-
interface Region {
|
|
589
|
+
export interface Region {
|
|
593
590
|
/**
|
|
594
591
|
* The delivery region id.
|
|
595
592
|
* @format GUID
|
|
@@ -601,7 +598,7 @@ interface Region {
|
|
|
601
598
|
*/
|
|
602
599
|
name?: string | null;
|
|
603
600
|
}
|
|
604
|
-
interface ApplicableLineItems {
|
|
601
|
+
export interface ApplicableLineItems {
|
|
605
602
|
/**
|
|
606
603
|
* Line items that the delivery solution is for.
|
|
607
604
|
* @maxSize 300
|
|
@@ -610,14 +607,14 @@ interface ApplicableLineItems {
|
|
|
610
607
|
*/
|
|
611
608
|
lineItemIds?: string[];
|
|
612
609
|
}
|
|
613
|
-
interface CustomFields {
|
|
610
|
+
export interface CustomFields {
|
|
614
611
|
/**
|
|
615
612
|
* List of custom fields
|
|
616
613
|
* @maxSize 50
|
|
617
614
|
*/
|
|
618
615
|
fields?: CustomField[];
|
|
619
616
|
}
|
|
620
|
-
interface CustomField {
|
|
617
|
+
export interface CustomField {
|
|
621
618
|
/** Custom field value. */
|
|
622
619
|
value?: any;
|
|
623
620
|
/**
|
|
@@ -633,7 +630,7 @@ interface CustomField {
|
|
|
633
630
|
*/
|
|
634
631
|
translatedTitle?: string | null;
|
|
635
632
|
}
|
|
636
|
-
interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
633
|
+
export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
637
634
|
/** Coupon details. */
|
|
638
635
|
coupon?: Coupon;
|
|
639
636
|
/** Merchant discount. */
|
|
@@ -649,7 +646,7 @@ interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
649
646
|
lineItemIds?: string[];
|
|
650
647
|
}
|
|
651
648
|
/** @oneof */
|
|
652
|
-
interface AppliedDiscountDiscountSourceOneOf {
|
|
649
|
+
export interface AppliedDiscountDiscountSourceOneOf {
|
|
653
650
|
/** Coupon details. */
|
|
654
651
|
coupon?: Coupon;
|
|
655
652
|
/** Merchant discount. */
|
|
@@ -657,7 +654,7 @@ interface AppliedDiscountDiscountSourceOneOf {
|
|
|
657
654
|
/** Discount rule. */
|
|
658
655
|
discountRule?: DiscountRule;
|
|
659
656
|
}
|
|
660
|
-
declare enum DiscountType {
|
|
657
|
+
export declare enum DiscountType {
|
|
661
658
|
/** Global discount. */
|
|
662
659
|
GLOBAL = "GLOBAL",
|
|
663
660
|
/** Discount for specific items. */
|
|
@@ -666,7 +663,7 @@ declare enum DiscountType {
|
|
|
666
663
|
SHIPPING = "SHIPPING"
|
|
667
664
|
}
|
|
668
665
|
/** Coupon */
|
|
669
|
-
interface Coupon {
|
|
666
|
+
export interface Coupon {
|
|
670
667
|
/** Coupon ID. */
|
|
671
668
|
_id?: string;
|
|
672
669
|
/** Coupon code. */
|
|
@@ -676,11 +673,11 @@ interface Coupon {
|
|
|
676
673
|
/** @decimalValue options { gte:0, lte:1000000000000000 } */
|
|
677
674
|
amount?: string;
|
|
678
675
|
}
|
|
679
|
-
interface MerchantDiscount {
|
|
676
|
+
export interface MerchantDiscount {
|
|
680
677
|
/** @decimalValue options { gte:0, lte:1000000000000000 } */
|
|
681
678
|
amount?: string;
|
|
682
679
|
}
|
|
683
|
-
interface DiscountRule {
|
|
680
|
+
export interface DiscountRule {
|
|
684
681
|
/**
|
|
685
682
|
* Discount rule ID.
|
|
686
683
|
* @format GUID
|
|
@@ -691,7 +688,7 @@ interface DiscountRule {
|
|
|
691
688
|
/** @decimalValue options { gte:0, lte:1000000000000000 } */
|
|
692
689
|
amount?: string;
|
|
693
690
|
}
|
|
694
|
-
interface DiscountRuleName {
|
|
691
|
+
export interface DiscountRuleName {
|
|
695
692
|
/**
|
|
696
693
|
* Original discount rule name (in site's default language).
|
|
697
694
|
* @minLength 1
|
|
@@ -705,7 +702,7 @@ interface DiscountRuleName {
|
|
|
705
702
|
*/
|
|
706
703
|
translated?: string | null;
|
|
707
704
|
}
|
|
708
|
-
interface ExternalReference {
|
|
705
|
+
export interface ExternalReference {
|
|
709
706
|
/**
|
|
710
707
|
* ID of the app associated with the purchase flow.
|
|
711
708
|
* For example, the Wix Pay Links app ID.
|
|
@@ -722,7 +719,7 @@ interface ExternalReference {
|
|
|
722
719
|
*/
|
|
723
720
|
resourceId?: string | null;
|
|
724
721
|
}
|
|
725
|
-
interface ExtendedFields {
|
|
722
|
+
export interface ExtendedFields {
|
|
726
723
|
/**
|
|
727
724
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
728
725
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -733,11 +730,11 @@ interface ExtendedFields {
|
|
|
733
730
|
*/
|
|
734
731
|
namespaces?: Record<string, Record<string, any>>;
|
|
735
732
|
}
|
|
736
|
-
interface GetValidationViolationsResponse {
|
|
733
|
+
export interface GetValidationViolationsResponse {
|
|
737
734
|
/** List of validation violations. */
|
|
738
735
|
violations?: Violation[];
|
|
739
736
|
}
|
|
740
|
-
interface Violation {
|
|
737
|
+
export interface Violation {
|
|
741
738
|
/** Severity of the violation. The violations are shown on the cart and checkout pages. A warning is displayed as yellow, and allows a site visitor to proceed with caution. An error is displayed as red, and doesn't allow a site visitor to proceed with the eCommerce flow. */
|
|
742
739
|
severity?: Severity;
|
|
743
740
|
/** Target location on a checkout or cart page where the violation will be displayed. */
|
|
@@ -749,7 +746,7 @@ interface Violation {
|
|
|
749
746
|
*/
|
|
750
747
|
description?: string | null;
|
|
751
748
|
}
|
|
752
|
-
declare enum Severity {
|
|
749
|
+
export declare enum Severity {
|
|
753
750
|
/** The user is allowed to move forward in the flow. */
|
|
754
751
|
WARNING = "WARNING",
|
|
755
752
|
/**
|
|
@@ -758,48 +755,48 @@ declare enum Severity {
|
|
|
758
755
|
*/
|
|
759
756
|
ERROR = "ERROR"
|
|
760
757
|
}
|
|
761
|
-
interface Target extends TargetTargetTypeOneOf {
|
|
758
|
+
export interface Target extends TargetTargetTypeOneOf {
|
|
762
759
|
/** General (other) violation. */
|
|
763
760
|
other?: Other;
|
|
764
761
|
/** Specific line item violation. */
|
|
765
762
|
lineItem?: TargetLineItem;
|
|
766
763
|
}
|
|
767
764
|
/** @oneof */
|
|
768
|
-
interface TargetTargetTypeOneOf {
|
|
765
|
+
export interface TargetTargetTypeOneOf {
|
|
769
766
|
/** General (other) violation. */
|
|
770
767
|
other?: Other;
|
|
771
768
|
/** Specific line item violation. */
|
|
772
769
|
lineItem?: TargetLineItem;
|
|
773
770
|
}
|
|
774
771
|
/** Available locations on the webpage */
|
|
775
|
-
declare enum NameInOther {
|
|
772
|
+
export declare enum NameInOther {
|
|
776
773
|
/** Default location, in case no specific location is specified. */
|
|
777
774
|
OTHER_DEFAULT = "OTHER_DEFAULT"
|
|
778
775
|
}
|
|
779
776
|
/** Available locations on the line item */
|
|
780
|
-
declare enum NameInLineItem {
|
|
777
|
+
export declare enum NameInLineItem {
|
|
781
778
|
/** Default location, in case no specific location is specified. */
|
|
782
779
|
LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
|
|
783
780
|
}
|
|
784
|
-
declare enum SuggestedFix {
|
|
781
|
+
export declare enum SuggestedFix {
|
|
785
782
|
/** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
|
|
786
783
|
UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
|
|
787
784
|
/** The line item should be removed from the cart or checkout to resolve the violation. */
|
|
788
785
|
REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
|
|
789
786
|
}
|
|
790
787
|
/** General (other) violation. */
|
|
791
|
-
interface Other {
|
|
788
|
+
export interface Other {
|
|
792
789
|
/** Location on a checkout or a cart page where a general (other) violation will be displayed. */
|
|
793
790
|
name?: NameInOther;
|
|
794
791
|
}
|
|
795
792
|
/** Specific line item violation. */
|
|
796
|
-
interface TargetLineItem {
|
|
793
|
+
export interface TargetLineItem {
|
|
797
794
|
/** Location on a checkout or a cart page where the specific line item violation will be displayed. */
|
|
798
795
|
name?: NameInLineItem;
|
|
799
796
|
/** ID of the line item containing the violation. */
|
|
800
797
|
_id?: string | null;
|
|
801
798
|
}
|
|
802
|
-
interface ValidationsSPIConfig {
|
|
799
|
+
export interface ValidationsSPIConfig {
|
|
803
800
|
/** Whether to validate the cart page in addition to the checkout page. Default: `false` */
|
|
804
801
|
validateInCart?: boolean;
|
|
805
802
|
/**
|
|
@@ -822,7 +819,7 @@ interface ValidationsSPIConfig {
|
|
|
822
819
|
* }
|
|
823
820
|
* ```
|
|
824
821
|
*/
|
|
825
|
-
interface Context {
|
|
822
|
+
export interface Context {
|
|
826
823
|
/** 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. */
|
|
827
824
|
requestId?: string | null;
|
|
828
825
|
/**
|
|
@@ -840,14 +837,14 @@ interface Context {
|
|
|
840
837
|
*/
|
|
841
838
|
instanceId?: string | null;
|
|
842
839
|
}
|
|
843
|
-
declare enum IdentityType {
|
|
840
|
+
export declare enum IdentityType {
|
|
844
841
|
UNKNOWN = "UNKNOWN",
|
|
845
842
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
846
843
|
MEMBER = "MEMBER",
|
|
847
844
|
WIX_USER = "WIX_USER",
|
|
848
845
|
APP = "APP"
|
|
849
846
|
}
|
|
850
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
847
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
851
848
|
/**
|
|
852
849
|
* ID of a site visitor that has not logged in to the site.
|
|
853
850
|
* @format GUID
|
|
@@ -872,7 +869,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
872
869
|
identityType?: IdentityType;
|
|
873
870
|
}
|
|
874
871
|
/** @oneof */
|
|
875
|
-
interface IdentificationDataIdOneOf {
|
|
872
|
+
export interface IdentificationDataIdOneOf {
|
|
876
873
|
/**
|
|
877
874
|
* ID of a site visitor that has not logged in to the site.
|
|
878
875
|
* @format GUID
|
|
@@ -894,25 +891,3 @@ interface IdentificationDataIdOneOf {
|
|
|
894
891
|
*/
|
|
895
892
|
appId?: string;
|
|
896
893
|
}
|
|
897
|
-
|
|
898
|
-
interface GetValidationViolationsEnvelope {
|
|
899
|
-
request: GetValidationViolationsRequest;
|
|
900
|
-
metadata: Context;
|
|
901
|
-
}
|
|
902
|
-
declare const provideHandlers$1: ServicePluginDefinition<{
|
|
903
|
-
/**
|
|
904
|
-
*
|
|
905
|
-
* This method retrieves validation violations from your app.
|
|
906
|
-
*
|
|
907
|
-
* Wix calls this method when certain actions are performed on a visitor's cart and checkout. For example, when an item is added to the cart, or when a coupon is added to a checkout.
|
|
908
|
-
* This method validates a visitor's cart and checkout, and returns any validation violations (using the structure provided by Wix eCommerce). Site visitors can see the validation violations in their cart and checkout pages. If there aren't any validation violations, the method returns an object containing an empty list.
|
|
909
|
-
*
|
|
910
|
-
* > __Notes:__
|
|
911
|
-
* > + Do not call the Estimate Cart Totals, Estimate Current Cart Totals or Get Checkout methods from your implementation code for Get Validation Violations. Doing so will result in an error.
|
|
912
|
-
* > + By default, this method only retrieves validation violations from a visitor's checkout. If you want to also retrieve validation violations from a visitor's cart, set the `validateInCart` parameter to `true` in the Ecom Validations Integration's config file. */
|
|
913
|
-
getValidationViolations(payload: GetValidationViolationsEnvelope): GetValidationViolationsResponse | Promise<GetValidationViolationsResponse>;
|
|
914
|
-
}>;
|
|
915
|
-
|
|
916
|
-
declare const provideHandlers: ReturnType<typeof createServicePluginModule<typeof publicProvideHandlers>>;
|
|
917
|
-
|
|
918
|
-
export { type Address, type AddressLocation, type AddressWithContact, type ApplicableLineItems, type AppliedDiscount, type AppliedDiscountDiscountSourceOneOf, type BuyerDetails, type Carrier, type CatalogReference, CheckoutStage, type Context, type Coupon, type CustomField, type CustomFields, type DeliveryAllocation, type Description, type DiscountRule, type DiscountRuleName, DiscountType, type ExtendedFields, type ExternalReference, type FreeTrialPeriod, type FullAddressContactDetails, type GetValidationViolationsRequest, type GetValidationViolationsResponse, type GiftCard, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type ItemTaxFullDetails, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, JurisdictionType, type LineItem, type LineItemPricesData, type MerchantDiscount, type MultiCurrencyPrice, NameInLineItem, NameInOther, type Other, type PhysicalProperties, type PriceSummary, type ProductName, type Region, type SelectedCarrierServiceOption, type SelectedCarrierServiceOptionPrices, Severity, type ShippingInfo, Source, type SourceInfo, type Stage, type StageStagesOneOf, type StreetAddress, SubscriptionFrequency, type SubscriptionOptionInfo, type SubscriptionSettings, SuggestedFix, type Target, type TargetLineItem, type TargetTargetTypeOneOf, type TaxBreakdown, type Title, type ValidationInfo, type ValidationsSPIConfig, type VatId, VatType, type Violation, WeightUnit, provideHandlers, provideHandlers$1 as publicProvideHandlers };
|