@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/browser.d.ts CHANGED
@@ -2952,7 +2952,7 @@ type UpdatedRuleResponse = {
2952
2952
  taskID: number;
2953
2953
  };
2954
2954
 
2955
- declare const apiClientVersion = "5.3.0";
2955
+ declare const apiClientVersion = "5.3.2";
2956
2956
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
2957
2957
  transporter: _algolia_client_common.Transporter;
2958
2958
  /**
@@ -18,7 +18,7 @@ import {
18
18
  ApiError,
19
19
  createIterablePromise
20
20
  } from "@algolia/client-common";
21
- var apiClientVersion = "5.3.0";
21
+ var apiClientVersion = "5.3.2";
22
22
  function getDefaultHosts(appId) {
23
23
  return [
24
24
  {
@@ -59,25 +59,26 @@ function createSearchClient({
59
59
  ...options
60
60
  }) {
61
61
  const auth = createAuth(appIdOption, apiKeyOption, authMode);
62
- return {
63
- transporter: createTransporter({
64
- hosts: getDefaultHosts(appIdOption),
65
- ...options,
66
- algoliaAgent: getAlgoliaAgent({
67
- algoliaAgents,
68
- client: "Search",
69
- version: apiClientVersion
70
- }),
71
- baseHeaders: {
72
- "content-type": "text/plain",
73
- ...auth.headers(),
74
- ...options.baseHeaders
75
- },
76
- baseQueryParameters: {
77
- ...auth.queryParameters(),
78
- ...options.baseQueryParameters
79
- }
62
+ const transporter = createTransporter({
63
+ hosts: getDefaultHosts(appIdOption),
64
+ ...options,
65
+ algoliaAgent: getAlgoliaAgent({
66
+ algoliaAgents,
67
+ client: "Search",
68
+ version: apiClientVersion
80
69
  }),
70
+ baseHeaders: {
71
+ "content-type": "text/plain",
72
+ ...auth.headers(),
73
+ ...options.baseHeaders
74
+ },
75
+ baseQueryParameters: {
76
+ ...auth.queryParameters(),
77
+ ...options.baseQueryParameters
78
+ }
79
+ });
80
+ return {
81
+ transporter,
81
82
  /**
82
83
  * The `appId` currently in use.
83
84
  */
@@ -86,15 +87,13 @@ function createSearchClient({
86
87
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
87
88
  */
88
89
  clearCache() {
89
- return Promise.all([this.transporter.requestsCache.clear(), this.transporter.responsesCache.clear()]).then(
90
- () => void 0
91
- );
90
+ return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
92
91
  },
93
92
  /**
94
93
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
95
94
  */
96
95
  get _ua() {
97
- return this.transporter.algoliaAgent.value;
96
+ return transporter.algoliaAgent.value;
98
97
  },
99
98
  /**
100
99
  * Adds a `segment` to the `x-algolia-agent` sent with every requests.
@@ -103,7 +102,7 @@ function createSearchClient({
103
102
  * @param version - The version of the agent.
104
103
  */
105
104
  addAlgoliaAgent(segment, version) {
106
- this.transporter.algoliaAgent.add({ segment, version });
105
+ transporter.algoliaAgent.add({ segment, version });
107
106
  },
108
107
  /**
109
108
  * Helper method to switch the API key used to authenticate the requests.
@@ -112,7 +111,11 @@ function createSearchClient({
112
111
  * @param params.apiKey - The new API Key to use.
113
112
  */
114
113
  setClientApiKey({ apiKey }) {
115
- this.transporter.baseHeaders["x-algolia-api-key"] = apiKey;
114
+ if (!authMode || authMode === "WithinHeaders") {
115
+ transporter.baseHeaders["x-algolia-api-key"] = apiKey;
116
+ } else {
117
+ transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
118
+ }
116
119
  },
117
120
  /**
118
121
  * Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.
@@ -535,7 +538,7 @@ function createSearchClient({
535
538
  headers,
536
539
  data: apiKey
537
540
  };
538
- return this.transporter.request(request, requestOptions);
541
+ return transporter.request(request, requestOptions);
539
542
  },
540
543
  /**
541
544
  * 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).
@@ -569,7 +572,7 @@ function createSearchClient({
569
572
  headers,
570
573
  data: body
571
574
  };
572
- return this.transporter.request(request, requestOptions);
575
+ return transporter.request(request, requestOptions);
573
576
  },
574
577
  /**
575
578
  * Adds a source to the list of allowed sources.
@@ -597,7 +600,7 @@ function createSearchClient({
597
600
  headers,
598
601
  data: source
599
602
  };
600
- return this.transporter.request(request, requestOptions);
603
+ return transporter.request(request, requestOptions);
601
604
  },
602
605
  /**
603
606
  * 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.
@@ -633,7 +636,7 @@ function createSearchClient({
633
636
  headers,
634
637
  data: assignUserIdParams
635
638
  };
636
- return this.transporter.request(request, requestOptions);
639
+ return transporter.request(request, requestOptions);
637
640
  },
638
641
  /**
639
642
  * 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.
@@ -663,7 +666,7 @@ function createSearchClient({
663
666
  headers,
664
667
  data: batchWriteParams
665
668
  };
666
- return this.transporter.request(request, requestOptions);
669
+ return transporter.request(request, requestOptions);
667
670
  },
668
671
  /**
669
672
  * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
@@ -702,7 +705,7 @@ function createSearchClient({
702
705
  headers,
703
706
  data: batchAssignUserIdsParams
704
707
  };
705
- return this.transporter.request(request, requestOptions);
708
+ return transporter.request(request, requestOptions);
706
709
  },
707
710
  /**
708
711
  * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
@@ -740,7 +743,7 @@ function createSearchClient({
740
743
  headers,
741
744
  data: batchDictionaryEntriesParams
742
745
  };
743
- return this.transporter.request(request, requestOptions);
746
+ return transporter.request(request, requestOptions);
744
747
  },
745
748
  /**
746
749
  * 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.
@@ -767,7 +770,7 @@ function createSearchClient({
767
770
  headers,
768
771
  data: browseParams ? browseParams : {}
769
772
  };
770
- return this.transporter.request(request, requestOptions);
773
+ return transporter.request(request, requestOptions);
771
774
  },
772
775
  /**
773
776
  * Deletes only the records from an index while keeping settings, synonyms, and rules.
@@ -792,7 +795,7 @@ function createSearchClient({
792
795
  queryParameters,
793
796
  headers
794
797
  };
795
- return this.transporter.request(request, requestOptions);
798
+ return transporter.request(request, requestOptions);
796
799
  },
797
800
  /**
798
801
  * Deletes all rules from the index.
@@ -821,7 +824,7 @@ function createSearchClient({
821
824
  queryParameters,
822
825
  headers
823
826
  };
824
- return this.transporter.request(request, requestOptions);
827
+ return transporter.request(request, requestOptions);
825
828
  },
826
829
  /**
827
830
  * Deletes all synonyms from the index.
@@ -850,7 +853,7 @@ function createSearchClient({
850
853
  queryParameters,
851
854
  headers
852
855
  };
853
- return this.transporter.request(request, requestOptions);
856
+ return transporter.request(request, requestOptions);
854
857
  },
855
858
  /**
856
859
  * This method allow you to send requests to the Algolia REST API.
@@ -873,7 +876,7 @@ function createSearchClient({
873
876
  queryParameters,
874
877
  headers
875
878
  };
876
- return this.transporter.request(request, requestOptions);
879
+ return transporter.request(request, requestOptions);
877
880
  },
878
881
  /**
879
882
  * This method allow you to send requests to the Algolia REST API.
@@ -896,7 +899,7 @@ function createSearchClient({
896
899
  queryParameters,
897
900
  headers
898
901
  };
899
- return this.transporter.request(request, requestOptions);
902
+ return transporter.request(request, requestOptions);
900
903
  },
901
904
  /**
902
905
  * This method allow you to send requests to the Algolia REST API.
@@ -921,7 +924,7 @@ function createSearchClient({
921
924
  headers,
922
925
  data: body ? body : {}
923
926
  };
924
- return this.transporter.request(request, requestOptions);
927
+ return transporter.request(request, requestOptions);
925
928
  },
926
929
  /**
927
930
  * This method allow you to send requests to the Algolia REST API.
@@ -946,7 +949,7 @@ function createSearchClient({
946
949
  headers,
947
950
  data: body ? body : {}
948
951
  };
949
- return this.transporter.request(request, requestOptions);
952
+ return transporter.request(request, requestOptions);
950
953
  },
951
954
  /**
952
955
  * Deletes the API key.
@@ -971,7 +974,7 @@ function createSearchClient({
971
974
  queryParameters,
972
975
  headers
973
976
  };
974
- return this.transporter.request(request, requestOptions);
977
+ return transporter.request(request, requestOptions);
975
978
  },
976
979
  /**
977
980
  * 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).
@@ -1001,7 +1004,7 @@ function createSearchClient({
1001
1004
  headers,
1002
1005
  data: deleteByParams
1003
1006
  };
1004
- return this.transporter.request(request, requestOptions);
1007
+ return transporter.request(request, requestOptions);
1005
1008
  },
1006
1009
  /**
1007
1010
  * 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/).
@@ -1026,7 +1029,7 @@ function createSearchClient({
1026
1029
  queryParameters,
1027
1030
  headers
1028
1031
  };
1029
- return this.transporter.request(request, requestOptions);
1032
+ return transporter.request(request, requestOptions);
1030
1033
  },
1031
1034
  /**
1032
1035
  * 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).
@@ -1055,7 +1058,7 @@ function createSearchClient({
1055
1058
  queryParameters,
1056
1059
  headers
1057
1060
  };
1058
- return this.transporter.request(request, requestOptions);
1061
+ return transporter.request(request, requestOptions);
1059
1062
  },
1060
1063
  /**
1061
1064
  * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
@@ -1088,7 +1091,7 @@ function createSearchClient({
1088
1091
  queryParameters,
1089
1092
  headers
1090
1093
  };
1091
- return this.transporter.request(request, requestOptions);
1094
+ return transporter.request(request, requestOptions);
1092
1095
  },
1093
1096
  /**
1094
1097
  * Deletes a source from the list of allowed sources.
@@ -1113,7 +1116,7 @@ function createSearchClient({
1113
1116
  queryParameters,
1114
1117
  headers
1115
1118
  };
1116
- return this.transporter.request(request, requestOptions);
1119
+ return transporter.request(request, requestOptions);
1117
1120
  },
1118
1121
  /**
1119
1122
  * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1146,7 +1149,7 @@ function createSearchClient({
1146
1149
  queryParameters,
1147
1150
  headers
1148
1151
  };
1149
- return this.transporter.request(request, requestOptions);
1152
+ return transporter.request(request, requestOptions);
1150
1153
  },
1151
1154
  /**
1152
1155
  * 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.
@@ -1168,7 +1171,7 @@ function createSearchClient({
1168
1171
  queryParameters,
1169
1172
  headers
1170
1173
  };
1171
- return this.transporter.request(request, requestOptions);
1174
+ return transporter.request(request, requestOptions);
1172
1175
  },
1173
1176
  /**
1174
1177
  * Checks the status of a given application task.
@@ -1193,7 +1196,7 @@ function createSearchClient({
1193
1196
  queryParameters,
1194
1197
  headers
1195
1198
  };
1196
- return this.transporter.request(request, requestOptions);
1199
+ return transporter.request(request, requestOptions);
1197
1200
  },
1198
1201
  /**
1199
1202
  * Lists supported languages with their supported dictionary types and number of custom entries.
@@ -1213,7 +1216,7 @@ function createSearchClient({
1213
1216
  queryParameters,
1214
1217
  headers
1215
1218
  };
1216
- return this.transporter.request(request, requestOptions);
1219
+ return transporter.request(request, requestOptions);
1217
1220
  },
1218
1221
  /**
1219
1222
  * Retrieves the languages for which standard dictionary entries are turned off.
@@ -1233,7 +1236,7 @@ function createSearchClient({
1233
1236
  queryParameters,
1234
1237
  headers
1235
1238
  };
1236
- return this.transporter.request(request, requestOptions);
1239
+ return transporter.request(request, requestOptions);
1237
1240
  },
1238
1241
  /**
1239
1242
  * 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.
@@ -1270,7 +1273,7 @@ function createSearchClient({
1270
1273
  queryParameters,
1271
1274
  headers
1272
1275
  };
1273
- return this.transporter.request(request, requestOptions);
1276
+ return transporter.request(request, requestOptions);
1274
1277
  },
1275
1278
  /**
1276
1279
  * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
@@ -1303,7 +1306,7 @@ function createSearchClient({
1303
1306
  queryParameters,
1304
1307
  headers
1305
1308
  };
1306
- return this.transporter.request(request, requestOptions);
1309
+ return transporter.request(request, requestOptions);
1307
1310
  },
1308
1311
  /**
1309
1312
  * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
@@ -1333,7 +1336,7 @@ function createSearchClient({
1333
1336
  useReadTransporter: true,
1334
1337
  cacheable: true
1335
1338
  };
1336
- return this.transporter.request(request, requestOptions);
1339
+ return transporter.request(request, requestOptions);
1337
1340
  },
1338
1341
  /**
1339
1342
  * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
@@ -1362,7 +1365,7 @@ function createSearchClient({
1362
1365
  queryParameters,
1363
1366
  headers
1364
1367
  };
1365
- return this.transporter.request(request, requestOptions);
1368
+ return transporter.request(request, requestOptions);
1366
1369
  },
1367
1370
  /**
1368
1371
  * Retrieves an object with non-null index settings.
@@ -1387,7 +1390,7 @@ function createSearchClient({
1387
1390
  queryParameters,
1388
1391
  headers
1389
1392
  };
1390
- return this.transporter.request(request, requestOptions);
1393
+ return transporter.request(request, requestOptions);
1391
1394
  },
1392
1395
  /**
1393
1396
  * Retrieves all allowed IP addresses with access to your application.
@@ -1407,7 +1410,7 @@ function createSearchClient({
1407
1410
  queryParameters,
1408
1411
  headers
1409
1412
  };
1410
- return this.transporter.request(request, requestOptions);
1413
+ return transporter.request(request, requestOptions);
1411
1414
  },
1412
1415
  /**
1413
1416
  * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1436,7 +1439,7 @@ function createSearchClient({
1436
1439
  queryParameters,
1437
1440
  headers
1438
1441
  };
1439
- return this.transporter.request(request, requestOptions);
1442
+ return transporter.request(request, requestOptions);
1440
1443
  },
1441
1444
  /**
1442
1445
  * 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.
@@ -1465,7 +1468,7 @@ function createSearchClient({
1465
1468
  queryParameters,
1466
1469
  headers
1467
1470
  };
1468
- return this.transporter.request(request, requestOptions);
1471
+ return transporter.request(request, requestOptions);
1469
1472
  },
1470
1473
  /**
1471
1474
  * 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.
@@ -1485,7 +1488,7 @@ function createSearchClient({
1485
1488
  queryParameters,
1486
1489
  headers
1487
1490
  };
1488
- return this.transporter.request(request, requestOptions);
1491
+ return transporter.request(request, requestOptions);
1489
1492
  },
1490
1493
  /**
1491
1494
  * 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.
@@ -1510,7 +1513,7 @@ function createSearchClient({
1510
1513
  queryParameters,
1511
1514
  headers
1512
1515
  };
1513
- return this.transporter.request(request, requestOptions);
1516
+ return transporter.request(request, requestOptions);
1514
1517
  },
1515
1518
  /**
1516
1519
  * 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.
@@ -1535,7 +1538,7 @@ function createSearchClient({
1535
1538
  queryParameters,
1536
1539
  headers
1537
1540
  };
1538
- return this.transporter.request(request, requestOptions);
1541
+ return transporter.request(request, requestOptions);
1539
1542
  },
1540
1543
  /**
1541
1544
  * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
@@ -1555,7 +1558,7 @@ function createSearchClient({
1555
1558
  queryParameters,
1556
1559
  headers
1557
1560
  };
1558
- return this.transporter.request(request, requestOptions);
1561
+ return transporter.request(request, requestOptions);
1559
1562
  },
1560
1563
  /**
1561
1564
  * Lists the available clusters in a multi-cluster setup.
@@ -1575,7 +1578,7 @@ function createSearchClient({
1575
1578
  queryParameters,
1576
1579
  headers
1577
1580
  };
1578
- return this.transporter.request(request, requestOptions);
1581
+ return transporter.request(request, requestOptions);
1579
1582
  },
1580
1583
  /**
1581
1584
  * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
@@ -1604,7 +1607,7 @@ function createSearchClient({
1604
1607
  queryParameters,
1605
1608
  headers
1606
1609
  };
1607
- return this.transporter.request(request, requestOptions);
1610
+ return transporter.request(request, requestOptions);
1608
1611
  },
1609
1612
  /**
1610
1613
  * 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.
@@ -1633,7 +1636,7 @@ function createSearchClient({
1633
1636
  queryParameters,
1634
1637
  headers
1635
1638
  };
1636
- return this.transporter.request(request, requestOptions);
1639
+ return transporter.request(request, requestOptions);
1637
1640
  },
1638
1641
  /**
1639
1642
  * 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.
@@ -1658,7 +1661,7 @@ function createSearchClient({
1658
1661
  headers,
1659
1662
  data: batchParams
1660
1663
  };
1661
- return this.transporter.request(request, requestOptions);
1664
+ return transporter.request(request, requestOptions);
1662
1665
  },
1663
1666
  /**
1664
1667
  * 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/).
@@ -1694,7 +1697,7 @@ function createSearchClient({
1694
1697
  headers,
1695
1698
  data: operationIndexParams
1696
1699
  };
1697
- return this.transporter.request(request, requestOptions);
1700
+ return transporter.request(request, requestOptions);
1698
1701
  },
1699
1702
  /**
1700
1703
  * 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.
@@ -1732,7 +1735,7 @@ function createSearchClient({
1732
1735
  headers,
1733
1736
  data: attributesToUpdate
1734
1737
  };
1735
- return this.transporter.request(request, requestOptions);
1738
+ return transporter.request(request, requestOptions);
1736
1739
  },
1737
1740
  /**
1738
1741
  * Deletes a user ID and its associated data from the clusters.
@@ -1757,7 +1760,7 @@ function createSearchClient({
1757
1760
  queryParameters,
1758
1761
  headers
1759
1762
  };
1760
- return this.transporter.request(request, requestOptions);
1763
+ return transporter.request(request, requestOptions);
1761
1764
  },
1762
1765
  /**
1763
1766
  * Replaces the list of allowed sources.
@@ -1783,7 +1786,7 @@ function createSearchClient({
1783
1786
  headers,
1784
1787
  data: source
1785
1788
  };
1786
- return this.transporter.request(request, requestOptions);
1789
+ return transporter.request(request, requestOptions);
1787
1790
  },
1788
1791
  /**
1789
1792
  * 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.
@@ -1808,7 +1811,7 @@ function createSearchClient({
1808
1811
  queryParameters,
1809
1812
  headers
1810
1813
  };
1811
- return this.transporter.request(request, requestOptions);
1814
+ return transporter.request(request, requestOptions);
1812
1815
  },
1813
1816
  /**
1814
1817
  * 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).
@@ -1838,7 +1841,7 @@ function createSearchClient({
1838
1841
  headers,
1839
1842
  data: body
1840
1843
  };
1841
- return this.transporter.request(request, requestOptions);
1844
+ return transporter.request(request, requestOptions);
1842
1845
  },
1843
1846
  /**
1844
1847
  * 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).
@@ -1879,7 +1882,7 @@ function createSearchClient({
1879
1882
  headers,
1880
1883
  data: rule
1881
1884
  };
1882
- return this.transporter.request(request, requestOptions);
1885
+ return transporter.request(request, requestOptions);
1883
1886
  },
1884
1887
  /**
1885
1888
  * 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.
@@ -1917,7 +1920,7 @@ function createSearchClient({
1917
1920
  headers,
1918
1921
  data: rules
1919
1922
  };
1920
- return this.transporter.request(request, requestOptions);
1923
+ return transporter.request(request, requestOptions);
1921
1924
  },
1922
1925
  /**
1923
1926
  * 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).
@@ -1961,7 +1964,7 @@ function createSearchClient({
1961
1964
  headers,
1962
1965
  data: synonymHit
1963
1966
  };
1964
- return this.transporter.request(request, requestOptions);
1967
+ return transporter.request(request, requestOptions);
1965
1968
  },
1966
1969
  /**
1967
1970
  * If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
@@ -1999,7 +2002,7 @@ function createSearchClient({
1999
2002
  headers,
2000
2003
  data: synonymHit
2001
2004
  };
2002
- return this.transporter.request(request, requestOptions);
2005
+ return transporter.request(request, requestOptions);
2003
2006
  },
2004
2007
  /**
2005
2008
  * 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.
@@ -2050,7 +2053,7 @@ function createSearchClient({
2050
2053
  useReadTransporter: true,
2051
2054
  cacheable: true
2052
2055
  };
2053
- return this.transporter.request(request, requestOptions);
2056
+ return transporter.request(request, requestOptions);
2054
2057
  },
2055
2058
  /**
2056
2059
  * Searches for standard and custom dictionary entries.
@@ -2092,7 +2095,7 @@ function createSearchClient({
2092
2095
  useReadTransporter: true,
2093
2096
  cacheable: true
2094
2097
  };
2095
- return this.transporter.request(request, requestOptions);
2098
+ return transporter.request(request, requestOptions);
2096
2099
  },
2097
2100
  /**
2098
2101
  * 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**.
@@ -2125,7 +2128,7 @@ function createSearchClient({
2125
2128
  useReadTransporter: true,
2126
2129
  cacheable: true
2127
2130
  };
2128
- return this.transporter.request(request, requestOptions);
2131
+ return transporter.request(request, requestOptions);
2129
2132
  },
2130
2133
  /**
2131
2134
  * Searches for rules in your index.
@@ -2154,7 +2157,7 @@ function createSearchClient({
2154
2157
  useReadTransporter: true,
2155
2158
  cacheable: true
2156
2159
  };
2157
- return this.transporter.request(request, requestOptions);
2160
+ return transporter.request(request, requestOptions);
2158
2161
  },
2159
2162
  /**
2160
2163
  * 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.
@@ -2183,7 +2186,7 @@ function createSearchClient({
2183
2186
  useReadTransporter: true,
2184
2187
  cacheable: true
2185
2188
  };
2186
- return this.transporter.request(request, requestOptions);
2189
+ return transporter.request(request, requestOptions);
2187
2190
  },
2188
2191
  /**
2189
2192
  * Searches for synonyms in your index.
@@ -2215,7 +2218,7 @@ function createSearchClient({
2215
2218
  useReadTransporter: true,
2216
2219
  cacheable: true
2217
2220
  };
2218
- return this.transporter.request(request, requestOptions);
2221
+ return transporter.request(request, requestOptions);
2219
2222
  },
2220
2223
  /**
2221
2224
  * 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).
@@ -2245,7 +2248,7 @@ function createSearchClient({
2245
2248
  useReadTransporter: true,
2246
2249
  cacheable: true
2247
2250
  };
2248
- return this.transporter.request(request, requestOptions);
2251
+ return transporter.request(request, requestOptions);
2249
2252
  },
2250
2253
  /**
2251
2254
  * Turns standard stop word dictionary entries on or off for a given language.
@@ -2275,7 +2278,7 @@ function createSearchClient({
2275
2278
  headers,
2276
2279
  data: dictionarySettingsParams
2277
2280
  };
2278
- return this.transporter.request(request, requestOptions);
2281
+ return transporter.request(request, requestOptions);
2279
2282
  },
2280
2283
  /**
2281
2284
  * 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.
@@ -2309,7 +2312,7 @@ function createSearchClient({
2309
2312
  headers,
2310
2313
  data: indexSettings
2311
2314
  };
2312
- return this.transporter.request(request, requestOptions);
2315
+ return transporter.request(request, requestOptions);
2313
2316
  },
2314
2317
  /**
2315
2318
  * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
@@ -2342,7 +2345,7 @@ function createSearchClient({
2342
2345
  headers,
2343
2346
  data: apiKey
2344
2347
  };
2345
- return this.transporter.request(request, requestOptions);
2348
+ return transporter.request(request, requestOptions);
2346
2349
  }
2347
2350
  };
2348
2351
  }