@wix/auto_sdk_ecom_recommendations 1.0.0 → 1.0.2
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/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts +68 -13
- package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +1 -1
- package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +73 -16
- package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +0 -2
- package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +1 -1
- package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts +68 -13
- package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +1 -1
- package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +73 -16
- package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +0 -2
- package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +1 -1
- package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts +68 -13
- package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +1 -1
- package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +73 -16
- package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +0 -2
- package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +1 -1
- package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts +68 -13
- package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +1 -1
- package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +73 -16
- package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +0 -2
- package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
export interface Recommendation {
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Recommended items.
|
|
4
|
+
* @maxSize 100
|
|
5
|
+
*/
|
|
3
6
|
items?: CatalogReference[];
|
|
4
7
|
/** The algorithm used to provide the recommendation. */
|
|
5
8
|
algorithm?: Algorithm;
|
|
6
9
|
}
|
|
7
10
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
8
11
|
export interface CatalogReference {
|
|
9
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* ID of the item within the catalog it belongs to.
|
|
14
|
+
* @minLength 1
|
|
15
|
+
* @maxLength 36
|
|
16
|
+
*/
|
|
10
17
|
catalogItemId?: string;
|
|
11
18
|
/**
|
|
12
19
|
* ID of the app providing the catalog.
|
|
@@ -17,29 +24,38 @@ export interface CatalogReference {
|
|
|
17
24
|
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
18
25
|
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
19
26
|
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
27
|
+
* @minLength 1
|
|
20
28
|
*/
|
|
21
29
|
appId?: string;
|
|
22
30
|
/**
|
|
23
31
|
* 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.
|
|
24
32
|
*
|
|
25
|
-
* For products and variants from a Wix Stores catalog, learn more about
|
|
33
|
+
* 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)).
|
|
26
34
|
*/
|
|
27
35
|
options?: Record<string, any> | null;
|
|
28
36
|
}
|
|
29
37
|
export interface Algorithm {
|
|
30
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Algorithm ID defined by the app providing the algorithm.
|
|
40
|
+
* @format GUID
|
|
41
|
+
*/
|
|
31
42
|
id?: string;
|
|
32
43
|
/**
|
|
33
44
|
* App ID of the Wix or 3rd-party app providing the algorithm.
|
|
34
45
|
*
|
|
35
46
|
* 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>.
|
|
47
|
+
* @minLength 1
|
|
48
|
+
* @maxLength 36
|
|
36
49
|
*/
|
|
37
50
|
appId?: string;
|
|
38
51
|
}
|
|
39
52
|
export interface ListAvailableAlgorithmsRequest {
|
|
40
53
|
}
|
|
41
54
|
export interface ListAvailableAlgorithmsResponse {
|
|
42
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Algorithms available for use on your Wix site or project. See the method description for more information.
|
|
57
|
+
* @maxSize 500
|
|
58
|
+
*/
|
|
43
59
|
availableAlgorithms?: AlgorithmInfo[];
|
|
44
60
|
}
|
|
45
61
|
export interface AlgorithmInfo {
|
|
@@ -49,21 +65,39 @@ export interface AlgorithmInfo {
|
|
|
49
65
|
* The app ID of the application providing the algorithm.
|
|
50
66
|
*
|
|
51
67
|
* 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>.
|
|
68
|
+
* @minLength 1
|
|
69
|
+
* @maxLength 36
|
|
52
70
|
*/
|
|
53
71
|
appId?: string;
|
|
54
72
|
/**
|
|
55
73
|
* App IDs of catalogs to which the algorithm can be applied.
|
|
56
74
|
*
|
|
57
75
|
* 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>.
|
|
76
|
+
* @minSize 1
|
|
77
|
+
* @maxSize 100
|
|
78
|
+
* @minLength 1
|
|
79
|
+
* @maxLength 36
|
|
58
80
|
*/
|
|
59
81
|
catalogAppIds?: string[];
|
|
60
82
|
}
|
|
61
83
|
export interface AlgorithmConfig {
|
|
62
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Algorithm name. This value is not translatable.
|
|
86
|
+
* @minLength 1
|
|
87
|
+
* @maxLength 50
|
|
88
|
+
*/
|
|
63
89
|
name?: string;
|
|
64
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* 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.
|
|
92
|
+
* @minLength 1
|
|
93
|
+
* @maxLength 500
|
|
94
|
+
*/
|
|
65
95
|
description?: string;
|
|
66
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* 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.
|
|
98
|
+
* @minLength 1
|
|
99
|
+
* @maxLength 300
|
|
100
|
+
*/
|
|
67
101
|
additionalInfo?: string | null;
|
|
68
102
|
/**
|
|
69
103
|
* Algorithms may have the following types:
|
|
@@ -71,7 +105,10 @@ export interface AlgorithmConfig {
|
|
|
71
105
|
* * `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.
|
|
72
106
|
*/
|
|
73
107
|
algorithmType?: AlgorithmType;
|
|
74
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* 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.
|
|
110
|
+
* @format GUID
|
|
111
|
+
*/
|
|
75
112
|
algorithmId?: string;
|
|
76
113
|
}
|
|
77
114
|
export declare enum AlgorithmType {
|
|
@@ -80,19 +117,25 @@ export declare enum AlgorithmType {
|
|
|
80
117
|
GLOBAL = "GLOBAL"
|
|
81
118
|
}
|
|
82
119
|
export interface GetRecommendationRequest {
|
|
83
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`.
|
|
122
|
+
* @maxSize 300
|
|
123
|
+
*/
|
|
84
124
|
items?: CatalogReference[];
|
|
85
125
|
/**
|
|
86
126
|
* A list of algorithms checked in a specific order determined by their `appID` and their position in the `algorithms` array.
|
|
87
127
|
* See the method description for more information.
|
|
88
128
|
*
|
|
89
129
|
* If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned.
|
|
130
|
+
* @minSize 1
|
|
131
|
+
* @maxSize 10
|
|
90
132
|
*/
|
|
91
133
|
algorithms: Algorithm[];
|
|
92
134
|
/**
|
|
93
135
|
* The minimum number of items that must be recommended by the algorithm for those items to be returned in the response.
|
|
94
136
|
*
|
|
95
137
|
* Max: `100`
|
|
138
|
+
* @max 100
|
|
96
139
|
*/
|
|
97
140
|
minimumRecommendedItems?: number;
|
|
98
141
|
}
|
|
@@ -101,13 +144,25 @@ export interface GetRecommendationResponse {
|
|
|
101
144
|
recommendation?: Recommendation;
|
|
102
145
|
}
|
|
103
146
|
export interface ItemAppIdNotSupportedByProvider {
|
|
104
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* Items with an App ID not supported by the provider. Supported App IDs can be found in the provider config in the Dev Center.
|
|
149
|
+
* @minSize 1
|
|
150
|
+
* @maxSize 300
|
|
151
|
+
*/
|
|
105
152
|
items?: CatalogReference[];
|
|
106
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* Algorithms that don't support the requested items.
|
|
155
|
+
* @minSize 1
|
|
156
|
+
* @maxSize 10
|
|
157
|
+
*/
|
|
107
158
|
algorithms?: Algorithm[];
|
|
108
159
|
}
|
|
109
160
|
export interface RecommendationAlgorithmNotSupported {
|
|
110
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* Algorithms not supported by the provider.
|
|
163
|
+
* @minSize 1
|
|
164
|
+
* @maxSize 10
|
|
165
|
+
*/
|
|
111
166
|
unsupportedAlgorithms?: Algorithm[];
|
|
112
167
|
}
|
|
113
168
|
interface AlgorithmConfigNonNullableFields {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecom-recommendations-v1-recommendation-recommendations.types.js","sourceRoot":"","sources":["../../../src/ecom-recommendations-v1-recommendation-recommendations.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ecom-recommendations-v1-recommendation-recommendations.types.js","sourceRoot":"","sources":["../../../src/ecom-recommendations-v1-recommendation-recommendations.types.ts"],"names":[],"mappings":";;;AAuHA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,4CAA2B,CAAA;IAC3B,gDAA+B,CAAA;IAC/B,kCAAiB,CAAA;AACnB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB"}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
export interface Recommendation {
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Recommended items.
|
|
4
|
+
* @maxSize 100
|
|
5
|
+
*/
|
|
3
6
|
items?: CatalogReference[];
|
|
4
7
|
/** The algorithm used to provide the recommendation. */
|
|
5
8
|
algorithm?: Algorithm;
|
|
6
9
|
}
|
|
7
10
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
8
11
|
export interface CatalogReference {
|
|
9
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* ID of the item within the catalog it belongs to.
|
|
14
|
+
* @minLength 1
|
|
15
|
+
* @maxLength 36
|
|
16
|
+
*/
|
|
10
17
|
catalogItemId?: string;
|
|
11
18
|
/**
|
|
12
19
|
* ID of the app providing the catalog.
|
|
@@ -17,29 +24,38 @@ export interface CatalogReference {
|
|
|
17
24
|
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
18
25
|
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
19
26
|
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
27
|
+
* @minLength 1
|
|
20
28
|
*/
|
|
21
29
|
appId?: string;
|
|
22
30
|
/**
|
|
23
31
|
* 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.
|
|
24
32
|
*
|
|
25
|
-
* For products and variants from a Wix Stores catalog, learn more about
|
|
33
|
+
* 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)).
|
|
26
34
|
*/
|
|
27
35
|
options?: Record<string, any> | null;
|
|
28
36
|
}
|
|
29
37
|
export interface Algorithm {
|
|
30
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Algorithm ID defined by the app providing the algorithm.
|
|
40
|
+
* @format GUID
|
|
41
|
+
*/
|
|
31
42
|
_id?: string;
|
|
32
43
|
/**
|
|
33
44
|
* App ID of the Wix or 3rd-party app providing the algorithm.
|
|
34
45
|
*
|
|
35
46
|
* 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>.
|
|
47
|
+
* @minLength 1
|
|
48
|
+
* @maxLength 36
|
|
36
49
|
*/
|
|
37
50
|
appId?: string;
|
|
38
51
|
}
|
|
39
52
|
export interface ListAvailableAlgorithmsRequest {
|
|
40
53
|
}
|
|
41
54
|
export interface ListAvailableAlgorithmsResponse {
|
|
42
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Algorithms available for use on your Wix site or project. See the method description for more information.
|
|
57
|
+
* @maxSize 500
|
|
58
|
+
*/
|
|
43
59
|
availableAlgorithms?: AlgorithmInfo[];
|
|
44
60
|
}
|
|
45
61
|
export interface AlgorithmInfo {
|
|
@@ -49,21 +65,39 @@ export interface AlgorithmInfo {
|
|
|
49
65
|
* The app ID of the application providing the algorithm.
|
|
50
66
|
*
|
|
51
67
|
* 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>.
|
|
68
|
+
* @minLength 1
|
|
69
|
+
* @maxLength 36
|
|
52
70
|
*/
|
|
53
71
|
appId?: string;
|
|
54
72
|
/**
|
|
55
73
|
* App IDs of catalogs to which the algorithm can be applied.
|
|
56
74
|
*
|
|
57
75
|
* 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>.
|
|
76
|
+
* @minSize 1
|
|
77
|
+
* @maxSize 100
|
|
78
|
+
* @minLength 1
|
|
79
|
+
* @maxLength 36
|
|
58
80
|
*/
|
|
59
81
|
catalogAppIds?: string[];
|
|
60
82
|
}
|
|
61
83
|
export interface AlgorithmConfig {
|
|
62
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Algorithm name. This value is not translatable.
|
|
86
|
+
* @minLength 1
|
|
87
|
+
* @maxLength 50
|
|
88
|
+
*/
|
|
63
89
|
name?: string;
|
|
64
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* 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.
|
|
92
|
+
* @minLength 1
|
|
93
|
+
* @maxLength 500
|
|
94
|
+
*/
|
|
65
95
|
description?: string;
|
|
66
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* 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.
|
|
98
|
+
* @minLength 1
|
|
99
|
+
* @maxLength 300
|
|
100
|
+
*/
|
|
67
101
|
additionalInfo?: string | null;
|
|
68
102
|
/**
|
|
69
103
|
* Algorithms may have the following types:
|
|
@@ -71,7 +105,10 @@ export interface AlgorithmConfig {
|
|
|
71
105
|
* * `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.
|
|
72
106
|
*/
|
|
73
107
|
algorithmType?: AlgorithmType;
|
|
74
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* 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.
|
|
110
|
+
* @format GUID
|
|
111
|
+
*/
|
|
75
112
|
algorithmId?: string;
|
|
76
113
|
}
|
|
77
114
|
export declare enum AlgorithmType {
|
|
@@ -80,19 +117,25 @@ export declare enum AlgorithmType {
|
|
|
80
117
|
GLOBAL = "GLOBAL"
|
|
81
118
|
}
|
|
82
119
|
export interface GetRecommendationRequest {
|
|
83
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`.
|
|
122
|
+
* @maxSize 300
|
|
123
|
+
*/
|
|
84
124
|
items?: CatalogReference[];
|
|
85
125
|
/**
|
|
86
126
|
* A list of algorithms checked in a specific order determined by their `appID` and their position in the `algorithms` array.
|
|
87
127
|
* See the method description for more information.
|
|
88
128
|
*
|
|
89
129
|
* If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned.
|
|
130
|
+
* @minSize 1
|
|
131
|
+
* @maxSize 10
|
|
90
132
|
*/
|
|
91
133
|
algorithms: Algorithm[];
|
|
92
134
|
/**
|
|
93
135
|
* The minimum number of items that must be recommended by the algorithm for those items to be returned in the response.
|
|
94
136
|
*
|
|
95
137
|
* Max: `100`
|
|
138
|
+
* @max 100
|
|
96
139
|
*/
|
|
97
140
|
minimumRecommendedItems?: number;
|
|
98
141
|
}
|
|
@@ -101,13 +144,25 @@ export interface GetRecommendationResponse {
|
|
|
101
144
|
recommendation?: Recommendation;
|
|
102
145
|
}
|
|
103
146
|
export interface ItemAppIdNotSupportedByProvider {
|
|
104
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* Items with an App ID not supported by the provider. Supported App IDs can be found in the provider config in the Dev Center.
|
|
149
|
+
* @minSize 1
|
|
150
|
+
* @maxSize 300
|
|
151
|
+
*/
|
|
105
152
|
items?: CatalogReference[];
|
|
106
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* Algorithms that don't support the requested items.
|
|
155
|
+
* @minSize 1
|
|
156
|
+
* @maxSize 10
|
|
157
|
+
*/
|
|
107
158
|
algorithms?: Algorithm[];
|
|
108
159
|
}
|
|
109
160
|
export interface RecommendationAlgorithmNotSupported {
|
|
110
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* Algorithms not supported by the provider.
|
|
163
|
+
* @minSize 1
|
|
164
|
+
* @maxSize 10
|
|
165
|
+
*/
|
|
111
166
|
unsupportedAlgorithms?: Algorithm[];
|
|
112
167
|
}
|
|
113
168
|
interface AlgorithmConfigNonNullableFields {
|
|
@@ -153,7 +208,6 @@ export interface GetRecommendationResponseNonNullableFields {
|
|
|
153
208
|
*
|
|
154
209
|
* 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).
|
|
155
210
|
* @public
|
|
156
|
-
* @documentationMaturity preview
|
|
157
211
|
* @permissionId RECOMMENDATIONS.READ
|
|
158
212
|
* @permissionScope Manage Stores - all permissions
|
|
159
213
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -190,7 +244,6 @@ export declare function listAvailableAlgorithms(): Promise<ListAvailableAlgorith
|
|
|
190
244
|
*
|
|
191
245
|
* If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned.
|
|
192
246
|
* @public
|
|
193
|
-
* @documentationMaturity preview
|
|
194
247
|
* @requiredField algorithms
|
|
195
248
|
* @requiredField algorithms._id
|
|
196
249
|
* @requiredField algorithms.appId
|
|
@@ -210,12 +263,16 @@ export declare function listAvailableAlgorithms(): Promise<ListAvailableAlgorith
|
|
|
210
263
|
*/
|
|
211
264
|
export declare function getRecommendation(algorithms: Algorithm[], options?: GetRecommendationOptions): Promise<GetRecommendationResponse & GetRecommendationResponseNonNullableFields>;
|
|
212
265
|
export interface GetRecommendationOptions {
|
|
213
|
-
/**
|
|
266
|
+
/**
|
|
267
|
+
* The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`.
|
|
268
|
+
* @maxSize 300
|
|
269
|
+
*/
|
|
214
270
|
items?: CatalogReference[];
|
|
215
271
|
/**
|
|
216
272
|
* The minimum number of items that must be recommended by the algorithm for those items to be returned in the response.
|
|
217
273
|
*
|
|
218
274
|
* Max: `100`
|
|
275
|
+
* @max 100
|
|
219
276
|
*/
|
|
220
277
|
minimumRecommendedItems?: number;
|
|
221
278
|
}
|
|
@@ -47,7 +47,6 @@ var AlgorithmType;
|
|
|
47
47
|
*
|
|
48
48
|
* 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).
|
|
49
49
|
* @public
|
|
50
|
-
* @documentationMaturity preview
|
|
51
50
|
* @permissionId RECOMMENDATIONS.READ
|
|
52
51
|
* @permissionScope Manage Stores - all permissions
|
|
53
52
|
* @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
|
|
@@ -105,7 +104,6 @@ exports.listAvailableAlgorithms = listAvailableAlgorithms;
|
|
|
105
104
|
*
|
|
106
105
|
* If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned.
|
|
107
106
|
* @public
|
|
108
|
-
* @documentationMaturity preview
|
|
109
107
|
* @requiredField algorithms
|
|
110
108
|
* @requiredField algorithms._id
|
|
111
109
|
* @requiredField algorithms.appId
|
package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecom-recommendations-v1-recommendation-recommendations.universal.js","sourceRoot":"","sources":["../../../src/ecom-recommendations-v1-recommendation-recommendations.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuF;AACvF,oFAGiD;AAEjD,mJAAqI;
|
|
1
|
+
{"version":3,"file":"ecom-recommendations-v1-recommendation-recommendations.universal.js","sourceRoot":"","sources":["../../../src/ecom-recommendations-v1-recommendation-recommendations.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAuF;AACvF,oFAGiD;AAEjD,mJAAqI;AAyHrI,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,4CAA2B,CAAA;IAC3B,gDAA+B,CAAA;IAC/B,kCAAiB,CAAA;AACnB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AA2FD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACI,KAAK,UAAU,uBAAuB;IAI3C,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC,EAAE,CAAC,CAAC;IAE1D,MAAM,OAAO,GACX,gDAAgD,CAAC,uBAAuB,CACtE,OAAO,CACR,CAAC;IAEJ,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;QAEjC,OAAO,IAAA,gEAAuC,EAAC,MAAM,CAAC,IAAI,CAAE,CAAC;IAC/D,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE,EAAE;YAC5B,uBAAuB,EAAE,KAAK;SAC/B,EACD,EAAE,CACH,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AArCD,0DAqCC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACI,KAAK,UAAU,iBAAiB,CACrC,UAAuB,EACvB,OAAkC;IAIlC,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,8DAAqC,EAAC;QACpD,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,OAAO,EAAE,KAAK;QACrB,uBAAuB,EAAE,OAAO,EAAE,uBAAuB;KAC1D,CAAC,CAAC;IAEH,MAAM,OAAO,GACX,gDAAgD,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAE9E,WAAW,EAAE,UAAU,EAAE,EAAE,CAAC;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjD,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;QAEjC,OAAO,IAAA,gEAAuC,EAAC,MAAM,CAAC,IAAI,CAAE,CAAC;IAC/D,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,IAAA,gCAAiB,EACxC,GAAG,EACH;YACE,sBAAsB,EAAE,EAAE;YAC1B,wBAAwB,EAAE;gBACxB,UAAU,EAAE,MAAM;gBAClB,KAAK,EAAE,YAAY;gBACnB,uBAAuB,EAAE,8BAA8B;aACxD;YACD,uBAAuB,EAAE,KAAK;SAC/B,EACD,CAAC,YAAY,EAAE,SAAS,CAAC,CAC1B,CAAC;QACF,WAAW,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;QAE5B,MAAM,gBAAgB,CAAC;IACzB,CAAC;AACH,CAAC;AA7CD,8CA6CC"}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
export interface Recommendation {
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Recommended items.
|
|
4
|
+
* @maxSize 100
|
|
5
|
+
*/
|
|
3
6
|
items?: CatalogReference[];
|
|
4
7
|
/** The algorithm used to provide the recommendation. */
|
|
5
8
|
algorithm?: Algorithm;
|
|
6
9
|
}
|
|
7
10
|
/** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
|
|
8
11
|
export interface CatalogReference {
|
|
9
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* ID of the item within the catalog it belongs to.
|
|
14
|
+
* @minLength 1
|
|
15
|
+
* @maxLength 36
|
|
16
|
+
*/
|
|
10
17
|
catalogItemId?: string;
|
|
11
18
|
/**
|
|
12
19
|
* ID of the app providing the catalog.
|
|
@@ -17,29 +24,38 @@ export interface CatalogReference {
|
|
|
17
24
|
* + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
|
|
18
25
|
* + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
19
26
|
* + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
|
|
27
|
+
* @minLength 1
|
|
20
28
|
*/
|
|
21
29
|
appId?: string;
|
|
22
30
|
/**
|
|
23
31
|
* 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.
|
|
24
32
|
*
|
|
25
|
-
* For products and variants from a Wix Stores catalog, learn more about
|
|
33
|
+
* 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)).
|
|
26
34
|
*/
|
|
27
35
|
options?: Record<string, any> | null;
|
|
28
36
|
}
|
|
29
37
|
export interface Algorithm {
|
|
30
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Algorithm ID defined by the app providing the algorithm.
|
|
40
|
+
* @format GUID
|
|
41
|
+
*/
|
|
31
42
|
id?: string;
|
|
32
43
|
/**
|
|
33
44
|
* App ID of the Wix or 3rd-party app providing the algorithm.
|
|
34
45
|
*
|
|
35
46
|
* 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>.
|
|
47
|
+
* @minLength 1
|
|
48
|
+
* @maxLength 36
|
|
36
49
|
*/
|
|
37
50
|
appId?: string;
|
|
38
51
|
}
|
|
39
52
|
export interface ListAvailableAlgorithmsRequest {
|
|
40
53
|
}
|
|
41
54
|
export interface ListAvailableAlgorithmsResponse {
|
|
42
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Algorithms available for use on your Wix site or project. See the method description for more information.
|
|
57
|
+
* @maxSize 500
|
|
58
|
+
*/
|
|
43
59
|
availableAlgorithms?: AlgorithmInfo[];
|
|
44
60
|
}
|
|
45
61
|
export interface AlgorithmInfo {
|
|
@@ -49,21 +65,39 @@ export interface AlgorithmInfo {
|
|
|
49
65
|
* The app ID of the application providing the algorithm.
|
|
50
66
|
*
|
|
51
67
|
* 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>.
|
|
68
|
+
* @minLength 1
|
|
69
|
+
* @maxLength 36
|
|
52
70
|
*/
|
|
53
71
|
appId?: string;
|
|
54
72
|
/**
|
|
55
73
|
* App IDs of catalogs to which the algorithm can be applied.
|
|
56
74
|
*
|
|
57
75
|
* 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>.
|
|
76
|
+
* @minSize 1
|
|
77
|
+
* @maxSize 100
|
|
78
|
+
* @minLength 1
|
|
79
|
+
* @maxLength 36
|
|
58
80
|
*/
|
|
59
81
|
catalogAppIds?: string[];
|
|
60
82
|
}
|
|
61
83
|
export interface AlgorithmConfig {
|
|
62
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Algorithm name. This value is not translatable.
|
|
86
|
+
* @minLength 1
|
|
87
|
+
* @maxLength 50
|
|
88
|
+
*/
|
|
63
89
|
name?: string;
|
|
64
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* 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.
|
|
92
|
+
* @minLength 1
|
|
93
|
+
* @maxLength 500
|
|
94
|
+
*/
|
|
65
95
|
description?: string;
|
|
66
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* 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.
|
|
98
|
+
* @minLength 1
|
|
99
|
+
* @maxLength 300
|
|
100
|
+
*/
|
|
67
101
|
additionalInfo?: string | null;
|
|
68
102
|
/**
|
|
69
103
|
* Algorithms may have the following types:
|
|
@@ -71,7 +105,10 @@ export interface AlgorithmConfig {
|
|
|
71
105
|
* * `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.
|
|
72
106
|
*/
|
|
73
107
|
algorithmType?: AlgorithmType;
|
|
74
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* 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.
|
|
110
|
+
* @format GUID
|
|
111
|
+
*/
|
|
75
112
|
algorithmId?: string;
|
|
76
113
|
}
|
|
77
114
|
export declare enum AlgorithmType {
|
|
@@ -80,19 +117,25 @@ export declare enum AlgorithmType {
|
|
|
80
117
|
GLOBAL = "GLOBAL"
|
|
81
118
|
}
|
|
82
119
|
export interface GetRecommendationRequest {
|
|
83
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`.
|
|
122
|
+
* @maxSize 300
|
|
123
|
+
*/
|
|
84
124
|
items?: CatalogReference[];
|
|
85
125
|
/**
|
|
86
126
|
* A list of algorithms checked in a specific order determined by their `appID` and their position in the `algorithms` array.
|
|
87
127
|
* See the method description for more information.
|
|
88
128
|
*
|
|
89
129
|
* If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned.
|
|
130
|
+
* @minSize 1
|
|
131
|
+
* @maxSize 10
|
|
90
132
|
*/
|
|
91
133
|
algorithms: Algorithm[];
|
|
92
134
|
/**
|
|
93
135
|
* The minimum number of items that must be recommended by the algorithm for those items to be returned in the response.
|
|
94
136
|
*
|
|
95
137
|
* Max: `100`
|
|
138
|
+
* @max 100
|
|
96
139
|
*/
|
|
97
140
|
minimumRecommendedItems?: number;
|
|
98
141
|
}
|
|
@@ -101,13 +144,25 @@ export interface GetRecommendationResponse {
|
|
|
101
144
|
recommendation?: Recommendation;
|
|
102
145
|
}
|
|
103
146
|
export interface ItemAppIdNotSupportedByProvider {
|
|
104
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* Items with an App ID not supported by the provider. Supported App IDs can be found in the provider config in the Dev Center.
|
|
149
|
+
* @minSize 1
|
|
150
|
+
* @maxSize 300
|
|
151
|
+
*/
|
|
105
152
|
items?: CatalogReference[];
|
|
106
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* Algorithms that don't support the requested items.
|
|
155
|
+
* @minSize 1
|
|
156
|
+
* @maxSize 10
|
|
157
|
+
*/
|
|
107
158
|
algorithms?: Algorithm[];
|
|
108
159
|
}
|
|
109
160
|
export interface RecommendationAlgorithmNotSupported {
|
|
110
|
-
/**
|
|
161
|
+
/**
|
|
162
|
+
* Algorithms not supported by the provider.
|
|
163
|
+
* @minSize 1
|
|
164
|
+
* @maxSize 10
|
|
165
|
+
*/
|
|
111
166
|
unsupportedAlgorithms?: Algorithm[];
|
|
112
167
|
}
|
|
113
168
|
interface AlgorithmConfigNonNullableFields {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecom-recommendations-v1-recommendation-recommendations.types.js","sourceRoot":"","sources":["../../../src/ecom-recommendations-v1-recommendation-recommendations.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ecom-recommendations-v1-recommendation-recommendations.types.js","sourceRoot":"","sources":["../../../src/ecom-recommendations-v1-recommendation-recommendations.types.ts"],"names":[],"mappings":"AAuHA,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,4CAA2B,CAAA;IAC3B,gDAA+B,CAAA;IAC/B,kCAAiB,CAAA;AACnB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB"}
|