@ibm-cloud/cloudant 0.0.24 → 0.0.25
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 +1 -1
- package/cloudant/v1.d.ts +103 -19
- package/cloudant/v1.js +565 -343
- package/cloudant/v1.js.map +1 -1
- package/package.json +35 -6
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
[](https://github.com/IBM/cloudant-node-sdk/releases/latest)
|
|
3
3
|
[](https://ibm.github.io/cloudant-node-sdk/)
|
|
4
4
|
|
|
5
|
-
# IBM Cloudant Node.js SDK Version 0.0.
|
|
5
|
+
# IBM Cloudant Node.js SDK Version 0.0.25
|
|
6
6
|
|
|
7
7
|
IBM Cloudant Node.js SDK is a client library that interacts with the
|
|
8
8
|
[IBM Cloudant APIs](https://cloud.ibm.com/apidocs/cloudant?code=node).
|
package/cloudant/v1.d.ts
CHANGED
|
@@ -384,7 +384,8 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
384
384
|
* @param {boolean} [params.partitioned] - Query parameter to specify whether to enable database partitions when
|
|
385
385
|
* creating a database.
|
|
386
386
|
* @param {number} [params.q] - The number of shards in the database. Each shard is a partition of the hash value
|
|
387
|
-
* range.
|
|
387
|
+
* range. Its value is set by the service. For more information about modifying database configuration, contact IBM
|
|
388
|
+
* Cloudant support.
|
|
388
389
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
389
390
|
* @returns {Promise<CloudantV1.Response<CloudantV1.Ok>>}
|
|
390
391
|
*/
|
|
@@ -1402,8 +1403,14 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1402
1403
|
* @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
|
|
1403
1404
|
* results when queried.
|
|
1404
1405
|
* @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
|
|
1405
|
-
* @param {JsonObject[]} [params.sort] -
|
|
1406
|
-
*
|
|
1406
|
+
* @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
|
|
1407
|
+
* direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
|
|
1408
|
+
* provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
|
|
1409
|
+
* fields.
|
|
1410
|
+
*
|
|
1411
|
+
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
1412
|
+
*
|
|
1413
|
+
* When sorting with multiple fields they must use the same sort direction, either all ascending or all descending.
|
|
1407
1414
|
* @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
|
|
1408
1415
|
* shards.
|
|
1409
1416
|
* @param {string} [params.update] - Whether to update the index prior to returning the result.
|
|
@@ -1456,8 +1463,14 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1456
1463
|
* @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
|
|
1457
1464
|
* results when queried.
|
|
1458
1465
|
* @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
|
|
1459
|
-
* @param {JsonObject[]} [params.sort] -
|
|
1460
|
-
*
|
|
1466
|
+
* @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
|
|
1467
|
+
* direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
|
|
1468
|
+
* provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
|
|
1469
|
+
* fields.
|
|
1470
|
+
*
|
|
1471
|
+
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
1472
|
+
*
|
|
1473
|
+
* When sorting with multiple fields they must use the same sort direction, either all ascending or all descending.
|
|
1461
1474
|
* @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
|
|
1462
1475
|
* shards.
|
|
1463
1476
|
* @param {string} [params.update] - Whether to update the index prior to returning the result.
|
|
@@ -1512,8 +1525,14 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1512
1525
|
* @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
|
|
1513
1526
|
* results when queried.
|
|
1514
1527
|
* @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
|
|
1515
|
-
* @param {JsonObject[]} [params.sort] -
|
|
1516
|
-
*
|
|
1528
|
+
* @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
|
|
1529
|
+
* direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
|
|
1530
|
+
* provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
|
|
1531
|
+
* fields.
|
|
1532
|
+
*
|
|
1533
|
+
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
1534
|
+
*
|
|
1535
|
+
* When sorting with multiple fields they must use the same sort direction, either all ascending or all descending.
|
|
1517
1536
|
* @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
|
|
1518
1537
|
* shards.
|
|
1519
1538
|
* @param {string} [params.update] - Whether to update the index prior to returning the result.
|
|
@@ -1569,8 +1588,14 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1569
1588
|
* @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
|
|
1570
1589
|
* results when queried.
|
|
1571
1590
|
* @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
|
|
1572
|
-
* @param {JsonObject[]} [params.sort] -
|
|
1573
|
-
*
|
|
1591
|
+
* @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
|
|
1592
|
+
* direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
|
|
1593
|
+
* provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
|
|
1594
|
+
* fields.
|
|
1595
|
+
*
|
|
1596
|
+
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
1597
|
+
*
|
|
1598
|
+
* When sorting with multiple fields they must use the same sort direction, either all ascending or all descending.
|
|
1574
1599
|
* @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
|
|
1575
1600
|
* shards.
|
|
1576
1601
|
* @param {string} [params.update] - Whether to update the index prior to returning the result.
|
|
@@ -1626,8 +1651,14 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1626
1651
|
* @param {number} [params.limit] - Maximum number of results returned. The `type: text` indexes are limited to 200
|
|
1627
1652
|
* results when queried.
|
|
1628
1653
|
* @param {number} [params.skip] - Skip the first 'n' results, where 'n' is the value that is specified.
|
|
1629
|
-
* @param {JsonObject[]} [params.sort] -
|
|
1630
|
-
*
|
|
1654
|
+
* @param {JsonObject[]} [params.sort] - The sort field contains a list of pairs, each mapping a field name to a sort
|
|
1655
|
+
* direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if
|
|
1656
|
+
* provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document
|
|
1657
|
+
* fields.
|
|
1658
|
+
*
|
|
1659
|
+
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
1660
|
+
*
|
|
1661
|
+
* When sorting with multiple fields they must use the same sort direction, either all ascending or all descending.
|
|
1631
1662
|
* @param {boolean} [params.stable] - Whether or not the view results should be returned from a "stable" set of
|
|
1632
1663
|
* shards.
|
|
1633
1664
|
* @param {string} [params.update] - Whether to update the index prior to returning the result.
|
|
@@ -2174,6 +2205,12 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
2174
2205
|
* and CouchDB related permissions. Be careful: by removing a Cloudant API key, a member or an admin from the list of
|
|
2175
2206
|
* users that have access permissions, you remove it from the list of users that have access to the database.
|
|
2176
2207
|
*
|
|
2208
|
+
* ### Note about nobody role
|
|
2209
|
+
*
|
|
2210
|
+
* The `nobody` username applies to all unauthenticated connection attempts. For example, if an application tries to
|
|
2211
|
+
* read data from a database, but did not identify itself, the task can continue only if the `nobody` user has the
|
|
2212
|
+
* role `_reader`.
|
|
2213
|
+
*
|
|
2177
2214
|
* @param {Object} params - The parameters to send to the service.
|
|
2178
2215
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
2179
2216
|
* @param {SecurityObject} [params.admins] - Schema for names and roles to map to a database permission.
|
|
@@ -2202,6 +2239,12 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
2202
2239
|
* Modify only Cloudant related permissions to database. Be careful: by removing an API key from the list, you remove
|
|
2203
2240
|
* the API key from the list of users that have access to the database.
|
|
2204
2241
|
*
|
|
2242
|
+
* ### Note about nobody role
|
|
2243
|
+
*
|
|
2244
|
+
* The `nobody` username applies to all unauthenticated connection attempts. For example, if an application tries to
|
|
2245
|
+
* read data from a database, but did not identify itself, the task can continue only if the `nobody` user has the
|
|
2246
|
+
* role `_reader`.
|
|
2247
|
+
*
|
|
2205
2248
|
* @param {Object} params - The parameters to send to the service.
|
|
2206
2249
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
2207
2250
|
* @param {JsonObject} params.cloudant - Database permissions for Cloudant users and/or API keys.
|
|
@@ -2873,8 +2916,8 @@ declare namespace CloudantV1 {
|
|
|
2873
2916
|
db: string;
|
|
2874
2917
|
/** Query parameter to specify whether to enable database partitions when creating a database. */
|
|
2875
2918
|
partitioned?: boolean;
|
|
2876
|
-
/** The number of shards in the database. Each shard is a partition of the hash value range.
|
|
2877
|
-
*
|
|
2919
|
+
/** The number of shards in the database. Each shard is a partition of the hash value range. Its value is set by
|
|
2920
|
+
* the service. For more information about modifying database configuration, contact IBM Cloudant support.
|
|
2878
2921
|
*/
|
|
2879
2922
|
q?: number;
|
|
2880
2923
|
headers?: OutgoingHttpHeaders;
|
|
@@ -4100,7 +4143,14 @@ declare namespace CloudantV1 {
|
|
|
4100
4143
|
limit?: number;
|
|
4101
4144
|
/** Skip the first 'n' results, where 'n' is the value that is specified. */
|
|
4102
4145
|
skip?: number;
|
|
4103
|
-
/**
|
|
4146
|
+
/** The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The
|
|
4147
|
+
* first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next
|
|
4148
|
+
* level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
|
|
4149
|
+
*
|
|
4150
|
+
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
4151
|
+
*
|
|
4152
|
+
* When sorting with multiple fields they must use the same sort direction, either all ascending or all descending.
|
|
4153
|
+
*/
|
|
4104
4154
|
sort?: JsonObject[];
|
|
4105
4155
|
/** Whether or not the view results should be returned from a "stable" set of shards. */
|
|
4106
4156
|
stable?: boolean;
|
|
@@ -4176,7 +4226,14 @@ declare namespace CloudantV1 {
|
|
|
4176
4226
|
limit?: number;
|
|
4177
4227
|
/** Skip the first 'n' results, where 'n' is the value that is specified. */
|
|
4178
4228
|
skip?: number;
|
|
4179
|
-
/**
|
|
4229
|
+
/** The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The
|
|
4230
|
+
* first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next
|
|
4231
|
+
* level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
|
|
4232
|
+
*
|
|
4233
|
+
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
4234
|
+
*
|
|
4235
|
+
* When sorting with multiple fields they must use the same sort direction, either all ascending or all descending.
|
|
4236
|
+
*/
|
|
4180
4237
|
sort?: JsonObject[];
|
|
4181
4238
|
/** Whether or not the view results should be returned from a "stable" set of shards. */
|
|
4182
4239
|
stable?: boolean;
|
|
@@ -4250,7 +4307,14 @@ declare namespace CloudantV1 {
|
|
|
4250
4307
|
limit?: number;
|
|
4251
4308
|
/** Skip the first 'n' results, where 'n' is the value that is specified. */
|
|
4252
4309
|
skip?: number;
|
|
4253
|
-
/**
|
|
4310
|
+
/** The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The
|
|
4311
|
+
* first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next
|
|
4312
|
+
* level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
|
|
4313
|
+
*
|
|
4314
|
+
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
4315
|
+
*
|
|
4316
|
+
* When sorting with multiple fields they must use the same sort direction, either all ascending or all descending.
|
|
4317
|
+
*/
|
|
4254
4318
|
sort?: JsonObject[];
|
|
4255
4319
|
/** Whether or not the view results should be returned from a "stable" set of shards. */
|
|
4256
4320
|
stable?: boolean;
|
|
@@ -4330,7 +4394,14 @@ declare namespace CloudantV1 {
|
|
|
4330
4394
|
limit?: number;
|
|
4331
4395
|
/** Skip the first 'n' results, where 'n' is the value that is specified. */
|
|
4332
4396
|
skip?: number;
|
|
4333
|
-
/**
|
|
4397
|
+
/** The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The
|
|
4398
|
+
* first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next
|
|
4399
|
+
* level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
|
|
4400
|
+
*
|
|
4401
|
+
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
4402
|
+
*
|
|
4403
|
+
* When sorting with multiple fields they must use the same sort direction, either all ascending or all descending.
|
|
4404
|
+
*/
|
|
4334
4405
|
sort?: JsonObject[];
|
|
4335
4406
|
/** Whether or not the view results should be returned from a "stable" set of shards. */
|
|
4336
4407
|
stable?: boolean;
|
|
@@ -4410,7 +4481,14 @@ declare namespace CloudantV1 {
|
|
|
4410
4481
|
limit?: number;
|
|
4411
4482
|
/** Skip the first 'n' results, where 'n' is the value that is specified. */
|
|
4412
4483
|
skip?: number;
|
|
4413
|
-
/**
|
|
4484
|
+
/** The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The
|
|
4485
|
+
* first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next
|
|
4486
|
+
* level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
|
|
4487
|
+
*
|
|
4488
|
+
* For example in JSON: `[{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]`
|
|
4489
|
+
*
|
|
4490
|
+
* When sorting with multiple fields they must use the same sort direction, either all ascending or all descending.
|
|
4491
|
+
*/
|
|
4414
4492
|
sort?: JsonObject[];
|
|
4415
4493
|
/** Whether or not the view results should be returned from a "stable" set of shards. */
|
|
4416
4494
|
stable?: boolean;
|
|
@@ -6122,7 +6200,13 @@ declare namespace CloudantV1 {
|
|
|
6122
6200
|
* fields within a document for use with the `$text` operator.
|
|
6123
6201
|
*/
|
|
6124
6202
|
default_field?: IndexTextOperatorDefaultField;
|
|
6125
|
-
/** List of
|
|
6203
|
+
/** List of field objects to index. Nested fields are also allowed, e.g. `person.name`.
|
|
6204
|
+
*
|
|
6205
|
+
* For "json" type indexes each object is a mapping of field name to sort direction (asc or desc).
|
|
6206
|
+
*
|
|
6207
|
+
* For "text" type indexes each object has a `name` property of the field name and a `type` property of the field
|
|
6208
|
+
* type (string, number, or boolean).
|
|
6209
|
+
*/
|
|
6126
6210
|
fields?: IndexField[];
|
|
6127
6211
|
/** Whether to scan every document for arrays and store the length for each array found. Set the
|
|
6128
6212
|
* index_array_lengths field to false if:
|