@algolia/client-search 5.3.1 → 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.
@@ -19,7 +19,7 @@ import {
19
19
  ApiError,
20
20
  createIterablePromise
21
21
  } from "@algolia/client-common";
22
- var apiClientVersion = "5.3.1";
22
+ var apiClientVersion = "5.3.2";
23
23
  function getDefaultHosts(appId) {
24
24
  return [
25
25
  {
@@ -60,25 +60,26 @@ function createSearchClient({
60
60
  ...options
61
61
  }) {
62
62
  const auth = createAuth(appIdOption, apiKeyOption, authMode);
63
- return {
64
- transporter: createTransporter({
65
- hosts: getDefaultHosts(appIdOption),
66
- ...options,
67
- algoliaAgent: getAlgoliaAgent({
68
- algoliaAgents,
69
- client: "Search",
70
- version: apiClientVersion
71
- }),
72
- baseHeaders: {
73
- "content-type": "text/plain",
74
- ...auth.headers(),
75
- ...options.baseHeaders
76
- },
77
- baseQueryParameters: {
78
- ...auth.queryParameters(),
79
- ...options.baseQueryParameters
80
- }
63
+ const transporter = createTransporter({
64
+ hosts: getDefaultHosts(appIdOption),
65
+ ...options,
66
+ algoliaAgent: getAlgoliaAgent({
67
+ algoliaAgents,
68
+ client: "Search",
69
+ version: apiClientVersion
81
70
  }),
71
+ baseHeaders: {
72
+ "content-type": "text/plain",
73
+ ...auth.headers(),
74
+ ...options.baseHeaders
75
+ },
76
+ baseQueryParameters: {
77
+ ...auth.queryParameters(),
78
+ ...options.baseQueryParameters
79
+ }
80
+ });
81
+ return {
82
+ transporter,
82
83
  /**
83
84
  * The `appId` currently in use.
84
85
  */
@@ -87,15 +88,13 @@ function createSearchClient({
87
88
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
88
89
  */
89
90
  clearCache() {
90
- return Promise.all([this.transporter.requestsCache.clear(), this.transporter.responsesCache.clear()]).then(
91
- () => void 0
92
- );
91
+ return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
93
92
  },
94
93
  /**
95
94
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
96
95
  */
97
96
  get _ua() {
98
- return this.transporter.algoliaAgent.value;
97
+ return transporter.algoliaAgent.value;
99
98
  },
100
99
  /**
101
100
  * Adds a `segment` to the `x-algolia-agent` sent with every requests.
@@ -104,7 +103,7 @@ function createSearchClient({
104
103
  * @param version - The version of the agent.
105
104
  */
106
105
  addAlgoliaAgent(segment, version) {
107
- this.transporter.algoliaAgent.add({ segment, version });
106
+ transporter.algoliaAgent.add({ segment, version });
108
107
  },
109
108
  /**
110
109
  * Helper method to switch the API key used to authenticate the requests.
@@ -114,9 +113,9 @@ function createSearchClient({
114
113
  */
115
114
  setClientApiKey({ apiKey }) {
116
115
  if (!authMode || authMode === "WithinHeaders") {
117
- this.transporter.baseHeaders["x-algolia-api-key"] = apiKey;
116
+ transporter.baseHeaders["x-algolia-api-key"] = apiKey;
118
117
  } else {
119
- this.transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
118
+ transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
120
119
  }
121
120
  },
122
121
  /**
@@ -540,7 +539,7 @@ function createSearchClient({
540
539
  headers,
541
540
  data: apiKey
542
541
  };
543
- return this.transporter.request(request, requestOptions);
542
+ return transporter.request(request, requestOptions);
544
543
  },
545
544
  /**
546
545
  * 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).
@@ -574,7 +573,7 @@ function createSearchClient({
574
573
  headers,
575
574
  data: body
576
575
  };
577
- return this.transporter.request(request, requestOptions);
576
+ return transporter.request(request, requestOptions);
578
577
  },
579
578
  /**
580
579
  * Adds a source to the list of allowed sources.
@@ -602,7 +601,7 @@ function createSearchClient({
602
601
  headers,
603
602
  data: source
604
603
  };
605
- return this.transporter.request(request, requestOptions);
604
+ return transporter.request(request, requestOptions);
606
605
  },
607
606
  /**
608
607
  * 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.
@@ -638,7 +637,7 @@ function createSearchClient({
638
637
  headers,
639
638
  data: assignUserIdParams
640
639
  };
641
- return this.transporter.request(request, requestOptions);
640
+ return transporter.request(request, requestOptions);
642
641
  },
643
642
  /**
644
643
  * 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.
@@ -668,7 +667,7 @@ function createSearchClient({
668
667
  headers,
669
668
  data: batchWriteParams
670
669
  };
671
- return this.transporter.request(request, requestOptions);
670
+ return transporter.request(request, requestOptions);
672
671
  },
673
672
  /**
674
673
  * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
@@ -707,7 +706,7 @@ function createSearchClient({
707
706
  headers,
708
707
  data: batchAssignUserIdsParams
709
708
  };
710
- return this.transporter.request(request, requestOptions);
709
+ return transporter.request(request, requestOptions);
711
710
  },
712
711
  /**
713
712
  * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
@@ -745,7 +744,7 @@ function createSearchClient({
745
744
  headers,
746
745
  data: batchDictionaryEntriesParams
747
746
  };
748
- return this.transporter.request(request, requestOptions);
747
+ return transporter.request(request, requestOptions);
749
748
  },
750
749
  /**
751
750
  * 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.
@@ -772,7 +771,7 @@ function createSearchClient({
772
771
  headers,
773
772
  data: browseParams ? browseParams : {}
774
773
  };
775
- return this.transporter.request(request, requestOptions);
774
+ return transporter.request(request, requestOptions);
776
775
  },
777
776
  /**
778
777
  * Deletes only the records from an index while keeping settings, synonyms, and rules.
@@ -797,7 +796,7 @@ function createSearchClient({
797
796
  queryParameters,
798
797
  headers
799
798
  };
800
- return this.transporter.request(request, requestOptions);
799
+ return transporter.request(request, requestOptions);
801
800
  },
802
801
  /**
803
802
  * Deletes all rules from the index.
@@ -826,7 +825,7 @@ function createSearchClient({
826
825
  queryParameters,
827
826
  headers
828
827
  };
829
- return this.transporter.request(request, requestOptions);
828
+ return transporter.request(request, requestOptions);
830
829
  },
831
830
  /**
832
831
  * Deletes all synonyms from the index.
@@ -855,7 +854,7 @@ function createSearchClient({
855
854
  queryParameters,
856
855
  headers
857
856
  };
858
- return this.transporter.request(request, requestOptions);
857
+ return transporter.request(request, requestOptions);
859
858
  },
860
859
  /**
861
860
  * This method allow you to send requests to the Algolia REST API.
@@ -878,7 +877,7 @@ function createSearchClient({
878
877
  queryParameters,
879
878
  headers
880
879
  };
881
- return this.transporter.request(request, requestOptions);
880
+ return transporter.request(request, requestOptions);
882
881
  },
883
882
  /**
884
883
  * This method allow you to send requests to the Algolia REST API.
@@ -901,7 +900,7 @@ function createSearchClient({
901
900
  queryParameters,
902
901
  headers
903
902
  };
904
- return this.transporter.request(request, requestOptions);
903
+ return transporter.request(request, requestOptions);
905
904
  },
906
905
  /**
907
906
  * This method allow you to send requests to the Algolia REST API.
@@ -926,7 +925,7 @@ function createSearchClient({
926
925
  headers,
927
926
  data: body ? body : {}
928
927
  };
929
- return this.transporter.request(request, requestOptions);
928
+ return transporter.request(request, requestOptions);
930
929
  },
931
930
  /**
932
931
  * This method allow you to send requests to the Algolia REST API.
@@ -951,7 +950,7 @@ function createSearchClient({
951
950
  headers,
952
951
  data: body ? body : {}
953
952
  };
954
- return this.transporter.request(request, requestOptions);
953
+ return transporter.request(request, requestOptions);
955
954
  },
956
955
  /**
957
956
  * Deletes the API key.
@@ -976,7 +975,7 @@ function createSearchClient({
976
975
  queryParameters,
977
976
  headers
978
977
  };
979
- return this.transporter.request(request, requestOptions);
978
+ return transporter.request(request, requestOptions);
980
979
  },
981
980
  /**
982
981
  * 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).
@@ -1006,7 +1005,7 @@ function createSearchClient({
1006
1005
  headers,
1007
1006
  data: deleteByParams
1008
1007
  };
1009
- return this.transporter.request(request, requestOptions);
1008
+ return transporter.request(request, requestOptions);
1010
1009
  },
1011
1010
  /**
1012
1011
  * 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/).
@@ -1031,7 +1030,7 @@ function createSearchClient({
1031
1030
  queryParameters,
1032
1031
  headers
1033
1032
  };
1034
- return this.transporter.request(request, requestOptions);
1033
+ return transporter.request(request, requestOptions);
1035
1034
  },
1036
1035
  /**
1037
1036
  * 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).
@@ -1060,7 +1059,7 @@ function createSearchClient({
1060
1059
  queryParameters,
1061
1060
  headers
1062
1061
  };
1063
- return this.transporter.request(request, requestOptions);
1062
+ return transporter.request(request, requestOptions);
1064
1063
  },
1065
1064
  /**
1066
1065
  * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
@@ -1093,7 +1092,7 @@ function createSearchClient({
1093
1092
  queryParameters,
1094
1093
  headers
1095
1094
  };
1096
- return this.transporter.request(request, requestOptions);
1095
+ return transporter.request(request, requestOptions);
1097
1096
  },
1098
1097
  /**
1099
1098
  * Deletes a source from the list of allowed sources.
@@ -1118,7 +1117,7 @@ function createSearchClient({
1118
1117
  queryParameters,
1119
1118
  headers
1120
1119
  };
1121
- return this.transporter.request(request, requestOptions);
1120
+ return transporter.request(request, requestOptions);
1122
1121
  },
1123
1122
  /**
1124
1123
  * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1151,7 +1150,7 @@ function createSearchClient({
1151
1150
  queryParameters,
1152
1151
  headers
1153
1152
  };
1154
- return this.transporter.request(request, requestOptions);
1153
+ return transporter.request(request, requestOptions);
1155
1154
  },
1156
1155
  /**
1157
1156
  * 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.
@@ -1173,7 +1172,7 @@ function createSearchClient({
1173
1172
  queryParameters,
1174
1173
  headers
1175
1174
  };
1176
- return this.transporter.request(request, requestOptions);
1175
+ return transporter.request(request, requestOptions);
1177
1176
  },
1178
1177
  /**
1179
1178
  * Checks the status of a given application task.
@@ -1198,7 +1197,7 @@ function createSearchClient({
1198
1197
  queryParameters,
1199
1198
  headers
1200
1199
  };
1201
- return this.transporter.request(request, requestOptions);
1200
+ return transporter.request(request, requestOptions);
1202
1201
  },
1203
1202
  /**
1204
1203
  * Lists supported languages with their supported dictionary types and number of custom entries.
@@ -1218,7 +1217,7 @@ function createSearchClient({
1218
1217
  queryParameters,
1219
1218
  headers
1220
1219
  };
1221
- return this.transporter.request(request, requestOptions);
1220
+ return transporter.request(request, requestOptions);
1222
1221
  },
1223
1222
  /**
1224
1223
  * Retrieves the languages for which standard dictionary entries are turned off.
@@ -1238,7 +1237,7 @@ function createSearchClient({
1238
1237
  queryParameters,
1239
1238
  headers
1240
1239
  };
1241
- return this.transporter.request(request, requestOptions);
1240
+ return transporter.request(request, requestOptions);
1242
1241
  },
1243
1242
  /**
1244
1243
  * 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.
@@ -1275,7 +1274,7 @@ function createSearchClient({
1275
1274
  queryParameters,
1276
1275
  headers
1277
1276
  };
1278
- return this.transporter.request(request, requestOptions);
1277
+ return transporter.request(request, requestOptions);
1279
1278
  },
1280
1279
  /**
1281
1280
  * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
@@ -1308,7 +1307,7 @@ function createSearchClient({
1308
1307
  queryParameters,
1309
1308
  headers
1310
1309
  };
1311
- return this.transporter.request(request, requestOptions);
1310
+ return transporter.request(request, requestOptions);
1312
1311
  },
1313
1312
  /**
1314
1313
  * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
@@ -1338,7 +1337,7 @@ function createSearchClient({
1338
1337
  useReadTransporter: true,
1339
1338
  cacheable: true
1340
1339
  };
1341
- return this.transporter.request(request, requestOptions);
1340
+ return transporter.request(request, requestOptions);
1342
1341
  },
1343
1342
  /**
1344
1343
  * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
@@ -1367,7 +1366,7 @@ function createSearchClient({
1367
1366
  queryParameters,
1368
1367
  headers
1369
1368
  };
1370
- return this.transporter.request(request, requestOptions);
1369
+ return transporter.request(request, requestOptions);
1371
1370
  },
1372
1371
  /**
1373
1372
  * Retrieves an object with non-null index settings.
@@ -1392,7 +1391,7 @@ function createSearchClient({
1392
1391
  queryParameters,
1393
1392
  headers
1394
1393
  };
1395
- return this.transporter.request(request, requestOptions);
1394
+ return transporter.request(request, requestOptions);
1396
1395
  },
1397
1396
  /**
1398
1397
  * Retrieves all allowed IP addresses with access to your application.
@@ -1412,7 +1411,7 @@ function createSearchClient({
1412
1411
  queryParameters,
1413
1412
  headers
1414
1413
  };
1415
- return this.transporter.request(request, requestOptions);
1414
+ return transporter.request(request, requestOptions);
1416
1415
  },
1417
1416
  /**
1418
1417
  * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1441,7 +1440,7 @@ function createSearchClient({
1441
1440
  queryParameters,
1442
1441
  headers
1443
1442
  };
1444
- return this.transporter.request(request, requestOptions);
1443
+ return transporter.request(request, requestOptions);
1445
1444
  },
1446
1445
  /**
1447
1446
  * 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.
@@ -1470,7 +1469,7 @@ function createSearchClient({
1470
1469
  queryParameters,
1471
1470
  headers
1472
1471
  };
1473
- return this.transporter.request(request, requestOptions);
1472
+ return transporter.request(request, requestOptions);
1474
1473
  },
1475
1474
  /**
1476
1475
  * 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.
@@ -1490,7 +1489,7 @@ function createSearchClient({
1490
1489
  queryParameters,
1491
1490
  headers
1492
1491
  };
1493
- return this.transporter.request(request, requestOptions);
1492
+ return transporter.request(request, requestOptions);
1494
1493
  },
1495
1494
  /**
1496
1495
  * 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.
@@ -1515,7 +1514,7 @@ function createSearchClient({
1515
1514
  queryParameters,
1516
1515
  headers
1517
1516
  };
1518
- return this.transporter.request(request, requestOptions);
1517
+ return transporter.request(request, requestOptions);
1519
1518
  },
1520
1519
  /**
1521
1520
  * 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.
@@ -1540,7 +1539,7 @@ function createSearchClient({
1540
1539
  queryParameters,
1541
1540
  headers
1542
1541
  };
1543
- return this.transporter.request(request, requestOptions);
1542
+ return transporter.request(request, requestOptions);
1544
1543
  },
1545
1544
  /**
1546
1545
  * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
@@ -1560,7 +1559,7 @@ function createSearchClient({
1560
1559
  queryParameters,
1561
1560
  headers
1562
1561
  };
1563
- return this.transporter.request(request, requestOptions);
1562
+ return transporter.request(request, requestOptions);
1564
1563
  },
1565
1564
  /**
1566
1565
  * Lists the available clusters in a multi-cluster setup.
@@ -1580,7 +1579,7 @@ function createSearchClient({
1580
1579
  queryParameters,
1581
1580
  headers
1582
1581
  };
1583
- return this.transporter.request(request, requestOptions);
1582
+ return transporter.request(request, requestOptions);
1584
1583
  },
1585
1584
  /**
1586
1585
  * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
@@ -1609,7 +1608,7 @@ function createSearchClient({
1609
1608
  queryParameters,
1610
1609
  headers
1611
1610
  };
1612
- return this.transporter.request(request, requestOptions);
1611
+ return transporter.request(request, requestOptions);
1613
1612
  },
1614
1613
  /**
1615
1614
  * 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.
@@ -1638,7 +1637,7 @@ function createSearchClient({
1638
1637
  queryParameters,
1639
1638
  headers
1640
1639
  };
1641
- return this.transporter.request(request, requestOptions);
1640
+ return transporter.request(request, requestOptions);
1642
1641
  },
1643
1642
  /**
1644
1643
  * 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.
@@ -1663,7 +1662,7 @@ function createSearchClient({
1663
1662
  headers,
1664
1663
  data: batchParams
1665
1664
  };
1666
- return this.transporter.request(request, requestOptions);
1665
+ return transporter.request(request, requestOptions);
1667
1666
  },
1668
1667
  /**
1669
1668
  * 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/).
@@ -1699,7 +1698,7 @@ function createSearchClient({
1699
1698
  headers,
1700
1699
  data: operationIndexParams
1701
1700
  };
1702
- return this.transporter.request(request, requestOptions);
1701
+ return transporter.request(request, requestOptions);
1703
1702
  },
1704
1703
  /**
1705
1704
  * 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.
@@ -1737,7 +1736,7 @@ function createSearchClient({
1737
1736
  headers,
1738
1737
  data: attributesToUpdate
1739
1738
  };
1740
- return this.transporter.request(request, requestOptions);
1739
+ return transporter.request(request, requestOptions);
1741
1740
  },
1742
1741
  /**
1743
1742
  * Deletes a user ID and its associated data from the clusters.
@@ -1762,7 +1761,7 @@ function createSearchClient({
1762
1761
  queryParameters,
1763
1762
  headers
1764
1763
  };
1765
- return this.transporter.request(request, requestOptions);
1764
+ return transporter.request(request, requestOptions);
1766
1765
  },
1767
1766
  /**
1768
1767
  * Replaces the list of allowed sources.
@@ -1788,7 +1787,7 @@ function createSearchClient({
1788
1787
  headers,
1789
1788
  data: source
1790
1789
  };
1791
- return this.transporter.request(request, requestOptions);
1790
+ return transporter.request(request, requestOptions);
1792
1791
  },
1793
1792
  /**
1794
1793
  * 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.
@@ -1813,7 +1812,7 @@ function createSearchClient({
1813
1812
  queryParameters,
1814
1813
  headers
1815
1814
  };
1816
- return this.transporter.request(request, requestOptions);
1815
+ return transporter.request(request, requestOptions);
1817
1816
  },
1818
1817
  /**
1819
1818
  * 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).
@@ -1843,7 +1842,7 @@ function createSearchClient({
1843
1842
  headers,
1844
1843
  data: body
1845
1844
  };
1846
- return this.transporter.request(request, requestOptions);
1845
+ return transporter.request(request, requestOptions);
1847
1846
  },
1848
1847
  /**
1849
1848
  * 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).
@@ -1884,7 +1883,7 @@ function createSearchClient({
1884
1883
  headers,
1885
1884
  data: rule
1886
1885
  };
1887
- return this.transporter.request(request, requestOptions);
1886
+ return transporter.request(request, requestOptions);
1888
1887
  },
1889
1888
  /**
1890
1889
  * 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.
@@ -1922,7 +1921,7 @@ function createSearchClient({
1922
1921
  headers,
1923
1922
  data: rules
1924
1923
  };
1925
- return this.transporter.request(request, requestOptions);
1924
+ return transporter.request(request, requestOptions);
1926
1925
  },
1927
1926
  /**
1928
1927
  * 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).
@@ -1966,7 +1965,7 @@ function createSearchClient({
1966
1965
  headers,
1967
1966
  data: synonymHit
1968
1967
  };
1969
- return this.transporter.request(request, requestOptions);
1968
+ return transporter.request(request, requestOptions);
1970
1969
  },
1971
1970
  /**
1972
1971
  * If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
@@ -2004,7 +2003,7 @@ function createSearchClient({
2004
2003
  headers,
2005
2004
  data: synonymHit
2006
2005
  };
2007
- return this.transporter.request(request, requestOptions);
2006
+ return transporter.request(request, requestOptions);
2008
2007
  },
2009
2008
  /**
2010
2009
  * 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.
@@ -2055,7 +2054,7 @@ function createSearchClient({
2055
2054
  useReadTransporter: true,
2056
2055
  cacheable: true
2057
2056
  };
2058
- return this.transporter.request(request, requestOptions);
2057
+ return transporter.request(request, requestOptions);
2059
2058
  },
2060
2059
  /**
2061
2060
  * Searches for standard and custom dictionary entries.
@@ -2097,7 +2096,7 @@ function createSearchClient({
2097
2096
  useReadTransporter: true,
2098
2097
  cacheable: true
2099
2098
  };
2100
- return this.transporter.request(request, requestOptions);
2099
+ return transporter.request(request, requestOptions);
2101
2100
  },
2102
2101
  /**
2103
2102
  * 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**.
@@ -2130,7 +2129,7 @@ function createSearchClient({
2130
2129
  useReadTransporter: true,
2131
2130
  cacheable: true
2132
2131
  };
2133
- return this.transporter.request(request, requestOptions);
2132
+ return transporter.request(request, requestOptions);
2134
2133
  },
2135
2134
  /**
2136
2135
  * Searches for rules in your index.
@@ -2159,7 +2158,7 @@ function createSearchClient({
2159
2158
  useReadTransporter: true,
2160
2159
  cacheable: true
2161
2160
  };
2162
- return this.transporter.request(request, requestOptions);
2161
+ return transporter.request(request, requestOptions);
2163
2162
  },
2164
2163
  /**
2165
2164
  * 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.
@@ -2188,7 +2187,7 @@ function createSearchClient({
2188
2187
  useReadTransporter: true,
2189
2188
  cacheable: true
2190
2189
  };
2191
- return this.transporter.request(request, requestOptions);
2190
+ return transporter.request(request, requestOptions);
2192
2191
  },
2193
2192
  /**
2194
2193
  * Searches for synonyms in your index.
@@ -2220,7 +2219,7 @@ function createSearchClient({
2220
2219
  useReadTransporter: true,
2221
2220
  cacheable: true
2222
2221
  };
2223
- return this.transporter.request(request, requestOptions);
2222
+ return transporter.request(request, requestOptions);
2224
2223
  },
2225
2224
  /**
2226
2225
  * 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).
@@ -2250,7 +2249,7 @@ function createSearchClient({
2250
2249
  useReadTransporter: true,
2251
2250
  cacheable: true
2252
2251
  };
2253
- return this.transporter.request(request, requestOptions);
2252
+ return transporter.request(request, requestOptions);
2254
2253
  },
2255
2254
  /**
2256
2255
  * Turns standard stop word dictionary entries on or off for a given language.
@@ -2280,7 +2279,7 @@ function createSearchClient({
2280
2279
  headers,
2281
2280
  data: dictionarySettingsParams
2282
2281
  };
2283
- return this.transporter.request(request, requestOptions);
2282
+ return transporter.request(request, requestOptions);
2284
2283
  },
2285
2284
  /**
2286
2285
  * 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.
@@ -2314,7 +2313,7 @@ function createSearchClient({
2314
2313
  headers,
2315
2314
  data: indexSettings
2316
2315
  };
2317
- return this.transporter.request(request, requestOptions);
2316
+ return transporter.request(request, requestOptions);
2318
2317
  },
2319
2318
  /**
2320
2319
  * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
@@ -2347,7 +2346,7 @@ function createSearchClient({
2347
2346
  headers,
2348
2347
  data: apiKey
2349
2348
  };
2350
- return this.transporter.request(request, requestOptions);
2349
+ return transporter.request(request, requestOptions);
2351
2350
  }
2352
2351
  };
2353
2352
  }