@ibm-cloud/cloudant 0.12.10 → 0.12.11
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 +15 -15
- package/cloudant/v1.d.ts +337 -243
- package/cloudant/v1.js +199 -144
- package/cloudant/v1.js.map +1 -1
- package/package.json +7 -7
package/cloudant/v1.js
CHANGED
|
@@ -259,16 +259,16 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
259
259
|
* key order.
|
|
260
260
|
* @param {string} [params.feed] - Query parameter to specify the changes feed type.
|
|
261
261
|
* @param {number} [params.heartbeat] - Query parameter to specify the period in milliseconds after which an empty
|
|
262
|
-
* line is sent in the results. Off by default and only applicable for
|
|
263
|
-
*
|
|
264
|
-
* to use a value of `60000`.
|
|
262
|
+
* line is sent in the results. Off by default and only applicable for `continuous` and `eventsource` feeds. Overrides
|
|
263
|
+
* any timeout to keep the feed alive indefinitely. May also be `true` to use a value of `60000`.
|
|
265
264
|
*
|
|
266
265
|
* **Note:** Delivery of heartbeats cannot be relied on at specific intervals. If your application runs in an
|
|
267
266
|
* environment where idle network connections may break, `heartbeat` is not suitable as a keepalive mechanism.
|
|
268
267
|
* Instead, consider one of the following options:
|
|
269
|
-
* * Use the `timeout` parameter with a value that is compatible with
|
|
270
|
-
*
|
|
271
|
-
*
|
|
268
|
+
* * Use the `timeout` parameter with a value that is compatible with
|
|
269
|
+
* your network environment.
|
|
270
|
+
* * Switch to scheduled usage of one of the non-continuous changes feed
|
|
271
|
+
* types (`normal` or `longpoll`).
|
|
272
272
|
* * Use TCP keepalive.
|
|
273
273
|
* @param {number} [params.limit] - Query parameter to specify the number of returned documents to limit the result
|
|
274
274
|
* to.
|
|
@@ -277,7 +277,11 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
277
277
|
* feeds. Default value is specified by `httpd/changes_timeout` configuration option. Note that `60000` value is also
|
|
278
278
|
* the default maximum timeout to prevent undetected dead connections.
|
|
279
279
|
* @param {string} [params.since] - Query parameter to specify to start the results from the change immediately after
|
|
280
|
-
* the given update sequence.
|
|
280
|
+
* the given update sequence. Possible values are:
|
|
281
|
+
* * `0` for all available changes (default).
|
|
282
|
+
* * `now` for future changes.
|
|
283
|
+
* * A valid update sequence, for example, from the `seq` value of a
|
|
284
|
+
* change received before.
|
|
281
285
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
282
286
|
* @returns {Promise<CloudantV1.Response<CloudantV1.DbUpdates>>}
|
|
283
287
|
* @deprecated this method is deprecated and may be removed in a future release
|
|
@@ -361,8 +365,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
361
365
|
* argument.
|
|
362
366
|
*
|
|
363
367
|
* It is important for query performance to use appropriate selectors:
|
|
364
|
-
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
365
|
-
* of a query. You should include at least one of these in a selector.
|
|
368
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
369
|
+
* `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a selector.
|
|
366
370
|
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
367
371
|
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
368
372
|
* of documents that will need to be scanned.
|
|
@@ -387,11 +391,11 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
387
391
|
*
|
|
388
392
|
* The built-in filter types are:
|
|
389
393
|
* * `_design` - Returns only changes to design documents.
|
|
390
|
-
* * `_doc_ids` - Returns changes for documents with an ID matching one
|
|
391
|
-
* `doc_ids` request body parameter. (`POST` only)
|
|
392
|
-
* * `_selector` - Returns changes for documents that match the
|
|
393
|
-
* request body parameter. The selector syntax is the same
|
|
394
|
-
* `_find`. (`POST` only)
|
|
394
|
+
* * `_doc_ids` - Returns changes for documents with an ID matching one
|
|
395
|
+
* specified in `doc_ids` request body parameter. (`POST` only)
|
|
396
|
+
* * `_selector` - Returns changes for documents that match the
|
|
397
|
+
* `selector` request body parameter. The selector syntax is the same
|
|
398
|
+
* as used for `_find`. (`POST` only)
|
|
395
399
|
* * `_view` - Returns changes for documents that match an existing map
|
|
396
400
|
* function in the view specified by the query parameter `view`.
|
|
397
401
|
*
|
|
@@ -399,19 +403,19 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
399
403
|
* `design_doc/filtername`.
|
|
400
404
|
*
|
|
401
405
|
* **Note:** For better performance use the built-in `_selector`, `_design` or `_doc_ids` filters rather than JS based
|
|
402
|
-
* `_view` or design document filters. If you need to pass values to change the filtered content use the
|
|
403
|
-
* filter type.
|
|
406
|
+
* `_view` or design document filters. If you need to pass values to change the filtered content use the
|
|
407
|
+
* `_selector` filter type.
|
|
404
408
|
* @param {number} [params.heartbeat] - Query parameter to specify the period in milliseconds after which an empty
|
|
405
|
-
* line is sent in the results. Off by default and only applicable for
|
|
406
|
-
*
|
|
407
|
-
* to use a value of `60000`.
|
|
409
|
+
* line is sent in the results. Off by default and only applicable for `continuous` and `eventsource` feeds. Overrides
|
|
410
|
+
* any timeout to keep the feed alive indefinitely. May also be `true` to use a value of `60000`.
|
|
408
411
|
*
|
|
409
412
|
* **Note:** Delivery of heartbeats cannot be relied on at specific intervals. If your application runs in an
|
|
410
413
|
* environment where idle network connections may break, `heartbeat` is not suitable as a keepalive mechanism.
|
|
411
414
|
* Instead, consider one of the following options:
|
|
412
|
-
* * Use the `timeout` parameter with a value that is compatible with
|
|
413
|
-
*
|
|
414
|
-
*
|
|
415
|
+
* * Use the `timeout` parameter with a value that is compatible with
|
|
416
|
+
* your network environment.
|
|
417
|
+
* * Switch to scheduled usage of one of the non-continuous changes feed
|
|
418
|
+
* types (`normal` or `longpoll`).
|
|
415
419
|
* * Use TCP keepalive.
|
|
416
420
|
* @param {boolean} [params.includeDocs] - Query parameter to specify whether to include the full content of the
|
|
417
421
|
* documents in the response.
|
|
@@ -423,7 +427,11 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
423
427
|
* source database as computing the seq value across many shards (especially in highly-sharded databases) is
|
|
424
428
|
* expensive.
|
|
425
429
|
* @param {string} [params.since] - Query parameter to specify to start the results from the change immediately after
|
|
426
|
-
* the given update sequence.
|
|
430
|
+
* the given update sequence. Possible values are:
|
|
431
|
+
* * `0` for all available changes (default).
|
|
432
|
+
* * `now` for future changes.
|
|
433
|
+
* * A valid update sequence, for example, from the `seq` value of a
|
|
434
|
+
* change received before.
|
|
427
435
|
* @param {string} [params.style] - Query parameter to specify how many revisions are returned in the changes array.
|
|
428
436
|
* The default, `main_only`, will only return the current "winning" revision; all_docs will return all leaf revisions
|
|
429
437
|
* (including conflicts and deleted former conflicts).
|
|
@@ -534,8 +542,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
534
542
|
* argument.
|
|
535
543
|
*
|
|
536
544
|
* It is important for query performance to use appropriate selectors:
|
|
537
|
-
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
538
|
-
* of a query. You should include at least one of these in a selector.
|
|
545
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
546
|
+
* `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a selector.
|
|
539
547
|
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
540
548
|
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
541
549
|
* of documents that will need to be scanned.
|
|
@@ -560,11 +568,11 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
560
568
|
*
|
|
561
569
|
* The built-in filter types are:
|
|
562
570
|
* * `_design` - Returns only changes to design documents.
|
|
563
|
-
* * `_doc_ids` - Returns changes for documents with an ID matching one
|
|
564
|
-
* `doc_ids` request body parameter. (`POST` only)
|
|
565
|
-
* * `_selector` - Returns changes for documents that match the
|
|
566
|
-
* request body parameter. The selector syntax is the same
|
|
567
|
-
* `_find`. (`POST` only)
|
|
571
|
+
* * `_doc_ids` - Returns changes for documents with an ID matching one
|
|
572
|
+
* specified in `doc_ids` request body parameter. (`POST` only)
|
|
573
|
+
* * `_selector` - Returns changes for documents that match the
|
|
574
|
+
* `selector` request body parameter. The selector syntax is the same
|
|
575
|
+
* as used for `_find`. (`POST` only)
|
|
568
576
|
* * `_view` - Returns changes for documents that match an existing map
|
|
569
577
|
* function in the view specified by the query parameter `view`.
|
|
570
578
|
*
|
|
@@ -572,19 +580,19 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
572
580
|
* `design_doc/filtername`.
|
|
573
581
|
*
|
|
574
582
|
* **Note:** For better performance use the built-in `_selector`, `_design` or `_doc_ids` filters rather than JS based
|
|
575
|
-
* `_view` or design document filters. If you need to pass values to change the filtered content use the
|
|
576
|
-
* filter type.
|
|
583
|
+
* `_view` or design document filters. If you need to pass values to change the filtered content use the
|
|
584
|
+
* `_selector` filter type.
|
|
577
585
|
* @param {number} [params.heartbeat] - Query parameter to specify the period in milliseconds after which an empty
|
|
578
|
-
* line is sent in the results. Off by default and only applicable for
|
|
579
|
-
*
|
|
580
|
-
* to use a value of `60000`.
|
|
586
|
+
* line is sent in the results. Off by default and only applicable for `continuous` and `eventsource` feeds. Overrides
|
|
587
|
+
* any timeout to keep the feed alive indefinitely. May also be `true` to use a value of `60000`.
|
|
581
588
|
*
|
|
582
589
|
* **Note:** Delivery of heartbeats cannot be relied on at specific intervals. If your application runs in an
|
|
583
590
|
* environment where idle network connections may break, `heartbeat` is not suitable as a keepalive mechanism.
|
|
584
591
|
* Instead, consider one of the following options:
|
|
585
|
-
* * Use the `timeout` parameter with a value that is compatible with
|
|
586
|
-
*
|
|
587
|
-
*
|
|
592
|
+
* * Use the `timeout` parameter with a value that is compatible with
|
|
593
|
+
* your network environment.
|
|
594
|
+
* * Switch to scheduled usage of one of the non-continuous changes feed
|
|
595
|
+
* types (`normal` or `longpoll`).
|
|
588
596
|
* * Use TCP keepalive.
|
|
589
597
|
* @param {boolean} [params.includeDocs] - Query parameter to specify whether to include the full content of the
|
|
590
598
|
* documents in the response.
|
|
@@ -596,7 +604,11 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
596
604
|
* source database as computing the seq value across many shards (especially in highly-sharded databases) is
|
|
597
605
|
* expensive.
|
|
598
606
|
* @param {string} [params.since] - Query parameter to specify to start the results from the change immediately after
|
|
599
|
-
* the given update sequence.
|
|
607
|
+
* the given update sequence. Possible values are:
|
|
608
|
+
* * `0` for all available changes (default).
|
|
609
|
+
* * `now` for future changes.
|
|
610
|
+
* * A valid update sequence, for example, from the `seq` value of a
|
|
611
|
+
* change received before.
|
|
600
612
|
* @param {string} [params.style] - Query parameter to specify how many revisions are returned in the changes array.
|
|
601
613
|
* The default, `main_only`, will only return the current "winning" revision; all_docs will return all leaf revisions
|
|
602
614
|
* (including conflicts and deleted former conflicts).
|
|
@@ -1958,7 +1970,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
1958
1970
|
*
|
|
1959
1971
|
* For creation, you must specify the document ID but you should not specify the revision.
|
|
1960
1972
|
*
|
|
1961
|
-
* For modification, you must specify the document ID and a revision
|
|
1973
|
+
* For modification, you must specify the document ID and a revision identifier.
|
|
1962
1974
|
*
|
|
1963
1975
|
* @param {Object} params - The parameters to send to the service.
|
|
1964
1976
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -2464,7 +2476,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
2464
2476
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
2465
2477
|
* indicating the sequence id of the database the view reflects.
|
|
2466
2478
|
* @param {any} [params.endKey] - Schema for any JSON type.
|
|
2467
|
-
* @param {string} [params.endKeyDocId] -
|
|
2479
|
+
* @param {string} [params.endKeyDocId] - Stop returning rows at the specified document ID. No effect if using `group`
|
|
2480
|
+
* or not providing end key.
|
|
2468
2481
|
* @param {boolean} [params.group] - Parameter to specify whether to group reduced results by key. Valid only if a
|
|
2469
2482
|
* reduce function defined in the view. If the view emits key in JSON array format, then it is possible to reduce
|
|
2470
2483
|
* groups further based on the number of array elements with the `group_level` parameter.
|
|
@@ -2472,24 +2485,27 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
2472
2485
|
* uses keys that are JSON arrays. Implies group is `true`. Group level groups the reduced results by the specified
|
|
2473
2486
|
* number of array elements. If unset, results are grouped by the entire array key, returning a reduced value for each
|
|
2474
2487
|
* complete key.
|
|
2475
|
-
* @param {any} [params.key] -
|
|
2476
|
-
*
|
|
2477
|
-
*
|
|
2488
|
+
* @param {any} [params.key] - Parameter to specify to return only rows that match the specified key. String
|
|
2489
|
+
* representation of any JSON type that matches the key type emitted by the view function.
|
|
2490
|
+
* @param {any[]} [params.keys] - Parameter to specify returning only rows that match any of the specified keys. A
|
|
2491
|
+
* JSON array of keys that match the key type emitted by the view function.
|
|
2478
2492
|
* @param {boolean} [params.reduce] - Parameter to specify whether to use the reduce function in a map-reduce view.
|
|
2479
2493
|
* Default is true when a reduce function is defined.
|
|
2480
2494
|
*
|
|
2481
|
-
* A default `reduce` view type can be disabled to behave like a
|
|
2495
|
+
* A default `reduce` view type can be disabled to behave like a
|
|
2496
|
+
* `map` by setting `reduce=false` explicitly.
|
|
2482
2497
|
*
|
|
2483
|
-
* Be aware that `include_docs=true`
|
|
2484
|
-
* @param {boolean} [params.stable] - Query parameter to specify whether use the same replica of
|
|
2485
|
-
* request. The default value `false` contacts all
|
|
2486
|
-
*
|
|
2487
|
-
* expense of increased latency and decreased throughput if the selected
|
|
2488
|
-
* replicas.
|
|
2498
|
+
* Be aware that `include_docs=true` is only for `map` views. Reduced views do not include document IDs in view rows.
|
|
2499
|
+
* @param {boolean} [params.stable] - Query parameter to specify whether use the same replica of the index on each
|
|
2500
|
+
* request. The default value `false` contacts all replicas and returns the result from the first, fastest, responder.
|
|
2501
|
+
* Setting it to `true` when used in conjunction with
|
|
2502
|
+
* `update=false` may improve consistency at the expense of increased latency and decreased throughput if the selected
|
|
2503
|
+
* replica is not the fastest of the available replicas.
|
|
2489
2504
|
*
|
|
2490
2505
|
* **Note:** In general setting `true` is discouraged and is strictly not recommended when using `update=true`.
|
|
2491
2506
|
* @param {any} [params.startKey] - Schema for any JSON type.
|
|
2492
|
-
* @param {string} [params.startKeyDocId] -
|
|
2507
|
+
* @param {string} [params.startKeyDocId] - Start returning rows at the specified document ID. No effect if using
|
|
2508
|
+
* `group` or not providing start key.
|
|
2493
2509
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
2494
2510
|
* to responding to the user.
|
|
2495
2511
|
*
|
|
@@ -2583,7 +2599,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
2583
2599
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
2584
2600
|
* indicating the sequence id of the database the view reflects.
|
|
2585
2601
|
* @param {any} [params.endKey] - Schema for any JSON type.
|
|
2586
|
-
* @param {string} [params.endKeyDocId] -
|
|
2602
|
+
* @param {string} [params.endKeyDocId] - Stop returning rows at the specified document ID. No effect if using `group`
|
|
2603
|
+
* or not providing end key.
|
|
2587
2604
|
* @param {boolean} [params.group] - Parameter to specify whether to group reduced results by key. Valid only if a
|
|
2588
2605
|
* reduce function defined in the view. If the view emits key in JSON array format, then it is possible to reduce
|
|
2589
2606
|
* groups further based on the number of array elements with the `group_level` parameter.
|
|
@@ -2591,24 +2608,27 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
2591
2608
|
* uses keys that are JSON arrays. Implies group is `true`. Group level groups the reduced results by the specified
|
|
2592
2609
|
* number of array elements. If unset, results are grouped by the entire array key, returning a reduced value for each
|
|
2593
2610
|
* complete key.
|
|
2594
|
-
* @param {any} [params.key] -
|
|
2595
|
-
*
|
|
2596
|
-
*
|
|
2611
|
+
* @param {any} [params.key] - Parameter to specify to return only rows that match the specified key. String
|
|
2612
|
+
* representation of any JSON type that matches the key type emitted by the view function.
|
|
2613
|
+
* @param {any[]} [params.keys] - Parameter to specify returning only rows that match any of the specified keys. A
|
|
2614
|
+
* JSON array of keys that match the key type emitted by the view function.
|
|
2597
2615
|
* @param {boolean} [params.reduce] - Parameter to specify whether to use the reduce function in a map-reduce view.
|
|
2598
2616
|
* Default is true when a reduce function is defined.
|
|
2599
2617
|
*
|
|
2600
|
-
* A default `reduce` view type can be disabled to behave like a
|
|
2618
|
+
* A default `reduce` view type can be disabled to behave like a
|
|
2619
|
+
* `map` by setting `reduce=false` explicitly.
|
|
2601
2620
|
*
|
|
2602
|
-
* Be aware that `include_docs=true`
|
|
2603
|
-
* @param {boolean} [params.stable] - Query parameter to specify whether use the same replica of
|
|
2604
|
-
* request. The default value `false` contacts all
|
|
2605
|
-
*
|
|
2606
|
-
* expense of increased latency and decreased throughput if the selected
|
|
2607
|
-
* replicas.
|
|
2621
|
+
* Be aware that `include_docs=true` is only for `map` views. Reduced views do not include document IDs in view rows.
|
|
2622
|
+
* @param {boolean} [params.stable] - Query parameter to specify whether use the same replica of the index on each
|
|
2623
|
+
* request. The default value `false` contacts all replicas and returns the result from the first, fastest, responder.
|
|
2624
|
+
* Setting it to `true` when used in conjunction with
|
|
2625
|
+
* `update=false` may improve consistency at the expense of increased latency and decreased throughput if the selected
|
|
2626
|
+
* replica is not the fastest of the available replicas.
|
|
2608
2627
|
*
|
|
2609
2628
|
* **Note:** In general setting `true` is discouraged and is strictly not recommended when using `update=true`.
|
|
2610
2629
|
* @param {any} [params.startKey] - Schema for any JSON type.
|
|
2611
|
-
* @param {string} [params.startKeyDocId] -
|
|
2630
|
+
* @param {string} [params.startKeyDocId] - Start returning rows at the specified document ID. No effect if using
|
|
2631
|
+
* `group` or not providing start key.
|
|
2612
2632
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
2613
2633
|
* to responding to the user.
|
|
2614
2634
|
*
|
|
@@ -3017,7 +3037,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3017
3037
|
* that are included must be indexed with the store:true option. The default is all fields.
|
|
3018
3038
|
* @param {number} [params.limit] - Limit the number of the returned documents to the specified number.
|
|
3019
3039
|
* @param {string[]} [params.sort] - Specifies the sort order of the results. In a grouped search (when group_field is
|
|
3020
|
-
* used), this parameter specifies the sort order within a group. The default sort order is relevance.
|
|
3040
|
+
* used), this parameter specifies the sort order within a group. The default sort order is relevance. A JSON string
|
|
3021
3041
|
* of the form "fieldname<type>" or "-fieldname<type>" for descending order, where fieldname is the name
|
|
3022
3042
|
* of a string or number field, and type is either a number, a string, or a JSON array of strings. The type part is
|
|
3023
3043
|
* optional, and defaults to number. Some examples are "foo", "-foo", "bar<string>", "-foo<number>" and
|
|
@@ -3108,7 +3128,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3108
3128
|
* that are included must be indexed with the store:true option. The default is all fields.
|
|
3109
3129
|
* @param {number} [params.limit] - Limit the number of the returned documents to the specified number.
|
|
3110
3130
|
* @param {string[]} [params.sort] - Specifies the sort order of the results. In a grouped search (when group_field is
|
|
3111
|
-
* used), this parameter specifies the sort order within a group. The default sort order is relevance.
|
|
3131
|
+
* used), this parameter specifies the sort order within a group. The default sort order is relevance. A JSON string
|
|
3112
3132
|
* of the form "fieldname<type>" or "-fieldname<type>" for descending order, where fieldname is the name
|
|
3113
3133
|
* of a string or number field, and type is either a number, a string, or a JSON array of strings. The type part is
|
|
3114
3134
|
* optional, and defaults to number. Some examples are "foo", "-foo", "bar<string>", "-foo<number>" and
|
|
@@ -3201,7 +3221,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3201
3221
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
3202
3222
|
* indicating the sequence id of the database the view reflects.
|
|
3203
3223
|
* @param {any} [params.endKey] - Schema for any JSON type.
|
|
3204
|
-
* @param {string} [params.endKeyDocId] -
|
|
3224
|
+
* @param {string} [params.endKeyDocId] - Stop returning rows at the specified document ID. No effect if using `group`
|
|
3225
|
+
* or not providing end key.
|
|
3205
3226
|
* @param {boolean} [params.group] - Parameter to specify whether to group reduced results by key. Valid only if a
|
|
3206
3227
|
* reduce function defined in the view. If the view emits key in JSON array format, then it is possible to reduce
|
|
3207
3228
|
* groups further based on the number of array elements with the `group_level` parameter.
|
|
@@ -3209,17 +3230,20 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3209
3230
|
* uses keys that are JSON arrays. Implies group is `true`. Group level groups the reduced results by the specified
|
|
3210
3231
|
* number of array elements. If unset, results are grouped by the entire array key, returning a reduced value for each
|
|
3211
3232
|
* complete key.
|
|
3212
|
-
* @param {any} [params.key] -
|
|
3213
|
-
*
|
|
3214
|
-
*
|
|
3233
|
+
* @param {any} [params.key] - Parameter to specify to return only rows that match the specified key. String
|
|
3234
|
+
* representation of any JSON type that matches the key type emitted by the view function.
|
|
3235
|
+
* @param {any[]} [params.keys] - Parameter to specify returning only rows that match any of the specified keys. A
|
|
3236
|
+
* JSON array of keys that match the key type emitted by the view function.
|
|
3215
3237
|
* @param {boolean} [params.reduce] - Parameter to specify whether to use the reduce function in a map-reduce view.
|
|
3216
3238
|
* Default is true when a reduce function is defined.
|
|
3217
3239
|
*
|
|
3218
|
-
* A default `reduce` view type can be disabled to behave like a
|
|
3240
|
+
* A default `reduce` view type can be disabled to behave like a
|
|
3241
|
+
* `map` by setting `reduce=false` explicitly.
|
|
3219
3242
|
*
|
|
3220
|
-
* Be aware that `include_docs=true`
|
|
3243
|
+
* Be aware that `include_docs=true` is only for `map` views. Reduced views do not include document IDs in view rows.
|
|
3221
3244
|
* @param {any} [params.startKey] - Schema for any JSON type.
|
|
3222
|
-
* @param {string} [params.startKeyDocId] -
|
|
3245
|
+
* @param {string} [params.startKeyDocId] - Start returning rows at the specified document ID. No effect if using
|
|
3246
|
+
* `group` or not providing start key.
|
|
3223
3247
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
3224
3248
|
* to responding to the user.
|
|
3225
3249
|
*
|
|
@@ -3318,7 +3342,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3318
3342
|
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
3319
3343
|
* indicating the sequence id of the database the view reflects.
|
|
3320
3344
|
* @param {any} [params.endKey] - Schema for any JSON type.
|
|
3321
|
-
* @param {string} [params.endKeyDocId] -
|
|
3345
|
+
* @param {string} [params.endKeyDocId] - Stop returning rows at the specified document ID. No effect if using `group`
|
|
3346
|
+
* or not providing end key.
|
|
3322
3347
|
* @param {boolean} [params.group] - Parameter to specify whether to group reduced results by key. Valid only if a
|
|
3323
3348
|
* reduce function defined in the view. If the view emits key in JSON array format, then it is possible to reduce
|
|
3324
3349
|
* groups further based on the number of array elements with the `group_level` parameter.
|
|
@@ -3326,17 +3351,20 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3326
3351
|
* uses keys that are JSON arrays. Implies group is `true`. Group level groups the reduced results by the specified
|
|
3327
3352
|
* number of array elements. If unset, results are grouped by the entire array key, returning a reduced value for each
|
|
3328
3353
|
* complete key.
|
|
3329
|
-
* @param {any} [params.key] -
|
|
3330
|
-
*
|
|
3331
|
-
*
|
|
3354
|
+
* @param {any} [params.key] - Parameter to specify to return only rows that match the specified key. String
|
|
3355
|
+
* representation of any JSON type that matches the key type emitted by the view function.
|
|
3356
|
+
* @param {any[]} [params.keys] - Parameter to specify returning only rows that match any of the specified keys. A
|
|
3357
|
+
* JSON array of keys that match the key type emitted by the view function.
|
|
3332
3358
|
* @param {boolean} [params.reduce] - Parameter to specify whether to use the reduce function in a map-reduce view.
|
|
3333
3359
|
* Default is true when a reduce function is defined.
|
|
3334
3360
|
*
|
|
3335
|
-
* A default `reduce` view type can be disabled to behave like a
|
|
3361
|
+
* A default `reduce` view type can be disabled to behave like a
|
|
3362
|
+
* `map` by setting `reduce=false` explicitly.
|
|
3336
3363
|
*
|
|
3337
|
-
* Be aware that `include_docs=true`
|
|
3364
|
+
* Be aware that `include_docs=true` is only for `map` views. Reduced views do not include document IDs in view rows.
|
|
3338
3365
|
* @param {any} [params.startKey] - Schema for any JSON type.
|
|
3339
|
-
* @param {string} [params.startKeyDocId] -
|
|
3366
|
+
* @param {string} [params.startKeyDocId] - Start returning rows at the specified document ID. No effect if using
|
|
3367
|
+
* `group` or not providing start key.
|
|
3340
3368
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
3341
3369
|
* to responding to the user.
|
|
3342
3370
|
*
|
|
@@ -3434,8 +3462,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3434
3462
|
* argument.
|
|
3435
3463
|
*
|
|
3436
3464
|
* It is important for query performance to use appropriate selectors:
|
|
3437
|
-
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
3438
|
-
* of a query. You should include at least one of these in a selector.
|
|
3465
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
3466
|
+
* `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a selector.
|
|
3439
3467
|
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
3440
3468
|
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
3441
3469
|
* of documents that will need to be scanned.
|
|
@@ -3444,7 +3472,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3444
3472
|
* combination and conditional operators.
|
|
3445
3473
|
*
|
|
3446
3474
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3447
|
-
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes.
|
|
3475
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
3448
3476
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3449
3477
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3450
3478
|
* existing conflicts in the document.
|
|
@@ -3461,7 +3489,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3461
3489
|
* provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
|
|
3462
3490
|
* fields.
|
|
3463
3491
|
*
|
|
3464
|
-
* For example in JSON:
|
|
3492
|
+
* For example in JSON:
|
|
3493
|
+
* `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
3465
3494
|
*
|
|
3466
3495
|
* When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
|
|
3467
3496
|
* 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
|
|
@@ -3572,8 +3601,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3572
3601
|
* argument.
|
|
3573
3602
|
*
|
|
3574
3603
|
* It is important for query performance to use appropriate selectors:
|
|
3575
|
-
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
3576
|
-
* of a query. You should include at least one of these in a selector.
|
|
3604
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
3605
|
+
* `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a selector.
|
|
3577
3606
|
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
3578
3607
|
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
3579
3608
|
* of documents that will need to be scanned.
|
|
@@ -3582,7 +3611,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3582
3611
|
* combination and conditional operators.
|
|
3583
3612
|
*
|
|
3584
3613
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3585
|
-
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes.
|
|
3614
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
3586
3615
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3587
3616
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3588
3617
|
* existing conflicts in the document.
|
|
@@ -3599,7 +3628,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3599
3628
|
* provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
|
|
3600
3629
|
* fields.
|
|
3601
3630
|
*
|
|
3602
|
-
* For example in JSON:
|
|
3631
|
+
* For example in JSON:
|
|
3632
|
+
* `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
3603
3633
|
*
|
|
3604
3634
|
* When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
|
|
3605
3635
|
* 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
|
|
@@ -3710,8 +3740,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3710
3740
|
* argument.
|
|
3711
3741
|
*
|
|
3712
3742
|
* It is important for query performance to use appropriate selectors:
|
|
3713
|
-
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
3714
|
-
* of a query. You should include at least one of these in a selector.
|
|
3743
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
3744
|
+
* `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a selector.
|
|
3715
3745
|
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
3716
3746
|
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
3717
3747
|
* of documents that will need to be scanned.
|
|
@@ -3720,7 +3750,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3720
3750
|
* combination and conditional operators.
|
|
3721
3751
|
*
|
|
3722
3752
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3723
|
-
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes.
|
|
3753
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
3724
3754
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3725
3755
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3726
3756
|
* existing conflicts in the document.
|
|
@@ -3737,7 +3767,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3737
3767
|
* provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
|
|
3738
3768
|
* fields.
|
|
3739
3769
|
*
|
|
3740
|
-
* For example in JSON:
|
|
3770
|
+
* For example in JSON:
|
|
3771
|
+
* `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
3741
3772
|
*
|
|
3742
3773
|
* When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
|
|
3743
3774
|
* 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
|
|
@@ -3838,8 +3869,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3838
3869
|
* argument.
|
|
3839
3870
|
*
|
|
3840
3871
|
* It is important for query performance to use appropriate selectors:
|
|
3841
|
-
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
3842
|
-
* of a query. You should include at least one of these in a selector.
|
|
3872
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
3873
|
+
* `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a selector.
|
|
3843
3874
|
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
3844
3875
|
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
3845
3876
|
* of documents that will need to be scanned.
|
|
@@ -3848,7 +3879,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3848
3879
|
* combination and conditional operators.
|
|
3849
3880
|
*
|
|
3850
3881
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3851
|
-
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes.
|
|
3882
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
3852
3883
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3853
3884
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3854
3885
|
* existing conflicts in the document.
|
|
@@ -3865,7 +3896,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3865
3896
|
* provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
|
|
3866
3897
|
* fields.
|
|
3867
3898
|
*
|
|
3868
|
-
* For example in JSON:
|
|
3899
|
+
* For example in JSON:
|
|
3900
|
+
* `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
3869
3901
|
*
|
|
3870
3902
|
* When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
|
|
3871
3903
|
* 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
|
|
@@ -3975,8 +4007,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3975
4007
|
* argument.
|
|
3976
4008
|
*
|
|
3977
4009
|
* It is important for query performance to use appropriate selectors:
|
|
3978
|
-
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
3979
|
-
* of a query. You should include at least one of these in a selector.
|
|
4010
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
4011
|
+
* `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a selector.
|
|
3980
4012
|
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
3981
4013
|
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
3982
4014
|
* of documents that will need to be scanned.
|
|
@@ -3985,7 +4017,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
3985
4017
|
* combination and conditional operators.
|
|
3986
4018
|
*
|
|
3987
4019
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
3988
|
-
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes.
|
|
4020
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
3989
4021
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
3990
4022
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
3991
4023
|
* existing conflicts in the document.
|
|
@@ -4002,7 +4034,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
4002
4034
|
* provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
|
|
4003
4035
|
* fields.
|
|
4004
4036
|
*
|
|
4005
|
-
* For example in JSON:
|
|
4037
|
+
* For example in JSON:
|
|
4038
|
+
* `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
4006
4039
|
*
|
|
4007
4040
|
* When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
|
|
4008
4041
|
* 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
|
|
@@ -4112,8 +4145,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
4112
4145
|
* argument.
|
|
4113
4146
|
*
|
|
4114
4147
|
* It is important for query performance to use appropriate selectors:
|
|
4115
|
-
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
4116
|
-
* of a query. You should include at least one of these in a selector.
|
|
4148
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
4149
|
+
* `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a selector.
|
|
4117
4150
|
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors
|
|
4118
4151
|
* use these operators in conjunction with equality operators or create and use a partial index to reduce the number
|
|
4119
4152
|
* of documents that will need to be scanned.
|
|
@@ -4122,7 +4155,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
4122
4155
|
* combination and conditional operators.
|
|
4123
4156
|
*
|
|
4124
4157
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
4125
|
-
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes.
|
|
4158
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
4126
4159
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
4127
4160
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
4128
4161
|
* existing conflicts in the document.
|
|
@@ -4139,7 +4172,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
4139
4172
|
* provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
|
|
4140
4173
|
* fields.
|
|
4141
4174
|
*
|
|
4142
|
-
* For example in JSON:
|
|
4175
|
+
* For example in JSON:
|
|
4176
|
+
* `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
4143
4177
|
*
|
|
4144
4178
|
* When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the
|
|
4145
4179
|
* 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
|
|
@@ -4432,7 +4466,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
4432
4466
|
* that are included must be indexed with the store:true option. The default is all fields.
|
|
4433
4467
|
* @param {number} [params.limit] - Limit the number of the returned documents to the specified number.
|
|
4434
4468
|
* @param {string[]} [params.sort] - Specifies the sort order of the results. In a grouped search (when group_field is
|
|
4435
|
-
* used), this parameter specifies the sort order within a group. The default sort order is relevance.
|
|
4469
|
+
* used), this parameter specifies the sort order within a group. The default sort order is relevance. A JSON string
|
|
4436
4470
|
* of the form "fieldname<type>" or "-fieldname<type>" for descending order, where fieldname is the name
|
|
4437
4471
|
* of a string or number field, and type is either a number, a string, or a JSON array of strings. The type part is
|
|
4438
4472
|
* optional, and defaults to number. Some examples are "foo", "-foo", "bar<string>", "-foo<number>" and
|
|
@@ -4545,7 +4579,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
4545
4579
|
* that are included must be indexed with the store:true option. The default is all fields.
|
|
4546
4580
|
* @param {number} [params.limit] - Limit the number of the returned documents to the specified number.
|
|
4547
4581
|
* @param {string[]} [params.sort] - Specifies the sort order of the results. In a grouped search (when group_field is
|
|
4548
|
-
* used), this parameter specifies the sort order within a group. The default sort order is relevance.
|
|
4582
|
+
* used), this parameter specifies the sort order within a group. The default sort order is relevance. A JSON string
|
|
4549
4583
|
* of the form "fieldname<type>" or "-fieldname<type>" for descending order, where fieldname is the name
|
|
4550
4584
|
* of a string or number field, and type is either a number, a string, or a JSON array of strings. The type part is
|
|
4551
4585
|
* optional, and defaults to number. Some examples are "foo", "-foo", "bar<string>", "-foo<number>" and
|
|
@@ -6417,8 +6451,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
6417
6451
|
/**
|
|
6418
6452
|
* Retrieve information about whether the server is up.
|
|
6419
6453
|
*
|
|
6420
|
-
* Confirms that the server is up, running, and ready to respond to requests. If
|
|
6421
|
-
*
|
|
6454
|
+
* Confirms that the server is up, running, and ready to respond to requests. If the cluster is unavailable the
|
|
6455
|
+
* endpoint returns a `503` response code.
|
|
6422
6456
|
*
|
|
6423
6457
|
* **Tip:** The authentication for this endpoint is only enforced when using IAM.
|
|
6424
6458
|
*
|
|
@@ -8574,7 +8608,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
8574
8608
|
/** The engine used for the database. */
|
|
8575
8609
|
engine;
|
|
8576
8610
|
/** An opaque string to detect whether a database has been recreated. The field name is for compatibility with
|
|
8577
|
-
* old replicator versions. Do not use the value to infer timing
|
|
8611
|
+
* old replicator versions. Do not use the value to infer timing information. Typically only used by replicators.
|
|
8578
8612
|
*/
|
|
8579
8613
|
instanceStartTime;
|
|
8580
8614
|
/** Information about database's partitioned indexes. */
|
|
@@ -9036,11 +9070,13 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
9036
9070
|
*
|
|
9037
9071
|
* * `newDoc` - New version of document that will be stored
|
|
9038
9072
|
* from the update request.
|
|
9039
|
-
* * `oldDoc` - Previous version of document that is already
|
|
9040
|
-
*
|
|
9041
|
-
*
|
|
9042
|
-
*
|
|
9043
|
-
*
|
|
9073
|
+
* * `oldDoc` - Previous version of document that is already
|
|
9074
|
+
* stored.
|
|
9075
|
+
* * `userCtx` - User Context Object, containing information
|
|
9076
|
+
* about the user writing the document (if present), see the
|
|
9077
|
+
* `UserContext`.
|
|
9078
|
+
* * `secObj` - Security Object, with lists of database security
|
|
9079
|
+
* roles, see the `SecurityObject`.
|
|
9044
9080
|
*/
|
|
9045
9081
|
validateDocUpdate;
|
|
9046
9082
|
/** Schema for design document views. */
|
|
@@ -9912,8 +9948,9 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
9912
9948
|
* supplied argument.
|
|
9913
9949
|
*
|
|
9914
9950
|
* It is important for query performance to use appropriate selectors:
|
|
9915
|
-
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
9916
|
-
* basis of a query. You should include at least one of these in a
|
|
9951
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
9952
|
+
* `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a
|
|
9953
|
+
* selector.
|
|
9917
9954
|
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query
|
|
9918
9955
|
* selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
|
|
9919
9956
|
* the number of documents that will need to be scanned.
|
|
@@ -10380,7 +10417,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
10380
10417
|
* The full list of possible reason codes is following:
|
|
10381
10418
|
*
|
|
10382
10419
|
* * alphabetically_comes_after: json
|
|
10383
|
-
* There is another suitable index whose name comes before that of
|
|
10420
|
+
* There is another suitable index whose name comes before that of
|
|
10421
|
+
* this index.
|
|
10384
10422
|
* * empty_selector: text
|
|
10385
10423
|
* "text" indexes do not support queries with empty selectors.
|
|
10386
10424
|
* * excluded_by_user: any use_index was used to manually specify the index.
|
|
@@ -10524,8 +10562,9 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
10524
10562
|
* supplied argument.
|
|
10525
10563
|
*
|
|
10526
10564
|
* It is important for query performance to use appropriate selectors:
|
|
10527
|
-
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
10528
|
-
* basis of a query. You should include at least one of these in a
|
|
10565
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
10566
|
+
* `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a
|
|
10567
|
+
* selector.
|
|
10529
10568
|
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query
|
|
10530
10569
|
* selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
|
|
10531
10570
|
* the number of documents that will need to be scanned.
|
|
@@ -11452,8 +11491,9 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
11452
11491
|
* supplied argument.
|
|
11453
11492
|
*
|
|
11454
11493
|
* It is important for query performance to use appropriate selectors:
|
|
11455
|
-
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
11456
|
-
* basis of a query. You should include at least one of these in a
|
|
11494
|
+
* * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and
|
|
11495
|
+
* `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a
|
|
11496
|
+
* selector.
|
|
11457
11497
|
* * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query
|
|
11458
11498
|
* selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
|
|
11459
11499
|
* the number of documents that will need to be scanned.
|
|
@@ -12435,21 +12475,23 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
12435
12475
|
* the document as a parameter, extracts some data from it, and then calls the `index` function to index that data.
|
|
12436
12476
|
* The index function takes 2, or optionally 3, parameters.
|
|
12437
12477
|
*
|
|
12438
|
-
* * The first parameter is the name of the field you intend to use
|
|
12439
|
-
* querying the index. If the special value `"default"` is used
|
|
12440
|
-
* define the name, you do not have to specify a field name
|
|
12441
|
-
*
|
|
12442
|
-
*
|
|
12443
|
-
*
|
|
12478
|
+
* * The first parameter is the name of the field you intend to use
|
|
12479
|
+
* when querying the index. If the special value `"default"` is used
|
|
12480
|
+
* when you define the name, you do not have to specify a field name
|
|
12481
|
+
* at query time.
|
|
12482
|
+
* * The second parameter is the data to be indexed. This data must be
|
|
12483
|
+
* only a string, number, or boolean. Other types will cause an error
|
|
12484
|
+
* to be thrown by the index function call.
|
|
12444
12485
|
* * The optional third parameter is a JavaScript object with these
|
|
12445
12486
|
* properties:
|
|
12446
12487
|
*
|
|
12447
12488
|
* * `facet` - boolean, default `false` - Creates a faceted index.
|
|
12448
|
-
* * `index` - boolean, default `true` - If set to `false`, the
|
|
12449
|
-
* cannot be used for searches, but can still be retrieved
|
|
12450
|
-
* index if `store` is set to `true`.
|
|
12451
|
-
* * `store` - boolean, default `true` - If true, the value is
|
|
12452
|
-
* in the search result; otherwise, the value is not
|
|
12489
|
+
* * `index` - boolean, default `true` - If set to `false`, the
|
|
12490
|
+
* data cannot be used for searches, but can still be retrieved
|
|
12491
|
+
* from the index if `store` is set to `true`.
|
|
12492
|
+
* * `store` - boolean, default `true` - If true, the value is
|
|
12493
|
+
* returned in the search result; otherwise, the value is not
|
|
12494
|
+
* returned.
|
|
12453
12495
|
*/
|
|
12454
12496
|
index;
|
|
12455
12497
|
static serialize(obj) {
|
|
@@ -12819,7 +12861,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
12819
12861
|
}
|
|
12820
12862
|
CloudantV1.SearchResultRow = SearchResultRow;
|
|
12821
12863
|
/**
|
|
12822
|
-
* Schema for a security document.
|
|
12864
|
+
* Schema for a Cloudant security document.
|
|
12823
12865
|
*/
|
|
12824
12866
|
class Security {
|
|
12825
12867
|
/** Schema for names and roles to map to a database permission. */
|
|
@@ -13272,6 +13314,8 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
13272
13314
|
* Schema for information about the up state of the server.
|
|
13273
13315
|
*/
|
|
13274
13316
|
class UpInformation {
|
|
13317
|
+
/** cluster. */
|
|
13318
|
+
cluster;
|
|
13275
13319
|
/** seeds. */
|
|
13276
13320
|
seeds;
|
|
13277
13321
|
/** status. */
|
|
@@ -13281,6 +13325,9 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
13281
13325
|
return obj;
|
|
13282
13326
|
}
|
|
13283
13327
|
let copy = {};
|
|
13328
|
+
if (obj.cluster !== undefined) {
|
|
13329
|
+
copy.cluster = obj.cluster;
|
|
13330
|
+
}
|
|
13284
13331
|
if (obj.seeds !== undefined) {
|
|
13285
13332
|
copy.seeds = obj.seeds;
|
|
13286
13333
|
}
|
|
@@ -13294,6 +13341,9 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
13294
13341
|
return obj;
|
|
13295
13342
|
}
|
|
13296
13343
|
let copy = {};
|
|
13344
|
+
if (obj.cluster !== undefined) {
|
|
13345
|
+
copy.cluster = obj.cluster;
|
|
13346
|
+
}
|
|
13297
13347
|
if (obj.seeds !== undefined) {
|
|
13298
13348
|
copy.seeds = obj.seeds;
|
|
13299
13349
|
}
|
|
@@ -13511,7 +13561,7 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
13511
13561
|
updateSeq;
|
|
13512
13562
|
/** Schema for any JSON type. */
|
|
13513
13563
|
endKey;
|
|
13514
|
-
/**
|
|
13564
|
+
/** Stop returning rows at the specified document ID. No effect if using `group` or not providing end key. */
|
|
13515
13565
|
endKeyDocId;
|
|
13516
13566
|
/** Parameter to specify whether to group reduced results by key. Valid only if a reduce function defined in the
|
|
13517
13567
|
* view. If the view emits key in JSON array format, then it is possible to reduce groups further based on the
|
|
@@ -13523,31 +13573,36 @@ class CloudantV1 extends cloudantBaseService_1.CloudantBaseService {
|
|
|
13523
13573
|
* unset, results are grouped by the entire array key, returning a reduced value for each complete key.
|
|
13524
13574
|
*/
|
|
13525
13575
|
groupLevel;
|
|
13526
|
-
/**
|
|
13576
|
+
/** Parameter to specify to return only rows that match the specified key. String representation of any JSON
|
|
13577
|
+
* type that matches the key type emitted by the view function.
|
|
13578
|
+
*/
|
|
13527
13579
|
key;
|
|
13528
|
-
/** Parameter to specify returning only
|
|
13529
|
-
*
|
|
13580
|
+
/** Parameter to specify returning only rows that match any of the specified keys. A JSON array of keys that
|
|
13581
|
+
* match the key type emitted by the view function.
|
|
13530
13582
|
*/
|
|
13531
13583
|
keys;
|
|
13532
13584
|
/** Parameter to specify whether to use the reduce function in a map-reduce view. Default is true when a reduce
|
|
13533
13585
|
* function is defined.
|
|
13534
13586
|
*
|
|
13535
|
-
* A default `reduce` view type can be disabled to behave like a
|
|
13587
|
+
* A default `reduce` view type can be disabled to behave like a
|
|
13588
|
+
* `map` by setting `reduce=false` explicitly.
|
|
13536
13589
|
*
|
|
13537
|
-
* Be aware that `include_docs=true`
|
|
13590
|
+
* Be aware that `include_docs=true` is only for `map` views. Reduced views do not include document IDs in view
|
|
13591
|
+
* rows.
|
|
13538
13592
|
*/
|
|
13539
13593
|
reduce;
|
|
13540
|
-
/** Query parameter to specify whether use the same replica of
|
|
13541
|
-
* `false` contacts all
|
|
13542
|
-
* when used in conjunction with
|
|
13543
|
-
*
|
|
13594
|
+
/** Query parameter to specify whether use the same replica of the index on each request. The default value
|
|
13595
|
+
* `false` contacts all replicas and returns the result from the first, fastest, responder. Setting it to `true`
|
|
13596
|
+
* when used in conjunction with
|
|
13597
|
+
* `update=false` may improve consistency at the expense of increased latency and decreased throughput if the
|
|
13598
|
+
* selected replica is not the fastest of the available replicas.
|
|
13544
13599
|
*
|
|
13545
13600
|
* **Note:** In general setting `true` is discouraged and is strictly not recommended when using `update=true`.
|
|
13546
13601
|
*/
|
|
13547
13602
|
stable;
|
|
13548
13603
|
/** Schema for any JSON type. */
|
|
13549
13604
|
startKey;
|
|
13550
|
-
/**
|
|
13605
|
+
/** Start returning rows at the specified document ID. No effect if using `group` or not providing start key. */
|
|
13551
13606
|
startKeyDocId;
|
|
13552
13607
|
/** Parameter to specify whether or not the view in question should be updated prior to responding to the user.
|
|
13553
13608
|
*
|