@ibm-cloud/cloudant 0.0.19 → 0.0.23
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 +30 -36
- package/auth/couchdbSessionAuthenticator.d.ts +7 -0
- package/auth/couchdbSessionAuthenticator.js +24 -3
- package/auth/couchdbSessionAuthenticator.js.map +1 -1
- package/auth/sessionTokenManager.js +3 -2
- package/auth/sessionTokenManager.js.map +1 -1
- package/cloudant/v1.d.ts +143 -114
- package/cloudant/v1.js +48 -86
- package/cloudant/v1.js.map +1 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/lib/cloudantBaseService.d.ts +1 -1
- package/lib/cloudantBaseService.js +37 -27
- package/lib/cloudantBaseService.js.map +1 -1
- package/lib/common.js +2 -2
- package/lib/common.js.map +1 -1
- package/lib/getAuthenticatorFromEnvCloudantExtension.d.ts +1 -1
- package/lib/getAuthenticatorFromEnvCloudantExtension.js +1 -2
- package/lib/getAuthenticatorFromEnvCloudantExtension.js.map +1 -1
- package/package.json +3 -3
package/cloudant/v1.d.ts
CHANGED
|
@@ -16,9 +16,11 @@
|
|
|
16
16
|
/// <reference types="node" />
|
|
17
17
|
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http';
|
|
18
18
|
import { UserOptions } from 'ibm-cloud-sdk-core';
|
|
19
|
-
import
|
|
19
|
+
import CloudantBaseService from '../lib/cloudantBaseService';
|
|
20
20
|
/**
|
|
21
21
|
* NoSQL database based on Apache CouchDB
|
|
22
|
+
*
|
|
23
|
+
* See: https://cloud.ibm.com/docs/services/Cloudant/
|
|
22
24
|
*/
|
|
23
25
|
declare class CloudantV1 extends CloudantBaseService {
|
|
24
26
|
static DEFAULT_SERVICE_URL: string;
|
|
@@ -182,17 +184,18 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
182
184
|
* key order.
|
|
183
185
|
* @param {string} [params.feed] - Query parameter to specify the changes feed type.
|
|
184
186
|
* @param {string} [params.filter] - Query parameter to specify a filter function from a design document that will
|
|
185
|
-
* filter the changes stream emitting only filtered events.
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* - Returns changes
|
|
190
|
-
* -
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* `
|
|
187
|
+
* filter the changes stream emitting only filtered events. For example: `design_doc/filtername`.
|
|
188
|
+
*
|
|
189
|
+
* Additionally, some keywords are reserved for built-in filters:
|
|
190
|
+
*
|
|
191
|
+
* * `_design` - Returns only changes to design documents.
|
|
192
|
+
* * `_doc_ids` - Returns changes for documents with an ID matching one specified in
|
|
193
|
+
* `doc_ids` request body parameter.
|
|
194
|
+
* * `_selector` - Returns changes for documents that match the `selector`
|
|
195
|
+
* request body parameter. The selector syntax is the same as used for
|
|
196
|
+
* `_find`.
|
|
197
|
+
* * `_view` - Returns changes for documents that match an existing map
|
|
198
|
+
* function in the view specified by the query parameter `view`.
|
|
196
199
|
* @param {number} [params.heartbeat] - Query parameter to specify the period in milliseconds after which an empty
|
|
197
200
|
* line is sent in the results. Only applicable for longpoll, continuous, and eventsource feeds. Overrides any timeout
|
|
198
201
|
* to keep the feed alive indefinitely. May also be `true` to use default value of 60000.
|
|
@@ -266,17 +269,18 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
266
269
|
* key order.
|
|
267
270
|
* @param {string} [params.feed] - Query parameter to specify the changes feed type.
|
|
268
271
|
* @param {string} [params.filter] - Query parameter to specify a filter function from a design document that will
|
|
269
|
-
* filter the changes stream emitting only filtered events.
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
* - Returns changes
|
|
274
|
-
* -
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
* `
|
|
272
|
+
* filter the changes stream emitting only filtered events. For example: `design_doc/filtername`.
|
|
273
|
+
*
|
|
274
|
+
* Additionally, some keywords are reserved for built-in filters:
|
|
275
|
+
*
|
|
276
|
+
* * `_design` - Returns only changes to design documents.
|
|
277
|
+
* * `_doc_ids` - Returns changes for documents with an ID matching one specified in
|
|
278
|
+
* `doc_ids` request body parameter.
|
|
279
|
+
* * `_selector` - Returns changes for documents that match the `selector`
|
|
280
|
+
* request body parameter. The selector syntax is the same as used for
|
|
281
|
+
* `_find`.
|
|
282
|
+
* * `_view` - Returns changes for documents that match an existing map
|
|
283
|
+
* function in the view specified by the query parameter `view`.
|
|
280
284
|
* @param {number} [params.heartbeat] - Query parameter to specify the period in milliseconds after which an empty
|
|
281
285
|
* line is sent in the results. Only applicable for longpoll, continuous, and eventsource feeds. Overrides any timeout
|
|
282
286
|
* to keep the feed alive indefinitely. May also be `true` to use default value of 60000.
|
|
@@ -301,9 +305,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
301
305
|
* @param {string} [params.view] - Query parameter to specify a view function as a filter. Documents pass the filter
|
|
302
306
|
* if the view's map function emits at least one record for them.
|
|
303
307
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
304
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
308
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
305
309
|
*/
|
|
306
|
-
postChangesAsStream(params: CloudantV1.PostChangesAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
310
|
+
postChangesAsStream(params: CloudantV1.PostChangesAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
307
311
|
/*************************
|
|
308
312
|
* databases
|
|
309
313
|
************************/
|
|
@@ -491,9 +495,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
491
495
|
* @param {string[]} [params.keys] - Schema for a list of document IDs.
|
|
492
496
|
* @param {string} [params.startkey] - Schema for a document ID.
|
|
493
497
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
494
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
498
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
495
499
|
*/
|
|
496
|
-
postAllDocsAsStream(params: CloudantV1.PostAllDocsAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
500
|
+
postAllDocsAsStream(params: CloudantV1.PostAllDocsAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
497
501
|
/**
|
|
498
502
|
* Multi-query the list of all documents in a database.
|
|
499
503
|
*
|
|
@@ -523,9 +527,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
523
527
|
* individual view query to be executed. The field names and their meaning are the same as the query parameters of a
|
|
524
528
|
* regular `/_all_docs` request.
|
|
525
529
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
526
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
530
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
527
531
|
*/
|
|
528
|
-
postAllDocsQueriesAsStream(params: CloudantV1.PostAllDocsQueriesAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
532
|
+
postAllDocsQueriesAsStream(params: CloudantV1.PostAllDocsQueriesAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
529
533
|
/**
|
|
530
534
|
* Bulk modify multiple documents in a database.
|
|
531
535
|
*
|
|
@@ -577,9 +581,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
577
581
|
* @param {boolean} [params.revs] - Query parameter to specify whether to include a list of all known document
|
|
578
582
|
* revisions.
|
|
579
583
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
580
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
584
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
581
585
|
*/
|
|
582
|
-
postBulkGetAsMixed(params: CloudantV1.PostBulkGetAsMixedParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
586
|
+
postBulkGetAsMixed(params: CloudantV1.PostBulkGetAsMixedParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
583
587
|
/**
|
|
584
588
|
* Bulk query revision information for multiple documents as related.
|
|
585
589
|
*
|
|
@@ -597,9 +601,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
597
601
|
* @param {boolean} [params.revs] - Query parameter to specify whether to include a list of all known document
|
|
598
602
|
* revisions.
|
|
599
603
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
600
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
604
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
601
605
|
*/
|
|
602
|
-
postBulkGetAsRelated(params: CloudantV1.PostBulkGetAsRelatedParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
606
|
+
postBulkGetAsRelated(params: CloudantV1.PostBulkGetAsRelatedParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
603
607
|
/**
|
|
604
608
|
* Bulk query revision information for multiple documents as stream.
|
|
605
609
|
*
|
|
@@ -617,9 +621,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
617
621
|
* @param {boolean} [params.revs] - Query parameter to specify whether to include a list of all known document
|
|
618
622
|
* revisions.
|
|
619
623
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
620
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
624
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
621
625
|
*/
|
|
622
|
-
postBulkGetAsStream(params: CloudantV1.PostBulkGetAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
626
|
+
postBulkGetAsStream(params: CloudantV1.PostBulkGetAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
623
627
|
/**
|
|
624
628
|
* Delete a document.
|
|
625
629
|
*
|
|
@@ -704,9 +708,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
704
708
|
* @param {boolean} [params.revsInfo] - Query parameter to specify whether to includes detailed information for all
|
|
705
709
|
* known document revisions.
|
|
706
710
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
707
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
711
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
708
712
|
*/
|
|
709
|
-
getDocumentAsMixed(params: CloudantV1.GetDocumentAsMixedParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
713
|
+
getDocumentAsMixed(params: CloudantV1.GetDocumentAsMixedParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
710
714
|
/**
|
|
711
715
|
* Retrieve a document as related.
|
|
712
716
|
*
|
|
@@ -738,9 +742,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
738
742
|
* @param {boolean} [params.revsInfo] - Query parameter to specify whether to includes detailed information for all
|
|
739
743
|
* known document revisions.
|
|
740
744
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
741
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
745
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
742
746
|
*/
|
|
743
|
-
getDocumentAsRelated(params: CloudantV1.GetDocumentAsRelatedParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
747
|
+
getDocumentAsRelated(params: CloudantV1.GetDocumentAsRelatedParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
744
748
|
/**
|
|
745
749
|
* Retrieve a document as stream.
|
|
746
750
|
*
|
|
@@ -772,9 +776,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
772
776
|
* @param {boolean} [params.revsInfo] - Query parameter to specify whether to includes detailed information for all
|
|
773
777
|
* known document revisions.
|
|
774
778
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
775
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
779
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
776
780
|
*/
|
|
777
|
-
getDocumentAsStream(params: CloudantV1.GetDocumentAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
781
|
+
getDocumentAsStream(params: CloudantV1.GetDocumentAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
778
782
|
/**
|
|
779
783
|
* Create or modify a document.
|
|
780
784
|
*
|
|
@@ -1057,9 +1061,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1057
1061
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
1058
1062
|
* to responding to the user.
|
|
1059
1063
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1060
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1064
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
1061
1065
|
*/
|
|
1062
|
-
postViewAsStream(params: CloudantV1.PostViewAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1066
|
+
postViewAsStream(params: CloudantV1.PostViewAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
1063
1067
|
/**
|
|
1064
1068
|
* Multi-query a MapReduce view.
|
|
1065
1069
|
*
|
|
@@ -1091,9 +1095,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1091
1095
|
* view query to be executed. The field names and their meaning are the same as the query parameters of a regular view
|
|
1092
1096
|
* request.
|
|
1093
1097
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1094
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1098
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
1095
1099
|
*/
|
|
1096
|
-
postViewQueriesAsStream(params: CloudantV1.PostViewQueriesAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1100
|
+
postViewQueriesAsStream(params: CloudantV1.PostViewQueriesAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
1097
1101
|
/*************************
|
|
1098
1102
|
* partitionedDatabases
|
|
1099
1103
|
************************/
|
|
@@ -1174,9 +1178,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1174
1178
|
* @param {string[]} [params.keys] - Schema for a list of document IDs.
|
|
1175
1179
|
* @param {string} [params.startkey] - Schema for a document ID.
|
|
1176
1180
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1177
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1181
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
1178
1182
|
*/
|
|
1179
|
-
postPartitionAllDocsAsStream(params: CloudantV1.PostPartitionAllDocsAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1183
|
+
postPartitionAllDocsAsStream(params: CloudantV1.PostPartitionAllDocsAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
1180
1184
|
/**
|
|
1181
1185
|
* Query a database partition search index.
|
|
1182
1186
|
*
|
|
@@ -1254,9 +1258,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1254
1258
|
* Fields that are used for sorting must be indexed by the same indexer that is used for the search query.
|
|
1255
1259
|
* @param {string} [params.stale] - Do not wait for the index to finish building to return results.
|
|
1256
1260
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1257
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1261
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
1258
1262
|
*/
|
|
1259
|
-
postPartitionSearchAsStream(params: CloudantV1.PostPartitionSearchAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1263
|
+
postPartitionSearchAsStream(params: CloudantV1.PostPartitionSearchAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
1260
1264
|
/**
|
|
1261
1265
|
* Query a database partition MapReduce view function.
|
|
1262
1266
|
*
|
|
@@ -1352,9 +1356,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1352
1356
|
* @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
|
|
1353
1357
|
* to responding to the user.
|
|
1354
1358
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1355
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1359
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
1356
1360
|
*/
|
|
1357
|
-
postPartitionViewAsStream(params: CloudantV1.PostPartitionViewAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1361
|
+
postPartitionViewAsStream(params: CloudantV1.PostPartitionViewAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
1358
1362
|
/**
|
|
1359
1363
|
* Query a database partition index by using selector syntax (POST).
|
|
1360
1364
|
*
|
|
@@ -1460,9 +1464,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1460
1464
|
* @param {string[]} [params.useIndex] - Use this option to identify a specific index for query to run against, rather
|
|
1461
1465
|
* than by using the IBM Cloudant Query algorithm to find the best index.
|
|
1462
1466
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1463
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1467
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
1464
1468
|
*/
|
|
1465
|
-
postPartitionFindAsStream(params: CloudantV1.PostPartitionFindAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1469
|
+
postPartitionFindAsStream(params: CloudantV1.PostPartitionFindAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
1466
1470
|
/*************************
|
|
1467
1471
|
* queries
|
|
1468
1472
|
************************/
|
|
@@ -1634,9 +1638,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1634
1638
|
* that many replicas before it is returned in the results. The request will take more time than using only the
|
|
1635
1639
|
* document that is stored locally with the index.
|
|
1636
1640
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1637
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1641
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
1638
1642
|
*/
|
|
1639
|
-
postFindAsStream(params: CloudantV1.PostFindAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1643
|
+
postFindAsStream(params: CloudantV1.PostFindAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
1640
1644
|
/**
|
|
1641
1645
|
* Retrieve information about all indexes.
|
|
1642
1646
|
*
|
|
@@ -1822,9 +1826,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1822
1826
|
* objects. The field names of the JSON objects are names for ranges. The values are strings that describe the range,
|
|
1823
1827
|
* for example "[0 TO 10]". This option is only available when making global queries.
|
|
1824
1828
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1825
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1829
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
1826
1830
|
*/
|
|
1827
|
-
postSearchAsStream(params: CloudantV1.PostSearchAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1831
|
+
postSearchAsStream(params: CloudantV1.PostSearchAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
1828
1832
|
/**
|
|
1829
1833
|
* Retrieve information about a search index.
|
|
1830
1834
|
*
|
|
@@ -1937,9 +1941,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1937
1941
|
* @param {string} [params.stale] - Query parameter to specify to not wait for the index to finish building before
|
|
1938
1942
|
* returning results.
|
|
1939
1943
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1940
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1944
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
1941
1945
|
*/
|
|
1942
|
-
getGeoAsStream(params: CloudantV1.GetGeoAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
1946
|
+
getGeoAsStream(params: CloudantV1.GetGeoAsStreamParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
1943
1947
|
/**
|
|
1944
1948
|
* Cleanup old geospatial indexes.
|
|
1945
1949
|
*
|
|
@@ -2301,9 +2305,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
2301
2305
|
* implementation of resumable downloads and skippable streams. This is available for all attachments inside CouchDB.
|
|
2302
2306
|
* @param {string} [params.rev] - Query parameter to specify a document revision.
|
|
2303
2307
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
2304
|
-
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
2308
|
+
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
2305
2309
|
*/
|
|
2306
|
-
getAttachment(params: CloudantV1.GetAttachmentParams): Promise<CloudantV1.Response<NodeJS.ReadableStream
|
|
2310
|
+
getAttachment(params: CloudantV1.GetAttachmentParams): Promise<CloudantV1.Response<NodeJS.ReadableStream>>;
|
|
2307
2311
|
/**
|
|
2308
2312
|
* Create or modify an attachment.
|
|
2309
2313
|
*
|
|
@@ -2404,18 +2408,6 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
2404
2408
|
/*************************
|
|
2405
2409
|
* databaseDetails
|
|
2406
2410
|
************************/
|
|
2407
|
-
/**
|
|
2408
|
-
* Query which document revisions are missing from the database.
|
|
2409
|
-
*
|
|
2410
|
-
* Given a list of document revisions, returns the document revisions that do not exist in the database.
|
|
2411
|
-
*
|
|
2412
|
-
* @param {Object} params - The parameters to send to the service.
|
|
2413
|
-
* @param {string} params.db - Path parameter to specify the database name.
|
|
2414
|
-
* @param {JsonObject} params.documentRevisions - HTTP request body for postMissingRevs and postRevsDiff.
|
|
2415
|
-
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
2416
|
-
* @returns {Promise<CloudantV1.Response<CloudantV1.MissingRevsResult>>}
|
|
2417
|
-
*/
|
|
2418
|
-
postMissingRevs(params: CloudantV1.PostMissingRevsParams): Promise<CloudantV1.Response<CloudantV1.MissingRevsResult>>;
|
|
2419
2411
|
/**
|
|
2420
2412
|
* Query the document revisions and possible ancestors missing from the database.
|
|
2421
2413
|
*
|
|
@@ -2425,7 +2417,7 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
2425
2417
|
*
|
|
2426
2418
|
* @param {Object} params - The parameters to send to the service.
|
|
2427
2419
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
2428
|
-
* @param {JsonObject} params.documentRevisions - HTTP request body for
|
|
2420
|
+
* @param {JsonObject} params.documentRevisions - HTTP request body for operations with Document revisions.
|
|
2429
2421
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
2430
2422
|
* @returns {Promise<CloudantV1.Response<CloudantV1.JsonObject>>}
|
|
2431
2423
|
*/
|
|
@@ -2659,17 +2651,18 @@ declare namespace CloudantV1 {
|
|
|
2659
2651
|
/** Query parameter to specify the changes feed type. */
|
|
2660
2652
|
feed?: PostChangesConstants.Feed | string;
|
|
2661
2653
|
/** Query parameter to specify a filter function from a design document that will filter the changes stream
|
|
2662
|
-
* emitting only filtered events.
|
|
2663
|
-
*
|
|
2664
|
-
*
|
|
2665
|
-
*
|
|
2666
|
-
*
|
|
2667
|
-
*
|
|
2668
|
-
*
|
|
2669
|
-
*
|
|
2670
|
-
*
|
|
2671
|
-
*
|
|
2672
|
-
*
|
|
2654
|
+
* emitting only filtered events. For example: `design_doc/filtername`.
|
|
2655
|
+
*
|
|
2656
|
+
* Additionally, some keywords are reserved for built-in filters:
|
|
2657
|
+
*
|
|
2658
|
+
* * `_design` - Returns only changes to design documents.
|
|
2659
|
+
* * `_doc_ids` - Returns changes for documents with an ID matching one specified in
|
|
2660
|
+
* `doc_ids` request body parameter.
|
|
2661
|
+
* * `_selector` - Returns changes for documents that match the `selector`
|
|
2662
|
+
* request body parameter. The selector syntax is the same as used for
|
|
2663
|
+
* `_find`.
|
|
2664
|
+
* * `_view` - Returns changes for documents that match an existing map
|
|
2665
|
+
* function in the view specified by the query parameter `view`.
|
|
2673
2666
|
*/
|
|
2674
2667
|
filter?: string;
|
|
2675
2668
|
/** Query parameter to specify the period in milliseconds after which an empty line is sent in the results. Only
|
|
@@ -2772,17 +2765,18 @@ declare namespace CloudantV1 {
|
|
|
2772
2765
|
/** Query parameter to specify the changes feed type. */
|
|
2773
2766
|
feed?: PostChangesAsStreamConstants.Feed | string;
|
|
2774
2767
|
/** Query parameter to specify a filter function from a design document that will filter the changes stream
|
|
2775
|
-
* emitting only filtered events.
|
|
2776
|
-
*
|
|
2777
|
-
*
|
|
2778
|
-
*
|
|
2779
|
-
*
|
|
2780
|
-
*
|
|
2781
|
-
*
|
|
2782
|
-
*
|
|
2783
|
-
*
|
|
2784
|
-
*
|
|
2785
|
-
*
|
|
2768
|
+
* emitting only filtered events. For example: `design_doc/filtername`.
|
|
2769
|
+
*
|
|
2770
|
+
* Additionally, some keywords are reserved for built-in filters:
|
|
2771
|
+
*
|
|
2772
|
+
* * `_design` - Returns only changes to design documents.
|
|
2773
|
+
* * `_doc_ids` - Returns changes for documents with an ID matching one specified in
|
|
2774
|
+
* `doc_ids` request body parameter.
|
|
2775
|
+
* * `_selector` - Returns changes for documents that match the `selector`
|
|
2776
|
+
* request body parameter. The selector syntax is the same as used for
|
|
2777
|
+
* `_find`.
|
|
2778
|
+
* * `_view` - Returns changes for documents that match an existing map
|
|
2779
|
+
* function in the view specified by the query parameter `view`.
|
|
2786
2780
|
*/
|
|
2787
2781
|
filter?: string;
|
|
2788
2782
|
/** Query parameter to specify the period in milliseconds after which an empty line is sent in the results. Only
|
|
@@ -5361,19 +5355,11 @@ declare namespace CloudantV1 {
|
|
|
5361
5355
|
OK = "ok"
|
|
5362
5356
|
}
|
|
5363
5357
|
}
|
|
5364
|
-
/** Parameters for the `postMissingRevs` operation. */
|
|
5365
|
-
interface PostMissingRevsParams {
|
|
5366
|
-
/** Path parameter to specify the database name. */
|
|
5367
|
-
db: string;
|
|
5368
|
-
/** HTTP request body for postMissingRevs and postRevsDiff. */
|
|
5369
|
-
documentRevisions: JsonObject;
|
|
5370
|
-
headers?: OutgoingHttpHeaders;
|
|
5371
|
-
}
|
|
5372
5358
|
/** Parameters for the `postRevsDiff` operation. */
|
|
5373
5359
|
interface PostRevsDiffParams {
|
|
5374
5360
|
/** Path parameter to specify the database name. */
|
|
5375
5361
|
db: string;
|
|
5376
|
-
/** HTTP request body for
|
|
5362
|
+
/** HTTP request body for operations with Document revisions. */
|
|
5377
5363
|
documentRevisions: JsonObject;
|
|
5378
5364
|
headers?: OutgoingHttpHeaders;
|
|
5379
5365
|
}
|
|
@@ -5765,6 +5751,8 @@ declare namespace CloudantV1 {
|
|
|
5765
5751
|
}
|
|
5766
5752
|
/** Schema for database information keyed by database name. */
|
|
5767
5753
|
interface DbsInfoResult {
|
|
5754
|
+
/** The name of the error. */
|
|
5755
|
+
error?: string;
|
|
5768
5756
|
/** Schema for information about a database. */
|
|
5769
5757
|
info?: DatabaseInformation;
|
|
5770
5758
|
/** Database name. */
|
|
@@ -5794,6 +5782,45 @@ declare namespace CloudantV1 {
|
|
|
5794
5782
|
autoupdate?: boolean;
|
|
5795
5783
|
/** Schema for filter functions definition. This schema is a map where keys are the names of the filter
|
|
5796
5784
|
* functions and values are the function definition in string format.
|
|
5785
|
+
*
|
|
5786
|
+
* Filter function formats, or filters the changes feed that pass filter rules. The function takes 2 parameters:
|
|
5787
|
+
*
|
|
5788
|
+
* * `doc`: The document that is being processed.
|
|
5789
|
+
* * `req`: A Request JavaScript object with these properties:
|
|
5790
|
+
*
|
|
5791
|
+
* * `body` - string, Request body data as string.
|
|
5792
|
+
* If the request method is GET this field contains the value
|
|
5793
|
+
* `"undefined"`.
|
|
5794
|
+
* If the method is DELETE or HEAD the value is `""` (empty string).
|
|
5795
|
+
* * `cookie` - Cookies object.
|
|
5796
|
+
* * `form` - Form Data object, contains the decoded body as key-value
|
|
5797
|
+
* pairs if the Content-Type header was
|
|
5798
|
+
* application/x-www-form-urlencoded.
|
|
5799
|
+
* * `headers` - Request Headers object.
|
|
5800
|
+
* * `id` - string, requested document id if it was specified
|
|
5801
|
+
* or null otherwise.
|
|
5802
|
+
* * `info` - Database Information object,
|
|
5803
|
+
* see `DatabaseInformation`.
|
|
5804
|
+
* * `method` - string or an array of chars, request method.
|
|
5805
|
+
* String value is a method as one of: HEAD, GET, POST, PUT,
|
|
5806
|
+
* DELETE, OPTIONS, TRACE, COPY. For not supported methods
|
|
5807
|
+
* it will be represented as an array of char codes e.g. for VIEW
|
|
5808
|
+
* it will be 86,73,69,87.
|
|
5809
|
+
* * `path` - array of strings, requested path sections.
|
|
5810
|
+
* * `peer` - string, request source IP address.
|
|
5811
|
+
* * `query` - string, URL query parameters object. Note that multiple
|
|
5812
|
+
* keys are not supported and the last key value suppresses others.
|
|
5813
|
+
* * `requested_path` - array of strings,
|
|
5814
|
+
* actual requested path section.
|
|
5815
|
+
* * `raw_path` - string, raw requested path.
|
|
5816
|
+
* * `userCtx`: User Context Object, containing information about the
|
|
5817
|
+
* user writing the document (if present), see the `UserContext`.
|
|
5818
|
+
* * `secObj`: Security Object, with lists of database security roles,
|
|
5819
|
+
* see the `SecurityObject`.
|
|
5820
|
+
* * `uuid` - string, generated UUID by a specified algorithm in the
|
|
5821
|
+
* config file.
|
|
5822
|
+
*
|
|
5823
|
+
* Filter functions must return true if a document passed all the rules.
|
|
5797
5824
|
*/
|
|
5798
5825
|
filters?: JsonObject;
|
|
5799
5826
|
/** Search (text) index function definitions. */
|
|
@@ -5802,8 +5829,6 @@ declare namespace CloudantV1 {
|
|
|
5802
5829
|
language?: string;
|
|
5803
5830
|
/** Schema for design document options. */
|
|
5804
5831
|
options?: DesignDocumentOptions;
|
|
5805
|
-
/** Schema for update function definitions. */
|
|
5806
|
-
updates?: JsonObject;
|
|
5807
5832
|
/** Validate document update function can be used to prevent invalid or unauthorized document update requests
|
|
5808
5833
|
* from being stored. Validation functions typically examine the structure of the new document to ensure that
|
|
5809
5834
|
* required fields are present and to verify that the requesting user should be allowed to make changes to the
|
|
@@ -5860,8 +5885,6 @@ declare namespace CloudantV1 {
|
|
|
5860
5885
|
signature: string;
|
|
5861
5886
|
/** Schema for size information of content. */
|
|
5862
5887
|
sizes: ContentInformationSizes;
|
|
5863
|
-
/** The update sequence of the corresponding database that has been indexed. */
|
|
5864
|
-
update_seq: string;
|
|
5865
5888
|
/** Indicates if the view is currently being updated. */
|
|
5866
5889
|
updater_running: boolean;
|
|
5867
5890
|
/** Number of clients waiting on views from this design document. */
|
|
@@ -6188,11 +6211,6 @@ declare namespace CloudantV1 {
|
|
|
6188
6211
|
/** All cluster nodes. */
|
|
6189
6212
|
cluster_nodes: string[];
|
|
6190
6213
|
}
|
|
6191
|
-
/** Schema for mapping document IDs to lists of missing revisions. */
|
|
6192
|
-
interface MissingRevsResult {
|
|
6193
|
-
/** Schema for mapping document IDs to lists of revisions. */
|
|
6194
|
-
missing_revs: JsonObject;
|
|
6195
|
-
}
|
|
6196
6214
|
/** Schema for an OK result. */
|
|
6197
6215
|
interface Ok {
|
|
6198
6216
|
/** ok. */
|
|
@@ -6256,9 +6274,18 @@ declare namespace CloudantV1 {
|
|
|
6256
6274
|
}
|
|
6257
6275
|
/** Schema for replication source or target database authentication. */
|
|
6258
6276
|
interface ReplicationDatabaseAuth {
|
|
6277
|
+
/** Schema for basic authentication of replication source or target database. */
|
|
6278
|
+
basic?: ReplicationDatabaseAuthBasic;
|
|
6259
6279
|
/** Schema for an IAM API key for replication database authentication. */
|
|
6260
6280
|
iam?: ReplicationDatabaseAuthIam;
|
|
6261
6281
|
}
|
|
6282
|
+
/** Schema for basic authentication of replication source or target database. */
|
|
6283
|
+
interface ReplicationDatabaseAuthBasic {
|
|
6284
|
+
/** The password associated with the username. */
|
|
6285
|
+
password: string;
|
|
6286
|
+
/** The username. */
|
|
6287
|
+
username: string;
|
|
6288
|
+
}
|
|
6262
6289
|
/** Schema for an IAM API key for replication database authentication. */
|
|
6263
6290
|
interface ReplicationDatabaseAuthIam {
|
|
6264
6291
|
/** IAM API key. */
|
|
@@ -6482,6 +6509,8 @@ declare namespace CloudantV1 {
|
|
|
6482
6509
|
}
|
|
6483
6510
|
/** Schema for a replication scheduler job event. */
|
|
6484
6511
|
interface SchedulerJobEvent {
|
|
6512
|
+
/** Reason for current state of event. */
|
|
6513
|
+
reason?: string;
|
|
6485
6514
|
/** Timestamp of the event. */
|
|
6486
6515
|
timestamp: string;
|
|
6487
6516
|
/** Type of the event. */
|