@ibm-cloud/cloudant 0.9.1 → 0.10.0
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 +45 -106
- package/auth/sessionTokenManager.d.ts +0 -1
- package/cloudant/features/changesResultItemStream.d.ts +0 -2
- package/cloudant/features/stream.d.ts +0 -2
- package/cloudant/v1.d.ts +22 -11
- package/cloudant/v1.js +48 -6
- package/cloudant/v1.js.map +1 -1
- package/lib/common.js +1 -2
- package/lib/common.js.map +1 -1
- package/lib/getAuthenticatorFromEnvCloudantExtension.js +1 -1
- package/lib/getAuthenticatorFromEnvCloudantExtension.js.map +1 -1
- package/package.json +14 -13
package/cloudant/v1.d.ts
CHANGED
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
/// <reference types="node" />
|
|
17
|
-
/// <reference types="node" />
|
|
18
|
-
/// <reference types="node" />
|
|
19
16
|
import { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http';
|
|
20
17
|
import { SDKLogger, UserOptions } from 'ibm-cloud-sdk-core';
|
|
21
18
|
import CloudantBaseService from '../lib/cloudantBaseService';
|
|
@@ -1929,9 +1926,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1929
1926
|
/**
|
|
1930
1927
|
* Retrieve information about all indexes.
|
|
1931
1928
|
*
|
|
1932
|
-
* When you make a GET request to `/db/_index`, you get a list of all indexes
|
|
1933
|
-
*
|
|
1934
|
-
* the `indexes` property of design documents.
|
|
1929
|
+
* When you make a GET request to `/db/_index`, you get a list of all the indexes using `"language":"query"` in the
|
|
1930
|
+
* database and the primary index. In addition to the information available through this API, the indexes are stored
|
|
1931
|
+
* in the `indexes` property of their respective design documents.
|
|
1935
1932
|
*
|
|
1936
1933
|
* @param {Object} params - The parameters to send to the service.
|
|
1937
1934
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -6066,7 +6063,7 @@ declare namespace CloudantV1 {
|
|
|
6066
6063
|
* `attachments=true` or `atts_since`. Note that when used with a view or changes feed `include_docs` must also be
|
|
6067
6064
|
* `true`.
|
|
6068
6065
|
*/
|
|
6069
|
-
data?:
|
|
6066
|
+
data?: Buffer;
|
|
6070
6067
|
/** Content hash digest. It starts with prefix which announce hash type (e.g. `md5-`) and continues with
|
|
6071
6068
|
* Base64-encoded hash digest.
|
|
6072
6069
|
*/
|
|
@@ -6368,6 +6365,10 @@ declare namespace CloudantV1 {
|
|
|
6368
6365
|
docDelCount: number;
|
|
6369
6366
|
/** The engine used for the database. */
|
|
6370
6367
|
engine?: string;
|
|
6368
|
+
/** An opaque string to detect whether a database has been recreated. The field name is for compatibility with
|
|
6369
|
+
* old replicator versions. Do not use the value to infer timing infromation. Typically only used by replicators.
|
|
6370
|
+
*/
|
|
6371
|
+
instanceStartTime: string;
|
|
6371
6372
|
/** Schema for database properties. */
|
|
6372
6373
|
props: DatabaseInformationProps;
|
|
6373
6374
|
/** Schema for size information of content. */
|
|
@@ -6394,6 +6395,7 @@ declare namespace CloudantV1 {
|
|
|
6394
6395
|
doc_count: number;
|
|
6395
6396
|
doc_del_count: number;
|
|
6396
6397
|
engine?: string;
|
|
6398
|
+
instance_start_time: string;
|
|
6397
6399
|
props: DatabaseInformationProps.Transport;
|
|
6398
6400
|
sizes: ContentInformationSizes.Transport;
|
|
6399
6401
|
update_seq: string;
|
|
@@ -7623,6 +7625,10 @@ declare namespace CloudantV1 {
|
|
|
7623
7625
|
filter?: string;
|
|
7624
7626
|
/** Maximum number of HTTP connections per replication. */
|
|
7625
7627
|
httpConnections?: number;
|
|
7628
|
+
/** The replication document owner. The server sets an appropriate value if the field is unset when writing a
|
|
7629
|
+
* replication document. Only administrators can modify the value to an owner other than themselves.
|
|
7630
|
+
*/
|
|
7631
|
+
owner?: string;
|
|
7626
7632
|
/** Schema for a map of string key value pairs, such as query parameters. */
|
|
7627
7633
|
queryParams?: JsonObject;
|
|
7628
7634
|
/** Number of times a replication request is retried. The requests are retried with a doubling exponential
|
|
@@ -7730,6 +7736,7 @@ declare namespace CloudantV1 {
|
|
|
7730
7736
|
doc_ids?: string[];
|
|
7731
7737
|
filter?: string;
|
|
7732
7738
|
http_connections?: number;
|
|
7739
|
+
owner?: string;
|
|
7733
7740
|
query_params?: JsonObject;
|
|
7734
7741
|
retries_per_request?: number;
|
|
7735
7742
|
selector?: JsonObject;
|
|
@@ -8259,17 +8266,21 @@ declare namespace CloudantV1 {
|
|
|
8259
8266
|
/** Vendor name. */
|
|
8260
8267
|
name: string;
|
|
8261
8268
|
/** Vendor variant. */
|
|
8262
|
-
variant
|
|
8269
|
+
variant: string;
|
|
8263
8270
|
/** Vendor version. */
|
|
8264
|
-
version
|
|
8271
|
+
version: string;
|
|
8272
|
+
/** ServerVendor accepts additional properties. */
|
|
8273
|
+
[propName: string]: any;
|
|
8265
8274
|
static serialize(obj: any): ServerVendor.Transport;
|
|
8266
8275
|
static deserialize(obj: any): ServerVendor;
|
|
8267
8276
|
}
|
|
8268
8277
|
namespace ServerVendor {
|
|
8269
8278
|
interface Transport {
|
|
8270
8279
|
name: string;
|
|
8271
|
-
variant
|
|
8272
|
-
version
|
|
8280
|
+
variant: string;
|
|
8281
|
+
version: string;
|
|
8282
|
+
/** ServerVendor.ServerVendor.Transport accepts additional properties. */
|
|
8283
|
+
[propName: string]: any;
|
|
8273
8284
|
}
|
|
8274
8285
|
}
|
|
8275
8286
|
/** Schema for session authentication information. */
|
package/cloudant/v1.js
CHANGED
|
@@ -31,7 +31,7 @@ const getAuthenticatorFromEnvCloudantExtension_1 = __importDefault(require("../l
|
|
|
31
31
|
*/
|
|
32
32
|
class CloudantV1 extends cloudantBaseService_1.default {
|
|
33
33
|
static _logger = (0, ibm_cloud_sdk_core_1.getNewLogger)('CloudantV1');
|
|
34
|
-
static DEFAULT_SERVICE_URL = '
|
|
34
|
+
static DEFAULT_SERVICE_URL = 'https://~replace-with-cloudant-host~.cloudantnosqldb.appdomain.cloud';
|
|
35
35
|
static DEFAULT_SERVICE_NAME = 'cloudant';
|
|
36
36
|
/*************************
|
|
37
37
|
* Factory method
|
|
@@ -3935,9 +3935,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
3935
3935
|
/**
|
|
3936
3936
|
* Retrieve information about all indexes.
|
|
3937
3937
|
*
|
|
3938
|
-
* When you make a GET request to `/db/_index`, you get a list of all indexes
|
|
3939
|
-
*
|
|
3940
|
-
* the `indexes` property of design documents.
|
|
3938
|
+
* When you make a GET request to `/db/_index`, you get a list of all the indexes using `"language":"query"` in the
|
|
3939
|
+
* database and the primary index. In addition to the information available through this API, the indexes are stored
|
|
3940
|
+
* in the `indexes` property of their respective design documents.
|
|
3941
3941
|
*
|
|
3942
3942
|
* @param {Object} params - The parameters to send to the service.
|
|
3943
3943
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -7186,7 +7186,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
7186
7186
|
copy.content_type = obj.contentType;
|
|
7187
7187
|
}
|
|
7188
7188
|
if (obj.data !== undefined) {
|
|
7189
|
-
copy.data = obj.data;
|
|
7189
|
+
copy.data = obj.data !== null ? obj.data.toString('base64') : null;
|
|
7190
7190
|
}
|
|
7191
7191
|
if (obj.digest !== undefined) {
|
|
7192
7192
|
copy.digest = obj.digest;
|
|
@@ -7220,7 +7220,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
7220
7220
|
copy.contentType = obj.content_type;
|
|
7221
7221
|
}
|
|
7222
7222
|
if (obj.data !== undefined) {
|
|
7223
|
-
copy.data = obj.data;
|
|
7223
|
+
copy.data = obj.data !== null ? Buffer.from(obj.data, 'base64') : null;
|
|
7224
7224
|
}
|
|
7225
7225
|
if (obj.digest !== undefined) {
|
|
7226
7226
|
copy.digest = obj.digest;
|
|
@@ -7810,6 +7810,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
7810
7810
|
docDelCount;
|
|
7811
7811
|
/** The engine used for the database. */
|
|
7812
7812
|
engine;
|
|
7813
|
+
/** An opaque string to detect whether a database has been recreated. The field name is for compatibility with
|
|
7814
|
+
* old replicator versions. Do not use the value to infer timing infromation. Typically only used by replicators.
|
|
7815
|
+
*/
|
|
7816
|
+
instanceStartTime;
|
|
7813
7817
|
/** Schema for database properties. */
|
|
7814
7818
|
props;
|
|
7815
7819
|
/** Schema for size information of content. */
|
|
@@ -7854,6 +7858,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
7854
7858
|
if (obj.engine !== undefined) {
|
|
7855
7859
|
copy.engine = obj.engine;
|
|
7856
7860
|
}
|
|
7861
|
+
if (obj.instanceStartTime !== undefined) {
|
|
7862
|
+
copy.instance_start_time = obj.instanceStartTime;
|
|
7863
|
+
}
|
|
7857
7864
|
if (obj.props !== undefined) {
|
|
7858
7865
|
copy.props = DatabaseInformationProps.serialize(obj.props);
|
|
7859
7866
|
}
|
|
@@ -7903,6 +7910,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
7903
7910
|
if (obj.engine !== undefined) {
|
|
7904
7911
|
copy.engine = obj.engine;
|
|
7905
7912
|
}
|
|
7913
|
+
if (obj.instance_start_time !== undefined) {
|
|
7914
|
+
copy.instanceStartTime = obj.instance_start_time;
|
|
7915
|
+
}
|
|
7906
7916
|
if (obj.props !== undefined) {
|
|
7907
7917
|
copy.props = DatabaseInformationProps.deserialize(obj.props);
|
|
7908
7918
|
}
|
|
@@ -10500,6 +10510,10 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
10500
10510
|
filter;
|
|
10501
10511
|
/** Maximum number of HTTP connections per replication. */
|
|
10502
10512
|
httpConnections;
|
|
10513
|
+
/** The replication document owner. The server sets an appropriate value if the field is unset when writing a
|
|
10514
|
+
* replication document. Only administrators can modify the value to an owner other than themselves.
|
|
10515
|
+
*/
|
|
10516
|
+
owner;
|
|
10503
10517
|
/** Schema for a map of string key value pairs, such as query parameters. */
|
|
10504
10518
|
queryParams;
|
|
10505
10519
|
/** Number of times a replication request is retried. The requests are retried with a doubling exponential
|
|
@@ -10639,6 +10653,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
10639
10653
|
if (obj.httpConnections !== undefined) {
|
|
10640
10654
|
copy.http_connections = obj.httpConnections;
|
|
10641
10655
|
}
|
|
10656
|
+
if (obj.owner !== undefined) {
|
|
10657
|
+
copy.owner = obj.owner;
|
|
10658
|
+
}
|
|
10642
10659
|
if (obj.queryParams !== undefined) {
|
|
10643
10660
|
copy.query_params = obj.queryParams;
|
|
10644
10661
|
}
|
|
@@ -10703,6 +10720,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
10703
10720
|
'docIds',
|
|
10704
10721
|
'filter',
|
|
10705
10722
|
'httpConnections',
|
|
10723
|
+
'owner',
|
|
10706
10724
|
'queryParams',
|
|
10707
10725
|
'retriesPerRequest',
|
|
10708
10726
|
'selector',
|
|
@@ -10785,6 +10803,9 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
10785
10803
|
if (obj.http_connections !== undefined) {
|
|
10786
10804
|
copy.httpConnections = obj.http_connections;
|
|
10787
10805
|
}
|
|
10806
|
+
if (obj.owner !== undefined) {
|
|
10807
|
+
copy.owner = obj.owner;
|
|
10808
|
+
}
|
|
10788
10809
|
if (obj.query_params !== undefined) {
|
|
10789
10810
|
copy.queryParams = obj.query_params;
|
|
10790
10811
|
}
|
|
@@ -10849,6 +10870,7 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
10849
10870
|
'doc_ids',
|
|
10850
10871
|
'filter',
|
|
10851
10872
|
'http_connections',
|
|
10873
|
+
'owner',
|
|
10852
10874
|
'query_params',
|
|
10853
10875
|
'retries_per_request',
|
|
10854
10876
|
'selector',
|
|
@@ -11999,6 +12021,16 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
11999
12021
|
if (obj.version !== undefined) {
|
|
12000
12022
|
copy.version = obj.version;
|
|
12001
12023
|
}
|
|
12024
|
+
let defaultProperties = [
|
|
12025
|
+
'name',
|
|
12026
|
+
'variant',
|
|
12027
|
+
'version',
|
|
12028
|
+
];
|
|
12029
|
+
Object.keys(obj).forEach(key => {
|
|
12030
|
+
if (!defaultProperties.includes(key)) {
|
|
12031
|
+
copy[key] = obj[key];
|
|
12032
|
+
}
|
|
12033
|
+
});
|
|
12002
12034
|
return copy;
|
|
12003
12035
|
}
|
|
12004
12036
|
static deserialize(obj) {
|
|
@@ -12015,6 +12047,16 @@ class CloudantV1 extends cloudantBaseService_1.default {
|
|
|
12015
12047
|
if (obj.version !== undefined) {
|
|
12016
12048
|
copy.version = obj.version;
|
|
12017
12049
|
}
|
|
12050
|
+
let defaultProperties = [
|
|
12051
|
+
'name',
|
|
12052
|
+
'variant',
|
|
12053
|
+
'version',
|
|
12054
|
+
];
|
|
12055
|
+
Object.keys(obj).forEach(key => {
|
|
12056
|
+
if (!defaultProperties.includes(key)) {
|
|
12057
|
+
copy[key] = obj[key];
|
|
12058
|
+
}
|
|
12059
|
+
});
|
|
12018
12060
|
return copy;
|
|
12019
12061
|
}
|
|
12020
12062
|
}
|