@ibm-cloud/cloudant 0.10.3 → 0.12.0

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.
@@ -120,45 +120,6 @@ class CloudantV1 extends cloudantBaseService_1.default {
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
  *
@@ -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, {
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
  ************************/
@@ -3300,6 +3300,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3300
3300
  * combination and conditional operators.
3301
3301
  *
3302
3302
  * For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
3303
+ * @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
3303
3304
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
3304
3305
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
3305
3306
  * existing conflicts in the document.
@@ -3331,21 +3332,23 @@ class CloudantV1 extends cloudantBaseService_1.default {
3331
3332
  * It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
3332
3333
  * indexes that might get added later.
3333
3334
  *
3334
- * If the specified index does not exist or cannot answer the query then the value is ignored and another index or a
3335
- * full scan of all documents will answer the query.
3335
+ * If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
3336
+ * another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
3337
+ * server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
3336
3338
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
3337
3339
  * @returns {Promise<CloudantV1.Response<CloudantV1.ExplainResult>>}
3338
3340
  */
3339
3341
  postPartitionExplain(params) {
3340
3342
  const _params = { ...params };
3341
3343
  const _requiredParams = ['db', 'partitionKey', 'selector'];
3342
- const _validParams = ['db', 'partitionKey', 'selector', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'headers'];
3344
+ const _validParams = ['db', 'partitionKey', 'selector', 'allowFallback', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'headers'];
3343
3345
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3344
3346
  if (_validationErrors) {
3345
3347
  return Promise.reject(_validationErrors);
3346
3348
  }
3347
3349
  const body = {
3348
3350
  'selector': _params.selector,
3351
+ 'allow_fallback': _params.allowFallback,
3349
3352
  'bookmark': _params.bookmark,
3350
3353
  'conflicts': _params.conflicts,
3351
3354
  'execution_stats': _params.executionStats,
@@ -3384,9 +3387,13 @@ class CloudantV1 extends cloudantBaseService_1.default {
3384
3387
  * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
3385
3388
  * all fields in selector by using the `_index` endpoint.
3386
3389
  *
3387
- * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
3388
- * recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
3389
- * In this case the response body will include a warning field recommending that an index is created.
3390
+ * Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
3391
+ * isn't recommended because it has a significant performance impact causing a full scan of the partition with each
3392
+ * request. In this case the response body includes a warning field recommending the creation of an index.
3393
+ *
3394
+ * To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
3395
+ * status code if no suitable index exists. If you want to use only a specific index for your query set
3396
+ * `allow_fallback` to `false` and set the `use_index` option.
3390
3397
  *
3391
3398
  * Before using read the
3392
3399
  * [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
@@ -3428,6 +3435,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3428
3435
  * combination and conditional operators.
3429
3436
  *
3430
3437
  * For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
3438
+ * @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
3431
3439
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
3432
3440
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
3433
3441
  * existing conflicts in the document.
@@ -3459,21 +3467,23 @@ class CloudantV1 extends cloudantBaseService_1.default {
3459
3467
  * It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
3460
3468
  * indexes that might get added later.
3461
3469
  *
3462
- * If the specified index does not exist or cannot answer the query then the value is ignored and another index or a
3463
- * full scan of all documents will answer the query.
3470
+ * If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
3471
+ * another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
3472
+ * server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
3464
3473
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
3465
3474
  * @returns {Promise<CloudantV1.Response<CloudantV1.FindResult>>}
3466
3475
  */
3467
3476
  postPartitionFind(params) {
3468
3477
  const _params = { ...params };
3469
3478
  const _requiredParams = ['db', 'partitionKey', 'selector'];
3470
- const _validParams = ['db', 'partitionKey', 'selector', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'headers'];
3479
+ const _validParams = ['db', 'partitionKey', 'selector', 'allowFallback', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'headers'];
3471
3480
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3472
3481
  if (_validationErrors) {
3473
3482
  return Promise.reject(_validationErrors);
3474
3483
  }
3475
3484
  const body = {
3476
3485
  'selector': _params.selector,
3486
+ 'allow_fallback': _params.allowFallback,
3477
3487
  'bookmark': _params.bookmark,
3478
3488
  'conflicts': _params.conflicts,
3479
3489
  'execution_stats': _params.executionStats,
@@ -3512,9 +3522,13 @@ class CloudantV1 extends cloudantBaseService_1.default {
3512
3522
  * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
3513
3523
  * all fields in selector by using the `_index` endpoint.
3514
3524
  *
3515
- * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
3516
- * recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
3517
- * In this case the response body will include a warning field recommending that an index is created.
3525
+ * Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
3526
+ * isn't recommended because it has a significant performance impact causing a full scan of the partition with each
3527
+ * request. In this case the response body includes a warning field recommending the creation of an index.
3528
+ *
3529
+ * To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
3530
+ * status code if no suitable index exists. If you want to use only a specific index for your query set
3531
+ * `allow_fallback` to `false` and set the `use_index` option.
3518
3532
  *
3519
3533
  * Before using read the
3520
3534
  * [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
@@ -3556,6 +3570,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3556
3570
  * combination and conditional operators.
3557
3571
  *
3558
3572
  * For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
3573
+ * @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
3559
3574
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
3560
3575
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
3561
3576
  * existing conflicts in the document.
@@ -3587,21 +3602,23 @@ class CloudantV1 extends cloudantBaseService_1.default {
3587
3602
  * It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
3588
3603
  * indexes that might get added later.
3589
3604
  *
3590
- * If the specified index does not exist or cannot answer the query then the value is ignored and another index or a
3591
- * full scan of all documents will answer the query.
3605
+ * If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
3606
+ * another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
3607
+ * server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
3592
3608
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
3593
3609
  * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
3594
3610
  */
3595
3611
  postPartitionFindAsStream(params) {
3596
3612
  const _params = { ...params };
3597
3613
  const _requiredParams = ['db', 'partitionKey', 'selector'];
3598
- const _validParams = ['db', 'partitionKey', 'selector', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'headers'];
3614
+ const _validParams = ['db', 'partitionKey', 'selector', 'allowFallback', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'headers'];
3599
3615
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3600
3616
  if (_validationErrors) {
3601
3617
  return Promise.reject(_validationErrors);
3602
3618
  }
3603
3619
  const body = {
3604
3620
  'selector': _params.selector,
3621
+ 'allow_fallback': _params.allowFallback,
3605
3622
  'bookmark': _params.bookmark,
3606
3623
  'conflicts': _params.conflicts,
3607
3624
  'execution_stats': _params.executionStats,
@@ -3678,6 +3695,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3678
3695
  * combination and conditional operators.
3679
3696
  *
3680
3697
  * For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
3698
+ * @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
3681
3699
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
3682
3700
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
3683
3701
  * existing conflicts in the document.
@@ -3709,8 +3727,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
3709
3727
  * It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
3710
3728
  * indexes that might get added later.
3711
3729
  *
3712
- * If the specified index does not exist or cannot answer the query then the value is ignored and another index or a
3713
- * full scan of all documents will answer the query.
3730
+ * If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
3731
+ * another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
3732
+ * server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
3714
3733
  * @param {number} [params.r] - The read quorum that is needed for the result. The value defaults to 1, in which case
3715
3734
  * the document that was found in the index is returned. If set to a higher value, each document is read from at least
3716
3735
  * that many replicas before it is returned in the results. The request will take more time than using only the
@@ -3721,13 +3740,14 @@ class CloudantV1 extends cloudantBaseService_1.default {
3721
3740
  postExplain(params) {
3722
3741
  const _params = { ...params };
3723
3742
  const _requiredParams = ['db', 'selector'];
3724
- const _validParams = ['db', 'selector', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'r', 'headers'];
3743
+ const _validParams = ['db', 'selector', 'allowFallback', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'r', 'headers'];
3725
3744
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3726
3745
  if (_validationErrors) {
3727
3746
  return Promise.reject(_validationErrors);
3728
3747
  }
3729
3748
  const body = {
3730
3749
  'selector': _params.selector,
3750
+ 'allow_fallback': _params.allowFallback,
3731
3751
  'bookmark': _params.bookmark,
3732
3752
  'conflicts': _params.conflicts,
3733
3753
  'execution_stats': _params.executionStats,
@@ -3766,9 +3786,13 @@ class CloudantV1 extends cloudantBaseService_1.default {
3766
3786
  * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
3767
3787
  * all fields in selector by using the `_index` endpoint.
3768
3788
  *
3769
- * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
3770
- * recommended because it has a significant performance impact causing a full scan of the database with each request.
3771
- * In this case the response body will include a warning field recommending that an index is created.
3789
+ * Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
3790
+ * isn't recommended because it has a significant performance impact causing a full scan of the database with each
3791
+ * request. In this case the response body includes a warning field recommending the creation of an index.
3792
+ *
3793
+ * To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
3794
+ * status code if no suitable index exists. If you want to use only a specific index for your query set
3795
+ * `allow_fallback` to `false` and set the `use_index` option.
3772
3796
  *
3773
3797
  * @param {Object} params - The parameters to send to the service.
3774
3798
  * @param {string} params.db - Path parameter to specify the database name.
@@ -3805,6 +3829,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3805
3829
  * combination and conditional operators.
3806
3830
  *
3807
3831
  * For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
3832
+ * @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
3808
3833
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
3809
3834
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
3810
3835
  * existing conflicts in the document.
@@ -3836,8 +3861,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
3836
3861
  * It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
3837
3862
  * indexes that might get added later.
3838
3863
  *
3839
- * If the specified index does not exist or cannot answer the query then the value is ignored and another index or a
3840
- * full scan of all documents will answer the query.
3864
+ * If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
3865
+ * another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
3866
+ * server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
3841
3867
  * @param {number} [params.r] - The read quorum that is needed for the result. The value defaults to 1, in which case
3842
3868
  * the document that was found in the index is returned. If set to a higher value, each document is read from at least
3843
3869
  * that many replicas before it is returned in the results. The request will take more time than using only the
@@ -3848,13 +3874,14 @@ class CloudantV1 extends cloudantBaseService_1.default {
3848
3874
  postFind(params) {
3849
3875
  const _params = { ...params };
3850
3876
  const _requiredParams = ['db', 'selector'];
3851
- const _validParams = ['db', 'selector', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'r', 'headers'];
3877
+ const _validParams = ['db', 'selector', 'allowFallback', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'r', 'headers'];
3852
3878
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3853
3879
  if (_validationErrors) {
3854
3880
  return Promise.reject(_validationErrors);
3855
3881
  }
3856
3882
  const body = {
3857
3883
  'selector': _params.selector,
3884
+ 'allow_fallback': _params.allowFallback,
3858
3885
  'bookmark': _params.bookmark,
3859
3886
  'conflicts': _params.conflicts,
3860
3887
  'execution_stats': _params.executionStats,
@@ -3893,9 +3920,13 @@ class CloudantV1 extends cloudantBaseService_1.default {
3893
3920
  * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
3894
3921
  * all fields in selector by using the `_index` endpoint.
3895
3922
  *
3896
- * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
3897
- * recommended because it has a significant performance impact causing a full scan of the database with each request.
3898
- * In this case the response body will include a warning field recommending that an index is created.
3923
+ * Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
3924
+ * isn't recommended because it has a significant performance impact causing a full scan of the database with each
3925
+ * request. In this case the response body includes a warning field recommending the creation of an index.
3926
+ *
3927
+ * To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
3928
+ * status code if no suitable index exists. If you want to use only a specific index for your query set
3929
+ * `allow_fallback` to `false` and set the `use_index` option.
3899
3930
  *
3900
3931
  * @param {Object} params - The parameters to send to the service.
3901
3932
  * @param {string} params.db - Path parameter to specify the database name.
@@ -3932,6 +3963,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
3932
3963
  * combination and conditional operators.
3933
3964
  *
3934
3965
  * For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
3966
+ * @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
3935
3967
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
3936
3968
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
3937
3969
  * existing conflicts in the document.
@@ -3963,8 +3995,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
3963
3995
  * It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
3964
3996
  * indexes that might get added later.
3965
3997
  *
3966
- * If the specified index does not exist or cannot answer the query then the value is ignored and another index or a
3967
- * full scan of all documents will answer the query.
3998
+ * If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
3999
+ * another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
4000
+ * server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
3968
4001
  * @param {number} [params.r] - The read quorum that is needed for the result. The value defaults to 1, in which case
3969
4002
  * the document that was found in the index is returned. If set to a higher value, each document is read from at least
3970
4003
  * that many replicas before it is returned in the results. The request will take more time than using only the
@@ -3975,13 +4008,14 @@ class CloudantV1 extends cloudantBaseService_1.default {
3975
4008
  postFindAsStream(params) {
3976
4009
  const _params = { ...params };
3977
4010
  const _requiredParams = ['db', 'selector'];
3978
- const _validParams = ['db', 'selector', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'r', 'headers'];
4011
+ const _validParams = ['db', 'selector', 'allowFallback', 'bookmark', 'conflicts', 'executionStats', 'fields', 'limit', 'skip', 'sort', 'stable', 'update', 'useIndex', 'r', 'headers'];
3979
4012
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
3980
4013
  if (_validationErrors) {
3981
4014
  return Promise.reject(_validationErrors);
3982
4015
  }
3983
4016
  const body = {
3984
4017
  'selector': _params.selector,
4018
+ 'allow_fallback': _params.allowFallback,
3985
4019
  'bookmark': _params.bookmark,
3986
4020
  'conflicts': _params.conflicts,
3987
4021
  'execution_stats': _params.executionStats,
@@ -4247,10 +4281,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
4247
4281
  * @param {string[]} [params.groupSort] - This field defines the order of the groups in a search that uses
4248
4282
  * group_field. The default sort order is relevance. This field can have the same values as the sort field, so single
4249
4283
  * fields and arrays of fields are supported. This option is only available when making global queries.
4250
- * @param {JsonObject} [params.ranges] - This field defines ranges for faceted, numeric search fields. The value is a
4251
- * JSON object where the fields names are faceted numeric search fields, and the values of the fields are JSON
4252
- * objects. The field names of the JSON objects are names for ranges. The values are strings that describe the range,
4253
- * 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.
4254
4288
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
4255
4289
  * @returns {Promise<CloudantV1.Response<CloudantV1.SearchResult>>}
4256
4290
  */
@@ -4357,10 +4391,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
4357
4391
  * @param {string[]} [params.groupSort] - This field defines the order of the groups in a search that uses
4358
4392
  * group_field. The default sort order is relevance. This field can have the same values as the sort field, so single
4359
4393
  * fields and arrays of fields are supported. This option is only available when making global queries.
4360
- * @param {JsonObject} [params.ranges] - This field defines ranges for faceted, numeric search fields. The value is a
4361
- * JSON object where the fields names are faceted numeric search fields, and the values of the fields are JSON
4362
- * objects. The field names of the JSON objects are names for ranges. The values are strings that describe the range,
4363
- * 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.
4364
4398
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
4365
4399
  * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
4366
4400
  */
@@ -4415,6 +4449,47 @@ class CloudantV1 extends cloudantBaseService_1.default {
4415
4449
  };
4416
4450
  return this.createRequest(parameters);
4417
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, {
4487
+ 'Accept': 'application/json',
4488
+ }, _params.headers),
4489
+ }),
4490
+ };
4491
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.SearchDiskSizeInformation.deserialize);
4492
+ }
4418
4493
  /**
4419
4494
  * Retrieve information about a search index.
4420
4495
  *
@@ -4460,14 +4535,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
4460
4535
  * replication
4461
4536
  ************************/
4462
4537
  /**
4463
- * Retrieve the HTTP headers for a replication document.
4538
+ * Retrieve the HTTP headers for a persistent replication.
4464
4539
  *
4465
4540
  * Retrieves the HTTP headers containing minimal amount of information about the specified replication document from
4466
4541
  * the `_replicator` database. The method supports the same query arguments as the `GET /_replicator/{doc_id}`
4467
4542
  * method, but only headers like content length and the revision (ETag header) are returned.
4468
4543
  *
4469
4544
  * @param {Object} params - The parameters to send to the service.
4470
- * @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.
4471
4547
  * @param {string} [params.ifNoneMatch] - Header parameter for a conditional HTTP request not matching an ETag.
4472
4548
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
4473
4549
  * @returns {Promise<CloudantV1.Response<CloudantV1.EmptyObject>>}
@@ -4570,12 +4646,55 @@ class CloudantV1 extends cloudantBaseService_1.default {
4570
4646
  return this.createRequest(parameters);
4571
4647
  }
4572
4648
  /**
4573
- * 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, {
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.
4574
4692
  *
4575
4693
  * Cancels a replication by deleting the document that describes it from the `_replicator` database.
4576
4694
  *
4577
4695
  * @param {Object} params - The parameters to send to the service.
4578
- * @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.
4579
4698
  * @param {string} [params.ifMatch] - Header parameter for a conditional HTTP request matching an ETag.
4580
4699
  * @param {string} [params.batch] - Query parameter to specify whether to store in batch mode. The server will respond
4581
4700
  * with a HTTP 202 Accepted response code immediately.
@@ -4616,13 +4735,14 @@ class CloudantV1 extends cloudantBaseService_1.default {
4616
4735
  return this.createRequestAndDeserializeResponse(parameters, CloudantV1.DocumentResult.deserialize);
4617
4736
  }
4618
4737
  /**
4619
- * Retrieve a replication document.
4738
+ * Retrieve the configuration for a persistent replication.
4620
4739
  *
4621
4740
  * Retrieves a replication document from the `_replicator` database to view the configuration of the replication. The
4622
4741
  * status of the replication is no longer recorded in the document but can be checked via the replication scheduler.
4623
4742
  *
4624
4743
  * @param {Object} params - The parameters to send to the service.
4625
- * @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.
4626
4746
  * @param {string} [params.ifNoneMatch] - Header parameter for a conditional HTTP request not matching an ETag.
4627
4747
  * @param {boolean} [params.attachments] - Query parameter to specify whether to include attachments bodies in a
4628
4748
  * response.
@@ -4687,13 +4807,14 @@ class CloudantV1 extends cloudantBaseService_1.default {
4687
4807
  return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ReplicationDocument.deserialize);
4688
4808
  }
4689
4809
  /**
4690
- * Create or modify a replication using a replication document.
4810
+ * Create or modify a persistent replication.
4691
4811
  *
4692
4812
  * Creates or modifies a document in the `_replicator` database to start a new replication or to edit an existing
4693
4813
  * replication.
4694
4814
  *
4695
4815
  * @param {Object} params - The parameters to send to the service.
4696
- * @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.
4697
4818
  * @param {ReplicationDocument} params.replicationDocument - HTTP request body for replication operations.
4698
4819
  * @param {string} [params.ifMatch] - Header parameter for a conditional HTTP request matching an ETag.
4699
4820
  * @param {string} [params.batch] - Query parameter to specify whether to store in batch mode. The server will respond
@@ -4942,34 +5063,29 @@ class CloudantV1 extends cloudantBaseService_1.default {
4942
5063
  * authorization
4943
5064
  ************************/
4944
5065
  /**
4945
- * Retrieve database permissions information.
5066
+ * Generates API keys for apps or persons to enable database access.
4946
5067
  *
4947
- * See who has permission to read, write, and manage the database. The credentials you use to log in to the dashboard
4948
- * automatically include `_admin` permissions to all databases you create. Everyone and everything else, including
4949
- * 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.
4950
5071
  *
4951
- * @param {Object} params - The parameters to send to the service.
4952
- * @param {string} params.db - Path parameter to specify the database name.
5072
+ * @param {Object} [params] - The parameters to send to the service.
4953
5073
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
4954
- * @returns {Promise<CloudantV1.Response<CloudantV1.Security>>}
5074
+ * @returns {Promise<CloudantV1.Response<CloudantV1.ApiKeysResult>>}
4955
5075
  */
4956
- getSecurity(params) {
5076
+ postApiKeys(params) {
4957
5077
  const _params = { ...params };
4958
- const _requiredParams = ['db'];
4959
- const _validParams = ['db', 'headers'];
5078
+ const _requiredParams = [];
5079
+ const _validParams = ['headers'];
4960
5080
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
4961
5081
  if (_validationErrors) {
4962
5082
  return Promise.reject(_validationErrors);
4963
5083
  }
4964
- const path = {
4965
- 'db': _params.db,
4966
- };
4967
- 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');
4968
5085
  const parameters = {
4969
5086
  options: {
4970
- url: '/{db}/_security',
4971
- method: 'GET',
4972
- path,
5087
+ url: '/_api/v2/api_keys',
5088
+ method: 'POST',
4973
5089
  },
4974
5090
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
4975
5091
  headers: (0, extend_1.default)(true, sdkHeaders, {
@@ -4977,14 +5093,13 @@ class CloudantV1 extends cloudantBaseService_1.default {
4977
5093
  }, _params.headers),
4978
5094
  }),
4979
5095
  };
4980
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.Security.deserialize);
5096
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ApiKeysResult.deserialize);
4981
5097
  }
4982
5098
  /**
4983
- * Modify database permissions.
5099
+ * Modify only Cloudant related database permissions.
4984
5100
  *
4985
- * Modify who has permission to read, write, or manage a database. This endpoint can be used to modify both Cloudant
4986
- * and CouchDB related permissions. Be careful: by removing a Cloudant API key, a member or an admin from the list of
4987
- * 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.
4988
5103
  *
4989
5104
  * ### Note about nobody role
4990
5105
  *
@@ -4994,34 +5109,34 @@ class CloudantV1 extends cloudantBaseService_1.default {
4994
5109
  *
4995
5110
  * @param {Object} params - The parameters to send to the service.
4996
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.
4997
5113
  * @param {SecurityObject} [params.admins] - Schema for names and roles to map to a database permission.
4998
- * @param {SecurityObject} [params.members] - Schema for names and roles to map to a database permission.
4999
- * @param {JsonObject} [params.cloudant] - Database permissions for Cloudant users and/or API keys.
5000
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.
5001
5116
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5002
5117
  * @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
5003
5118
  */
5004
- putSecurity(params) {
5119
+ putCloudantSecurityConfiguration(params) {
5005
5120
  const _params = { ...params };
5006
- const _requiredParams = ['db'];
5007
- const _validParams = ['db', 'admins', 'members', 'cloudant', 'couchdbAuthOnly', 'headers'];
5121
+ const _requiredParams = ['db', 'cloudant'];
5122
+ const _validParams = ['db', 'cloudant', 'admins', 'couchdbAuthOnly', 'members', 'headers'];
5008
5123
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5009
5124
  if (_validationErrors) {
5010
5125
  return Promise.reject(_validationErrors);
5011
5126
  }
5012
5127
  const body = {
5013
- 'admins': CloudantV1.SecurityObject.serialize(_params.admins),
5014
- 'members': CloudantV1.SecurityObject.serialize(_params.members),
5015
5128
  'cloudant': _params.cloudant,
5129
+ 'admins': CloudantV1.SecurityObject.serialize(_params.admins),
5016
5130
  'couchdb_auth_only': _params.couchdbAuthOnly,
5131
+ 'members': CloudantV1.SecurityObject.serialize(_params.members),
5017
5132
  };
5018
5133
  const path = {
5019
5134
  'db': _params.db,
5020
5135
  };
5021
- 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');
5022
5137
  const parameters = {
5023
5138
  options: {
5024
- url: '/{db}/_security',
5139
+ url: '/_api/v2/db/{db}/_security',
5025
5140
  method: 'PUT',
5026
5141
  body,
5027
5142
  path,
@@ -5036,29 +5151,34 @@ class CloudantV1 extends cloudantBaseService_1.default {
5036
5151
  return this.createRequestAndDeserializeResponse(parameters, CloudantV1.Ok.deserialize);
5037
5152
  }
5038
5153
  /**
5039
- * Generates API keys for apps or persons to enable database access.
5154
+ * Retrieve database permissions information.
5040
5155
  *
5041
- * Generates API keys to enable database access for a person or application, but without creating a new IBM Cloudant
5042
- * account for that person or application. An API key is a randomly generated username and password. The key is given
5043
- * 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.
5044
5159
  *
5045
- * @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.
5046
5162
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5047
- * @returns {Promise<CloudantV1.Response<CloudantV1.ApiKeysResult>>}
5163
+ * @returns {Promise<CloudantV1.Response<CloudantV1.Security>>}
5048
5164
  */
5049
- postApiKeys(params) {
5165
+ getSecurity(params) {
5050
5166
  const _params = { ...params };
5051
- const _requiredParams = [];
5052
- const _validParams = ['headers'];
5167
+ const _requiredParams = ['db'];
5168
+ const _validParams = ['db', 'headers'];
5053
5169
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5054
5170
  if (_validationErrors) {
5055
5171
  return Promise.reject(_validationErrors);
5056
5172
  }
5057
- 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');
5058
5177
  const parameters = {
5059
5178
  options: {
5060
- url: '/_api/v2/api_keys',
5061
- method: 'POST',
5179
+ url: '/{db}/_security',
5180
+ method: 'GET',
5181
+ path,
5062
5182
  },
5063
5183
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5064
5184
  headers: (0, extend_1.default)(true, sdkHeaders, {
@@ -5066,13 +5186,14 @@ class CloudantV1 extends cloudantBaseService_1.default {
5066
5186
  }, _params.headers),
5067
5187
  }),
5068
5188
  };
5069
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ApiKeysResult.deserialize);
5189
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.Security.deserialize);
5070
5190
  }
5071
5191
  /**
5072
- * Modify only Cloudant related database permissions.
5192
+ * Modify database permissions.
5073
5193
  *
5074
- * Modify only Cloudant related permissions to database. Be careful: by removing an API key from the list, you remove
5075
- * 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.
5076
5197
  *
5077
5198
  * ### Note about nobody role
5078
5199
  *
@@ -5082,34 +5203,34 @@ class CloudantV1 extends cloudantBaseService_1.default {
5082
5203
  *
5083
5204
  * @param {Object} params - The parameters to send to the service.
5084
5205
  * @param {string} params.db - Path parameter to specify the database name.
5085
- * @param {JsonObject} params.cloudant - Database permissions for Cloudant users and/or API keys.
5086
5206
  * @param {SecurityObject} [params.admins] - Schema for names and roles to map to a database permission.
5087
- * @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.
5088
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.
5089
5210
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5090
5211
  * @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
5091
5212
  */
5092
- putCloudantSecurityConfiguration(params) {
5213
+ putSecurity(params) {
5093
5214
  const _params = { ...params };
5094
- const _requiredParams = ['db', 'cloudant'];
5095
- const _validParams = ['db', 'cloudant', 'admins', 'members', 'couchdbAuthOnly', 'headers'];
5215
+ const _requiredParams = ['db'];
5216
+ const _validParams = ['db', 'admins', 'cloudant', 'couchdbAuthOnly', 'members', 'headers'];
5096
5217
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5097
5218
  if (_validationErrors) {
5098
5219
  return Promise.reject(_validationErrors);
5099
5220
  }
5100
5221
  const body = {
5101
- 'cloudant': _params.cloudant,
5102
5222
  'admins': CloudantV1.SecurityObject.serialize(_params.admins),
5103
- 'members': CloudantV1.SecurityObject.serialize(_params.members),
5223
+ 'cloudant': _params.cloudant,
5104
5224
  'couchdb_auth_only': _params.couchdbAuthOnly,
5225
+ 'members': CloudantV1.SecurityObject.serialize(_params.members),
5105
5226
  };
5106
5227
  const path = {
5107
5228
  'db': _params.db,
5108
5229
  };
5109
- 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');
5110
5231
  const parameters = {
5111
5232
  options: {
5112
- url: '/_api/v2/db/{db}/_security',
5233
+ url: '/{db}/_security',
5113
5234
  method: 'PUT',
5114
5235
  body,
5115
5236
  path,
@@ -5318,7 +5439,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5318
5439
  * @param {string} params.db - Path parameter to specify the database name.
5319
5440
  * @param {string} params.docId - Path parameter to specify the document ID.
5320
5441
  * @param {string} params.attachmentName - Path parameter to specify the attachment name.
5321
- * @param {string} [params.accept] - The type of the response: or *_/_*.
5442
+ * @param {string} [params.accept] - The type of the response: *_/_*.
5322
5443
  * @param {string} [params.ifMatch] - Header parameter for a conditional HTTP request matching an ETag.
5323
5444
  * @param {string} [params.ifNoneMatch] - Header parameter for a conditional HTTP request not matching an ETag.
5324
5445
  * @param {string} [params.range] - Header parameter to specify the byte range for a request. This allows the
@@ -5800,17 +5921,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
5800
5921
  return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ActiveTask.deserialize);
5801
5922
  }
5802
5923
  /**
5803
- * Retrieve cluster membership information.
5924
+ * Retrieve Activity Tracker events information.
5804
5925
  *
5805
- * Displays the nodes that are part of the cluster as `cluster_nodes`. The field, `all_nodes`, displays all nodes this
5806
- * node knows about, including the ones that are part of the cluster. This endpoint is useful when you set up a
5807
- * cluster.
5926
+ * Check event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance.
5808
5927
  *
5809
5928
  * @param {Object} [params] - The parameters to send to the service.
5810
5929
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5811
- * @returns {Promise<CloudantV1.Response<CloudantV1.MembershipInformation>>}
5930
+ * @returns {Promise<CloudantV1.Response<CloudantV1.ActivityTrackerEvents>>}
5812
5931
  */
5813
- getMembershipInformation(params) {
5932
+ getActivityTrackerEvents(params) {
5814
5933
  const _params = { ...params };
5815
5934
  const _requiredParams = [];
5816
5935
  const _validParams = ['headers'];
@@ -5818,10 +5937,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
5818
5937
  if (_validationErrors) {
5819
5938
  return Promise.reject(_validationErrors);
5820
5939
  }
5821
- 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');
5822
5941
  const parameters = {
5823
5942
  options: {
5824
- url: '/_membership',
5943
+ url: '/_api/v2/user/activity_tracker/events',
5825
5944
  method: 'GET',
5826
5945
  },
5827
5946
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
@@ -5830,52 +5949,58 @@ class CloudantV1 extends cloudantBaseService_1.default {
5830
5949
  }, _params.headers),
5831
5950
  }),
5832
5951
  };
5833
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.MembershipInformation.deserialize);
5952
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ActivityTrackerEvents.deserialize);
5834
5953
  }
5835
5954
  /**
5836
- * Retrieve information about whether the server is up.
5837
- *
5838
- * Confirms that the server is up, running, and ready to respond to requests. If `maintenance_mode` is `true` or
5839
- * `nolb`, the endpoint returns a 404 response.
5955
+ * Modify Activity Tracker events configuration.
5840
5956
  *
5841
- * **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.
5842
5958
  *
5843
- * @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.
5844
5962
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5845
- * @returns {Promise<CloudantV1.Response<CloudantV1.UpInformation>>}
5963
+ * @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
5846
5964
  */
5847
- getUpInformation(params) {
5965
+ postActivityTrackerEvents(params) {
5848
5966
  const _params = { ...params };
5849
- const _requiredParams = [];
5850
- const _validParams = ['headers'];
5967
+ const _requiredParams = ['types'];
5968
+ const _validParams = ['types', 'headers'];
5851
5969
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5852
5970
  if (_validationErrors) {
5853
5971
  return Promise.reject(_validationErrors);
5854
5972
  }
5855
- 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');
5856
5977
  const parameters = {
5857
5978
  options: {
5858
- url: '/_up',
5859
- method: 'GET',
5979
+ url: '/_api/v2/user/activity_tracker/events',
5980
+ method: 'POST',
5981
+ body,
5860
5982
  },
5861
5983
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5862
5984
  headers: (0, extend_1.default)(true, sdkHeaders, {
5863
5985
  'Accept': 'application/json',
5986
+ 'Content-Type': 'application/json',
5864
5987
  }, _params.headers),
5865
5988
  }),
5866
5989
  };
5867
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.UpInformation.deserialize);
5990
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.Ok.deserialize);
5868
5991
  }
5869
5992
  /**
5870
- * Retrieve Activity Tracker events information.
5993
+ * Retrieve the current provisioned throughput capacity consumption.
5871
5994
  *
5872
- * 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.
5873
5998
  *
5874
5999
  * @param {Object} [params] - The parameters to send to the service.
5875
6000
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5876
- * @returns {Promise<CloudantV1.Response<CloudantV1.ActivityTrackerEvents>>}
6001
+ * @returns {Promise<CloudantV1.Response<CloudantV1.CurrentThroughputInformation>>}
5877
6002
  */
5878
- getActivityTrackerEvents(params) {
6003
+ getCurrentThroughputInformation(params) {
5879
6004
  const _params = { ...params };
5880
6005
  const _requiredParams = [];
5881
6006
  const _validParams = ['headers'];
@@ -5883,10 +6008,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
5883
6008
  if (_validationErrors) {
5884
6009
  return Promise.reject(_validationErrors);
5885
6010
  }
5886
- 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');
5887
6012
  const parameters = {
5888
6013
  options: {
5889
- url: '/_api/v2/user/activity_tracker/events',
6014
+ url: '/_api/v2/user/current/throughput',
5890
6015
  method: 'GET',
5891
6016
  },
5892
6017
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
@@ -5895,58 +6020,54 @@ class CloudantV1 extends cloudantBaseService_1.default {
5895
6020
  }, _params.headers),
5896
6021
  }),
5897
6022
  };
5898
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ActivityTrackerEvents.deserialize);
6023
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.CurrentThroughputInformation.deserialize);
5899
6024
  }
5900
6025
  /**
5901
- * Modify Activity Tracker events configuration.
6026
+ * Retrieve cluster membership information.
5902
6027
  *
5903
- * 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.
5904
6031
  *
5905
- * @param {Object} params - The parameters to send to the service.
5906
- * @param {string[]} params.types - An array of event types that are being sent to IBM Cloud Activity Tracker for the
5907
- * IBM Cloudant instance. "management" is a required element of this array.
6032
+ * @param {Object} [params] - The parameters to send to the service.
5908
6033
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5909
- * @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
6034
+ * @returns {Promise<CloudantV1.Response<CloudantV1.MembershipInformation>>}
5910
6035
  */
5911
- postActivityTrackerEvents(params) {
6036
+ getMembershipInformation(params) {
5912
6037
  const _params = { ...params };
5913
- const _requiredParams = ['types'];
5914
- const _validParams = ['types', 'headers'];
6038
+ const _requiredParams = [];
6039
+ const _validParams = ['headers'];
5915
6040
  const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
5916
6041
  if (_validationErrors) {
5917
6042
  return Promise.reject(_validationErrors);
5918
6043
  }
5919
- const body = {
5920
- 'types': _params.types,
5921
- };
5922
- 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');
5923
6045
  const parameters = {
5924
6046
  options: {
5925
- url: '/_api/v2/user/activity_tracker/events',
5926
- method: 'POST',
5927
- body,
6047
+ url: '/_membership',
6048
+ method: 'GET',
5928
6049
  },
5929
6050
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
5930
6051
  headers: (0, extend_1.default)(true, sdkHeaders, {
5931
6052
  'Accept': 'application/json',
5932
- 'Content-Type': 'application/json',
5933
6053
  }, _params.headers),
5934
6054
  }),
5935
6055
  };
5936
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.Ok.deserialize);
6056
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.MembershipInformation.deserialize);
5937
6057
  }
5938
6058
  /**
5939
- * Retrieve the current provisioned throughput capacity consumption.
6059
+ * Retrieve information about whether the server is up.
5940
6060
  *
5941
- * View the current consumption of provisioned throughput capacity for an IBM Cloudant instance. The current
5942
- * consumption shows the quantities of reads, writes, and global queries conducted against the instance for a given
5943
- * 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.
5944
6065
  *
5945
6066
  * @param {Object} [params] - The parameters to send to the service.
5946
6067
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5947
- * @returns {Promise<CloudantV1.Response<CloudantV1.CurrentThroughputInformation>>}
6068
+ * @returns {Promise<CloudantV1.Response<CloudantV1.UpInformation>>}
5948
6069
  */
5949
- getCurrentThroughputInformation(params) {
6070
+ getUpInformation(params) {
5950
6071
  const _params = { ...params };
5951
6072
  const _requiredParams = [];
5952
6073
  const _validParams = ['headers'];
@@ -5954,10 +6075,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
5954
6075
  if (_validationErrors) {
5955
6076
  return Promise.reject(_validationErrors);
5956
6077
  }
5957
- 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');
5958
6079
  const parameters = {
5959
6080
  options: {
5960
- url: '/_api/v2/user/current/throughput',
6081
+ url: '/_up',
5961
6082
  method: 'GET',
5962
6083
  },
5963
6084
  defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
@@ -5966,7 +6087,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
5966
6087
  }, _params.headers),
5967
6088
  }),
5968
6089
  };
5969
- return this.createRequestAndDeserializeResponse(parameters, CloudantV1.CurrentThroughputInformation.deserialize);
6090
+ return this.createRequestAndDeserializeResponse(parameters, CloudantV1.UpInformation.deserialize);
5970
6091
  }
5971
6092
  }
5972
6093
  /*************************
@@ -6002,6 +6123,12 @@ class CloudantV1 extends cloudantBaseService_1.default {
6002
6123
  Feed["LONGPOLL"] = "longpoll";
6003
6124
  Feed["NORMAL"] = "normal";
6004
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 = {}));
6005
6132
  })(PostChangesConstants = CloudantV1.PostChangesConstants || (CloudantV1.PostChangesConstants = {}));
6006
6133
  /** Constants for the `postChangesAsStream` operation. */
6007
6134
  let PostChangesAsStreamConstants;
@@ -6014,6 +6141,12 @@ class CloudantV1 extends cloudantBaseService_1.default {
6014
6141
  Feed["LONGPOLL"] = "longpoll";
6015
6142
  Feed["NORMAL"] = "normal";
6016
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 = {}));
6017
6150
  })(PostChangesAsStreamConstants = CloudantV1.PostChangesAsStreamConstants || (CloudantV1.PostChangesAsStreamConstants = {}));
6018
6151
  /** Constants for the `postDocument` operation. */
6019
6152
  let PostDocumentConstants;
@@ -6338,6 +6471,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
6338
6471
  Stale["OK"] = "ok";
6339
6472
  })(Stale = PostSearchAsStreamConstants.Stale || (PostSearchAsStreamConstants.Stale = {}));
6340
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 = {}));
6341
6483
  /** Constants for the `deleteReplicationDocument` operation. */
6342
6484
  let DeleteReplicationDocumentConstants;
6343
6485
  (function (DeleteReplicationDocumentConstants) {
@@ -6371,9 +6513,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
6371
6513
  States["FAILED"] = "failed";
6372
6514
  })(States = GetSchedulerDocsConstants.States || (GetSchedulerDocsConstants.States = {}));
6373
6515
  })(GetSchedulerDocsConstants = CloudantV1.GetSchedulerDocsConstants || (CloudantV1.GetSchedulerDocsConstants = {}));
6374
- /** Constants for the `putSecurity` operation. */
6375
- let PutSecurityConstants;
6376
- (function (PutSecurityConstants) {
6516
+ /** Constants for the `putCloudantSecurityConfiguration` operation. */
6517
+ let PutCloudantSecurityConfigurationConstants;
6518
+ (function (PutCloudantSecurityConfigurationConstants) {
6377
6519
  /** Database permissions for Cloudant users and/or API keys. */
6378
6520
  let Cloudant;
6379
6521
  (function (Cloudant) {
@@ -6385,11 +6527,11 @@ class CloudantV1 extends cloudantBaseService_1.default {
6385
6527
  Cloudant["DESIGN"] = "_design";
6386
6528
  Cloudant["SHARDS"] = "_shards";
6387
6529
  Cloudant["SECURITY"] = "_security";
6388
- })(Cloudant = PutSecurityConstants.Cloudant || (PutSecurityConstants.Cloudant = {}));
6389
- })(PutSecurityConstants = CloudantV1.PutSecurityConstants || (CloudantV1.PutSecurityConstants = {}));
6390
- /** Constants for the `putCloudantSecurityConfiguration` operation. */
6391
- let PutCloudantSecurityConfigurationConstants;
6392
- (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) {
6393
6535
  /** Database permissions for Cloudant users and/or API keys. */
6394
6536
  let Cloudant;
6395
6537
  (function (Cloudant) {
@@ -6401,8 +6543,8 @@ class CloudantV1 extends cloudantBaseService_1.default {
6401
6543
  Cloudant["DESIGN"] = "_design";
6402
6544
  Cloudant["SHARDS"] = "_shards";
6403
6545
  Cloudant["SECURITY"] = "_security";
6404
- })(Cloudant = PutCloudantSecurityConfigurationConstants.Cloudant || (PutCloudantSecurityConfigurationConstants.Cloudant = {}));
6405
- })(PutCloudantSecurityConfigurationConstants = CloudantV1.PutCloudantSecurityConfigurationConstants || (CloudantV1.PutCloudantSecurityConfigurationConstants = {}));
6546
+ })(Cloudant = PutSecurityConstants.Cloudant || (PutSecurityConstants.Cloudant = {}));
6547
+ })(PutSecurityConstants = CloudantV1.PutSecurityConstants || (CloudantV1.PutSecurityConstants = {}));
6406
6548
  /** Constants for the `deleteAttachment` operation. */
6407
6549
  let DeleteAttachmentConstants;
6408
6550
  (function (DeleteAttachmentConstants) {
@@ -6547,7 +6689,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
6547
6689
  type;
6548
6690
  /** Schema for a Unix epoch timestamp. */
6549
6691
  updatedOn;
6550
- /** Name of user running replication or owning the indexer. Available for `indexer`, `replication` type tasks. */
6692
+ /** Name of user running the process. */
6551
6693
  user;
6552
6694
  /** Number of view indexes. Available for `view_compaction` type tasks. */
6553
6695
  view;
@@ -7009,7 +7151,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
7009
7151
  * Schema for the result of an all documents operation.
7010
7152
  */
7011
7153
  class AllDocsResult {
7012
- /** Number of total rows. */
7154
+ /** Total number of document results. */
7013
7155
  totalRows;
7014
7156
  /** List of doc results. */
7015
7157
  rows;
@@ -7973,7 +8115,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
7973
8115
  compactRunning;
7974
8116
  /** An opaque string that describes the compaction state of the database. */
7975
8117
  compactedSeq;
7976
- /** The name of the database. */
8118
+ /** Schema for a database name. */
7977
8119
  dbName;
7978
8120
  /** The version of the physical format used for the data when it is stored on disk. */
7979
8121
  diskFormatVersion;
@@ -7987,6 +8129,8 @@ class CloudantV1 extends cloudantBaseService_1.default {
7987
8129
  * old replicator versions. Do not use the value to infer timing infromation. Typically only used by replicators.
7988
8130
  */
7989
8131
  instanceStartTime;
8132
+ /** Information about database's partitioned indexes. */
8133
+ partitionedIndexes;
7990
8134
  /** Schema for database properties. */
7991
8135
  props;
7992
8136
  /** Schema for size information of content. */
@@ -7997,8 +8141,6 @@ class CloudantV1 extends cloudantBaseService_1.default {
7997
8141
  updateSeq;
7998
8142
  /** The UUID of the database. */
7999
8143
  uuid;
8000
- /** Information about database's partitioned indexes. */
8001
- partitionedIndexes;
8002
8144
  static serialize(obj) {
8003
8145
  if (obj === undefined || obj === null || typeof obj === 'string') {
8004
8146
  return obj;
@@ -8034,6 +8176,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
8034
8176
  if (obj.instanceStartTime !== undefined) {
8035
8177
  copy.instance_start_time = obj.instanceStartTime;
8036
8178
  }
8179
+ if (obj.partitionedIndexes !== undefined) {
8180
+ copy.partitioned_indexes = PartitionedIndexesInformation.serialize(obj.partitionedIndexes);
8181
+ }
8037
8182
  if (obj.props !== undefined) {
8038
8183
  copy.props = DatabaseInformationProps.serialize(obj.props);
8039
8184
  }
@@ -8046,9 +8191,6 @@ class CloudantV1 extends cloudantBaseService_1.default {
8046
8191
  if (obj.uuid !== undefined) {
8047
8192
  copy.uuid = obj.uuid;
8048
8193
  }
8049
- if (obj.partitionedIndexes !== undefined) {
8050
- copy.partitioned_indexes = PartitionedIndexesInformation.serialize(obj.partitionedIndexes);
8051
- }
8052
8194
  return copy;
8053
8195
  }
8054
8196
  static deserialize(obj) {
@@ -8086,6 +8228,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
8086
8228
  if (obj.instance_start_time !== undefined) {
8087
8229
  copy.instanceStartTime = obj.instance_start_time;
8088
8230
  }
8231
+ if (obj.partitioned_indexes !== undefined) {
8232
+ copy.partitionedIndexes = PartitionedIndexesInformation.deserialize(obj.partitioned_indexes);
8233
+ }
8089
8234
  if (obj.props !== undefined) {
8090
8235
  copy.props = DatabaseInformationProps.deserialize(obj.props);
8091
8236
  }
@@ -8098,9 +8243,6 @@ class CloudantV1 extends cloudantBaseService_1.default {
8098
8243
  if (obj.uuid !== undefined) {
8099
8244
  copy.uuid = obj.uuid;
8100
8245
  }
8101
- if (obj.partitioned_indexes !== undefined) {
8102
- copy.partitionedIndexes = PartitionedIndexesInformation.deserialize(obj.partitioned_indexes);
8103
- }
8104
8246
  return copy;
8105
8247
  }
8106
8248
  }
@@ -8191,7 +8333,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
8191
8333
  * Schema for a database change event.
8192
8334
  */
8193
8335
  class DbEvent {
8194
- /** Database name. */
8336
+ /** Schema for a database name. */
8195
8337
  dbName;
8196
8338
  /** Sequence number. */
8197
8339
  seq;
@@ -8287,7 +8429,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
8287
8429
  error;
8288
8430
  /** Schema for information about a database. */
8289
8431
  info;
8290
- /** Database name. */
8432
+ /** Schema for a database name. */
8291
8433
  key;
8292
8434
  static serialize(obj) {
8293
8435
  if (obj === undefined || obj === null || typeof obj === 'string') {
@@ -8337,7 +8479,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
8337
8479
  _deleted;
8338
8480
  /** Schema for a list of document revision identifiers. */
8339
8481
  _deleted_conflicts;
8340
- /** Schema for a design document ID. */
8482
+ /** Schema for a design document ID including a `_design/` prefix. */
8341
8483
  _id;
8342
8484
  /** Document's update sequence in current database. Available if requested with local_seq=true query parameter. */
8343
8485
  _local_seq;
@@ -8793,9 +8935,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
8793
8935
  ref;
8794
8936
  /** Schema for a document. */
8795
8937
  doc;
8796
- /** id. */
8938
+ /** Schema for a document ID. */
8797
8939
  id;
8798
- /** Document ID. */
8940
+ /** Schema for a document ID. */
8799
8941
  key;
8800
8942
  /** Value of built-in `/_all_docs` style view. */
8801
8943
  value;
@@ -9253,7 +9395,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
9253
9395
  class ExplainResult {
9254
9396
  /** When `true`, the query is answered using the index only and no documents are fetched. */
9255
9397
  covering;
9256
- /** Name of database. */
9398
+ /** Schema for a database name. */
9257
9399
  dbname;
9258
9400
  /** Fields that were requested to be projected from the document. If no fields were requested to be projected
9259
9401
  * this will be empty and all fields will be returned.
@@ -9507,6 +9649,12 @@ class CloudantV1 extends cloudantBaseService_1.default {
9507
9649
  (function (ExplainResultMrArgs) {
9508
9650
  let Constants;
9509
9651
  (function (Constants) {
9652
+ /** Direction parameter passed to the underlying view. */
9653
+ let Direction;
9654
+ (function (Direction) {
9655
+ Direction["FWD"] = "fwd";
9656
+ Direction["REV"] = "rev";
9657
+ })(Direction = Constants.Direction || (Constants.Direction = {}));
9510
9658
  /** The type of the underlying view. */
9511
9659
  let ViewType;
9512
9660
  (function (ViewType) {
@@ -10030,7 +10178,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
10030
10178
  * Schema for information about an index.
10031
10179
  */
10032
10180
  class IndexInformation {
10033
- /** Design document ID including a `_design/` prefix. */
10181
+ /** Schema for a nullable design document ID including a `_design/` prefix. */
10034
10182
  ddoc;
10035
10183
  /** Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration
10036
10184
  * properties that do not apply to `json` indexes, these are:
@@ -10198,7 +10346,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
10198
10346
  * Schema for information about the indexes in a database.
10199
10347
  */
10200
10348
  class IndexesInformation {
10201
- /** Number of total rows. */
10349
+ /** Total number of query indexes in the database. */
10202
10350
  totalRows;
10203
10351
  /** Indexes. */
10204
10352
  indexes;
@@ -10298,13 +10446,13 @@ class CloudantV1 extends cloudantBaseService_1.default {
10298
10446
  * Schema for information about a database partition.
10299
10447
  */
10300
10448
  class PartitionInformation {
10301
- /** The name of the database. */
10449
+ /** Schema for a database name. */
10302
10450
  dbName;
10303
10451
  /** A count of the documents in the specified database partition. */
10304
10452
  docCount;
10305
10453
  /** Number of deleted documents. */
10306
10454
  docDelCount;
10307
- /** The name of the partition in the database. */
10455
+ /** Schema for a partition key. */
10308
10456
  partition;
10309
10457
  /** Schema for information about the partition index count and limit in a database. */
10310
10458
  partitionedIndexes;
@@ -10690,7 +10838,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
10690
10838
  class ReplicationDatabaseAuthBasic {
10691
10839
  /** The password associated with the username. */
10692
10840
  password;
10693
- /** The username. */
10841
+ /** Schema for a username. */
10694
10842
  username;
10695
10843
  static serialize(obj) {
10696
10844
  if (obj === undefined || obj === null || typeof obj === 'string') {
@@ -11263,7 +11411,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
11263
11411
  * Schema for a listing of replication scheduler documents.
11264
11412
  */
11265
11413
  class SchedulerDocsResult {
11266
- /** Number of total rows. */
11414
+ /** Total number of replication scheduler documents. */
11267
11415
  totalRows;
11268
11416
  /** Array of replication scheduler doc objects. */
11269
11417
  docs;
@@ -11573,7 +11721,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
11573
11721
  startTime;
11574
11722
  /** Replication target. */
11575
11723
  target;
11576
- /** Name of user running replication. */
11724
+ /** Name of user running the process. */
11577
11725
  user;
11578
11726
  static serialize(obj) {
11579
11727
  if (obj === undefined || obj === null || typeof obj === 'string') {
@@ -11705,7 +11853,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
11705
11853
  * Schema for a listing of replication scheduler jobs.
11706
11854
  */
11707
11855
  class SchedulerJobsResult {
11708
- /** Number of total rows. */
11856
+ /** Total number of replication jobs. */
11709
11857
  totalRows;
11710
11858
  /** Array of replication job objects. */
11711
11859
  jobs;
@@ -11765,6 +11913,42 @@ class CloudantV1 extends cloudantBaseService_1.default {
11765
11913
  }
11766
11914
  }
11767
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;
11768
11952
  /**
11769
11953
  * Schema for a search index definition.
11770
11954
  */
@@ -11820,6 +12004,34 @@ class CloudantV1 extends cloudantBaseService_1.default {
11820
12004
  }
11821
12005
  }
11822
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;
11823
12035
  /**
11824
12036
  * Schema for metadata information about a search index.
11825
12037
  */
@@ -11928,7 +12140,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
11928
12140
  * Schema for the result of a query search operation.
11929
12141
  */
11930
12142
  class SearchResult {
11931
- /** 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
+ */
11932
12146
  totalRows;
11933
12147
  /** Opaque bookmark token used when paginating results. */
11934
12148
  bookmark;
@@ -12006,7 +12220,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
12006
12220
  * Schema for the result of a query search operation.
12007
12221
  */
12008
12222
  class SearchResultProperties {
12009
- /** 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
+ */
12010
12226
  totalRows;
12011
12227
  /** Opaque bookmark token used when paginating results. */
12012
12228
  bookmark;
@@ -12132,12 +12348,12 @@ class CloudantV1 extends cloudantBaseService_1.default {
12132
12348
  class Security {
12133
12349
  /** Schema for names and roles to map to a database permission. */
12134
12350
  admins;
12135
- /** Schema for names and roles to map to a database permission. */
12136
- members;
12137
12351
  /** Database permissions for Cloudant users and/or API keys. */
12138
12352
  cloudant;
12139
12353
  /** Manage permissions using the `_users` database only. */
12140
12354
  couchdbAuthOnly;
12355
+ /** Schema for names and roles to map to a database permission. */
12356
+ members;
12141
12357
  static serialize(obj) {
12142
12358
  if (obj === undefined || obj === null || typeof obj === 'string') {
12143
12359
  return obj;
@@ -12146,15 +12362,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
12146
12362
  if (obj.admins !== undefined) {
12147
12363
  copy.admins = SecurityObject.serialize(obj.admins);
12148
12364
  }
12149
- if (obj.members !== undefined) {
12150
- copy.members = SecurityObject.serialize(obj.members);
12151
- }
12152
12365
  if (obj.cloudant !== undefined) {
12153
12366
  copy.cloudant = obj.cloudant;
12154
12367
  }
12155
12368
  if (obj.couchdbAuthOnly !== undefined) {
12156
12369
  copy.couchdb_auth_only = obj.couchdbAuthOnly;
12157
12370
  }
12371
+ if (obj.members !== undefined) {
12372
+ copy.members = SecurityObject.serialize(obj.members);
12373
+ }
12158
12374
  return copy;
12159
12375
  }
12160
12376
  static deserialize(obj) {
@@ -12165,15 +12381,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
12165
12381
  if (obj.admins !== undefined) {
12166
12382
  copy.admins = SecurityObject.deserialize(obj.admins);
12167
12383
  }
12168
- if (obj.members !== undefined) {
12169
- copy.members = SecurityObject.deserialize(obj.members);
12170
- }
12171
12384
  if (obj.cloudant !== undefined) {
12172
12385
  copy.cloudant = obj.cloudant;
12173
12386
  }
12174
12387
  if (obj.couchdb_auth_only !== undefined) {
12175
12388
  copy.couchdbAuthOnly = obj.couchdb_auth_only;
12176
12389
  }
12390
+ if (obj.members !== undefined) {
12391
+ copy.members = SecurityObject.deserialize(obj.members);
12392
+ }
12177
12393
  return copy;
12178
12394
  }
12179
12395
  }
@@ -12277,12 +12493,12 @@ class CloudantV1 extends cloudantBaseService_1.default {
12277
12493
  couchdb;
12278
12494
  /** List of enabled optional features. */
12279
12495
  features;
12496
+ /** List of feature flags. */
12497
+ featuresFlags;
12280
12498
  /** Schema for server vendor information. */
12281
12499
  vendor;
12282
12500
  /** Apache CouchDB version. */
12283
12501
  version;
12284
- /** List of feature flags. */
12285
- featuresFlags;
12286
12502
  static serialize(obj) {
12287
12503
  if (obj === undefined || obj === null || typeof obj === 'string') {
12288
12504
  return obj;
@@ -12294,15 +12510,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
12294
12510
  if (obj.features !== undefined) {
12295
12511
  copy.features = obj.features;
12296
12512
  }
12513
+ if (obj.featuresFlags !== undefined) {
12514
+ copy.features_flags = obj.featuresFlags;
12515
+ }
12297
12516
  if (obj.vendor !== undefined) {
12298
12517
  copy.vendor = ServerVendor.serialize(obj.vendor);
12299
12518
  }
12300
12519
  if (obj.version !== undefined) {
12301
12520
  copy.version = obj.version;
12302
12521
  }
12303
- if (obj.featuresFlags !== undefined) {
12304
- copy.features_flags = obj.featuresFlags;
12305
- }
12306
12522
  return copy;
12307
12523
  }
12308
12524
  static deserialize(obj) {
@@ -12316,15 +12532,15 @@ class CloudantV1 extends cloudantBaseService_1.default {
12316
12532
  if (obj.features !== undefined) {
12317
12533
  copy.features = obj.features;
12318
12534
  }
12535
+ if (obj.features_flags !== undefined) {
12536
+ copy.featuresFlags = obj.features_flags;
12537
+ }
12319
12538
  if (obj.vendor !== undefined) {
12320
12539
  copy.vendor = ServerVendor.deserialize(obj.vendor);
12321
12540
  }
12322
12541
  if (obj.version !== undefined) {
12323
12542
  copy.version = obj.version;
12324
12543
  }
12325
- if (obj.features_flags !== undefined) {
12326
- copy.featuresFlags = obj.features_flags;
12327
- }
12328
12544
  return copy;
12329
12545
  }
12330
12546
  }
@@ -12395,6 +12611,16 @@ class CloudantV1 extends cloudantBaseService_1.default {
12395
12611
  }
12396
12612
  }
12397
12613
  CloudantV1.ServerVendor = ServerVendor;
12614
+ (function (ServerVendor) {
12615
+ let Constants;
12616
+ (function (Constants) {
12617
+ /** Vendor variant. */
12618
+ let Variant;
12619
+ (function (Variant) {
12620
+ Variant["PAAS"] = "paas";
12621
+ })(Variant = Constants.Variant || (Constants.Variant = {}));
12622
+ })(Constants = ServerVendor.Constants || (ServerVendor.Constants = {}));
12623
+ })(ServerVendor = CloudantV1.ServerVendor || (CloudantV1.ServerVendor = {}));
12398
12624
  /**
12399
12625
  * Schema for session authentication information.
12400
12626
  */
@@ -12666,7 +12892,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
12666
12892
  class UserContext {
12667
12893
  /** Database name in the context of the provided operation. */
12668
12894
  db;
12669
- /** User name. */
12895
+ /** Name of user running the process. */
12670
12896
  name;
12671
12897
  /** List of user roles. */
12672
12898
  roles;
@@ -13006,7 +13232,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
13006
13232
  * Schema for the result of a query view operation.
13007
13233
  */
13008
13234
  class ViewResult {
13009
- /** 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
+ */
13010
13239
  totalRows;
13011
13240
  /** Current update sequence for the database. */
13012
13241
  updateSeq;