@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.
@@ -7,7 +7,7 @@ import {
7
7
  ApiError,
8
8
  createIterablePromise
9
9
  } from "@algolia/client-common";
10
- var apiClientVersion = "5.3.1";
10
+ var apiClientVersion = "5.3.2";
11
11
  function getDefaultHosts(appId) {
12
12
  return [
13
13
  {
@@ -48,25 +48,26 @@ function createSearchClient({
48
48
  ...options
49
49
  }) {
50
50
  const auth = createAuth(appIdOption, apiKeyOption, authMode);
51
- return {
52
- transporter: createTransporter({
53
- hosts: getDefaultHosts(appIdOption),
54
- ...options,
55
- algoliaAgent: getAlgoliaAgent({
56
- algoliaAgents,
57
- client: "Search",
58
- version: apiClientVersion
59
- }),
60
- baseHeaders: {
61
- "content-type": "text/plain",
62
- ...auth.headers(),
63
- ...options.baseHeaders
64
- },
65
- baseQueryParameters: {
66
- ...auth.queryParameters(),
67
- ...options.baseQueryParameters
68
- }
51
+ const transporter = createTransporter({
52
+ hosts: getDefaultHosts(appIdOption),
53
+ ...options,
54
+ algoliaAgent: getAlgoliaAgent({
55
+ algoliaAgents,
56
+ client: "Search",
57
+ version: apiClientVersion
69
58
  }),
59
+ baseHeaders: {
60
+ "content-type": "text/plain",
61
+ ...auth.headers(),
62
+ ...options.baseHeaders
63
+ },
64
+ baseQueryParameters: {
65
+ ...auth.queryParameters(),
66
+ ...options.baseQueryParameters
67
+ }
68
+ });
69
+ return {
70
+ transporter,
70
71
  /**
71
72
  * The `appId` currently in use.
72
73
  */
@@ -75,15 +76,13 @@ function createSearchClient({
75
76
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
76
77
  */
77
78
  clearCache() {
78
- return Promise.all([this.transporter.requestsCache.clear(), this.transporter.responsesCache.clear()]).then(
79
- () => void 0
80
- );
79
+ return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
81
80
  },
82
81
  /**
83
82
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
84
83
  */
85
84
  get _ua() {
86
- return this.transporter.algoliaAgent.value;
85
+ return transporter.algoliaAgent.value;
87
86
  },
88
87
  /**
89
88
  * Adds a `segment` to the `x-algolia-agent` sent with every requests.
@@ -92,7 +91,7 @@ function createSearchClient({
92
91
  * @param version - The version of the agent.
93
92
  */
94
93
  addAlgoliaAgent(segment, version) {
95
- this.transporter.algoliaAgent.add({ segment, version });
94
+ transporter.algoliaAgent.add({ segment, version });
96
95
  },
97
96
  /**
98
97
  * Helper method to switch the API key used to authenticate the requests.
@@ -102,9 +101,9 @@ function createSearchClient({
102
101
  */
103
102
  setClientApiKey({ apiKey }) {
104
103
  if (!authMode || authMode === "WithinHeaders") {
105
- this.transporter.baseHeaders["x-algolia-api-key"] = apiKey;
104
+ transporter.baseHeaders["x-algolia-api-key"] = apiKey;
106
105
  } else {
107
- this.transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
106
+ transporter.baseQueryParameters["x-algolia-api-key"] = apiKey;
108
107
  }
109
108
  },
110
109
  /**
@@ -528,7 +527,7 @@ function createSearchClient({
528
527
  headers,
529
528
  data: apiKey
530
529
  };
531
- return this.transporter.request(request, requestOptions);
530
+ return transporter.request(request, requestOptions);
532
531
  },
533
532
  /**
534
533
  * 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).
@@ -562,7 +561,7 @@ function createSearchClient({
562
561
  headers,
563
562
  data: body
564
563
  };
565
- return this.transporter.request(request, requestOptions);
564
+ return transporter.request(request, requestOptions);
566
565
  },
567
566
  /**
568
567
  * Adds a source to the list of allowed sources.
@@ -590,7 +589,7 @@ function createSearchClient({
590
589
  headers,
591
590
  data: source
592
591
  };
593
- return this.transporter.request(request, requestOptions);
592
+ return transporter.request(request, requestOptions);
594
593
  },
595
594
  /**
596
595
  * 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.
@@ -626,7 +625,7 @@ function createSearchClient({
626
625
  headers,
627
626
  data: assignUserIdParams
628
627
  };
629
- return this.transporter.request(request, requestOptions);
628
+ return transporter.request(request, requestOptions);
630
629
  },
631
630
  /**
632
631
  * 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.
@@ -656,7 +655,7 @@ function createSearchClient({
656
655
  headers,
657
656
  data: batchWriteParams
658
657
  };
659
- return this.transporter.request(request, requestOptions);
658
+ return transporter.request(request, requestOptions);
660
659
  },
661
660
  /**
662
661
  * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
@@ -695,7 +694,7 @@ function createSearchClient({
695
694
  headers,
696
695
  data: batchAssignUserIdsParams
697
696
  };
698
- return this.transporter.request(request, requestOptions);
697
+ return transporter.request(request, requestOptions);
699
698
  },
700
699
  /**
701
700
  * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
@@ -733,7 +732,7 @@ function createSearchClient({
733
732
  headers,
734
733
  data: batchDictionaryEntriesParams
735
734
  };
736
- return this.transporter.request(request, requestOptions);
735
+ return transporter.request(request, requestOptions);
737
736
  },
738
737
  /**
739
738
  * 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.
@@ -760,7 +759,7 @@ function createSearchClient({
760
759
  headers,
761
760
  data: browseParams ? browseParams : {}
762
761
  };
763
- return this.transporter.request(request, requestOptions);
762
+ return transporter.request(request, requestOptions);
764
763
  },
765
764
  /**
766
765
  * Deletes only the records from an index while keeping settings, synonyms, and rules.
@@ -785,7 +784,7 @@ function createSearchClient({
785
784
  queryParameters,
786
785
  headers
787
786
  };
788
- return this.transporter.request(request, requestOptions);
787
+ return transporter.request(request, requestOptions);
789
788
  },
790
789
  /**
791
790
  * Deletes all rules from the index.
@@ -814,7 +813,7 @@ function createSearchClient({
814
813
  queryParameters,
815
814
  headers
816
815
  };
817
- return this.transporter.request(request, requestOptions);
816
+ return transporter.request(request, requestOptions);
818
817
  },
819
818
  /**
820
819
  * Deletes all synonyms from the index.
@@ -843,7 +842,7 @@ function createSearchClient({
843
842
  queryParameters,
844
843
  headers
845
844
  };
846
- return this.transporter.request(request, requestOptions);
845
+ return transporter.request(request, requestOptions);
847
846
  },
848
847
  /**
849
848
  * This method allow you to send requests to the Algolia REST API.
@@ -866,7 +865,7 @@ function createSearchClient({
866
865
  queryParameters,
867
866
  headers
868
867
  };
869
- return this.transporter.request(request, requestOptions);
868
+ return transporter.request(request, requestOptions);
870
869
  },
871
870
  /**
872
871
  * This method allow you to send requests to the Algolia REST API.
@@ -889,7 +888,7 @@ function createSearchClient({
889
888
  queryParameters,
890
889
  headers
891
890
  };
892
- return this.transporter.request(request, requestOptions);
891
+ return transporter.request(request, requestOptions);
893
892
  },
894
893
  /**
895
894
  * This method allow you to send requests to the Algolia REST API.
@@ -914,7 +913,7 @@ function createSearchClient({
914
913
  headers,
915
914
  data: body ? body : {}
916
915
  };
917
- return this.transporter.request(request, requestOptions);
916
+ return transporter.request(request, requestOptions);
918
917
  },
919
918
  /**
920
919
  * This method allow you to send requests to the Algolia REST API.
@@ -939,7 +938,7 @@ function createSearchClient({
939
938
  headers,
940
939
  data: body ? body : {}
941
940
  };
942
- return this.transporter.request(request, requestOptions);
941
+ return transporter.request(request, requestOptions);
943
942
  },
944
943
  /**
945
944
  * Deletes the API key.
@@ -964,7 +963,7 @@ function createSearchClient({
964
963
  queryParameters,
965
964
  headers
966
965
  };
967
- return this.transporter.request(request, requestOptions);
966
+ return transporter.request(request, requestOptions);
968
967
  },
969
968
  /**
970
969
  * 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).
@@ -994,7 +993,7 @@ function createSearchClient({
994
993
  headers,
995
994
  data: deleteByParams
996
995
  };
997
- return this.transporter.request(request, requestOptions);
996
+ return transporter.request(request, requestOptions);
998
997
  },
999
998
  /**
1000
999
  * 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/).
@@ -1019,7 +1018,7 @@ function createSearchClient({
1019
1018
  queryParameters,
1020
1019
  headers
1021
1020
  };
1022
- return this.transporter.request(request, requestOptions);
1021
+ return transporter.request(request, requestOptions);
1023
1022
  },
1024
1023
  /**
1025
1024
  * 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).
@@ -1048,7 +1047,7 @@ function createSearchClient({
1048
1047
  queryParameters,
1049
1048
  headers
1050
1049
  };
1051
- return this.transporter.request(request, requestOptions);
1050
+ return transporter.request(request, requestOptions);
1052
1051
  },
1053
1052
  /**
1054
1053
  * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
@@ -1081,7 +1080,7 @@ function createSearchClient({
1081
1080
  queryParameters,
1082
1081
  headers
1083
1082
  };
1084
- return this.transporter.request(request, requestOptions);
1083
+ return transporter.request(request, requestOptions);
1085
1084
  },
1086
1085
  /**
1087
1086
  * Deletes a source from the list of allowed sources.
@@ -1106,7 +1105,7 @@ function createSearchClient({
1106
1105
  queryParameters,
1107
1106
  headers
1108
1107
  };
1109
- return this.transporter.request(request, requestOptions);
1108
+ return transporter.request(request, requestOptions);
1110
1109
  },
1111
1110
  /**
1112
1111
  * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1139,7 +1138,7 @@ function createSearchClient({
1139
1138
  queryParameters,
1140
1139
  headers
1141
1140
  };
1142
- return this.transporter.request(request, requestOptions);
1141
+ return transporter.request(request, requestOptions);
1143
1142
  },
1144
1143
  /**
1145
1144
  * 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.
@@ -1161,7 +1160,7 @@ function createSearchClient({
1161
1160
  queryParameters,
1162
1161
  headers
1163
1162
  };
1164
- return this.transporter.request(request, requestOptions);
1163
+ return transporter.request(request, requestOptions);
1165
1164
  },
1166
1165
  /**
1167
1166
  * Checks the status of a given application task.
@@ -1186,7 +1185,7 @@ function createSearchClient({
1186
1185
  queryParameters,
1187
1186
  headers
1188
1187
  };
1189
- return this.transporter.request(request, requestOptions);
1188
+ return transporter.request(request, requestOptions);
1190
1189
  },
1191
1190
  /**
1192
1191
  * Lists supported languages with their supported dictionary types and number of custom entries.
@@ -1206,7 +1205,7 @@ function createSearchClient({
1206
1205
  queryParameters,
1207
1206
  headers
1208
1207
  };
1209
- return this.transporter.request(request, requestOptions);
1208
+ return transporter.request(request, requestOptions);
1210
1209
  },
1211
1210
  /**
1212
1211
  * Retrieves the languages for which standard dictionary entries are turned off.
@@ -1226,7 +1225,7 @@ function createSearchClient({
1226
1225
  queryParameters,
1227
1226
  headers
1228
1227
  };
1229
- return this.transporter.request(request, requestOptions);
1228
+ return transporter.request(request, requestOptions);
1230
1229
  },
1231
1230
  /**
1232
1231
  * 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.
@@ -1263,7 +1262,7 @@ function createSearchClient({
1263
1262
  queryParameters,
1264
1263
  headers
1265
1264
  };
1266
- return this.transporter.request(request, requestOptions);
1265
+ return transporter.request(request, requestOptions);
1267
1266
  },
1268
1267
  /**
1269
1268
  * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
@@ -1296,7 +1295,7 @@ function createSearchClient({
1296
1295
  queryParameters,
1297
1296
  headers
1298
1297
  };
1299
- return this.transporter.request(request, requestOptions);
1298
+ return transporter.request(request, requestOptions);
1300
1299
  },
1301
1300
  /**
1302
1301
  * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
@@ -1326,7 +1325,7 @@ function createSearchClient({
1326
1325
  useReadTransporter: true,
1327
1326
  cacheable: true
1328
1327
  };
1329
- return this.transporter.request(request, requestOptions);
1328
+ return transporter.request(request, requestOptions);
1330
1329
  },
1331
1330
  /**
1332
1331
  * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
@@ -1355,7 +1354,7 @@ function createSearchClient({
1355
1354
  queryParameters,
1356
1355
  headers
1357
1356
  };
1358
- return this.transporter.request(request, requestOptions);
1357
+ return transporter.request(request, requestOptions);
1359
1358
  },
1360
1359
  /**
1361
1360
  * Retrieves an object with non-null index settings.
@@ -1380,7 +1379,7 @@ function createSearchClient({
1380
1379
  queryParameters,
1381
1380
  headers
1382
1381
  };
1383
- return this.transporter.request(request, requestOptions);
1382
+ return transporter.request(request, requestOptions);
1384
1383
  },
1385
1384
  /**
1386
1385
  * Retrieves all allowed IP addresses with access to your application.
@@ -1400,7 +1399,7 @@ function createSearchClient({
1400
1399
  queryParameters,
1401
1400
  headers
1402
1401
  };
1403
- return this.transporter.request(request, requestOptions);
1402
+ return transporter.request(request, requestOptions);
1404
1403
  },
1405
1404
  /**
1406
1405
  * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
@@ -1429,7 +1428,7 @@ function createSearchClient({
1429
1428
  queryParameters,
1430
1429
  headers
1431
1430
  };
1432
- return this.transporter.request(request, requestOptions);
1431
+ return transporter.request(request, requestOptions);
1433
1432
  },
1434
1433
  /**
1435
1434
  * 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.
@@ -1458,7 +1457,7 @@ function createSearchClient({
1458
1457
  queryParameters,
1459
1458
  headers
1460
1459
  };
1461
- return this.transporter.request(request, requestOptions);
1460
+ return transporter.request(request, requestOptions);
1462
1461
  },
1463
1462
  /**
1464
1463
  * 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.
@@ -1478,7 +1477,7 @@ function createSearchClient({
1478
1477
  queryParameters,
1479
1478
  headers
1480
1479
  };
1481
- return this.transporter.request(request, requestOptions);
1480
+ return transporter.request(request, requestOptions);
1482
1481
  },
1483
1482
  /**
1484
1483
  * 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.
@@ -1503,7 +1502,7 @@ function createSearchClient({
1503
1502
  queryParameters,
1504
1503
  headers
1505
1504
  };
1506
- return this.transporter.request(request, requestOptions);
1505
+ return transporter.request(request, requestOptions);
1507
1506
  },
1508
1507
  /**
1509
1508
  * 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.
@@ -1528,7 +1527,7 @@ function createSearchClient({
1528
1527
  queryParameters,
1529
1528
  headers
1530
1529
  };
1531
- return this.transporter.request(request, requestOptions);
1530
+ return transporter.request(request, requestOptions);
1532
1531
  },
1533
1532
  /**
1534
1533
  * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
@@ -1548,7 +1547,7 @@ function createSearchClient({
1548
1547
  queryParameters,
1549
1548
  headers
1550
1549
  };
1551
- return this.transporter.request(request, requestOptions);
1550
+ return transporter.request(request, requestOptions);
1552
1551
  },
1553
1552
  /**
1554
1553
  * Lists the available clusters in a multi-cluster setup.
@@ -1568,7 +1567,7 @@ function createSearchClient({
1568
1567
  queryParameters,
1569
1568
  headers
1570
1569
  };
1571
- return this.transporter.request(request, requestOptions);
1570
+ return transporter.request(request, requestOptions);
1572
1571
  },
1573
1572
  /**
1574
1573
  * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
@@ -1597,7 +1596,7 @@ function createSearchClient({
1597
1596
  queryParameters,
1598
1597
  headers
1599
1598
  };
1600
- return this.transporter.request(request, requestOptions);
1599
+ return transporter.request(request, requestOptions);
1601
1600
  },
1602
1601
  /**
1603
1602
  * 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.
@@ -1626,7 +1625,7 @@ function createSearchClient({
1626
1625
  queryParameters,
1627
1626
  headers
1628
1627
  };
1629
- return this.transporter.request(request, requestOptions);
1628
+ return transporter.request(request, requestOptions);
1630
1629
  },
1631
1630
  /**
1632
1631
  * 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.
@@ -1651,7 +1650,7 @@ function createSearchClient({
1651
1650
  headers,
1652
1651
  data: batchParams
1653
1652
  };
1654
- return this.transporter.request(request, requestOptions);
1653
+ return transporter.request(request, requestOptions);
1655
1654
  },
1656
1655
  /**
1657
1656
  * 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/).
@@ -1687,7 +1686,7 @@ function createSearchClient({
1687
1686
  headers,
1688
1687
  data: operationIndexParams
1689
1688
  };
1690
- return this.transporter.request(request, requestOptions);
1689
+ return transporter.request(request, requestOptions);
1691
1690
  },
1692
1691
  /**
1693
1692
  * 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.
@@ -1725,7 +1724,7 @@ function createSearchClient({
1725
1724
  headers,
1726
1725
  data: attributesToUpdate
1727
1726
  };
1728
- return this.transporter.request(request, requestOptions);
1727
+ return transporter.request(request, requestOptions);
1729
1728
  },
1730
1729
  /**
1731
1730
  * Deletes a user ID and its associated data from the clusters.
@@ -1750,7 +1749,7 @@ function createSearchClient({
1750
1749
  queryParameters,
1751
1750
  headers
1752
1751
  };
1753
- return this.transporter.request(request, requestOptions);
1752
+ return transporter.request(request, requestOptions);
1754
1753
  },
1755
1754
  /**
1756
1755
  * Replaces the list of allowed sources.
@@ -1776,7 +1775,7 @@ function createSearchClient({
1776
1775
  headers,
1777
1776
  data: source
1778
1777
  };
1779
- return this.transporter.request(request, requestOptions);
1778
+ return transporter.request(request, requestOptions);
1780
1779
  },
1781
1780
  /**
1782
1781
  * 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.
@@ -1801,7 +1800,7 @@ function createSearchClient({
1801
1800
  queryParameters,
1802
1801
  headers
1803
1802
  };
1804
- return this.transporter.request(request, requestOptions);
1803
+ return transporter.request(request, requestOptions);
1805
1804
  },
1806
1805
  /**
1807
1806
  * 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).
@@ -1831,7 +1830,7 @@ function createSearchClient({
1831
1830
  headers,
1832
1831
  data: body
1833
1832
  };
1834
- return this.transporter.request(request, requestOptions);
1833
+ return transporter.request(request, requestOptions);
1835
1834
  },
1836
1835
  /**
1837
1836
  * 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).
@@ -1872,7 +1871,7 @@ function createSearchClient({
1872
1871
  headers,
1873
1872
  data: rule
1874
1873
  };
1875
- return this.transporter.request(request, requestOptions);
1874
+ return transporter.request(request, requestOptions);
1876
1875
  },
1877
1876
  /**
1878
1877
  * 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.
@@ -1910,7 +1909,7 @@ function createSearchClient({
1910
1909
  headers,
1911
1910
  data: rules
1912
1911
  };
1913
- return this.transporter.request(request, requestOptions);
1912
+ return transporter.request(request, requestOptions);
1914
1913
  },
1915
1914
  /**
1916
1915
  * 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).
@@ -1954,7 +1953,7 @@ function createSearchClient({
1954
1953
  headers,
1955
1954
  data: synonymHit
1956
1955
  };
1957
- return this.transporter.request(request, requestOptions);
1956
+ return transporter.request(request, requestOptions);
1958
1957
  },
1959
1958
  /**
1960
1959
  * If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
@@ -1992,7 +1991,7 @@ function createSearchClient({
1992
1991
  headers,
1993
1992
  data: synonymHit
1994
1993
  };
1995
- return this.transporter.request(request, requestOptions);
1994
+ return transporter.request(request, requestOptions);
1996
1995
  },
1997
1996
  /**
1998
1997
  * 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.
@@ -2043,7 +2042,7 @@ function createSearchClient({
2043
2042
  useReadTransporter: true,
2044
2043
  cacheable: true
2045
2044
  };
2046
- return this.transporter.request(request, requestOptions);
2045
+ return transporter.request(request, requestOptions);
2047
2046
  },
2048
2047
  /**
2049
2048
  * Searches for standard and custom dictionary entries.
@@ -2085,7 +2084,7 @@ function createSearchClient({
2085
2084
  useReadTransporter: true,
2086
2085
  cacheable: true
2087
2086
  };
2088
- return this.transporter.request(request, requestOptions);
2087
+ return transporter.request(request, requestOptions);
2089
2088
  },
2090
2089
  /**
2091
2090
  * 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**.
@@ -2118,7 +2117,7 @@ function createSearchClient({
2118
2117
  useReadTransporter: true,
2119
2118
  cacheable: true
2120
2119
  };
2121
- return this.transporter.request(request, requestOptions);
2120
+ return transporter.request(request, requestOptions);
2122
2121
  },
2123
2122
  /**
2124
2123
  * Searches for rules in your index.
@@ -2147,7 +2146,7 @@ function createSearchClient({
2147
2146
  useReadTransporter: true,
2148
2147
  cacheable: true
2149
2148
  };
2150
- return this.transporter.request(request, requestOptions);
2149
+ return transporter.request(request, requestOptions);
2151
2150
  },
2152
2151
  /**
2153
2152
  * 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.
@@ -2176,7 +2175,7 @@ function createSearchClient({
2176
2175
  useReadTransporter: true,
2177
2176
  cacheable: true
2178
2177
  };
2179
- return this.transporter.request(request, requestOptions);
2178
+ return transporter.request(request, requestOptions);
2180
2179
  },
2181
2180
  /**
2182
2181
  * Searches for synonyms in your index.
@@ -2208,7 +2207,7 @@ function createSearchClient({
2208
2207
  useReadTransporter: true,
2209
2208
  cacheable: true
2210
2209
  };
2211
- return this.transporter.request(request, requestOptions);
2210
+ return transporter.request(request, requestOptions);
2212
2211
  },
2213
2212
  /**
2214
2213
  * 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).
@@ -2238,7 +2237,7 @@ function createSearchClient({
2238
2237
  useReadTransporter: true,
2239
2238
  cacheable: true
2240
2239
  };
2241
- return this.transporter.request(request, requestOptions);
2240
+ return transporter.request(request, requestOptions);
2242
2241
  },
2243
2242
  /**
2244
2243
  * Turns standard stop word dictionary entries on or off for a given language.
@@ -2268,7 +2267,7 @@ function createSearchClient({
2268
2267
  headers,
2269
2268
  data: dictionarySettingsParams
2270
2269
  };
2271
- return this.transporter.request(request, requestOptions);
2270
+ return transporter.request(request, requestOptions);
2272
2271
  },
2273
2272
  /**
2274
2273
  * 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.
@@ -2302,7 +2301,7 @@ function createSearchClient({
2302
2301
  headers,
2303
2302
  data: indexSettings
2304
2303
  };
2305
- return this.transporter.request(request, requestOptions);
2304
+ return transporter.request(request, requestOptions);
2306
2305
  },
2307
2306
  /**
2308
2307
  * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
@@ -2335,7 +2334,7 @@ function createSearchClient({
2335
2334
  headers,
2336
2335
  data: apiKey
2337
2336
  };
2338
- return this.transporter.request(request, requestOptions);
2337
+ return transporter.request(request, requestOptions);
2339
2338
  }
2340
2339
  };
2341
2340
  }