@algolia/recommend 5.1.1 → 5.2.1

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 (40) hide show
  1. package/dist/builds/browser.d.ts +5 -5
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +5 -5
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/model/alternativesAsExact.d.ts.map +1 -1
  6. package/dist/model/baseSearchResponse.d.ts +4 -4
  7. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  8. package/dist/model/boughtTogetherQuery.d.ts.map +1 -1
  9. package/dist/model/clientMethodProps.d.ts +2 -2
  10. package/dist/model/clientMethodProps.d.ts.map +1 -1
  11. package/dist/model/{facetsStats.d.ts → facetStats.d.ts} +2 -2
  12. package/dist/model/facetStats.d.ts.map +1 -0
  13. package/dist/model/fallbackParams.d.ts +1 -1
  14. package/dist/model/fallbackParams.d.ts.map +1 -1
  15. package/dist/model/index.d.ts +1 -1
  16. package/dist/model/index.d.ts.map +1 -1
  17. package/dist/model/recommendModels.d.ts.map +1 -1
  18. package/dist/model/recommendationsResults.d.ts.map +1 -1
  19. package/dist/model/removeWordsIfNoResults.d.ts.map +1 -1
  20. package/dist/model/searchParams.d.ts +1 -1
  21. package/dist/model/searchParams.d.ts.map +1 -1
  22. package/dist/recommend.cjs +3 -6
  23. package/dist/recommend.esm.browser.js +12 -16
  24. package/dist/recommend.esm.node.js +3 -6
  25. package/dist/recommend.umd.js +2 -2
  26. package/dist/src/recommendClient.d.ts +6 -6
  27. package/dist/src/recommendClient.d.ts.map +1 -1
  28. package/model/alternativesAsExact.ts +1 -4
  29. package/model/baseSearchResponse.ts +4 -4
  30. package/model/boughtTogetherQuery.ts +1 -2
  31. package/model/clientMethodProps.ts +2 -2
  32. package/model/{facetsStats.ts → facetStats.ts} +1 -1
  33. package/model/fallbackParams.ts +1 -1
  34. package/model/index.ts +1 -1
  35. package/model/recommendModels.ts +1 -5
  36. package/model/recommendationsResults.ts +1 -3
  37. package/model/removeWordsIfNoResults.ts +1 -5
  38. package/model/searchParams.ts +1 -1
  39. package/package.json +6 -6
  40. package/dist/model/facetsStats.d.ts.map +0 -1
@@ -11,14 +11,14 @@ export declare function recommendClient(appId: string, apiKey: string, options?:
11
11
  clearCache(): Promise<void>;
12
12
  readonly _ua: string;
13
13
  addAlgoliaAgent(segment: string, version?: string): void;
14
- customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
15
- customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
16
- customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
17
- customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
14
+ customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
15
+ customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
16
+ customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
17
+ customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
18
18
  deleteRecommendRule({ indexName, model, objectID }: import("../model").DeleteRecommendRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").DeletedAtResponse>;
19
19
  getRecommendRule({ indexName, model, objectID }: import("../model").GetRecommendRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").RecommendRule>;
20
20
  getRecommendStatus({ indexName, model, taskID }: import("../model").GetRecommendStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetRecommendTaskResponse>;
21
21
  getRecommendations(getRecommendationsParams: import("../model").GetRecommendationsParams | import("../model").LegacyGetRecommendationsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetRecommendationsResponse>;
22
- searchRecommendRules({ indexName, model, searchRecommendRulesParams, }: import("../model").SearchRecommendRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchRecommendRulesResponse>;
22
+ searchRecommendRules({ indexName, model, searchRecommendRulesParams }: import("../model").SearchRecommendRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchRecommendRulesResponse>;
23
23
  };
24
24
  //# sourceMappingURL=browser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAgB5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAGjE,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;;;;;;;;;;;;;;EA+BxB"}
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAa5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAGjE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;;;;;;;;;;;;;;;EA2BrF"}
@@ -11,14 +11,14 @@ export declare function recommendClient(appId: string, apiKey: string, options?:
11
11
  clearCache(): Promise<void>;
12
12
  _ua: string;
13
13
  addAlgoliaAgent(segment: string, version?: string): void;
14
- customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
15
- customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
16
- customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
17
- customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
14
+ customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
15
+ customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
16
+ customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
17
+ customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>;
18
18
  deleteRecommendRule({ indexName, model, objectID }: import("../model").DeleteRecommendRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").DeletedAtResponse>;
19
19
  getRecommendRule({ indexName, model, objectID }: import("../model").GetRecommendRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").RecommendRule>;
20
20
  getRecommendStatus({ indexName, model, taskID }: import("../model").GetRecommendStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetRecommendTaskResponse>;
21
21
  getRecommendations(getRecommendationsParams: import("../model").GetRecommendationsParams | import("../model").LegacyGetRecommendationsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetRecommendationsResponse>;
22
- searchRecommendRules({ indexName, model, searchRecommendRulesParams, }: import("../model").SearchRecommendRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchRecommendRulesResponse>;
22
+ searchRecommendRules({ indexName, model, searchRecommendRulesParams }: import("../model").SearchRecommendRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchRecommendRulesResponse>;
23
23
  };
24
24
  //# sourceMappingURL=node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../builds/node.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAY5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAGjE,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;;;;;;;;;;;;;;EA2BxB"}
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../builds/node.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAY5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAGjE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;;;;;;;;;;;;;;;EA0BrF"}
@@ -1 +1 @@
1
- {"version":3,"file":"alternativesAsExact.d.ts","sourceRoot":"","sources":["../../model/alternativesAsExact.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,mBAAmB,GAC3B,eAAe,GACf,mBAAmB,GACnB,mBAAmB,CAAC"}
1
+ {"version":3,"file":"alternativesAsExact.d.ts","sourceRoot":"","sources":["../../model/alternativesAsExact.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG,mBAAmB,GAAG,mBAAmB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Exhaustive } from './exhaustive';
2
- import type { FacetsStats } from './facetsStats';
2
+ import type { FacetStats } from './facetStats';
3
3
  import type { Redirect } from './redirect';
4
4
  import type { RenderingContent } from './renderingContent';
5
5
  export type BaseSearchResponse = Record<string, any> & {
@@ -39,7 +39,7 @@ export type BaseSearchResponse = Record<string, any> & {
39
39
  /**
40
40
  * Statistics for numerical facets.
41
41
  */
42
- facets_stats?: Record<string, FacetsStats>;
42
+ facets_stats?: Record<string, FacetStats>;
43
43
  /**
44
44
  * Index name used for the query.
45
45
  */
@@ -67,7 +67,7 @@ export type BaseSearchResponse = Record<string, any> & {
67
67
  /**
68
68
  * Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.
69
69
  */
70
- processingTimingsMS?: Record<string, any>;
70
+ processingTimingsMS?: Record<string, unknown>;
71
71
  /**
72
72
  * Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.
73
73
  */
@@ -85,7 +85,7 @@ export type BaseSearchResponse = Record<string, any> & {
85
85
  /**
86
86
  * An object with custom data. You can store up to 32kB as custom data.
87
87
  */
88
- userData?: Record<string, any>;
88
+ userData?: Record<string, unknown>;
89
89
  /**
90
90
  * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
91
91
  */
@@ -1 +1 @@
1
- {"version":3,"file":"baseSearchResponse.d.ts","sourceRoot":"","sources":["../../model/baseSearchResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,E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,CAAC;IAEhD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAE1C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE9C;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"boughtTogetherQuery.d.ts","sourceRoot":"","sources":["../../model/boughtTogetherQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,GACpD,wBAAwB,CAAC"}
1
+ {"version":3,"file":"boughtTogetherQuery.d.ts","sourceRoot":"","sources":["../../model/boughtTogetherQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAE3E,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,GAAG,wBAAwB,CAAC"}
@@ -42,7 +42,7 @@ export type CustomPostProps = {
42
42
  /**
43
43
  * Parameters to send with the custom request.
44
44
  */
45
- body?: Record<string, any>;
45
+ body?: Record<string, unknown>;
46
46
  };
47
47
  /**
48
48
  * Properties for the `customPut` method.
@@ -59,7 +59,7 @@ export type CustomPutProps = {
59
59
  /**
60
60
  * Parameters to send with the custom request.
61
61
  */
62
- body?: Record<string, any>;
62
+ body?: Record<string, unknown>;
63
63
  };
64
64
  /**
65
65
  * Properties for the `deleteRecommendRule` method.
@@ -1 +1 @@
1
- {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAA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B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG,sBAAsB,EAAE,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,EAAE,eAAe,CAAC;IACvB,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;CACzD,CAAC"}
@@ -1,4 +1,4 @@
1
- export type FacetsStats = {
1
+ export type FacetStats = {
2
2
  /**
3
3
  * Minimum value in the results.
4
4
  */
@@ -16,4 +16,4 @@ export type FacetsStats = {
16
16
  */
17
17
  sum?: number;
18
18
  };
19
- //# sourceMappingURL=facetsStats.d.ts.map
19
+ //# sourceMappingURL=facetStats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"facetStats.d.ts","sourceRoot":"","sources":["../../model/facetStats.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { SearchParamsObject } from './searchParamsObject';
2
- export type FallbackParams = Record<string, any> & SearchParamsObject;
2
+ export type FallbackParams = Record<string, unknown> & SearchParamsObject;
3
3
  //# sourceMappingURL=fallbackParams.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fallbackParams.d.ts","sourceRoot":"","sources":["../../model/fallbackParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC"}
1
+ {"version":3,"file":"fallbackParams.d.ts","sourceRoot":"","sources":["../../model/fallbackParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,kBAAkB,CAAC"}
@@ -18,8 +18,8 @@ export * from './exactOnSingleWordQuery';
18
18
  export * from './exhaustive';
19
19
  export * from './facetFilters';
20
20
  export * from './facetOrdering';
21
+ export * from './facetStats';
21
22
  export * from './facets';
22
- export * from './facetsStats';
23
23
  export * from './fallbackParams';
24
24
  export * from './fbtModel';
25
25
  export * from './frequentlyBoughtTogether';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAq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C,cAAc,YAAY,CAAC;AAC3B,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"recommendModels.d.ts","sourceRoot":"","sources":["../../model/recommendModels.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GACvB,iBAAiB,GACjB,kBAAkB,GAClB,iBAAiB,GACjB,gBAAgB,CAAC"}
1
+ {"version":3,"file":"recommendModels.d.ts","sourceRoot":"","sources":["../../model/recommendModels.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"recommendationsResults.d.ts","sourceRoot":"","sources":["../../model/recommendationsResults.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,GACrD,mBAAmB,GACnB,gBAAgB,CAAC"}
1
+ {"version":3,"file":"recommendationsResults.d.ts","sourceRoot":"","sources":["../../model/recommendationsResults.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,GAAG,mBAAmB,GAAG,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"removeWordsIfNoResults.d.ts","sourceRoot":"","sources":["../../model/removeWordsIfNoResults.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC9B,aAAa,GACb,YAAY,GACZ,WAAW,GACX,MAAM,CAAC"}
1
+ {"version":3,"file":"removeWordsIfNoResults.d.ts","sourceRoot":"","sources":["../../model/removeWordsIfNoResults.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { SearchParamsObject } from './searchParamsObject';
2
- export type SearchParams = Record<string, any> & SearchParamsObject;
2
+ export type SearchParams = Record<string, unknown> & SearchParamsObject;
3
3
  //# sourceMappingURL=searchParams.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchParams.d.ts","sourceRoot":"","sources":["../../model/searchParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,kBAAkB,CAAC"}
1
+ {"version":3,"file":"searchParams.d.ts","sourceRoot":"","sources":["../../model/searchParams.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,kBAAkB,CAAC"}
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
4
4
  var requesterNodeHttp = require('@algolia/requester-node-http');
5
5
 
6
6
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
7
- const apiClientVersion = '5.1.1';
7
+ const apiClientVersion = '5.2.1';
8
8
  function getDefaultHosts(appId) {
9
9
  return [
10
10
  {
@@ -66,10 +66,7 @@ function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authM
66
66
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
67
67
  */
68
68
  clearCache() {
69
- return Promise.all([
70
- transporter.requestsCache.clear(),
71
- transporter.responsesCache.clear(),
72
- ]).then(() => undefined);
69
+ return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);
73
70
  },
74
71
  /**
75
72
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
@@ -339,7 +336,7 @@ function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authM
339
336
  * @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
340
337
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
341
338
  */
342
- searchRecommendRules({ indexName, model, searchRecommendRulesParams, }, requestOptions) {
339
+ searchRecommendRules({ indexName, model, searchRecommendRulesParams }, requestOptions) {
343
340
  if (!indexName) {
344
341
  throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.');
345
342
  }
@@ -325,7 +325,7 @@ function deserializeFailure({
325
325
  return new DetailedApiError(parsed.message, status, parsed.error, stackFrame);
326
326
  }
327
327
  return new ApiError(parsed.message, status, stackFrame);
328
- } catch (e) {
328
+ } catch {
329
329
  // ..
330
330
  }
331
331
  return new ApiError(content, status, stackFrame);
@@ -453,14 +453,17 @@ function createTransporter({
453
453
  if (host === undefined) {
454
454
  throw new RetryError(stackTraceWithoutCredentials(stackTrace));
455
455
  }
456
- let responseTimeout = isRead ? requestOptions.timeouts?.read || timeouts.read : requestOptions.timeouts?.write || timeouts.write;
456
+ const timeout = {
457
+ ...timeouts,
458
+ ...requestOptions.timeouts
459
+ };
457
460
  const payload = {
458
461
  data,
459
462
  headers,
460
463
  method: request.method,
461
464
  url: serializeUrl(host, request.path, queryParameters),
462
- connectTimeout: getTimeout(timeoutsCount, requestOptions.timeouts?.connect || timeouts.connect),
463
- responseTimeout: getTimeout(timeoutsCount, responseTimeout)
465
+ connectTimeout: getTimeout(timeoutsCount, timeout.connect),
466
+ responseTimeout: getTimeout(timeoutsCount, isRead ? timeout.read : timeout.write)
464
467
  };
465
468
  /**
466
469
  * The stackFrame is pushed to the stackTrace so we
@@ -653,8 +656,7 @@ function createXhrRequester() {
653
656
  const connectTimeout = createTimeout(request.connectTimeout, 'Connection timeout');
654
657
  let responseTimeout;
655
658
  baseRequester.onreadystatechange = () => {
656
- if (baseRequester.readyState > baseRequester.OPENED &&
657
- responseTimeout === undefined) {
659
+ if (baseRequester.readyState > baseRequester.OPENED && responseTimeout === undefined) {
658
660
  clearTimeout(connectTimeout);
659
661
  responseTimeout = createTimeout(request.responseTimeout, 'Socket timeout');
660
662
  }
@@ -687,7 +689,7 @@ function createXhrRequester() {
687
689
  }
688
690
 
689
691
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
690
- const apiClientVersion = '5.1.1';
692
+ const apiClientVersion = '5.2.1';
691
693
  function getDefaultHosts(appId) {
692
694
  return [
693
695
  {
@@ -749,10 +751,7 @@ function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authM
749
751
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
750
752
  */
751
753
  clearCache() {
752
- return Promise.all([
753
- transporter.requestsCache.clear(),
754
- transporter.responsesCache.clear(),
755
- ]).then(() => undefined);
754
+ return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);
756
755
  },
757
756
  /**
758
757
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
@@ -1022,7 +1021,7 @@ function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1022
1021
  * @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
1023
1022
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1024
1023
  */
1025
- searchRecommendRules({ indexName, model, searchRecommendRulesParams, }, requestOptions) {
1024
+ searchRecommendRules({ indexName, model, searchRecommendRulesParams }, requestOptions) {
1026
1025
  if (!indexName) {
1027
1026
  throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.');
1028
1027
  }
@@ -1071,10 +1070,7 @@ function recommendClient(appId, apiKey, options) {
1071
1070
  responsesCache: createMemoryCache(),
1072
1071
  requestsCache: createMemoryCache({ serializable: false }),
1073
1072
  hostsCache: createFallbackableCache({
1074
- caches: [
1075
- createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }),
1076
- createMemoryCache(),
1077
- ],
1073
+ caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()],
1078
1074
  }),
1079
1075
  ...options,
1080
1076
  });
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, shuffle, DEFAULT_CONNEC
2
2
  import { createHttpRequester } from '@algolia/requester-node-http';
3
3
 
4
4
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
5
- const apiClientVersion = '5.1.1';
5
+ const apiClientVersion = '5.2.1';
6
6
  function getDefaultHosts(appId) {
7
7
  return [
8
8
  {
@@ -64,10 +64,7 @@ function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authM
64
64
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
65
65
  */
66
66
  clearCache() {
67
- return Promise.all([
68
- transporter.requestsCache.clear(),
69
- transporter.responsesCache.clear(),
70
- ]).then(() => undefined);
67
+ return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);
71
68
  },
72
69
  /**
73
70
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
@@ -337,7 +334,7 @@ function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authM
337
334
  * @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
338
335
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
339
336
  */
340
- searchRecommendRules({ indexName, model, searchRecommendRulesParams, }, requestOptions) {
337
+ searchRecommendRules({ indexName, model, searchRecommendRulesParams }, requestOptions) {
341
338
  if (!indexName) {
342
339
  throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.');
343
340
  }
@@ -1,2 +1,2 @@
1
- /*! recommend.umd.js | 5.1.1 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/recommend"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(a().getItem(r)||"{}")}function s(e){a().setItem(r,JSON.stringify(e))}return{get:(t,r,a={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),a=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(s(a),!t)return;s(Object.fromEntries(Object.entries(a).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),o()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||a.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=o();return s[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},a().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=o();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function r(e){const t=[...e.caches],a=t.shift();return void 0===a?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,o,s={miss:()=>Promise.resolve()})=>a.get(e,o,s).catch((()=>r({caches:t}).get(e,o,s))),set:(e,o)=>a.set(e,o).catch((()=>r({caches:t}).set(e,o))),delete:e=>a.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>a.clear().catch((()=>r({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,a,o={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const n=a();return n.then((e=>o.miss(e))).then((()=>n))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const o=12e4;function s(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>o},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=o}}}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class l extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}}class u extends c{constructor(e,t,r,a="ApiError"){super(e,r,a),n(this,"status",void 0),this.status=t}}class m extends i{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}class d extends u{constructor(e,t,r,a){super(e,t,a,"DetailedApiError"),n(this,"error",void 0),this.error=r}}function h(e,t,r){const a=(o=r,Object.keys(o).filter((e=>void 0!==o[e])).sort().map((e=>`${e}=${encodeURIComponent("[object Array]"===Object.prototype.toString.call(o[e])?o[e].join(","):o[e]).replaceAll("+","%20")}`)).join("&"));var o;let s=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return a.length&&(s+=`?${a}`),s}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function g({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:o,timeouts:n,requester:i,requestsCache:c,responsesCache:g}){async function f(c,g,f=!0){const w=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,g),P=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},o={};return Object.keys(a).forEach((e=>{const t=a[e];o[e.toLowerCase()]=t})),o}(r,c.headers,g.headers),q="GET"===c.method?{...c.data,...g.data}:{},v={...a,...c.queryParameters,...q};if(o.value&&(v["x-algolia-agent"]=o.value),g&&g.queryParameters)for(const e of Object.keys(g.queryParameters))g.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(g.queryParameters[e])?v[e]=g.queryParameters[e].toString():v[e]=g.queryParameters[e];let b=0;const R=async(e,r)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>p(e)))}(w));let o=f?g.timeouts?.read||n.read:g.timeouts?.write||n.write;const q={data:y,headers:P,method:c.method,url:h(a,c.path,v),connectTimeout:r(b,g.timeouts?.connect||n.connect),responseTimeout:r(b,o)},T=t=>{const r={request:q,response:t,host:a,triesLeft:e.length};return w.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const o=T(E);return E.isTimedOut&&b++,console.log("Retryable failure",p(o)),await t.set(a,s(a,E.isTimedOut?"timed out":"down")),R(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new m(t.message,e)}}(E);throw T(E),function({content:e,status:t},r){try{const a=JSON.parse(e);return"error"in a?new d(a.message,t,a.error,r):new u(a.message,t,r)}catch(e){}return new u(e,t,r)}(E,w)},T=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),a=r.filter((e=>e.isUp())),o=r.filter((e=>e.isTimedOut())),n=[...a,...o];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===o.length&&0===e?1:o.length+3+e)*t}}(T);return R([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:o,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const o=e.useReadTransporter||"GET"===e.method;if(!o)return f(e,t,o);const s=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const n={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return g.get(n,(()=>c.get(n,(()=>c.set(n,s()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>g.set(n,e)})},requestsCache:c,responsesCache:g}}function f({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}const w="5.1.1";function y(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const a=Math.floor(Math.random()*(r+1)),o=e[r];t[r]=e[a],t[a]=o}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=w,e.recommendClient=function(e,o,s){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!o||"string"!=typeof o)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:a,...o}){const s=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(e,t,r),n=g({hosts:y(e),...o,algoliaAgent:f({algoliaAgents:a,client:"Recommend",version:w}),baseHeaders:{"content-type":"text/plain",...s.headers(),...o.baseHeaders},baseQueryParameters:{...s.queryParameters(),...o.baseQueryParameters}});return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},customPost({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const o={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,a)},customPut({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const o={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,a)},deleteRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `deleteRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRecommendRule`.");const o={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRecommendRule`.");const o={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendStatus({indexName:e,model:t,taskID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendStatus`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendStatus`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getRecommendStatus`.");const o={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(o,a)},getRecommendations(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)},searchRecommendRules({indexName:e,model:t,searchRecommendRulesParams:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRecommendRules`.");if(!t)throw new Error("Parameter `model` is required when calling `searchRecommendRules`.");const o={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return n.request(o,a)}}}({appId:e,apiKey:o,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),o=a(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(o),s=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:r({caches:[t({key:`${w}-${e}`}),a()]}),...s})}}));
1
+ /*! recommend.umd.js | 5.2.1 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/recommend"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function a(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function s(){return JSON.parse(a().getItem(r)||"{}")}function o(e){a().setItem(r,JSON.stringify(e))}return{get:(t,r,a={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=s(),a=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(o(a),!t)return;o(Object.fromEntries(Object.entries(a).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),s()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||a.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const o=s();return o[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},a().setItem(r,JSON.stringify(o)),t})),delete:e=>Promise.resolve().then((()=>{const t=s();delete t[JSON.stringify(e)],a().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(r)}))}}function r(e){const t=[...e.caches],a=t.shift();return void 0===a?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,s,o={miss:()=>Promise.resolve()})=>a.get(e,s,o).catch((()=>r({caches:t}).get(e,s,o))),set:(e,s)=>a.set(e,s).catch((()=>r({caches:t}).set(e,s))),delete:e=>a.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>a.clear().catch((()=>r({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,a,s={miss:()=>Promise.resolve()}){const o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);const n=a();return n.then((e=>s.miss(e))).then((()=>n))},set:(r,a)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const s=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>s},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=s}}}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class l extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}}class u extends c{constructor(e,t,r,a="ApiError"){super(e,r,a),n(this,"status",void 0),this.status=t}}class m extends i{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}class d extends u{constructor(e,t,r,a){super(e,t,a,"DetailedApiError"),n(this,"error",void 0),this.error=r}}function h(e,t,r){const a=(s=r,Object.keys(s).filter((e=>void 0!==s[e])).sort().map((e=>`${e}=${encodeURIComponent("[object Array]"===Object.prototype.toString.call(s[e])?s[e].join(","):s[e]).replaceAll("+","%20")}`)).join("&"));var s;let o=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return a.length&&(o+=`?${a}`),o}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function g({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:a,algoliaAgent:s,timeouts:n,requester:i,requestsCache:c,responsesCache:g}){async function f(c,g,f=!0){const w=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,g),P=function(e,t,r){const a={Accept:"application/json",...e,...t,...r},s={};return Object.keys(a).forEach((e=>{const t=a[e];s[e.toLowerCase()]=t})),s}(r,c.headers,g.headers),q="GET"===c.method?{...c.data,...g.data}:{},v={...a,...c.queryParameters,...q};if(s.value&&(v["x-algolia-agent"]=s.value),g&&g.queryParameters)for(const e of Object.keys(g.queryParameters))g.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(g.queryParameters[e])?v[e]=g.queryParameters[e].toString():v[e]=g.queryParameters[e];let b=0;const R=async(e,r)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>p(e)))}(w));const s={...n,...g.timeouts},q={data:y,headers:P,method:c.method,url:h(a,c.path,v),connectTimeout:r(b,s.connect),responseTimeout:r(b,f?s.read:s.write)},T=t=>{const r={request:q,response:t,host:a,triesLeft:e.length};return w.push(r),r},E=await i.send(q);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(E)){const s=T(E);return E.isTimedOut&&b++,console.log("Retryable failure",p(s)),await t.set(a,o(a,E.isTimedOut?"timed out":"down")),R(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new m(t.message,e)}}(E);throw T(E),function({content:e,status:t},r){try{const a=JSON.parse(e);return"error"in a?new d(a.message,t,a.error,r):new u(a.message,t,r)}catch{}return new u(e,t,r)}(E,w)},T=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),a=r.filter((e=>e.isUp())),s=r.filter((e=>e.isTimedOut())),n=[...a,...s];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===s.length&&0===e?1:s.length+3+e)*t}}(T);return R([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:s,baseHeaders:r,baseQueryParameters:a,hosts:e,request:function(e,t={}){const s=e.useReadTransporter||"GET"===e.method;if(!s)return f(e,t,s);const o=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:a,headers:r}};return g.get(n,(()=>c.get(n,(()=>c.set(n,o()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>g.set(n,e)})},requestsCache:c,responsesCache:g}}function f({algoliaAgents:e,client:t,version:r}){const a=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>a.add(e))),a}const w="5.2.1";function y(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const a=Math.floor(Math.random()*(r+1)),s=e[r];t[r]=e[a],t[a]=s}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=w,e.recommendClient=function(e,s,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!s||"string"!=typeof s)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:a,...s}){const o=function(e,t,r="WithinHeaders"){const a={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?a:{},queryParameters:()=>"WithinQueryParameters"===r?a:{}}}(e,t,r),n=g({hosts:y(e),...s,algoliaAgent:f({algoliaAgents:a,client:"Recommend",version:w}),baseHeaders:{"content-type":"text/plain",...o.headers(),...s.baseHeaders},baseQueryParameters:{...o.queryParameters(),...s.baseQueryParameters}});return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(a,r)},customPost({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const s={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(s,a)},customPut({path:e,parameters:t,body:r},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const s={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(s,a)},deleteRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `deleteRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRecommendRule`.");const s={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(s,a)},getRecommendRule({indexName:e,model:t,objectID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendRule`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRecommendRule`.");const s={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(s,a)},getRecommendStatus({indexName:e,model:t,taskID:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendStatus`.");if(!t)throw new Error("Parameter `model` is required when calling `getRecommendStatus`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getRecommendStatus`.");const s={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return n.request(s,a)},getRecommendations(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)},searchRecommendRules({indexName:e,model:t,searchRecommendRulesParams:r},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRecommendRules`.");if(!t)throw new Error("Parameter `model` is required when calling `searchRecommendRules`.");const s={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(t)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return n.request(s,a)}}}({appId:e,apiKey:s,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const a=(e,a)=>setTimeout((()=>{r.abort(),t({status:0,content:a,isTimedOut:!0})}),e),s=a(e.connectTimeout,"Connection timeout");let o;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===o&&(clearTimeout(s),o=a(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(s),clearTimeout(o),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(s),clearTimeout(o),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:r({caches:[t({key:`${w}-${e}`}),a()]}),...o})}}));
@@ -6,7 +6,7 @@ import type { GetRecommendationsParams } from '../model/getRecommendationsParams
6
6
  import type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';
7
7
  import type { RecommendRule } from '../model/recommendRule';
8
8
  import type { SearchRecommendRulesResponse } from '../model/searchRecommendRulesResponse';
9
- export declare const apiClientVersion = "5.1.1";
9
+ export declare const apiClientVersion = "5.2.1";
10
10
  export declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
11
11
  transporter: import("@algolia/client-common").Transporter;
12
12
  /**
@@ -36,7 +36,7 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
36
36
  * @param customDelete.parameters - Query parameters to apply to the current query.
37
37
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
38
38
  */
39
- customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
39
+ customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
40
40
  /**
41
41
  * This method allow you to send requests to the Algolia REST API.
42
42
  *
@@ -45,7 +45,7 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
45
45
  * @param customGet.parameters - Query parameters to apply to the current query.
46
46
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
47
47
  */
48
- customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
48
+ customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
49
49
  /**
50
50
  * This method allow you to send requests to the Algolia REST API.
51
51
  *
@@ -55,7 +55,7 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
55
55
  * @param customPost.body - Parameters to send with the custom request.
56
56
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
57
57
  */
58
- customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
58
+ customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
59
59
  /**
60
60
  * This method allow you to send requests to the Algolia REST API.
61
61
  *
@@ -65,7 +65,7 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
65
65
  * @param customPut.body - Parameters to send with the custom request.
66
66
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
67
67
  */
68
- customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
68
+ customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
69
69
  /**
70
70
  * Deletes a Recommend rule from a recommendation scenario.
71
71
  *
@@ -127,6 +127,6 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
127
127
  * @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
128
128
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
129
129
  */
130
- searchRecommendRules({ indexName, model, searchRecommendRulesParams, }: SearchRecommendRulesProps, requestOptions?: RequestOptions): Promise<SearchRecommendRulesResponse>;
130
+ searchRecommendRules({ indexName, model, searchRecommendRulesParams }: SearchRecommendRulesProps, requestOptions?: RequestOptions): Promise<SearchRecommendRulesResponse>;
131
131
  };
132
132
  //# sourceMappingURL=recommendClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recommendClient.d.ts","sourceRoot":"","sources":["../../src/recommendClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,mBAAmB,EAKnB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,8BAA8B,EAC9B,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,0BAA0B,EA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;;OAOG;oCAC6B,cAAc,mBAAmB,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAmBlH;;;;;;;;OAQG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAoBnC;;;;;;;;OAQG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAoBnC;;;;;;;;;;;OAWG;wDAE+B,wBAAwB,mBACvC,cAAc,GAC9B,OAAO,CAAC,iBAAiB,CAAC;IA8B7B;;;;;;;;;;;OAWG;qDAE+B,qBAAqB,mBACpC,cAAc,GAC9B,OAAO,CAAC,aAAa,CAAC;IA8BzB;;;;;;;;;;;OAWG;qDAE6B,uBAAuB,mBACpC,cAAc,GAC9B,OAAO,CAAC,wBAAwB,CAAC;IA8BpC;;;;;;;;OAQG;iDAEyB,wBAAwB,GAAG,8BAA8B,mBAClE,cAAc,GAC9B,OAAO,CAAC,0BAA0B,CAAC;IAmCtC;;;;;;;;;;;OAWG;2EAEiD,yBAAyB,mBAC1D,cAAc,GAC9B,OAAO,CAAC,4BAA4B,CAAC;EA4B3C"}
@@ -1,6 +1,3 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- export type AlternativesAsExact =
4
- | 'ignorePlurals'
5
- | 'multiWordsSynonym'
6
- | 'singleWordSynonym';
3
+ export type AlternativesAsExact = 'ignorePlurals' | 'multiWordsSynonym' | 'singleWordSynonym';
@@ -1,7 +1,7 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  import type { Exhaustive } from './exhaustive';
4
- import type { FacetsStats } from './facetsStats';
4
+ import type { FacetStats } from './facetStats';
5
5
  import type { Redirect } from './redirect';
6
6
  import type { RenderingContent } from './renderingContent';
7
7
 
@@ -51,7 +51,7 @@ export type BaseSearchResponse = Record<string, any> & {
51
51
  /**
52
52
  * Statistics for numerical facets.
53
53
  */
54
- facets_stats?: Record<string, FacetsStats>;
54
+ facets_stats?: Record<string, FacetStats>;
55
55
 
56
56
  /**
57
57
  * Index name used for the query.
@@ -86,7 +86,7 @@ export type BaseSearchResponse = Record<string, any> & {
86
86
  /**
87
87
  * Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.
88
88
  */
89
- processingTimingsMS?: Record<string, any>;
89
+ processingTimingsMS?: Record<string, unknown>;
90
90
 
91
91
  /**
92
92
  * Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.
@@ -110,7 +110,7 @@ export type BaseSearchResponse = Record<string, any> & {
110
110
  /**
111
111
  * An object with custom data. You can store up to 32kB as custom data.
112
112
  */
113
- userData?: Record<string, any>;
113
+ userData?: Record<string, unknown>;
114
114
 
115
115
  /**
116
116
  * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
@@ -3,5 +3,4 @@
3
3
  import type { BaseRecommendRequest } from './baseRecommendRequest';
4
4
  import type { FrequentlyBoughtTogether } from './frequentlyBoughtTogether';
5
5
 
6
- export type BoughtTogetherQuery = BaseRecommendRequest &
7
- FrequentlyBoughtTogether;
6
+ export type BoughtTogetherQuery = BaseRecommendRequest & FrequentlyBoughtTogether;
@@ -47,7 +47,7 @@ export type CustomPostProps = {
47
47
  /**
48
48
  * Parameters to send with the custom request.
49
49
  */
50
- body?: Record<string, any>;
50
+ body?: Record<string, unknown>;
51
51
  };
52
52
 
53
53
  /**
@@ -65,7 +65,7 @@ export type CustomPutProps = {
65
65
  /**
66
66
  * Parameters to send with the custom request.
67
67
  */
68
- body?: Record<string, any>;
68
+ body?: Record<string, unknown>;
69
69
  };
70
70
 
71
71
  /**
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- export type FacetsStats = {
3
+ export type FacetStats = {
4
4
  /**
5
5
  * Minimum value in the results.
6
6
  */
@@ -2,4 +2,4 @@
2
2
 
3
3
  import type { SearchParamsObject } from './searchParamsObject';
4
4
 
5
- export type FallbackParams = Record<string, any> & SearchParamsObject;
5
+ export type FallbackParams = Record<string, unknown> & SearchParamsObject;
package/model/index.ts CHANGED
@@ -20,8 +20,8 @@ export * from './exactOnSingleWordQuery';
20
20
  export * from './exhaustive';
21
21
  export * from './facetFilters';
22
22
  export * from './facetOrdering';
23
+ export * from './facetStats';
23
24
  export * from './facets';
24
- export * from './facetsStats';
25
25
  export * from './fallbackParams';
26
26
  export * from './fbtModel';
27
27
  export * from './frequentlyBoughtTogether';
@@ -1,7 +1,3 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- export type RecommendModels =
4
- | 'bought-together'
5
- | 'related-products'
6
- | 'trending-facets'
7
- | 'trending-items';
3
+ export type RecommendModels = 'bought-together' | 'related-products' | 'trending-facets' | 'trending-items';
@@ -4,6 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse';
4
4
  import type { RecommendationsHits } from './recommendationsHits';
5
5
  import type { SearchPagination } from './searchPagination';
6
6
 
7
- export type RecommendationsResults = BaseSearchResponse &
8
- RecommendationsHits &
9
- SearchPagination;
7
+ export type RecommendationsResults = BaseSearchResponse & RecommendationsHits & SearchPagination;
@@ -3,8 +3,4 @@
3
3
  /**
4
4
  * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
5
5
  */
6
- export type RemoveWordsIfNoResults =
7
- | 'allOptional'
8
- | 'firstWords'
9
- | 'lastWords'
10
- | 'none';
6
+ export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none';
@@ -2,4 +2,4 @@
2
2
 
3
3
  import type { SearchParamsObject } from './searchParamsObject';
4
4
 
5
- export type SearchParams = Record<string, any> & SearchParamsObject;
5
+ export type SearchParams = Record<string, unknown> & SearchParamsObject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/recommend",
3
- "version": "5.1.1",
3
+ "version": "5.2.1",
4
4
  "description": "JavaScript client for recommend",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,13 +44,13 @@
44
44
  "clean": "rm -rf ./dist || true"
45
45
  },
46
46
  "dependencies": {
47
- "@algolia/client-common": "5.1.1",
48
- "@algolia/requester-browser-xhr": "5.1.1",
49
- "@algolia/requester-node-http": "5.1.1"
47
+ "@algolia/client-common": "5.2.1",
48
+ "@algolia/requester-browser-xhr": "5.2.1",
49
+ "@algolia/requester-node-http": "5.2.1"
50
50
  },
51
51
  "devDependencies": {
52
- "@types/node": "22.2.0",
53
- "rollup": "4.20.0",
52
+ "@types/node": "22.5.0",
53
+ "rollup": "4.21.0",
54
54
  "typescript": "5.5.4"
55
55
  },
56
56
  "engines": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"facetsStats.d.ts","sourceRoot":"","sources":["../../model/facetsStats.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC"}