@wix/auto_sdk_ecom_catalog 1.0.18 → 1.0.20

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} +100 -57
  2. package/build/{internal/cjs/src/service-plugins-types.d.ts → index.d.ts} +100 -57
  3. package/build/index.js +161 -0
  4. package/build/index.js.map +1 -0
  5. package/build/index.mjs +128 -0
  6. package/build/index.mjs.map +1 -0
  7. package/build/{es/src/service-plugins-types.d.ts → internal/index.d.mts} +100 -57
  8. package/build/internal/{es/src/service-plugins-types.d.ts → index.d.ts} +100 -57
  9. package/build/internal/index.js +161 -0
  10. package/build/internal/index.js.map +1 -0
  11. package/build/internal/index.mjs +128 -0
  12. package/build/internal/index.mjs.map +1 -0
  13. package/package.json +12 -11
  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 -29
  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-catalog-provider.context.d.ts +0 -5
  21. package/build/cjs/src/interfaces-ecommerce-v1-catalog-provider.context.js +0 -9
  22. package/build/cjs/src/interfaces-ecommerce-v1-catalog-provider.context.js.map +0 -1
  23. package/build/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.d.ts +0 -33
  24. package/build/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.js +0 -49
  25. package/build/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.js.map +0 -1
  26. package/build/cjs/src/service-plugins-types.js +0 -77
  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 -29
  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-catalog-provider.context.d.ts +0 -5
  35. package/build/es/src/interfaces-ecommerce-v1-catalog-provider.context.js +0 -6
  36. package/build/es/src/interfaces-ecommerce-v1-catalog-provider.context.js.map +0 -1
  37. package/build/es/src/interfaces-ecommerce-v1-catalog-provider.public.d.ts +0 -33
  38. package/build/es/src/interfaces-ecommerce-v1-catalog-provider.public.js +0 -46
  39. package/build/es/src/interfaces-ecommerce-v1-catalog-provider.public.js.map +0 -1
  40. package/build/es/src/service-plugins-types.js +0 -74
  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 -29
  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-catalog-provider.context.d.ts +0 -5
  49. package/build/internal/cjs/src/interfaces-ecommerce-v1-catalog-provider.context.js +0 -9
  50. package/build/internal/cjs/src/interfaces-ecommerce-v1-catalog-provider.context.js.map +0 -1
  51. package/build/internal/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.d.ts +0 -33
  52. package/build/internal/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.js +0 -49
  53. package/build/internal/cjs/src/interfaces-ecommerce-v1-catalog-provider.public.js.map +0 -1
  54. package/build/internal/cjs/src/service-plugins-types.js +0 -77
  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 -29
  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-catalog-provider.context.d.ts +0 -5
  63. package/build/internal/es/src/interfaces-ecommerce-v1-catalog-provider.context.js +0 -6
  64. package/build/internal/es/src/interfaces-ecommerce-v1-catalog-provider.context.js.map +0 -1
  65. package/build/internal/es/src/interfaces-ecommerce-v1-catalog-provider.public.d.ts +0 -33
  66. package/build/internal/es/src/interfaces-ecommerce-v1-catalog-provider.public.js +0 -46
  67. package/build/internal/es/src/interfaces-ecommerce-v1-catalog-provider.public.js.map +0 -1
  68. package/build/internal/es/src/service-plugins-types.js +0 -74
  69. package/build/internal/es/src/service-plugins-types.js.map +0 -1
@@ -1,4 +1,6 @@
1
- export interface GetCatalogItemsRequest {
1
+ import { ServicePluginDefinition, BuildServicePluginDefinition } from '@wix/sdk-types';
2
+
3
+ interface GetCatalogItemsRequest {
2
4
  /**
3
5
  * Catalog reference details for the items to retrieve, including quantity of each item.
4
6
  * @minSize 1
@@ -19,14 +21,14 @@ export interface GetCatalogItemsRequest {
19
21
  */
20
22
  currency?: string;
21
23
  }
22
- export interface CatalogReferenceAndQuantity {
24
+ interface CatalogReferenceAndQuantity {
23
25
  /** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */
24
26
  catalogReference?: CatalogReference;
25
27
  /** Item quantity. */
26
28
  quantity?: number;
27
29
  }
28
30
  /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
29
- export interface CatalogReference {
31
+ interface CatalogReference {
30
32
  /**
31
33
  * ID of the item within the catalog it belongs to.
32
34
  * @minLength 1
@@ -52,7 +54,7 @@ export interface CatalogReference {
52
54
  */
53
55
  options?: Record<string, any> | null;
54
56
  }
55
- export declare enum WeightUnit {
57
+ declare enum WeightUnit {
56
58
  /** Weight unit can't be classified due to an error. */
57
59
  UNSPECIFIED_WEIGHT_UNIT = "UNSPECIFIED_WEIGHT_UNIT",
58
60
  /** Kilograms. */
@@ -61,7 +63,7 @@ export declare enum WeightUnit {
61
63
  LB = "LB"
62
64
  }
63
65
  /** Buyer Info */
64
- export interface BuyerInfo extends BuyerInfoIdOneOf {
66
+ interface BuyerInfo extends BuyerInfoIdOneOf {
65
67
  /**
66
68
  * Visitor ID - if the buyer is **not** a site member.
67
69
  * @format GUID
@@ -92,7 +94,7 @@ export interface BuyerInfo extends BuyerInfoIdOneOf {
92
94
  email?: string | null;
93
95
  }
94
96
  /** @oneof */
95
- export interface BuyerInfoIdOneOf {
97
+ interface BuyerInfoIdOneOf {
96
98
  /**
97
99
  * Visitor ID - if the buyer is **not** a site member.
98
100
  * @format GUID
@@ -112,20 +114,20 @@ export interface BuyerInfoIdOneOf {
112
114
  */
113
115
  userId?: string;
114
116
  }
115
- export interface GetCatalogItemsResponse {
117
+ interface GetCatalogItemsResponse {
116
118
  /**
117
119
  * Details for each item, including catalog reference details and item data. Any items that don't exist in the catalog are excluded.
118
120
  * If none of the requested items exist in the catalog, this array must be empty.
119
121
  */
120
122
  catalogItems?: Item[];
121
123
  }
122
- export interface Item {
124
+ interface Item {
123
125
  /** Catalog and item reference info. Holds IDs for the item and the catalog it belongs to, as well as further optional details. This is identical in the request and response. */
124
126
  catalogReference?: CatalogReference;
125
127
  /** Item data. Contains full details about the item. */
126
128
  data?: ItemData;
127
129
  }
128
- export interface ItemData {
130
+ interface ItemData {
129
131
  /** __Required.__ Item name. */
130
132
  productName?: ProductName;
131
133
  /**
@@ -250,8 +252,13 @@ export interface ItemData {
250
252
  * Default: `false`
251
253
  */
252
254
  membersOnly?: boolean;
255
+ /**
256
+ * Modifier groups that were added to the item.
257
+ * @maxSize 25
258
+ */
259
+ modifierGroups?: ModifierGroup[];
253
260
  }
254
- export interface ProductName {
261
+ interface ProductName {
255
262
  /**
256
263
  * __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).
257
264
  *
@@ -272,27 +279,27 @@ export interface ProductName {
272
279
  */
273
280
  translated?: string | null;
274
281
  }
275
- export interface ItemType extends ItemTypeItemTypeDataOneOf {
282
+ interface ItemType extends ItemTypeItemTypeDataOneOf {
276
283
  /** Preset item type. */
277
284
  preset?: ItemTypeItemType;
278
285
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
279
286
  custom?: string;
280
287
  }
281
288
  /** @oneof */
282
- export interface ItemTypeItemTypeDataOneOf {
289
+ interface ItemTypeItemTypeDataOneOf {
283
290
  /** Preset item type. */
284
291
  preset?: ItemTypeItemType;
285
292
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
286
293
  custom?: string;
287
294
  }
288
- export declare enum ItemTypeItemType {
295
+ declare enum ItemTypeItemType {
289
296
  UNRECOGNISED = "UNRECOGNISED",
290
297
  PHYSICAL = "PHYSICAL",
291
298
  DIGITAL = "DIGITAL",
292
299
  GIFT_CARD = "GIFT_CARD",
293
300
  SERVICE = "SERVICE"
294
301
  }
295
- export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
302
+ interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
296
303
  /** Description line plain text value. */
297
304
  plainText?: PlainTextValue;
298
305
  /** Description line color value. */
@@ -301,16 +308,16 @@ export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionL
301
308
  name?: DescriptionLineName;
302
309
  }
303
310
  /** @oneof */
304
- export interface DescriptionLineValueOneOf {
311
+ interface DescriptionLineValueOneOf {
305
312
  /** Description line plain text value. */
306
313
  plainText?: PlainTextValue;
307
314
  /** Description line color value. */
308
315
  colorInfo?: Color;
309
316
  }
310
317
  /** @oneof */
311
- export interface DescriptionLineDescriptionLineValueOneOf {
318
+ interface DescriptionLineDescriptionLineValueOneOf {
312
319
  }
313
- export interface DescriptionLineName {
320
+ interface DescriptionLineName {
314
321
  /**
315
322
  * Description line 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).
316
323
  * @maxLength 100
@@ -324,7 +331,7 @@ export interface DescriptionLineName {
324
331
  */
325
332
  translated?: string | null;
326
333
  }
327
- export interface PlainTextValue {
334
+ interface PlainTextValue {
328
335
  /**
329
336
  * Description line plain text value 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).
330
337
  * @maxLength 600
@@ -338,7 +345,7 @@ export interface PlainTextValue {
338
345
  */
339
346
  translated?: string | null;
340
347
  }
341
- export interface Color {
348
+ interface Color {
342
349
  /**
343
350
  * Description line color 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).
344
351
  * @maxLength 500
@@ -354,7 +361,7 @@ export interface Color {
354
361
  /** HEX or RGB color code for display. */
355
362
  code?: string | null;
356
363
  }
357
- export declare enum DescriptionLineType {
364
+ declare enum DescriptionLineType {
358
365
  /** Unrecognized type. */
359
366
  UNRECOGNISED = "UNRECOGNISED",
360
367
  /** Plain text type. */
@@ -362,7 +369,7 @@ export declare enum DescriptionLineType {
362
369
  /** Color type. */
363
370
  COLOR = "COLOR"
364
371
  }
365
- export interface PhysicalProperties {
372
+ interface PhysicalProperties {
366
373
  /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
367
374
  weight?: number | null;
368
375
  /**
@@ -373,19 +380,19 @@ export interface PhysicalProperties {
373
380
  /** Whether this line item is shippable. */
374
381
  shippable?: boolean;
375
382
  }
376
- export interface Scope {
383
+ interface Scope {
377
384
  /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
378
385
  namespace?: string;
379
386
  /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
380
387
  group?: Group;
381
388
  }
382
- export interface Group {
389
+ interface Group {
383
390
  /** Coupon scope's group (e.g., product or collection in Wix Stores). See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
384
391
  name?: string;
385
392
  /** Item ID (when the coupon scope is limited to just one item). */
386
393
  entityId?: string | null;
387
394
  }
388
- export interface SubscriptionOptionInfo {
395
+ interface SubscriptionOptionInfo {
389
396
  /** Subscription option settings. */
390
397
  subscriptionSettings?: SubscriptionSettings;
391
398
  /** Subscription option title. */
@@ -393,7 +400,7 @@ export interface SubscriptionOptionInfo {
393
400
  /** Subscription option description. */
394
401
  description?: Description;
395
402
  }
396
- export interface SubscriptionSettings {
403
+ interface SubscriptionSettings {
397
404
  /** Frequency of recurring payment. */
398
405
  frequency?: SubscriptionFrequency;
399
406
  /**
@@ -421,14 +428,14 @@ export interface SubscriptionSettings {
421
428
  freeTrialPeriod?: FreeTrialPeriod;
422
429
  }
423
430
  /** Frequency unit of recurring payment */
424
- export declare enum SubscriptionFrequency {
431
+ declare enum SubscriptionFrequency {
425
432
  UNDEFINED = "UNDEFINED",
426
433
  DAY = "DAY",
427
434
  WEEK = "WEEK",
428
435
  MONTH = "MONTH",
429
436
  YEAR = "YEAR"
430
437
  }
431
- export interface FreeTrialPeriod {
438
+ interface FreeTrialPeriod {
432
439
  /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
433
440
  frequency?: SubscriptionFrequency;
434
441
  /**
@@ -438,7 +445,7 @@ export interface FreeTrialPeriod {
438
445
  */
439
446
  interval?: number;
440
447
  }
441
- export interface Title {
448
+ interface Title {
442
449
  /**
443
450
  * 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).
444
451
  * @minLength 1
@@ -454,7 +461,7 @@ export interface Title {
454
461
  */
455
462
  translated?: string | null;
456
463
  }
457
- export interface Description {
464
+ interface Description {
458
465
  /**
459
466
  * Subscription option description.
460
467
  * @maxLength 500
@@ -466,7 +473,7 @@ export interface Description {
466
473
  */
467
474
  translated?: string | null;
468
475
  }
469
- export interface SecuredMedia {
476
+ interface SecuredMedia {
470
477
  /**
471
478
  * Media ID in Wix Media Manager.
472
479
  * @minLength 1
@@ -482,7 +489,7 @@ export interface SecuredMedia {
482
489
  /** File type. */
483
490
  fileType?: FileType;
484
491
  }
485
- export declare enum FileType {
492
+ declare enum FileType {
486
493
  UNSPECIFIED = "UNSPECIFIED",
487
494
  SECURE_PICTURE = "SECURE_PICTURE",
488
495
  SECURE_VIDEO = "SECURE_VIDEO",
@@ -491,7 +498,7 @@ export declare enum FileType {
491
498
  SECURE_ARCHIVE = "SECURE_ARCHIVE"
492
499
  }
493
500
  /** Type of selected payment option for catalog item */
494
- export declare enum PaymentOptionType {
501
+ declare enum PaymentOptionType {
495
502
  /** The entire payment for this item happens as part of the checkout. */
496
503
  FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
497
504
  /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
@@ -503,7 +510,7 @@ export declare enum PaymentOptionType {
503
510
  /** Payment for this item can only be done by charging a membership and must be manually redeemed in the dashboard by the site admin. When selected, `price` is `0`. */
504
511
  MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
505
512
  }
506
- export interface ServiceProperties {
513
+ interface ServiceProperties {
507
514
  /**
508
515
  * Date and time the service is to be provided, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
509
516
  * For example, the start time of a class.
@@ -516,7 +523,7 @@ export interface ServiceProperties {
516
523
  */
517
524
  numberOfParticipants?: number | null;
518
525
  }
519
- export interface PriceDescription {
526
+ interface PriceDescription {
520
527
  /**
521
528
  * __Required.__ Price description 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).
522
529
  * @minLength 1
@@ -532,22 +539,22 @@ export interface PriceDescription {
532
539
  */
533
540
  translated?: string | null;
534
541
  }
535
- export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
542
+ interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
536
543
  /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
537
544
  addressType?: TaxableAddressType;
538
545
  }
539
546
  /** @oneof */
540
- export interface TaxableAddressTaxableAddressDataOneOf {
547
+ interface TaxableAddressTaxableAddressDataOneOf {
541
548
  /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
542
549
  addressType?: TaxableAddressType;
543
550
  }
544
- export declare enum TaxableAddressType {
551
+ declare enum TaxableAddressType {
545
552
  UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
546
553
  BUSINESS = "BUSINESS",
547
554
  BILLING = "BILLING",
548
555
  SHIPPING = "SHIPPING"
549
556
  }
550
- export interface Policy {
557
+ interface Policy {
551
558
  /**
552
559
  * Policy title - should be translated
553
560
  * @minLength 1
@@ -561,7 +568,7 @@ export interface Policy {
561
568
  */
562
569
  content?: string;
563
570
  }
564
- export interface AdditionalFee {
571
+ interface AdditionalFee {
565
572
  /**
566
573
  * Additional fee's unique code or ID.
567
574
  * @minLength 1
@@ -589,7 +596,7 @@ export interface AdditionalFee {
589
596
  taxDetails?: TaxDetails;
590
597
  }
591
598
  /** Tax details. */
592
- export interface TaxDetails {
599
+ interface TaxDetails {
593
600
  /** Whether additional fee is taxable. */
594
601
  taxable?: boolean;
595
602
  /**
@@ -598,7 +605,7 @@ export interface TaxDetails {
598
605
  */
599
606
  taxGroupId?: string | null;
600
607
  }
601
- export interface ModifierGroup {
608
+ interface ModifierGroup {
602
609
  /**
603
610
  * Modifier group id.
604
611
  * @minLength 1
@@ -610,11 +617,11 @@ export interface ModifierGroup {
610
617
  /**
611
618
  * List of modifiers in this group.
612
619
  * @minSize 1
613
- * @maxSize 10
620
+ * @maxSize 25
614
621
  */
615
622
  modifiers?: ItemModifier[];
616
623
  }
617
- export interface TranslatableString {
624
+ interface TranslatableString {
618
625
  /**
619
626
  * __Required.__ String 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).
620
627
  *
@@ -635,7 +642,7 @@ export interface TranslatableString {
635
642
  */
636
643
  translated?: string | null;
637
644
  }
638
- export interface ItemModifier {
645
+ interface ItemModifier {
639
646
  /**
640
647
  * Modifier ID.
641
648
  * @minLength 1
@@ -658,7 +665,7 @@ export interface ItemModifier {
658
665
  */
659
666
  price?: string | null;
660
667
  }
661
- export interface QueryCatalogItemsRequest {
668
+ interface QueryCatalogItemsRequest {
662
669
  /**
663
670
  * A list of itemIDs to filter by. If exists, the result will only include the items with the IDs passed.
664
671
  * @minLength 1
@@ -680,19 +687,19 @@ export interface QueryCatalogItemsRequest {
680
687
  */
681
688
  lastNumericId?: string | null;
682
689
  }
683
- export interface Paging {
690
+ interface Paging {
684
691
  /** Number of items to load. */
685
692
  limit?: number | null;
686
693
  /** Number of items to skip in the current sort order. */
687
694
  offset?: number | null;
688
695
  }
689
- export interface QueryCatalogItemsResponse {
696
+ interface QueryCatalogItemsResponse {
690
697
  /** Catalog info and item data. */
691
698
  catalogItems?: BasicItem[];
692
699
  /** Paging metadata. */
693
700
  metadata?: PagingMetadata;
694
701
  }
695
- export interface BasicItem {
702
+ interface BasicItem {
696
703
  /**
697
704
  * The ID of the item.
698
705
  * @minLength 1
@@ -713,13 +720,13 @@ export interface BasicItem {
713
720
  */
714
721
  numericId?: string | null;
715
722
  }
716
- export interface NumericPropertyRange {
723
+ interface NumericPropertyRange {
717
724
  /** Minimum value. */
718
725
  minValue?: number;
719
726
  /** Maximum value. */
720
727
  maxValue?: number;
721
728
  }
722
- export interface PagingMetadata {
729
+ interface PagingMetadata {
723
730
  /** Number of items returned in the response. */
724
731
  count?: number | null;
725
732
  /** Offset that was requested. */
@@ -729,7 +736,7 @@ export interface PagingMetadata {
729
736
  /** Flag that indicates the server failed to calculate the `total` field. */
730
737
  tooManyToCount?: boolean | null;
731
738
  }
732
- export interface CatalogSPIConfig {
739
+ interface CatalogSPIConfig {
733
740
  /** Base URI which Wix eCommerce will call to access Catalog service plugin endpoints. For example, to call the Get Catalog Items endpoint at `https://my-external-catalog.com/get-catalog-items`, the base URI you provide here is `https://my-external-catalog.com`. */
734
741
  deploymentUri?: string;
735
742
  /** Configuration details for discounts applied to all items in the catalog. */
@@ -738,7 +745,7 @@ export interface CatalogSPIConfig {
738
745
  specificItemsDiscount?: SpecificItemsDiscountConfig;
739
746
  }
740
747
  /** Configuration for all items discount functionality in the catalog. */
741
- export interface AllItemsDiscountConfig {
748
+ interface AllItemsDiscountConfig {
742
749
  /**
743
750
  * Whether the discount is enabled.
744
751
  *
@@ -754,7 +761,7 @@ export interface AllItemsDiscountConfig {
754
761
  name?: string | null;
755
762
  }
756
763
  /** Configuration for discount functionality in the catalog. */
757
- export interface SpecificItemsDiscountConfig {
764
+ interface SpecificItemsDiscountConfig {
758
765
  /**
759
766
  * Whether the discount is enabled.
760
767
  *
@@ -781,7 +788,7 @@ export interface SpecificItemsDiscountConfig {
781
788
  * }
782
789
  * ```
783
790
  */
784
- export interface Context {
791
+ interface Context {
785
792
  /** 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. */
786
793
  requestId?: string | null;
787
794
  /**
@@ -799,14 +806,14 @@ export interface Context {
799
806
  */
800
807
  instanceId?: string | null;
801
808
  }
802
- export declare enum IdentityType {
809
+ declare enum IdentityType {
803
810
  UNKNOWN = "UNKNOWN",
804
811
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
805
812
  MEMBER = "MEMBER",
806
813
  WIX_USER = "WIX_USER",
807
814
  APP = "APP"
808
815
  }
809
- export interface IdentificationData extends IdentificationDataIdOneOf {
816
+ interface IdentificationData extends IdentificationDataIdOneOf {
810
817
  /**
811
818
  * ID of a site visitor that has not logged in to the site.
812
819
  * @format GUID
@@ -831,7 +838,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
831
838
  identityType?: IdentityType;
832
839
  }
833
840
  /** @oneof */
834
- export interface IdentificationDataIdOneOf {
841
+ interface IdentificationDataIdOneOf {
835
842
  /**
836
843
  * ID of a site visitor that has not logged in to the site.
837
844
  * @format GUID
@@ -853,3 +860,39 @@ export interface IdentificationDataIdOneOf {
853
860
  */
854
861
  appId?: string;
855
862
  }
863
+
864
+ interface GetCatalogItemsEnvelope {
865
+ request: GetCatalogItemsRequest;
866
+ metadata: Context;
867
+ }
868
+ declare const provideHandlers$1: ServicePluginDefinition<{
869
+ /**
870
+ *
871
+ * Retrieves data for specified items in a specified catalog.
872
+ *
873
+ * Wix calls this method whenever a cart or checkout is updated, and when an item is added to an order.
874
+ *
875
+ * The method receives a `catalogReferences` array. Each catalog reference in the array contains:
876
+ * + The ID of the item whose latest information Wix needs to retrieve.
877
+ * + The ID of the app providing the catalog containing the item.
878
+ * + Optional details about preferences or customization of the item.
879
+ *
880
+ * The method also receives preferences for the currency and weight unit to be used in the response.
881
+ *
882
+ * Your external catalog can store and organize item details in any way you prefer.
883
+ * When implementing the Catalog service plugin, learn how to handle item variants ([REST](https://dev.wix.com/docs/rest/business-solutions/e-commerce/catalog-service-plugin/handle-item-variants) | [SDK](https://dev.wix.com/docs/sdk/backend-modules/ecom/service-plugins/catalog/handle-item-variants)) in a way that meets your needs.
884
+ *
885
+ * The method's response must contain a `catalogItems` array. Each item in the array must contain:
886
+ * + A `catalogReference` object. This must be identical to the `catalogReference` object received in the request.
887
+ * + A `data` object with full details about the item.
888
+ *
889
+ * > **Notes:**
890
+ * > + If an item doesn't exist in the catalog, the response must exclude it from the `catalogItems` array in the response.
891
+ * > + When none of the items requested exist in the catalog, `catalogItems` must contain an empty array.
892
+ * > + Wix calls the method every time a cart or checkout is updated. If the response doesn't include an item that was already in the cart or checkout, Wix removes the item from the cart or checkout. */
893
+ getCatalogItems(payload: GetCatalogItemsEnvelope): GetCatalogItemsResponse | Promise<GetCatalogItemsResponse>;
894
+ }>;
895
+
896
+ declare const provideHandlers: BuildServicePluginDefinition<typeof provideHandlers$1>;
897
+
898
+ export { type AdditionalFee, type AllItemsDiscountConfig, type BasicItem, type BuyerInfo, type BuyerInfoIdOneOf, type CatalogReference, type CatalogReferenceAndQuantity, type CatalogSPIConfig, type Color, type Context, type Description, type DescriptionLine, type DescriptionLineDescriptionLineValueOneOf, type DescriptionLineName, DescriptionLineType, type DescriptionLineValueOneOf, FileType, type FreeTrialPeriod, type GetCatalogItemsRequest, type GetCatalogItemsResponse, type Group, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type Item, type ItemData, type ItemModifier, type ItemType, ItemTypeItemType, type ItemTypeItemTypeDataOneOf, type ModifierGroup, type NumericPropertyRange, type Paging, type PagingMetadata, PaymentOptionType, type PhysicalProperties, type PlainTextValue, type Policy, type PriceDescription, type ProductName, type QueryCatalogItemsRequest, type QueryCatalogItemsResponse, type Scope, type SecuredMedia, type ServiceProperties, type SpecificItemsDiscountConfig, SubscriptionFrequency, type SubscriptionOptionInfo, type SubscriptionSettings, type TaxDetails, type TaxableAddress, type TaxableAddressTaxableAddressDataOneOf, TaxableAddressType, type Title, type TranslatableString, WeightUnit, provideHandlers, provideHandlers$1 as publicProvideHandlers };
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ DescriptionLineType: () => DescriptionLineType,
24
+ FileType: () => FileType,
25
+ IdentityType: () => IdentityType,
26
+ ItemTypeItemType: () => ItemTypeItemType,
27
+ PaymentOptionType: () => PaymentOptionType,
28
+ SubscriptionFrequency: () => SubscriptionFrequency,
29
+ TaxableAddressType: () => TaxableAddressType,
30
+ WeightUnit: () => WeightUnit,
31
+ provideHandlers: () => provideHandlers2,
32
+ publicProvideHandlers: () => provideHandlers
33
+ });
34
+ module.exports = __toCommonJS(index_exports);
35
+
36
+ // src/service-plugins-types.ts
37
+ var WeightUnit = /* @__PURE__ */ ((WeightUnit2) => {
38
+ WeightUnit2["UNSPECIFIED_WEIGHT_UNIT"] = "UNSPECIFIED_WEIGHT_UNIT";
39
+ WeightUnit2["KG"] = "KG";
40
+ WeightUnit2["LB"] = "LB";
41
+ return WeightUnit2;
42
+ })(WeightUnit || {});
43
+ var ItemTypeItemType = /* @__PURE__ */ ((ItemTypeItemType2) => {
44
+ ItemTypeItemType2["UNRECOGNISED"] = "UNRECOGNISED";
45
+ ItemTypeItemType2["PHYSICAL"] = "PHYSICAL";
46
+ ItemTypeItemType2["DIGITAL"] = "DIGITAL";
47
+ ItemTypeItemType2["GIFT_CARD"] = "GIFT_CARD";
48
+ ItemTypeItemType2["SERVICE"] = "SERVICE";
49
+ return ItemTypeItemType2;
50
+ })(ItemTypeItemType || {});
51
+ var DescriptionLineType = /* @__PURE__ */ ((DescriptionLineType2) => {
52
+ DescriptionLineType2["UNRECOGNISED"] = "UNRECOGNISED";
53
+ DescriptionLineType2["PLAIN_TEXT"] = "PLAIN_TEXT";
54
+ DescriptionLineType2["COLOR"] = "COLOR";
55
+ return DescriptionLineType2;
56
+ })(DescriptionLineType || {});
57
+ var SubscriptionFrequency = /* @__PURE__ */ ((SubscriptionFrequency2) => {
58
+ SubscriptionFrequency2["UNDEFINED"] = "UNDEFINED";
59
+ SubscriptionFrequency2["DAY"] = "DAY";
60
+ SubscriptionFrequency2["WEEK"] = "WEEK";
61
+ SubscriptionFrequency2["MONTH"] = "MONTH";
62
+ SubscriptionFrequency2["YEAR"] = "YEAR";
63
+ return SubscriptionFrequency2;
64
+ })(SubscriptionFrequency || {});
65
+ var FileType = /* @__PURE__ */ ((FileType2) => {
66
+ FileType2["UNSPECIFIED"] = "UNSPECIFIED";
67
+ FileType2["SECURE_PICTURE"] = "SECURE_PICTURE";
68
+ FileType2["SECURE_VIDEO"] = "SECURE_VIDEO";
69
+ FileType2["SECURE_DOCUMENT"] = "SECURE_DOCUMENT";
70
+ FileType2["SECURE_MUSIC"] = "SECURE_MUSIC";
71
+ FileType2["SECURE_ARCHIVE"] = "SECURE_ARCHIVE";
72
+ return FileType2;
73
+ })(FileType || {});
74
+ var PaymentOptionType = /* @__PURE__ */ ((PaymentOptionType2) => {
75
+ PaymentOptionType2["FULL_PAYMENT_ONLINE"] = "FULL_PAYMENT_ONLINE";
76
+ PaymentOptionType2["FULL_PAYMENT_OFFLINE"] = "FULL_PAYMENT_OFFLINE";
77
+ PaymentOptionType2["MEMBERSHIP"] = "MEMBERSHIP";
78
+ PaymentOptionType2["DEPOSIT_ONLINE"] = "DEPOSIT_ONLINE";
79
+ PaymentOptionType2["MEMBERSHIP_OFFLINE"] = "MEMBERSHIP_OFFLINE";
80
+ return PaymentOptionType2;
81
+ })(PaymentOptionType || {});
82
+ var TaxableAddressType = /* @__PURE__ */ ((TaxableAddressType2) => {
83
+ TaxableAddressType2["UNKNOWN_TAXABLE_ADDRESS"] = "UNKNOWN_TAXABLE_ADDRESS";
84
+ TaxableAddressType2["BUSINESS"] = "BUSINESS";
85
+ TaxableAddressType2["BILLING"] = "BILLING";
86
+ TaxableAddressType2["SHIPPING"] = "SHIPPING";
87
+ return TaxableAddressType2;
88
+ })(TaxableAddressType || {});
89
+ var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
90
+ IdentityType2["UNKNOWN"] = "UNKNOWN";
91
+ IdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
92
+ IdentityType2["MEMBER"] = "MEMBER";
93
+ IdentityType2["WIX_USER"] = "WIX_USER";
94
+ IdentityType2["APP"] = "APP";
95
+ return IdentityType2;
96
+ })(IdentityType || {});
97
+
98
+ // src/interfaces-ecommerce-v1-catalog-provider.public.ts
99
+ var import_sdk_types = require("@wix/sdk-types");
100
+ var import_image = require("@wix/sdk-runtime/transformations/image");
101
+ var import_page_url_v2 = require("@wix/sdk-runtime/transformations/page-url-v2");
102
+ var import_float = require("@wix/sdk-runtime/transformations/float");
103
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
104
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
105
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
106
+ var provideHandlers = (0, import_sdk_types.ServicePluginDefinition)("ECOM_CATALOG", [
107
+ {
108
+ name: "getCatalogItems",
109
+ primaryHttpMappingPath: "/get-catalog-items",
110
+ transformations: {
111
+ toREST: (payload) => {
112
+ const toRestResponse = (0, import_transform_paths.transformPaths)(payload, [
113
+ {
114
+ transformFn: import_page_url_v2.transformSDKPageURLV2ToRESTPageURLV2,
115
+ paths: [{ path: "catalogItems.data.url" }]
116
+ },
117
+ {
118
+ transformFn: import_image.transformSDKImageToRESTImage,
119
+ paths: [{ path: "catalogItems.data.media" }]
120
+ },
121
+ {
122
+ transformFn: import_float.transformSDKFloatToRESTFloat,
123
+ paths: [{ path: "catalogItems.data.physicalProperties.weight" }]
124
+ },
125
+ {
126
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
127
+ paths: [
128
+ {
129
+ path: "catalogItems.data.subscriptionOptionInfo.subscriptionSettings.startDate"
130
+ },
131
+ { path: "catalogItems.data.serviceProperties.scheduledDate" }
132
+ ]
133
+ }
134
+ ]);
135
+ return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)(toRestResponse);
136
+ },
137
+ fromREST: (payload) => {
138
+ const fromRestRequest = payload;
139
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(fromRestRequest);
140
+ }
141
+ }
142
+ }
143
+ ]);
144
+
145
+ // src/interfaces-ecommerce-v1-catalog-provider.context.ts
146
+ var import_service_plugin_modules = require("@wix/sdk-runtime/service-plugin-modules");
147
+ var provideHandlers2 = (0, import_service_plugin_modules.createServicePluginModule)(provideHandlers);
148
+ // Annotate the CommonJS export names for ESM import in node:
149
+ 0 && (module.exports = {
150
+ DescriptionLineType,
151
+ FileType,
152
+ IdentityType,
153
+ ItemTypeItemType,
154
+ PaymentOptionType,
155
+ SubscriptionFrequency,
156
+ TaxableAddressType,
157
+ WeightUnit,
158
+ provideHandlers,
159
+ publicProvideHandlers
160
+ });
161
+ //# sourceMappingURL=index.js.map