algoliasearch 5.0.0-beta.2 → 5.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/algoliasearch/builds/browser.d.ts +4 -2
- package/dist/algoliasearch/builds/browser.d.ts.map +1 -1
- package/dist/algoliasearch/builds/node.d.ts +4 -2
- package/dist/algoliasearch/builds/node.d.ts.map +1 -1
- package/dist/algoliasearch.cjs +57 -8
- package/dist/algoliasearch.esm.browser.js +66 -23
- package/dist/algoliasearch.esm.node.js +57 -8
- package/dist/algoliasearch.umd.js +2 -2
- package/dist/client-abtesting/src/abtestingClient.d.ts +1 -1
- package/dist/client-analytics/src/analyticsClient.d.ts +1 -1
- package/dist/client-personalization/src/personalizationClient.d.ts +1 -1
- package/dist/client-search/model/clientMethodProps.d.ts +16 -21
- package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-search/model/index.d.ts +1 -0
- package/dist/client-search/model/index.d.ts.map +1 -1
- package/dist/client-search/model/rankingInfo.d.ts +3 -3
- package/dist/client-search/model/rankingInfo.d.ts.map +1 -1
- package/dist/client-search/model/replaceAllObjectsResponse.d.ts +11 -0
- package/dist/client-search/model/replaceAllObjectsResponse.d.ts.map +1 -0
- package/dist/client-search/src/searchClient.d.ts +27 -4
- package/dist/client-search/src/searchClient.d.ts.map +1 -1
- package/dist/lite/lite.cjs +1 -1
- package/dist/lite/lite.esm.browser.js +10 -16
- package/dist/lite/lite.esm.node.js +1 -1
- package/dist/lite/lite.umd.js +2 -2
- package/dist/lite/model/index.d.ts +0 -38
- package/dist/lite/model/index.d.ts.map +1 -1
- package/dist/lite/model/rankingInfo.d.ts +3 -3
- package/dist/lite/model/rankingInfo.d.ts.map +1 -1
- package/dist/lite/src/liteClient.d.ts +1 -1
- package/lite/model/index.ts +0 -38
- package/lite/model/rankingInfo.ts +3 -3
- package/lite/src/liteClient.ts +1 -1
- package/package.json +12 -12
- package/dist/lite/model/action.d.ts +0 -5
- package/dist/lite/model/action.d.ts.map +0 -1
- package/dist/lite/model/addApiKeyResponse.d.ts +0 -11
- package/dist/lite/model/addApiKeyResponse.d.ts.map +0 -1
- package/dist/lite/model/anchoring.d.ts +0 -5
- package/dist/lite/model/anchoring.d.ts.map +0 -1
- package/dist/lite/model/apiKeyOperation.d.ts +0 -2
- package/dist/lite/model/apiKeyOperation.d.ts.map +0 -1
- package/dist/lite/model/attributeToUpdate.d.ts +0 -3
- package/dist/lite/model/attributeToUpdate.d.ts.map +0 -1
- package/dist/lite/model/browseParams.d.ts +0 -4
- package/dist/lite/model/browseParams.d.ts.map +0 -1
- package/dist/lite/model/builtInOperation.d.ts +0 -12
- package/dist/lite/model/builtInOperation.d.ts.map +0 -1
- package/dist/lite/model/builtInOperationType.d.ts +0 -5
- package/dist/lite/model/builtInOperationType.d.ts.map +0 -1
- package/dist/lite/model/condition.d.ts +0 -21
- package/dist/lite/model/condition.d.ts.map +0 -1
- package/dist/lite/model/consequence.d.ts +0 -26
- package/dist/lite/model/consequence.d.ts.map +0 -1
- package/dist/lite/model/consequenceHide.d.ts +0 -10
- package/dist/lite/model/consequenceHide.d.ts.map +0 -1
- package/dist/lite/model/deleteByParams.d.ts +0 -27
- package/dist/lite/model/deleteByParams.d.ts.map +0 -1
- package/dist/lite/model/dictionaryAction.d.ts +0 -5
- package/dist/lite/model/dictionaryAction.d.ts.map +0 -1
- package/dist/lite/model/dictionaryEntry.d.ts +0 -26
- package/dist/lite/model/dictionaryEntry.d.ts.map +0 -1
- package/dist/lite/model/dictionaryEntryState.d.ts +0 -5
- package/dist/lite/model/dictionaryEntryState.d.ts.map +0 -1
- package/dist/lite/model/dictionaryLanguage.d.ts +0 -10
- package/dist/lite/model/dictionaryLanguage.d.ts.map +0 -1
- package/dist/lite/model/dictionaryType.d.ts +0 -2
- package/dist/lite/model/dictionaryType.d.ts.map +0 -1
- package/dist/lite/model/fetchedIndex.d.ts +0 -47
- package/dist/lite/model/fetchedIndex.d.ts.map +0 -1
- package/dist/lite/model/languages.d.ts +0 -10
- package/dist/lite/model/languages.d.ts.map +0 -1
- package/dist/lite/model/listIndicesResponse.d.ts +0 -12
- package/dist/lite/model/listIndicesResponse.d.ts.map +0 -1
- package/dist/lite/model/logType.d.ts +0 -2
- package/dist/lite/model/logType.d.ts.map +0 -1
- package/dist/lite/model/operationType.d.ts +0 -5
- package/dist/lite/model/operationType.d.ts.map +0 -1
- package/dist/lite/model/promote.d.ts +0 -4
- package/dist/lite/model/promote.d.ts.map +0 -1
- package/dist/lite/model/promoteObjectID.d.ts +0 -14
- package/dist/lite/model/promoteObjectID.d.ts.map +0 -1
- package/dist/lite/model/promoteObjectIDs.d.ts +0 -14
- package/dist/lite/model/promoteObjectIDs.d.ts.map +0 -1
- package/dist/lite/model/rule.d.ts +0 -30
- package/dist/lite/model/rule.d.ts.map +0 -1
- package/dist/lite/model/scopeType.d.ts +0 -2
- package/dist/lite/model/scopeType.d.ts.map +0 -1
- package/dist/lite/model/searchDictionaryEntriesResponse.d.ts +0 -20
- package/dist/lite/model/searchDictionaryEntriesResponse.d.ts.map +0 -1
- package/dist/lite/model/searchSynonymsResponse.d.ts +0 -12
- package/dist/lite/model/searchSynonymsResponse.d.ts.map +0 -1
- package/dist/lite/model/securedAPIKeyRestrictions.d.ts +0 -25
- package/dist/lite/model/securedAPIKeyRestrictions.d.ts.map +0 -1
- package/dist/lite/model/source.d.ts +0 -14
- package/dist/lite/model/source.d.ts.map +0 -1
- package/dist/lite/model/standardEntries.d.ts +0 -18
- package/dist/lite/model/standardEntries.d.ts.map +0 -1
- package/dist/lite/model/synonymHit.d.ts +0 -36
- package/dist/lite/model/synonymHit.d.ts.map +0 -1
- package/dist/lite/model/synonymType.d.ts +0 -5
- package/dist/lite/model/synonymType.d.ts.map +0 -1
- package/dist/lite/model/taskStatus.d.ts +0 -5
- package/dist/lite/model/taskStatus.d.ts.map +0 -1
- package/dist/lite/model/timeRange.d.ts +0 -11
- package/dist/lite/model/timeRange.d.ts.map +0 -1
- package/dist/lite/model/updatedRuleResponse.d.ts +0 -15
- package/dist/lite/model/updatedRuleResponse.d.ts.map +0 -1
- package/dist/lite/model/userId.d.ts +0 -22
- package/dist/lite/model/userId.d.ts.map +0 -1
- package/lite/model/action.ts +0 -13
- package/lite/model/addApiKeyResponse.ts +0 -13
- package/lite/model/anchoring.ts +0 -6
- package/lite/model/apiKeyOperation.ts +0 -3
- package/lite/model/attributeToUpdate.ts +0 -5
- package/lite/model/browseParams.ts +0 -6
- package/lite/model/builtInOperation.ts +0 -15
- package/lite/model/builtInOperationType.ts +0 -13
- package/lite/model/condition.ts +0 -27
- package/lite/model/consequence.ts +0 -32
- package/lite/model/consequenceHide.ts +0 -11
- package/lite/model/deleteByParams.ts +0 -36
- package/lite/model/dictionaryAction.ts +0 -6
- package/lite/model/dictionaryEntry.ts +0 -33
- package/lite/model/dictionaryEntryState.ts +0 -6
- package/lite/model/dictionaryLanguage.ts +0 -11
- package/lite/model/dictionaryType.ts +0 -3
- package/lite/model/fetchedIndex.ts +0 -58
- package/lite/model/languages.ts +0 -14
- package/lite/model/listIndicesResponse.ts +0 -15
- package/lite/model/logType.ts +0 -3
- package/lite/model/operationType.ts +0 -6
- package/lite/model/promote.ts +0 -6
- package/lite/model/promoteObjectID.ts +0 -16
- package/lite/model/promoteObjectIDs.ts +0 -16
- package/lite/model/rule.ts +0 -37
- package/lite/model/scopeType.ts +0 -3
- package/lite/model/searchDictionaryEntriesResponse.ts +0 -25
- package/lite/model/searchSynonymsResponse.ts +0 -15
- package/lite/model/securedAPIKeyRestrictions.ts +0 -32
- package/lite/model/source.ts +0 -16
- package/lite/model/standardEntries.ts +0 -21
- package/lite/model/synonymHit.ts +0 -45
- package/lite/model/synonymType.ts +0 -11
- package/lite/model/taskStatus.ts +0 -6
- package/lite/model/timeRange.ts +0 -13
- package/lite/model/updatedRuleResponse.ts +0 -18
- package/lite/model/userId.ts +0 -26
|
@@ -7,7 +7,7 @@ import type { PersonalizationClient } from '@algolia/client-personalization';
|
|
|
7
7
|
import type { Region as PersonalizationRegion } from '@algolia/client-personalization/src/personalizationClient';
|
|
8
8
|
import type { InitClientOptions, InitClientRegion } from './models';
|
|
9
9
|
export * from './models';
|
|
10
|
-
export declare const apiClientVersion = "5.0.0-beta.
|
|
10
|
+
export declare const apiClientVersion = "5.0.0-beta.3";
|
|
11
11
|
/**
|
|
12
12
|
* The client type.
|
|
13
13
|
*/
|
|
@@ -22,6 +22,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
22
22
|
clearCache(): Promise<void>;
|
|
23
23
|
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
24
24
|
waitForTask({ indexName, taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
|
|
25
|
+
waitForAppTask({ taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForAppTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
|
|
25
26
|
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-common").ApiError | import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
|
|
26
27
|
browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
|
|
27
28
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
|
|
@@ -33,7 +34,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
33
34
|
results: import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse[];
|
|
34
35
|
}>;
|
|
35
36
|
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("@algolia/client-search/model/clientMethodProps").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
|
|
36
|
-
replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/
|
|
37
|
+
replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/replaceAllObjectsResponse").ReplaceAllObjectsResponse>;
|
|
37
38
|
addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
38
39
|
addOrUpdateObject({ indexName, objectID, body }: import("@algolia/client-search/model/clientMethodProps").AddOrUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
|
|
39
40
|
appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
|
|
@@ -57,6 +58,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
57
58
|
deleteSource({ source }: import("@algolia/client-search/model/clientMethodProps").DeleteSourceProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deleteSourceResponse").DeleteSourceResponse>;
|
|
58
59
|
deleteSynonym({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
|
|
59
60
|
getApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
|
|
61
|
+
getAppTask({ taskID }: import("@algolia/client-search/model/clientMethodProps").GetAppTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
|
|
60
62
|
getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, import("@algolia/client-search/model/languages").Languages>>;
|
|
61
63
|
getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getDictionarySettingsResponse").GetDictionarySettingsResponse>;
|
|
62
64
|
getLogs({ offset, length, indexName, type }?: import("@algolia/client-search/model/clientMethodProps").GetLogsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getLogsResponse").GetLogsResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAK/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAa/F,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,IAAI,qBAAqB,EAAE,MAAM,2DAA2D,CAAC;AAWjH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEpE,cAAc,UAAU,CAAC;AAEzB,eAAO,MAAM,gBAAgB,iBAAsB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAG7D,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;kCAgCR,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;uCAuCH,iBAAiB,GAC5B,SAAS,iBAAiB,qBAAqB,CAAC,CAAC,KAClD,qBAAqB;kCAtBT,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAK/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAa/F,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,IAAI,qBAAqB,EAAE,MAAM,2DAA2D,CAAC;AAWjH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEpE,cAAc,UAAU,CAAC;AAEzB,eAAO,MAAM,gBAAgB,iBAAsB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAG7D,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;kCAgCR,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;uCAuCH,iBAAiB,GAC5B,SAAS,iBAAiB,qBAAqB,CAAC,CAAC,KAClD,qBAAqB;kCAtBT,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDnB"}
|
|
@@ -7,7 +7,7 @@ import type { PersonalizationClient } from '@algolia/client-personalization';
|
|
|
7
7
|
import type { Region as PersonalizationRegion } from '@algolia/client-personalization/src/personalizationClient';
|
|
8
8
|
import type { InitClientOptions, InitClientRegion, GenerateSecuredApiKeyOptions, GetSecuredApiKeyRemainingValidityOptions } from './models';
|
|
9
9
|
export * from './models';
|
|
10
|
-
export declare const apiClientVersion = "5.0.0-beta.
|
|
10
|
+
export declare const apiClientVersion = "5.0.0-beta.3";
|
|
11
11
|
/**
|
|
12
12
|
* The client type.
|
|
13
13
|
*/
|
|
@@ -39,6 +39,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
39
39
|
clearCache(): Promise<void>;
|
|
40
40
|
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
41
41
|
waitForTask({ indexName, taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
|
|
42
|
+
waitForAppTask({ taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForAppTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
|
|
42
43
|
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-common").ApiError | import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
|
|
43
44
|
browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
|
|
44
45
|
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
|
|
@@ -50,7 +51,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
50
51
|
results: import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse[];
|
|
51
52
|
}>;
|
|
52
53
|
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("@algolia/client-search/model/clientMethodProps").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
|
|
53
|
-
replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/
|
|
54
|
+
replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/replaceAllObjectsResponse").ReplaceAllObjectsResponse>;
|
|
54
55
|
addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
55
56
|
addOrUpdateObject({ indexName, objectID, body }: import("@algolia/client-search/model/clientMethodProps").AddOrUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
|
|
56
57
|
appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
|
|
@@ -74,6 +75,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
74
75
|
deleteSource({ source }: import("@algolia/client-search/model/clientMethodProps").DeleteSourceProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deleteSourceResponse").DeleteSourceResponse>;
|
|
75
76
|
deleteSynonym({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
|
|
76
77
|
getApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
|
|
78
|
+
getAppTask({ taskID }: import("@algolia/client-search/model/clientMethodProps").GetAppTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
|
|
77
79
|
getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, import("@algolia/client-search/model/languages").Languages>>;
|
|
78
80
|
getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getDictionarySettingsResponse").GetDictionarySettingsResponse>;
|
|
79
81
|
getLogs({ offset, length, indexName, type }?: import("@algolia/client-search/model/clientMethodProps").GetLogsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getLogsResponse").GetLogsResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../builds/node.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAK/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAa/F,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,IAAI,qBAAqB,EAAE,MAAM,2DAA2D,CAAC;AAWjH,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,4BAA4B,EAC5B,wCAAwC,EACzC,MAAM,UAAU,CAAC;AAElB,cAAc,UAAU,CAAC;AAEzB,eAAO,MAAM,gBAAgB,iBAAsB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAG7D,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;kCA0BR,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;uCAuCH,iBAAiB,GAC5B,SAAS,iBAAiB,qBAAqB,CAAC,CAAC,KAClD,qBAAqB;kCAtBT,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;IAmDhB;;;;;;;OAOG;2DAIA,4BAA4B,GAAG,MAAM;IASxC;;;;;;OAMG;0DAGA,wCAAwC,GAAG,MAAM
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../builds/node.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAK/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,+CAA+C,CAAC;AAa/F,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,IAAI,qBAAqB,EAAE,MAAM,2DAA2D,CAAC;AAWjH,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,4BAA4B,EAC5B,wCAAwC,EACzC,MAAM,UAAU,CAAC;AAElB,cAAc,UAAU,CAAC;AAEzB,eAAO,MAAM,gBAAgB,iBAAsB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAG7D,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;kCA0BR,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;uCAuCH,iBAAiB,GAC5B,SAAS,iBAAiB,qBAAqB,CAAC,CAAC,KAClD,qBAAqB;kCAtBT,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;IAmDhB;;;;;;;OAOG;2DAIA,4BAA4B,GAAG,MAAM;IASxC;;;;;;OAMG;0DAGA,wCAAwC,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcvD"}
|
package/dist/algoliasearch.cjs
CHANGED
|
@@ -5,7 +5,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
5
5
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
6
6
|
|
|
7
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.
|
|
8
|
-
const apiClientVersion$4 = '5.0.0-beta.
|
|
8
|
+
const apiClientVersion$4 = '5.0.0-beta.3';
|
|
9
9
|
const REGIONS$2 = ['de', 'us'];
|
|
10
10
|
function getDefaultHosts$3(region) {
|
|
11
11
|
const url = !region
|
|
@@ -310,7 +310,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
310
310
|
}
|
|
311
311
|
|
|
312
312
|
// 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.
|
|
313
|
-
const apiClientVersion$3 = '5.0.0-beta.
|
|
313
|
+
const apiClientVersion$3 = '5.0.0-beta.3';
|
|
314
314
|
const REGIONS$1 = ['de', 'us'];
|
|
315
315
|
function getDefaultHosts$2(region) {
|
|
316
316
|
const url = !region
|
|
@@ -1365,7 +1365,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1365
1365
|
}
|
|
1366
1366
|
|
|
1367
1367
|
// 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.
|
|
1368
|
-
const apiClientVersion$2 = '5.0.0-beta.
|
|
1368
|
+
const apiClientVersion$2 = '5.0.0-beta.3';
|
|
1369
1369
|
const REGIONS = ['eu', 'us'];
|
|
1370
1370
|
function getDefaultHosts$1(region) {
|
|
1371
1371
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -1626,7 +1626,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1626
1626
|
}
|
|
1627
1627
|
|
|
1628
1628
|
// 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.
|
|
1629
|
-
const apiClientVersion$1 = '5.0.0-beta.
|
|
1629
|
+
const apiClientVersion$1 = '5.0.0-beta.3';
|
|
1630
1630
|
function getDefaultHosts(appId) {
|
|
1631
1631
|
return [
|
|
1632
1632
|
{
|
|
@@ -1732,6 +1732,29 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1732
1732
|
timeout: () => timeout(retryCount),
|
|
1733
1733
|
});
|
|
1734
1734
|
},
|
|
1735
|
+
/**
|
|
1736
|
+
* Helper: Wait for an application-level task to complete for a given `taskID`.
|
|
1737
|
+
*
|
|
1738
|
+
* @summary Helper method that waits for a task to be published (completed).
|
|
1739
|
+
* @param waitForAppTaskOptions - The `waitForTaskOptions` object.
|
|
1740
|
+
* @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
|
|
1741
|
+
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
1742
|
+
* @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
1743
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1744
|
+
*/
|
|
1745
|
+
waitForAppTask({ taskID, maxRetries = 50, timeout = (retryCount) => Math.min(retryCount * 200, 5000), }, requestOptions) {
|
|
1746
|
+
let retryCount = 0;
|
|
1747
|
+
return clientCommon.createIterablePromise({
|
|
1748
|
+
func: () => this.getAppTask({ taskID }, requestOptions),
|
|
1749
|
+
validate: (response) => response.status === 'published',
|
|
1750
|
+
aggregator: () => (retryCount += 1),
|
|
1751
|
+
error: {
|
|
1752
|
+
validate: () => retryCount >= maxRetries,
|
|
1753
|
+
message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`,
|
|
1754
|
+
},
|
|
1755
|
+
timeout: () => timeout(retryCount),
|
|
1756
|
+
});
|
|
1757
|
+
},
|
|
1735
1758
|
/**
|
|
1736
1759
|
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
|
1737
1760
|
*
|
|
@@ -1913,9 +1936,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1913
1936
|
async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
|
|
1914
1937
|
let requests = [];
|
|
1915
1938
|
const responses = [];
|
|
1916
|
-
|
|
1939
|
+
const objectEntries = objects.entries();
|
|
1940
|
+
for (const [i, obj] of objectEntries) {
|
|
1917
1941
|
requests.push({ action, body: obj });
|
|
1918
|
-
if (
|
|
1942
|
+
if (requests.length === batchSize || i === objects.length - 1) {
|
|
1919
1943
|
responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));
|
|
1920
1944
|
requests = [];
|
|
1921
1945
|
}
|
|
@@ -1934,7 +1958,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1934
1958
|
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
1935
1959
|
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
1936
1960
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1937
|
-
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length
|
|
1961
|
+
* @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.
|
|
1938
1962
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1939
1963
|
*/
|
|
1940
1964
|
async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
|
|
@@ -2627,6 +2651,31 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2627
2651
|
};
|
|
2628
2652
|
return transporter.request(request, requestOptions);
|
|
2629
2653
|
},
|
|
2654
|
+
/**
|
|
2655
|
+
* Checks the status of a given application task.
|
|
2656
|
+
*
|
|
2657
|
+
* Required API Key ACLs:
|
|
2658
|
+
* - editSettings.
|
|
2659
|
+
*
|
|
2660
|
+
* @param getAppTask - The getAppTask object.
|
|
2661
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
2662
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2663
|
+
*/
|
|
2664
|
+
getAppTask({ taskID }, requestOptions) {
|
|
2665
|
+
if (!taskID) {
|
|
2666
|
+
throw new Error('Parameter `taskID` is required when calling `getAppTask`.');
|
|
2667
|
+
}
|
|
2668
|
+
const requestPath = '/1/task/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
2669
|
+
const headers = {};
|
|
2670
|
+
const queryParameters = {};
|
|
2671
|
+
const request = {
|
|
2672
|
+
method: 'GET',
|
|
2673
|
+
path: requestPath,
|
|
2674
|
+
queryParameters,
|
|
2675
|
+
headers,
|
|
2676
|
+
};
|
|
2677
|
+
return transporter.request(request, requestOptions);
|
|
2678
|
+
},
|
|
2630
2679
|
/**
|
|
2631
2680
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
2632
2681
|
*
|
|
@@ -3101,7 +3150,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3101
3150
|
return transporter.request(request, requestOptions);
|
|
3102
3151
|
},
|
|
3103
3152
|
/**
|
|
3104
|
-
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for
|
|
3153
|
+
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
|
|
3105
3154
|
*
|
|
3106
3155
|
* Required API Key ACLs:
|
|
3107
3156
|
* - addObject.
|
|
@@ -235,6 +235,14 @@ function createStatefulHost(host, status = 'up') {
|
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
+
function _defineProperty(e, r, t) {
|
|
239
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
240
|
+
value: t,
|
|
241
|
+
enumerable: !0,
|
|
242
|
+
configurable: !0,
|
|
243
|
+
writable: !0
|
|
244
|
+
}) : e[r] = t, e;
|
|
245
|
+
}
|
|
238
246
|
function _toPrimitive(t, r) {
|
|
239
247
|
if ("object" != typeof t || !t) return t;
|
|
240
248
|
var e = t[Symbol.toPrimitive];
|
|
@@ -249,20 +257,6 @@ function _toPropertyKey(t) {
|
|
|
249
257
|
var i = _toPrimitive(t, "string");
|
|
250
258
|
return "symbol" == typeof i ? i : i + "";
|
|
251
259
|
}
|
|
252
|
-
function _defineProperty(obj, key, value) {
|
|
253
|
-
key = _toPropertyKey(key);
|
|
254
|
-
if (key in obj) {
|
|
255
|
-
Object.defineProperty(obj, key, {
|
|
256
|
-
value: value,
|
|
257
|
-
enumerable: true,
|
|
258
|
-
configurable: true,
|
|
259
|
-
writable: true
|
|
260
|
-
});
|
|
261
|
-
} else {
|
|
262
|
-
obj[key] = value;
|
|
263
|
-
}
|
|
264
|
-
return obj;
|
|
265
|
-
}
|
|
266
260
|
|
|
267
261
|
class AlgoliaError extends Error {
|
|
268
262
|
constructor(message, name) {
|
|
@@ -283,7 +277,7 @@ class ErrorWithStackTrace extends AlgoliaError {
|
|
|
283
277
|
}
|
|
284
278
|
class RetryError extends ErrorWithStackTrace {
|
|
285
279
|
constructor(stackTrace) {
|
|
286
|
-
super('Unreachable hosts - your application id may be incorrect. If the error persists, please
|
|
280
|
+
super('Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.', stackTrace, 'RetryError');
|
|
287
281
|
}
|
|
288
282
|
}
|
|
289
283
|
class ApiError extends ErrorWithStackTrace {
|
|
@@ -682,7 +676,7 @@ const DEFAULT_READ_TIMEOUT_BROWSER = 2000;
|
|
|
682
676
|
const DEFAULT_WRITE_TIMEOUT_BROWSER = 30000;
|
|
683
677
|
|
|
684
678
|
// 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.
|
|
685
|
-
const apiClientVersion$4 = '5.0.0-beta.
|
|
679
|
+
const apiClientVersion$4 = '5.0.0-beta.3';
|
|
686
680
|
const REGIONS$2 = ['de', 'us'];
|
|
687
681
|
function getDefaultHosts$3(region) {
|
|
688
682
|
const url = !region
|
|
@@ -987,7 +981,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
987
981
|
}
|
|
988
982
|
|
|
989
983
|
// 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.
|
|
990
|
-
const apiClientVersion$3 = '5.0.0-beta.
|
|
984
|
+
const apiClientVersion$3 = '5.0.0-beta.3';
|
|
991
985
|
const REGIONS$1 = ['de', 'us'];
|
|
992
986
|
function getDefaultHosts$2(region) {
|
|
993
987
|
const url = !region
|
|
@@ -2042,7 +2036,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
2042
2036
|
}
|
|
2043
2037
|
|
|
2044
2038
|
// 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.
|
|
2045
|
-
const apiClientVersion$2 = '5.0.0-beta.
|
|
2039
|
+
const apiClientVersion$2 = '5.0.0-beta.3';
|
|
2046
2040
|
const REGIONS = ['eu', 'us'];
|
|
2047
2041
|
function getDefaultHosts$1(region) {
|
|
2048
2042
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -2303,7 +2297,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
2303
2297
|
}
|
|
2304
2298
|
|
|
2305
2299
|
// 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.
|
|
2306
|
-
const apiClientVersion$1 = '5.0.0-beta.
|
|
2300
|
+
const apiClientVersion$1 = '5.0.0-beta.3';
|
|
2307
2301
|
function getDefaultHosts(appId) {
|
|
2308
2302
|
return [
|
|
2309
2303
|
{
|
|
@@ -2409,6 +2403,29 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2409
2403
|
timeout: () => timeout(retryCount),
|
|
2410
2404
|
});
|
|
2411
2405
|
},
|
|
2406
|
+
/**
|
|
2407
|
+
* Helper: Wait for an application-level task to complete for a given `taskID`.
|
|
2408
|
+
*
|
|
2409
|
+
* @summary Helper method that waits for a task to be published (completed).
|
|
2410
|
+
* @param waitForAppTaskOptions - The `waitForTaskOptions` object.
|
|
2411
|
+
* @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
|
|
2412
|
+
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
2413
|
+
* @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
2414
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
2415
|
+
*/
|
|
2416
|
+
waitForAppTask({ taskID, maxRetries = 50, timeout = (retryCount) => Math.min(retryCount * 200, 5000), }, requestOptions) {
|
|
2417
|
+
let retryCount = 0;
|
|
2418
|
+
return createIterablePromise({
|
|
2419
|
+
func: () => this.getAppTask({ taskID }, requestOptions),
|
|
2420
|
+
validate: (response) => response.status === 'published',
|
|
2421
|
+
aggregator: () => (retryCount += 1),
|
|
2422
|
+
error: {
|
|
2423
|
+
validate: () => retryCount >= maxRetries,
|
|
2424
|
+
message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`,
|
|
2425
|
+
},
|
|
2426
|
+
timeout: () => timeout(retryCount),
|
|
2427
|
+
});
|
|
2428
|
+
},
|
|
2412
2429
|
/**
|
|
2413
2430
|
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
|
2414
2431
|
*
|
|
@@ -2590,9 +2607,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2590
2607
|
async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
|
|
2591
2608
|
let requests = [];
|
|
2592
2609
|
const responses = [];
|
|
2593
|
-
|
|
2610
|
+
const objectEntries = objects.entries();
|
|
2611
|
+
for (const [i, obj] of objectEntries) {
|
|
2594
2612
|
requests.push({ action, body: obj });
|
|
2595
|
-
if (
|
|
2613
|
+
if (requests.length === batchSize || i === objects.length - 1) {
|
|
2596
2614
|
responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));
|
|
2597
2615
|
requests = [];
|
|
2598
2616
|
}
|
|
@@ -2611,7 +2629,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2611
2629
|
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
2612
2630
|
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
2613
2631
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
2614
|
-
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length
|
|
2632
|
+
* @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.
|
|
2615
2633
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
2616
2634
|
*/
|
|
2617
2635
|
async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
|
|
@@ -3304,6 +3322,31 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3304
3322
|
};
|
|
3305
3323
|
return transporter.request(request, requestOptions);
|
|
3306
3324
|
},
|
|
3325
|
+
/**
|
|
3326
|
+
* Checks the status of a given application task.
|
|
3327
|
+
*
|
|
3328
|
+
* Required API Key ACLs:
|
|
3329
|
+
* - editSettings.
|
|
3330
|
+
*
|
|
3331
|
+
* @param getAppTask - The getAppTask object.
|
|
3332
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
3333
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3334
|
+
*/
|
|
3335
|
+
getAppTask({ taskID }, requestOptions) {
|
|
3336
|
+
if (!taskID) {
|
|
3337
|
+
throw new Error('Parameter `taskID` is required when calling `getAppTask`.');
|
|
3338
|
+
}
|
|
3339
|
+
const requestPath = '/1/task/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
3340
|
+
const headers = {};
|
|
3341
|
+
const queryParameters = {};
|
|
3342
|
+
const request = {
|
|
3343
|
+
method: 'GET',
|
|
3344
|
+
path: requestPath,
|
|
3345
|
+
queryParameters,
|
|
3346
|
+
headers,
|
|
3347
|
+
};
|
|
3348
|
+
return transporter.request(request, requestOptions);
|
|
3349
|
+
},
|
|
3307
3350
|
/**
|
|
3308
3351
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
3309
3352
|
*
|
|
@@ -3778,7 +3821,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3778
3821
|
return transporter.request(request, requestOptions);
|
|
3779
3822
|
},
|
|
3780
3823
|
/**
|
|
3781
|
-
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for
|
|
3824
|
+
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
|
|
3782
3825
|
*
|
|
3783
3826
|
* Required API Key ACLs:
|
|
3784
3827
|
* - addObject.
|
|
@@ -3,7 +3,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, createIterablePromise,
|
|
|
3
3
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
4
4
|
|
|
5
5
|
// 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.
|
|
6
|
-
const apiClientVersion$4 = '5.0.0-beta.
|
|
6
|
+
const apiClientVersion$4 = '5.0.0-beta.3';
|
|
7
7
|
const REGIONS$2 = ['de', 'us'];
|
|
8
8
|
function getDefaultHosts$3(region) {
|
|
9
9
|
const url = !region
|
|
@@ -308,7 +308,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
// 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.
|
|
311
|
-
const apiClientVersion$3 = '5.0.0-beta.
|
|
311
|
+
const apiClientVersion$3 = '5.0.0-beta.3';
|
|
312
312
|
const REGIONS$1 = ['de', 'us'];
|
|
313
313
|
function getDefaultHosts$2(region) {
|
|
314
314
|
const url = !region
|
|
@@ -1363,7 +1363,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1363
1363
|
}
|
|
1364
1364
|
|
|
1365
1365
|
// 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.
|
|
1366
|
-
const apiClientVersion$2 = '5.0.0-beta.
|
|
1366
|
+
const apiClientVersion$2 = '5.0.0-beta.3';
|
|
1367
1367
|
const REGIONS = ['eu', 'us'];
|
|
1368
1368
|
function getDefaultHosts$1(region) {
|
|
1369
1369
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -1624,7 +1624,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1624
1624
|
}
|
|
1625
1625
|
|
|
1626
1626
|
// 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.
|
|
1627
|
-
const apiClientVersion$1 = '5.0.0-beta.
|
|
1627
|
+
const apiClientVersion$1 = '5.0.0-beta.3';
|
|
1628
1628
|
function getDefaultHosts(appId) {
|
|
1629
1629
|
return [
|
|
1630
1630
|
{
|
|
@@ -1730,6 +1730,29 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1730
1730
|
timeout: () => timeout(retryCount),
|
|
1731
1731
|
});
|
|
1732
1732
|
},
|
|
1733
|
+
/**
|
|
1734
|
+
* Helper: Wait for an application-level task to complete for a given `taskID`.
|
|
1735
|
+
*
|
|
1736
|
+
* @summary Helper method that waits for a task to be published (completed).
|
|
1737
|
+
* @param waitForAppTaskOptions - The `waitForTaskOptions` object.
|
|
1738
|
+
* @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
|
|
1739
|
+
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.
|
|
1740
|
+
* @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
1741
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1742
|
+
*/
|
|
1743
|
+
waitForAppTask({ taskID, maxRetries = 50, timeout = (retryCount) => Math.min(retryCount * 200, 5000), }, requestOptions) {
|
|
1744
|
+
let retryCount = 0;
|
|
1745
|
+
return createIterablePromise({
|
|
1746
|
+
func: () => this.getAppTask({ taskID }, requestOptions),
|
|
1747
|
+
validate: (response) => response.status === 'published',
|
|
1748
|
+
aggregator: () => (retryCount += 1),
|
|
1749
|
+
error: {
|
|
1750
|
+
validate: () => retryCount >= maxRetries,
|
|
1751
|
+
message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`,
|
|
1752
|
+
},
|
|
1753
|
+
timeout: () => timeout(retryCount),
|
|
1754
|
+
});
|
|
1755
|
+
},
|
|
1733
1756
|
/**
|
|
1734
1757
|
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
|
1735
1758
|
*
|
|
@@ -1911,9 +1934,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1911
1934
|
async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
|
|
1912
1935
|
let requests = [];
|
|
1913
1936
|
const responses = [];
|
|
1914
|
-
|
|
1937
|
+
const objectEntries = objects.entries();
|
|
1938
|
+
for (const [i, obj] of objectEntries) {
|
|
1915
1939
|
requests.push({ action, body: obj });
|
|
1916
|
-
if (
|
|
1940
|
+
if (requests.length === batchSize || i === objects.length - 1) {
|
|
1917
1941
|
responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));
|
|
1918
1942
|
requests = [];
|
|
1919
1943
|
}
|
|
@@ -1932,7 +1956,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1932
1956
|
* @param replaceAllObjects - The `replaceAllObjects` object.
|
|
1933
1957
|
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
1934
1958
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
1935
|
-
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length
|
|
1959
|
+
* @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.
|
|
1936
1960
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
1937
1961
|
*/
|
|
1938
1962
|
async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
|
|
@@ -2625,6 +2649,31 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2625
2649
|
};
|
|
2626
2650
|
return transporter.request(request, requestOptions);
|
|
2627
2651
|
},
|
|
2652
|
+
/**
|
|
2653
|
+
* Checks the status of a given application task.
|
|
2654
|
+
*
|
|
2655
|
+
* Required API Key ACLs:
|
|
2656
|
+
* - editSettings.
|
|
2657
|
+
*
|
|
2658
|
+
* @param getAppTask - The getAppTask object.
|
|
2659
|
+
* @param getAppTask.taskID - Unique task identifier.
|
|
2660
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2661
|
+
*/
|
|
2662
|
+
getAppTask({ taskID }, requestOptions) {
|
|
2663
|
+
if (!taskID) {
|
|
2664
|
+
throw new Error('Parameter `taskID` is required when calling `getAppTask`.');
|
|
2665
|
+
}
|
|
2666
|
+
const requestPath = '/1/task/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
|
|
2667
|
+
const headers = {};
|
|
2668
|
+
const queryParameters = {};
|
|
2669
|
+
const request = {
|
|
2670
|
+
method: 'GET',
|
|
2671
|
+
path: requestPath,
|
|
2672
|
+
queryParameters,
|
|
2673
|
+
headers,
|
|
2674
|
+
};
|
|
2675
|
+
return transporter.request(request, requestOptions);
|
|
2676
|
+
},
|
|
2628
2677
|
/**
|
|
2629
2678
|
* Lists supported languages with their supported dictionary types and number of custom entries.
|
|
2630
2679
|
*
|
|
@@ -3099,7 +3148,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
3099
3148
|
return transporter.request(request, requestOptions);
|
|
3100
3149
|
},
|
|
3101
3150
|
/**
|
|
3102
|
-
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for
|
|
3151
|
+
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
|
|
3103
3152
|
*
|
|
3104
3153
|
* Required API Key ACLs:
|
|
3105
3154
|
* - addObject.
|