@aws-sdk/client-codecommit 3.477.0 → 3.479.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist-cjs/CodeCommit.js +2 -0
- package/dist-cjs/commands/UpdateRepositoryEncryptionKeyCommand.js +51 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +38 -30
- package/dist-cjs/models/models_1.js +40 -1
- package/dist-cjs/pagination/DescribeMergeConflictsPaginator.js +2 -24
- package/dist-cjs/pagination/DescribePullRequestEventsPaginator.js +2 -24
- package/dist-cjs/pagination/GetCommentReactionsPaginator.js +2 -24
- package/dist-cjs/pagination/GetCommentsForComparedCommitPaginator.js +2 -24
- package/dist-cjs/pagination/GetCommentsForPullRequestPaginator.js +2 -24
- package/dist-cjs/pagination/GetDifferencesPaginator.js +2 -24
- package/dist-cjs/pagination/GetMergeConflictsPaginator.js +2 -24
- package/dist-cjs/pagination/ListApprovalRuleTemplatesPaginator.js +2 -24
- package/dist-cjs/pagination/ListAssociatedApprovalRuleTemplatesForRepositoryPaginator.js +2 -24
- package/dist-cjs/pagination/ListBranchesPaginator.js +2 -23
- package/dist-cjs/pagination/ListFileCommitHistoryPaginator.js +2 -24
- package/dist-cjs/pagination/ListPullRequestsPaginator.js +2 -24
- package/dist-cjs/pagination/ListRepositoriesForApprovalRuleTemplatePaginator.js +2 -24
- package/dist-cjs/pagination/ListRepositoriesPaginator.js +2 -23
- package/dist-cjs/protocols/Aws_json1_1.js +110 -5
- package/dist-es/CodeCommit.js +2 -0
- package/dist-es/commands/UpdateRepositoryEncryptionKeyCommand.js +47 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +32 -24
- package/dist-es/models/models_1.js +36 -0
- package/dist-es/pagination/DescribeMergeConflictsPaginator.js +2 -23
- package/dist-es/pagination/DescribePullRequestEventsPaginator.js +2 -23
- package/dist-es/pagination/GetCommentReactionsPaginator.js +2 -23
- package/dist-es/pagination/GetCommentsForComparedCommitPaginator.js +2 -23
- package/dist-es/pagination/GetCommentsForPullRequestPaginator.js +2 -23
- package/dist-es/pagination/GetDifferencesPaginator.js +2 -23
- package/dist-es/pagination/GetMergeConflictsPaginator.js +2 -23
- package/dist-es/pagination/ListApprovalRuleTemplatesPaginator.js +2 -23
- package/dist-es/pagination/ListAssociatedApprovalRuleTemplatesForRepositoryPaginator.js +2 -23
- package/dist-es/pagination/ListBranchesPaginator.js +2 -22
- package/dist-es/pagination/ListFileCommitHistoryPaginator.js +2 -23
- package/dist-es/pagination/ListPullRequestsPaginator.js +2 -23
- package/dist-es/pagination/ListRepositoriesForApprovalRuleTemplatePaginator.js +2 -23
- package/dist-es/pagination/ListRepositoriesPaginator.js +2 -22
- package/dist-es/protocols/Aws_json1_1.js +105 -2
- package/dist-types/CodeCommit.d.ts +12 -0
- package/dist-types/CodeCommitClient.d.ts +8 -2
- package/dist-types/commands/BatchGetRepositoriesCommand.d.ts +9 -0
- package/dist-types/commands/CreateRepositoryCommand.d.ts +9 -0
- package/dist-types/commands/GetRepositoryCommand.d.ts +1 -0
- package/dist-types/commands/ListFileCommitHistoryCommand.d.ts +2 -1
- package/dist-types/commands/ListPullRequestsCommand.d.ts +1 -2
- package/dist-types/commands/UpdateRepositoryEncryptionKeyCommand.d.ts +115 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/index.d.ts +5 -0
- package/dist-types/models/models_0.d.ts +86 -71
- package/dist-types/models/models_1.d.ts +122 -1
- package/dist-types/pagination/DescribeMergeConflictsPaginator.d.ts +1 -1
- package/dist-types/pagination/DescribePullRequestEventsPaginator.d.ts +1 -1
- package/dist-types/pagination/GetCommentReactionsPaginator.d.ts +1 -1
- package/dist-types/pagination/GetCommentsForComparedCommitPaginator.d.ts +1 -1
- package/dist-types/pagination/GetCommentsForPullRequestPaginator.d.ts +1 -1
- package/dist-types/pagination/GetDifferencesPaginator.d.ts +1 -1
- package/dist-types/pagination/GetMergeConflictsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListApprovalRuleTemplatesPaginator.d.ts +1 -1
- package/dist-types/pagination/ListAssociatedApprovalRuleTemplatesForRepositoryPaginator.d.ts +1 -1
- package/dist-types/pagination/ListBranchesPaginator.d.ts +1 -1
- package/dist-types/pagination/ListFileCommitHistoryPaginator.d.ts +1 -1
- package/dist-types/pagination/ListPullRequestsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListRepositoriesForApprovalRuleTemplatePaginator.d.ts +1 -1
- package/dist-types/pagination/ListRepositoriesPaginator.d.ts +1 -1
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/ts3.4/CodeCommit.d.ts +17 -0
- package/dist-types/ts3.4/CodeCommitClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/ListFileCommitHistoryCommand.d.ts +2 -4
- package/dist-types/ts3.4/commands/ListPullRequestsCommand.d.ts +4 -2
- package/dist-types/ts3.4/commands/UpdateRepositoryEncryptionKeyCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +39 -28
- package/dist-types/ts3.4/models/models_1.d.ts +45 -0
- package/dist-types/ts3.4/pagination/DescribeMergeConflictsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/DescribePullRequestEventsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/GetCommentReactionsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/GetCommentsForComparedCommitPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/GetCommentsForPullRequestPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/GetDifferencesPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/GetMergeConflictsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListApprovalRuleTemplatesPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListAssociatedApprovalRuleTemplatesForRepositoryPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListBranchesPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListFileCommitHistoryPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListPullRequestsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListRepositoriesForApprovalRuleTemplatePaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListRepositoriesPaginator.d.ts +3 -3
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
- package/package.json +6 -5
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListPullRequests = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const CodeCommitClient_1 = require("../CodeCommitClient");
|
|
5
6
|
const ListPullRequestsCommand_1 = require("../commands/ListPullRequestsCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListPullRequestsCommand_1.ListPullRequestsCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListPullRequests(config, input, ...additionalArguments) {
|
|
10
|
-
let token = config.startingToken || undefined;
|
|
11
|
-
let hasNext = true;
|
|
12
|
-
let page;
|
|
13
|
-
while (hasNext) {
|
|
14
|
-
input.nextToken = token;
|
|
15
|
-
input["maxResults"] = config.pageSize;
|
|
16
|
-
if (config.client instanceof CodeCommitClient_1.CodeCommitClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected CodeCommit | CodeCommitClient");
|
|
21
|
-
}
|
|
22
|
-
yield page;
|
|
23
|
-
const prevToken = token;
|
|
24
|
-
token = page.nextToken;
|
|
25
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
26
|
-
}
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
exports.paginateListPullRequests = paginateListPullRequests;
|
|
7
|
+
exports.paginateListPullRequests = (0, core_1.createPaginator)(CodeCommitClient_1.CodeCommitClient, ListPullRequestsCommand_1.ListPullRequestsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListRepositoriesForApprovalRuleTemplate = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const CodeCommitClient_1 = require("../CodeCommitClient");
|
|
5
6
|
const ListRepositoriesForApprovalRuleTemplateCommand_1 = require("../commands/ListRepositoriesForApprovalRuleTemplateCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListRepositoriesForApprovalRuleTemplateCommand_1.ListRepositoriesForApprovalRuleTemplateCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListRepositoriesForApprovalRuleTemplate(config, input, ...additionalArguments) {
|
|
10
|
-
let token = config.startingToken || undefined;
|
|
11
|
-
let hasNext = true;
|
|
12
|
-
let page;
|
|
13
|
-
while (hasNext) {
|
|
14
|
-
input.nextToken = token;
|
|
15
|
-
input["maxResults"] = config.pageSize;
|
|
16
|
-
if (config.client instanceof CodeCommitClient_1.CodeCommitClient) {
|
|
17
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
throw new Error("Invalid client, expected CodeCommit | CodeCommitClient");
|
|
21
|
-
}
|
|
22
|
-
yield page;
|
|
23
|
-
const prevToken = token;
|
|
24
|
-
token = page.nextToken;
|
|
25
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
26
|
-
}
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
exports.paginateListRepositoriesForApprovalRuleTemplate = paginateListRepositoriesForApprovalRuleTemplate;
|
|
7
|
+
exports.paginateListRepositoriesForApprovalRuleTemplate = (0, core_1.createPaginator)(CodeCommitClient_1.CodeCommitClient, ListRepositoriesForApprovalRuleTemplateCommand_1.ListRepositoriesForApprovalRuleTemplateCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,28 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paginateListRepositories = void 0;
|
|
4
|
+
const core_1 = require("@smithy/core");
|
|
4
5
|
const CodeCommitClient_1 = require("../CodeCommitClient");
|
|
5
6
|
const ListRepositoriesCommand_1 = require("../commands/ListRepositoriesCommand");
|
|
6
|
-
|
|
7
|
-
return await client.send(new ListRepositoriesCommand_1.ListRepositoriesCommand(input), ...args);
|
|
8
|
-
};
|
|
9
|
-
async function* paginateListRepositories(config, input, ...additionalArguments) {
|
|
10
|
-
let token = config.startingToken || undefined;
|
|
11
|
-
let hasNext = true;
|
|
12
|
-
let page;
|
|
13
|
-
while (hasNext) {
|
|
14
|
-
input.nextToken = token;
|
|
15
|
-
if (config.client instanceof CodeCommitClient_1.CodeCommitClient) {
|
|
16
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
throw new Error("Invalid client, expected CodeCommit | CodeCommitClient");
|
|
20
|
-
}
|
|
21
|
-
yield page;
|
|
22
|
-
const prevToken = token;
|
|
23
|
-
token = page.nextToken;
|
|
24
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
25
|
-
}
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
exports.paginateListRepositories = paginateListRepositories;
|
|
7
|
+
exports.paginateListRepositories = (0, core_1.createPaginator)(CodeCommitClient_1.CodeCommitClient, ListRepositoriesCommand_1.ListRepositoriesCommand, "nextToken", "nextToken", "");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.se_ListTagsForResourceCommand = exports.se_ListRepositoriesForApprovalRuleTemplateCommand = exports.se_ListRepositoriesCommand = exports.se_ListPullRequestsCommand = exports.se_ListFileCommitHistoryCommand = exports.se_ListBranchesCommand = exports.se_ListAssociatedApprovalRuleTemplatesForRepositoryCommand = exports.se_ListApprovalRuleTemplatesCommand = exports.se_GetRepositoryTriggersCommand = exports.se_GetRepositoryCommand = exports.se_GetPullRequestOverrideStateCommand = exports.se_GetPullRequestApprovalStatesCommand = exports.se_GetPullRequestCommand = exports.se_GetMergeOptionsCommand = exports.se_GetMergeConflictsCommand = exports.se_GetMergeCommitCommand = exports.se_GetFolderCommand = exports.se_GetFileCommand = exports.se_GetDifferencesCommand = exports.se_GetCommitCommand = exports.se_GetCommentsForPullRequestCommand = exports.se_GetCommentsForComparedCommitCommand = exports.se_GetCommentReactionsCommand = exports.se_GetCommentCommand = exports.se_GetBranchCommand = exports.se_GetBlobCommand = exports.se_GetApprovalRuleTemplateCommand = exports.se_EvaluatePullRequestApprovalRulesCommand = exports.se_DisassociateApprovalRuleTemplateFromRepositoryCommand = exports.se_DescribePullRequestEventsCommand = exports.se_DescribeMergeConflictsCommand = exports.se_DeleteRepositoryCommand = exports.se_DeletePullRequestApprovalRuleCommand = exports.se_DeleteFileCommand = exports.se_DeleteCommentContentCommand = exports.se_DeleteBranchCommand = exports.se_DeleteApprovalRuleTemplateCommand = exports.se_CreateUnreferencedMergeCommitCommand = exports.se_CreateRepositoryCommand = exports.se_CreatePullRequestApprovalRuleCommand = exports.se_CreatePullRequestCommand = exports.se_CreateCommitCommand = exports.se_CreateBranchCommand = exports.se_CreateApprovalRuleTemplateCommand = exports.se_BatchGetRepositoriesCommand = exports.se_BatchGetCommitsCommand = exports.se_BatchDisassociateApprovalRuleTemplateFromRepositoriesCommand = exports.se_BatchDescribeMergeConflictsCommand = exports.se_BatchAssociateApprovalRuleTemplateWithRepositoriesCommand = exports.se_AssociateApprovalRuleTemplateWithRepositoryCommand = void 0;
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.de_UpdateRepositoryNameCommand = exports.de_UpdateRepositoryDescriptionCommand = exports.de_UpdatePullRequestTitleCommand = exports.de_UpdatePullRequestStatusCommand = exports.de_UpdatePullRequestDescriptionCommand = exports.de_UpdatePullRequestApprovalStateCommand = void 0;
|
|
4
|
+
exports.de_DescribePullRequestEventsCommand = exports.de_DescribeMergeConflictsCommand = exports.de_DeleteRepositoryCommand = exports.de_DeletePullRequestApprovalRuleCommand = exports.de_DeleteFileCommand = exports.de_DeleteCommentContentCommand = exports.de_DeleteBranchCommand = exports.de_DeleteApprovalRuleTemplateCommand = exports.de_CreateUnreferencedMergeCommitCommand = exports.de_CreateRepositoryCommand = exports.de_CreatePullRequestApprovalRuleCommand = exports.de_CreatePullRequestCommand = exports.de_CreateCommitCommand = exports.de_CreateBranchCommand = exports.de_CreateApprovalRuleTemplateCommand = exports.de_BatchGetRepositoriesCommand = exports.de_BatchGetCommitsCommand = exports.de_BatchDisassociateApprovalRuleTemplateFromRepositoriesCommand = exports.de_BatchDescribeMergeConflictsCommand = exports.de_BatchAssociateApprovalRuleTemplateWithRepositoriesCommand = exports.de_AssociateApprovalRuleTemplateWithRepositoryCommand = exports.se_UpdateRepositoryNameCommand = exports.se_UpdateRepositoryEncryptionKeyCommand = exports.se_UpdateRepositoryDescriptionCommand = exports.se_UpdatePullRequestTitleCommand = exports.se_UpdatePullRequestStatusCommand = exports.se_UpdatePullRequestDescriptionCommand = exports.se_UpdatePullRequestApprovalStateCommand = exports.se_UpdatePullRequestApprovalRuleContentCommand = exports.se_UpdateDefaultBranchCommand = exports.se_UpdateCommentCommand = exports.se_UpdateApprovalRuleTemplateNameCommand = exports.se_UpdateApprovalRuleTemplateDescriptionCommand = exports.se_UpdateApprovalRuleTemplateContentCommand = exports.se_UntagResourceCommand = exports.se_TestRepositoryTriggersCommand = exports.se_TagResourceCommand = exports.se_PutRepositoryTriggersCommand = exports.se_PutFileCommand = exports.se_PutCommentReactionCommand = exports.se_PostCommentReplyCommand = exports.se_PostCommentForPullRequestCommand = exports.se_PostCommentForComparedCommitCommand = exports.se_OverridePullRequestApprovalRulesCommand = exports.se_MergePullRequestByThreeWayCommand = exports.se_MergePullRequestBySquashCommand = exports.se_MergePullRequestByFastForwardCommand = exports.se_MergeBranchesByThreeWayCommand = exports.se_MergeBranchesBySquashCommand = exports.se_MergeBranchesByFastForwardCommand = void 0;
|
|
5
|
+
exports.de_UpdateDefaultBranchCommand = exports.de_UpdateCommentCommand = exports.de_UpdateApprovalRuleTemplateNameCommand = exports.de_UpdateApprovalRuleTemplateDescriptionCommand = exports.de_UpdateApprovalRuleTemplateContentCommand = exports.de_UntagResourceCommand = exports.de_TestRepositoryTriggersCommand = exports.de_TagResourceCommand = exports.de_PutRepositoryTriggersCommand = exports.de_PutFileCommand = exports.de_PutCommentReactionCommand = exports.de_PostCommentReplyCommand = exports.de_PostCommentForPullRequestCommand = exports.de_PostCommentForComparedCommitCommand = exports.de_OverridePullRequestApprovalRulesCommand = exports.de_MergePullRequestByThreeWayCommand = exports.de_MergePullRequestBySquashCommand = exports.de_MergePullRequestByFastForwardCommand = exports.de_MergeBranchesByThreeWayCommand = exports.de_MergeBranchesBySquashCommand = exports.de_MergeBranchesByFastForwardCommand = exports.de_ListTagsForResourceCommand = exports.de_ListRepositoriesForApprovalRuleTemplateCommand = exports.de_ListRepositoriesCommand = exports.de_ListPullRequestsCommand = exports.de_ListFileCommitHistoryCommand = exports.de_ListBranchesCommand = exports.de_ListAssociatedApprovalRuleTemplatesForRepositoryCommand = exports.de_ListApprovalRuleTemplatesCommand = exports.de_GetRepositoryTriggersCommand = exports.de_GetRepositoryCommand = exports.de_GetPullRequestOverrideStateCommand = exports.de_GetPullRequestApprovalStatesCommand = exports.de_GetPullRequestCommand = exports.de_GetMergeOptionsCommand = exports.de_GetMergeConflictsCommand = exports.de_GetMergeCommitCommand = exports.de_GetFolderCommand = exports.de_GetFileCommand = exports.de_GetDifferencesCommand = exports.de_GetCommitCommand = exports.de_GetCommentsForPullRequestCommand = exports.de_GetCommentsForComparedCommitCommand = exports.de_GetCommentReactionsCommand = exports.de_GetCommentCommand = exports.de_GetBranchCommand = exports.de_GetBlobCommand = exports.de_GetApprovalRuleTemplateCommand = exports.de_EvaluatePullRequestApprovalRulesCommand = exports.de_DisassociateApprovalRuleTemplateFromRepositoryCommand = void 0;
|
|
6
|
+
exports.de_UpdateRepositoryNameCommand = exports.de_UpdateRepositoryEncryptionKeyCommand = exports.de_UpdateRepositoryDescriptionCommand = exports.de_UpdatePullRequestTitleCommand = exports.de_UpdatePullRequestStatusCommand = exports.de_UpdatePullRequestDescriptionCommand = exports.de_UpdatePullRequestApprovalStateCommand = exports.de_UpdatePullRequestApprovalRuleContentCommand = void 0;
|
|
7
7
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
8
8
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
9
9
|
const uuid_1 = require("uuid");
|
|
@@ -549,6 +549,13 @@ const se_UpdateRepositoryDescriptionCommand = async (input, context) => {
|
|
|
549
549
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
550
550
|
};
|
|
551
551
|
exports.se_UpdateRepositoryDescriptionCommand = se_UpdateRepositoryDescriptionCommand;
|
|
552
|
+
const se_UpdateRepositoryEncryptionKeyCommand = async (input, context) => {
|
|
553
|
+
const headers = sharedHeaders("UpdateRepositoryEncryptionKey");
|
|
554
|
+
let body;
|
|
555
|
+
body = JSON.stringify((0, smithy_client_1._json)(input));
|
|
556
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
557
|
+
};
|
|
558
|
+
exports.se_UpdateRepositoryEncryptionKeyCommand = se_UpdateRepositoryEncryptionKeyCommand;
|
|
552
559
|
const se_UpdateRepositoryNameCommand = async (input, context) => {
|
|
553
560
|
const headers = sharedHeaders("UpdateRepositoryName");
|
|
554
561
|
let body;
|
|
@@ -1420,6 +1427,12 @@ const de_CreateRepositoryCommandError = async (output, context) => {
|
|
|
1420
1427
|
case "EncryptionKeyDisabledException":
|
|
1421
1428
|
case "com.amazonaws.codecommit#EncryptionKeyDisabledException":
|
|
1422
1429
|
throw await de_EncryptionKeyDisabledExceptionRes(parsedOutput, context);
|
|
1430
|
+
case "EncryptionKeyInvalidIdException":
|
|
1431
|
+
case "com.amazonaws.codecommit#EncryptionKeyInvalidIdException":
|
|
1432
|
+
throw await de_EncryptionKeyInvalidIdExceptionRes(parsedOutput, context);
|
|
1433
|
+
case "EncryptionKeyInvalidUsageException":
|
|
1434
|
+
case "com.amazonaws.codecommit#EncryptionKeyInvalidUsageException":
|
|
1435
|
+
throw await de_EncryptionKeyInvalidUsageExceptionRes(parsedOutput, context);
|
|
1423
1436
|
case "EncryptionKeyNotFoundException":
|
|
1424
1437
|
case "com.amazonaws.codecommit#EncryptionKeyNotFoundException":
|
|
1425
1438
|
throw await de_EncryptionKeyNotFoundExceptionRes(parsedOutput, context);
|
|
@@ -6076,6 +6089,69 @@ const de_UpdateRepositoryDescriptionCommandError = async (output, context) => {
|
|
|
6076
6089
|
});
|
|
6077
6090
|
}
|
|
6078
6091
|
};
|
|
6092
|
+
const de_UpdateRepositoryEncryptionKeyCommand = async (output, context) => {
|
|
6093
|
+
if (output.statusCode >= 300) {
|
|
6094
|
+
return de_UpdateRepositoryEncryptionKeyCommandError(output, context);
|
|
6095
|
+
}
|
|
6096
|
+
const data = await parseBody(output.body, context);
|
|
6097
|
+
let contents = {};
|
|
6098
|
+
contents = (0, smithy_client_1._json)(data);
|
|
6099
|
+
const response = {
|
|
6100
|
+
$metadata: deserializeMetadata(output),
|
|
6101
|
+
...contents,
|
|
6102
|
+
};
|
|
6103
|
+
return response;
|
|
6104
|
+
};
|
|
6105
|
+
exports.de_UpdateRepositoryEncryptionKeyCommand = de_UpdateRepositoryEncryptionKeyCommand;
|
|
6106
|
+
const de_UpdateRepositoryEncryptionKeyCommandError = async (output, context) => {
|
|
6107
|
+
const parsedOutput = {
|
|
6108
|
+
...output,
|
|
6109
|
+
body: await parseErrorBody(output.body, context),
|
|
6110
|
+
};
|
|
6111
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6112
|
+
switch (errorCode) {
|
|
6113
|
+
case "EncryptionIntegrityChecksFailedException":
|
|
6114
|
+
case "com.amazonaws.codecommit#EncryptionIntegrityChecksFailedException":
|
|
6115
|
+
throw await de_EncryptionIntegrityChecksFailedExceptionRes(parsedOutput, context);
|
|
6116
|
+
case "EncryptionKeyAccessDeniedException":
|
|
6117
|
+
case "com.amazonaws.codecommit#EncryptionKeyAccessDeniedException":
|
|
6118
|
+
throw await de_EncryptionKeyAccessDeniedExceptionRes(parsedOutput, context);
|
|
6119
|
+
case "EncryptionKeyDisabledException":
|
|
6120
|
+
case "com.amazonaws.codecommit#EncryptionKeyDisabledException":
|
|
6121
|
+
throw await de_EncryptionKeyDisabledExceptionRes(parsedOutput, context);
|
|
6122
|
+
case "EncryptionKeyInvalidIdException":
|
|
6123
|
+
case "com.amazonaws.codecommit#EncryptionKeyInvalidIdException":
|
|
6124
|
+
throw await de_EncryptionKeyInvalidIdExceptionRes(parsedOutput, context);
|
|
6125
|
+
case "EncryptionKeyInvalidUsageException":
|
|
6126
|
+
case "com.amazonaws.codecommit#EncryptionKeyInvalidUsageException":
|
|
6127
|
+
throw await de_EncryptionKeyInvalidUsageExceptionRes(parsedOutput, context);
|
|
6128
|
+
case "EncryptionKeyNotFoundException":
|
|
6129
|
+
case "com.amazonaws.codecommit#EncryptionKeyNotFoundException":
|
|
6130
|
+
throw await de_EncryptionKeyNotFoundExceptionRes(parsedOutput, context);
|
|
6131
|
+
case "EncryptionKeyRequiredException":
|
|
6132
|
+
case "com.amazonaws.codecommit#EncryptionKeyRequiredException":
|
|
6133
|
+
throw await de_EncryptionKeyRequiredExceptionRes(parsedOutput, context);
|
|
6134
|
+
case "EncryptionKeyUnavailableException":
|
|
6135
|
+
case "com.amazonaws.codecommit#EncryptionKeyUnavailableException":
|
|
6136
|
+
throw await de_EncryptionKeyUnavailableExceptionRes(parsedOutput, context);
|
|
6137
|
+
case "InvalidRepositoryNameException":
|
|
6138
|
+
case "com.amazonaws.codecommit#InvalidRepositoryNameException":
|
|
6139
|
+
throw await de_InvalidRepositoryNameExceptionRes(parsedOutput, context);
|
|
6140
|
+
case "RepositoryDoesNotExistException":
|
|
6141
|
+
case "com.amazonaws.codecommit#RepositoryDoesNotExistException":
|
|
6142
|
+
throw await de_RepositoryDoesNotExistExceptionRes(parsedOutput, context);
|
|
6143
|
+
case "RepositoryNameRequiredException":
|
|
6144
|
+
case "com.amazonaws.codecommit#RepositoryNameRequiredException":
|
|
6145
|
+
throw await de_RepositoryNameRequiredExceptionRes(parsedOutput, context);
|
|
6146
|
+
default:
|
|
6147
|
+
const parsedBody = parsedOutput.body;
|
|
6148
|
+
return throwDefaultError({
|
|
6149
|
+
output,
|
|
6150
|
+
parsedBody,
|
|
6151
|
+
errorCode,
|
|
6152
|
+
});
|
|
6153
|
+
}
|
|
6154
|
+
};
|
|
6079
6155
|
const de_UpdateRepositoryNameCommand = async (output, context) => {
|
|
6080
6156
|
if (output.statusCode >= 300) {
|
|
6081
6157
|
return de_UpdateRepositoryNameCommandError(output, context);
|
|
@@ -6484,6 +6560,24 @@ const de_EncryptionKeyDisabledExceptionRes = async (parsedOutput, context) => {
|
|
|
6484
6560
|
});
|
|
6485
6561
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
6486
6562
|
};
|
|
6563
|
+
const de_EncryptionKeyInvalidIdExceptionRes = async (parsedOutput, context) => {
|
|
6564
|
+
const body = parsedOutput.body;
|
|
6565
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
6566
|
+
const exception = new models_0_1.EncryptionKeyInvalidIdException({
|
|
6567
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
6568
|
+
...deserialized,
|
|
6569
|
+
});
|
|
6570
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
6571
|
+
};
|
|
6572
|
+
const de_EncryptionKeyInvalidUsageExceptionRes = async (parsedOutput, context) => {
|
|
6573
|
+
const body = parsedOutput.body;
|
|
6574
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
6575
|
+
const exception = new models_0_1.EncryptionKeyInvalidUsageException({
|
|
6576
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
6577
|
+
...deserialized,
|
|
6578
|
+
});
|
|
6579
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
6580
|
+
};
|
|
6487
6581
|
const de_EncryptionKeyNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
6488
6582
|
const body = parsedOutput.body;
|
|
6489
6583
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
@@ -6493,6 +6587,15 @@ const de_EncryptionKeyNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
6493
6587
|
});
|
|
6494
6588
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
6495
6589
|
};
|
|
6590
|
+
const de_EncryptionKeyRequiredExceptionRes = async (parsedOutput, context) => {
|
|
6591
|
+
const body = parsedOutput.body;
|
|
6592
|
+
const deserialized = (0, smithy_client_1._json)(body);
|
|
6593
|
+
const exception = new models_1_1.EncryptionKeyRequiredException({
|
|
6594
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
6595
|
+
...deserialized,
|
|
6596
|
+
});
|
|
6597
|
+
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
6598
|
+
};
|
|
6496
6599
|
const de_EncryptionKeyUnavailableExceptionRes = async (parsedOutput, context) => {
|
|
6497
6600
|
const body = parsedOutput.body;
|
|
6498
6601
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
@@ -6676,7 +6779,7 @@ const de_InvalidApprovalStateExceptionRes = async (parsedOutput, context) => {
|
|
|
6676
6779
|
const de_InvalidAuthorArnExceptionRes = async (parsedOutput, context) => {
|
|
6677
6780
|
const body = parsedOutput.body;
|
|
6678
6781
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
6679
|
-
const exception = new
|
|
6782
|
+
const exception = new models_1_1.InvalidAuthorArnException({
|
|
6680
6783
|
$metadata: deserializeMetadata(parsedOutput),
|
|
6681
6784
|
...deserialized,
|
|
6682
6785
|
});
|
|
@@ -6928,7 +7031,7 @@ const de_InvalidPullRequestIdExceptionRes = async (parsedOutput, context) => {
|
|
|
6928
7031
|
const de_InvalidPullRequestStatusExceptionRes = async (parsedOutput, context) => {
|
|
6929
7032
|
const body = parsedOutput.body;
|
|
6930
7033
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
6931
|
-
const exception = new
|
|
7034
|
+
const exception = new models_1_1.InvalidPullRequestStatusException({
|
|
6932
7035
|
$metadata: deserializeMetadata(parsedOutput),
|
|
6933
7036
|
...deserialized,
|
|
6934
7037
|
});
|
|
@@ -7987,6 +8090,7 @@ const de_ApprovalRuleTemplate = (output, context) => {
|
|
|
7987
8090
|
};
|
|
7988
8091
|
const de_BatchGetRepositoriesOutput = (output, context) => {
|
|
7989
8092
|
return (0, smithy_client_1.take)(output, {
|
|
8093
|
+
errors: smithy_client_1._json,
|
|
7990
8094
|
repositories: (_) => de_RepositoryMetadataList(_, context),
|
|
7991
8095
|
repositoriesNotFound: smithy_client_1._json,
|
|
7992
8096
|
});
|
|
@@ -8219,6 +8323,7 @@ const de_RepositoryMetadata = (output, context) => {
|
|
|
8219
8323
|
cloneUrlSsh: smithy_client_1.expectString,
|
|
8220
8324
|
creationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
8221
8325
|
defaultBranch: smithy_client_1.expectString,
|
|
8326
|
+
kmsKeyId: smithy_client_1.expectString,
|
|
8222
8327
|
lastModifiedDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
8223
8328
|
repositoryDescription: smithy_client_1.expectString,
|
|
8224
8329
|
repositoryId: smithy_client_1.expectString,
|
package/dist-es/CodeCommit.js
CHANGED
|
@@ -77,6 +77,7 @@ import { UpdatePullRequestDescriptionCommand, } from "./commands/UpdatePullReque
|
|
|
77
77
|
import { UpdatePullRequestStatusCommand, } from "./commands/UpdatePullRequestStatusCommand";
|
|
78
78
|
import { UpdatePullRequestTitleCommand, } from "./commands/UpdatePullRequestTitleCommand";
|
|
79
79
|
import { UpdateRepositoryDescriptionCommand, } from "./commands/UpdateRepositoryDescriptionCommand";
|
|
80
|
+
import { UpdateRepositoryEncryptionKeyCommand, } from "./commands/UpdateRepositoryEncryptionKeyCommand";
|
|
80
81
|
import { UpdateRepositoryNameCommand, } from "./commands/UpdateRepositoryNameCommand";
|
|
81
82
|
const commands = {
|
|
82
83
|
AssociateApprovalRuleTemplateWithRepositoryCommand,
|
|
@@ -156,6 +157,7 @@ const commands = {
|
|
|
156
157
|
UpdatePullRequestStatusCommand,
|
|
157
158
|
UpdatePullRequestTitleCommand,
|
|
158
159
|
UpdateRepositoryDescriptionCommand,
|
|
160
|
+
UpdateRepositoryEncryptionKeyCommand,
|
|
159
161
|
UpdateRepositoryNameCommand,
|
|
160
162
|
};
|
|
161
163
|
export class CodeCommit extends CodeCommitClient {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_UpdateRepositoryEncryptionKeyCommand, se_UpdateRepositoryEncryptionKeyCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class UpdateRepositoryEncryptionKeyCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, UpdateRepositoryEncryptionKeyCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "CodeCommitClient";
|
|
26
|
+
const commandName = "UpdateRepositoryEncryptionKeyCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "CodeCommit_20150413",
|
|
35
|
+
operation: "UpdateRepositoryEncryptionKey",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_UpdateRepositoryEncryptionKeyCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_UpdateRepositoryEncryptionKeyCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -75,4 +75,5 @@ export * from "./UpdatePullRequestDescriptionCommand";
|
|
|
75
75
|
export * from "./UpdatePullRequestStatusCommand";
|
|
76
76
|
export * from "./UpdatePullRequestTitleCommand";
|
|
77
77
|
export * from "./UpdateRepositoryDescriptionCommand";
|
|
78
|
+
export * from "./UpdateRepositoryEncryptionKeyCommand";
|
|
78
79
|
export * from "./UpdateRepositoryNameCommand";
|
|
@@ -506,6 +506,14 @@ export class CommitIdsListRequiredException extends __BaseException {
|
|
|
506
506
|
Object.setPrototypeOf(this, CommitIdsListRequiredException.prototype);
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
|
+
export const BatchGetRepositoriesErrorCodeEnum = {
|
|
510
|
+
ENCRYPTION_INTEGRITY_CHECKS_FAILED_EXCEPTION: "EncryptionIntegrityChecksFailedException",
|
|
511
|
+
ENCRYPTION_KEY_ACCESS_DENIED_EXCEPTION: "EncryptionKeyAccessDeniedException",
|
|
512
|
+
ENCRYPTION_KEY_DISABLED_EXCEPTION: "EncryptionKeyDisabledException",
|
|
513
|
+
ENCRYPTION_KEY_NOT_FOUND_EXCEPTION: "EncryptionKeyNotFoundException",
|
|
514
|
+
ENCRYPTION_KEY_UNAVAILABLE_EXCEPTION: "EncryptionKeyUnavailableException",
|
|
515
|
+
REPOSITORY_DOES_NOT_EXIST_EXCEPTION: "RepositoryDoesNotExistException",
|
|
516
|
+
};
|
|
509
517
|
export class BeforeCommitIdAndAfterCommitIdAreSameException extends __BaseException {
|
|
510
518
|
constructor(opts) {
|
|
511
519
|
super({
|
|
@@ -1290,6 +1298,30 @@ export class PullRequestIdRequiredException extends __BaseException {
|
|
|
1290
1298
|
Object.setPrototypeOf(this, PullRequestIdRequiredException.prototype);
|
|
1291
1299
|
}
|
|
1292
1300
|
}
|
|
1301
|
+
export class EncryptionKeyInvalidIdException extends __BaseException {
|
|
1302
|
+
constructor(opts) {
|
|
1303
|
+
super({
|
|
1304
|
+
name: "EncryptionKeyInvalidIdException",
|
|
1305
|
+
$fault: "client",
|
|
1306
|
+
...opts,
|
|
1307
|
+
});
|
|
1308
|
+
this.name = "EncryptionKeyInvalidIdException";
|
|
1309
|
+
this.$fault = "client";
|
|
1310
|
+
Object.setPrototypeOf(this, EncryptionKeyInvalidIdException.prototype);
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
export class EncryptionKeyInvalidUsageException extends __BaseException {
|
|
1314
|
+
constructor(opts) {
|
|
1315
|
+
super({
|
|
1316
|
+
name: "EncryptionKeyInvalidUsageException",
|
|
1317
|
+
$fault: "client",
|
|
1318
|
+
...opts,
|
|
1319
|
+
});
|
|
1320
|
+
this.name = "EncryptionKeyInvalidUsageException";
|
|
1321
|
+
this.$fault = "client";
|
|
1322
|
+
Object.setPrototypeOf(this, EncryptionKeyInvalidUsageException.prototype);
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1293
1325
|
export class InvalidRepositoryDescriptionException extends __BaseException {
|
|
1294
1326
|
constructor(opts) {
|
|
1295
1327
|
super({
|
|
@@ -1749,27 +1781,3 @@ export const RepositoryTriggerEventEnum = {
|
|
|
1749
1781
|
DELETE_REFERENCE: "deleteReference",
|
|
1750
1782
|
UPDATE_REFERENCE: "updateReference",
|
|
1751
1783
|
};
|
|
1752
|
-
export class InvalidAuthorArnException extends __BaseException {
|
|
1753
|
-
constructor(opts) {
|
|
1754
|
-
super({
|
|
1755
|
-
name: "InvalidAuthorArnException",
|
|
1756
|
-
$fault: "client",
|
|
1757
|
-
...opts,
|
|
1758
|
-
});
|
|
1759
|
-
this.name = "InvalidAuthorArnException";
|
|
1760
|
-
this.$fault = "client";
|
|
1761
|
-
Object.setPrototypeOf(this, InvalidAuthorArnException.prototype);
|
|
1762
|
-
}
|
|
1763
|
-
}
|
|
1764
|
-
export class InvalidPullRequestStatusException extends __BaseException {
|
|
1765
|
-
constructor(opts) {
|
|
1766
|
-
super({
|
|
1767
|
-
name: "InvalidPullRequestStatusException",
|
|
1768
|
-
$fault: "client",
|
|
1769
|
-
...opts,
|
|
1770
|
-
});
|
|
1771
|
-
this.name = "InvalidPullRequestStatusException";
|
|
1772
|
-
this.$fault = "client";
|
|
1773
|
-
Object.setPrototypeOf(this, InvalidPullRequestStatusException.prototype);
|
|
1774
|
-
}
|
|
1775
|
-
}
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import { CodeCommitServiceException as __BaseException } from "./CodeCommitServiceException";
|
|
2
|
+
export class InvalidAuthorArnException extends __BaseException {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
super({
|
|
5
|
+
name: "InvalidAuthorArnException",
|
|
6
|
+
$fault: "client",
|
|
7
|
+
...opts,
|
|
8
|
+
});
|
|
9
|
+
this.name = "InvalidAuthorArnException";
|
|
10
|
+
this.$fault = "client";
|
|
11
|
+
Object.setPrototypeOf(this, InvalidAuthorArnException.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class InvalidPullRequestStatusException extends __BaseException {
|
|
15
|
+
constructor(opts) {
|
|
16
|
+
super({
|
|
17
|
+
name: "InvalidPullRequestStatusException",
|
|
18
|
+
$fault: "client",
|
|
19
|
+
...opts,
|
|
20
|
+
});
|
|
21
|
+
this.name = "InvalidPullRequestStatusException";
|
|
22
|
+
this.$fault = "client";
|
|
23
|
+
Object.setPrototypeOf(this, InvalidPullRequestStatusException.prototype);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
2
26
|
export class InvalidOrderException extends __BaseException {
|
|
3
27
|
constructor(opts) {
|
|
4
28
|
super({
|
|
@@ -523,3 +547,15 @@ export class PullRequestStatusRequiredException extends __BaseException {
|
|
|
523
547
|
Object.setPrototypeOf(this, PullRequestStatusRequiredException.prototype);
|
|
524
548
|
}
|
|
525
549
|
}
|
|
550
|
+
export class EncryptionKeyRequiredException extends __BaseException {
|
|
551
|
+
constructor(opts) {
|
|
552
|
+
super({
|
|
553
|
+
name: "EncryptionKeyRequiredException",
|
|
554
|
+
$fault: "client",
|
|
555
|
+
...opts,
|
|
556
|
+
});
|
|
557
|
+
this.name = "EncryptionKeyRequiredException";
|
|
558
|
+
this.$fault = "client";
|
|
559
|
+
Object.setPrototypeOf(this, EncryptionKeyRequiredException.prototype);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { CodeCommitClient } from "../CodeCommitClient";
|
|
2
3
|
import { DescribeMergeConflictsCommand, } from "../commands/DescribeMergeConflictsCommand";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new DescribeMergeConflictsCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateDescribeMergeConflicts(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.nextToken = token;
|
|
12
|
-
input["maxMergeHunks"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof CodeCommitClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected CodeCommit | CodeCommitClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.nextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateDescribeMergeConflicts = createPaginator(CodeCommitClient, DescribeMergeConflictsCommand, "nextToken", "nextToken", "maxMergeHunks");
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { CodeCommitClient } from "../CodeCommitClient";
|
|
2
3
|
import { DescribePullRequestEventsCommand, } from "../commands/DescribePullRequestEventsCommand";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new DescribePullRequestEventsCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateDescribePullRequestEvents(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.nextToken = token;
|
|
12
|
-
input["maxResults"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof CodeCommitClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected CodeCommit | CodeCommitClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.nextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateDescribePullRequestEvents = createPaginator(CodeCommitClient, DescribePullRequestEventsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { CodeCommitClient } from "../CodeCommitClient";
|
|
2
3
|
import { GetCommentReactionsCommand, } from "../commands/GetCommentReactionsCommand";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new GetCommentReactionsCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateGetCommentReactions(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.nextToken = token;
|
|
12
|
-
input["maxResults"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof CodeCommitClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected CodeCommit | CodeCommitClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.nextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateGetCommentReactions = createPaginator(CodeCommitClient, GetCommentReactionsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { CodeCommitClient } from "../CodeCommitClient";
|
|
2
3
|
import { GetCommentsForComparedCommitCommand, } from "../commands/GetCommentsForComparedCommitCommand";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new GetCommentsForComparedCommitCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateGetCommentsForComparedCommit(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.nextToken = token;
|
|
12
|
-
input["maxResults"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof CodeCommitClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected CodeCommit | CodeCommitClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.nextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateGetCommentsForComparedCommit = createPaginator(CodeCommitClient, GetCommentsForComparedCommitCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { CodeCommitClient } from "../CodeCommitClient";
|
|
2
3
|
import { GetCommentsForPullRequestCommand, } from "../commands/GetCommentsForPullRequestCommand";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new GetCommentsForPullRequestCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateGetCommentsForPullRequest(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.nextToken = token;
|
|
12
|
-
input["maxResults"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof CodeCommitClient) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected CodeCommit | CodeCommitClient");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.nextToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateGetCommentsForPullRequest = createPaginator(CodeCommitClient, GetCommentsForPullRequestCommand, "nextToken", "nextToken", "maxResults");
|