@wix/auto_sdk_ecom_validations 1.0.6 → 1.0.7
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 → index.d.mts} +94 -69
- package/build/{internal/cjs/src/service-plugins-types.d.ts → index.d.ts} +94 -69
- package/build/index.js +194 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +156 -0
- package/build/index.mjs.map +1 -0
- package/build/{es/src/service-plugins-types.d.ts → internal/index.d.mts} +94 -69
- package/build/internal/{es/src/service-plugins-types.d.ts → index.d.ts} +94 -69
- package/build/internal/index.js +194 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +156 -0
- package/build/internal/index.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -2
- package/build/cjs/index.js +0 -19
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -15
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -9
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -50
- package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
- package/build/cjs/src/service-plugins-types.js +0 -121
- package/build/cjs/src/service-plugins-types.js.map +0 -1
- package/build/es/index.d.ts +0 -2
- package/build/es/index.js +0 -3
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -15
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -6
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -47
- package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
- package/build/es/src/service-plugins-types.js +0 -118
- package/build/es/src/service-plugins-types.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -2
- package/build/internal/cjs/index.js +0 -19
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -15
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -9
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -50
- package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
- package/build/internal/cjs/src/service-plugins-types.js +0 -121
- package/build/internal/cjs/src/service-plugins-types.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -2
- package/build/internal/es/index.js +0 -3
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -15
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -6
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -47
- package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
- package/build/internal/es/src/service-plugins-types.js +0 -118
- package/build/internal/es/src/service-plugins-types.js.map +0 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';
|
|
2
|
+
import { ServicePluginDefinition } from '@wix/sdk-types';
|
|
3
|
+
|
|
4
|
+
interface GetValidationViolationsRequest {
|
|
2
5
|
/** Information about the source of the request. */
|
|
3
6
|
sourceInfo?: SourceInfo;
|
|
4
7
|
/** Information to validate. */
|
|
5
8
|
validationInfo?: ValidationInfo;
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
interface SourceInfo {
|
|
8
11
|
/** Source of the request. */
|
|
9
12
|
source?: Source;
|
|
10
13
|
/**
|
|
@@ -15,7 +18,7 @@ export interface SourceInfo {
|
|
|
15
18
|
/** The stage at which the service plugin is called. */
|
|
16
19
|
stage?: Stage;
|
|
17
20
|
}
|
|
18
|
-
|
|
21
|
+
declare enum Source {
|
|
19
22
|
/** Context cannot be recognized */
|
|
20
23
|
OTHER = "OTHER",
|
|
21
24
|
/** Called from Ecom's Cart service */
|
|
@@ -23,16 +26,16 @@ export declare enum Source {
|
|
|
23
26
|
/** Called from Ecom's Checkout service */
|
|
24
27
|
CHECKOUT = "CHECKOUT"
|
|
25
28
|
}
|
|
26
|
-
|
|
29
|
+
interface Stage extends StageStagesOneOf {
|
|
27
30
|
/** Supported values: */
|
|
28
31
|
checkoutStage?: CheckoutStage;
|
|
29
32
|
}
|
|
30
33
|
/** @oneof */
|
|
31
|
-
|
|
34
|
+
interface StageStagesOneOf {
|
|
32
35
|
/** Supported values: */
|
|
33
36
|
checkoutStage?: CheckoutStage;
|
|
34
37
|
}
|
|
35
|
-
|
|
38
|
+
declare enum CheckoutStage {
|
|
36
39
|
/** Not implemented. */
|
|
37
40
|
UNKNOWN_CHECKOUT_STAGE = "UNKNOWN_CHECKOUT_STAGE",
|
|
38
41
|
/** Used during the initialization of the checkout (Create Checkout). */
|
|
@@ -43,7 +46,7 @@ export declare enum CheckoutStage {
|
|
|
43
46
|
ORDER_CREATION = "ORDER_CREATION"
|
|
44
47
|
}
|
|
45
48
|
/** ValidationsData is the main entity of ValidationsSPI, which contains all the data required for validations */
|
|
46
|
-
|
|
49
|
+
interface ValidationInfo {
|
|
47
50
|
/** Buyer details. */
|
|
48
51
|
buyerDetails?: BuyerDetails;
|
|
49
52
|
/**
|
|
@@ -78,7 +81,7 @@ export interface ValidationInfo {
|
|
|
78
81
|
*/
|
|
79
82
|
appliedDiscounts?: AppliedDiscount[];
|
|
80
83
|
}
|
|
81
|
-
|
|
84
|
+
interface BuyerDetails {
|
|
82
85
|
/**
|
|
83
86
|
* Buyer's email address.
|
|
84
87
|
* @format EMAIL
|
|
@@ -90,7 +93,7 @@ export interface BuyerDetails {
|
|
|
90
93
|
*/
|
|
91
94
|
contactId?: string | null;
|
|
92
95
|
}
|
|
93
|
-
|
|
96
|
+
interface LineItem {
|
|
94
97
|
/**
|
|
95
98
|
* Line item ID.
|
|
96
99
|
* @format GUID
|
|
@@ -124,7 +127,7 @@ export interface LineItem {
|
|
|
124
127
|
pricesBreakdown?: LineItemPricesData;
|
|
125
128
|
}
|
|
126
129
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
127
|
-
|
|
130
|
+
interface CatalogReference {
|
|
128
131
|
/**
|
|
129
132
|
* ID of the item within the catalog it belongs to.
|
|
130
133
|
* @minLength 1
|
|
@@ -150,7 +153,7 @@ export interface CatalogReference {
|
|
|
150
153
|
*/
|
|
151
154
|
options?: Record<string, any> | null;
|
|
152
155
|
}
|
|
153
|
-
|
|
156
|
+
interface ProductName {
|
|
154
157
|
/**
|
|
155
158
|
* __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).
|
|
156
159
|
*
|
|
@@ -171,7 +174,7 @@ export interface ProductName {
|
|
|
171
174
|
*/
|
|
172
175
|
translated?: string | null;
|
|
173
176
|
}
|
|
174
|
-
|
|
177
|
+
interface MultiCurrencyPrice {
|
|
175
178
|
/**
|
|
176
179
|
* Amount.
|
|
177
180
|
* @decimalValue options { gte:0, lte:1000000000000000 }
|
|
@@ -194,7 +197,7 @@ export interface MultiCurrencyPrice {
|
|
|
194
197
|
*/
|
|
195
198
|
formattedConvertedAmount?: string;
|
|
196
199
|
}
|
|
197
|
-
|
|
200
|
+
interface PhysicalProperties {
|
|
198
201
|
/** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
|
|
199
202
|
weight?: number | null;
|
|
200
203
|
/**
|
|
@@ -205,27 +208,27 @@ export interface PhysicalProperties {
|
|
|
205
208
|
/** Whether this line item is shippable. */
|
|
206
209
|
shippable?: boolean;
|
|
207
210
|
}
|
|
208
|
-
|
|
211
|
+
interface ItemType extends ItemTypeItemTypeDataOneOf {
|
|
209
212
|
/** Preset item type. */
|
|
210
213
|
preset?: ItemTypeItemType;
|
|
211
214
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
212
215
|
custom?: string;
|
|
213
216
|
}
|
|
214
217
|
/** @oneof */
|
|
215
|
-
|
|
218
|
+
interface ItemTypeItemTypeDataOneOf {
|
|
216
219
|
/** Preset item type. */
|
|
217
220
|
preset?: ItemTypeItemType;
|
|
218
221
|
/** Custom item type. When none of the preset types are suitable, specifies the custom type. */
|
|
219
222
|
custom?: string;
|
|
220
223
|
}
|
|
221
|
-
|
|
224
|
+
declare enum ItemTypeItemType {
|
|
222
225
|
UNRECOGNISED = "UNRECOGNISED",
|
|
223
226
|
PHYSICAL = "PHYSICAL",
|
|
224
227
|
DIGITAL = "DIGITAL",
|
|
225
228
|
GIFT_CARD = "GIFT_CARD",
|
|
226
229
|
SERVICE = "SERVICE"
|
|
227
230
|
}
|
|
228
|
-
|
|
231
|
+
interface SubscriptionOptionInfo {
|
|
229
232
|
/** Subscription option settings. */
|
|
230
233
|
subscriptionSettings?: SubscriptionSettings;
|
|
231
234
|
/** Subscription option title. */
|
|
@@ -233,7 +236,7 @@ export interface SubscriptionOptionInfo {
|
|
|
233
236
|
/** Subscription option description. */
|
|
234
237
|
description?: Description;
|
|
235
238
|
}
|
|
236
|
-
|
|
239
|
+
interface SubscriptionSettings {
|
|
237
240
|
/** Frequency of recurring payment. */
|
|
238
241
|
frequency?: SubscriptionFrequency;
|
|
239
242
|
/**
|
|
@@ -254,14 +257,14 @@ export interface SubscriptionSettings {
|
|
|
254
257
|
billingCycles?: number | null;
|
|
255
258
|
}
|
|
256
259
|
/** Frequency unit of recurring payment */
|
|
257
|
-
|
|
260
|
+
declare enum SubscriptionFrequency {
|
|
258
261
|
UNDEFINED = "UNDEFINED",
|
|
259
262
|
DAY = "DAY",
|
|
260
263
|
WEEK = "WEEK",
|
|
261
264
|
MONTH = "MONTH",
|
|
262
265
|
YEAR = "YEAR"
|
|
263
266
|
}
|
|
264
|
-
|
|
267
|
+
interface FreeTrialPeriod {
|
|
265
268
|
/** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
|
|
266
269
|
frequency?: SubscriptionFrequency;
|
|
267
270
|
/**
|
|
@@ -271,7 +274,7 @@ export interface FreeTrialPeriod {
|
|
|
271
274
|
*/
|
|
272
275
|
interval?: number;
|
|
273
276
|
}
|
|
274
|
-
|
|
277
|
+
interface Title {
|
|
275
278
|
/**
|
|
276
279
|
* 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
280
|
* @minLength 1
|
|
@@ -287,7 +290,7 @@ export interface Title {
|
|
|
287
290
|
*/
|
|
288
291
|
translated?: string | null;
|
|
289
292
|
}
|
|
290
|
-
|
|
293
|
+
interface Description {
|
|
291
294
|
/**
|
|
292
295
|
* Subscription option description.
|
|
293
296
|
* @maxLength 500
|
|
@@ -299,7 +302,7 @@ export interface Description {
|
|
|
299
302
|
*/
|
|
300
303
|
translated?: string | null;
|
|
301
304
|
}
|
|
302
|
-
|
|
305
|
+
interface LineItemPricesData {
|
|
303
306
|
/** Total price after discounts and after tax. */
|
|
304
307
|
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
305
308
|
/** Total price after discounts, and before tax. */
|
|
@@ -317,7 +320,7 @@ export interface LineItemPricesData {
|
|
|
317
320
|
/** Item price **before** all discounts. Defaults to `price` when not provided. */
|
|
318
321
|
fullPrice?: MultiCurrencyPrice;
|
|
319
322
|
}
|
|
320
|
-
|
|
323
|
+
interface ItemTaxFullDetails {
|
|
321
324
|
/** The portion of the total amount of this estimate that was taxable. */
|
|
322
325
|
taxableAmount?: MultiCurrencyPrice;
|
|
323
326
|
/** Calculated tax, based on `taxable_amount`. */
|
|
@@ -330,7 +333,7 @@ export interface ItemTaxFullDetails {
|
|
|
330
333
|
*/
|
|
331
334
|
taxBreakdown?: TaxBreakdown[];
|
|
332
335
|
}
|
|
333
|
-
|
|
336
|
+
interface TaxBreakdown {
|
|
334
337
|
/**
|
|
335
338
|
* The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
|
|
336
339
|
* @maxLength 200
|
|
@@ -362,7 +365,7 @@ export interface TaxBreakdown {
|
|
|
362
365
|
jurisdictionType?: JurisdictionType;
|
|
363
366
|
}
|
|
364
367
|
/** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
|
|
365
|
-
|
|
368
|
+
declare enum JurisdictionType {
|
|
366
369
|
/** Undefined jurisdiction type. */
|
|
367
370
|
UNDEFINED = "UNDEFINED",
|
|
368
371
|
/** Country jurisdiction. */
|
|
@@ -376,7 +379,7 @@ export declare enum JurisdictionType {
|
|
|
376
379
|
/** Special jurisdiction. */
|
|
377
380
|
SPECIAL = "SPECIAL"
|
|
378
381
|
}
|
|
379
|
-
|
|
382
|
+
interface GiftCard {
|
|
380
383
|
/**
|
|
381
384
|
* Gift card ID.
|
|
382
385
|
* @deprecated
|
|
@@ -392,7 +395,7 @@ export interface GiftCard {
|
|
|
392
395
|
*/
|
|
393
396
|
appId?: string;
|
|
394
397
|
}
|
|
395
|
-
|
|
398
|
+
declare enum WeightUnit {
|
|
396
399
|
/** Weight unit can't be classified due to an error. */
|
|
397
400
|
UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
|
|
398
401
|
/** Kilograms. */
|
|
@@ -400,7 +403,7 @@ export declare enum WeightUnit {
|
|
|
400
403
|
/** Pounds. */
|
|
401
404
|
LB = "LB"
|
|
402
405
|
}
|
|
403
|
-
|
|
406
|
+
interface PriceSummary {
|
|
404
407
|
/** Subtotal of all line items, before discounts and before tax. */
|
|
405
408
|
subtotal?: MultiCurrencyPrice;
|
|
406
409
|
/** Total shipping price, before discounts and before tax. */
|
|
@@ -415,14 +418,14 @@ export interface PriceSummary {
|
|
|
415
418
|
additionalFees?: MultiCurrencyPrice;
|
|
416
419
|
}
|
|
417
420
|
/** Billing Info and shipping details */
|
|
418
|
-
|
|
421
|
+
interface AddressWithContact {
|
|
419
422
|
/** Address. */
|
|
420
423
|
address?: Address;
|
|
421
424
|
/** Contact details. */
|
|
422
425
|
contactDetails?: FullAddressContactDetails;
|
|
423
426
|
}
|
|
424
427
|
/** Physical address */
|
|
425
|
-
|
|
428
|
+
interface Address {
|
|
426
429
|
/**
|
|
427
430
|
* Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
|
|
428
431
|
* @format COUNTRY
|
|
@@ -466,20 +469,20 @@ export interface Address {
|
|
|
466
469
|
*/
|
|
467
470
|
subdivisionFullname?: string | null;
|
|
468
471
|
}
|
|
469
|
-
|
|
472
|
+
interface StreetAddress {
|
|
470
473
|
/** Street number. */
|
|
471
474
|
number?: string;
|
|
472
475
|
/** Street name. */
|
|
473
476
|
name?: string;
|
|
474
477
|
}
|
|
475
|
-
|
|
478
|
+
interface AddressLocation {
|
|
476
479
|
/** Address latitude. */
|
|
477
480
|
latitude?: number | null;
|
|
478
481
|
/** Address longitude. */
|
|
479
482
|
longitude?: number | null;
|
|
480
483
|
}
|
|
481
484
|
/** Full contact details for an address */
|
|
482
|
-
|
|
485
|
+
interface FullAddressContactDetails {
|
|
483
486
|
/**
|
|
484
487
|
* First name.
|
|
485
488
|
* @maxLength 100
|
|
@@ -503,7 +506,7 @@ export interface FullAddressContactDetails {
|
|
|
503
506
|
/** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
|
|
504
507
|
vatId?: VatId;
|
|
505
508
|
}
|
|
506
|
-
|
|
509
|
+
interface VatId {
|
|
507
510
|
/** Customer's tax ID. */
|
|
508
511
|
_id?: string;
|
|
509
512
|
/**
|
|
@@ -516,18 +519,18 @@ export interface VatId {
|
|
|
516
519
|
type?: VatType;
|
|
517
520
|
}
|
|
518
521
|
/** tax info types */
|
|
519
|
-
|
|
522
|
+
declare enum VatType {
|
|
520
523
|
UNSPECIFIED = "UNSPECIFIED",
|
|
521
524
|
/** CPF - for individual tax payers. */
|
|
522
525
|
CPF = "CPF",
|
|
523
526
|
/** CNPJ - for corporations */
|
|
524
527
|
CNPJ = "CNPJ"
|
|
525
528
|
}
|
|
526
|
-
|
|
529
|
+
interface ShippingInfo {
|
|
527
530
|
/** Selected option out of the options allowed for the `region`. */
|
|
528
531
|
selectedCarrierServiceOption?: SelectedCarrierServiceOption;
|
|
529
532
|
}
|
|
530
|
-
|
|
533
|
+
interface SelectedCarrierServiceOption {
|
|
531
534
|
/**
|
|
532
535
|
* Unique identifier of selected option. For example, `usps_std_overnight`.
|
|
533
536
|
* @maxLength 100
|
|
@@ -549,7 +552,7 @@ export interface SelectedCarrierServiceOption {
|
|
|
549
552
|
/** If the delivery solution is a partial and doesn't apply to all items. */
|
|
550
553
|
partial?: boolean | null;
|
|
551
554
|
}
|
|
552
|
-
|
|
555
|
+
interface SelectedCarrierServiceOptionPrices {
|
|
553
556
|
/** Total shipping price, after discount and after tax. */
|
|
554
557
|
totalPriceAfterTax?: MultiCurrencyPrice;
|
|
555
558
|
/** Total price of shipping after discounts (when relevant), and before tax. */
|
|
@@ -561,7 +564,7 @@ export interface SelectedCarrierServiceOptionPrices {
|
|
|
561
564
|
/** Shipping price before discount and before tax. */
|
|
562
565
|
price?: MultiCurrencyPrice;
|
|
563
566
|
}
|
|
564
|
-
|
|
567
|
+
interface DeliveryAllocation {
|
|
565
568
|
/** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
|
|
566
569
|
deliveryCarrier?: Carrier;
|
|
567
570
|
/** The delivery region that are relevant for this delivery solution. */
|
|
@@ -569,7 +572,7 @@ export interface DeliveryAllocation {
|
|
|
569
572
|
/** Populated if the delivery solution is a partially supplied by this carrier. */
|
|
570
573
|
applicableLineItems?: ApplicableLineItems;
|
|
571
574
|
}
|
|
572
|
-
|
|
575
|
+
interface Carrier {
|
|
573
576
|
/**
|
|
574
577
|
* The carrier app id
|
|
575
578
|
* @format GUID
|
|
@@ -581,7 +584,7 @@ export interface Carrier {
|
|
|
581
584
|
*/
|
|
582
585
|
code?: string;
|
|
583
586
|
}
|
|
584
|
-
|
|
587
|
+
interface Region {
|
|
585
588
|
/**
|
|
586
589
|
* The delivery region id.
|
|
587
590
|
* @format GUID
|
|
@@ -593,7 +596,7 @@ export interface Region {
|
|
|
593
596
|
*/
|
|
594
597
|
name?: string | null;
|
|
595
598
|
}
|
|
596
|
-
|
|
599
|
+
interface ApplicableLineItems {
|
|
597
600
|
/**
|
|
598
601
|
* Line items that the delivery solution is for.
|
|
599
602
|
* @maxSize 300
|
|
@@ -602,14 +605,14 @@ export interface ApplicableLineItems {
|
|
|
602
605
|
*/
|
|
603
606
|
lineItemIds?: string[];
|
|
604
607
|
}
|
|
605
|
-
|
|
608
|
+
interface CustomFields {
|
|
606
609
|
/**
|
|
607
610
|
* List of custom fields
|
|
608
611
|
* @maxSize 50
|
|
609
612
|
*/
|
|
610
613
|
fields?: CustomField[];
|
|
611
614
|
}
|
|
612
|
-
|
|
615
|
+
interface CustomField {
|
|
613
616
|
/** Custom field value. */
|
|
614
617
|
value?: any;
|
|
615
618
|
/**
|
|
@@ -625,7 +628,7 @@ export interface CustomField {
|
|
|
625
628
|
*/
|
|
626
629
|
translatedTitle?: string | null;
|
|
627
630
|
}
|
|
628
|
-
|
|
631
|
+
interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
629
632
|
/** Coupon details. */
|
|
630
633
|
coupon?: Coupon;
|
|
631
634
|
/** Merchant discount. */
|
|
@@ -641,7 +644,7 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
|
|
|
641
644
|
lineItemIds?: string[];
|
|
642
645
|
}
|
|
643
646
|
/** @oneof */
|
|
644
|
-
|
|
647
|
+
interface AppliedDiscountDiscountSourceOneOf {
|
|
645
648
|
/** Coupon details. */
|
|
646
649
|
coupon?: Coupon;
|
|
647
650
|
/** Merchant discount. */
|
|
@@ -649,7 +652,7 @@ export interface AppliedDiscountDiscountSourceOneOf {
|
|
|
649
652
|
/** Discount rule. */
|
|
650
653
|
discountRule?: DiscountRule;
|
|
651
654
|
}
|
|
652
|
-
|
|
655
|
+
declare enum DiscountType {
|
|
653
656
|
/** Global discount. */
|
|
654
657
|
GLOBAL = "GLOBAL",
|
|
655
658
|
/** Discount for specific items. */
|
|
@@ -658,7 +661,7 @@ export declare enum DiscountType {
|
|
|
658
661
|
SHIPPING = "SHIPPING"
|
|
659
662
|
}
|
|
660
663
|
/** Coupon */
|
|
661
|
-
|
|
664
|
+
interface Coupon {
|
|
662
665
|
/** Coupon ID. */
|
|
663
666
|
_id?: string;
|
|
664
667
|
/** Coupon code. */
|
|
@@ -668,11 +671,11 @@ export interface Coupon {
|
|
|
668
671
|
/** @decimalValue options { gte:0, lte:1000000000000000 } */
|
|
669
672
|
amount?: string;
|
|
670
673
|
}
|
|
671
|
-
|
|
674
|
+
interface MerchantDiscount {
|
|
672
675
|
/** @decimalValue options { gte:0, lte:1000000000000000 } */
|
|
673
676
|
amount?: string;
|
|
674
677
|
}
|
|
675
|
-
|
|
678
|
+
interface DiscountRule {
|
|
676
679
|
/**
|
|
677
680
|
* Discount rule ID.
|
|
678
681
|
* @format GUID
|
|
@@ -683,7 +686,7 @@ export interface DiscountRule {
|
|
|
683
686
|
/** @decimalValue options { gte:0, lte:1000000000000000 } */
|
|
684
687
|
amount?: string;
|
|
685
688
|
}
|
|
686
|
-
|
|
689
|
+
interface DiscountRuleName {
|
|
687
690
|
/**
|
|
688
691
|
* Original discount rule name (in site's default language).
|
|
689
692
|
* @minLength 1
|
|
@@ -697,7 +700,7 @@ export interface DiscountRuleName {
|
|
|
697
700
|
*/
|
|
698
701
|
translated?: string | null;
|
|
699
702
|
}
|
|
700
|
-
|
|
703
|
+
interface ExternalReference {
|
|
701
704
|
/**
|
|
702
705
|
* ID of the app associated with the purchase flow.
|
|
703
706
|
* For example, the Wix Pay Links app ID.
|
|
@@ -714,7 +717,7 @@ export interface ExternalReference {
|
|
|
714
717
|
*/
|
|
715
718
|
resourceId?: string | null;
|
|
716
719
|
}
|
|
717
|
-
|
|
720
|
+
interface ExtendedFields {
|
|
718
721
|
/**
|
|
719
722
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
720
723
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -725,11 +728,11 @@ export interface ExtendedFields {
|
|
|
725
728
|
*/
|
|
726
729
|
namespaces?: Record<string, Record<string, any>>;
|
|
727
730
|
}
|
|
728
|
-
|
|
731
|
+
interface GetValidationViolationsResponse {
|
|
729
732
|
/** List of validation violations. */
|
|
730
733
|
violations?: Violation[];
|
|
731
734
|
}
|
|
732
|
-
|
|
735
|
+
interface Violation {
|
|
733
736
|
/** 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. */
|
|
734
737
|
severity?: Severity;
|
|
735
738
|
/** Target location on a checkout or cart page where the violation will be displayed. */
|
|
@@ -741,7 +744,7 @@ export interface Violation {
|
|
|
741
744
|
*/
|
|
742
745
|
description?: string | null;
|
|
743
746
|
}
|
|
744
|
-
|
|
747
|
+
declare enum Severity {
|
|
745
748
|
/** The user is allowed to move forward in the flow. */
|
|
746
749
|
WARNING = "WARNING",
|
|
747
750
|
/**
|
|
@@ -750,48 +753,48 @@ export declare enum Severity {
|
|
|
750
753
|
*/
|
|
751
754
|
ERROR = "ERROR"
|
|
752
755
|
}
|
|
753
|
-
|
|
756
|
+
interface Target extends TargetTargetTypeOneOf {
|
|
754
757
|
/** General (other) violation. */
|
|
755
758
|
other?: Other;
|
|
756
759
|
/** Specific line item violation. */
|
|
757
760
|
lineItem?: TargetLineItem;
|
|
758
761
|
}
|
|
759
762
|
/** @oneof */
|
|
760
|
-
|
|
763
|
+
interface TargetTargetTypeOneOf {
|
|
761
764
|
/** General (other) violation. */
|
|
762
765
|
other?: Other;
|
|
763
766
|
/** Specific line item violation. */
|
|
764
767
|
lineItem?: TargetLineItem;
|
|
765
768
|
}
|
|
766
769
|
/** Available locations on the webpage */
|
|
767
|
-
|
|
770
|
+
declare enum NameInOther {
|
|
768
771
|
/** Default location, in case no specific location is specified. */
|
|
769
772
|
OTHER_DEFAULT = "OTHER_DEFAULT"
|
|
770
773
|
}
|
|
771
774
|
/** Available locations on the line item */
|
|
772
|
-
|
|
775
|
+
declare enum NameInLineItem {
|
|
773
776
|
/** Default location, in case no specific location is specified. */
|
|
774
777
|
LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
|
|
775
778
|
}
|
|
776
|
-
|
|
779
|
+
declare enum SuggestedFix {
|
|
777
780
|
/** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
|
|
778
781
|
UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
|
|
779
782
|
/** The line item should be removed from the cart or checkout to resolve the violation. */
|
|
780
783
|
REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
|
|
781
784
|
}
|
|
782
785
|
/** General (other) violation. */
|
|
783
|
-
|
|
786
|
+
interface Other {
|
|
784
787
|
/** Location on a checkout or a cart page where a general (other) violation will be displayed. */
|
|
785
788
|
name?: NameInOther;
|
|
786
789
|
}
|
|
787
790
|
/** Specific line item violation. */
|
|
788
|
-
|
|
791
|
+
interface TargetLineItem {
|
|
789
792
|
/** Location on a checkout or a cart page where the specific line item violation will be displayed. */
|
|
790
793
|
name?: NameInLineItem;
|
|
791
794
|
/** ID of the line item containing the violation. */
|
|
792
795
|
_id?: string | null;
|
|
793
796
|
}
|
|
794
|
-
|
|
797
|
+
interface ValidationsSPIConfig {
|
|
795
798
|
/** Whether to validate the cart page in addition to the checkout page. Default: `false` */
|
|
796
799
|
validateInCart?: boolean;
|
|
797
800
|
/**
|
|
@@ -814,7 +817,7 @@ export interface ValidationsSPIConfig {
|
|
|
814
817
|
* }
|
|
815
818
|
* ```
|
|
816
819
|
*/
|
|
817
|
-
|
|
820
|
+
interface Context {
|
|
818
821
|
/** 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. */
|
|
819
822
|
requestId?: string | null;
|
|
820
823
|
/**
|
|
@@ -832,14 +835,14 @@ export interface Context {
|
|
|
832
835
|
*/
|
|
833
836
|
instanceId?: string | null;
|
|
834
837
|
}
|
|
835
|
-
|
|
838
|
+
declare enum IdentityType {
|
|
836
839
|
UNKNOWN = "UNKNOWN",
|
|
837
840
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
838
841
|
MEMBER = "MEMBER",
|
|
839
842
|
WIX_USER = "WIX_USER",
|
|
840
843
|
APP = "APP"
|
|
841
844
|
}
|
|
842
|
-
|
|
845
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
843
846
|
/**
|
|
844
847
|
* ID of a site visitor that has not logged in to the site.
|
|
845
848
|
* @format GUID
|
|
@@ -864,7 +867,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
864
867
|
identityType?: IdentityType;
|
|
865
868
|
}
|
|
866
869
|
/** @oneof */
|
|
867
|
-
|
|
870
|
+
interface IdentificationDataIdOneOf {
|
|
868
871
|
/**
|
|
869
872
|
* ID of a site visitor that has not logged in to the site.
|
|
870
873
|
* @format GUID
|
|
@@ -886,3 +889,25 @@ export interface IdentificationDataIdOneOf {
|
|
|
886
889
|
*/
|
|
887
890
|
appId?: string;
|
|
888
891
|
}
|
|
892
|
+
|
|
893
|
+
interface GetValidationViolationsEnvelope {
|
|
894
|
+
request: GetValidationViolationsRequest;
|
|
895
|
+
metadata: Context;
|
|
896
|
+
}
|
|
897
|
+
declare const provideHandlers$1: ServicePluginDefinition<{
|
|
898
|
+
/**
|
|
899
|
+
*
|
|
900
|
+
* This method retrieves validation violations from your app.
|
|
901
|
+
*
|
|
902
|
+
* 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.
|
|
903
|
+
* 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.
|
|
904
|
+
*
|
|
905
|
+
* > __Notes:__
|
|
906
|
+
* > + 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.
|
|
907
|
+
* > + 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. */
|
|
908
|
+
getValidationViolations(payload: GetValidationViolationsEnvelope): GetValidationViolationsResponse | Promise<GetValidationViolationsResponse>;
|
|
909
|
+
}>;
|
|
910
|
+
|
|
911
|
+
declare const provideHandlers: ReturnType<typeof createServicePluginModule<typeof publicProvideHandlers>>;
|
|
912
|
+
|
|
913
|
+
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 };
|