@wix/auto_sdk_ecom_validations 1.0.6 → 1.0.8

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.
Files changed (69) hide show
  1. package/build/{cjs/src/service-plugins-types.d.ts → index.d.mts} +99 -69
  2. package/build/{internal/cjs/src/service-plugins-types.d.ts → index.d.ts} +99 -69
  3. package/build/index.js +194 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +156 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/{es/src/service-plugins-types.d.ts → internal/index.d.mts} +99 -69
  8. package/build/internal/{es/src/service-plugins-types.d.ts → index.d.ts} +99 -69
  9. package/build/internal/index.js +194 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +156 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/package.json +13 -12
  14. package/build/cjs/index.d.ts +0 -2
  15. package/build/cjs/index.js +0 -19
  16. package/build/cjs/index.js.map +0 -1
  17. package/build/cjs/index.typings.d.ts +0 -15
  18. package/build/cjs/index.typings.js +0 -18
  19. package/build/cjs/index.typings.js.map +0 -1
  20. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
  21. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -9
  22. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
  23. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
  24. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -50
  25. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
  26. package/build/cjs/src/service-plugins-types.js +0 -121
  27. package/build/cjs/src/service-plugins-types.js.map +0 -1
  28. package/build/es/index.d.ts +0 -2
  29. package/build/es/index.js +0 -3
  30. package/build/es/index.js.map +0 -1
  31. package/build/es/index.typings.d.ts +0 -15
  32. package/build/es/index.typings.js +0 -2
  33. package/build/es/index.typings.js.map +0 -1
  34. package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
  35. package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -6
  36. package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
  37. package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
  38. package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -47
  39. package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
  40. package/build/es/src/service-plugins-types.js +0 -118
  41. package/build/es/src/service-plugins-types.js.map +0 -1
  42. package/build/internal/cjs/index.d.ts +0 -2
  43. package/build/internal/cjs/index.js +0 -19
  44. package/build/internal/cjs/index.js.map +0 -1
  45. package/build/internal/cjs/index.typings.d.ts +0 -15
  46. package/build/internal/cjs/index.typings.js +0 -18
  47. package/build/internal/cjs/index.typings.js.map +0 -1
  48. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
  49. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -9
  50. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
  51. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
  52. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -50
  53. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
  54. package/build/internal/cjs/src/service-plugins-types.js +0 -121
  55. package/build/internal/cjs/src/service-plugins-types.js.map +0 -1
  56. package/build/internal/es/index.d.ts +0 -2
  57. package/build/internal/es/index.js +0 -3
  58. package/build/internal/es/index.js.map +0 -1
  59. package/build/internal/es/index.typings.d.ts +0 -15
  60. package/build/internal/es/index.typings.js +0 -2
  61. package/build/internal/es/index.typings.js.map +0 -1
  62. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
  63. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -6
  64. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
  65. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
  66. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -47
  67. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
  68. package/build/internal/es/src/service-plugins-types.js +0 -118
  69. package/build/internal/es/src/service-plugins-types.js.map +0 -1
@@ -1,10 +1,13 @@
1
- export interface GetValidationViolationsRequest {
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
- export interface SourceInfo {
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
- export declare enum Source {
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
- export interface Stage extends StageStagesOneOf {
29
+ interface Stage extends StageStagesOneOf {
27
30
  /** Supported values: */
28
31
  checkoutStage?: CheckoutStage;
29
32
  }
30
33
  /** @oneof */
31
- export interface StageStagesOneOf {
34
+ interface StageStagesOneOf {
32
35
  /** Supported values: */
33
36
  checkoutStage?: CheckoutStage;
34
37
  }
35
- export declare enum CheckoutStage {
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
- export interface ValidationInfo {
49
+ interface ValidationInfo {
47
50
  /** Buyer details. */
48
51
  buyerDetails?: BuyerDetails;
49
52
  /**
@@ -77,8 +80,13 @@ export interface ValidationInfo {
77
80
  * @maxSize 320
78
81
  */
79
82
  appliedDiscounts?: AppliedDiscount[];
83
+ /**
84
+ * References to an external app and resource associated with this checkout.
85
+ * Used for integration and tracking across different platforms.
86
+ */
87
+ externalReference?: ExternalReference;
80
88
  }
81
- export interface BuyerDetails {
89
+ interface BuyerDetails {
82
90
  /**
83
91
  * Buyer's email address.
84
92
  * @format EMAIL
@@ -90,7 +98,7 @@ export interface BuyerDetails {
90
98
  */
91
99
  contactId?: string | null;
92
100
  }
93
- export interface LineItem {
101
+ interface LineItem {
94
102
  /**
95
103
  * Line item ID.
96
104
  * @format GUID
@@ -124,7 +132,7 @@ export interface LineItem {
124
132
  pricesBreakdown?: LineItemPricesData;
125
133
  }
126
134
  /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
127
- export interface CatalogReference {
135
+ interface CatalogReference {
128
136
  /**
129
137
  * ID of the item within the catalog it belongs to.
130
138
  * @minLength 1
@@ -150,7 +158,7 @@ export interface CatalogReference {
150
158
  */
151
159
  options?: Record<string, any> | null;
152
160
  }
153
- export interface ProductName {
161
+ interface ProductName {
154
162
  /**
155
163
  * __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
164
  *
@@ -171,7 +179,7 @@ export interface ProductName {
171
179
  */
172
180
  translated?: string | null;
173
181
  }
174
- export interface MultiCurrencyPrice {
182
+ interface MultiCurrencyPrice {
175
183
  /**
176
184
  * Amount.
177
185
  * @decimalValue options { gte:0, lte:1000000000000000 }
@@ -194,7 +202,7 @@ export interface MultiCurrencyPrice {
194
202
  */
195
203
  formattedConvertedAmount?: string;
196
204
  }
197
- export interface PhysicalProperties {
205
+ interface PhysicalProperties {
198
206
  /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
199
207
  weight?: number | null;
200
208
  /**
@@ -205,27 +213,27 @@ export interface PhysicalProperties {
205
213
  /** Whether this line item is shippable. */
206
214
  shippable?: boolean;
207
215
  }
208
- export interface ItemType extends ItemTypeItemTypeDataOneOf {
216
+ interface ItemType extends ItemTypeItemTypeDataOneOf {
209
217
  /** Preset item type. */
210
218
  preset?: ItemTypeItemType;
211
219
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
212
220
  custom?: string;
213
221
  }
214
222
  /** @oneof */
215
- export interface ItemTypeItemTypeDataOneOf {
223
+ interface ItemTypeItemTypeDataOneOf {
216
224
  /** Preset item type. */
217
225
  preset?: ItemTypeItemType;
218
226
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
219
227
  custom?: string;
220
228
  }
221
- export declare enum ItemTypeItemType {
229
+ declare enum ItemTypeItemType {
222
230
  UNRECOGNISED = "UNRECOGNISED",
223
231
  PHYSICAL = "PHYSICAL",
224
232
  DIGITAL = "DIGITAL",
225
233
  GIFT_CARD = "GIFT_CARD",
226
234
  SERVICE = "SERVICE"
227
235
  }
228
- export interface SubscriptionOptionInfo {
236
+ interface SubscriptionOptionInfo {
229
237
  /** Subscription option settings. */
230
238
  subscriptionSettings?: SubscriptionSettings;
231
239
  /** Subscription option title. */
@@ -233,7 +241,7 @@ export interface SubscriptionOptionInfo {
233
241
  /** Subscription option description. */
234
242
  description?: Description;
235
243
  }
236
- export interface SubscriptionSettings {
244
+ interface SubscriptionSettings {
237
245
  /** Frequency of recurring payment. */
238
246
  frequency?: SubscriptionFrequency;
239
247
  /**
@@ -254,14 +262,14 @@ export interface SubscriptionSettings {
254
262
  billingCycles?: number | null;
255
263
  }
256
264
  /** Frequency unit of recurring payment */
257
- export declare enum SubscriptionFrequency {
265
+ declare enum SubscriptionFrequency {
258
266
  UNDEFINED = "UNDEFINED",
259
267
  DAY = "DAY",
260
268
  WEEK = "WEEK",
261
269
  MONTH = "MONTH",
262
270
  YEAR = "YEAR"
263
271
  }
264
- export interface FreeTrialPeriod {
272
+ interface FreeTrialPeriod {
265
273
  /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
266
274
  frequency?: SubscriptionFrequency;
267
275
  /**
@@ -271,7 +279,7 @@ export interface FreeTrialPeriod {
271
279
  */
272
280
  interval?: number;
273
281
  }
274
- export interface Title {
282
+ interface Title {
275
283
  /**
276
284
  * 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
285
  * @minLength 1
@@ -287,7 +295,7 @@ export interface Title {
287
295
  */
288
296
  translated?: string | null;
289
297
  }
290
- export interface Description {
298
+ interface Description {
291
299
  /**
292
300
  * Subscription option description.
293
301
  * @maxLength 500
@@ -299,7 +307,7 @@ export interface Description {
299
307
  */
300
308
  translated?: string | null;
301
309
  }
302
- export interface LineItemPricesData {
310
+ interface LineItemPricesData {
303
311
  /** Total price after discounts and after tax. */
304
312
  totalPriceAfterTax?: MultiCurrencyPrice;
305
313
  /** Total price after discounts, and before tax. */
@@ -317,7 +325,7 @@ export interface LineItemPricesData {
317
325
  /** Item price **before** all discounts. Defaults to `price` when not provided. */
318
326
  fullPrice?: MultiCurrencyPrice;
319
327
  }
320
- export interface ItemTaxFullDetails {
328
+ interface ItemTaxFullDetails {
321
329
  /** The portion of the total amount of this estimate that was taxable. */
322
330
  taxableAmount?: MultiCurrencyPrice;
323
331
  /** Calculated tax, based on `taxable_amount`. */
@@ -330,7 +338,7 @@ export interface ItemTaxFullDetails {
330
338
  */
331
339
  taxBreakdown?: TaxBreakdown[];
332
340
  }
333
- export interface TaxBreakdown {
341
+ interface TaxBreakdown {
334
342
  /**
335
343
  * The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
336
344
  * @maxLength 200
@@ -362,7 +370,7 @@ export interface TaxBreakdown {
362
370
  jurisdictionType?: JurisdictionType;
363
371
  }
364
372
  /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
365
- export declare enum JurisdictionType {
373
+ declare enum JurisdictionType {
366
374
  /** Undefined jurisdiction type. */
367
375
  UNDEFINED = "UNDEFINED",
368
376
  /** Country jurisdiction. */
@@ -376,7 +384,7 @@ export declare enum JurisdictionType {
376
384
  /** Special jurisdiction. */
377
385
  SPECIAL = "SPECIAL"
378
386
  }
379
- export interface GiftCard {
387
+ interface GiftCard {
380
388
  /**
381
389
  * Gift card ID.
382
390
  * @deprecated
@@ -392,7 +400,7 @@ export interface GiftCard {
392
400
  */
393
401
  appId?: string;
394
402
  }
395
- export declare enum WeightUnit {
403
+ declare enum WeightUnit {
396
404
  /** Weight unit can't be classified due to an error. */
397
405
  UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
398
406
  /** Kilograms. */
@@ -400,7 +408,7 @@ export declare enum WeightUnit {
400
408
  /** Pounds. */
401
409
  LB = "LB"
402
410
  }
403
- export interface PriceSummary {
411
+ interface PriceSummary {
404
412
  /** Subtotal of all line items, before discounts and before tax. */
405
413
  subtotal?: MultiCurrencyPrice;
406
414
  /** Total shipping price, before discounts and before tax. */
@@ -415,14 +423,14 @@ export interface PriceSummary {
415
423
  additionalFees?: MultiCurrencyPrice;
416
424
  }
417
425
  /** Billing Info and shipping details */
418
- export interface AddressWithContact {
426
+ interface AddressWithContact {
419
427
  /** Address. */
420
428
  address?: Address;
421
429
  /** Contact details. */
422
430
  contactDetails?: FullAddressContactDetails;
423
431
  }
424
432
  /** Physical address */
425
- export interface Address {
433
+ interface Address {
426
434
  /**
427
435
  * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
428
436
  * @format COUNTRY
@@ -466,20 +474,20 @@ export interface Address {
466
474
  */
467
475
  subdivisionFullname?: string | null;
468
476
  }
469
- export interface StreetAddress {
477
+ interface StreetAddress {
470
478
  /** Street number. */
471
479
  number?: string;
472
480
  /** Street name. */
473
481
  name?: string;
474
482
  }
475
- export interface AddressLocation {
483
+ interface AddressLocation {
476
484
  /** Address latitude. */
477
485
  latitude?: number | null;
478
486
  /** Address longitude. */
479
487
  longitude?: number | null;
480
488
  }
481
489
  /** Full contact details for an address */
482
- export interface FullAddressContactDetails {
490
+ interface FullAddressContactDetails {
483
491
  /**
484
492
  * First name.
485
493
  * @maxLength 100
@@ -503,7 +511,7 @@ export interface FullAddressContactDetails {
503
511
  /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
504
512
  vatId?: VatId;
505
513
  }
506
- export interface VatId {
514
+ interface VatId {
507
515
  /** Customer's tax ID. */
508
516
  _id?: string;
509
517
  /**
@@ -516,18 +524,18 @@ export interface VatId {
516
524
  type?: VatType;
517
525
  }
518
526
  /** tax info types */
519
- export declare enum VatType {
527
+ declare enum VatType {
520
528
  UNSPECIFIED = "UNSPECIFIED",
521
529
  /** CPF - for individual tax payers. */
522
530
  CPF = "CPF",
523
531
  /** CNPJ - for corporations */
524
532
  CNPJ = "CNPJ"
525
533
  }
526
- export interface ShippingInfo {
534
+ interface ShippingInfo {
527
535
  /** Selected option out of the options allowed for the `region`. */
528
536
  selectedCarrierServiceOption?: SelectedCarrierServiceOption;
529
537
  }
530
- export interface SelectedCarrierServiceOption {
538
+ interface SelectedCarrierServiceOption {
531
539
  /**
532
540
  * Unique identifier of selected option. For example, `usps_std_overnight`.
533
541
  * @maxLength 100
@@ -549,7 +557,7 @@ export interface SelectedCarrierServiceOption {
549
557
  /** If the delivery solution is a partial and doesn't apply to all items. */
550
558
  partial?: boolean | null;
551
559
  }
552
- export interface SelectedCarrierServiceOptionPrices {
560
+ interface SelectedCarrierServiceOptionPrices {
553
561
  /** Total shipping price, after discount and after tax. */
554
562
  totalPriceAfterTax?: MultiCurrencyPrice;
555
563
  /** Total price of shipping after discounts (when relevant), and before tax. */
@@ -561,7 +569,7 @@ export interface SelectedCarrierServiceOptionPrices {
561
569
  /** Shipping price before discount and before tax. */
562
570
  price?: MultiCurrencyPrice;
563
571
  }
564
- export interface DeliveryAllocation {
572
+ interface DeliveryAllocation {
565
573
  /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
566
574
  deliveryCarrier?: Carrier;
567
575
  /** The delivery region that are relevant for this delivery solution. */
@@ -569,7 +577,7 @@ export interface DeliveryAllocation {
569
577
  /** Populated if the delivery solution is a partially supplied by this carrier. */
570
578
  applicableLineItems?: ApplicableLineItems;
571
579
  }
572
- export interface Carrier {
580
+ interface Carrier {
573
581
  /**
574
582
  * The carrier app id
575
583
  * @format GUID
@@ -581,7 +589,7 @@ export interface Carrier {
581
589
  */
582
590
  code?: string;
583
591
  }
584
- export interface Region {
592
+ interface Region {
585
593
  /**
586
594
  * The delivery region id.
587
595
  * @format GUID
@@ -593,7 +601,7 @@ export interface Region {
593
601
  */
594
602
  name?: string | null;
595
603
  }
596
- export interface ApplicableLineItems {
604
+ interface ApplicableLineItems {
597
605
  /**
598
606
  * Line items that the delivery solution is for.
599
607
  * @maxSize 300
@@ -602,14 +610,14 @@ export interface ApplicableLineItems {
602
610
  */
603
611
  lineItemIds?: string[];
604
612
  }
605
- export interface CustomFields {
613
+ interface CustomFields {
606
614
  /**
607
615
  * List of custom fields
608
616
  * @maxSize 50
609
617
  */
610
618
  fields?: CustomField[];
611
619
  }
612
- export interface CustomField {
620
+ interface CustomField {
613
621
  /** Custom field value. */
614
622
  value?: any;
615
623
  /**
@@ -625,7 +633,7 @@ export interface CustomField {
625
633
  */
626
634
  translatedTitle?: string | null;
627
635
  }
628
- export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
636
+ interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
629
637
  /** Coupon details. */
630
638
  coupon?: Coupon;
631
639
  /** Merchant discount. */
@@ -641,7 +649,7 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
641
649
  lineItemIds?: string[];
642
650
  }
643
651
  /** @oneof */
644
- export interface AppliedDiscountDiscountSourceOneOf {
652
+ interface AppliedDiscountDiscountSourceOneOf {
645
653
  /** Coupon details. */
646
654
  coupon?: Coupon;
647
655
  /** Merchant discount. */
@@ -649,7 +657,7 @@ export interface AppliedDiscountDiscountSourceOneOf {
649
657
  /** Discount rule. */
650
658
  discountRule?: DiscountRule;
651
659
  }
652
- export declare enum DiscountType {
660
+ declare enum DiscountType {
653
661
  /** Global discount. */
654
662
  GLOBAL = "GLOBAL",
655
663
  /** Discount for specific items. */
@@ -658,7 +666,7 @@ export declare enum DiscountType {
658
666
  SHIPPING = "SHIPPING"
659
667
  }
660
668
  /** Coupon */
661
- export interface Coupon {
669
+ interface Coupon {
662
670
  /** Coupon ID. */
663
671
  _id?: string;
664
672
  /** Coupon code. */
@@ -668,11 +676,11 @@ export interface Coupon {
668
676
  /** @decimalValue options { gte:0, lte:1000000000000000 } */
669
677
  amount?: string;
670
678
  }
671
- export interface MerchantDiscount {
679
+ interface MerchantDiscount {
672
680
  /** @decimalValue options { gte:0, lte:1000000000000000 } */
673
681
  amount?: string;
674
682
  }
675
- export interface DiscountRule {
683
+ interface DiscountRule {
676
684
  /**
677
685
  * Discount rule ID.
678
686
  * @format GUID
@@ -683,7 +691,7 @@ export interface DiscountRule {
683
691
  /** @decimalValue options { gte:0, lte:1000000000000000 } */
684
692
  amount?: string;
685
693
  }
686
- export interface DiscountRuleName {
694
+ interface DiscountRuleName {
687
695
  /**
688
696
  * Original discount rule name (in site's default language).
689
697
  * @minLength 1
@@ -697,7 +705,7 @@ export interface DiscountRuleName {
697
705
  */
698
706
  translated?: string | null;
699
707
  }
700
- export interface ExternalReference {
708
+ interface ExternalReference {
701
709
  /**
702
710
  * ID of the app associated with the purchase flow.
703
711
  * For example, the Wix Pay Links app ID.
@@ -714,7 +722,7 @@ export interface ExternalReference {
714
722
  */
715
723
  resourceId?: string | null;
716
724
  }
717
- export interface ExtendedFields {
725
+ interface ExtendedFields {
718
726
  /**
719
727
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
720
728
  * The value of each key is structured according to the schema defined when the extended fields were configured.
@@ -725,11 +733,11 @@ export interface ExtendedFields {
725
733
  */
726
734
  namespaces?: Record<string, Record<string, any>>;
727
735
  }
728
- export interface GetValidationViolationsResponse {
736
+ interface GetValidationViolationsResponse {
729
737
  /** List of validation violations. */
730
738
  violations?: Violation[];
731
739
  }
732
- export interface Violation {
740
+ interface Violation {
733
741
  /** 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
742
  severity?: Severity;
735
743
  /** Target location on a checkout or cart page where the violation will be displayed. */
@@ -741,7 +749,7 @@ export interface Violation {
741
749
  */
742
750
  description?: string | null;
743
751
  }
744
- export declare enum Severity {
752
+ declare enum Severity {
745
753
  /** The user is allowed to move forward in the flow. */
746
754
  WARNING = "WARNING",
747
755
  /**
@@ -750,48 +758,48 @@ export declare enum Severity {
750
758
  */
751
759
  ERROR = "ERROR"
752
760
  }
753
- export interface Target extends TargetTargetTypeOneOf {
761
+ interface Target extends TargetTargetTypeOneOf {
754
762
  /** General (other) violation. */
755
763
  other?: Other;
756
764
  /** Specific line item violation. */
757
765
  lineItem?: TargetLineItem;
758
766
  }
759
767
  /** @oneof */
760
- export interface TargetTargetTypeOneOf {
768
+ interface TargetTargetTypeOneOf {
761
769
  /** General (other) violation. */
762
770
  other?: Other;
763
771
  /** Specific line item violation. */
764
772
  lineItem?: TargetLineItem;
765
773
  }
766
774
  /** Available locations on the webpage */
767
- export declare enum NameInOther {
775
+ declare enum NameInOther {
768
776
  /** Default location, in case no specific location is specified. */
769
777
  OTHER_DEFAULT = "OTHER_DEFAULT"
770
778
  }
771
779
  /** Available locations on the line item */
772
- export declare enum NameInLineItem {
780
+ declare enum NameInLineItem {
773
781
  /** Default location, in case no specific location is specified. */
774
782
  LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
775
783
  }
776
- export declare enum SuggestedFix {
784
+ declare enum SuggestedFix {
777
785
  /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
778
786
  UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
779
787
  /** The line item should be removed from the cart or checkout to resolve the violation. */
780
788
  REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
781
789
  }
782
790
  /** General (other) violation. */
783
- export interface Other {
791
+ interface Other {
784
792
  /** Location on a checkout or a cart page where a general (other) violation will be displayed. */
785
793
  name?: NameInOther;
786
794
  }
787
795
  /** Specific line item violation. */
788
- export interface TargetLineItem {
796
+ interface TargetLineItem {
789
797
  /** Location on a checkout or a cart page where the specific line item violation will be displayed. */
790
798
  name?: NameInLineItem;
791
799
  /** ID of the line item containing the violation. */
792
800
  _id?: string | null;
793
801
  }
794
- export interface ValidationsSPIConfig {
802
+ interface ValidationsSPIConfig {
795
803
  /** Whether to validate the cart page in addition to the checkout page. Default: `false` */
796
804
  validateInCart?: boolean;
797
805
  /**
@@ -814,7 +822,7 @@ export interface ValidationsSPIConfig {
814
822
  * }
815
823
  * ```
816
824
  */
817
- export interface Context {
825
+ interface Context {
818
826
  /** 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
827
  requestId?: string | null;
820
828
  /**
@@ -832,14 +840,14 @@ export interface Context {
832
840
  */
833
841
  instanceId?: string | null;
834
842
  }
835
- export declare enum IdentityType {
843
+ declare enum IdentityType {
836
844
  UNKNOWN = "UNKNOWN",
837
845
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
838
846
  MEMBER = "MEMBER",
839
847
  WIX_USER = "WIX_USER",
840
848
  APP = "APP"
841
849
  }
842
- export interface IdentificationData extends IdentificationDataIdOneOf {
850
+ interface IdentificationData extends IdentificationDataIdOneOf {
843
851
  /**
844
852
  * ID of a site visitor that has not logged in to the site.
845
853
  * @format GUID
@@ -864,7 +872,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
864
872
  identityType?: IdentityType;
865
873
  }
866
874
  /** @oneof */
867
- export interface IdentificationDataIdOneOf {
875
+ interface IdentificationDataIdOneOf {
868
876
  /**
869
877
  * ID of a site visitor that has not logged in to the site.
870
878
  * @format GUID
@@ -886,3 +894,25 @@ export interface IdentificationDataIdOneOf {
886
894
  */
887
895
  appId?: string;
888
896
  }
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 };