@ibm-cloud/cloudant 0.0.25 → 0.1.1-dev1648460925773
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 +127 -55
- package/auth/couchdbSessionAuthenticator.d.ts +1 -1
- package/auth/couchdbSessionAuthenticator.js +2 -2
- package/auth/couchdbSessionAuthenticator.js.map +1 -1
- package/cloudant/v1.d.ts +238 -95
- package/cloudant/v1.js +171 -92
- package/cloudant/v1.js.map +1 -1
- package/lib/cloudantBaseService.js.map +1 -1
- package/lib/common.d.ts +1 -1
- package/lib/common.js +3 -2
- package/lib/common.js.map +1 -1
- package/package.json +20 -17
package/cloudant/v1.js
CHANGED
|
@@ -340,6 +340,12 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
340
340
|
* Requests the database changes feed in the same way as `GET /{db}/_changes` does. It is widely used with the
|
|
341
341
|
* `filter` query parameter because it allows one to pass more information to the filter.
|
|
342
342
|
*
|
|
343
|
+
* ### Note
|
|
344
|
+
*
|
|
345
|
+
* Before using the changes feed we recommend reading the
|
|
346
|
+
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-faq-using-changes-feed) to understand the limitations and
|
|
347
|
+
* appropriate use cases.".
|
|
348
|
+
*
|
|
343
349
|
* @param {Object} params - The parameters to send to the service.
|
|
344
350
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
345
351
|
* @param {string[]} [params.docIds] - Schema for a list of document IDs.
|
|
@@ -368,6 +374,11 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
368
374
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
369
375
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
370
376
|
* argument.
|
|
377
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
378
|
+
* of a query. You should include at least one of these in a selector.
|
|
379
|
+
*
|
|
380
|
+
* For further reference see
|
|
381
|
+
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
|
|
371
382
|
* @param {string} [params.lastEventId] - Header parameter to specify the ID of the last events received by the server
|
|
372
383
|
* on a previous connection. Overrides `since` query parameter.
|
|
373
384
|
* @param {boolean} [params.attEncodingInfo] - Query parameter to specify whether to include the encoding information
|
|
@@ -475,6 +486,12 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
475
486
|
* Requests the database changes feed in the same way as `GET /{db}/_changes` does. It is widely used with the
|
|
476
487
|
* `filter` query parameter because it allows one to pass more information to the filter.
|
|
477
488
|
*
|
|
489
|
+
* ### Note
|
|
490
|
+
*
|
|
491
|
+
* Before using the changes feed we recommend reading the
|
|
492
|
+
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-faq-using-changes-feed) to understand the limitations and
|
|
493
|
+
* appropriate use cases.".
|
|
494
|
+
*
|
|
478
495
|
* @param {Object} params - The parameters to send to the service.
|
|
479
496
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
480
497
|
* @param {string[]} [params.docIds] - Schema for a list of document IDs.
|
|
@@ -503,6 +520,11 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
503
520
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
504
521
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
505
522
|
* argument.
|
|
523
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
524
|
+
* of a query. You should include at least one of these in a selector.
|
|
525
|
+
*
|
|
526
|
+
* For further reference see
|
|
527
|
+
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
|
|
506
528
|
* @param {string} [params.lastEventId] - Header parameter to specify the ID of the last events received by the server
|
|
507
529
|
* on a previous connection. Overrides `since` query parameter.
|
|
508
530
|
* @param {boolean} [params.attEncodingInfo] - Query parameter to specify whether to include the encoding information
|
|
@@ -649,13 +671,13 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
649
671
|
* @param {Object} [params] - The parameters to send to the service.
|
|
650
672
|
* @param {boolean} [params.descending] - Query parameter to specify whether to return the documents in descending by
|
|
651
673
|
* key order.
|
|
652
|
-
* @param {string} [params.
|
|
674
|
+
* @param {string} [params.endKey] - Query parameter to specify to stop returning records when the specified key is
|
|
653
675
|
* reached. String representation of any JSON type that matches the key type emitted by the view function.
|
|
654
676
|
* @param {number} [params.limit] - Query parameter to specify the number of returned documents to limit the result
|
|
655
677
|
* to.
|
|
656
678
|
* @param {number} [params.skip] - Query parameter to specify the number of records before starting to return the
|
|
657
679
|
* results.
|
|
658
|
-
* @param {string} [params.
|
|
680
|
+
* @param {string} [params.startKey] - Query parameter to specify to start returning records from the specified key.
|
|
659
681
|
* String representation of any JSON type that matches the key type emitted by the view function.
|
|
660
682
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
661
683
|
* @returns {Promise<CloudantV1.Response<string[]>>}
|
|
@@ -663,17 +685,17 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
663
685
|
CloudantV1.prototype.getAllDbs = function (params) {
|
|
664
686
|
var _params = __assign({}, params);
|
|
665
687
|
var _requiredParams = [];
|
|
666
|
-
var _validParams = ['descending', '
|
|
688
|
+
var _validParams = ['descending', 'endKey', 'limit', 'skip', 'startKey', 'headers'];
|
|
667
689
|
var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
668
690
|
if (_validationErrors) {
|
|
669
691
|
return Promise.reject(_validationErrors);
|
|
670
692
|
}
|
|
671
693
|
var query = {
|
|
672
694
|
'descending': _params.descending,
|
|
673
|
-
'
|
|
695
|
+
'end_key': _params.endKey,
|
|
674
696
|
'limit': _params.limit,
|
|
675
697
|
'skip': _params.skip,
|
|
676
|
-
'
|
|
698
|
+
'start_key': _params.startKey,
|
|
677
699
|
};
|
|
678
700
|
var sdkHeaders = (0, common_1.getSdkHeaders)(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'getAllDbs');
|
|
679
701
|
var parameters = {
|
|
@@ -902,12 +924,15 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
902
924
|
/**
|
|
903
925
|
* Create or modify a document in a database.
|
|
904
926
|
*
|
|
905
|
-
* Creates or modifies a document in the specified database by using the supplied JSON document.
|
|
906
|
-
*
|
|
907
|
-
*
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
*
|
|
927
|
+
* Creates or modifies a document in the specified database by using the supplied JSON document.
|
|
928
|
+
*
|
|
929
|
+
* For creation, you may specify the document ID but you should not specify the revision. If you don't specify the
|
|
930
|
+
* document ID, then the server generates an ID for your document.
|
|
931
|
+
*
|
|
932
|
+
* For modification, you must specify the document ID and a revision identifier in the JSON document.
|
|
933
|
+
*
|
|
934
|
+
* If your document ID includes the `_local/` or `_design/` prefix, then this operation creates or modifies a local or
|
|
935
|
+
* a design document respectively.
|
|
911
936
|
*
|
|
912
937
|
* @param {Object} params - The parameters to send to the service.
|
|
913
938
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -976,17 +1001,17 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
976
1001
|
* @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
|
|
977
1002
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
978
1003
|
* indicating the sequence id of the database the view reflects.
|
|
979
|
-
* @param {string} [params.
|
|
1004
|
+
* @param {string} [params.endKey] - Schema for a document ID.
|
|
980
1005
|
* @param {string} [params.key] - Schema for a document ID.
|
|
981
1006
|
* @param {string[]} [params.keys] - Schema for a list of document IDs.
|
|
982
|
-
* @param {string} [params.
|
|
1007
|
+
* @param {string} [params.startKey] - Schema for a document ID.
|
|
983
1008
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
984
1009
|
* @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>}
|
|
985
1010
|
*/
|
|
986
1011
|
CloudantV1.prototype.postAllDocs = function (params) {
|
|
987
1012
|
var _params = __assign({}, params);
|
|
988
1013
|
var _requiredParams = ['db'];
|
|
989
|
-
var _validParams = ['db', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', '
|
|
1014
|
+
var _validParams = ['db', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'key', 'keys', 'startKey', 'headers'];
|
|
990
1015
|
var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
991
1016
|
if (_validationErrors) {
|
|
992
1017
|
return Promise.reject(_validationErrors);
|
|
@@ -1001,10 +1026,10 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
1001
1026
|
'limit': _params.limit,
|
|
1002
1027
|
'skip': _params.skip,
|
|
1003
1028
|
'update_seq': _params.updateSeq,
|
|
1004
|
-
'
|
|
1029
|
+
'end_key': _params.endKey,
|
|
1005
1030
|
'key': _params.key,
|
|
1006
1031
|
'keys': _params.keys,
|
|
1007
|
-
'
|
|
1032
|
+
'start_key': _params.startKey,
|
|
1008
1033
|
};
|
|
1009
1034
|
var path = {
|
|
1010
1035
|
'db': _params.db,
|
|
@@ -1051,17 +1076,17 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
1051
1076
|
* @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
|
|
1052
1077
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
1053
1078
|
* indicating the sequence id of the database the view reflects.
|
|
1054
|
-
* @param {string} [params.
|
|
1079
|
+
* @param {string} [params.endKey] - Schema for a document ID.
|
|
1055
1080
|
* @param {string} [params.key] - Schema for a document ID.
|
|
1056
1081
|
* @param {string[]} [params.keys] - Schema for a list of document IDs.
|
|
1057
|
-
* @param {string} [params.
|
|
1082
|
+
* @param {string} [params.startKey] - Schema for a document ID.
|
|
1058
1083
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1059
1084
|
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
1060
1085
|
*/
|
|
1061
1086
|
CloudantV1.prototype.postAllDocsAsStream = function (params) {
|
|
1062
1087
|
var _params = __assign({}, params);
|
|
1063
1088
|
var _requiredParams = ['db'];
|
|
1064
|
-
var _validParams = ['db', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', '
|
|
1089
|
+
var _validParams = ['db', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'key', 'keys', 'startKey', 'headers'];
|
|
1065
1090
|
var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
1066
1091
|
if (_validationErrors) {
|
|
1067
1092
|
return Promise.reject(_validationErrors);
|
|
@@ -1076,10 +1101,10 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
1076
1101
|
'limit': _params.limit,
|
|
1077
1102
|
'skip': _params.skip,
|
|
1078
1103
|
'update_seq': _params.updateSeq,
|
|
1079
|
-
'
|
|
1104
|
+
'end_key': _params.endKey,
|
|
1080
1105
|
'key': _params.key,
|
|
1081
1106
|
'keys': _params.keys,
|
|
1082
|
-
'
|
|
1107
|
+
'start_key': _params.startKey,
|
|
1083
1108
|
};
|
|
1084
1109
|
var path = {
|
|
1085
1110
|
'db': _params.db,
|
|
@@ -1198,9 +1223,9 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
1198
1223
|
/**
|
|
1199
1224
|
* Bulk modify multiple documents in a database.
|
|
1200
1225
|
*
|
|
1201
|
-
* The bulk document API allows you to create and
|
|
1202
|
-
* The basic operation is similar to creating or
|
|
1203
|
-
* structure and information.
|
|
1226
|
+
* The bulk document API allows you to create, update, and delete multiple documents at the same time within a single
|
|
1227
|
+
* request. The basic operation is similar to creating, updating, or deleting a single document, except that you batch
|
|
1228
|
+
* the document structure and information.
|
|
1204
1229
|
*
|
|
1205
1230
|
* @param {Object} params - The parameters to send to the service.
|
|
1206
1231
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -1821,8 +1846,11 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
1821
1846
|
/**
|
|
1822
1847
|
* Create or modify a document.
|
|
1823
1848
|
*
|
|
1824
|
-
*
|
|
1825
|
-
*
|
|
1849
|
+
* Creates or modifies a document in the specified database.
|
|
1850
|
+
*
|
|
1851
|
+
* For creation, you must specify the document ID but you should not specify the revision.
|
|
1852
|
+
*
|
|
1853
|
+
* For modification, you must specify the document ID and a revision identifier.
|
|
1826
1854
|
*
|
|
1827
1855
|
* @param {Object} params - The parameters to send to the service.
|
|
1828
1856
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -2175,10 +2203,10 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2175
2203
|
* @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
|
|
2176
2204
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
2177
2205
|
* indicating the sequence id of the database the view reflects.
|
|
2178
|
-
* @param {string} [params.
|
|
2206
|
+
* @param {string} [params.endKey] - Schema for a document ID.
|
|
2179
2207
|
* @param {string} [params.key] - Schema for a document ID.
|
|
2180
2208
|
* @param {string[]} [params.keys] - Schema for a list of document IDs.
|
|
2181
|
-
* @param {string} [params.
|
|
2209
|
+
* @param {string} [params.startKey] - Schema for a document ID.
|
|
2182
2210
|
* @param {string} [params.accept] - The type of the response: application/json or application/octet-stream.
|
|
2183
2211
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
2184
2212
|
* @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>}
|
|
@@ -2186,7 +2214,7 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2186
2214
|
CloudantV1.prototype.postDesignDocs = function (params) {
|
|
2187
2215
|
var _params = __assign({}, params);
|
|
2188
2216
|
var _requiredParams = ['db'];
|
|
2189
|
-
var _validParams = ['db', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', '
|
|
2217
|
+
var _validParams = ['db', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'key', 'keys', 'startKey', 'accept', 'headers'];
|
|
2190
2218
|
var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
2191
2219
|
if (_validationErrors) {
|
|
2192
2220
|
return Promise.reject(_validationErrors);
|
|
@@ -2201,10 +2229,10 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2201
2229
|
'limit': _params.limit,
|
|
2202
2230
|
'skip': _params.skip,
|
|
2203
2231
|
'update_seq': _params.updateSeq,
|
|
2204
|
-
'
|
|
2232
|
+
'end_key': _params.endKey,
|
|
2205
2233
|
'key': _params.key,
|
|
2206
2234
|
'keys': _params.keys,
|
|
2207
|
-
'
|
|
2235
|
+
'start_key': _params.startKey,
|
|
2208
2236
|
};
|
|
2209
2237
|
var path = {
|
|
2210
2238
|
'db': _params.db,
|
|
@@ -2303,8 +2331,8 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2303
2331
|
* @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
|
|
2304
2332
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
2305
2333
|
* indicating the sequence id of the database the view reflects.
|
|
2306
|
-
* @param {any} [params.
|
|
2307
|
-
* @param {string} [params.
|
|
2334
|
+
* @param {any} [params.endKey] - Schema for any JSON type.
|
|
2335
|
+
* @param {string} [params.endKeyDocId] - Schema for a document ID.
|
|
2308
2336
|
* @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
|
|
2309
2337
|
* group rather than a single row. Implies reduce is true and the maximum group_level.
|
|
2310
2338
|
* @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
|
|
@@ -2315,8 +2343,8 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2315
2343
|
* Default is true when a reduce function is defined.
|
|
2316
2344
|
* @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
|
|
2317
2345
|
* of shards.
|
|
2318
|
-
* @param {any} [params.
|
|
2319
|
-
* @param {string} [params.
|
|
2346
|
+
* @param {any} [params.startKey] - Schema for any JSON type.
|
|
2347
|
+
* @param {string} [params.startKeyDocId] - Schema for a document ID.
|
|
2320
2348
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
2321
2349
|
* to responding to the user.
|
|
2322
2350
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
@@ -2325,7 +2353,7 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2325
2353
|
CloudantV1.prototype.postView = function (params) {
|
|
2326
2354
|
var _params = __assign({}, params);
|
|
2327
2355
|
var _requiredParams = ['db', 'ddoc', 'view'];
|
|
2328
|
-
var _validParams = ['db', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', '
|
|
2356
|
+
var _validParams = ['db', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'endKeyDocId', 'group', 'groupLevel', 'key', 'keys', 'reduce', 'stable', 'startKey', 'startKeyDocId', 'update', 'headers'];
|
|
2329
2357
|
var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
2330
2358
|
if (_validationErrors) {
|
|
2331
2359
|
return Promise.reject(_validationErrors);
|
|
@@ -2340,16 +2368,16 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2340
2368
|
'limit': _params.limit,
|
|
2341
2369
|
'skip': _params.skip,
|
|
2342
2370
|
'update_seq': _params.updateSeq,
|
|
2343
|
-
'
|
|
2344
|
-
'
|
|
2371
|
+
'end_key': _params.endKey,
|
|
2372
|
+
'end_key_doc_id': _params.endKeyDocId,
|
|
2345
2373
|
'group': _params.group,
|
|
2346
2374
|
'group_level': _params.groupLevel,
|
|
2347
2375
|
'key': _params.key,
|
|
2348
2376
|
'keys': _params.keys,
|
|
2349
2377
|
'reduce': _params.reduce,
|
|
2350
2378
|
'stable': _params.stable,
|
|
2351
|
-
'
|
|
2352
|
-
'
|
|
2379
|
+
'start_key': _params.startKey,
|
|
2380
|
+
'start_key_doc_id': _params.startKeyDocId,
|
|
2353
2381
|
'update': _params.update,
|
|
2354
2382
|
};
|
|
2355
2383
|
var path = {
|
|
@@ -2402,8 +2430,8 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2402
2430
|
* @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
|
|
2403
2431
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
2404
2432
|
* indicating the sequence id of the database the view reflects.
|
|
2405
|
-
* @param {any} [params.
|
|
2406
|
-
* @param {string} [params.
|
|
2433
|
+
* @param {any} [params.endKey] - Schema for any JSON type.
|
|
2434
|
+
* @param {string} [params.endKeyDocId] - Schema for a document ID.
|
|
2407
2435
|
* @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
|
|
2408
2436
|
* group rather than a single row. Implies reduce is true and the maximum group_level.
|
|
2409
2437
|
* @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
|
|
@@ -2414,8 +2442,8 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2414
2442
|
* Default is true when a reduce function is defined.
|
|
2415
2443
|
* @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
|
|
2416
2444
|
* of shards.
|
|
2417
|
-
* @param {any} [params.
|
|
2418
|
-
* @param {string} [params.
|
|
2445
|
+
* @param {any} [params.startKey] - Schema for any JSON type.
|
|
2446
|
+
* @param {string} [params.startKeyDocId] - Schema for a document ID.
|
|
2419
2447
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
2420
2448
|
* to responding to the user.
|
|
2421
2449
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
@@ -2424,7 +2452,7 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2424
2452
|
CloudantV1.prototype.postViewAsStream = function (params) {
|
|
2425
2453
|
var _params = __assign({}, params);
|
|
2426
2454
|
var _requiredParams = ['db', 'ddoc', 'view'];
|
|
2427
|
-
var _validParams = ['db', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', '
|
|
2455
|
+
var _validParams = ['db', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'endKeyDocId', 'group', 'groupLevel', 'key', 'keys', 'reduce', 'stable', 'startKey', 'startKeyDocId', 'update', 'headers'];
|
|
2428
2456
|
var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
2429
2457
|
if (_validationErrors) {
|
|
2430
2458
|
return Promise.reject(_validationErrors);
|
|
@@ -2439,16 +2467,16 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2439
2467
|
'limit': _params.limit,
|
|
2440
2468
|
'skip': _params.skip,
|
|
2441
2469
|
'update_seq': _params.updateSeq,
|
|
2442
|
-
'
|
|
2443
|
-
'
|
|
2470
|
+
'end_key': _params.endKey,
|
|
2471
|
+
'end_key_doc_id': _params.endKeyDocId,
|
|
2444
2472
|
'group': _params.group,
|
|
2445
2473
|
'group_level': _params.groupLevel,
|
|
2446
2474
|
'key': _params.key,
|
|
2447
2475
|
'keys': _params.keys,
|
|
2448
2476
|
'reduce': _params.reduce,
|
|
2449
2477
|
'stable': _params.stable,
|
|
2450
|
-
'
|
|
2451
|
-
'
|
|
2478
|
+
'start_key': _params.startKey,
|
|
2479
|
+
'start_key_doc_id': _params.startKeyDocId,
|
|
2452
2480
|
'update': _params.update,
|
|
2453
2481
|
};
|
|
2454
2482
|
var path = {
|
|
@@ -2640,17 +2668,17 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2640
2668
|
* @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
|
|
2641
2669
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
2642
2670
|
* indicating the sequence id of the database the view reflects.
|
|
2643
|
-
* @param {string} [params.
|
|
2671
|
+
* @param {string} [params.endKey] - Schema for a document ID.
|
|
2644
2672
|
* @param {string} [params.key] - Schema for a document ID.
|
|
2645
2673
|
* @param {string[]} [params.keys] - Schema for a list of document IDs.
|
|
2646
|
-
* @param {string} [params.
|
|
2674
|
+
* @param {string} [params.startKey] - Schema for a document ID.
|
|
2647
2675
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
2648
2676
|
* @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>}
|
|
2649
2677
|
*/
|
|
2650
2678
|
CloudantV1.prototype.postPartitionAllDocs = function (params) {
|
|
2651
2679
|
var _params = __assign({}, params);
|
|
2652
2680
|
var _requiredParams = ['db', 'partitionKey'];
|
|
2653
|
-
var _validParams = ['db', 'partitionKey', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', '
|
|
2681
|
+
var _validParams = ['db', 'partitionKey', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'key', 'keys', 'startKey', 'headers'];
|
|
2654
2682
|
var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
2655
2683
|
if (_validationErrors) {
|
|
2656
2684
|
return Promise.reject(_validationErrors);
|
|
@@ -2665,10 +2693,10 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2665
2693
|
'limit': _params.limit,
|
|
2666
2694
|
'skip': _params.skip,
|
|
2667
2695
|
'update_seq': _params.updateSeq,
|
|
2668
|
-
'
|
|
2696
|
+
'end_key': _params.endKey,
|
|
2669
2697
|
'key': _params.key,
|
|
2670
2698
|
'keys': _params.keys,
|
|
2671
|
-
'
|
|
2699
|
+
'start_key': _params.startKey,
|
|
2672
2700
|
};
|
|
2673
2701
|
var path = {
|
|
2674
2702
|
'db': _params.db,
|
|
@@ -2717,17 +2745,17 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2717
2745
|
* @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
|
|
2718
2746
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
2719
2747
|
* indicating the sequence id of the database the view reflects.
|
|
2720
|
-
* @param {string} [params.
|
|
2748
|
+
* @param {string} [params.endKey] - Schema for a document ID.
|
|
2721
2749
|
* @param {string} [params.key] - Schema for a document ID.
|
|
2722
2750
|
* @param {string[]} [params.keys] - Schema for a list of document IDs.
|
|
2723
|
-
* @param {string} [params.
|
|
2751
|
+
* @param {string} [params.startKey] - Schema for a document ID.
|
|
2724
2752
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
2725
2753
|
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
2726
2754
|
*/
|
|
2727
2755
|
CloudantV1.prototype.postPartitionAllDocsAsStream = function (params) {
|
|
2728
2756
|
var _params = __assign({}, params);
|
|
2729
2757
|
var _requiredParams = ['db', 'partitionKey'];
|
|
2730
|
-
var _validParams = ['db', 'partitionKey', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', '
|
|
2758
|
+
var _validParams = ['db', 'partitionKey', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'key', 'keys', 'startKey', 'headers'];
|
|
2731
2759
|
var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
2732
2760
|
if (_validationErrors) {
|
|
2733
2761
|
return Promise.reject(_validationErrors);
|
|
@@ -2742,10 +2770,10 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2742
2770
|
'limit': _params.limit,
|
|
2743
2771
|
'skip': _params.skip,
|
|
2744
2772
|
'update_seq': _params.updateSeq,
|
|
2745
|
-
'
|
|
2773
|
+
'end_key': _params.endKey,
|
|
2746
2774
|
'key': _params.key,
|
|
2747
2775
|
'keys': _params.keys,
|
|
2748
|
-
'
|
|
2776
|
+
'start_key': _params.startKey,
|
|
2749
2777
|
};
|
|
2750
2778
|
var path = {
|
|
2751
2779
|
'db': _params.db,
|
|
@@ -2967,8 +2995,8 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2967
2995
|
* @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
|
|
2968
2996
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
2969
2997
|
* indicating the sequence id of the database the view reflects.
|
|
2970
|
-
* @param {any} [params.
|
|
2971
|
-
* @param {string} [params.
|
|
2998
|
+
* @param {any} [params.endKey] - Schema for any JSON type.
|
|
2999
|
+
* @param {string} [params.endKeyDocId] - Schema for a document ID.
|
|
2972
3000
|
* @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
|
|
2973
3001
|
* group rather than a single row. Implies reduce is true and the maximum group_level.
|
|
2974
3002
|
* @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
|
|
@@ -2979,8 +3007,8 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2979
3007
|
* Default is true when a reduce function is defined.
|
|
2980
3008
|
* @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
|
|
2981
3009
|
* of shards.
|
|
2982
|
-
* @param {any} [params.
|
|
2983
|
-
* @param {string} [params.
|
|
3010
|
+
* @param {any} [params.startKey] - Schema for any JSON type.
|
|
3011
|
+
* @param {string} [params.startKeyDocId] - Schema for a document ID.
|
|
2984
3012
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
2985
3013
|
* to responding to the user.
|
|
2986
3014
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
@@ -2989,7 +3017,7 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
2989
3017
|
CloudantV1.prototype.postPartitionView = function (params) {
|
|
2990
3018
|
var _params = __assign({}, params);
|
|
2991
3019
|
var _requiredParams = ['db', 'partitionKey', 'ddoc', 'view'];
|
|
2992
|
-
var _validParams = ['db', 'partitionKey', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', '
|
|
3020
|
+
var _validParams = ['db', 'partitionKey', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'endKeyDocId', 'group', 'groupLevel', 'key', 'keys', 'reduce', 'stable', 'startKey', 'startKeyDocId', 'update', 'headers'];
|
|
2993
3021
|
var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
2994
3022
|
if (_validationErrors) {
|
|
2995
3023
|
return Promise.reject(_validationErrors);
|
|
@@ -3004,16 +3032,16 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3004
3032
|
'limit': _params.limit,
|
|
3005
3033
|
'skip': _params.skip,
|
|
3006
3034
|
'update_seq': _params.updateSeq,
|
|
3007
|
-
'
|
|
3008
|
-
'
|
|
3035
|
+
'end_key': _params.endKey,
|
|
3036
|
+
'end_key_doc_id': _params.endKeyDocId,
|
|
3009
3037
|
'group': _params.group,
|
|
3010
3038
|
'group_level': _params.groupLevel,
|
|
3011
3039
|
'key': _params.key,
|
|
3012
3040
|
'keys': _params.keys,
|
|
3013
3041
|
'reduce': _params.reduce,
|
|
3014
3042
|
'stable': _params.stable,
|
|
3015
|
-
'
|
|
3016
|
-
'
|
|
3043
|
+
'start_key': _params.startKey,
|
|
3044
|
+
'start_key_doc_id': _params.startKeyDocId,
|
|
3017
3045
|
'update': _params.update,
|
|
3018
3046
|
};
|
|
3019
3047
|
var path = {
|
|
@@ -3068,8 +3096,8 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3068
3096
|
* @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
|
|
3069
3097
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
3070
3098
|
* indicating the sequence id of the database the view reflects.
|
|
3071
|
-
* @param {any} [params.
|
|
3072
|
-
* @param {string} [params.
|
|
3099
|
+
* @param {any} [params.endKey] - Schema for any JSON type.
|
|
3100
|
+
* @param {string} [params.endKeyDocId] - Schema for a document ID.
|
|
3073
3101
|
* @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
|
|
3074
3102
|
* group rather than a single row. Implies reduce is true and the maximum group_level.
|
|
3075
3103
|
* @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
|
|
@@ -3080,8 +3108,8 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3080
3108
|
* Default is true when a reduce function is defined.
|
|
3081
3109
|
* @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
|
|
3082
3110
|
* of shards.
|
|
3083
|
-
* @param {any} [params.
|
|
3084
|
-
* @param {string} [params.
|
|
3111
|
+
* @param {any} [params.startKey] - Schema for any JSON type.
|
|
3112
|
+
* @param {string} [params.startKeyDocId] - Schema for a document ID.
|
|
3085
3113
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
3086
3114
|
* to responding to the user.
|
|
3087
3115
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
@@ -3090,7 +3118,7 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3090
3118
|
CloudantV1.prototype.postPartitionViewAsStream = function (params) {
|
|
3091
3119
|
var _params = __assign({}, params);
|
|
3092
3120
|
var _requiredParams = ['db', 'partitionKey', 'ddoc', 'view'];
|
|
3093
|
-
var _validParams = ['db', 'partitionKey', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', '
|
|
3121
|
+
var _validParams = ['db', 'partitionKey', 'ddoc', 'view', 'attEncodingInfo', 'attachments', 'conflicts', 'descending', 'includeDocs', 'inclusiveEnd', 'limit', 'skip', 'updateSeq', 'endKey', 'endKeyDocId', 'group', 'groupLevel', 'key', 'keys', 'reduce', 'stable', 'startKey', 'startKeyDocId', 'update', 'headers'];
|
|
3094
3122
|
var _validationErrors = (0, ibm_cloud_sdk_core_1.validateParams)(_params, _requiredParams, _validParams);
|
|
3095
3123
|
if (_validationErrors) {
|
|
3096
3124
|
return Promise.reject(_validationErrors);
|
|
@@ -3105,16 +3133,16 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3105
3133
|
'limit': _params.limit,
|
|
3106
3134
|
'skip': _params.skip,
|
|
3107
3135
|
'update_seq': _params.updateSeq,
|
|
3108
|
-
'
|
|
3109
|
-
'
|
|
3136
|
+
'end_key': _params.endKey,
|
|
3137
|
+
'end_key_doc_id': _params.endKeyDocId,
|
|
3110
3138
|
'group': _params.group,
|
|
3111
3139
|
'group_level': _params.groupLevel,
|
|
3112
3140
|
'key': _params.key,
|
|
3113
3141
|
'keys': _params.keys,
|
|
3114
3142
|
'reduce': _params.reduce,
|
|
3115
3143
|
'stable': _params.stable,
|
|
3116
|
-
'
|
|
3117
|
-
'
|
|
3144
|
+
'start_key': _params.startKey,
|
|
3145
|
+
'start_key_doc_id': _params.startKeyDocId,
|
|
3118
3146
|
'update': _params.update,
|
|
3119
3147
|
};
|
|
3120
3148
|
var path = {
|
|
@@ -3142,10 +3170,14 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3142
3170
|
return this.createRequest(parameters);
|
|
3143
3171
|
};
|
|
3144
3172
|
/**
|
|
3145
|
-
* Query a database partition index by using selector syntax
|
|
3173
|
+
* Query a database partition index by using selector syntax.
|
|
3174
|
+
*
|
|
3175
|
+
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
|
|
3176
|
+
* all fields in selector by using the `_index` endpoint.
|
|
3146
3177
|
*
|
|
3147
|
-
*
|
|
3148
|
-
*
|
|
3178
|
+
* Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
|
|
3179
|
+
* recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
|
|
3180
|
+
* In this case the response body will include a warning field recommending that an index is created.
|
|
3149
3181
|
*
|
|
3150
3182
|
* @param {Object} params - The parameters to send to the service.
|
|
3151
3183
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -3173,6 +3205,11 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3173
3205
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3174
3206
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3175
3207
|
* argument.
|
|
3208
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
3209
|
+
* of a query. You should include at least one of these in a selector.
|
|
3210
|
+
*
|
|
3211
|
+
* For further reference see
|
|
3212
|
+
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
|
|
3176
3213
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3177
3214
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3178
3215
|
* existing conflicts in the document.
|
|
@@ -3191,7 +3228,9 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3191
3228
|
*
|
|
3192
3229
|
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
3193
3230
|
*
|
|
3194
|
-
* When sorting with multiple fields
|
|
3231
|
+
* When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
|
|
3232
|
+
* same order and each object in the sort array has a single key or at least one of the sort fields is included in the
|
|
3233
|
+
* selector. All sorting fields must use the same sort direction, either all ascending or all descending.
|
|
3195
3234
|
* @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
|
|
3196
3235
|
* shards.
|
|
3197
3236
|
* @param {string} [params.update] - Whether to update the index prior to returning the result.
|
|
@@ -3243,10 +3282,14 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3243
3282
|
return this.createRequest(parameters);
|
|
3244
3283
|
};
|
|
3245
3284
|
/**
|
|
3246
|
-
* Query a database partition index by using selector syntax
|
|
3285
|
+
* Query a database partition index by using selector syntax as stream.
|
|
3247
3286
|
*
|
|
3248
|
-
* Query documents by using a declarative JSON querying syntax.
|
|
3249
|
-
*
|
|
3287
|
+
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
|
|
3288
|
+
* all fields in selector by using the `_index` endpoint.
|
|
3289
|
+
*
|
|
3290
|
+
* Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
|
|
3291
|
+
* recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
|
|
3292
|
+
* In this case the response body will include a warning field recommending that an index is created.
|
|
3250
3293
|
*
|
|
3251
3294
|
* @param {Object} params - The parameters to send to the service.
|
|
3252
3295
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -3274,6 +3317,11 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3274
3317
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3275
3318
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3276
3319
|
* argument.
|
|
3320
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
3321
|
+
* of a query. You should include at least one of these in a selector.
|
|
3322
|
+
*
|
|
3323
|
+
* For further reference see
|
|
3324
|
+
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
|
|
3277
3325
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3278
3326
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3279
3327
|
* existing conflicts in the document.
|
|
@@ -3292,7 +3340,9 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3292
3340
|
*
|
|
3293
3341
|
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
3294
3342
|
*
|
|
3295
|
-
* When sorting with multiple fields
|
|
3343
|
+
* When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
|
|
3344
|
+
* same order and each object in the sort array has a single key or at least one of the sort fields is included in the
|
|
3345
|
+
* selector. All sorting fields must use the same sort direction, either all ascending or all descending.
|
|
3296
3346
|
* @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
|
|
3297
3347
|
* shards.
|
|
3298
3348
|
* @param {string} [params.update] - Whether to update the index prior to returning the result.
|
|
@@ -3378,6 +3428,11 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3378
3428
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3379
3429
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3380
3430
|
* argument.
|
|
3431
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
3432
|
+
* of a query. You should include at least one of these in a selector.
|
|
3433
|
+
*
|
|
3434
|
+
* For further reference see
|
|
3435
|
+
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
|
|
3381
3436
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3382
3437
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3383
3438
|
* existing conflicts in the document.
|
|
@@ -3396,7 +3451,9 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3396
3451
|
*
|
|
3397
3452
|
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
3398
3453
|
*
|
|
3399
|
-
* When sorting with multiple fields
|
|
3454
|
+
* When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
|
|
3455
|
+
* same order and each object in the sort array has a single key or at least one of the sort fields is included in the
|
|
3456
|
+
* selector. All sorting fields must use the same sort direction, either all ascending or all descending.
|
|
3400
3457
|
* @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
|
|
3401
3458
|
* shards.
|
|
3402
3459
|
* @param {string} [params.update] - Whether to update the index prior to returning the result.
|
|
@@ -3454,8 +3511,12 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3454
3511
|
/**
|
|
3455
3512
|
* Query an index by using selector syntax.
|
|
3456
3513
|
*
|
|
3457
|
-
* Query documents by using a declarative JSON querying syntax.
|
|
3458
|
-
*
|
|
3514
|
+
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
|
|
3515
|
+
* all fields in selector by using the `_index` endpoint.
|
|
3516
|
+
*
|
|
3517
|
+
* Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
|
|
3518
|
+
* recommended because it has a significant performance impact causing a full scan of the database with each request.
|
|
3519
|
+
* In this case the response body will include a warning field recommending that an index is created.
|
|
3459
3520
|
*
|
|
3460
3521
|
* @param {Object} params - The parameters to send to the service.
|
|
3461
3522
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -3482,6 +3543,11 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3482
3543
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3483
3544
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3484
3545
|
* argument.
|
|
3546
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
3547
|
+
* of a query. You should include at least one of these in a selector.
|
|
3548
|
+
*
|
|
3549
|
+
* For further reference see
|
|
3550
|
+
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
|
|
3485
3551
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3486
3552
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3487
3553
|
* existing conflicts in the document.
|
|
@@ -3500,7 +3566,9 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3500
3566
|
*
|
|
3501
3567
|
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
3502
3568
|
*
|
|
3503
|
-
* When sorting with multiple fields
|
|
3569
|
+
* When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
|
|
3570
|
+
* same order and each object in the sort array has a single key or at least one of the sort fields is included in the
|
|
3571
|
+
* selector. All sorting fields must use the same sort direction, either all ascending or all descending.
|
|
3504
3572
|
* @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
|
|
3505
3573
|
* shards.
|
|
3506
3574
|
* @param {string} [params.update] - Whether to update the index prior to returning the result.
|
|
@@ -3558,8 +3626,12 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3558
3626
|
/**
|
|
3559
3627
|
* Query an index by using selector syntax as stream.
|
|
3560
3628
|
*
|
|
3561
|
-
* Query documents by using a declarative JSON querying syntax.
|
|
3562
|
-
*
|
|
3629
|
+
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
|
|
3630
|
+
* all fields in selector by using the `_index` endpoint.
|
|
3631
|
+
*
|
|
3632
|
+
* Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
|
|
3633
|
+
* recommended because it has a significant performance impact causing a full scan of the database with each request.
|
|
3634
|
+
* In this case the response body will include a warning field recommending that an index is created.
|
|
3563
3635
|
*
|
|
3564
3636
|
* @param {Object} params - The parameters to send to the service.
|
|
3565
3637
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -3586,6 +3658,11 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3586
3658
|
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3587
3659
|
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3588
3660
|
* argument.
|
|
3661
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
|
|
3662
|
+
* of a query. You should include at least one of these in a selector.
|
|
3663
|
+
*
|
|
3664
|
+
* For further reference see
|
|
3665
|
+
* [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
|
|
3589
3666
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3590
3667
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3591
3668
|
* existing conflicts in the document.
|
|
@@ -3604,7 +3681,9 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3604
3681
|
*
|
|
3605
3682
|
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
3606
3683
|
*
|
|
3607
|
-
* When sorting with multiple fields
|
|
3684
|
+
* When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
|
|
3685
|
+
* same order and each object in the sort array has a single key or at least one of the sort fields is included in the
|
|
3686
|
+
* selector. All sorting fields must use the same sort direction, either all ascending or all descending.
|
|
3608
3687
|
* @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
|
|
3609
3688
|
* shards.
|
|
3610
3689
|
* @param {string} [params.update] - Whether to update the index prior to returning the result.
|