@wix/auto_sdk_ecom_validations 1.0.17 → 1.0.19

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 (65) hide show
  1. package/build/cjs/index.d.ts +942 -2
  2. package/build/cjs/index.js +191 -16
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/{cjs/src/service-plugins-types.d.ts → es/index.d.mts} +93 -69
  5. package/build/es/index.mjs +156 -0
  6. package/build/es/index.mjs.map +1 -0
  7. package/build/internal/cjs/index.d.ts +942 -2
  8. package/build/internal/cjs/index.js +191 -16
  9. package/build/internal/cjs/index.js.map +1 -1
  10. package/build/{es/src/service-plugins-types.d.ts → internal/es/index.d.mts} +93 -69
  11. package/build/internal/es/index.mjs +156 -0
  12. package/build/internal/es/index.mjs.map +1 -0
  13. package/package.json +9 -8
  14. package/build/cjs/index.typings.d.ts +0 -15
  15. package/build/cjs/index.typings.js +0 -18
  16. package/build/cjs/index.typings.js.map +0 -1
  17. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
  18. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -9
  19. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
  20. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
  21. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -50
  22. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
  23. package/build/cjs/src/service-plugins-types.js +0 -121
  24. package/build/cjs/src/service-plugins-types.js.map +0 -1
  25. package/build/es/index.d.ts +0 -2
  26. package/build/es/index.js +0 -3
  27. package/build/es/index.js.map +0 -1
  28. package/build/es/index.typings.d.ts +0 -15
  29. package/build/es/index.typings.js +0 -2
  30. package/build/es/index.typings.js.map +0 -1
  31. package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
  32. package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -6
  33. package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
  34. package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
  35. package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -47
  36. package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
  37. package/build/es/src/service-plugins-types.js +0 -118
  38. package/build/es/src/service-plugins-types.js.map +0 -1
  39. package/build/internal/cjs/index.typings.d.ts +0 -15
  40. package/build/internal/cjs/index.typings.js +0 -18
  41. package/build/internal/cjs/index.typings.js.map +0 -1
  42. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
  43. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -9
  44. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
  45. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
  46. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -50
  47. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
  48. package/build/internal/cjs/src/service-plugins-types.d.ts +0 -918
  49. package/build/internal/cjs/src/service-plugins-types.js +0 -121
  50. package/build/internal/cjs/src/service-plugins-types.js.map +0 -1
  51. package/build/internal/es/index.d.ts +0 -2
  52. package/build/internal/es/index.js +0 -3
  53. package/build/internal/es/index.js.map +0 -1
  54. package/build/internal/es/index.typings.d.ts +0 -15
  55. package/build/internal/es/index.typings.js +0 -2
  56. package/build/internal/es/index.typings.js.map +0 -1
  57. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +0 -5
  58. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.js +0 -6
  59. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.js.map +0 -1
  60. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +0 -19
  61. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.js +0 -47
  62. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.js.map +0 -1
  63. package/build/internal/es/src/service-plugins-types.d.ts +0 -918
  64. package/build/internal/es/src/service-plugins-types.js +0 -118
  65. package/build/internal/es/src/service-plugins-types.js.map +0 -1
@@ -1,10 +1,12 @@
1
- export interface GetValidationViolationsRequest {
1
+ import { ServicePluginDefinition, BuildServicePluginDefinition } from '@wix/sdk-types';
2
+
3
+ interface GetValidationViolationsRequest {
2
4
  /** Information about the source of the request. */
3
5
  sourceInfo?: SourceInfo;
4
6
  /** Information to validate. */
5
7
  validationInfo?: ValidationInfo;
6
8
  }
7
- export interface SourceInfo {
9
+ interface SourceInfo {
8
10
  /** Source of the request. */
9
11
  source?: Source;
10
12
  /**
@@ -15,7 +17,7 @@ export interface SourceInfo {
15
17
  /** The stage at which the service plugin is called. */
16
18
  stage?: Stage;
17
19
  }
18
- export declare enum Source {
20
+ declare enum Source {
19
21
  /** Context cannot be recognized */
20
22
  OTHER = "OTHER",
21
23
  /** Called from Ecom's Cart service */
@@ -23,16 +25,16 @@ export declare enum Source {
23
25
  /** Called from Ecom's Checkout service */
24
26
  CHECKOUT = "CHECKOUT"
25
27
  }
26
- export interface Stage extends StageStagesOneOf {
28
+ interface Stage extends StageStagesOneOf {
27
29
  /** Supported values: */
28
30
  checkoutStage?: CheckoutStage;
29
31
  }
30
32
  /** @oneof */
31
- export interface StageStagesOneOf {
33
+ interface StageStagesOneOf {
32
34
  /** Supported values: */
33
35
  checkoutStage?: CheckoutStage;
34
36
  }
35
- export declare enum CheckoutStage {
37
+ declare enum CheckoutStage {
36
38
  /** Not implemented. */
37
39
  UNKNOWN_CHECKOUT_STAGE = "UNKNOWN_CHECKOUT_STAGE",
38
40
  /** Used during the initialization of the checkout (Create Checkout). */
@@ -43,7 +45,7 @@ export declare enum CheckoutStage {
43
45
  ORDER_CREATION = "ORDER_CREATION"
44
46
  }
45
47
  /** ValidationsData is the main entity of ValidationsSPI, which contains all the data required for validations */
46
- export interface ValidationInfo {
48
+ interface ValidationInfo {
47
49
  /** Buyer details. */
48
50
  buyerDetails?: BuyerDetails;
49
51
  /**
@@ -101,7 +103,7 @@ export interface ValidationInfo {
101
103
  */
102
104
  paymentCurrency?: string | null;
103
105
  }
104
- export interface BuyerDetails {
106
+ interface BuyerDetails {
105
107
  /**
106
108
  * Buyer's email address.
107
109
  * @format EMAIL
@@ -113,7 +115,7 @@ export interface BuyerDetails {
113
115
  */
114
116
  contactId?: string | null;
115
117
  }
116
- export interface LineItem {
118
+ interface LineItem {
117
119
  /**
118
120
  * Line item ID.
119
121
  * @format GUID
@@ -147,7 +149,7 @@ export interface LineItem {
147
149
  pricesBreakdown?: LineItemPricesData;
148
150
  }
149
151
  /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
150
- export interface CatalogReference {
152
+ interface CatalogReference {
151
153
  /**
152
154
  * ID of the item within the catalog it belongs to.
153
155
  * @minLength 1
@@ -173,7 +175,7 @@ export interface CatalogReference {
173
175
  */
174
176
  options?: Record<string, any> | null;
175
177
  }
176
- export interface ProductName {
178
+ interface ProductName {
177
179
  /**
178
180
  * __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).
179
181
  *
@@ -194,7 +196,7 @@ export interface ProductName {
194
196
  */
195
197
  translated?: string | null;
196
198
  }
197
- export interface MultiCurrencyPrice {
199
+ interface MultiCurrencyPrice {
198
200
  /**
199
201
  * Amount.
200
202
  * @decimalValue options { gte:0, lte:1000000000000000 }
@@ -217,7 +219,7 @@ export interface MultiCurrencyPrice {
217
219
  */
218
220
  formattedConvertedAmount?: string;
219
221
  }
220
- export interface PhysicalProperties {
222
+ interface PhysicalProperties {
221
223
  /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
222
224
  weight?: number | null;
223
225
  /**
@@ -228,27 +230,27 @@ export interface PhysicalProperties {
228
230
  /** Whether this line item is shippable. */
229
231
  shippable?: boolean;
230
232
  }
231
- export interface ItemType extends ItemTypeItemTypeDataOneOf {
233
+ interface ItemType extends ItemTypeItemTypeDataOneOf {
232
234
  /** Preset item type. */
233
235
  preset?: ItemTypeItemType;
234
236
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
235
237
  custom?: string;
236
238
  }
237
239
  /** @oneof */
238
- export interface ItemTypeItemTypeDataOneOf {
240
+ interface ItemTypeItemTypeDataOneOf {
239
241
  /** Preset item type. */
240
242
  preset?: ItemTypeItemType;
241
243
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
242
244
  custom?: string;
243
245
  }
244
- export declare enum ItemTypeItemType {
246
+ declare enum ItemTypeItemType {
245
247
  UNRECOGNISED = "UNRECOGNISED",
246
248
  PHYSICAL = "PHYSICAL",
247
249
  DIGITAL = "DIGITAL",
248
250
  GIFT_CARD = "GIFT_CARD",
249
251
  SERVICE = "SERVICE"
250
252
  }
251
- export interface SubscriptionOptionInfo {
253
+ interface SubscriptionOptionInfo {
252
254
  /** Subscription option settings. */
253
255
  subscriptionSettings?: SubscriptionSettings;
254
256
  /** Subscription option title. */
@@ -256,7 +258,7 @@ export interface SubscriptionOptionInfo {
256
258
  /** Subscription option description. */
257
259
  description?: Description;
258
260
  }
259
- export interface SubscriptionSettings {
261
+ interface SubscriptionSettings {
260
262
  /** Frequency of recurring payment. */
261
263
  frequency?: SubscriptionFrequency;
262
264
  /**
@@ -284,14 +286,14 @@ export interface SubscriptionSettings {
284
286
  freeTrialPeriod?: FreeTrialPeriod;
285
287
  }
286
288
  /** Frequency unit of recurring payment */
287
- export declare enum SubscriptionFrequency {
289
+ declare enum SubscriptionFrequency {
288
290
  UNDEFINED = "UNDEFINED",
289
291
  DAY = "DAY",
290
292
  WEEK = "WEEK",
291
293
  MONTH = "MONTH",
292
294
  YEAR = "YEAR"
293
295
  }
294
- export interface FreeTrialPeriod {
296
+ interface FreeTrialPeriod {
295
297
  /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
296
298
  frequency?: SubscriptionFrequency;
297
299
  /**
@@ -301,7 +303,7 @@ export interface FreeTrialPeriod {
301
303
  */
302
304
  interval?: number;
303
305
  }
304
- export interface Title {
306
+ interface Title {
305
307
  /**
306
308
  * 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).
307
309
  * @minLength 1
@@ -317,7 +319,7 @@ export interface Title {
317
319
  */
318
320
  translated?: string | null;
319
321
  }
320
- export interface Description {
322
+ interface Description {
321
323
  /**
322
324
  * Subscription option description.
323
325
  * @maxLength 500
@@ -329,7 +331,7 @@ export interface Description {
329
331
  */
330
332
  translated?: string | null;
331
333
  }
332
- export interface LineItemPricesData {
334
+ interface LineItemPricesData {
333
335
  /** Total price after discounts and after tax. */
334
336
  totalPriceAfterTax?: MultiCurrencyPrice;
335
337
  /** Total price after discounts, and before tax. */
@@ -347,7 +349,7 @@ export interface LineItemPricesData {
347
349
  /** Item price **before** all discounts. Defaults to `price` when not provided. */
348
350
  fullPrice?: MultiCurrencyPrice;
349
351
  }
350
- export interface ItemTaxFullDetails {
352
+ interface ItemTaxFullDetails {
351
353
  /** The portion of the total amount of this estimate that was taxable. */
352
354
  taxableAmount?: MultiCurrencyPrice;
353
355
  /** Calculated tax, based on `taxable_amount`. */
@@ -360,7 +362,7 @@ export interface ItemTaxFullDetails {
360
362
  */
361
363
  taxBreakdown?: TaxBreakdown[];
362
364
  }
363
- export interface TaxBreakdown {
365
+ interface TaxBreakdown {
364
366
  /**
365
367
  * The name of the jurisdiction to which this tax detail applies. For example, "New York" or "Quebec".
366
368
  * @maxLength 200
@@ -392,7 +394,7 @@ export interface TaxBreakdown {
392
394
  jurisdictionType?: JurisdictionType;
393
395
  }
394
396
  /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
395
- export declare enum JurisdictionType {
397
+ declare enum JurisdictionType {
396
398
  /** Undefined jurisdiction type. */
397
399
  UNDEFINED = "UNDEFINED",
398
400
  /** Country jurisdiction. */
@@ -406,7 +408,7 @@ export declare enum JurisdictionType {
406
408
  /** Special jurisdiction. */
407
409
  SPECIAL = "SPECIAL"
408
410
  }
409
- export interface GiftCard {
411
+ interface GiftCard {
410
412
  /**
411
413
  * Gift card ID.
412
414
  * @deprecated
@@ -422,7 +424,7 @@ export interface GiftCard {
422
424
  */
423
425
  appId?: string;
424
426
  }
425
- export declare enum WeightUnit {
427
+ declare enum WeightUnit {
426
428
  /** Weight unit can't be classified due to an error. */
427
429
  UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
428
430
  /** Kilograms. */
@@ -430,7 +432,7 @@ export declare enum WeightUnit {
430
432
  /** Pounds. */
431
433
  LB = "LB"
432
434
  }
433
- export interface PriceSummary {
435
+ interface PriceSummary {
434
436
  /** Subtotal of all line items, before discounts and before tax. */
435
437
  subtotal?: MultiCurrencyPrice;
436
438
  /** Total shipping price, before discounts and before tax. */
@@ -445,14 +447,14 @@ export interface PriceSummary {
445
447
  additionalFees?: MultiCurrencyPrice;
446
448
  }
447
449
  /** Billing Info and shipping details */
448
- export interface AddressWithContact {
450
+ interface AddressWithContact {
449
451
  /** Address. */
450
452
  address?: Address;
451
453
  /** Contact details. */
452
454
  contactDetails?: FullAddressContactDetails;
453
455
  }
454
456
  /** Physical address */
455
- export interface Address {
457
+ interface Address {
456
458
  /**
457
459
  * Two-letter country code in [ISO-3166 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.
458
460
  * @format COUNTRY
@@ -496,20 +498,20 @@ export interface Address {
496
498
  */
497
499
  subdivisionFullname?: string | null;
498
500
  }
499
- export interface StreetAddress {
501
+ interface StreetAddress {
500
502
  /** Street number. */
501
503
  number?: string;
502
504
  /** Street name. */
503
505
  name?: string;
504
506
  }
505
- export interface AddressLocation {
507
+ interface AddressLocation {
506
508
  /** Address latitude. */
507
509
  latitude?: number | null;
508
510
  /** Address longitude. */
509
511
  longitude?: number | null;
510
512
  }
511
513
  /** Full contact details for an address */
512
- export interface FullAddressContactDetails {
514
+ interface FullAddressContactDetails {
513
515
  /**
514
516
  * First name.
515
517
  * @maxLength 100
@@ -533,7 +535,7 @@ export interface FullAddressContactDetails {
533
535
  /** Tax information (for Brazil only). If ID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. */
534
536
  vatId?: VatId;
535
537
  }
536
- export interface VatId {
538
+ interface VatId {
537
539
  /** Customer's tax ID. */
538
540
  _id?: string;
539
541
  /**
@@ -546,18 +548,18 @@ export interface VatId {
546
548
  type?: VatType;
547
549
  }
548
550
  /** tax info types */
549
- export declare enum VatType {
551
+ declare enum VatType {
550
552
  UNSPECIFIED = "UNSPECIFIED",
551
553
  /** CPF - for individual tax payers. */
552
554
  CPF = "CPF",
553
555
  /** CNPJ - for corporations */
554
556
  CNPJ = "CNPJ"
555
557
  }
556
- export interface ShippingInfo {
558
+ interface ShippingInfo {
557
559
  /** Selected option out of the options allowed for the `region`. */
558
560
  selectedCarrierServiceOption?: SelectedCarrierServiceOption;
559
561
  }
560
- export interface SelectedCarrierServiceOption {
562
+ interface SelectedCarrierServiceOption {
561
563
  /**
562
564
  * Unique identifier of selected option. For example, `usps_std_overnight`.
563
565
  * @maxLength 100
@@ -579,7 +581,7 @@ export interface SelectedCarrierServiceOption {
579
581
  /** If the delivery solution is a partial and doesn't apply to all items. */
580
582
  partial?: boolean | null;
581
583
  }
582
- export interface SelectedCarrierServiceOptionPrices {
584
+ interface SelectedCarrierServiceOptionPrices {
583
585
  /** Total shipping price, after discount and after tax. */
584
586
  totalPriceAfterTax?: MultiCurrencyPrice;
585
587
  /** Total price of shipping after discounts (when relevant), and before tax. */
@@ -591,7 +593,7 @@ export interface SelectedCarrierServiceOptionPrices {
591
593
  /** Shipping price before discount and before tax. */
592
594
  price?: MultiCurrencyPrice;
593
595
  }
594
- export interface DeliveryAllocation {
596
+ interface DeliveryAllocation {
595
597
  /** The delivery option's carrier details, could be multiple if the delivery option is a combination of multiple carriers */
596
598
  deliveryCarrier?: Carrier;
597
599
  /** The delivery region that are relevant for this delivery solution. */
@@ -599,7 +601,7 @@ export interface DeliveryAllocation {
599
601
  /** Populated if the delivery solution is a partially supplied by this carrier. */
600
602
  applicableLineItems?: ApplicableLineItems;
601
603
  }
602
- export interface Carrier {
604
+ interface Carrier {
603
605
  /**
604
606
  * The carrier app id
605
607
  * @format GUID
@@ -611,7 +613,7 @@ export interface Carrier {
611
613
  */
612
614
  code?: string;
613
615
  }
614
- export interface Region {
616
+ interface Region {
615
617
  /**
616
618
  * The delivery region id.
617
619
  * @format GUID
@@ -623,7 +625,7 @@ export interface Region {
623
625
  */
624
626
  name?: string | null;
625
627
  }
626
- export interface ApplicableLineItems {
628
+ interface ApplicableLineItems {
627
629
  /**
628
630
  * Line items that the delivery solution is for.
629
631
  * @maxSize 300
@@ -632,14 +634,14 @@ export interface ApplicableLineItems {
632
634
  */
633
635
  lineItemIds?: string[];
634
636
  }
635
- export interface CustomFields {
637
+ interface CustomFields {
636
638
  /**
637
639
  * List of custom fields
638
640
  * @maxSize 50
639
641
  */
640
642
  fields?: CustomField[];
641
643
  }
642
- export interface CustomField {
644
+ interface CustomField {
643
645
  /** Custom field value. */
644
646
  value?: any;
645
647
  /**
@@ -655,7 +657,7 @@ export interface CustomField {
655
657
  */
656
658
  translatedTitle?: string | null;
657
659
  }
658
- export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
660
+ interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
659
661
  /** Coupon details. */
660
662
  coupon?: Coupon;
661
663
  /** Merchant discount. */
@@ -671,7 +673,7 @@ export interface AppliedDiscount extends AppliedDiscountDiscountSourceOneOf {
671
673
  lineItemIds?: string[];
672
674
  }
673
675
  /** @oneof */
674
- export interface AppliedDiscountDiscountSourceOneOf {
676
+ interface AppliedDiscountDiscountSourceOneOf {
675
677
  /** Coupon details. */
676
678
  coupon?: Coupon;
677
679
  /** Merchant discount. */
@@ -679,7 +681,7 @@ export interface AppliedDiscountDiscountSourceOneOf {
679
681
  /** Discount rule. */
680
682
  discountRule?: DiscountRule;
681
683
  }
682
- export declare enum DiscountType {
684
+ declare enum DiscountType {
683
685
  /** Global discount. */
684
686
  GLOBAL = "GLOBAL",
685
687
  /** Discount for specific items. */
@@ -688,7 +690,7 @@ export declare enum DiscountType {
688
690
  SHIPPING = "SHIPPING"
689
691
  }
690
692
  /** Coupon */
691
- export interface Coupon {
693
+ interface Coupon {
692
694
  /** Coupon ID. */
693
695
  _id?: string;
694
696
  /** Coupon code. */
@@ -698,11 +700,11 @@ export interface Coupon {
698
700
  /** @decimalValue options { gte:0, lte:1000000000000000 } */
699
701
  amount?: string;
700
702
  }
701
- export interface MerchantDiscount {
703
+ interface MerchantDiscount {
702
704
  /** @decimalValue options { gte:0, lte:1000000000000000 } */
703
705
  amount?: string;
704
706
  }
705
- export interface DiscountRule {
707
+ interface DiscountRule {
706
708
  /**
707
709
  * Discount rule ID.
708
710
  * @format GUID
@@ -713,7 +715,7 @@ export interface DiscountRule {
713
715
  /** @decimalValue options { gte:0, lte:1000000000000000 } */
714
716
  amount?: string;
715
717
  }
716
- export interface DiscountRuleName {
718
+ interface DiscountRuleName {
717
719
  /**
718
720
  * Original discount rule name (in site's default language).
719
721
  * @minLength 1
@@ -727,7 +729,7 @@ export interface DiscountRuleName {
727
729
  */
728
730
  translated?: string | null;
729
731
  }
730
- export interface ExternalReference {
732
+ interface ExternalReference {
731
733
  /**
732
734
  * ID of the app associated with the purchase flow.
733
735
  * For example, the Wix Pay Links app ID.
@@ -744,7 +746,7 @@ export interface ExternalReference {
744
746
  */
745
747
  resourceId?: string | null;
746
748
  }
747
- export interface ExtendedFields {
749
+ interface ExtendedFields {
748
750
  /**
749
751
  * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
750
752
  * The value of each key is structured according to the schema defined when the extended fields were configured.
@@ -755,11 +757,11 @@ export interface ExtendedFields {
755
757
  */
756
758
  namespaces?: Record<string, Record<string, any>>;
757
759
  }
758
- export interface GetValidationViolationsResponse {
760
+ interface GetValidationViolationsResponse {
759
761
  /** List of validation violations. */
760
762
  violations?: Violation[];
761
763
  }
762
- export interface Violation {
764
+ interface Violation {
763
765
  /** 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. */
764
766
  severity?: Severity;
765
767
  /** Target location on a checkout or cart page where the violation will be displayed. */
@@ -771,7 +773,7 @@ export interface Violation {
771
773
  */
772
774
  description?: string | null;
773
775
  }
774
- export declare enum Severity {
776
+ declare enum Severity {
775
777
  /** The user is allowed to move forward in the flow. */
776
778
  WARNING = "WARNING",
777
779
  /**
@@ -780,48 +782,48 @@ export declare enum Severity {
780
782
  */
781
783
  ERROR = "ERROR"
782
784
  }
783
- export interface Target extends TargetTargetTypeOneOf {
785
+ interface Target extends TargetTargetTypeOneOf {
784
786
  /** General (other) violation. */
785
787
  other?: Other;
786
788
  /** Specific line item violation. */
787
789
  lineItem?: TargetLineItem;
788
790
  }
789
791
  /** @oneof */
790
- export interface TargetTargetTypeOneOf {
792
+ interface TargetTargetTypeOneOf {
791
793
  /** General (other) violation. */
792
794
  other?: Other;
793
795
  /** Specific line item violation. */
794
796
  lineItem?: TargetLineItem;
795
797
  }
796
798
  /** Available locations on the webpage */
797
- export declare enum NameInOther {
799
+ declare enum NameInOther {
798
800
  /** Default location, in case no specific location is specified. */
799
801
  OTHER_DEFAULT = "OTHER_DEFAULT"
800
802
  }
801
803
  /** Available locations on the line item */
802
- export declare enum NameInLineItem {
804
+ declare enum NameInLineItem {
803
805
  /** Default location, in case no specific location is specified. */
804
806
  LINE_ITEM_DEFAULT = "LINE_ITEM_DEFAULT"
805
807
  }
806
- export declare enum SuggestedFix {
808
+ declare enum SuggestedFix {
807
809
  /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
808
810
  UNKNOWN_SUGGESTED_FIX = "UNKNOWN_SUGGESTED_FIX",
809
811
  /** The line item should be removed from the cart or checkout to resolve the violation. */
810
812
  REMOVE_LINE_ITEM = "REMOVE_LINE_ITEM"
811
813
  }
812
814
  /** General (other) violation. */
813
- export interface Other {
815
+ interface Other {
814
816
  /** Location on a checkout or a cart page where a general (other) violation will be displayed. */
815
817
  name?: NameInOther;
816
818
  }
817
819
  /** Specific line item violation. */
818
- export interface TargetLineItem {
820
+ interface TargetLineItem {
819
821
  /** Location on a checkout or a cart page where the specific line item violation will be displayed. */
820
822
  name?: NameInLineItem;
821
823
  /** ID of the line item containing the violation. */
822
824
  _id?: string | null;
823
825
  }
824
- export interface ValidationsSPIConfig {
826
+ interface ValidationsSPIConfig {
825
827
  /** Whether to validate the cart page in addition to the checkout page. Default: `false` */
826
828
  validateInCart?: boolean;
827
829
  /**
@@ -844,7 +846,7 @@ export interface ValidationsSPIConfig {
844
846
  * }
845
847
  * ```
846
848
  */
847
- export interface Context {
849
+ interface Context {
848
850
  /** 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. */
849
851
  requestId?: string | null;
850
852
  /**
@@ -862,14 +864,14 @@ export interface Context {
862
864
  */
863
865
  instanceId?: string | null;
864
866
  }
865
- export declare enum IdentityType {
867
+ declare enum IdentityType {
866
868
  UNKNOWN = "UNKNOWN",
867
869
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
868
870
  MEMBER = "MEMBER",
869
871
  WIX_USER = "WIX_USER",
870
872
  APP = "APP"
871
873
  }
872
- export interface IdentificationData extends IdentificationDataIdOneOf {
874
+ interface IdentificationData extends IdentificationDataIdOneOf {
873
875
  /**
874
876
  * ID of a site visitor that has not logged in to the site.
875
877
  * @format GUID
@@ -894,7 +896,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
894
896
  identityType?: IdentityType;
895
897
  }
896
898
  /** @oneof */
897
- export interface IdentificationDataIdOneOf {
899
+ interface IdentificationDataIdOneOf {
898
900
  /**
899
901
  * ID of a site visitor that has not logged in to the site.
900
902
  * @format GUID
@@ -916,3 +918,25 @@ export interface IdentificationDataIdOneOf {
916
918
  */
917
919
  appId?: string;
918
920
  }
921
+
922
+ interface GetValidationViolationsEnvelope {
923
+ request: GetValidationViolationsRequest;
924
+ metadata: Context;
925
+ }
926
+ declare const provideHandlers$1: ServicePluginDefinition<{
927
+ /**
928
+ *
929
+ * This method retrieves validation violations from your app.
930
+ *
931
+ * 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.
932
+ * 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.
933
+ *
934
+ * > __Notes:__
935
+ * > + 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.
936
+ * > + 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. */
937
+ getValidationViolations(payload: GetValidationViolationsEnvelope): GetValidationViolationsResponse | Promise<GetValidationViolationsResponse>;
938
+ }>;
939
+
940
+ declare const provideHandlers: BuildServicePluginDefinition<typeof provideHandlers$1>;
941
+
942
+ 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 };