@aws-sdk/client-iottwinmaker 3.44.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/CHANGELOG.md +11 -0
- package/LICENSE +201 -0
- package/README.md +212 -0
- package/dist-cjs/IoTTwinMaker.js +397 -0
- package/dist-cjs/IoTTwinMakerClient.js +35 -0
- package/dist-cjs/commands/BatchPutPropertyValuesCommand.js +36 -0
- package/dist-cjs/commands/CreateComponentTypeCommand.js +36 -0
- package/dist-cjs/commands/CreateEntityCommand.js +36 -0
- package/dist-cjs/commands/CreateSceneCommand.js +36 -0
- package/dist-cjs/commands/CreateWorkspaceCommand.js +36 -0
- package/dist-cjs/commands/DeleteComponentTypeCommand.js +36 -0
- package/dist-cjs/commands/DeleteEntityCommand.js +36 -0
- package/dist-cjs/commands/DeleteSceneCommand.js +36 -0
- package/dist-cjs/commands/DeleteWorkspaceCommand.js +36 -0
- package/dist-cjs/commands/GetComponentTypeCommand.js +36 -0
- package/dist-cjs/commands/GetEntityCommand.js +36 -0
- package/dist-cjs/commands/GetPropertyValueCommand.js +36 -0
- package/dist-cjs/commands/GetPropertyValueHistoryCommand.js +36 -0
- package/dist-cjs/commands/GetSceneCommand.js +36 -0
- package/dist-cjs/commands/GetWorkspaceCommand.js +36 -0
- package/dist-cjs/commands/ListComponentTypesCommand.js +36 -0
- package/dist-cjs/commands/ListEntitiesCommand.js +36 -0
- package/dist-cjs/commands/ListScenesCommand.js +36 -0
- package/dist-cjs/commands/ListTagsForResourceCommand.js +36 -0
- package/dist-cjs/commands/ListWorkspacesCommand.js +36 -0
- package/dist-cjs/commands/TagResourceCommand.js +36 -0
- package/dist-cjs/commands/UntagResourceCommand.js +36 -0
- package/dist-cjs/commands/UpdateComponentTypeCommand.js +36 -0
- package/dist-cjs/commands/UpdateEntityCommand.js +36 -0
- package/dist-cjs/commands/UpdateSceneCommand.js +36 -0
- package/dist-cjs/commands/UpdateWorkspaceCommand.js +36 -0
- package/dist-cjs/commands/index.js +29 -0
- package/dist-cjs/endpoints.js +130 -0
- package/dist-cjs/index.js +8 -0
- package/dist-cjs/models/index.js +4 -0
- package/dist-cjs/models/models_0.js +659 -0
- package/dist-cjs/pagination/GetPropertyValueHistoryPaginator.js +35 -0
- package/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist-cjs/pagination/ListComponentTypesPaginator.js +35 -0
- package/dist-cjs/pagination/ListEntitiesPaginator.js +35 -0
- package/dist-cjs/pagination/ListScenesPaginator.js +35 -0
- package/dist-cjs/pagination/ListWorkspacesPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +9 -0
- package/dist-cjs/protocols/Aws_restJson1.js +4460 -0
- package/dist-cjs/runtimeConfig.browser.js +40 -0
- package/dist-cjs/runtimeConfig.js +44 -0
- package/dist-cjs/runtimeConfig.native.js +16 -0
- package/dist-cjs/runtimeConfig.shared.js +17 -0
- package/dist-es/IoTTwinMaker.js +400 -0
- package/dist-es/IoTTwinMakerClient.js +37 -0
- package/dist-es/commands/BatchPutPropertyValuesCommand.js +39 -0
- package/dist-es/commands/CreateComponentTypeCommand.js +39 -0
- package/dist-es/commands/CreateEntityCommand.js +39 -0
- package/dist-es/commands/CreateSceneCommand.js +39 -0
- package/dist-es/commands/CreateWorkspaceCommand.js +39 -0
- package/dist-es/commands/DeleteComponentTypeCommand.js +39 -0
- package/dist-es/commands/DeleteEntityCommand.js +39 -0
- package/dist-es/commands/DeleteSceneCommand.js +39 -0
- package/dist-es/commands/DeleteWorkspaceCommand.js +39 -0
- package/dist-es/commands/GetComponentTypeCommand.js +39 -0
- package/dist-es/commands/GetEntityCommand.js +39 -0
- package/dist-es/commands/GetPropertyValueCommand.js +39 -0
- package/dist-es/commands/GetPropertyValueHistoryCommand.js +39 -0
- package/dist-es/commands/GetSceneCommand.js +39 -0
- package/dist-es/commands/GetWorkspaceCommand.js +39 -0
- package/dist-es/commands/ListComponentTypesCommand.js +39 -0
- package/dist-es/commands/ListEntitiesCommand.js +39 -0
- package/dist-es/commands/ListScenesCommand.js +39 -0
- package/dist-es/commands/ListTagsForResourceCommand.js +39 -0
- package/dist-es/commands/ListWorkspacesCommand.js +39 -0
- package/dist-es/commands/TagResourceCommand.js +39 -0
- package/dist-es/commands/UntagResourceCommand.js +39 -0
- package/dist-es/commands/UpdateComponentTypeCommand.js +39 -0
- package/dist-es/commands/UpdateEntityCommand.js +39 -0
- package/dist-es/commands/UpdateSceneCommand.js +39 -0
- package/dist-es/commands/UpdateWorkspaceCommand.js +39 -0
- package/dist-es/commands/index.js +26 -0
- package/dist-es/endpoints.js +126 -0
- package/dist-es/index.js +5 -0
- package/dist-es/models/index.js +1 -0
- package/dist-es/models/models_0.js +469 -0
- package/dist-es/pagination/GetPropertyValueHistoryPaginator.js +74 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListComponentTypesPaginator.js +74 -0
- package/dist-es/pagination/ListEntitiesPaginator.js +74 -0
- package/dist-es/pagination/ListScenesPaginator.js +74 -0
- package/dist-es/pagination/ListWorkspacesPaginator.js +74 -0
- package/dist-es/pagination/index.js +6 -0
- package/dist-es/protocols/Aws_restJson1.js +4853 -0
- package/dist-es/runtimeConfig.browser.js +17 -0
- package/dist-es/runtimeConfig.js +21 -0
- package/dist-es/runtimeConfig.native.js +8 -0
- package/dist-es/runtimeConfig.shared.js +13 -0
- package/dist-types/IoTTwinMaker.d.ts +206 -0
- package/dist-types/IoTTwinMakerClient.d.ts +175 -0
- package/dist-types/commands/BatchPutPropertyValuesCommand.d.ts +35 -0
- package/dist-types/commands/CreateComponentTypeCommand.d.ts +40 -0
- package/dist-types/commands/CreateEntityCommand.d.ts +35 -0
- package/dist-types/commands/CreateSceneCommand.d.ts +35 -0
- package/dist-types/commands/CreateWorkspaceCommand.d.ts +35 -0
- package/dist-types/commands/DeleteComponentTypeCommand.d.ts +35 -0
- package/dist-types/commands/DeleteEntityCommand.d.ts +35 -0
- package/dist-types/commands/DeleteSceneCommand.d.ts +35 -0
- package/dist-types/commands/DeleteWorkspaceCommand.d.ts +35 -0
- package/dist-types/commands/GetComponentTypeCommand.d.ts +35 -0
- package/dist-types/commands/GetEntityCommand.d.ts +35 -0
- package/dist-types/commands/GetPropertyValueCommand.d.ts +36 -0
- package/dist-types/commands/GetPropertyValueHistoryCommand.d.ts +37 -0
- package/dist-types/commands/GetSceneCommand.d.ts +35 -0
- package/dist-types/commands/GetWorkspaceCommand.d.ts +35 -0
- package/dist-types/commands/ListComponentTypesCommand.d.ts +35 -0
- package/dist-types/commands/ListEntitiesCommand.d.ts +35 -0
- package/dist-types/commands/ListScenesCommand.d.ts +35 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +35 -0
- package/dist-types/commands/ListWorkspacesCommand.d.ts +35 -0
- package/dist-types/commands/TagResourceCommand.d.ts +35 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +35 -0
- package/dist-types/commands/UpdateComponentTypeCommand.d.ts +35 -0
- package/dist-types/commands/UpdateEntityCommand.d.ts +35 -0
- package/dist-types/commands/UpdateSceneCommand.d.ts +35 -0
- package/dist-types/commands/UpdateWorkspaceCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +26 -0
- package/dist-types/endpoints.d.ts +2 -0
- package/dist-types/index.d.ts +5 -0
- package/dist-types/models/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +2269 -0
- package/dist-types/pagination/GetPropertyValueHistoryPaginator.d.ts +4 -0
- package/dist-types/pagination/Interfaces.d.ts +6 -0
- package/dist-types/pagination/ListComponentTypesPaginator.d.ts +4 -0
- package/dist-types/pagination/ListEntitiesPaginator.d.ts +4 -0
- package/dist-types/pagination/ListScenesPaginator.d.ts +4 -0
- package/dist-types/pagination/ListWorkspacesPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +6 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +80 -0
- package/dist-types/runtimeConfig.browser.d.ts +39 -0
- package/dist-types/runtimeConfig.d.ts +39 -0
- package/dist-types/runtimeConfig.native.d.ts +38 -0
- package/dist-types/runtimeConfig.shared.d.ts +13 -0
- package/dist-types/ts3.4/IoTTwinMaker.d.ts +135 -0
- package/dist-types/ts3.4/IoTTwinMakerClient.d.ts +97 -0
- package/dist-types/ts3.4/commands/BatchPutPropertyValuesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateComponentTypeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateEntityCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateSceneCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateWorkspaceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteComponentTypeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteEntityCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteSceneCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteWorkspaceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetComponentTypeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetEntityCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetPropertyValueCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetPropertyValueHistoryCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetSceneCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetWorkspaceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListComponentTypesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListEntitiesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListScenesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListWorkspacesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateComponentTypeCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateEntityCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateSceneCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateWorkspaceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +26 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +5 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +1382 -0
- package/dist-types/ts3.4/pagination/GetPropertyValueHistoryPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
- package/dist-types/ts3.4/pagination/ListComponentTypesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListEntitiesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListScenesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListWorkspacesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +6 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +80 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +36 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +94 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
|
+
import { ListEntitiesCommand, } from "../commands/ListEntitiesCommand";
|
|
3
|
+
import { IoTTwinMaker } from "../IoTTwinMaker";
|
|
4
|
+
import { IoTTwinMakerClient } from "../IoTTwinMakerClient";
|
|
5
|
+
var makePagedClientRequest = function (client, input) {
|
|
6
|
+
var args = [];
|
|
7
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
+
args[_i - 2] = arguments[_i];
|
|
9
|
+
}
|
|
10
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
+
return __generator(this, function (_a) {
|
|
12
|
+
switch (_a.label) {
|
|
13
|
+
case 0: return [4, client.send.apply(client, __spreadArray([new ListEntitiesCommand(input)], __read(args)))];
|
|
14
|
+
case 1: return [2, _a.sent()];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
var makePagedRequest = function (client, input) {
|
|
20
|
+
var args = [];
|
|
21
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
+
args[_i - 2] = arguments[_i];
|
|
23
|
+
}
|
|
24
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
+
return __generator(this, function (_a) {
|
|
26
|
+
switch (_a.label) {
|
|
27
|
+
case 0: return [4, client.listEntities.apply(client, __spreadArray([input], __read(args)))];
|
|
28
|
+
case 1: return [2, _a.sent()];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
export function paginateListEntities(config, input) {
|
|
34
|
+
var additionalArguments = [];
|
|
35
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
36
|
+
additionalArguments[_i - 2] = arguments[_i];
|
|
37
|
+
}
|
|
38
|
+
return __asyncGenerator(this, arguments, function paginateListEntities_1() {
|
|
39
|
+
var token, hasNext, page;
|
|
40
|
+
return __generator(this, function (_a) {
|
|
41
|
+
switch (_a.label) {
|
|
42
|
+
case 0:
|
|
43
|
+
token = config.startingToken || undefined;
|
|
44
|
+
hasNext = true;
|
|
45
|
+
_a.label = 1;
|
|
46
|
+
case 1:
|
|
47
|
+
if (!hasNext) return [3, 9];
|
|
48
|
+
input.nextToken = token;
|
|
49
|
+
input["maxResults"] = config.pageSize;
|
|
50
|
+
if (!(config.client instanceof IoTTwinMaker)) return [3, 3];
|
|
51
|
+
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
|
|
52
|
+
case 2:
|
|
53
|
+
page = _a.sent();
|
|
54
|
+
return [3, 6];
|
|
55
|
+
case 3:
|
|
56
|
+
if (!(config.client instanceof IoTTwinMakerClient)) return [3, 5];
|
|
57
|
+
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
|
|
58
|
+
case 4:
|
|
59
|
+
page = _a.sent();
|
|
60
|
+
return [3, 6];
|
|
61
|
+
case 5: throw new Error("Invalid client, expected IoTTwinMaker | IoTTwinMakerClient");
|
|
62
|
+
case 6: return [4, __await(page)];
|
|
63
|
+
case 7: return [4, _a.sent()];
|
|
64
|
+
case 8:
|
|
65
|
+
_a.sent();
|
|
66
|
+
token = page.nextToken;
|
|
67
|
+
hasNext = !!token;
|
|
68
|
+
return [3, 1];
|
|
69
|
+
case 9: return [4, __await(undefined)];
|
|
70
|
+
case 10: return [2, _a.sent()];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
|
+
import { ListScenesCommand } from "../commands/ListScenesCommand";
|
|
3
|
+
import { IoTTwinMaker } from "../IoTTwinMaker";
|
|
4
|
+
import { IoTTwinMakerClient } from "../IoTTwinMakerClient";
|
|
5
|
+
var makePagedClientRequest = function (client, input) {
|
|
6
|
+
var args = [];
|
|
7
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
+
args[_i - 2] = arguments[_i];
|
|
9
|
+
}
|
|
10
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
+
return __generator(this, function (_a) {
|
|
12
|
+
switch (_a.label) {
|
|
13
|
+
case 0: return [4, client.send.apply(client, __spreadArray([new ListScenesCommand(input)], __read(args)))];
|
|
14
|
+
case 1: return [2, _a.sent()];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
var makePagedRequest = function (client, input) {
|
|
20
|
+
var args = [];
|
|
21
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
+
args[_i - 2] = arguments[_i];
|
|
23
|
+
}
|
|
24
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
+
return __generator(this, function (_a) {
|
|
26
|
+
switch (_a.label) {
|
|
27
|
+
case 0: return [4, client.listScenes.apply(client, __spreadArray([input], __read(args)))];
|
|
28
|
+
case 1: return [2, _a.sent()];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
export function paginateListScenes(config, input) {
|
|
34
|
+
var additionalArguments = [];
|
|
35
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
36
|
+
additionalArguments[_i - 2] = arguments[_i];
|
|
37
|
+
}
|
|
38
|
+
return __asyncGenerator(this, arguments, function paginateListScenes_1() {
|
|
39
|
+
var token, hasNext, page;
|
|
40
|
+
return __generator(this, function (_a) {
|
|
41
|
+
switch (_a.label) {
|
|
42
|
+
case 0:
|
|
43
|
+
token = config.startingToken || undefined;
|
|
44
|
+
hasNext = true;
|
|
45
|
+
_a.label = 1;
|
|
46
|
+
case 1:
|
|
47
|
+
if (!hasNext) return [3, 9];
|
|
48
|
+
input.nextToken = token;
|
|
49
|
+
input["maxResults"] = config.pageSize;
|
|
50
|
+
if (!(config.client instanceof IoTTwinMaker)) return [3, 3];
|
|
51
|
+
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
|
|
52
|
+
case 2:
|
|
53
|
+
page = _a.sent();
|
|
54
|
+
return [3, 6];
|
|
55
|
+
case 3:
|
|
56
|
+
if (!(config.client instanceof IoTTwinMakerClient)) return [3, 5];
|
|
57
|
+
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
|
|
58
|
+
case 4:
|
|
59
|
+
page = _a.sent();
|
|
60
|
+
return [3, 6];
|
|
61
|
+
case 5: throw new Error("Invalid client, expected IoTTwinMaker | IoTTwinMakerClient");
|
|
62
|
+
case 6: return [4, __await(page)];
|
|
63
|
+
case 7: return [4, _a.sent()];
|
|
64
|
+
case 8:
|
|
65
|
+
_a.sent();
|
|
66
|
+
token = page.nextToken;
|
|
67
|
+
hasNext = !!token;
|
|
68
|
+
return [3, 1];
|
|
69
|
+
case 9: return [4, __await(undefined)];
|
|
70
|
+
case 10: return [2, _a.sent()];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
|
|
2
|
+
import { ListWorkspacesCommand, } from "../commands/ListWorkspacesCommand";
|
|
3
|
+
import { IoTTwinMaker } from "../IoTTwinMaker";
|
|
4
|
+
import { IoTTwinMakerClient } from "../IoTTwinMakerClient";
|
|
5
|
+
var makePagedClientRequest = function (client, input) {
|
|
6
|
+
var args = [];
|
|
7
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
8
|
+
args[_i - 2] = arguments[_i];
|
|
9
|
+
}
|
|
10
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
11
|
+
return __generator(this, function (_a) {
|
|
12
|
+
switch (_a.label) {
|
|
13
|
+
case 0: return [4, client.send.apply(client, __spreadArray([new ListWorkspacesCommand(input)], __read(args)))];
|
|
14
|
+
case 1: return [2, _a.sent()];
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
var makePagedRequest = function (client, input) {
|
|
20
|
+
var args = [];
|
|
21
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
22
|
+
args[_i - 2] = arguments[_i];
|
|
23
|
+
}
|
|
24
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
25
|
+
return __generator(this, function (_a) {
|
|
26
|
+
switch (_a.label) {
|
|
27
|
+
case 0: return [4, client.listWorkspaces.apply(client, __spreadArray([input], __read(args)))];
|
|
28
|
+
case 1: return [2, _a.sent()];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
export function paginateListWorkspaces(config, input) {
|
|
34
|
+
var additionalArguments = [];
|
|
35
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
36
|
+
additionalArguments[_i - 2] = arguments[_i];
|
|
37
|
+
}
|
|
38
|
+
return __asyncGenerator(this, arguments, function paginateListWorkspaces_1() {
|
|
39
|
+
var token, hasNext, page;
|
|
40
|
+
return __generator(this, function (_a) {
|
|
41
|
+
switch (_a.label) {
|
|
42
|
+
case 0:
|
|
43
|
+
token = config.startingToken || undefined;
|
|
44
|
+
hasNext = true;
|
|
45
|
+
_a.label = 1;
|
|
46
|
+
case 1:
|
|
47
|
+
if (!hasNext) return [3, 9];
|
|
48
|
+
input.nextToken = token;
|
|
49
|
+
input["maxResults"] = config.pageSize;
|
|
50
|
+
if (!(config.client instanceof IoTTwinMaker)) return [3, 3];
|
|
51
|
+
return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
|
|
52
|
+
case 2:
|
|
53
|
+
page = _a.sent();
|
|
54
|
+
return [3, 6];
|
|
55
|
+
case 3:
|
|
56
|
+
if (!(config.client instanceof IoTTwinMakerClient)) return [3, 5];
|
|
57
|
+
return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
|
|
58
|
+
case 4:
|
|
59
|
+
page = _a.sent();
|
|
60
|
+
return [3, 6];
|
|
61
|
+
case 5: throw new Error("Invalid client, expected IoTTwinMaker | IoTTwinMakerClient");
|
|
62
|
+
case 6: return [4, __await(page)];
|
|
63
|
+
case 7: return [4, _a.sent()];
|
|
64
|
+
case 8:
|
|
65
|
+
_a.sent();
|
|
66
|
+
token = page.nextToken;
|
|
67
|
+
hasNext = !!token;
|
|
68
|
+
return [3, 1];
|
|
69
|
+
case 9: return [4, __await(undefined)];
|
|
70
|
+
case 10: return [2, _a.sent()];
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
}
|