@algolia/client-search 5.0.0-beta.4 → 5.0.0-beta.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/LICENSE +21 -0
- package/dist/builds/browser.d.ts +73 -70
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +73 -70
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-search.cjs +67 -4
- package/dist/client-search.esm.browser.js +51 -5
- package/dist/client-search.esm.node.js +67 -4
- package/dist/client-search.umd.js +2 -2
- package/dist/model/baseIndexSettings.d.ts +2 -2
- package/dist/model/baseIndexSettings.d.ts.map +1 -1
- package/dist/model/baseSearchResponse.d.ts +2 -2
- package/dist/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/model/clientMethodProps.d.ts +15 -2
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/fetchedIndex.d.ts +4 -0
- package/dist/model/fetchedIndex.d.ts.map +1 -1
- package/dist/model/index.d.ts +1 -1
- package/dist/model/{securedAPIKeyRestrictions.d.ts → securedApiKeyRestrictions.d.ts} +2 -2
- package/dist/model/{securedAPIKeyRestrictions.d.ts.map → securedApiKeyRestrictions.d.ts.map} +1 -1
- package/dist/model/value.d.ts +4 -0
- package/dist/model/value.d.ts.map +1 -1
- package/dist/src/searchClient.d.ts +40 -9
- package/dist/src/searchClient.d.ts.map +1 -1
- package/model/baseIndexSettings.ts +2 -2
- package/model/baseSearchResponse.ts +2 -2
- package/model/clientMethodProps.ts +24 -2
- package/model/fetchedIndex.ts +5 -0
- package/model/index.ts +1 -1
- package/model/{securedAPIKeyRestrictions.ts → securedApiKeyRestrictions.ts} +1 -1
- package/model/value.ts +5 -0
- package/package.json +10 -7
|
@@ -4,7 +4,7 @@ import type { ApiKey } from '../model/apiKey';
|
|
|
4
4
|
import type { BatchParams } from '../model/batchParams';
|
|
5
5
|
import type { BatchResponse } from '../model/batchResponse';
|
|
6
6
|
import type { BrowseResponse } from '../model/browseResponse';
|
|
7
|
-
import type { BrowseOptions, ChunkedBatchOptions, ReplaceAllObjectsOptions,
|
|
7
|
+
import type { BrowseOptions, ChunkedBatchOptions, DeleteObjectsOptions, PartialUpdateObjectsOptions, ReplaceAllObjectsOptions, SaveObjectsOptions, WaitForApiKeyOptions, WaitForAppTaskOptions, WaitForTaskOptions, AddOrUpdateObjectProps, AssignUserIdProps, BatchProps, BatchAssignUserIdsProps, BatchDictionaryEntriesProps, BrowseProps, ClearObjectsProps, ClearRulesProps, ClearSynonymsProps, CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteApiKeyProps, DeleteByProps, DeleteIndexProps, DeleteObjectProps, DeleteRuleProps, DeleteSourceProps, DeleteSynonymProps, GetApiKeyProps, GetAppTaskProps, GetLogsProps, GetObjectProps, GetRuleProps, GetSettingsProps, GetSynonymProps, GetTaskProps, GetUserIdProps, HasPendingMappingsProps, ListIndicesProps, ListUserIdsProps, OperationIndexProps, PartialUpdateObjectProps, RemoveUserIdProps, ReplaceSourcesProps, RestoreApiKeyProps, SaveObjectProps, SaveRuleProps, SaveRulesProps, SaveSynonymProps, SaveSynonymsProps, LegacySearchMethodProps, SearchDictionaryEntriesProps, SearchForFacetValuesProps, SearchRulesProps, SearchSingleIndexProps, SearchSynonymsProps, SetSettingsProps, UpdateApiKeyProps } from '../model/clientMethodProps';
|
|
8
8
|
import type { CreatedAtResponse } from '../model/createdAtResponse';
|
|
9
9
|
import type { DeleteApiKeyResponse } from '../model/deleteApiKeyResponse';
|
|
10
10
|
import type { DeleteSourceResponse } from '../model/deleteSourceResponse';
|
|
@@ -47,7 +47,7 @@ import type { UpdatedAtResponse } from '../model/updatedAtResponse';
|
|
|
47
47
|
import type { UpdatedAtWithObjectIdResponse } from '../model/updatedAtWithObjectIdResponse';
|
|
48
48
|
import type { UpdatedRuleResponse } from '../model/updatedRuleResponse';
|
|
49
49
|
import type { UserId } from '../model/userId';
|
|
50
|
-
export declare const apiClientVersion = "5.0.0-beta.
|
|
50
|
+
export declare const apiClientVersion = "5.0.0-beta.6";
|
|
51
51
|
export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
52
52
|
transporter: import("@algolia/client-common").Transporter;
|
|
53
53
|
/**
|
|
@@ -149,8 +149,8 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
149
149
|
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
150
150
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
151
151
|
*/
|
|
152
|
-
searchForHits<
|
|
153
|
-
results: SearchResponse<
|
|
152
|
+
searchForHits<T>(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<{
|
|
153
|
+
results: Array<SearchResponse<T>>;
|
|
154
154
|
}>;
|
|
155
155
|
/**
|
|
156
156
|
* Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
|
|
@@ -176,6 +176,37 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
176
176
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
177
177
|
*/
|
|
178
178
|
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: ChunkedBatchOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
|
|
179
|
+
/**
|
|
180
|
+
* Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
181
|
+
*
|
|
182
|
+
* @summary Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
183
|
+
* @param saveObjects - The `saveObjects` object.
|
|
184
|
+
* @param saveObjects.indexName - The `indexName` to save `objects` in.
|
|
185
|
+
* @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
186
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
187
|
+
*/
|
|
188
|
+
saveObjects({ indexName, objects }: SaveObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
|
|
189
|
+
/**
|
|
190
|
+
* Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
|
|
191
|
+
*
|
|
192
|
+
* @summary Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
|
|
193
|
+
* @param deleteObjects - The `deleteObjects` object.
|
|
194
|
+
* @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
|
|
195
|
+
* @param deleteObjects.objectIDs - The objectIDs to delete.
|
|
196
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
197
|
+
*/
|
|
198
|
+
deleteObjects({ indexName, objectIDs }: DeleteObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
|
|
199
|
+
/**
|
|
200
|
+
* Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
201
|
+
*
|
|
202
|
+
* @summary Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
203
|
+
* @param partialUpdateObjects - The `partialUpdateObjects` object.
|
|
204
|
+
* @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
|
|
205
|
+
* @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
|
|
206
|
+
* @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
|
|
207
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
208
|
+
*/
|
|
209
|
+
partialUpdateObjects({ indexName, objects, createIfNotExists }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
|
|
179
210
|
/**
|
|
180
211
|
* Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
|
|
181
212
|
* See https://api-clients-automation.netlify.app/docs/contributing/add-new-api-client#5-helpers for implementation details.
|
|
@@ -185,7 +216,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
185
216
|
* @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
|
|
186
217
|
* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
|
|
187
218
|
* @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.
|
|
188
|
-
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
219
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
|
|
189
220
|
*/
|
|
190
221
|
replaceAllObjects({ indexName, objects, batchSize }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions): Promise<ReplaceAllObjectsResponse>;
|
|
191
222
|
/**
|
|
@@ -277,7 +308,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
277
308
|
* @param browse.browseParams - The browseParams object.
|
|
278
309
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
279
310
|
*/
|
|
280
|
-
browse<
|
|
311
|
+
browse<T>({ indexName, browseParams }: BrowseProps, requestOptions?: RequestOptions): Promise<BrowseResponse<T>>;
|
|
281
312
|
/**
|
|
282
313
|
* Deletes only the records from an index while keeping settings, synonyms, and rules.
|
|
283
314
|
*
|
|
@@ -507,7 +538,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
507
538
|
* @param getObjectsParams - Request object.
|
|
508
539
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
509
540
|
*/
|
|
510
|
-
getObjects<
|
|
541
|
+
getObjects<T>(getObjectsParams: GetObjectsParams, requestOptions?: RequestOptions): Promise<GetObjectsResponse<T>>;
|
|
511
542
|
/**
|
|
512
543
|
* Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
513
544
|
*
|
|
@@ -780,7 +811,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
780
811
|
* @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
|
|
781
812
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
782
813
|
*/
|
|
783
|
-
search<
|
|
814
|
+
search<T>(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<SearchResponses<T>>;
|
|
784
815
|
/**
|
|
785
816
|
* Searches for standard and custom dictionary entries.
|
|
786
817
|
*
|
|
@@ -829,7 +860,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
829
860
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
830
861
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
831
862
|
*/
|
|
832
|
-
searchSingleIndex<
|
|
863
|
+
searchSingleIndex<T>({ indexName, searchParams }: SearchSingleIndexProps, requestOptions?: RequestOptions): Promise<SearchResponse<T>>;
|
|
833
864
|
/**
|
|
834
865
|
* Searches for synonyms in your index.
|
|
835
866
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchClient.d.ts","sourceRoot":"","sources":["../../src/searchClient.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,mBAAmB,EAKnB,cAAc,EACd,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;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"searchClient.d.ts","sourceRoot":"","sources":["../../src/searchClient.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,mBAAmB,EAKnB,cAAc,EACd,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;AAExD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,eAAe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,mBAAmB,mBACvB,cAAc,GAC9B,OAAO,CAAC,qBAAqB,CAAC;IA8BjC;;;;;;;;OAQG;oDAEyB,wBAAwB,mBACjC,cAAc,GAC9B,OAAO,CAAC,iBAAiB,CAAC;IA4B7B;;;;;;;;;;;OAWG;iEAEgD,gBAAgB,mBAChD,cAAc,GAC9B,OAAO,CAAC,iBAAiB,CAAC;IAmC7B;;;;;;;;;;OAUG;kCAEgB,iBAAiB,mBACjB,cAAc,GAC9B,OAAO,CAAC,oBAAoB,CAAC;EAqCnC"}
|
|
@@ -74,9 +74,9 @@ export type BaseIndexSettings = {
|
|
|
74
74
|
searchableAttributes?: string[];
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* An object with custom data. You can store up to
|
|
77
|
+
* An object with custom data. You can store up to 32kB as custom data.
|
|
78
78
|
*/
|
|
79
|
-
userData?: any
|
|
79
|
+
userData?: Record<string, any>;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
82
|
* Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
|
|
@@ -128,9 +128,9 @@ export type BaseSearchResponse = Record<string, any> & {
|
|
|
128
128
|
serverUsed?: string;
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
|
-
* An object with custom data. You can store up to
|
|
131
|
+
* An object with custom data. You can store up to 32kB as custom data.
|
|
132
132
|
*/
|
|
133
|
-
userData?: any
|
|
133
|
+
userData?: Record<string, any>;
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
136
|
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
|
|
@@ -25,7 +25,7 @@ import type { SearchParams } from './searchParams';
|
|
|
25
25
|
import type { SearchParamsObject } from './searchParamsObject';
|
|
26
26
|
import type { SearchRulesParams } from './searchRulesParams';
|
|
27
27
|
import type { SearchSynonymsParams } from './searchSynonymsParams';
|
|
28
|
-
import type {
|
|
28
|
+
import type { SecuredApiKeyRestrictions } from './securedApiKeyRestrictions';
|
|
29
29
|
import type { Source } from './source';
|
|
30
30
|
import type { SynonymHit } from './synonymHit';
|
|
31
31
|
|
|
@@ -796,7 +796,7 @@ export type GenerateSecuredApiKeyOptions = {
|
|
|
796
796
|
/**
|
|
797
797
|
* A set of properties defining the restrictions of the secured API key.
|
|
798
798
|
*/
|
|
799
|
-
restrictions?:
|
|
799
|
+
restrictions?: SecuredApiKeyRestrictions;
|
|
800
800
|
};
|
|
801
801
|
|
|
802
802
|
export type GetSecuredApiKeyRemainingValidityOptions = {
|
|
@@ -806,6 +806,28 @@ export type GetSecuredApiKeyRemainingValidityOptions = {
|
|
|
806
806
|
securedApiKey: string;
|
|
807
807
|
};
|
|
808
808
|
|
|
809
|
+
export type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName'> & {
|
|
810
|
+
/**
|
|
811
|
+
* The objectIDs to delete.
|
|
812
|
+
*/
|
|
813
|
+
objectIDs: string[];
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
export type PartialUpdateObjectsOptions = Pick<
|
|
817
|
+
ChunkedBatchOptions,
|
|
818
|
+
'indexName' | 'objects'
|
|
819
|
+
> & {
|
|
820
|
+
/**
|
|
821
|
+
*To be provided if non-existing objects are passed, otherwise, the call will fail.
|
|
822
|
+
*/
|
|
823
|
+
createIfNotExists?: boolean;
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
export type SaveObjectsOptions = Pick<
|
|
827
|
+
ChunkedBatchOptions,
|
|
828
|
+
'indexName' | 'objects'
|
|
829
|
+
>;
|
|
830
|
+
|
|
809
831
|
export type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
|
|
810
832
|
/**
|
|
811
833
|
* The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
package/model/fetchedIndex.ts
CHANGED
|
@@ -55,4 +55,9 @@ export type FetchedIndex = {
|
|
|
55
55
|
* Only present if the index is a primary index with replicas. Contains the names of all linked replicas.
|
|
56
56
|
*/
|
|
57
57
|
replicas?: string[];
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Only present if the index is a [virtual replica](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-alphabetically/#virtual-replicas).
|
|
61
|
+
*/
|
|
62
|
+
virtual?: boolean;
|
|
58
63
|
};
|
package/model/index.ts
CHANGED
|
@@ -143,7 +143,7 @@ export * from './searchTypeDefault';
|
|
|
143
143
|
export * from './searchTypeFacet';
|
|
144
144
|
export * from './searchUserIdsParams';
|
|
145
145
|
export * from './searchUserIdsResponse';
|
|
146
|
-
export * from './
|
|
146
|
+
export * from './securedApiKeyRestrictions';
|
|
147
147
|
export * from './semanticSearch';
|
|
148
148
|
export * from './snippetResult';
|
|
149
149
|
export * from './snippetResultOption';
|
package/model/value.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/client-search",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.6",
|
|
4
4
|
"description": "JavaScript client for client-search",
|
|
5
|
-
"repository":
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
|
|
8
|
+
},
|
|
6
9
|
"license": "MIT",
|
|
7
10
|
"author": "Algolia",
|
|
8
11
|
"type": "module",
|
|
@@ -39,14 +42,14 @@
|
|
|
39
42
|
"clean": "rm -rf ./dist || true"
|
|
40
43
|
},
|
|
41
44
|
"dependencies": {
|
|
42
|
-
"@algolia/client-common": "5.0.0-beta.
|
|
43
|
-
"@algolia/requester-browser-xhr": "5.0.0-beta.
|
|
44
|
-
"@algolia/requester-node-http": "5.0.0-beta.
|
|
45
|
+
"@algolia/client-common": "5.0.0-beta.7",
|
|
46
|
+
"@algolia/requester-browser-xhr": "5.0.0-beta.7",
|
|
47
|
+
"@algolia/requester-node-http": "5.0.0-beta.7"
|
|
45
48
|
},
|
|
46
49
|
"devDependencies": {
|
|
47
|
-
"@types/node": "20.14.
|
|
50
|
+
"@types/node": "20.14.8",
|
|
48
51
|
"rollup": "4.18.0",
|
|
49
|
-
"typescript": "5.
|
|
52
|
+
"typescript": "5.5.2"
|
|
50
53
|
},
|
|
51
54
|
"engines": {
|
|
52
55
|
"node": ">= 14.0.0"
|