@algolia/client-search 5.3.0 → 5.3.2

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.0";
2979
+ declare const apiClientVersion = "5.3.2";
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.0";
2979
+ declare const apiClientVersion = "5.3.2";
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.0";
28
+ var apiClientVersion = "5.3.2";
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.
@@ -119,7 +118,11 @@ function createSearchClient({
119
118
  * @param params.apiKey - The new API Key to use.
120
119
  */
121
120
  setClientApiKey({ apiKey }) {
122
- this.transporter.baseHeaders["x-algolia-api-key"] = apiKey;
121
+ if (!authMode || authMode === "WithinHeaders") {
122
+ transporter.baseHeaders["x-algolia-api-key"] = apiKey;
123
+ } else {
124
+ transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
125
+ }
123
126
  },
124
127
  /**
125
128
  * Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.
@@ -542,7 +545,7 @@ function createSearchClient({
542
545
  headers,
543
546
  data: apiKey
544
547
  };
545
- return this.transporter.request(request, requestOptions);
548
+ return transporter.request(request, requestOptions);
546
549
  },
547
550
  /**
548
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).
@@ -576,7 +579,7 @@ function createSearchClient({
576
579
  headers,
577
580
  data: body
578
581
  };
579
- return this.transporter.request(request, requestOptions);
582
+ return transporter.request(request, requestOptions);
580
583
  },
581
584
  /**
582
585
  * Adds a source to the list of allowed sources.
@@ -604,7 +607,7 @@ function createSearchClient({
604
607
  headers,
605
608
  data: source
606
609
  };
607
- return this.transporter.request(request, requestOptions);
610
+ return transporter.request(request, requestOptions);
608
611
  },
609
612
  /**
610
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.
@@ -640,7 +643,7 @@ function createSearchClient({
640
643
  headers,
641
644
  data: assignUserIdParams
642
645
  };
643
- return this.transporter.request(request, requestOptions);
646
+ return transporter.request(request, requestOptions);
644
647
  },
645
648
  /**
646
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.
@@ -670,7 +673,7 @@ function createSearchClient({
670
673
  headers,
671
674
  data: batchWriteParams
672
675
  };
673
- return this.transporter.request(request, requestOptions);
676
+ return transporter.request(request, requestOptions);
674
677
  },
675
678
  /**
676
679
  * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
@@ -709,7 +712,7 @@ function createSearchClient({
709
712
  headers,
710
713
  data: batchAssignUserIdsParams
711
714
  };
712
- return this.transporter.request(request, requestOptions);
715
+ return transporter.request(request, requestOptions);
713
716
  },
714
717
  /**
715
718
  * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
@@ -747,7 +750,7 @@ function createSearchClient({
747
750
  headers,
748
751
  data: batchDictionaryEntriesParams
749
752
  };
750
- return this.transporter.request(request, requestOptions);
753
+ return transporter.request(request, requestOptions);
751
754
  },
752
755
  /**
753
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.
@@ -774,7 +777,7 @@ function createSearchClient({
774
777
  headers,
775
778
  data: browseParams ? browseParams : {}
776
779
  };
777
- return this.transporter.request(request, requestOptions);
780
+ return transporter.request(request, requestOptions);
778
781
  },
779
782
  /**
780
783
  * Deletes only the records from an index while keeping settings, synonyms, and rules.
@@ -799,7 +802,7 @@ function createSearchClient({
799
802
  queryParameters,
800
803
  headers
801
804
  };
802
- return this.transporter.request(request, requestOptions);
805
+ return transporter.request(request, requestOptions);
803
806
  },
804
807
  /**
805
808
  * Deletes all rules from the index.
@@ -828,7 +831,7 @@ function createSearchClient({
828
831
  queryParameters,
829
832
  headers
830
833
  };
831
- return this.transporter.request(request, requestOptions);
834
+ return transporter.request(request, requestOptions);
832
835
  },
833
836
  /**
834
837
  * Deletes all synonyms from the index.
@@ -857,7 +860,7 @@ function createSearchClient({
857
860
  queryParameters,
858
861
  headers
859
862
  };
860
- return this.transporter.request(request, requestOptions);
863
+ return transporter.request(request, requestOptions);
861
864
  },
862
865
  /**
863
866
  * This method allow you to send requests to the Algolia REST API.
@@ -880,7 +883,7 @@ function createSearchClient({
880
883
  queryParameters,
881
884
  headers
882
885
  };
883
- return this.transporter.request(request, requestOptions);
886
+ return transporter.request(request, requestOptions);
884
887
  },
885
888
  /**
886
889
  * This method allow you to send requests to the Algolia REST API.
@@ -903,7 +906,7 @@ function createSearchClient({
903
906
  queryParameters,
904
907
  headers
905
908
  };
906
- return this.transporter.request(request, requestOptions);
909
+ return transporter.request(request, requestOptions);
907
910
  },
908
911
  /**
909
912
  * This method allow you to send requests to the Algolia REST API.
@@ -928,7 +931,7 @@ function createSearchClient({
928
931
  headers,
929
932
  data: body ? body : {}
930
933
  };
931
- return this.transporter.request(request, requestOptions);
934
+ return transporter.request(request, requestOptions);
932
935
  },
933
936
  /**
934
937
  * This method allow you to send requests to the Algolia REST API.
@@ -953,7 +956,7 @@ function createSearchClient({
953
956
  headers,
954
957
  data: body ? body : {}
955
958
  };
956
- return this.transporter.request(request, requestOptions);
959
+ return transporter.request(request, requestOptions);
957
960
  },
958
961
  /**
959
962
  * Deletes the API key.
@@ -978,7 +981,7 @@ function createSearchClient({
978
981
  queryParameters,
979
982
  headers
980
983
  };
981
- return this.transporter.request(request, requestOptions);
984
+ return transporter.request(request, requestOptions);
982
985
  },
983
986
  /**
984
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).
@@ -1008,7 +1011,7 @@ function createSearchClient({
1008
1011
  headers,
1009
1012
  data: deleteByParams
1010
1013
  };
1011
- return this.transporter.request(request, requestOptions);
1014
+ return transporter.request(request, requestOptions);
1012
1015
  },
1013
1016
  /**
1014
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/).
@@ -1033,7 +1036,7 @@ function createSearchClient({
1033
1036
  queryParameters,
1034
1037
  headers
1035
1038
  };
1036
- return this.transporter.request(request, requestOptions);
1039
+ return transporter.request(request, requestOptions);
1037
1040
  },
1038
1041
  /**
1039
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).
@@ -1062,7 +1065,7 @@ function createSearchClient({
1062
1065
  queryParameters,
1063
1066
  headers
1064
1067
  };
1065
- return this.transporter.request(request, requestOptions);
1068
+ return transporter.request(request, requestOptions);
1066
1069
  },
1067
1070
  /**
1068
1071
  * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
@@ -1095,7 +1098,7 @@ function createSearchClient({
1095
1098
  queryParameters,
1096
1099
  headers
1097
1100
  };
1098
- return this.transporter.request(request, requestOptions);
1101
+ return transporter.request(request, requestOptions);
1099
1102
  },
1100
1103
  /**
1101
1104
  * Deletes a source from the list of allowed sources.
@@ -1120,7 +1123,7 @@ function createSearchClient({
1120
1123
  queryParameters,
1121
1124
  headers
1122
1125
  };
1123
- return this.transporter.request(request, requestOptions);
1126
+ return transporter.request(request, requestOptions);
1124
1127
  },
1125
1128
  /**
1126
1129
  * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1153,7 +1156,7 @@ function createSearchClient({
1153
1156
  queryParameters,
1154
1157
  headers
1155
1158
  };
1156
- return this.transporter.request(request, requestOptions);
1159
+ return transporter.request(request, requestOptions);
1157
1160
  },
1158
1161
  /**
1159
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.
@@ -1175,7 +1178,7 @@ function createSearchClient({
1175
1178
  queryParameters,
1176
1179
  headers
1177
1180
  };
1178
- return this.transporter.request(request, requestOptions);
1181
+ return transporter.request(request, requestOptions);
1179
1182
  },
1180
1183
  /**
1181
1184
  * Checks the status of a given application task.
@@ -1200,7 +1203,7 @@ function createSearchClient({
1200
1203
  queryParameters,
1201
1204
  headers
1202
1205
  };
1203
- return this.transporter.request(request, requestOptions);
1206
+ return transporter.request(request, requestOptions);
1204
1207
  },
1205
1208
  /**
1206
1209
  * Lists supported languages with their supported dictionary types and number of custom entries.
@@ -1220,7 +1223,7 @@ function createSearchClient({
1220
1223
  queryParameters,
1221
1224
  headers
1222
1225
  };
1223
- return this.transporter.request(request, requestOptions);
1226
+ return transporter.request(request, requestOptions);
1224
1227
  },
1225
1228
  /**
1226
1229
  * Retrieves the languages for which standard dictionary entries are turned off.
@@ -1240,7 +1243,7 @@ function createSearchClient({
1240
1243
  queryParameters,
1241
1244
  headers
1242
1245
  };
1243
- return this.transporter.request(request, requestOptions);
1246
+ return transporter.request(request, requestOptions);
1244
1247
  },
1245
1248
  /**
1246
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.
@@ -1277,7 +1280,7 @@ function createSearchClient({
1277
1280
  queryParameters,
1278
1281
  headers
1279
1282
  };
1280
- return this.transporter.request(request, requestOptions);
1283
+ return transporter.request(request, requestOptions);
1281
1284
  },
1282
1285
  /**
1283
1286
  * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
@@ -1310,7 +1313,7 @@ function createSearchClient({
1310
1313
  queryParameters,
1311
1314
  headers
1312
1315
  };
1313
- return this.transporter.request(request, requestOptions);
1316
+ return transporter.request(request, requestOptions);
1314
1317
  },
1315
1318
  /**
1316
1319
  * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
@@ -1340,7 +1343,7 @@ function createSearchClient({
1340
1343
  useReadTransporter: true,
1341
1344
  cacheable: true
1342
1345
  };
1343
- return this.transporter.request(request, requestOptions);
1346
+ return transporter.request(request, requestOptions);
1344
1347
  },
1345
1348
  /**
1346
1349
  * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
@@ -1369,7 +1372,7 @@ function createSearchClient({
1369
1372
  queryParameters,
1370
1373
  headers
1371
1374
  };
1372
- return this.transporter.request(request, requestOptions);
1375
+ return transporter.request(request, requestOptions);
1373
1376
  },
1374
1377
  /**
1375
1378
  * Retrieves an object with non-null index settings.
@@ -1394,7 +1397,7 @@ function createSearchClient({
1394
1397
  queryParameters,
1395
1398
  headers
1396
1399
  };
1397
- return this.transporter.request(request, requestOptions);
1400
+ return transporter.request(request, requestOptions);
1398
1401
  },
1399
1402
  /**
1400
1403
  * Retrieves all allowed IP addresses with access to your application.
@@ -1414,7 +1417,7 @@ function createSearchClient({
1414
1417
  queryParameters,
1415
1418
  headers
1416
1419
  };
1417
- return this.transporter.request(request, requestOptions);
1420
+ return transporter.request(request, requestOptions);
1418
1421
  },
1419
1422
  /**
1420
1423
  * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1443,7 +1446,7 @@ function createSearchClient({
1443
1446
  queryParameters,
1444
1447
  headers
1445
1448
  };
1446
- return this.transporter.request(request, requestOptions);
1449
+ return transporter.request(request, requestOptions);
1447
1450
  },
1448
1451
  /**
1449
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.
@@ -1472,7 +1475,7 @@ function createSearchClient({
1472
1475
  queryParameters,
1473
1476
  headers
1474
1477
  };
1475
- return this.transporter.request(request, requestOptions);
1478
+ return transporter.request(request, requestOptions);
1476
1479
  },
1477
1480
  /**
1478
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.
@@ -1492,7 +1495,7 @@ function createSearchClient({
1492
1495
  queryParameters,
1493
1496
  headers
1494
1497
  };
1495
- return this.transporter.request(request, requestOptions);
1498
+ return transporter.request(request, requestOptions);
1496
1499
  },
1497
1500
  /**
1498
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.
@@ -1517,7 +1520,7 @@ function createSearchClient({
1517
1520
  queryParameters,
1518
1521
  headers
1519
1522
  };
1520
- return this.transporter.request(request, requestOptions);
1523
+ return transporter.request(request, requestOptions);
1521
1524
  },
1522
1525
  /**
1523
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.
@@ -1542,7 +1545,7 @@ function createSearchClient({
1542
1545
  queryParameters,
1543
1546
  headers
1544
1547
  };
1545
- return this.transporter.request(request, requestOptions);
1548
+ return transporter.request(request, requestOptions);
1546
1549
  },
1547
1550
  /**
1548
1551
  * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
@@ -1562,7 +1565,7 @@ function createSearchClient({
1562
1565
  queryParameters,
1563
1566
  headers
1564
1567
  };
1565
- return this.transporter.request(request, requestOptions);
1568
+ return transporter.request(request, requestOptions);
1566
1569
  },
1567
1570
  /**
1568
1571
  * Lists the available clusters in a multi-cluster setup.
@@ -1582,7 +1585,7 @@ function createSearchClient({
1582
1585
  queryParameters,
1583
1586
  headers
1584
1587
  };
1585
- return this.transporter.request(request, requestOptions);
1588
+ return transporter.request(request, requestOptions);
1586
1589
  },
1587
1590
  /**
1588
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.
@@ -1611,7 +1614,7 @@ function createSearchClient({
1611
1614
  queryParameters,
1612
1615
  headers
1613
1616
  };
1614
- return this.transporter.request(request, requestOptions);
1617
+ return transporter.request(request, requestOptions);
1615
1618
  },
1616
1619
  /**
1617
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.
@@ -1640,7 +1643,7 @@ function createSearchClient({
1640
1643
  queryParameters,
1641
1644
  headers
1642
1645
  };
1643
- return this.transporter.request(request, requestOptions);
1646
+ return transporter.request(request, requestOptions);
1644
1647
  },
1645
1648
  /**
1646
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.
@@ -1665,7 +1668,7 @@ function createSearchClient({
1665
1668
  headers,
1666
1669
  data: batchParams
1667
1670
  };
1668
- return this.transporter.request(request, requestOptions);
1671
+ return transporter.request(request, requestOptions);
1669
1672
  },
1670
1673
  /**
1671
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/).
@@ -1701,7 +1704,7 @@ function createSearchClient({
1701
1704
  headers,
1702
1705
  data: operationIndexParams
1703
1706
  };
1704
- return this.transporter.request(request, requestOptions);
1707
+ return transporter.request(request, requestOptions);
1705
1708
  },
1706
1709
  /**
1707
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.
@@ -1739,7 +1742,7 @@ function createSearchClient({
1739
1742
  headers,
1740
1743
  data: attributesToUpdate
1741
1744
  };
1742
- return this.transporter.request(request, requestOptions);
1745
+ return transporter.request(request, requestOptions);
1743
1746
  },
1744
1747
  /**
1745
1748
  * Deletes a user ID and its associated data from the clusters.
@@ -1764,7 +1767,7 @@ function createSearchClient({
1764
1767
  queryParameters,
1765
1768
  headers
1766
1769
  };
1767
- return this.transporter.request(request, requestOptions);
1770
+ return transporter.request(request, requestOptions);
1768
1771
  },
1769
1772
  /**
1770
1773
  * Replaces the list of allowed sources.
@@ -1790,7 +1793,7 @@ function createSearchClient({
1790
1793
  headers,
1791
1794
  data: source
1792
1795
  };
1793
- return this.transporter.request(request, requestOptions);
1796
+ return transporter.request(request, requestOptions);
1794
1797
  },
1795
1798
  /**
1796
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.
@@ -1815,7 +1818,7 @@ function createSearchClient({
1815
1818
  queryParameters,
1816
1819
  headers
1817
1820
  };
1818
- return this.transporter.request(request, requestOptions);
1821
+ return transporter.request(request, requestOptions);
1819
1822
  },
1820
1823
  /**
1821
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).
@@ -1845,7 +1848,7 @@ function createSearchClient({
1845
1848
  headers,
1846
1849
  data: body
1847
1850
  };
1848
- return this.transporter.request(request, requestOptions);
1851
+ return transporter.request(request, requestOptions);
1849
1852
  },
1850
1853
  /**
1851
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).
@@ -1886,7 +1889,7 @@ function createSearchClient({
1886
1889
  headers,
1887
1890
  data: rule
1888
1891
  };
1889
- return this.transporter.request(request, requestOptions);
1892
+ return transporter.request(request, requestOptions);
1890
1893
  },
1891
1894
  /**
1892
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.
@@ -1924,7 +1927,7 @@ function createSearchClient({
1924
1927
  headers,
1925
1928
  data: rules
1926
1929
  };
1927
- return this.transporter.request(request, requestOptions);
1930
+ return transporter.request(request, requestOptions);
1928
1931
  },
1929
1932
  /**
1930
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).
@@ -1968,7 +1971,7 @@ function createSearchClient({
1968
1971
  headers,
1969
1972
  data: synonymHit
1970
1973
  };
1971
- return this.transporter.request(request, requestOptions);
1974
+ return transporter.request(request, requestOptions);
1972
1975
  },
1973
1976
  /**
1974
1977
  * If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
@@ -2006,7 +2009,7 @@ function createSearchClient({
2006
2009
  headers,
2007
2010
  data: synonymHit
2008
2011
  };
2009
- return this.transporter.request(request, requestOptions);
2012
+ return transporter.request(request, requestOptions);
2010
2013
  },
2011
2014
  /**
2012
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.
@@ -2057,7 +2060,7 @@ function createSearchClient({
2057
2060
  useReadTransporter: true,
2058
2061
  cacheable: true
2059
2062
  };
2060
- return this.transporter.request(request, requestOptions);
2063
+ return transporter.request(request, requestOptions);
2061
2064
  },
2062
2065
  /**
2063
2066
  * Searches for standard and custom dictionary entries.
@@ -2099,7 +2102,7 @@ function createSearchClient({
2099
2102
  useReadTransporter: true,
2100
2103
  cacheable: true
2101
2104
  };
2102
- return this.transporter.request(request, requestOptions);
2105
+ return transporter.request(request, requestOptions);
2103
2106
  },
2104
2107
  /**
2105
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**.
@@ -2132,7 +2135,7 @@ function createSearchClient({
2132
2135
  useReadTransporter: true,
2133
2136
  cacheable: true
2134
2137
  };
2135
- return this.transporter.request(request, requestOptions);
2138
+ return transporter.request(request, requestOptions);
2136
2139
  },
2137
2140
  /**
2138
2141
  * Searches for rules in your index.
@@ -2161,7 +2164,7 @@ function createSearchClient({
2161
2164
  useReadTransporter: true,
2162
2165
  cacheable: true
2163
2166
  };
2164
- return this.transporter.request(request, requestOptions);
2167
+ return transporter.request(request, requestOptions);
2165
2168
  },
2166
2169
  /**
2167
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.
@@ -2190,7 +2193,7 @@ function createSearchClient({
2190
2193
  useReadTransporter: true,
2191
2194
  cacheable: true
2192
2195
  };
2193
- return this.transporter.request(request, requestOptions);
2196
+ return transporter.request(request, requestOptions);
2194
2197
  },
2195
2198
  /**
2196
2199
  * Searches for synonyms in your index.
@@ -2222,7 +2225,7 @@ function createSearchClient({
2222
2225
  useReadTransporter: true,
2223
2226
  cacheable: true
2224
2227
  };
2225
- return this.transporter.request(request, requestOptions);
2228
+ return transporter.request(request, requestOptions);
2226
2229
  },
2227
2230
  /**
2228
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).
@@ -2252,7 +2255,7 @@ function createSearchClient({
2252
2255
  useReadTransporter: true,
2253
2256
  cacheable: true
2254
2257
  };
2255
- return this.transporter.request(request, requestOptions);
2258
+ return transporter.request(request, requestOptions);
2256
2259
  },
2257
2260
  /**
2258
2261
  * Turns standard stop word dictionary entries on or off for a given language.
@@ -2282,7 +2285,7 @@ function createSearchClient({
2282
2285
  headers,
2283
2286
  data: dictionarySettingsParams
2284
2287
  };
2285
- return this.transporter.request(request, requestOptions);
2288
+ return transporter.request(request, requestOptions);
2286
2289
  },
2287
2290
  /**
2288
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.
@@ -2316,7 +2319,7 @@ function createSearchClient({
2316
2319
  headers,
2317
2320
  data: indexSettings
2318
2321
  };
2319
- return this.transporter.request(request, requestOptions);
2322
+ return transporter.request(request, requestOptions);
2320
2323
  },
2321
2324
  /**
2322
2325
  * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
@@ -2349,7 +2352,7 @@ function createSearchClient({
2349
2352
  headers,
2350
2353
  data: apiKey
2351
2354
  };
2352
- return this.transporter.request(request, requestOptions);
2355
+ return transporter.request(request, requestOptions);
2353
2356
  }
2354
2357
  };
2355
2358
  }