@ibm-cloud/cloudant 0.0.23 → 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/cloudant/v1.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * (C) Copyright IBM Corp. 2021.
2
+ * (C) Copyright IBM Corp. 2022.
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
@@ -144,6 +144,12 @@ declare class CloudantV1 extends CloudantBaseService {
144
144
  * Requests the database changes feed in the same way as `GET /{db}/_changes` does. It is widely used with the
145
145
  * `filter` query parameter because it allows one to pass more information to the filter.
146
146
  *
147
+ * ### Note
148
+ *
149
+ * Before using the changes feed we recommend reading the
150
+ * [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-faq-using-changes-feed) to understand the limitations and
151
+ * appropriate use cases.".
152
+ *
147
153
  * @param {Object} params - The parameters to send to the service.
148
154
  * @param {string} params.db - Path parameter to specify the database name.
149
155
  * @param {string[]} [params.docIds] - Schema for a list of document IDs.
@@ -172,6 +178,11 @@ declare class CloudantV1 extends CloudantBaseService {
172
178
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
173
179
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
174
180
  * argument.
181
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
182
+ * of a query. You should include at least one of these in a selector.
183
+ *
184
+ * For further reference see
185
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
175
186
  * @param {string} [params.lastEventId] - Header parameter to specify the ID of the last events received by the server
176
187
  * on a previous connection. Overrides `since` query parameter.
177
188
  * @param {boolean} [params.attEncodingInfo] - Query parameter to specify whether to include the encoding information
@@ -229,6 +240,12 @@ declare class CloudantV1 extends CloudantBaseService {
229
240
  * Requests the database changes feed in the same way as `GET /{db}/_changes` does. It is widely used with the
230
241
  * `filter` query parameter because it allows one to pass more information to the filter.
231
242
  *
243
+ * ### Note
244
+ *
245
+ * Before using the changes feed we recommend reading the
246
+ * [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-faq-using-changes-feed) to understand the limitations and
247
+ * appropriate use cases.".
248
+ *
232
249
  * @param {Object} params - The parameters to send to the service.
233
250
  * @param {string} params.db - Path parameter to specify the database name.
234
251
  * @param {string[]} [params.docIds] - Schema for a list of document IDs.
@@ -257,6 +274,11 @@ declare class CloudantV1 extends CloudantBaseService {
257
274
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
258
275
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
259
276
  * argument.
277
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
278
+ * of a query. You should include at least one of these in a selector.
279
+ *
280
+ * For further reference see
281
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
260
282
  * @param {string} [params.lastEventId] - Header parameter to specify the ID of the last events received by the server
261
283
  * on a previous connection. Overrides `since` query parameter.
262
284
  * @param {boolean} [params.attEncodingInfo] - Query parameter to specify whether to include the encoding information
@@ -329,13 +351,13 @@ declare class CloudantV1 extends CloudantBaseService {
329
351
  * @param {Object} [params] - The parameters to send to the service.
330
352
  * @param {boolean} [params.descending] - Query parameter to specify whether to return the documents in descending by
331
353
  * key order.
332
- * @param {string} [params.endkey] - Query parameter to specify to stop returning records when the specified key is
354
+ * @param {string} [params.endKey] - Query parameter to specify to stop returning records when the specified key is
333
355
  * reached. String representation of any JSON type that matches the key type emitted by the view function.
334
356
  * @param {number} [params.limit] - Query parameter to specify the number of returned documents to limit the result
335
357
  * to.
336
358
  * @param {number} [params.skip] - Query parameter to specify the number of records before starting to return the
337
359
  * results.
338
- * @param {string} [params.startkey] - Query parameter to specify to start returning records from the specified key.
360
+ * @param {string} [params.startKey] - Query parameter to specify to start returning records from the specified key.
339
361
  * String representation of any JSON type that matches the key type emitted by the view function.
340
362
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
341
363
  * @returns {Promise<CloudantV1.Response<string[]>>}
@@ -384,7 +406,8 @@ declare class CloudantV1 extends CloudantBaseService {
384
406
  * @param {boolean} [params.partitioned] - Query parameter to specify whether to enable database partitions when
385
407
  * creating a database.
386
408
  * @param {number} [params.q] - The number of shards in the database. Each shard is a partition of the hash value
387
- * range. Default is 8, unless overridden in the `cluster config`.
409
+ * range. Its value is set by the service. For more information about modifying database configuration, contact IBM
410
+ * Cloudant support.
388
411
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
389
412
  * @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
390
413
  */
@@ -415,12 +438,15 @@ declare class CloudantV1 extends CloudantBaseService {
415
438
  /**
416
439
  * Create or modify a document in a database.
417
440
  *
418
- * Creates or modifies a document in the specified database by using the supplied JSON document. If the JSON document
419
- * doesn't specify an `_id` field, then the document is created with a new unique ID generated by the UUID algorithm
420
- * that is configured for the server. If the document includes the `_id` field, then it is created with that `_id` or
421
- * updated if the `_id` already exists, and an appropriate `_rev` is included in the JSON document. If the `_id`
422
- * includes the `_local` or `_design` prefix, then this operation is used to create or modify local or design
423
- * documents respectively.
441
+ * Creates or modifies a document in the specified database by using the supplied JSON document.
442
+ *
443
+ * For creation, you may specify the document ID but you should not specify the revision. If you don't specify the
444
+ * document ID, then the server generates an ID for your document.
445
+ *
446
+ * For modification, you must specify the document ID and a revision identifier in the JSON document.
447
+ *
448
+ * If your document ID includes the `_local/` or `_design/` prefix, then this operation creates or modifies a local or
449
+ * a design document respectively.
424
450
  *
425
451
  * @param {Object} params - The parameters to send to the service.
426
452
  * @param {string} params.db - Path parameter to specify the database name.
@@ -457,10 +483,10 @@ declare class CloudantV1 extends CloudantBaseService {
457
483
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
458
484
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
459
485
  * indicating the sequence id of the database the view reflects.
460
- * @param {string} [params.endkey] - Schema for a document ID.
486
+ * @param {string} [params.endKey] - Schema for a document ID.
461
487
  * @param {string} [params.key] - Schema for a document ID.
462
488
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
463
- * @param {string} [params.startkey] - Schema for a document ID.
489
+ * @param {string} [params.startKey] - Schema for a document ID.
464
490
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
465
491
  * @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>}
466
492
  */
@@ -490,10 +516,10 @@ declare class CloudantV1 extends CloudantBaseService {
490
516
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
491
517
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
492
518
  * indicating the sequence id of the database the view reflects.
493
- * @param {string} [params.endkey] - Schema for a document ID.
519
+ * @param {string} [params.endKey] - Schema for a document ID.
494
520
  * @param {string} [params.key] - Schema for a document ID.
495
521
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
496
- * @param {string} [params.startkey] - Schema for a document ID.
522
+ * @param {string} [params.startKey] - Schema for a document ID.
497
523
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
498
524
  * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
499
525
  */
@@ -533,9 +559,9 @@ declare class CloudantV1 extends CloudantBaseService {
533
559
  /**
534
560
  * Bulk modify multiple documents in a database.
535
561
  *
536
- * The bulk document API allows you to create and update multiple documents at the same time within a single request.
537
- * The basic operation is similar to creating or updating a single document, except that you batch the document
538
- * structure and information.
562
+ * The bulk document API allows you to create, update, and delete multiple documents at the same time within a single
563
+ * request. The basic operation is similar to creating, updating, or deleting a single document, except that you batch
564
+ * the document structure and information.
539
565
  *
540
566
  * @param {Object} params - The parameters to send to the service.
541
567
  * @param {string} params.db - Path parameter to specify the database name.
@@ -782,8 +808,11 @@ declare class CloudantV1 extends CloudantBaseService {
782
808
  /**
783
809
  * Create or modify a document.
784
810
  *
785
- * The PUT method creates a new named document, or creates a new revision of the existing document. Unlike the `POST
786
- * /{db}` request, you must specify the document ID in the request URL.
811
+ * Creates or modifies a document in the specified database.
812
+ *
813
+ * For creation, you must specify the document ID but you should not specify the revision.
814
+ *
815
+ * For modification, you must specify the document ID and a revision identifier.
787
816
  *
788
817
  * @param {Object} params - The parameters to send to the service.
789
818
  * @param {string} params.db - Path parameter to specify the database name.
@@ -940,10 +969,10 @@ declare class CloudantV1 extends CloudantBaseService {
940
969
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
941
970
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
942
971
  * indicating the sequence id of the database the view reflects.
943
- * @param {string} [params.endkey] - Schema for a document ID.
972
+ * @param {string} [params.endKey] - Schema for a document ID.
944
973
  * @param {string} [params.key] - Schema for a document ID.
945
974
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
946
- * @param {string} [params.startkey] - Schema for a document ID.
975
+ * @param {string} [params.startKey] - Schema for a document ID.
947
976
  * @param {string} [params.accept] - The type of the response: application/json or application/octet-stream.
948
977
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
949
978
  * @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>}
@@ -996,8 +1025,8 @@ declare class CloudantV1 extends CloudantBaseService {
996
1025
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
997
1026
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
998
1027
  * indicating the sequence id of the database the view reflects.
999
- * @param {any} [params.endkey] - Schema for any JSON type.
1000
- * @param {string} [params.endkeyDocid] - Schema for a document ID.
1028
+ * @param {any} [params.endKey] - Schema for any JSON type.
1029
+ * @param {string} [params.endKeyDocId] - Schema for a document ID.
1001
1030
  * @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
1002
1031
  * group rather than a single row. Implies reduce is true and the maximum group_level.
1003
1032
  * @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
@@ -1008,8 +1037,8 @@ declare class CloudantV1 extends CloudantBaseService {
1008
1037
  * Default is true when a reduce function is defined.
1009
1038
  * @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
1010
1039
  * of shards.
1011
- * @param {any} [params.startkey] - Schema for any JSON type.
1012
- * @param {string} [params.startkeyDocid] - Schema for a document ID.
1040
+ * @param {any} [params.startKey] - Schema for any JSON type.
1041
+ * @param {string} [params.startKeyDocId] - Schema for a document ID.
1013
1042
  * @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
1014
1043
  * to responding to the user.
1015
1044
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -1044,8 +1073,8 @@ declare class CloudantV1 extends CloudantBaseService {
1044
1073
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
1045
1074
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
1046
1075
  * indicating the sequence id of the database the view reflects.
1047
- * @param {any} [params.endkey] - Schema for any JSON type.
1048
- * @param {string} [params.endkeyDocid] - Schema for a document ID.
1076
+ * @param {any} [params.endKey] - Schema for any JSON type.
1077
+ * @param {string} [params.endKeyDocId] - Schema for a document ID.
1049
1078
  * @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
1050
1079
  * group rather than a single row. Implies reduce is true and the maximum group_level.
1051
1080
  * @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
@@ -1056,8 +1085,8 @@ declare class CloudantV1 extends CloudantBaseService {
1056
1085
  * Default is true when a reduce function is defined.
1057
1086
  * @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
1058
1087
  * of shards.
1059
- * @param {any} [params.startkey] - Schema for any JSON type.
1060
- * @param {string} [params.startkeyDocid] - Schema for a document ID.
1088
+ * @param {any} [params.startKey] - Schema for any JSON type.
1089
+ * @param {string} [params.startKeyDocId] - Schema for a document ID.
1061
1090
  * @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
1062
1091
  * to responding to the user.
1063
1092
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -1139,10 +1168,10 @@ declare class CloudantV1 extends CloudantBaseService {
1139
1168
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
1140
1169
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
1141
1170
  * indicating the sequence id of the database the view reflects.
1142
- * @param {string} [params.endkey] - Schema for a document ID.
1171
+ * @param {string} [params.endKey] - Schema for a document ID.
1143
1172
  * @param {string} [params.key] - Schema for a document ID.
1144
1173
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
1145
- * @param {string} [params.startkey] - Schema for a document ID.
1174
+ * @param {string} [params.startKey] - Schema for a document ID.
1146
1175
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1147
1176
  * @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>}
1148
1177
  */
@@ -1173,10 +1202,10 @@ declare class CloudantV1 extends CloudantBaseService {
1173
1202
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
1174
1203
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
1175
1204
  * indicating the sequence id of the database the view reflects.
1176
- * @param {string} [params.endkey] - Schema for a document ID.
1205
+ * @param {string} [params.endKey] - Schema for a document ID.
1177
1206
  * @param {string} [params.key] - Schema for a document ID.
1178
1207
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
1179
- * @param {string} [params.startkey] - Schema for a document ID.
1208
+ * @param {string} [params.startKey] - Schema for a document ID.
1180
1209
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1181
1210
  * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
1182
1211
  */
@@ -1290,8 +1319,8 @@ declare class CloudantV1 extends CloudantBaseService {
1290
1319
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
1291
1320
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
1292
1321
  * indicating the sequence id of the database the view reflects.
1293
- * @param {any} [params.endkey] - Schema for any JSON type.
1294
- * @param {string} [params.endkeyDocid] - Schema for a document ID.
1322
+ * @param {any} [params.endKey] - Schema for any JSON type.
1323
+ * @param {string} [params.endKeyDocId] - Schema for a document ID.
1295
1324
  * @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
1296
1325
  * group rather than a single row. Implies reduce is true and the maximum group_level.
1297
1326
  * @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
@@ -1302,8 +1331,8 @@ declare class CloudantV1 extends CloudantBaseService {
1302
1331
  * Default is true when a reduce function is defined.
1303
1332
  * @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
1304
1333
  * of shards.
1305
- * @param {any} [params.startkey] - Schema for any JSON type.
1306
- * @param {string} [params.startkeyDocid] - Schema for a document ID.
1334
+ * @param {any} [params.startKey] - Schema for any JSON type.
1335
+ * @param {string} [params.startKeyDocId] - Schema for a document ID.
1307
1336
  * @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
1308
1337
  * to responding to the user.
1309
1338
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -1339,8 +1368,8 @@ declare class CloudantV1 extends CloudantBaseService {
1339
1368
  * @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
1340
1369
  * @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
1341
1370
  * indicating the sequence id of the database the view reflects.
1342
- * @param {any} [params.endkey] - Schema for any JSON type.
1343
- * @param {string} [params.endkeyDocid] - Schema for a document ID.
1371
+ * @param {any} [params.endKey] - Schema for any JSON type.
1372
+ * @param {string} [params.endKeyDocId] - Schema for a document ID.
1344
1373
  * @param {boolean} [params.group] - Parameter to specify whether to group the results using the reduce function to a
1345
1374
  * group rather than a single row. Implies reduce is true and the maximum group_level.
1346
1375
  * @param {number} [params.groupLevel] - Parameter to specify the group level to be used. Implies group is true.
@@ -1351,8 +1380,8 @@ declare class CloudantV1 extends CloudantBaseService {
1351
1380
  * Default is true when a reduce function is defined.
1352
1381
  * @param {boolean} [params.stable] - Parameter to specify whether view results should be returned from a stable set
1353
1382
  * of shards.
1354
- * @param {any} [params.startkey] - Schema for any JSON type.
1355
- * @param {string} [params.startkeyDocid] - Schema for a document ID.
1383
+ * @param {any} [params.startKey] - Schema for any JSON type.
1384
+ * @param {string} [params.startKeyDocId] - Schema for a document ID.
1356
1385
  * @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
1357
1386
  * to responding to the user.
1358
1387
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
@@ -1360,10 +1389,14 @@ declare class CloudantV1 extends CloudantBaseService {
1360
1389
  */
1361
1390
  postPartitionViewAsStream(params: CloudantV1.PostPartitionViewAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
1362
1391
  /**
1363
- * Query a database partition index by using selector syntax (POST).
1392
+ * Query a database partition index by using selector syntax.
1393
+ *
1394
+ * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
1395
+ * all fields in selector by using the `_index` endpoint.
1364
1396
  *
1365
- * Query documents by using a declarative JSON querying syntax. Queries can use the built-in `_all_docs` index or
1366
- * custom indices, specified by using the `_index` endpoint.
1397
+ * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
1398
+ * recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
1399
+ * In this case the response body will include a warning field recommending that an index is created.
1367
1400
  *
1368
1401
  * @param {Object} params - The parameters to send to the service.
1369
1402
  * @param {string} params.db - Path parameter to specify the database name.
@@ -1391,6 +1424,11 @@ declare class CloudantV1 extends CloudantBaseService {
1391
1424
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
1392
1425
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
1393
1426
  * argument.
1427
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
1428
+ * of a query. You should include at least one of these in a selector.
1429
+ *
1430
+ * For further reference see
1431
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
1394
1432
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
1395
1433
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
1396
1434
  * existing conflicts in the document.
@@ -1402,8 +1440,16 @@ declare class CloudantV1 extends CloudantBaseService {
1402
1440
  * @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
1403
1441
  * results when queried.
1404
1442
  * @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
1405
- * @param {JsonObject[]} [params.sort] - JSON array of sort syntax elements to determine the sort order of the
1406
- * results.
1443
+ * @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
1444
+ * direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
1445
+ * provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
1446
+ * fields.
1447
+ *
1448
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
1449
+ *
1450
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
1451
+ * 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
1452
+ * selector. All sorting fields must use the same sort direction, either all ascending or all descending.
1407
1453
  * @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
1408
1454
  * shards.
1409
1455
  * @param {string} [params.update] - Whether to update the index prior to returning the result.
@@ -1414,10 +1460,14 @@ declare class CloudantV1 extends CloudantBaseService {
1414
1460
  */
1415
1461
  postPartitionFind(params: CloudantV1.PostPartitionFindParams): Promise<CloudantV1.Response<CloudantV1.FindResult>>;
1416
1462
  /**
1417
- * Query a database partition index by using selector syntax (POST) as stream.
1463
+ * Query a database partition index by using selector syntax as stream.
1418
1464
  *
1419
- * Query documents by using a declarative JSON querying syntax. Queries can use the built-in `_all_docs` index or
1420
- * custom indices, specified by using the `_index` endpoint.
1465
+ * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
1466
+ * all fields in selector by using the `_index` endpoint.
1467
+ *
1468
+ * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
1469
+ * recommended because it has a noticeable performance impact causing a full scan of the partition with each request.
1470
+ * In this case the response body will include a warning field recommending that an index is created.
1421
1471
  *
1422
1472
  * @param {Object} params - The parameters to send to the service.
1423
1473
  * @param {string} params.db - Path parameter to specify the database name.
@@ -1445,6 +1495,11 @@ declare class CloudantV1 extends CloudantBaseService {
1445
1495
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
1446
1496
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
1447
1497
  * argument.
1498
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
1499
+ * of a query. You should include at least one of these in a selector.
1500
+ *
1501
+ * For further reference see
1502
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
1448
1503
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
1449
1504
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
1450
1505
  * existing conflicts in the document.
@@ -1456,8 +1511,16 @@ declare class CloudantV1 extends CloudantBaseService {
1456
1511
  * @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
1457
1512
  * results when queried.
1458
1513
  * @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
1459
- * @param {JsonObject[]} [params.sort] - JSON array of sort syntax elements to determine the sort order of the
1460
- * results.
1514
+ * @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
1515
+ * direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
1516
+ * provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
1517
+ * fields.
1518
+ *
1519
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
1520
+ *
1521
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
1522
+ * 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
1523
+ * selector. All sorting fields must use the same sort direction, either all ascending or all descending.
1461
1524
  * @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
1462
1525
  * shards.
1463
1526
  * @param {string} [params.update] - Whether to update the index prior to returning the result.
@@ -1501,6 +1564,11 @@ declare class CloudantV1 extends CloudantBaseService {
1501
1564
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
1502
1565
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
1503
1566
  * argument.
1567
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
1568
+ * of a query. You should include at least one of these in a selector.
1569
+ *
1570
+ * For further reference see
1571
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
1504
1572
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
1505
1573
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
1506
1574
  * existing conflicts in the document.
@@ -1512,8 +1580,16 @@ declare class CloudantV1 extends CloudantBaseService {
1512
1580
  * @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
1513
1581
  * results when queried.
1514
1582
  * @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
1515
- * @param {JsonObject[]} [params.sort] - JSON array of sort syntax elements to determine the sort order of the
1516
- * results.
1583
+ * @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
1584
+ * direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
1585
+ * provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
1586
+ * fields.
1587
+ *
1588
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
1589
+ *
1590
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
1591
+ * 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
1592
+ * selector. All sorting fields must use the same sort direction, either all ascending or all descending.
1517
1593
  * @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
1518
1594
  * shards.
1519
1595
  * @param {string} [params.update] - Whether to update the index prior to returning the result.
@@ -1530,8 +1606,12 @@ declare class CloudantV1 extends CloudantBaseService {
1530
1606
  /**
1531
1607
  * Query an index by using selector syntax.
1532
1608
  *
1533
- * Query documents by using a declarative JSON querying syntax. Queries can use the built-in `_all_docs` index or
1534
- * custom indices, specified by using the `_index` endpoint.
1609
+ * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
1610
+ * all fields in selector by using the `_index` endpoint.
1611
+ *
1612
+ * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
1613
+ * recommended because it has a significant performance impact causing a full scan of the database with each request.
1614
+ * In this case the response body will include a warning field recommending that an index is created.
1535
1615
  *
1536
1616
  * @param {Object} params - The parameters to send to the service.
1537
1617
  * @param {string} params.db - Path parameter to specify the database name.
@@ -1558,6 +1638,11 @@ declare class CloudantV1 extends CloudantBaseService {
1558
1638
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
1559
1639
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
1560
1640
  * argument.
1641
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
1642
+ * of a query. You should include at least one of these in a selector.
1643
+ *
1644
+ * For further reference see
1645
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
1561
1646
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
1562
1647
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
1563
1648
  * existing conflicts in the document.
@@ -1569,8 +1654,16 @@ declare class CloudantV1 extends CloudantBaseService {
1569
1654
  * @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
1570
1655
  * results when queried.
1571
1656
  * @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
1572
- * @param {JsonObject[]} [params.sort] - JSON array of sort syntax elements to determine the sort order of the
1573
- * results.
1657
+ * @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
1658
+ * direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
1659
+ * provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
1660
+ * fields.
1661
+ *
1662
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
1663
+ *
1664
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
1665
+ * 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
1666
+ * selector. All sorting fields must use the same sort direction, either all ascending or all descending.
1574
1667
  * @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
1575
1668
  * shards.
1576
1669
  * @param {string} [params.update] - Whether to update the index prior to returning the result.
@@ -1587,8 +1680,12 @@ declare class CloudantV1 extends CloudantBaseService {
1587
1680
  /**
1588
1681
  * Query an index by using selector syntax as stream.
1589
1682
  *
1590
- * Query documents by using a declarative JSON querying syntax. Queries can use the built-in `_all_docs` index or
1591
- * custom indices, specified by using the `_index` endpoint.
1683
+ * Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
1684
+ * all fields in selector by using the `_index` endpoint.
1685
+ *
1686
+ * Queries without an appropriate backing index will fallback to using the built-in `_all_docs` index. This is not
1687
+ * recommended because it has a significant performance impact causing a full scan of the database with each request.
1688
+ * In this case the response body will include a warning field recommending that an index is created.
1592
1689
  *
1593
1690
  * @param {Object} params - The parameters to send to the service.
1594
1691
  * @param {string} params.db - Path parameter to specify the database name.
@@ -1615,6 +1712,11 @@ declare class CloudantV1 extends CloudantBaseService {
1615
1712
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
1616
1713
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
1617
1714
  * argument.
1715
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis
1716
+ * of a query. You should include at least one of these in a selector.
1717
+ *
1718
+ * For further reference see
1719
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
1618
1720
  * @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
1619
1721
  * @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
1620
1722
  * existing conflicts in the document.
@@ -1626,8 +1728,16 @@ declare class CloudantV1 extends CloudantBaseService {
1626
1728
  * @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
1627
1729
  * results when queried.
1628
1730
  * @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
1629
- * @param {JsonObject[]} [params.sort] - JSON array of sort syntax elements to determine the sort order of the
1630
- * results.
1731
+ * @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
1732
+ * direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
1733
+ * provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
1734
+ * fields.
1735
+ *
1736
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
1737
+ *
1738
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
1739
+ * 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
1740
+ * selector. All sorting fields must use the same sort direction, either all ascending or all descending.
1631
1741
  * @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
1632
1742
  * shards.
1633
1743
  * @param {string} [params.update] - Whether to update the index prior to returning the result.
@@ -2174,6 +2284,12 @@ declare class CloudantV1 extends CloudantBaseService {
2174
2284
  * and CouchDB related permissions. Be careful: by removing a Cloudant API key, a member or an admin from the list of
2175
2285
  * users that have access permissions, you remove it from the list of users that have access to the database.
2176
2286
  *
2287
+ * ### Note about nobody role
2288
+ *
2289
+ * The `nobody` username applies to all unauthenticated connection attempts. For example, if an application tries to
2290
+ * read data from a database, but did not identify itself, the task can continue only if the `nobody` user has the
2291
+ * role `_reader`.
2292
+ *
2177
2293
  * @param {Object} params - The parameters to send to the service.
2178
2294
  * @param {string} params.db - Path parameter to specify the database name.
2179
2295
  * @param {SecurityObject} [params.admins] - Schema for names and roles to map to a database permission.
@@ -2202,6 +2318,12 @@ declare class CloudantV1 extends CloudantBaseService {
2202
2318
  * Modify only Cloudant related permissions to database. Be careful: by removing an API key from the list, you remove
2203
2319
  * the API key from the list of users that have access to the database.
2204
2320
  *
2321
+ * ### Note about nobody role
2322
+ *
2323
+ * The `nobody` username applies to all unauthenticated connection attempts. For example, if an application tries to
2324
+ * read data from a database, but did not identify itself, the task can continue only if the `nobody` user has the
2325
+ * role `_reader`.
2326
+ *
2205
2327
  * @param {Object} params - The parameters to send to the service.
2206
2328
  * @param {string} params.db - Path parameter to specify the database name.
2207
2329
  * @param {JsonObject} params.cloudant - Database permissions for Cloudant users and/or API keys.
@@ -2630,6 +2752,11 @@ declare namespace CloudantV1 {
2630
2752
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
2631
2753
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
2632
2754
  * supplied argument.
2755
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
2756
+ * basis of a query. You should include at least one of these in a selector.
2757
+ *
2758
+ * For further reference see
2759
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
2633
2760
  */
2634
2761
  selector?: JsonObject;
2635
2762
  /** Header parameter to specify the ID of the last events received by the server on a previous connection.
@@ -2744,6 +2871,11 @@ declare namespace CloudantV1 {
2744
2871
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
2745
2872
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
2746
2873
  * supplied argument.
2874
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
2875
+ * basis of a query. You should include at least one of these in a selector.
2876
+ *
2877
+ * For further reference see
2878
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
2747
2879
  */
2748
2880
  selector?: JsonObject;
2749
2881
  /** Header parameter to specify the ID of the last events received by the server on a previous connection.
@@ -2838,7 +2970,7 @@ declare namespace CloudantV1 {
2838
2970
  /** Query parameter to specify to stop returning records when the specified key is reached. String
2839
2971
  * representation of any JSON type that matches the key type emitted by the view function.
2840
2972
  */
2841
- endkey?: string;
2973
+ endKey?: string;
2842
2974
  /** Query parameter to specify the number of returned documents to limit the result to. */
2843
2975
  limit?: number;
2844
2976
  /** Query parameter to specify the number of records before starting to return the results. */
@@ -2846,7 +2978,7 @@ declare namespace CloudantV1 {
2846
2978
  /** Query parameter to specify to start returning records from the specified key. String representation of any
2847
2979
  * JSON type that matches the key type emitted by the view function.
2848
2980
  */
2849
- startkey?: string;
2981
+ startKey?: string;
2850
2982
  headers?: OutgoingHttpHeaders;
2851
2983
  }
2852
2984
  /** Parameters for the `postDbsInfo` operation. */
@@ -2873,8 +3005,8 @@ declare namespace CloudantV1 {
2873
3005
  db: string;
2874
3006
  /** Query parameter to specify whether to enable database partitions when creating a database. */
2875
3007
  partitioned?: boolean;
2876
- /** The number of shards in the database. Each shard is a partition of the hash value range. Default is 8,
2877
- * unless overridden in the `cluster config`.
3008
+ /** The number of shards in the database. Each shard is a partition of the hash value range. Its value is set by
3009
+ * the service. For more information about modifying database configuration, contact IBM Cloudant support.
2878
3010
  */
2879
3011
  q?: number;
2880
3012
  headers?: OutgoingHttpHeaders;
@@ -2952,13 +3084,13 @@ declare namespace CloudantV1 {
2952
3084
  */
2953
3085
  updateSeq?: boolean;
2954
3086
  /** Schema for a document ID. */
2955
- endkey?: string;
3087
+ endKey?: string;
2956
3088
  /** Schema for a document ID. */
2957
3089
  key?: string;
2958
3090
  /** Schema for a list of document IDs. */
2959
3091
  keys?: string[];
2960
3092
  /** Schema for a document ID. */
2961
- startkey?: string;
3093
+ startKey?: string;
2962
3094
  headers?: OutgoingHttpHeaders;
2963
3095
  }
2964
3096
  /** Parameters for the `postAllDocsAsStream` operation. */
@@ -2990,13 +3122,13 @@ declare namespace CloudantV1 {
2990
3122
  */
2991
3123
  updateSeq?: boolean;
2992
3124
  /** Schema for a document ID. */
2993
- endkey?: string;
3125
+ endKey?: string;
2994
3126
  /** Schema for a document ID. */
2995
3127
  key?: string;
2996
3128
  /** Schema for a list of document IDs. */
2997
3129
  keys?: string[];
2998
3130
  /** Schema for a document ID. */
2999
- startkey?: string;
3131
+ startKey?: string;
3000
3132
  headers?: OutgoingHttpHeaders;
3001
3133
  }
3002
3134
  /** Parameters for the `postAllDocsQueries` operation. */
@@ -3479,13 +3611,13 @@ declare namespace CloudantV1 {
3479
3611
  */
3480
3612
  updateSeq?: boolean;
3481
3613
  /** Schema for a document ID. */
3482
- endkey?: string;
3614
+ endKey?: string;
3483
3615
  /** Schema for a document ID. */
3484
3616
  key?: string;
3485
3617
  /** Schema for a list of document IDs. */
3486
3618
  keys?: string[];
3487
3619
  /** Schema for a document ID. */
3488
- startkey?: string;
3620
+ startKey?: string;
3489
3621
  /** The type of the response: application/json or application/octet-stream. */
3490
3622
  accept?: PostDesignDocsConstants.Accept | string;
3491
3623
  headers?: OutgoingHttpHeaders;
@@ -3553,9 +3685,9 @@ declare namespace CloudantV1 {
3553
3685
  */
3554
3686
  updateSeq?: boolean;
3555
3687
  /** Schema for any JSON type. */
3556
- endkey?: any;
3688
+ endKey?: any;
3557
3689
  /** Schema for a document ID. */
3558
- endkeyDocid?: string;
3690
+ endKeyDocId?: string;
3559
3691
  /** Parameter to specify whether to group the results using the reduce function to a group rather than a single
3560
3692
  * row. Implies reduce is true and the maximum group_level.
3561
3693
  */
@@ -3575,9 +3707,9 @@ declare namespace CloudantV1 {
3575
3707
  /** Parameter to specify whether view results should be returned from a stable set of shards. */
3576
3708
  stable?: boolean;
3577
3709
  /** Schema for any JSON type. */
3578
- startkey?: any;
3710
+ startKey?: any;
3579
3711
  /** Schema for a document ID. */
3580
- startkeyDocid?: string;
3712
+ startKeyDocId?: string;
3581
3713
  /** Parameter to specify whether or not the view in question should be updated prior to responding to the user. */
3582
3714
  update?: PostViewConstants.Update | string;
3583
3715
  headers?: OutgoingHttpHeaders;
@@ -3626,9 +3758,9 @@ declare namespace CloudantV1 {
3626
3758
  */
3627
3759
  updateSeq?: boolean;
3628
3760
  /** Schema for any JSON type. */
3629
- endkey?: any;
3761
+ endKey?: any;
3630
3762
  /** Schema for a document ID. */
3631
- endkeyDocid?: string;
3763
+ endKeyDocId?: string;
3632
3764
  /** Parameter to specify whether to group the results using the reduce function to a group rather than a single
3633
3765
  * row. Implies reduce is true and the maximum group_level.
3634
3766
  */
@@ -3648,9 +3780,9 @@ declare namespace CloudantV1 {
3648
3780
  /** Parameter to specify whether view results should be returned from a stable set of shards. */
3649
3781
  stable?: boolean;
3650
3782
  /** Schema for any JSON type. */
3651
- startkey?: any;
3783
+ startKey?: any;
3652
3784
  /** Schema for a document ID. */
3653
- startkeyDocid?: string;
3785
+ startKeyDocId?: string;
3654
3786
  /** Parameter to specify whether or not the view in question should be updated prior to responding to the user. */
3655
3787
  update?: PostViewAsStreamConstants.Update | string;
3656
3788
  headers?: OutgoingHttpHeaders;
@@ -3735,13 +3867,13 @@ declare namespace CloudantV1 {
3735
3867
  */
3736
3868
  updateSeq?: boolean;
3737
3869
  /** Schema for a document ID. */
3738
- endkey?: string;
3870
+ endKey?: string;
3739
3871
  /** Schema for a document ID. */
3740
3872
  key?: string;
3741
3873
  /** Schema for a list of document IDs. */
3742
3874
  keys?: string[];
3743
3875
  /** Schema for a document ID. */
3744
- startkey?: string;
3876
+ startKey?: string;
3745
3877
  headers?: OutgoingHttpHeaders;
3746
3878
  }
3747
3879
  /** Parameters for the `postPartitionAllDocsAsStream` operation. */
@@ -3775,13 +3907,13 @@ declare namespace CloudantV1 {
3775
3907
  */
3776
3908
  updateSeq?: boolean;
3777
3909
  /** Schema for a document ID. */
3778
- endkey?: string;
3910
+ endKey?: string;
3779
3911
  /** Schema for a document ID. */
3780
3912
  key?: string;
3781
3913
  /** Schema for a list of document IDs. */
3782
3914
  keys?: string[];
3783
3915
  /** Schema for a document ID. */
3784
- startkey?: string;
3916
+ startKey?: string;
3785
3917
  headers?: OutgoingHttpHeaders;
3786
3918
  }
3787
3919
  /** Parameters for the `postPartitionSearch` operation. */
@@ -3937,9 +4069,9 @@ declare namespace CloudantV1 {
3937
4069
  */
3938
4070
  updateSeq?: boolean;
3939
4071
  /** Schema for any JSON type. */
3940
- endkey?: any;
4072
+ endKey?: any;
3941
4073
  /** Schema for a document ID. */
3942
- endkeyDocid?: string;
4074
+ endKeyDocId?: string;
3943
4075
  /** Parameter to specify whether to group the results using the reduce function to a group rather than a single
3944
4076
  * row. Implies reduce is true and the maximum group_level.
3945
4077
  */
@@ -3959,9 +4091,9 @@ declare namespace CloudantV1 {
3959
4091
  /** Parameter to specify whether view results should be returned from a stable set of shards. */
3960
4092
  stable?: boolean;
3961
4093
  /** Schema for any JSON type. */
3962
- startkey?: any;
4094
+ startKey?: any;
3963
4095
  /** Schema for a document ID. */
3964
- startkeyDocid?: string;
4096
+ startKeyDocId?: string;
3965
4097
  /** Parameter to specify whether or not the view in question should be updated prior to responding to the user. */
3966
4098
  update?: PostPartitionViewConstants.Update | string;
3967
4099
  headers?: OutgoingHttpHeaders;
@@ -4012,9 +4144,9 @@ declare namespace CloudantV1 {
4012
4144
  */
4013
4145
  updateSeq?: boolean;
4014
4146
  /** Schema for any JSON type. */
4015
- endkey?: any;
4147
+ endKey?: any;
4016
4148
  /** Schema for a document ID. */
4017
- endkeyDocid?: string;
4149
+ endKeyDocId?: string;
4018
4150
  /** Parameter to specify whether to group the results using the reduce function to a group rather than a single
4019
4151
  * row. Implies reduce is true and the maximum group_level.
4020
4152
  */
@@ -4034,9 +4166,9 @@ declare namespace CloudantV1 {
4034
4166
  /** Parameter to specify whether view results should be returned from a stable set of shards. */
4035
4167
  stable?: boolean;
4036
4168
  /** Schema for any JSON type. */
4037
- startkey?: any;
4169
+ startKey?: any;
4038
4170
  /** Schema for a document ID. */
4039
- startkeyDocid?: string;
4171
+ startKeyDocId?: string;
4040
4172
  /** Parameter to specify whether or not the view in question should be updated prior to responding to the user. */
4041
4173
  update?: PostPartitionViewAsStreamConstants.Update | string;
4042
4174
  headers?: OutgoingHttpHeaders;
@@ -4079,6 +4211,11 @@ declare namespace CloudantV1 {
4079
4211
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
4080
4212
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
4081
4213
  * supplied argument.
4214
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
4215
+ * basis of a query. You should include at least one of these in a selector.
4216
+ *
4217
+ * For further reference see
4218
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
4082
4219
  */
4083
4220
  selector: JsonObject;
4084
4221
  /** Opaque bookmark token used when paginating results. */
@@ -4100,7 +4237,16 @@ declare namespace CloudantV1 {
4100
4237
  limit?: number;
4101
4238
  /** Skip the first 'n' results, where 'n' is the value that is specified. */
4102
4239
  skip?: number;
4103
- /** JSON array of sort syntax elements to determine the sort order of the results. */
4240
+ /** The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The
4241
+ * first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next
4242
+ * level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
4243
+ *
4244
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
4245
+ *
4246
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
4247
+ * same order and each object in the sort array has a single key or at least one of the sort fields is included in
4248
+ * the selector. All sorting fields must use the same sort direction, either all ascending or all descending.
4249
+ */
4104
4250
  sort?: JsonObject[];
4105
4251
  /** Whether or not the view results should be returned from a "stable" set of shards. */
4106
4252
  stable?: boolean;
@@ -4155,6 +4301,11 @@ declare namespace CloudantV1 {
4155
4301
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
4156
4302
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
4157
4303
  * supplied argument.
4304
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
4305
+ * basis of a query. You should include at least one of these in a selector.
4306
+ *
4307
+ * For further reference see
4308
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
4158
4309
  */
4159
4310
  selector: JsonObject;
4160
4311
  /** Opaque bookmark token used when paginating results. */
@@ -4176,7 +4327,16 @@ declare namespace CloudantV1 {
4176
4327
  limit?: number;
4177
4328
  /** Skip the first 'n' results, where 'n' is the value that is specified. */
4178
4329
  skip?: number;
4179
- /** JSON array of sort syntax elements to determine the sort order of the results. */
4330
+ /** The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The
4331
+ * first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next
4332
+ * level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
4333
+ *
4334
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
4335
+ *
4336
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
4337
+ * same order and each object in the sort array has a single key or at least one of the sort fields is included in
4338
+ * the selector. All sorting fields must use the same sort direction, either all ascending or all descending.
4339
+ */
4180
4340
  sort?: JsonObject[];
4181
4341
  /** Whether or not the view results should be returned from a "stable" set of shards. */
4182
4342
  stable?: boolean;
@@ -4229,6 +4389,11 @@ declare namespace CloudantV1 {
4229
4389
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
4230
4390
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
4231
4391
  * supplied argument.
4392
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
4393
+ * basis of a query. You should include at least one of these in a selector.
4394
+ *
4395
+ * For further reference see
4396
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
4232
4397
  */
4233
4398
  selector: JsonObject;
4234
4399
  /** Opaque bookmark token used when paginating results. */
@@ -4250,7 +4415,16 @@ declare namespace CloudantV1 {
4250
4415
  limit?: number;
4251
4416
  /** Skip the first 'n' results, where 'n' is the value that is specified. */
4252
4417
  skip?: number;
4253
- /** JSON array of sort syntax elements to determine the sort order of the results. */
4418
+ /** The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The
4419
+ * first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next
4420
+ * level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
4421
+ *
4422
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
4423
+ *
4424
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
4425
+ * same order and each object in the sort array has a single key or at least one of the sort fields is included in
4426
+ * the selector. All sorting fields must use the same sort direction, either all ascending or all descending.
4427
+ */
4254
4428
  sort?: JsonObject[];
4255
4429
  /** Whether or not the view results should be returned from a "stable" set of shards. */
4256
4430
  stable?: boolean;
@@ -4309,6 +4483,11 @@ declare namespace CloudantV1 {
4309
4483
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
4310
4484
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
4311
4485
  * supplied argument.
4486
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
4487
+ * basis of a query. You should include at least one of these in a selector.
4488
+ *
4489
+ * For further reference see
4490
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
4312
4491
  */
4313
4492
  selector: JsonObject;
4314
4493
  /** Opaque bookmark token used when paginating results. */
@@ -4330,7 +4509,16 @@ declare namespace CloudantV1 {
4330
4509
  limit?: number;
4331
4510
  /** Skip the first 'n' results, where 'n' is the value that is specified. */
4332
4511
  skip?: number;
4333
- /** JSON array of sort syntax elements to determine the sort order of the results. */
4512
+ /** The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The
4513
+ * first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next
4514
+ * level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
4515
+ *
4516
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
4517
+ *
4518
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
4519
+ * same order and each object in the sort array has a single key or at least one of the sort fields is included in
4520
+ * the selector. All sorting fields must use the same sort direction, either all ascending or all descending.
4521
+ */
4334
4522
  sort?: JsonObject[];
4335
4523
  /** Whether or not the view results should be returned from a "stable" set of shards. */
4336
4524
  stable?: boolean;
@@ -4389,6 +4577,11 @@ declare namespace CloudantV1 {
4389
4577
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
4390
4578
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
4391
4579
  * supplied argument.
4580
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
4581
+ * basis of a query. You should include at least one of these in a selector.
4582
+ *
4583
+ * For further reference see
4584
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
4392
4585
  */
4393
4586
  selector: JsonObject;
4394
4587
  /** Opaque bookmark token used when paginating results. */
@@ -4410,7 +4603,16 @@ declare namespace CloudantV1 {
4410
4603
  limit?: number;
4411
4604
  /** Skip the first 'n' results, where 'n' is the value that is specified. */
4412
4605
  skip?: number;
4413
- /** JSON array of sort syntax elements to determine the sort order of the results. */
4606
+ /** The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The
4607
+ * first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next
4608
+ * level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
4609
+ *
4610
+ * For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
4611
+ *
4612
+ * When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
4613
+ * same order and each object in the sort array has a single key or at least one of the sort fields is included in
4614
+ * the selector. All sorting fields must use the same sort direction, either all ascending or all descending.
4615
+ */
4414
4616
  sort?: JsonObject[];
4415
4617
  /** Whether or not the view results should be returned from a "stable" set of shards. */
4416
4618
  stable?: boolean;
@@ -5482,13 +5684,13 @@ declare namespace CloudantV1 {
5482
5684
  */
5483
5685
  update_seq?: boolean;
5484
5686
  /** Schema for a document ID. */
5485
- endkey?: string;
5687
+ end_key?: string;
5486
5688
  /** Schema for a document ID. */
5487
5689
  key?: string;
5488
5690
  /** Schema for a list of document IDs. */
5489
5691
  keys?: string[];
5490
5692
  /** Schema for a document ID. */
5491
- startkey?: string;
5693
+ start_key?: string;
5492
5694
  }
5493
5695
  /** Schema for the result of an all documents operation. */
5494
5696
  interface AllDocsResult {
@@ -5733,8 +5935,6 @@ declare namespace CloudantV1 {
5733
5935
  }
5734
5936
  /** Schema for a database change event. */
5735
5937
  interface DbEvent {
5736
- /** Account name. */
5737
- account?: string;
5738
5938
  /** Database name. */
5739
5939
  db_name: string;
5740
5940
  /** Sequence number. */
@@ -5877,6 +6077,10 @@ declare namespace CloudantV1 {
5877
6077
  }
5878
6078
  /** View index information. */
5879
6079
  interface DesignDocumentViewIndex {
6080
+ /** List of collator versions. If there are multiple entries this implies a libicu upgrade has occurred but
6081
+ * compaction has not run yet.
6082
+ */
6083
+ collator_versions: string[];
5880
6084
  /** Indicates whether a compaction routine is currently running on the view. */
5881
6085
  compact_running: boolean;
5882
6086
  /** Language for the defined views. */
@@ -6025,6 +6229,11 @@ declare namespace CloudantV1 {
6025
6229
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
6026
6230
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
6027
6231
  * supplied argument.
6232
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
6233
+ * basis of a query. You should include at least one of these in a selector.
6234
+ *
6235
+ * For further reference see
6236
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
6028
6237
  */
6029
6238
  selector: JsonObject;
6030
6239
  /** skip. */
@@ -6122,7 +6331,13 @@ declare namespace CloudantV1 {
6122
6331
  * fields within a document for use with the `$text` operator.
6123
6332
  */
6124
6333
  default_field?: IndexTextOperatorDefaultField;
6125
- /** List of fields to index. */
6334
+ /** List of field objects to index. Nested fields are also allowed, e.g. `person.name`.
6335
+ *
6336
+ * For "json" type indexes each object is a mapping of field name to sort direction (asc or desc).
6337
+ *
6338
+ * For "text" type indexes each object has a `name` property of the field name and a `type` property of the field
6339
+ * type (string, number, or boolean).
6340
+ */
6126
6341
  fields?: IndexField[];
6127
6342
  /** Whether to scan every document for arrays and store the length for each array found. Set the
6128
6343
  * index_array_lengths field to false if:
@@ -6154,6 +6369,11 @@ declare namespace CloudantV1 {
6154
6369
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
6155
6370
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
6156
6371
  * supplied argument.
6372
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
6373
+ * basis of a query. You should include at least one of these in a selector.
6374
+ *
6375
+ * For further reference see
6376
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
6157
6377
  */
6158
6378
  partial_filter_selector?: JsonObject;
6159
6379
  }
@@ -6363,6 +6583,11 @@ declare namespace CloudantV1 {
6363
6583
  * * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
6364
6584
  * instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
6365
6585
  * supplied argument.
6586
+ * * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the
6587
+ * basis of a query. You should include at least one of these in a selector.
6588
+ *
6589
+ * For further reference see
6590
+ * [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-query#selector-syntax).
6366
6591
  */
6367
6592
  selector?: JsonObject;
6368
6593
  /** Start the replication at a specific sequence value. */
@@ -6566,6 +6791,8 @@ declare namespace CloudantV1 {
6566
6791
  doc_del_count: number;
6567
6792
  /** The pending sequence identifier. */
6568
6793
  pending_seq: number;
6794
+ /** Unique signature of the search index. */
6795
+ signature: string;
6569
6796
  }
6570
6797
  /** Schema for search index information. */
6571
6798
  interface SearchInfoResult {
@@ -6754,9 +6981,9 @@ declare namespace CloudantV1 {
6754
6981
  */
6755
6982
  update_seq?: boolean;
6756
6983
  /** Schema for any JSON type. */
6757
- endkey?: any;
6984
+ end_key?: any;
6758
6985
  /** Schema for a document ID. */
6759
- endkey_docid?: string;
6986
+ end_key_doc_id?: string;
6760
6987
  /** Parameter to specify whether to group the results using the reduce function to a group rather than a single
6761
6988
  * row. Implies reduce is true and the maximum group_level.
6762
6989
  */
@@ -6776,9 +7003,9 @@ declare namespace CloudantV1 {
6776
7003
  /** Parameter to specify whether view results should be returned from a stable set of shards. */
6777
7004
  stable?: boolean;
6778
7005
  /** Schema for any JSON type. */
6779
- startkey?: any;
7006
+ start_key?: any;
6780
7007
  /** Schema for a document ID. */
6781
- startkey_docid?: string;
7008
+ start_key_doc_id?: string;
6782
7009
  /** Parameter to specify whether or not the view in question should be updated prior to responding to the user. */
6783
7010
  update?: string;
6784
7011
  }