@algolia/client-analytics 5.0.0-alpha.73 → 5.0.0-alpha.76

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 (87) hide show
  1. package/dist/client-analytics.cjs.js +114 -116
  2. package/dist/client-analytics.esm.browser.js +114 -114
  3. package/dist/client-analytics.esm.node.js +114 -114
  4. package/dist/client-analytics.umd.js +2 -2
  5. package/dist/model/averageClickEvent.d.ts +3 -3
  6. package/dist/model/clickPosition.d.ts +2 -2
  7. package/dist/model/clickThroughRateEvent.d.ts +4 -4
  8. package/dist/model/clientMethodProps.d.ts +91 -91
  9. package/dist/model/conversionRateEvent.d.ts +4 -4
  10. package/dist/model/getAverageClickPositionResponse.d.ts +3 -3
  11. package/dist/model/getClickPositionsResponse.d.ts +1 -1
  12. package/dist/model/getClickThroughRateResponse.d.ts +4 -4
  13. package/dist/model/getConversationRateResponse.d.ts +4 -4
  14. package/dist/model/getNoClickRateResponse.d.ts +4 -4
  15. package/dist/model/getNoResultsRateResponse.d.ts +4 -4
  16. package/dist/model/getSearchesCountResponse.d.ts +2 -2
  17. package/dist/model/getSearchesNoClicksResponse.d.ts +1 -1
  18. package/dist/model/getSearchesNoResultsResponse.d.ts +1 -1
  19. package/dist/model/getStatusResponse.d.ts +1 -1
  20. package/dist/model/getTopCountriesResponse.d.ts +1 -1
  21. package/dist/model/getTopFilterAttribute.d.ts +2 -2
  22. package/dist/model/getTopFilterAttributesResponse.d.ts +1 -1
  23. package/dist/model/getTopFilterForAttribute.d.ts +4 -4
  24. package/dist/model/getTopFilterForAttributeResponse.d.ts +1 -1
  25. package/dist/model/getTopFiltersNoResultsResponse.d.ts +1 -1
  26. package/dist/model/getTopFiltersNoResultsValue.d.ts +3 -3
  27. package/dist/model/getTopFiltersNoResultsValues.d.ts +2 -2
  28. package/dist/model/getUsersCountResponse.d.ts +2 -2
  29. package/dist/model/noClickRateEvent.d.ts +4 -4
  30. package/dist/model/noResultsRateEvent.d.ts +4 -4
  31. package/dist/model/orderBy.d.ts +3 -0
  32. package/dist/model/orderBy.d.ts.map +1 -1
  33. package/dist/model/searchEvent.d.ts +2 -2
  34. package/dist/model/searchNoClickEvent.d.ts +3 -3
  35. package/dist/model/searchNoResultEvent.d.ts +3 -3
  36. package/dist/model/topCountry.d.ts +2 -2
  37. package/dist/model/topHit.d.ts +2 -2
  38. package/dist/model/topHitWithAnalytics.d.ts +7 -7
  39. package/dist/model/topHitsResponse.d.ts +1 -1
  40. package/dist/model/topHitsResponseWithAnalytics.d.ts +1 -1
  41. package/dist/model/topSearch.d.ts +3 -3
  42. package/dist/model/topSearchWithAnalytics.d.ts +9 -9
  43. package/dist/model/topSearchesResponse.d.ts +1 -1
  44. package/dist/model/topSearchesResponseWithAnalytics.d.ts +1 -1
  45. package/dist/model/userWithDate.d.ts +2 -2
  46. package/dist/src/analyticsClient.d.ts +114 -114
  47. package/model/averageClickEvent.ts +3 -3
  48. package/model/clickPosition.ts +2 -2
  49. package/model/clickThroughRateEvent.ts +4 -4
  50. package/model/clientMethodProps.ts +91 -91
  51. package/model/conversionRateEvent.ts +4 -4
  52. package/model/getAverageClickPositionResponse.ts +3 -3
  53. package/model/getClickPositionsResponse.ts +1 -1
  54. package/model/getClickThroughRateResponse.ts +4 -4
  55. package/model/getConversationRateResponse.ts +4 -4
  56. package/model/getNoClickRateResponse.ts +4 -4
  57. package/model/getNoResultsRateResponse.ts +4 -4
  58. package/model/getSearchesCountResponse.ts +2 -2
  59. package/model/getSearchesNoClicksResponse.ts +1 -1
  60. package/model/getSearchesNoResultsResponse.ts +1 -1
  61. package/model/getStatusResponse.ts +1 -1
  62. package/model/getTopCountriesResponse.ts +1 -1
  63. package/model/getTopFilterAttribute.ts +2 -2
  64. package/model/getTopFilterAttributesResponse.ts +1 -1
  65. package/model/getTopFilterForAttribute.ts +4 -4
  66. package/model/getTopFilterForAttributeResponse.ts +1 -1
  67. package/model/getTopFiltersNoResultsResponse.ts +1 -1
  68. package/model/getTopFiltersNoResultsValue.ts +3 -3
  69. package/model/getTopFiltersNoResultsValues.ts +2 -2
  70. package/model/getUsersCountResponse.ts +2 -2
  71. package/model/noClickRateEvent.ts +4 -4
  72. package/model/noResultsRateEvent.ts +4 -4
  73. package/model/orderBy.ts +3 -0
  74. package/model/searchEvent.ts +2 -2
  75. package/model/searchNoClickEvent.ts +3 -3
  76. package/model/searchNoResultEvent.ts +3 -3
  77. package/model/topCountry.ts +2 -2
  78. package/model/topHit.ts +2 -2
  79. package/model/topHitWithAnalytics.ts +7 -7
  80. package/model/topHitsResponse.ts +1 -1
  81. package/model/topHitsResponseWithAnalytics.ts +1 -1
  82. package/model/topSearch.ts +3 -3
  83. package/model/topSearchWithAnalytics.ts +9 -9
  84. package/model/topSearchesResponse.ts +1 -1
  85. package/model/topSearchesResponseWithAnalytics.ts +1 -1
  86. package/model/userWithDate.ts +2 -2
  87. package/package.json +8 -7
@@ -17,7 +17,7 @@ import type { GetTopFiltersNoResultsResponse } from '../model/getTopFiltersNoRes
17
17
  import type { GetTopHitsResponse } from '../model/getTopHitsResponse';
18
18
  import type { GetTopSearchesResponse } from '../model/getTopSearchesResponse';
19
19
  import type { GetUsersCountResponse } from '../model/getUsersCountResponse';
20
- export declare const apiClientVersion = "5.0.0-alpha.73";
20
+ export declare const apiClientVersion = "5.0.0-alpha.76";
21
21
  export declare const REGIONS: readonly ["de", "us"];
22
22
  export type Region = (typeof REGIONS)[number];
23
23
  export declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
@@ -48,8 +48,8 @@ export declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiK
48
48
  *
49
49
  * @summary Send requests to the Algolia REST API.
50
50
  * @param del - The del object.
51
- * @param del.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
52
- * @param del.parameters - Query parameters to be applied to the current query.
51
+ * @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
52
+ * @param del.parameters - Query parameters to apply to the current query.
53
53
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
54
54
  */
55
55
  del({ path, parameters }: DelProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
@@ -58,234 +58,234 @@ export declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiK
58
58
  *
59
59
  * @summary Send requests to the Algolia REST API.
60
60
  * @param get - The get object.
61
- * @param get.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
62
- * @param get.parameters - Query parameters to be applied to the current query.
61
+ * @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
62
+ * @param get.parameters - Query parameters to apply to the current query.
63
63
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
64
64
  */
65
65
  get({ path, parameters }: GetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
66
66
  /**
67
- * Returns the average click position. The endpoint returns a value for the complete given time range, as well as a value per day.
67
+ * Return the average click position for the complete time range and for individual days. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn\'t receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
68
68
  *
69
69
  * @summary Get average click position.
70
70
  * @param getAverageClickPosition - The getAverageClickPosition object.
71
- * @param getAverageClickPosition.index - The index name to target.
72
- * @param getAverageClickPosition.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
73
- * @param getAverageClickPosition.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
74
- * @param getAverageClickPosition.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
71
+ * @param getAverageClickPosition.index - Index name to target.
72
+ * @param getAverageClickPosition.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
73
+ * @param getAverageClickPosition.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
74
+ * @param getAverageClickPosition.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
75
75
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
76
76
  */
77
77
  getAverageClickPosition({ index, startDate, endDate, tags }: GetAverageClickPositionProps, requestOptions?: RequestOptions): Promise<GetAverageClickPositionResponse>;
78
78
  /**
79
- * Returns the distribution of clicks per range of positions. If the groups all have a count of 0, it means Algolia didnt receive any click events for the queries with the clickAnalytics search parameter set to true. The count is 0 until Algolia receives at least one click event.
79
+ * Show the number of clicks events and their associated position in the search results. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn\'t receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
80
80
  *
81
- * @summary Get clicks per positions.
81
+ * @summary Get click positions.
82
82
  * @param getClickPositions - The getClickPositions object.
83
- * @param getClickPositions.index - The index name to target.
84
- * @param getClickPositions.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
85
- * @param getClickPositions.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
86
- * @param getClickPositions.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
83
+ * @param getClickPositions.index - Index name to target.
84
+ * @param getClickPositions.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
85
+ * @param getClickPositions.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
86
+ * @param getClickPositions.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
87
87
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
88
88
  */
89
89
  getClickPositions({ index, startDate, endDate, tags }: GetClickPositionsProps, requestOptions?: RequestOptions): Promise<GetClickPositionsResponse>;
90
90
  /**
91
- * Returns a click-through rate (CTR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of clicks and searches used to compute the rates.
91
+ * Returns a [click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
92
92
  *
93
93
  * @summary Get click-through rate (CTR).
94
94
  * @param getClickThroughRate - The getClickThroughRate object.
95
- * @param getClickThroughRate.index - The index name to target.
96
- * @param getClickThroughRate.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
97
- * @param getClickThroughRate.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
98
- * @param getClickThroughRate.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
95
+ * @param getClickThroughRate.index - Index name to target.
96
+ * @param getClickThroughRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
97
+ * @param getClickThroughRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
98
+ * @param getClickThroughRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
99
99
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
100
100
  */
101
101
  getClickThroughRate({ index, startDate, endDate, tags }: GetClickThroughRateProps, requestOptions?: RequestOptions): Promise<GetClickThroughRateResponse>;
102
102
  /**
103
- * Returns a conversion rate (CR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of conversion and searches used to compute the rates.
103
+ * Return a [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
104
104
  *
105
105
  * @summary Get conversion rate (CR).
106
106
  * @param getConversationRate - The getConversationRate object.
107
- * @param getConversationRate.index - The index name to target.
108
- * @param getConversationRate.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
109
- * @param getConversationRate.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
110
- * @param getConversationRate.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
107
+ * @param getConversationRate.index - Index name to target.
108
+ * @param getConversationRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
109
+ * @param getConversationRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
110
+ * @param getConversationRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
111
111
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
112
112
  */
113
113
  getConversationRate({ index, startDate, endDate, tags }: GetConversationRateProps, requestOptions?: RequestOptions): Promise<GetConversationRateResponse>;
114
114
  /**
115
- * Returns the rate at which searches didn\'t lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks.
115
+ * Returns the rate at which searches don\'t lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks.
116
116
  *
117
117
  * @summary Get no click rate.
118
118
  * @param getNoClickRate - The getNoClickRate object.
119
- * @param getNoClickRate.index - The index name to target.
120
- * @param getNoClickRate.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
121
- * @param getNoClickRate.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
122
- * @param getNoClickRate.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
119
+ * @param getNoClickRate.index - Index name to target.
120
+ * @param getNoClickRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
121
+ * @param getNoClickRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
122
+ * @param getNoClickRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
123
123
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
124
124
  */
125
125
  getNoClickRate({ index, startDate, endDate, tags }: GetNoClickRateProps, requestOptions?: RequestOptions): Promise<GetNoClickRateResponse>;
126
126
  /**
127
- * Returns the rate at which searches didn\'t return any results. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without results used to compute the rates.
127
+ * Returns the rate at which searches didn\'t return any results.
128
128
  *
129
129
  * @summary Get no results rate.
130
130
  * @param getNoResultsRate - The getNoResultsRate object.
131
- * @param getNoResultsRate.index - The index name to target.
132
- * @param getNoResultsRate.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
133
- * @param getNoResultsRate.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
134
- * @param getNoResultsRate.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
131
+ * @param getNoResultsRate.index - Index name to target.
132
+ * @param getNoResultsRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
133
+ * @param getNoResultsRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
134
+ * @param getNoResultsRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
135
135
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
136
136
  */
137
137
  getNoResultsRate({ index, startDate, endDate, tags }: GetNoResultsRateProps, requestOptions?: RequestOptions): Promise<GetNoResultsRateResponse>;
138
138
  /**
139
- * Returns the number of searches across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day.
139
+ * Returns the number of searches within a time range.
140
140
  *
141
- * @summary Get searches count.
141
+ * @summary Get number of searches.
142
142
  * @param getSearchesCount - The getSearchesCount object.
143
- * @param getSearchesCount.index - The index name to target.
144
- * @param getSearchesCount.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
145
- * @param getSearchesCount.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
146
- * @param getSearchesCount.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
143
+ * @param getSearchesCount.index - Index name to target.
144
+ * @param getSearchesCount.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
145
+ * @param getSearchesCount.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
146
+ * @param getSearchesCount.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
147
147
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
148
148
  */
149
149
  getSearchesCount({ index, startDate, endDate, tags }: GetSearchesCountProps, requestOptions?: RequestOptions): Promise<GetSearchesCountResponse>;
150
150
  /**
151
- * Returns top searches that didn\'t lead to any clicks. Limited to the 1000 most frequent ones. For each search, also returns the average number of found hits.
151
+ * Return the most popular of the last 1,000 searches that didn\'t lead to any clicks.
152
152
  *
153
153
  * @summary Get top searches with no clicks.
154
154
  * @param getSearchesNoClicks - The getSearchesNoClicks object.
155
- * @param getSearchesNoClicks.index - The index name to target.
156
- * @param getSearchesNoClicks.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
157
- * @param getSearchesNoClicks.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
158
- * @param getSearchesNoClicks.limit - Number of records to return. Limit is the size of the page.
155
+ * @param getSearchesNoClicks.index - Index name to target.
156
+ * @param getSearchesNoClicks.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
157
+ * @param getSearchesNoClicks.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
158
+ * @param getSearchesNoClicks.limit - Number of records to return (page size).
159
159
  * @param getSearchesNoClicks.offset - Position of the starting record. Used for paging. 0 is the first record.
160
- * @param getSearchesNoClicks.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
160
+ * @param getSearchesNoClicks.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
161
161
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
162
162
  */
163
163
  getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }: GetSearchesNoClicksProps, requestOptions?: RequestOptions): Promise<GetSearchesNoClicksResponse>;
164
164
  /**
165
- * Returns top searches that didn\'t return any results. Limited to the 1000 most frequent ones.
165
+ * Returns the most popular of the latest 1,000 searches that didn\'t return any results.
166
166
  *
167
167
  * @summary Get top searches with no results.
168
168
  * @param getSearchesNoResults - The getSearchesNoResults object.
169
- * @param getSearchesNoResults.index - The index name to target.
170
- * @param getSearchesNoResults.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
171
- * @param getSearchesNoResults.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
172
- * @param getSearchesNoResults.limit - Number of records to return. Limit is the size of the page.
169
+ * @param getSearchesNoResults.index - Index name to target.
170
+ * @param getSearchesNoResults.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
171
+ * @param getSearchesNoResults.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
172
+ * @param getSearchesNoResults.limit - Number of records to return (page size).
173
173
  * @param getSearchesNoResults.offset - Position of the starting record. Used for paging. 0 is the first record.
174
- * @param getSearchesNoResults.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
174
+ * @param getSearchesNoResults.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
175
175
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
176
176
  */
177
177
  getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }: GetSearchesNoResultsProps, requestOptions?: RequestOptions): Promise<GetSearchesNoResultsResponse>;
178
178
  /**
179
- * Returns the latest update time of the analytics API for a given index. If the index has been recently created and/or no search has been performed yet the updated time will be null.
179
+ * Return the latest update time of the Analytics API for an index. If the index has been recently created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The Analytics API is updated every 5&nbsp;minutes.
180
180
  *
181
181
  * @summary Get Analytics API status.
182
182
  * @param getStatus - The getStatus object.
183
- * @param getStatus.index - The index name to target.
183
+ * @param getStatus.index - Index name to target.
184
184
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
185
185
  */
186
186
  getStatus({ index }: GetStatusProps, requestOptions?: RequestOptions): Promise<GetStatusResponse>;
187
187
  /**
188
- * Returns top countries. Limited to the 1000 most frequent ones.
188
+ * Returns top countries. Limited to the 1,000 most frequent ones.
189
189
  *
190
190
  * @summary Get top countries.
191
191
  * @param getTopCountries - The getTopCountries object.
192
- * @param getTopCountries.index - The index name to target.
193
- * @param getTopCountries.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
194
- * @param getTopCountries.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
195
- * @param getTopCountries.limit - Number of records to return. Limit is the size of the page.
192
+ * @param getTopCountries.index - Index name to target.
193
+ * @param getTopCountries.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
194
+ * @param getTopCountries.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
195
+ * @param getTopCountries.limit - Number of records to return (page size).
196
196
  * @param getTopCountries.offset - Position of the starting record. Used for paging. 0 is the first record.
197
- * @param getTopCountries.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
197
+ * @param getTopCountries.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
198
198
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
199
199
  */
200
200
  getTopCountries({ index, startDate, endDate, limit, offset, tags }: GetTopCountriesProps, requestOptions?: RequestOptions): Promise<GetTopCountriesResponse>;
201
201
  /**
202
- * Returns top filter attributes. Limited to the 1000 most used filters.
202
+ * Return the most popular [filterable attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in the 1,000 most recently used filters.
203
203
  *
204
- * @summary Get top filter attributes.
204
+ * @summary Get top filterable attributes.
205
205
  * @param getTopFilterAttributes - The getTopFilterAttributes object.
206
- * @param getTopFilterAttributes.index - The index name to target.
207
- * @param getTopFilterAttributes.search - The query term to search for. Must match the exact user input.
208
- * @param getTopFilterAttributes.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
209
- * @param getTopFilterAttributes.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
210
- * @param getTopFilterAttributes.limit - Number of records to return. Limit is the size of the page.
206
+ * @param getTopFilterAttributes.index - Index name to target.
207
+ * @param getTopFilterAttributes.search - User query.
208
+ * @param getTopFilterAttributes.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
209
+ * @param getTopFilterAttributes.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
210
+ * @param getTopFilterAttributes.limit - Number of records to return (page size).
211
211
  * @param getTopFilterAttributes.offset - Position of the starting record. Used for paging. 0 is the first record.
212
- * @param getTopFilterAttributes.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
212
+ * @param getTopFilterAttributes.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
213
213
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
214
214
  */
215
215
  getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }: GetTopFilterAttributesProps, requestOptions?: RequestOptions): Promise<GetTopFilterAttributesResponse>;
216
216
  /**
217
- * Returns top filters for the given attribute. Limited to the 1000 most used filters.
217
+ * Returns the most popular filter values for an attribute in the 1,000 most recently used filters.
218
218
  *
219
- * @summary Get top filters for the an attribute.
219
+ * @summary Get top filter values for an attribute.
220
220
  * @param getTopFilterForAttribute - The getTopFilterForAttribute object.
221
- * @param getTopFilterForAttribute.attribute - The exact name of the attribute.
222
- * @param getTopFilterForAttribute.index - The index name to target.
223
- * @param getTopFilterForAttribute.search - The query term to search for. Must match the exact user input.
224
- * @param getTopFilterForAttribute.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
225
- * @param getTopFilterForAttribute.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
226
- * @param getTopFilterForAttribute.limit - Number of records to return. Limit is the size of the page.
221
+ * @param getTopFilterForAttribute.attribute - Attribute name.
222
+ * @param getTopFilterForAttribute.index - Index name to target.
223
+ * @param getTopFilterForAttribute.search - User query.
224
+ * @param getTopFilterForAttribute.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
225
+ * @param getTopFilterForAttribute.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
226
+ * @param getTopFilterForAttribute.limit - Number of records to return (page size).
227
227
  * @param getTopFilterForAttribute.offset - Position of the starting record. Used for paging. 0 is the first record.
228
- * @param getTopFilterForAttribute.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
228
+ * @param getTopFilterForAttribute.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
229
229
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
230
230
  */
231
231
  getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }: GetTopFilterForAttributeProps, requestOptions?: RequestOptions): Promise<GetTopFilterForAttributeResponse>;
232
232
  /**
233
- * Returns top filters with no results. Limited to the 1000 most used filters.
233
+ * Returns top filters for filter-enabled searches that don\'t return results. Limited to the 1,000 most recently used filters.
234
234
  *
235
235
  * @summary Get top filters for a no result search.
236
236
  * @param getTopFiltersNoResults - The getTopFiltersNoResults object.
237
- * @param getTopFiltersNoResults.index - The index name to target.
238
- * @param getTopFiltersNoResults.search - The query term to search for. Must match the exact user input.
239
- * @param getTopFiltersNoResults.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
240
- * @param getTopFiltersNoResults.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
241
- * @param getTopFiltersNoResults.limit - Number of records to return. Limit is the size of the page.
237
+ * @param getTopFiltersNoResults.index - Index name to target.
238
+ * @param getTopFiltersNoResults.search - User query.
239
+ * @param getTopFiltersNoResults.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
240
+ * @param getTopFiltersNoResults.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
241
+ * @param getTopFiltersNoResults.limit - Number of records to return (page size).
242
242
  * @param getTopFiltersNoResults.offset - Position of the starting record. Used for paging. 0 is the first record.
243
- * @param getTopFiltersNoResults.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
243
+ * @param getTopFiltersNoResults.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
244
244
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
245
245
  */
246
246
  getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }: GetTopFiltersNoResultsProps, requestOptions?: RequestOptions): Promise<GetTopFiltersNoResultsResponse>;
247
247
  /**
248
- * Returns top hits. Limited to the 1000 most frequent ones.
248
+ * Return the most popular clicked results in the last 1,000 searches.
249
249
  *
250
250
  * @summary Get top hits.
251
251
  * @param getTopHits - The getTopHits object.
252
- * @param getTopHits.index - The index name to target.
253
- * @param getTopHits.search - The query term to search for. Must match the exact user input.
254
- * @param getTopHits.clickAnalytics - Whether to include the click-through and conversion rates for a search.
255
- * @param getTopHits.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
256
- * @param getTopHits.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
257
- * @param getTopHits.limit - Number of records to return. Limit is the size of the page.
252
+ * @param getTopHits.index - Index name to target.
253
+ * @param getTopHits.search - User query.
254
+ * @param getTopHits.clickAnalytics - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search.
255
+ * @param getTopHits.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
256
+ * @param getTopHits.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
257
+ * @param getTopHits.limit - Number of records to return (page size).
258
258
  * @param getTopHits.offset - Position of the starting record. Used for paging. 0 is the first record.
259
- * @param getTopHits.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
259
+ * @param getTopHits.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
260
260
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
261
261
  */
262
262
  getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }: GetTopHitsProps, requestOptions?: RequestOptions): Promise<GetTopHitsResponse>;
263
263
  /**
264
- * Returns top searches. Limited to the 1000 most frequent ones. For each search, also returns the average number of hits returned.
264
+ * Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits.
265
265
  *
266
266
  * @summary Get top searches.
267
267
  * @param getTopSearches - The getTopSearches object.
268
- * @param getTopSearches.index - The index name to target.
269
- * @param getTopSearches.clickAnalytics - Whether to include the click-through and conversion rates for a search.
270
- * @param getTopSearches.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
271
- * @param getTopSearches.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
268
+ * @param getTopSearches.index - Index name to target.
269
+ * @param getTopSearches.clickAnalytics - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search.
270
+ * @param getTopSearches.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
271
+ * @param getTopSearches.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
272
272
  * @param getTopSearches.orderBy - Reorder the results.
273
- * @param getTopSearches.direction - The sorting of the result.
274
- * @param getTopSearches.limit - Number of records to return. Limit is the size of the page.
273
+ * @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
274
+ * @param getTopSearches.limit - Number of records to return (page size).
275
275
  * @param getTopSearches.offset - Position of the starting record. Used for paging. 0 is the first record.
276
- * @param getTopSearches.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
276
+ * @param getTopSearches.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
277
277
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
278
278
  */
279
279
  getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }: GetTopSearchesProps, requestOptions?: RequestOptions): Promise<GetTopSearchesResponse>;
280
280
  /**
281
- * Returns the distinct count of users across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day.
281
+ * Return the count of unique users.
282
282
  *
283
- * @summary Get users count.
283
+ * @summary Get user count.
284
284
  * @param getUsersCount - The getUsersCount object.
285
- * @param getUsersCount.index - The index name to target.
286
- * @param getUsersCount.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
287
- * @param getUsersCount.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
288
- * @param getUsersCount.tags - Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
285
+ * @param getUsersCount.index - Index name to target.
286
+ * @param getUsersCount.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
287
+ * @param getUsersCount.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
288
+ * @param getUsersCount.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
289
289
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
290
290
  */
291
291
  getUsersCount({ index, startDate, endDate, tags }: GetUsersCountProps, requestOptions?: RequestOptions): Promise<GetUsersCountResponse>;
@@ -294,9 +294,9 @@ export declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiK
294
294
  *
295
295
  * @summary Send requests to the Algolia REST API.
296
296
  * @param post - The post object.
297
- * @param post.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
298
- * @param post.parameters - Query parameters to be applied to the current query.
299
- * @param post.body - The parameters to send with the custom request.
297
+ * @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
298
+ * @param post.parameters - Query parameters to apply to the current query.
299
+ * @param post.body - Parameters to send with the custom request.
300
300
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
301
301
  */
302
302
  post({ path, parameters, body }: PostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
@@ -305,9 +305,9 @@ export declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiK
305
305
  *
306
306
  * @summary Send requests to the Algolia REST API.
307
307
  * @param put - The put object.
308
- * @param put.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
309
- * @param put.parameters - Query parameters to be applied to the current query.
310
- * @param put.body - The parameters to send with the custom request.
308
+ * @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
309
+ * @param put.parameters - Query parameters to apply to the current query.
310
+ * @param put.body - Parameters to send with the custom request.
311
311
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
312
312
  */
313
313
  put({ path, parameters, body }: PutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
@@ -2,17 +2,17 @@
2
2
 
3
3
  export type AverageClickEvent = {
4
4
  /**
5
- * The average of all the click count event.
5
+ * Average count of all click events.
6
6
  */
7
7
  average: number;
8
8
 
9
9
  /**
10
- * The number of click event.
10
+ * Number of click events.
11
11
  */
12
12
  clickCount: number;
13
13
 
14
14
  /**
15
- * Date of the event.
15
+ * Date of the event in the format YYYY-MM-DD.
16
16
  */
17
17
  date: string;
18
18
  };
@@ -2,12 +2,12 @@
2
2
 
3
3
  export type ClickPosition = {
4
4
  /**
5
- * Range of positions with the following pattern: - Positions from 1 to 10 included are displayed in separated groups. - Positions from 11 to 20 included are grouped together. - Positions from 21 and up are grouped together.
5
+ * Range of positions with the following pattern: - For positions 1 to 10, the number of click events are shown for each position - For positions 11 to 20, all click events are grouped - For positions 21 and up, all click events are grouped.
6
6
  */
7
7
  position: number[];
8
8
 
9
9
  /**
10
- * The number of click event.
10
+ * Number of click events.
11
11
  */
12
12
  clickCount: number;
13
13
  };
@@ -2,22 +2,22 @@
2
2
 
3
3
  export type ClickThroughRateEvent = {
4
4
  /**
5
- * The click-through rate.
5
+ * [Click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
6
6
  */
7
7
  rate: number;
8
8
 
9
9
  /**
10
- * The number of click event.
10
+ * Number of click events.
11
11
  */
12
12
  clickCount: number;
13
13
 
14
14
  /**
15
- * The number of tracked search click.
15
+ * Number of tracked searches. This is the number of search requests where the `clickAnalytics` parameter is `true`.
16
16
  */
17
17
  trackedSearchCount: number;
18
18
 
19
19
  /**
20
- * Date of the event.
20
+ * Date of the event in the format YYYY-MM-DD.
21
21
  */
22
22
  date: string;
23
23
  };