From b2a41b6f2cac72b7fb2482d0a84df7113e8518f2 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Tue, 17 Jun 2025 15:48:26 +0000 Subject: [PATCH 1/5] fix(specs): fix type in realtime_user (generated) https://github.com/algolia/api-clients-automation/pull/5012 Co-authored-by: algolia-bot Co-authored-by: Raed Co-authored-by: shortcuts --- packages/advanced-personalization/model/index.ts | 2 +- .../model/{realtimeUserUser.ts => realtimeUser.ts} | 2 +- .../src/advancedPersonalizationClient.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename packages/advanced-personalization/model/{realtimeUserUser.ts => realtimeUser.ts} (93%) diff --git a/packages/advanced-personalization/model/index.ts b/packages/advanced-personalization/model/index.ts index bb5123e50..93aabc7ce 100644 --- a/packages/advanced-personalization/model/index.ts +++ b/packages/advanced-personalization/model/index.ts @@ -42,7 +42,7 @@ export * from './personalizationReRanking'; export * from './profileType'; export * from './putConfigResponse'; export * from './realtime'; -export * from './realtimeUserUser'; +export * from './realtimeUser'; export * from './searchFilter'; export * from './searchFilters'; export * from './source'; diff --git a/packages/advanced-personalization/model/realtimeUserUser.ts b/packages/advanced-personalization/model/realtimeUser.ts similarity index 93% rename from packages/advanced-personalization/model/realtimeUserUser.ts rename to packages/advanced-personalization/model/realtimeUser.ts index 4542938ae..b93b2ddc9 100644 --- a/packages/advanced-personalization/model/realtimeUserUser.ts +++ b/packages/advanced-personalization/model/realtimeUser.ts @@ -2,7 +2,7 @@ import type { SearchFilters } from './searchFilters'; -export type RealtimeUserUser = { +export type RealtimeUser = { /** * Version of the response format. */ diff --git a/packages/advanced-personalization/src/advancedPersonalizationClient.ts b/packages/advanced-personalization/src/advancedPersonalizationClient.ts index 16d40d5b3..e6d54da5b 100644 --- a/packages/advanced-personalization/src/advancedPersonalizationClient.ts +++ b/packages/advanced-personalization/src/advancedPersonalizationClient.ts @@ -18,7 +18,7 @@ import type { DeleteUserResponse } from '../model/deleteUserResponse'; import type { GetUsersResponse } from '../model/getUsersResponse'; import type { PutConfigResponse } from '../model/putConfigResponse'; -import type { RealtimeUserUser } from '../model/realtimeUserUser'; +import type { RealtimeUser } from '../model/realtimeUser'; import type { User } from '../model/user'; @@ -336,7 +336,7 @@ export function createAdvancedPersonalizationClient({ * @param getRealtimeUser.userToken - Unique identifier representing a user for which to fetch the personalization profile. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ - getRealtimeUser({ userToken }: GetRealtimeUserProps, requestOptions?: RequestOptions): Promise { + getRealtimeUser({ userToken }: GetRealtimeUserProps, requestOptions?: RequestOptions): Promise { if (!userToken) { throw new Error('Parameter `userToken` is required when calling `getRealtimeUser`.'); } From 2a00209a7ce5b2fdd448f60d38ddf07d8028a643 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Wed, 18 Jun 2025 14:28:04 +0000 Subject: [PATCH 2/5] feat(javascript): add `replaceAllObjectsWithTransformation` (generated) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/algolia/api-clients-automation/pull/5008 Co-authored-by: algolia-bot Co-authored-by: Clément Vannicatte --- packages/algoliasearch/builds/browser.ts | 186 +++++++++++++++++- packages/algoliasearch/builds/fetch.ts | 186 +++++++++++++++++- packages/algoliasearch/builds/node.ts | 186 +++++++++++++++++- packages/algoliasearch/builds/worker.ts | 186 +++++++++++++++++- packages/client-search/model/index.ts | 1 + ...aceAllObjectsWithTransformationResponse.ts | 15 ++ packages/client-search/src/searchClient.ts | 1 + 7 files changed, 753 insertions(+), 8 deletions(-) create mode 100644 packages/client-search/model/replaceAllObjectsWithTransformationResponse.ts diff --git a/packages/algoliasearch/builds/browser.ts b/packages/algoliasearch/builds/browser.ts index 8aeb04035..f893933b1 100644 --- a/packages/algoliasearch/builds/browser.ts +++ b/packages/algoliasearch/builds/browser.ts @@ -1,6 +1,7 @@ // 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. -import type { ClientOptions, RequestOptions } from '@algolia/client-common'; +import type { ApiError, ClientOptions, RequestOptions } from '@algolia/client-common'; +import { createIterablePromise } from '@algolia/client-common'; import type { AbtestingClient } from '@algolia/client-abtesting'; import { abtestingClient } from '@algolia/client-abtesting'; @@ -21,7 +22,13 @@ import { monitoringClient } from '@algolia/monitoring'; import type { RecommendClient } from '@algolia/recommend'; import { recommendClient } from '@algolia/recommend'; -import type { PartialUpdateObjectsOptions, SaveObjectsOptions } from '@algolia/client-search'; +import type { + ChunkedBatchOptions, + PartialUpdateObjectsOptions, + ReplaceAllObjectsOptions, + ReplaceAllObjectsWithTransformationResponse, + SaveObjectsOptions, +} from '@algolia/client-search'; import type { PushTaskRecords, WatchResponse } from '@algolia/ingestion'; import type { @@ -81,6 +88,36 @@ export type Algoliasearch = SearchClient & { options: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined, ) => Promise; + + /** + * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. + * + * @summary Helper: Replaces all objects (records) in the given `index_name` by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) with the given `objects`. A temporary index is created during this process in order to backup your data. + * @param replaceAllObjects - The `replaceAllObjects` object. + * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in. + * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`. + * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000. + * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms']. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push`, `operationIndex` and `getEvent` method and merged with the transporter requestOptions. + */ + replaceAllObjectsWithTransformation: ( + options: ReplaceAllObjectsOptions, + requestOptions?: RequestOptions | undefined, + ) => Promise; + + /** + * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/). + * + * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests. + * @param chunkedPush - The `chunkedPush` object. + * @param chunkedPush.indexName - The `indexName` to replace `objects` in. + * @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`. + * @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`. + * @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. + * @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions. + */ + chunkedPush: (options: ChunkedBatchOptions, requestOptions?: RequestOptions) => Promise>; }; export type TransformationOptions = { @@ -168,6 +205,151 @@ export function algoliasearch( ); }, + async chunkedPush( + { indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000 }: ChunkedBatchOptions, + requestOptions?: RequestOptions, + ): Promise> { + if (!ingestionTransporter) { + throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); + } + + if (!options?.transformation?.region) { + throw new Error('`region` must be provided when leveraging the transformation pipeline'); + } + + let records: Array = []; + const responses: Array = []; + + const objectEntries = objects.entries(); + for (const [i, obj] of objectEntries) { + records.push(obj as PushTaskRecords); + if (records.length === batchSize || i === objects.length - 1) { + responses.push( + await ingestionTransporter.push( + { indexName, pushTaskPayload: { action, records }, watch: waitForTasks }, + requestOptions, + ), + ); + records = []; + } + } + + let retryCount = 0; + + if (waitForTasks) { + for (const resp of responses) { + if (!resp.eventID) { + throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); + } + + await createIterablePromise({ + func: async () => { + if (resp.eventID === undefined || !resp.eventID) { + throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); + } + + return ingestionTransporter + .getEvent({ runID: resp.runID, eventID: resp.eventID }) + .catch((error: ApiError) => { + if (error.status === 404) { + return undefined; + } + + throw error; + }); + }, + validate: (response) => response !== undefined, + aggregator: () => (retryCount += 1), + error: { + validate: () => retryCount >= 50, + message: () => `The maximum number of retries exceeded. (${retryCount}/${50})`, + }, + timeout: (): number => Math.min(retryCount * 500, 5000), + }); + } + } + + return responses; + }, + + async replaceAllObjectsWithTransformation( + { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, + requestOptions?: RequestOptions | undefined, + ): Promise { + if (!ingestionTransporter) { + throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); + } + + if (!options?.transformation?.region) { + throw new Error('`region` must be provided when leveraging the transformation pipeline'); + } + + const randomSuffix = Math.floor(Math.random() * 1000000) + 100000; + const tmpIndexName = `${indexName}_tmp_${randomSuffix}`; + + if (scopes === undefined) { + scopes = ['settings', 'rules', 'synonyms']; + } + + try { + let copyOperationResponse = await this.operationIndex( + { + indexName, + operationIndexParams: { + operation: 'copy', + destination: tmpIndexName, + scope: scopes, + }, + }, + requestOptions, + ); + + const watchResponses = await this.chunkedPush( + { indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, + requestOptions, + ); + + await this.waitForTask({ + indexName: tmpIndexName, + taskID: copyOperationResponse.taskID, + }); + + copyOperationResponse = await this.operationIndex( + { + indexName, + operationIndexParams: { + operation: 'copy', + destination: tmpIndexName, + scope: scopes, + }, + }, + requestOptions, + ); + await this.waitForTask({ + indexName: tmpIndexName, + taskID: copyOperationResponse.taskID, + }); + + const moveOperationResponse = await this.operationIndex( + { + indexName: tmpIndexName, + operationIndexParams: { operation: 'move', destination: indexName }, + }, + requestOptions, + ); + await this.waitForTask({ + indexName: tmpIndexName, + taskID: moveOperationResponse.taskID, + }); + + return { copyOperationResponse, watchResponses, moveOperationResponse }; + } catch (error) { + await this.deleteIndex({ indexName: tmpIndexName }); + + throw error; + } + }, + /** * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system. */ diff --git a/packages/algoliasearch/builds/fetch.ts b/packages/algoliasearch/builds/fetch.ts index 8aeb04035..f893933b1 100644 --- a/packages/algoliasearch/builds/fetch.ts +++ b/packages/algoliasearch/builds/fetch.ts @@ -1,6 +1,7 @@ // 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. -import type { ClientOptions, RequestOptions } from '@algolia/client-common'; +import type { ApiError, ClientOptions, RequestOptions } from '@algolia/client-common'; +import { createIterablePromise } from '@algolia/client-common'; import type { AbtestingClient } from '@algolia/client-abtesting'; import { abtestingClient } from '@algolia/client-abtesting'; @@ -21,7 +22,13 @@ import { monitoringClient } from '@algolia/monitoring'; import type { RecommendClient } from '@algolia/recommend'; import { recommendClient } from '@algolia/recommend'; -import type { PartialUpdateObjectsOptions, SaveObjectsOptions } from '@algolia/client-search'; +import type { + ChunkedBatchOptions, + PartialUpdateObjectsOptions, + ReplaceAllObjectsOptions, + ReplaceAllObjectsWithTransformationResponse, + SaveObjectsOptions, +} from '@algolia/client-search'; import type { PushTaskRecords, WatchResponse } from '@algolia/ingestion'; import type { @@ -81,6 +88,36 @@ export type Algoliasearch = SearchClient & { options: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined, ) => Promise; + + /** + * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. + * + * @summary Helper: Replaces all objects (records) in the given `index_name` by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) with the given `objects`. A temporary index is created during this process in order to backup your data. + * @param replaceAllObjects - The `replaceAllObjects` object. + * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in. + * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`. + * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000. + * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms']. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push`, `operationIndex` and `getEvent` method and merged with the transporter requestOptions. + */ + replaceAllObjectsWithTransformation: ( + options: ReplaceAllObjectsOptions, + requestOptions?: RequestOptions | undefined, + ) => Promise; + + /** + * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/). + * + * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests. + * @param chunkedPush - The `chunkedPush` object. + * @param chunkedPush.indexName - The `indexName` to replace `objects` in. + * @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`. + * @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`. + * @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. + * @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions. + */ + chunkedPush: (options: ChunkedBatchOptions, requestOptions?: RequestOptions) => Promise>; }; export type TransformationOptions = { @@ -168,6 +205,151 @@ export function algoliasearch( ); }, + async chunkedPush( + { indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000 }: ChunkedBatchOptions, + requestOptions?: RequestOptions, + ): Promise> { + if (!ingestionTransporter) { + throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); + } + + if (!options?.transformation?.region) { + throw new Error('`region` must be provided when leveraging the transformation pipeline'); + } + + let records: Array = []; + const responses: Array = []; + + const objectEntries = objects.entries(); + for (const [i, obj] of objectEntries) { + records.push(obj as PushTaskRecords); + if (records.length === batchSize || i === objects.length - 1) { + responses.push( + await ingestionTransporter.push( + { indexName, pushTaskPayload: { action, records }, watch: waitForTasks }, + requestOptions, + ), + ); + records = []; + } + } + + let retryCount = 0; + + if (waitForTasks) { + for (const resp of responses) { + if (!resp.eventID) { + throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); + } + + await createIterablePromise({ + func: async () => { + if (resp.eventID === undefined || !resp.eventID) { + throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); + } + + return ingestionTransporter + .getEvent({ runID: resp.runID, eventID: resp.eventID }) + .catch((error: ApiError) => { + if (error.status === 404) { + return undefined; + } + + throw error; + }); + }, + validate: (response) => response !== undefined, + aggregator: () => (retryCount += 1), + error: { + validate: () => retryCount >= 50, + message: () => `The maximum number of retries exceeded. (${retryCount}/${50})`, + }, + timeout: (): number => Math.min(retryCount * 500, 5000), + }); + } + } + + return responses; + }, + + async replaceAllObjectsWithTransformation( + { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, + requestOptions?: RequestOptions | undefined, + ): Promise { + if (!ingestionTransporter) { + throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); + } + + if (!options?.transformation?.region) { + throw new Error('`region` must be provided when leveraging the transformation pipeline'); + } + + const randomSuffix = Math.floor(Math.random() * 1000000) + 100000; + const tmpIndexName = `${indexName}_tmp_${randomSuffix}`; + + if (scopes === undefined) { + scopes = ['settings', 'rules', 'synonyms']; + } + + try { + let copyOperationResponse = await this.operationIndex( + { + indexName, + operationIndexParams: { + operation: 'copy', + destination: tmpIndexName, + scope: scopes, + }, + }, + requestOptions, + ); + + const watchResponses = await this.chunkedPush( + { indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, + requestOptions, + ); + + await this.waitForTask({ + indexName: tmpIndexName, + taskID: copyOperationResponse.taskID, + }); + + copyOperationResponse = await this.operationIndex( + { + indexName, + operationIndexParams: { + operation: 'copy', + destination: tmpIndexName, + scope: scopes, + }, + }, + requestOptions, + ); + await this.waitForTask({ + indexName: tmpIndexName, + taskID: copyOperationResponse.taskID, + }); + + const moveOperationResponse = await this.operationIndex( + { + indexName: tmpIndexName, + operationIndexParams: { operation: 'move', destination: indexName }, + }, + requestOptions, + ); + await this.waitForTask({ + indexName: tmpIndexName, + taskID: moveOperationResponse.taskID, + }); + + return { copyOperationResponse, watchResponses, moveOperationResponse }; + } catch (error) { + await this.deleteIndex({ indexName: tmpIndexName }); + + throw error; + } + }, + /** * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system. */ diff --git a/packages/algoliasearch/builds/node.ts b/packages/algoliasearch/builds/node.ts index 8aeb04035..f893933b1 100644 --- a/packages/algoliasearch/builds/node.ts +++ b/packages/algoliasearch/builds/node.ts @@ -1,6 +1,7 @@ // 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. -import type { ClientOptions, RequestOptions } from '@algolia/client-common'; +import type { ApiError, ClientOptions, RequestOptions } from '@algolia/client-common'; +import { createIterablePromise } from '@algolia/client-common'; import type { AbtestingClient } from '@algolia/client-abtesting'; import { abtestingClient } from '@algolia/client-abtesting'; @@ -21,7 +22,13 @@ import { monitoringClient } from '@algolia/monitoring'; import type { RecommendClient } from '@algolia/recommend'; import { recommendClient } from '@algolia/recommend'; -import type { PartialUpdateObjectsOptions, SaveObjectsOptions } from '@algolia/client-search'; +import type { + ChunkedBatchOptions, + PartialUpdateObjectsOptions, + ReplaceAllObjectsOptions, + ReplaceAllObjectsWithTransformationResponse, + SaveObjectsOptions, +} from '@algolia/client-search'; import type { PushTaskRecords, WatchResponse } from '@algolia/ingestion'; import type { @@ -81,6 +88,36 @@ export type Algoliasearch = SearchClient & { options: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined, ) => Promise; + + /** + * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. + * + * @summary Helper: Replaces all objects (records) in the given `index_name` by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) with the given `objects`. A temporary index is created during this process in order to backup your data. + * @param replaceAllObjects - The `replaceAllObjects` object. + * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in. + * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`. + * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000. + * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms']. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push`, `operationIndex` and `getEvent` method and merged with the transporter requestOptions. + */ + replaceAllObjectsWithTransformation: ( + options: ReplaceAllObjectsOptions, + requestOptions?: RequestOptions | undefined, + ) => Promise; + + /** + * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/). + * + * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests. + * @param chunkedPush - The `chunkedPush` object. + * @param chunkedPush.indexName - The `indexName` to replace `objects` in. + * @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`. + * @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`. + * @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. + * @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions. + */ + chunkedPush: (options: ChunkedBatchOptions, requestOptions?: RequestOptions) => Promise>; }; export type TransformationOptions = { @@ -168,6 +205,151 @@ export function algoliasearch( ); }, + async chunkedPush( + { indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000 }: ChunkedBatchOptions, + requestOptions?: RequestOptions, + ): Promise> { + if (!ingestionTransporter) { + throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); + } + + if (!options?.transformation?.region) { + throw new Error('`region` must be provided when leveraging the transformation pipeline'); + } + + let records: Array = []; + const responses: Array = []; + + const objectEntries = objects.entries(); + for (const [i, obj] of objectEntries) { + records.push(obj as PushTaskRecords); + if (records.length === batchSize || i === objects.length - 1) { + responses.push( + await ingestionTransporter.push( + { indexName, pushTaskPayload: { action, records }, watch: waitForTasks }, + requestOptions, + ), + ); + records = []; + } + } + + let retryCount = 0; + + if (waitForTasks) { + for (const resp of responses) { + if (!resp.eventID) { + throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); + } + + await createIterablePromise({ + func: async () => { + if (resp.eventID === undefined || !resp.eventID) { + throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); + } + + return ingestionTransporter + .getEvent({ runID: resp.runID, eventID: resp.eventID }) + .catch((error: ApiError) => { + if (error.status === 404) { + return undefined; + } + + throw error; + }); + }, + validate: (response) => response !== undefined, + aggregator: () => (retryCount += 1), + error: { + validate: () => retryCount >= 50, + message: () => `The maximum number of retries exceeded. (${retryCount}/${50})`, + }, + timeout: (): number => Math.min(retryCount * 500, 5000), + }); + } + } + + return responses; + }, + + async replaceAllObjectsWithTransformation( + { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, + requestOptions?: RequestOptions | undefined, + ): Promise { + if (!ingestionTransporter) { + throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); + } + + if (!options?.transformation?.region) { + throw new Error('`region` must be provided when leveraging the transformation pipeline'); + } + + const randomSuffix = Math.floor(Math.random() * 1000000) + 100000; + const tmpIndexName = `${indexName}_tmp_${randomSuffix}`; + + if (scopes === undefined) { + scopes = ['settings', 'rules', 'synonyms']; + } + + try { + let copyOperationResponse = await this.operationIndex( + { + indexName, + operationIndexParams: { + operation: 'copy', + destination: tmpIndexName, + scope: scopes, + }, + }, + requestOptions, + ); + + const watchResponses = await this.chunkedPush( + { indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, + requestOptions, + ); + + await this.waitForTask({ + indexName: tmpIndexName, + taskID: copyOperationResponse.taskID, + }); + + copyOperationResponse = await this.operationIndex( + { + indexName, + operationIndexParams: { + operation: 'copy', + destination: tmpIndexName, + scope: scopes, + }, + }, + requestOptions, + ); + await this.waitForTask({ + indexName: tmpIndexName, + taskID: copyOperationResponse.taskID, + }); + + const moveOperationResponse = await this.operationIndex( + { + indexName: tmpIndexName, + operationIndexParams: { operation: 'move', destination: indexName }, + }, + requestOptions, + ); + await this.waitForTask({ + indexName: tmpIndexName, + taskID: moveOperationResponse.taskID, + }); + + return { copyOperationResponse, watchResponses, moveOperationResponse }; + } catch (error) { + await this.deleteIndex({ indexName: tmpIndexName }); + + throw error; + } + }, + /** * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system. */ diff --git a/packages/algoliasearch/builds/worker.ts b/packages/algoliasearch/builds/worker.ts index 8aeb04035..f893933b1 100644 --- a/packages/algoliasearch/builds/worker.ts +++ b/packages/algoliasearch/builds/worker.ts @@ -1,6 +1,7 @@ // 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. -import type { ClientOptions, RequestOptions } from '@algolia/client-common'; +import type { ApiError, ClientOptions, RequestOptions } from '@algolia/client-common'; +import { createIterablePromise } from '@algolia/client-common'; import type { AbtestingClient } from '@algolia/client-abtesting'; import { abtestingClient } from '@algolia/client-abtesting'; @@ -21,7 +22,13 @@ import { monitoringClient } from '@algolia/monitoring'; import type { RecommendClient } from '@algolia/recommend'; import { recommendClient } from '@algolia/recommend'; -import type { PartialUpdateObjectsOptions, SaveObjectsOptions } from '@algolia/client-search'; +import type { + ChunkedBatchOptions, + PartialUpdateObjectsOptions, + ReplaceAllObjectsOptions, + ReplaceAllObjectsWithTransformationResponse, + SaveObjectsOptions, +} from '@algolia/client-search'; import type { PushTaskRecords, WatchResponse } from '@algolia/ingestion'; import type { @@ -81,6 +88,36 @@ export type Algoliasearch = SearchClient & { options: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined, ) => Promise; + + /** + * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. + * + * @summary Helper: Replaces all objects (records) in the given `index_name` by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) with the given `objects`. A temporary index is created during this process in order to backup your data. + * @param replaceAllObjects - The `replaceAllObjects` object. + * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in. + * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`. + * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000. + * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms']. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push`, `operationIndex` and `getEvent` method and merged with the transporter requestOptions. + */ + replaceAllObjectsWithTransformation: ( + options: ReplaceAllObjectsOptions, + requestOptions?: RequestOptions | undefined, + ) => Promise; + + /** + * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/). + * + * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests. + * @param chunkedPush - The `chunkedPush` object. + * @param chunkedPush.indexName - The `indexName` to replace `objects` in. + * @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`. + * @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`. + * @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. + * @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions. + */ + chunkedPush: (options: ChunkedBatchOptions, requestOptions?: RequestOptions) => Promise>; }; export type TransformationOptions = { @@ -168,6 +205,151 @@ export function algoliasearch( ); }, + async chunkedPush( + { indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000 }: ChunkedBatchOptions, + requestOptions?: RequestOptions, + ): Promise> { + if (!ingestionTransporter) { + throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); + } + + if (!options?.transformation?.region) { + throw new Error('`region` must be provided when leveraging the transformation pipeline'); + } + + let records: Array = []; + const responses: Array = []; + + const objectEntries = objects.entries(); + for (const [i, obj] of objectEntries) { + records.push(obj as PushTaskRecords); + if (records.length === batchSize || i === objects.length - 1) { + responses.push( + await ingestionTransporter.push( + { indexName, pushTaskPayload: { action, records }, watch: waitForTasks }, + requestOptions, + ), + ); + records = []; + } + } + + let retryCount = 0; + + if (waitForTasks) { + for (const resp of responses) { + if (!resp.eventID) { + throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); + } + + await createIterablePromise({ + func: async () => { + if (resp.eventID === undefined || !resp.eventID) { + throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); + } + + return ingestionTransporter + .getEvent({ runID: resp.runID, eventID: resp.eventID }) + .catch((error: ApiError) => { + if (error.status === 404) { + return undefined; + } + + throw error; + }); + }, + validate: (response) => response !== undefined, + aggregator: () => (retryCount += 1), + error: { + validate: () => retryCount >= 50, + message: () => `The maximum number of retries exceeded. (${retryCount}/${50})`, + }, + timeout: (): number => Math.min(retryCount * 500, 5000), + }); + } + } + + return responses; + }, + + async replaceAllObjectsWithTransformation( + { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, + requestOptions?: RequestOptions | undefined, + ): Promise { + if (!ingestionTransporter) { + throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); + } + + if (!options?.transformation?.region) { + throw new Error('`region` must be provided when leveraging the transformation pipeline'); + } + + const randomSuffix = Math.floor(Math.random() * 1000000) + 100000; + const tmpIndexName = `${indexName}_tmp_${randomSuffix}`; + + if (scopes === undefined) { + scopes = ['settings', 'rules', 'synonyms']; + } + + try { + let copyOperationResponse = await this.operationIndex( + { + indexName, + operationIndexParams: { + operation: 'copy', + destination: tmpIndexName, + scope: scopes, + }, + }, + requestOptions, + ); + + const watchResponses = await this.chunkedPush( + { indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, + requestOptions, + ); + + await this.waitForTask({ + indexName: tmpIndexName, + taskID: copyOperationResponse.taskID, + }); + + copyOperationResponse = await this.operationIndex( + { + indexName, + operationIndexParams: { + operation: 'copy', + destination: tmpIndexName, + scope: scopes, + }, + }, + requestOptions, + ); + await this.waitForTask({ + indexName: tmpIndexName, + taskID: copyOperationResponse.taskID, + }); + + const moveOperationResponse = await this.operationIndex( + { + indexName: tmpIndexName, + operationIndexParams: { operation: 'move', destination: indexName }, + }, + requestOptions, + ); + await this.waitForTask({ + indexName: tmpIndexName, + taskID: moveOperationResponse.taskID, + }); + + return { copyOperationResponse, watchResponses, moveOperationResponse }; + } catch (error) { + await this.deleteIndex({ indexName: tmpIndexName }); + + throw error; + } + }, + /** * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system. */ diff --git a/packages/client-search/model/index.ts b/packages/client-search/model/index.ts index cf979b22a..4a2bd410e 100644 --- a/packages/client-search/model/index.ts +++ b/packages/client-search/model/index.ts @@ -125,6 +125,7 @@ export * from './removeUserIdResponse'; export * from './removeWordsIfNoResults'; export * from './renderingContent'; export * from './replaceAllObjectsResponse'; +export * from './replaceAllObjectsWithTransformationResponse'; export * from './replaceSourceResponse'; export * from './reRankingApplyFilter'; export * from './rule'; diff --git a/packages/client-search/model/replaceAllObjectsWithTransformationResponse.ts b/packages/client-search/model/replaceAllObjectsWithTransformationResponse.ts new file mode 100644 index 000000000..79989e960 --- /dev/null +++ b/packages/client-search/model/replaceAllObjectsWithTransformationResponse.ts @@ -0,0 +1,15 @@ +// 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. + +import type { UpdatedAtResponse } from './updatedAtResponse'; +import type { WatchResponse } from './watchResponse'; + +export type ReplaceAllObjectsWithTransformationResponse = { + copyOperationResponse: UpdatedAtResponse; + + /** + * The response of the `push` request(s). + */ + watchResponses: Array; + + moveOperationResponse: UpdatedAtResponse; +}; diff --git a/packages/client-search/src/searchClient.ts b/packages/client-search/src/searchClient.ts index 315bca712..6672e372a 100644 --- a/packages/client-search/src/searchClient.ts +++ b/packages/client-search/src/searchClient.ts @@ -51,6 +51,7 @@ import type { MultipleBatchResponse } from '../model/multipleBatchResponse'; import type { RemoveUserIdResponse } from '../model/removeUserIdResponse'; import type { ReplaceAllObjectsResponse } from '../model/replaceAllObjectsResponse'; + import type { ReplaceSourceResponse } from '../model/replaceSourceResponse'; import type { Rule } from '../model/rule'; import type { SaveObjectResponse } from '../model/saveObjectResponse'; From 0441852901680c52ec7e5718210af17a1af39f77 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Wed, 18 Jun 2025 16:26:56 +0000 Subject: [PATCH 3/5] chore(spec): fix comment of custom path (generated) https://github.com/algolia/api-clients-automation/pull/5014 Co-authored-by: algolia-bot Co-authored-by: Pierre Millot --- .../advanced-personalization/model/clientMethodProps.ts | 8 ++++---- .../src/advancedPersonalizationClient.ts | 8 ++++---- packages/algoliasearch/lite/model/clientMethodProps.ts | 2 +- packages/algoliasearch/lite/src/liteClient.ts | 2 +- packages/client-abtesting/model/clientMethodProps.ts | 8 ++++---- packages/client-abtesting/src/abtestingClient.ts | 8 ++++---- packages/client-analytics/model/clientMethodProps.ts | 8 ++++---- packages/client-analytics/src/analyticsClient.ts | 8 ++++---- packages/client-composition/model/clientMethodProps.ts | 8 ++++---- packages/client-composition/src/compositionFullClient.ts | 8 ++++---- packages/client-insights/model/clientMethodProps.ts | 8 ++++---- packages/client-insights/src/insightsClient.ts | 8 ++++---- .../client-personalization/model/clientMethodProps.ts | 8 ++++---- .../client-personalization/src/personalizationClient.ts | 8 ++++---- .../client-query-suggestions/model/clientMethodProps.ts | 8 ++++---- .../src/querySuggestionsClient.ts | 8 ++++---- packages/client-search/model/clientMethodProps.ts | 8 ++++---- packages/client-search/src/searchClient.ts | 8 ++++---- packages/ingestion/model/clientMethodProps.ts | 8 ++++---- packages/ingestion/src/ingestionClient.ts | 8 ++++---- packages/monitoring/model/clientMethodProps.ts | 8 ++++---- packages/monitoring/src/monitoringClient.ts | 8 ++++---- packages/recommend/model/clientMethodProps.ts | 8 ++++---- packages/recommend/src/recommendClient.ts | 8 ++++---- 24 files changed, 90 insertions(+), 90 deletions(-) diff --git a/packages/advanced-personalization/model/clientMethodProps.ts b/packages/advanced-personalization/model/clientMethodProps.ts index fb283d067..caece4a37 100644 --- a/packages/advanced-personalization/model/clientMethodProps.ts +++ b/packages/advanced-personalization/model/clientMethodProps.ts @@ -15,7 +15,7 @@ export type ComputeRealtimeUserProps = { */ export type CustomDeleteProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -29,7 +29,7 @@ export type CustomDeleteProps = { */ export type CustomGetProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -43,7 +43,7 @@ export type CustomGetProps = { */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -61,7 +61,7 @@ export type CustomPostProps = { */ export type CustomPutProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/advanced-personalization/src/advancedPersonalizationClient.ts b/packages/advanced-personalization/src/advancedPersonalizationClient.ts index e6d54da5b..62b69ed46 100644 --- a/packages/advanced-personalization/src/advancedPersonalizationClient.ts +++ b/packages/advanced-personalization/src/advancedPersonalizationClient.ts @@ -159,7 +159,7 @@ export function createAdvancedPersonalizationClient({ /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. - * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -188,7 +188,7 @@ export function createAdvancedPersonalizationClient({ /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. - * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -214,7 +214,7 @@ export function createAdvancedPersonalizationClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -245,7 +245,7 @@ export function createAdvancedPersonalizationClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. - * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/packages/algoliasearch/lite/model/clientMethodProps.ts b/packages/algoliasearch/lite/model/clientMethodProps.ts index 455254153..d3ea0277b 100644 --- a/packages/algoliasearch/lite/model/clientMethodProps.ts +++ b/packages/algoliasearch/lite/model/clientMethodProps.ts @@ -10,7 +10,7 @@ import type { SearchParamsObject } from './searchParamsObject'; */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/algoliasearch/lite/src/liteClient.ts b/packages/algoliasearch/lite/src/liteClient.ts index 30d8500a0..fafeabcdb 100644 --- a/packages/algoliasearch/lite/src/liteClient.ts +++ b/packages/algoliasearch/lite/src/liteClient.ts @@ -173,7 +173,7 @@ export function createLiteClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/packages/client-abtesting/model/clientMethodProps.ts b/packages/client-abtesting/model/clientMethodProps.ts index f77aae75d..1259798bb 100644 --- a/packages/client-abtesting/model/clientMethodProps.ts +++ b/packages/client-abtesting/model/clientMethodProps.ts @@ -5,7 +5,7 @@ */ export type CustomDeleteProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -19,7 +19,7 @@ export type CustomDeleteProps = { */ export type CustomGetProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -33,7 +33,7 @@ export type CustomGetProps = { */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -51,7 +51,7 @@ export type CustomPostProps = { */ export type CustomPutProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/client-abtesting/src/abtestingClient.ts b/packages/client-abtesting/src/abtestingClient.ts index 5ff5645ee..bbfa43416 100644 --- a/packages/client-abtesting/src/abtestingClient.ts +++ b/packages/client-abtesting/src/abtestingClient.ts @@ -163,7 +163,7 @@ export function createAbtestingClient({ /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. - * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -192,7 +192,7 @@ export function createAbtestingClient({ /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. - * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -218,7 +218,7 @@ export function createAbtestingClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -249,7 +249,7 @@ export function createAbtestingClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. - * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/packages/client-analytics/model/clientMethodProps.ts b/packages/client-analytics/model/clientMethodProps.ts index 439562f89..00ce8b316 100644 --- a/packages/client-analytics/model/clientMethodProps.ts +++ b/packages/client-analytics/model/clientMethodProps.ts @@ -9,7 +9,7 @@ import type { OrderBy } from '../model/orderBy'; */ export type CustomDeleteProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -23,7 +23,7 @@ export type CustomDeleteProps = { */ export type CustomGetProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -37,7 +37,7 @@ export type CustomGetProps = { */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -55,7 +55,7 @@ export type CustomPostProps = { */ export type CustomPutProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/client-analytics/src/analyticsClient.ts b/packages/client-analytics/src/analyticsClient.ts index 2aab93018..3f56b8fd4 100644 --- a/packages/client-analytics/src/analyticsClient.ts +++ b/packages/client-analytics/src/analyticsClient.ts @@ -152,7 +152,7 @@ export function createAnalyticsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. - * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -181,7 +181,7 @@ export function createAnalyticsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. - * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -207,7 +207,7 @@ export function createAnalyticsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -238,7 +238,7 @@ export function createAnalyticsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. - * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/packages/client-composition/model/clientMethodProps.ts b/packages/client-composition/model/clientMethodProps.ts index 663f0fa8c..85481e692 100644 --- a/packages/client-composition/model/clientMethodProps.ts +++ b/packages/client-composition/model/clientMethodProps.ts @@ -13,7 +13,7 @@ import type { SearchForFacetValuesRequest } from '../model/searchForFacetValuesR */ export type CustomDeleteProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -27,7 +27,7 @@ export type CustomDeleteProps = { */ export type CustomGetProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -41,7 +41,7 @@ export type CustomGetProps = { */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -59,7 +59,7 @@ export type CustomPostProps = { */ export type CustomPutProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/client-composition/src/compositionFullClient.ts b/packages/client-composition/src/compositionFullClient.ts index 2ac662152..deac2528c 100644 --- a/packages/client-composition/src/compositionFullClient.ts +++ b/packages/client-composition/src/compositionFullClient.ts @@ -193,7 +193,7 @@ export function createCompositionClient({ /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. - * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -222,7 +222,7 @@ export function createCompositionClient({ /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. - * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -248,7 +248,7 @@ export function createCompositionClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -279,7 +279,7 @@ export function createCompositionClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. - * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/packages/client-insights/model/clientMethodProps.ts b/packages/client-insights/model/clientMethodProps.ts index 1753a5a73..b37704053 100644 --- a/packages/client-insights/model/clientMethodProps.ts +++ b/packages/client-insights/model/clientMethodProps.ts @@ -5,7 +5,7 @@ */ export type CustomDeleteProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -19,7 +19,7 @@ export type CustomDeleteProps = { */ export type CustomGetProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -33,7 +33,7 @@ export type CustomGetProps = { */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -51,7 +51,7 @@ export type CustomPostProps = { */ export type CustomPutProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/client-insights/src/insightsClient.ts b/packages/client-insights/src/insightsClient.ts index 7ebe64b63..759bb0c75 100644 --- a/packages/client-insights/src/insightsClient.ts +++ b/packages/client-insights/src/insightsClient.ts @@ -115,7 +115,7 @@ export function createInsightsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. - * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -144,7 +144,7 @@ export function createInsightsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. - * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -170,7 +170,7 @@ export function createInsightsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -201,7 +201,7 @@ export function createInsightsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. - * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/packages/client-personalization/model/clientMethodProps.ts b/packages/client-personalization/model/clientMethodProps.ts index cd259633b..c63658989 100644 --- a/packages/client-personalization/model/clientMethodProps.ts +++ b/packages/client-personalization/model/clientMethodProps.ts @@ -5,7 +5,7 @@ */ export type CustomDeleteProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -19,7 +19,7 @@ export type CustomDeleteProps = { */ export type CustomGetProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -33,7 +33,7 @@ export type CustomGetProps = { */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -51,7 +51,7 @@ export type CustomPostProps = { */ export type CustomPutProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/client-personalization/src/personalizationClient.ts b/packages/client-personalization/src/personalizationClient.ts index 7c79b6e70..c85b01b40 100644 --- a/packages/client-personalization/src/personalizationClient.ts +++ b/packages/client-personalization/src/personalizationClient.ts @@ -119,7 +119,7 @@ export function createPersonalizationClient({ /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. - * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -148,7 +148,7 @@ export function createPersonalizationClient({ /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. - * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -174,7 +174,7 @@ export function createPersonalizationClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -205,7 +205,7 @@ export function createPersonalizationClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. - * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/packages/client-query-suggestions/model/clientMethodProps.ts b/packages/client-query-suggestions/model/clientMethodProps.ts index 27b0133a8..82b03b227 100644 --- a/packages/client-query-suggestions/model/clientMethodProps.ts +++ b/packages/client-query-suggestions/model/clientMethodProps.ts @@ -7,7 +7,7 @@ import type { Configuration } from '../model/configuration'; */ export type CustomDeleteProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -21,7 +21,7 @@ export type CustomDeleteProps = { */ export type CustomGetProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -35,7 +35,7 @@ export type CustomGetProps = { */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -53,7 +53,7 @@ export type CustomPostProps = { */ export type CustomPutProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/client-query-suggestions/src/querySuggestionsClient.ts b/packages/client-query-suggestions/src/querySuggestionsClient.ts index 764f5f406..28a1cfc42 100644 --- a/packages/client-query-suggestions/src/querySuggestionsClient.ts +++ b/packages/client-query-suggestions/src/querySuggestionsClient.ts @@ -155,7 +155,7 @@ export function createQuerySuggestionsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. - * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -184,7 +184,7 @@ export function createQuerySuggestionsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. - * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -210,7 +210,7 @@ export function createQuerySuggestionsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -241,7 +241,7 @@ export function createQuerySuggestionsClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. - * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/packages/client-search/model/clientMethodProps.ts b/packages/client-search/model/clientMethodProps.ts index 1940d8960..6631d972b 100644 --- a/packages/client-search/model/clientMethodProps.ts +++ b/packages/client-search/model/clientMethodProps.ts @@ -161,7 +161,7 @@ export type ClearSynonymsProps = { */ export type CustomDeleteProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -175,7 +175,7 @@ export type CustomDeleteProps = { */ export type CustomGetProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -189,7 +189,7 @@ export type CustomGetProps = { */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -207,7 +207,7 @@ export type CustomPostProps = { */ export type CustomPutProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/client-search/src/searchClient.ts b/packages/client-search/src/searchClient.ts index 6672e372a..136bf5d23 100644 --- a/packages/client-search/src/searchClient.ts +++ b/packages/client-search/src/searchClient.ts @@ -1171,7 +1171,7 @@ export function createSearchClient({ /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. - * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -1200,7 +1200,7 @@ export function createSearchClient({ /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. - * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -1226,7 +1226,7 @@ export function createSearchClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -1257,7 +1257,7 @@ export function createSearchClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. - * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/packages/ingestion/model/clientMethodProps.ts b/packages/ingestion/model/clientMethodProps.ts index 723e27fe2..d91a7778c 100644 --- a/packages/ingestion/model/clientMethodProps.ts +++ b/packages/ingestion/model/clientMethodProps.ts @@ -45,7 +45,7 @@ import type { TriggerType } from '../model/triggerType'; */ export type CustomDeleteProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -59,7 +59,7 @@ export type CustomDeleteProps = { */ export type CustomGetProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -73,7 +73,7 @@ export type CustomGetProps = { */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -91,7 +91,7 @@ export type CustomPostProps = { */ export type CustomPutProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/ingestion/src/ingestionClient.ts b/packages/ingestion/src/ingestionClient.ts index b4ce5f9d4..a31796764 100644 --- a/packages/ingestion/src/ingestionClient.ts +++ b/packages/ingestion/src/ingestionClient.ts @@ -473,7 +473,7 @@ export function createIngestionClient({ /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. - * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -502,7 +502,7 @@ export function createIngestionClient({ /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. - * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -528,7 +528,7 @@ export function createIngestionClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -559,7 +559,7 @@ export function createIngestionClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. - * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/packages/monitoring/model/clientMethodProps.ts b/packages/monitoring/model/clientMethodProps.ts index f4f2095f8..b32b8e364 100644 --- a/packages/monitoring/model/clientMethodProps.ts +++ b/packages/monitoring/model/clientMethodProps.ts @@ -8,7 +8,7 @@ import type { Period } from '../model/period'; */ export type CustomDeleteProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -22,7 +22,7 @@ export type CustomDeleteProps = { */ export type CustomGetProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -36,7 +36,7 @@ export type CustomGetProps = { */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -54,7 +54,7 @@ export type CustomPostProps = { */ export type CustomPutProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/monitoring/src/monitoringClient.ts b/packages/monitoring/src/monitoringClient.ts index 0f596e7dc..ce4c4fb99 100644 --- a/packages/monitoring/src/monitoringClient.ts +++ b/packages/monitoring/src/monitoringClient.ts @@ -118,7 +118,7 @@ export function createMonitoringClient({ /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. - * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -147,7 +147,7 @@ export function createMonitoringClient({ /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. - * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -173,7 +173,7 @@ export function createMonitoringClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -204,7 +204,7 @@ export function createMonitoringClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. - * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. diff --git a/packages/recommend/model/clientMethodProps.ts b/packages/recommend/model/clientMethodProps.ts index 0dfc3939c..8ebca118c 100644 --- a/packages/recommend/model/clientMethodProps.ts +++ b/packages/recommend/model/clientMethodProps.ts @@ -27,7 +27,7 @@ export type BatchRecommendRulesProps = { */ export type CustomDeleteProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -41,7 +41,7 @@ export type CustomDeleteProps = { */ export type CustomGetProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -55,7 +55,7 @@ export type CustomGetProps = { */ export type CustomPostProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** @@ -73,7 +73,7 @@ export type CustomPostProps = { */ export type CustomPutProps = { /** - * Path of the endpoint, anything after \"/1\" must be specified. + * Path of the endpoint, for example `1/newFeature`. */ path: string; /** diff --git a/packages/recommend/src/recommendClient.ts b/packages/recommend/src/recommendClient.ts index d4d980332..85415032c 100644 --- a/packages/recommend/src/recommendClient.ts +++ b/packages/recommend/src/recommendClient.ts @@ -192,7 +192,7 @@ export function createRecommendClient({ /** * This method lets you send requests to the Algolia REST API. * @param customDelete - The customDelete object. - * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customDelete.path - Path of the endpoint, for example `1/newFeature`. * @param customDelete.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -221,7 +221,7 @@ export function createRecommendClient({ /** * This method lets you send requests to the Algolia REST API. * @param customGet - The customGet object. - * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customGet.path - Path of the endpoint, for example `1/newFeature`. * @param customGet.parameters - Query parameters to apply to the current query. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. */ @@ -247,7 +247,7 @@ export function createRecommendClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPost - The customPost object. - * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPost.path - Path of the endpoint, for example `1/newFeature`. * @param customPost.parameters - Query parameters to apply to the current query. * @param customPost.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. @@ -278,7 +278,7 @@ export function createRecommendClient({ /** * This method lets you send requests to the Algolia REST API. * @param customPut - The customPut object. - * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified. + * @param customPut.path - Path of the endpoint, for example `1/newFeature`. * @param customPut.parameters - Query parameters to apply to the current query. * @param customPut.body - Parameters to send with the custom request. * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions. From 407c6dd66f7ea55445cd340d5c5d09f6375a7774 Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Wed, 18 Jun 2025 17:04:24 +0000 Subject: [PATCH 4/5] fix(clients): allow chunked requests on WithTransformation methods (generated) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/algolia/api-clients-automation/pull/5011 Co-authored-by: algolia-bot Co-authored-by: Clément Vannicatte --- .../__tests__/algoliasearch.common.test.ts | 80 ----------- packages/algoliasearch/builds/browser.ts | 127 +++--------------- packages/algoliasearch/builds/fetch.ts | 127 +++--------------- packages/algoliasearch/builds/node.ts | 127 +++--------------- packages/algoliasearch/builds/worker.ts | 127 +++--------------- packages/ingestion/model/clientMethodProps.ts | 33 +++++ packages/ingestion/src/ingestionClient.ts | 79 ++++++++++- 7 files changed, 187 insertions(+), 513 deletions(-) diff --git a/packages/algoliasearch/__tests__/algoliasearch.common.test.ts b/packages/algoliasearch/__tests__/algoliasearch.common.test.ts index c76d2baa1..1a0b00573 100644 --- a/packages/algoliasearch/__tests__/algoliasearch.common.test.ts +++ b/packages/algoliasearch/__tests__/algoliasearch.common.test.ts @@ -168,86 +168,6 @@ describe('api', () => { }), ).rejects.toThrow('`transformation.region` must be provided at client instantiation before calling this method.'); }); - - test('exposes the transformation methods at the root of the client', async () => { - const ingestionClient = algoliasearch('APP_ID', 'API_KEY', { - requester: browserEchoRequester(), - transformation: { region: 'us' }, - }); - - expect(ingestionClient.saveObjectsWithTransformation).not.toBeUndefined(); - - let res = (await ingestionClient.saveObjectsWithTransformation({ - indexName: 'foo', - objects: [{ objectID: 'bar', baz: 42 }], - waitForTasks: true, - })) as unknown as EchoResponse; - - expect(res.headers).toEqual( - expect.objectContaining({ - 'x-algolia-application-id': 'APP_ID', - 'x-algolia-api-key': 'API_KEY', - }), - ); - expect(res.url.startsWith('https://data.us.algolia.com/1/push/foo?watch=true')).toBeTruthy(); - expect(res.data).toEqual({ - action: 'addObject', - records: [ - { - baz: 42, - objectID: 'bar', - }, - ], - }); - expect(ingestionClient.partialUpdateObjectsWithTransformation).not.toBeUndefined(); - - res = (await ingestionClient.partialUpdateObjectsWithTransformation({ - indexName: 'foo', - objects: [{ objectID: 'bar', baz: 42 }], - waitForTasks: true, - createIfNotExists: true, - })) as unknown as EchoResponse; - - expect(res.headers).toEqual( - expect.objectContaining({ - 'x-algolia-application-id': 'APP_ID', - 'x-algolia-api-key': 'API_KEY', - }), - ); - expect(res.url.startsWith('https://data.us.algolia.com/1/push/foo?watch=true')).toBeTruthy(); - expect(res.data).toEqual({ - action: 'partialUpdateObject', - records: [ - { - baz: 42, - objectID: 'bar', - }, - ], - }); - - res = (await ingestionClient.partialUpdateObjectsWithTransformation({ - indexName: 'foo', - objects: [{ objectID: 'bar', baz: 42 }], - waitForTasks: true, - })) as unknown as EchoResponse; - - expect(res.headers).toEqual( - expect.objectContaining({ - 'x-algolia-application-id': 'APP_ID', - 'x-algolia-api-key': 'API_KEY', - }), - ); - expect(res.url.startsWith('https://data.us.algolia.com/1/push/foo?watch=true')).toBeTruthy(); - expect(res.data).toEqual({ - action: 'partialUpdateObjectNoCreate', - records: [ - { - baz: 42, - objectID: 'bar', - }, - ], - }); - }); }); }); diff --git a/packages/algoliasearch/builds/browser.ts b/packages/algoliasearch/builds/browser.ts index f893933b1..7a69ca0fc 100644 --- a/packages/algoliasearch/builds/browser.ts +++ b/packages/algoliasearch/builds/browser.ts @@ -1,7 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { ApiError, ClientOptions, RequestOptions } from '@algolia/client-common'; -import { createIterablePromise } from '@algolia/client-common'; +import type { ClientOptions, RequestOptions } from '@algolia/client-common'; import type { AbtestingClient } from '@algolia/client-abtesting'; import { abtestingClient } from '@algolia/client-abtesting'; @@ -23,13 +22,12 @@ import type { RecommendClient } from '@algolia/recommend'; import { recommendClient } from '@algolia/recommend'; import type { - ChunkedBatchOptions, PartialUpdateObjectsOptions, ReplaceAllObjectsOptions, ReplaceAllObjectsWithTransformationResponse, SaveObjectsOptions, } from '@algolia/client-search'; -import type { PushTaskRecords, WatchResponse } from '@algolia/ingestion'; +import type { WatchResponse } from '@algolia/ingestion'; import type { AbtestingRegionOptions, @@ -65,12 +63,12 @@ export type Algoliasearch = SearchClient & { * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`. * @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. * @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions. */ saveObjectsWithTransformation: ( options: SaveObjectsOptions, requestOptions?: RequestOptions | undefined, - ) => Promise; + ) => Promise>; /** * Helper: Similar to the `partialUpdateObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. @@ -82,12 +80,12 @@ export type Algoliasearch = SearchClient & { * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.. * @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. * @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions. */ partialUpdateObjectsWithTransformation: ( options: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined, - ) => Promise; + ) => Promise>; /** * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. @@ -104,20 +102,6 @@ export type Algoliasearch = SearchClient & { options: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined, ) => Promise; - - /** - * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/). - * - * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests. - * @param chunkedPush - The `chunkedPush` object. - * @param chunkedPush.indexName - The `indexName` to replace `objects` in. - * @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`. - * @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`. - * @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions. - */ - chunkedPush: (options: ChunkedBatchOptions, requestOptions?: RequestOptions) => Promise>; }; export type TransformationOptions = { @@ -158,7 +142,10 @@ export function algoliasearch( return { ...client, - async saveObjectsWithTransformation({ indexName, objects, waitForTasks }, requestOptions): Promise { + async saveObjectsWithTransformation( + { indexName, objects, waitForTasks }, + requestOptions, + ): Promise> { if (!ingestionTransporter) { throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); } @@ -167,15 +154,8 @@ export function algoliasearch( throw new Error('`region` must be provided when leveraging the transformation pipeline'); } - return ingestionTransporter?.push( - { - indexName, - watch: waitForTasks, - pushTaskPayload: { - action: 'addObject', - records: objects as PushTaskRecords[], - }, - }, + return ingestionTransporter.chunkedPush( + { indexName, objects, action: 'addObject', waitForTasks }, requestOptions, ); }, @@ -183,7 +163,7 @@ export function algoliasearch( async partialUpdateObjectsWithTransformation( { indexName, objects, createIfNotExists, waitForTasks }, requestOptions, - ): Promise { + ): Promise> { if (!ingestionTransporter) { throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); } @@ -192,86 +172,17 @@ export function algoliasearch( throw new Error('`region` must be provided when leveraging the transformation pipeline'); } - return ingestionTransporter?.push( + return ingestionTransporter.chunkedPush( { indexName, - watch: waitForTasks, - pushTaskPayload: { - action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate', - records: objects as PushTaskRecords[], - }, + objects, + action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate', + waitForTasks, }, requestOptions, ); }, - async chunkedPush( - { indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000 }: ChunkedBatchOptions, - requestOptions?: RequestOptions, - ): Promise> { - if (!ingestionTransporter) { - throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); - } - - if (!options?.transformation?.region) { - throw new Error('`region` must be provided when leveraging the transformation pipeline'); - } - - let records: Array = []; - const responses: Array = []; - - const objectEntries = objects.entries(); - for (const [i, obj] of objectEntries) { - records.push(obj as PushTaskRecords); - if (records.length === batchSize || i === objects.length - 1) { - responses.push( - await ingestionTransporter.push( - { indexName, pushTaskPayload: { action, records }, watch: waitForTasks }, - requestOptions, - ), - ); - records = []; - } - } - - let retryCount = 0; - - if (waitForTasks) { - for (const resp of responses) { - if (!resp.eventID) { - throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); - } - - await createIterablePromise({ - func: async () => { - if (resp.eventID === undefined || !resp.eventID) { - throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); - } - - return ingestionTransporter - .getEvent({ runID: resp.runID, eventID: resp.eventID }) - .catch((error: ApiError) => { - if (error.status === 404) { - return undefined; - } - - throw error; - }); - }, - validate: (response) => response !== undefined, - aggregator: () => (retryCount += 1), - error: { - validate: () => retryCount >= 50, - message: () => `The maximum number of retries exceeded. (${retryCount}/${50})`, - }, - timeout: (): number => Math.min(retryCount * 500, 5000), - }); - } - } - - return responses; - }, - async replaceAllObjectsWithTransformation( { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined, @@ -304,8 +215,8 @@ export function algoliasearch( requestOptions, ); - const watchResponses = await this.chunkedPush( - { indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, + const watchResponses = await ingestionTransporter.chunkedPush( + { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName }, requestOptions, ); diff --git a/packages/algoliasearch/builds/fetch.ts b/packages/algoliasearch/builds/fetch.ts index f893933b1..7a69ca0fc 100644 --- a/packages/algoliasearch/builds/fetch.ts +++ b/packages/algoliasearch/builds/fetch.ts @@ -1,7 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { ApiError, ClientOptions, RequestOptions } from '@algolia/client-common'; -import { createIterablePromise } from '@algolia/client-common'; +import type { ClientOptions, RequestOptions } from '@algolia/client-common'; import type { AbtestingClient } from '@algolia/client-abtesting'; import { abtestingClient } from '@algolia/client-abtesting'; @@ -23,13 +22,12 @@ import type { RecommendClient } from '@algolia/recommend'; import { recommendClient } from '@algolia/recommend'; import type { - ChunkedBatchOptions, PartialUpdateObjectsOptions, ReplaceAllObjectsOptions, ReplaceAllObjectsWithTransformationResponse, SaveObjectsOptions, } from '@algolia/client-search'; -import type { PushTaskRecords, WatchResponse } from '@algolia/ingestion'; +import type { WatchResponse } from '@algolia/ingestion'; import type { AbtestingRegionOptions, @@ -65,12 +63,12 @@ export type Algoliasearch = SearchClient & { * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`. * @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. * @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions. */ saveObjectsWithTransformation: ( options: SaveObjectsOptions, requestOptions?: RequestOptions | undefined, - ) => Promise; + ) => Promise>; /** * Helper: Similar to the `partialUpdateObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. @@ -82,12 +80,12 @@ export type Algoliasearch = SearchClient & { * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.. * @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. * @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions. */ partialUpdateObjectsWithTransformation: ( options: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined, - ) => Promise; + ) => Promise>; /** * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. @@ -104,20 +102,6 @@ export type Algoliasearch = SearchClient & { options: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined, ) => Promise; - - /** - * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/). - * - * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests. - * @param chunkedPush - The `chunkedPush` object. - * @param chunkedPush.indexName - The `indexName` to replace `objects` in. - * @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`. - * @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`. - * @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions. - */ - chunkedPush: (options: ChunkedBatchOptions, requestOptions?: RequestOptions) => Promise>; }; export type TransformationOptions = { @@ -158,7 +142,10 @@ export function algoliasearch( return { ...client, - async saveObjectsWithTransformation({ indexName, objects, waitForTasks }, requestOptions): Promise { + async saveObjectsWithTransformation( + { indexName, objects, waitForTasks }, + requestOptions, + ): Promise> { if (!ingestionTransporter) { throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); } @@ -167,15 +154,8 @@ export function algoliasearch( throw new Error('`region` must be provided when leveraging the transformation pipeline'); } - return ingestionTransporter?.push( - { - indexName, - watch: waitForTasks, - pushTaskPayload: { - action: 'addObject', - records: objects as PushTaskRecords[], - }, - }, + return ingestionTransporter.chunkedPush( + { indexName, objects, action: 'addObject', waitForTasks }, requestOptions, ); }, @@ -183,7 +163,7 @@ export function algoliasearch( async partialUpdateObjectsWithTransformation( { indexName, objects, createIfNotExists, waitForTasks }, requestOptions, - ): Promise { + ): Promise> { if (!ingestionTransporter) { throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); } @@ -192,86 +172,17 @@ export function algoliasearch( throw new Error('`region` must be provided when leveraging the transformation pipeline'); } - return ingestionTransporter?.push( + return ingestionTransporter.chunkedPush( { indexName, - watch: waitForTasks, - pushTaskPayload: { - action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate', - records: objects as PushTaskRecords[], - }, + objects, + action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate', + waitForTasks, }, requestOptions, ); }, - async chunkedPush( - { indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000 }: ChunkedBatchOptions, - requestOptions?: RequestOptions, - ): Promise> { - if (!ingestionTransporter) { - throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); - } - - if (!options?.transformation?.region) { - throw new Error('`region` must be provided when leveraging the transformation pipeline'); - } - - let records: Array = []; - const responses: Array = []; - - const objectEntries = objects.entries(); - for (const [i, obj] of objectEntries) { - records.push(obj as PushTaskRecords); - if (records.length === batchSize || i === objects.length - 1) { - responses.push( - await ingestionTransporter.push( - { indexName, pushTaskPayload: { action, records }, watch: waitForTasks }, - requestOptions, - ), - ); - records = []; - } - } - - let retryCount = 0; - - if (waitForTasks) { - for (const resp of responses) { - if (!resp.eventID) { - throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); - } - - await createIterablePromise({ - func: async () => { - if (resp.eventID === undefined || !resp.eventID) { - throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); - } - - return ingestionTransporter - .getEvent({ runID: resp.runID, eventID: resp.eventID }) - .catch((error: ApiError) => { - if (error.status === 404) { - return undefined; - } - - throw error; - }); - }, - validate: (response) => response !== undefined, - aggregator: () => (retryCount += 1), - error: { - validate: () => retryCount >= 50, - message: () => `The maximum number of retries exceeded. (${retryCount}/${50})`, - }, - timeout: (): number => Math.min(retryCount * 500, 5000), - }); - } - } - - return responses; - }, - async replaceAllObjectsWithTransformation( { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined, @@ -304,8 +215,8 @@ export function algoliasearch( requestOptions, ); - const watchResponses = await this.chunkedPush( - { indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, + const watchResponses = await ingestionTransporter.chunkedPush( + { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName }, requestOptions, ); diff --git a/packages/algoliasearch/builds/node.ts b/packages/algoliasearch/builds/node.ts index f893933b1..7a69ca0fc 100644 --- a/packages/algoliasearch/builds/node.ts +++ b/packages/algoliasearch/builds/node.ts @@ -1,7 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { ApiError, ClientOptions, RequestOptions } from '@algolia/client-common'; -import { createIterablePromise } from '@algolia/client-common'; +import type { ClientOptions, RequestOptions } from '@algolia/client-common'; import type { AbtestingClient } from '@algolia/client-abtesting'; import { abtestingClient } from '@algolia/client-abtesting'; @@ -23,13 +22,12 @@ import type { RecommendClient } from '@algolia/recommend'; import { recommendClient } from '@algolia/recommend'; import type { - ChunkedBatchOptions, PartialUpdateObjectsOptions, ReplaceAllObjectsOptions, ReplaceAllObjectsWithTransformationResponse, SaveObjectsOptions, } from '@algolia/client-search'; -import type { PushTaskRecords, WatchResponse } from '@algolia/ingestion'; +import type { WatchResponse } from '@algolia/ingestion'; import type { AbtestingRegionOptions, @@ -65,12 +63,12 @@ export type Algoliasearch = SearchClient & { * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`. * @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. * @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions. */ saveObjectsWithTransformation: ( options: SaveObjectsOptions, requestOptions?: RequestOptions | undefined, - ) => Promise; + ) => Promise>; /** * Helper: Similar to the `partialUpdateObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. @@ -82,12 +80,12 @@ export type Algoliasearch = SearchClient & { * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.. * @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. * @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions. */ partialUpdateObjectsWithTransformation: ( options: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined, - ) => Promise; + ) => Promise>; /** * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. @@ -104,20 +102,6 @@ export type Algoliasearch = SearchClient & { options: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined, ) => Promise; - - /** - * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/). - * - * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests. - * @param chunkedPush - The `chunkedPush` object. - * @param chunkedPush.indexName - The `indexName` to replace `objects` in. - * @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`. - * @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`. - * @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions. - */ - chunkedPush: (options: ChunkedBatchOptions, requestOptions?: RequestOptions) => Promise>; }; export type TransformationOptions = { @@ -158,7 +142,10 @@ export function algoliasearch( return { ...client, - async saveObjectsWithTransformation({ indexName, objects, waitForTasks }, requestOptions): Promise { + async saveObjectsWithTransformation( + { indexName, objects, waitForTasks }, + requestOptions, + ): Promise> { if (!ingestionTransporter) { throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); } @@ -167,15 +154,8 @@ export function algoliasearch( throw new Error('`region` must be provided when leveraging the transformation pipeline'); } - return ingestionTransporter?.push( - { - indexName, - watch: waitForTasks, - pushTaskPayload: { - action: 'addObject', - records: objects as PushTaskRecords[], - }, - }, + return ingestionTransporter.chunkedPush( + { indexName, objects, action: 'addObject', waitForTasks }, requestOptions, ); }, @@ -183,7 +163,7 @@ export function algoliasearch( async partialUpdateObjectsWithTransformation( { indexName, objects, createIfNotExists, waitForTasks }, requestOptions, - ): Promise { + ): Promise> { if (!ingestionTransporter) { throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); } @@ -192,86 +172,17 @@ export function algoliasearch( throw new Error('`region` must be provided when leveraging the transformation pipeline'); } - return ingestionTransporter?.push( + return ingestionTransporter.chunkedPush( { indexName, - watch: waitForTasks, - pushTaskPayload: { - action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate', - records: objects as PushTaskRecords[], - }, + objects, + action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate', + waitForTasks, }, requestOptions, ); }, - async chunkedPush( - { indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000 }: ChunkedBatchOptions, - requestOptions?: RequestOptions, - ): Promise> { - if (!ingestionTransporter) { - throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); - } - - if (!options?.transformation?.region) { - throw new Error('`region` must be provided when leveraging the transformation pipeline'); - } - - let records: Array = []; - const responses: Array = []; - - const objectEntries = objects.entries(); - for (const [i, obj] of objectEntries) { - records.push(obj as PushTaskRecords); - if (records.length === batchSize || i === objects.length - 1) { - responses.push( - await ingestionTransporter.push( - { indexName, pushTaskPayload: { action, records }, watch: waitForTasks }, - requestOptions, - ), - ); - records = []; - } - } - - let retryCount = 0; - - if (waitForTasks) { - for (const resp of responses) { - if (!resp.eventID) { - throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); - } - - await createIterablePromise({ - func: async () => { - if (resp.eventID === undefined || !resp.eventID) { - throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); - } - - return ingestionTransporter - .getEvent({ runID: resp.runID, eventID: resp.eventID }) - .catch((error: ApiError) => { - if (error.status === 404) { - return undefined; - } - - throw error; - }); - }, - validate: (response) => response !== undefined, - aggregator: () => (retryCount += 1), - error: { - validate: () => retryCount >= 50, - message: () => `The maximum number of retries exceeded. (${retryCount}/${50})`, - }, - timeout: (): number => Math.min(retryCount * 500, 5000), - }); - } - } - - return responses; - }, - async replaceAllObjectsWithTransformation( { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined, @@ -304,8 +215,8 @@ export function algoliasearch( requestOptions, ); - const watchResponses = await this.chunkedPush( - { indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, + const watchResponses = await ingestionTransporter.chunkedPush( + { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName }, requestOptions, ); diff --git a/packages/algoliasearch/builds/worker.ts b/packages/algoliasearch/builds/worker.ts index f893933b1..7a69ca0fc 100644 --- a/packages/algoliasearch/builds/worker.ts +++ b/packages/algoliasearch/builds/worker.ts @@ -1,7 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. -import type { ApiError, ClientOptions, RequestOptions } from '@algolia/client-common'; -import { createIterablePromise } from '@algolia/client-common'; +import type { ClientOptions, RequestOptions } from '@algolia/client-common'; import type { AbtestingClient } from '@algolia/client-abtesting'; import { abtestingClient } from '@algolia/client-abtesting'; @@ -23,13 +22,12 @@ import type { RecommendClient } from '@algolia/recommend'; import { recommendClient } from '@algolia/recommend'; import type { - ChunkedBatchOptions, PartialUpdateObjectsOptions, ReplaceAllObjectsOptions, ReplaceAllObjectsWithTransformationResponse, SaveObjectsOptions, } from '@algolia/client-search'; -import type { PushTaskRecords, WatchResponse } from '@algolia/ingestion'; +import type { WatchResponse } from '@algolia/ingestion'; import type { AbtestingRegionOptions, @@ -65,12 +63,12 @@ export type Algoliasearch = SearchClient & { * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`. * @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. * @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions. */ saveObjectsWithTransformation: ( options: SaveObjectsOptions, requestOptions?: RequestOptions | undefined, - ) => Promise; + ) => Promise>; /** * Helper: Similar to the `partialUpdateObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. @@ -82,12 +80,12 @@ export type Algoliasearch = SearchClient & { * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.. * @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. * @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions. + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions. */ partialUpdateObjectsWithTransformation: ( options: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined, - ) => Promise; + ) => Promise>; /** * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method. @@ -104,20 +102,6 @@ export type Algoliasearch = SearchClient & { options: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined, ) => Promise; - - /** - * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/). - * - * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests. - * @param chunkedPush - The `chunkedPush` object. - * @param chunkedPush.indexName - The `indexName` to replace `objects` in. - * @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`. - * @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`. - * @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. - * @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. - * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions. - */ - chunkedPush: (options: ChunkedBatchOptions, requestOptions?: RequestOptions) => Promise>; }; export type TransformationOptions = { @@ -158,7 +142,10 @@ export function algoliasearch( return { ...client, - async saveObjectsWithTransformation({ indexName, objects, waitForTasks }, requestOptions): Promise { + async saveObjectsWithTransformation( + { indexName, objects, waitForTasks }, + requestOptions, + ): Promise> { if (!ingestionTransporter) { throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); } @@ -167,15 +154,8 @@ export function algoliasearch( throw new Error('`region` must be provided when leveraging the transformation pipeline'); } - return ingestionTransporter?.push( - { - indexName, - watch: waitForTasks, - pushTaskPayload: { - action: 'addObject', - records: objects as PushTaskRecords[], - }, - }, + return ingestionTransporter.chunkedPush( + { indexName, objects, action: 'addObject', waitForTasks }, requestOptions, ); }, @@ -183,7 +163,7 @@ export function algoliasearch( async partialUpdateObjectsWithTransformation( { indexName, objects, createIfNotExists, waitForTasks }, requestOptions, - ): Promise { + ): Promise> { if (!ingestionTransporter) { throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); } @@ -192,86 +172,17 @@ export function algoliasearch( throw new Error('`region` must be provided when leveraging the transformation pipeline'); } - return ingestionTransporter?.push( + return ingestionTransporter.chunkedPush( { indexName, - watch: waitForTasks, - pushTaskPayload: { - action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate', - records: objects as PushTaskRecords[], - }, + objects, + action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate', + waitForTasks, }, requestOptions, ); }, - async chunkedPush( - { indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000 }: ChunkedBatchOptions, - requestOptions?: RequestOptions, - ): Promise> { - if (!ingestionTransporter) { - throw new Error('`transformation.region` must be provided at client instantiation before calling this method.'); - } - - if (!options?.transformation?.region) { - throw new Error('`region` must be provided when leveraging the transformation pipeline'); - } - - let records: Array = []; - const responses: Array = []; - - const objectEntries = objects.entries(); - for (const [i, obj] of objectEntries) { - records.push(obj as PushTaskRecords); - if (records.length === batchSize || i === objects.length - 1) { - responses.push( - await ingestionTransporter.push( - { indexName, pushTaskPayload: { action, records }, watch: waitForTasks }, - requestOptions, - ), - ); - records = []; - } - } - - let retryCount = 0; - - if (waitForTasks) { - for (const resp of responses) { - if (!resp.eventID) { - throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); - } - - await createIterablePromise({ - func: async () => { - if (resp.eventID === undefined || !resp.eventID) { - throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); - } - - return ingestionTransporter - .getEvent({ runID: resp.runID, eventID: resp.eventID }) - .catch((error: ApiError) => { - if (error.status === 404) { - return undefined; - } - - throw error; - }); - }, - validate: (response) => response !== undefined, - aggregator: () => (retryCount += 1), - error: { - validate: () => retryCount >= 50, - message: () => `The maximum number of retries exceeded. (${retryCount}/${50})`, - }, - timeout: (): number => Math.min(retryCount * 500, 5000), - }); - } - } - - return responses; - }, - async replaceAllObjectsWithTransformation( { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined, @@ -304,8 +215,8 @@ export function algoliasearch( requestOptions, ); - const watchResponses = await this.chunkedPush( - { indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, + const watchResponses = await ingestionTransporter.chunkedPush( + { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName }, requestOptions, ); diff --git a/packages/ingestion/model/clientMethodProps.ts b/packages/ingestion/model/clientMethodProps.ts index d91a7778c..24c580d40 100644 --- a/packages/ingestion/model/clientMethodProps.ts +++ b/packages/ingestion/model/clientMethodProps.ts @@ -1,5 +1,6 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. +import type { Action } from '../model/action'; import type { ActionType } from '../model/actionType'; import type { AuthenticationSortKeys } from '../model/authenticationSortKeys'; @@ -745,3 +746,35 @@ export type ValidateSourceBeforeUpdateProps = { sourceID: string; sourceUpdate: SourceUpdate; }; + +export type ChunkedPushOptions = { + /** + * The `indexName` to replace `objects` in. + */ + indexName: string; + + /** + * The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`. + */ + action?: Action | undefined; + + /** + * Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. + */ + waitForTasks?: boolean | undefined; + + /** + * The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. + */ + batchSize?: number | undefined; + + /** + * This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source index name). + */ + referenceIndexName?: string | undefined; + + /** + * The array of `objects` to store in the given Algolia `indexName`. + */ + objects: Array>; +}; diff --git a/packages/ingestion/src/ingestionClient.ts b/packages/ingestion/src/ingestionClient.ts index a31796764..c4ca5b4c9 100644 --- a/packages/ingestion/src/ingestionClient.ts +++ b/packages/ingestion/src/ingestionClient.ts @@ -1,6 +1,7 @@ // 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. import type { + ApiError, CreateClientOptions, Headers, Host, @@ -8,7 +9,7 @@ import type { Request, RequestOptions, } from '@algolia/client-common'; -import { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common'; +import { createAuth, createIterablePromise, createTransporter, getAlgoliaAgent } from '@algolia/client-common'; import type { Authentication } from '../model/authentication'; import type { AuthenticationCreate } from '../model/authenticationCreate'; @@ -67,6 +68,7 @@ import type { TransformationUpdateResponse } from '../model/transformationUpdate import type { WatchResponse } from '../model/watchResponse'; import type { + ChunkedPushOptions, CustomDeleteProps, CustomGetProps, CustomPostProps, @@ -114,6 +116,7 @@ import type { } from '../model/clientMethodProps'; import type { OnDemandTrigger } from '../model/onDemandTrigger'; +import type { PushTaskRecords } from '../model/pushTaskRecords'; import type { ScheduleTrigger } from '../model/scheduleTrigger'; import type { SubscriptionTrigger } from '../model/subscriptionTrigger'; import type { TaskCreateTrigger } from '../model/taskCreateTrigger'; @@ -240,6 +243,80 @@ export function createIngestionClient({ } }, + /** + * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `push` requests by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/). + * + * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests. + * @param chunkedPush - The `chunkedPush` object. + * @param chunkedPush.indexName - The `indexName` to replace `objects` in. + * @param chunkedPush.objects - The array of `objects` to store in the given Algolia `indexName`. + * @param chunkedPush.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`. + * @param chunkedPush.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable. + * @param chunkedPush.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000. + * @param chunkedPush.referenceIndexName - This is required when targeting an index that does not have a push connector setup (e.g. a tmp index), but you wish to attach another index's transformation to it (e.g. the source index name). + * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getEvent` method and merged with the transporter requestOptions. + */ + async chunkedPush( + { + indexName, + objects, + action = 'addObject', + waitForTasks, + batchSize = 1000, + referenceIndexName, + }: ChunkedPushOptions, + requestOptions?: RequestOptions, + ): Promise> { + let records: Array = []; + const responses: Array = []; + + const objectEntries = objects.entries(); + for (const [i, obj] of objectEntries) { + records.push(obj as PushTaskRecords); + if (records.length === batchSize || i === objects.length - 1) { + responses.push( + await this.push({ indexName, pushTaskPayload: { action, records }, referenceIndexName }, requestOptions), + ); + records = []; + } + } + + let retryCount = 0; + + if (waitForTasks) { + for (const resp of responses) { + if (!resp.eventID) { + throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); + } + + await createIterablePromise({ + func: async () => { + if (resp.eventID === undefined || !resp.eventID) { + throw new Error('received unexpected response from the push endpoint, eventID must not be undefined'); + } + + return this.getEvent({ runID: resp.runID, eventID: resp.eventID }).catch((error: ApiError) => { + if (error.status === 404) { + return undefined; + } + + throw error; + }); + }, + validate: (response) => response !== undefined, + aggregator: () => (retryCount += 1), + error: { + validate: () => retryCount >= 50, + message: () => `The maximum number of retries exceeded. (${retryCount}/${50})`, + }, + timeout: (): number => Math.min(retryCount * 500, 5000), + }); + } + } + + return responses; + }, + /** * Creates a new authentication resource. * From db2783a806876a4cee04197c40ebd78e1ebb55ab Mon Sep 17 00:00:00 2001 From: algolia-bot Date: Thu, 19 Jun 2025 11:29:34 +0000 Subject: [PATCH 5/5] chore: release 5.29.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: algolia-bot Co-authored-by: Clément Vannicatte --- CHANGELOG.md | 7 + README.md | 10 +- package.json | 2 +- packages/advanced-personalization/README.md | 8 +- .../advanced-personalization/package.json | 10 +- .../src/advancedPersonalizationClient.ts | 2 +- packages/algoliasearch/README.md | 10 +- packages/algoliasearch/lite/src/liteClient.ts | 2 +- packages/algoliasearch/package.json | 30 ++-- packages/client-abtesting/README.md | 8 +- packages/client-abtesting/package.json | 10 +- .../client-abtesting/src/abtestingClient.ts | 2 +- packages/client-analytics/README.md | 8 +- packages/client-analytics/package.json | 10 +- .../client-analytics/src/analyticsClient.ts | 2 +- packages/client-common/package.json | 2 +- packages/client-composition/README.md | 8 +- packages/client-composition/package.json | 10 +- .../src/compositionFullClient.ts | 2 +- packages/client-insights/README.md | 8 +- packages/client-insights/package.json | 10 +- .../client-insights/src/insightsClient.ts | 2 +- packages/client-personalization/README.md | 8 +- packages/client-personalization/package.json | 10 +- .../src/personalizationClient.ts | 2 +- packages/client-query-suggestions/README.md | 8 +- .../client-query-suggestions/package.json | 10 +- .../src/querySuggestionsClient.ts | 2 +- packages/client-search/README.md | 8 +- packages/client-search/package.json | 10 +- packages/client-search/src/searchClient.ts | 2 +- packages/composition/README.md | 8 +- packages/composition/package.json | 10 +- packages/composition/src/compositionClient.ts | 2 +- packages/ingestion/README.md | 8 +- packages/ingestion/package.json | 10 +- packages/ingestion/src/ingestionClient.ts | 2 +- packages/logger-console/package.json | 4 +- packages/monitoring/README.md | 8 +- packages/monitoring/package.json | 10 +- packages/monitoring/src/monitoringClient.ts | 2 +- packages/recommend/README.md | 8 +- packages/recommend/package.json | 10 +- packages/recommend/src/recommendClient.ts | 2 +- packages/requester-browser-xhr/package.json | 4 +- packages/requester-fetch/package.json | 4 +- packages/requester-node-http/package.json | 4 +- packages/requester-testing/package.json | 10 +- yarn.lock | 168 +++++++++--------- 49 files changed, 252 insertions(+), 245 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d89e5a6c..a54e85f30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [5.29.0](https://github.com/algolia/algoliasearch-client-javascript/compare/5.28.0...5.29.0) + +- [928de4a7d5](https://github.com/algolia/api-clients-automation/commit/928de4a7d5) fix(specs): fix type in realtime_user ([#5012](https://github.com/algolia/api-clients-automation/pull/5012)) by [@raed667](https://github.com/raed667/) +- [a2ebbf496c](https://github.com/algolia/api-clients-automation/commit/a2ebbf496c) feat(clients): add `replaceAllObjectsWithTransformation` ([#5008](https://github.com/algolia/api-clients-automation/pull/5008)) by [@shortcuts](https://github.com/shortcuts/) +- [5e3869931b](https://github.com/algolia/api-clients-automation/commit/5e3869931b) chore(spec): fix comment of custom path ([#5014](https://github.com/algolia/api-clients-automation/pull/5014)) by [@millotp](https://github.com/millotp/) +- [9dec2bb122](https://github.com/algolia/api-clients-automation/commit/9dec2bb122) fix(clients): allow chunked requests on WithTransformation methods ([#5011](https://github.com/algolia/api-clients-automation/pull/5011)) by [@shortcuts](https://github.com/shortcuts/) + ## [5.28.0](https://github.com/algolia/algoliasearch-client-javascript/compare/5.27.0...5.28.0) - [e0689b5b76](https://github.com/algolia/api-clients-automation/commit/e0689b5b76) feat(javascript): add `exactOptionalPropertyTypes` to tsconfig ([#4935](https://github.com/algolia/api-clients-automation/pull/4935)) by [@shortcuts](https://github.com/shortcuts/) diff --git a/README.md b/README.md index 34de2b2f6..e4fcb4be7 100644 --- a/README.md +++ b/README.md @@ -38,11 +38,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add algoliasearch@5.28.0 +yarn add algoliasearch@5.29.0 # or -npm install algoliasearch@5.28.0 +npm install algoliasearch@5.29.0 # or -pnpm add algoliasearch@5.28.0 +pnpm add algoliasearch@5.29.0 ``` ### Without a package manager @@ -51,10 +51,10 @@ Add the following JavaScript snippet to the of your website: ```html // for the full client - + // for the lite client - + ``` ### Usage diff --git a/package.json b/package.json index 7b4e82085..bfa0dc9ac 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ }, { "path": "packages/ingestion/dist/builds/browser.umd.js", - "maxSize": "6.15KB" + "maxSize": "6.65KB" }, { "path": "packages/monitoring/dist/builds/browser.umd.js", diff --git a/packages/advanced-personalization/README.md b/packages/advanced-personalization/README.md index e917b68f3..0499ad6d2 100644 --- a/packages/advanced-personalization/README.md +++ b/packages/advanced-personalization/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/advanced-personalization@0.0.1-alpha.1 +yarn add @algolia/advanced-personalization@0.0.1-alpha.2 # or -npm install @algolia/advanced-personalization@0.0.1-alpha.1 +npm install @algolia/advanced-personalization@0.0.1-alpha.2 # or -pnpm add @algolia/advanced-personalization@0.0.1-alpha.1 +pnpm add @algolia/advanced-personalization@0.0.1-alpha.2 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/advanced-personalization@0.0.1-alpha.1 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/advanced-personalization/package.json b/packages/advanced-personalization/package.json index d00d7966f..278e7bc1b 100644 --- a/packages/advanced-personalization/package.json +++ b/packages/advanced-personalization/package.json @@ -1,5 +1,5 @@ { - "version": "0.0.1-alpha.1", + "version": "0.0.1-alpha.2", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/advanced-personalization/src/advancedPersonalizationClient.ts b/packages/advanced-personalization/src/advancedPersonalizationClient.ts index 62b69ed46..7dadb2daf 100644 --- a/packages/advanced-personalization/src/advancedPersonalizationClient.ts +++ b/packages/advanced-personalization/src/advancedPersonalizationClient.ts @@ -34,7 +34,7 @@ import type { GetUsersProps, } from '../model/clientMethodProps'; -export const apiClientVersion = '0.0.1-alpha.1'; +export const apiClientVersion = '0.0.1-alpha.2'; export const REGIONS = ['eu', 'us'] as const; export type Region = (typeof REGIONS)[number]; diff --git a/packages/algoliasearch/README.md b/packages/algoliasearch/README.md index 34de2b2f6..e4fcb4be7 100644 --- a/packages/algoliasearch/README.md +++ b/packages/algoliasearch/README.md @@ -38,11 +38,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add algoliasearch@5.28.0 +yarn add algoliasearch@5.29.0 # or -npm install algoliasearch@5.28.0 +npm install algoliasearch@5.29.0 # or -pnpm add algoliasearch@5.28.0 +pnpm add algoliasearch@5.29.0 ``` ### Without a package manager @@ -51,10 +51,10 @@ Add the following JavaScript snippet to the of your website: ```html // for the full client - + // for the lite client - + ``` ### Usage diff --git a/packages/algoliasearch/lite/src/liteClient.ts b/packages/algoliasearch/lite/src/liteClient.ts index fafeabcdb..ce093418f 100644 --- a/packages/algoliasearch/lite/src/liteClient.ts +++ b/packages/algoliasearch/lite/src/liteClient.ts @@ -24,7 +24,7 @@ import type { import type { SearchForFacetValuesResponse } from '../model/searchForFacetValuesResponse'; import type { SearchResponse } from '../model/searchResponse'; -export const apiClientVersion = '5.28.0'; +export const apiClientVersion = '5.29.0'; function getDefaultHosts(appId: string): Host[] { return ( diff --git a/packages/algoliasearch/package.json b/packages/algoliasearch/package.json index e8d9e47e8..54950fa3c 100644 --- a/packages/algoliasearch/package.json +++ b/packages/algoliasearch/package.json @@ -1,5 +1,5 @@ { - "version": "5.28.0", + "version": "5.29.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -74,22 +74,22 @@ "lite.d.ts" ], "dependencies": { - "@algolia/client-abtesting": "5.28.0", - "@algolia/client-analytics": "5.28.0", - "@algolia/client-common": "5.28.0", - "@algolia/client-insights": "5.28.0", - "@algolia/client-personalization": "5.28.0", - "@algolia/client-query-suggestions": "5.28.0", - "@algolia/client-search": "5.28.0", - "@algolia/ingestion": "1.28.0", - "@algolia/monitoring": "1.28.0", - "@algolia/recommend": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-abtesting": "5.29.0", + "@algolia/client-analytics": "5.29.0", + "@algolia/client-common": "5.29.0", + "@algolia/client-insights": "5.29.0", + "@algolia/client-personalization": "5.29.0", + "@algolia/client-query-suggestions": "5.29.0", + "@algolia/client-search": "5.29.0", + "@algolia/ingestion": "1.29.0", + "@algolia/monitoring": "1.29.0", + "@algolia/recommend": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { - "@algolia/requester-testing": "5.28.0", + "@algolia/requester-testing": "5.29.0", "@arethetypeswrong/cli": "0.18.2", "@cloudflare/vitest-pool-workers": "0.8.38", "@cloudflare/workers-types": "4.20250428.0", diff --git a/packages/client-abtesting/README.md b/packages/client-abtesting/README.md index d648bccde..4c3f441b1 100644 --- a/packages/client-abtesting/README.md +++ b/packages/client-abtesting/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/client-abtesting@5.28.0 +yarn add @algolia/client-abtesting@5.29.0 # or -npm install @algolia/client-abtesting@5.28.0 +npm install @algolia/client-abtesting@5.29.0 # or -pnpm add @algolia/client-abtesting@5.28.0 +pnpm add @algolia/client-abtesting@5.29.0 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/client-abtesting@5.28.0 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/client-abtesting/package.json b/packages/client-abtesting/package.json index c21f99f86..225c64267 100644 --- a/packages/client-abtesting/package.json +++ b/packages/client-abtesting/package.json @@ -1,5 +1,5 @@ { - "version": "5.28.0", + "version": "5.29.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/client-abtesting/src/abtestingClient.ts b/packages/client-abtesting/src/abtestingClient.ts index bbfa43416..c454f60d9 100644 --- a/packages/client-abtesting/src/abtestingClient.ts +++ b/packages/client-abtesting/src/abtestingClient.ts @@ -31,7 +31,7 @@ import type { StopABTestProps, } from '../model/clientMethodProps'; -export const apiClientVersion = '5.28.0'; +export const apiClientVersion = '5.29.0'; export const REGIONS = ['de', 'us'] as const; export type Region = (typeof REGIONS)[number]; diff --git a/packages/client-analytics/README.md b/packages/client-analytics/README.md index 7680da94f..b13112a9f 100644 --- a/packages/client-analytics/README.md +++ b/packages/client-analytics/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/client-analytics@5.28.0 +yarn add @algolia/client-analytics@5.29.0 # or -npm install @algolia/client-analytics@5.28.0 +npm install @algolia/client-analytics@5.29.0 # or -pnpm add @algolia/client-analytics@5.28.0 +pnpm add @algolia/client-analytics@5.29.0 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/client-analytics@5.28.0 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/client-analytics/package.json b/packages/client-analytics/package.json index 868faf3bb..7728a06d8 100644 --- a/packages/client-analytics/package.json +++ b/packages/client-analytics/package.json @@ -1,5 +1,5 @@ { - "version": "5.28.0", + "version": "5.29.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/client-analytics/src/analyticsClient.ts b/packages/client-analytics/src/analyticsClient.ts index 3f56b8fd4..d19fdddbe 100644 --- a/packages/client-analytics/src/analyticsClient.ts +++ b/packages/client-analytics/src/analyticsClient.ts @@ -58,7 +58,7 @@ import type { GetUsersCountProps, } from '../model/clientMethodProps'; -export const apiClientVersion = '5.28.0'; +export const apiClientVersion = '5.29.0'; export const REGIONS = ['de', 'us'] as const; export type Region = (typeof REGIONS)[number]; diff --git a/packages/client-common/package.json b/packages/client-common/package.json index 3932db8ca..bf75ec61f 100644 --- a/packages/client-common/package.json +++ b/packages/client-common/package.json @@ -1,6 +1,6 @@ { "name": "@algolia/client-common", - "version": "5.28.0", + "version": "5.29.0", "description": "Common package for the Algolia JavaScript API client.", "repository": { "type": "git", diff --git a/packages/client-composition/README.md b/packages/client-composition/README.md index 740d05cf4..57d79320e 100644 --- a/packages/client-composition/README.md +++ b/packages/client-composition/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/client-composition@1.4.0 +yarn add @algolia/client-composition@1.5.0 # or -npm install @algolia/client-composition@1.4.0 +npm install @algolia/client-composition@1.5.0 # or -pnpm add @algolia/client-composition@1.4.0 +pnpm add @algolia/client-composition@1.5.0 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/client-composition@1.4.0 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/client-composition/package.json b/packages/client-composition/package.json index bcf21b94b..ed5bea255 100644 --- a/packages/client-composition/package.json +++ b/packages/client-composition/package.json @@ -1,5 +1,5 @@ { - "version": "1.4.0", + "version": "1.5.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/client-composition/src/compositionFullClient.ts b/packages/client-composition/src/compositionFullClient.ts index deac2528c..87ae4c549 100644 --- a/packages/client-composition/src/compositionFullClient.ts +++ b/packages/client-composition/src/compositionFullClient.ts @@ -41,7 +41,7 @@ import type { WaitForCompositionTaskOptions, } from '../model/clientMethodProps'; -export const apiClientVersion = '1.4.0'; +export const apiClientVersion = '1.5.0'; function getDefaultHosts(appId: string): Host[] { return ( diff --git a/packages/client-insights/README.md b/packages/client-insights/README.md index 6ec90801d..4d104ddd3 100644 --- a/packages/client-insights/README.md +++ b/packages/client-insights/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/client-insights@5.28.0 +yarn add @algolia/client-insights@5.29.0 # or -npm install @algolia/client-insights@5.28.0 +npm install @algolia/client-insights@5.29.0 # or -pnpm add @algolia/client-insights@5.28.0 +pnpm add @algolia/client-insights@5.29.0 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/client-insights@5.28.0 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/client-insights/package.json b/packages/client-insights/package.json index d8380cd88..c1e98e793 100644 --- a/packages/client-insights/package.json +++ b/packages/client-insights/package.json @@ -1,5 +1,5 @@ { - "version": "5.28.0", + "version": "5.29.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/client-insights/src/insightsClient.ts b/packages/client-insights/src/insightsClient.ts index 759bb0c75..99b26d6f7 100644 --- a/packages/client-insights/src/insightsClient.ts +++ b/packages/client-insights/src/insightsClient.ts @@ -21,7 +21,7 @@ import type { DeleteUserTokenProps, } from '../model/clientMethodProps'; -export const apiClientVersion = '5.28.0'; +export const apiClientVersion = '5.29.0'; export const REGIONS = ['de', 'us'] as const; export type Region = (typeof REGIONS)[number]; diff --git a/packages/client-personalization/README.md b/packages/client-personalization/README.md index 9cafb04e5..7930e2748 100644 --- a/packages/client-personalization/README.md +++ b/packages/client-personalization/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/client-personalization@5.28.0 +yarn add @algolia/client-personalization@5.29.0 # or -npm install @algolia/client-personalization@5.28.0 +npm install @algolia/client-personalization@5.29.0 # or -pnpm add @algolia/client-personalization@5.28.0 +pnpm add @algolia/client-personalization@5.29.0 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/client-personalization@5.28.0 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/client-personalization/package.json b/packages/client-personalization/package.json index d81bd7ef1..f541ca478 100644 --- a/packages/client-personalization/package.json +++ b/packages/client-personalization/package.json @@ -1,5 +1,5 @@ { - "version": "5.28.0", + "version": "5.29.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/client-personalization/src/personalizationClient.ts b/packages/client-personalization/src/personalizationClient.ts index c85b01b40..85cf4f71a 100644 --- a/packages/client-personalization/src/personalizationClient.ts +++ b/packages/client-personalization/src/personalizationClient.ts @@ -25,7 +25,7 @@ import type { GetUserTokenProfileProps, } from '../model/clientMethodProps'; -export const apiClientVersion = '5.28.0'; +export const apiClientVersion = '5.29.0'; export const REGIONS = ['eu', 'us'] as const; export type Region = (typeof REGIONS)[number]; diff --git a/packages/client-query-suggestions/README.md b/packages/client-query-suggestions/README.md index a5cf05b4b..d923bed9b 100644 --- a/packages/client-query-suggestions/README.md +++ b/packages/client-query-suggestions/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/client-query-suggestions@5.28.0 +yarn add @algolia/client-query-suggestions@5.29.0 # or -npm install @algolia/client-query-suggestions@5.28.0 +npm install @algolia/client-query-suggestions@5.29.0 # or -pnpm add @algolia/client-query-suggestions@5.28.0 +pnpm add @algolia/client-query-suggestions@5.29.0 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/client-query-suggestions@5.28.0 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/client-query-suggestions/package.json b/packages/client-query-suggestions/package.json index c4a93d1d1..43a263f48 100644 --- a/packages/client-query-suggestions/package.json +++ b/packages/client-query-suggestions/package.json @@ -1,5 +1,5 @@ { - "version": "5.28.0", + "version": "5.29.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/client-query-suggestions/src/querySuggestionsClient.ts b/packages/client-query-suggestions/src/querySuggestionsClient.ts index 28a1cfc42..ad1d83c1f 100644 --- a/packages/client-query-suggestions/src/querySuggestionsClient.ts +++ b/packages/client-query-suggestions/src/querySuggestionsClient.ts @@ -30,7 +30,7 @@ import type { UpdateConfigProps, } from '../model/clientMethodProps'; -export const apiClientVersion = '5.28.0'; +export const apiClientVersion = '5.29.0'; export const REGIONS = ['eu', 'us'] as const; export type Region = (typeof REGIONS)[number]; diff --git a/packages/client-search/README.md b/packages/client-search/README.md index 3866206d6..f6e87b146 100644 --- a/packages/client-search/README.md +++ b/packages/client-search/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/client-search@5.28.0 +yarn add @algolia/client-search@5.29.0 # or -npm install @algolia/client-search@5.28.0 +npm install @algolia/client-search@5.29.0 # or -pnpm add @algolia/client-search@5.28.0 +pnpm add @algolia/client-search@5.29.0 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/client-search@5.28.0 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/client-search/package.json b/packages/client-search/package.json index 00775d8c0..290df8b65 100644 --- a/packages/client-search/package.json +++ b/packages/client-search/package.json @@ -1,5 +1,5 @@ { - "version": "5.28.0", + "version": "5.29.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/client-search/src/searchClient.ts b/packages/client-search/src/searchClient.ts index 136bf5d23..97beb8a1a 100644 --- a/packages/client-search/src/searchClient.ts +++ b/packages/client-search/src/searchClient.ts @@ -143,7 +143,7 @@ import type { import type { BatchRequest } from '../model/batchRequest'; -export const apiClientVersion = '5.28.0'; +export const apiClientVersion = '5.29.0'; function getDefaultHosts(appId: string): Host[] { return ( diff --git a/packages/composition/README.md b/packages/composition/README.md index f9af52703..9920f550c 100644 --- a/packages/composition/README.md +++ b/packages/composition/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/composition@1.4.0 +yarn add @algolia/composition@1.5.0 # or -npm install @algolia/composition@1.4.0 +npm install @algolia/composition@1.5.0 # or -pnpm add @algolia/composition@1.4.0 +pnpm add @algolia/composition@1.5.0 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/composition@1.4.0 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/composition/package.json b/packages/composition/package.json index f8ebf8b3d..cddf5f496 100644 --- a/packages/composition/package.json +++ b/packages/composition/package.json @@ -1,5 +1,5 @@ { - "version": "1.4.0", + "version": "1.5.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/composition/src/compositionClient.ts b/packages/composition/src/compositionClient.ts index 984afd94f..b6c19a51a 100644 --- a/packages/composition/src/compositionClient.ts +++ b/packages/composition/src/compositionClient.ts @@ -15,7 +15,7 @@ import type { SearchResponse } from '../model/searchResponse'; import type { SearchForFacetValuesProps, SearchProps } from '../model/clientMethodProps'; -export const apiClientVersion = '1.4.0'; +export const apiClientVersion = '1.5.0'; function getDefaultHosts(appId: string): Host[] { return ( diff --git a/packages/ingestion/README.md b/packages/ingestion/README.md index ec141fc6e..e844b5851 100644 --- a/packages/ingestion/README.md +++ b/packages/ingestion/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/ingestion@1.28.0 +yarn add @algolia/ingestion@1.29.0 # or -npm install @algolia/ingestion@1.28.0 +npm install @algolia/ingestion@1.29.0 # or -pnpm add @algolia/ingestion@1.28.0 +pnpm add @algolia/ingestion@1.29.0 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/ingestion@1.28.0 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/ingestion/package.json b/packages/ingestion/package.json index cc2219fda..e4b6edabe 100644 --- a/packages/ingestion/package.json +++ b/packages/ingestion/package.json @@ -1,5 +1,5 @@ { - "version": "1.28.0", + "version": "1.29.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/ingestion/src/ingestionClient.ts b/packages/ingestion/src/ingestionClient.ts index c4ca5b4c9..5c3e6e649 100644 --- a/packages/ingestion/src/ingestionClient.ts +++ b/packages/ingestion/src/ingestionClient.ts @@ -122,7 +122,7 @@ import type { SubscriptionTrigger } from '../model/subscriptionTrigger'; import type { TaskCreateTrigger } from '../model/taskCreateTrigger'; import type { Trigger } from '../model/trigger'; -export const apiClientVersion = '1.28.0'; +export const apiClientVersion = '1.29.0'; export const REGIONS = ['eu', 'us'] as const; export type Region = (typeof REGIONS)[number]; diff --git a/packages/logger-console/package.json b/packages/logger-console/package.json index b03bfca7a..201baf018 100644 --- a/packages/logger-console/package.json +++ b/packages/logger-console/package.json @@ -1,6 +1,6 @@ { "name": "@algolia/logger-console", - "version": "5.28.0", + "version": "5.29.0", "description": "Promise-based log library using console log.", "repository": { "type": "git", @@ -45,7 +45,7 @@ "vitest": "3.2.3" }, "dependencies": { - "@algolia/client-common": "5.28.0" + "@algolia/client-common": "5.29.0" }, "engines": { "node": ">= 14.0.0" diff --git a/packages/monitoring/README.md b/packages/monitoring/README.md index 0b42dea65..e2234d0ba 100644 --- a/packages/monitoring/README.md +++ b/packages/monitoring/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/monitoring@1.28.0 +yarn add @algolia/monitoring@1.29.0 # or -npm install @algolia/monitoring@1.28.0 +npm install @algolia/monitoring@1.29.0 # or -pnpm add @algolia/monitoring@1.28.0 +pnpm add @algolia/monitoring@1.29.0 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/monitoring@1.28.0 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/monitoring/package.json b/packages/monitoring/package.json index 9da740533..1f3561049 100644 --- a/packages/monitoring/package.json +++ b/packages/monitoring/package.json @@ -1,5 +1,5 @@ { - "version": "1.28.0", + "version": "1.29.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/monitoring/src/monitoringClient.ts b/packages/monitoring/src/monitoringClient.ts index ce4c4fb99..26e9e0875 100644 --- a/packages/monitoring/src/monitoringClient.ts +++ b/packages/monitoring/src/monitoringClient.ts @@ -31,7 +31,7 @@ import type { GetReachabilityProps, } from '../model/clientMethodProps'; -export const apiClientVersion = '1.28.0'; +export const apiClientVersion = '1.29.0'; function getDefaultHosts(): Host[] { return [{ url: 'status.algolia.com', accept: 'readWrite', protocol: 'https' }]; diff --git a/packages/recommend/README.md b/packages/recommend/README.md index 2d3404675..fa2c89459 100644 --- a/packages/recommend/README.md +++ b/packages/recommend/README.md @@ -41,11 +41,11 @@ All of our clients comes with type definition, and are available for both browse ### With a package manager ```bash -yarn add @algolia/recommend@5.28.0 +yarn add @algolia/recommend@5.29.0 # or -npm install @algolia/recommend@5.28.0 +npm install @algolia/recommend@5.29.0 # or -pnpm add @algolia/recommend@5.28.0 +pnpm add @algolia/recommend@5.29.0 ``` ### Without a package manager @@ -53,7 +53,7 @@ pnpm add @algolia/recommend@5.28.0 Add the following JavaScript snippet to the of your website: ```html - + ``` ### Usage diff --git a/packages/recommend/package.json b/packages/recommend/package.json index a9fd31355..cb023fb0e 100644 --- a/packages/recommend/package.json +++ b/packages/recommend/package.json @@ -1,5 +1,5 @@ { - "version": "5.28.0", + "version": "5.29.0", "repository": { "type": "git", "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git" @@ -49,10 +49,10 @@ "index.d.ts" ], "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/recommend/src/recommendClient.ts b/packages/recommend/src/recommendClient.ts index 85415032c..e36b0809e 100644 --- a/packages/recommend/src/recommendClient.ts +++ b/packages/recommend/src/recommendClient.ts @@ -34,7 +34,7 @@ import type { SearchRecommendRulesProps, } from '../model/clientMethodProps'; -export const apiClientVersion = '5.28.0'; +export const apiClientVersion = '5.29.0'; function getDefaultHosts(appId: string): Host[] { return ( diff --git a/packages/requester-browser-xhr/package.json b/packages/requester-browser-xhr/package.json index c93b371a1..c05f75302 100644 --- a/packages/requester-browser-xhr/package.json +++ b/packages/requester-browser-xhr/package.json @@ -1,6 +1,6 @@ { "name": "@algolia/requester-browser-xhr", - "version": "5.28.0", + "version": "5.29.0", "description": "Promise-based request library for browser using xhr.", "repository": { "type": "git", @@ -32,7 +32,7 @@ "test:bundle": "publint . && attw --pack . --ignore-rules cjs-resolves-to-esm" }, "dependencies": { - "@algolia/client-common": "5.28.0" + "@algolia/client-common": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/requester-fetch/package.json b/packages/requester-fetch/package.json index 7eeada2fd..e682856f4 100644 --- a/packages/requester-fetch/package.json +++ b/packages/requester-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@algolia/requester-fetch", - "version": "5.28.0", + "version": "5.29.0", "description": "Promise-based request library using Fetch.", "repository": { "type": "git", @@ -48,7 +48,7 @@ "test:bundle": "publint . && attw --pack ." }, "dependencies": { - "@algolia/client-common": "5.28.0" + "@algolia/client-common": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/requester-node-http/package.json b/packages/requester-node-http/package.json index 4b684fff1..e9c973981 100644 --- a/packages/requester-node-http/package.json +++ b/packages/requester-node-http/package.json @@ -1,6 +1,6 @@ { "name": "@algolia/requester-node-http", - "version": "5.28.0", + "version": "5.29.0", "description": "Promise-based request library for node using the native http module.", "repository": { "type": "git", @@ -35,7 +35,7 @@ "test:bundle": "publint . && attw --pack ." }, "dependencies": { - "@algolia/client-common": "5.28.0" + "@algolia/client-common": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/packages/requester-testing/package.json b/packages/requester-testing/package.json index f4a97ba2d..6046a18e0 100644 --- a/packages/requester-testing/package.json +++ b/packages/requester-testing/package.json @@ -1,6 +1,6 @@ { "name": "@algolia/requester-testing", - "version": "5.28.0", + "version": "5.29.0", "private": true, "description": "A package that contains the echo requester of the algoliasearch JavaScript requesters, for testing purposes", "repository": { @@ -43,10 +43,10 @@ "test:bundle": "publint . && attw --pack ." }, "dependencies": { - "@algolia/client-common": "5.28.0", - "@algolia/requester-browser-xhr": "5.28.0", - "@algolia/requester-fetch": "5.28.0", - "@algolia/requester-node-http": "5.28.0" + "@algolia/client-common": "5.29.0", + "@algolia/requester-browser-xhr": "5.29.0", + "@algolia/requester-fetch": "5.29.0", + "@algolia/requester-node-http": "5.29.0" }, "devDependencies": { "@arethetypeswrong/cli": "0.18.2", diff --git a/yarn.lock b/yarn.lock index 9c2948eaf..088129007 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,10 +9,10 @@ __metadata: version: 0.0.0-use.local resolution: "@algolia/advanced-personalization@workspace:packages/advanced-personalization" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -22,14 +22,14 @@ __metadata: languageName: unknown linkType: soft -"@algolia/client-abtesting@npm:5.28.0, @algolia/client-abtesting@workspace:packages/client-abtesting": +"@algolia/client-abtesting@npm:5.29.0, @algolia/client-abtesting@workspace:packages/client-abtesting": version: 0.0.0-use.local resolution: "@algolia/client-abtesting@workspace:packages/client-abtesting" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -39,14 +39,14 @@ __metadata: languageName: unknown linkType: soft -"@algolia/client-analytics@npm:5.28.0, @algolia/client-analytics@workspace:packages/client-analytics": +"@algolia/client-analytics@npm:5.29.0, @algolia/client-analytics@workspace:packages/client-analytics": version: 0.0.0-use.local resolution: "@algolia/client-analytics@workspace:packages/client-analytics" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -56,7 +56,7 @@ __metadata: languageName: unknown linkType: soft -"@algolia/client-common@npm:5.28.0, @algolia/client-common@workspace:packages/client-common": +"@algolia/client-common@npm:5.29.0, @algolia/client-common@workspace:packages/client-common": version: 0.0.0-use.local resolution: "@algolia/client-common@workspace:packages/client-common" dependencies: @@ -75,10 +75,10 @@ __metadata: version: 0.0.0-use.local resolution: "@algolia/client-composition@workspace:packages/client-composition" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -88,14 +88,14 @@ __metadata: languageName: unknown linkType: soft -"@algolia/client-insights@npm:5.28.0, @algolia/client-insights@workspace:packages/client-insights": +"@algolia/client-insights@npm:5.29.0, @algolia/client-insights@workspace:packages/client-insights": version: 0.0.0-use.local resolution: "@algolia/client-insights@workspace:packages/client-insights" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -105,14 +105,14 @@ __metadata: languageName: unknown linkType: soft -"@algolia/client-personalization@npm:5.28.0, @algolia/client-personalization@workspace:packages/client-personalization": +"@algolia/client-personalization@npm:5.29.0, @algolia/client-personalization@workspace:packages/client-personalization": version: 0.0.0-use.local resolution: "@algolia/client-personalization@workspace:packages/client-personalization" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -122,14 +122,14 @@ __metadata: languageName: unknown linkType: soft -"@algolia/client-query-suggestions@npm:5.28.0, @algolia/client-query-suggestions@workspace:packages/client-query-suggestions": +"@algolia/client-query-suggestions@npm:5.29.0, @algolia/client-query-suggestions@workspace:packages/client-query-suggestions": version: 0.0.0-use.local resolution: "@algolia/client-query-suggestions@workspace:packages/client-query-suggestions" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -139,14 +139,14 @@ __metadata: languageName: unknown linkType: soft -"@algolia/client-search@npm:5.28.0, @algolia/client-search@workspace:packages/client-search": +"@algolia/client-search@npm:5.29.0, @algolia/client-search@workspace:packages/client-search": version: 0.0.0-use.local resolution: "@algolia/client-search@workspace:packages/client-search" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -160,10 +160,10 @@ __metadata: version: 0.0.0-use.local resolution: "@algolia/composition@workspace:packages/composition" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -173,14 +173,14 @@ __metadata: languageName: unknown linkType: soft -"@algolia/ingestion@npm:1.28.0, @algolia/ingestion@workspace:packages/ingestion": +"@algolia/ingestion@npm:1.29.0, @algolia/ingestion@workspace:packages/ingestion": version: 0.0.0-use.local resolution: "@algolia/ingestion@workspace:packages/ingestion" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -194,7 +194,7 @@ __metadata: version: 0.0.0-use.local resolution: "@algolia/logger-console@workspace:packages/logger-console" dependencies: - "@algolia/client-common": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" jsdom: "npm:26.1.0" @@ -206,14 +206,14 @@ __metadata: languageName: unknown linkType: soft -"@algolia/monitoring@npm:1.28.0, @algolia/monitoring@workspace:packages/monitoring": +"@algolia/monitoring@npm:1.29.0, @algolia/monitoring@workspace:packages/monitoring": version: 0.0.0-use.local resolution: "@algolia/monitoring@workspace:packages/monitoring" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -223,14 +223,14 @@ __metadata: languageName: unknown linkType: soft -"@algolia/recommend@npm:5.28.0, @algolia/recommend@workspace:packages/recommend": +"@algolia/recommend@npm:5.29.0, @algolia/recommend@workspace:packages/recommend": version: 0.0.0-use.local resolution: "@algolia/recommend@workspace:packages/recommend" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -240,11 +240,11 @@ __metadata: languageName: unknown linkType: soft -"@algolia/requester-browser-xhr@npm:5.28.0, @algolia/requester-browser-xhr@workspace:packages/requester-browser-xhr": +"@algolia/requester-browser-xhr@npm:5.29.0, @algolia/requester-browser-xhr@workspace:packages/requester-browser-xhr": version: 0.0.0-use.local resolution: "@algolia/requester-browser-xhr@workspace:packages/requester-browser-xhr" dependencies: - "@algolia/client-common": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" jsdom: "npm:26.1.0" @@ -256,11 +256,11 @@ __metadata: languageName: unknown linkType: soft -"@algolia/requester-fetch@npm:5.28.0, @algolia/requester-fetch@workspace:packages/requester-fetch": +"@algolia/requester-fetch@npm:5.29.0, @algolia/requester-fetch@workspace:packages/requester-fetch": version: 0.0.0-use.local resolution: "@algolia/requester-fetch@workspace:packages/requester-fetch" dependencies: - "@algolia/client-common": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" cross-fetch: "npm:4.1.0" @@ -272,11 +272,11 @@ __metadata: languageName: unknown linkType: soft -"@algolia/requester-node-http@npm:5.28.0, @algolia/requester-node-http@workspace:packages/requester-node-http": +"@algolia/requester-node-http@npm:5.29.0, @algolia/requester-node-http@workspace:packages/requester-node-http": version: 0.0.0-use.local resolution: "@algolia/requester-node-http@workspace:packages/requester-node-http" dependencies: - "@algolia/client-common": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" nock: "npm:14.0.5" @@ -287,14 +287,14 @@ __metadata: languageName: unknown linkType: soft -"@algolia/requester-testing@npm:5.28.0, @algolia/requester-testing@workspace:packages/requester-testing": +"@algolia/requester-testing@npm:5.29.0, @algolia/requester-testing@workspace:packages/requester-testing": version: 0.0.0-use.local resolution: "@algolia/requester-testing@workspace:packages/requester-testing" dependencies: - "@algolia/client-common": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@types/node": "npm:22.15.31" publint: "npm:0.3.12" @@ -2499,20 +2499,20 @@ __metadata: version: 0.0.0-use.local resolution: "algoliasearch@workspace:packages/algoliasearch" dependencies: - "@algolia/client-abtesting": "npm:5.28.0" - "@algolia/client-analytics": "npm:5.28.0" - "@algolia/client-common": "npm:5.28.0" - "@algolia/client-insights": "npm:5.28.0" - "@algolia/client-personalization": "npm:5.28.0" - "@algolia/client-query-suggestions": "npm:5.28.0" - "@algolia/client-search": "npm:5.28.0" - "@algolia/ingestion": "npm:1.28.0" - "@algolia/monitoring": "npm:1.28.0" - "@algolia/recommend": "npm:5.28.0" - "@algolia/requester-browser-xhr": "npm:5.28.0" - "@algolia/requester-fetch": "npm:5.28.0" - "@algolia/requester-node-http": "npm:5.28.0" - "@algolia/requester-testing": "npm:5.28.0" + "@algolia/client-abtesting": "npm:5.29.0" + "@algolia/client-analytics": "npm:5.29.0" + "@algolia/client-common": "npm:5.29.0" + "@algolia/client-insights": "npm:5.29.0" + "@algolia/client-personalization": "npm:5.29.0" + "@algolia/client-query-suggestions": "npm:5.29.0" + "@algolia/client-search": "npm:5.29.0" + "@algolia/ingestion": "npm:1.29.0" + "@algolia/monitoring": "npm:1.29.0" + "@algolia/recommend": "npm:5.29.0" + "@algolia/requester-browser-xhr": "npm:5.29.0" + "@algolia/requester-fetch": "npm:5.29.0" + "@algolia/requester-node-http": "npm:5.29.0" + "@algolia/requester-testing": "npm:5.29.0" "@arethetypeswrong/cli": "npm:0.18.2" "@cloudflare/vitest-pool-workers": "npm:0.8.38" "@cloudflare/workers-types": "npm:4.20250428.0"