@ibm-cloud/cloudant 0.0.20 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cloudant/v1.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * (C) Copyright IBM Corp. 2021.
3
+ * (C) Copyright IBM Corp. 2022.
4
4
  *
5
5
  * Licensed under the Apache License, Version 2.0 (the "License");
6
6
  * you may not use this file except in compliance with the License.
@@ -40,9 +40,6 @@ var __assign = (this && this.__assign) || function () {
40
40
  };
41
41
  return __assign.apply(this, arguments);
42
42
  };
43
- /**
44
- * IBM OpenAPI SDK Code Generator Version: 3.37.1-66e80f2e-20210813-202232
45
- */
46
43
  var extend = require("extend");
47
44
  var ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
48
45
  var common_1 = require("../lib/common");
@@ -50,6 +47,8 @@ var cloudantBaseService_1 = require("../lib/cloudantBaseService");
50
47
  var getAuthenticatorFromEnvCloudantExtension_1 = require("../lib/getAuthenticatorFromEnvCloudantExtension");
51
48
  /**
52
49
  * NoSQL database based on Apache CouchDB
50
+ *
51
+ * See: https://cloud.ibm.com/docs/services/Cloudant/
53
52
  */
54
53
  var CloudantV1 = /** @class */ (function (_super) {
55
54
  __extends(CloudantV1, _super);
@@ -95,7 +94,7 @@ var CloudantV1 = /** @class */ (function (_super) {
95
94
  options.serviceName = this.DEFAULT_SERVICE_NAME;
96
95
  }
97
96
  if (!options.authenticator) {
98
- options.authenticator = (0, getAuthenticatorFromEnvCloudantExtension_1.getAuthenticatorFromEnvCloudantExtension)(options.serviceName);
97
+ options.authenticator = (0, getAuthenticatorFromEnvCloudantExtension_1.default)(options.serviceName);
99
98
  }
100
99
  var service = new CloudantV1(options);
101
100
  service.configureService(options.serviceName);
@@ -520,7 +519,7 @@ var CloudantV1 = /** @class */ (function (_super) {
520
519
  * @param {string} [params.view] - Query parameter to specify a view function as a filter. Documents pass the filter
521
520
  * if the view's map function emits at least one record for them.
522
521
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
523
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
522
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
524
523
  */
525
524
  CloudantV1.prototype.postChangesAsStream = function (params) {
526
525
  var _params = __assign({}, params);
@@ -1009,7 +1008,7 @@ var CloudantV1 = /** @class */ (function (_super) {
1009
1008
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
1010
1009
  * @param {string} [params.startkey] - Schema for a document ID.
1011
1010
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1012
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
1011
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
1013
1012
  */
1014
1013
  CloudantV1.prototype.postAllDocsAsStream = function (params) {
1015
1014
  var _params = __assign({}, params);
@@ -1112,7 +1111,7 @@ var CloudantV1 = /** @class */ (function (_super) {
1112
1111
  * individual view query to be executed. The field names and their meaning are the same as the query parameters of a
1113
1112
  * regular `/_all_docs` request.
1114
1113
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1115
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
1114
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
1116
1115
  */
1117
1116
  CloudantV1.prototype.postAllDocsQueriesAsStream = function (params) {
1118
1117
  var _params = __assign({}, params);
@@ -1259,7 +1258,7 @@ var CloudantV1 = /** @class */ (function (_super) {
1259
1258
  * @param {boolean} [params.revs] - Query parameter to specify whether to include a list of all known document
1260
1259
  * revisions.
1261
1260
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1262
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
1261
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
1263
1262
  */
1264
1263
  CloudantV1.prototype.postBulkGetAsMixed = function (params) {
1265
1264
  var _params = __assign({}, params);
@@ -1316,7 +1315,7 @@ var CloudantV1 = /** @class */ (function (_super) {
1316
1315
  * @param {boolean} [params.revs] - Query parameter to specify whether to include a list of all known document
1317
1316
  * revisions.
1318
1317
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1319
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
1318
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
1320
1319
  */
1321
1320
  CloudantV1.prototype.postBulkGetAsRelated = function (params) {
1322
1321
  var _params = __assign({}, params);
@@ -1373,7 +1372,7 @@ var CloudantV1 = /** @class */ (function (_super) {
1373
1372
  * @param {boolean} [params.revs] - Query parameter to specify whether to include a list of all known document
1374
1373
  * revisions.
1375
1374
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1376
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
1375
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
1377
1376
  */
1378
1377
  CloudantV1.prototype.postBulkGetAsStream = function (params) {
1379
1378
  var _params = __assign({}, params);
@@ -1567,7 +1566,7 @@ var CloudantV1 = /** @class */ (function (_super) {
1567
1566
  * @param {boolean} [params.revsInfo] - Query parameter to specify whether to includes detailed information for all
1568
1567
  * known document revisions.
1569
1568
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1570
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
1569
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
1571
1570
  */
1572
1571
  CloudantV1.prototype.getDocumentAsMixed = function (params) {
1573
1572
  var _params = __assign({}, params);
@@ -1641,7 +1640,7 @@ var CloudantV1 = /** @class */ (function (_super) {
1641
1640
  * @param {boolean} [params.revsInfo] - Query parameter to specify whether to includes detailed information for all
1642
1641
  * known document revisions.
1643
1642
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1644
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
1643
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
1645
1644
  */
1646
1645
  CloudantV1.prototype.getDocumentAsRelated = function (params) {
1647
1646
  var _params = __assign({}, params);
@@ -1715,7 +1714,7 @@ var CloudantV1 = /** @class */ (function (_super) {
1715
1714
  * @param {boolean} [params.revsInfo] - Query parameter to specify whether to includes detailed information for all
1716
1715
  * known document revisions.
1717
1716
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
1718
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
1717
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
1719
1718
  */
1720
1719
  CloudantV1.prototype.getDocumentAsStream = function (params) {
1721
1720
  var _params = __assign({}, params);
@@ -2350,7 +2349,7 @@ var CloudantV1 = /** @class */ (function (_super) {
2350
2349
  * @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
2351
2350
  * to responding to the user.
2352
2351
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2353
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
2352
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
2354
2353
  */
2355
2354
  CloudantV1.prototype.postViewAsStream = function (params) {
2356
2355
  var _params = __assign({}, params);
@@ -2466,7 +2465,7 @@ var CloudantV1 = /** @class */ (function (_super) {
2466
2465
  * view query to be executed. The field names and their meaning are the same as the query parameters of a regular view
2467
2466
  * request.
2468
2467
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2469
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
2468
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
2470
2469
  */
2471
2470
  CloudantV1.prototype.postViewQueriesAsStream = function (params) {
2472
2471
  var _params = __assign({}, params);
@@ -2648,7 +2647,7 @@ var CloudantV1 = /** @class */ (function (_super) {
2648
2647
  * @param {string[]} [params.keys] - Schema for a list of document IDs.
2649
2648
  * @param {string} [params.startkey] - Schema for a document ID.
2650
2649
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2651
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
2650
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
2652
2651
  */
2653
2652
  CloudantV1.prototype.postPartitionAllDocsAsStream = function (params) {
2654
2653
  var _params = __assign({}, params);
@@ -2814,7 +2813,7 @@ var CloudantV1 = /** @class */ (function (_super) {
2814
2813
  * Fields that are used for sorting must be indexed by the same indexer that is used for the search query.
2815
2814
  * @param {string} [params.stale] - Do not wait for the index to finish building to return results.
2816
2815
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
2817
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
2816
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
2818
2817
  */
2819
2818
  CloudantV1.prototype.postPartitionSearchAsStream = function (params) {
2820
2819
  var _params = __assign({}, params);
@@ -3007,7 +3006,7 @@ var CloudantV1 = /** @class */ (function (_super) {
3007
3006
  * @param {string} [params.update] - Parameter to specify whether or not the view in question should be updated prior
3008
3007
  * to responding to the user.
3009
3008
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
3010
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
3009
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
3011
3010
  */
3012
3011
  CloudantV1.prototype.postPartitionViewAsStream = function (params) {
3013
3012
  var _params = __assign({}, params);
@@ -3207,7 +3206,7 @@ var CloudantV1 = /** @class */ (function (_super) {
3207
3206
  * @param {string[]} [params.useIndex] - Use this option to identify a specific index for query to run against, rather
3208
3207
  * than by using the IBM Cloudant Query algorithm to find the best index.
3209
3208
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
3210
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
3209
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
3211
3210
  */
3212
3211
  CloudantV1.prototype.postPartitionFindAsStream = function (params) {
3213
3212
  var _params = __assign({}, params);
@@ -3502,7 +3501,7 @@ var CloudantV1 = /** @class */ (function (_super) {
3502
3501
  * that many replicas before it is returned in the results. The request will take more time than using only the
3503
3502
  * document that is stored locally with the index.
3504
3503
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
3505
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
3504
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
3506
3505
  */
3507
3506
  CloudantV1.prototype.postFindAsStream = function (params) {
3508
3507
  var _params = __assign({}, params);
@@ -3890,7 +3889,7 @@ var CloudantV1 = /** @class */ (function (_super) {
3890
3889
  * objects. The field names of the JSON objects are names for ranges. The values are strings that describe the range,
3891
3890
  * for example "[0 TO 10]". This option is only available when making global queries.
3892
3891
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
3893
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
3892
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
3894
3893
  */
3895
3894
  CloudantV1.prototype.postSearchAsStream = function (params) {
3896
3895
  var _params = __assign({}, params);
@@ -4124,7 +4123,7 @@ var CloudantV1 = /** @class */ (function (_super) {
4124
4123
  * @param {string} [params.stale] - Query parameter to specify to not wait for the index to finish building before
4125
4124
  * returning results.
4126
4125
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
4127
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
4126
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
4128
4127
  */
4129
4128
  CloudantV1.prototype.getGeoAsStream = function (params) {
4130
4129
  var _params = __assign({}, params);
@@ -5065,7 +5064,7 @@ var CloudantV1 = /** @class */ (function (_super) {
5065
5064
  * implementation of resumable downloads and skippable streams. This is available for all attachments inside CouchDB.
5066
5065
  * @param {string} [params.rev] - Query parameter to specify a document revision.
5067
5066
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5068
- * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream | Buffer>>}
5067
+ * @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
5069
5068
  */
5070
5069
  CloudantV1.prototype.getAttachment = function (params) {
5071
5070
  var _params = __assign({}, params);
@@ -5363,7 +5362,7 @@ var CloudantV1 = /** @class */ (function (_super) {
5363
5362
  *
5364
5363
  * @param {Object} params - The parameters to send to the service.
5365
5364
  * @param {string} params.db - Path parameter to specify the database name.
5366
- * @param {JsonObject} params.documentRevisions - HTTP request body for postMissingRevs and postRevsDiff.
5365
+ * @param {JsonObject} params.documentRevisions - HTTP request body for operations with Document revisions.
5367
5366
  * @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
5368
5367
  * @returns {Promise<CloudantV1.Response<CloudantV1.JsonObject>>}
5369
5368
  */
@@ -5639,7 +5638,7 @@ var CloudantV1 = /** @class */ (function (_super) {
5639
5638
  CloudantV1.DEFAULT_SERVICE_URL = 'http://localhost:5984';
5640
5639
  CloudantV1.DEFAULT_SERVICE_NAME = 'cloudant';
5641
5640
  return CloudantV1;
5642
- }(cloudantBaseService_1.CloudantBaseService));
5641
+ }(cloudantBaseService_1.default));
5643
5642
  /*************************
5644
5643
  * interfaces
5645
5644
  ************************/