@ibm-cloud/cloudant 0.10.2 → 0.11.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/README.md +8 -8
- package/cloudant/v1.d.ts +119 -62
- package/cloudant/v1.js +94 -44
- package/cloudant/v1.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/lib/cloudantBaseService.d.ts +2 -1
- package/lib/cloudantBaseService.js +12 -3
- package/lib/cloudantBaseService.js.map +1 -1
- package/lib/errorResponseInterceptor.d.ts +28 -0
- package/lib/errorResponseInterceptor.js +105 -0
- package/lib/errorResponseInterceptor.js.map +1 -0
- package/package.json +11 -10
package/cloudant/v1.js
CHANGED
|
@@ -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
|
|
3335
|
-
* full scan of all documents
|
|
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
|
|
3388
|
-
* recommended because it has a
|
|
3389
|
-
* In this case the response body
|
|
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
|
|
3463
|
-
* full scan of all documents
|
|
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
|
|
3516
|
-
* recommended because it has a
|
|
3517
|
-
* In this case the response body
|
|
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
|
|
3591
|
-
* full scan of all documents
|
|
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
|
|
3713
|
-
* full scan of all documents
|
|
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
|
|
3770
|
-
* recommended because it has a significant performance impact causing a full scan of the database with each
|
|
3771
|
-
* In this case the response body
|
|
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
|
|
3840
|
-
* full scan of all documents
|
|
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
|
|
3897
|
-
* recommended because it has a significant performance impact causing a full scan of the database with each
|
|
3898
|
-
* In this case the response body
|
|
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
|
|
3967
|
-
* full scan of all documents
|
|
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,
|
|
@@ -6547,7 +6581,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
6547
6581
|
type;
|
|
6548
6582
|
/** Schema for a Unix epoch timestamp. */
|
|
6549
6583
|
updatedOn;
|
|
6550
|
-
/** Name of user running
|
|
6584
|
+
/** Name of user running the process. */
|
|
6551
6585
|
user;
|
|
6552
6586
|
/** Number of view indexes. Available for `view_compaction` type tasks. */
|
|
6553
6587
|
view;
|
|
@@ -7973,7 +8007,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
7973
8007
|
compactRunning;
|
|
7974
8008
|
/** An opaque string that describes the compaction state of the database. */
|
|
7975
8009
|
compactedSeq;
|
|
7976
|
-
/**
|
|
8010
|
+
/** Schema for a database name. */
|
|
7977
8011
|
dbName;
|
|
7978
8012
|
/** The version of the physical format used for the data when it is stored on disk. */
|
|
7979
8013
|
diskFormatVersion;
|
|
@@ -8191,7 +8225,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
8191
8225
|
* Schema for a database change event.
|
|
8192
8226
|
*/
|
|
8193
8227
|
class DbEvent {
|
|
8194
|
-
/**
|
|
8228
|
+
/** Schema for a database name. */
|
|
8195
8229
|
dbName;
|
|
8196
8230
|
/** Sequence number. */
|
|
8197
8231
|
seq;
|
|
@@ -8287,7 +8321,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
8287
8321
|
error;
|
|
8288
8322
|
/** Schema for information about a database. */
|
|
8289
8323
|
info;
|
|
8290
|
-
/**
|
|
8324
|
+
/** Schema for a database name. */
|
|
8291
8325
|
key;
|
|
8292
8326
|
static serialize(obj) {
|
|
8293
8327
|
if (obj === undefined || obj === null || typeof obj === 'string') {
|
|
@@ -8337,7 +8371,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
8337
8371
|
_deleted;
|
|
8338
8372
|
/** Schema for a list of document revision identifiers. */
|
|
8339
8373
|
_deleted_conflicts;
|
|
8340
|
-
/** Schema for a design document ID. */
|
|
8374
|
+
/** Schema for a design document ID including a `_design/` prefix. */
|
|
8341
8375
|
_id;
|
|
8342
8376
|
/** Document's update sequence in current database. Available if requested with local_seq=true query parameter. */
|
|
8343
8377
|
_local_seq;
|
|
@@ -8793,9 +8827,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
8793
8827
|
ref;
|
|
8794
8828
|
/** Schema for a document. */
|
|
8795
8829
|
doc;
|
|
8796
|
-
/**
|
|
8830
|
+
/** Schema for a document ID. */
|
|
8797
8831
|
id;
|
|
8798
|
-
/**
|
|
8832
|
+
/** Schema for a document ID. */
|
|
8799
8833
|
key;
|
|
8800
8834
|
/** Value of built-in `/_all_docs` style view. */
|
|
8801
8835
|
value;
|
|
@@ -9253,7 +9287,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
9253
9287
|
class ExplainResult {
|
|
9254
9288
|
/** When `true`, the query is answered using the index only and no documents are fetched. */
|
|
9255
9289
|
covering;
|
|
9256
|
-
/**
|
|
9290
|
+
/** Schema for a database name. */
|
|
9257
9291
|
dbname;
|
|
9258
9292
|
/** Fields that were requested to be projected from the document. If no fields were requested to be projected
|
|
9259
9293
|
* this will be empty and all fields will be returned.
|
|
@@ -9507,6 +9541,12 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
9507
9541
|
(function (ExplainResultMrArgs) {
|
|
9508
9542
|
let Constants;
|
|
9509
9543
|
(function (Constants) {
|
|
9544
|
+
/** Direction parameter passed to the underlying view. */
|
|
9545
|
+
let Direction;
|
|
9546
|
+
(function (Direction) {
|
|
9547
|
+
Direction["ASC"] = "asc";
|
|
9548
|
+
Direction["DESC"] = "desc";
|
|
9549
|
+
})(Direction = Constants.Direction || (Constants.Direction = {}));
|
|
9510
9550
|
/** The type of the underlying view. */
|
|
9511
9551
|
let ViewType;
|
|
9512
9552
|
(function (ViewType) {
|
|
@@ -10030,7 +10070,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
10030
10070
|
* Schema for information about an index.
|
|
10031
10071
|
*/
|
|
10032
10072
|
class IndexInformation {
|
|
10033
|
-
/**
|
|
10073
|
+
/** Schema for a nullable design document ID including a `_design/` prefix. */
|
|
10034
10074
|
ddoc;
|
|
10035
10075
|
/** Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration
|
|
10036
10076
|
* properties that do not apply to `json` indexes, these are:
|
|
@@ -10298,13 +10338,13 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
10298
10338
|
* Schema for information about a database partition.
|
|
10299
10339
|
*/
|
|
10300
10340
|
class PartitionInformation {
|
|
10301
|
-
/**
|
|
10341
|
+
/** Schema for a database name. */
|
|
10302
10342
|
dbName;
|
|
10303
10343
|
/** A count of the documents in the specified database partition. */
|
|
10304
10344
|
docCount;
|
|
10305
10345
|
/** Number of deleted documents. */
|
|
10306
10346
|
docDelCount;
|
|
10307
|
-
/**
|
|
10347
|
+
/** Schema for a partition key. */
|
|
10308
10348
|
partition;
|
|
10309
10349
|
/** Schema for information about the partition index count and limit in a database. */
|
|
10310
10350
|
partitionedIndexes;
|
|
@@ -10690,7 +10730,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
10690
10730
|
class ReplicationDatabaseAuthBasic {
|
|
10691
10731
|
/** The password associated with the username. */
|
|
10692
10732
|
password;
|
|
10693
|
-
/**
|
|
10733
|
+
/** Schema for a username. */
|
|
10694
10734
|
username;
|
|
10695
10735
|
static serialize(obj) {
|
|
10696
10736
|
if (obj === undefined || obj === null || typeof obj === 'string') {
|
|
@@ -11573,7 +11613,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
11573
11613
|
startTime;
|
|
11574
11614
|
/** Replication target. */
|
|
11575
11615
|
target;
|
|
11576
|
-
/** Name of user running
|
|
11616
|
+
/** Name of user running the process. */
|
|
11577
11617
|
user;
|
|
11578
11618
|
static serialize(obj) {
|
|
11579
11619
|
if (obj === undefined || obj === null || typeof obj === 'string') {
|
|
@@ -12395,6 +12435,16 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
12395
12435
|
}
|
|
12396
12436
|
}
|
|
12397
12437
|
CloudantV1.ServerVendor = ServerVendor;
|
|
12438
|
+
(function (ServerVendor) {
|
|
12439
|
+
let Constants;
|
|
12440
|
+
(function (Constants) {
|
|
12441
|
+
/** Vendor variant. */
|
|
12442
|
+
let Variant;
|
|
12443
|
+
(function (Variant) {
|
|
12444
|
+
Variant["PAAS"] = "paas";
|
|
12445
|
+
})(Variant = Constants.Variant || (Constants.Variant = {}));
|
|
12446
|
+
})(Constants = ServerVendor.Constants || (ServerVendor.Constants = {}));
|
|
12447
|
+
})(ServerVendor = CloudantV1.ServerVendor || (CloudantV1.ServerVendor = {}));
|
|
12398
12448
|
/**
|
|
12399
12449
|
* Schema for session authentication information.
|
|
12400
12450
|
*/
|
|
@@ -12666,7 +12716,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
12666
12716
|
class UserContext {
|
|
12667
12717
|
/** Database name in the context of the provided operation. */
|
|
12668
12718
|
db;
|
|
12669
|
-
/**
|
|
12719
|
+
/** Name of user running the process. */
|
|
12670
12720
|
name;
|
|
12671
12721
|
/** List of user roles. */
|
|
12672
12722
|
roles;
|