@ibm-cloud/cloudant 0.10.1 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -11
- package/auth/sessionTokenManager.d.ts +1 -1
- package/cloudant/features/changesFollower.d.ts +1 -2
- package/cloudant/features/changesFollower.js +2 -2
- package/cloudant/features/changesFollower.js.map +1 -1
- package/cloudant/features/changesResultItemStream.d.ts +2 -2
- package/cloudant/features/changesResultIterator.d.ts +1 -2
- package/cloudant/features/changesResultIterator.js +2 -2
- package/cloudant/features/changesResultIterator.js.map +1 -1
- package/cloudant/features/stream.d.ts +1 -1
- package/cloudant/features/stream.js +2 -2
- package/cloudant/features/stream.js.map +1 -1
- package/cloudant/v1.d.ts +340 -99
- package/cloudant/v1.js +225 -80
- package/cloudant/v1.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +6 -2
- package/index.js.map +1 -1
- package/lib/cloudantBaseService.js +4 -4
- package/lib/cloudantBaseService.js.map +1 -1
- package/lib/common.js +6 -30
- package/lib/common.js.map +1 -1
- package/package.json +15 -11
package/cloudant/v1.js
CHANGED
|
@@ -120,39 +120,6 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
120
120
|
};
|
|
121
121
|
return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ServerInformation.deserialize);
|
|
122
122
|
}
|
|
123
|
-
/**
|
|
124
|
-
* Retrieve cluster membership information.
|
|
125
|
-
*
|
|
126
|
-
* Displays the nodes that are part of the cluster as `cluster_nodes`. The field, `all_nodes`, displays all nodes this
|
|
127
|
-
* node knows about, including the ones that are part of the cluster. This endpoint is useful when you set up a
|
|
128
|
-
* cluster.
|
|
129
|
-
*
|
|
130
|
-
* @param {Object} [params] - The parameters to send to the service.
|
|
131
|
-
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
132
|
-
* @returns {Promise<CloudantV1.Response<CloudantV1.MembershipInformation>>}
|
|
133
|
-
*/
|
|
134
|
-
getMembershipInformation(params) {
|
|
135
|
-
const _params = { ...params };
|
|
136
|
-
const _requiredParams = [];
|
|
137
|
-
const _validParams = ['headers'];
|
|
138
|
-
const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
139
|
-
if (_validationErrors) {
|
|
140
|
-
return Promise.reject(_validationErrors);
|
|
141
|
-
}
|
|
142
|
-
const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getMembershipInformation');
|
|
143
|
-
const parameters = {
|
|
144
|
-
options: {
|
|
145
|
-
url: '/_membership',
|
|
146
|
-
method: 'GET',
|
|
147
|
-
},
|
|
148
|
-
defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
|
|
149
|
-
headers: (0, extend_1.default)(true, sdkHeaders, {
|
|
150
|
-
'Accept': 'application/json',
|
|
151
|
-
}, _params.headers),
|
|
152
|
-
}),
|
|
153
|
-
};
|
|
154
|
-
return this.createRequestAndDeserializeResponse(parameters, CloudantV1.MembershipInformation.deserialize);
|
|
155
|
-
}
|
|
156
123
|
/**
|
|
157
124
|
* Retrieve one or more UUIDs.
|
|
158
125
|
*
|
|
@@ -232,7 +199,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
232
199
|
*
|
|
233
200
|
* @param {Object} params - The parameters to send to the service.
|
|
234
201
|
* @param {number} params.blocks - A number of blocks of throughput units. A block consists of 100 reads/sec, 50
|
|
235
|
-
* writes/sec, and 5 global queries/sec of provisioned throughput capacity.
|
|
202
|
+
* writes/sec, and 5 global queries/sec of provisioned throughput capacity. Not available for some plans.
|
|
236
203
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
237
204
|
* @returns {Promise<CloudantV1.Response<CloudantV1.CapacityThroughputInformation>>}
|
|
238
205
|
*/
|
|
@@ -376,13 +343,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
376
343
|
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
|
|
377
344
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
378
345
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
379
|
-
* argument.
|
|
380
|
-
*
|
|
346
|
+
* argument.
|
|
347
|
+
*
|
|
348
|
+
* It is important for query performance to use appropriate selectors:
|
|
381
349
|
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
382
350
|
* of a query. You should include at least one of these in a selector.
|
|
351
|
+
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
352
|
+
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
353
|
+
* of documents that will need to be scanned.
|
|
354
|
+
*
|
|
355
|
+
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
|
|
356
|
+
* combination and conditional operators.
|
|
383
357
|
*
|
|
384
|
-
* For further reference see
|
|
385
|
-
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
358
|
+
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
386
359
|
* @param {string} [params.lastEventId] - Header parameter to specify the ID of the last events received by the server
|
|
387
360
|
* on a previous connection. Overrides `since` query parameter.
|
|
388
361
|
* @param {boolean} [params.attEncodingInfo] - Query parameter to specify whether to include the encoding information
|
|
@@ -540,13 +513,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
540
513
|
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
|
|
541
514
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
542
515
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
543
|
-
* argument.
|
|
544
|
-
*
|
|
516
|
+
* argument.
|
|
517
|
+
*
|
|
518
|
+
* It is important for query performance to use appropriate selectors:
|
|
545
519
|
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
546
520
|
* of a query. You should include at least one of these in a selector.
|
|
521
|
+
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
522
|
+
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
523
|
+
* of documents that will need to be scanned.
|
|
524
|
+
*
|
|
525
|
+
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
|
|
526
|
+
* combination and conditional operators.
|
|
547
527
|
*
|
|
548
|
-
* For further reference see
|
|
549
|
-
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
528
|
+
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
550
529
|
* @param {string} [params.lastEventId] - Header parameter to specify the ID of the last events received by the server
|
|
551
530
|
* on a previous connection. Overrides `since` query parameter.
|
|
552
531
|
* @param {boolean} [params.attEncodingInfo] - Query parameter to specify whether to include the encoding information
|
|
@@ -873,6 +852,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
873
852
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
874
853
|
* @param {boolean} [params.partitioned] - Query parameter to specify whether to enable database partitions when
|
|
875
854
|
* creating a database.
|
|
855
|
+
*
|
|
856
|
+
* Before using read the
|
|
857
|
+
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partitioned-databases-database-partitioning)
|
|
858
|
+
* to understand the limitations and appropriate use cases.
|
|
876
859
|
* @param {number} [params.q] - The number of shards in the database. Each shard is a partition of the hash value
|
|
877
860
|
* range. Cloudant recommends using the default value for most databases. However, if your database is expected to be
|
|
878
861
|
* larger than 250 GB or have a lot of indexes, you may need to adjust the settings. In these cases, it's best to
|
|
@@ -1901,6 +1884,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
1901
1884
|
* @param {boolean} [params.newEdits] - Query parameter to specify whether to prevent insertion of conflicting
|
|
1902
1885
|
* document revisions. If false, a well-formed _rev must be included in the document. False is used by the replicator
|
|
1903
1886
|
* to insert documents into the target database even if that leads to the creation of conflicts.
|
|
1887
|
+
*
|
|
1888
|
+
* Avoid using this parameter, since this option applies document revisions without checking for conflicts, so it is
|
|
1889
|
+
* very easy to accidentally end up with a large number of conflicts.
|
|
1904
1890
|
* @param {string} [params.rev] - Query parameter to specify a document revision.
|
|
1905
1891
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1906
1892
|
* @returns {Promise<CloudantV1.Response<CloudantV1.DocumentResult>>}
|
|
@@ -2130,6 +2116,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
2130
2116
|
* @param {boolean} [params.newEdits] - Query parameter to specify whether to prevent insertion of conflicting
|
|
2131
2117
|
* document revisions. If false, a well-formed _rev must be included in the document. False is used by the replicator
|
|
2132
2118
|
* to insert documents into the target database even if that leads to the creation of conflicts.
|
|
2119
|
+
*
|
|
2120
|
+
* Avoid using this parameter, since this option applies document revisions without checking for conflicts, so it is
|
|
2121
|
+
* very easy to accidentally end up with a large number of conflicts.
|
|
2133
2122
|
* @param {string} [params.rev] - Query parameter to specify a document revision.
|
|
2134
2123
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
2135
2124
|
* @returns {Promise<CloudantV1.Response<CloudantV1.DocumentResult>>}
|
|
@@ -2377,6 +2366,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
2377
2366
|
* A JSON array of keys that match the key type emitted by the view function.
|
|
2378
2367
|
* @param {boolean} [params.reduce] - Parameter to specify whether to use the reduce function in a map-reduce view.
|
|
2379
2368
|
* Default is true when a reduce function is defined.
|
|
2369
|
+
*
|
|
2370
|
+
* A default `reduce` view type can be disabled to behave like a `map` by setting `reduce=false` explicitly.
|
|
2371
|
+
*
|
|
2372
|
+
* Be aware that `include_docs=true` can only be used with `map` views.
|
|
2380
2373
|
* @param {boolean} [params.stable] - Query parameter to specify whether use the same replica of the index on each
|
|
2381
2374
|
* request. The default value `false` contacts all replicas and returns the result from the first, fastest,
|
|
2382
2375
|
* responder. Setting it to `true` when used in conjunction with `update=false` may improve consistency at the
|
|
@@ -2489,6 +2482,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
2489
2482
|
* A JSON array of keys that match the key type emitted by the view function.
|
|
2490
2483
|
* @param {boolean} [params.reduce] - Parameter to specify whether to use the reduce function in a map-reduce view.
|
|
2491
2484
|
* Default is true when a reduce function is defined.
|
|
2485
|
+
*
|
|
2486
|
+
* A default `reduce` view type can be disabled to behave like a `map` by setting `reduce=false` explicitly.
|
|
2487
|
+
*
|
|
2488
|
+
* Be aware that `include_docs=true` can only be used with `map` views.
|
|
2492
2489
|
* @param {boolean} [params.stable] - Query parameter to specify whether use the same replica of the index on each
|
|
2493
2490
|
* request. The default value `false` contacts all replicas and returns the result from the first, fastest,
|
|
2494
2491
|
* responder. Setting it to `true` when used in conjunction with `update=false` may improve consistency at the
|
|
@@ -2862,6 +2859,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
2862
2859
|
* Lucene Query Parser Syntax. Search indexes are defined by an index function, similar to a map function in MapReduce
|
|
2863
2860
|
* views. The index function decides what data to index and store in the index.
|
|
2864
2861
|
*
|
|
2862
|
+
* Before using read the
|
|
2863
|
+
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
|
|
2864
|
+
* the limitations and appropriate use cases.
|
|
2865
|
+
*
|
|
2865
2866
|
* @param {Object} params - The parameters to send to the service.
|
|
2866
2867
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
2867
2868
|
* @param {string} params.partitionKey - Path parameter to specify the database partition key.
|
|
@@ -2946,6 +2947,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
2946
2947
|
* Lucene Query Parser Syntax. Search indexes are defined by an index function, similar to a map function in MapReduce
|
|
2947
2948
|
* views. The index function decides what data to index and store in the index.
|
|
2948
2949
|
*
|
|
2950
|
+
* Before using read the
|
|
2951
|
+
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
|
|
2952
|
+
* the limitations and appropriate use cases.
|
|
2953
|
+
*
|
|
2949
2954
|
* @param {Object} params - The parameters to send to the service.
|
|
2950
2955
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
2951
2956
|
* @param {string} params.partitionKey - Path parameter to specify the database partition key.
|
|
@@ -3032,6 +3037,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3032
3037
|
* results. The remainder of the POST view functionality is identical to the `GET /{db}/_design/{ddoc}/_view/{view}`
|
|
3033
3038
|
* API.
|
|
3034
3039
|
*
|
|
3040
|
+
* Before using read the
|
|
3041
|
+
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
|
|
3042
|
+
* the limitations and appropriate use cases.
|
|
3043
|
+
*
|
|
3035
3044
|
* @param {Object} params - The parameters to send to the service.
|
|
3036
3045
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
3037
3046
|
* @param {string} params.partitionKey - Path parameter to specify the database partition key.
|
|
@@ -3067,6 +3076,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3067
3076
|
* A JSON array of keys that match the key type emitted by the view function.
|
|
3068
3077
|
* @param {boolean} [params.reduce] - Parameter to specify whether to use the reduce function in a map-reduce view.
|
|
3069
3078
|
* Default is true when a reduce function is defined.
|
|
3079
|
+
*
|
|
3080
|
+
* A default `reduce` view type can be disabled to behave like a `map` by setting `reduce=false` explicitly.
|
|
3081
|
+
*
|
|
3082
|
+
* Be aware that `include_docs=true` can only be used with `map` views.
|
|
3070
3083
|
* @param {any} [params.startKey] - Schema for any JSON type.
|
|
3071
3084
|
* @param {string} [params.startKeyDocId] - Schema for a document ID.
|
|
3072
3085
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
@@ -3138,6 +3151,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3138
3151
|
* results. The remainder of the POST view functionality is identical to the `GET /{db}/_design/{ddoc}/_view/{view}`
|
|
3139
3152
|
* API.
|
|
3140
3153
|
*
|
|
3154
|
+
* Before using read the
|
|
3155
|
+
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
|
|
3156
|
+
* the limitations and appropriate use cases.
|
|
3157
|
+
*
|
|
3141
3158
|
* @param {Object} params - The parameters to send to the service.
|
|
3142
3159
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
3143
3160
|
* @param {string} params.partitionKey - Path parameter to specify the database partition key.
|
|
@@ -3173,6 +3190,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3173
3190
|
* A JSON array of keys that match the key type emitted by the view function.
|
|
3174
3191
|
* @param {boolean} [params.reduce] - Parameter to specify whether to use the reduce function in a map-reduce view.
|
|
3175
3192
|
* Default is true when a reduce function is defined.
|
|
3193
|
+
*
|
|
3194
|
+
* A default `reduce` view type can be disabled to behave like a `map` by setting `reduce=false` explicitly.
|
|
3195
|
+
*
|
|
3196
|
+
* Be aware that `include_docs=true` can only be used with `map` views.
|
|
3176
3197
|
* @param {any} [params.startKey] - Schema for any JSON type.
|
|
3177
3198
|
* @param {string} [params.startKeyDocId] - Schema for a document ID.
|
|
3178
3199
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
@@ -3266,13 +3287,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3266
3287
|
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
|
|
3267
3288
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3268
3289
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3269
|
-
* argument.
|
|
3270
|
-
*
|
|
3290
|
+
* argument.
|
|
3291
|
+
*
|
|
3292
|
+
* It is important for query performance to use appropriate selectors:
|
|
3271
3293
|
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
3272
3294
|
* of a query. You should include at least one of these in a selector.
|
|
3295
|
+
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
3296
|
+
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
3297
|
+
* of documents that will need to be scanned.
|
|
3273
3298
|
*
|
|
3274
|
-
*
|
|
3275
|
-
*
|
|
3299
|
+
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
|
|
3300
|
+
* combination and conditional operators.
|
|
3301
|
+
*
|
|
3302
|
+
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3276
3303
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3277
3304
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3278
3305
|
* existing conflicts in the document.
|
|
@@ -3303,6 +3330,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3303
3330
|
*
|
|
3304
3331
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
3305
3332
|
* indexes that might get added later.
|
|
3333
|
+
*
|
|
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.
|
|
3306
3336
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
3307
3337
|
* @returns {Promise<CloudantV1.Response<CloudantV1.ExplainResult>>}
|
|
3308
3338
|
*/
|
|
@@ -3358,6 +3388,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3358
3388
|
* recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
|
|
3359
3389
|
* In this case the response body will include a warning field recommending that an index is created.
|
|
3360
3390
|
*
|
|
3391
|
+
* Before using read the
|
|
3392
|
+
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
|
|
3393
|
+
* the limitations and appropriate use cases.
|
|
3394
|
+
*
|
|
3361
3395
|
* @param {Object} params - The parameters to send to the service.
|
|
3362
3396
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
3363
3397
|
* @param {string} params.partitionKey - Path parameter to specify the database partition key.
|
|
@@ -3381,13 +3415,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3381
3415
|
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
|
|
3382
3416
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3383
3417
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3384
|
-
* argument.
|
|
3385
|
-
*
|
|
3418
|
+
* argument.
|
|
3419
|
+
*
|
|
3420
|
+
* It is important for query performance to use appropriate selectors:
|
|
3386
3421
|
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
3387
3422
|
* of a query. You should include at least one of these in a selector.
|
|
3423
|
+
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
3424
|
+
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
3425
|
+
* of documents that will need to be scanned.
|
|
3426
|
+
*
|
|
3427
|
+
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
|
|
3428
|
+
* combination and conditional operators.
|
|
3388
3429
|
*
|
|
3389
|
-
* For further reference see
|
|
3390
|
-
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3430
|
+
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3391
3431
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3392
3432
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3393
3433
|
* existing conflicts in the document.
|
|
@@ -3418,6 +3458,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3418
3458
|
*
|
|
3419
3459
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
3420
3460
|
* indexes that might get added later.
|
|
3461
|
+
*
|
|
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.
|
|
3421
3464
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
3422
3465
|
* @returns {Promise<CloudantV1.Response<CloudantV1.FindResult>>}
|
|
3423
3466
|
*/
|
|
@@ -3473,6 +3516,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3473
3516
|
* recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
|
|
3474
3517
|
* In this case the response body will include a warning field recommending that an index is created.
|
|
3475
3518
|
*
|
|
3519
|
+
* Before using read the
|
|
3520
|
+
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
|
|
3521
|
+
* the limitations and appropriate use cases.
|
|
3522
|
+
*
|
|
3476
3523
|
* @param {Object} params - The parameters to send to the service.
|
|
3477
3524
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
3478
3525
|
* @param {string} params.partitionKey - Path parameter to specify the database partition key.
|
|
@@ -3496,13 +3543,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3496
3543
|
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
|
|
3497
3544
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3498
3545
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3499
|
-
* argument.
|
|
3500
|
-
*
|
|
3546
|
+
* argument.
|
|
3547
|
+
*
|
|
3548
|
+
* It is important for query performance to use appropriate selectors:
|
|
3501
3549
|
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
3502
3550
|
* of a query. You should include at least one of these in a selector.
|
|
3551
|
+
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
3552
|
+
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
3553
|
+
* of documents that will need to be scanned.
|
|
3554
|
+
*
|
|
3555
|
+
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
|
|
3556
|
+
* combination and conditional operators.
|
|
3503
3557
|
*
|
|
3504
|
-
* For further reference see
|
|
3505
|
-
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3558
|
+
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3506
3559
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3507
3560
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3508
3561
|
* existing conflicts in the document.
|
|
@@ -3533,6 +3586,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3533
3586
|
*
|
|
3534
3587
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
3535
3588
|
* indexes that might get added later.
|
|
3589
|
+
*
|
|
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.
|
|
3536
3592
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
3537
3593
|
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
3538
3594
|
*/
|
|
@@ -3609,13 +3665,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3609
3665
|
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
|
|
3610
3666
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3611
3667
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3612
|
-
* argument.
|
|
3613
|
-
*
|
|
3668
|
+
* argument.
|
|
3669
|
+
*
|
|
3670
|
+
* It is important for query performance to use appropriate selectors:
|
|
3614
3671
|
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
3615
3672
|
* of a query. You should include at least one of these in a selector.
|
|
3673
|
+
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
3674
|
+
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
3675
|
+
* of documents that will need to be scanned.
|
|
3616
3676
|
*
|
|
3617
|
-
*
|
|
3618
|
-
*
|
|
3677
|
+
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
|
|
3678
|
+
* combination and conditional operators.
|
|
3679
|
+
*
|
|
3680
|
+
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3619
3681
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3620
3682
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3621
3683
|
* existing conflicts in the document.
|
|
@@ -3646,6 +3708,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3646
3708
|
*
|
|
3647
3709
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
3648
3710
|
* indexes that might get added later.
|
|
3711
|
+
*
|
|
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.
|
|
3649
3714
|
* @param {number} [params.r] - The read quorum that is needed for the result. The value defaults to 1, in which case
|
|
3650
3715
|
* the document that was found in the index is returned. If set to a higher value, each document is read from at least
|
|
3651
3716
|
* that many replicas before it is returned in the results. The request will take more time than using only the
|
|
@@ -3727,13 +3792,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3727
3792
|
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
|
|
3728
3793
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3729
3794
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3730
|
-
* argument.
|
|
3731
|
-
*
|
|
3795
|
+
* argument.
|
|
3796
|
+
*
|
|
3797
|
+
* It is important for query performance to use appropriate selectors:
|
|
3732
3798
|
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
3733
3799
|
* of a query. You should include at least one of these in a selector.
|
|
3800
|
+
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
3801
|
+
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
3802
|
+
* of documents that will need to be scanned.
|
|
3803
|
+
*
|
|
3804
|
+
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
|
|
3805
|
+
* combination and conditional operators.
|
|
3734
3806
|
*
|
|
3735
|
-
* For further reference see
|
|
3736
|
-
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3807
|
+
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3737
3808
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3738
3809
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3739
3810
|
* existing conflicts in the document.
|
|
@@ -3764,6 +3835,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3764
3835
|
*
|
|
3765
3836
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
3766
3837
|
* indexes that might get added later.
|
|
3838
|
+
*
|
|
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.
|
|
3767
3841
|
* @param {number} [params.r] - The read quorum that is needed for the result. The value defaults to 1, in which case
|
|
3768
3842
|
* the document that was found in the index is returned. If set to a higher value, each document is read from at least
|
|
3769
3843
|
* that many replicas before it is returned in the results. The request will take more time than using only the
|
|
@@ -3845,13 +3919,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3845
3919
|
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
|
|
3846
3920
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3847
3921
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3848
|
-
* argument.
|
|
3849
|
-
*
|
|
3922
|
+
* argument.
|
|
3923
|
+
*
|
|
3924
|
+
* It is important for query performance to use appropriate selectors:
|
|
3850
3925
|
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
3851
3926
|
* of a query. You should include at least one of these in a selector.
|
|
3927
|
+
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
3928
|
+
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
3929
|
+
* of documents that will need to be scanned.
|
|
3852
3930
|
*
|
|
3853
|
-
*
|
|
3854
|
-
*
|
|
3931
|
+
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
|
|
3932
|
+
* combination and conditional operators.
|
|
3933
|
+
*
|
|
3934
|
+
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3855
3935
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3856
3936
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3857
3937
|
* existing conflicts in the document.
|
|
@@ -3882,6 +3962,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3882
3962
|
*
|
|
3883
3963
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
3884
3964
|
* indexes that might get added later.
|
|
3965
|
+
*
|
|
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.
|
|
3885
3968
|
* @param {number} [params.r] - The read quorum that is needed for the result. The value defaults to 1, in which case
|
|
3886
3969
|
* the document that was found in the index is returned. If set to a higher value, each document is read from at least
|
|
3887
3970
|
* that many replicas before it is returned in the results. The request will take more time than using only the
|
|
@@ -4618,6 +4701,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
4618
4701
|
* @param {boolean} [params.newEdits] - Query parameter to specify whether to prevent insertion of conflicting
|
|
4619
4702
|
* document revisions. If false, a well-formed _rev must be included in the document. False is used by the replicator
|
|
4620
4703
|
* to insert documents into the target database even if that leads to the creation of conflicts.
|
|
4704
|
+
*
|
|
4705
|
+
* Avoid using this parameter, since this option applies document revisions without checking for conflicts, so it is
|
|
4706
|
+
* very easy to accidentally end up with a large number of conflicts.
|
|
4621
4707
|
* @param {string} [params.rev] - Query parameter to specify a document revision.
|
|
4622
4708
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
4623
4709
|
* @returns {Promise<CloudantV1.Response<CloudantV1.DocumentResult>>}
|
|
@@ -5713,6 +5799,39 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
5713
5799
|
};
|
|
5714
5800
|
return this.createRequestAndDeserializeResponse(parameters, CloudantV1.ActiveTask.deserialize);
|
|
5715
5801
|
}
|
|
5802
|
+
/**
|
|
5803
|
+
* Retrieve cluster membership information.
|
|
5804
|
+
*
|
|
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.
|
|
5808
|
+
*
|
|
5809
|
+
* @param {Object} [params] - The parameters to send to the service.
|
|
5810
|
+
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
5811
|
+
* @returns {Promise<CloudantV1.Response<CloudantV1.MembershipInformation>>}
|
|
5812
|
+
*/
|
|
5813
|
+
getMembershipInformation(params) {
|
|
5814
|
+
const _params = { ...params };
|
|
5815
|
+
const _requiredParams = [];
|
|
5816
|
+
const _validParams = ['headers'];
|
|
5817
|
+
const _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
5818
|
+
if (_validationErrors) {
|
|
5819
|
+
return Promise.reject(_validationErrors);
|
|
5820
|
+
}
|
|
5821
|
+
const sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getMembershipInformation');
|
|
5822
|
+
const parameters = {
|
|
5823
|
+
options: {
|
|
5824
|
+
url: '/_membership',
|
|
5825
|
+
method: 'GET',
|
|
5826
|
+
},
|
|
5827
|
+
defaultOptions: (0, extend_1.default)(true, {}, this.baseOptions, {
|
|
5828
|
+
headers: (0, extend_1.default)(true, sdkHeaders, {
|
|
5829
|
+
'Accept': 'application/json',
|
|
5830
|
+
}, _params.headers),
|
|
5831
|
+
}),
|
|
5832
|
+
};
|
|
5833
|
+
return this.createRequestAndDeserializeResponse(parameters, CloudantV1.MembershipInformation.deserialize);
|
|
5834
|
+
}
|
|
5716
5835
|
/**
|
|
5717
5836
|
* Retrieve information about whether the server is up.
|
|
5718
5837
|
*
|
|
@@ -7271,7 +7390,11 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
7271
7390
|
class BulkDocs {
|
|
7272
7391
|
/** Array of documents. */
|
|
7273
7392
|
docs;
|
|
7274
|
-
/** If `false`, prevents the database from assigning them new revision IDs. Default is `true`.
|
|
7393
|
+
/** If `false`, prevents the database from assigning them new revision IDs. Default is `true`.
|
|
7394
|
+
*
|
|
7395
|
+
* Avoid using this parameter, since this option applies document revisions without checking for conflicts, so it
|
|
7396
|
+
* is very easy to accidentally end up with a large number of conflicts.
|
|
7397
|
+
*/
|
|
7275
7398
|
newEdits;
|
|
7276
7399
|
static serialize(obj) {
|
|
7277
7400
|
if (obj === undefined || obj === null || typeof obj === 'string') {
|
|
@@ -9168,13 +9291,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
9168
9291
|
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
|
|
9169
9292
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
9170
9293
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
|
|
9171
|
-
* supplied argument.
|
|
9172
|
-
*
|
|
9294
|
+
* supplied argument.
|
|
9295
|
+
*
|
|
9296
|
+
* It is important for query performance to use appropriate selectors:
|
|
9173
9297
|
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
|
|
9174
9298
|
* basis of a query. You should include at least one of these in a selector.
|
|
9299
|
+
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query
|
|
9300
|
+
* selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
|
|
9301
|
+
* the number of documents that will need to be scanned.
|
|
9175
9302
|
*
|
|
9176
|
-
*
|
|
9177
|
-
*
|
|
9303
|
+
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
|
|
9304
|
+
* combination and conditional operators.
|
|
9305
|
+
*
|
|
9306
|
+
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
9178
9307
|
*/
|
|
9179
9308
|
selector;
|
|
9180
9309
|
/** Schema for a list of objects with extra information on the selector to provide insights about its usability. */
|
|
@@ -9768,13 +9897,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
9768
9897
|
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
|
|
9769
9898
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
9770
9899
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
|
|
9771
|
-
* supplied argument.
|
|
9772
|
-
*
|
|
9900
|
+
* supplied argument.
|
|
9901
|
+
*
|
|
9902
|
+
* It is important for query performance to use appropriate selectors:
|
|
9773
9903
|
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
|
|
9774
9904
|
* basis of a query. You should include at least one of these in a selector.
|
|
9905
|
+
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query
|
|
9906
|
+
* selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
|
|
9907
|
+
* the number of documents that will need to be scanned.
|
|
9775
9908
|
*
|
|
9776
|
-
*
|
|
9777
|
-
*
|
|
9909
|
+
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
|
|
9910
|
+
* combination and conditional operators.
|
|
9911
|
+
*
|
|
9912
|
+
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
9778
9913
|
*/
|
|
9779
9914
|
partialFilterSelector;
|
|
9780
9915
|
static serialize(obj) {
|
|
@@ -10690,13 +10825,19 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
10690
10825
|
* combination operator takes a single argument. The argument is either another selector, or an array of selectors.
|
|
10691
10826
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
10692
10827
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
|
|
10693
|
-
* supplied argument.
|
|
10694
|
-
*
|
|
10828
|
+
* supplied argument.
|
|
10829
|
+
*
|
|
10830
|
+
* It is important for query performance to use appropriate selectors:
|
|
10695
10831
|
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
|
|
10696
10832
|
* basis of a query. You should include at least one of these in a selector.
|
|
10833
|
+
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query
|
|
10834
|
+
* selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
|
|
10835
|
+
* the number of documents that will need to be scanned.
|
|
10697
10836
|
*
|
|
10698
|
-
*
|
|
10699
|
-
*
|
|
10837
|
+
* See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available
|
|
10838
|
+
* combination and conditional operators.
|
|
10839
|
+
*
|
|
10840
|
+
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
10700
10841
|
*/
|
|
10701
10842
|
selector;
|
|
10702
10843
|
/** Start the replication at a specific sequence value. */
|
|
@@ -12376,7 +12517,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
12376
12517
|
*/
|
|
12377
12518
|
class ThroughputInformation {
|
|
12378
12519
|
/** A number of blocks of throughput units. A block consists of 100 reads/sec, 50 writes/sec, and 5 global
|
|
12379
|
-
* queries/sec of provisioned throughput capacity.
|
|
12520
|
+
* queries/sec of provisioned throughput capacity. Not available for some plans.
|
|
12380
12521
|
*/
|
|
12381
12522
|
blocks;
|
|
12382
12523
|
/** Provisioned global queries capacity in operations per second. */
|
|
@@ -12688,6 +12829,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
12688
12829
|
keys;
|
|
12689
12830
|
/** Parameter to specify whether to use the reduce function in a map-reduce view. Default is true when a reduce
|
|
12690
12831
|
* function is defined.
|
|
12832
|
+
*
|
|
12833
|
+
* A default `reduce` view type can be disabled to behave like a `map` by setting `reduce=false` explicitly.
|
|
12834
|
+
*
|
|
12835
|
+
* Be aware that `include_docs=true` can only be used with `map` views.
|
|
12691
12836
|
*/
|
|
12692
12837
|
reduce;
|
|
12693
12838
|
/** Query parameter to specify whether use the same replica of the index on each request. The default value
|