@ibm-cloud/cloudant 0.10.3 → 0.11.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 +8 -8
- package/cloudant/v1.d.ts +119 -62
- package/cloudant/v1.js +94 -44
- package/cloudant/v1.js.map +1 -1
- package/lib/cloudantBaseService.d.ts +2 -1
- package/lib/cloudantBaseService.js +12 -3
- package/lib/cloudantBaseService.js.map +1 -1
- package/lib/errorResponseInterceptor.d.ts +28 -0
- package/lib/errorResponseInterceptor.js +105 -0
- package/lib/errorResponseInterceptor.js.map +1 -0
- package/package.json +11 -10
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.
|
|
5
|
+
# IBM Cloudant Node.js SDK Version 0.11.0
|
|
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).
|
|
@@ -108,7 +108,7 @@ project:
|
|
|
108
108
|
service instance or a
|
|
109
109
|
[CouchDB](https://docs.couchdb.org/en/latest/install/index.html)
|
|
110
110
|
server.
|
|
111
|
-
- Node.js 18 or
|
|
111
|
+
- Node.js 18, 20, or 22.
|
|
112
112
|
|
|
113
113
|
## Installation
|
|
114
114
|
|
|
@@ -903,7 +903,7 @@ You have deleted the document.
|
|
|
903
903
|
|
|
904
904
|
#### Further code examples
|
|
905
905
|
|
|
906
|
-
For a complete list of code examples, see the [examples directory](https://github.com/IBM/cloudant-node-sdk/tree/v0.
|
|
906
|
+
For a complete list of code examples, see the [examples directory](https://github.com/IBM/cloudant-node-sdk/tree/v0.11.0/examples#examples-for-node).
|
|
907
907
|
|
|
908
908
|
### Error handling
|
|
909
909
|
|
|
@@ -1062,7 +1062,7 @@ The changes follower requires the client to have HTTP timeouts of at least 1 min
|
|
|
1062
1062
|
instantiation if it is insufficient. The default client configuration has sufficiently long timeouts.
|
|
1063
1063
|
|
|
1064
1064
|
For use-cases where these configuration limitations are deemed too restrictive then it is recommended to
|
|
1065
|
-
write code to use the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.
|
|
1065
|
+
write code to use the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.11.0/examples#postchanges) instead of the follower.
|
|
1066
1066
|
|
|
1067
1067
|
#### Error suppression
|
|
1068
1068
|
|
|
@@ -1097,7 +1097,7 @@ The follower is not optimized for some use cases and it is not recommended to us
|
|
|
1097
1097
|
* The volume of changes is very high (if the rate of changes in the database exceeds the follower's rate of pulling them it will never catch-up).
|
|
1098
1098
|
|
|
1099
1099
|
In these cases use-case specific control over the number of change requests made and the content size of the responses
|
|
1100
|
-
may be achieved by using the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.
|
|
1100
|
+
may be achieved by using the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.11.0/examples#postchanges).
|
|
1101
1101
|
|
|
1102
1102
|
#### Checkpointing
|
|
1103
1103
|
|
|
@@ -1590,7 +1590,7 @@ If you encounter an issue with the project, you are welcome to submit a
|
|
|
1590
1590
|
|
|
1591
1591
|
Before you submit a bug report, search for
|
|
1592
1592
|
[similar issues](https://github.com/IBM/cloudant-node-sdk/issues?q=is%3Aissue) and review the
|
|
1593
|
-
[KNOWN_ISSUES file](https://github.com/IBM/cloudant-node-sdk/tree/v0.
|
|
1593
|
+
[KNOWN_ISSUES file](https://github.com/IBM/cloudant-node-sdk/tree/v0.11.0/KNOWN_ISSUES.md) to verify that your issue hasn't been reported yet.
|
|
1594
1594
|
|
|
1595
1595
|
Please consult the [security policy](https://github.com/IBM/cloudant-node-sdk/security/policy) before opening security related issues.
|
|
1596
1596
|
|
|
@@ -1620,8 +1620,8 @@ Find more open source projects on the [IBM GitHub](http://ibm.github.io/) page.
|
|
|
1620
1620
|
|
|
1621
1621
|
## Contributing
|
|
1622
1622
|
|
|
1623
|
-
For more information, see [CONTRIBUTING](https://github.com/IBM/cloudant-node-sdk/tree/v0.
|
|
1623
|
+
For more information, see [CONTRIBUTING](https://github.com/IBM/cloudant-node-sdk/tree/v0.11.0/CONTRIBUTING.md).
|
|
1624
1624
|
|
|
1625
1625
|
## License
|
|
1626
1626
|
|
|
1627
|
-
This SDK is released under the Apache 2.0 license. To read the full text of the license, see [LICENSE](https://github.com/IBM/cloudant-node-sdk/tree/v0.
|
|
1627
|
+
This SDK is released under the Apache 2.0 license. To read the full text of the license, see [LICENSE](https://github.com/IBM/cloudant-node-sdk/tree/v0.11.0/LICENSE).
|
package/cloudant/v1.d.ts
CHANGED
|
@@ -1560,6 +1560,7 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1560
1560
|
* combination and conditional operators.
|
|
1561
1561
|
*
|
|
1562
1562
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
1563
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
1563
1564
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
1564
1565
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
1565
1566
|
* existing conflicts in the document.
|
|
@@ -1591,8 +1592,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1591
1592
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
1592
1593
|
* indexes that might get added later.
|
|
1593
1594
|
*
|
|
1594
|
-
* If the specified index
|
|
1595
|
-
* full scan of all documents
|
|
1595
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
|
|
1596
|
+
* another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
|
|
1597
|
+
* server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
1596
1598
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1597
1599
|
* @returns {Promise<CloudantV1.Response<CloudantV1.ExplainResult>>}
|
|
1598
1600
|
*/
|
|
@@ -1603,9 +1605,13 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1603
1605
|
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
|
|
1604
1606
|
* all fields in selector by using the `_index` endpoint.
|
|
1605
1607
|
*
|
|
1606
|
-
* Queries without an appropriate backing index
|
|
1607
|
-
* recommended because it has a
|
|
1608
|
-
* In this case the response body
|
|
1608
|
+
* Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
|
|
1609
|
+
* isn't recommended because it has a significant performance impact causing a full scan of the partition with each
|
|
1610
|
+
* request. In this case the response body includes a warning field recommending the creation of an index.
|
|
1611
|
+
*
|
|
1612
|
+
* To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
|
|
1613
|
+
* status code if no suitable index exists. If you want to use only a specific index for your query set
|
|
1614
|
+
* `allow_fallback` to `false` and set the `use_index` option.
|
|
1609
1615
|
*
|
|
1610
1616
|
* Before using read the
|
|
1611
1617
|
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
|
|
@@ -1647,6 +1653,7 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1647
1653
|
* combination and conditional operators.
|
|
1648
1654
|
*
|
|
1649
1655
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
1656
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
1650
1657
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
1651
1658
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
1652
1659
|
* existing conflicts in the document.
|
|
@@ -1678,8 +1685,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1678
1685
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
1679
1686
|
* indexes that might get added later.
|
|
1680
1687
|
*
|
|
1681
|
-
* If the specified index
|
|
1682
|
-
* full scan of all documents
|
|
1688
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
|
|
1689
|
+
* another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
|
|
1690
|
+
* server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
1683
1691
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1684
1692
|
* @returns {Promise<CloudantV1.Response<CloudantV1.FindResult>>}
|
|
1685
1693
|
*/
|
|
@@ -1690,9 +1698,13 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1690
1698
|
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
|
|
1691
1699
|
* all fields in selector by using the `_index` endpoint.
|
|
1692
1700
|
*
|
|
1693
|
-
* Queries without an appropriate backing index
|
|
1694
|
-
* recommended because it has a
|
|
1695
|
-
* In this case the response body
|
|
1701
|
+
* Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
|
|
1702
|
+
* isn't recommended because it has a significant performance impact causing a full scan of the partition with each
|
|
1703
|
+
* request. In this case the response body includes a warning field recommending the creation of an index.
|
|
1704
|
+
*
|
|
1705
|
+
* To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
|
|
1706
|
+
* status code if no suitable index exists. If you want to use only a specific index for your query set
|
|
1707
|
+
* `allow_fallback` to `false` and set the `use_index` option.
|
|
1696
1708
|
*
|
|
1697
1709
|
* Before using read the
|
|
1698
1710
|
* [FAQs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-database-partitioning#partition-querying) to understand
|
|
@@ -1734,6 +1746,7 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1734
1746
|
* combination and conditional operators.
|
|
1735
1747
|
*
|
|
1736
1748
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
1749
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
1737
1750
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
1738
1751
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
1739
1752
|
* existing conflicts in the document.
|
|
@@ -1765,8 +1778,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1765
1778
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
1766
1779
|
* indexes that might get added later.
|
|
1767
1780
|
*
|
|
1768
|
-
* If the specified index
|
|
1769
|
-
* full scan of all documents
|
|
1781
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
|
|
1782
|
+
* another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
|
|
1783
|
+
* server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
1770
1784
|
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
|
|
1771
1785
|
* @returns {Promise<CloudantV1.Response<NodeJS.ReadableStream>>}
|
|
1772
1786
|
*/
|
|
@@ -1814,6 +1828,7 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1814
1828
|
* combination and conditional operators.
|
|
1815
1829
|
*
|
|
1816
1830
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
1831
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
1817
1832
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
1818
1833
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
1819
1834
|
* existing conflicts in the document.
|
|
@@ -1845,8 +1860,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1845
1860
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
1846
1861
|
* indexes that might get added later.
|
|
1847
1862
|
*
|
|
1848
|
-
* If the specified index
|
|
1849
|
-
* full scan of all documents
|
|
1863
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
|
|
1864
|
+
* another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
|
|
1865
|
+
* server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
1850
1866
|
* @param {number} [params.r] - The read quorum that is needed for the result. The value defaults to 1, in which case
|
|
1851
1867
|
* the document that was found in the index is returned. If set to a higher value, each document is read from at least
|
|
1852
1868
|
* that many replicas before it is returned in the results. The request will take more time than using only the
|
|
@@ -1861,9 +1877,13 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1861
1877
|
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
|
|
1862
1878
|
* all fields in selector by using the `_index` endpoint.
|
|
1863
1879
|
*
|
|
1864
|
-
* Queries without an appropriate backing index
|
|
1865
|
-
* recommended because it has a significant performance impact causing a full scan of the database with each
|
|
1866
|
-
* In this case the response body
|
|
1880
|
+
* Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
|
|
1881
|
+
* isn't recommended because it has a significant performance impact causing a full scan of the database with each
|
|
1882
|
+
* request. In this case the response body includes a warning field recommending the creation of an index.
|
|
1883
|
+
*
|
|
1884
|
+
* To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
|
|
1885
|
+
* status code if no suitable index exists. If you want to use only a specific index for your query set
|
|
1886
|
+
* `allow_fallback` to `false` and set the `use_index` option.
|
|
1867
1887
|
*
|
|
1868
1888
|
* @param {Object} params - The parameters to send to the service.
|
|
1869
1889
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -1900,6 +1920,7 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1900
1920
|
* combination and conditional operators.
|
|
1901
1921
|
*
|
|
1902
1922
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
1923
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
1903
1924
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
1904
1925
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
1905
1926
|
* existing conflicts in the document.
|
|
@@ -1931,8 +1952,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1931
1952
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
1932
1953
|
* indexes that might get added later.
|
|
1933
1954
|
*
|
|
1934
|
-
* If the specified index
|
|
1935
|
-
* full scan of all documents
|
|
1955
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
|
|
1956
|
+
* another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
|
|
1957
|
+
* server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
1936
1958
|
* @param {number} [params.r] - The read quorum that is needed for the result. The value defaults to 1, in which case
|
|
1937
1959
|
* the document that was found in the index is returned. If set to a higher value, each document is read from at least
|
|
1938
1960
|
* that many replicas before it is returned in the results. The request will take more time than using only the
|
|
@@ -1947,9 +1969,13 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1947
1969
|
* Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
|
|
1948
1970
|
* all fields in selector by using the `_index` endpoint.
|
|
1949
1971
|
*
|
|
1950
|
-
* Queries without an appropriate backing index
|
|
1951
|
-
* recommended because it has a significant performance impact causing a full scan of the database with each
|
|
1952
|
-
* In this case the response body
|
|
1972
|
+
* Queries without an appropriate backing index by default fallback to using the built-in `_all_docs` index. This
|
|
1973
|
+
* isn't recommended because it has a significant performance impact causing a full scan of the database with each
|
|
1974
|
+
* request. In this case the response body includes a warning field recommending the creation of an index.
|
|
1975
|
+
*
|
|
1976
|
+
* To avoid the fallback behavior set the `allow_fallback` option to `false` and the server responds with a `400`
|
|
1977
|
+
* status code if no suitable index exists. If you want to use only a specific index for your query set
|
|
1978
|
+
* `allow_fallback` to `false` and set the `use_index` option.
|
|
1953
1979
|
*
|
|
1954
1980
|
* @param {Object} params - The parameters to send to the service.
|
|
1955
1981
|
* @param {string} params.db - Path parameter to specify the database name.
|
|
@@ -1986,6 +2012,7 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
1986
2012
|
* combination and conditional operators.
|
|
1987
2013
|
*
|
|
1988
2014
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
2015
|
+
* @param {boolean} [params.allowFallback] - Whether to allow fallback to other indexes. Default is true.
|
|
1989
2016
|
* @param {string} [params.bookmark] - Opaque bookmark token used when paginating results.
|
|
1990
2017
|
* @param {boolean} [params.conflicts] - A boolean value that indicates whether or not to include information about
|
|
1991
2018
|
* existing conflicts in the document.
|
|
@@ -2017,8 +2044,9 @@ declare class CloudantV1 extends CloudantBaseService {
|
|
|
2017
2044
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
2018
2045
|
* indexes that might get added later.
|
|
2019
2046
|
*
|
|
2020
|
-
* If the specified index
|
|
2021
|
-
* full scan of all documents
|
|
2047
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers using
|
|
2048
|
+
* another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and the
|
|
2049
|
+
* server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
2022
2050
|
* @param {number} [params.r] - The read quorum that is needed for the result. The value defaults to 1, in which case
|
|
2023
2051
|
* the document that was found in the index is returned. If set to a higher value, each document is read from at least
|
|
2024
2052
|
* that many replicas before it is returned in the results. The request will take more time than using only the
|
|
@@ -4490,6 +4518,8 @@ declare namespace CloudantV1 {
|
|
|
4490
4518
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
4491
4519
|
*/
|
|
4492
4520
|
selector: JsonObject;
|
|
4521
|
+
/** Whether to allow fallback to other indexes. Default is true. */
|
|
4522
|
+
allowFallback?: boolean;
|
|
4493
4523
|
/** Opaque bookmark token used when paginating results. */
|
|
4494
4524
|
bookmark?: string;
|
|
4495
4525
|
/** A boolean value that indicates whether or not to include information about existing conflicts in the
|
|
@@ -4531,8 +4561,9 @@ declare namespace CloudantV1 {
|
|
|
4531
4561
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
4532
4562
|
* indexes that might get added later.
|
|
4533
4563
|
*
|
|
4534
|
-
* If the specified index
|
|
4535
|
-
* a full scan of all documents
|
|
4564
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
|
|
4565
|
+
* using another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and
|
|
4566
|
+
* the server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
4536
4567
|
*/
|
|
4537
4568
|
useIndex?: string[];
|
|
4538
4569
|
headers?: OutgoingHttpHeaders;
|
|
@@ -4592,6 +4623,8 @@ declare namespace CloudantV1 {
|
|
|
4592
4623
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
4593
4624
|
*/
|
|
4594
4625
|
selector: JsonObject;
|
|
4626
|
+
/** Whether to allow fallback to other indexes. Default is true. */
|
|
4627
|
+
allowFallback?: boolean;
|
|
4595
4628
|
/** Opaque bookmark token used when paginating results. */
|
|
4596
4629
|
bookmark?: string;
|
|
4597
4630
|
/** A boolean value that indicates whether or not to include information about existing conflicts in the
|
|
@@ -4633,8 +4666,9 @@ declare namespace CloudantV1 {
|
|
|
4633
4666
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
4634
4667
|
* indexes that might get added later.
|
|
4635
4668
|
*
|
|
4636
|
-
* If the specified index
|
|
4637
|
-
* a full scan of all documents
|
|
4669
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
|
|
4670
|
+
* using another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and
|
|
4671
|
+
* the server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
4638
4672
|
*/
|
|
4639
4673
|
useIndex?: string[];
|
|
4640
4674
|
headers?: OutgoingHttpHeaders;
|
|
@@ -4694,6 +4728,8 @@ declare namespace CloudantV1 {
|
|
|
4694
4728
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
4695
4729
|
*/
|
|
4696
4730
|
selector: JsonObject;
|
|
4731
|
+
/** Whether to allow fallback to other indexes. Default is true. */
|
|
4732
|
+
allowFallback?: boolean;
|
|
4697
4733
|
/** Opaque bookmark token used when paginating results. */
|
|
4698
4734
|
bookmark?: string;
|
|
4699
4735
|
/** A boolean value that indicates whether or not to include information about existing conflicts in the
|
|
@@ -4735,8 +4771,9 @@ declare namespace CloudantV1 {
|
|
|
4735
4771
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
4736
4772
|
* indexes that might get added later.
|
|
4737
4773
|
*
|
|
4738
|
-
* If the specified index
|
|
4739
|
-
* a full scan of all documents
|
|
4774
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
|
|
4775
|
+
* using another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and
|
|
4776
|
+
* the server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
4740
4777
|
*/
|
|
4741
4778
|
useIndex?: string[];
|
|
4742
4779
|
headers?: OutgoingHttpHeaders;
|
|
@@ -4794,6 +4831,8 @@ declare namespace CloudantV1 {
|
|
|
4794
4831
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
4795
4832
|
*/
|
|
4796
4833
|
selector: JsonObject;
|
|
4834
|
+
/** Whether to allow fallback to other indexes. Default is true. */
|
|
4835
|
+
allowFallback?: boolean;
|
|
4797
4836
|
/** Opaque bookmark token used when paginating results. */
|
|
4798
4837
|
bookmark?: string;
|
|
4799
4838
|
/** A boolean value that indicates whether or not to include information about existing conflicts in the
|
|
@@ -4835,8 +4874,9 @@ declare namespace CloudantV1 {
|
|
|
4835
4874
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
4836
4875
|
* indexes that might get added later.
|
|
4837
4876
|
*
|
|
4838
|
-
* If the specified index
|
|
4839
|
-
* a full scan of all documents
|
|
4877
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
|
|
4878
|
+
* using another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and
|
|
4879
|
+
* the server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
4840
4880
|
*/
|
|
4841
4881
|
useIndex?: string[];
|
|
4842
4882
|
/** The read quorum that is needed for the result. The value defaults to 1, in which case the document that was
|
|
@@ -4900,6 +4940,8 @@ declare namespace CloudantV1 {
|
|
|
4900
4940
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
4901
4941
|
*/
|
|
4902
4942
|
selector: JsonObject;
|
|
4943
|
+
/** Whether to allow fallback to other indexes. Default is true. */
|
|
4944
|
+
allowFallback?: boolean;
|
|
4903
4945
|
/** Opaque bookmark token used when paginating results. */
|
|
4904
4946
|
bookmark?: string;
|
|
4905
4947
|
/** A boolean value that indicates whether or not to include information about existing conflicts in the
|
|
@@ -4941,8 +4983,9 @@ declare namespace CloudantV1 {
|
|
|
4941
4983
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
4942
4984
|
* indexes that might get added later.
|
|
4943
4985
|
*
|
|
4944
|
-
* If the specified index
|
|
4945
|
-
* a full scan of all documents
|
|
4986
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
|
|
4987
|
+
* using another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and
|
|
4988
|
+
* the server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
4946
4989
|
*/
|
|
4947
4990
|
useIndex?: string[];
|
|
4948
4991
|
/** The read quorum that is needed for the result. The value defaults to 1, in which case the document that was
|
|
@@ -5006,6 +5049,8 @@ declare namespace CloudantV1 {
|
|
|
5006
5049
|
* For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
|
|
5007
5050
|
*/
|
|
5008
5051
|
selector: JsonObject;
|
|
5052
|
+
/** Whether to allow fallback to other indexes. Default is true. */
|
|
5053
|
+
allowFallback?: boolean;
|
|
5009
5054
|
/** Opaque bookmark token used when paginating results. */
|
|
5010
5055
|
bookmark?: string;
|
|
5011
5056
|
/** A boolean value that indicates whether or not to include information about existing conflicts in the
|
|
@@ -5047,8 +5092,9 @@ declare namespace CloudantV1 {
|
|
|
5047
5092
|
* It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new
|
|
5048
5093
|
* indexes that might get added later.
|
|
5049
5094
|
*
|
|
5050
|
-
* If the specified index
|
|
5051
|
-
* a full scan of all documents
|
|
5095
|
+
* If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
|
|
5096
|
+
* using another index or a full scan of all documents. To change this behavior set `allow_fallback` to `false` and
|
|
5097
|
+
* the server responds instead with a `400` status code if the requested index is unsuitable to answer the query.
|
|
5052
5098
|
*/
|
|
5053
5099
|
useIndex?: string[];
|
|
5054
5100
|
/** The read quorum that is needed for the result. The value defaults to 1, in which case the document that was
|
|
@@ -5938,7 +5984,7 @@ declare namespace CloudantV1 {
|
|
|
5938
5984
|
type: ActiveTask.Constants.Type | string;
|
|
5939
5985
|
/** Schema for a Unix epoch timestamp. */
|
|
5940
5986
|
updatedOn: number;
|
|
5941
|
-
/** Name of user running
|
|
5987
|
+
/** Name of user running the process. */
|
|
5942
5988
|
user?: string | null;
|
|
5943
5989
|
/** Number of view indexes. Available for `view_compaction` type tasks. */
|
|
5944
5990
|
view?: number;
|
|
@@ -6624,7 +6670,7 @@ declare namespace CloudantV1 {
|
|
|
6624
6670
|
compactRunning: boolean;
|
|
6625
6671
|
/** An opaque string that describes the compaction state of the database. */
|
|
6626
6672
|
compactedSeq?: string;
|
|
6627
|
-
/**
|
|
6673
|
+
/** Schema for a database name. */
|
|
6628
6674
|
dbName: string;
|
|
6629
6675
|
/** The version of the physical format used for the data when it is stored on disk. */
|
|
6630
6676
|
diskFormatVersion: number;
|
|
@@ -6715,7 +6761,7 @@ declare namespace CloudantV1 {
|
|
|
6715
6761
|
* Schema for a database change event.
|
|
6716
6762
|
*/
|
|
6717
6763
|
class DbEvent {
|
|
6718
|
-
/**
|
|
6764
|
+
/** Schema for a database name. */
|
|
6719
6765
|
dbName: string;
|
|
6720
6766
|
/** Sequence number. */
|
|
6721
6767
|
seq: string;
|
|
@@ -6764,7 +6810,7 @@ declare namespace CloudantV1 {
|
|
|
6764
6810
|
error?: string;
|
|
6765
6811
|
/** Schema for information about a database. */
|
|
6766
6812
|
info?: DatabaseInformation;
|
|
6767
|
-
/**
|
|
6813
|
+
/** Schema for a database name. */
|
|
6768
6814
|
key: string;
|
|
6769
6815
|
static serialize(obj: any): DbsInfoResult.Transport;
|
|
6770
6816
|
static deserialize(obj: any): DbsInfoResult;
|
|
@@ -6792,7 +6838,7 @@ declare namespace CloudantV1 {
|
|
|
6792
6838
|
_deleted?: boolean;
|
|
6793
6839
|
/** Schema for a list of document revision identifiers. */
|
|
6794
6840
|
_deleted_conflicts?: string[];
|
|
6795
|
-
/** Schema for a design document ID. */
|
|
6841
|
+
/** Schema for a design document ID including a `_design/` prefix. */
|
|
6796
6842
|
_id?: string;
|
|
6797
6843
|
/** Document's update sequence in current database. Available if requested with local_seq=true query parameter. */
|
|
6798
6844
|
_local_seq?: string;
|
|
@@ -7023,9 +7069,9 @@ declare namespace CloudantV1 {
|
|
|
7023
7069
|
ref?: number;
|
|
7024
7070
|
/** Schema for a document. */
|
|
7025
7071
|
doc?: Document;
|
|
7026
|
-
/**
|
|
7072
|
+
/** Schema for a document ID. */
|
|
7027
7073
|
id?: string;
|
|
7028
|
-
/**
|
|
7074
|
+
/** Schema for a document ID. */
|
|
7029
7075
|
key: string;
|
|
7030
7076
|
/** Value of built-in `/_all_docs` style view. */
|
|
7031
7077
|
value?: DocsResultRowValue;
|
|
@@ -7219,7 +7265,7 @@ declare namespace CloudantV1 {
|
|
|
7219
7265
|
class ExplainResult {
|
|
7220
7266
|
/** When `true`, the query is answered using the index only and no documents are fetched. */
|
|
7221
7267
|
covering: boolean;
|
|
7222
|
-
/**
|
|
7268
|
+
/** Schema for a database name. */
|
|
7223
7269
|
dbname: string;
|
|
7224
7270
|
/** Fields that were requested to be projected from the document. If no fields were requested to be projected
|
|
7225
7271
|
* this will be empty and all fields will be returned.
|
|
@@ -7228,7 +7274,7 @@ declare namespace CloudantV1 {
|
|
|
7228
7274
|
/** Schema for information about an index. */
|
|
7229
7275
|
index: IndexInformation;
|
|
7230
7276
|
/** Schema for the list of all the other indexes that were not chosen for serving the query. */
|
|
7231
|
-
indexCandidates
|
|
7277
|
+
indexCandidates: IndexCandidate[];
|
|
7232
7278
|
/** The used maximum number of results returned. */
|
|
7233
7279
|
limit: number;
|
|
7234
7280
|
/** Arguments passed to the underlying view. */
|
|
@@ -7273,7 +7319,7 @@ declare namespace CloudantV1 {
|
|
|
7273
7319
|
*/
|
|
7274
7320
|
selector: JsonObject;
|
|
7275
7321
|
/** Schema for a list of objects with extra information on the selector to provide insights about its usability. */
|
|
7276
|
-
selectorHints
|
|
7322
|
+
selectorHints: SelectorHint[];
|
|
7277
7323
|
/** Skip parameter used. */
|
|
7278
7324
|
skip: number;
|
|
7279
7325
|
static serialize(obj: any): ExplainResult.Transport;
|
|
@@ -7285,13 +7331,13 @@ declare namespace CloudantV1 {
|
|
|
7285
7331
|
dbname: string;
|
|
7286
7332
|
fields: string[];
|
|
7287
7333
|
index: IndexInformation.Transport;
|
|
7288
|
-
index_candidates
|
|
7334
|
+
index_candidates: IndexCandidate[];
|
|
7289
7335
|
limit: number;
|
|
7290
7336
|
mrargs?: ExplainResultMrArgs.Transport;
|
|
7291
7337
|
opts: ExplainResultOpts.Transport;
|
|
7292
7338
|
partitioned?: any;
|
|
7293
7339
|
selector: JsonObject;
|
|
7294
|
-
selector_hints
|
|
7340
|
+
selector_hints: SelectorHint[];
|
|
7295
7341
|
skip: number;
|
|
7296
7342
|
}
|
|
7297
7343
|
}
|
|
@@ -7302,7 +7348,7 @@ declare namespace CloudantV1 {
|
|
|
7302
7348
|
/** Schema for any JSON type. */
|
|
7303
7349
|
conflicts?: any;
|
|
7304
7350
|
/** Direction parameter passed to the underlying view. */
|
|
7305
|
-
direction?: string;
|
|
7351
|
+
direction?: ExplainResultMrArgs.Constants.Direction | string;
|
|
7306
7352
|
/** Schema for any JSON type. */
|
|
7307
7353
|
endKey?: any;
|
|
7308
7354
|
/** A parameter that specifies whether to include the full content of the documents in the response in the
|
|
@@ -7330,6 +7376,11 @@ declare namespace CloudantV1 {
|
|
|
7330
7376
|
}
|
|
7331
7377
|
namespace ExplainResultMrArgs {
|
|
7332
7378
|
namespace Constants {
|
|
7379
|
+
/** Direction parameter passed to the underlying view. */
|
|
7380
|
+
enum Direction {
|
|
7381
|
+
ASC = "asc",
|
|
7382
|
+
DESC = "desc"
|
|
7383
|
+
}
|
|
7333
7384
|
/** The type of the underlying view. */
|
|
7334
7385
|
enum ViewType {
|
|
7335
7386
|
MAP = "map",
|
|
@@ -7534,7 +7585,7 @@ declare namespace CloudantV1 {
|
|
|
7534
7585
|
* For "text" type indexes each object has a `name` property of the field name and a `type` property of the field
|
|
7535
7586
|
* type (string, number, or boolean).
|
|
7536
7587
|
*/
|
|
7537
|
-
fields
|
|
7588
|
+
fields: IndexField[];
|
|
7538
7589
|
/** Whether to scan every document for arrays and store the length for each array found. Set the
|
|
7539
7590
|
* index_array_lengths field to false if:
|
|
7540
7591
|
* * You do not need to know the length of an array. * You do not use the `$size` operator. * The documents in your
|
|
@@ -7584,7 +7635,7 @@ declare namespace CloudantV1 {
|
|
|
7584
7635
|
interface Transport {
|
|
7585
7636
|
default_analyzer?: Analyzer.Transport;
|
|
7586
7637
|
default_field?: IndexTextOperatorDefaultField.Transport;
|
|
7587
|
-
fields
|
|
7638
|
+
fields: IndexField[];
|
|
7588
7639
|
index_array_lengths?: boolean;
|
|
7589
7640
|
partial_filter_selector?: JsonObject;
|
|
7590
7641
|
}
|
|
@@ -7626,7 +7677,7 @@ declare namespace CloudantV1 {
|
|
|
7626
7677
|
* Schema for information about an index.
|
|
7627
7678
|
*/
|
|
7628
7679
|
class IndexInformation {
|
|
7629
|
-
/**
|
|
7680
|
+
/** Schema for a nullable design document ID including a `_design/` prefix. */
|
|
7630
7681
|
ddoc: string | null;
|
|
7631
7682
|
/** Schema for a `json` or `text` query index definition. Indexes of type `text` have additional configuration
|
|
7632
7683
|
* properties that do not apply to `json` indexes, these are:
|
|
@@ -7757,13 +7808,13 @@ declare namespace CloudantV1 {
|
|
|
7757
7808
|
* Schema for information about a database partition.
|
|
7758
7809
|
*/
|
|
7759
7810
|
class PartitionInformation {
|
|
7760
|
-
/**
|
|
7811
|
+
/** Schema for a database name. */
|
|
7761
7812
|
dbName: string;
|
|
7762
7813
|
/** A count of the documents in the specified database partition. */
|
|
7763
7814
|
docCount: number;
|
|
7764
7815
|
/** Number of deleted documents. */
|
|
7765
7816
|
docDelCount: number;
|
|
7766
|
-
/**
|
|
7817
|
+
/** Schema for a partition key. */
|
|
7767
7818
|
partition: string;
|
|
7768
7819
|
/** Schema for information about the partition index count and limit in a database. */
|
|
7769
7820
|
partitionedIndexes?: PartitionInformationIndexes;
|
|
@@ -7938,7 +7989,7 @@ declare namespace CloudantV1 {
|
|
|
7938
7989
|
class ReplicationDatabaseAuthBasic {
|
|
7939
7990
|
/** The password associated with the username. */
|
|
7940
7991
|
password: string;
|
|
7941
|
-
/**
|
|
7992
|
+
/** Schema for a username. */
|
|
7942
7993
|
username: string;
|
|
7943
7994
|
static serialize(obj: any): ReplicationDatabaseAuthBasic.Transport;
|
|
7944
7995
|
static deserialize(obj: any): ReplicationDatabaseAuthBasic;
|
|
@@ -8343,7 +8394,7 @@ declare namespace CloudantV1 {
|
|
|
8343
8394
|
startTime: string;
|
|
8344
8395
|
/** Replication target. */
|
|
8345
8396
|
target: string;
|
|
8346
|
-
/** Name of user running
|
|
8397
|
+
/** Name of user running the process. */
|
|
8347
8398
|
user: string | null;
|
|
8348
8399
|
static serialize(obj: any): SchedulerJob.Transport;
|
|
8349
8400
|
static deserialize(obj: any): SchedulerJob;
|
|
@@ -8517,7 +8568,7 @@ declare namespace CloudantV1 {
|
|
|
8517
8568
|
[key: string]: JsonObject;
|
|
8518
8569
|
};
|
|
8519
8570
|
/** Array of row objects. */
|
|
8520
|
-
rows
|
|
8571
|
+
rows: SearchResultRow[];
|
|
8521
8572
|
/** Array of grouped search matches. */
|
|
8522
8573
|
groups?: SearchResultProperties[];
|
|
8523
8574
|
static serialize(obj: any): SearchResult.Transport;
|
|
@@ -8534,7 +8585,7 @@ declare namespace CloudantV1 {
|
|
|
8534
8585
|
ranges?: {
|
|
8535
8586
|
[key: string]: JsonObject;
|
|
8536
8587
|
};
|
|
8537
|
-
rows
|
|
8588
|
+
rows: SearchResultRow[];
|
|
8538
8589
|
groups?: SearchResultProperties[];
|
|
8539
8590
|
}
|
|
8540
8591
|
}
|
|
@@ -8559,7 +8610,7 @@ declare namespace CloudantV1 {
|
|
|
8559
8610
|
[key: string]: JsonObject;
|
|
8560
8611
|
};
|
|
8561
8612
|
/** Array of row objects. */
|
|
8562
|
-
rows
|
|
8613
|
+
rows: SearchResultRow[];
|
|
8563
8614
|
static serialize(obj: any): SearchResultProperties.Transport;
|
|
8564
8615
|
static deserialize(obj: any): SearchResultProperties;
|
|
8565
8616
|
}
|
|
@@ -8574,7 +8625,7 @@ declare namespace CloudantV1 {
|
|
|
8574
8625
|
ranges?: {
|
|
8575
8626
|
[key: string]: JsonObject;
|
|
8576
8627
|
};
|
|
8577
|
-
rows
|
|
8628
|
+
rows: SearchResultRow[];
|
|
8578
8629
|
}
|
|
8579
8630
|
}
|
|
8580
8631
|
/**
|
|
@@ -8704,7 +8755,7 @@ declare namespace CloudantV1 {
|
|
|
8704
8755
|
/** Vendor name. */
|
|
8705
8756
|
name: string;
|
|
8706
8757
|
/** Vendor variant. */
|
|
8707
|
-
variant: string;
|
|
8758
|
+
variant: ServerVendor.Constants.Variant | string;
|
|
8708
8759
|
/** Vendor version. */
|
|
8709
8760
|
version: string;
|
|
8710
8761
|
/**
|
|
@@ -8715,6 +8766,12 @@ declare namespace CloudantV1 {
|
|
|
8715
8766
|
static deserialize(obj: any): ServerVendor;
|
|
8716
8767
|
}
|
|
8717
8768
|
namespace ServerVendor {
|
|
8769
|
+
namespace Constants {
|
|
8770
|
+
/** Vendor variant. */
|
|
8771
|
+
enum Variant {
|
|
8772
|
+
PAAS = "paas"
|
|
8773
|
+
}
|
|
8774
|
+
}
|
|
8718
8775
|
interface Transport {
|
|
8719
8776
|
name: string;
|
|
8720
8777
|
variant: string;
|
|
@@ -8856,7 +8913,7 @@ declare namespace CloudantV1 {
|
|
|
8856
8913
|
class UserContext {
|
|
8857
8914
|
/** Database name in the context of the provided operation. */
|
|
8858
8915
|
db?: string;
|
|
8859
|
-
/**
|
|
8916
|
+
/** Name of user running the process. */
|
|
8860
8917
|
name: string | null;
|
|
8861
8918
|
/** List of user roles. */
|
|
8862
8919
|
roles: UserContext.Constants.Roles[] | string[];
|