@wix/auto_sdk_ecom_catalog 1.0.19 → 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} +94 -56
  2. package/build/{internal/cjs/src/service-plugins-types.d.ts → index.d.ts} +94 -56
  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} +94 -56
  8. package/build/internal/{es/src/service-plugins-types.d.ts → index.d.ts} +94 -56
  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
  /**
@@ -256,7 +258,7 @@ export interface ItemData {
256
258
  */
257
259
  modifierGroups?: ModifierGroup[];
258
260
  }
259
- export interface ProductName {
261
+ interface ProductName {
260
262
  /**
261
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).
262
264
  *
@@ -277,27 +279,27 @@ export interface ProductName {
277
279
  */
278
280
  translated?: string | null;
279
281
  }
280
- export interface ItemType extends ItemTypeItemTypeDataOneOf {
282
+ interface ItemType extends ItemTypeItemTypeDataOneOf {
281
283
  /** Preset item type. */
282
284
  preset?: ItemTypeItemType;
283
285
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
284
286
  custom?: string;
285
287
  }
286
288
  /** @oneof */
287
- export interface ItemTypeItemTypeDataOneOf {
289
+ interface ItemTypeItemTypeDataOneOf {
288
290
  /** Preset item type. */
289
291
  preset?: ItemTypeItemType;
290
292
  /** Custom item type. When none of the preset types are suitable, specifies the custom type. */
291
293
  custom?: string;
292
294
  }
293
- export declare enum ItemTypeItemType {
295
+ declare enum ItemTypeItemType {
294
296
  UNRECOGNISED = "UNRECOGNISED",
295
297
  PHYSICAL = "PHYSICAL",
296
298
  DIGITAL = "DIGITAL",
297
299
  GIFT_CARD = "GIFT_CARD",
298
300
  SERVICE = "SERVICE"
299
301
  }
300
- export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
302
+ interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionLineDescriptionLineValueOneOf {
301
303
  /** Description line plain text value. */
302
304
  plainText?: PlainTextValue;
303
305
  /** Description line color value. */
@@ -306,16 +308,16 @@ export interface DescriptionLine extends DescriptionLineValueOneOf, DescriptionL
306
308
  name?: DescriptionLineName;
307
309
  }
308
310
  /** @oneof */
309
- export interface DescriptionLineValueOneOf {
311
+ interface DescriptionLineValueOneOf {
310
312
  /** Description line plain text value. */
311
313
  plainText?: PlainTextValue;
312
314
  /** Description line color value. */
313
315
  colorInfo?: Color;
314
316
  }
315
317
  /** @oneof */
316
- export interface DescriptionLineDescriptionLineValueOneOf {
318
+ interface DescriptionLineDescriptionLineValueOneOf {
317
319
  }
318
- export interface DescriptionLineName {
320
+ interface DescriptionLineName {
319
321
  /**
320
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).
321
323
  * @maxLength 100
@@ -329,7 +331,7 @@ export interface DescriptionLineName {
329
331
  */
330
332
  translated?: string | null;
331
333
  }
332
- export interface PlainTextValue {
334
+ interface PlainTextValue {
333
335
  /**
334
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).
335
337
  * @maxLength 600
@@ -343,7 +345,7 @@ export interface PlainTextValue {
343
345
  */
344
346
  translated?: string | null;
345
347
  }
346
- export interface Color {
348
+ interface Color {
347
349
  /**
348
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).
349
351
  * @maxLength 500
@@ -359,7 +361,7 @@ export interface Color {
359
361
  /** HEX or RGB color code for display. */
360
362
  code?: string | null;
361
363
  }
362
- export declare enum DescriptionLineType {
364
+ declare enum DescriptionLineType {
363
365
  /** Unrecognized type. */
364
366
  UNRECOGNISED = "UNRECOGNISED",
365
367
  /** Plain text type. */
@@ -367,7 +369,7 @@ export declare enum DescriptionLineType {
367
369
  /** Color type. */
368
370
  COLOR = "COLOR"
369
371
  }
370
- export interface PhysicalProperties {
372
+ interface PhysicalProperties {
371
373
  /** Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. */
372
374
  weight?: number | null;
373
375
  /**
@@ -378,19 +380,19 @@ export interface PhysicalProperties {
378
380
  /** Whether this line item is shippable. */
379
381
  shippable?: boolean;
380
382
  }
381
- export interface Scope {
383
+ interface Scope {
382
384
  /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
383
385
  namespace?: string;
384
386
  /** Coupon scope's applied group (e.g., event or ticket in Wix Events) */
385
387
  group?: Group;
386
388
  }
387
- export interface Group {
389
+ interface Group {
388
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). */
389
391
  name?: string;
390
392
  /** Item ID (when the coupon scope is limited to just one item). */
391
393
  entityId?: string | null;
392
394
  }
393
- export interface SubscriptionOptionInfo {
395
+ interface SubscriptionOptionInfo {
394
396
  /** Subscription option settings. */
395
397
  subscriptionSettings?: SubscriptionSettings;
396
398
  /** Subscription option title. */
@@ -398,7 +400,7 @@ export interface SubscriptionOptionInfo {
398
400
  /** Subscription option description. */
399
401
  description?: Description;
400
402
  }
401
- export interface SubscriptionSettings {
403
+ interface SubscriptionSettings {
402
404
  /** Frequency of recurring payment. */
403
405
  frequency?: SubscriptionFrequency;
404
406
  /**
@@ -426,14 +428,14 @@ export interface SubscriptionSettings {
426
428
  freeTrialPeriod?: FreeTrialPeriod;
427
429
  }
428
430
  /** Frequency unit of recurring payment */
429
- export declare enum SubscriptionFrequency {
431
+ declare enum SubscriptionFrequency {
430
432
  UNDEFINED = "UNDEFINED",
431
433
  DAY = "DAY",
432
434
  WEEK = "WEEK",
433
435
  MONTH = "MONTH",
434
436
  YEAR = "YEAR"
435
437
  }
436
- export interface FreeTrialPeriod {
438
+ interface FreeTrialPeriod {
437
439
  /** Frequency of period. Values: DAY, WEEK, MONTH, YEAR */
438
440
  frequency?: SubscriptionFrequency;
439
441
  /**
@@ -443,7 +445,7 @@ export interface FreeTrialPeriod {
443
445
  */
444
446
  interval?: number;
445
447
  }
446
- export interface Title {
448
+ interface Title {
447
449
  /**
448
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).
449
451
  * @minLength 1
@@ -459,7 +461,7 @@ export interface Title {
459
461
  */
460
462
  translated?: string | null;
461
463
  }
462
- export interface Description {
464
+ interface Description {
463
465
  /**
464
466
  * Subscription option description.
465
467
  * @maxLength 500
@@ -471,7 +473,7 @@ export interface Description {
471
473
  */
472
474
  translated?: string | null;
473
475
  }
474
- export interface SecuredMedia {
476
+ interface SecuredMedia {
475
477
  /**
476
478
  * Media ID in Wix Media Manager.
477
479
  * @minLength 1
@@ -487,7 +489,7 @@ export interface SecuredMedia {
487
489
  /** File type. */
488
490
  fileType?: FileType;
489
491
  }
490
- export declare enum FileType {
492
+ declare enum FileType {
491
493
  UNSPECIFIED = "UNSPECIFIED",
492
494
  SECURE_PICTURE = "SECURE_PICTURE",
493
495
  SECURE_VIDEO = "SECURE_VIDEO",
@@ -496,7 +498,7 @@ export declare enum FileType {
496
498
  SECURE_ARCHIVE = "SECURE_ARCHIVE"
497
499
  }
498
500
  /** Type of selected payment option for catalog item */
499
- export declare enum PaymentOptionType {
501
+ declare enum PaymentOptionType {
500
502
  /** The entire payment for this item happens as part of the checkout. */
501
503
  FULL_PAYMENT_ONLINE = "FULL_PAYMENT_ONLINE",
502
504
  /** The entire payment for this item happens after checkout. For example, when using cash, check, or other offline payment methods. */
@@ -508,7 +510,7 @@ export declare enum PaymentOptionType {
508
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`. */
509
511
  MEMBERSHIP_OFFLINE = "MEMBERSHIP_OFFLINE"
510
512
  }
511
- export interface ServiceProperties {
513
+ interface ServiceProperties {
512
514
  /**
513
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.
514
516
  * For example, the start time of a class.
@@ -521,7 +523,7 @@ export interface ServiceProperties {
521
523
  */
522
524
  numberOfParticipants?: number | null;
523
525
  }
524
- export interface PriceDescription {
526
+ interface PriceDescription {
525
527
  /**
526
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).
527
529
  * @minLength 1
@@ -537,22 +539,22 @@ export interface PriceDescription {
537
539
  */
538
540
  translated?: string | null;
539
541
  }
540
- export interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
542
+ interface TaxableAddress extends TaxableAddressTaxableAddressDataOneOf {
541
543
  /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
542
544
  addressType?: TaxableAddressType;
543
545
  }
544
546
  /** @oneof */
545
- export interface TaxableAddressTaxableAddressDataOneOf {
547
+ interface TaxableAddressTaxableAddressDataOneOf {
546
548
  /** taxable address type. if this field is selected, the address is automatically resolved, and the tax is calculated accordingly. */
547
549
  addressType?: TaxableAddressType;
548
550
  }
549
- export declare enum TaxableAddressType {
551
+ declare enum TaxableAddressType {
550
552
  UNKNOWN_TAXABLE_ADDRESS = "UNKNOWN_TAXABLE_ADDRESS",
551
553
  BUSINESS = "BUSINESS",
552
554
  BILLING = "BILLING",
553
555
  SHIPPING = "SHIPPING"
554
556
  }
555
- export interface Policy {
557
+ interface Policy {
556
558
  /**
557
559
  * Policy title - should be translated
558
560
  * @minLength 1
@@ -566,7 +568,7 @@ export interface Policy {
566
568
  */
567
569
  content?: string;
568
570
  }
569
- export interface AdditionalFee {
571
+ interface AdditionalFee {
570
572
  /**
571
573
  * Additional fee's unique code or ID.
572
574
  * @minLength 1
@@ -594,7 +596,7 @@ export interface AdditionalFee {
594
596
  taxDetails?: TaxDetails;
595
597
  }
596
598
  /** Tax details. */
597
- export interface TaxDetails {
599
+ interface TaxDetails {
598
600
  /** Whether additional fee is taxable. */
599
601
  taxable?: boolean;
600
602
  /**
@@ -603,7 +605,7 @@ export interface TaxDetails {
603
605
  */
604
606
  taxGroupId?: string | null;
605
607
  }
606
- export interface ModifierGroup {
608
+ interface ModifierGroup {
607
609
  /**
608
610
  * Modifier group id.
609
611
  * @minLength 1
@@ -619,7 +621,7 @@ export interface ModifierGroup {
619
621
  */
620
622
  modifiers?: ItemModifier[];
621
623
  }
622
- export interface TranslatableString {
624
+ interface TranslatableString {
623
625
  /**
624
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).
625
627
  *
@@ -640,7 +642,7 @@ export interface TranslatableString {
640
642
  */
641
643
  translated?: string | null;
642
644
  }
643
- export interface ItemModifier {
645
+ interface ItemModifier {
644
646
  /**
645
647
  * Modifier ID.
646
648
  * @minLength 1
@@ -663,7 +665,7 @@ export interface ItemModifier {
663
665
  */
664
666
  price?: string | null;
665
667
  }
666
- export interface QueryCatalogItemsRequest {
668
+ interface QueryCatalogItemsRequest {
667
669
  /**
668
670
  * A list of itemIDs to filter by. If exists, the result will only include the items with the IDs passed.
669
671
  * @minLength 1
@@ -685,19 +687,19 @@ export interface QueryCatalogItemsRequest {
685
687
  */
686
688
  lastNumericId?: string | null;
687
689
  }
688
- export interface Paging {
690
+ interface Paging {
689
691
  /** Number of items to load. */
690
692
  limit?: number | null;
691
693
  /** Number of items to skip in the current sort order. */
692
694
  offset?: number | null;
693
695
  }
694
- export interface QueryCatalogItemsResponse {
696
+ interface QueryCatalogItemsResponse {
695
697
  /** Catalog info and item data. */
696
698
  catalogItems?: BasicItem[];
697
699
  /** Paging metadata. */
698
700
  metadata?: PagingMetadata;
699
701
  }
700
- export interface BasicItem {
702
+ interface BasicItem {
701
703
  /**
702
704
  * The ID of the item.
703
705
  * @minLength 1
@@ -718,13 +720,13 @@ export interface BasicItem {
718
720
  */
719
721
  numericId?: string | null;
720
722
  }
721
- export interface NumericPropertyRange {
723
+ interface NumericPropertyRange {
722
724
  /** Minimum value. */
723
725
  minValue?: number;
724
726
  /** Maximum value. */
725
727
  maxValue?: number;
726
728
  }
727
- export interface PagingMetadata {
729
+ interface PagingMetadata {
728
730
  /** Number of items returned in the response. */
729
731
  count?: number | null;
730
732
  /** Offset that was requested. */
@@ -734,7 +736,7 @@ export interface PagingMetadata {
734
736
  /** Flag that indicates the server failed to calculate the `total` field. */
735
737
  tooManyToCount?: boolean | null;
736
738
  }
737
- export interface CatalogSPIConfig {
739
+ interface CatalogSPIConfig {
738
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`. */
739
741
  deploymentUri?: string;
740
742
  /** Configuration details for discounts applied to all items in the catalog. */
@@ -743,7 +745,7 @@ export interface CatalogSPIConfig {
743
745
  specificItemsDiscount?: SpecificItemsDiscountConfig;
744
746
  }
745
747
  /** Configuration for all items discount functionality in the catalog. */
746
- export interface AllItemsDiscountConfig {
748
+ interface AllItemsDiscountConfig {
747
749
  /**
748
750
  * Whether the discount is enabled.
749
751
  *
@@ -759,7 +761,7 @@ export interface AllItemsDiscountConfig {
759
761
  name?: string | null;
760
762
  }
761
763
  /** Configuration for discount functionality in the catalog. */
762
- export interface SpecificItemsDiscountConfig {
764
+ interface SpecificItemsDiscountConfig {
763
765
  /**
764
766
  * Whether the discount is enabled.
765
767
  *
@@ -786,7 +788,7 @@ export interface SpecificItemsDiscountConfig {
786
788
  * }
787
789
  * ```
788
790
  */
789
- export interface Context {
791
+ interface Context {
790
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. */
791
793
  requestId?: string | null;
792
794
  /**
@@ -804,14 +806,14 @@ export interface Context {
804
806
  */
805
807
  instanceId?: string | null;
806
808
  }
807
- export declare enum IdentityType {
809
+ declare enum IdentityType {
808
810
  UNKNOWN = "UNKNOWN",
809
811
  ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
810
812
  MEMBER = "MEMBER",
811
813
  WIX_USER = "WIX_USER",
812
814
  APP = "APP"
813
815
  }
814
- export interface IdentificationData extends IdentificationDataIdOneOf {
816
+ interface IdentificationData extends IdentificationDataIdOneOf {
815
817
  /**
816
818
  * ID of a site visitor that has not logged in to the site.
817
819
  * @format GUID
@@ -836,7 +838,7 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
836
838
  identityType?: IdentityType;
837
839
  }
838
840
  /** @oneof */
839
- export interface IdentificationDataIdOneOf {
841
+ interface IdentificationDataIdOneOf {
840
842
  /**
841
843
  * ID of a site visitor that has not logged in to the site.
842
844
  * @format GUID
@@ -858,3 +860,39 @@ export interface IdentificationDataIdOneOf {
858
860
  */
859
861
  appId?: string;
860
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 };
package/build/index.js ADDED
@@ -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