@algolia/client-search 5.18.0 → 5.19.0

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/worker.d.ts CHANGED
@@ -3019,15 +3019,23 @@ type ReplaceAllObjectsOptions = {
3019
3019
  * The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
3020
3020
  */
3021
3021
  batchSize?: number;
3022
+ /**
3023
+ * The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
3024
+ */
3025
+ scopes?: Array<ScopeType>;
3022
3026
  };
3023
3027
 
3024
- declare const apiClientVersion = "5.18.0";
3028
+ declare const apiClientVersion = "5.19.0";
3025
3029
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
3026
3030
  transporter: _algolia_client_common.Transporter;
3027
3031
  /**
3028
3032
  * The `appId` currently in use.
3029
3033
  */
3030
3034
  appId: string;
3035
+ /**
3036
+ * The `apiKey` currently in use.
3037
+ */
3038
+ apiKey: string;
3031
3039
  /**
3032
3040
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
3033
3041
  */
@@ -3183,9 +3191,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3183
3191
  * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
3184
3192
  * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
3185
3193
  * @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.
3194
+ * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
3186
3195
  * @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.
3187
3196
  */
3188
- replaceAllObjects({ indexName, objects, batchSize }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions): Promise<ReplaceAllObjectsResponse>;
3197
+ replaceAllObjects({ indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions): Promise<ReplaceAllObjectsResponse>;
3189
3198
  indexExists({ indexName }: GetSettingsProps): Promise<boolean>;
3190
3199
  /**
3191
3200
  * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.18.0",
2
+ "version": "5.19.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
@@ -49,16 +49,16 @@
49
49
  "index.d.ts"
50
50
  ],
51
51
  "dependencies": {
52
- "@algolia/client-common": "5.18.0",
53
- "@algolia/requester-browser-xhr": "5.18.0",
54
- "@algolia/requester-fetch": "5.18.0",
55
- "@algolia/requester-node-http": "5.18.0"
52
+ "@algolia/client-common": "5.19.0",
53
+ "@algolia/requester-browser-xhr": "5.19.0",
54
+ "@algolia/requester-fetch": "5.19.0",
55
+ "@algolia/requester-node-http": "5.19.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@arethetypeswrong/cli": "0.17.1",
59
- "@types/node": "22.10.2",
58
+ "@arethetypeswrong/cli": "0.17.2",
59
+ "@types/node": "22.10.5",
60
60
  "publint": "0.2.12",
61
- "rollup": "4.28.1",
61
+ "rollup": "4.29.1",
62
62
  "tsup": "8.3.5",
63
63
  "typescript": "5.7.2"
64
64
  },