@algolia/client-search 5.3.1 → 5.4.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/node.d.cts CHANGED
@@ -2976,7 +2976,7 @@ type ReplaceAllObjectsOptions = {
2976
2976
  batchSize?: number;
2977
2977
  };
2978
2978
 
2979
- declare const apiClientVersion = "5.3.1";
2979
+ declare const apiClientVersion = "5.4.0";
2980
2980
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
2981
2981
  transporter: _algolia_client_common.Transporter;
2982
2982
  /**
package/dist/node.d.ts CHANGED
@@ -2976,7 +2976,7 @@ type ReplaceAllObjectsOptions = {
2976
2976
  batchSize?: number;
2977
2977
  };
2978
2978
 
2979
- declare const apiClientVersion = "5.3.1";
2979
+ declare const apiClientVersion = "5.4.0";
2980
2980
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
2981
2981
  transporter: _algolia_client_common.Transporter;
2982
2982
  /**
@@ -25,7 +25,7 @@ __export(searchClient_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(searchClient_exports);
27
27
  var import_client_common = require("@algolia/client-common");
28
- var apiClientVersion = "5.3.1";
28
+ var apiClientVersion = "5.4.0";
29
29
  function getDefaultHosts(appId) {
30
30
  return [
31
31
  {
@@ -66,25 +66,26 @@ function createSearchClient({
66
66
  ...options
67
67
  }) {
68
68
  const auth = (0, import_client_common.createAuth)(appIdOption, apiKeyOption, authMode);
69
- return {
70
- transporter: (0, import_client_common.createTransporter)({
71
- hosts: getDefaultHosts(appIdOption),
72
- ...options,
73
- algoliaAgent: (0, import_client_common.getAlgoliaAgent)({
74
- algoliaAgents,
75
- client: "Search",
76
- version: apiClientVersion
77
- }),
78
- baseHeaders: {
79
- "content-type": "text/plain",
80
- ...auth.headers(),
81
- ...options.baseHeaders
82
- },
83
- baseQueryParameters: {
84
- ...auth.queryParameters(),
85
- ...options.baseQueryParameters
86
- }
69
+ const transporter = (0, import_client_common.createTransporter)({
70
+ hosts: getDefaultHosts(appIdOption),
71
+ ...options,
72
+ algoliaAgent: (0, import_client_common.getAlgoliaAgent)({
73
+ algoliaAgents,
74
+ client: "Search",
75
+ version: apiClientVersion
87
76
  }),
77
+ baseHeaders: {
78
+ "content-type": "text/plain",
79
+ ...auth.headers(),
80
+ ...options.baseHeaders
81
+ },
82
+ baseQueryParameters: {
83
+ ...auth.queryParameters(),
84
+ ...options.baseQueryParameters
85
+ }
86
+ });
87
+ return {
88
+ transporter,
88
89
  /**
89
90
  * The `appId` currently in use.
90
91
  */
@@ -93,15 +94,13 @@ function createSearchClient({
93
94
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
94
95
  */
95
96
  clearCache() {
96
- return Promise.all([this.transporter.requestsCache.clear(), this.transporter.responsesCache.clear()]).then(
97
- () => void 0
98
- );
97
+ return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
99
98
  },
100
99
  /**
101
100
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
102
101
  */
103
102
  get _ua() {
104
- return this.transporter.algoliaAgent.value;
103
+ return transporter.algoliaAgent.value;
105
104
  },
106
105
  /**
107
106
  * Adds a `segment` to the `x-algolia-agent` sent with every requests.
@@ -110,7 +109,7 @@ function createSearchClient({
110
109
  * @param version - The version of the agent.
111
110
  */
112
111
  addAlgoliaAgent(segment, version) {
113
- this.transporter.algoliaAgent.add({ segment, version });
112
+ transporter.algoliaAgent.add({ segment, version });
114
113
  },
115
114
  /**
116
115
  * Helper method to switch the API key used to authenticate the requests.
@@ -120,9 +119,9 @@ function createSearchClient({
120
119
  */
121
120
  setClientApiKey({ apiKey }) {
122
121
  if (!authMode || authMode === "WithinHeaders") {
123
- this.transporter.baseHeaders["x-algolia-api-key"] = apiKey;
122
+ transporter.baseHeaders["x-algolia-api-key"] = apiKey;
124
123
  } else {
125
- this.transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
124
+ transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
126
125
  }
127
126
  },
128
127
  /**
@@ -546,7 +545,7 @@ function createSearchClient({
546
545
  headers,
547
546
  data: apiKey
548
547
  };
549
- return this.transporter.request(request, requestOptions);
548
+ return transporter.request(request, requestOptions);
550
549
  },
551
550
  /**
552
551
  * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
@@ -580,7 +579,7 @@ function createSearchClient({
580
579
  headers,
581
580
  data: body
582
581
  };
583
- return this.transporter.request(request, requestOptions);
582
+ return transporter.request(request, requestOptions);
584
583
  },
585
584
  /**
586
585
  * Adds a source to the list of allowed sources.
@@ -608,7 +607,7 @@ function createSearchClient({
608
607
  headers,
609
608
  data: source
610
609
  };
611
- return this.transporter.request(request, requestOptions);
610
+ return transporter.request(request, requestOptions);
612
611
  },
613
612
  /**
614
613
  * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
@@ -644,7 +643,7 @@ function createSearchClient({
644
643
  headers,
645
644
  data: assignUserIdParams
646
645
  };
647
- return this.transporter.request(request, requestOptions);
646
+ return transporter.request(request, requestOptions);
648
647
  },
649
648
  /**
650
649
  * Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name.
@@ -674,7 +673,7 @@ function createSearchClient({
674
673
  headers,
675
674
  data: batchWriteParams
676
675
  };
677
- return this.transporter.request(request, requestOptions);
676
+ return transporter.request(request, requestOptions);
678
677
  },
679
678
  /**
680
679
  * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
@@ -713,7 +712,7 @@ function createSearchClient({
713
712
  headers,
714
713
  data: batchAssignUserIdsParams
715
714
  };
716
- return this.transporter.request(request, requestOptions);
715
+ return transporter.request(request, requestOptions);
717
716
  },
718
717
  /**
719
718
  * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
@@ -751,7 +750,7 @@ function createSearchClient({
751
750
  headers,
752
751
  data: batchDictionaryEntriesParams
753
752
  };
754
- return this.transporter.request(request, requestOptions);
753
+ return transporter.request(request, requestOptions);
755
754
  },
756
755
  /**
757
756
  * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` is evaluated to `true`) If you send these parameters with your browse requests, they\'ll be ignored.
@@ -778,7 +777,7 @@ function createSearchClient({
778
777
  headers,
779
778
  data: browseParams ? browseParams : {}
780
779
  };
781
- return this.transporter.request(request, requestOptions);
780
+ return transporter.request(request, requestOptions);
782
781
  },
783
782
  /**
784
783
  * Deletes only the records from an index while keeping settings, synonyms, and rules.
@@ -803,7 +802,7 @@ function createSearchClient({
803
802
  queryParameters,
804
803
  headers
805
804
  };
806
- return this.transporter.request(request, requestOptions);
805
+ return transporter.request(request, requestOptions);
807
806
  },
808
807
  /**
809
808
  * Deletes all rules from the index.
@@ -832,7 +831,7 @@ function createSearchClient({
832
831
  queryParameters,
833
832
  headers
834
833
  };
835
- return this.transporter.request(request, requestOptions);
834
+ return transporter.request(request, requestOptions);
836
835
  },
837
836
  /**
838
837
  * Deletes all synonyms from the index.
@@ -861,7 +860,7 @@ function createSearchClient({
861
860
  queryParameters,
862
861
  headers
863
862
  };
864
- return this.transporter.request(request, requestOptions);
863
+ return transporter.request(request, requestOptions);
865
864
  },
866
865
  /**
867
866
  * This method allow you to send requests to the Algolia REST API.
@@ -884,7 +883,7 @@ function createSearchClient({
884
883
  queryParameters,
885
884
  headers
886
885
  };
887
- return this.transporter.request(request, requestOptions);
886
+ return transporter.request(request, requestOptions);
888
887
  },
889
888
  /**
890
889
  * This method allow you to send requests to the Algolia REST API.
@@ -907,7 +906,7 @@ function createSearchClient({
907
906
  queryParameters,
908
907
  headers
909
908
  };
910
- return this.transporter.request(request, requestOptions);
909
+ return transporter.request(request, requestOptions);
911
910
  },
912
911
  /**
913
912
  * This method allow you to send requests to the Algolia REST API.
@@ -932,7 +931,7 @@ function createSearchClient({
932
931
  headers,
933
932
  data: body ? body : {}
934
933
  };
935
- return this.transporter.request(request, requestOptions);
934
+ return transporter.request(request, requestOptions);
936
935
  },
937
936
  /**
938
937
  * This method allow you to send requests to the Algolia REST API.
@@ -957,7 +956,7 @@ function createSearchClient({
957
956
  headers,
958
957
  data: body ? body : {}
959
958
  };
960
- return this.transporter.request(request, requestOptions);
959
+ return transporter.request(request, requestOptions);
961
960
  },
962
961
  /**
963
962
  * Deletes the API key.
@@ -982,7 +981,7 @@ function createSearchClient({
982
981
  queryParameters,
983
982
  headers
984
983
  };
985
- return this.transporter.request(request, requestOptions);
984
+ return transporter.request(request, requestOptions);
986
985
  },
987
986
  /**
988
987
  * This operation doesn\'t accept empty queries or filters. It\'s more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](#tag/Records/operation/batch).
@@ -1012,7 +1011,7 @@ function createSearchClient({
1012
1011
  headers,
1013
1012
  data: deleteByParams
1014
1013
  };
1015
- return this.transporter.request(request, requestOptions);
1014
+ return transporter.request(request, requestOptions);
1016
1015
  },
1017
1016
  /**
1018
1017
  * Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/).
@@ -1037,7 +1036,7 @@ function createSearchClient({
1037
1036
  queryParameters,
1038
1037
  headers
1039
1038
  };
1040
- return this.transporter.request(request, requestOptions);
1039
+ return transporter.request(request, requestOptions);
1041
1040
  },
1042
1041
  /**
1043
1042
  * Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy).
@@ -1066,7 +1065,7 @@ function createSearchClient({
1066
1065
  queryParameters,
1067
1066
  headers
1068
1067
  };
1069
- return this.transporter.request(request, requestOptions);
1068
+ return transporter.request(request, requestOptions);
1070
1069
  },
1071
1070
  /**
1072
1071
  * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
@@ -1099,7 +1098,7 @@ function createSearchClient({
1099
1098
  queryParameters,
1100
1099
  headers
1101
1100
  };
1102
- return this.transporter.request(request, requestOptions);
1101
+ return transporter.request(request, requestOptions);
1103
1102
  },
1104
1103
  /**
1105
1104
  * Deletes a source from the list of allowed sources.
@@ -1124,7 +1123,7 @@ function createSearchClient({
1124
1123
  queryParameters,
1125
1124
  headers
1126
1125
  };
1127
- return this.transporter.request(request, requestOptions);
1126
+ return transporter.request(request, requestOptions);
1128
1127
  },
1129
1128
  /**
1130
1129
  * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1157,7 +1156,7 @@ function createSearchClient({
1157
1156
  queryParameters,
1158
1157
  headers
1159
1158
  };
1160
- return this.transporter.request(request, requestOptions);
1159
+ return transporter.request(request, requestOptions);
1161
1160
  },
1162
1161
  /**
1163
1162
  * Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key.
@@ -1179,7 +1178,7 @@ function createSearchClient({
1179
1178
  queryParameters,
1180
1179
  headers
1181
1180
  };
1182
- return this.transporter.request(request, requestOptions);
1181
+ return transporter.request(request, requestOptions);
1183
1182
  },
1184
1183
  /**
1185
1184
  * Checks the status of a given application task.
@@ -1204,7 +1203,7 @@ function createSearchClient({
1204
1203
  queryParameters,
1205
1204
  headers
1206
1205
  };
1207
- return this.transporter.request(request, requestOptions);
1206
+ return transporter.request(request, requestOptions);
1208
1207
  },
1209
1208
  /**
1210
1209
  * Lists supported languages with their supported dictionary types and number of custom entries.
@@ -1224,7 +1223,7 @@ function createSearchClient({
1224
1223
  queryParameters,
1225
1224
  headers
1226
1225
  };
1227
- return this.transporter.request(request, requestOptions);
1226
+ return transporter.request(request, requestOptions);
1228
1227
  },
1229
1228
  /**
1230
1229
  * Retrieves the languages for which standard dictionary entries are turned off.
@@ -1244,7 +1243,7 @@ function createSearchClient({
1244
1243
  queryParameters,
1245
1244
  headers
1246
1245
  };
1247
- return this.transporter.request(request, requestOptions);
1246
+ return transporter.request(request, requestOptions);
1248
1247
  },
1249
1248
  /**
1250
1249
  * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn\'t appear in the logs itself.
@@ -1281,7 +1280,7 @@ function createSearchClient({
1281
1280
  queryParameters,
1282
1281
  headers
1283
1282
  };
1284
- return this.transporter.request(request, requestOptions);
1283
+ return transporter.request(request, requestOptions);
1285
1284
  },
1286
1285
  /**
1287
1286
  * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
@@ -1314,7 +1313,7 @@ function createSearchClient({
1314
1313
  queryParameters,
1315
1314
  headers
1316
1315
  };
1317
- return this.transporter.request(request, requestOptions);
1316
+ return transporter.request(request, requestOptions);
1318
1317
  },
1319
1318
  /**
1320
1319
  * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
@@ -1344,7 +1343,7 @@ function createSearchClient({
1344
1343
  useReadTransporter: true,
1345
1344
  cacheable: true
1346
1345
  };
1347
- return this.transporter.request(request, requestOptions);
1346
+ return transporter.request(request, requestOptions);
1348
1347
  },
1349
1348
  /**
1350
1349
  * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
@@ -1373,7 +1372,7 @@ function createSearchClient({
1373
1372
  queryParameters,
1374
1373
  headers
1375
1374
  };
1376
- return this.transporter.request(request, requestOptions);
1375
+ return transporter.request(request, requestOptions);
1377
1376
  },
1378
1377
  /**
1379
1378
  * Retrieves an object with non-null index settings.
@@ -1398,7 +1397,7 @@ function createSearchClient({
1398
1397
  queryParameters,
1399
1398
  headers
1400
1399
  };
1401
- return this.transporter.request(request, requestOptions);
1400
+ return transporter.request(request, requestOptions);
1402
1401
  },
1403
1402
  /**
1404
1403
  * Retrieves all allowed IP addresses with access to your application.
@@ -1418,7 +1417,7 @@ function createSearchClient({
1418
1417
  queryParameters,
1419
1418
  headers
1420
1419
  };
1421
- return this.transporter.request(request, requestOptions);
1420
+ return transporter.request(request, requestOptions);
1422
1421
  },
1423
1422
  /**
1424
1423
  * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1447,7 +1446,7 @@ function createSearchClient({
1447
1446
  queryParameters,
1448
1447
  headers
1449
1448
  };
1450
- return this.transporter.request(request, requestOptions);
1449
+ return transporter.request(request, requestOptions);
1451
1450
  },
1452
1451
  /**
1453
1452
  * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\' responses include a task ID that you can use to check the status.
@@ -1476,7 +1475,7 @@ function createSearchClient({
1476
1475
  queryParameters,
1477
1476
  headers
1478
1477
  };
1479
- return this.transporter.request(request, requestOptions);
1478
+ return transporter.request(request, requestOptions);
1480
1479
  },
1481
1480
  /**
1482
1481
  * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
@@ -1496,7 +1495,7 @@ function createSearchClient({
1496
1495
  queryParameters,
1497
1496
  headers
1498
1497
  };
1499
- return this.transporter.request(request, requestOptions);
1498
+ return transporter.request(request, requestOptions);
1500
1499
  },
1501
1500
  /**
1502
1501
  * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
@@ -1521,7 +1520,7 @@ function createSearchClient({
1521
1520
  queryParameters,
1522
1521
  headers
1523
1522
  };
1524
- return this.transporter.request(request, requestOptions);
1523
+ return transporter.request(request, requestOptions);
1525
1524
  },
1526
1525
  /**
1527
1526
  * To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
@@ -1546,7 +1545,7 @@ function createSearchClient({
1546
1545
  queryParameters,
1547
1546
  headers
1548
1547
  };
1549
- return this.transporter.request(request, requestOptions);
1548
+ return transporter.request(request, requestOptions);
1550
1549
  },
1551
1550
  /**
1552
1551
  * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
@@ -1566,7 +1565,7 @@ function createSearchClient({
1566
1565
  queryParameters,
1567
1566
  headers
1568
1567
  };
1569
- return this.transporter.request(request, requestOptions);
1568
+ return transporter.request(request, requestOptions);
1570
1569
  },
1571
1570
  /**
1572
1571
  * Lists the available clusters in a multi-cluster setup.
@@ -1586,7 +1585,7 @@ function createSearchClient({
1586
1585
  queryParameters,
1587
1586
  headers
1588
1587
  };
1589
- return this.transporter.request(request, requestOptions);
1588
+ return transporter.request(request, requestOptions);
1590
1589
  },
1591
1590
  /**
1592
1591
  * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
@@ -1615,7 +1614,7 @@ function createSearchClient({
1615
1614
  queryParameters,
1616
1615
  headers
1617
1616
  };
1618
- return this.transporter.request(request, requestOptions);
1617
+ return transporter.request(request, requestOptions);
1619
1618
  },
1620
1619
  /**
1621
1620
  * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
@@ -1644,7 +1643,7 @@ function createSearchClient({
1644
1643
  queryParameters,
1645
1644
  headers
1646
1645
  };
1647
- return this.transporter.request(request, requestOptions);
1646
+ return transporter.request(request, requestOptions);
1648
1647
  },
1649
1648
  /**
1650
1649
  * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name.
@@ -1669,7 +1668,7 @@ function createSearchClient({
1669
1668
  headers,
1670
1669
  data: batchParams
1671
1670
  };
1672
- return this.transporter.request(request, requestOptions);
1671
+ return transporter.request(request, requestOptions);
1673
1672
  },
1674
1673
  /**
1675
1674
  * 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/).
@@ -1705,7 +1704,7 @@ function createSearchClient({
1705
1704
  headers,
1706
1705
  data: operationIndexParams
1707
1706
  };
1708
- return this.transporter.request(request, requestOptions);
1707
+ return transporter.request(request, requestOptions);
1709
1708
  },
1710
1709
  /**
1711
1710
  * Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don\'t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn\'t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn\'t exist yet, the engine only creates it if you pass an IncrementSet value that\'s greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
@@ -1743,7 +1742,7 @@ function createSearchClient({
1743
1742
  headers,
1744
1743
  data: attributesToUpdate
1745
1744
  };
1746
- return this.transporter.request(request, requestOptions);
1745
+ return transporter.request(request, requestOptions);
1747
1746
  },
1748
1747
  /**
1749
1748
  * Deletes a user ID and its associated data from the clusters.
@@ -1768,7 +1767,7 @@ function createSearchClient({
1768
1767
  queryParameters,
1769
1768
  headers
1770
1769
  };
1771
- return this.transporter.request(request, requestOptions);
1770
+ return transporter.request(request, requestOptions);
1772
1771
  },
1773
1772
  /**
1774
1773
  * Replaces the list of allowed sources.
@@ -1794,7 +1793,7 @@ function createSearchClient({
1794
1793
  headers,
1795
1794
  data: source
1796
1795
  };
1797
- return this.transporter.request(request, requestOptions);
1796
+ return transporter.request(request, requestOptions);
1798
1797
  },
1799
1798
  /**
1800
1799
  * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\'t be restored.
@@ -1819,7 +1818,7 @@ function createSearchClient({
1819
1818
  queryParameters,
1820
1819
  headers
1821
1820
  };
1822
- return this.transporter.request(request, requestOptions);
1821
+ return transporter.request(request, requestOptions);
1823
1822
  },
1824
1823
  /**
1825
1824
  * Adds a record to an index or replace it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
@@ -1849,7 +1848,7 @@ function createSearchClient({
1849
1848
  headers,
1850
1849
  data: body
1851
1850
  };
1852
- return this.transporter.request(request, requestOptions);
1851
+ return transporter.request(request, requestOptions);
1853
1852
  },
1854
1853
  /**
1855
1854
  * If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
@@ -1890,7 +1889,7 @@ function createSearchClient({
1890
1889
  headers,
1891
1890
  data: rule
1892
1891
  };
1893
- return this.transporter.request(request, requestOptions);
1892
+ return transporter.request(request, requestOptions);
1894
1893
  },
1895
1894
  /**
1896
1895
  * Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced.
@@ -1928,7 +1927,7 @@ function createSearchClient({
1928
1927
  headers,
1929
1928
  data: rules
1930
1929
  };
1931
- return this.transporter.request(request, requestOptions);
1930
+ return transporter.request(request, requestOptions);
1932
1931
  },
1933
1932
  /**
1934
1933
  * If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms).
@@ -1972,7 +1971,7 @@ function createSearchClient({
1972
1971
  headers,
1973
1972
  data: synonymHit
1974
1973
  };
1975
- return this.transporter.request(request, requestOptions);
1974
+ return transporter.request(request, requestOptions);
1976
1975
  },
1977
1976
  /**
1978
1977
  * If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
@@ -2010,7 +2009,7 @@ function createSearchClient({
2010
2009
  headers,
2011
2010
  data: synonymHit
2012
2011
  };
2013
- return this.transporter.request(request, requestOptions);
2012
+ return transporter.request(request, requestOptions);
2014
2013
  },
2015
2014
  /**
2016
2015
  * Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
@@ -2061,7 +2060,7 @@ function createSearchClient({
2061
2060
  useReadTransporter: true,
2062
2061
  cacheable: true
2063
2062
  };
2064
- return this.transporter.request(request, requestOptions);
2063
+ return transporter.request(request, requestOptions);
2065
2064
  },
2066
2065
  /**
2067
2066
  * Searches for standard and custom dictionary entries.
@@ -2103,7 +2102,7 @@ function createSearchClient({
2103
2102
  useReadTransporter: true,
2104
2103
  cacheable: true
2105
2104
  };
2106
- return this.transporter.request(request, requestOptions);
2105
+ return transporter.request(request, requestOptions);
2107
2106
  },
2108
2107
  /**
2109
2108
  * Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
@@ -2136,7 +2135,7 @@ function createSearchClient({
2136
2135
  useReadTransporter: true,
2137
2136
  cacheable: true
2138
2137
  };
2139
- return this.transporter.request(request, requestOptions);
2138
+ return transporter.request(request, requestOptions);
2140
2139
  },
2141
2140
  /**
2142
2141
  * Searches for rules in your index.
@@ -2165,7 +2164,7 @@ function createSearchClient({
2165
2164
  useReadTransporter: true,
2166
2165
  cacheable: true
2167
2166
  };
2168
- return this.transporter.request(request, requestOptions);
2167
+ return transporter.request(request, requestOptions);
2169
2168
  },
2170
2169
  /**
2171
2170
  * Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.
@@ -2194,7 +2193,7 @@ function createSearchClient({
2194
2193
  useReadTransporter: true,
2195
2194
  cacheable: true
2196
2195
  };
2197
- return this.transporter.request(request, requestOptions);
2196
+ return transporter.request(request, requestOptions);
2198
2197
  },
2199
2198
  /**
2200
2199
  * Searches for synonyms in your index.
@@ -2226,7 +2225,7 @@ function createSearchClient({
2226
2225
  useReadTransporter: true,
2227
2226
  cacheable: true
2228
2227
  };
2229
- return this.transporter.request(request, requestOptions);
2228
+ return transporter.request(request, requestOptions);
2230
2229
  },
2231
2230
  /**
2232
2231
  * Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
@@ -2256,7 +2255,7 @@ function createSearchClient({
2256
2255
  useReadTransporter: true,
2257
2256
  cacheable: true
2258
2257
  };
2259
- return this.transporter.request(request, requestOptions);
2258
+ return transporter.request(request, requestOptions);
2260
2259
  },
2261
2260
  /**
2262
2261
  * Turns standard stop word dictionary entries on or off for a given language.
@@ -2286,7 +2285,7 @@ function createSearchClient({
2286
2285
  headers,
2287
2286
  data: dictionarySettingsParams
2288
2287
  };
2289
- return this.transporter.request(request, requestOptions);
2288
+ return transporter.request(request, requestOptions);
2290
2289
  },
2291
2290
  /**
2292
2291
  * Update the specified index settings. Index settings that you don\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.
@@ -2320,7 +2319,7 @@ function createSearchClient({
2320
2319
  headers,
2321
2320
  data: indexSettings
2322
2321
  };
2323
- return this.transporter.request(request, requestOptions);
2322
+ return transporter.request(request, requestOptions);
2324
2323
  },
2325
2324
  /**
2326
2325
  * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
@@ -2353,7 +2352,7 @@ function createSearchClient({
2353
2352
  headers,
2354
2353
  data: apiKey
2355
2354
  };
2356
- return this.transporter.request(request, requestOptions);
2355
+ return transporter.request(request, requestOptions);
2357
2356
  }
2358
2357
  };
2359
2358
  }