@aws-sdk/client-dataexchange 3.35.0 → 3.36.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 +13 -0
- package/dist-cjs/DataExchange.js +0 -1
- package/dist-cjs/DataExchangeClient.js +0 -1
- package/dist-cjs/commands/CancelJobCommand.js +0 -1
- package/dist-cjs/commands/CreateDataSetCommand.js +0 -1
- package/dist-cjs/commands/CreateEventActionCommand.js +0 -1
- package/dist-cjs/commands/CreateJobCommand.js +0 -1
- package/dist-cjs/commands/CreateRevisionCommand.js +0 -1
- package/dist-cjs/commands/DeleteAssetCommand.js +0 -1
- package/dist-cjs/commands/DeleteDataSetCommand.js +0 -1
- package/dist-cjs/commands/DeleteEventActionCommand.js +0 -1
- package/dist-cjs/commands/DeleteRevisionCommand.js +0 -1
- package/dist-cjs/commands/GetAssetCommand.js +0 -1
- package/dist-cjs/commands/GetDataSetCommand.js +0 -1
- package/dist-cjs/commands/GetEventActionCommand.js +0 -1
- package/dist-cjs/commands/GetJobCommand.js +0 -1
- package/dist-cjs/commands/GetRevisionCommand.js +0 -1
- package/dist-cjs/commands/ListDataSetRevisionsCommand.js +0 -1
- package/dist-cjs/commands/ListDataSetsCommand.js +0 -1
- package/dist-cjs/commands/ListEventActionsCommand.js +0 -1
- package/dist-cjs/commands/ListJobsCommand.js +0 -1
- package/dist-cjs/commands/ListRevisionAssetsCommand.js +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-cjs/commands/StartJobCommand.js +0 -1
- package/dist-cjs/commands/TagResourceCommand.js +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js +0 -1
- package/dist-cjs/commands/UpdateAssetCommand.js +0 -1
- package/dist-cjs/commands/UpdateDataSetCommand.js +0 -1
- package/dist-cjs/commands/UpdateEventActionCommand.js +0 -1
- package/dist-cjs/commands/UpdateRevisionCommand.js +0 -1
- package/dist-cjs/endpoints.js +0 -1
- package/dist-cjs/index.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -1
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListDataSetRevisionsPaginator.js +0 -1
- package/dist-cjs/pagination/ListDataSetsPaginator.js +0 -1
- package/dist-cjs/pagination/ListEventActionsPaginator.js +0 -1
- package/dist-cjs/pagination/ListJobsPaginator.js +0 -1
- package/dist-cjs/pagination/ListRevisionAssetsPaginator.js +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js +0 -1
- package/dist-cjs/runtimeConfig.browser.js +2 -3
- package/dist-cjs/runtimeConfig.js +3 -4
- package/dist-cjs/runtimeConfig.native.js +0 -1
- package/dist-cjs/runtimeConfig.shared.js +0 -1
- package/dist-es/DataExchange.js +0 -1
- package/dist-es/DataExchangeClient.js +0 -1
- package/dist-es/commands/CancelJobCommand.js +0 -1
- package/dist-es/commands/CreateDataSetCommand.js +0 -1
- package/dist-es/commands/CreateEventActionCommand.js +0 -1
- package/dist-es/commands/CreateJobCommand.js +0 -1
- package/dist-es/commands/CreateRevisionCommand.js +0 -1
- package/dist-es/commands/DeleteAssetCommand.js +0 -1
- package/dist-es/commands/DeleteDataSetCommand.js +0 -1
- package/dist-es/commands/DeleteEventActionCommand.js +0 -1
- package/dist-es/commands/DeleteRevisionCommand.js +0 -1
- package/dist-es/commands/GetAssetCommand.js +0 -1
- package/dist-es/commands/GetDataSetCommand.js +0 -1
- package/dist-es/commands/GetEventActionCommand.js +0 -1
- package/dist-es/commands/GetJobCommand.js +0 -1
- package/dist-es/commands/GetRevisionCommand.js +0 -1
- package/dist-es/commands/ListDataSetRevisionsCommand.js +0 -1
- package/dist-es/commands/ListDataSetsCommand.js +0 -1
- package/dist-es/commands/ListEventActionsCommand.js +0 -1
- package/dist-es/commands/ListJobsCommand.js +0 -1
- package/dist-es/commands/ListRevisionAssetsCommand.js +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-es/commands/StartJobCommand.js +0 -1
- package/dist-es/commands/TagResourceCommand.js +0 -1
- package/dist-es/commands/UntagResourceCommand.js +0 -1
- package/dist-es/commands/UpdateAssetCommand.js +0 -1
- package/dist-es/commands/UpdateDataSetCommand.js +0 -1
- package/dist-es/commands/UpdateEventActionCommand.js +0 -1
- package/dist-es/commands/UpdateRevisionCommand.js +0 -1
- package/dist-es/endpoints.js +0 -1
- package/dist-es/index.js +0 -1
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListDataSetRevisionsPaginator.js +0 -1
- package/dist-es/pagination/ListDataSetsPaginator.js +0 -1
- package/dist-es/pagination/ListEventActionsPaginator.js +0 -1
- package/dist-es/pagination/ListJobsPaginator.js +0 -1
- package/dist-es/pagination/ListRevisionAssetsPaginator.js +0 -1
- package/dist-es/protocols/Aws_restJson1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/package.json +33 -30
- package/dist-cjs/DataExchange.js.map +0 -1
- package/dist-cjs/DataExchangeClient.js.map +0 -1
- package/dist-cjs/commands/CancelJobCommand.js.map +0 -1
- package/dist-cjs/commands/CreateDataSetCommand.js.map +0 -1
- package/dist-cjs/commands/CreateEventActionCommand.js.map +0 -1
- package/dist-cjs/commands/CreateJobCommand.js.map +0 -1
- package/dist-cjs/commands/CreateRevisionCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteAssetCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteDataSetCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteEventActionCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteRevisionCommand.js.map +0 -1
- package/dist-cjs/commands/GetAssetCommand.js.map +0 -1
- package/dist-cjs/commands/GetDataSetCommand.js.map +0 -1
- package/dist-cjs/commands/GetEventActionCommand.js.map +0 -1
- package/dist-cjs/commands/GetJobCommand.js.map +0 -1
- package/dist-cjs/commands/GetRevisionCommand.js.map +0 -1
- package/dist-cjs/commands/ListDataSetRevisionsCommand.js.map +0 -1
- package/dist-cjs/commands/ListDataSetsCommand.js.map +0 -1
- package/dist-cjs/commands/ListEventActionsCommand.js.map +0 -1
- package/dist-cjs/commands/ListJobsCommand.js.map +0 -1
- package/dist-cjs/commands/ListRevisionAssetsCommand.js.map +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-cjs/commands/StartJobCommand.js.map +0 -1
- package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateAssetCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateDataSetCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateEventActionCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateRevisionCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListDataSetRevisionsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListDataSetsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListEventActionsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListJobsPaginator.js.map +0 -1
- package/dist-cjs/pagination/ListRevisionAssetsPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/DataExchange.js.map +0 -1
- package/dist-es/DataExchangeClient.js.map +0 -1
- package/dist-es/commands/CancelJobCommand.js.map +0 -1
- package/dist-es/commands/CreateDataSetCommand.js.map +0 -1
- package/dist-es/commands/CreateEventActionCommand.js.map +0 -1
- package/dist-es/commands/CreateJobCommand.js.map +0 -1
- package/dist-es/commands/CreateRevisionCommand.js.map +0 -1
- package/dist-es/commands/DeleteAssetCommand.js.map +0 -1
- package/dist-es/commands/DeleteDataSetCommand.js.map +0 -1
- package/dist-es/commands/DeleteEventActionCommand.js.map +0 -1
- package/dist-es/commands/DeleteRevisionCommand.js.map +0 -1
- package/dist-es/commands/GetAssetCommand.js.map +0 -1
- package/dist-es/commands/GetDataSetCommand.js.map +0 -1
- package/dist-es/commands/GetEventActionCommand.js.map +0 -1
- package/dist-es/commands/GetJobCommand.js.map +0 -1
- package/dist-es/commands/GetRevisionCommand.js.map +0 -1
- package/dist-es/commands/ListDataSetRevisionsCommand.js.map +0 -1
- package/dist-es/commands/ListDataSetsCommand.js.map +0 -1
- package/dist-es/commands/ListEventActionsCommand.js.map +0 -1
- package/dist-es/commands/ListJobsCommand.js.map +0 -1
- package/dist-es/commands/ListRevisionAssetsCommand.js.map +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-es/commands/StartJobCommand.js.map +0 -1
- package/dist-es/commands/TagResourceCommand.js.map +0 -1
- package/dist-es/commands/UntagResourceCommand.js.map +0 -1
- package/dist-es/commands/UpdateAssetCommand.js.map +0 -1
- package/dist-es/commands/UpdateDataSetCommand.js.map +0 -1
- package/dist-es/commands/UpdateEventActionCommand.js.map +0 -1
- package/dist-es/commands/UpdateRevisionCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListDataSetRevisionsPaginator.js.map +0 -1
- package/dist-es/pagination/ListDataSetsPaginator.js.map +0 -1
- package/dist-es/pagination/ListEventActionsPaginator.js.map +0 -1
- package/dist-es/pagination/ListJobsPaginator.js.map +0 -1
- package/dist-es/pagination/ListRevisionAssetsPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_restJson1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/DataExchange.ts +0 -894
- package/src/DataExchangeClient.ts +0 -323
- package/src/commands/CancelJobCommand.ts +0 -95
- package/src/commands/CreateDataSetCommand.ts +0 -95
- package/src/commands/CreateEventActionCommand.ts +0 -95
- package/src/commands/CreateJobCommand.ts +0 -95
- package/src/commands/CreateRevisionCommand.ts +0 -95
- package/src/commands/DeleteAssetCommand.ts +0 -95
- package/src/commands/DeleteDataSetCommand.ts +0 -95
- package/src/commands/DeleteEventActionCommand.ts +0 -95
- package/src/commands/DeleteRevisionCommand.ts +0 -95
- package/src/commands/GetAssetCommand.ts +0 -95
- package/src/commands/GetDataSetCommand.ts +0 -95
- package/src/commands/GetEventActionCommand.ts +0 -95
- package/src/commands/GetJobCommand.ts +0 -88
- package/src/commands/GetRevisionCommand.ts +0 -95
- package/src/commands/ListDataSetRevisionsCommand.ts +0 -95
- package/src/commands/ListDataSetsCommand.ts +0 -95
- package/src/commands/ListEventActionsCommand.ts +0 -95
- package/src/commands/ListJobsCommand.ts +0 -95
- package/src/commands/ListRevisionAssetsCommand.ts +0 -95
- package/src/commands/ListTagsForResourceCommand.ts +0 -95
- package/src/commands/StartJobCommand.ts +0 -95
- package/src/commands/TagResourceCommand.ts +0 -95
- package/src/commands/UntagResourceCommand.ts +0 -95
- package/src/commands/UpdateAssetCommand.ts +0 -95
- package/src/commands/UpdateDataSetCommand.ts +0 -95
- package/src/commands/UpdateEventActionCommand.ts +0 -95
- package/src/commands/UpdateRevisionCommand.ts +0 -95
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -36
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -2753
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListDataSetRevisionsPaginator.ts +0 -59
- package/src/pagination/ListDataSetsPaginator.ts +0 -59
- package/src/pagination/ListEventActionsPaginator.ts +0 -59
- package/src/pagination/ListJobsPaginator.ts +0 -55
- package/src/pagination/ListRevisionAssetsPaginator.ts +0 -59
- package/src/protocols/Aws_restJson1.ts +0 -4522
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PaginationConfiguration } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { DataExchange } from "../DataExchange";
|
|
4
|
-
import { DataExchangeClient } from "../DataExchangeClient";
|
|
5
|
-
|
|
6
|
-
export interface DataExchangePaginationConfiguration extends PaginationConfiguration {
|
|
7
|
-
client: DataExchange | DataExchangeClient;
|
|
8
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListDataSetRevisionsCommand,
|
|
5
|
-
ListDataSetRevisionsCommandInput,
|
|
6
|
-
ListDataSetRevisionsCommandOutput,
|
|
7
|
-
} from "../commands/ListDataSetRevisionsCommand";
|
|
8
|
-
import { DataExchange } from "../DataExchange";
|
|
9
|
-
import { DataExchangeClient } from "../DataExchangeClient";
|
|
10
|
-
import { DataExchangePaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: DataExchangeClient,
|
|
17
|
-
input: ListDataSetRevisionsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListDataSetRevisionsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListDataSetRevisionsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: DataExchange,
|
|
28
|
-
input: ListDataSetRevisionsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListDataSetRevisionsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listDataSetRevisions(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListDataSetRevisions(
|
|
35
|
-
config: DataExchangePaginationConfiguration,
|
|
36
|
-
input: ListDataSetRevisionsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListDataSetRevisionsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListDataSetRevisionsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof DataExchange) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof DataExchangeClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected DataExchange | DataExchangeClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListDataSetsCommand,
|
|
5
|
-
ListDataSetsCommandInput,
|
|
6
|
-
ListDataSetsCommandOutput,
|
|
7
|
-
} from "../commands/ListDataSetsCommand";
|
|
8
|
-
import { DataExchange } from "../DataExchange";
|
|
9
|
-
import { DataExchangeClient } from "../DataExchangeClient";
|
|
10
|
-
import { DataExchangePaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: DataExchangeClient,
|
|
17
|
-
input: ListDataSetsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListDataSetsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListDataSetsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: DataExchange,
|
|
28
|
-
input: ListDataSetsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListDataSetsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listDataSets(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListDataSets(
|
|
35
|
-
config: DataExchangePaginationConfiguration,
|
|
36
|
-
input: ListDataSetsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListDataSetsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListDataSetsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof DataExchange) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof DataExchangeClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected DataExchange | DataExchangeClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListEventActionsCommand,
|
|
5
|
-
ListEventActionsCommandInput,
|
|
6
|
-
ListEventActionsCommandOutput,
|
|
7
|
-
} from "../commands/ListEventActionsCommand";
|
|
8
|
-
import { DataExchange } from "../DataExchange";
|
|
9
|
-
import { DataExchangeClient } from "../DataExchangeClient";
|
|
10
|
-
import { DataExchangePaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: DataExchangeClient,
|
|
17
|
-
input: ListEventActionsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListEventActionsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListEventActionsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: DataExchange,
|
|
28
|
-
input: ListEventActionsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListEventActionsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listEventActions(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListEventActions(
|
|
35
|
-
config: DataExchangePaginationConfiguration,
|
|
36
|
-
input: ListEventActionsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListEventActionsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListEventActionsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof DataExchange) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof DataExchangeClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected DataExchange | DataExchangeClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { ListJobsCommand, ListJobsCommandInput, ListJobsCommandOutput } from "../commands/ListJobsCommand";
|
|
4
|
-
import { DataExchange } from "../DataExchange";
|
|
5
|
-
import { DataExchangeClient } from "../DataExchangeClient";
|
|
6
|
-
import { DataExchangePaginationConfiguration } from "./Interfaces";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @private
|
|
10
|
-
*/
|
|
11
|
-
const makePagedClientRequest = async (
|
|
12
|
-
client: DataExchangeClient,
|
|
13
|
-
input: ListJobsCommandInput,
|
|
14
|
-
...args: any
|
|
15
|
-
): Promise<ListJobsCommandOutput> => {
|
|
16
|
-
// @ts-ignore
|
|
17
|
-
return await client.send(new ListJobsCommand(input), ...args);
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
const makePagedRequest = async (
|
|
23
|
-
client: DataExchange,
|
|
24
|
-
input: ListJobsCommandInput,
|
|
25
|
-
...args: any
|
|
26
|
-
): Promise<ListJobsCommandOutput> => {
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
return await client.listJobs(input, ...args);
|
|
29
|
-
};
|
|
30
|
-
export async function* paginateListJobs(
|
|
31
|
-
config: DataExchangePaginationConfiguration,
|
|
32
|
-
input: ListJobsCommandInput,
|
|
33
|
-
...additionalArguments: any
|
|
34
|
-
): Paginator<ListJobsCommandOutput> {
|
|
35
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
36
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
37
|
-
let hasNext = true;
|
|
38
|
-
let page: ListJobsCommandOutput;
|
|
39
|
-
while (hasNext) {
|
|
40
|
-
input.NextToken = token;
|
|
41
|
-
input["MaxResults"] = config.pageSize;
|
|
42
|
-
if (config.client instanceof DataExchange) {
|
|
43
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
44
|
-
} else if (config.client instanceof DataExchangeClient) {
|
|
45
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
46
|
-
} else {
|
|
47
|
-
throw new Error("Invalid client, expected DataExchange | DataExchangeClient");
|
|
48
|
-
}
|
|
49
|
-
yield page;
|
|
50
|
-
token = page.NextToken;
|
|
51
|
-
hasNext = !!token;
|
|
52
|
-
}
|
|
53
|
-
// @ts-ignore
|
|
54
|
-
return undefined;
|
|
55
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
ListRevisionAssetsCommand,
|
|
5
|
-
ListRevisionAssetsCommandInput,
|
|
6
|
-
ListRevisionAssetsCommandOutput,
|
|
7
|
-
} from "../commands/ListRevisionAssetsCommand";
|
|
8
|
-
import { DataExchange } from "../DataExchange";
|
|
9
|
-
import { DataExchangeClient } from "../DataExchangeClient";
|
|
10
|
-
import { DataExchangePaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: DataExchangeClient,
|
|
17
|
-
input: ListRevisionAssetsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<ListRevisionAssetsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new ListRevisionAssetsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: DataExchange,
|
|
28
|
-
input: ListRevisionAssetsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<ListRevisionAssetsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.listRevisionAssets(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateListRevisionAssets(
|
|
35
|
-
config: DataExchangePaginationConfiguration,
|
|
36
|
-
input: ListRevisionAssetsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<ListRevisionAssetsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.NextToken
|
|
40
|
-
let token: typeof input.NextToken | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: ListRevisionAssetsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.NextToken = token;
|
|
45
|
-
input["MaxResults"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof DataExchange) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof DataExchangeClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected DataExchange | DataExchangeClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.NextToken;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|