algoliasearch 5.0.0-alpha.4 → 5.0.0-alpha.5
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 -4
- package/dist/algoliasearch/builds/node.d.ts +4 -4
- package/dist/algoliasearch/lite/src/liteClient.d.ts +1 -1
- package/dist/algoliasearch.cjs.js +17 -17
- package/dist/algoliasearch.esm.browser.js +17 -17
- package/dist/algoliasearch.esm.node.js +17 -17
- package/dist/algoliasearch.umd.js +2 -2
- package/dist/builds/browser.d.ts +4 -4
- package/dist/builds/node.d.ts +4 -4
- 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 +7 -9
- package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-search/src/searchClient.d.ts +8 -8
- package/dist/client-search/src/searchClient.d.ts.map +1 -1
- package/dist/lite/builds/browser.d.ts +4 -4
- package/dist/lite/builds/node.d.ts +4 -4
- package/dist/lite/lite/src/liteClient.d.ts +1 -1
- package/dist/lite/lite.cjs.js +1 -1
- package/dist/lite/lite.esm.browser.js +1 -1
- package/dist/lite/lite.esm.node.js +1 -1
- package/dist/lite/lite.umd.js +2 -2
- package/lite/src/liteClient.ts +1 -1
- package/package.json +8 -8
|
@@ -45,7 +45,7 @@ import type { UpdatedAtResponse } from '../model/updatedAtResponse';
|
|
|
45
45
|
import type { UpdatedAtWithObjectIdResponse } from '../model/updatedAtWithObjectIdResponse';
|
|
46
46
|
import type { UpdatedRuleResponse } from '../model/updatedRuleResponse';
|
|
47
47
|
import type { UserId } from '../model/userId';
|
|
48
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
48
|
+
export declare const apiClientVersion = "5.0.0-alpha.5";
|
|
49
49
|
export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
50
50
|
transporter: import("@algolia/client-common").Transporter;
|
|
51
51
|
/**
|
|
@@ -99,7 +99,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
99
99
|
* @param browseObjects - The browseObjects object.
|
|
100
100
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
101
101
|
* @param browseObjects.browseRequest - The `browse` method parameters.
|
|
102
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
102
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
|
|
103
103
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
104
104
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
105
105
|
*/
|
|
@@ -111,7 +111,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
111
111
|
* @param browseObjects - The browseObjects object.
|
|
112
112
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
113
113
|
* @param browseObjects.searchRulesParams - The `searchRules` method parameters.
|
|
114
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
114
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
115
115
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
116
116
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
117
117
|
*/
|
|
@@ -122,7 +122,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
122
122
|
* @summary Helper method that iterates on the `searchSynonyms` method.
|
|
123
123
|
* @param browseObjects - The browseObjects object.
|
|
124
124
|
* @param browseObjects.indexName - The index in which to perform the request.
|
|
125
|
-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
|
|
125
|
+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
|
|
126
126
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
127
127
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
128
128
|
*/
|
|
@@ -505,11 +505,11 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
505
505
|
* @param partialUpdateObject - The partialUpdateObject object.
|
|
506
506
|
* @param partialUpdateObject.indexName - The index in which to perform the request.
|
|
507
507
|
* @param partialUpdateObject.objectID - Unique identifier of an object.
|
|
508
|
-
* @param partialUpdateObject.
|
|
508
|
+
* @param partialUpdateObject.attributesToUpdate - Map of attribute(s) to update.
|
|
509
509
|
* @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
|
|
510
510
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
511
511
|
*/
|
|
512
|
-
partialUpdateObject({ indexName, objectID,
|
|
512
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: PartialUpdateObjectProps, requestOptions?: RequestOptions): Promise<UpdatedAtWithObjectIdResponse>;
|
|
513
513
|
/**
|
|
514
514
|
* This method allow you to send requests to the Algolia REST API.
|
|
515
515
|
*
|
|
@@ -587,12 +587,12 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
587
587
|
* @summary Save a batch of rules.
|
|
588
588
|
* @param saveRules - The saveRules object.
|
|
589
589
|
* @param saveRules.indexName - The index in which to perform the request.
|
|
590
|
-
* @param saveRules.
|
|
590
|
+
* @param saveRules.rules - The rules object.
|
|
591
591
|
* @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
|
|
592
592
|
* @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
|
|
593
593
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
594
594
|
*/
|
|
595
|
-
saveRules({ indexName,
|
|
595
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: SaveRulesProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
|
|
596
596
|
/**
|
|
597
597
|
* Create a new synonym object or update the existing synonym object with the given object ID.
|
|
598
598
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchClient.d.ts","sourceRoot":"","sources":["../../../../../packages/client-search/src/searchClient.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEd,QAAQ,EAET,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,E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,gBAAgB,mBACT,cAAc,GAC9B,QAAQ,mBAAmB,CAAC;IAmB/B;;;;;;;;OAQG;uCAEsB,gBAAgB,mBACtB,cAAc,GAC9B,QAAQ,mBAAmB,CAAC;IAuB/B;;;;;;OAMG;+BAEY,WAAW,mBACP,cAAc,GAC9B,QAAQ,qBAAqB,CAAC;IA4BjC;;;;;;;;OAQG;wDAEoC,mBAAmB,mBACvC,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IA0C7B;;;;;;;;;;OAUG;
|
|
1
|
+
{"version":3,"file":"searchClient.d.ts","sourceRoot":"","sources":["../../../../../packages/client-search/src/searchClient.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEd,QAAQ,EAET,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,w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;oCAEmB,uBAAuB,GAAG,kBAAkB,mBAC/C,cAAc;IAwDjC;;;;;;;;OAQG;gFAKE,4BAA4B,mBACd,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IAuC7B;;;;;;;;;OASG;iFAME,yBAAyB,mBACX,cAAc,GAC9B,QAAQ,4BAA4B,CAAC;IAgCxC;;;;;;;;OAQG;kDAEiC,gBAAgB,mBACjC,cAAc,GAC9B,QAAQ,mBAAmB,CAAC;IA2B/B;;;;;;;;OAQG;wDAE4B,sBAAsB,mBAClC,cAAc;IA4BjC;;;;;;;;;;;OAWG;kFAQE,mBAAmB,mBACL,cAAc,GAC9B,QAAQ,sBAAsB,CAAC;IAuClC;;;;;;OAMG;uCAEoB,mBAAmB,mBACvB,cAAc,GAC9B,QAAQ,qBAAqB,CAAC;IA8BjC;;;;;;OAMG;oDAEyB,wBAAwB,mBACjC,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IA4B7B;;;;;;;;;OASG;iEAEgD,gBAAgB,mBAChD,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IAmC7B;;;;;;;;OAQG;kCAEgB,iBAAiB,mBACjB,cAAc,GAC9B,QAAQ,oBAAoB,CAAC;EAqCnC;AAED;;GAEG;AACH,oBAAY,YAAY,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import type { ClientOptions } from '@algolia/client-common';
|
|
|
4
4
|
import type { Region as PersonalizationRegion, PersonalizationClient } from '@algolia/client-personalization/src/personalizationClient';
|
|
5
5
|
import type { InitClientOptions, InitClientRegion } from './models';
|
|
6
6
|
export * from './models';
|
|
7
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
7
|
+
export declare const apiClientVersion = "5.0.0-alpha.5";
|
|
8
8
|
/**
|
|
9
9
|
* The client type.
|
|
10
10
|
*/
|
|
@@ -19,7 +19,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
19
19
|
clearCache(): Promise<void>;
|
|
20
20
|
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
21
21
|
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>;
|
|
22
|
-
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-
|
|
22
|
+
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>;
|
|
23
23
|
browseObjects<T>({ indexName, browseRequest, ...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>>;
|
|
24
24
|
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>;
|
|
25
25
|
browseSynonyms({ indexName, validate, aggregator, ...browseSynonymsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
|
|
@@ -63,7 +63,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
63
63
|
listUserIds({ page, hitsPerPage }: import("@algolia/client-search/model/clientMethodProps").ListUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listUserIdsResponse").ListUserIdsResponse>;
|
|
64
64
|
multipleBatch(batchParams: import("@algolia/client-search/model/batchParams").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/multipleBatchResponse").MultipleBatchResponse>;
|
|
65
65
|
operationIndex({ indexName, operationIndexParams }: import("@algolia/client-search/model/clientMethodProps").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
66
|
-
partialUpdateObject({ indexName, objectID,
|
|
66
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
|
|
67
67
|
post({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
68
68
|
put({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PutProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
69
69
|
removeUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/removeUserIdResponse").RemoveUserIdResponse>;
|
|
@@ -71,7 +71,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
71
71
|
restoreApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
72
72
|
saveObject({ indexName, body }: import("@algolia/client-search/model/clientMethodProps").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveObjectResponse").SaveObjectResponse>;
|
|
73
73
|
saveRule({ indexName, objectID, rule, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedRuleResponse").UpdatedRuleResponse>;
|
|
74
|
-
saveRules({ indexName,
|
|
74
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("@algolia/client-search/model/clientMethodProps").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
75
75
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveSynonymResponse").SaveSynonymResponse>;
|
|
76
76
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
77
77
|
search<T_3>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponses").SearchResponses<T_3>>;
|
|
@@ -4,7 +4,7 @@ import type { ClientOptions } from '@algolia/client-common';
|
|
|
4
4
|
import type { Region as PersonalizationRegion, PersonalizationClient } from '@algolia/client-personalization/src/personalizationClient';
|
|
5
5
|
import type { InitClientOptions, InitClientRegion } from './models';
|
|
6
6
|
export * from './models';
|
|
7
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
7
|
+
export declare const apiClientVersion = "5.0.0-alpha.5";
|
|
8
8
|
/**
|
|
9
9
|
* The client type.
|
|
10
10
|
*/
|
|
@@ -19,7 +19,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
19
19
|
clearCache(): Promise<void>;
|
|
20
20
|
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
21
21
|
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>;
|
|
22
|
-
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-
|
|
22
|
+
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>;
|
|
23
23
|
browseObjects<T>({ indexName, browseRequest, ...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>>;
|
|
24
24
|
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>;
|
|
25
25
|
browseSynonyms({ indexName, validate, aggregator, ...browseSynonymsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
|
|
@@ -63,7 +63,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
63
63
|
listUserIds({ page, hitsPerPage }: import("@algolia/client-search/model/clientMethodProps").ListUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listUserIdsResponse").ListUserIdsResponse>;
|
|
64
64
|
multipleBatch(batchParams: import("@algolia/client-search/model/batchParams").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/multipleBatchResponse").MultipleBatchResponse>;
|
|
65
65
|
operationIndex({ indexName, operationIndexParams }: import("@algolia/client-search/model/clientMethodProps").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
66
|
-
partialUpdateObject({ indexName, objectID,
|
|
66
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
|
|
67
67
|
post({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
68
68
|
put({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PutProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
69
69
|
removeUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/removeUserIdResponse").RemoveUserIdResponse>;
|
|
@@ -71,7 +71,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
71
71
|
restoreApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
72
72
|
saveObject({ indexName, body }: import("@algolia/client-search/model/clientMethodProps").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveObjectResponse").SaveObjectResponse>;
|
|
73
73
|
saveRule({ indexName, objectID, rule, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedRuleResponse").UpdatedRuleResponse>;
|
|
74
|
-
saveRules({ indexName,
|
|
74
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("@algolia/client-search/model/clientMethodProps").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
75
75
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveSynonymResponse").SaveSynonymResponse>;
|
|
76
76
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
77
77
|
search<T_3>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponses").SearchResponses<T_3>>;
|
|
@@ -2,7 +2,7 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common
|
|
|
2
2
|
import type { PostProps, LegacySearchMethodProps } from '../model/clientMethodProps';
|
|
3
3
|
import type { SearchMethodParams } from '../model/searchMethodParams';
|
|
4
4
|
import type { SearchResponses } from '../model/searchResponses';
|
|
5
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
5
|
+
export declare const apiClientVersion = "5.0.0-alpha.5";
|
|
6
6
|
export declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
7
7
|
transporter: import("@algolia/client-common").Transporter;
|
|
8
8
|
/**
|
package/dist/lite/lite.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
6
6
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
7
7
|
|
|
8
8
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
9
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
9
|
+
const apiClientVersion = '5.0.0-alpha.5';
|
|
10
10
|
function getDefaultHosts(appId) {
|
|
11
11
|
return [
|
|
12
12
|
{
|
|
@@ -723,7 +723,7 @@ function createXhrRequester() {
|
|
|
723
723
|
}
|
|
724
724
|
|
|
725
725
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
726
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
726
|
+
const apiClientVersion = '5.0.0-alpha.5';
|
|
727
727
|
function getDefaultHosts(appId) {
|
|
728
728
|
return [
|
|
729
729
|
{
|
|
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, shuffle, DEFAULT_CONNEC
|
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
5
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
5
|
+
const apiClientVersion = '5.0.0-alpha.5';
|
|
6
6
|
function getDefaultHosts(appId) {
|
|
7
7
|
return [
|
|
8
8
|
{
|
package/dist/lite/lite.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! algoliasearch/lite.umd.js | 5.0.0-alpha.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["algoliasearch/lite"]={})}(this,(function(e){"use strict";function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function s(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>r.get(e,a,n).catch((()=>s({caches:t}).get(e,a,n))),set:(e,a)=>r.set(e,a).catch((()=>s({caches:t}).set(e,a))),delete:e=>r.delete(e).catch((()=>s({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>s({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const n=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>n},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=n}}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class p extends u{constructor(e,t,r){super(e,r,"ApiError"),i(this,"status",void 0),this.status=t}}class d extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}function h(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${t(e[r])?JSON.stringify(e[r]):e[r]}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function f(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function m({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:n,requester:i,requestsCache:c,responsesCache:u}){async function m(c,u,m=!0){const g=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),O=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,u.headers),b="GET"===c.method?{...c.data,...u.data}:{},P={"x-algolia-agent":a.value,...s,...c.queryParameters,...b};if(u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?P[e]=u.queryParameters[e].toString():P[e]=u.queryParameters[e];let v=0;const w=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>f(e)))}(g));let a=u.timeout;void 0===a&&(a=m?n.read:n.write);const b={data:y,headers:O,method:c.method,url:h(s,c.path,P),connectTimeout:r(v,n.connect),responseTimeout:r(v,a)},j=t=>{const r={request:b,response:t,host:s,triesLeft:e.length};return g.push(r),r},q=await i.send(b);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(q)){const a=j(q);return q.isTimedOut&&v++,console.log("Retryable failure",f(a)),await t.set(s,o(s,q.isTimedOut?"timed out":"down")),w(e,r)}if(function({status:e}){return 2==~~(e/100)}(q))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(q);throw j(q),function({content:e,status:t},r){let s=e;try{s=JSON.parse(e).message}catch(e){}return new p(s,t,r)}(q,g)},j=e.filter((e=>"readWrite"===e.accept||(m?"read"===e.accept:"write"===e.accept))),q=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),n=[...s,...a];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(j);return w([...q.hosts].reverse(),q.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return m(e,t,a);const n=()=>m(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function g({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}function y(e,t){if(null==e)return{};var r,s,a=function(e,t){if(null==e)return{};var r,s,a={},n=Object.keys(e);for(s=0;s<n.length;s++)r=n[s],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(s=0;s<n.length;s++)r=n[s],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var O=["appId","apiKey","authMode","algoliaAgents"],b=["params"];function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function v(e){for(var r=1;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?P(Object(s),!0).forEach((function(r){t(e,r,s[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):P(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var w="5.0.0-alpha.4";function j(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const s=Math.floor(Math.random()*(r+1)),a=e[r];t[r]=e[s],t[s]=a}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}function q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}e.apiClientVersion=w,e.liteClient=function(e,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!n||"string"!=typeof n)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,r=e.apiKey,s=e.authMode,a=e.algoliaAgents,n=y(e,O),o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(t,r,s),i=m(v(v({hosts:j(t)},n),{},{algoliaAgent:g({algoliaAgents:a,client:"Lite",version:w}),baseHeaders:v(v({"content-type":"text/plain"},o.headers()),n.baseHeaders),baseQueryParameters:v(v({},o.queryParameters()),n.baseQueryParameters)}));return{transporter:i,appId:t,clearCache:function(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((function(){}))},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent:function(e,t){i.algoliaAgent.add({segment:e,version:t})},post:function(e,t){var r=e.path,s=e.parameters,a=e.body;if(!r)throw new Error("Parameter `path` is required when calling `post`.");var n={method:"POST",path:"/1{path}".replace("{path}",r),queryParameters:s||{},headers:{},data:a||{}};return i.request(n,t)},search:function(e,t){if(e&&Array.isArray(e)){var r={requests:e.map((function(e){var t=e.params,r=y(e,b);return"facet"===r.type?v(v(v({},r),t),{},{type:"facet"}):v(v(v({},r),t),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=r}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var s={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return i.request(s,t)}}}(function(e){for(var r=1;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?q(Object(s),!0).forEach((function(r){t(e,r,s[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):q(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}({appId:e,apiKey:n,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:s({caches:[r({key:"".concat(w,"-").concat(e)}),a()]})},o))}}));
|
|
1
|
+
/*! algoliasearch/lite.umd.js | 5.0.0-alpha.5 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["algoliasearch/lite"]={})}(this,(function(e){"use strict";function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function s(e){const t=[...e.caches],r=t.shift();return void 0===r?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>r.get(e,a,n).catch((()=>s({caches:t}).get(e,a,n))),set:(e,a)=>r.set(e,a).catch((()=>s({caches:t}).set(e,a))),delete:e=>r.delete(e).catch((()=>s({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>s({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const n=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>n},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=n}}}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class p extends u{constructor(e,t,r){super(e,r,"ApiError"),i(this,"status",void 0),this.status=t}}class d extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}function h(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${t(e[r])?JSON.stringify(e[r]):e[r]}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function f(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function m({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:n,requester:i,requestsCache:c,responsesCache:u}){async function m(c,u,m=!0){const g=[],y=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),O=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,u.headers),b="GET"===c.method?{...c.data,...u.data}:{},P={"x-algolia-agent":a.value,...s,...c.queryParameters,...b};if(u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?P[e]=u.queryParameters[e].toString():P[e]=u.queryParameters[e];let v=0;const w=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>f(e)))}(g));let a=u.timeout;void 0===a&&(a=m?n.read:n.write);const b={data:y,headers:O,method:c.method,url:h(s,c.path,P),connectTimeout:r(v,n.connect),responseTimeout:r(v,a)},j=t=>{const r={request:b,response:t,host:s,triesLeft:e.length};return g.push(r),r},q=await i.send(b);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(q)){const a=j(q);return q.isTimedOut&&v++,console.log("Retryable failure",f(a)),await t.set(s,o(s,q.isTimedOut?"timed out":"down")),w(e,r)}if(function({status:e}){return 2==~~(e/100)}(q))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(q);throw j(q),function({content:e,status:t},r){let s=e;try{s=JSON.parse(e).message}catch(e){}return new p(s,t,r)}(q,g)},j=e.filter((e=>"readWrite"===e.accept||(m?"read"===e.accept:"write"===e.accept))),q=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),n=[...s,...a];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(j);return w([...q.hosts].reverse(),q.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return m(e,t,a);const n=()=>m(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function g({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}function y(e,t){if(null==e)return{};var r,s,a=function(e,t){if(null==e)return{};var r,s,a={},n=Object.keys(e);for(s=0;s<n.length;s++)r=n[s],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(s=0;s<n.length;s++)r=n[s],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var O=["appId","apiKey","authMode","algoliaAgents"],b=["params"];function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function v(e){for(var r=1;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?P(Object(s),!0).forEach((function(r){t(e,r,s[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):P(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var w="5.0.0-alpha.5";function j(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(e,".algolia.net"),accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const s=Math.floor(Math.random()*(r+1)),a=e[r];t[r]=e[s],t[s]=a}return t}([{url:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}function q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}e.apiClientVersion=w,e.liteClient=function(e,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!n||"string"!=typeof n)throw new Error("`apiKey` is missing.");return function(e){var t=e.appId,r=e.apiKey,s=e.authMode,a=e.algoliaAgents,n=y(e,O),o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(t,r,s),i=m(v(v({hosts:j(t)},n),{},{algoliaAgent:g({algoliaAgents:a,client:"Lite",version:w}),baseHeaders:v(v({"content-type":"text/plain"},o.headers()),n.baseHeaders),baseQueryParameters:v(v({},o.queryParameters()),n.baseQueryParameters)}));return{transporter:i,appId:t,clearCache:function(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((function(){}))},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent:function(e,t){i.algoliaAgent.add({segment:e,version:t})},post:function(e,t){var r=e.path,s=e.parameters,a=e.body;if(!r)throw new Error("Parameter `path` is required when calling `post`.");var n={method:"POST",path:"/1{path}".replace("{path}",r),queryParameters:s||{},headers:{},data:a||{}};return i.request(n,t)},search:function(e,t){if(e&&Array.isArray(e)){var r={requests:e.map((function(e){var t=e.params,r=y(e,b);return"facet"===r.type?v(v(v({},r),t),{},{type:"facet"}):v(v(v({},r),t),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=r}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");var s={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return i.request(s,t)}}}(function(e){for(var r=1;r<arguments.length;r++){var s=null!=arguments[r]?arguments[r]:{};r%2?q(Object(s),!0).forEach((function(r){t(e,r,s[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):q(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}({appId:e,apiKey:n,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:a(),requestsCache:a({serializable:!1}),hostsCache:s({caches:[r({key:"".concat(w,"-").concat(e)}),a()]})},o))}}));
|
package/lite/src/liteClient.ts
CHANGED
|
@@ -22,7 +22,7 @@ import type {
|
|
|
22
22
|
import type { SearchMethodParams } from '../model/searchMethodParams';
|
|
23
23
|
import type { SearchResponses } from '../model/searchResponses';
|
|
24
24
|
|
|
25
|
-
export const apiClientVersion = '5.0.0-alpha.
|
|
25
|
+
export const apiClientVersion = '5.0.0-alpha.5';
|
|
26
26
|
|
|
27
27
|
function getDefaultHosts(appId: string): Host[] {
|
|
28
28
|
return (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "algoliasearch",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.5",
|
|
4
4
|
"description": "A fully-featured and blazing-fast JavaScript API client to interact with Algolia API.",
|
|
5
5
|
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
6
|
"license": "MIT",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"test": "jest"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@algolia/client-abtesting": "5.0.0-alpha.
|
|
62
|
-
"@algolia/client-analytics": "5.0.0-alpha.
|
|
63
|
-
"@algolia/client-common": "5.0.0-alpha.
|
|
64
|
-
"@algolia/client-personalization": "5.0.0-alpha.
|
|
65
|
-
"@algolia/client-search": "5.0.0-alpha.
|
|
66
|
-
"@algolia/requester-browser-xhr": "5.0.0-alpha.
|
|
67
|
-
"@algolia/requester-node-http": "5.0.0-alpha.
|
|
61
|
+
"@algolia/client-abtesting": "5.0.0-alpha.5",
|
|
62
|
+
"@algolia/client-analytics": "5.0.0-alpha.5",
|
|
63
|
+
"@algolia/client-common": "5.0.0-alpha.5",
|
|
64
|
+
"@algolia/client-personalization": "5.0.0-alpha.5",
|
|
65
|
+
"@algolia/client-search": "5.0.0-alpha.5",
|
|
66
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.5",
|
|
67
|
+
"@algolia/requester-node-http": "5.0.0-alpha.5"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@types/jest": "28.1.6",
|