@wix/auto_sdk_ecom_recommendations 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.d.ts +6 -0
  11. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.js +10 -0
  12. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.js.map +1 -0
  13. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.d.ts +37 -0
  14. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.js +94 -0
  15. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.js.map +1 -0
  16. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.d.ts +14 -0
  17. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.js +66 -0
  18. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.js.map +1 -0
  19. package/build/{internal/index.d.ts → cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.d.ts} +8 -11
  20. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.js +20 -0
  21. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.js.map +1 -0
  22. package/build/{ecom-recommendations-v1-recommendation-recommendations.universal-DXecA95A.d.mts → cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts} +13 -29
  23. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.js +10 -0
  24. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +1 -0
  25. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +258 -0
  26. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +158 -0
  27. package/build/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.context.d.ts +6 -0
  39. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.context.js +6 -0
  40. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.context.js.map +1 -0
  41. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.http.d.ts +37 -0
  42. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.http.js +89 -0
  43. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.http.js.map +1 -0
  44. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.d.ts +14 -0
  45. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.js +38 -0
  46. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.js.map +1 -0
  47. package/build/{index.d.ts → es/src/ecom-recommendations-v1-recommendation-recommendations.public.d.ts} +8 -11
  48. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.public.js +14 -0
  49. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.public.js.map +1 -0
  50. package/build/{ecom-recommendations-v1-recommendation-recommendations.universal-DXecA95A.d.ts → es/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts} +13 -29
  51. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.types.js +7 -0
  52. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +1 -0
  53. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +258 -0
  54. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +130 -0
  55. package/build/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.d.ts +6 -0
  66. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.js +10 -0
  67. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.context.js.map +1 -0
  68. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.d.ts +37 -0
  69. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.js +94 -0
  70. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.http.js.map +1 -0
  71. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.d.ts +14 -0
  72. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.js +66 -0
  73. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.meta.js.map +1 -0
  74. package/build/internal/{index.d.mts → cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.d.ts} +8 -11
  75. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.js +20 -0
  76. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.public.js.map +1 -0
  77. package/build/internal/{ecom-recommendations-v1-recommendation-recommendations.universal-DXecA95A.d.mts → cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts} +13 -29
  78. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.js +10 -0
  79. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +1 -0
  80. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +258 -0
  81. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +158 -0
  82. package/build/internal/cjs/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.context.d.ts +6 -0
  93. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.context.js +6 -0
  94. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.context.js.map +1 -0
  95. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.http.d.ts +37 -0
  96. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.http.js +89 -0
  97. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.http.js.map +1 -0
  98. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.d.ts +14 -0
  99. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.js +38 -0
  100. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.meta.js.map +1 -0
  101. package/build/{index.d.mts → internal/es/src/ecom-recommendations-v1-recommendation-recommendations.public.d.ts} +8 -11
  102. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.public.js +14 -0
  103. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.public.js.map +1 -0
  104. package/build/internal/{ecom-recommendations-v1-recommendation-recommendations.universal-DXecA95A.d.ts → es/src/ecom-recommendations-v1-recommendation-recommendations.types.d.ts} +13 -29
  105. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.types.js +7 -0
  106. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.types.js.map +1 -0
  107. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.d.ts +258 -0
  108. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js +130 -0
  109. package/build/internal/es/src/ecom-recommendations-v1-recommendation-recommendations.universal.js.map +1 -0
  110. package/package.json +11 -12
  111. package/build/index.js +0 -179
  112. package/build/index.js.map +0 -1
  113. package/build/index.mjs +0 -153
  114. package/build/index.mjs.map +0 -1
  115. package/build/internal/index.js +0 -179
  116. package/build/internal/index.js.map +0 -1
  117. package/build/internal/index.mjs +0 -153
  118. package/build/internal/index.mjs.map +0 -1
  119. package/build/internal/meta.d.mts +0 -162
  120. package/build/internal/meta.d.ts +0 -162
  121. package/build/internal/meta.js +0 -128
  122. package/build/internal/meta.js.map +0 -1
  123. package/build/internal/meta.mjs +0 -100
  124. package/build/internal/meta.mjs.map +0 -1
  125. package/build/meta.d.mts +0 -162
  126. package/build/meta.d.ts +0 -162
  127. package/build/meta.js +0 -128
  128. package/build/meta.js.map +0 -1
  129. package/build/meta.mjs +0 -100
  130. package/build/meta.mjs.map +0 -1
@@ -0,0 +1,38 @@
1
+ import * as ambassadorWixEcomRecommendationsV1Recommendation from './ecom-recommendations-v1-recommendation-recommendations.http.js';
2
+ export function listAvailableAlgorithms() {
3
+ const payload = {};
4
+ const getRequestOptions = ambassadorWixEcomRecommendationsV1Recommendation.listAvailableAlgorithms(payload);
5
+ const getUrl = (context) => {
6
+ const { url } = getRequestOptions(context);
7
+ return url;
8
+ };
9
+ return {
10
+ getUrl,
11
+ httpMethod: 'GET',
12
+ path: '/v1/recommendations/algorithms',
13
+ pathParams: {},
14
+ __requestType: null,
15
+ __originalRequestType: null,
16
+ __responseType: null,
17
+ __originalResponseType: null,
18
+ };
19
+ }
20
+ export function getRecommendation() {
21
+ const payload = {};
22
+ const getRequestOptions = ambassadorWixEcomRecommendationsV1Recommendation.getRecommendation(payload);
23
+ const getUrl = (context) => {
24
+ const { url } = getRequestOptions(context);
25
+ return url;
26
+ };
27
+ return {
28
+ getUrl,
29
+ httpMethod: 'POST',
30
+ path: '/v1/recommendations/get',
31
+ pathParams: {},
32
+ __requestType: null,
33
+ __originalRequestType: null,
34
+ __responseType: null,
35
+ __originalResponseType: null,
36
+ };
37
+ }
38
+ //# sourceMappingURL=ecom-recommendations-v1-recommendation-recommendations.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ecom-recommendations-v1-recommendation-recommendations.meta.js","sourceRoot":"","sources":["../../../../src/ecom-recommendations-v1-recommendation-recommendations.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,gDAAgD,MAAM,kEAAkE,CAAC;AAsBrI,MAAM,UAAU,uBAAuB;IAQrC,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,gDAAgD,CAAC,uBAAuB,CACtE,OAAO,CACR,CAAC;IAEJ,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,gCAAgC;QACtC,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB;IAQ/B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,gDAAgD,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAE9E,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,yBAAyB;QAC/B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
@@ -1,8 +1,9 @@
1
- import { HttpClient, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { L as ListAvailableAlgorithmsResponse, A as Algorithm, G as GetRecommendationOptions, a as GetRecommendationResponse } from './ecom-recommendations-v1-recommendation-recommendations.universal-DXecA95A.mjs';
3
- export { e as AlgorithmConfig, d as AlgorithmInfo, b as AlgorithmType, C as CatalogReference, f as GetRecommendationRequest, I as ItemAppIdNotSupportedByProvider, c as ListAvailableAlgorithmsRequest, R as Recommendation, g as RecommendationAlgorithmNotSupported } from './ecom-recommendations-v1-recommendation-recommendations.universal-DXecA95A.mjs';
4
-
5
- declare function listAvailableAlgorithms$1(httpClient: HttpClient): ListAvailableAlgorithmsSignature;
1
+ import { HttpClient } from '@wix/sdk-types';
2
+ import { Algorithm, GetRecommendationOptions, GetRecommendationResponse, ListAvailableAlgorithmsResponse } from './ecom-recommendations-v1-recommendation-recommendations.universal.js';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function listAvailableAlgorithms(httpClient: HttpClient): ListAvailableAlgorithmsSignature;
6
7
  interface ListAvailableAlgorithmsSignature {
7
8
  /**
8
9
  * Returns a list of recommendation algorithms that can be used on your Wix site or project. These algorithms can be used with [`getRecommendation()`](#getRecommendation) to provide item recommendations to the customer.
@@ -20,7 +21,7 @@ interface ListAvailableAlgorithmsSignature {
20
21
  */
21
22
  (): Promise<ListAvailableAlgorithmsResponse>;
22
23
  }
23
- declare function getRecommendation$1(httpClient: HttpClient): GetRecommendationSignature;
24
+ export declare function getRecommendation(httpClient: HttpClient): GetRecommendationSignature;
24
25
  interface GetRecommendationSignature {
25
26
  /**
26
27
  * Returns a recommendation object containing a list of items to recommend to the customer.
@@ -49,8 +50,4 @@ interface GetRecommendationSignature {
49
50
  */
50
51
  (algorithms: Algorithm[], options?: GetRecommendationOptions | undefined): Promise<GetRecommendationResponse>;
51
52
  }
52
-
53
- declare const listAvailableAlgorithms: MaybeContext<BuildRESTFunction<typeof listAvailableAlgorithms$1> & typeof listAvailableAlgorithms$1>;
54
- declare const getRecommendation: MaybeContext<BuildRESTFunction<typeof getRecommendation$1> & typeof getRecommendation$1>;
55
-
56
- export { Algorithm, GetRecommendationOptions, GetRecommendationResponse, ListAvailableAlgorithmsResponse, getRecommendation, listAvailableAlgorithms };
53
+ export { Algorithm, AlgorithmConfig, AlgorithmInfo, AlgorithmType, CatalogReference, GetRecommendationOptions, GetRecommendationRequest, GetRecommendationResponse, ItemAppIdNotSupportedByProvider, ListAvailableAlgorithmsRequest, ListAvailableAlgorithmsResponse, Recommendation, RecommendationAlgorithmNotSupported, } from './ecom-recommendations-v1-recommendation-recommendations.universal.js';
@@ -0,0 +1,14 @@
1
+ import { getRecommendation as universalGetRecommendation, listAvailableAlgorithms as universalListAvailableAlgorithms, } from './ecom-recommendations-v1-recommendation-recommendations.universal.js';
2
+ export const __metadata = { PACKAGE_NAME: '@wix/ecom' };
3
+ export function listAvailableAlgorithms(httpClient) {
4
+ return () => universalListAvailableAlgorithms(
5
+ // @ts-ignore
6
+ { httpClient });
7
+ }
8
+ export function getRecommendation(httpClient) {
9
+ return (algorithms, options) => universalGetRecommendation(algorithms, options,
10
+ // @ts-ignore
11
+ { httpClient });
12
+ }
13
+ export { AlgorithmType, } from './ecom-recommendations-v1-recommendation-recommendations.universal.js';
14
+ //# sourceMappingURL=ecom-recommendations-v1-recommendation-recommendations.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ecom-recommendations-v1-recommendation-recommendations.public.js","sourceRoot":"","sources":["../../../../src/ecom-recommendations-v1-recommendation-recommendations.public.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,iBAAiB,IAAI,0BAA0B,EAC/C,uBAAuB,IAAI,gCAAgC,GAC5D,MAAM,uEAAuE,CAAC;AAE/E,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC;AAExD,MAAM,UAAU,uBAAuB,CACrC,UAAsB;IAEtB,OAAO,GAAG,EAAE,CACV,gCAAgC;IAC9B,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAoBD,MAAM,UAAU,iBAAiB,CAC/B,UAAsB;IAEtB,OAAO,CACL,UAA0D,EAC1D,OAGC,EACD,EAAE,CACF,0BAA0B,CACxB,UAAU,EACV,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAkCD,OAAO,EAIL,aAAa,GAUd,MAAM,uEAAuE,CAAC"}
@@ -1,4 +1,4 @@
1
- interface Recommendation {
1
+ export interface Recommendation {
2
2
  /**
3
3
  * Recommended items.
4
4
  * @maxSize 100
@@ -8,7 +8,7 @@ interface Recommendation {
8
8
  algorithm?: Algorithm;
9
9
  }
10
10
  /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
11
- interface CatalogReference {
11
+ export interface CatalogReference {
12
12
  /**
13
13
  * ID of the item within the catalog it belongs to.
14
14
  * @minLength 1
@@ -34,12 +34,12 @@ interface CatalogReference {
34
34
  */
35
35
  options?: Record<string, any> | null;
36
36
  }
37
- interface Algorithm {
37
+ export interface Algorithm {
38
38
  /**
39
39
  * Algorithm ID defined by the app providing the algorithm.
40
40
  * @format GUID
41
41
  */
42
- _id?: string;
42
+ id?: string;
43
43
  /**
44
44
  * App ID of the Wix or 3rd-party app providing the algorithm.
45
45
  *
@@ -49,16 +49,16 @@ interface Algorithm {
49
49
  */
50
50
  appId?: string;
51
51
  }
52
- interface ListAvailableAlgorithmsRequest {
52
+ export interface ListAvailableAlgorithmsRequest {
53
53
  }
54
- interface ListAvailableAlgorithmsResponse {
54
+ export interface ListAvailableAlgorithmsResponse {
55
55
  /**
56
56
  * Algorithms available for use on your Wix site or project. See the method description for more information.
57
57
  * @maxSize 500
58
58
  */
59
59
  availableAlgorithms?: AlgorithmInfo[];
60
60
  }
61
- interface AlgorithmInfo {
61
+ export interface AlgorithmInfo {
62
62
  /** How the algorithm is configured. */
63
63
  config?: AlgorithmConfig;
64
64
  /**
@@ -80,7 +80,7 @@ interface AlgorithmInfo {
80
80
  */
81
81
  catalogAppIds?: string[];
82
82
  }
83
- interface AlgorithmConfig {
83
+ export interface AlgorithmConfig {
84
84
  /**
85
85
  * Algorithm name. This value is not translatable.
86
86
  * @minLength 1
@@ -111,12 +111,12 @@ interface AlgorithmConfig {
111
111
  */
112
112
  algorithmId?: string;
113
113
  }
114
- declare enum AlgorithmType {
114
+ export declare enum AlgorithmType {
115
115
  UNSPECIFIED = "UNSPECIFIED",
116
116
  RELATED_ITEMS = "RELATED_ITEMS",
117
117
  GLOBAL = "GLOBAL"
118
118
  }
119
- interface GetRecommendationRequest {
119
+ export interface GetRecommendationRequest {
120
120
  /**
121
121
  * The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`.
122
122
  * @maxSize 300
@@ -139,11 +139,11 @@ interface GetRecommendationRequest {
139
139
  */
140
140
  minimumRecommendedItems?: number;
141
141
  }
142
- interface GetRecommendationResponse {
142
+ export interface GetRecommendationResponse {
143
143
  /** An object containing a list of items recommended by 1 of the specified algorithms. The recommendation is empty if none of the specified algorithms recommended enough items. */
144
144
  recommendation?: Recommendation;
145
145
  }
146
- interface ItemAppIdNotSupportedByProvider {
146
+ export interface ItemAppIdNotSupportedByProvider {
147
147
  /**
148
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
149
  * @minSize 1
@@ -157,7 +157,7 @@ interface ItemAppIdNotSupportedByProvider {
157
157
  */
158
158
  algorithms?: Algorithm[];
159
159
  }
160
- interface RecommendationAlgorithmNotSupported {
160
+ export interface RecommendationAlgorithmNotSupported {
161
161
  /**
162
162
  * Algorithms not supported by the provider.
163
163
  * @minSize 1
@@ -165,19 +165,3 @@ interface RecommendationAlgorithmNotSupported {
165
165
  */
166
166
  unsupportedAlgorithms?: Algorithm[];
167
167
  }
168
- interface GetRecommendationOptions {
169
- /**
170
- * The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`.
171
- * @maxSize 300
172
- */
173
- items?: CatalogReference[];
174
- /**
175
- * The minimum number of items that must be recommended by the algorithm for those items to be returned in the response.
176
- *
177
- * Max: `100`
178
- * @max 100
179
- */
180
- minimumRecommendedItems?: number;
181
- }
182
-
183
- export { type Algorithm as A, type CatalogReference as C, type GetRecommendationOptions as G, type ItemAppIdNotSupportedByProvider as I, type ListAvailableAlgorithmsResponse as L, type Recommendation as R, type GetRecommendationResponse as a, AlgorithmType as b, type ListAvailableAlgorithmsRequest as c, type AlgorithmInfo as d, type AlgorithmConfig as e, type GetRecommendationRequest as f, type RecommendationAlgorithmNotSupported as g };
@@ -0,0 +1,7 @@
1
+ export var AlgorithmType;
2
+ (function (AlgorithmType) {
3
+ AlgorithmType["UNSPECIFIED"] = "UNSPECIFIED";
4
+ AlgorithmType["RELATED_ITEMS"] = "RELATED_ITEMS";
5
+ AlgorithmType["GLOBAL"] = "GLOBAL";
6
+ })(AlgorithmType || (AlgorithmType = {}));
7
+ //# sourceMappingURL=ecom-recommendations-v1-recommendation-recommendations.types.js.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,258 @@
1
+ import { NonNullablePaths } from '@wix/sdk-types';
2
+ export interface Recommendation {
3
+ /**
4
+ * Recommended items.
5
+ * @maxSize 100
6
+ */
7
+ items?: CatalogReference[];
8
+ /** The algorithm used to provide the recommendation. */
9
+ algorithm?: Algorithm;
10
+ }
11
+ /** Used for grouping line items. Sent when an item is added to a cart, checkout, or order. */
12
+ export interface CatalogReference {
13
+ /**
14
+ * ID of the item within the catalog it belongs to.
15
+ * @minLength 1
16
+ * @maxLength 36
17
+ */
18
+ catalogItemId?: string;
19
+ /**
20
+ * ID of the app providing the catalog.
21
+ *
22
+ * You can get your app's ID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/).
23
+ *
24
+ * For items from Wix catalogs, the following values always apply:
25
+ * + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"`
26
+ * + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
27
+ * + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"`
28
+ * @minLength 1
29
+ */
30
+ appId?: string;
31
+ /**
32
+ * 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.
33
+ *
34
+ * 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)).
35
+ */
36
+ options?: Record<string, any> | null;
37
+ }
38
+ export interface Algorithm {
39
+ /**
40
+ * Algorithm ID defined by the app providing the algorithm.
41
+ * @format GUID
42
+ */
43
+ _id?: string;
44
+ /**
45
+ * App ID of the Wix or 3rd-party app providing the algorithm.
46
+ *
47
+ * 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>.
48
+ * @minLength 1
49
+ * @maxLength 36
50
+ */
51
+ appId?: string;
52
+ }
53
+ export interface ListAvailableAlgorithmsRequest {
54
+ }
55
+ export interface ListAvailableAlgorithmsResponse {
56
+ /**
57
+ * Algorithms available for use on your Wix site or project. See the method description for more information.
58
+ * @maxSize 500
59
+ */
60
+ availableAlgorithms?: AlgorithmInfo[];
61
+ }
62
+ export interface AlgorithmInfo {
63
+ /** How the algorithm is configured. */
64
+ config?: AlgorithmConfig;
65
+ /**
66
+ * The app ID of the application providing the algorithm.
67
+ *
68
+ * 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>.
69
+ * @minLength 1
70
+ * @maxLength 36
71
+ */
72
+ appId?: string;
73
+ /**
74
+ * App IDs of catalogs to which the algorithm can be applied.
75
+ *
76
+ * 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>.
77
+ * @minSize 1
78
+ * @maxSize 100
79
+ * @minLength 1
80
+ * @maxLength 36
81
+ */
82
+ catalogAppIds?: string[];
83
+ }
84
+ export interface AlgorithmConfig {
85
+ /**
86
+ * Algorithm name. This value is not translatable.
87
+ * @minLength 1
88
+ * @maxLength 50
89
+ */
90
+ name?: string;
91
+ /**
92
+ * 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.
93
+ * @minLength 1
94
+ * @maxLength 500
95
+ */
96
+ description?: string;
97
+ /**
98
+ * 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.
99
+ * @minLength 1
100
+ * @maxLength 300
101
+ */
102
+ additionalInfo?: string | null;
103
+ /**
104
+ * Algorithms may have the following types:
105
+ * * `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.
106
+ * * `GLOBAL` - This type of algorithm provides general recommendations based on site or project statistics. For example, bestsellers or new arrivals.
107
+ */
108
+ algorithmType?: AlgorithmType;
109
+ /**
110
+ * 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.
111
+ * @format GUID
112
+ */
113
+ algorithmId?: string;
114
+ }
115
+ export declare enum AlgorithmType {
116
+ UNSPECIFIED = "UNSPECIFIED",
117
+ RELATED_ITEMS = "RELATED_ITEMS",
118
+ GLOBAL = "GLOBAL"
119
+ }
120
+ export interface GetRecommendationRequest {
121
+ /**
122
+ * The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`.
123
+ * @maxSize 300
124
+ */
125
+ items?: CatalogReference[];
126
+ /**
127
+ * A list of algorithms checked in a specific order determined by their `appID` and their position in the `algorithms` array.
128
+ * See the method description for more information.
129
+ *
130
+ * If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned.
131
+ * @minSize 1
132
+ * @maxSize 10
133
+ */
134
+ algorithms: Algorithm[];
135
+ /**
136
+ * The minimum number of items that must be recommended by the algorithm for those items to be returned in the response.
137
+ *
138
+ * Max: `100`
139
+ * @max 100
140
+ */
141
+ minimumRecommendedItems?: number;
142
+ }
143
+ export interface GetRecommendationResponse {
144
+ /** An object containing a list of items recommended by 1 of the specified algorithms. The recommendation is empty if none of the specified algorithms recommended enough items. */
145
+ recommendation?: Recommendation;
146
+ }
147
+ export interface ItemAppIdNotSupportedByProvider {
148
+ /**
149
+ * Items with an App ID not supported by the provider. Supported App IDs can be found in the provider config in the Dev Center.
150
+ * @minSize 1
151
+ * @maxSize 300
152
+ */
153
+ items?: CatalogReference[];
154
+ /**
155
+ * Algorithms that don't support the requested items.
156
+ * @minSize 1
157
+ * @maxSize 10
158
+ */
159
+ algorithms?: Algorithm[];
160
+ }
161
+ export interface RecommendationAlgorithmNotSupported {
162
+ /**
163
+ * Algorithms not supported by the provider.
164
+ * @minSize 1
165
+ * @maxSize 10
166
+ */
167
+ unsupportedAlgorithms?: Algorithm[];
168
+ }
169
+ type RecommendationNonNullablePaths = `items` | `items.${number}.catalogItemId` | `items.${number}.appId` | `algorithm._id` | `algorithm.appId`;
170
+ /**
171
+ * Returns a list of recommendation algorithms that can be used on your Wix site or project. These algorithms can be used with [`getRecommendation()`](#getRecommendation) to provide item recommendations to the customer.
172
+ *
173
+ * Algorithms are run by the apps that provide them, and can only be used on catalogs they support. Apps may provide algorithms for use with their own catalogs and/or catalogs from other apps.
174
+ *
175
+ * The app which provides an algorithm is referenced by that algorithm’s `appId`. The apps whose catalogs are supported by an algorithm are referenced by the IDs in that algorithm’s `catalogAppIds` array.
176
+ *
177
+ *
178
+ * For an algorithm to be considered “Available” and returned in this method’s response, the algorithm must meet the following conditions:
179
+ * 1. The algorithm’s `appId` must match the ID of an installed Wix app.
180
+ * 2. At least 1 of the IDs in `catalogAppIds` must match the ID of an installed Wix app.
181
+ *
182
+ * 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).
183
+ * @public
184
+ * @permissionId RECOMMENDATIONS.READ
185
+ * @permissionScope Manage Stores - all permissions
186
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
187
+ * @permissionScope Read eCommerce - all read permissions
188
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
189
+ * @permissionScope Manage eCommerce - all permissions
190
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
191
+ * @permissionScope Picasso private app mega scope
192
+ * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
193
+ * @applicableIdentity APP
194
+ * @applicableIdentity VISITOR
195
+ * @fqn com.wix.ecom.recommendations.v1.RecommendationsService.ListAvailableAlgorithms
196
+ */
197
+ export declare function listAvailableAlgorithms(): Promise<NonNullablePaths<ListAvailableAlgorithmsResponse, `availableAlgorithms` | `availableAlgorithms.${number}.config.name` | `availableAlgorithms.${number}.config.description` | `availableAlgorithms.${number}.config.algorithmType` | `availableAlgorithms.${number}.config.algorithmId` | `availableAlgorithms.${number}.appId` | `availableAlgorithms.${number}.catalogAppIds`>>;
198
+ /**
199
+ * Returns a recommendation object containing a list of items to recommend to the customer.
200
+ *
201
+ * `getRecommendation()` determines which items to recommend based on the given recommendation algorithms.
202
+ *
203
+ * `getRecommendation()` doesn’t run the algorithms. It calls the installed apps that provide them.
204
+ *
205
+ * Apps may provide algorithms for use with their own catalogs, or for use with catalogs from other apps.
206
+ * For example, Wix Stores provides algorithms that can only be used on its own catalogs.
207
+ * To run an algorithm, the app providing it must be installed, and an app providing a supported catalog must be installed.
208
+ * For more information and to see which algorithms are available on your site or project, call [`listAvailableAlgorithms()`](#listavailablealgorithms).
209
+ *
210
+ * `getRecommendation()` operates as follows:
211
+ * 1. `getRecommendation()` receives as input a list of algorithms as an array. These algorithms can be provided by different apps and can apply to different catalogs.
212
+ * 2. `getRecommendation()` calls the app that corresponds to the `appId` of the first algorithm in the list of algorithms. It passes that algorithm’s ID and the IDs of any subsequent algorithms in the array for the same app.
213
+ * 3. The app runs the algorithms.
214
+ * 4. `getRecommendation()` returns items recommendations from the first algorithm (according to its position in the `algorithms` array) that meets the minimum number of recommendations. At that point `getRecommendation()` stops calling other apps.
215
+ * 5. If none of the algorithms run by the first app meet the minimum recommended items, `getRecommendation()` finds the next algorithm in the array with a new `appId` (an ID of an app that has not yet been called), and repeats the process.
216
+ * 6. If no algorithms in the `algorithms` array recommend at least the minimum recommended items, `getRecommendation()` returns an empty array.
217
+ * @param algorithms - A list of algorithms checked in a specific order determined by their `appID` and their position in the `algorithms` array.
218
+ * See the method description for more information.
219
+ *
220
+ * If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned.
221
+ * @public
222
+ * @requiredField algorithms
223
+ * @requiredField algorithms._id
224
+ * @requiredField algorithms.appId
225
+ * @requiredField options.items.appId
226
+ * @requiredField options.items.catalogItemId
227
+ * @param options - Get recommendation options.
228
+ * @permissionId RECOMMENDATIONS.READ
229
+ * @permissionScope Manage Stores - all permissions
230
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
231
+ * @permissionScope Read eCommerce - all read permissions
232
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
233
+ * @permissionScope Manage eCommerce - all permissions
234
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
235
+ * @permissionScope Picasso private app mega scope
236
+ * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
237
+ * @applicableIdentity APP
238
+ * @applicableIdentity VISITOR
239
+ * @fqn com.wix.ecom.recommendations.v1.RecommendationsService.GetRecommendation
240
+ */
241
+ export declare function getRecommendation(algorithms: NonNullablePaths<Algorithm, `_id` | `appId`>[], options?: NonNullablePaths<GetRecommendationOptions, `items.${number}.appId` | `items.${number}.catalogItemId`>): Promise<NonNullablePaths<GetRecommendationResponse, {
242
+ [P in RecommendationNonNullablePaths]: `recommendation.${P}`;
243
+ }[RecommendationNonNullablePaths]>>;
244
+ export interface GetRecommendationOptions {
245
+ /**
246
+ * The set of items for which to get recommendations. Required if the `algorithmType` is `RELATED_ITEMS`.
247
+ * @maxSize 300
248
+ */
249
+ items?: CatalogReference[];
250
+ /**
251
+ * The minimum number of items that must be recommended by the algorithm for those items to be returned in the response.
252
+ *
253
+ * Max: `100`
254
+ * @max 100
255
+ */
256
+ minimumRecommendedItems?: number;
257
+ }
258
+ export {};
@@ -0,0 +1,130 @@
1
+ import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';
2
+ import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
3
+ import * as ambassadorWixEcomRecommendationsV1Recommendation from './ecom-recommendations-v1-recommendation-recommendations.http.js';
4
+ export var AlgorithmType;
5
+ (function (AlgorithmType) {
6
+ AlgorithmType["UNSPECIFIED"] = "UNSPECIFIED";
7
+ AlgorithmType["RELATED_ITEMS"] = "RELATED_ITEMS";
8
+ AlgorithmType["GLOBAL"] = "GLOBAL";
9
+ })(AlgorithmType || (AlgorithmType = {}));
10
+ /**
11
+ * Returns a list of recommendation algorithms that can be used on your Wix site or project. These algorithms can be used with [`getRecommendation()`](#getRecommendation) to provide item recommendations to the customer.
12
+ *
13
+ * Algorithms are run by the apps that provide them, and can only be used on catalogs they support. Apps may provide algorithms for use with their own catalogs and/or catalogs from other apps.
14
+ *
15
+ * The app which provides an algorithm is referenced by that algorithm’s `appId`. The apps whose catalogs are supported by an algorithm are referenced by the IDs in that algorithm’s `catalogAppIds` array.
16
+ *
17
+ *
18
+ * For an algorithm to be considered “Available” and returned in this method’s response, the algorithm must meet the following conditions:
19
+ * 1. The algorithm’s `appId` must match the ID of an installed Wix app.
20
+ * 2. At least 1 of the IDs in `catalogAppIds` must match the ID of an installed Wix app.
21
+ *
22
+ * 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).
23
+ * @public
24
+ * @permissionId RECOMMENDATIONS.READ
25
+ * @permissionScope Manage Stores - all permissions
26
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
27
+ * @permissionScope Read eCommerce - all read permissions
28
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
29
+ * @permissionScope Manage eCommerce - all permissions
30
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
31
+ * @permissionScope Picasso private app mega scope
32
+ * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
33
+ * @applicableIdentity APP
34
+ * @applicableIdentity VISITOR
35
+ * @fqn com.wix.ecom.recommendations.v1.RecommendationsService.ListAvailableAlgorithms
36
+ */
37
+ export async function listAvailableAlgorithms() {
38
+ // @ts-ignore
39
+ const { httpClient, sideEffects } = arguments[0];
40
+ const payload = renameKeysFromSDKRequestToRESTRequest({});
41
+ const reqOpts = ambassadorWixEcomRecommendationsV1Recommendation.listAvailableAlgorithms(payload);
42
+ sideEffects?.onSiteCall?.();
43
+ try {
44
+ const result = await httpClient.request(reqOpts);
45
+ sideEffects?.onSuccess?.(result);
46
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
47
+ }
48
+ catch (err) {
49
+ const transformedError = sdkTransformError(err, {
50
+ spreadPathsToArguments: {},
51
+ explicitPathsToArguments: {},
52
+ singleArgumentUnchanged: false,
53
+ }, []);
54
+ sideEffects?.onError?.(err);
55
+ throw transformedError;
56
+ }
57
+ }
58
+ /**
59
+ * Returns a recommendation object containing a list of items to recommend to the customer.
60
+ *
61
+ * `getRecommendation()` determines which items to recommend based on the given recommendation algorithms.
62
+ *
63
+ * `getRecommendation()` doesn’t run the algorithms. It calls the installed apps that provide them.
64
+ *
65
+ * Apps may provide algorithms for use with their own catalogs, or for use with catalogs from other apps.
66
+ * For example, Wix Stores provides algorithms that can only be used on its own catalogs.
67
+ * To run an algorithm, the app providing it must be installed, and an app providing a supported catalog must be installed.
68
+ * For more information and to see which algorithms are available on your site or project, call [`listAvailableAlgorithms()`](#listavailablealgorithms).
69
+ *
70
+ * `getRecommendation()` operates as follows:
71
+ * 1. `getRecommendation()` receives as input a list of algorithms as an array. These algorithms can be provided by different apps and can apply to different catalogs.
72
+ * 2. `getRecommendation()` calls the app that corresponds to the `appId` of the first algorithm in the list of algorithms. It passes that algorithm’s ID and the IDs of any subsequent algorithms in the array for the same app.
73
+ * 3. The app runs the algorithms.
74
+ * 4. `getRecommendation()` returns items recommendations from the first algorithm (according to its position in the `algorithms` array) that meets the minimum number of recommendations. At that point `getRecommendation()` stops calling other apps.
75
+ * 5. If none of the algorithms run by the first app meet the minimum recommended items, `getRecommendation()` finds the next algorithm in the array with a new `appId` (an ID of an app that has not yet been called), and repeats the process.
76
+ * 6. If no algorithms in the `algorithms` array recommend at least the minimum recommended items, `getRecommendation()` returns an empty array.
77
+ * @param algorithms - A list of algorithms checked in a specific order determined by their `appID` and their position in the `algorithms` array.
78
+ * See the method description for more information.
79
+ *
80
+ * If no algorithm is able to return at least `minimumRecommendedItems` items, an empty array is returned.
81
+ * @public
82
+ * @requiredField algorithms
83
+ * @requiredField algorithms._id
84
+ * @requiredField algorithms.appId
85
+ * @requiredField options.items.appId
86
+ * @requiredField options.items.catalogItemId
87
+ * @param options - Get recommendation options.
88
+ * @permissionId RECOMMENDATIONS.READ
89
+ * @permissionScope Manage Stores - all permissions
90
+ * @permissionScopeId SCOPE.DC-STORES-MEGA.MANAGE-STORES
91
+ * @permissionScope Read eCommerce - all read permissions
92
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.READ-ECOM
93
+ * @permissionScope Manage eCommerce - all permissions
94
+ * @permissionScopeId SCOPE.DC-ECOM-MEGA.MANAGE-ECOM
95
+ * @permissionScope Picasso private app mega scope
96
+ * @permissionScopeId SCOPE.TEST.MEGA-PICASSO-MANAGE-SITE
97
+ * @applicableIdentity APP
98
+ * @applicableIdentity VISITOR
99
+ * @fqn com.wix.ecom.recommendations.v1.RecommendationsService.GetRecommendation
100
+ */
101
+ export async function getRecommendation(algorithms, options) {
102
+ // @ts-ignore
103
+ const { httpClient, sideEffects } = arguments[2];
104
+ const payload = renameKeysFromSDKRequestToRESTRequest({
105
+ algorithms: algorithms,
106
+ items: options?.items,
107
+ minimumRecommendedItems: options?.minimumRecommendedItems,
108
+ });
109
+ const reqOpts = ambassadorWixEcomRecommendationsV1Recommendation.getRecommendation(payload);
110
+ sideEffects?.onSiteCall?.();
111
+ try {
112
+ const result = await httpClient.request(reqOpts);
113
+ sideEffects?.onSuccess?.(result);
114
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
115
+ }
116
+ catch (err) {
117
+ const transformedError = sdkTransformError(err, {
118
+ spreadPathsToArguments: {},
119
+ explicitPathsToArguments: {
120
+ algorithms: '$[0]',
121
+ items: '$[1].items',
122
+ minimumRecommendedItems: '$[1].minimumRecommendedItems',
123
+ },
124
+ singleArgumentUnchanged: false,
125
+ }, ['algorithms', 'options']);
126
+ sideEffects?.onError?.(err);
127
+ throw transformedError;
128
+ }
129
+ }
130
+ //# sourceMappingURL=ecom-recommendations-v1-recommendation-recommendations.universal.js.map
@@ -0,0 +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,OAAO,EAAE,cAAc,IAAI,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,gDAAgD,MAAM,kEAAkE,CAAC;AAyHrI,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;AA8DD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB;IAY3C,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,qCAAqC,CAAC,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,uCAAuC,CAAC,MAAM,CAAC,IAAI,CAAE,CAAC;IAC/D,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,iBAAiB,CACxC,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;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,UAA0D,EAC1D,OAGC;IASD,aAAa;IACb,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC,CAG9C,CAAC;IAEF,MAAM,OAAO,GAAG,qCAAqC,CAAC;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,uCAAuC,CAAC,MAAM,CAAC,IAAI,CAAE,CAAC;IAC/D,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,MAAM,gBAAgB,GAAG,iBAAiB,CACxC,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"}