@aws-sdk/client-workdocs 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/WorkDocs.js +0 -1
- package/dist-cjs/WorkDocsClient.js +0 -1
- package/dist-cjs/commands/AbortDocumentVersionUploadCommand.js +0 -1
- package/dist-cjs/commands/ActivateUserCommand.js +0 -1
- package/dist-cjs/commands/AddResourcePermissionsCommand.js +0 -1
- package/dist-cjs/commands/CreateCommentCommand.js +0 -1
- package/dist-cjs/commands/CreateCustomMetadataCommand.js +0 -1
- package/dist-cjs/commands/CreateFolderCommand.js +0 -1
- package/dist-cjs/commands/CreateLabelsCommand.js +0 -1
- package/dist-cjs/commands/CreateNotificationSubscriptionCommand.js +0 -1
- package/dist-cjs/commands/CreateUserCommand.js +0 -1
- package/dist-cjs/commands/DeactivateUserCommand.js +0 -1
- package/dist-cjs/commands/DeleteCommentCommand.js +0 -1
- package/dist-cjs/commands/DeleteCustomMetadataCommand.js +0 -1
- package/dist-cjs/commands/DeleteDocumentCommand.js +0 -1
- package/dist-cjs/commands/DeleteFolderCommand.js +0 -1
- package/dist-cjs/commands/DeleteFolderContentsCommand.js +0 -1
- package/dist-cjs/commands/DeleteLabelsCommand.js +0 -1
- package/dist-cjs/commands/DeleteNotificationSubscriptionCommand.js +0 -1
- package/dist-cjs/commands/DeleteUserCommand.js +0 -1
- package/dist-cjs/commands/DescribeActivitiesCommand.js +0 -1
- package/dist-cjs/commands/DescribeCommentsCommand.js +0 -1
- package/dist-cjs/commands/DescribeDocumentVersionsCommand.js +0 -1
- package/dist-cjs/commands/DescribeFolderContentsCommand.js +0 -1
- package/dist-cjs/commands/DescribeGroupsCommand.js +0 -1
- package/dist-cjs/commands/DescribeNotificationSubscriptionsCommand.js +0 -1
- package/dist-cjs/commands/DescribeResourcePermissionsCommand.js +0 -1
- package/dist-cjs/commands/DescribeRootFoldersCommand.js +0 -1
- package/dist-cjs/commands/DescribeUsersCommand.js +0 -1
- package/dist-cjs/commands/GetCurrentUserCommand.js +0 -1
- package/dist-cjs/commands/GetDocumentCommand.js +0 -1
- package/dist-cjs/commands/GetDocumentPathCommand.js +0 -1
- package/dist-cjs/commands/GetDocumentVersionCommand.js +0 -1
- package/dist-cjs/commands/GetFolderCommand.js +0 -1
- package/dist-cjs/commands/GetFolderPathCommand.js +0 -1
- package/dist-cjs/commands/GetResourcesCommand.js +0 -1
- package/dist-cjs/commands/InitiateDocumentVersionUploadCommand.js +0 -1
- package/dist-cjs/commands/RemoveAllResourcePermissionsCommand.js +0 -1
- package/dist-cjs/commands/RemoveResourcePermissionCommand.js +0 -1
- package/dist-cjs/commands/UpdateDocumentCommand.js +0 -1
- package/dist-cjs/commands/UpdateDocumentVersionCommand.js +0 -1
- package/dist-cjs/commands/UpdateFolderCommand.js +0 -1
- package/dist-cjs/commands/UpdateUserCommand.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/DescribeDocumentVersionsPaginator.js +0 -1
- package/dist-cjs/pagination/DescribeFolderContentsPaginator.js +0 -1
- package/dist-cjs/pagination/DescribeUsersPaginator.js +0 -1
- package/dist-cjs/pagination/Interfaces.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/WorkDocs.js +0 -1
- package/dist-es/WorkDocsClient.js +0 -1
- package/dist-es/commands/AbortDocumentVersionUploadCommand.js +0 -1
- package/dist-es/commands/ActivateUserCommand.js +0 -1
- package/dist-es/commands/AddResourcePermissionsCommand.js +0 -1
- package/dist-es/commands/CreateCommentCommand.js +0 -1
- package/dist-es/commands/CreateCustomMetadataCommand.js +0 -1
- package/dist-es/commands/CreateFolderCommand.js +0 -1
- package/dist-es/commands/CreateLabelsCommand.js +0 -1
- package/dist-es/commands/CreateNotificationSubscriptionCommand.js +0 -1
- package/dist-es/commands/CreateUserCommand.js +0 -1
- package/dist-es/commands/DeactivateUserCommand.js +0 -1
- package/dist-es/commands/DeleteCommentCommand.js +0 -1
- package/dist-es/commands/DeleteCustomMetadataCommand.js +0 -1
- package/dist-es/commands/DeleteDocumentCommand.js +0 -1
- package/dist-es/commands/DeleteFolderCommand.js +0 -1
- package/dist-es/commands/DeleteFolderContentsCommand.js +0 -1
- package/dist-es/commands/DeleteLabelsCommand.js +0 -1
- package/dist-es/commands/DeleteNotificationSubscriptionCommand.js +0 -1
- package/dist-es/commands/DeleteUserCommand.js +0 -1
- package/dist-es/commands/DescribeActivitiesCommand.js +0 -1
- package/dist-es/commands/DescribeCommentsCommand.js +0 -1
- package/dist-es/commands/DescribeDocumentVersionsCommand.js +0 -1
- package/dist-es/commands/DescribeFolderContentsCommand.js +0 -1
- package/dist-es/commands/DescribeGroupsCommand.js +0 -1
- package/dist-es/commands/DescribeNotificationSubscriptionsCommand.js +0 -1
- package/dist-es/commands/DescribeResourcePermissionsCommand.js +0 -1
- package/dist-es/commands/DescribeRootFoldersCommand.js +0 -1
- package/dist-es/commands/DescribeUsersCommand.js +0 -1
- package/dist-es/commands/GetCurrentUserCommand.js +0 -1
- package/dist-es/commands/GetDocumentCommand.js +0 -1
- package/dist-es/commands/GetDocumentPathCommand.js +0 -1
- package/dist-es/commands/GetDocumentVersionCommand.js +0 -1
- package/dist-es/commands/GetFolderCommand.js +0 -1
- package/dist-es/commands/GetFolderPathCommand.js +0 -1
- package/dist-es/commands/GetResourcesCommand.js +0 -1
- package/dist-es/commands/InitiateDocumentVersionUploadCommand.js +0 -1
- package/dist-es/commands/RemoveAllResourcePermissionsCommand.js +0 -1
- package/dist-es/commands/RemoveResourcePermissionCommand.js +0 -1
- package/dist-es/commands/UpdateDocumentCommand.js +0 -1
- package/dist-es/commands/UpdateDocumentVersionCommand.js +0 -1
- package/dist-es/commands/UpdateFolderCommand.js +0 -1
- package/dist-es/commands/UpdateUserCommand.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/DescribeDocumentVersionsPaginator.js +0 -1
- package/dist-es/pagination/DescribeFolderContentsPaginator.js +0 -1
- package/dist-es/pagination/DescribeUsersPaginator.js +0 -1
- package/dist-es/pagination/Interfaces.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/WorkDocs.js.map +0 -1
- package/dist-cjs/WorkDocsClient.js.map +0 -1
- package/dist-cjs/commands/AbortDocumentVersionUploadCommand.js.map +0 -1
- package/dist-cjs/commands/ActivateUserCommand.js.map +0 -1
- package/dist-cjs/commands/AddResourcePermissionsCommand.js.map +0 -1
- package/dist-cjs/commands/CreateCommentCommand.js.map +0 -1
- package/dist-cjs/commands/CreateCustomMetadataCommand.js.map +0 -1
- package/dist-cjs/commands/CreateFolderCommand.js.map +0 -1
- package/dist-cjs/commands/CreateLabelsCommand.js.map +0 -1
- package/dist-cjs/commands/CreateNotificationSubscriptionCommand.js.map +0 -1
- package/dist-cjs/commands/CreateUserCommand.js.map +0 -1
- package/dist-cjs/commands/DeactivateUserCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteCommentCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteCustomMetadataCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteDocumentCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteFolderCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteFolderContentsCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteLabelsCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteNotificationSubscriptionCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteUserCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeActivitiesCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeCommentsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeDocumentVersionsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeFolderContentsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeGroupsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeNotificationSubscriptionsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeResourcePermissionsCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeRootFoldersCommand.js.map +0 -1
- package/dist-cjs/commands/DescribeUsersCommand.js.map +0 -1
- package/dist-cjs/commands/GetCurrentUserCommand.js.map +0 -1
- package/dist-cjs/commands/GetDocumentCommand.js.map +0 -1
- package/dist-cjs/commands/GetDocumentPathCommand.js.map +0 -1
- package/dist-cjs/commands/GetDocumentVersionCommand.js.map +0 -1
- package/dist-cjs/commands/GetFolderCommand.js.map +0 -1
- package/dist-cjs/commands/GetFolderPathCommand.js.map +0 -1
- package/dist-cjs/commands/GetResourcesCommand.js.map +0 -1
- package/dist-cjs/commands/InitiateDocumentVersionUploadCommand.js.map +0 -1
- package/dist-cjs/commands/RemoveAllResourcePermissionsCommand.js.map +0 -1
- package/dist-cjs/commands/RemoveResourcePermissionCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateDocumentCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateDocumentVersionCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateFolderCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateUserCommand.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/DescribeDocumentVersionsPaginator.js.map +0 -1
- package/dist-cjs/pagination/DescribeFolderContentsPaginator.js.map +0 -1
- package/dist-cjs/pagination/DescribeUsersPaginator.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.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/WorkDocs.js.map +0 -1
- package/dist-es/WorkDocsClient.js.map +0 -1
- package/dist-es/commands/AbortDocumentVersionUploadCommand.js.map +0 -1
- package/dist-es/commands/ActivateUserCommand.js.map +0 -1
- package/dist-es/commands/AddResourcePermissionsCommand.js.map +0 -1
- package/dist-es/commands/CreateCommentCommand.js.map +0 -1
- package/dist-es/commands/CreateCustomMetadataCommand.js.map +0 -1
- package/dist-es/commands/CreateFolderCommand.js.map +0 -1
- package/dist-es/commands/CreateLabelsCommand.js.map +0 -1
- package/dist-es/commands/CreateNotificationSubscriptionCommand.js.map +0 -1
- package/dist-es/commands/CreateUserCommand.js.map +0 -1
- package/dist-es/commands/DeactivateUserCommand.js.map +0 -1
- package/dist-es/commands/DeleteCommentCommand.js.map +0 -1
- package/dist-es/commands/DeleteCustomMetadataCommand.js.map +0 -1
- package/dist-es/commands/DeleteDocumentCommand.js.map +0 -1
- package/dist-es/commands/DeleteFolderCommand.js.map +0 -1
- package/dist-es/commands/DeleteFolderContentsCommand.js.map +0 -1
- package/dist-es/commands/DeleteLabelsCommand.js.map +0 -1
- package/dist-es/commands/DeleteNotificationSubscriptionCommand.js.map +0 -1
- package/dist-es/commands/DeleteUserCommand.js.map +0 -1
- package/dist-es/commands/DescribeActivitiesCommand.js.map +0 -1
- package/dist-es/commands/DescribeCommentsCommand.js.map +0 -1
- package/dist-es/commands/DescribeDocumentVersionsCommand.js.map +0 -1
- package/dist-es/commands/DescribeFolderContentsCommand.js.map +0 -1
- package/dist-es/commands/DescribeGroupsCommand.js.map +0 -1
- package/dist-es/commands/DescribeNotificationSubscriptionsCommand.js.map +0 -1
- package/dist-es/commands/DescribeResourcePermissionsCommand.js.map +0 -1
- package/dist-es/commands/DescribeRootFoldersCommand.js.map +0 -1
- package/dist-es/commands/DescribeUsersCommand.js.map +0 -1
- package/dist-es/commands/GetCurrentUserCommand.js.map +0 -1
- package/dist-es/commands/GetDocumentCommand.js.map +0 -1
- package/dist-es/commands/GetDocumentPathCommand.js.map +0 -1
- package/dist-es/commands/GetDocumentVersionCommand.js.map +0 -1
- package/dist-es/commands/GetFolderCommand.js.map +0 -1
- package/dist-es/commands/GetFolderPathCommand.js.map +0 -1
- package/dist-es/commands/GetResourcesCommand.js.map +0 -1
- package/dist-es/commands/InitiateDocumentVersionUploadCommand.js.map +0 -1
- package/dist-es/commands/RemoveAllResourcePermissionsCommand.js.map +0 -1
- package/dist-es/commands/RemoveResourcePermissionCommand.js.map +0 -1
- package/dist-es/commands/UpdateDocumentCommand.js.map +0 -1
- package/dist-es/commands/UpdateDocumentVersionCommand.js.map +0 -1
- package/dist-es/commands/UpdateFolderCommand.js.map +0 -1
- package/dist-es/commands/UpdateUserCommand.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/DescribeDocumentVersionsPaginator.js.map +0 -1
- package/dist-es/pagination/DescribeFolderContentsPaginator.js.map +0 -1
- package/dist-es/pagination/DescribeUsersPaginator.js.map +0 -1
- package/dist-es/pagination/Interfaces.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/WorkDocs.ts +0 -1548
- package/src/WorkDocsClient.ts +0 -439
- package/src/commands/AbortDocumentVersionUploadCommand.ts +0 -101
- package/src/commands/ActivateUserCommand.ts +0 -96
- package/src/commands/AddResourcePermissionsCommand.ts +0 -97
- package/src/commands/CreateCommentCommand.ts +0 -95
- package/src/commands/CreateCustomMetadataCommand.ts +0 -96
- package/src/commands/CreateFolderCommand.ts +0 -95
- package/src/commands/CreateLabelsCommand.ts +0 -96
- package/src/commands/CreateNotificationSubscriptionCommand.ts +0 -107
- package/src/commands/CreateUserCommand.ts +0 -96
- package/src/commands/DeactivateUserCommand.ts +0 -96
- package/src/commands/DeleteCommentCommand.ts +0 -95
- package/src/commands/DeleteCustomMetadataCommand.ts +0 -95
- package/src/commands/DeleteDocumentCommand.ts +0 -95
- package/src/commands/DeleteFolderCommand.ts +0 -95
- package/src/commands/DeleteFolderContentsCommand.ts +0 -95
- package/src/commands/DeleteLabelsCommand.ts +0 -95
- package/src/commands/DeleteNotificationSubscriptionCommand.ts +0 -101
- package/src/commands/DeleteUserCommand.ts +0 -95
- package/src/commands/DescribeActivitiesCommand.ts +0 -95
- package/src/commands/DescribeCommentsCommand.ts +0 -95
- package/src/commands/DescribeDocumentVersionsCommand.ts +0 -96
- package/src/commands/DescribeFolderContentsCommand.ts +0 -100
- package/src/commands/DescribeGroupsCommand.ts +0 -96
- package/src/commands/DescribeNotificationSubscriptionsCommand.ts +0 -106
- package/src/commands/DescribeResourcePermissionsCommand.ts +0 -100
- package/src/commands/DescribeRootFoldersCommand.ts +0 -103
- package/src/commands/DescribeUsersCommand.ts +0 -99
- package/src/commands/GetCurrentUserCommand.ts +0 -101
- package/src/commands/GetDocumentCommand.ts +0 -95
- package/src/commands/GetDocumentPathCommand.ts +0 -100
- package/src/commands/GetDocumentVersionCommand.ts +0 -95
- package/src/commands/GetFolderCommand.ts +0 -95
- package/src/commands/GetFolderPathCommand.ts +0 -100
- package/src/commands/GetResourcesCommand.ts +0 -96
- package/src/commands/InitiateDocumentVersionUploadCommand.ts +0 -105
- package/src/commands/RemoveAllResourcePermissionsCommand.ts +0 -98
- package/src/commands/RemoveResourcePermissionCommand.ts +0 -96
- package/src/commands/UpdateDocumentCommand.ts +0 -96
- package/src/commands/UpdateDocumentVersionCommand.ts +0 -98
- package/src/commands/UpdateFolderCommand.ts +0 -96
- package/src/commands/UpdateUserCommand.ts +0 -96
- package/src/endpoints.ts +0 -68
- package/src/index.ts +0 -48
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -3531
- package/src/pagination/DescribeDocumentVersionsPaginator.ts +0 -59
- package/src/pagination/DescribeFolderContentsPaginator.ts +0 -59
- package/src/pagination/DescribeUsersPaginator.ts +0 -59
- package/src/pagination/Interfaces.ts +0 -8
- package/src/protocols/Aws_restJson1.ts +0 -6692
- 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,59 +0,0 @@
|
|
|
1
|
-
import { Paginator } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
DescribeDocumentVersionsCommand,
|
|
5
|
-
DescribeDocumentVersionsCommandInput,
|
|
6
|
-
DescribeDocumentVersionsCommandOutput,
|
|
7
|
-
} from "../commands/DescribeDocumentVersionsCommand";
|
|
8
|
-
import { WorkDocs } from "../WorkDocs";
|
|
9
|
-
import { WorkDocsClient } from "../WorkDocsClient";
|
|
10
|
-
import { WorkDocsPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: WorkDocsClient,
|
|
17
|
-
input: DescribeDocumentVersionsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<DescribeDocumentVersionsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new DescribeDocumentVersionsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: WorkDocs,
|
|
28
|
-
input: DescribeDocumentVersionsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<DescribeDocumentVersionsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.describeDocumentVersions(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateDescribeDocumentVersions(
|
|
35
|
-
config: WorkDocsPaginationConfiguration,
|
|
36
|
-
input: DescribeDocumentVersionsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<DescribeDocumentVersionsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.Marker
|
|
40
|
-
let token: typeof input.Marker | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: DescribeDocumentVersionsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.Marker = token;
|
|
45
|
-
input["Limit"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof WorkDocs) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof WorkDocsClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected WorkDocs | WorkDocsClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.Marker;
|
|
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
|
-
DescribeFolderContentsCommand,
|
|
5
|
-
DescribeFolderContentsCommandInput,
|
|
6
|
-
DescribeFolderContentsCommandOutput,
|
|
7
|
-
} from "../commands/DescribeFolderContentsCommand";
|
|
8
|
-
import { WorkDocs } from "../WorkDocs";
|
|
9
|
-
import { WorkDocsClient } from "../WorkDocsClient";
|
|
10
|
-
import { WorkDocsPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: WorkDocsClient,
|
|
17
|
-
input: DescribeFolderContentsCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<DescribeFolderContentsCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new DescribeFolderContentsCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: WorkDocs,
|
|
28
|
-
input: DescribeFolderContentsCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<DescribeFolderContentsCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.describeFolderContents(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateDescribeFolderContents(
|
|
35
|
-
config: WorkDocsPaginationConfiguration,
|
|
36
|
-
input: DescribeFolderContentsCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<DescribeFolderContentsCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.Marker
|
|
40
|
-
let token: typeof input.Marker | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: DescribeFolderContentsCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.Marker = token;
|
|
45
|
-
input["Limit"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof WorkDocs) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof WorkDocsClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected WorkDocs | WorkDocsClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.Marker;
|
|
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
|
-
DescribeUsersCommand,
|
|
5
|
-
DescribeUsersCommandInput,
|
|
6
|
-
DescribeUsersCommandOutput,
|
|
7
|
-
} from "../commands/DescribeUsersCommand";
|
|
8
|
-
import { WorkDocs } from "../WorkDocs";
|
|
9
|
-
import { WorkDocsClient } from "../WorkDocsClient";
|
|
10
|
-
import { WorkDocsPaginationConfiguration } from "./Interfaces";
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @private
|
|
14
|
-
*/
|
|
15
|
-
const makePagedClientRequest = async (
|
|
16
|
-
client: WorkDocsClient,
|
|
17
|
-
input: DescribeUsersCommandInput,
|
|
18
|
-
...args: any
|
|
19
|
-
): Promise<DescribeUsersCommandOutput> => {
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
return await client.send(new DescribeUsersCommand(input), ...args);
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* @private
|
|
25
|
-
*/
|
|
26
|
-
const makePagedRequest = async (
|
|
27
|
-
client: WorkDocs,
|
|
28
|
-
input: DescribeUsersCommandInput,
|
|
29
|
-
...args: any
|
|
30
|
-
): Promise<DescribeUsersCommandOutput> => {
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
return await client.describeUsers(input, ...args);
|
|
33
|
-
};
|
|
34
|
-
export async function* paginateDescribeUsers(
|
|
35
|
-
config: WorkDocsPaginationConfiguration,
|
|
36
|
-
input: DescribeUsersCommandInput,
|
|
37
|
-
...additionalArguments: any
|
|
38
|
-
): Paginator<DescribeUsersCommandOutput> {
|
|
39
|
-
// ToDo: replace with actual type instead of typeof input.Marker
|
|
40
|
-
let token: typeof input.Marker | undefined = config.startingToken || undefined;
|
|
41
|
-
let hasNext = true;
|
|
42
|
-
let page: DescribeUsersCommandOutput;
|
|
43
|
-
while (hasNext) {
|
|
44
|
-
input.Marker = token;
|
|
45
|
-
input["Limit"] = config.pageSize;
|
|
46
|
-
if (config.client instanceof WorkDocs) {
|
|
47
|
-
page = await makePagedRequest(config.client, input, ...additionalArguments);
|
|
48
|
-
} else if (config.client instanceof WorkDocsClient) {
|
|
49
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Invalid client, expected WorkDocs | WorkDocsClient");
|
|
52
|
-
}
|
|
53
|
-
yield page;
|
|
54
|
-
token = page.Marker;
|
|
55
|
-
hasNext = !!token;
|
|
56
|
-
}
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PaginationConfiguration } from "@aws-sdk/types";
|
|
2
|
-
|
|
3
|
-
import { WorkDocs } from "../WorkDocs";
|
|
4
|
-
import { WorkDocsClient } from "../WorkDocsClient";
|
|
5
|
-
|
|
6
|
-
export interface WorkDocsPaginationConfiguration extends PaginationConfiguration {
|
|
7
|
-
client: WorkDocs | WorkDocsClient;
|
|
8
|
-
}
|