@ibm-cloud/cloudant 0.0.14 → 0.0.18
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 +76 -36
- package/auth/couchdbSessionAuthenticator.js +39 -0
- package/auth/couchdbSessionAuthenticator.js.map +1 -1
- package/auth/sessionTokenManager.d.ts +1 -1
- package/auth/sessionTokenManager.js +4 -2
- package/auth/sessionTokenManager.js.map +1 -1
- package/cloudant/v1.d.ts +26 -161
- package/cloudant/v1.js +22 -94
- package/cloudant/v1.js.map +1 -1
- package/lib/cloudantBaseService.d.ts +4 -0
- package/lib/cloudantBaseService.js +85 -1
- package/lib/cloudantBaseService.js.map +1 -1
- package/package.json +5 -7
package/README.md
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
The example codes and outputs below are generated using the `embedmd` go
|
|
3
|
-
package.
|
|
4
|
-
|
|
5
|
-
https://github.com/campoy/embedmd
|
|
6
|
-
|
|
7
|
-
You should regenerate the example codes after making any changes to
|
|
8
|
-
examples in the test/examples/ folder.
|
|
9
|
-
|
|
10
|
-
embedmd -w README.md
|
|
11
|
-
-->
|
|
12
|
-
|
|
13
1
|
[](https://travis-ci.com/IBM/cloudant-node-sdk)
|
|
14
2
|
[](https://github.com/IBM/cloudant-node-sdk/releases/latest)
|
|
15
|
-
[](https://ibm.github.io/cloudant-node-sdk/)
|
|
16
4
|
|
|
17
|
-
# IBM Cloudant Node.js SDK Version 0.0.
|
|
5
|
+
# IBM Cloudant Node.js SDK Version 0.0.18
|
|
18
6
|
|
|
19
7
|
IBM Cloudant Node.js SDK is a client library that interacts with the
|
|
20
8
|
[IBM Cloudant APIs](https://cloud.ibm.com/apidocs/cloudant?code=node).
|
|
@@ -102,7 +90,7 @@ project:
|
|
|
102
90
|
service instance or a
|
|
103
91
|
[CouchDB](https://docs.couchdb.org/en/latest/install/index.html)
|
|
104
92
|
server.
|
|
105
|
-
- Node.js
|
|
93
|
+
- Node.js 12, 14 or 16.
|
|
106
94
|
|
|
107
95
|
## Installation
|
|
108
96
|
|
|
@@ -215,7 +203,7 @@ For general IBM Cloud SDK usage information, please see
|
|
|
215
203
|
|
|
216
204
|
### Code examples
|
|
217
205
|
|
|
218
|
-
The following code examples
|
|
206
|
+
The following code examples
|
|
219
207
|
[authenticate with the environment variables](#authenticate-with-environment-variables).
|
|
220
208
|
|
|
221
209
|
#### 1. Retrieve information from an existing database
|
|
@@ -223,7 +211,7 @@ The following code examples
|
|
|
223
211
|
**Note:** This example code assumes that `animaldb` database does not exist in your account.
|
|
224
212
|
|
|
225
213
|
This example code gathers information about an existing database hosted on
|
|
226
|
-
the https://examples.cloudant.com/ service `url`. To connect, you must
|
|
214
|
+
the https://examples.cloudant.com/ service `url`. To connect, you must
|
|
227
215
|
extend your environment variables with the *service url* and *authentication
|
|
228
216
|
type* to use `NOAUTH` authentication while you connect to the `animaldb` database.
|
|
229
217
|
This step is necessary for the SDK to distinguish the `EXAMPLES` custom service
|
|
@@ -558,6 +546,15 @@ const getDocParams: CloudantV1.GetDocumentParams = {
|
|
|
558
546
|
db: exampleDbName,
|
|
559
547
|
};
|
|
560
548
|
|
|
549
|
+
// Note: for response byte stream use:
|
|
550
|
+
// const getdocAsStreamParam: CloudantV1.GetDocumentAsStreamParams = {
|
|
551
|
+
// docId: 'example',
|
|
552
|
+
// db: exampleDbName,
|
|
553
|
+
// };
|
|
554
|
+
// client
|
|
555
|
+
// .getDocumentAsStream(getdocAsStreamParam)
|
|
556
|
+
// .then((documentAsByteStream) => {});
|
|
557
|
+
|
|
561
558
|
client
|
|
562
559
|
.getDocument(getDocParams)
|
|
563
560
|
.then((docResult) => {
|
|
@@ -571,13 +568,19 @@ client
|
|
|
571
568
|
delete document.joined;
|
|
572
569
|
|
|
573
570
|
// Update the document in the database
|
|
574
|
-
client
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
)
|
|
580
|
-
|
|
571
|
+
client
|
|
572
|
+
.postDocument({ db: exampleDbName, document: document })
|
|
573
|
+
// Note: for request byte stream use:
|
|
574
|
+
// .postDocument(
|
|
575
|
+
// {db: exampleDbName, document: documentAsByteStream}
|
|
576
|
+
// )
|
|
577
|
+
.then((res) => {
|
|
578
|
+
// Keeping track with the revision number of the document object:
|
|
579
|
+
document._rev = res.result.rev;
|
|
580
|
+
console.log(
|
|
581
|
+
'You have updated the document:\n' + JSON.stringify(document, null, 2)
|
|
582
|
+
);
|
|
583
|
+
});
|
|
581
584
|
})
|
|
582
585
|
.catch((err) => {
|
|
583
586
|
if (err.code === 404) {
|
|
@@ -616,6 +619,14 @@ const updateDoc = async () => {
|
|
|
616
619
|
})
|
|
617
620
|
).result;
|
|
618
621
|
|
|
622
|
+
// Note: for response byte stream use:
|
|
623
|
+
// const documentAsByteStream = (
|
|
624
|
+
// await client.getDocumentAsStream({
|
|
625
|
+
// docId: 'example',
|
|
626
|
+
// db: exampleDbName,
|
|
627
|
+
// })
|
|
628
|
+
// ).result;
|
|
629
|
+
|
|
619
630
|
// Add Bob Smith's address to the document
|
|
620
631
|
document.address = '19 Front Street, Darlington, DL5 1TY';
|
|
621
632
|
|
|
@@ -630,6 +641,14 @@ const updateDoc = async () => {
|
|
|
630
641
|
})
|
|
631
642
|
).result.rev;
|
|
632
643
|
|
|
644
|
+
// Note: for request byte stream use:
|
|
645
|
+
// document._rev = (
|
|
646
|
+
// await client.postDocument({
|
|
647
|
+
// db: exampleDbName,
|
|
648
|
+
// document: documentAsByteStream,
|
|
649
|
+
// })
|
|
650
|
+
// ).result.rev;
|
|
651
|
+
|
|
633
652
|
console.log(
|
|
634
653
|
'You have updated the document:\n' + JSON.stringify(document, null, 2)
|
|
635
654
|
);
|
|
@@ -802,23 +821,42 @@ For sample code on handling errors, see
|
|
|
802
821
|
### Raw IO
|
|
803
822
|
|
|
804
823
|
For endpoints that read or write document content it is possible to bypass
|
|
805
|
-
usage of the built-in
|
|
806
|
-
|
|
807
|
-
|
|
824
|
+
usage of the built-in interface with byte streams.
|
|
825
|
+
|
|
826
|
+
Depending on the specific SDK operation it may be possible to:
|
|
827
|
+
* accept a user-provided byte stream to send to the server as a request body
|
|
828
|
+
* return a byte stream of the server response body to the user
|
|
829
|
+
|
|
830
|
+
Request byte stream can be supplied for `NodeJS.ReadableStream` or `Buffer` type parameters
|
|
831
|
+
.
|
|
832
|
+
For these cases you can pass this byte stream directly to the HTTP request body.
|
|
833
|
+
|
|
834
|
+
Response byte stream is supported in functions with the suffix of `AsStream`.
|
|
835
|
+
The returned byte stream allows the response body to be consumed
|
|
836
|
+
without triggering JSON unmarshalling that is typically performed by the SDK.
|
|
837
|
+
|
|
838
|
+
The [update document](#3-update-your-previously-created-document) section
|
|
839
|
+
contains examples for both request and response byte stream cases.
|
|
840
|
+
|
|
841
|
+
The API reference contains further examples of using byte streams.
|
|
842
|
+
They are titled "Example request as stream" and are initially collapsed.
|
|
843
|
+
Expand them to see examples of:
|
|
844
|
+
|
|
845
|
+
- Byte requests:
|
|
846
|
+
- [Bulk modify multiple documents in a database](https://cloud.ibm.com/apidocs/cloudant?code=node#postbulkdocs)
|
|
808
847
|
|
|
809
|
-
-
|
|
810
|
-
- [Query a list of all documents in a database](https://cloud.ibm.com/apidocs/cloudant?code=node#postalldocs)
|
|
811
|
-
- [Query the database document changes feed](https://cloud.ibm.com/apidocs/cloudant?code=node#postchanges)
|
|
848
|
+
- Byte responses:
|
|
849
|
+
- [Query a list of all documents in a database](https://cloud.ibm.com/apidocs/cloudant?code=node#postalldocs)
|
|
850
|
+
- [Query the database document changes feed](https://cloud.ibm.com/apidocs/cloudant?code=node#postchanges)
|
|
812
851
|
|
|
813
852
|
### Further resources
|
|
814
853
|
|
|
815
854
|
- [Cloudant API docs](https://cloud.ibm.com/apidocs/cloudant?code=node):
|
|
816
|
-
API examples for Cloudant Node.js SDK.
|
|
817
|
-
- [
|
|
855
|
+
API reference including usage examples for Cloudant Node.js SDK API.
|
|
856
|
+
- [TypeDoc](https://ibm.github.io/cloudant-node-sdk/):
|
|
857
|
+
Cloudant Node.js SDK API Documentation.
|
|
858
|
+
- [Cloudant docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-getting-started-with-cloudant):
|
|
818
859
|
The official documentation page for Cloudant.
|
|
819
|
-
- [Cloudant Learning Center](https://developer.ibm.com/clouddataservices/docs/compose/cloudant/):
|
|
820
|
-
The official learning center with several useful videos which help you use
|
|
821
|
-
Cloudant successfully.
|
|
822
860
|
- [Cloudant blog](https://blog.cloudant.com/):
|
|
823
861
|
Many useful articles about how to optimize Cloudant for common problems.
|
|
824
862
|
|
|
@@ -832,7 +870,9 @@ IBM Cloud services, ask a question on
|
|
|
832
870
|
|
|
833
871
|
If you encounter an issue with the project, you are welcome to submit a
|
|
834
872
|
[bug report](https://github.com/IBM/cloudant-node-sdk/issues).
|
|
835
|
-
Before you submit a bug report, search for
|
|
873
|
+
Before you submit a bug report, search for
|
|
874
|
+
[similar issues](https://github.com/IBM/cloudant-node-sdk/issues?q=is%3Aissue) and review the
|
|
875
|
+
[KNOWN_ISSUES file](KNOWN_ISSUES.md) to verify that your issue hasn't been reported yet.
|
|
836
876
|
|
|
837
877
|
## Open source at IBM
|
|
838
878
|
|
|
@@ -22,6 +22,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
22
22
|
return extendStatics(d, b);
|
|
23
23
|
};
|
|
24
24
|
return function (d, b) {
|
|
25
|
+
if (typeof b !== "function" && b !== null)
|
|
26
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
27
|
extendStatics(d, b);
|
|
26
28
|
function __() { this.constructor = d; }
|
|
27
29
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -78,7 +80,44 @@ var CouchdbSessionAuthenticator = /** @class */ (function (_super) {
|
|
|
78
80
|
* @param {object} userOptions - Configuration values for a `request` service.
|
|
79
81
|
*/
|
|
80
82
|
CouchdbSessionAuthenticator.prototype.configure = function (userOptions) {
|
|
83
|
+
// Merge the options
|
|
81
84
|
Object.assign(this.tokenOptions, userOptions);
|
|
85
|
+
// START monkey patch for https://github.com/salesforce/tough-cookie/issues/154
|
|
86
|
+
// Check if we've already patched the jar
|
|
87
|
+
var cookieJar = this.tokenOptions.jar;
|
|
88
|
+
if (cookieJar && !cookieJar.cloudantPatch) {
|
|
89
|
+
// Set the patching flag
|
|
90
|
+
cookieJar.cloudantPatch = true;
|
|
91
|
+
// Replace the store's updateCookie function with one that applies a patch to newCookie
|
|
92
|
+
var originalUpdateCookieFn_1 = cookieJar.store.updateCookie;
|
|
93
|
+
cookieJar.store.updateCookie = function (oldCookie, newCookie, cb) {
|
|
94
|
+
// Add current time as an update timestamp to the newCookie
|
|
95
|
+
newCookie.cloudantPatchUpdateTime = new Date();
|
|
96
|
+
// Replace the cookie's expiryTime function with one that uses cloudantPatchUpdateTime
|
|
97
|
+
// in place of creation time to check the expiry.
|
|
98
|
+
var originalExpiryTimeFn = newCookie.expiryTime;
|
|
99
|
+
newCookie.expiryTime = function (now) {
|
|
100
|
+
// The original expiryTime check is relative to a time in this order:
|
|
101
|
+
// 1. supplied now argument
|
|
102
|
+
// 2. this.creation (original cookie creation time)
|
|
103
|
+
// 3. current time
|
|
104
|
+
// This patch replaces 2 with an expiry check relative to the cloudantPatchUpdateTime if set instead of
|
|
105
|
+
// the creation time by passing it as the now argument.
|
|
106
|
+
return originalExpiryTimeFn.call(newCookie, newCookie.cloudantPatchUpdateTime || now);
|
|
107
|
+
};
|
|
108
|
+
// Finally delegate back to the original update function or the fallback put (which is set by Cookie
|
|
109
|
+
// when an update function is not present on the store). Since we always set an update function for our
|
|
110
|
+
// patch we need to also provide that fallback.
|
|
111
|
+
if (originalUpdateCookieFn_1) {
|
|
112
|
+
originalUpdateCookieFn_1.call(cookieJar.store, oldCookie, newCookie, cb);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
cookieJar.store.putCookie.call(cookieJar.store, newCookie, cb);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
// END cookie jar monkey patch
|
|
120
|
+
// Set the token manager
|
|
82
121
|
this.tokenManager = new sessionTokenManager_1.SessionTokenManager(this.tokenOptions);
|
|
83
122
|
};
|
|
84
123
|
return CouchdbSessionAuthenticator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"couchdbSessionAuthenticator.js","sourceRoot":"","sources":["../../auth/couchdbSessionAuthenticator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"couchdbSessionAuthenticator.js","sourceRoot":"","sources":["../../auth/couchdbSessionAuthenticator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;AAEH,yDAA+E;AAC/E,6DAG+B;AAU/B;;;;;;;;;;;GAWG;AACH;IAAiD,+CAAa;IAK5D;;;;;;;OAOG;IACH,qCAAY,OAA2C;QAAvD,YACE,iBAAO,SAGR;QAFC,kCAAa,CAAC,OAAO,EAAE,KAAI,CAAC,eAAe,CAAC,CAAC;QAC7C,KAAI,CAAC,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;;IACjD,CAAC;IAED;;;;;;;;OAQG;IACI,kDAAY,GAAnB,UAAoB,cAAsB;QACxC,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;IAED;;;;;OAKG;IACI,+CAAS,GAAhB,UAAiB,WAAwB;QACvC,oBAAoB;QACpB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QAE9C,+EAA+E;QAC/E,yCAAyC;QACzC,IAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC;QACxC,IAAI,SAAS,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE;YACzC,wBAAwB;YACxB,SAAS,CAAC,aAAa,GAAG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ation 2020, 2021. All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -22,6 +22,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
22
22
|
return extendStatics(d, b);
|
|
23
23
|
};
|
|
24
24
|
return function (d, b) {
|
|
25
|
+
if (typeof b !== "function" && b !== null)
|
|
26
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
27
|
extendStatics(d, b);
|
|
26
28
|
function __() { this.constructor = d; }
|
|
27
29
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -111,7 +113,7 @@ var SessionTokenManager = /** @class */ (function (_super) {
|
|
|
111
113
|
*/
|
|
112
114
|
SessionTokenManager.prototype.saveTokenInfo = function (tokenResponse) {
|
|
113
115
|
var sessionCookie = tokenResponse.headers['set-cookie'];
|
|
114
|
-
if (!(sessionCookie
|
|
116
|
+
if (!Array.isArray(sessionCookie)) {
|
|
115
117
|
var err = 'Set-Cookie header not present in response';
|
|
116
118
|
throw new Error(err);
|
|
117
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionTokenManager.js","sourceRoot":"","sources":["../../auth/sessionTokenManager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"sessionTokenManager.js","sourceRoot":"","sources":["../../auth/sessionTokenManager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;AAGH,yDAK4B;AAU5B;;;;;GAKG;AACH;IAAyC,uCAAY;IAUnD;;;;;;;;;;;;;;;OAeG;IACH,6BAAY,OAAmC;QAA/C,YACE,kBAAM,OAAO,CAAC,SAMf;QAhCS,qBAAe,GAAa;YACpC,UAAU;YACV,UAAU;YACV,YAAY;YACZ,KAAK;SACN,CAAC;QAuBA,kCAAa,CAAC,OAAO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