Skip to content

Commit

Permalink
fix(specs): update analytics and abtesting max pagination query limit…
Browse files Browse the repository at this point in the history
… (generated)

algolia/api-clients-automation#3696

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Fernando Beck <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
3 people committed Oct 3, 2024
1 parent 56eb220 commit 8805c6d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 45 deletions.
32 changes: 16 additions & 16 deletions packages/client-analytics/model/clientMethodProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@ export type GetSearchesNoClicksProps = {
*/
endDate?: string;
/**
* Number of items to return.
* Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
*/
limit?: number;
/**
* Position of the first item to return.
* Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
*/
offset?: number;
/**
Expand All @@ -334,11 +334,11 @@ export type GetSearchesNoResultsProps = {
*/
endDate?: string;
/**
* Number of items to return.
* Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
*/
limit?: number;
/**
* Position of the first item to return.
* Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
*/
offset?: number;
/**
Expand Down Expand Up @@ -374,11 +374,11 @@ export type GetTopCountriesProps = {
*/
endDate?: string;
/**
* Number of items to return.
* Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
*/
limit?: number;
/**
* Position of the first item to return.
* Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
*/
offset?: number;
/**
Expand Down Expand Up @@ -408,11 +408,11 @@ export type GetTopFilterAttributesProps = {
*/
endDate?: string;
/**
* Number of items to return.
* Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
*/
limit?: number;
/**
* Position of the first item to return.
* Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
*/
offset?: number;
/**
Expand Down Expand Up @@ -446,11 +446,11 @@ export type GetTopFilterForAttributeProps = {
*/
endDate?: string;
/**
* Number of items to return.
* Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
*/
limit?: number;
/**
* Position of the first item to return.
* Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
*/
offset?: number;
/**
Expand Down Expand Up @@ -480,11 +480,11 @@ export type GetTopFiltersNoResultsProps = {
*/
endDate?: string;
/**
* Number of items to return.
* Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
*/
limit?: number;
/**
* Position of the first item to return.
* Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
*/
offset?: number;
/**
Expand Down Expand Up @@ -522,11 +522,11 @@ export type GetTopHitsProps = {
*/
endDate?: string;
/**
* Number of items to return.
* Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
*/
limit?: number;
/**
* Position of the first item to return.
* Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
*/
offset?: number;
/**
Expand Down Expand Up @@ -568,11 +568,11 @@ export type GetTopSearchesProps = {
*/
direction?: Direction;
/**
* Number of items to return.
* Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
*/
limit?: number;
/**
* Position of the first item to return.
* Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
*/
offset?: number;
/**
Expand Down
60 changes: 31 additions & 29 deletions packages/client-analytics/src/analyticsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ export function createAnalyticsClient({
if (index !== undefined) {
queryParameters.index = index.toString();
}

if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}
Expand Down Expand Up @@ -343,7 +342,6 @@ export function createAnalyticsClient({
if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}

if (endDate !== undefined) {
queryParameters.endDate = endDate.toString();
}
Expand Down Expand Up @@ -388,13 +386,13 @@ export function createAnalyticsClient({
if (index !== undefined) {
queryParameters.index = index.toString();
}

if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}
if (endDate !== undefined) {
queryParameters.endDate = endDate.toString();
}

if (tags !== undefined) {
queryParameters.tags = tags.toString();
}
Expand Down Expand Up @@ -433,13 +431,14 @@ export function createAnalyticsClient({
const requestPath = '/2/clicks/clickThroughRate';
const headers: Headers = {};
const queryParameters: QueryParameters = {};

if (index !== undefined) {
queryParameters.index = index.toString();
}

if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}

if (endDate !== undefined) {
queryParameters.endDate = endDate.toString();
}
Expand Down Expand Up @@ -484,13 +483,13 @@ export function createAnalyticsClient({
if (index !== undefined) {
queryParameters.index = index.toString();
}

if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}
if (endDate !== undefined) {
queryParameters.endDate = endDate.toString();
}

if (tags !== undefined) {
queryParameters.tags = tags.toString();
}
Expand Down Expand Up @@ -627,7 +626,6 @@ export function createAnalyticsClient({
if (index !== undefined) {
queryParameters.index = index.toString();
}

if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}
Expand Down Expand Up @@ -675,9 +673,11 @@ export function createAnalyticsClient({
if (index !== undefined) {
queryParameters.index = index.toString();
}

if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}

if (endDate !== undefined) {
queryParameters.endDate = endDate.toString();
}
Expand Down Expand Up @@ -722,13 +722,13 @@ export function createAnalyticsClient({
if (index !== undefined) {
queryParameters.index = index.toString();
}

if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}
if (endDate !== undefined) {
queryParameters.endDate = endDate.toString();
}

if (tags !== undefined) {
queryParameters.tags = tags.toString();
}
Expand All @@ -753,8 +753,8 @@ export function createAnalyticsClient({
* @param getSearchesNoClicks.index - Index name.
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getSearchesNoClicks.limit - Number of items to return.
* @param getSearchesNoClicks.offset - Position of the first item to return.
* @param getSearchesNoClicks.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
* @param getSearchesNoClicks.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
* @param getSearchesNoClicks.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
Expand All @@ -772,6 +772,7 @@ export function createAnalyticsClient({
if (index !== undefined) {
queryParameters.index = index.toString();
}

if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}
Expand All @@ -781,10 +782,10 @@ export function createAnalyticsClient({
if (limit !== undefined) {
queryParameters.limit = limit.toString();
}

if (offset !== undefined) {
queryParameters.offset = offset.toString();
}

if (tags !== undefined) {
queryParameters.tags = tags.toString();
}
Expand All @@ -809,8 +810,8 @@ export function createAnalyticsClient({
* @param getSearchesNoResults.index - Index name.
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getSearchesNoResults.limit - Number of items to return.
* @param getSearchesNoResults.offset - Position of the first item to return.
* @param getSearchesNoResults.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
* @param getSearchesNoResults.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
* @param getSearchesNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
Expand Down Expand Up @@ -838,10 +839,10 @@ export function createAnalyticsClient({
if (limit !== undefined) {
queryParameters.limit = limit.toString();
}

if (offset !== undefined) {
queryParameters.offset = offset.toString();
}

if (tags !== undefined) {
queryParameters.tags = tags.toString();
}
Expand Down Expand Up @@ -898,8 +899,8 @@ export function createAnalyticsClient({
* @param getTopCountries.index - Index name.
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopCountries.limit - Number of items to return.
* @param getTopCountries.offset - Position of the first item to return.
* @param getTopCountries.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
* @param getTopCountries.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
* @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
Expand All @@ -926,7 +927,6 @@ export function createAnalyticsClient({
if (limit !== undefined) {
queryParameters.limit = limit.toString();
}

if (offset !== undefined) {
queryParameters.offset = offset.toString();
}
Expand Down Expand Up @@ -955,8 +955,8 @@ export function createAnalyticsClient({
* @param getTopFilterAttributes.search - Search query.
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFilterAttributes.limit - Number of items to return.
* @param getTopFilterAttributes.offset - Position of the first item to return.
* @param getTopFilterAttributes.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
* @param getTopFilterAttributes.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
* @param getTopFilterAttributes.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
Expand All @@ -971,7 +971,6 @@ export function createAnalyticsClient({
const requestPath = '/2/filters';
const headers: Headers = {};
const queryParameters: QueryParameters = {};

if (index !== undefined) {
queryParameters.index = index.toString();
}
Expand All @@ -981,13 +980,13 @@ export function createAnalyticsClient({
if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}

if (endDate !== undefined) {
queryParameters.endDate = endDate.toString();
}
if (limit !== undefined) {
queryParameters.limit = limit.toString();
}

if (offset !== undefined) {
queryParameters.offset = offset.toString();
}
Expand Down Expand Up @@ -1017,8 +1016,8 @@ export function createAnalyticsClient({
* @param getTopFilterForAttribute.search - Search query.
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFilterForAttribute.limit - Number of items to return.
* @param getTopFilterForAttribute.offset - Position of the first item to return.
* @param getTopFilterForAttribute.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
* @param getTopFilterForAttribute.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
* @param getTopFilterForAttribute.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
Expand All @@ -1040,10 +1039,10 @@ export function createAnalyticsClient({
if (index !== undefined) {
queryParameters.index = index.toString();
}

if (search !== undefined) {
queryParameters.search = search.toString();
}

if (startDate !== undefined) {
queryParameters.startDate = startDate.toString();
}
Expand All @@ -1053,6 +1052,7 @@ export function createAnalyticsClient({
if (limit !== undefined) {
queryParameters.limit = limit.toString();
}

if (offset !== undefined) {
queryParameters.offset = offset.toString();
}
Expand Down Expand Up @@ -1081,8 +1081,8 @@ export function createAnalyticsClient({
* @param getTopFiltersNoResults.search - Search query.
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFiltersNoResults.limit - Number of items to return.
* @param getTopFiltersNoResults.offset - Position of the first item to return.
* @param getTopFiltersNoResults.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
* @param getTopFiltersNoResults.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
* @param getTopFiltersNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
Expand Down Expand Up @@ -1113,6 +1113,7 @@ export function createAnalyticsClient({
if (limit !== undefined) {
queryParameters.limit = limit.toString();
}

if (offset !== undefined) {
queryParameters.offset = offset.toString();
}
Expand Down Expand Up @@ -1143,8 +1144,8 @@ export function createAnalyticsClient({
* @param getTopHits.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopHits.limit - Number of items to return.
* @param getTopHits.offset - Position of the first item to return.
* @param getTopHits.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
* @param getTopHits.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
* @param getTopHits.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
Expand Down Expand Up @@ -1213,8 +1214,8 @@ export function createAnalyticsClient({
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
* @param getTopSearches.limit - Number of items to return.
* @param getTopSearches.offset - Position of the first item to return.
* @param getTopSearches.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
* @param getTopSearches.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
* @param getTopSearches.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
Expand Down Expand Up @@ -1262,6 +1263,7 @@ export function createAnalyticsClient({
if (direction !== undefined) {
queryParameters.direction = direction.toString();
}

if (limit !== undefined) {
queryParameters.limit = limit.toString();
}
Expand Down

0 comments on commit 8805c6d

Please sign in to comment.