@algolia/recommend 5.0.0-alpha.90 → 5.0.0-alpha.97

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 (61) hide show
  1. package/dist/model/baseRecommendedForYouQuery.d.ts +8 -0
  2. package/dist/model/baseRecommendedForYouQuery.d.ts.map +1 -0
  3. package/dist/model/baseRecommendedForYouQueryParameters.d.ts +7 -0
  4. package/dist/model/baseRecommendedForYouQueryParameters.d.ts.map +1 -0
  5. package/dist/model/clientMethodProps.d.ts +42 -42
  6. package/dist/model/clientMethodProps.d.ts.map +1 -1
  7. package/dist/model/getRecommendationsResponse.d.ts +2 -2
  8. package/dist/model/getRecommendationsResponse.d.ts.map +1 -1
  9. package/dist/model/highlightResult.d.ts +1 -1
  10. package/dist/model/highlightResult.d.ts.map +1 -1
  11. package/dist/model/index.d.ts +9 -2
  12. package/dist/model/index.d.ts.map +1 -1
  13. package/dist/model/recommendationsHit.d.ts +4 -0
  14. package/dist/model/recommendationsHit.d.ts.map +1 -0
  15. package/dist/model/recommendationsHits.d.ts +13 -0
  16. package/dist/model/recommendationsHits.d.ts.map +1 -0
  17. package/dist/model/recommendationsRequest.d.ts +2 -1
  18. package/dist/model/recommendationsRequest.d.ts.map +1 -1
  19. package/dist/model/recommendationsResults.d.ts +4 -0
  20. package/dist/model/recommendationsResults.d.ts.map +1 -0
  21. package/dist/model/recommendedForYouModel.d.ts +5 -0
  22. package/dist/model/recommendedForYouModel.d.ts.map +1 -0
  23. package/dist/model/recommendedForYouQuery.d.ts +4 -0
  24. package/dist/model/recommendedForYouQuery.d.ts.map +1 -0
  25. package/dist/model/recommendedForYouQueryParameters.d.ts +4 -0
  26. package/dist/model/recommendedForYouQueryParameters.d.ts.map +1 -0
  27. package/dist/model/searchRecommendRulesParams.d.ts +0 -4
  28. package/dist/model/searchRecommendRulesParams.d.ts.map +1 -1
  29. package/dist/model/searchRecommendRulesResponse.d.ts +3 -3
  30. package/dist/model/snippetResult.d.ts +1 -1
  31. package/dist/model/snippetResult.d.ts.map +1 -1
  32. package/dist/model/trendingFacetHit.d.ts +18 -0
  33. package/dist/model/trendingFacetHit.d.ts.map +1 -0
  34. package/dist/recommend.cjs +82 -82
  35. package/dist/recommend.esm.browser.js +125 -101
  36. package/dist/recommend.esm.node.js +82 -82
  37. package/dist/recommend.umd.js +2 -2
  38. package/dist/src/recommendClient.d.ts +38 -38
  39. package/dist/src/recommendClient.d.ts.map +1 -1
  40. package/model/baseRecommendedForYouQuery.ts +12 -0
  41. package/model/baseRecommendedForYouQueryParameters.ts +8 -0
  42. package/model/clientMethodProps.ts +42 -42
  43. package/model/getRecommendationsResponse.ts +2 -2
  44. package/model/highlightResult.ts +3 -1
  45. package/model/index.ts +9 -2
  46. package/model/recommendationsHit.ts +6 -0
  47. package/model/{recommendHits.ts → recommendationsHits.ts} +3 -3
  48. package/model/recommendationsRequest.ts +2 -0
  49. package/model/{recommendationsResponse.ts → recommendationsResults.ts} +2 -2
  50. package/model/recommendedForYouModel.ts +6 -0
  51. package/model/recommendedForYouQuery.ts +7 -0
  52. package/model/recommendedForYouQueryParameters.ts +7 -0
  53. package/model/searchRecommendRulesParams.ts +0 -5
  54. package/model/searchRecommendRulesResponse.ts +3 -3
  55. package/model/snippetResult.ts +3 -1
  56. package/model/trendingFacetHit.ts +21 -0
  57. package/package.json +7 -7
  58. package/dist/model/recommendHits.d.ts +0 -13
  59. package/dist/model/recommendHits.d.ts.map +0 -1
  60. package/dist/model/recommendationsResponse.d.ts +0 -4
  61. package/dist/model/recommendationsResponse.d.ts.map +0 -1
@@ -1,12 +1,12 @@
1
1
  import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
2
- import type { DelProps, DeleteRecommendRuleProps, GetProps, GetRecommendRuleProps, GetRecommendStatusProps, PostProps, PutProps, SearchRecommendRulesProps } from '../model/clientMethodProps';
2
+ import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteRecommendRuleProps, GetRecommendRuleProps, GetRecommendStatusProps, SearchRecommendRulesProps } from '../model/clientMethodProps';
3
3
  import type { DeletedAtResponse } from '../model/deletedAtResponse';
4
4
  import type { GetRecommendTaskResponse } from '../model/getRecommendTaskResponse';
5
5
  import type { GetRecommendationsParams } from '../model/getRecommendationsParams';
6
6
  import type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';
7
7
  import type { RuleResponse } from '../model/ruleResponse';
8
8
  import type { SearchRecommendRulesResponse } from '../model/searchRecommendRulesResponse';
9
- export declare const apiClientVersion = "5.0.0-alpha.90";
9
+ export declare const apiClientVersion = "5.0.0-alpha.97";
10
10
  export declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
11
11
  transporter: import("@algolia/client-common").Transporter;
12
12
  /**
@@ -32,12 +32,44 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
32
32
  * This method allow you to send requests to the Algolia REST API.
33
33
  *
34
34
  * @summary Send requests to the Algolia REST API.
35
- * @param del - The del object.
36
- * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
37
- * @param del.parameters - Query parameters to apply to the current query.
35
+ * @param customDelete - The customDelete object.
36
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
37
+ * @param customDelete.parameters - Query parameters to apply to the current query.
38
38
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
39
39
  */
40
- del({ path, parameters }: DelProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
40
+ customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
41
+ /**
42
+ * This method allow you to send requests to the Algolia REST API.
43
+ *
44
+ * @summary Send requests to the Algolia REST API.
45
+ * @param customGet - The customGet object.
46
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
47
+ * @param customGet.parameters - Query parameters to apply to the current query.
48
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
49
+ */
50
+ customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
51
+ /**
52
+ * This method allow you to send requests to the Algolia REST API.
53
+ *
54
+ * @summary Send requests to the Algolia REST API.
55
+ * @param customPost - The customPost object.
56
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
57
+ * @param customPost.parameters - Query parameters to apply to the current query.
58
+ * @param customPost.body - Parameters to send with the custom request.
59
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
60
+ */
61
+ customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
62
+ /**
63
+ * This method allow you to send requests to the Algolia REST API.
64
+ *
65
+ * @summary Send requests to the Algolia REST API.
66
+ * @param customPut - The customPut object.
67
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
68
+ * @param customPut.parameters - Query parameters to apply to the current query.
69
+ * @param customPut.body - Parameters to send with the custom request.
70
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
71
+ */
72
+ customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
41
73
  /**
42
74
  * Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
43
75
  *
@@ -49,16 +81,6 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
49
81
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
50
82
  */
51
83
  deleteRecommendRule({ indexName, model, objectID }: DeleteRecommendRuleProps, requestOptions?: RequestOptions): Promise<DeletedAtResponse>;
52
- /**
53
- * This method allow you to send requests to the Algolia REST API.
54
- *
55
- * @summary Send requests to the Algolia REST API.
56
- * @param get - The get object.
57
- * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
58
- * @param get.parameters - Query parameters to apply to the current query.
59
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
60
- */
61
- get({ path, parameters }: GetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
62
84
  /**
63
85
  * Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
64
86
  *
@@ -89,28 +111,6 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
89
111
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
90
112
  */
91
113
  getRecommendations(getRecommendationsParams: GetRecommendationsParams, requestOptions?: RequestOptions): Promise<GetRecommendationsResponse>;
92
- /**
93
- * This method allow you to send requests to the Algolia REST API.
94
- *
95
- * @summary Send requests to the Algolia REST API.
96
- * @param post - The post object.
97
- * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
98
- * @param post.parameters - Query parameters to apply to the current query.
99
- * @param post.body - Parameters to send with the custom request.
100
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
101
- */
102
- post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
103
- /**
104
- * This method allow you to send requests to the Algolia REST API.
105
- *
106
- * @summary Send requests to the Algolia REST API.
107
- * @param put - The put object.
108
- * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
109
- * @param put.parameters - Query parameters to apply to the current query.
110
- * @param put.body - Parameters to send with the custom request.
111
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
112
- */
113
- put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
114
114
  /**
115
115
  * List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
116
116
  *
@@ -1 +1 @@
1
- {"version":3,"file":"recommendClient.d.ts","sourceRoot":"","sources":["../../src/recommendClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,QAAQ,EACR,wBAAwB,EACxB,QAAQ,EACR,qBAAqB,EACrB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wBlB;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;;OASG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;OASG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;OASG;wDAE+B,wBAAwB,mBACvC,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IAqC7B;;;;;;;;;OASG;qDAE+B,qBAAqB,mBACpC,cAAc,GAC9B,QAAQ,YAAY,CAAC;IAqCxB;;;;;;;;;OASG;qDAE6B,uBAAuB,mBACpC,cAAc,GAC9B,QAAQ,wBAAwB,CAAC;IAoCpC;;;;;;OAMG;iDAEyB,wBAAwB,mBACjC,cAAc,GAC9B,QAAQ,0BAA0B,CAAC;IA8BtC;;;;;;;;;OASG;4EAME,yBAAyB,mBACX,cAAc,GAC9B,QAAQ,4BAA4B,CAAC;EAiC3C;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,12 @@
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
+
3
+ import type { RecommendedForYouModel } from './recommendedForYouModel';
4
+ import type { RecommendedForYouQueryParameters } from './recommendedForYouQueryParameters';
5
+
6
+ export type BaseRecommendedForYouQuery = {
7
+ model: RecommendedForYouModel;
8
+
9
+ queryParameters?: RecommendedForYouQueryParameters;
10
+
11
+ fallbackParameters?: RecommendedForYouQueryParameters;
12
+ };
@@ -0,0 +1,8 @@
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
+
3
+ export type BaseRecommendedForYouQueryParameters = {
4
+ /**
5
+ * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.
6
+ */
7
+ userToken: string;
8
+ };
@@ -4,9 +4,9 @@ import type { RecommendModels } from './recommendModels';
4
4
  import type { SearchRecommendRulesParams } from './searchRecommendRulesParams';
5
5
 
6
6
  /**
7
- * Properties for the `del` method.
7
+ * Properties for the `customDelete` method.
8
8
  */
9
- export type DelProps = {
9
+ export type CustomDeleteProps = {
10
10
  /**
11
11
  * Path of the endpoint, anything after \"/1\" must be specified.
12
12
  */
@@ -18,27 +18,23 @@ export type DelProps = {
18
18
  };
19
19
 
20
20
  /**
21
- * Properties for the `deleteRecommendRule` method.
21
+ * Properties for the `customGet` method.
22
22
  */
23
- export type DeleteRecommendRuleProps = {
23
+ export type CustomGetProps = {
24
24
  /**
25
- * Index on which to perform the request.
26
- */
27
- indexName: string;
28
- /**
29
- * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
25
+ * Path of the endpoint, anything after \"/1\" must be specified.
30
26
  */
31
- model: RecommendModels;
27
+ path: string;
32
28
  /**
33
- * Unique record (object) identifier.
29
+ * Query parameters to apply to the current query.
34
30
  */
35
- objectID: string;
31
+ parameters?: Record<string, any>;
36
32
  };
37
33
 
38
34
  /**
39
- * Properties for the `get` method.
35
+ * Properties for the `customPost` method.
40
36
  */
41
- export type GetProps = {
37
+ export type CustomPostProps = {
42
38
  /**
43
39
  * Path of the endpoint, anything after \"/1\" must be specified.
44
40
  */
@@ -47,30 +43,34 @@ export type GetProps = {
47
43
  * Query parameters to apply to the current query.
48
44
  */
49
45
  parameters?: Record<string, any>;
46
+ /**
47
+ * Parameters to send with the custom request.
48
+ */
49
+ body?: Record<string, any>;
50
50
  };
51
51
 
52
52
  /**
53
- * Properties for the `getRecommendRule` method.
53
+ * Properties for the `customPut` method.
54
54
  */
55
- export type GetRecommendRuleProps = {
55
+ export type CustomPutProps = {
56
56
  /**
57
- * Index on which to perform the request.
57
+ * Path of the endpoint, anything after \"/1\" must be specified.
58
58
  */
59
- indexName: string;
59
+ path: string;
60
60
  /**
61
- * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
61
+ * Query parameters to apply to the current query.
62
62
  */
63
- model: RecommendModels;
63
+ parameters?: Record<string, any>;
64
64
  /**
65
- * Unique record (object) identifier.
65
+ * Parameters to send with the custom request.
66
66
  */
67
- objectID: string;
67
+ body?: Record<string, any>;
68
68
  };
69
69
 
70
70
  /**
71
- * Properties for the `getRecommendStatus` method.
71
+ * Properties for the `deleteRecommendRule` method.
72
72
  */
73
- export type GetRecommendStatusProps = {
73
+ export type DeleteRecommendRuleProps = {
74
74
  /**
75
75
  * Index on which to perform the request.
76
76
  */
@@ -80,45 +80,45 @@ export type GetRecommendStatusProps = {
80
80
  */
81
81
  model: RecommendModels;
82
82
  /**
83
- * Unique identifier of a task. Numeric value (up to 64bits).
83
+ * Unique record (object) identifier.
84
84
  */
85
- taskID: number;
85
+ objectID: string;
86
86
  };
87
87
 
88
88
  /**
89
- * Properties for the `post` method.
89
+ * Properties for the `getRecommendRule` method.
90
90
  */
91
- export type PostProps = {
91
+ export type GetRecommendRuleProps = {
92
92
  /**
93
- * Path of the endpoint, anything after \"/1\" must be specified.
93
+ * Index on which to perform the request.
94
94
  */
95
- path: string;
95
+ indexName: string;
96
96
  /**
97
- * Query parameters to apply to the current query.
97
+ * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
98
98
  */
99
- parameters?: Record<string, any>;
99
+ model: RecommendModels;
100
100
  /**
101
- * Parameters to send with the custom request.
101
+ * Unique record (object) identifier.
102
102
  */
103
- body?: Record<string, any>;
103
+ objectID: string;
104
104
  };
105
105
 
106
106
  /**
107
- * Properties for the `put` method.
107
+ * Properties for the `getRecommendStatus` method.
108
108
  */
109
- export type PutProps = {
109
+ export type GetRecommendStatusProps = {
110
110
  /**
111
- * Path of the endpoint, anything after \"/1\" must be specified.
111
+ * Index on which to perform the request.
112
112
  */
113
- path: string;
113
+ indexName: string;
114
114
  /**
115
- * Query parameters to apply to the current query.
115
+ * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
116
116
  */
117
- parameters?: Record<string, any>;
117
+ model: RecommendModels;
118
118
  /**
119
- * Parameters to send with the custom request.
119
+ * Unique identifier of a task. Numeric value (up to 64bits).
120
120
  */
121
- body?: Record<string, any>;
121
+ taskID: number;
122
122
  };
123
123
 
124
124
  /**
@@ -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
- import type { RecommendationsResponse } from './recommendationsResponse';
3
+ import type { RecommendationsResults } from './recommendationsResults';
4
4
 
5
5
  export type GetRecommendationsResponse = {
6
- results?: RecommendationsResponse[];
6
+ results?: RecommendationsResults[];
7
7
  };
@@ -2,4 +2,6 @@
2
2
 
3
3
  import type { HighlightResultOption } from './highlightResultOption';
4
4
 
5
- export type HighlightResult = HighlightResultOption | HighlightResultOption[];
5
+ export type HighlightResult =
6
+ | HighlightResultOption
7
+ | Record<string, HighlightResultOption>;
package/model/index.ts CHANGED
@@ -11,6 +11,8 @@ export * from './automaticFacetFilter';
11
11
  export * from './automaticFacetFilters';
12
12
  export * from './baseRecommendRequest';
13
13
  export * from './baseRecommendationsQuery';
14
+ export * from './baseRecommendedForYouQuery';
15
+ export * from './baseRecommendedForYouQueryParameters';
14
16
  export * from './baseSearchParams';
15
17
  export * from './baseSearchParamsWithoutQuery';
16
18
  export * from './baseSearchResponse';
@@ -55,12 +57,16 @@ export * from './queryType';
55
57
  export * from './rankingInfo';
56
58
  export * from './reRankingApplyFilter';
57
59
  export * from './recommendHit';
58
- export * from './recommendHits';
59
60
  export * from './recommendModels';
60
61
  export * from './recommendationModels';
62
+ export * from './recommendationsHit';
63
+ export * from './recommendationsHits';
61
64
  export * from './recommendationsQuery';
62
65
  export * from './recommendationsRequest';
63
- export * from './recommendationsResponse';
66
+ export * from './recommendationsResults';
67
+ export * from './recommendedForYouModel';
68
+ export * from './recommendedForYouQuery';
69
+ export * from './recommendedForYouQueryParameters';
64
70
  export * from './redirect';
65
71
  export * from './redirectRuleIndexMetadata';
66
72
  export * from './redirectRuleIndexMetadataData';
@@ -79,6 +85,7 @@ export * from './snippetResultOption';
79
85
  export * from './sortRemainingBy';
80
86
  export * from './tagFilters';
81
87
  export * from './taskStatus';
88
+ export * from './trendingFacetHit';
82
89
  export * from './trendingFacetsModel';
83
90
  export * from './trendingFacetsQuery';
84
91
  export * from './trendingItemsModel';
@@ -0,0 +1,6 @@
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
+
3
+ import type { RecommendHit } from './recommendHit';
4
+ import type { TrendingFacetHit } from './trendingFacetHit';
5
+
6
+ export type RecommendationsHit = RecommendHit | TrendingFacetHit;
@@ -1,9 +1,9 @@
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
- import type { RecommendHit } from './recommendHit';
3
+ import type { RecommendationsHit } from './recommendationsHit';
4
4
 
5
- export type RecommendHits = {
6
- hits: RecommendHit[];
5
+ export type RecommendationsHits = {
6
+ hits: RecommendationsHit[];
7
7
 
8
8
  /**
9
9
  * Text to search for in an index.
@@ -1,10 +1,12 @@
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 { RecommendationsQuery } from './recommendationsQuery';
4
+ import type { RecommendedForYouQuery } from './recommendedForYouQuery';
4
5
  import type { TrendingFacetsQuery } from './trendingFacetsQuery';
5
6
  import type { TrendingItemsQuery } from './trendingItemsQuery';
6
7
 
7
8
  export type RecommendationsRequest =
8
9
  | RecommendationsQuery
10
+ | RecommendedForYouQuery
9
11
  | TrendingFacetsQuery
10
12
  | TrendingItemsQuery;
@@ -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
3
  import type { BaseSearchResponse } from './baseSearchResponse';
4
- import type { RecommendHits } from './recommendHits';
4
+ import type { RecommendationsHits } from './recommendationsHits';
5
5
 
6
- export type RecommendationsResponse = BaseSearchResponse & RecommendHits;
6
+ export type RecommendationsResults = BaseSearchResponse & RecommendationsHits;
@@ -0,0 +1,6 @@
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
+
3
+ /**
4
+ * Recommended for you model.
5
+ */
6
+ export type RecommendedForYouModel = 'recommended-for-you';
@@ -0,0 +1,7 @@
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
+
3
+ import type { BaseRecommendRequest } from './baseRecommendRequest';
4
+ import type { BaseRecommendedForYouQuery } from './baseRecommendedForYouQuery';
5
+
6
+ export type RecommendedForYouQuery = BaseRecommendedForYouQuery &
7
+ BaseRecommendRequest;
@@ -0,0 +1,7 @@
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
+
3
+ import type { BaseRecommendedForYouQueryParameters } from './baseRecommendedForYouQueryParameters';
4
+ import type { SearchParamsObject } from './searchParamsObject';
5
+
6
+ export type RecommendedForYouQueryParameters =
7
+ BaseRecommendedForYouQueryParameters & SearchParamsObject;
@@ -28,9 +28,4 @@ export type SearchRecommendRulesParams = {
28
28
  * Restricts responses to enabled rules. When absent (default), _all_ rules are retrieved.
29
29
  */
30
30
  enabled?: boolean | null;
31
-
32
- /**
33
- * Request options to send with the API call.
34
- */
35
- _requestOptions?: Array<Record<string, any>>;
36
31
  };
@@ -9,17 +9,17 @@ export type SearchRecommendRulesResponse = {
9
9
  hits: RuleResponse[];
10
10
 
11
11
  /**
12
- * Number of fetched rules.
12
+ * Number of hits the search query matched.
13
13
  */
14
14
  nbHits: number;
15
15
 
16
16
  /**
17
- * Current page.
17
+ * Page to retrieve (the first page is `0`, not `1`).
18
18
  */
19
19
  page: number;
20
20
 
21
21
  /**
22
- * Number of pages.
22
+ * Number of pages of results for the current query.
23
23
  */
24
24
  nbPages: number;
25
25
  };
@@ -2,4 +2,6 @@
2
2
 
3
3
  import type { SnippetResultOption } from './snippetResultOption';
4
4
 
5
- export type SnippetResult = SnippetResultOption | SnippetResultOption[];
5
+ export type SnippetResult =
6
+ | Record<string, SnippetResultOption>
7
+ | SnippetResultOption;
@@ -0,0 +1,21 @@
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
+
3
+ /**
4
+ * Trending facet hit.
5
+ */
6
+ export type TrendingFacetHit = {
7
+ /**
8
+ * Recommendation score.
9
+ */
10
+ _score: number;
11
+
12
+ /**
13
+ * Facet name for trending models.
14
+ */
15
+ facetName: string;
16
+
17
+ /**
18
+ * Facet value for trending models.
19
+ */
20
+ facetValue: string;
21
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/recommend",
3
- "version": "5.0.0-alpha.90",
3
+ "version": "5.0.0-alpha.97",
4
4
  "description": "JavaScript client for recommend",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -39,14 +39,14 @@
39
39
  "clean": "rm -rf ./dist || true"
40
40
  },
41
41
  "dependencies": {
42
- "@algolia/client-common": "5.0.0-alpha.91",
43
- "@algolia/requester-browser-xhr": "5.0.0-alpha.91",
44
- "@algolia/requester-node-http": "5.0.0-alpha.91"
42
+ "@algolia/client-common": "5.0.0-alpha.98",
43
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.98",
44
+ "@algolia/requester-node-http": "5.0.0-alpha.98"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/node": "20.8.10",
48
- "rollup": "4.3.0",
49
- "typescript": "5.2.2"
47
+ "@types/node": "20.11.1",
48
+ "rollup": "4.9.5",
49
+ "typescript": "5.3.3"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">= 14.0.0"
@@ -1,13 +0,0 @@
1
- import type { RecommendHit } from './recommendHit';
2
- export type RecommendHits = {
3
- hits: RecommendHit[];
4
- /**
5
- * Text to search for in an index.
6
- */
7
- query?: string;
8
- /**
9
- * URL-encoded string of all search parameters.
10
- */
11
- params?: string;
12
- };
13
- //# sourceMappingURL=recommendHits.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recommendHits.d.ts","sourceRoot":"","sources":["../../model/recommendHits.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,YAAY,EAAE,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { BaseSearchResponse } from './baseSearchResponse';
2
- import type { RecommendHits } from './recommendHits';
3
- export type RecommendationsResponse = BaseSearchResponse & RecommendHits;
4
- //# sourceMappingURL=recommendationsResponse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recommendationsResponse.d.ts","sourceRoot":"","sources":["../../model/recommendationsResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,GAAG,aAAa,CAAC"}