@ibm-cloud/cloudant 0.0.13 → 0.0.14
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 +157 -130
- package/auth/couchdbSessionAuthenticator.d.ts +2 -2
- package/auth/couchdbSessionAuthenticator.js +2 -2
- package/auth/couchdbSessionAuthenticator.js.map +1 -1
- package/auth/index.d.ts +1 -1
- package/auth/index.js +2 -1
- package/auth/index.js.map +1 -1
- package/auth/sessionTokenManager.d.ts +2 -2
- package/auth/sessionTokenManager.js +14 -8
- package/auth/sessionTokenManager.js.map +1 -1
- package/cloudant/v1.d.ts +25 -167
- package/cloudant/v1.js +2 -169
- package/cloudant/v1.js.map +1 -1
- package/index.d.ts +3 -3
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/lib/cloudantBaseService.d.ts +10 -2
- package/lib/cloudantBaseService.js +16 -2
- package/lib/cloudantBaseService.js.map +1 -1
- package/lib/common.d.ts +1 -1
- package/lib/common.js +1 -1
- package/lib/common.js.map +1 -1
- package/lib/getAuthenticatorFromEnvCloudantExtension.d.ts +2 -2
- package/lib/getAuthenticatorFromEnvCloudantExtension.js +1 -1
- package/lib/getAuthenticatorFromEnvCloudantExtension.js.map +1 -1
- package/package.json +6 -8
package/cloudant/v1.d.ts
CHANGED
|
@@ -1687,30 +1687,6 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1687
1687
|
* * `default_analyzer` - the default text analyzer to use * `default_field` - whether to index the text in all
|
|
1688
1688
|
* document fields and what analyzer to use for that purpose.
|
|
1689
1689
|
* @param {string} [params.name] - name.
|
|
1690
|
-
* @param {JsonObject} [params.partialFilterSelector] - JSON object describing criteria used to select documents. The
|
|
1691
|
-
* selector specifies fields in the document, and provides an expression to evaluate with the field content or other
|
|
1692
|
-
* data.
|
|
1693
|
-
*
|
|
1694
|
-
* The selector object must:
|
|
1695
|
-
* * Be structured as valid JSON.
|
|
1696
|
-
* * Contain a valid query expression.
|
|
1697
|
-
*
|
|
1698
|
-
* Using a selector is significantly more efficient than using a JavaScript filter function, and is the recommended
|
|
1699
|
-
* option if filtering on document attributes only.
|
|
1700
|
-
*
|
|
1701
|
-
* Elementary selector syntax requires you to specify one or more fields, and the corresponding values required for
|
|
1702
|
-
* those fields. You can create more complex selector expressions by combining operators.
|
|
1703
|
-
*
|
|
1704
|
-
* Operators are identified by the use of a dollar sign `$` prefix in the name field.
|
|
1705
|
-
*
|
|
1706
|
-
* There are two core types of operators in the selector syntax:
|
|
1707
|
-
* * Combination operators: applied at the topmost level of selection. They are used to combine selectors. In addition
|
|
1708
|
-
* to the common boolean operators (`$and`, `$or`, `$not`, `$nor`) there are three combination operators: `$all`,
|
|
1709
|
-
* `$elemMatch`, and `$allMatch`. A combination operator takes a single argument. The argument is either another
|
|
1710
|
-
* selector, or an array of selectors.
|
|
1711
|
-
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
1712
|
-
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
1713
|
-
* argument.
|
|
1714
1690
|
* @param {boolean} [params.partitioned] - The default value is `true` for databases with `partitioned: true` and
|
|
1715
1691
|
* `false` otherwise. For databases with `partitioned: false` if this option is specified the value must be `false`.
|
|
1716
1692
|
* @param {string} [params.type] - Schema for the type of an index.
|
|
@@ -2462,56 +2438,6 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
2462
2438
|
* @returns {Promise<CloudantV1.Response<CloudantV1.DocumentResult>>}
|
|
2463
2439
|
*/
|
|
2464
2440
|
putLocalDocument(params: CloudantV1.PutLocalDocumentParams): Promise<CloudantV1.Response<CloudantV1.DocumentResult>>;
|
|
2465
|
-
/**
|
|
2466
|
-
* Query a list of all local documents in a database.
|
|
2467
|
-
*
|
|
2468
|
-
* Queries the list of all local document IDs. The results matching the request body parameters are returned in a JSON
|
|
2469
|
-
* object, including a list of matching local documents with basic contents, such as the ID. When no request body
|
|
2470
|
-
* parameters are specified, results for all local documents in the database are returned. Optionally, document
|
|
2471
|
-
* content or additional metadata can be included in the response.
|
|
2472
|
-
*
|
|
2473
|
-
* @param {Object} params - The parameters to send to the service.
|
|
2474
|
-
* @param {string} params.db - Path parameter to specify the database name.
|
|
2475
|
-
* @param {boolean} [params.attEncodingInfo] - Parameter to specify whether to include the encoding information in
|
|
2476
|
-
* attachment stubs if the particular attachment is compressed.
|
|
2477
|
-
* @param {boolean} [params.attachments] - Parameter to specify whether to include attachments bodies in a response.
|
|
2478
|
-
* @param {boolean} [params.conflicts] - Parameter to specify whether to include a list of conflicted revisions in the
|
|
2479
|
-
* `_conflicts` property of the returned document. Ignored if `include_docs` isn't `true`.
|
|
2480
|
-
* @param {boolean} [params.descending] - Parameter to specify whether to return the documents in descending by key
|
|
2481
|
-
* order.
|
|
2482
|
-
* @param {boolean} [params.includeDocs] - Parameter to specify whether to include the full content of the documents
|
|
2483
|
-
* in the response.
|
|
2484
|
-
* @param {boolean} [params.inclusiveEnd] - Parameter to specify whether the specified end key should be included in
|
|
2485
|
-
* the result.
|
|
2486
|
-
* @param {number} [params.limit] - Parameter to specify the number of returned documents to limit the result to.
|
|
2487
|
-
* @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
|
|
2488
|
-
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
2489
|
-
* indicating the sequence id of the database the view reflects.
|
|
2490
|
-
* @param {string} [params.endkey] - Schema for a document ID.
|
|
2491
|
-
* @param {string} [params.key] - Schema for a document ID.
|
|
2492
|
-
* @param {string[]} [params.keys] - Schema for a list of document IDs.
|
|
2493
|
-
* @param {string} [params.startkey] - Schema for a document ID.
|
|
2494
|
-
* @param {string} [params.accept] - The type of the response: application/json or application/octet-stream.
|
|
2495
|
-
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
2496
|
-
* @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>}
|
|
2497
|
-
*/
|
|
2498
|
-
postLocalDocs(params: CloudantV1.PostLocalDocsParams): Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>;
|
|
2499
|
-
/**
|
|
2500
|
-
* Multi-query the list of all local documents in a database.
|
|
2501
|
-
*
|
|
2502
|
-
* Runs multiple view queries of all local documents in this database. This operation enables you to request multiple
|
|
2503
|
-
* queries in a single request, in place of multiple `POST /{db}/_local_docs` requests.
|
|
2504
|
-
*
|
|
2505
|
-
* @param {Object} params - The parameters to send to the service.
|
|
2506
|
-
* @param {string} params.db - Path parameter to specify the database name.
|
|
2507
|
-
* @param {AllDocsQuery[]} params.queries - An array of query objects with fields for the parameters of each
|
|
2508
|
-
* individual view query to be executed. The field names and their meaning are the same as the query parameters of a
|
|
2509
|
-
* regular `/_all_docs` request.
|
|
2510
|
-
* @param {string} [params.accept] - The type of the response: application/json or application/octet-stream.
|
|
2511
|
-
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
2512
|
-
* @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsQueriesResult>>}
|
|
2513
|
-
*/
|
|
2514
|
-
postLocalDocsQueries(params: CloudantV1.PostLocalDocsQueriesParams): Promise<CloudantV1.Response<CloudantV1.AllDocsQueriesResult>>;
|
|
2515
2441
|
/*************************
|
|
2516
2442
|
* databaseDetails
|
|
2517
2443
|
************************/
|
|
@@ -4625,31 +4551,6 @@ declare namespace CloudantV1 {
|
|
|
4625
4551
|
def?: IndexDefinition;
|
|
4626
4552
|
/** name. */
|
|
4627
4553
|
name?: string;
|
|
4628
|
-
/** JSON object describing criteria used to select documents. The selector specifies fields in the document, and
|
|
4629
|
-
* provides an expression to evaluate with the field content or other data.
|
|
4630
|
-
*
|
|
4631
|
-
* The selector object must:
|
|
4632
|
-
* * Be structured as valid JSON.
|
|
4633
|
-
* * Contain a valid query expression.
|
|
4634
|
-
*
|
|
4635
|
-
* Using a selector is significantly more efficient than using a JavaScript filter function, and is the recommended
|
|
4636
|
-
* option if filtering on document attributes only.
|
|
4637
|
-
*
|
|
4638
|
-
* Elementary selector syntax requires you to specify one or more fields, and the corresponding values required for
|
|
4639
|
-
* those fields. You can create more complex selector expressions by combining operators.
|
|
4640
|
-
*
|
|
4641
|
-
* Operators are identified by the use of a dollar sign `$` prefix in the name field.
|
|
4642
|
-
*
|
|
4643
|
-
* There are two core types of operators in the selector syntax:
|
|
4644
|
-
* * Combination operators: applied at the topmost level of selection. They are used to combine selectors. In
|
|
4645
|
-
* addition to the common boolean operators (`$and`, `$or`, `$not`, `$nor`) there are three combination operators:
|
|
4646
|
-
* `$all`, `$elemMatch`, and `$allMatch`. A combination operator takes a single argument. The argument is either
|
|
4647
|
-
* another selector, or an array of selectors.
|
|
4648
|
-
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
4649
|
-
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
|
|
4650
|
-
* supplied argument.
|
|
4651
|
-
*/
|
|
4652
|
-
partialFilterSelector?: JsonObject;
|
|
4653
4554
|
/** The default value is `true` for databases with `partitioned: true` and `false` otherwise. For databases with
|
|
4654
4555
|
* `partitioned: false` if this option is specified the value must be `false`.
|
|
4655
4556
|
*/
|
|
@@ -5555,74 +5456,6 @@ declare namespace CloudantV1 {
|
|
|
5555
5456
|
OK = "ok"
|
|
5556
5457
|
}
|
|
5557
5458
|
}
|
|
5558
|
-
/** Parameters for the `postLocalDocs` operation. */
|
|
5559
|
-
interface PostLocalDocsParams {
|
|
5560
|
-
/** Path parameter to specify the database name. */
|
|
5561
|
-
db: string;
|
|
5562
|
-
/** Parameter to specify whether to include the encoding information in attachment stubs if the particular
|
|
5563
|
-
* attachment is compressed.
|
|
5564
|
-
*/
|
|
5565
|
-
attEncodingInfo?: boolean;
|
|
5566
|
-
/** Parameter to specify whether to include attachments bodies in a response. */
|
|
5567
|
-
attachments?: boolean;
|
|
5568
|
-
/** Parameter to specify whether to include a list of conflicted revisions in the `_conflicts` property of the
|
|
5569
|
-
* returned document. Ignored if `include_docs` isn't `true`.
|
|
5570
|
-
*/
|
|
5571
|
-
conflicts?: boolean;
|
|
5572
|
-
/** Parameter to specify whether to return the documents in descending by key order. */
|
|
5573
|
-
descending?: boolean;
|
|
5574
|
-
/** Parameter to specify whether to include the full content of the documents in the response. */
|
|
5575
|
-
includeDocs?: boolean;
|
|
5576
|
-
/** Parameter to specify whether the specified end key should be included in the result. */
|
|
5577
|
-
inclusiveEnd?: boolean;
|
|
5578
|
-
/** Parameter to specify the number of returned documents to limit the result to. */
|
|
5579
|
-
limit?: number;
|
|
5580
|
-
/** Parameter to specify the number of records before starting to return the results. */
|
|
5581
|
-
skip?: number;
|
|
5582
|
-
/** Parameter to specify whether to include in the response an update_seq value indicating the sequence id of
|
|
5583
|
-
* the database the view reflects.
|
|
5584
|
-
*/
|
|
5585
|
-
updateSeq?: boolean;
|
|
5586
|
-
/** Schema for a document ID. */
|
|
5587
|
-
endkey?: string;
|
|
5588
|
-
/** Schema for a document ID. */
|
|
5589
|
-
key?: string;
|
|
5590
|
-
/** Schema for a list of document IDs. */
|
|
5591
|
-
keys?: string[];
|
|
5592
|
-
/** Schema for a document ID. */
|
|
5593
|
-
startkey?: string;
|
|
5594
|
-
/** The type of the response: application/json or application/octet-stream. */
|
|
5595
|
-
accept?: PostLocalDocsConstants.Accept | string;
|
|
5596
|
-
headers?: OutgoingHttpHeaders;
|
|
5597
|
-
}
|
|
5598
|
-
/** Constants for the `postLocalDocs` operation. */
|
|
5599
|
-
namespace PostLocalDocsConstants {
|
|
5600
|
-
/** The type of the response: application/json or application/octet-stream. */
|
|
5601
|
-
enum Accept {
|
|
5602
|
-
APPLICATION_JSON = "application/json",
|
|
5603
|
-
APPLICATION_OCTET_STREAM = "application/octet-stream"
|
|
5604
|
-
}
|
|
5605
|
-
}
|
|
5606
|
-
/** Parameters for the `postLocalDocsQueries` operation. */
|
|
5607
|
-
interface PostLocalDocsQueriesParams {
|
|
5608
|
-
/** Path parameter to specify the database name. */
|
|
5609
|
-
db: string;
|
|
5610
|
-
/** An array of query objects with fields for the parameters of each individual view query to be executed. The
|
|
5611
|
-
* field names and their meaning are the same as the query parameters of a regular `/_all_docs` request.
|
|
5612
|
-
*/
|
|
5613
|
-
queries: AllDocsQuery[];
|
|
5614
|
-
/** The type of the response: application/json or application/octet-stream. */
|
|
5615
|
-
accept?: PostLocalDocsQueriesConstants.Accept | string;
|
|
5616
|
-
headers?: OutgoingHttpHeaders;
|
|
5617
|
-
}
|
|
5618
|
-
/** Constants for the `postLocalDocsQueries` operation. */
|
|
5619
|
-
namespace PostLocalDocsQueriesConstants {
|
|
5620
|
-
/** The type of the response: application/json or application/octet-stream. */
|
|
5621
|
-
enum Accept {
|
|
5622
|
-
APPLICATION_JSON = "application/json",
|
|
5623
|
-
APPLICATION_OCTET_STREAM = "application/octet-stream"
|
|
5624
|
-
}
|
|
5625
|
-
}
|
|
5626
5459
|
/** Parameters for the `postMissingRevs` operation. */
|
|
5627
5460
|
interface PostMissingRevsParams {
|
|
5628
5461
|
/** Path parameter to specify the database name. */
|
|
@@ -6347,6 +6180,31 @@ declare namespace CloudantV1 {
|
|
|
6347
6180
|
* of the extra processing that is needed to determine and store the arrays lengths.
|
|
6348
6181
|
*/
|
|
6349
6182
|
index_array_lengths?: boolean;
|
|
6183
|
+
/** JSON object describing criteria used to select documents. The selector specifies fields in the document, and
|
|
6184
|
+
* provides an expression to evaluate with the field content or other data.
|
|
6185
|
+
*
|
|
6186
|
+
* The selector object must:
|
|
6187
|
+
* * Be structured as valid JSON.
|
|
6188
|
+
* * Contain a valid query expression.
|
|
6189
|
+
*
|
|
6190
|
+
* Using a selector is significantly more efficient than using a JavaScript filter function, and is the recommended
|
|
6191
|
+
* option if filtering on document attributes only.
|
|
6192
|
+
*
|
|
6193
|
+
* Elementary selector syntax requires you to specify one or more fields, and the corresponding values required for
|
|
6194
|
+
* those fields. You can create more complex selector expressions by combining operators.
|
|
6195
|
+
*
|
|
6196
|
+
* Operators are identified by the use of a dollar sign `$` prefix in the name field.
|
|
6197
|
+
*
|
|
6198
|
+
* There are two core types of operators in the selector syntax:
|
|
6199
|
+
* * Combination operators: applied at the topmost level of selection. They are used to combine selectors. In
|
|
6200
|
+
* addition to the common boolean operators (`$and`, `$or`, `$not`, `$nor`) there are three combination operators:
|
|
6201
|
+
* `$all`, `$elemMatch`, and `$allMatch`. A combination operator takes a single argument. The argument is either
|
|
6202
|
+
* another selector, or an array of selectors.
|
|
6203
|
+
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
6204
|
+
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the
|
|
6205
|
+
* supplied argument.
|
|
6206
|
+
*/
|
|
6207
|
+
partial_filter_selector?: JsonObject;
|
|
6350
6208
|
}
|
|
6351
6209
|
/** Schema for indexed fields for use with declarative JSON query. */
|
|
6352
6210
|
interface IndexField {
|
package/cloudant/v1.js
CHANGED
|
@@ -18,7 +18,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
18
18
|
var extendStatics = function (d, b) {
|
|
19
19
|
extendStatics = Object.setPrototypeOf ||
|
|
20
20
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
21
|
-
function (d, b) { for (var p in b) if (
|
|
21
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
22
22
|
return extendStatics(d, b);
|
|
23
23
|
};
|
|
24
24
|
return function (d, b) {
|
|
@@ -28,7 +28,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
28
28
|
};
|
|
29
29
|
})();
|
|
30
30
|
/**
|
|
31
|
-
* IBM OpenAPI SDK Code Generator Version: 3.
|
|
31
|
+
* IBM OpenAPI SDK Code Generator Version: 3.28.0-55613c9e-20210220-164656
|
|
32
32
|
*/
|
|
33
33
|
var extend = require("extend");
|
|
34
34
|
var ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
|
|
@@ -3670,30 +3670,6 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3670
3670
|
* * `default_analyzer` - the default text analyzer to use * `default_field` - whether to index the text in all
|
|
3671
3671
|
* document fields and what analyzer to use for that purpose.
|
|
3672
3672
|
* @param {string} [params.name] - name.
|
|
3673
|
-
* @param {JsonObject} [params.partialFilterSelector] - JSON object describing criteria used to select documents. The
|
|
3674
|
-
* selector specifies fields in the document, and provides an expression to evaluate with the field content or other
|
|
3675
|
-
* data.
|
|
3676
|
-
*
|
|
3677
|
-
* The selector object must:
|
|
3678
|
-
* * Be structured as valid JSON.
|
|
3679
|
-
* * Contain a valid query expression.
|
|
3680
|
-
*
|
|
3681
|
-
* Using a selector is significantly more efficient than using a JavaScript filter function, and is the recommended
|
|
3682
|
-
* option if filtering on document attributes only.
|
|
3683
|
-
*
|
|
3684
|
-
* Elementary selector syntax requires you to specify one or more fields, and the corresponding values required for
|
|
3685
|
-
* those fields. You can create more complex selector expressions by combining operators.
|
|
3686
|
-
*
|
|
3687
|
-
* Operators are identified by the use of a dollar sign `$` prefix in the name field.
|
|
3688
|
-
*
|
|
3689
|
-
* There are two core types of operators in the selector syntax:
|
|
3690
|
-
* * Combination operators: applied at the topmost level of selection. They are used to combine selectors. In addition
|
|
3691
|
-
* to the common boolean operators (`$and`, `$or`, `$not`, `$nor`) there are three combination operators: `$all`,
|
|
3692
|
-
* `$elemMatch`, and `$allMatch`. A combination operator takes a single argument. The argument is either another
|
|
3693
|
-
* selector, or an array of selectors.
|
|
3694
|
-
* * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For
|
|
3695
|
-
* instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied
|
|
3696
|
-
* argument.
|
|
3697
3673
|
* @param {boolean} [params.partitioned] - The default value is `true` for databases with `partitioned: true` and
|
|
3698
3674
|
* `false` otherwise. For databases with `partitioned: false` if this option is specified the value must be `false`.
|
|
3699
3675
|
* @param {string} [params.type] - Schema for the type of an index.
|
|
@@ -3712,7 +3688,6 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
3712
3688
|
'ddoc': _params.ddoc,
|
|
3713
3689
|
'def': _params.def,
|
|
3714
3690
|
'name': _params.name,
|
|
3715
|
-
'partial_filter_selector': _params.partialFilterSelector,
|
|
3716
3691
|
'partitioned': _params.partitioned,
|
|
3717
3692
|
'type': _params.type
|
|
3718
3693
|
};
|
|
@@ -5525,128 +5500,6 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
5525
5500
|
return this.createRequest(parameters);
|
|
5526
5501
|
};
|
|
5527
5502
|
;
|
|
5528
|
-
/**
|
|
5529
|
-
* Query a list of all local documents in a database.
|
|
5530
|
-
*
|
|
5531
|
-
* Queries the list of all local document IDs. The results matching the request body parameters are returned in a JSON
|
|
5532
|
-
* object, including a list of matching local documents with basic contents, such as the ID. When no request body
|
|
5533
|
-
* parameters are specified, results for all local documents in the database are returned. Optionally, document
|
|
5534
|
-
* content or additional metadata can be included in the response.
|
|
5535
|
-
*
|
|
5536
|
-
* @param {Object} params - The parameters to send to the service.
|
|
5537
|
-
* @param {string} params.db - Path parameter to specify the database name.
|
|
5538
|
-
* @param {boolean} [params.attEncodingInfo] - Parameter to specify whether to include the encoding information in
|
|
5539
|
-
* attachment stubs if the particular attachment is compressed.
|
|
5540
|
-
* @param {boolean} [params.attachments] - Parameter to specify whether to include attachments bodies in a response.
|
|
5541
|
-
* @param {boolean} [params.conflicts] - Parameter to specify whether to include a list of conflicted revisions in the
|
|
5542
|
-
* `_conflicts` property of the returned document. Ignored if `include_docs` isn't `true`.
|
|
5543
|
-
* @param {boolean} [params.descending] - Parameter to specify whether to return the documents in descending by key
|
|
5544
|
-
* order.
|
|
5545
|
-
* @param {boolean} [params.includeDocs] - Parameter to specify whether to include the full content of the documents
|
|
5546
|
-
* in the response.
|
|
5547
|
-
* @param {boolean} [params.inclusiveEnd] - Parameter to specify whether the specified end key should be included in
|
|
5548
|
-
* the result.
|
|
5549
|
-
* @param {number} [params.limit] - Parameter to specify the number of returned documents to limit the result to.
|
|
5550
|
-
* @param {number} [params.skip] - Parameter to specify the number of records before starting to return the results.
|
|
5551
|
-
* @param {boolean} [params.updateSeq] - Parameter to specify whether to include in the response an update_seq value
|
|
5552
|
-
* indicating the sequence id of the database the view reflects.
|
|
5553
|
-
* @param {string} [params.endkey] - Schema for a document ID.
|
|
5554
|
-
* @param {string} [params.key] - Schema for a document ID.
|
|
5555
|
-
* @param {string[]} [params.keys] - Schema for a list of document IDs.
|
|
5556
|
-
* @param {string} [params.startkey] - Schema for a document ID.
|
|
5557
|
-
* @param {string} [params.accept] - The type of the response: application/json or application/octet-stream.
|
|
5558
|
-
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
5559
|
-
* @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsResult>>}
|
|
5560
|
-
*/
|
|
5561
|
-
CloudantV1.prototype.postLocalDocs = function (params) {
|
|
5562
|
-
var _params = Object.assign({}, params);
|
|
5563
|
-
var requiredParams = ['db'];
|
|
5564
|
-
var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
|
|
5565
|
-
if (missingParams) {
|
|
5566
|
-
return Promise.reject(missingParams);
|
|
5567
|
-
}
|
|
5568
|
-
var body = {
|
|
5569
|
-
'att_encoding_info': _params.attEncodingInfo,
|
|
5570
|
-
'attachments': _params.attachments,
|
|
5571
|
-
'conflicts': _params.conflicts,
|
|
5572
|
-
'descending': _params.descending,
|
|
5573
|
-
'include_docs': _params.includeDocs,
|
|
5574
|
-
'inclusive_end': _params.inclusiveEnd,
|
|
5575
|
-
'limit': _params.limit,
|
|
5576
|
-
'skip': _params.skip,
|
|
5577
|
-
'update_seq': _params.updateSeq,
|
|
5578
|
-
'endkey': _params.endkey,
|
|
5579
|
-
'key': _params.key,
|
|
5580
|
-
'keys': _params.keys,
|
|
5581
|
-
'startkey': _params.startkey
|
|
5582
|
-
};
|
|
5583
|
-
var path = {
|
|
5584
|
-
'db': _params.db
|
|
5585
|
-
};
|
|
5586
|
-
var sdkHeaders = common_1.getSdkHeaders(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'postLocalDocs');
|
|
5587
|
-
var parameters = {
|
|
5588
|
-
options: {
|
|
5589
|
-
url: '/{db}/_local_docs',
|
|
5590
|
-
method: 'POST',
|
|
5591
|
-
body: body,
|
|
5592
|
-
path: path,
|
|
5593
|
-
},
|
|
5594
|
-
defaultOptions: extend(true, {}, this.baseOptions, {
|
|
5595
|
-
headers: extend(true, sdkHeaders, {
|
|
5596
|
-
'Content-Type': 'application/json',
|
|
5597
|
-
'Accept': _params.accept
|
|
5598
|
-
}, _params.headers),
|
|
5599
|
-
}),
|
|
5600
|
-
};
|
|
5601
|
-
return this.createRequest(parameters);
|
|
5602
|
-
};
|
|
5603
|
-
;
|
|
5604
|
-
/**
|
|
5605
|
-
* Multi-query the list of all local documents in a database.
|
|
5606
|
-
*
|
|
5607
|
-
* Runs multiple view queries of all local documents in this database. This operation enables you to request multiple
|
|
5608
|
-
* queries in a single request, in place of multiple `POST /{db}/_local_docs` requests.
|
|
5609
|
-
*
|
|
5610
|
-
* @param {Object} params - The parameters to send to the service.
|
|
5611
|
-
* @param {string} params.db - Path parameter to specify the database name.
|
|
5612
|
-
* @param {AllDocsQuery[]} params.queries - An array of query objects with fields for the parameters of each
|
|
5613
|
-
* individual view query to be executed. The field names and their meaning are the same as the query parameters of a
|
|
5614
|
-
* regular `/_all_docs` request.
|
|
5615
|
-
* @param {string} [params.accept] - The type of the response: application/json or application/octet-stream.
|
|
5616
|
-
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
5617
|
-
* @returns {Promise<CloudantV1.Response<CloudantV1.AllDocsQueriesResult>>}
|
|
5618
|
-
*/
|
|
5619
|
-
CloudantV1.prototype.postLocalDocsQueries = function (params) {
|
|
5620
|
-
var _params = Object.assign({}, params);
|
|
5621
|
-
var requiredParams = ['db', 'queries'];
|
|
5622
|
-
var missingParams = ibm_cloud_sdk_core_1.getMissingParams(_params, requiredParams);
|
|
5623
|
-
if (missingParams) {
|
|
5624
|
-
return Promise.reject(missingParams);
|
|
5625
|
-
}
|
|
5626
|
-
var body = {
|
|
5627
|
-
'queries': _params.queries
|
|
5628
|
-
};
|
|
5629
|
-
var path = {
|
|
5630
|
-
'db': _params.db
|
|
5631
|
-
};
|
|
5632
|
-
var sdkHeaders = common_1.getSdkHeaders(CloudantV1.DEFAULT_SERVICE_NAME, 'v1', 'postLocalDocsQueries');
|
|
5633
|
-
var parameters = {
|
|
5634
|
-
options: {
|
|
5635
|
-
url: '/{db}/_local_docs/queries',
|
|
5636
|
-
method: 'POST',
|
|
5637
|
-
body: body,
|
|
5638
|
-
path: path,
|
|
5639
|
-
},
|
|
5640
|
-
defaultOptions: extend(true, {}, this.baseOptions, {
|
|
5641
|
-
headers: extend(true, sdkHeaders, {
|
|
5642
|
-
'Content-Type': 'application/json',
|
|
5643
|
-
'Accept': _params.accept
|
|
5644
|
-
}, _params.headers),
|
|
5645
|
-
}),
|
|
5646
|
-
};
|
|
5647
|
-
return this.createRequest(parameters);
|
|
5648
|
-
};
|
|
5649
|
-
;
|
|
5650
5503
|
/*************************
|
|
5651
5504
|
* databaseDetails
|
|
5652
5505
|
************************/
|
|
@@ -6515,26 +6368,6 @@ var CloudantV1 = /** @class */ (function (_super) {
|
|
|
6515
6368
|
Batch["OK"] = "ok";
|
|
6516
6369
|
})(Batch = PutLocalDocumentConstants.Batch || (PutLocalDocumentConstants.Batch = {}));
|
|
6517
6370
|
})(PutLocalDocumentConstants = CloudantV1.PutLocalDocumentConstants || (CloudantV1.PutLocalDocumentConstants = {}));
|
|
6518
|
-
/** Constants for the `postLocalDocs` operation. */
|
|
6519
|
-
var PostLocalDocsConstants;
|
|
6520
|
-
(function (PostLocalDocsConstants) {
|
|
6521
|
-
/** The type of the response: application/json or application/octet-stream. */
|
|
6522
|
-
var Accept;
|
|
6523
|
-
(function (Accept) {
|
|
6524
|
-
Accept["APPLICATION_JSON"] = "application/json";
|
|
6525
|
-
Accept["APPLICATION_OCTET_STREAM"] = "application/octet-stream";
|
|
6526
|
-
})(Accept = PostLocalDocsConstants.Accept || (PostLocalDocsConstants.Accept = {}));
|
|
6527
|
-
})(PostLocalDocsConstants = CloudantV1.PostLocalDocsConstants || (CloudantV1.PostLocalDocsConstants = {}));
|
|
6528
|
-
/** Constants for the `postLocalDocsQueries` operation. */
|
|
6529
|
-
var PostLocalDocsQueriesConstants;
|
|
6530
|
-
(function (PostLocalDocsQueriesConstants) {
|
|
6531
|
-
/** The type of the response: application/json or application/octet-stream. */
|
|
6532
|
-
var Accept;
|
|
6533
|
-
(function (Accept) {
|
|
6534
|
-
Accept["APPLICATION_JSON"] = "application/json";
|
|
6535
|
-
Accept["APPLICATION_OCTET_STREAM"] = "application/octet-stream";
|
|
6536
|
-
})(Accept = PostLocalDocsQueriesConstants.Accept || (PostLocalDocsQueriesConstants.Accept = {}));
|
|
6537
|
-
})(PostLocalDocsQueriesConstants = CloudantV1.PostLocalDocsQueriesConstants || (CloudantV1.PostLocalDocsQueriesConstants = {}));
|
|
6538
6371
|
/** Constants for the `postActivityTrackerEventsConfiguration` operation. */
|
|
6539
6372
|
var PostActivityTrackerEventsConfigurationConstants;
|
|
6540
6373
|
(function (PostActivityTrackerEventsConfigurationConstants) {
|