@wix/bex-utils 2.1.0 → 2.2.0

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 (70) hide show
  1. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/builders.impl.d.ts +4 -1
  2. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/builders.impl.js +64 -6
  3. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/builders.impl.js.map +1 -1
  4. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/http.impl.js +12 -0
  5. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/http.impl.js.map +1 -1
  6. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/proto/client/proto-generated.d.ts +713 -74
  7. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/proto/proto-generated.d.ts +359 -38
  8. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/proto/proto-generated.js +12499 -2105
  9. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/proto/server/proto-generated.d.ts +711 -73
  10. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/types.impl.d.ts +56 -2
  11. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/types.impl.js +10 -1
  12. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/cjs/types.impl.js.map +1 -1
  13. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/es/builders.impl.d.ts +4 -1
  14. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/es/builders.impl.js +60 -5
  15. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/es/builders.impl.js.map +1 -1
  16. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/es/http.impl.js +12 -0
  17. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/es/http.impl.js.map +1 -1
  18. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/es/types.impl.d.ts +56 -2
  19. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/es/types.impl.js +9 -0
  20. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/build/es/types.impl.js.map +1 -1
  21. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/package.json +3 -3
  22. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/catalog_reference.proto +16 -10
  23. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/description_line.proto +23 -6
  24. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/item_data.proto +70 -44
  25. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/item_media.proto +14 -5
  26. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/item_type.proto +3 -1
  27. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/payment_option.proto +10 -7
  28. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/physical_properties.proto +4 -1
  29. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/platform_catalog_spi.proto +109 -33
  30. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/price_description.proto +6 -2
  31. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/product_name.proto +11 -6
  32. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/secured_media.proto +5 -2
  33. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/service_properties.proto +5 -2
  34. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/catalog_spi/api/v1/subscription_option_info.proto +14 -4
  35. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/inventory/api/v1/inventoryEvents.proto +5 -0
  36. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/platform_common/api/address_with_contact.proto +0 -1
  37. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/com/wix/ecommerce/platform_common/api/locations.proto +16 -0
  38. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/api/annotations.proto +4 -1
  39. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/api/entity.proto +6 -0
  40. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/api/errors.proto +6 -0
  41. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/catalog/api/v1/catalog.proto +49 -13
  42. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/catalog/api/v1/media.proto +2 -2
  43. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/catalog/api/v1/product.proto +5 -0
  44. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/catalog/api/v2/collectionRead.proto +1 -2
  45. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/common/media.proto +9 -2
  46. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/common/pageurl.proto +4 -4
  47. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/common/paging.proto +21 -12
  48. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/common/query.proto +323 -88
  49. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/common/sorting.proto +13 -2
  50. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/common/tags.proto +2 -2
  51. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/common/wixlink.proto +50 -1
  52. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/coupons/api/v1/coupons-adapter.proto +50 -50
  53. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/coupons/api/v2/mediaitem.proto +3 -3
  54. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/fedinfra/exportservice/v1/export.proto +1 -0
  55. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/infra/asyncjobs/v1/AsyncJob.proto +2 -0
  56. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/infra/asyncjobs/v1/AsyncJobService.proto +36 -2
  57. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/inventory/api/v1/inventoryItem.proto +1 -0
  58. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/inventory/api/v1/locationInventory.proto +27 -0
  59. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/inventory/api/v1/locationInventoryItem.proto +75 -0
  60. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/inventory/api/v1/locationInventoryMessages.proto +33 -0
  61. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/payment/api/pay/v2/accounts.proto +8 -0
  62. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/payment/api/pay/v2/orders.proto +10 -0
  63. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/payment/api/pay/v2/payment-methods.proto +7 -0
  64. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/payment/api/pay/v2/payments.proto +7 -0
  65. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/payment/api/pay/v2/resources/charge.proto +3 -3
  66. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/payment/api/pay/v2/resources/order-description.proto +6 -0
  67. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/payment/api/pay/v2/resources/payment-method.proto +3 -1
  68. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/payment/api/pay/v3/resources/payment-event.proto +2 -1
  69. package/package.json +3 -3
  70. package/@wix/ambassador-fedinfra-exportservice-v1-export-async-job/src/main/proto/wix/payment/api/pay/v2/paypal-recurring-orders.proto +0 -38
@@ -5,20 +5,26 @@ package com.wix.ecommerce.catalog_spi.api.v1;
5
5
  import "google/protobuf/struct.proto";
6
6
  import "wix/api/validations.proto";
7
7
 
8
- // Used for grouping line items and is sent on add to cart
8
+ // Used for grouping line items. Sent when an item is added to a cart, checkout, or order.
9
9
  message CatalogReference {
10
- // ID of the item within its Wix or 3rd-party catalog. For example, `productId` for Wix Stores or `bookingId` for Wix Bookings.
10
+
11
+ // ID of the item within the catalog it belongs to.
11
12
  string catalog_item_id = 1 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 36];
12
- /*
13
- ID of the app providing the catalog. For items from Wix apps, the following values always apply:
13
+
14
+ /*
15
+ ID of the app providing the catalog.
16
+
17
+ You can get your app's ID from its page in the [Wix Dev Center](https://dev.wix.com/apps).
18
+
19
+ For items from Wix catalogs, the following values always apply:
14
20
  + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
15
- + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
21
+ + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
22
+ + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
16
23
  */
17
24
  string app_id = 2 [(.wix.api.minLength) = 1];
18
- /*
19
- Additional info in key:value pairs. For example, to specify Wix Stores product options or variants:
20
- + `{"options": {"options": {"Size": "M", "Color": "Red"}}}`
21
- + `{"options": {"variantId": "<VARIANT_ID>"}}`
22
- */
25
+
26
+ // Additional item details in key:value pairs. Use this optional field to provide more specificity with item selection. The `options` field values differ depending on which catalog is providing the items.
27
+ //
28
+ // For products and variants from a Wix Stores catalog, learn more about [eCommerce integration](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration).
23
29
  google.protobuf.Struct options = 3;
24
30
  }
@@ -13,11 +13,13 @@ message DescriptionLine {
13
13
  PLAIN_TEXT = 1;
14
14
  COLOR = 2;
15
15
  }
16
+
16
17
  // Description line name.
17
18
  DescriptionLineName name = 1;
18
19
 
19
20
 
20
21
  oneof value {
22
+
21
23
  // Description line plain text value.
22
24
  PlainTextValue plain_text = 5;
23
25
  // Description line color value.
@@ -29,32 +31,47 @@ message DescriptionLine {
29
31
 
30
32
  // __Deprecated.__ Use `value` instead.
31
33
  oneof descriptionLineValue {
34
+
32
35
  // Description line plain text value.
33
36
  PlainTextValue plain_text_value = 3 [deprecated = true, (.wix.api.field_exposure) = PRIVATE];
37
+
34
38
  // Description line color.
35
39
  string color = 4 [deprecated = true, (.wix.api.field_exposure) = PRIVATE];
36
40
  }
37
41
  }
38
42
 
39
43
  message DescriptionLineName {
40
- // Description line name in site's default language.
44
+
45
+ // Description line name in the site's default language.
41
46
  string original = 1 [(.wix.api.maxLength) = 100];
42
- // Translated description line item according to buyer language. Defaults to `original` when not provided.
47
+
48
+ // Description line name translated into the buyer's language.
49
+ //
50
+ // Default: Same as `original`.
43
51
  google.protobuf.StringValue translated = 2 [(.wix.api.maxLength) = 200];
44
52
  }
45
53
 
46
54
  message PlainTextValue {
47
- // Description line plain text value in site's default language.
55
+
56
+ // Description line plain text value in the site's default language.
48
57
  string original = 1 [(.wix.api.maxLength) = 600];
49
- // Translated description line plain text value according to buyer language. Defaults to `original` when not provided.
58
+
59
+ // Description line plain text value translated into the buyer's language.
60
+ //
61
+ // Default: Same as `original`.
50
62
  google.protobuf.StringValue translated = 2 [(.wix.api.maxLength) = 600];
51
63
  }
52
64
 
53
65
  message Color {
54
- // Description line color name in site's default language.
66
+
67
+ // Description line color name in the site's default language.
55
68
  string original = 1 [(.wix.api.maxLength) = 500];
56
- // Translated description line color name according to buyer language. Defaults to `original` when not provided.
69
+
70
+ // Description line color name translated into the buyer's language.
71
+ //
72
+ // Default: Same as `original`.
57
73
  google.protobuf.StringValue translated = 2 [(.wix.api.maxLength) = 500];
74
+
58
75
  // HEX or RGB color code for display.
59
76
  google.protobuf.StringValue code = 3;
60
77
  }
@@ -19,72 +19,98 @@ import "com/wix/ecommerce/catalog_spi/api/v1/price_description.proto";
19
19
  import "wix/coupons/api/v2/scope.proto";
20
20
 
21
21
  message ItemData {
22
+
22
23
  /*
23
- **Required** - Item name.
24
- + Stores - `product.name`
25
- + Bookings - `service.info.name`
26
- + Events - `ticket.name`
24
+ __Required.__ Item name.
27
25
  */
28
26
  ProductName product_name = 1;
29
- // Optional - URL to the item's page on the site. When not provided, the link back from the cart page to the relevant product page will not work.
30
- // The URL is optional and if not provided, the site URL will be used.
27
+
28
+ // URL for the item's page on the site.
29
+ //
30
+ // This is used to link back to the relevant item page from the cart page. If not provided, the site URL is used.
31
31
  .wix.common.PageUrlV2 url = 2;
32
- // **Required** - Item type. Either a preset type or custom.
32
+
33
+ // __Required.__ Item type. Either one of the preset types or a custom type.
33
34
  ItemType item_type = 11;
34
- // **Required** - Item price **after** catalog-defined discount.
35
+
36
+ // __Required.__ Item price with discounts applied. If a catalog-defined discount applies, the discount is reflected in this price.
35
37
  string price = 3 [(.wix.api.decimalValue) = { gte: "0" lte: "1000000000000000"}];
36
- // Optional - Item price **before** catalog-defined discount. Defaults to `price` when not provided.
38
+
39
+ // Item price **before** applying any catalog-defined discount.
40
+ //
41
+ // Default: Value of `price` field, if no catalog-defined discount applies.
37
42
  google.protobuf.StringValue full_price = 5 [(.wix.api.format) = DECIMAL_VALUE];
38
- // Optional - Tax group for the product. Currently an internal field for Stores only.
43
+
44
+ // The tax group ID associated with this item.
39
45
  google.protobuf.StringValue tax_group_id = 4 [(.wix.api.format) = GUID];
40
- // Optional - Line item description lines. Line item description lines. Used for displaying the cart, checkout and order.
41
- // For example, if you want `Size: Large` to appear under the item name, create a description line with `{"name": {"original": "Size"}}` and `{"plainText": {"original": "Large"}}`.
46
+
47
+ // Line item description lines. Used for displaying the item in a cart, checkout or order. For example, if you want `Size: Large` to appear under the item name, create a description line with `"name": {"original": "Size"}` and `"plainText": {"original": "Large"}`.
48
+ //
49
+ // Default: No description line.
42
50
  repeated DescriptionLine description_lines = 6 [(.wix.api.minSize) = 0, (.wix.api.maxSize) = 20];
43
- /*
44
- Optional - Line item image.
45
- + Pass at least media ID, width, and height. You should be able to get these values when you upload an image to Wix media manager.
46
- + Given a full image URL of https://static.wixstatic.com/media/5cc69183e7954e2c9760fa2383870992.jpg, `media.id` would be "5cc69183e7954e2c9760fa2383870992.jpg".
47
- + We only support images coming from Wix media manager, if you want to use an image from another source you must first upload it to Wix media manager.
48
- + We are working on removing `altText` as it is not being used by our systems.
49
- */
51
+
52
+ // Line item image details. Supports images from the [Wix Media Manager](https://support.wix.com/en/article/wix-media-accessing-the-media-manager) only.
53
+ //
54
+ // To use an image from another source, first upload it to the Media Manager.
55
+ // You can retrieve the ID, width and height of an image from the Wix Media Manager.
50
56
  Image media = 7;
51
- // Optional - Item quantity available for purchase. Only return this if inventory is managed.
52
- // Not returning this field means that the buyer can "infinitely" tick up the number of items in the cart.
53
- google.protobuf.Int32Value quantity_available = 8 [(.wix.api.min) = 0, (.wix.api.max) = 100000];
54
- // Optional - Physical properties of the item. When relevant, contains information such as SKU and item weight.
57
+
58
+ // Quantity of the item available for purchase. Only return if the catalog manages inventory.
59
+ // If not returned, a buyer can increase the quantity of this item to add to the cart or checkout without limit.
60
+ google.protobuf.Int32Value quantity_available = 8 [(.wix.api.min) = 0, (.wix.api.max) = 100000000];
61
+
62
+ // Physical properties of the item. Only return for physical items. When applicable, contains information such as SKU and item weight.
55
63
  PhysicalProperties physical_properties = 9;
56
- // Optional - Coupon scopes - which app and items a coupon applies to.
57
- // This field is internal to Wix, and should be used by Bookings, Stores and Events as used by the current [Coupons API](https://bo.wix.com/wix-docs/rest/stores/coupons/valid-scope-values).
64
+
65
+ // Coupon scopes. These specify which app and items a coupon applies to.
66
+ // Should be used by Bookings, Stores, and Events in line with the current [Coupons API](https://bo.wix.com/wix-docs/rest/stores/coupons/valid-scope-values).
58
67
  repeated .wix.coupons.api.v2.Scope coupon_scopes = 10 [(.wix.api.field_exposure) = INTERNAL];
59
- // Optional - Subscription option info. This field is internal and only used by Stores.
68
+
69
+ // Subscription option info. This field is internal and only used by Stores.
60
70
  SubscriptionOptionInfo subscription_option_info = 12 [(.wix.api.field_exposure) = PRIVATE];
71
+
61
72
  // ID of the fulfiller for this item. This field is internal and only used by Stores.
62
73
  google.protobuf.StringValue fulfiller_id = 13 [(.wix.api.referenced_entity) = "wix.ecom.v1.fulfiller", (.wix.api.field_exposure) = INTERNAL, (.wix.api.format) = GUID];
63
- // Digital file ID and name. Required if `itemType: DIGITAL`.
74
+
75
+ // Digital file details. Required if `itemType.preset` is `DIGITAL`.
64
76
  SecuredMedia digital_file = 14 [(.wix.api.field_exposure) = INTERNAL];
65
- // Optional - Shipping group ID. This field is internal and only used by Stores.
77
+
78
+ // Shipping group ID. This field is internal and only used by Stores.
66
79
  google.protobuf.StringValue shipping_group_id = 15 [(.wix.api.field_exposure) = PRIVATE, (.wix.api.format) = GUID, (.wix.api.readOnly) = true];
67
- // Optional - Type of selected payment option for current item. Defaults to `FULL_PAYMENT_ONLINE`.
68
- // + `FULL_PAYMENT_ONLINE` - Entire payment for this item happens as part of the checkout.
69
- // + `FULL_PAYMENT_OFFLINE` - Entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
70
- // + `MEMBERSHIP` - Payment for this item is done by charging a membership. When this option is used, `lineItem.price.amount` is 0.
71
- // + `DEPOSIT_ONLINE` - Partial payment for the given item to be paid upfront during the checkout. Amount to be paid is defined by deposit_amount field.
80
+
81
+ // Payment method selected for the item.
82
+ //
83
+ // + `FULL_PAYMENT_ONLINE`: The entire payment for this item happens as part of the checkout.
84
+ // + `FULL_PAYMENT_OFFLINE`: The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
85
+ // + `MEMBERSHIP`: Payment for this item is done by charging a membership. When selected, `price` is `0`.
86
+ // + `DEPOSIT_ONLINE`: Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`.
87
+ // + `MEMBERSHIP_OFFLINE`: 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`.
88
+ //
89
+ // Default: `FULL_PAYMENT_ONLINE`.
72
90
  PaymentOptionType payment_option = 17;
73
- // Optional - Service properties. When relevant, this contains information such as date and number of participants.
74
- // Used, among other things, when checking for valid memberships.
91
+
92
+ // Service properties. When applicable, this contains information such as time and number of participants.
75
93
  ServiceProperties service_properties = 18;
76
- // Optional - In cases where `catalogReference.catalogItemId` is NOT the actual catalog item ID, this field will return the true item's ID.
77
- // + For example, for Wix Bookings, `catalogReference.catalogItemId` is the booking ID. Therefore this value is set to the service ID.
78
- // + in most cases, this field is the name as `catalogReference.catalogItemId`.
79
- // + Used in membership validation.
94
+
95
+ // Additional ID for the item in the catalog.
96
+ // This field provides an additional identifier for the item if your flow requires another ID as well as `catalogReference.catalogItemId`.
97
+ // Can be used for membership validation.
98
+ //
99
+ // Default: Same as `catalogReference.catalogItemId`.
80
100
  google.protobuf.StringValue root_catalog_item_id = 19 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 36];
81
- // Optional - Additional description for the price. For example, when passing `"price": "0"` but additional details about the actual price are needed - "Starts at $67".
101
+
102
+ // Additional description for the price. Return when additional information about the price is needed.
103
+ //
104
+ // For example, when `price` is `"0"` but additional details about the actual price are needed, such as `"Starts at $67"`.
82
105
  PriceDescription price_description = 20;
83
- // Optional - partial payment for the given item to be paid upfront during the checkout.
84
- // Eligible for catalog items with type `DEPOSIT_ONLINE`.
85
- // If omitted - item's price will not be split and is expected to be paid in single installment
106
+
107
+
108
+ // Partial payment to be paid upfront during the checkout. Return when `paymentOption` is `DEPOSIT_ONLINE`.
109
+ //
110
+ // Default: If `paymentOption` is `DEPOSIT_ONLINE` but `depositAmount` is not provided, the item is treated as if `paymentOption` is `FULL_PAYMENT_ONLINE`.
86
111
  google.protobuf.StringValue deposit_amount = 21 [(.wix.api.format) = DECIMAL_VALUE];
87
- // Delivery Profile Id for the product
112
+
113
+ // Delivery profile ID for the product.
88
114
  google.protobuf.StringValue delivery_profile_id = 22 [(.wix.api.format) = GUID, (.wix.api.field_exposure) = INTERNAL];
89
115
 
90
116
  }
@@ -16,16 +16,25 @@ message Image {
16
16
  field: "height"
17
17
  field: "width"
18
18
  };
19
- // WixMedia image ID.
19
+
20
+ // __Required.__ WixMedia image ID.
21
+ //
22
+ // Given a full image URL of `https://static.wixstatic.com/media/5cc69183e7954e2c9760fa2383870992.jpg`, `media.id` is `5cc69183e7954e2c9760fa2383870992.jpg`.
20
23
  string id = 1;
24
+
21
25
  reserved 2;
22
- // Original image height.
26
+
27
+ // __Required.__ Image height.
23
28
  int32 height = 3 [(.wix.api.readOnly) = true];
24
- // Original image width.
29
+
30
+ // __Required.__ Image width.
25
31
  int32 width = 4 [(.wix.api.readOnly) = true];
26
- // Image alt text. Optional.
32
+
33
+ // Image alt text.
27
34
  google.protobuf.StringValue alt_text = 5;
35
+
28
36
  reserved 6;
29
- // Image filename. Optional.
37
+
38
+ // Image filename.
30
39
  google.protobuf.StringValue filename = 7 [(.wix.api.readOnly) = true];
31
40
  }
@@ -4,9 +4,11 @@ package com.wix.ecommerce.catalog_spi.api.v1;
4
4
 
5
5
  message ItemType {
6
6
  oneof itemTypeData {
7
+
7
8
  // Preset item type.
8
9
  ItemType preset = 1;
9
- // Custom item type.
10
+
11
+ // Custom item type. When none of the preset types are suitable, specifies the custom type.
10
12
  string custom = 2;
11
13
  }
12
14
 
@@ -4,16 +4,19 @@ package com.wix.ecommerce.catalog_spi.api.v1;
4
4
 
5
5
  // Type of selected payment option for catalog item
6
6
  enum PaymentOptionType {
7
- // The entire payment for given item will happen as part of the checkout.
7
+
8
+ // The entire payment for this item happens as part of the checkout.
8
9
  FULL_PAYMENT_ONLINE = 0;
9
- // The entire payment for given item will happen after the checkout.
10
+
11
+ // The entire payment for this item happens after the checkout. For example, when using cash, check, or other offline payment methods.
10
12
  FULL_PAYMENT_OFFLINE = 1;
11
- // Given item cannot be paid via monetary payment options, only via membership. When this option is used, price will always be 0.
13
+
14
+ // Payment for this item is done by charging a membership. When selected, `price` is `0`.
12
15
  MEMBERSHIP = 2;
13
- // Partial payment for the given item to be paid upfront during the checkout.
14
- // Amount to be paid is defined by `deposit_amount` field on per-item basis.
16
+
17
+ // Partial payment to be paid upfront during the checkout. Initial amount to be paid for each line item is specified in `depositAmount`.
15
18
  DEPOSIT_ONLINE = 3;
16
- // Payment for this item can only be done using a membership and must be manually redeemed in the dashboard by the site owner.
17
- // Note: when this option is used, price will be 0.
19
+
20
+ // 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`.
18
21
  MEMBERSHIP_OFFLINE = 4;
19
22
  }
@@ -6,10 +6,13 @@ import "google/protobuf/wrappers.proto";
6
6
  import "wix/api/validations.proto";
7
7
 
8
8
  message PhysicalProperties {
9
- // Line item weight. Measurement unit (KG or LB) is taken from `order.weightUnit`.
9
+
10
+ // Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request.
10
11
  google.protobuf.DoubleValue weight = 1;
12
+
11
13
  // Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku).
12
14
  google.protobuf.StringValue sku = 2 [(.wix.api.maxLength) = 40];
15
+
13
16
  // Whether this line item is shippable.
14
17
  bool shippable = 3;
15
18
  }
@@ -16,18 +16,44 @@ import "com/wix/ecommerce/catalog_spi/api/v1/item_media.proto";
16
16
 
17
17
 
18
18
  service PlatformCatalogSPI {
19
- option (.wix.api.service_entity).message = "com.wix.ecommerce.catalog_spi.api.v1.CatalogProvider";
20
19
  option (.wix.spi.service) = {
20
+ fqdn: "wix.interfaces.ecommerce.v1.catalog_provider"
21
21
  spi_identifier: "com.wixpress.appservice.api.ComponentType.ECOM_CATALOG"
22
22
  config_message: "com.wix.ecommerce.catalog_spi.api.v1.CatalogSPIConfig"
23
23
  host_service: "com.wix.ecom.catalog_spi_host.CatalogSpiHostService"
24
24
  app_id: "1380b703-ce81-ff05-f115-39571d94dfcd" // SPI Host's App Id
25
25
  };
26
-
27
- // Retrieves specified item data from a specified catalog.
26
+ option (.wix.api.service_exposure) = PUBLIC;
27
+ option (.wix.api.service_maturity) = BETA;
28
+
29
+ // Retrieves data for specified items in a specified catalog.
30
+ //
31
+ // Wix calls this endpoint whenever a cart or checkout is updated, and when an item is added to an order.
32
+ //
33
+ // The endpoint receives a `catalogReferences` array. Each catalog reference in the array contains:
34
+ // + The ID of the item whose latest information Wix needs to retrieve.
35
+ // + The ID of the app providing the catalog containing the item.
36
+ // + Optional details about preferences or customization of the item.
37
+ //
38
+ // The endpoint also receives preferences for the currency and weight unit to be used in the response.
39
+ //
40
+ // Your external catalog can store and organize item details in any way you prefer.
41
+ // When implementing the Catalog SPI, learn how to [handle item variants](../../../../docs/Catalog-Reference.md) in a way that meets your needs.
42
+ //
43
+ // The endpoint's response must contain a `catalogItems` array. Each item in the array must contain:
44
+ // + A `catalogReference` object. This must be identical to the `catalogReference` object received in the request.
45
+ // + A `data` object with full details about the item.
46
+ //
47
+ // > **Notes:**
48
+ // > + If an item doesn't exist in the catalog, the response must exclude it from the `catalogItems` array in the response.
49
+ // > + When none of the items requested exist in the catalog, `catalogItems` must contain an empty array.
50
+ // > + Wix calls the endpoint 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.
28
51
  rpc GetCatalogItems (GetCatalogItemsRequest) returns (GetCatalogItemsResponse) {
29
52
  option (google.api.http) = {
30
53
  post: "get-catalog-items"
54
+ additional_bindings {
55
+ post: "/v1/get-catalog-items"
56
+ }
31
57
  };
32
58
  }
33
59
 
@@ -38,65 +64,113 @@ service PlatformCatalogSPI {
38
64
  }
39
65
  }
40
66
 
41
- message CatalogProvider {
42
- option (.wix.api.entity) = {
43
- fqdn: "wix.interfaces.ecommerce.v1.catalog_provider"
44
- segment: PUBLIC
45
- };
46
- }
47
-
48
67
  message CatalogSPIConfig {
49
- // The URL of the SPI implementation
68
+
69
+ // Base URI which Wix eCommerce will call to access Catalog SPI 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`.
50
70
  string deployment_uri = 1 [(.wix.spi.base_uri) = true];
51
- //The enablement and UI configuration for discount of all items in the catalog
52
- DiscountConfig all_items_discount = 2;
53
- //The enablement and UI configuration for discount of specific items in the catalog
54
- DiscountConfig specific_items_discount = 3;
55
- // The translation key for catalog business name, visible to Users when choosing catalogs.
56
- // For example: "Wix Stores - Items", "Bookings services"
57
- // Wix applications implementing this SPI should make sure to add translations to this key the scopes SPI host
58
- string name_translation_key = 4 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 100];
71
+
72
+ // Configuration details for discounts applied to all items in the catalog.
73
+ AllItemsDiscountConfig all_items_discount = 2;
74
+
75
+ // Configuration details for discounts applied to specific items in the catalog.
76
+ SpecificItemsDiscountConfig specific_items_discount = 3;
77
+
78
+ reserved 4;
79
+ }
80
+
81
+ // Configuration for all items discount functionality in the catalog.
82
+ message AllItemsDiscountConfig {
83
+
84
+ // Whether the discount is enabled.
85
+ //
86
+ // Default: `false`.
87
+ bool enabled = 1;
88
+
89
+ // Translation key for text to display to the site owner.
90
+ // __Deprecated.__ Use `name` instead.
91
+ string translation_key = 2 [(.wix.api.minLength) = 5, (.wix.api.maxLength) = 30, (.wix.api.field_exposure) = INTERNAL, (.wix.api.field_deprecated) = {
92
+ replaced_by: "name"
93
+ target_removal_date: "2024-05-01"
94
+ }];
95
+
96
+ // Translatable name for "all items discount" in the catalog.
97
+ // For example, for restaurant menus, this could be "All dishes".
98
+ google.protobuf.StringValue name = 5 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 100, (.wix.api.translatable)= {
99
+ type: LONG_TEXT
100
+ name: "All items discount name"
101
+ grouping: "Catalog configuration fields"
102
+ }];
59
103
  }
60
104
 
61
- // Configuration for discount functionality on the catalog
62
- message DiscountConfig {
63
- //Signifies if the discount is enabled in the service
105
+ // Configuration for discount functionality in the catalog.
106
+ message SpecificItemsDiscountConfig {
107
+
108
+ // Whether the discount is enabled.
109
+ //
110
+ // Default: `false`.
64
111
  bool enabled = 1;
65
- //The translation key to get the text to display to the user
66
- string translation_key = 2 [(.wix.api.minLength) = 5, (.wix.api.maxLength) = 30];
112
+
113
+ // Translation key for text to display to the site owner. deprecated use name instead .
114
+ // For example, for restaurant menus, this could be "Specific dishes".
115
+ string translation_key = 2 [(.wix.api.minLength) = 5, (.wix.api.maxLength) = 30, (.wix.api.field_exposure) = INTERNAL, (.wix.api.field_deprecated) = {
116
+ replaced_by: "name"
117
+ target_removal_date: "2024-05-01"
118
+ }];
119
+
120
+
121
+ // Translatable name for "all items discount" in the catalog.
122
+ google.protobuf.StringValue name = 5 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 100, (.wix.api.translatable)= {
123
+ type: LONG_TEXT
124
+ name: "Specific items discount name"
125
+ grouping: "Catalog configuration fields"
126
+ }];
67
127
  }
68
128
 
69
129
  message GetCatalogItemsRequest {
70
- // Catalog and items references and quantities.
130
+
131
+ // Catalog reference details for the items to retrieve, including quantity of each item.
71
132
  repeated CatalogReferenceAndQuantity catalog_references = 1 [(.wix.api.minSize) = 1, (.wix.api.maxSize) = 300];
72
- // Weight measurement unit. Defaults to site weight unit.
133
+
134
+ // Weight measurement unit.
135
+ //
136
+ // By default, Wix sends the weight unit specified in the site's settings.
73
137
  com.wix.ecommerce.platform_common.api.WeightUnit weight_unit = 2;
74
- // Currency code the items' prices will be presented in. For example, `"USD"` or `"EUR"`. Defaults to site currency.
138
+
139
+ // Currency to return item prices in, in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. For example, `USD` or `EUR`.
140
+ //
141
+ // By default, Wix sends the currency specified in the site's settings.
75
142
  string currency = 3 [(.wix.api.format) = CURRENCY];
76
- // Instance ID. Set only when calling HTTP providers.
77
- google.protobuf.StringValue instance_id = 4;
143
+
144
+ reserved 4;
78
145
  }
79
146
 
80
147
  message GetCatalogItemsResponse {
81
- // Catalog info and item data.
148
+
149
+ // Details for each item, including catalog reference details and item data. Any items that don't exist in the catalog are excluded.
150
+ // If none of the requested items exist in the catalog, this array must be empty.
82
151
  repeated Item catalog_items = 1;
83
152
  }
84
153
 
85
154
  message CatalogReferenceAndQuantity {
86
- // Catalog and item reference info.
155
+
156
+ // 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.
87
157
  CatalogReference catalog_reference = 1;
158
+
88
159
  // Item quantity.
89
160
  int32 quantity = 2;
90
161
  }
91
162
 
92
163
  message Item {
93
- // Catalog and item reference info.
164
+
165
+ // 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.
94
166
  CatalogReference catalog_reference = 1;
95
- // Item data.
167
+
168
+ // Item data. Contains full details about the item.
96
169
  ItemData data = 2;
97
170
  }
98
171
 
99
172
  message QueryCatalogItemsRequest {
173
+
100
174
  // A list of itemIDs to filter by. If exists, the result will only include the items with the IDs passed.
101
175
  repeated google.protobuf.StringValue catalog_item_ids = 1 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 100, (.wix.api.maxSize) = 100];
102
176
 
@@ -147,8 +221,10 @@ message BasicItem {
147
221
 
148
222
 
149
223
  message NumericPropertyRange {
224
+
150
225
  // Minimum value.
151
226
  double min_value = 1;
227
+
152
228
  // Maximum value.
153
229
  double max_value = 2;
154
230
  }
@@ -6,8 +6,12 @@ import "google/protobuf/wrappers.proto";
6
6
  import "wix/api/validations.proto";
7
7
 
8
8
  message PriceDescription {
9
- // **Required.** Original price description in site's default language.
9
+
10
+ // __Required.__ Price description in the site's default language.
10
11
  string original = 1 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 100];
11
- // Translated price description according to buyer language. Defaults to `original` when not provided.
12
+
13
+ // Price description translated into the buyer's language.
14
+ //
15
+ // Default: Same as `original`.
12
16
  google.protobuf.StringValue translated = 2 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 100];
13
17
  }
@@ -6,16 +6,21 @@ import "google/protobuf/wrappers.proto";
6
6
  import "wix/api/validations.proto";
7
7
 
8
8
  message ProductName {
9
+
9
10
  /*
10
- __Required.__ Original item name in site's default language.
11
- Min: 1 character
12
- Max: 200 characters
11
+ __Required.__ Item name in the site's default language.
12
+
13
+ Min: 1 character.
14
+ Max: 200 characters.
13
15
  */
14
16
  string original = 1 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 200];
17
+
15
18
  /*
16
- Optional. Translated item name according to buyer language. Defaults to `original` when not provided.
17
- Min: 1 character
18
- Max: 400 characters
19
+ Item name translated into the buyer's language.
20
+
21
+ Min: 1 character.
22
+ Max: 400 characters.
23
+ Default: Same as `original`.
19
24
  */
20
25
  google.protobuf.StringValue translated = 2 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 400];
21
26
  }
@@ -5,10 +5,13 @@ package com.wix.ecommerce.catalog_spi.api.v1;
5
5
  import "wix/api/validations.proto";
6
6
 
7
7
  message SecuredMedia {
8
- // Media ID in media manager.
8
+
9
+ // Media ID in Wix Media Manager.
9
10
  string id = 1 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 100];
10
- // Original file name.
11
+
12
+ // Original filename.
11
13
  string file_name = 2 [(.wix.api.minLength) = 1, (.wix.api.maxLength) = 1000];
14
+
12
15
  // File type.
13
16
  FileType file_type = 3;
14
17
 
@@ -7,8 +7,11 @@ import "google/protobuf/wrappers.proto";
7
7
  import "wix/api/validations.proto";
8
8
 
9
9
  message ServiceProperties {
10
- // Date and time the service is supposed to be provided in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format. For example, the time of the class.
10
+
11
+ // 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.
12
+ // For example, the start time of a class.
11
13
  google.protobuf.Timestamp scheduled_date = 1;
12
- // The number of people participating in this service. For example, the number of people attending the class or the number of people per hotel room.
14
+
15
+ // The number of people participating in the service. For example, the number of people attending a class or the number of people per hotel room.
13
16
  google.protobuf.Int32Value number_of_participants = 2 [(.wix.api.min) = 1, (.wix.api.max) = 10000];
14
17
  }