@ibm-cloud/cloudant 0.7.2 → 0.8.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 +7 -7
- package/cloudant/features/changesFollower.js +2 -1
- package/cloudant/features/changesFollower.js.map +1 -1
- package/cloudant/features/changesResultIterator.d.ts +0 -1
- package/cloudant/features/changesResultIterator.js +100 -97
- package/cloudant/features/changesResultIterator.js.map +1 -1
- package/cloudant/v1.d.ts +3 -3
- package/package.json +10 -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.8.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).
|
|
@@ -935,7 +935,7 @@ You have deleted the document.
|
|
|
935
935
|
|
|
936
936
|
#### Further code examples
|
|
937
937
|
|
|
938
|
-
For a complete list of code examples, see the [examples directory](https://github.com/IBM/cloudant-node-sdk/tree/v0.
|
|
938
|
+
For a complete list of code examples, see the [examples directory](https://github.com/IBM/cloudant-node-sdk/tree/v0.8.0/examples#examples-for-node).
|
|
939
939
|
|
|
940
940
|
### Error handling
|
|
941
941
|
|
|
@@ -1033,7 +1033,7 @@ The changes follower requires the client to have HTTP timeouts of at least 1 min
|
|
|
1033
1033
|
instantiation if it is insufficient. The default client configuration has sufficiently long timeouts.
|
|
1034
1034
|
|
|
1035
1035
|
For use-cases where these configuration limitations are deemed too restrictive then it is recommended to
|
|
1036
|
-
write code to use the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.
|
|
1036
|
+
write code to use the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.8.0/examples#postchanges) instead of the follower.
|
|
1037
1037
|
|
|
1038
1038
|
#### Error suppression
|
|
1039
1039
|
|
|
@@ -1068,7 +1068,7 @@ The follower is not optimized for some use cases and it is not recommended to us
|
|
|
1068
1068
|
* 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).
|
|
1069
1069
|
|
|
1070
1070
|
In these cases use-case specific control over the number of change requests made and the content size of the responses
|
|
1071
|
-
may be achieved by using the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.
|
|
1071
|
+
may be achieved by using the SDK's [POST `_changes` API](https://github.com/IBM/cloudant-node-sdk/tree/v0.8.0/examples#postchanges).
|
|
1072
1072
|
|
|
1073
1073
|
#### Checkpointing
|
|
1074
1074
|
|
|
@@ -1579,7 +1579,7 @@ If you encounter an issue with the project, you are welcome to submit a
|
|
|
1579
1579
|
|
|
1580
1580
|
Before you submit a bug report, search for
|
|
1581
1581
|
[similar issues](https://github.com/IBM/cloudant-node-sdk/issues?q=is%3Aissue) and review the
|
|
1582
|
-
[KNOWN_ISSUES file](https://github.com/IBM/cloudant-node-sdk/tree/v0.
|
|
1582
|
+
[KNOWN_ISSUES file](https://github.com/IBM/cloudant-node-sdk/tree/v0.8.0/KNOWN_ISSUES.md) to verify that your issue hasn't been reported yet.
|
|
1583
1583
|
|
|
1584
1584
|
Please consult the [security policy](https://github.com/IBM/cloudant-node-sdk/security/policy) before opening security related issues.
|
|
1585
1585
|
|
|
@@ -1609,8 +1609,8 @@ Find more open source projects on the [IBM GitHub](http://ibm.github.io/) page.
|
|
|
1609
1609
|
|
|
1610
1610
|
## Contributing
|
|
1611
1611
|
|
|
1612
|
-
For more information, see [CONTRIBUTING](https://github.com/IBM/cloudant-node-sdk/tree/v0.
|
|
1612
|
+
For more information, see [CONTRIBUTING](https://github.com/IBM/cloudant-node-sdk/tree/v0.8.0/CONTRIBUTING.md).
|
|
1613
1613
|
|
|
1614
1614
|
## License
|
|
1615
1615
|
|
|
1616
|
-
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.
|
|
1616
|
+
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.8.0/LICENSE).
|
|
@@ -88,7 +88,8 @@ var ChangesFollower = /** @class */ (function () {
|
|
|
88
88
|
if (errorTolerance < 0) {
|
|
89
89
|
throw new Error('Error tolerance duration must not be negative.');
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
// loose equality for null and undefined values
|
|
92
|
+
if (errorTolerance == undefined) {
|
|
92
93
|
this.errorTolerance = Number.MAX_VALUE;
|
|
93
94
|
}
|
|
94
95
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changesFollower.js","sourceRoot":"","sources":["../../../cloudant/features/changesFollower.ts"],"names":[],"mappings":";;;AAiBA,6DAA4D;AAC5D,qEAAoE;AACpE,iCAA4C;AAC5C,iEAAwE;AAGxE,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,gBAAgB;IAChB,mCAAM,CAAA;IACN,mCAAM,CAAA;AACR,CAAC,EAJW,IAAI,oBAAJ,IAAI,QAIf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH;IAcE;;;;;;;;;;;OAWG;IACH,yBACE,MAAkB,EAClB,MAAoC,EACpC,cAAuB;QAEvB,2BAA2B;QAC3B,yCAAmB,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,6DAA6D;QAC7D,IAAI,CAAC,MAAM,GAAG,yCAAmB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,cAAc,GAAG,CAAC,EAAE;YACtB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;SACnE;QACD,IAAI,cAAc,
|
|
1
|
+
{"version":3,"file":"changesFollower.js","sourceRoot":"","sources":["../../../cloudant/features/changesFollower.ts"],"names":[],"mappings":";;;AAiBA,6DAA4D;AAC5D,qEAAoE;AACpE,iCAA4C;AAC5C,iEAAwE;AAGxE,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,gBAAgB;IAChB,mCAAM,CAAA;IACN,mCAAM,CAAA;AACR,CAAC,EAJW,IAAI,oBAAJ,IAAI,QAIf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH;IAcE;;;;;;;;;;;OAWG;IACH,yBACE,MAAkB,EAClB,MAAoC,EACpC,cAAuB;QAEvB,2BAA2B;QAC3B,yCAAmB,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,6DAA6D;QAC7D,IAAI,CAAC,MAAM,GAAG,yCAAmB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,cAAc,GAAG,CAAC,EAAE;YACtB,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;SACnE;QACD,+CAA+C;QAC/C,IAAI,cAAc,IAAI,SAAS,EAAE;YAC/B,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC;SACxC;aAAM;YACL,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;SACtC;QACD,gCAAgC;QAChC,IAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QAC7C,IACE,WAAW,GAAG,CAAC;YACf,WAAW,GAAG,yCAAmB,CAAC,kBAAkB,EACpD;YACA,MAAM,IAAI,KAAK,CACb,0EAAmE,yCAAmB,CAAC,kBAAkB,6CAAm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PostChangesParams } from '../v1';
|
|
18
18
|
import CloudantV1 = require('../v1');
|
|
19
19
|
export declare class ChangesResultIterableIterator implements AsyncIterableIterator<CloudantV1.ChangesResult> {
|
|
20
|
-
private readonly cancellable;
|
|
21
20
|
private readonly timeoutPromise;
|
|
22
21
|
private readonly cancelToken;
|
|
23
22
|
private readonly client;
|
|
@@ -65,10 +65,6 @@ var TransientErrorSuppression;
|
|
|
65
65
|
})(TransientErrorSuppression || (TransientErrorSuppression = {}));
|
|
66
66
|
var ChangesResultIterableIterator = /** @class */ (function () {
|
|
67
67
|
function ChangesResultIterableIterator(client, params, mode, errorTolerance) {
|
|
68
|
-
var _this = this;
|
|
69
|
-
this.cancellable = new Promise(function (_resolve, reject) {
|
|
70
|
-
_this.cancel = reject;
|
|
71
|
-
});
|
|
72
68
|
this.timeoutPromise = (0, util_1.promisify)(setTimeout);
|
|
73
69
|
this.cancelToken = 'CloudantChangesIteratorCancel';
|
|
74
70
|
this.doneResult = {
|
|
@@ -154,7 +150,7 @@ var ChangesResultIterableIterator = /** @class */ (function () {
|
|
|
154
150
|
if (!this.stopped) {
|
|
155
151
|
this.logger.debug('Setting stopped flag.');
|
|
156
152
|
this.stopped = true;
|
|
157
|
-
if (this.
|
|
153
|
+
if (this.cancel) {
|
|
158
154
|
this.logger.debug('Cancelling inflight requests.');
|
|
159
155
|
this.cancel(new Error(this.cancelToken));
|
|
160
156
|
}
|
|
@@ -166,6 +162,7 @@ var ChangesResultIterableIterator = /** @class */ (function () {
|
|
|
166
162
|
};
|
|
167
163
|
ChangesResultIterableIterator.prototype.next = function (value) {
|
|
168
164
|
return __awaiter(this, void 0, void 0, function () {
|
|
165
|
+
var resolveCancellable, cancellable;
|
|
169
166
|
var _this = this;
|
|
170
167
|
return __generator(this, function (_a) {
|
|
171
168
|
switch (_a.label) {
|
|
@@ -191,101 +188,107 @@ var ChangesResultIterableIterator = /** @class */ (function () {
|
|
|
191
188
|
// end up blocking I/O.
|
|
192
189
|
_a.sent();
|
|
193
190
|
this.logger.debug('Making next request.');
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
_this.logger.debug('
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
_this.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
_this.countDown -= response.result.results.length;
|
|
217
|
-
if (_this.countDown <= 0) {
|
|
218
|
-
_this.logger.debug('Limit reached, setting stopped flag.');
|
|
191
|
+
cancellable = new Promise(function (resolve, reject) {
|
|
192
|
+
resolveCancellable = resolve;
|
|
193
|
+
_this.cancel = reject;
|
|
194
|
+
});
|
|
195
|
+
return [2 /*return*/, Promise.race([
|
|
196
|
+
cancellable,
|
|
197
|
+
this.client.postChanges(changesParamsHelper_1.ChangesParamsHelper.cloneParams(this.params, this.since, this.countDown && this.countDown < this.params.limit
|
|
198
|
+
? this.countDown
|
|
199
|
+
: undefined)),
|
|
200
|
+
])
|
|
201
|
+
.then(function (response) {
|
|
202
|
+
_this.logger.debug('Got next response.');
|
|
203
|
+
// Reset the retry counter
|
|
204
|
+
_this.retry = 0;
|
|
205
|
+
if (_this.transientErrorSuppression === TransientErrorSuppression.TIMER) {
|
|
206
|
+
_this.logger.debug('Setting new timestamp for timer suppression');
|
|
207
|
+
_this.successTimestamp = Date.now();
|
|
208
|
+
}
|
|
209
|
+
_this.since = response.result.last_seq;
|
|
210
|
+
_this.pending = response.result.pending;
|
|
211
|
+
if (_this.mode === changesFollower_1.Mode.FINITE && _this.pending === 0) {
|
|
212
|
+
_this.logger.debug('No more changes pending, setting stopped flag.');
|
|
219
213
|
_this.stopped = true;
|
|
220
214
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
if (err.message === _this.cancelToken) {
|
|
228
|
-
_this.logger.debug('Iterator next exiting cancelled.');
|
|
229
|
-
return _this.doneResult;
|
|
230
|
-
}
|
|
231
|
-
switch (_this.transientErrorSuppression) {
|
|
232
|
-
case TransientErrorSuppression.ALWAYS:
|
|
233
|
-
break;
|
|
234
|
-
case TransientErrorSuppression.TIMER:
|
|
235
|
-
if (Date.now() < _this.successTimestamp + _this.errorTolerance) {
|
|
236
|
-
break;
|
|
237
|
-
}
|
|
238
|
-
_this.logger.debug('Error tolerance deadline exceeded.');
|
|
239
|
-
// In the case the timer has been exceeded we want to throw so
|
|
240
|
-
// fall through
|
|
241
|
-
case TransientErrorSuppression.NEVER:
|
|
242
|
-
_this.logger.verbose("ChangesResultStream stream: ".concat(err.message));
|
|
243
|
-
throw err;
|
|
244
|
-
}
|
|
245
|
-
switch (err.code) {
|
|
246
|
-
case 400:
|
|
247
|
-
case 401:
|
|
248
|
-
case 403:
|
|
249
|
-
case 404:
|
|
250
|
-
// Terminal error, stop running
|
|
251
|
-
_this.logger.debug('Terminal error');
|
|
252
|
-
_this.logger.verbose("ChangesResultStream stream: ".concat(err.message));
|
|
253
|
-
throw err;
|
|
254
|
-
default:
|
|
255
|
-
// Note this includes Errors
|
|
256
|
-
// which handles cases like disconnections and incomplete
|
|
257
|
-
// bodies where we may have received a successful response
|
|
258
|
-
// code, but couldn't e.g. parse the body
|
|
259
|
-
_this.logger.verbose("Suppressing transient error ".concat(err.message, "."));
|
|
260
|
-
var emptyChangesResultPromise_1 = {
|
|
261
|
-
done: false,
|
|
262
|
-
value: {
|
|
263
|
-
last_seq: _this.since,
|
|
264
|
-
pending: _this.pending,
|
|
265
|
-
results: [],
|
|
266
|
-
},
|
|
267
|
-
};
|
|
268
|
-
var expDelay = void 0;
|
|
269
|
-
if (_this.retry > _this.expRetryGate) {
|
|
270
|
-
// If we've exceeded the cap, use the timeout value
|
|
271
|
-
expDelay = changesParamsHelper_1.ChangesParamsHelper.LONGPOLL_TIMEOUT;
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
expDelay = Math.pow(2, _this.retry) * _this.baseDelay;
|
|
215
|
+
if (_this.countDown !== undefined) {
|
|
216
|
+
_this.logger.debug('Decrementing limit.');
|
|
217
|
+
_this.countDown -= response.result.results.length;
|
|
218
|
+
if (_this.countDown <= 0) {
|
|
219
|
+
_this.logger.debug('Limit reached, setting stopped flag.');
|
|
220
|
+
_this.stopped = true;
|
|
275
221
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
222
|
+
}
|
|
223
|
+
_this.logger.debug('Iterator next exiting with result.');
|
|
224
|
+
return { done: false, value: response.result };
|
|
225
|
+
})
|
|
226
|
+
.catch(function (err) {
|
|
227
|
+
_this.logger.debug("Caught error ".concat(err.message));
|
|
228
|
+
if (err.message === _this.cancelToken) {
|
|
229
|
+
_this.logger.debug('Iterator next exiting cancelled.');
|
|
230
|
+
return _this.doneResult;
|
|
231
|
+
}
|
|
232
|
+
switch (_this.transientErrorSuppression) {
|
|
233
|
+
case TransientErrorSuppression.ALWAYS:
|
|
234
|
+
break;
|
|
235
|
+
case TransientErrorSuppression.TIMER:
|
|
236
|
+
if (Date.now() < _this.successTimestamp + _this.errorTolerance) {
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
_this.logger.debug('Error tolerance deadline exceeded.');
|
|
240
|
+
// In the case the timer has been exceeded we want to throw so
|
|
241
|
+
// fall through
|
|
242
|
+
case TransientErrorSuppression.NEVER:
|
|
243
|
+
_this.logger.verbose("ChangesResultStream stream: ".concat(err.message));
|
|
244
|
+
throw err;
|
|
245
|
+
}
|
|
246
|
+
switch (err.code) {
|
|
247
|
+
case 400:
|
|
248
|
+
case 401:
|
|
249
|
+
case 403:
|
|
250
|
+
case 404:
|
|
251
|
+
// Terminal error, stop running
|
|
252
|
+
_this.logger.debug('Terminal error');
|
|
253
|
+
_this.logger.verbose("ChangesResultStream stream: ".concat(err.message));
|
|
254
|
+
throw err;
|
|
255
|
+
default:
|
|
256
|
+
// Note this includes Errors
|
|
257
|
+
// which handles cases like disconnections and incomplete
|
|
258
|
+
// bodies where we may have received a successful response
|
|
259
|
+
// code, but couldn't e.g. parse the body
|
|
260
|
+
_this.logger.verbose("Suppressing transient error ".concat(err.message, "."));
|
|
261
|
+
var emptyChangesResultPromise_1 = {
|
|
262
|
+
done: false,
|
|
263
|
+
value: {
|
|
264
|
+
last_seq: _this.since,
|
|
265
|
+
pending: _this.pending,
|
|
266
|
+
results: [],
|
|
267
|
+
},
|
|
268
|
+
};
|
|
269
|
+
var expDelay = void 0;
|
|
270
|
+
if (_this.retry > _this.expRetryGate) {
|
|
271
|
+
// If we've exceeded the cap, use the timeout value
|
|
272
|
+
expDelay = changesParamsHelper_1.ChangesParamsHelper.LONGPOLL_TIMEOUT;
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
expDelay = Math.pow(2, _this.retry) * _this.baseDelay;
|
|
276
|
+
}
|
|
277
|
+
var delay = Math.round(Math.random() * expDelay) + 1;
|
|
278
|
+
_this.logger.debug("Backing off for ".concat(delay, " ms."));
|
|
279
|
+
_this.retry++;
|
|
280
|
+
return _this.timeoutPromise(delay).then(function () {
|
|
281
|
+
_this.logger.debug("Iterator next exiting with empty result.");
|
|
282
|
+
return emptyChangesResultPromise_1;
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
})
|
|
286
|
+
.finally(function () {
|
|
287
|
+
_this.logger.debug('Cleaning up cancellable.');
|
|
288
|
+
_this.cancel = null;
|
|
289
|
+
// Resolve the cancellable to ensure clean up can happen
|
|
290
|
+
resolveCancellable();
|
|
291
|
+
})];
|
|
289
292
|
}
|
|
290
293
|
});
|
|
291
294
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changesResultIterator.js","sourceRoot":"","sources":["../../../cloudant/features/changesResultIterator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6DAA4D;AAC5D,qDAA0D;AAC1D,yDAAkD;AAElD,6BAAiC;AAGjC,IAAK,yBAKJ;AALD,WAAK,yBAAyB;IAC5B,gBAAgB;IAChB,6EAAM,CAAA;IACN,2EAAK,CAAA;IACL,2EAAK,CAAA;AACP,CAAC,EALI,yBAAyB,KAAzB,yBAAyB,QAK7B;AAED;
|
|
1
|
+
{"version":3,"file":"changesResultIterator.js","sourceRoot":"","sources":["../../../cloudant/features/changesResultIterator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,6DAA4D;AAC5D,qDAA0D;AAC1D,yDAAkD;AAElD,6BAAiC;AAGjC,IAAK,yBAKJ;AALD,WAAK,yBAAyB;IAC5B,gBAAgB;IAChB,6EAAM,CAAA;IACN,2EAAK,CAAA;IACL,2EAAK,CAAA;AACP,CAAC,EALI,yBAAyB,KAAzB,yBAAyB,QAK7B;AAED;IAiDE,uCACE,MAAkB,EAClB,MAAyB,EACzB,IAAU,EACV,cAAuB;QAlDR,mBAAc,GAAG,IAAA,gBAAS,EAAC,UAAU,CAAC,CAAC;QAEvC,gBAAW,GAAG,+BAA+B,CAAC;QAI9C,eAAU,GAA6C;YACtE,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,SAAS;SACjB,CAAC;QAIe,WAAM,GAAG,IAAA,iCAAY,EAAC,mBAAmB,CAAC,CAAC;QAQ3C,cAAS,GAAW,GAAG,CAAC;QAExB,iBAAY,GAAW,IAAI,CAAC,KAAK,CAChD,IAAI,CAAC,IAAI,CAAC,yCAAmB,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC,CACjE,CAAC;QAMM,aAAQ,GAAiB,IA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CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;4CACrC,KAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;4CAC9D,OAAO,2BAAyB,CAAC;wCACnC,CAAC,CAAC,CAAC;iCACN;4BACH,CAAC,CAAC;iCACD,OAAO,CAAC;gCACP,KAAI,CAAC,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;gCAC9C,KAAI,CAAC,MAAM,GAAG,IAAI,CAAC;gCACnB,wDAAwD;gCACxD,kBAAkB,EAAE,CAAC;4BACvB,CAAC,CAAC,EAAC;;;;KACN;IACH,oCAAC;AAAD,CAAC,AA9QD,IA8QC;AA9QY,sEAA6B"}
|
package/cloudant/v1.d.ts
CHANGED
|
@@ -5562,7 +5562,7 @@ declare namespace CloudantV1 {
|
|
|
5562
5562
|
/** An array of event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance.
|
|
5563
5563
|
* "management" is a required element of this array.
|
|
5564
5564
|
*/
|
|
5565
|
-
types: PostActivityTrackerEventsConstants.Types | string[];
|
|
5565
|
+
types: PostActivityTrackerEventsConstants.Types[] | string[];
|
|
5566
5566
|
headers?: OutgoingHttpHeaders;
|
|
5567
5567
|
}
|
|
5568
5568
|
/** Constants for the `postActivityTrackerEvents` operation. */
|
|
@@ -5701,7 +5701,7 @@ declare namespace CloudantV1 {
|
|
|
5701
5701
|
/** An array of event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance.
|
|
5702
5702
|
* "management" is a required element of this array.
|
|
5703
5703
|
*/
|
|
5704
|
-
types: ActivityTrackerEvents.Constants.Types | string[];
|
|
5704
|
+
types: ActivityTrackerEvents.Constants.Types[] | string[];
|
|
5705
5705
|
}
|
|
5706
5706
|
namespace ActivityTrackerEvents {
|
|
5707
5707
|
namespace Constants {
|
|
@@ -7226,7 +7226,7 @@ declare namespace CloudantV1 {
|
|
|
7226
7226
|
/** User name. */
|
|
7227
7227
|
name: string;
|
|
7228
7228
|
/** List of user roles. */
|
|
7229
|
-
roles: UserContext.Constants.Roles | string[];
|
|
7229
|
+
roles: UserContext.Constants.Roles[] | string[];
|
|
7230
7230
|
}
|
|
7231
7231
|
namespace UserContext {
|
|
7232
7232
|
namespace Constants {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibm-cloud/cloudant",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "IBM Cloudant Node.js SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"node": "^18 || ^20"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@types/node": "18.18.
|
|
40
|
-
"ibm-cloud-sdk-core": "4.
|
|
39
|
+
"@types/node": "18.18.10",
|
|
40
|
+
"ibm-cloud-sdk-core": "4.2.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@types/jest": "29.5.
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "6.
|
|
45
|
-
"@typescript-eslint/parser": "6.
|
|
43
|
+
"@types/jest": "29.5.8",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "6.12.0",
|
|
45
|
+
"@typescript-eslint/parser": "6.12.0",
|
|
46
46
|
"dotenv": "16.3.1",
|
|
47
|
-
"eslint": "8.
|
|
47
|
+
"eslint": "8.54.0",
|
|
48
48
|
"eslint-config-airbnb-base": "15.0.0",
|
|
49
49
|
"eslint-config-airbnb-typescript": "17.1.0",
|
|
50
50
|
"eslint-config-prettier": "9.0.0",
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"eslint-plugin-header": "3.1.1",
|
|
53
53
|
"eslint-plugin-import": "2.29.0",
|
|
54
54
|
"eslint-plugin-jest": "27.6.0",
|
|
55
|
-
"eslint-plugin-jsdoc": "46.
|
|
55
|
+
"eslint-plugin-jsdoc": "46.9.0",
|
|
56
56
|
"eslint-plugin-node": "11.1.0",
|
|
57
57
|
"eslint-plugin-prettier": "5.0.0",
|
|
58
58
|
"jest": "29.7.0",
|
|
59
59
|
"jest-junit": "16.0.0",
|
|
60
|
-
"prettier": "3.0
|
|
61
|
-
"sinon": "17.0.
|
|
60
|
+
"prettier": "3.1.0",
|
|
61
|
+
"sinon": "17.0.1",
|
|
62
62
|
"ts-jest": "29.1.1",
|
|
63
63
|
"typedoc": "0.25.3",
|
|
64
64
|
"typescript": "5.2.2"
|