@wix/auto_sdk_ecom_recommendations 1.0.46 → 1.0.48
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.
- package/build/cjs/schemas.js +30 -30
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/schemas.mjs +30 -30
- package/build/es/schemas.mjs.map +1 -1
- package/package.json +3 -3
- package/build/internal/cjs/index.js +0 -197
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -176
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -156
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.js +0 -137
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -171
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -150
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -127
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.mjs +0 -97
- package/build/internal/es/schemas.mjs.map +0 -1
package/build/cjs/schemas.js
CHANGED
|
@@ -41,85 +41,85 @@ module.exports = __toCommonJS(schemas_exports);
|
|
|
41
41
|
var z = __toESM(require("zod"));
|
|
42
42
|
var ListAvailableAlgorithmsRequest = /* @__PURE__ */ z.object({});
|
|
43
43
|
var ListAvailableAlgorithmsResponse = /* @__PURE__ */ z.object({
|
|
44
|
-
availableAlgorithms: z.array(
|
|
45
|
-
z.object({
|
|
46
|
-
config: z.object({
|
|
47
|
-
name: z.string().describe("Algorithm name. This value is not translatable.").min(1).max(50).optional(),
|
|
48
|
-
description: z.string().describe(
|
|
44
|
+
availableAlgorithms: /* @__PURE__ */ z.array(
|
|
45
|
+
/* @__PURE__ */ z.object({
|
|
46
|
+
config: /* @__PURE__ */ z.object({
|
|
47
|
+
name: /* @__PURE__ */ z.string().describe("Algorithm name. This value is not translatable.").min(1).max(50).optional(),
|
|
48
|
+
description: /* @__PURE__ */ z.string().describe(
|
|
49
49
|
"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."
|
|
50
50
|
).min(1).max(500).optional(),
|
|
51
|
-
additionalInfo: z.string().describe(
|
|
51
|
+
additionalInfo: /* @__PURE__ */ z.string().describe(
|
|
52
52
|
"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."
|
|
53
53
|
).min(1).max(300).optional().nullable(),
|
|
54
|
-
algorithmType: z.enum(["UNSPECIFIED", "RELATED_ITEMS", "GLOBAL"]).describe(
|
|
54
|
+
algorithmType: /* @__PURE__ */ z.enum(["UNSPECIFIED", "RELATED_ITEMS", "GLOBAL"]).describe(
|
|
55
55
|
"Algorithms may have the following types:\n* `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.\n* `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals."
|
|
56
56
|
).optional(),
|
|
57
|
-
algorithmId: z.string().describe(
|
|
57
|
+
algorithmId: /* @__PURE__ */ z.string().describe(
|
|
58
58
|
"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."
|
|
59
59
|
).regex(
|
|
60
60
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
61
61
|
"Must be a valid GUID"
|
|
62
62
|
).optional()
|
|
63
63
|
}).describe("Algorithm configuration.").optional(),
|
|
64
|
-
appId: z.string().describe(
|
|
64
|
+
appId: /* @__PURE__ */ z.string().describe(
|
|
65
65
|
"ID of the app that provides the algorithm. This can be an app built by Wix or a 3rd-party app.\n\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix)."
|
|
66
66
|
).min(1).max(36).optional(),
|
|
67
|
-
catalogAppIds: z.array(z.string()).min(1).max(100).optional()
|
|
67
|
+
catalogAppIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).min(1).max(100).optional()
|
|
68
68
|
})
|
|
69
69
|
).max(500).optional()
|
|
70
70
|
});
|
|
71
71
|
var GetRecommendationRequest = /* @__PURE__ */ z.object({
|
|
72
|
-
algorithms: z.array(
|
|
73
|
-
z.object({
|
|
74
|
-
_id: z.string().describe(
|
|
72
|
+
algorithms: /* @__PURE__ */ z.array(
|
|
73
|
+
/* @__PURE__ */ z.object({
|
|
74
|
+
_id: /* @__PURE__ */ z.string().describe(
|
|
75
75
|
"ID of the algorithm, as defined by the app that provides it."
|
|
76
76
|
).regex(
|
|
77
77
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
78
78
|
"Must be a valid GUID"
|
|
79
79
|
),
|
|
80
|
-
appId: z.string().describe(
|
|
80
|
+
appId: /* @__PURE__ */ z.string().describe(
|
|
81
81
|
"ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\n\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix)."
|
|
82
82
|
).min(1).max(36)
|
|
83
83
|
})
|
|
84
84
|
).min(1).max(10),
|
|
85
|
-
options: z.object({
|
|
86
|
-
items: z.array(
|
|
87
|
-
z.object({
|
|
88
|
-
catalogItemId: z.string().describe("ID of the item within the catalog it belongs to.").min(1).max(36),
|
|
89
|
-
appId: z.string().describe(
|
|
85
|
+
options: /* @__PURE__ */ z.object({
|
|
86
|
+
items: /* @__PURE__ */ z.array(
|
|
87
|
+
/* @__PURE__ */ z.object({
|
|
88
|
+
catalogItemId: /* @__PURE__ */ z.string().describe("ID of the item within the catalog it belongs to.").min(1).max(36),
|
|
89
|
+
appId: /* @__PURE__ */ z.string().describe(
|
|
90
90
|
'ID of the app providing the catalog.\n\nYou can get your app\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`\n+ Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n+ Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`'
|
|
91
91
|
).min(1),
|
|
92
|
-
options: z.record(z.string(), z.any()).describe(
|
|
92
|
+
options: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
93
93
|
"Additional item details in `key:value` pairs.\n\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\n\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction)."
|
|
94
94
|
).optional().nullable()
|
|
95
95
|
})
|
|
96
96
|
).max(300).optional(),
|
|
97
|
-
minimumRecommendedItems: z.number().int().describe(
|
|
97
|
+
minimumRecommendedItems: /* @__PURE__ */ z.number().int().describe(
|
|
98
98
|
"Minimum number of items an algorithm must provide for its recommendations to be returned in the response. If no algorithm provides enough items, an empty array is returned."
|
|
99
99
|
).min(0).max(100).optional()
|
|
100
100
|
}).describe("Get recommendation options.").optional()
|
|
101
101
|
});
|
|
102
102
|
var GetRecommendationResponse = /* @__PURE__ */ z.object({
|
|
103
|
-
recommendation: z.object({
|
|
104
|
-
items: z.array(
|
|
105
|
-
z.object({
|
|
106
|
-
catalogItemId: z.string().describe("ID of the item within the catalog it belongs to.").min(1).max(36).optional(),
|
|
107
|
-
appId: z.string().describe(
|
|
103
|
+
recommendation: /* @__PURE__ */ z.object({
|
|
104
|
+
items: /* @__PURE__ */ z.array(
|
|
105
|
+
/* @__PURE__ */ z.object({
|
|
106
|
+
catalogItemId: /* @__PURE__ */ z.string().describe("ID of the item within the catalog it belongs to.").min(1).max(36).optional(),
|
|
107
|
+
appId: /* @__PURE__ */ z.string().describe(
|
|
108
108
|
'ID of the app providing the catalog.\n\nYou can get your app\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`\n+ Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n+ Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`'
|
|
109
109
|
).min(1).optional(),
|
|
110
|
-
options: z.record(z.string(), z.any()).describe(
|
|
110
|
+
options: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
111
111
|
"Additional item details in `key:value` pairs.\n\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\n\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction)."
|
|
112
112
|
).optional().nullable()
|
|
113
113
|
})
|
|
114
114
|
).max(100).optional(),
|
|
115
|
-
algorithm: z.object({
|
|
116
|
-
_id: z.string().describe(
|
|
115
|
+
algorithm: /* @__PURE__ */ z.object({
|
|
116
|
+
_id: /* @__PURE__ */ z.string().describe(
|
|
117
117
|
"ID of the algorithm, as defined by the app that provides it."
|
|
118
118
|
).regex(
|
|
119
119
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
120
120
|
"Must be a valid GUID"
|
|
121
121
|
).optional(),
|
|
122
|
-
appId: z.string().describe(
|
|
122
|
+
appId: /* @__PURE__ */ z.string().describe(
|
|
123
123
|
"ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\n\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix)."
|
|
124
124
|
).min(1).max(36).optional()
|
|
125
125
|
}).describe("The algorithm used to provide the recommendation.").optional()
|
package/build/cjs/schemas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../schemas.ts","../../src/ecom-recommendations-v1-recommendation-recommendations.schemas.ts"],"sourcesContent":["export * from './src/ecom-recommendations-v1-recommendation-recommendations.schemas.js';\n","import * as z from 'zod';\n\nexport const ListAvailableAlgorithmsRequest = /*#__PURE__*/ z.object({});\nexport const ListAvailableAlgorithmsResponse = /*#__PURE__*/ z.object({\n availableAlgorithms: z\n .array(\n z.object({\n config: z\n .object({\n name: z\n .string()\n .describe('Algorithm name. This value is not translatable.')\n .min(1)\n .max(50)\n .optional(),\n description: z\n .string()\n .describe(\n '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.'\n )\n .min(1)\n .max(500)\n .optional(),\n additionalInfo: z\n .string()\n .describe(\n '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.'\n )\n .min(1)\n .max(300)\n .optional()\n .nullable(),\n algorithmType: z\n .enum(['UNSPECIFIED', 'RELATED_ITEMS', 'GLOBAL'])\n .describe(\n 'Algorithms may have the following types:\\n* `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.\\n* `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.'\n )\n .optional(),\n algorithmId: z\n .string()\n .describe(\n '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.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n })\n .describe('Algorithm configuration.')\n .optional(),\n appId: z\n .string()\n .describe(\n 'ID of the app that provides the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36)\n .optional(),\n catalogAppIds: z.array(z.string()).min(1).max(100).optional(),\n })\n )\n .max(500)\n .optional(),\n});\nexport const GetRecommendationRequest = /*#__PURE__*/ z.object({\n algorithms: z\n .array(\n z.object({\n _id: z\n .string()\n .describe(\n 'ID of the algorithm, as defined by the app that provides it.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n appId: z\n .string()\n .describe(\n 'ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36),\n })\n )\n .min(1)\n .max(10),\n options: z\n .object({\n items: z\n .array(\n z.object({\n catalogItemId: z\n .string()\n .describe('ID of the item within the catalog it belongs to.')\n .min(1)\n .max(36),\n appId: z\n .string()\n .describe(\n 'ID of the app providing the catalog.\\n\\nYou can get your app\\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\\n\\nFor items from Wix catalogs, the following values always apply:\\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`'\n )\n .min(1),\n options: z\n .record(z.string(), z.any())\n .describe(\n 'Additional item details in `key:value` pairs.\\n\\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\\n\\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).'\n )\n .optional()\n .nullable(),\n })\n )\n .max(300)\n .optional(),\n minimumRecommendedItems: z\n .number()\n .int()\n .describe(\n 'Minimum number of items an algorithm must provide for its recommendations to be returned in the response. If no algorithm provides enough items, an empty array is returned.'\n )\n .min(0)\n .max(100)\n .optional(),\n })\n .describe('Get recommendation options.')\n .optional(),\n});\nexport const GetRecommendationResponse = /*#__PURE__*/ z.object({\n recommendation: z\n .object({\n items: z\n .array(\n z.object({\n catalogItemId: z\n .string()\n .describe('ID of the item within the catalog it belongs to.')\n .min(1)\n .max(36)\n .optional(),\n appId: z\n .string()\n .describe(\n 'ID of the app providing the catalog.\\n\\nYou can get your app\\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\\n\\nFor items from Wix catalogs, the following values always apply:\\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`'\n )\n .min(1)\n .optional(),\n options: z\n .record(z.string(), z.any())\n .describe(\n 'Additional item details in `key:value` pairs.\\n\\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\\n\\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).'\n )\n .optional()\n .nullable(),\n })\n )\n .max(100)\n .optional(),\n algorithm: z\n .object({\n _id: z\n .string()\n .describe(\n 'ID of the algorithm, as defined by the app that provides it.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n appId: z\n .string()\n .describe(\n 'ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36)\n .optional(),\n })\n .describe('The algorithm used to provide the recommendation.')\n .optional(),\n })\n .describe(\n 'The recommended items and the algorithm that provided them. Empty if no algorithm met the `minimumRecommendedItems` threshold.'\n )\n .optional(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;AAEZ,IAAM,iCAA+C,gBAAE,SAAO,CAAC,CAAC;AAChE,IAAM,kCAAgD,gBAAE,SAAO;AAAA,EACpE,qBACG;AAAA,IACG,SAAO;AAAA,MACP,QACG,SAAO;AAAA,QACN,MACG,SAAO,EACP,SAAS,iDAAiD,EAC1D,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,QACZ,aACG,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS;AAAA,QACZ,gBACG,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,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ACL,IAAI,GAAG,EACP,SAAS;AAAA,EACd,CAAC,EACA,SAAS,6BAA6B,EACtC,SAAS;AACd,CAAC;AACM,IAAM,4BAA0C,gBAAE,SAAO;AAAA,EAC9D,gBACG,SAAO;AAAA,IACN,OACG;AAAA,MACG,SAAO;AAAA,QACP,eACG,SAAO,EACP,SAAS,kDAAkD,EAC3D,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,QACZ,OACG,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,SAAS;AAAA,QACZ,SACG,SAAS,SAAO,GAAK,MAAI,CAAC,EAC1B;AAAA,UACC;AAAA,QACF,EACC,SAAS,EACT,SAAS;AAAA,MACd,CAAC;AAAA,IACH,EACC,IAAI,GAAG,EACP,SAAS;AAAA,IACZ,WACG,SAAO;AAAA,MACN,KACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS;AAAA,MACZ,OACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,IACd,CAAC,EACA,SAAS,mDAAmD,EAC5D,SAAS;AAAA,EACd,CAAC,EACA;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../schemas.ts","../../src/ecom-recommendations-v1-recommendation-recommendations.schemas.ts"],"sourcesContent":["export * from './src/ecom-recommendations-v1-recommendation-recommendations.schemas.js';\n","import * as z from 'zod';\n\nexport const ListAvailableAlgorithmsRequest = /*#__PURE__*/ z.object({});\nexport const ListAvailableAlgorithmsResponse = /*#__PURE__*/ z.object({\n availableAlgorithms: /*#__PURE__*/ z\n .array(\n /*#__PURE__*/ z.object({\n config: /*#__PURE__*/ z\n .object({\n name: /*#__PURE__*/ z\n .string()\n .describe('Algorithm name. This value is not translatable.')\n .min(1)\n .max(50)\n .optional(),\n description: /*#__PURE__*/ z\n .string()\n .describe(\n '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.'\n )\n .min(1)\n .max(500)\n .optional(),\n additionalInfo: /*#__PURE__*/ z\n .string()\n .describe(\n '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.'\n )\n .min(1)\n .max(300)\n .optional()\n .nullable(),\n algorithmType: /*#__PURE__*/ z\n .enum(['UNSPECIFIED', 'RELATED_ITEMS', 'GLOBAL'])\n .describe(\n 'Algorithms may have the following types:\\n* `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.\\n* `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.'\n )\n .optional(),\n algorithmId: /*#__PURE__*/ z\n .string()\n .describe(\n '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.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n })\n .describe('Algorithm configuration.')\n .optional(),\n appId: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the app that provides the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36)\n .optional(),\n catalogAppIds: /*#__PURE__*/ z\n .array(/*#__PURE__*/ z.string())\n .min(1)\n .max(100)\n .optional(),\n })\n )\n .max(500)\n .optional(),\n});\nexport const GetRecommendationRequest = /*#__PURE__*/ z.object({\n algorithms: /*#__PURE__*/ z\n .array(\n /*#__PURE__*/ z.object({\n _id: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the algorithm, as defined by the app that provides it.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n appId: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36),\n })\n )\n .min(1)\n .max(10),\n options: /*#__PURE__*/ z\n .object({\n items: /*#__PURE__*/ z\n .array(\n /*#__PURE__*/ z.object({\n catalogItemId: /*#__PURE__*/ z\n .string()\n .describe('ID of the item within the catalog it belongs to.')\n .min(1)\n .max(36),\n appId: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the app providing the catalog.\\n\\nYou can get your app\\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\\n\\nFor items from Wix catalogs, the following values always apply:\\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`'\n )\n .min(1),\n options: /*#__PURE__*/ z\n .record(/*#__PURE__*/ z.string(), /*#__PURE__*/ z.any())\n .describe(\n 'Additional item details in `key:value` pairs.\\n\\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\\n\\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).'\n )\n .optional()\n .nullable(),\n })\n )\n .max(300)\n .optional(),\n minimumRecommendedItems: /*#__PURE__*/ z\n .number()\n .int()\n .describe(\n 'Minimum number of items an algorithm must provide for its recommendations to be returned in the response. If no algorithm provides enough items, an empty array is returned.'\n )\n .min(0)\n .max(100)\n .optional(),\n })\n .describe('Get recommendation options.')\n .optional(),\n});\nexport const GetRecommendationResponse = /*#__PURE__*/ z.object({\n recommendation: /*#__PURE__*/ z\n .object({\n items: /*#__PURE__*/ z\n .array(\n /*#__PURE__*/ z.object({\n catalogItemId: /*#__PURE__*/ z\n .string()\n .describe('ID of the item within the catalog it belongs to.')\n .min(1)\n .max(36)\n .optional(),\n appId: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the app providing the catalog.\\n\\nYou can get your app\\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\\n\\nFor items from Wix catalogs, the following values always apply:\\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`'\n )\n .min(1)\n .optional(),\n options: /*#__PURE__*/ z\n .record(/*#__PURE__*/ z.string(), /*#__PURE__*/ z.any())\n .describe(\n 'Additional item details in `key:value` pairs.\\n\\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\\n\\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).'\n )\n .optional()\n .nullable(),\n })\n )\n .max(100)\n .optional(),\n algorithm: /*#__PURE__*/ z\n .object({\n _id: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the algorithm, as defined by the app that provides it.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n appId: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36)\n .optional(),\n })\n .describe('The algorithm used to provide the recommendation.')\n .optional(),\n })\n .describe(\n 'The recommended items and the algorithm that provided them. Empty if no algorithm met the `minimumRecommendedItems` threshold.'\n )\n .optional(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,QAAmB;AAEZ,IAAM,iCAA+C,gBAAE,SAAO,CAAC,CAAC;AAChE,IAAM,kCAAgD,gBAAE,SAAO;AAAA,EACpE,qBAAmC,gBAChC;AAAA,IACe,gBAAE,SAAO;AAAA,MACrB,QAAsB,gBACnB,SAAO;AAAA,QACN,MAAoB,gBACjB,SAAO,EACP,SAAS,iDAAiD,EAC1D,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,QACZ,aAA2B,gBACxB,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS;AAAA,QACZ,gBAA8B,gBAC3B,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS,EACT,SAAS;AAAA,QACZ,eAA6B,gBAC1B,OAAK,CAAC,eAAe,iBAAiB,QAAQ,CAAC,EAC/C;AAAA,UACC;AAAA,QACF,EACC,SAAS;AAAA,QACZ,aAA2B,gBACxB,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC;AAAA,UACC;AAAA,UACA;AAAA,QACF,EACC,SAAS;AAAA,MACd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,CAAC;AACM,IAAM,4BAA0C,gBAAE,SAAO;AAAA,EAC9D,gBAA8B,gBAC3B,SAAO;AAAA,IACN,OAAqB,gBAClB;AAAA,MACe,gBAAE,SAAO;AAAA,QACrB,eAA6B,gBAC1B,SAAO,EACP,SAAS,kDAAkD,EAC3D,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,QACZ,OAAqB,gBAClB,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,SAAS;AAAA,QACZ,SAAuB,gBACpB,SAAqB,gBAAE,SAAO,GAAiB,gBAAE,MAAI,CAAC,EACtD;AAAA,UACC;AAAA,QACF,EACC,SAAS,EACT,SAAS;AAAA,MACd,CAAC;AAAA,IACH,EACC,IAAI,GAAG,EACP,SAAS;AAAA,IACZ,WAAyB,gBACtB,SAAO;AAAA,MACN,KAAmB,gBAChB,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS;AAAA,MACZ,OAAqB,gBAClB,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,IACd,CAAC,EACA,SAAS,mDAAmD,EAC5D,SAAS;AAAA,EACd,CAAC,EACA;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;","names":[]}
|
package/build/es/schemas.mjs
CHANGED
|
@@ -2,85 +2,85 @@
|
|
|
2
2
|
import * as z from "zod";
|
|
3
3
|
var ListAvailableAlgorithmsRequest = /* @__PURE__ */ z.object({});
|
|
4
4
|
var ListAvailableAlgorithmsResponse = /* @__PURE__ */ z.object({
|
|
5
|
-
availableAlgorithms: z.array(
|
|
6
|
-
z.object({
|
|
7
|
-
config: z.object({
|
|
8
|
-
name: z.string().describe("Algorithm name. This value is not translatable.").min(1).max(50).optional(),
|
|
9
|
-
description: z.string().describe(
|
|
5
|
+
availableAlgorithms: /* @__PURE__ */ z.array(
|
|
6
|
+
/* @__PURE__ */ z.object({
|
|
7
|
+
config: /* @__PURE__ */ z.object({
|
|
8
|
+
name: /* @__PURE__ */ z.string().describe("Algorithm name. This value is not translatable.").min(1).max(50).optional(),
|
|
9
|
+
description: /* @__PURE__ */ z.string().describe(
|
|
10
10
|
"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."
|
|
11
11
|
).min(1).max(500).optional(),
|
|
12
|
-
additionalInfo: z.string().describe(
|
|
12
|
+
additionalInfo: /* @__PURE__ */ z.string().describe(
|
|
13
13
|
"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."
|
|
14
14
|
).min(1).max(300).optional().nullable(),
|
|
15
|
-
algorithmType: z.enum(["UNSPECIFIED", "RELATED_ITEMS", "GLOBAL"]).describe(
|
|
15
|
+
algorithmType: /* @__PURE__ */ z.enum(["UNSPECIFIED", "RELATED_ITEMS", "GLOBAL"]).describe(
|
|
16
16
|
"Algorithms may have the following types:\n* `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.\n* `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals."
|
|
17
17
|
).optional(),
|
|
18
|
-
algorithmId: z.string().describe(
|
|
18
|
+
algorithmId: /* @__PURE__ */ z.string().describe(
|
|
19
19
|
"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."
|
|
20
20
|
).regex(
|
|
21
21
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
22
22
|
"Must be a valid GUID"
|
|
23
23
|
).optional()
|
|
24
24
|
}).describe("Algorithm configuration.").optional(),
|
|
25
|
-
appId: z.string().describe(
|
|
25
|
+
appId: /* @__PURE__ */ z.string().describe(
|
|
26
26
|
"ID of the app that provides the algorithm. This can be an app built by Wix or a 3rd-party app.\n\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix)."
|
|
27
27
|
).min(1).max(36).optional(),
|
|
28
|
-
catalogAppIds: z.array(z.string()).min(1).max(100).optional()
|
|
28
|
+
catalogAppIds: /* @__PURE__ */ z.array(/* @__PURE__ */ z.string()).min(1).max(100).optional()
|
|
29
29
|
})
|
|
30
30
|
).max(500).optional()
|
|
31
31
|
});
|
|
32
32
|
var GetRecommendationRequest = /* @__PURE__ */ z.object({
|
|
33
|
-
algorithms: z.array(
|
|
34
|
-
z.object({
|
|
35
|
-
_id: z.string().describe(
|
|
33
|
+
algorithms: /* @__PURE__ */ z.array(
|
|
34
|
+
/* @__PURE__ */ z.object({
|
|
35
|
+
_id: /* @__PURE__ */ z.string().describe(
|
|
36
36
|
"ID of the algorithm, as defined by the app that provides it."
|
|
37
37
|
).regex(
|
|
38
38
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
39
39
|
"Must be a valid GUID"
|
|
40
40
|
),
|
|
41
|
-
appId: z.string().describe(
|
|
41
|
+
appId: /* @__PURE__ */ z.string().describe(
|
|
42
42
|
"ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\n\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix)."
|
|
43
43
|
).min(1).max(36)
|
|
44
44
|
})
|
|
45
45
|
).min(1).max(10),
|
|
46
|
-
options: z.object({
|
|
47
|
-
items: z.array(
|
|
48
|
-
z.object({
|
|
49
|
-
catalogItemId: z.string().describe("ID of the item within the catalog it belongs to.").min(1).max(36),
|
|
50
|
-
appId: z.string().describe(
|
|
46
|
+
options: /* @__PURE__ */ z.object({
|
|
47
|
+
items: /* @__PURE__ */ z.array(
|
|
48
|
+
/* @__PURE__ */ z.object({
|
|
49
|
+
catalogItemId: /* @__PURE__ */ z.string().describe("ID of the item within the catalog it belongs to.").min(1).max(36),
|
|
50
|
+
appId: /* @__PURE__ */ z.string().describe(
|
|
51
51
|
'ID of the app providing the catalog.\n\nYou can get your app\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`\n+ Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n+ Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`'
|
|
52
52
|
).min(1),
|
|
53
|
-
options: z.record(z.string(), z.any()).describe(
|
|
53
|
+
options: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
54
54
|
"Additional item details in `key:value` pairs.\n\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\n\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction)."
|
|
55
55
|
).optional().nullable()
|
|
56
56
|
})
|
|
57
57
|
).max(300).optional(),
|
|
58
|
-
minimumRecommendedItems: z.number().int().describe(
|
|
58
|
+
minimumRecommendedItems: /* @__PURE__ */ z.number().int().describe(
|
|
59
59
|
"Minimum number of items an algorithm must provide for its recommendations to be returned in the response. If no algorithm provides enough items, an empty array is returned."
|
|
60
60
|
).min(0).max(100).optional()
|
|
61
61
|
}).describe("Get recommendation options.").optional()
|
|
62
62
|
});
|
|
63
63
|
var GetRecommendationResponse = /* @__PURE__ */ z.object({
|
|
64
|
-
recommendation: z.object({
|
|
65
|
-
items: z.array(
|
|
66
|
-
z.object({
|
|
67
|
-
catalogItemId: z.string().describe("ID of the item within the catalog it belongs to.").min(1).max(36).optional(),
|
|
68
|
-
appId: z.string().describe(
|
|
64
|
+
recommendation: /* @__PURE__ */ z.object({
|
|
65
|
+
items: /* @__PURE__ */ z.array(
|
|
66
|
+
/* @__PURE__ */ z.object({
|
|
67
|
+
catalogItemId: /* @__PURE__ */ z.string().describe("ID of the item within the catalog it belongs to.").min(1).max(36).optional(),
|
|
68
|
+
appId: /* @__PURE__ */ z.string().describe(
|
|
69
69
|
'ID of the app providing the catalog.\n\nYou can get your app\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\n\nFor items from Wix catalogs, the following values always apply:\n+ Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`\n+ Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`\n+ Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`'
|
|
70
70
|
).min(1).optional(),
|
|
71
|
-
options: z.record(z.string(), z.any()).describe(
|
|
71
|
+
options: /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.any()).describe(
|
|
72
72
|
"Additional item details in `key:value` pairs.\n\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\n\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction)."
|
|
73
73
|
).optional().nullable()
|
|
74
74
|
})
|
|
75
75
|
).max(100).optional(),
|
|
76
|
-
algorithm: z.object({
|
|
77
|
-
_id: z.string().describe(
|
|
76
|
+
algorithm: /* @__PURE__ */ z.object({
|
|
77
|
+
_id: /* @__PURE__ */ z.string().describe(
|
|
78
78
|
"ID of the algorithm, as defined by the app that provides it."
|
|
79
79
|
).regex(
|
|
80
80
|
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
81
81
|
"Must be a valid GUID"
|
|
82
82
|
).optional(),
|
|
83
|
-
appId: z.string().describe(
|
|
83
|
+
appId: /* @__PURE__ */ z.string().describe(
|
|
84
84
|
"ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\n\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix)."
|
|
85
85
|
).min(1).max(36).optional()
|
|
86
86
|
}).describe("The algorithm used to provide the recommendation.").optional()
|
package/build/es/schemas.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/ecom-recommendations-v1-recommendation-recommendations.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const ListAvailableAlgorithmsRequest = /*#__PURE__*/ z.object({});\nexport const ListAvailableAlgorithmsResponse = /*#__PURE__*/ z.object({\n availableAlgorithms: z\n .array(\n z.object({\n config: z\n .object({\n name: z\n .string()\n .describe('Algorithm name. This value is not translatable.')\n .min(1)\n .max(50)\n .optional(),\n description: z\n .string()\n .describe(\n '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.'\n )\n .min(1)\n .max(500)\n .optional(),\n additionalInfo: z\n .string()\n .describe(\n '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.'\n )\n .min(1)\n .max(300)\n .optional()\n .nullable(),\n algorithmType: z\n .enum(['UNSPECIFIED', 'RELATED_ITEMS', 'GLOBAL'])\n .describe(\n 'Algorithms may have the following types:\\n* `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.\\n* `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.'\n )\n .optional(),\n algorithmId: z\n .string()\n .describe(\n '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.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n })\n .describe('Algorithm configuration.')\n .optional(),\n appId: z\n .string()\n .describe(\n 'ID of the app that provides the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36)\n .optional(),\n catalogAppIds: z.array(z.string()).min(1).max(100).optional(),\n })\n )\n .max(500)\n .optional(),\n});\nexport const GetRecommendationRequest = /*#__PURE__*/ z.object({\n algorithms: z\n .array(\n z.object({\n _id: z\n .string()\n .describe(\n 'ID of the algorithm, as defined by the app that provides it.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n appId: z\n .string()\n .describe(\n 'ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36),\n })\n )\n .min(1)\n .max(10),\n options: z\n .object({\n items: z\n .array(\n z.object({\n catalogItemId: z\n .string()\n .describe('ID of the item within the catalog it belongs to.')\n .min(1)\n .max(36),\n appId: z\n .string()\n .describe(\n 'ID of the app providing the catalog.\\n\\nYou can get your app\\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\\n\\nFor items from Wix catalogs, the following values always apply:\\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`'\n )\n .min(1),\n options: z\n .record(z.string(), z.any())\n .describe(\n 'Additional item details in `key:value` pairs.\\n\\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\\n\\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).'\n )\n .optional()\n .nullable(),\n })\n )\n .max(300)\n .optional(),\n minimumRecommendedItems: z\n .number()\n .int()\n .describe(\n 'Minimum number of items an algorithm must provide for its recommendations to be returned in the response. If no algorithm provides enough items, an empty array is returned.'\n )\n .min(0)\n .max(100)\n .optional(),\n })\n .describe('Get recommendation options.')\n .optional(),\n});\nexport const GetRecommendationResponse = /*#__PURE__*/ z.object({\n recommendation: z\n .object({\n items: z\n .array(\n z.object({\n catalogItemId: z\n .string()\n .describe('ID of the item within the catalog it belongs to.')\n .min(1)\n .max(36)\n .optional(),\n appId: z\n .string()\n .describe(\n 'ID of the app providing the catalog.\\n\\nYou can get your app\\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\\n\\nFor items from Wix catalogs, the following values always apply:\\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`'\n )\n .min(1)\n .optional(),\n options: z\n .record(z.string(), z.any())\n .describe(\n 'Additional item details in `key:value` pairs.\\n\\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\\n\\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).'\n )\n .optional()\n .nullable(),\n })\n )\n .max(100)\n .optional(),\n algorithm: z\n .object({\n _id: z\n .string()\n .describe(\n 'ID of the algorithm, as defined by the app that provides it.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n appId: z\n .string()\n .describe(\n 'ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36)\n .optional(),\n })\n .describe('The algorithm used to provide the recommendation.')\n .optional(),\n })\n .describe(\n 'The recommended items and the algorithm that provided them. Empty if no algorithm met the `minimumRecommendedItems` threshold.'\n )\n .optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,iCAA+C,gBAAE,SAAO,CAAC,CAAC;AAChE,IAAM,kCAAgD,gBAAE,SAAO;AAAA,EACpE,qBACG;AAAA,IACG,SAAO;AAAA,MACP,QACG,SAAO;AAAA,QACN,MACG,SAAO,EACP,SAAS,iDAAiD,EAC1D,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,QACZ,aACG,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS;AAAA,QACZ,gBACG,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SA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,IAAI,GAAG,EACP,SAAS;AAAA,EACd,CAAC,EACA,SAAS,6BAA6B,EACtC,SAAS;AACd,CAAC;AACM,IAAM,4BAA0C,gBAAE,SAAO;AAAA,EAC9D,gBACG,SAAO;AAAA,IACN,OACG;AAAA,MACG,SAAO;AAAA,QACP,eACG,SAAO,EACP,SAAS,kDAAkD,EAC3D,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,QACZ,OACG,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,SAAS;AAAA,QACZ,SACG,SAAS,SAAO,GAAK,MAAI,CAAC,EAC1B;AAAA,UACC;AAAA,QACF,EACC,SAAS,EACT,SAAS;AAAA,MACd,CAAC;AAAA,IACH,EACC,IAAI,GAAG,EACP,SAAS;AAAA,IACZ,WACG,SAAO;AAAA,MACN,KACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS;AAAA,MACZ,OACG,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,IACd,CAAC,EACA,SAAS,mDAAmD,EAC5D,SAAS;AAAA,EACd,CAAC,EACA;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/ecom-recommendations-v1-recommendation-recommendations.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const ListAvailableAlgorithmsRequest = /*#__PURE__*/ z.object({});\nexport const ListAvailableAlgorithmsResponse = /*#__PURE__*/ z.object({\n availableAlgorithms: /*#__PURE__*/ z\n .array(\n /*#__PURE__*/ z.object({\n config: /*#__PURE__*/ z\n .object({\n name: /*#__PURE__*/ z\n .string()\n .describe('Algorithm name. This value is not translatable.')\n .min(1)\n .max(50)\n .optional(),\n description: /*#__PURE__*/ z\n .string()\n .describe(\n '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.'\n )\n .min(1)\n .max(500)\n .optional(),\n additionalInfo: /*#__PURE__*/ z\n .string()\n .describe(\n '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.'\n )\n .min(1)\n .max(300)\n .optional()\n .nullable(),\n algorithmType: /*#__PURE__*/ z\n .enum(['UNSPECIFIED', 'RELATED_ITEMS', 'GLOBAL'])\n .describe(\n 'Algorithms may have the following types:\\n* `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.\\n* `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.'\n )\n .optional(),\n algorithmId: /*#__PURE__*/ z\n .string()\n .describe(\n '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.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n })\n .describe('Algorithm configuration.')\n .optional(),\n appId: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the app that provides the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36)\n .optional(),\n catalogAppIds: /*#__PURE__*/ z\n .array(/*#__PURE__*/ z.string())\n .min(1)\n .max(100)\n .optional(),\n })\n )\n .max(500)\n .optional(),\n});\nexport const GetRecommendationRequest = /*#__PURE__*/ z.object({\n algorithms: /*#__PURE__*/ z\n .array(\n /*#__PURE__*/ z.object({\n _id: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the algorithm, as defined by the app that provides it.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n appId: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36),\n })\n )\n .min(1)\n .max(10),\n options: /*#__PURE__*/ z\n .object({\n items: /*#__PURE__*/ z\n .array(\n /*#__PURE__*/ z.object({\n catalogItemId: /*#__PURE__*/ z\n .string()\n .describe('ID of the item within the catalog it belongs to.')\n .min(1)\n .max(36),\n appId: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the app providing the catalog.\\n\\nYou can get your app\\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\\n\\nFor items from Wix catalogs, the following values always apply:\\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`'\n )\n .min(1),\n options: /*#__PURE__*/ z\n .record(/*#__PURE__*/ z.string(), /*#__PURE__*/ z.any())\n .describe(\n 'Additional item details in `key:value` pairs.\\n\\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\\n\\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).'\n )\n .optional()\n .nullable(),\n })\n )\n .max(300)\n .optional(),\n minimumRecommendedItems: /*#__PURE__*/ z\n .number()\n .int()\n .describe(\n 'Minimum number of items an algorithm must provide for its recommendations to be returned in the response. If no algorithm provides enough items, an empty array is returned.'\n )\n .min(0)\n .max(100)\n .optional(),\n })\n .describe('Get recommendation options.')\n .optional(),\n});\nexport const GetRecommendationResponse = /*#__PURE__*/ z.object({\n recommendation: /*#__PURE__*/ z\n .object({\n items: /*#__PURE__*/ z\n .array(\n /*#__PURE__*/ z.object({\n catalogItemId: /*#__PURE__*/ z\n .string()\n .describe('ID of the item within the catalog it belongs to.')\n .min(1)\n .max(36)\n .optional(),\n appId: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the app providing the catalog.\\n\\nYou can get your app\\'s ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).\\n\\nFor items from Wix catalogs, the following values always apply:\\n+ Wix Stores: `\"215238eb-22a5-4c36-9e7b-e7c08025e04e\"`\\n+ Wix Bookings: `\"13d21c63-b5ec-5912-8397-c3a5ddb27a97\"`\\n+ Wix Restaurants: `\"9a5d83fd-8570-482e-81ab-cfa88942ee60\"`'\n )\n .min(1)\n .optional(),\n options: /*#__PURE__*/ z\n .record(/*#__PURE__*/ z.string(), /*#__PURE__*/ z.any())\n .describe(\n 'Additional item details in `key:value` pairs.\\n\\nUse this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items.\\n\\nFor Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration)\\nor [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction).'\n )\n .optional()\n .nullable(),\n })\n )\n .max(100)\n .optional(),\n algorithm: /*#__PURE__*/ z\n .object({\n _id: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the algorithm, as defined by the app that provides it.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n appId: /*#__PURE__*/ z\n .string()\n .describe(\n 'ID of the app providing the algorithm. This can be an app built by Wix or a 3rd-party app.\\n\\nSee app IDs for [apps built by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).'\n )\n .min(1)\n .max(36)\n .optional(),\n })\n .describe('The algorithm used to provide the recommendation.')\n .optional(),\n })\n .describe(\n 'The recommended items and the algorithm that provided them. Empty if no algorithm met the `minimumRecommendedItems` threshold.'\n )\n .optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IAAM,iCAA+C,gBAAE,SAAO,CAAC,CAAC;AAChE,IAAM,kCAAgD,gBAAE,SAAO;AAAA,EACpE,qBAAmC,gBAChC;AAAA,IACe,gBAAE,SAAO;AAAA,MACrB,QAAsB,gBACnB,SAAO;AAAA,QACN,MAAoB,gBACjB,SAAO,EACP,SAAS,iDAAiD,EAC1D,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,QACZ,aAA2B,gBACxB,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS;AAAA,QACZ,gBAA8B,gBAC3B,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,IAAI,GAAG,EACP,SAAS,EACT,SAAS;AAAA,QACZ,eAA6B,gBAC1B,OAAK,CAAC,eAAe,iBAAiB,QAAQ,CAAC,EAC/C;AAAA,UACC;AAAA,QACF,EACC,SAAS;AAAA,QACZ,aAA2B,gBACxB,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC;AAAA,UACC;AAAA,UACA;AAAA,QACF,EACC,SAAS;AAAA,MACd,CAAC,EACA,SAAS,0BAA0B,EACnC,SAAS;AAAA,MACZ,OAAqB,gBAClB,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SA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AA6B,gBAC1B,SAAO,EACP,SAAS,kDAAkD,EAC3D,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,QACZ,OAAqB,gBAClB,SAAO,EACP;AAAA,UACC;AAAA,QACF,EACC,IAAI,CAAC,EACL,SAAS;AAAA,QACZ,SAAuB,gBACpB,SAAqB,gBAAE,SAAO,GAAiB,gBAAE,MAAI,CAAC,EACtD;AAAA,UACC;AAAA,QACF,EACC,SAAS,EACT,SAAS;AAAA,MACd,CAAC;AAAA,IACH,EACC,IAAI,GAAG,EACP,SAAS;AAAA,IACZ,WAAyB,gBACtB,SAAO;AAAA,MACN,KAAmB,gBAChB,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC;AAAA,QACC;AAAA,QACA;AAAA,MACF,EACC,SAAS;AAAA,MACZ,OAAqB,gBAClB,SAAO,EACP;AAAA,QACC;AAAA,MACF,EACC,IAAI,CAAC,EACL,IAAI,EAAE,EACN,SAAS;AAAA,IACd,CAAC,EACA,SAAS,mDAAmD,EAC5D,SAAS;AAAA,EACd,CAAC,EACA;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_ecom_recommendations",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.48",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"schemas"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@wix/sdk-runtime": "^1.0.
|
|
38
|
+
"@wix/sdk-runtime": "^1.0.24",
|
|
39
39
|
"@wix/sdk-types": "^1.17.11",
|
|
40
40
|
"zod": "^4.3.6"
|
|
41
41
|
},
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"fqdn": "wix.ecom.recommendations.v1.recommendation"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
|
-
"falconPackageHash": "
|
|
60
|
+
"falconPackageHash": "ee708408e7d71f24ad7dd783d6a4ebcb28ade842d1179211e822cad3"
|
|
61
61
|
}
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// index.ts
|
|
21
|
-
var index_exports = {};
|
|
22
|
-
__export(index_exports, {
|
|
23
|
-
AlgorithmType: () => AlgorithmType,
|
|
24
|
-
getRecommendation: () => getRecommendation4,
|
|
25
|
-
listAvailableAlgorithms: () => listAvailableAlgorithms4
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(index_exports);
|
|
28
|
-
|
|
29
|
-
// src/ecom-recommendations-v1-recommendation-recommendations.universal.ts
|
|
30
|
-
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
31
|
-
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
32
|
-
|
|
33
|
-
// src/ecom-recommendations-v1-recommendation-recommendations.http.ts
|
|
34
|
-
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
35
|
-
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
36
|
-
function resolveComWixEcomRecommendationsV1RecommendationsServiceUrl(opts) {
|
|
37
|
-
const domainToMappings = {
|
|
38
|
-
"www.wixapis.com": [
|
|
39
|
-
{
|
|
40
|
-
srcPath: "/v1/recommendations",
|
|
41
|
-
destPath: "/v1/recommendations"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
srcPath: "/ecom/v1/recommendations",
|
|
45
|
-
destPath: "/v1/recommendations"
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
_: [
|
|
49
|
-
{
|
|
50
|
-
srcPath: "/v1/recommendations",
|
|
51
|
-
destPath: "/v1/recommendations"
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"*.dev.wix-code.com": [
|
|
55
|
-
{
|
|
56
|
-
srcPath: "/v1/recommendations",
|
|
57
|
-
destPath: "/v1/recommendations"
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
};
|
|
61
|
-
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
62
|
-
}
|
|
63
|
-
var PACKAGE_NAME = "@wix/auto_sdk_ecom_recommendations";
|
|
64
|
-
function listAvailableAlgorithms(payload) {
|
|
65
|
-
function __listAvailableAlgorithms({ host }) {
|
|
66
|
-
const metadata = {
|
|
67
|
-
entityFqdn: "wix.ecom.recommendations.v1.recommendation",
|
|
68
|
-
method: "GET",
|
|
69
|
-
methodFqn: "com.wix.ecom.recommendations.v1.RecommendationsService.ListAvailableAlgorithms",
|
|
70
|
-
packageName: PACKAGE_NAME,
|
|
71
|
-
migrationOptions: {
|
|
72
|
-
optInTransformResponse: true
|
|
73
|
-
},
|
|
74
|
-
url: resolveComWixEcomRecommendationsV1RecommendationsServiceUrl({
|
|
75
|
-
protoPath: "/v1/recommendations/algorithms",
|
|
76
|
-
data: payload,
|
|
77
|
-
host
|
|
78
|
-
}),
|
|
79
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload)
|
|
80
|
-
};
|
|
81
|
-
return metadata;
|
|
82
|
-
}
|
|
83
|
-
return __listAvailableAlgorithms;
|
|
84
|
-
}
|
|
85
|
-
function getRecommendation(payload) {
|
|
86
|
-
function __getRecommendation({ host }) {
|
|
87
|
-
const metadata = {
|
|
88
|
-
entityFqdn: "wix.ecom.recommendations.v1.recommendation",
|
|
89
|
-
method: "POST",
|
|
90
|
-
methodFqn: "com.wix.ecom.recommendations.v1.RecommendationsService.GetRecommendation",
|
|
91
|
-
packageName: PACKAGE_NAME,
|
|
92
|
-
migrationOptions: {
|
|
93
|
-
optInTransformResponse: true
|
|
94
|
-
},
|
|
95
|
-
url: resolveComWixEcomRecommendationsV1RecommendationsServiceUrl({
|
|
96
|
-
protoPath: "/v1/recommendations/get",
|
|
97
|
-
data: payload,
|
|
98
|
-
host
|
|
99
|
-
}),
|
|
100
|
-
data: payload
|
|
101
|
-
};
|
|
102
|
-
return metadata;
|
|
103
|
-
}
|
|
104
|
-
return __getRecommendation;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// src/ecom-recommendations-v1-recommendation-recommendations.universal.ts
|
|
108
|
-
var AlgorithmType = /* @__PURE__ */ ((AlgorithmType2) => {
|
|
109
|
-
AlgorithmType2["UNSPECIFIED"] = "UNSPECIFIED";
|
|
110
|
-
AlgorithmType2["RELATED_ITEMS"] = "RELATED_ITEMS";
|
|
111
|
-
AlgorithmType2["GLOBAL"] = "GLOBAL";
|
|
112
|
-
return AlgorithmType2;
|
|
113
|
-
})(AlgorithmType || {});
|
|
114
|
-
async function listAvailableAlgorithms2() {
|
|
115
|
-
const { httpClient, sideEffects } = arguments[0];
|
|
116
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
|
|
117
|
-
const reqOpts = listAvailableAlgorithms(
|
|
118
|
-
payload
|
|
119
|
-
);
|
|
120
|
-
sideEffects?.onSiteCall?.();
|
|
121
|
-
try {
|
|
122
|
-
const result = await httpClient.request(reqOpts);
|
|
123
|
-
sideEffects?.onSuccess?.(result);
|
|
124
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
125
|
-
} catch (err) {
|
|
126
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
127
|
-
err,
|
|
128
|
-
{
|
|
129
|
-
spreadPathsToArguments: {},
|
|
130
|
-
explicitPathsToArguments: {},
|
|
131
|
-
singleArgumentUnchanged: false
|
|
132
|
-
},
|
|
133
|
-
[]
|
|
134
|
-
);
|
|
135
|
-
sideEffects?.onError?.(err);
|
|
136
|
-
throw transformedError;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
async function getRecommendation2(algorithms, options) {
|
|
140
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
141
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
142
|
-
algorithms,
|
|
143
|
-
items: options?.items,
|
|
144
|
-
minimumRecommendedItems: options?.minimumRecommendedItems
|
|
145
|
-
});
|
|
146
|
-
const reqOpts = getRecommendation(payload);
|
|
147
|
-
sideEffects?.onSiteCall?.();
|
|
148
|
-
try {
|
|
149
|
-
const result = await httpClient.request(reqOpts);
|
|
150
|
-
sideEffects?.onSuccess?.(result);
|
|
151
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
152
|
-
} catch (err) {
|
|
153
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
154
|
-
err,
|
|
155
|
-
{
|
|
156
|
-
spreadPathsToArguments: {},
|
|
157
|
-
explicitPathsToArguments: {
|
|
158
|
-
algorithms: "$[0]",
|
|
159
|
-
items: "$[1].items",
|
|
160
|
-
minimumRecommendedItems: "$[1].minimumRecommendedItems"
|
|
161
|
-
},
|
|
162
|
-
singleArgumentUnchanged: false
|
|
163
|
-
},
|
|
164
|
-
["algorithms", "options"]
|
|
165
|
-
);
|
|
166
|
-
sideEffects?.onError?.(err);
|
|
167
|
-
throw transformedError;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// src/ecom-recommendations-v1-recommendation-recommendations.public.ts
|
|
172
|
-
function listAvailableAlgorithms3(httpClient) {
|
|
173
|
-
return () => listAvailableAlgorithms2(
|
|
174
|
-
// @ts-ignore
|
|
175
|
-
{ httpClient }
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
function getRecommendation3(httpClient) {
|
|
179
|
-
return (algorithms, options) => getRecommendation2(
|
|
180
|
-
algorithms,
|
|
181
|
-
options,
|
|
182
|
-
// @ts-ignore
|
|
183
|
-
{ httpClient }
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// src/ecom-recommendations-v1-recommendation-recommendations.context.ts
|
|
188
|
-
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
189
|
-
var listAvailableAlgorithms4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(listAvailableAlgorithms3);
|
|
190
|
-
var getRecommendation4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(getRecommendation3);
|
|
191
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
192
|
-
0 && (module.exports = {
|
|
193
|
-
AlgorithmType,
|
|
194
|
-
getRecommendation,
|
|
195
|
-
listAvailableAlgorithms
|
|
196
|
-
});
|
|
197
|
-
//# sourceMappingURL=index.js.map
|