@algolia/client-search 5.0.0-alpha.3 → 5.0.0-alpha.6
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/client-search.cjs.js +148 -26
- package/dist/client-search.esm.browser.js +176 -54
- package/dist/client-search.esm.node.js +149 -27
- package/dist/client-search.umd.js +2 -2
- package/dist/model/acl.d.ts +3 -0
- package/dist/model/acl.d.ts.map +1 -1
- package/dist/model/addApiKeyResponse.d.ts +1 -1
- package/dist/model/attributeToUpdate.d.ts +3 -0
- package/dist/model/attributeToUpdate.d.ts.map +1 -0
- package/dist/model/baseBrowseResponse.d.ts +1 -1
- package/dist/model/baseBrowseResponse.d.ts.map +1 -1
- package/dist/model/baseGetApiKeyResponse.d.ts +11 -0
- package/dist/model/baseGetApiKeyResponse.d.ts.map +1 -0
- package/dist/model/baseSearchResponse.d.ts +1 -1
- package/dist/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/model/batchParams.d.ts +1 -1
- package/dist/model/batchParams.d.ts.map +1 -1
- package/dist/model/clientMethodProps.d.ts +22 -11
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/getApiKeyResponse.d.ts +4 -0
- package/dist/model/getApiKeyResponse.d.ts.map +1 -0
- package/dist/model/getObjectsParams.d.ts +1 -1
- package/dist/model/getObjectsParams.d.ts.map +1 -1
- package/dist/model/index.d.ts +3 -3
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/indexSettingsAsSearchParams.d.ts +4 -0
- package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/model/listApiKeysResponse.d.ts +2 -2
- package/dist/model/listApiKeysResponse.d.ts.map +1 -1
- package/dist/model/multipleBatchRequest.d.ts +3 -3
- package/dist/model/multipleBatchRequest.d.ts.map +1 -1
- package/dist/model/multipleBatchResponse.d.ts +2 -2
- package/dist/model/multipleBatchResponse.d.ts.map +1 -1
- package/dist/model/updateApiKeyResponse.d.ts +1 -1
- package/dist/src/searchClient.d.ts +64 -17
- package/dist/src/searchClient.d.ts.map +1 -1
- package/model/acl.ts +3 -0
- package/model/addApiKeyResponse.ts +1 -1
- package/model/{attributeOrBuiltInOperation.ts → attributeToUpdate.ts} +1 -1
- package/model/baseBrowseResponse.ts +1 -1
- package/model/baseGetApiKeyResponse.ts +13 -0
- package/model/baseSearchResponse.ts +1 -1
- package/model/batchParams.ts +1 -1
- package/model/clientMethodProps.ts +27 -16
- package/model/{key.ts → getApiKeyResponse.ts} +2 -2
- package/model/getObjectsParams.ts +1 -1
- package/model/index.ts +3 -3
- package/model/indexSettingsAsSearchParams.ts +5 -0
- package/model/listApiKeysResponse.ts +2 -2
- package/model/multipleBatchRequest.ts +3 -3
- package/model/multipleBatchResponse.ts +2 -2
- package/model/updateApiKeyResponse.ts +1 -1
- package/package.json +5 -5
- package/dist/model/attributeOrBuiltInOperation.d.ts +0 -3
- package/dist/model/attributeOrBuiltInOperation.d.ts.map +0 -1
- package/dist/model/createdAtObject.d.ts +0 -7
- package/dist/model/createdAtObject.d.ts.map +0 -1
- package/dist/model/key.d.ts +0 -4
- package/dist/model/key.d.ts.map +0 -1
- package/model/createdAtObject.ts +0 -8
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { CreateIterablePromise } from '@algolia/client-common';
|
|
4
4
|
|
|
5
5
|
import type { ApiKey } from './apiKey';
|
|
6
6
|
import type { AssignUserIdParams } from './assignUserIdParams';
|
|
7
|
-
import type {
|
|
7
|
+
import type { AttributeToUpdate } from './attributeToUpdate';
|
|
8
8
|
import type { BatchAssignUserIdsParams } from './batchAssignUserIdsParams';
|
|
9
9
|
import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParams';
|
|
10
10
|
import type { BatchWriteParams } from './batchWriteParams';
|
|
11
11
|
import type { BrowseRequest } from './browseRequest';
|
|
12
12
|
import type { DictionaryType } from './dictionaryType';
|
|
13
|
-
import type { GetTaskResponse } from './getTaskResponse';
|
|
14
13
|
import type { IndexSettings } from './indexSettings';
|
|
15
|
-
import type { Key } from './key';
|
|
16
14
|
import type { LogType } from './logType';
|
|
17
15
|
import type { OperationIndexParams } from './operationIndexParams';
|
|
18
16
|
import type { Rule } from './rule';
|
|
@@ -428,11 +426,9 @@ export type PartialUpdateObjectProps = {
|
|
|
428
426
|
*/
|
|
429
427
|
objectID: string;
|
|
430
428
|
/**
|
|
431
|
-
*
|
|
429
|
+
* Map of attribute(s) to update.
|
|
432
430
|
*/
|
|
433
|
-
|
|
434
|
-
Record<string, AttributeOrBuiltInOperation>
|
|
435
|
-
>;
|
|
431
|
+
attributesToUpdate: Record<string, AttributeToUpdate>;
|
|
436
432
|
/**
|
|
437
433
|
* Creates the record if it does not exist yet.
|
|
438
434
|
*/
|
|
@@ -546,7 +542,7 @@ export type SaveRulesProps = {
|
|
|
546
542
|
* The index in which to perform the request.
|
|
547
543
|
*/
|
|
548
544
|
indexName: string;
|
|
549
|
-
|
|
545
|
+
rules: Rule[];
|
|
550
546
|
/**
|
|
551
547
|
* When true, changes are also propagated to replicas of the given indexName.
|
|
552
548
|
*/
|
|
@@ -661,7 +657,7 @@ export type SearchRulesProps = {
|
|
|
661
657
|
* The index in which to perform the request.
|
|
662
658
|
*/
|
|
663
659
|
indexName: string;
|
|
664
|
-
searchRulesParams
|
|
660
|
+
searchRulesParams?: SearchRulesParams;
|
|
665
661
|
};
|
|
666
662
|
|
|
667
663
|
/**
|
|
@@ -727,12 +723,27 @@ export type UpdateApiKeyProps = {
|
|
|
727
723
|
apiKey: ApiKey;
|
|
728
724
|
};
|
|
729
725
|
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
726
|
+
/**
|
|
727
|
+
* The `browseObjects`, `browseRules`, `browseSynonyms` options.
|
|
728
|
+
*/
|
|
729
|
+
export type BrowseOptions<T> = Partial<
|
|
730
|
+
Pick<CreateIterablePromise<T>, 'validate'>
|
|
731
|
+
> &
|
|
732
|
+
Required<Pick<CreateIterablePromise<T>, 'aggregator'>>;
|
|
733
|
+
|
|
734
|
+
type WaitForOptions = Partial<{
|
|
735
|
+
/**
|
|
736
|
+
* The maximum number of retries. 50 by default.
|
|
737
|
+
*/
|
|
738
|
+
maxRetries: number;
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* The function to decide how long to wait between retries.
|
|
742
|
+
*/
|
|
743
|
+
timeout: (retryCount: number) => number;
|
|
744
|
+
}>;
|
|
734
745
|
|
|
735
|
-
export type WaitForTaskOptions = WaitForOptions
|
|
746
|
+
export type WaitForTaskOptions = WaitForOptions & {
|
|
736
747
|
/**
|
|
737
748
|
* The `indexName` where the operation was performed.
|
|
738
749
|
*/
|
|
@@ -743,7 +754,7 @@ export type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
|
|
|
743
754
|
taskID: number;
|
|
744
755
|
};
|
|
745
756
|
|
|
746
|
-
export type WaitForApiKeyOptions = WaitForOptions
|
|
757
|
+
export type WaitForApiKeyOptions = WaitForOptions & {
|
|
747
758
|
/**
|
|
748
759
|
* The API Key.
|
|
749
760
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
3
|
import type { ApiKey } from './apiKey';
|
|
4
|
-
import type {
|
|
4
|
+
import type { BaseGetApiKeyResponse } from './baseGetApiKeyResponse';
|
|
5
5
|
|
|
6
|
-
export type
|
|
6
|
+
export type GetApiKeyResponse = ApiKey & BaseGetApiKeyResponse;
|
package/model/index.ts
CHANGED
|
@@ -10,10 +10,11 @@ export * from './apiKey';
|
|
|
10
10
|
export * from './aroundRadius';
|
|
11
11
|
export * from './aroundRadiusAll';
|
|
12
12
|
export * from './assignUserIdParams';
|
|
13
|
-
export * from './
|
|
13
|
+
export * from './attributeToUpdate';
|
|
14
14
|
export * from './automaticFacetFilter';
|
|
15
15
|
export * from './automaticFacetFilters';
|
|
16
16
|
export * from './baseBrowseResponse';
|
|
17
|
+
export * from './baseGetApiKeyResponse';
|
|
17
18
|
export * from './baseIndexSettings';
|
|
18
19
|
export * from './baseSearchParams';
|
|
19
20
|
export * from './baseSearchParamsWithoutQuery';
|
|
@@ -35,7 +36,6 @@ export * from './consequenceHide';
|
|
|
35
36
|
export * from './consequenceParams';
|
|
36
37
|
export * from './consequenceQuery';
|
|
37
38
|
export * from './consequenceQueryObject';
|
|
38
|
-
export * from './createdAtObject';
|
|
39
39
|
export * from './createdAtResponse';
|
|
40
40
|
export * from './deleteApiKeyResponse';
|
|
41
41
|
export * from './deleteSourceResponse';
|
|
@@ -57,6 +57,7 @@ export * from './facetOrdering';
|
|
|
57
57
|
export * from './facets';
|
|
58
58
|
export * from './facetsStats';
|
|
59
59
|
export * from './fetchedIndex';
|
|
60
|
+
export * from './getApiKeyResponse';
|
|
60
61
|
export * from './getDictionarySettingsResponse';
|
|
61
62
|
export * from './getLogsResponse';
|
|
62
63
|
export * from './getObjectsParams';
|
|
@@ -71,7 +72,6 @@ export * from './hit';
|
|
|
71
72
|
export * from './ignorePlurals';
|
|
72
73
|
export * from './indexSettings';
|
|
73
74
|
export * from './indexSettingsAsSearchParams';
|
|
74
|
-
export * from './key';
|
|
75
75
|
export * from './languages';
|
|
76
76
|
export * from './listApiKeysResponse';
|
|
77
77
|
export * from './listClustersResponse';
|
|
@@ -166,6 +166,11 @@ export type IndexSettingsAsSearchParams = {
|
|
|
166
166
|
|
|
167
167
|
distinct?: Distinct;
|
|
168
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Name of the de-duplication attribute to be used with the distinct feature.
|
|
171
|
+
*/
|
|
172
|
+
attributeForDistinct?: string;
|
|
173
|
+
|
|
169
174
|
/**
|
|
170
175
|
* Whether to take into account an index\'s synonyms for a particular search.
|
|
171
176
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { GetApiKeyResponse } from './getApiKeyResponse';
|
|
4
4
|
|
|
5
5
|
export type ListApiKeysResponse = {
|
|
6
6
|
/**
|
|
7
7
|
* List of api keys.
|
|
8
8
|
*/
|
|
9
|
-
keys:
|
|
9
|
+
keys: GetApiKeyResponse[];
|
|
10
10
|
};
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
import type { Action } from './action';
|
|
4
4
|
|
|
5
5
|
export type MultipleBatchRequest = {
|
|
6
|
-
action
|
|
6
|
+
action: Action;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Arguments to the operation (depends on the type of the operation).
|
|
10
10
|
*/
|
|
11
|
-
body
|
|
11
|
+
body: Record<string, any>;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Index to target for this operation.
|
|
15
15
|
*/
|
|
16
|
-
indexName
|
|
16
|
+
indexName: string;
|
|
17
17
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/client-search",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.6",
|
|
4
4
|
"description": "JavaScript client for client-search",
|
|
5
5
|
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"clean": "rm -rf ./dist"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@algolia/client-common": "5.0.0-alpha.
|
|
25
|
-
"@algolia/requester-browser-xhr": "5.0.0-alpha.
|
|
26
|
-
"@algolia/requester-node-http": "5.0.0-alpha.
|
|
24
|
+
"@algolia/client-common": "5.0.0-alpha.6",
|
|
25
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.6",
|
|
26
|
+
"@algolia/requester-node-http": "5.0.0-alpha.6"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@types/node": "16.11.
|
|
29
|
+
"@types/node": "16.11.47",
|
|
30
30
|
"typescript": "4.7.4"
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributeOrBuiltInOperation.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/model/attributeOrBuiltInOperation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,oBAAY,2BAA2B,GAAG,gBAAgB,GAAG,MAAM,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createdAtObject.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/model/createdAtObject.ts"],"names":[],"mappings":"AAEA,oBAAY,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
package/dist/model/key.d.ts
DELETED
package/dist/model/key.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key.d.ts","sourceRoot":"","sources":["../../../../packages/client-search/model/key.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,oBAAY,GAAG,GAAG,MAAM,GAAG,eAAe,CAAC"}
|
package/model/createdAtObject.ts
DELETED