@ibm-cloud/cloudant 0.11.0 → 0.12.1

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/cloudant/v1.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * (C) Copyright IBM Corp. 2024.
3
+ * (C) Copyright IBM Corp. 2025.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -113,52 +113,13 @@ class CloudantV1 extends cloudantBaseService_1.default {
113
113
  method: 'GET',
114
114
  },
115
115
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
116
- headers: (0, extend_1.default)(true, sdkHeaders, {
116
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
117
117
  'Accept': 'application/json',
118
118
  }, _params.headers),
119
119
  }),
120
120
  };
121
121
  return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ServerInformation.deserialize);
122
122
  }
123
- /**
124
- * Retrieve one or more UUIDs.
125
- *
126
- * Requests one or more Universally Unique Identifiers (UUIDs) from the instance. The response is a JSON object that
127
- * provides a list of UUIDs.
128
- *
129
- * **Tip:** The authentication for this endpoint is only enforced when using IAM.
130
- *
131
- * @param {Object} [params] - The parameters to send to the service.
132
- * @param {number} [params.count] - Query parameter to specify the number of UUIDs to return.
133
- * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
134
- * @returns {Promise<CloudantV1.Response<CloudantV1.UuidsResult>>}
135
- */
136
- getUuids(params) {
137
- const _params = { ...params };
138
- const _requiredParams = [];
139
- const _validParams = ['count', 'headers'];
140
- const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
141
- if (_validationErrors) {
142
- return Promise.reject(_validationErrors);
143
- }
144
- const query = {
145
- 'count': _params.count,
146
- };
147
- const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getUuids');
148
- const parameters = {
149
- options: {
150
- url: '/_uuids',
151
- method: 'GET',
152
- qs: query,
153
- },
154
- defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
155
- headers: (0, extend_1.default)(true, sdkHeaders, {
156
- 'Accept': 'application/json',
157
- }, _params.headers),
158
- }),
159
- };
160
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.UuidsResult.deserialize);
161
- }
162
123
  /**
163
124
  * Retrieve provisioned throughput capacity information.
164
125
  *
@@ -184,7 +145,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
184
145
  method: 'GET',
185
146
  },
186
147
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
187
- headers: (0, extend_1.default)(true, sdkHeaders, {
148
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
188
149
  'Accept': 'application/json',
189
150
  }, _params.headers),
190
151
  }),
@@ -222,7 +183,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
222
183
  body,
223
184
  },
224
185
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
225
- headers: (0, extend_1.default)(true, sdkHeaders, {
186
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
226
187
  'Accept': 'application/json',
227
188
  'Content-Type': 'application/json',
228
189
  }, _params.headers),
@@ -230,6 +191,45 @@ class CloudantV1 extends cloudantBaseService_1.default {
230
191
  };
231
192
  return this.createRequestAndDeserializeResponse(parameters, CloudantV1.CapacityThroughputInformation.deserialize);
232
193
  }
194
+ /**
195
+ * Retrieve one or more UUIDs.
196
+ *
197
+ * Requests one or more Universally Unique Identifiers (UUIDs) from the instance. The response is a JSON object that
198
+ * provides a list of UUIDs.
199
+ *
200
+ * **Tip:** The authentication for this endpoint is only enforced when using IAM.
201
+ *
202
+ * @param {Object} [params] - The parameters to send to the service.
203
+ * @param {number} [params.count] - Query parameter to specify the number of UUIDs to return.
204
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
205
+ * @returns {Promise<CloudantV1.Response<CloudantV1.UuidsResult>>}
206
+ */
207
+ getUuids(params) {
208
+ const _params = { ...params };
209
+ const _requiredParams = [];
210
+ const _validParams = ['count', 'headers'];
211
+ const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
212
+ if (_validationErrors) {
213
+ return Promise.reject(_validationErrors);
214
+ }
215
+ const query = {
216
+ 'count': _params.count,
217
+ };
218
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getUuids');
219
+ const parameters = {
220
+ options: {
221
+ url: '/_uuids',
222
+ method: 'GET',
223
+ qs: query,
224
+ },
225
+ defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
226
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
227
+ 'Accept': 'application/json',
228
+ }, _params.headers),
229
+ }),
230
+ };
231
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.UuidsResult.deserialize);
232
+ }
233
233
  /*************************
234
234
  * changes
235
235
  ************************/
@@ -295,7 +295,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
295
295
  qs: query,
296
296
  },
297
297
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
298
- headers: (0, extend_1.default)(true, sdkHeaders, {
298
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
299
299
  'Accept': 'application/json',
300
300
  }, _params.headers),
301
301
  }),
@@ -463,7 +463,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
463
463
  path,
464
464
  },
465
465
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
466
- headers: (0, extend_1.default)(true, sdkHeaders, {
466
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
467
467
  'Accept': 'application/json',
468
468
  'Content-Type': 'application/json',
469
469
  'Last-Event-ID': _params.lastEventId,
@@ -634,7 +634,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
634
634
  responseType: 'stream',
635
635
  },
636
636
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
637
- headers: (0, extend_1.default)(true, sdkHeaders, {
637
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
638
638
  'Accept': 'application/json',
639
639
  'Content-Type': 'application/json',
640
640
  'Last-Event-ID': _params.lastEventId,
@@ -676,7 +676,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
676
676
  path,
677
677
  },
678
678
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
679
- headers: (0, extend_1.default)(true, sdkHeaders, {}, _params.headers),
679
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {}, _params.headers),
680
680
  }),
681
681
  };
682
682
  return this.createRequest(parameters);
@@ -723,7 +723,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
723
723
  qs: query,
724
724
  },
725
725
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
726
- headers: (0, extend_1.default)(true, sdkHeaders, {
726
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
727
727
  'Accept': 'application/json',
728
728
  }, _params.headers),
729
729
  }),
@@ -761,7 +761,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
761
761
  body,
762
762
  },
763
763
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
764
- headers: (0, extend_1.default)(true, sdkHeaders, {
764
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
765
765
  'Accept': 'application/json',
766
766
  'Content-Type': 'application/json',
767
767
  }, _params.headers),
@@ -800,7 +800,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
800
800
  path,
801
801
  },
802
802
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
803
- headers: (0, extend_1.default)(true, sdkHeaders, {
803
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
804
804
  'Accept': 'application/json',
805
805
  }, _params.headers),
806
806
  }),
@@ -836,7 +836,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
836
836
  path,
837
837
  },
838
838
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
839
- headers: (0, extend_1.default)(true, sdkHeaders, {
839
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
840
840
  'Accept': 'application/json',
841
841
  }, _params.headers),
842
842
  }),
@@ -887,7 +887,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
887
887
  path,
888
888
  },
889
889
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
890
- headers: (0, extend_1.default)(true, sdkHeaders, {
890
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
891
891
  'Accept': 'application/json',
892
892
  }, _params.headers),
893
893
  }),
@@ -940,7 +940,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
940
940
  path,
941
941
  },
942
942
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
943
- headers: (0, extend_1.default)(true, sdkHeaders, {
943
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
944
944
  'If-None-Match': _params.ifNoneMatch,
945
945
  }, _params.headers),
946
946
  }),
@@ -994,7 +994,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
994
994
  path,
995
995
  },
996
996
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
997
- headers: (0, extend_1.default)(true, sdkHeaders, {
997
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
998
998
  'Accept': 'application/json',
999
999
  'Content-Type': _params.contentType,
1000
1000
  }, _params.headers),
@@ -1069,7 +1069,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1069
1069
  path,
1070
1070
  },
1071
1071
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1072
- headers: (0, extend_1.default)(true, sdkHeaders, {
1072
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1073
1073
  'Accept': 'application/json',
1074
1074
  'Content-Type': 'application/json',
1075
1075
  }, _params.headers),
@@ -1145,7 +1145,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1145
1145
  responseType: 'stream',
1146
1146
  },
1147
1147
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1148
- headers: (0, extend_1.default)(true, sdkHeaders, {
1148
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1149
1149
  'Accept': 'application/json',
1150
1150
  'Content-Type': 'application/json',
1151
1151
  }, _params.headers),
@@ -1191,7 +1191,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1191
1191
  path,
1192
1192
  },
1193
1193
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1194
- headers: (0, extend_1.default)(true, sdkHeaders, {
1194
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1195
1195
  'Accept': 'application/json',
1196
1196
  'Content-Type': 'application/json',
1197
1197
  }, _params.headers),
@@ -1238,7 +1238,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1238
1238
  responseType: 'stream',
1239
1239
  },
1240
1240
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1241
- headers: (0, extend_1.default)(true, sdkHeaders, {
1241
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1242
1242
  'Accept': 'application/json',
1243
1243
  'Content-Type': 'application/json',
1244
1244
  }, _params.headers),
@@ -1280,7 +1280,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1280
1280
  path,
1281
1281
  },
1282
1282
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1283
- headers: (0, extend_1.default)(true, sdkHeaders, {
1283
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1284
1284
  'Accept': 'application/json',
1285
1285
  'Content-Type': 'application/json',
1286
1286
  }, _params.headers),
@@ -1337,7 +1337,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1337
1337
  path,
1338
1338
  },
1339
1339
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1340
- headers: (0, extend_1.default)(true, sdkHeaders, {
1340
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1341
1341
  'Accept': 'application/json',
1342
1342
  'Content-Type': 'application/json',
1343
1343
  }, _params.headers),
@@ -1395,7 +1395,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1395
1395
  responseType: 'stream',
1396
1396
  },
1397
1397
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1398
- headers: (0, extend_1.default)(true, sdkHeaders, {
1398
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1399
1399
  'Accept': 'multipart/mixed',
1400
1400
  'Content-Type': 'application/json',
1401
1401
  }, _params.headers),
@@ -1453,7 +1453,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1453
1453
  responseType: 'stream',
1454
1454
  },
1455
1455
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1456
- headers: (0, extend_1.default)(true, sdkHeaders, {
1456
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1457
1457
  'Accept': 'multipart/related',
1458
1458
  'Content-Type': 'application/json',
1459
1459
  }, _params.headers),
@@ -1511,7 +1511,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1511
1511
  responseType: 'stream',
1512
1512
  },
1513
1513
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1514
- headers: (0, extend_1.default)(true, sdkHeaders, {
1514
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1515
1515
  'Accept': 'application/json',
1516
1516
  'Content-Type': 'application/json',
1517
1517
  }, _params.headers),
@@ -1561,7 +1561,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1561
1561
  path,
1562
1562
  },
1563
1563
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1564
- headers: (0, extend_1.default)(true, sdkHeaders, {
1564
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1565
1565
  'Accept': 'application/json',
1566
1566
  'If-Match': _params.ifMatch,
1567
1567
  }, _params.headers),
@@ -1634,7 +1634,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1634
1634
  path,
1635
1635
  },
1636
1636
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1637
- headers: (0, extend_1.default)(true, sdkHeaders, {
1637
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1638
1638
  'Accept': 'application/json',
1639
1639
  'If-None-Match': _params.ifNoneMatch,
1640
1640
  }, _params.headers),
@@ -1708,7 +1708,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1708
1708
  responseType: 'stream',
1709
1709
  },
1710
1710
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1711
- headers: (0, extend_1.default)(true, sdkHeaders, {
1711
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1712
1712
  'Accept': 'multipart/mixed',
1713
1713
  'If-None-Match': _params.ifNoneMatch,
1714
1714
  }, _params.headers),
@@ -1782,7 +1782,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1782
1782
  responseType: 'stream',
1783
1783
  },
1784
1784
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1785
- headers: (0, extend_1.default)(true, sdkHeaders, {
1785
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1786
1786
  'Accept': 'multipart/related',
1787
1787
  'If-None-Match': _params.ifNoneMatch,
1788
1788
  }, _params.headers),
@@ -1856,7 +1856,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1856
1856
  responseType: 'stream',
1857
1857
  },
1858
1858
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1859
- headers: (0, extend_1.default)(true, sdkHeaders, {
1859
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1860
1860
  'Accept': 'application/json',
1861
1861
  'If-None-Match': _params.ifNoneMatch,
1862
1862
  }, _params.headers),
@@ -1919,7 +1919,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1919
1919
  path,
1920
1920
  },
1921
1921
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1922
- headers: (0, extend_1.default)(true, sdkHeaders, {
1922
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1923
1923
  'Accept': 'application/json',
1924
1924
  'Content-Type': _params.contentType,
1925
1925
  'If-Match': _params.ifMatch,
@@ -1968,7 +1968,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
1968
1968
  path,
1969
1969
  },
1970
1970
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
1971
- headers: (0, extend_1.default)(true, sdkHeaders, {
1971
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
1972
1972
  'If-None-Match': _params.ifNoneMatch,
1973
1973
  }, _params.headers),
1974
1974
  }),
@@ -2018,7 +2018,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2018
2018
  path,
2019
2019
  },
2020
2020
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2021
- headers: (0, extend_1.default)(true, sdkHeaders, {
2021
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2022
2022
  'Accept': 'application/json',
2023
2023
  'If-Match': _params.ifMatch,
2024
2024
  }, _params.headers),
@@ -2092,7 +2092,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2092
2092
  path,
2093
2093
  },
2094
2094
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2095
- headers: (0, extend_1.default)(true, sdkHeaders, {
2095
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2096
2096
  'Accept': 'application/json',
2097
2097
  'If-None-Match': _params.ifNoneMatch,
2098
2098
  }, _params.headers),
@@ -2151,7 +2151,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2151
2151
  path,
2152
2152
  },
2153
2153
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2154
- headers: (0, extend_1.default)(true, sdkHeaders, {
2154
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2155
2155
  'Accept': 'application/json',
2156
2156
  'Content-Type': 'application/json',
2157
2157
  'If-Match': _params.ifMatch,
@@ -2193,7 +2193,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2193
2193
  path,
2194
2194
  },
2195
2195
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2196
- headers: (0, extend_1.default)(true, sdkHeaders, {
2196
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2197
2197
  'Accept': 'application/json',
2198
2198
  }, _params.headers),
2199
2199
  }),
@@ -2267,7 +2267,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2267
2267
  path,
2268
2268
  },
2269
2269
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2270
- headers: (0, extend_1.default)(true, sdkHeaders, {
2270
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2271
2271
  'Accept': 'application/json',
2272
2272
  'Content-Type': 'application/json',
2273
2273
  }, _params.headers),
@@ -2313,7 +2313,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2313
2313
  path,
2314
2314
  },
2315
2315
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2316
- headers: (0, extend_1.default)(true, sdkHeaders, {
2316
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2317
2317
  'Content-Type': 'application/json',
2318
2318
  'Accept': _params.accept,
2319
2319
  }, _params.headers),
@@ -2432,7 +2432,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2432
2432
  path,
2433
2433
  },
2434
2434
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2435
- headers: (0, extend_1.default)(true, sdkHeaders, {
2435
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2436
2436
  'Accept': 'application/json',
2437
2437
  'Content-Type': 'application/json',
2438
2438
  }, _params.headers),
@@ -2549,7 +2549,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2549
2549
  responseType: 'stream',
2550
2550
  },
2551
2551
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2552
- headers: (0, extend_1.default)(true, sdkHeaders, {
2552
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2553
2553
  'Accept': 'application/json',
2554
2554
  'Content-Type': 'application/json',
2555
2555
  }, _params.headers),
@@ -2598,7 +2598,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2598
2598
  path,
2599
2599
  },
2600
2600
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2601
- headers: (0, extend_1.default)(true, sdkHeaders, {
2601
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2602
2602
  'Accept': 'application/json',
2603
2603
  'Content-Type': 'application/json',
2604
2604
  }, _params.headers),
@@ -2648,7 +2648,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2648
2648
  responseType: 'stream',
2649
2649
  },
2650
2650
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2651
- headers: (0, extend_1.default)(true, sdkHeaders, {
2651
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2652
2652
  'Accept': 'application/json',
2653
2653
  'Content-Type': 'application/json',
2654
2654
  }, _params.headers),
@@ -2690,7 +2690,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2690
2690
  path,
2691
2691
  },
2692
2692
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2693
- headers: (0, extend_1.default)(true, sdkHeaders, {
2693
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2694
2694
  'Accept': 'application/json',
2695
2695
  }, _params.headers),
2696
2696
  }),
@@ -2766,7 +2766,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2766
2766
  path,
2767
2767
  },
2768
2768
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2769
- headers: (0, extend_1.default)(true, sdkHeaders, {
2769
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2770
2770
  'Accept': 'application/json',
2771
2771
  'Content-Type': 'application/json',
2772
2772
  }, _params.headers),
@@ -2844,7 +2844,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2844
2844
  responseType: 'stream',
2845
2845
  },
2846
2846
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2847
- headers: (0, extend_1.default)(true, sdkHeaders, {
2847
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2848
2848
  'Accept': 'application/json',
2849
2849
  'Content-Type': 'application/json',
2850
2850
  }, _params.headers),
@@ -2932,7 +2932,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
2932
2932
  path,
2933
2933
  },
2934
2934
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
2935
- headers: (0, extend_1.default)(true, sdkHeaders, {
2935
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
2936
2936
  'Accept': 'application/json',
2937
2937
  'Content-Type': 'application/json',
2938
2938
  }, _params.headers),
@@ -3021,7 +3021,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3021
3021
  responseType: 'stream',
3022
3022
  },
3023
3023
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
3024
- headers: (0, extend_1.default)(true, sdkHeaders, {
3024
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
3025
3025
  'Accept': 'application/json',
3026
3026
  'Content-Type': 'application/json',
3027
3027
  }, _params.headers),
@@ -3135,7 +3135,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3135
3135
  path,
3136
3136
  },
3137
3137
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
3138
- headers: (0, extend_1.default)(true, sdkHeaders, {
3138
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
3139
3139
  'Accept': 'application/json',
3140
3140
  'Content-Type': 'application/json',
3141
3141
  }, _params.headers),
@@ -3250,7 +3250,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3250
3250
  responseType: 'stream',
3251
3251
  },
3252
3252
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
3253
- headers: (0, extend_1.default)(true, sdkHeaders, {
3253
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
3254
3254
  'Accept': 'application/json',
3255
3255
  'Content-Type': 'application/json',
3256
3256
  }, _params.headers),
@@ -3373,7 +3373,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3373
3373
  path,
3374
3374
  },
3375
3375
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
3376
- headers: (0, extend_1.default)(true, sdkHeaders, {
3376
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
3377
3377
  'Accept': 'application/json',
3378
3378
  'Content-Type': 'application/json',
3379
3379
  }, _params.headers),
@@ -3508,7 +3508,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3508
3508
  path,
3509
3509
  },
3510
3510
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
3511
- headers: (0, extend_1.default)(true, sdkHeaders, {
3511
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
3512
3512
  'Accept': 'application/json',
3513
3513
  'Content-Type': 'application/json',
3514
3514
  }, _params.headers),
@@ -3644,7 +3644,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3644
3644
  responseType: 'stream',
3645
3645
  },
3646
3646
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
3647
- headers: (0, extend_1.default)(true, sdkHeaders, {
3647
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
3648
3648
  'Accept': 'application/json',
3649
3649
  'Content-Type': 'application/json',
3650
3650
  }, _params.headers),
@@ -3772,7 +3772,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3772
3772
  path,
3773
3773
  },
3774
3774
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
3775
- headers: (0, extend_1.default)(true, sdkHeaders, {
3775
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
3776
3776
  'Accept': 'application/json',
3777
3777
  'Content-Type': 'application/json',
3778
3778
  }, _params.headers),
@@ -3906,7 +3906,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3906
3906
  path,
3907
3907
  },
3908
3908
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
3909
- headers: (0, extend_1.default)(true, sdkHeaders, {
3909
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
3910
3910
  'Accept': 'application/json',
3911
3911
  'Content-Type': 'application/json',
3912
3912
  }, _params.headers),
@@ -4041,7 +4041,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4041
4041
  responseType: 'stream',
4042
4042
  },
4043
4043
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4044
- headers: (0, extend_1.default)(true, sdkHeaders, {
4044
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4045
4045
  'Accept': 'application/json',
4046
4046
  'Content-Type': 'application/json',
4047
4047
  }, _params.headers),
@@ -4080,7 +4080,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4080
4080
  path,
4081
4081
  },
4082
4082
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4083
- headers: (0, extend_1.default)(true, sdkHeaders, {
4083
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4084
4084
  'Accept': 'application/json',
4085
4085
  }, _params.headers),
4086
4086
  }),
@@ -4134,7 +4134,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4134
4134
  path,
4135
4135
  },
4136
4136
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4137
- headers: (0, extend_1.default)(true, sdkHeaders, {
4137
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4138
4138
  'Accept': 'application/json',
4139
4139
  'Content-Type': 'application/json',
4140
4140
  }, _params.headers),
@@ -4178,7 +4178,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4178
4178
  path,
4179
4179
  },
4180
4180
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4181
- headers: (0, extend_1.default)(true, sdkHeaders, {
4181
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4182
4182
  'Accept': 'application/json',
4183
4183
  }, _params.headers),
4184
4184
  }),
@@ -4220,7 +4220,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4220
4220
  body,
4221
4221
  },
4222
4222
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4223
- headers: (0, extend_1.default)(true, sdkHeaders, {
4223
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4224
4224
  'Accept': 'application/json',
4225
4225
  'Content-Type': 'application/json',
4226
4226
  }, _params.headers),
@@ -4281,10 +4281,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
4281
4281
  * @param {string[]} [params.groupSort] - This field defines the order of the groups in a search that uses
4282
4282
  * group_field. The default sort order is relevance. This field can have the same values as the sort field, so single
4283
4283
  * fields and arrays of fields are supported. This option is only available when making global queries.
4284
- * @param {JsonObject} [params.ranges] - This field defines ranges for faceted, numeric search fields. The value is a
4285
- * JSON object where the fields names are faceted numeric search fields, and the values of the fields are JSON
4286
- * objects. The field names of the JSON objects are names for ranges. The values are strings that describe the range,
4287
- * for example "[0 TO 10]". This option is only available when making global queries.
4284
+ * @param {JsonObject} [params.ranges] - Object mapping faceted, numeric search field names to the required ranges.
4285
+ * Each key is a field name and each value is another object defining the ranges by mapping range name keys to string
4286
+ * values describing the numeric ranges, for example "[0 TO 10]". This option is only available when making global
4287
+ * queries.
4288
4288
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
4289
4289
  * @returns {Promise<CloudantV1.Response<CloudantV1.SearchResult>>}
4290
4290
  */
@@ -4330,7 +4330,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4330
4330
  path,
4331
4331
  },
4332
4332
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4333
- headers: (0, extend_1.default)(true, sdkHeaders, {
4333
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4334
4334
  'Accept': 'application/json',
4335
4335
  'Content-Type': 'application/json',
4336
4336
  }, _params.headers),
@@ -4391,10 +4391,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
4391
4391
  * @param {string[]} [params.groupSort] - This field defines the order of the groups in a search that uses
4392
4392
  * group_field. The default sort order is relevance. This field can have the same values as the sort field, so single
4393
4393
  * fields and arrays of fields are supported. This option is only available when making global queries.
4394
- * @param {JsonObject} [params.ranges] - This field defines ranges for faceted, numeric search fields. The value is a
4395
- * JSON object where the fields names are faceted numeric search fields, and the values of the fields are JSON
4396
- * objects. The field names of the JSON objects are names for ranges. The values are strings that describe the range,
4397
- * for example "[0 TO 10]". This option is only available when making global queries.
4394
+ * @param {JsonObject} [params.ranges] - Object mapping faceted, numeric search field names to the required ranges.
4395
+ * Each key is a field name and each value is another object defining the ranges by mapping range name keys to string
4396
+ * values describing the numeric ranges, for example "[0 TO 10]". This option is only available when making global
4397
+ * queries.
4398
4398
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
4399
4399
  * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
4400
4400
  */
@@ -4441,7 +4441,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4441
4441
  responseType: 'stream',
4442
4442
  },
4443
4443
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4444
- headers: (0, extend_1.default)(true, sdkHeaders, {
4444
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4445
4445
  'Accept': 'application/json',
4446
4446
  'Content-Type': 'application/json',
4447
4447
  }, _params.headers),
@@ -4449,6 +4449,47 @@ class CloudantV1 extends cloudantBaseService_1.default {
4449
4449
  };
4450
4450
  return this.createRequest(parameters);
4451
4451
  }
4452
+ /**
4453
+ * Retrieve information about the search index disk size.
4454
+ *
4455
+ * Retrieve size of the search index on disk.
4456
+ *
4457
+ * @param {Object} params - The parameters to send to the service.
4458
+ * @param {string} params.db - Path parameter to specify the database name.
4459
+ * @param {string} params.ddoc - Path parameter to specify the design document name. The design document name is the
4460
+ * design document ID excluding the `_design/` prefix.
4461
+ * @param {string} params.index - Path parameter to specify the index name.
4462
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
4463
+ * @returns {Promise<CloudantV1.Response<CloudantV1.SearchDiskSizeInformation>>}
4464
+ */
4465
+ getSearchDiskSize(params) {
4466
+ const _params = { ...params };
4467
+ const _requiredParams = ['db', 'ddoc', 'index'];
4468
+ const _validParams = ['db', 'ddoc', 'index', 'headers'];
4469
+ const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4470
+ if (_validationErrors) {
4471
+ return Promise.reject(_validationErrors);
4472
+ }
4473
+ const path = {
4474
+ 'db': _params.db,
4475
+ 'ddoc': _params.ddoc,
4476
+ 'index': _params.index,
4477
+ };
4478
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getSearchDiskSize');
4479
+ const parameters = {
4480
+ options: {
4481
+ url: '/{db}/_design/{ddoc}/_search_disk_size/{index}',
4482
+ method: 'GET',
4483
+ path,
4484
+ },
4485
+ defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4486
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4487
+ 'Accept': 'application/json',
4488
+ }, _params.headers),
4489
+ }),
4490
+ };
4491
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.SearchDiskSizeInformation.deserialize);
4492
+ }
4452
4493
  /**
4453
4494
  * Retrieve information about a search index.
4454
4495
  *
@@ -4483,7 +4524,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4483
4524
  path,
4484
4525
  },
4485
4526
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4486
- headers: (0, extend_1.default)(true, sdkHeaders, {
4527
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4487
4528
  'Accept': 'application/json',
4488
4529
  }, _params.headers),
4489
4530
  }),
@@ -4494,14 +4535,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
4494
4535
  * replication
4495
4536
  ************************/
4496
4537
  /**
4497
- * Retrieve the HTTP headers for a replication document.
4538
+ * Retrieve the HTTP headers for a persistent replication.
4498
4539
  *
4499
4540
  * Retrieves the HTTP headers containing minimal amount of information about the specified replication document from
4500
4541
  * the `_replicator` database. The method supports the same query arguments as the `GET /_replicator/{doc_id}`
4501
4542
  * method, but only headers like content length and the revision (ETag header) are returned.
4502
4543
  *
4503
4544
  * @param {Object} params - The parameters to send to the service.
4504
- * @param {string} params.docId - Path parameter to specify the document ID.
4545
+ * @param {string} params.docId - Path parameter to specify the ID of the stored replication configuration in the
4546
+ * `_replicator` database.
4505
4547
  * @param {string} [params.ifNoneMatch] - Header parameter for a conditional HTTP request not matching an ETag.
4506
4548
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
4507
4549
  * @returns {Promise<CloudantV1.Response<CloudantV1.EmptyObject>>}
@@ -4525,7 +4567,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4525
4567
  path,
4526
4568
  },
4527
4569
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4528
- headers: (0, extend_1.default)(true, sdkHeaders, {
4570
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4529
4571
  'If-None-Match': _params.ifNoneMatch,
4530
4572
  }, _params.headers),
4531
4573
  }),
@@ -4563,7 +4605,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4563
4605
  path,
4564
4606
  },
4565
4607
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4566
- headers: (0, extend_1.default)(true, sdkHeaders, {}, _params.headers),
4608
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {}, _params.headers),
4567
4609
  }),
4568
4610
  };
4569
4611
  return this.createRequest(parameters);
@@ -4598,18 +4640,61 @@ class CloudantV1 extends cloudantBaseService_1.default {
4598
4640
  path,
4599
4641
  },
4600
4642
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4601
- headers: (0, extend_1.default)(true, sdkHeaders, {}, _params.headers),
4643
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {}, _params.headers),
4602
4644
  }),
4603
4645
  };
4604
4646
  return this.createRequest(parameters);
4605
4647
  }
4606
4648
  /**
4607
- * Cancel a replication.
4649
+ * Create a persistent replication with a generated ID.
4650
+ *
4651
+ * Creates or modifies a document in the `_replicator` database to start a new replication or to edit an existing
4652
+ * replication.
4653
+ *
4654
+ * @param {Object} params - The parameters to send to the service.
4655
+ * @param {ReplicationDocument} params.replicationDocument - HTTP request body for replication operations.
4656
+ * @param {string} [params.batch] - Query parameter to specify whether to store in batch mode. The server will respond
4657
+ * with a HTTP 202 Accepted response code immediately.
4658
+ * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
4659
+ * @returns {Promise<CloudantV1.Response<CloudantV1.DocumentResult>>}
4660
+ */
4661
+ postReplicator(params) {
4662
+ const _params = { ...params };
4663
+ const _requiredParams = ['replicationDocument'];
4664
+ const _validParams = ['replicationDocument', 'batch', 'headers'];
4665
+ const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4666
+ if (_validationErrors) {
4667
+ return Promise.reject(_validationErrors);
4668
+ }
4669
+ const body = CloudantV1.ReplicationDocument.serialize(_params.replicationDocument);
4670
+ const query = {
4671
+ 'batch': _params.batch,
4672
+ };
4673
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'postReplicator');
4674
+ const parameters = {
4675
+ options: {
4676
+ url: '/_replicator',
4677
+ method: 'POST',
4678
+ body,
4679
+ qs: query,
4680
+ },
4681
+ defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4682
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4683
+ 'Accept': 'application/json',
4684
+ 'Content-Type': 'application/json',
4685
+ }, _params.headers),
4686
+ }),
4687
+ };
4688
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.DocumentResult.deserialize);
4689
+ }
4690
+ /**
4691
+ * Cancel a persistent replication.
4608
4692
  *
4609
4693
  * Cancels a replication by deleting the document that describes it from the `_replicator` database.
4610
4694
  *
4611
4695
  * @param {Object} params - The parameters to send to the service.
4612
- * @param {string} params.docId - Path parameter to specify the document ID.
4696
+ * @param {string} params.docId - Path parameter to specify the ID of the stored replication configuration in the
4697
+ * `_replicator` database.
4613
4698
  * @param {string} [params.ifMatch] - Header parameter for a conditional HTTP request matching an ETag.
4614
4699
  * @param {string} [params.batch] - Query parameter to specify whether to store in batch mode. The server will respond
4615
4700
  * with a HTTP 202 Accepted response code immediately.
@@ -4641,7 +4726,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4641
4726
  path,
4642
4727
  },
4643
4728
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4644
- headers: (0, extend_1.default)(true, sdkHeaders, {
4729
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4645
4730
  'Accept': 'application/json',
4646
4731
  'If-Match': _params.ifMatch,
4647
4732
  }, _params.headers),
@@ -4650,13 +4735,14 @@ class CloudantV1 extends cloudantBaseService_1.default {
4650
4735
  return this.createRequestAndDeserializeResponse(parameters, CloudantV1.DocumentResult.deserialize);
4651
4736
  }
4652
4737
  /**
4653
- * Retrieve a replication document.
4738
+ * Retrieve the configuration for a persistent replication.
4654
4739
  *
4655
4740
  * Retrieves a replication document from the `_replicator` database to view the configuration of the replication. The
4656
4741
  * status of the replication is no longer recorded in the document but can be checked via the replication scheduler.
4657
4742
  *
4658
4743
  * @param {Object} params - The parameters to send to the service.
4659
- * @param {string} params.docId - Path parameter to specify the document ID.
4744
+ * @param {string} params.docId - Path parameter to specify the ID of the stored replication configuration in the
4745
+ * `_replicator` database.
4660
4746
  * @param {string} [params.ifNoneMatch] - Header parameter for a conditional HTTP request not matching an ETag.
4661
4747
  * @param {boolean} [params.attachments] - Query parameter to specify whether to include attachments bodies in a
4662
4748
  * response.
@@ -4712,7 +4798,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4712
4798
  path,
4713
4799
  },
4714
4800
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4715
- headers: (0, extend_1.default)(true, sdkHeaders, {
4801
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4716
4802
  'Accept': 'application/json',
4717
4803
  'If-None-Match': _params.ifNoneMatch,
4718
4804
  }, _params.headers),
@@ -4721,13 +4807,14 @@ class CloudantV1 extends cloudantBaseService_1.default {
4721
4807
  return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ReplicationDocument.deserialize);
4722
4808
  }
4723
4809
  /**
4724
- * Create or modify a replication using a replication document.
4810
+ * Create or modify a persistent replication.
4725
4811
  *
4726
4812
  * Creates or modifies a document in the `_replicator` database to start a new replication or to edit an existing
4727
4813
  * replication.
4728
4814
  *
4729
4815
  * @param {Object} params - The parameters to send to the service.
4730
- * @param {string} params.docId - Path parameter to specify the document ID.
4816
+ * @param {string} params.docId - Path parameter to specify the ID of the stored replication configuration in the
4817
+ * `_replicator` database.
4731
4818
  * @param {ReplicationDocument} params.replicationDocument - HTTP request body for replication operations.
4732
4819
  * @param {string} [params.ifMatch] - Header parameter for a conditional HTTP request matching an ETag.
4733
4820
  * @param {string} [params.batch] - Query parameter to specify whether to store in batch mode. The server will respond
@@ -4769,7 +4856,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4769
4856
  path,
4770
4857
  },
4771
4858
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4772
- headers: (0, extend_1.default)(true, sdkHeaders, {
4859
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4773
4860
  'Accept': 'application/json',
4774
4861
  'Content-Type': 'application/json',
4775
4862
  'If-Match': _params.ifMatch,
@@ -4816,7 +4903,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4816
4903
  qs: query,
4817
4904
  },
4818
4905
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4819
- headers: (0, extend_1.default)(true, sdkHeaders, {
4906
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4820
4907
  'Accept': 'application/json',
4821
4908
  }, _params.headers),
4822
4909
  }),
@@ -4853,7 +4940,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4853
4940
  path,
4854
4941
  },
4855
4942
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4856
- headers: (0, extend_1.default)(true, sdkHeaders, {
4943
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4857
4944
  'Accept': 'application/json',
4858
4945
  }, _params.headers),
4859
4946
  }),
@@ -4895,7 +4982,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4895
4982
  qs: query,
4896
4983
  },
4897
4984
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4898
- headers: (0, extend_1.default)(true, sdkHeaders, {
4985
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4899
4986
  'Accept': 'application/json',
4900
4987
  }, _params.headers),
4901
4988
  }),
@@ -4931,7 +5018,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4931
5018
  path,
4932
5019
  },
4933
5020
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4934
- headers: (0, extend_1.default)(true, sdkHeaders, {
5021
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4935
5022
  'Accept': 'application/json',
4936
5023
  }, _params.headers),
4937
5024
  }),
@@ -4965,7 +5052,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
4965
5052
  method: 'GET',
4966
5053
  },
4967
5054
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4968
- headers: (0, extend_1.default)(true, sdkHeaders, {
5055
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
4969
5056
  'Accept': 'application/json',
4970
5057
  }, _params.headers),
4971
5058
  }),
@@ -4976,49 +5063,43 @@ class CloudantV1 extends cloudantBaseService_1.default {
4976
5063
  * authorization
4977
5064
  ************************/
4978
5065
  /**
4979
- * Retrieve database permissions information.
5066
+ * Generates API keys for apps or persons to enable database access.
4980
5067
  *
4981
- * See who has permission to read, write, and manage the database. The credentials you use to log in to the dashboard
4982
- * automatically include `_admin` permissions to all databases you create. Everyone and everything else, including
4983
- * users you share databases with and API keys you create, must be given a permission level explicitly.
5068
+ * Generates API keys to enable database access for a person or application, but without creating a new IBM Cloudant
5069
+ * account for that person or application. An API key is a randomly generated username and password. The key is given
5070
+ * the wanted access permissions for a database.
4984
5071
  *
4985
- * @param {Object} params - The parameters to send to the service.
4986
- * @param {string} params.db - Path parameter to specify the database name.
5072
+ * @param {Object} [params] - The parameters to send to the service.
4987
5073
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
4988
- * @returns {Promise<CloudantV1.Response<CloudantV1.Security>>}
5074
+ * @returns {Promise<CloudantV1.Response<CloudantV1.ApiKeysResult>>}
4989
5075
  */
4990
- getSecurity(params) {
5076
+ postApiKeys(params) {
4991
5077
  const _params = { ...params };
4992
- const _requiredParams = ['db'];
4993
- const _validParams = ['db', 'headers'];
5078
+ const _requiredParams = [];
5079
+ const _validParams = ['headers'];
4994
5080
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4995
5081
  if (_validationErrors) {
4996
5082
  return Promise.reject(_validationErrors);
4997
5083
  }
4998
- const path = {
4999
- 'db': _params.db,
5000
- };
5001
- const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecurity');
5084
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'postApiKeys');
5002
5085
  const parameters = {
5003
5086
  options: {
5004
- url: '/{db}/_security',
5005
- method: 'GET',
5006
- path,
5087
+ url: '/_api/v2/api_keys',
5088
+ method: 'POST',
5007
5089
  },
5008
5090
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5009
- headers: (0, extend_1.default)(true, sdkHeaders, {
5091
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5010
5092
  'Accept': 'application/json',
5011
5093
  }, _params.headers),
5012
5094
  }),
5013
5095
  };
5014
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.Security.deserialize);
5096
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ApiKeysResult.deserialize);
5015
5097
  }
5016
5098
  /**
5017
- * Modify database permissions.
5099
+ * Modify only Cloudant related database permissions.
5018
5100
  *
5019
- * Modify who has permission to read, write, or manage a database. This endpoint can be used to modify both Cloudant
5020
- * and CouchDB related permissions. Be careful: by removing a Cloudant API key, a member or an admin from the list of
5021
- * users that have access permissions, you remove it from the list of users that have access to the database.
5101
+ * Modify only Cloudant related permissions to database. Be careful: by removing an API key from the list, you remove
5102
+ * the API key from the list of users that have access to the database.
5022
5103
  *
5023
5104
  * ### Note about nobody role
5024
5105
  *
@@ -5028,40 +5109,40 @@ class CloudantV1 extends cloudantBaseService_1.default {
5028
5109
  *
5029
5110
  * @param {Object} params - The parameters to send to the service.
5030
5111
  * @param {string} params.db - Path parameter to specify the database name.
5112
+ * @param {JsonObject} params.cloudant - Database permissions for Cloudant users and/or API keys.
5031
5113
  * @param {SecurityObject} [params.admins] - Schema for names and roles to map to a database permission.
5032
- * @param {SecurityObject} [params.members] - Schema for names and roles to map to a database permission.
5033
- * @param {JsonObject} [params.cloudant] - Database permissions for Cloudant users and/or API keys.
5034
5114
  * @param {boolean} [params.couchdbAuthOnly] - Manage permissions using the `_users` database only.
5115
+ * @param {SecurityObject} [params.members] - Schema for names and roles to map to a database permission.
5035
5116
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5036
5117
  * @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
5037
5118
  */
5038
- putSecurity(params) {
5119
+ putCloudantSecurityConfiguration(params) {
5039
5120
  const _params = { ...params };
5040
- const _requiredParams = ['db'];
5041
- const _validParams = ['db', 'admins', 'members', 'cloudant', 'couchdbAuthOnly', 'headers'];
5121
+ const _requiredParams = ['db', 'cloudant'];
5122
+ const _validParams = ['db', 'cloudant', 'admins', 'couchdbAuthOnly', 'members', 'headers'];
5042
5123
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5043
5124
  if (_validationErrors) {
5044
5125
  return Promise.reject(_validationErrors);
5045
5126
  }
5046
5127
  const body = {
5047
- 'admins': CloudantV1.SecurityObject.serialize(_params.admins),
5048
- 'members': CloudantV1.SecurityObject.serialize(_params.members),
5049
5128
  'cloudant': _params.cloudant,
5129
+ 'admins': CloudantV1.SecurityObject.serialize(_params.admins),
5050
5130
  'couchdb_auth_only': _params.couchdbAuthOnly,
5131
+ 'members': CloudantV1.SecurityObject.serialize(_params.members),
5051
5132
  };
5052
5133
  const path = {
5053
5134
  'db': _params.db,
5054
5135
  };
5055
- const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'putSecurity');
5136
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'putCloudantSecurityConfiguration');
5056
5137
  const parameters = {
5057
5138
  options: {
5058
- url: '/{db}/_security',
5139
+ url: '/_api/v2/db/{db}/_security',
5059
5140
  method: 'PUT',
5060
5141
  body,
5061
5142
  path,
5062
5143
  },
5063
5144
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5064
- headers: (0, extend_1.default)(true, sdkHeaders, {
5145
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5065
5146
  'Accept': 'application/json',
5066
5147
  'Content-Type': 'application/json',
5067
5148
  }, _params.headers),
@@ -5070,43 +5151,49 @@ class CloudantV1 extends cloudantBaseService_1.default {
5070
5151
  return this.createRequestAndDeserializeResponse(parameters, CloudantV1.Ok.deserialize);
5071
5152
  }
5072
5153
  /**
5073
- * Generates API keys for apps or persons to enable database access.
5154
+ * Retrieve database permissions information.
5074
5155
  *
5075
- * Generates API keys to enable database access for a person or application, but without creating a new IBM Cloudant
5076
- * account for that person or application. An API key is a randomly generated username and password. The key is given
5077
- * the wanted access permissions for a database.
5156
+ * See who has permission to read, write, and manage the database. The credentials you use to log in to the dashboard
5157
+ * automatically include `_admin` permissions to all databases you create. Everyone and everything else, including
5158
+ * users you share databases with and API keys you create, must be given a permission level explicitly.
5078
5159
  *
5079
- * @param {Object} [params] - The parameters to send to the service.
5160
+ * @param {Object} params - The parameters to send to the service.
5161
+ * @param {string} params.db - Path parameter to specify the database name.
5080
5162
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5081
- * @returns {Promise<CloudantV1.Response<CloudantV1.ApiKeysResult>>}
5163
+ * @returns {Promise<CloudantV1.Response<CloudantV1.Security>>}
5082
5164
  */
5083
- postApiKeys(params) {
5165
+ getSecurity(params) {
5084
5166
  const _params = { ...params };
5085
- const _requiredParams = [];
5086
- const _validParams = ['headers'];
5167
+ const _requiredParams = ['db'];
5168
+ const _validParams = ['db', 'headers'];
5087
5169
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5088
5170
  if (_validationErrors) {
5089
5171
  return Promise.reject(_validationErrors);
5090
5172
  }
5091
- const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'postApiKeys');
5173
+ const path = {
5174
+ 'db': _params.db,
5175
+ };
5176
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getSecurity');
5092
5177
  const parameters = {
5093
5178
  options: {
5094
- url: '/_api/v2/api_keys',
5095
- method: 'POST',
5179
+ url: '/{db}/_security',
5180
+ method: 'GET',
5181
+ path,
5096
5182
  },
5097
5183
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5098
- headers: (0, extend_1.default)(true, sdkHeaders, {
5184
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5099
5185
  'Accept': 'application/json',
5100
5186
  }, _params.headers),
5101
5187
  }),
5102
5188
  };
5103
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ApiKeysResult.deserialize);
5189
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.Security.deserialize);
5104
5190
  }
5105
5191
  /**
5106
- * Modify only Cloudant related database permissions.
5192
+ * Modify database permissions.
5107
5193
  *
5108
- * Modify only Cloudant related permissions to database. Be careful: by removing an API key from the list, you remove
5109
- * the API key from the list of users that have access to the database.
5194
+ * Modify who has permission to read, write, or manage a database. This endpoint can be used to modify both Cloudant
5195
+ * and CouchDB related permissions. Be careful: by removing a Cloudant API key, a member or an admin from the list of
5196
+ * users that have access permissions, you remove it from the list of users that have access to the database.
5110
5197
  *
5111
5198
  * ### Note about nobody role
5112
5199
  *
@@ -5116,40 +5203,40 @@ class CloudantV1 extends cloudantBaseService_1.default {
5116
5203
  *
5117
5204
  * @param {Object} params - The parameters to send to the service.
5118
5205
  * @param {string} params.db - Path parameter to specify the database name.
5119
- * @param {JsonObject} params.cloudant - Database permissions for Cloudant users and/or API keys.
5120
5206
  * @param {SecurityObject} [params.admins] - Schema for names and roles to map to a database permission.
5121
- * @param {SecurityObject} [params.members] - Schema for names and roles to map to a database permission.
5207
+ * @param {JsonObject} [params.cloudant] - Database permissions for Cloudant users and/or API keys.
5122
5208
  * @param {boolean} [params.couchdbAuthOnly] - Manage permissions using the `_users` database only.
5209
+ * @param {SecurityObject} [params.members] - Schema for names and roles to map to a database permission.
5123
5210
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5124
5211
  * @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
5125
5212
  */
5126
- putCloudantSecurityConfiguration(params) {
5213
+ putSecurity(params) {
5127
5214
  const _params = { ...params };
5128
- const _requiredParams = ['db', 'cloudant'];
5129
- const _validParams = ['db', 'cloudant', 'admins', 'members', 'couchdbAuthOnly', 'headers'];
5215
+ const _requiredParams = ['db'];
5216
+ const _validParams = ['db', 'admins', 'cloudant', 'couchdbAuthOnly', 'members', 'headers'];
5130
5217
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5131
5218
  if (_validationErrors) {
5132
5219
  return Promise.reject(_validationErrors);
5133
5220
  }
5134
5221
  const body = {
5135
- 'cloudant': _params.cloudant,
5136
5222
  'admins': CloudantV1.SecurityObject.serialize(_params.admins),
5137
- 'members': CloudantV1.SecurityObject.serialize(_params.members),
5223
+ 'cloudant': _params.cloudant,
5138
5224
  'couchdb_auth_only': _params.couchdbAuthOnly,
5225
+ 'members': CloudantV1.SecurityObject.serialize(_params.members),
5139
5226
  };
5140
5227
  const path = {
5141
5228
  'db': _params.db,
5142
5229
  };
5143
- const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'putCloudantSecurityConfiguration');
5230
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'putSecurity');
5144
5231
  const parameters = {
5145
5232
  options: {
5146
- url: '/_api/v2/db/{db}/_security',
5233
+ url: '/{db}/_security',
5147
5234
  method: 'PUT',
5148
5235
  body,
5149
5236
  path,
5150
5237
  },
5151
5238
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5152
- headers: (0, extend_1.default)(true, sdkHeaders, {
5239
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5153
5240
  'Accept': 'application/json',
5154
5241
  'Content-Type': 'application/json',
5155
5242
  }, _params.headers),
@@ -5185,7 +5272,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5185
5272
  method: 'GET',
5186
5273
  },
5187
5274
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5188
- headers: (0, extend_1.default)(true, sdkHeaders, {
5275
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5189
5276
  'Accept': 'application/json',
5190
5277
  }, _params.headers),
5191
5278
  }),
@@ -5229,7 +5316,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5229
5316
  body,
5230
5317
  },
5231
5318
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5232
- headers: (0, extend_1.default)(true, sdkHeaders, {
5319
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5233
5320
  'Accept': 'application/json',
5234
5321
  'Content-Type': 'application/json',
5235
5322
  }, _params.headers),
@@ -5282,7 +5369,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5282
5369
  path,
5283
5370
  },
5284
5371
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5285
- headers: (0, extend_1.default)(true, sdkHeaders, {
5372
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5286
5373
  'If-Match': _params.ifMatch,
5287
5374
  'If-None-Match': _params.ifNoneMatch,
5288
5375
  }, _params.headers),
@@ -5333,7 +5420,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5333
5420
  path,
5334
5421
  },
5335
5422
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5336
- headers: (0, extend_1.default)(true, sdkHeaders, {
5423
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5337
5424
  'Accept': 'application/json',
5338
5425
  'If-Match': _params.ifMatch,
5339
5426
  }, _params.headers),
@@ -5352,7 +5439,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5352
5439
  * @param {string} params.db - Path parameter to specify the database name.
5353
5440
  * @param {string} params.docId - Path parameter to specify the document ID.
5354
5441
  * @param {string} params.attachmentName - Path parameter to specify the attachment name.
5355
- * @param {string} [params.accept] - The type of the response: or *_/_*.
5442
+ * @param {string} [params.accept] - The type of the response: *_/_*.
5356
5443
  * @param {string} [params.ifMatch] - Header parameter for a conditional HTTP request matching an ETag.
5357
5444
  * @param {string} [params.ifNoneMatch] - Header parameter for a conditional HTTP request not matching an ETag.
5358
5445
  * @param {string} [params.range] - Header parameter to specify the byte range for a request. This allows the
@@ -5387,7 +5474,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5387
5474
  responseType: 'stream',
5388
5475
  },
5389
5476
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5390
- headers: (0, extend_1.default)(true, sdkHeaders, {
5477
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5391
5478
  'Accept': _params.accept,
5392
5479
  'If-Match': _params.ifMatch,
5393
5480
  'If-None-Match': _params.ifNoneMatch,
@@ -5446,7 +5533,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5446
5533
  path,
5447
5534
  },
5448
5535
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5449
- headers: (0, extend_1.default)(true, sdkHeaders, {
5536
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5450
5537
  'Accept': 'application/json',
5451
5538
  'Content-Type': _params.contentType,
5452
5539
  'If-Match': _params.ifMatch,
@@ -5491,7 +5578,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5491
5578
  path,
5492
5579
  },
5493
5580
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5494
- headers: (0, extend_1.default)(true, sdkHeaders, {
5581
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5495
5582
  'If-None-Match': _params.ifNoneMatch,
5496
5583
  }, _params.headers),
5497
5584
  }),
@@ -5536,7 +5623,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5536
5623
  path,
5537
5624
  },
5538
5625
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5539
- headers: (0, extend_1.default)(true, sdkHeaders, {
5626
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5540
5627
  'Accept': 'application/json',
5541
5628
  }, _params.headers),
5542
5629
  }),
@@ -5590,7 +5677,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5590
5677
  path,
5591
5678
  },
5592
5679
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5593
- headers: (0, extend_1.default)(true, sdkHeaders, {
5680
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5594
5681
  'Accept': _params.accept,
5595
5682
  'If-None-Match': _params.ifNoneMatch,
5596
5683
  }, _params.headers),
@@ -5640,7 +5727,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5640
5727
  path,
5641
5728
  },
5642
5729
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5643
- headers: (0, extend_1.default)(true, sdkHeaders, {
5730
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5644
5731
  'Accept': 'application/json',
5645
5732
  'Content-Type': _params.contentType,
5646
5733
  }, _params.headers),
@@ -5685,7 +5772,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5685
5772
  path,
5686
5773
  },
5687
5774
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5688
- headers: (0, extend_1.default)(true, sdkHeaders, {
5775
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5689
5776
  'Accept': 'application/json',
5690
5777
  'Content-Type': 'application/json',
5691
5778
  }, _params.headers),
@@ -5722,7 +5809,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5722
5809
  path,
5723
5810
  },
5724
5811
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5725
- headers: (0, extend_1.default)(true, sdkHeaders, {
5812
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5726
5813
  'Accept': 'application/json',
5727
5814
  }, _params.headers),
5728
5815
  }),
@@ -5761,7 +5848,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5761
5848
  path,
5762
5849
  },
5763
5850
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5764
- headers: (0, extend_1.default)(true, sdkHeaders, {
5851
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5765
5852
  'Accept': 'application/json',
5766
5853
  }, _params.headers),
5767
5854
  }),
@@ -5795,7 +5882,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5795
5882
  method: 'HEAD',
5796
5883
  },
5797
5884
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5798
- headers: (0, extend_1.default)(true, sdkHeaders, {}, _params.headers),
5885
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {}, _params.headers),
5799
5886
  }),
5800
5887
  };
5801
5888
  return this.createRequest(parameters);
@@ -5826,7 +5913,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5826
5913
  method: 'GET',
5827
5914
  },
5828
5915
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5829
- headers: (0, extend_1.default)(true, sdkHeaders, {
5916
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5830
5917
  'Accept': 'application/json',
5831
5918
  }, _params.headers),
5832
5919
  }),
@@ -5834,17 +5921,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
5834
5921
  return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ActiveTask.deserialize);
5835
5922
  }
5836
5923
  /**
5837
- * Retrieve cluster membership information.
5924
+ * Retrieve Activity Tracker events information.
5838
5925
  *
5839
- * Displays the nodes that are part of the cluster as `cluster_nodes`. The field, `all_nodes`, displays all nodes this
5840
- * node knows about, including the ones that are part of the cluster. This endpoint is useful when you set up a
5841
- * cluster.
5926
+ * Check event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance.
5842
5927
  *
5843
5928
  * @param {Object} [params] - The parameters to send to the service.
5844
5929
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5845
- * @returns {Promise<CloudantV1.Response<CloudantV1.MembershipInformation>>}
5930
+ * @returns {Promise<CloudantV1.Response<CloudantV1.ActivityTrackerEvents>>}
5846
5931
  */
5847
- getMembershipInformation(params) {
5932
+ getActivityTrackerEvents(params) {
5848
5933
  const _params = { ...params };
5849
5934
  const _requiredParams = [];
5850
5935
  const _validParams = ['headers'];
@@ -5852,64 +5937,70 @@ class CloudantV1 extends cloudantBaseService_1.default {
5852
5937
  if (_validationErrors) {
5853
5938
  return Promise.reject(_validationErrors);
5854
5939
  }
5855
- const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getMembershipInformation');
5940
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getActivityTrackerEvents');
5856
5941
  const parameters = {
5857
5942
  options: {
5858
- url: '/_membership',
5943
+ url: '/_api/v2/user/activity_tracker/events',
5859
5944
  method: 'GET',
5860
5945
  },
5861
5946
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5862
- headers: (0, extend_1.default)(true, sdkHeaders, {
5947
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5863
5948
  'Accept': 'application/json',
5864
5949
  }, _params.headers),
5865
5950
  }),
5866
5951
  };
5867
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.MembershipInformation.deserialize);
5952
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ActivityTrackerEvents.deserialize);
5868
5953
  }
5869
5954
  /**
5870
- * Retrieve information about whether the server is up.
5871
- *
5872
- * Confirms that the server is up, running, and ready to respond to requests. If `maintenance_mode` is `true` or
5873
- * `nolb`, the endpoint returns a 404 response.
5955
+ * Modify Activity Tracker events configuration.
5874
5956
  *
5875
- * **Tip:** The authentication for this endpoint is only enforced when using IAM.
5957
+ * Configure event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance.
5876
5958
  *
5877
- * @param {Object} [params] - The parameters to send to the service.
5959
+ * @param {Object} params - The parameters to send to the service.
5960
+ * @param {string[]} params.types - An array of event types that are being sent to IBM Cloud Activity Tracker for the
5961
+ * IBM Cloudant instance. "management" is a required element of this array.
5878
5962
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5879
- * @returns {Promise<CloudantV1.Response<CloudantV1.UpInformation>>}
5963
+ * @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
5880
5964
  */
5881
- getUpInformation(params) {
5965
+ postActivityTrackerEvents(params) {
5882
5966
  const _params = { ...params };
5883
- const _requiredParams = [];
5884
- const _validParams = ['headers'];
5967
+ const _requiredParams = ['types'];
5968
+ const _validParams = ['types', 'headers'];
5885
5969
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5886
5970
  if (_validationErrors) {
5887
5971
  return Promise.reject(_validationErrors);
5888
5972
  }
5889
- const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getUpInformation');
5973
+ const body = {
5974
+ 'types': _params.types,
5975
+ };
5976
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'postActivityTrackerEvents');
5890
5977
  const parameters = {
5891
5978
  options: {
5892
- url: '/_up',
5893
- method: 'GET',
5979
+ url: '/_api/v2/user/activity_tracker/events',
5980
+ method: 'POST',
5981
+ body,
5894
5982
  },
5895
5983
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5896
- headers: (0, extend_1.default)(true, sdkHeaders, {
5984
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5897
5985
  'Accept': 'application/json',
5986
+ 'Content-Type': 'application/json',
5898
5987
  }, _params.headers),
5899
5988
  }),
5900
5989
  };
5901
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.UpInformation.deserialize);
5990
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.Ok.deserialize);
5902
5991
  }
5903
5992
  /**
5904
- * Retrieve Activity Tracker events information.
5993
+ * Retrieve the current provisioned throughput capacity consumption.
5905
5994
  *
5906
- * Check event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance.
5995
+ * View the current consumption of provisioned throughput capacity for an IBM Cloudant instance. The current
5996
+ * consumption shows the quantities of reads, writes, and global queries conducted against the instance for a given
5997
+ * second.
5907
5998
  *
5908
5999
  * @param {Object} [params] - The parameters to send to the service.
5909
6000
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5910
- * @returns {Promise<CloudantV1.Response<CloudantV1.ActivityTrackerEvents>>}
6001
+ * @returns {Promise<CloudantV1.Response<CloudantV1.CurrentThroughputInformation>>}
5911
6002
  */
5912
- getActivityTrackerEvents(params) {
6003
+ getCurrentThroughputInformation(params) {
5913
6004
  const _params = { ...params };
5914
6005
  const _requiredParams = [];
5915
6006
  const _validParams = ['headers'];
@@ -5917,70 +6008,66 @@ class CloudantV1 extends cloudantBaseService_1.default {
5917
6008
  if (_validationErrors) {
5918
6009
  return Promise.reject(_validationErrors);
5919
6010
  }
5920
- const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getActivityTrackerEvents');
6011
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getCurrentThroughputInformation');
5921
6012
  const parameters = {
5922
6013
  options: {
5923
- url: '/_api/v2/user/activity_tracker/events',
6014
+ url: '/_api/v2/user/current/throughput',
5924
6015
  method: 'GET',
5925
6016
  },
5926
6017
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5927
- headers: (0, extend_1.default)(true, sdkHeaders, {
6018
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5928
6019
  'Accept': 'application/json',
5929
6020
  }, _params.headers),
5930
6021
  }),
5931
6022
  };
5932
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ActivityTrackerEvents.deserialize);
6023
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.CurrentThroughputInformation.deserialize);
5933
6024
  }
5934
6025
  /**
5935
- * Modify Activity Tracker events configuration.
6026
+ * Retrieve cluster membership information.
5936
6027
  *
5937
- * Configure event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance.
6028
+ * Displays the nodes that are part of the cluster as `cluster_nodes`. The field, `all_nodes`, displays all nodes this
6029
+ * node knows about, including the ones that are part of the cluster. This endpoint is useful when you set up a
6030
+ * cluster.
5938
6031
  *
5939
- * @param {Object} params - The parameters to send to the service.
5940
- * @param {string[]} params.types - An array of event types that are being sent to IBM Cloud Activity Tracker for the
5941
- * IBM Cloudant instance. "management" is a required element of this array.
6032
+ * @param {Object} [params] - The parameters to send to the service.
5942
6033
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5943
- * @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
6034
+ * @returns {Promise<CloudantV1.Response<CloudantV1.MembershipInformation>>}
5944
6035
  */
5945
- postActivityTrackerEvents(params) {
6036
+ getMembershipInformation(params) {
5946
6037
  const _params = { ...params };
5947
- const _requiredParams = ['types'];
5948
- const _validParams = ['types', 'headers'];
6038
+ const _requiredParams = [];
6039
+ const _validParams = ['headers'];
5949
6040
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5950
6041
  if (_validationErrors) {
5951
6042
  return Promise.reject(_validationErrors);
5952
6043
  }
5953
- const body = {
5954
- 'types': _params.types,
5955
- };
5956
- const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'postActivityTrackerEvents');
6044
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getMembershipInformation');
5957
6045
  const parameters = {
5958
6046
  options: {
5959
- url: '/_api/v2/user/activity_tracker/events',
5960
- method: 'POST',
5961
- body,
6047
+ url: '/_membership',
6048
+ method: 'GET',
5962
6049
  },
5963
6050
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5964
- headers: (0, extend_1.default)(true, sdkHeaders, {
6051
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5965
6052
  'Accept': 'application/json',
5966
- 'Content-Type': 'application/json',
5967
6053
  }, _params.headers),
5968
6054
  }),
5969
6055
  };
5970
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.Ok.deserialize);
6056
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.MembershipInformation.deserialize);
5971
6057
  }
5972
6058
  /**
5973
- * Retrieve the current provisioned throughput capacity consumption.
6059
+ * Retrieve information about whether the server is up.
5974
6060
  *
5975
- * View the current consumption of provisioned throughput capacity for an IBM Cloudant instance. The current
5976
- * consumption shows the quantities of reads, writes, and global queries conducted against the instance for a given
5977
- * second.
6061
+ * Confirms that the server is up, running, and ready to respond to requests. If `maintenance_mode` is `true` or
6062
+ * `nolb`, the endpoint returns a 404 response.
6063
+ *
6064
+ * **Tip:** The authentication for this endpoint is only enforced when using IAM.
5978
6065
  *
5979
6066
  * @param {Object} [params] - The parameters to send to the service.
5980
6067
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5981
- * @returns {Promise<CloudantV1.Response<CloudantV1.CurrentThroughputInformation>>}
6068
+ * @returns {Promise<CloudantV1.Response<CloudantV1.UpInformation>>}
5982
6069
  */
5983
- getCurrentThroughputInformation(params) {
6070
+ getUpInformation(params) {
5984
6071
  const _params = { ...params };
5985
6072
  const _requiredParams = [];
5986
6073
  const _validParams = ['headers'];
@@ -5988,19 +6075,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
5988
6075
  if (_validationErrors) {
5989
6076
  return Promise.reject(_validationErrors);
5990
6077
  }
5991
- const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getCurrentThroughputInformation');
6078
+ const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getUpInformation');
5992
6079
  const parameters = {
5993
6080
  options: {
5994
- url: '/_api/v2/user/current/throughput',
6081
+ url: '/_up',
5995
6082
  method: 'GET',
5996
6083
  },
5997
6084
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5998
- headers: (0, extend_1.default)(true, sdkHeaders, {
6085
+ headers: (0, extend_1.default)(true, sdkHeaders, this.baseOptions.headers, {
5999
6086
  'Accept': 'application/json',
6000
6087
  }, _params.headers),
6001
6088
  }),
6002
6089
  };
6003
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.CurrentThroughputInformation.deserialize);
6090
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.UpInformation.deserialize);
6004
6091
  }
6005
6092
  }
6006
6093
  /*************************
@@ -6036,6 +6123,12 @@ class CloudantV1 extends cloudantBaseService_1.default {
6036
6123
  Feed["LONGPOLL"] = "longpoll";
6037
6124
  Feed["NORMAL"] = "normal";
6038
6125
  })(Feed = PostChangesConstants.Feed || (PostChangesConstants.Feed = {}));
6126
+ /** Query parameter to specify how many revisions are returned in the changes array. The default, `main_only`, will only return the current "winning" revision; all_docs will return all leaf revisions (including conflicts and deleted former conflicts). */
6127
+ let Style;
6128
+ (function (Style) {
6129
+ Style["MAIN_ONLY"] = "main_only";
6130
+ Style["ALL_DOCS"] = "all_docs";
6131
+ })(Style = PostChangesConstants.Style || (PostChangesConstants.Style = {}));
6039
6132
  })(PostChangesConstants = CloudantV1.PostChangesConstants || (CloudantV1.PostChangesConstants = {}));
6040
6133
  /** Constants for the `postChangesAsStream` operation. */
6041
6134
  let PostChangesAsStreamConstants;
@@ -6048,6 +6141,12 @@ class CloudantV1 extends cloudantBaseService_1.default {
6048
6141
  Feed["LONGPOLL"] = "longpoll";
6049
6142
  Feed["NORMAL"] = "normal";
6050
6143
  })(Feed = PostChangesAsStreamConstants.Feed || (PostChangesAsStreamConstants.Feed = {}));
6144
+ /** Query parameter to specify how many revisions are returned in the changes array. The default, `main_only`, will only return the current "winning" revision; all_docs will return all leaf revisions (including conflicts and deleted former conflicts). */
6145
+ let Style;
6146
+ (function (Style) {
6147
+ Style["MAIN_ONLY"] = "main_only";
6148
+ Style["ALL_DOCS"] = "all_docs";
6149
+ })(Style = PostChangesAsStreamConstants.Style || (PostChangesAsStreamConstants.Style = {}));
6051
6150
  })(PostChangesAsStreamConstants = CloudantV1.PostChangesAsStreamConstants || (CloudantV1.PostChangesAsStreamConstants = {}));
6052
6151
  /** Constants for the `postDocument` operation. */
6053
6152
  let PostDocumentConstants;
@@ -6372,6 +6471,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
6372
6471
  Stale["OK"] = "ok";
6373
6472
  })(Stale = PostSearchAsStreamConstants.Stale || (PostSearchAsStreamConstants.Stale = {}));
6374
6473
  })(PostSearchAsStreamConstants = CloudantV1.PostSearchAsStreamConstants || (CloudantV1.PostSearchAsStreamConstants = {}));
6474
+ /** Constants for the `postReplicator` operation. */
6475
+ let PostReplicatorConstants;
6476
+ (function (PostReplicatorConstants) {
6477
+ /** Query parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately. */
6478
+ let Batch;
6479
+ (function (Batch) {
6480
+ Batch["OK"] = "ok";
6481
+ })(Batch = PostReplicatorConstants.Batch || (PostReplicatorConstants.Batch = {}));
6482
+ })(PostReplicatorConstants = CloudantV1.PostReplicatorConstants || (CloudantV1.PostReplicatorConstants = {}));
6375
6483
  /** Constants for the `deleteReplicationDocument` operation. */
6376
6484
  let DeleteReplicationDocumentConstants;
6377
6485
  (function (DeleteReplicationDocumentConstants) {
@@ -6405,9 +6513,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
6405
6513
  States["FAILED"] = "failed";
6406
6514
  })(States = GetSchedulerDocsConstants.States || (GetSchedulerDocsConstants.States = {}));
6407
6515
  })(GetSchedulerDocsConstants = CloudantV1.GetSchedulerDocsConstants || (CloudantV1.GetSchedulerDocsConstants = {}));
6408
- /** Constants for the `putSecurity` operation. */
6409
- let PutSecurityConstants;
6410
- (function (PutSecurityConstants) {
6516
+ /** Constants for the `putCloudantSecurityConfiguration` operation. */
6517
+ let PutCloudantSecurityConfigurationConstants;
6518
+ (function (PutCloudantSecurityConfigurationConstants) {
6411
6519
  /** Database permissions for Cloudant users and/or API keys. */
6412
6520
  let Cloudant;
6413
6521
  (function (Cloudant) {
@@ -6419,11 +6527,11 @@ class CloudantV1 extends cloudantBaseService_1.default {
6419
6527
  Cloudant["DESIGN"] = "_design";
6420
6528
  Cloudant["SHARDS"] = "_shards";
6421
6529
  Cloudant["SECURITY"] = "_security";
6422
- })(Cloudant = PutSecurityConstants.Cloudant || (PutSecurityConstants.Cloudant = {}));
6423
- })(PutSecurityConstants = CloudantV1.PutSecurityConstants || (CloudantV1.PutSecurityConstants = {}));
6424
- /** Constants for the `putCloudantSecurityConfiguration` operation. */
6425
- let PutCloudantSecurityConfigurationConstants;
6426
- (function (PutCloudantSecurityConfigurationConstants) {
6530
+ })(Cloudant = PutCloudantSecurityConfigurationConstants.Cloudant || (PutCloudantSecurityConfigurationConstants.Cloudant = {}));
6531
+ })(PutCloudantSecurityConfigurationConstants = CloudantV1.PutCloudantSecurityConfigurationConstants || (CloudantV1.PutCloudantSecurityConfigurationConstants = {}));
6532
+ /** Constants for the `putSecurity` operation. */
6533
+ let PutSecurityConstants;
6534
+ (function (PutSecurityConstants) {
6427
6535
  /** Database permissions for Cloudant users and/or API keys. */
6428
6536
  let Cloudant;
6429
6537
  (function (Cloudant) {
@@ -6435,8 +6543,8 @@ class CloudantV1 extends cloudantBaseService_1.default {
6435
6543
  Cloudant["DESIGN"] = "_design";
6436
6544
  Cloudant["SHARDS"] = "_shards";
6437
6545
  Cloudant["SECURITY"] = "_security";
6438
- })(Cloudant = PutCloudantSecurityConfigurationConstants.Cloudant || (PutCloudantSecurityConfigurationConstants.Cloudant = {}));
6439
- })(PutCloudantSecurityConfigurationConstants = CloudantV1.PutCloudantSecurityConfigurationConstants || (CloudantV1.PutCloudantSecurityConfigurationConstants = {}));
6546
+ })(Cloudant = PutSecurityConstants.Cloudant || (PutSecurityConstants.Cloudant = {}));
6547
+ })(PutSecurityConstants = CloudantV1.PutSecurityConstants || (CloudantV1.PutSecurityConstants = {}));
6440
6548
  /** Constants for the `deleteAttachment` operation. */
6441
6549
  let DeleteAttachmentConstants;
6442
6550
  (function (DeleteAttachmentConstants) {
@@ -7043,7 +7151,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
7043
7151
  * Schema for the result of an all documents operation.
7044
7152
  */
7045
7153
  class AllDocsResult {
7046
- /** Number of total rows. */
7154
+ /** Total number of document results. */
7047
7155
  totalRows;
7048
7156
  /** List of doc results. */
7049
7157
  rows;
@@ -8021,6 +8129,8 @@ class CloudantV1 extends cloudantBaseService_1.default {
8021
8129
  * old replicator versions. Do not use the value to infer timing infromation. Typically only used by replicators.
8022
8130
  */
8023
8131
  instanceStartTime;
8132
+ /** Information about database's partitioned indexes. */
8133
+ partitionedIndexes;
8024
8134
  /** Schema for database properties. */
8025
8135
  props;
8026
8136
  /** Schema for size information of content. */
@@ -8031,8 +8141,6 @@ class CloudantV1 extends cloudantBaseService_1.default {
8031
8141
  updateSeq;
8032
8142
  /** The UUID of the database. */
8033
8143
  uuid;
8034
- /** Information about database's partitioned indexes. */
8035
- partitionedIndexes;
8036
8144
  static serialize(obj) {
8037
8145
  if (obj === undefined || obj === null || typeof obj === 'string') {
8038
8146
  return obj;
@@ -8068,6 +8176,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
8068
8176
  if (obj.instanceStartTime !== undefined) {
8069
8177
  copy.instance_start_time = obj.instanceStartTime;
8070
8178
  }
8179
+ if (obj.partitionedIndexes !== undefined) {
8180
+ copy.partitioned_indexes = PartitionedIndexesInformation.serialize(obj.partitionedIndexes);
8181
+ }
8071
8182
  if (obj.props !== undefined) {
8072
8183
  copy.props = DatabaseInformationProps.serialize(obj.props);
8073
8184
  }
@@ -8080,9 +8191,6 @@ class CloudantV1 extends cloudantBaseService_1.default {
8080
8191
  if (obj.uuid !== undefined) {
8081
8192
  copy.uuid = obj.uuid;
8082
8193
  }
8083
- if (obj.partitionedIndexes !== undefined) {
8084
- copy.partitioned_indexes = PartitionedIndexesInformation.serialize(obj.partitionedIndexes);
8085
- }
8086
8194
  return copy;
8087
8195
  }
8088
8196
  static deserialize(obj) {
@@ -8120,6 +8228,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
8120
8228
  if (obj.instance_start_time !== undefined) {
8121
8229
  copy.instanceStartTime = obj.instance_start_time;
8122
8230
  }
8231
+ if (obj.partitioned_indexes !== undefined) {
8232
+ copy.partitionedIndexes = PartitionedIndexesInformation.deserialize(obj.partitioned_indexes);
8233
+ }
8123
8234
  if (obj.props !== undefined) {
8124
8235
  copy.props = DatabaseInformationProps.deserialize(obj.props);
8125
8236
  }
@@ -8132,9 +8243,6 @@ class CloudantV1 extends cloudantBaseService_1.default {
8132
8243
  if (obj.uuid !== undefined) {
8133
8244
  copy.uuid = obj.uuid;
8134
8245
  }
8135
- if (obj.partitioned_indexes !== undefined) {
8136
- copy.partitionedIndexes = PartitionedIndexesInformation.deserialize(obj.partitioned_indexes);
8137
- }
8138
8246
  return copy;
8139
8247
  }
8140
8248
  }
@@ -9544,8 +9652,8 @@ class CloudantV1 extends cloudantBaseService_1.default {
9544
9652
  /** Direction parameter passed to the underlying view. */
9545
9653
  let Direction;
9546
9654
  (function (Direction) {
9547
- Direction["ASC"] = "asc";
9548
- Direction["DESC"] = "desc";
9655
+ Direction["FWD"] = "fwd";
9656
+ Direction["REV"] = "rev";
9549
9657
  })(Direction = Constants.Direction || (Constants.Direction = {}));
9550
9658
  /** The type of the underlying view. */
9551
9659
  let ViewType;
@@ -10238,7 +10346,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
10238
10346
  * Schema for information about the indexes in a database.
10239
10347
  */
10240
10348
  class IndexesInformation {
10241
- /** Number of total rows. */
10349
+ /** Total number of query indexes in the database. */
10242
10350
  totalRows;
10243
10351
  /** Indexes. */
10244
10352
  indexes;
@@ -11303,7 +11411,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
11303
11411
  * Schema for a listing of replication scheduler documents.
11304
11412
  */
11305
11413
  class SchedulerDocsResult {
11306
- /** Number of total rows. */
11414
+ /** Total number of replication scheduler documents. */
11307
11415
  totalRows;
11308
11416
  /** Array of replication scheduler doc objects. */
11309
11417
  docs;
@@ -11745,7 +11853,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
11745
11853
  * Schema for a listing of replication scheduler jobs.
11746
11854
  */
11747
11855
  class SchedulerJobsResult {
11748
- /** Number of total rows. */
11856
+ /** Total number of replication jobs. */
11749
11857
  totalRows;
11750
11858
  /** Array of replication job objects. */
11751
11859
  jobs;
@@ -11805,6 +11913,42 @@ class CloudantV1 extends cloudantBaseService_1.default {
11805
11913
  }
11806
11914
  }
11807
11915
  CloudantV1.SearchAnalyzeResult = SearchAnalyzeResult;
11916
+ /**
11917
+ * Schema for search index disk size.
11918
+ */
11919
+ class SearchDiskSizeInformation {
11920
+ /** The name of the search index prefixed by the design document ID where the index is stored. */
11921
+ name;
11922
+ /** Schema for search index disk size. */
11923
+ searchIndex;
11924
+ static serialize(obj) {
11925
+ if (obj === undefined || obj === null || typeof obj === 'string') {
11926
+ return obj;
11927
+ }
11928
+ let copy = {};
11929
+ if (obj.name !== undefined) {
11930
+ copy.name = obj.name;
11931
+ }
11932
+ if (obj.searchIndex !== undefined) {
11933
+ copy.search_index = SearchIndexDiskSize.serialize(obj.searchIndex);
11934
+ }
11935
+ return copy;
11936
+ }
11937
+ static deserialize(obj) {
11938
+ if (obj === undefined || obj === null || typeof obj === 'string') {
11939
+ return obj;
11940
+ }
11941
+ let copy = {};
11942
+ if (obj.name !== undefined) {
11943
+ copy.name = obj.name;
11944
+ }
11945
+ if (obj.search_index !== undefined) {
11946
+ copy.searchIndex = SearchIndexDiskSize.deserialize(obj.search_index);
11947
+ }
11948
+ return copy;
11949
+ }
11950
+ }
11951
+ CloudantV1.SearchDiskSizeInformation = SearchDiskSizeInformation;
11808
11952
  /**
11809
11953
  * Schema for a search index definition.
11810
11954
  */
@@ -11860,6 +12004,34 @@ class CloudantV1 extends cloudantBaseService_1.default {
11860
12004
  }
11861
12005
  }
11862
12006
  CloudantV1.SearchIndexDefinition = SearchIndexDefinition;
12007
+ /**
12008
+ * Schema for search index disk size.
12009
+ */
12010
+ class SearchIndexDiskSize {
12011
+ /** The size of the search index on disk. */
12012
+ diskSize;
12013
+ static serialize(obj) {
12014
+ if (obj === undefined || obj === null || typeof obj === 'string') {
12015
+ return obj;
12016
+ }
12017
+ let copy = {};
12018
+ if (obj.diskSize !== undefined) {
12019
+ copy.disk_size = obj.diskSize;
12020
+ }
12021
+ return copy;
12022
+ }
12023
+ static deserialize(obj) {
12024
+ if (obj === undefined || obj === null || typeof obj === 'string') {
12025
+ return obj;
12026
+ }
12027
+ let copy = {};
12028
+ if (obj.disk_size !== undefined) {
12029
+ copy.diskSize = obj.disk_size;
12030
+ }
12031
+ return copy;
12032
+ }
12033
+ }
12034
+ CloudantV1.SearchIndexDiskSize = SearchIndexDiskSize;
11863
12035
  /**
11864
12036
  * Schema for metadata information about a search index.
11865
12037
  */
@@ -11968,7 +12140,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
11968
12140
  * Schema for the result of a query search operation.
11969
12141
  */
11970
12142
  class SearchResult {
11971
- /** Number of total rows. */
12143
+ /** Total number of rows in the index matching the search query. The limit may truncate the number of matches
12144
+ * returned.
12145
+ */
11972
12146
  totalRows;
11973
12147
  /** Opaque bookmark token used when paginating results. */
11974
12148
  bookmark;
@@ -12046,7 +12220,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
12046
12220
  * Schema for the result of a query search operation.
12047
12221
  */
12048
12222
  class SearchResultProperties {
12049
- /** Number of total rows. */
12223
+ /** Total number of rows in the index matching the search query. The limit may truncate the number of matches
12224
+ * returned.
12225
+ */
12050
12226
  totalRows;
12051
12227
  /** Opaque bookmark token used when paginating results. */
12052
12228
  bookmark;
@@ -12172,12 +12348,12 @@ class CloudantV1 extends cloudantBaseService_1.default {
12172
12348
  class Security {
12173
12349
  /** Schema for names and roles to map to a database permission. */
12174
12350
  admins;
12175
- /** Schema for names and roles to map to a database permission. */
12176
- members;
12177
12351
  /** Database permissions for Cloudant users and/or API keys. */
12178
12352
  cloudant;
12179
12353
  /** Manage permissions using the `_users` database only. */
12180
12354
  couchdbAuthOnly;
12355
+ /** Schema for names and roles to map to a database permission. */
12356
+ members;
12181
12357
  static serialize(obj) {
12182
12358
  if (obj === undefined || obj === null || typeof obj === 'string') {
12183
12359
  return obj;
@@ -12186,15 +12362,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
12186
12362
  if (obj.admins !== undefined) {
12187
12363
  copy.admins = SecurityObject.serialize(obj.admins);
12188
12364
  }
12189
- if (obj.members !== undefined) {
12190
- copy.members = SecurityObject.serialize(obj.members);
12191
- }
12192
12365
  if (obj.cloudant !== undefined) {
12193
12366
  copy.cloudant = obj.cloudant;
12194
12367
  }
12195
12368
  if (obj.couchdbAuthOnly !== undefined) {
12196
12369
  copy.couchdb_auth_only = obj.couchdbAuthOnly;
12197
12370
  }
12371
+ if (obj.members !== undefined) {
12372
+ copy.members = SecurityObject.serialize(obj.members);
12373
+ }
12198
12374
  return copy;
12199
12375
  }
12200
12376
  static deserialize(obj) {
@@ -12205,15 +12381,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
12205
12381
  if (obj.admins !== undefined) {
12206
12382
  copy.admins = SecurityObject.deserialize(obj.admins);
12207
12383
  }
12208
- if (obj.members !== undefined) {
12209
- copy.members = SecurityObject.deserialize(obj.members);
12210
- }
12211
12384
  if (obj.cloudant !== undefined) {
12212
12385
  copy.cloudant = obj.cloudant;
12213
12386
  }
12214
12387
  if (obj.couchdb_auth_only !== undefined) {
12215
12388
  copy.couchdbAuthOnly = obj.couchdb_auth_only;
12216
12389
  }
12390
+ if (obj.members !== undefined) {
12391
+ copy.members = SecurityObject.deserialize(obj.members);
12392
+ }
12217
12393
  return copy;
12218
12394
  }
12219
12395
  }
@@ -12317,12 +12493,12 @@ class CloudantV1 extends cloudantBaseService_1.default {
12317
12493
  couchdb;
12318
12494
  /** List of enabled optional features. */
12319
12495
  features;
12496
+ /** List of feature flags. */
12497
+ featuresFlags;
12320
12498
  /** Schema for server vendor information. */
12321
12499
  vendor;
12322
12500
  /** Apache CouchDB version. */
12323
12501
  version;
12324
- /** List of feature flags. */
12325
- featuresFlags;
12326
12502
  static serialize(obj) {
12327
12503
  if (obj === undefined || obj === null || typeof obj === 'string') {
12328
12504
  return obj;
@@ -12334,15 +12510,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
12334
12510
  if (obj.features !== undefined) {
12335
12511
  copy.features = obj.features;
12336
12512
  }
12513
+ if (obj.featuresFlags !== undefined) {
12514
+ copy.features_flags = obj.featuresFlags;
12515
+ }
12337
12516
  if (obj.vendor !== undefined) {
12338
12517
  copy.vendor = ServerVendor.serialize(obj.vendor);
12339
12518
  }
12340
12519
  if (obj.version !== undefined) {
12341
12520
  copy.version = obj.version;
12342
12521
  }
12343
- if (obj.featuresFlags !== undefined) {
12344
- copy.features_flags = obj.featuresFlags;
12345
- }
12346
12522
  return copy;
12347
12523
  }
12348
12524
  static deserialize(obj) {
@@ -12356,15 +12532,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
12356
12532
  if (obj.features !== undefined) {
12357
12533
  copy.features = obj.features;
12358
12534
  }
12535
+ if (obj.features_flags !== undefined) {
12536
+ copy.featuresFlags = obj.features_flags;
12537
+ }
12359
12538
  if (obj.vendor !== undefined) {
12360
12539
  copy.vendor = ServerVendor.deserialize(obj.vendor);
12361
12540
  }
12362
12541
  if (obj.version !== undefined) {
12363
12542
  copy.version = obj.version;
12364
12543
  }
12365
- if (obj.features_flags !== undefined) {
12366
- copy.featuresFlags = obj.features_flags;
12367
- }
12368
12544
  return copy;
12369
12545
  }
12370
12546
  }
@@ -13056,7 +13232,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
13056
13232
  * Schema for the result of a query view operation.
13057
13233
  */
13058
13234
  class ViewResult {
13059
- /** Number of total rows. */
13235
+ /** Total number of rows in the view index. Note that if the request query narrows the view this is not the
13236
+ * number of matching rows. The number of matching rows, up to the specified `limit`, is the size of the `rows`
13237
+ * array.
13238
+ */
13060
13239
  totalRows;
13061
13240
  /** Current update sequence for the database. */
13062
13241
  updateSeq;