@ibm-cloud/cloudant 0.12.4 → 0.12.6
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 +648 -74
- package/cloudant/features/changesFollower.js +3 -2
- package/cloudant/features/changesFollower.js.map +1 -1
- package/cloudant/features/pagination/allDocsBasePageIterator.d.ts +29 -0
- package/cloudant/features/pagination/allDocsBasePageIterator.js +47 -0
- package/cloudant/features/pagination/allDocsBasePageIterator.js.map +1 -0
- package/cloudant/features/pagination/allDocsPageIterator.d.ts +21 -0
- package/cloudant/features/pagination/allDocsPageIterator.js +30 -0
- package/cloudant/features/pagination/allDocsPageIterator.js.map +1 -0
- package/cloudant/features/pagination/allDocsPartitionPageIterator.d.ts +21 -0
- package/cloudant/features/pagination/allDocsPartitionPageIterator.js +30 -0
- package/cloudant/features/pagination/allDocsPartitionPageIterator.js.map +1 -0
- package/cloudant/features/pagination/basePageIterator.d.ts +39 -0
- package/cloudant/features/pagination/basePageIterator.js +84 -0
- package/cloudant/features/pagination/basePageIterator.js.map +1 -0
- package/cloudant/features/pagination/bookmarkPageIterator.d.ts +25 -0
- package/cloudant/features/pagination/bookmarkPageIterator.js +37 -0
- package/cloudant/features/pagination/bookmarkPageIterator.js.map +1 -0
- package/cloudant/features/pagination/designDocsPageIterator.d.ts +21 -0
- package/cloudant/features/pagination/designDocsPageIterator.js +30 -0
- package/cloudant/features/pagination/designDocsPageIterator.js.map +1 -0
- package/cloudant/features/pagination/findBasePageIterator.d.ts +23 -0
- package/cloudant/features/pagination/findBasePageIterator.js +36 -0
- package/cloudant/features/pagination/findBasePageIterator.js.map +1 -0
- package/cloudant/features/pagination/findPageIterator.d.ts +21 -0
- package/cloudant/features/pagination/findPageIterator.js +30 -0
- package/cloudant/features/pagination/findPageIterator.js.map +1 -0
- package/cloudant/features/pagination/findPartitionPageIterator.d.ts +21 -0
- package/cloudant/features/pagination/findPartitionPageIterator.js +30 -0
- package/cloudant/features/pagination/findPartitionPageIterator.js.map +1 -0
- package/cloudant/features/pagination/iteratorPager.d.ts +32 -0
- package/cloudant/features/pagination/iteratorPager.js +58 -0
- package/cloudant/features/pagination/iteratorPager.js.map +1 -0
- package/cloudant/features/pagination/keyPageIterator.d.ts +33 -0
- package/cloudant/features/pagination/keyPageIterator.js +75 -0
- package/cloudant/features/pagination/keyPageIterator.js.map +1 -0
- package/cloudant/features/{changesResultItemStream.d.ts → pagination/pageIterator.d.ts} +4 -7
- package/cloudant/features/pagination/pageIterator.js +3 -0
- package/cloudant/features/pagination/pageIterator.js.map +1 -0
- package/cloudant/features/pagination/pager.d.ts +28 -0
- package/cloudant/features/pagination/pager.js +18 -0
- package/cloudant/features/pagination/pager.js.map +1 -0
- package/cloudant/features/pagination/pagination.d.ts +185 -0
- package/cloudant/features/pagination/pagination.js +148 -0
- package/cloudant/features/pagination/pagination.js.map +1 -0
- package/cloudant/features/pagination/searchBasePageIterator.d.ts +22 -0
- package/cloudant/features/pagination/searchBasePageIterator.js +30 -0
- package/cloudant/features/pagination/searchBasePageIterator.js.map +1 -0
- package/cloudant/features/pagination/searchPageIterator.d.ts +22 -0
- package/cloudant/features/pagination/searchPageIterator.js +40 -0
- package/cloudant/features/pagination/searchPageIterator.js.map +1 -0
- package/cloudant/features/pagination/searchPartitionPageIterator.d.ts +21 -0
- package/cloudant/features/pagination/searchPartitionPageIterator.js +30 -0
- package/cloudant/features/pagination/searchPartitionPageIterator.js.map +1 -0
- package/cloudant/features/pagination/viewBasePageIterator.d.ts +25 -0
- package/cloudant/features/pagination/viewBasePageIterator.js +57 -0
- package/cloudant/features/pagination/viewBasePageIterator.js.map +1 -0
- package/cloudant/features/pagination/viewPageIterator.d.ts +21 -0
- package/cloudant/features/pagination/viewPageIterator.js +30 -0
- package/cloudant/features/pagination/viewPageIterator.js.map +1 -0
- package/cloudant/features/pagination/viewPartitionPageIterator.d.ts +21 -0
- package/cloudant/features/pagination/viewPartitionPageIterator.js +30 -0
- package/cloudant/features/pagination/viewPartitionPageIterator.js.map +1 -0
- package/cloudant/features/stream.d.ts +4 -3
- package/cloudant/features/stream.js +6 -3
- package/cloudant/features/stream.js.map +1 -1
- package/index.d.ts +3 -1
- package/index.js +5 -2
- package/index.js.map +1 -1
- package/package.json +15 -15
- package/cloudant/features/changesResultItemStream.js +0 -40
- package/cloudant/features/changesResultItemStream.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../../../cloudant/features/pagination/pagination.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { default as CloudantV1, Response, SearchResult, SearchResultRow } from '../../v1';
|
|
17
|
+
import { BookmarkPageIterator } from './bookmarkPageIterator';
|
|
18
|
+
export declare abstract class SearchBasePageIterator<P extends CloudantV1.PostSearchParams | CloudantV1.PostPartitionSearchParams> extends BookmarkPageIterator<P, SearchResult, SearchResultRow> {
|
|
19
|
+
constructor(client: CloudantV1, params: P);
|
|
20
|
+
protected getItems(result: SearchResult): Array<SearchResultRow>;
|
|
21
|
+
protected abstract nextRequestFunction(): (params: P) => Promise<Response<SearchResult>>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.SearchBasePageIterator = void 0;
|
|
19
|
+
const bookmarkPageIterator_1 = require("./bookmarkPageIterator");
|
|
20
|
+
class SearchBasePageIterator extends bookmarkPageIterator_1.BookmarkPageIterator {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
22
|
+
constructor(client, params) {
|
|
23
|
+
super(client, params);
|
|
24
|
+
}
|
|
25
|
+
getItems(result) {
|
|
26
|
+
return result.rows;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.SearchBasePageIterator = SearchBasePageIterator;
|
|
30
|
+
//# sourceMappingURL=searchBasePageIterator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchBasePageIterator.js","sourceRoot":"","sources":["../../../../cloudant/features/pagination/searchBasePageIterator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,iEAA8D;AAE9D,MAAsB,sBAEpB,SAAQ,2CAAsD;IAC9D,qEAAqE;IACrE,YAAY,MAAkB,EAAE,MAAS;QACvC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,CAAC;IAES,QAAQ,CAAC,MAAoB;QACrC,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;CAIF;AAdD,wDAcC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { default as CloudantV1, PostSearchParams, Response, SearchResult } from '../../v1';
|
|
17
|
+
import { SearchBasePageIterator } from './searchBasePageIterator';
|
|
18
|
+
export declare class SearchPageIterator extends SearchBasePageIterator<PostSearchParams> {
|
|
19
|
+
constructor(client: CloudantV1, params: PostSearchParams);
|
|
20
|
+
protected nextRequestFunction(): (params: PostSearchParams) => Promise<Response<SearchResult>>;
|
|
21
|
+
protected validate(params: PostSearchParams): void;
|
|
22
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.SearchPageIterator = void 0;
|
|
19
|
+
const searchBasePageIterator_1 = require("./searchBasePageIterator");
|
|
20
|
+
class SearchPageIterator extends searchBasePageIterator_1.SearchBasePageIterator {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
22
|
+
constructor(client, params) {
|
|
23
|
+
super(client, params);
|
|
24
|
+
}
|
|
25
|
+
nextRequestFunction() {
|
|
26
|
+
return this.client.postSearch;
|
|
27
|
+
}
|
|
28
|
+
validate(params) {
|
|
29
|
+
super.validate(params);
|
|
30
|
+
this.validateParamsAbsent(params, [
|
|
31
|
+
'counts',
|
|
32
|
+
'group_field',
|
|
33
|
+
'group_limit',
|
|
34
|
+
'group_sort',
|
|
35
|
+
'ranges',
|
|
36
|
+
]);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.SearchPageIterator = SearchPageIterator;
|
|
40
|
+
//# sourceMappingURL=searchPageIterator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchPageIterator.js","sourceRoot":"","sources":["../../../../cloudant/features/pagination/searchPageIterator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,qEAAkE;AAElE,MAAa,kBAAmB,SAAQ,+CAAwC;IAC9E,qEAAqE;IACrE,YAAY,MAAkB,EAAE,MAAwB;QACtD,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,CAAC;IAES,mBAAmB;QAG3B,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;IAChC,CAAC;IAES,QAAQ,CAAC,MAAwB;QACzC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACvB,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE;YAChC,QAAQ;YACR,aAAa;YACb,aAAa;YACb,YAAY;YACZ,QAAQ;SACT,CAAC,CAAC;IACL,CAAC;CACF;AAtBD,gDAsBC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { default as CloudantV1, PostPartitionSearchParams, Response, SearchResult } from '../../v1';
|
|
17
|
+
import { SearchBasePageIterator } from './searchBasePageIterator';
|
|
18
|
+
export declare class SearchPartitionPageIterator extends SearchBasePageIterator<PostPartitionSearchParams> {
|
|
19
|
+
constructor(client: CloudantV1, params: PostPartitionSearchParams);
|
|
20
|
+
protected nextRequestFunction(): (params: PostPartitionSearchParams) => Promise<Response<SearchResult>>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.SearchPartitionPageIterator = void 0;
|
|
19
|
+
const searchBasePageIterator_1 = require("./searchBasePageIterator");
|
|
20
|
+
class SearchPartitionPageIterator extends searchBasePageIterator_1.SearchBasePageIterator {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
22
|
+
constructor(client, params) {
|
|
23
|
+
super(client, params);
|
|
24
|
+
}
|
|
25
|
+
nextRequestFunction() {
|
|
26
|
+
return this.client.postPartitionSearch;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.SearchPartitionPageIterator = SearchPartitionPageIterator;
|
|
30
|
+
//# sourceMappingURL=searchPartitionPageIterator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"searchPartitionPageIterator.js","sourceRoot":"","sources":["../../../../cloudant/features/pagination/searchPartitionPageIterator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,qEAAkE;AAElE,MAAa,2BAA4B,SAAQ,+CAAiD;IAChG,qEAAqE;IACrE,YAAY,MAAkB,EAAE,MAAiC;QAC/D,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,CAAC;IAES,mBAAmB;QAG3B,OAAO,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC;IACzC,CAAC;CACF;AAXD,kEAWC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { default as CloudantV1, Response, ViewResult, ViewResultRow } from '../../v1';
|
|
17
|
+
import { KeyPageIterator } from './keyPageIterator';
|
|
18
|
+
export declare abstract class ViewBasePageIterator<P extends CloudantV1.PostViewParams | CloudantV1.PostPartitionViewParams> extends KeyPageIterator<any, P, ViewResult, ViewResultRow> {
|
|
19
|
+
constructor(client: CloudantV1, params: P);
|
|
20
|
+
protected getItems(result: ViewResult): Array<ViewResultRow>;
|
|
21
|
+
protected abstract nextRequestFunction(): (params: P) => Promise<Response<ViewResult>>;
|
|
22
|
+
protected setNextKeyId(params: P, startKeyDocId: string): void;
|
|
23
|
+
protected checkBoundary(penultimateItem: ViewResultRow, lastItem: ViewResultRow): string;
|
|
24
|
+
protected getValidateParamsAbsentErrorMessage(paramName: any): string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ViewBasePageIterator = void 0;
|
|
19
|
+
const keyPageIterator_1 = require("./keyPageIterator");
|
|
20
|
+
class ViewBasePageIterator extends keyPageIterator_1.KeyPageIterator {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
22
|
+
constructor(client, params) {
|
|
23
|
+
super(client, params);
|
|
24
|
+
}
|
|
25
|
+
getItems(result) {
|
|
26
|
+
return result.rows;
|
|
27
|
+
}
|
|
28
|
+
setNextKeyId(params, startKeyDocId) {
|
|
29
|
+
params.startKeyDocId = startKeyDocId;
|
|
30
|
+
}
|
|
31
|
+
checkBoundary(penultimateItem, lastItem) {
|
|
32
|
+
const penultimateId = penultimateItem.id;
|
|
33
|
+
const lastId = lastItem.id;
|
|
34
|
+
if (penultimateId === lastId) {
|
|
35
|
+
// ID's are the same, check the keys
|
|
36
|
+
const penultimateKey = penultimateItem.key;
|
|
37
|
+
const lastKey = lastItem.key;
|
|
38
|
+
// Check reference equality first (e.g. null)
|
|
39
|
+
// Then check values
|
|
40
|
+
if (penultimateKey === lastKey ||
|
|
41
|
+
(penultimateKey !== null && penultimateKey == lastKey)) {
|
|
42
|
+
// Identical keys, set an error message
|
|
43
|
+
return `Cannot paginate on a boundary containing identical keys '${lastKey}' and document IDs '${lastId}'`;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
getValidateParamsAbsentErrorMessage(paramName) {
|
|
49
|
+
let errorMsg = super.getValidateParamsAbsentErrorMessage(paramName);
|
|
50
|
+
if (paramName === 'key') {
|
|
51
|
+
errorMsg = `${errorMsg} Use 'start_key' and 'end_key' instead.`;
|
|
52
|
+
}
|
|
53
|
+
return errorMsg;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.ViewBasePageIterator = ViewBasePageIterator;
|
|
57
|
+
//# sourceMappingURL=viewBasePageIterator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewBasePageIterator.js","sourceRoot":"","sources":["../../../../cloudant/features/pagination/viewBasePageIterator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,uDAAoD;AAEpD,MAAsB,oBAEpB,SAAQ,iCAAkD;IAC1D,qEAAqE;IACrE,YAAY,MAAkB,EAAE,MAAS;QACvC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,CAAC;IAES,QAAQ,CAAC,MAAkB;QACnC,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IAKS,YAAY,CAAC,MAAS,EAAE,aAAqB;QACrD,MAAM,CAAC,aAAa,GAAG,aAAa,CAAC;IACvC,CAAC;IAES,aAAa,CACrB,eAA8B,EAC9B,QAAuB;QAEvB,MAAM,aAAa,GAAW,eAAe,CAAC,EAAE,CAAC;QACjD,MAAM,MAAM,GAAW,QAAQ,CAAC,EAAE,CAAC;QACnC,IAAI,aAAa,KAAK,MAAM,EAAE,CAAC;YAC7B,oCAAoC;YACpC,MAAM,cAAc,GAAQ,eAAe,CAAC,GAAG,CAAC;YAChD,MAAM,OAAO,GAAQ,QAAQ,CAAC,GAAG,CAAC;YAClC,6CAA6C;YAC7C,oBAAoB;YACpB,IACE,cAAc,KAAK,OAAO;gBAC1B,CAAC,cAAc,KAAK,IAAI,IAAI,cAAc,IAAI,OAAO,CAAC,EACtD,CAAC;gBACD,uCAAuC;gBACvC,OAAO,4DAA4D,OAAO,uBAAuB,MAAM,GAAG,CAAC;YAC7G,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACS,mCAAmC,CAAC,SAAS;QACrD,IAAI,QAAQ,GAAG,KAAK,CAAC,mCAAmC,CAAC,SAAS,CAAC,CAAC;QACpE,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;YACxB,QAAQ,GAAG,GAAG,QAAQ,yCAAyC,CAAC;QAClE,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAhDD,oDAgDC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { default as CloudantV1, PostViewParams, Response, ViewResult } from '../../v1';
|
|
17
|
+
import { ViewBasePageIterator } from './viewBasePageIterator';
|
|
18
|
+
export declare class ViewPageIterator extends ViewBasePageIterator<PostViewParams> {
|
|
19
|
+
constructor(client: CloudantV1, params: PostViewParams);
|
|
20
|
+
protected nextRequestFunction(): (params: PostViewParams) => Promise<Response<ViewResult>>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ViewPageIterator = void 0;
|
|
19
|
+
const viewBasePageIterator_1 = require("./viewBasePageIterator");
|
|
20
|
+
class ViewPageIterator extends viewBasePageIterator_1.ViewBasePageIterator {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
22
|
+
constructor(client, params) {
|
|
23
|
+
super(client, params);
|
|
24
|
+
}
|
|
25
|
+
nextRequestFunction() {
|
|
26
|
+
return this.client.postView;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ViewPageIterator = ViewPageIterator;
|
|
30
|
+
//# sourceMappingURL=viewPageIterator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewPageIterator.js","sourceRoot":"","sources":["../../../../cloudant/features/pagination/viewPageIterator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,iEAA8D;AAE9D,MAAa,gBAAiB,SAAQ,2CAAoC;IACxE,qEAAqE;IACrE,YAAY,MAAkB,EAAE,MAAsB;QACpD,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,CAAC;IAES,mBAAmB;QAG3B,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;IAC9B,CAAC;CACF;AAXD,4CAWC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { default as CloudantV1, PostPartitionViewParams, Response, ViewResult } from '../../v1';
|
|
17
|
+
import { ViewBasePageIterator } from './viewBasePageIterator';
|
|
18
|
+
export declare class ViewPartitionPageIterator extends ViewBasePageIterator<PostPartitionViewParams> {
|
|
19
|
+
constructor(client: CloudantV1, params: PostPartitionViewParams);
|
|
20
|
+
protected nextRequestFunction(): (params: PostPartitionViewParams) => Promise<Response<ViewResult>>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* © Copyright IBM Corporation 2025. All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ViewPartitionPageIterator = void 0;
|
|
19
|
+
const viewBasePageIterator_1 = require("./viewBasePageIterator");
|
|
20
|
+
class ViewPartitionPageIterator extends viewBasePageIterator_1.ViewBasePageIterator {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
22
|
+
constructor(client, params) {
|
|
23
|
+
super(client, params);
|
|
24
|
+
}
|
|
25
|
+
nextRequestFunction() {
|
|
26
|
+
return this.client.postPartitionView;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ViewPartitionPageIterator = ViewPartitionPageIterator;
|
|
30
|
+
//# sourceMappingURL=viewPartitionPageIterator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"viewPartitionPageIterator.js","sourceRoot":"","sources":["../../../../cloudant/features/pagination/viewPartitionPageIterator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAQH,iEAA8D;AAE9D,MAAa,yBAA0B,SAAQ,2CAA6C;IAC1F,qEAAqE;IACrE,YAAY,MAAkB,EAAE,MAA+B;QAC7D,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,CAAC;IAES,mBAAmB;QAG3B,OAAO,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC;IACvC,CAAC;CACF;AAXD,8DAWC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* © Copyright IBM Corporation 2022. All Rights Reserved.
|
|
2
|
+
* © Copyright IBM Corporation 2022, 2025. All Rights Reserved.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
export declare class Stream<T> extends
|
|
16
|
+
import { PassThrough, TransformCallback, TransformOptions } from 'node:stream';
|
|
17
|
+
export declare class Stream<T> extends PassThrough {
|
|
18
18
|
constructor(opts?: TransformOptions);
|
|
19
19
|
push(chunk: T, encoding?: BufferEncoding): boolean;
|
|
20
20
|
read(size?: number): T;
|
|
21
|
+
_transform(chunk: T, encoding: BufferEncoding, callback: TransformCallback): void;
|
|
21
22
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* © Copyright IBM Corporation 2022. All Rights Reserved.
|
|
3
|
+
* © Copyright IBM Corporation 2022, 2025. 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.
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.Stream = void 0;
|
|
19
19
|
const node_stream_1 = require("node:stream");
|
|
20
|
-
class Stream extends node_stream_1.
|
|
20
|
+
class Stream extends node_stream_1.PassThrough {
|
|
21
21
|
constructor(opts) {
|
|
22
22
|
super({
|
|
23
23
|
...opts,
|
|
@@ -26,11 +26,14 @@ class Stream extends node_stream_1.Transform {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
push(chunk, encoding) {
|
|
29
|
-
return super.push(chunk);
|
|
29
|
+
return super.push(chunk, encoding);
|
|
30
30
|
}
|
|
31
31
|
read(size) {
|
|
32
32
|
return super.read(size);
|
|
33
33
|
}
|
|
34
|
+
_transform(chunk, encoding, callback) {
|
|
35
|
+
super._transform(chunk, encoding, callback);
|
|
36
|
+
}
|
|
34
37
|
}
|
|
35
38
|
exports.Stream = Stream;
|
|
36
39
|
//# sourceMappingURL=stream.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../cloudant/features/stream.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../cloudant/features/stream.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,6CAA+E;AAE/E,MAAa,MAAU,SAAQ,yBAAW;IACxC,YAAY,IAAuB;QACjC,KAAK,CAAC;YACJ,GAAG,IAAI;YACP,UAAU,EAAE,IAAI,EAAE,yDAAyD;YAC3E,aAAa,EAAE,CAAC;SACjB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,CAAC,KAAQ,EAAE,QAAyB;QACtC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED,IAAI,CAAC,IAAa;QAChB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAED,UAAU,CAAC,KAAQ,EAAE,QAAwB,EAAE,QAA2B;QACxE,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC;CACF;AApBD,wBAoBC"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* © Copyright IBM Corporation 2020. All Rights Reserved.
|
|
2
|
+
* © Copyright IBM Corporation 2020, 2025. All Rights Reserved.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -21,3 +21,5 @@ export { CloudantV1 };
|
|
|
21
21
|
export { BasicAuthenticator, IamAuthenticator, CouchdbSessionAuthenticator, CouchdbSessionAuthenticatorOptions, } from './auth';
|
|
22
22
|
export { ChangesFollower } from './cloudant/features/changesFollower';
|
|
23
23
|
export { Stream } from './cloudant/features/stream';
|
|
24
|
+
export { Pagination, PagerType, } from './cloudant/features/pagination/pagination';
|
|
25
|
+
export { Pager } from './cloudant/features/pagination/pager';
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* © Copyright IBM Corporation 2020. All Rights Reserved.
|
|
3
|
+
* © Copyright IBM Corporation 2020, 2025. 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.
|
|
@@ -18,7 +18,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.Stream = exports.ChangesFollower = exports.CouchdbSessionAuthenticator = exports.IamAuthenticator = exports.BasicAuthenticator = exports.CloudantV1 = void 0;
|
|
21
|
+
exports.PagerType = exports.Pagination = exports.Stream = exports.ChangesFollower = exports.CouchdbSessionAuthenticator = exports.IamAuthenticator = exports.BasicAuthenticator = exports.CloudantV1 = void 0;
|
|
22
22
|
/**
|
|
23
23
|
* @module cloudant-node-sdk
|
|
24
24
|
*/
|
|
@@ -32,4 +32,7 @@ var changesFollower_1 = require("./cloudant/features/changesFollower");
|
|
|
32
32
|
Object.defineProperty(exports, "ChangesFollower", { enumerable: true, get: function () { return changesFollower_1.ChangesFollower; } });
|
|
33
33
|
var stream_1 = require("./cloudant/features/stream");
|
|
34
34
|
Object.defineProperty(exports, "Stream", { enumerable: true, get: function () { return stream_1.Stream; } });
|
|
35
|
+
var pagination_1 = require("./cloudant/features/pagination/pagination");
|
|
36
|
+
Object.defineProperty(exports, "Pagination", { enumerable: true, get: function () { return pagination_1.Pagination; } });
|
|
37
|
+
Object.defineProperty(exports, "PagerType", { enumerable: true, get: function () { return pagination_1.PagerType; } });
|
|
35
38
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;AAEH;;GAEG;AAEH,uDAAsD;AAC7C,2FADW,YAAU,OACX;AAEnB,+BAKgB;AAJd,0GAAA,kBAAkB,OAAA;AAClB,wGAAA,gBAAgB,OAAA;AAChB,mHAAA,2BAA2B,OAAA;AAI7B,uEAAsE;AAA7D,kHAAA,eAAe,OAAA;AACxB,qDAAoD;AAA3C,gGAAA,MAAM,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;AAEH;;GAEG;AAEH,uDAAsD;AAC7C,2FADW,YAAU,OACX;AAEnB,+BAKgB;AAJd,0GAAA,kBAAkB,OAAA;AAClB,wGAAA,gBAAgB,OAAA;AAChB,mHAAA,2BAA2B,OAAA;AAI7B,uEAAsE;AAA7D,kHAAA,eAAe,OAAA;AACxB,qDAAoD;AAA3C,gGAAA,MAAM,OAAA;AACf,wEAGmD;AAFjD,wGAAA,UAAU,OAAA;AACV,uGAAA,SAAS,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibm-cloud/cloudant",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"description": "IBM Cloudant Node.js SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -40,33 +40,33 @@
|
|
|
40
40
|
"node": "^20 || ^22"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@types/node": "20.
|
|
44
|
-
"ibm-cloud-sdk-core": "5.4.
|
|
43
|
+
"@types/node": "20.19.9",
|
|
44
|
+
"ibm-cloud-sdk-core": "5.4.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@ibm-cloud/sdk-test-utilities": "^1.0.0",
|
|
48
48
|
"@types/extend": "3.0.4",
|
|
49
|
-
"@types/jest": "
|
|
49
|
+
"@types/jest": "30.0.0",
|
|
50
50
|
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
51
51
|
"@typescript-eslint/parser": "7.18.0",
|
|
52
|
-
"dotenv": "
|
|
52
|
+
"dotenv": "17.2.0",
|
|
53
53
|
"eslint": "8.57.0",
|
|
54
54
|
"eslint-config-airbnb-base": "15.0.0",
|
|
55
55
|
"eslint-config-prettier": "10.1.1",
|
|
56
56
|
"eslint-import-resolver-typescript": "4.4.1",
|
|
57
57
|
"eslint-plugin-header": "3.1.1",
|
|
58
|
-
"eslint-plugin-import": "2.
|
|
59
|
-
"eslint-plugin-jest": "28.
|
|
60
|
-
"eslint-plugin-jsdoc": "
|
|
58
|
+
"eslint-plugin-import": "2.32.0",
|
|
59
|
+
"eslint-plugin-jest": "28.14.0",
|
|
60
|
+
"eslint-plugin-jsdoc": "51.4.0",
|
|
61
61
|
"eslint-plugin-node": "11.1.0",
|
|
62
|
-
"eslint-plugin-prettier": "5.
|
|
63
|
-
"jest": "
|
|
62
|
+
"eslint-plugin-prettier": "5.5.0",
|
|
63
|
+
"jest": "30.0.5",
|
|
64
64
|
"jest-junit": "16.0.0",
|
|
65
|
-
"nock": "14.0.
|
|
66
|
-
"prettier": "3.
|
|
67
|
-
"sinon": "
|
|
68
|
-
"ts-jest": "29.
|
|
69
|
-
"typedoc": "0.28.
|
|
65
|
+
"nock": "14.0.6",
|
|
66
|
+
"prettier": "3.6.2",
|
|
67
|
+
"sinon": "21.0.0",
|
|
68
|
+
"ts-jest": "29.4.0",
|
|
69
|
+
"typedoc": "0.28.7",
|
|
70
70
|
"typescript": "5.8.3"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* © Copyright IBM Corporation 2022. All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.ChangesResultItemStream = void 0;
|
|
19
|
-
const stream_1 = require("./stream");
|
|
20
|
-
const ibm_cloud_sdk_core_1 = require("ibm-cloud-sdk-core");
|
|
21
|
-
class ChangesResultItemStream extends stream_1.Stream {
|
|
22
|
-
_transform(chunk, encoding, callback) {
|
|
23
|
-
const validationError = this.getValidationError(chunk);
|
|
24
|
-
if (validationError !== null) {
|
|
25
|
-
this.destroy(validationError);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
for (let result of chunk.results) {
|
|
29
|
-
this.push(result);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
callback();
|
|
33
|
-
}
|
|
34
|
-
getValidationError(params) {
|
|
35
|
-
const requiredParams = ['lastSeq', 'pending', 'results'];
|
|
36
|
-
return (0, ibm_cloud_sdk_core_1.validateParams)(params, requiredParams, requiredParams);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.ChangesResultItemStream = ChangesResultItemStream;
|
|
40
|
-
//# sourceMappingURL=changesResultItemStream.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"changesResultItemStream.js","sourceRoot":"","sources":["../../../cloudant/features/changesResultItemStream.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qCAAkC;AAElC,2DAAoD;AAGpD,MAAa,uBAAwB,SAAQ,eAAoC;IAC/E,UAAU,CACR,KAA+B,EAC/B,QAAwB,EACxB,QAA2B;QAE3B,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACvD,IAAI,eAAe,KAAK,IAAI,EAAE,CAAC;YAC7B,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAChC,CAAC;aAAM,CAAC;YACN,KAAK,IAAI,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;gBACjC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;QACD,QAAQ,EAAE,CAAC;IACb,CAAC;IAEO,kBAAkB,CAAC,MAAM;QAC/B,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;QACzD,OAAO,IAAA,mCAAc,EAAC,MAAM,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;IAChE,CAAC;CACF;AArBD,0DAqBC"}
|