@wix/auto_sdk_ecom_recommendations 1.0.14 → 1.0.16

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 (130) hide show
  1. package/build/{es/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts → ecom-recommendations-v1-recommendation-recommendations.universal-CEpjDJVC.d.mts} +30 -14
  2. package/build/{internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts → ecom-recommendations-v1-recommendation-recommendations.universal-CEpjDJVC.d.ts} +30 -14
  3. package/build/{internal/es/src/ecom-recommendations-v1-recommendation-recommendations.public.d.ts → index.d.mts} +11 -8
  4. package/build/{cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.d.ts → index.d.ts} +11 -8
  5. package/build/index.js +179 -0
  6. package/build/index.js.map +1 -0
  7. package/build/index.mjs +153 -0
  8. package/build/index.mjs.map +1 -0
  9. package/build/{cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts → internal/ecom-recommendations-v1-recommendation-recommendations.universal-CEpjDJVC.d.mts} +30 -14
  10. package/build/internal/{es/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts → ecom-recommendations-v1-recommendation-recommendations.universal-CEpjDJVC.d.ts} +30 -14
  11. package/build/{es/src/ecom-recommendations-v1-recommendation-recommendations.public.d.ts → internal/index.d.mts} +11 -8
  12. package/build/internal/{cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.d.ts → index.d.ts} +11 -8
  13. package/build/internal/index.js +179 -0
  14. package/build/internal/index.js.map +1 -0
  15. package/build/internal/index.mjs +153 -0
  16. package/build/internal/index.mjs.map +1 -0
  17. package/build/internal/meta.d.mts +164 -0
  18. package/build/internal/meta.d.ts +164 -0
  19. package/build/internal/meta.js +128 -0
  20. package/build/internal/meta.js.map +1 -0
  21. package/build/internal/meta.mjs +100 -0
  22. package/build/internal/meta.mjs.map +1 -0
  23. package/build/meta.d.mts +164 -0
  24. package/build/meta.d.ts +164 -0
  25. package/build/meta.js +128 -0
  26. package/build/meta.js.map +1 -0
  27. package/build/meta.mjs +100 -0
  28. package/build/meta.mjs.map +1 -0
  29. package/package.json +12 -11
  30. package/build/cjs/index.d.ts +0 -1
  31. package/build/cjs/index.js +0 -18
  32. package/build/cjs/index.js.map +0 -1
  33. package/build/cjs/index.typings.d.ts +0 -1
  34. package/build/cjs/index.typings.js +0 -18
  35. package/build/cjs/index.typings.js.map +0 -1
  36. package/build/cjs/meta.d.ts +0 -1
  37. package/build/cjs/meta.js +0 -18
  38. package/build/cjs/meta.js.map +0 -1
  39. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.d.ts +0 -6
  40. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.js +0 -10
  41. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.js.map +0 -1
  42. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.d.ts +0 -37
  43. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.js +0 -94
  44. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.js.map +0 -1
  45. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.d.ts +0 -14
  46. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.js +0 -66
  47. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.js.map +0 -1
  48. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.js +0 -20
  49. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.js.map +0 -1
  50. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.js +0 -10
  51. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +0 -1
  52. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +0 -260
  53. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +0 -158
  54. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +0 -1
  55. package/build/es/index.d.ts +0 -1
  56. package/build/es/index.js +0 -2
  57. package/build/es/index.js.map +0 -1
  58. package/build/es/index.typings.d.ts +0 -1
  59. package/build/es/index.typings.js +0 -2
  60. package/build/es/index.typings.js.map +0 -1
  61. package/build/es/meta.d.ts +0 -1
  62. package/build/es/meta.js +0 -2
  63. package/build/es/meta.js.map +0 -1
  64. package/build/es/package.json +0 -3
  65. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.context.d.ts +0 -6
  66. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.context.js +0 -6
  67. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.context.js.map +0 -1
  68. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.http.d.ts +0 -37
  69. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.http.js +0 -89
  70. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.http.js.map +0 -1
  71. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.d.ts +0 -14
  72. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.js +0 -38
  73. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.js.map +0 -1
  74. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.public.js +0 -14
  75. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.public.js.map +0 -1
  76. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.types.js +0 -7
  77. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +0 -1
  78. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +0 -260
  79. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +0 -130
  80. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +0 -1
  81. package/build/internal/cjs/index.d.ts +0 -1
  82. package/build/internal/cjs/index.js +0 -18
  83. package/build/internal/cjs/index.js.map +0 -1
  84. package/build/internal/cjs/index.typings.d.ts +0 -1
  85. package/build/internal/cjs/index.typings.js +0 -18
  86. package/build/internal/cjs/index.typings.js.map +0 -1
  87. package/build/internal/cjs/meta.d.ts +0 -1
  88. package/build/internal/cjs/meta.js +0 -18
  89. package/build/internal/cjs/meta.js.map +0 -1
  90. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.d.ts +0 -6
  91. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.js +0 -10
  92. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.js.map +0 -1
  93. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.d.ts +0 -37
  94. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.js +0 -94
  95. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.js.map +0 -1
  96. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.d.ts +0 -14
  97. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.js +0 -66
  98. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.js.map +0 -1
  99. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.js +0 -20
  100. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.js.map +0 -1
  101. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.js +0 -10
  102. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +0 -1
  103. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +0 -260
  104. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +0 -158
  105. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +0 -1
  106. package/build/internal/es/index.d.ts +0 -1
  107. package/build/internal/es/index.js +0 -2
  108. package/build/internal/es/index.js.map +0 -1
  109. package/build/internal/es/index.typings.d.ts +0 -1
  110. package/build/internal/es/index.typings.js +0 -2
  111. package/build/internal/es/index.typings.js.map +0 -1
  112. package/build/internal/es/meta.d.ts +0 -1
  113. package/build/internal/es/meta.js +0 -2
  114. package/build/internal/es/meta.js.map +0 -1
  115. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.context.d.ts +0 -6
  116. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.context.js +0 -6
  117. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.context.js.map +0 -1
  118. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.http.d.ts +0 -37
  119. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.http.js +0 -89
  120. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.http.js.map +0 -1
  121. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.d.ts +0 -14
  122. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.js +0 -38
  123. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.js.map +0 -1
  124. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.public.js +0 -14
  125. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.public.js.map +0 -1
  126. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.types.js +0 -7
  127. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +0 -1
  128. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +0 -260
  129. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +0 -130
  130. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +0 -1
@@ -0,0 +1,164 @@
1
+ import { c as ListAvailableAlgorithmsRequest$1, L as ListAvailableAlgorithmsResponse$1, f as GetRecommendationRequest$1, a as GetRecommendationResponse$1 } from './ecom-recommendations-v1-recommendation-recommendations.universal-CEpjDJVC.js';
2
+
3
+ interface Recommendation {
4
+ /**
5
+ * Recommended items.
6
+ * @maxSize 100
7
+ */
8
+ items?: CatalogReference[];
9
+ /** The algorithm used to provide the recommendation. */
10
+ algorithm?: Algorithm;
11
+ }
12
+ /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
13
+ interface CatalogReference {
14
+ /**
15
+ * ID of the item within the catalog it belongs to.
16
+ * @minLength 1
17
+ * @maxLength 36
18
+ */
19
+ catalogItemId?: string;
20
+ /**
21
+ * ID of the app providing the catalog.
22
+ *
23
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
24
+ *
25
+ * For items from Wix catalogs, the following values always apply:
26
+ * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
27
+ * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
28
+ * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
29
+ * @minLength 1
30
+ */
31
+ appId?: string;
32
+ /**
33
+ * 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.
34
+ *
35
+ * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
36
+ */
37
+ options?: Record<string, any> | null;
38
+ }
39
+ interface Algorithm {
40
+ /**
41
+ * Algorithm ID defined by the app providing the algorithm.
42
+ * @format GUID
43
+ */
44
+ id?: string;
45
+ /**
46
+ * App ID of the Wix or 3rd-party app providing the algorithm.
47
+ *
48
+ * Wix app IDs are <a href="https://dev.wix.com/api/rest/getting-started/wix-business-solutions#getting-started_wix-business-solutions_about-wix-business-solutions" target="_blank">listed here</a>.
49
+ * @minLength 1
50
+ * @maxLength 36
51
+ */
52
+ appId?: string;
53
+ }
54
+ interface ListAvailableAlgorithmsRequest {
55
+ }
56
+ interface ListAvailableAlgorithmsResponse {
57
+ /**
58
+ * Algorithms available for use on your Wix site or project. See the method description for more information.
59
+ * @maxSize 500
60
+ */
61
+ availableAlgorithms?: AlgorithmInfo[];
62
+ }
63
+ interface AlgorithmInfo {
64
+ /** How the algorithm is configured. */
65
+ config?: AlgorithmConfig;
66
+ /**
67
+ * The app ID of the application providing the algorithm.
68
+ *
69
+ * Wix app IDs are <a href="https://dev.wix.com/api/rest/getting-started/wix-business-solutions#getting-started_wix-business-solutions_about-wix-business-solutions" target="_blank">listed here</a>.
70
+ * @minLength 1
71
+ * @maxLength 36
72
+ */
73
+ appId?: string;
74
+ /**
75
+ * App IDs of catalogs to which the algorithm can be applied.
76
+ *
77
+ * Wix app IDs are <a href="https://dev.wix.com/api/rest/getting-started/wix-business-solutions#getting-started_wix-business-solutions_about-wix-business-solutions" target="_blank">listed here</a>.
78
+ * @minSize 1
79
+ * @maxSize 100
80
+ * @minLength 1
81
+ * @maxLength 36
82
+ */
83
+ catalogAppIds?: string[];
84
+ }
85
+ interface AlgorithmConfig {
86
+ /**
87
+ * Algorithm name. This value is not translatable.
88
+ * @minLength 1
89
+ * @maxLength 50
90
+ */
91
+ name?: string;
92
+ /**
93
+ * Algorithm description. This describes how the algorithm works and if it has any limitations regarding site content, number of items in the catalog, site traffic, and so on. This value is not translatable.
94
+ * @minLength 1
95
+ * @maxLength 500
96
+ */
97
+ description?: string;
98
+ /**
99
+ * A supplemental `description`. It can be used to help break up and organize information. You can, for example, display this information as a tooltip or as an additional section that is collapsed by default.
100
+ * @minLength 1
101
+ * @maxLength 300
102
+ */
103
+ additionalInfo?: string | null;
104
+ /**
105
+ * Algorithms may have the following types:
106
+ * * `RELATED_ITEMS` - This type of algorithm provides recommendations based on 1 or more other provided items. For example, when an item is added to a cart, the algorithm can suggest other items frequently bought together with that item.
107
+ * * `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.
108
+ */
109
+ algorithmType?: AlgorithmTypeWithLiterals;
110
+ /**
111
+ * Algorithm ID. This must be unique for a specific app but does not have to be unique across all apps on the site or in the project.
112
+ * @format GUID
113
+ */
114
+ algorithmId?: string;
115
+ }
116
+ declare enum AlgorithmType {
117
+ UNSPECIFIED = "UNSPECIFIED",
118
+ RELATED_ITEMS = "RELATED_ITEMS",
119
+ GLOBAL = "GLOBAL"
120
+ }
121
+ /** @enumType */
122
+ type AlgorithmTypeWithLiterals = AlgorithmType | 'UNSPECIFIED' | 'RELATED_ITEMS' | 'GLOBAL';
123
+ interface GetRecommendationRequest {
124
+ /**
125
+ * The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`.
126
+ * @maxSize 300
127
+ */
128
+ items?: CatalogReference[];
129
+ /**
130
+ * A list of algorithms checked in a specific order determined by their `appID` and their position in the `algorithms` array.
131
+ * See the method description for more information.
132
+ *
133
+ * If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned.
134
+ * @minSize 1
135
+ * @maxSize 10
136
+ */
137
+ algorithms: Algorithm[];
138
+ /**
139
+ * The minimum number of items that must be recommended by the algorithm for those items to be returned in the response.
140
+ *
141
+ * Max: `100`
142
+ * @max 100
143
+ */
144
+ minimumRecommendedItems?: number;
145
+ }
146
+ interface GetRecommendationResponse {
147
+ /** An object containing a list of items recommended by 1 of the specified algorithms. The recommendation is empty if none of the specified algorithms recommended enough items. */
148
+ recommendation?: Recommendation;
149
+ }
150
+
151
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
152
+ getUrl: (context: any) => string;
153
+ httpMethod: K;
154
+ path: string;
155
+ pathParams: M;
156
+ __requestType: T;
157
+ __originalRequestType: S;
158
+ __responseType: Q;
159
+ __originalResponseType: R;
160
+ };
161
+ declare function listAvailableAlgorithms(): __PublicMethodMetaInfo<'GET', {}, ListAvailableAlgorithmsRequest$1, ListAvailableAlgorithmsRequest, ListAvailableAlgorithmsResponse$1, ListAvailableAlgorithmsResponse>;
162
+ declare function getRecommendation(): __PublicMethodMetaInfo<'POST', {}, GetRecommendationRequest$1, GetRecommendationRequest, GetRecommendationResponse$1, GetRecommendationResponse>;
163
+
164
+ export { type __PublicMethodMetaInfo, getRecommendation, listAvailableAlgorithms };
@@ -0,0 +1,128 @@
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
+ // meta.ts
21
+ var meta_exports = {};
22
+ __export(meta_exports, {
23
+ getRecommendation: () => getRecommendation2,
24
+ listAvailableAlgorithms: () => listAvailableAlgorithms2
25
+ });
26
+ module.exports = __toCommonJS(meta_exports);
27
+
28
+ // src/ecom-recommendations-v1-recommendation-recommendations.http.ts
29
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
30
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
31
+ function resolveComWixEcomRecommendationsV1RecommendationsServiceUrl(opts) {
32
+ const domainToMappings = {
33
+ "www.wixapis.com": [
34
+ {
35
+ srcPath: "/v1/recommendations",
36
+ destPath: "/v1/recommendations"
37
+ },
38
+ {
39
+ srcPath: "/ecom/v1/recommendations",
40
+ destPath: "/v1/recommendations"
41
+ }
42
+ ]
43
+ };
44
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
45
+ }
46
+ var PACKAGE_NAME = "@wix/auto_sdk_ecom_recommendations";
47
+ function listAvailableAlgorithms(payload) {
48
+ function __listAvailableAlgorithms({ host }) {
49
+ const metadata = {
50
+ entityFqdn: "wix.ecom.recommendations.v1.recommendation",
51
+ method: "GET",
52
+ methodFqn: "com.wix.ecom.recommendations.v1.RecommendationsService.ListAvailableAlgorithms",
53
+ packageName: PACKAGE_NAME,
54
+ url: resolveComWixEcomRecommendationsV1RecommendationsServiceUrl({
55
+ protoPath: "/v1/recommendations/algorithms",
56
+ data: payload,
57
+ host
58
+ }),
59
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
60
+ };
61
+ return metadata;
62
+ }
63
+ return __listAvailableAlgorithms;
64
+ }
65
+ function getRecommendation(payload) {
66
+ function __getRecommendation({ host }) {
67
+ const metadata = {
68
+ entityFqdn: "wix.ecom.recommendations.v1.recommendation",
69
+ method: "POST",
70
+ methodFqn: "com.wix.ecom.recommendations.v1.RecommendationsService.GetRecommendation",
71
+ packageName: PACKAGE_NAME,
72
+ url: resolveComWixEcomRecommendationsV1RecommendationsServiceUrl({
73
+ protoPath: "/v1/recommendations/get",
74
+ data: payload,
75
+ host
76
+ }),
77
+ data: payload
78
+ };
79
+ return metadata;
80
+ }
81
+ return __getRecommendation;
82
+ }
83
+
84
+ // src/ecom-recommendations-v1-recommendation-recommendations.meta.ts
85
+ function listAvailableAlgorithms2() {
86
+ const payload = {};
87
+ const getRequestOptions = listAvailableAlgorithms(
88
+ payload
89
+ );
90
+ const getUrl = (context) => {
91
+ const { url } = getRequestOptions(context);
92
+ return url;
93
+ };
94
+ return {
95
+ getUrl,
96
+ httpMethod: "GET",
97
+ path: "/v1/recommendations/algorithms",
98
+ pathParams: {},
99
+ __requestType: null,
100
+ __originalRequestType: null,
101
+ __responseType: null,
102
+ __originalResponseType: null
103
+ };
104
+ }
105
+ function getRecommendation2() {
106
+ const payload = {};
107
+ const getRequestOptions = getRecommendation(payload);
108
+ const getUrl = (context) => {
109
+ const { url } = getRequestOptions(context);
110
+ return url;
111
+ };
112
+ return {
113
+ getUrl,
114
+ httpMethod: "POST",
115
+ path: "/v1/recommendations/get",
116
+ pathParams: {},
117
+ __requestType: null,
118
+ __originalRequestType: null,
119
+ __responseType: null,
120
+ __originalResponseType: null
121
+ };
122
+ }
123
+ // Annotate the CommonJS export names for ESM import in node:
124
+ 0 && (module.exports = {
125
+ getRecommendation,
126
+ listAvailableAlgorithms
127
+ });
128
+ //# sourceMappingURL=meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../meta.ts","../../src/ecom-recommendations-v1-recommendation-recommendations.http.ts","../../src/ecom-recommendations-v1-recommendation-recommendations.meta.ts"],"sourcesContent":["export * from './src/ecom-recommendations-v1-recommendation-recommendations.meta.js';\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixEcomRecommendationsV1RecommendationsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/v1/recommendations',\n destPath: '/v1/recommendations',\n },\n {\n srcPath: '/ecom/v1/recommendations',\n destPath: '/v1/recommendations',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_recommendations';\n\n/**\n * Returns a list of recommendation algorithms that can be used on your Wix site or project. These algorithms can be used with [`getRecommendation()`](#getRecommendation) to provide item recommendations to the customer.\n *\n * Algorithms are run by the apps that provide them, and can only be used on catalogs they support. Apps may provide algorithms for use with their own catalogs and/or catalogs from other apps.\n *\n * The app which provides an algorithm is referenced by that algorithm’s `appId`. The apps whose catalogs are supported by an algorithm are referenced by the IDs in that algorithm’s `catalogAppIds` array.\n *\n *\n * For an algorithm to be considered “Available” and returned in this method’s response, the algorithm must meet the following conditions:\n * 1. The algorithm’s `appId` must match the ID of an installed Wix app.\n * 2. At least 1 of the IDs in `catalogAppIds` must match the ID of an installed Wix app.\n *\n * Wix app IDs are [listed here](https://dev.wix.com/api/rest/getting-started/wix-business-solutions#getting-started_wix-business-solutions_about-wix-business-solutions).\n */\nexport function listAvailableAlgorithms(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAvailableAlgorithms({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.recommendations.v1.recommendation',\n method: 'GET' as any,\n methodFqn:\n 'com.wix.ecom.recommendations.v1.RecommendationsService.ListAvailableAlgorithms',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomRecommendationsV1RecommendationsServiceUrl({\n protoPath: '/v1/recommendations/algorithms',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAvailableAlgorithms;\n}\n\n/**\n * Returns a recommendation object containing a list of items to recommend to the customer.\n *\n * `getRecommendation()` determines which items to recommend based on the given recommendation algorithms.\n *\n * `getRecommendation()` doesn’t run the algorithms. It calls the installed apps that provide them.\n *\n * Apps may provide algorithms for use with their own catalogs, or for use with catalogs from other apps.\n * For example, Wix Stores provides algorithms that can only be used on its own catalogs.\n * To run an algorithm, the app providing it must be installed, and an app providing a supported catalog must be installed.\n * For more information and to see which algorithms are available on your site or project, call [`listAvailableAlgorithms()`](#listavailablealgorithms).\n *\n * `getRecommendation()` operates as follows:\n * 1. `getRecommendation()` receives as input a list of algorithms as an array. These algorithms can be provided by different apps and can apply to different catalogs.\n * 2. `getRecommendation()` calls the app that corresponds to the `appId` of the first algorithm in the list of algorithms. It passes that algorithm’s ID and the IDs of any subsequent algorithms in the array for the same app.\n * 3. The app runs the algorithms.\n * 4. `getRecommendation()` returns items recommendations from the first algorithm (according to its position in the `algorithms` array) that meets the minimum number of recommendations. At that point `getRecommendation()` stops calling other apps.\n * 5. If none of the algorithms run by the first app meet the minimum recommended items, `getRecommendation()` finds the next algorithm in the array with a new `appId` (an ID of an app that has not yet been called), and repeats the process.\n * 6. If no algorithms in the `algorithms` array recommend at least the minimum recommended items, `getRecommendation()` returns an empty array.\n */\nexport function getRecommendation(payload: object): RequestOptionsFactory<any> {\n function __getRecommendation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.recommendations.v1.recommendation',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.recommendations.v1.RecommendationsService.GetRecommendation',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomRecommendationsV1RecommendationsServiceUrl({\n protoPath: '/v1/recommendations/get',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getRecommendation;\n}\n","import * as ambassadorWixEcomRecommendationsV1Recommendation from './ecom-recommendations-v1-recommendation-recommendations.http.js';\nimport * as ambassadorWixEcomRecommendationsV1RecommendationTypes from './ecom-recommendations-v1-recommendation-recommendations.types.js';\nimport * as ambassadorWixEcomRecommendationsV1RecommendationUniversalTypes from './ecom-recommendations-v1-recommendation-recommendations.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function listAvailableAlgorithms(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixEcomRecommendationsV1RecommendationUniversalTypes.ListAvailableAlgorithmsRequest,\n ambassadorWixEcomRecommendationsV1RecommendationTypes.ListAvailableAlgorithmsRequest,\n ambassadorWixEcomRecommendationsV1RecommendationUniversalTypes.ListAvailableAlgorithmsResponse,\n ambassadorWixEcomRecommendationsV1RecommendationTypes.ListAvailableAlgorithmsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomRecommendationsV1Recommendation.listAvailableAlgorithms(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/recommendations/algorithms',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getRecommendation(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixEcomRecommendationsV1RecommendationUniversalTypes.GetRecommendationRequest,\n ambassadorWixEcomRecommendationsV1RecommendationTypes.GetRecommendationRequest,\n ambassadorWixEcomRecommendationsV1RecommendationUniversalTypes.GetRecommendationResponse,\n ambassadorWixEcomRecommendationsV1RecommendationTypes.GetRecommendationResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomRecommendationsV1Recommendation.getRecommendation(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/recommendations/get',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA,+BAAAC;AAAA;AAAA;;;ACAA,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,iCAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAgBd,SAAS,wBACd,SAC4B;AAC5B,WAAS,0BAA0B,EAAE,KAAK,GAAQ;AAChD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,4DAA4D;AAAA,QAC/D,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,YAAQ,uCAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAsBO,SAAS,kBAAkB,SAA6C;AAC7E,WAAS,oBAAoB,EAAE,KAAK,GAAQ;AAC1C,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,4DAA4D;AAAA,QAC/D,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;AClFO,SAASC,2BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6C;AAAA,IAC/C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,qBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6C,kBAAkB,OAAO;AAE5E,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["getRecommendation","listAvailableAlgorithms","import_rest_modules","listAvailableAlgorithms","getRecommendation"]}
@@ -0,0 +1,100 @@
1
+ // src/ecom-recommendations-v1-recommendation-recommendations.http.ts
2
+ import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
3
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
4
+ function resolveComWixEcomRecommendationsV1RecommendationsServiceUrl(opts) {
5
+ const domainToMappings = {
6
+ "www.wixapis.com": [
7
+ {
8
+ srcPath: "/v1/recommendations",
9
+ destPath: "/v1/recommendations"
10
+ },
11
+ {
12
+ srcPath: "/ecom/v1/recommendations",
13
+ destPath: "/v1/recommendations"
14
+ }
15
+ ]
16
+ };
17
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
18
+ }
19
+ var PACKAGE_NAME = "@wix/auto_sdk_ecom_recommendations";
20
+ function listAvailableAlgorithms(payload) {
21
+ function __listAvailableAlgorithms({ host }) {
22
+ const metadata = {
23
+ entityFqdn: "wix.ecom.recommendations.v1.recommendation",
24
+ method: "GET",
25
+ methodFqn: "com.wix.ecom.recommendations.v1.RecommendationsService.ListAvailableAlgorithms",
26
+ packageName: PACKAGE_NAME,
27
+ url: resolveComWixEcomRecommendationsV1RecommendationsServiceUrl({
28
+ protoPath: "/v1/recommendations/algorithms",
29
+ data: payload,
30
+ host
31
+ }),
32
+ params: toURLSearchParams(payload)
33
+ };
34
+ return metadata;
35
+ }
36
+ return __listAvailableAlgorithms;
37
+ }
38
+ function getRecommendation(payload) {
39
+ function __getRecommendation({ host }) {
40
+ const metadata = {
41
+ entityFqdn: "wix.ecom.recommendations.v1.recommendation",
42
+ method: "POST",
43
+ methodFqn: "com.wix.ecom.recommendations.v1.RecommendationsService.GetRecommendation",
44
+ packageName: PACKAGE_NAME,
45
+ url: resolveComWixEcomRecommendationsV1RecommendationsServiceUrl({
46
+ protoPath: "/v1/recommendations/get",
47
+ data: payload,
48
+ host
49
+ }),
50
+ data: payload
51
+ };
52
+ return metadata;
53
+ }
54
+ return __getRecommendation;
55
+ }
56
+
57
+ // src/ecom-recommendations-v1-recommendation-recommendations.meta.ts
58
+ function listAvailableAlgorithms2() {
59
+ const payload = {};
60
+ const getRequestOptions = listAvailableAlgorithms(
61
+ payload
62
+ );
63
+ const getUrl = (context) => {
64
+ const { url } = getRequestOptions(context);
65
+ return url;
66
+ };
67
+ return {
68
+ getUrl,
69
+ httpMethod: "GET",
70
+ path: "/v1/recommendations/algorithms",
71
+ pathParams: {},
72
+ __requestType: null,
73
+ __originalRequestType: null,
74
+ __responseType: null,
75
+ __originalResponseType: null
76
+ };
77
+ }
78
+ function getRecommendation2() {
79
+ const payload = {};
80
+ const getRequestOptions = getRecommendation(payload);
81
+ const getUrl = (context) => {
82
+ const { url } = getRequestOptions(context);
83
+ return url;
84
+ };
85
+ return {
86
+ getUrl,
87
+ httpMethod: "POST",
88
+ path: "/v1/recommendations/get",
89
+ pathParams: {},
90
+ __requestType: null,
91
+ __originalRequestType: null,
92
+ __responseType: null,
93
+ __originalResponseType: null
94
+ };
95
+ }
96
+ export {
97
+ getRecommendation2 as getRecommendation,
98
+ listAvailableAlgorithms2 as listAvailableAlgorithms
99
+ };
100
+ //# sourceMappingURL=meta.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/ecom-recommendations-v1-recommendation-recommendations.http.ts","../../src/ecom-recommendations-v1-recommendation-recommendations.meta.ts"],"sourcesContent":["import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixEcomRecommendationsV1RecommendationsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'www.wixapis.com': [\n {\n srcPath: '/v1/recommendations',\n destPath: '/v1/recommendations',\n },\n {\n srcPath: '/ecom/v1/recommendations',\n destPath: '/v1/recommendations',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_ecom_recommendations';\n\n/**\n * Returns a list of recommendation algorithms that can be used on your Wix site or project. These algorithms can be used with [`getRecommendation()`](#getRecommendation) to provide item recommendations to the customer.\n *\n * Algorithms are run by the apps that provide them, and can only be used on catalogs they support. Apps may provide algorithms for use with their own catalogs and/or catalogs from other apps.\n *\n * The app which provides an algorithm is referenced by that algorithm’s `appId`. The apps whose catalogs are supported by an algorithm are referenced by the IDs in that algorithm’s `catalogAppIds` array.\n *\n *\n * For an algorithm to be considered “Available” and returned in this method’s response, the algorithm must meet the following conditions:\n * 1. The algorithm’s `appId` must match the ID of an installed Wix app.\n * 2. At least 1 of the IDs in `catalogAppIds` must match the ID of an installed Wix app.\n *\n * Wix app IDs are [listed here](https://dev.wix.com/api/rest/getting-started/wix-business-solutions#getting-started_wix-business-solutions_about-wix-business-solutions).\n */\nexport function listAvailableAlgorithms(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAvailableAlgorithms({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.recommendations.v1.recommendation',\n method: 'GET' as any,\n methodFqn:\n 'com.wix.ecom.recommendations.v1.RecommendationsService.ListAvailableAlgorithms',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomRecommendationsV1RecommendationsServiceUrl({\n protoPath: '/v1/recommendations/algorithms',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAvailableAlgorithms;\n}\n\n/**\n * Returns a recommendation object containing a list of items to recommend to the customer.\n *\n * `getRecommendation()` determines which items to recommend based on the given recommendation algorithms.\n *\n * `getRecommendation()` doesn’t run the algorithms. It calls the installed apps that provide them.\n *\n * Apps may provide algorithms for use with their own catalogs, or for use with catalogs from other apps.\n * For example, Wix Stores provides algorithms that can only be used on its own catalogs.\n * To run an algorithm, the app providing it must be installed, and an app providing a supported catalog must be installed.\n * For more information and to see which algorithms are available on your site or project, call [`listAvailableAlgorithms()`](#listavailablealgorithms).\n *\n * `getRecommendation()` operates as follows:\n * 1. `getRecommendation()` receives as input a list of algorithms as an array. These algorithms can be provided by different apps and can apply to different catalogs.\n * 2. `getRecommendation()` calls the app that corresponds to the `appId` of the first algorithm in the list of algorithms. It passes that algorithm’s ID and the IDs of any subsequent algorithms in the array for the same app.\n * 3. The app runs the algorithms.\n * 4. `getRecommendation()` returns items recommendations from the first algorithm (according to its position in the `algorithms` array) that meets the minimum number of recommendations. At that point `getRecommendation()` stops calling other apps.\n * 5. If none of the algorithms run by the first app meet the minimum recommended items, `getRecommendation()` finds the next algorithm in the array with a new `appId` (an ID of an app that has not yet been called), and repeats the process.\n * 6. If no algorithms in the `algorithms` array recommend at least the minimum recommended items, `getRecommendation()` returns an empty array.\n */\nexport function getRecommendation(payload: object): RequestOptionsFactory<any> {\n function __getRecommendation({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.ecom.recommendations.v1.recommendation',\n method: 'POST' as any,\n methodFqn:\n 'com.wix.ecom.recommendations.v1.RecommendationsService.GetRecommendation',\n packageName: PACKAGE_NAME,\n url: resolveComWixEcomRecommendationsV1RecommendationsServiceUrl({\n protoPath: '/v1/recommendations/get',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __getRecommendation;\n}\n","import * as ambassadorWixEcomRecommendationsV1Recommendation from './ecom-recommendations-v1-recommendation-recommendations.http.js';\nimport * as ambassadorWixEcomRecommendationsV1RecommendationTypes from './ecom-recommendations-v1-recommendation-recommendations.types.js';\nimport * as ambassadorWixEcomRecommendationsV1RecommendationUniversalTypes from './ecom-recommendations-v1-recommendation-recommendations.universal.js';\n\nexport type __PublicMethodMetaInfo<\n K = string,\n M = unknown,\n T = unknown,\n S = unknown,\n Q = unknown,\n R = unknown\n> = {\n getUrl: (context: any) => string;\n httpMethod: K;\n path: string;\n pathParams: M;\n __requestType: T;\n __originalRequestType: S;\n __responseType: Q;\n __originalResponseType: R;\n};\n\nexport function listAvailableAlgorithms(): __PublicMethodMetaInfo<\n 'GET',\n {},\n ambassadorWixEcomRecommendationsV1RecommendationUniversalTypes.ListAvailableAlgorithmsRequest,\n ambassadorWixEcomRecommendationsV1RecommendationTypes.ListAvailableAlgorithmsRequest,\n ambassadorWixEcomRecommendationsV1RecommendationUniversalTypes.ListAvailableAlgorithmsResponse,\n ambassadorWixEcomRecommendationsV1RecommendationTypes.ListAvailableAlgorithmsResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomRecommendationsV1Recommendation.listAvailableAlgorithms(\n payload\n );\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'GET',\n path: '/v1/recommendations/algorithms',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n\nexport function getRecommendation(): __PublicMethodMetaInfo<\n 'POST',\n {},\n ambassadorWixEcomRecommendationsV1RecommendationUniversalTypes.GetRecommendationRequest,\n ambassadorWixEcomRecommendationsV1RecommendationTypes.GetRecommendationRequest,\n ambassadorWixEcomRecommendationsV1RecommendationUniversalTypes.GetRecommendationResponse,\n ambassadorWixEcomRecommendationsV1RecommendationTypes.GetRecommendationResponse\n> {\n const payload = {} as any;\n\n const getRequestOptions =\n ambassadorWixEcomRecommendationsV1Recommendation.getRecommendation(payload);\n\n const getUrl = (context: any): string => {\n const { url } = getRequestOptions(context);\n return url!;\n };\n\n return {\n getUrl,\n httpMethod: 'POST',\n path: '/v1/recommendations/get',\n pathParams: {},\n __requestType: null as any,\n __originalRequestType: null as any,\n __responseType: null as any,\n __originalResponseType: null as any,\n };\n}\n"],"mappings":";AAAA,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAI3B,SAAS,4DACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AAgBd,SAAS,wBACd,SAC4B;AAC5B,WAAS,0BAA0B,EAAE,KAAK,GAAQ;AAChD,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,4DAA4D;AAAA,QAC/D,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,QAAQ,kBAAkB,OAAO;AAAA,IACnC;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAsBO,SAAS,kBAAkB,SAA6C;AAC7E,WAAS,oBAAoB,EAAE,KAAK,GAAQ;AAC1C,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,KAAK,4DAA4D;AAAA,QAC/D,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,MAAM;AAAA,IACR;AAEA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;;;AClFO,SAASA,2BAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6C;AAAA,IAC/C;AAAA,EACF;AAEF,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;AAEO,SAASC,qBAOd;AACA,QAAM,UAAU,CAAC;AAEjB,QAAM,oBAC6C,kBAAkB,OAAO;AAE5E,QAAM,SAAS,CAAC,YAAyB;AACvC,UAAM,EAAE,IAAI,IAAI,kBAAkB,OAAO;AACzC,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL;AAAA,IACA,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,YAAY,CAAC;AAAA,IACb,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,wBAAwB;AAAA,EAC1B;AACF;","names":["listAvailableAlgorithms","getRecommendation"]}
@@ -0,0 +1,164 @@
1
+ import { c as ListAvailableAlgorithmsRequest$1, L as ListAvailableAlgorithmsResponse$1, f as GetRecommendationRequest$1, a as GetRecommendationResponse$1 } from './ecom-recommendations-v1-recommendation-recommendations.universal-CEpjDJVC.mjs';
2
+
3
+ interface Recommendation {
4
+ /**
5
+ * Recommended items.
6
+ * @maxSize 100
7
+ */
8
+ items?: CatalogReference[];
9
+ /** The algorithm used to provide the recommendation. */
10
+ algorithm?: Algorithm;
11
+ }
12
+ /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
13
+ interface CatalogReference {
14
+ /**
15
+ * ID of the item within the catalog it belongs to.
16
+ * @minLength 1
17
+ * @maxLength 36
18
+ */
19
+ catalogItemId?: string;
20
+ /**
21
+ * ID of the app providing the catalog.
22
+ *
23
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
24
+ *
25
+ * For items from Wix catalogs, the following values always apply:
26
+ * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
27
+ * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
28
+ * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
29
+ * @minLength 1
30
+ */
31
+ appId?: string;
32
+ /**
33
+ * 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.
34
+ *
35
+ * For products and variants from a Wix Stores catalog, learn more about eCommerce integration ([SDK](https://dev.wix.com/docs/sdk/backend-modules/stores/catalog-v3/e-commerce-integration) | [REST](https://dev.wix.com/docs/rest/business-solutions/stores/catalog/e-commerce-integration)).
36
+ */
37
+ options?: Record<string, any> | null;
38
+ }
39
+ interface Algorithm {
40
+ /**
41
+ * Algorithm ID defined by the app providing the algorithm.
42
+ * @format GUID
43
+ */
44
+ id?: string;
45
+ /**
46
+ * App ID of the Wix or 3rd-party app providing the algorithm.
47
+ *
48
+ * Wix app IDs are <a href="https://dev.wix.com/api/rest/getting-started/wix-business-solutions#getting-started_wix-business-solutions_about-wix-business-solutions" target="_blank">listed here</a>.
49
+ * @minLength 1
50
+ * @maxLength 36
51
+ */
52
+ appId?: string;
53
+ }
54
+ interface ListAvailableAlgorithmsRequest {
55
+ }
56
+ interface ListAvailableAlgorithmsResponse {
57
+ /**
58
+ * Algorithms available for use on your Wix site or project. See the method description for more information.
59
+ * @maxSize 500
60
+ */
61
+ availableAlgorithms?: AlgorithmInfo[];
62
+ }
63
+ interface AlgorithmInfo {
64
+ /** How the algorithm is configured. */
65
+ config?: AlgorithmConfig;
66
+ /**
67
+ * The app ID of the application providing the algorithm.
68
+ *
69
+ * Wix app IDs are <a href="https://dev.wix.com/api/rest/getting-started/wix-business-solutions#getting-started_wix-business-solutions_about-wix-business-solutions" target="_blank">listed here</a>.
70
+ * @minLength 1
71
+ * @maxLength 36
72
+ */
73
+ appId?: string;
74
+ /**
75
+ * App IDs of catalogs to which the algorithm can be applied.
76
+ *
77
+ * Wix app IDs are <a href="https://dev.wix.com/api/rest/getting-started/wix-business-solutions#getting-started_wix-business-solutions_about-wix-business-solutions" target="_blank">listed here</a>.
78
+ * @minSize 1
79
+ * @maxSize 100
80
+ * @minLength 1
81
+ * @maxLength 36
82
+ */
83
+ catalogAppIds?: string[];
84
+ }
85
+ interface AlgorithmConfig {
86
+ /**
87
+ * Algorithm name. This value is not translatable.
88
+ * @minLength 1
89
+ * @maxLength 50
90
+ */
91
+ name?: string;
92
+ /**
93
+ * Algorithm description. This describes how the algorithm works and if it has any limitations regarding site content, number of items in the catalog, site traffic, and so on. This value is not translatable.
94
+ * @minLength 1
95
+ * @maxLength 500
96
+ */
97
+ description?: string;
98
+ /**
99
+ * A supplemental `description`. It can be used to help break up and organize information. You can, for example, display this information as a tooltip or as an additional section that is collapsed by default.
100
+ * @minLength 1
101
+ * @maxLength 300
102
+ */
103
+ additionalInfo?: string | null;
104
+ /**
105
+ * Algorithms may have the following types:
106
+ * * `RELATED_ITEMS` - This type of algorithm provides recommendations based on 1 or more other provided items. For example, when an item is added to a cart, the algorithm can suggest other items frequently bought together with that item.
107
+ * * `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.
108
+ */
109
+ algorithmType?: AlgorithmTypeWithLiterals;
110
+ /**
111
+ * Algorithm ID. This must be unique for a specific app but does not have to be unique across all apps on the site or in the project.
112
+ * @format GUID
113
+ */
114
+ algorithmId?: string;
115
+ }
116
+ declare enum AlgorithmType {
117
+ UNSPECIFIED = "UNSPECIFIED",
118
+ RELATED_ITEMS = "RELATED_ITEMS",
119
+ GLOBAL = "GLOBAL"
120
+ }
121
+ /** @enumType */
122
+ type AlgorithmTypeWithLiterals = AlgorithmType | 'UNSPECIFIED' | 'RELATED_ITEMS' | 'GLOBAL';
123
+ interface GetRecommendationRequest {
124
+ /**
125
+ * The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`.
126
+ * @maxSize 300
127
+ */
128
+ items?: CatalogReference[];
129
+ /**
130
+ * A list of algorithms checked in a specific order determined by their `appID` and their position in the `algorithms` array.
131
+ * See the method description for more information.
132
+ *
133
+ * If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned.
134
+ * @minSize 1
135
+ * @maxSize 10
136
+ */
137
+ algorithms: Algorithm[];
138
+ /**
139
+ * The minimum number of items that must be recommended by the algorithm for those items to be returned in the response.
140
+ *
141
+ * Max: `100`
142
+ * @max 100
143
+ */
144
+ minimumRecommendedItems?: number;
145
+ }
146
+ interface GetRecommendationResponse {
147
+ /** An object containing a list of items recommended by 1 of the specified algorithms. The recommendation is empty if none of the specified algorithms recommended enough items. */
148
+ recommendation?: Recommendation;
149
+ }
150
+
151
+ type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
152
+ getUrl: (context: any) => string;
153
+ httpMethod: K;
154
+ path: string;
155
+ pathParams: M;
156
+ __requestType: T;
157
+ __originalRequestType: S;
158
+ __responseType: Q;
159
+ __originalResponseType: R;
160
+ };
161
+ declare function listAvailableAlgorithms(): __PublicMethodMetaInfo<'GET', {}, ListAvailableAlgorithmsRequest$1, ListAvailableAlgorithmsRequest, ListAvailableAlgorithmsResponse$1, ListAvailableAlgorithmsResponse>;
162
+ declare function getRecommendation(): __PublicMethodMetaInfo<'POST', {}, GetRecommendationRequest$1, GetRecommendationRequest, GetRecommendationResponse$1, GetRecommendationResponse>;
163
+
164
+ export { type __PublicMethodMetaInfo, getRecommendation, listAvailableAlgorithms };