@aws-sdk/client-codeguru-security 3.1076.0 → 3.1078.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.
Files changed (59) hide show
  1. package/dist-cjs/index.js +24 -135
  2. package/dist-es/commandBuilder.js +6 -0
  3. package/dist-es/commands/BatchGetFindingsCommand.js +2 -14
  4. package/dist-es/commands/CreateScanCommand.js +2 -14
  5. package/dist-es/commands/CreateUploadUrlCommand.js +2 -14
  6. package/dist-es/commands/GetAccountConfigurationCommand.js +2 -14
  7. package/dist-es/commands/GetFindingsCommand.js +2 -14
  8. package/dist-es/commands/GetMetricsSummaryCommand.js +2 -14
  9. package/dist-es/commands/GetScanCommand.js +2 -14
  10. package/dist-es/commands/ListFindingsMetricsCommand.js +2 -14
  11. package/dist-es/commands/ListScansCommand.js +2 -14
  12. package/dist-es/commands/ListTagsForResourceCommand.js +2 -14
  13. package/dist-es/commands/TagResourceCommand.js +2 -14
  14. package/dist-es/commands/UntagResourceCommand.js +2 -14
  15. package/dist-es/commands/UpdateAccountConfigurationCommand.js +2 -14
  16. package/dist-es/index.js +1 -0
  17. package/dist-es/runtimeConfig.browser.js +0 -2
  18. package/dist-es/runtimeConfig.js +1 -2
  19. package/dist-es/runtimeConfig.native.js +0 -2
  20. package/dist-es/runtimeConfig.shared.js +2 -0
  21. package/dist-types/commandBuilder.d.ts +18 -0
  22. package/dist-types/commands/BatchGetFindingsCommand.d.ts +3 -8
  23. package/dist-types/commands/CreateScanCommand.d.ts +3 -8
  24. package/dist-types/commands/CreateUploadUrlCommand.d.ts +3 -8
  25. package/dist-types/commands/GetAccountConfigurationCommand.d.ts +3 -8
  26. package/dist-types/commands/GetFindingsCommand.d.ts +3 -8
  27. package/dist-types/commands/GetMetricsSummaryCommand.d.ts +3 -8
  28. package/dist-types/commands/GetScanCommand.d.ts +3 -8
  29. package/dist-types/commands/ListFindingsMetricsCommand.d.ts +3 -8
  30. package/dist-types/commands/ListScansCommand.d.ts +3 -8
  31. package/dist-types/commands/ListTagsForResourceCommand.d.ts +3 -8
  32. package/dist-types/commands/TagResourceCommand.d.ts +3 -8
  33. package/dist-types/commands/UntagResourceCommand.d.ts +3 -8
  34. package/dist-types/commands/UpdateAccountConfigurationCommand.d.ts +3 -8
  35. package/dist-types/index.d.ts +1 -0
  36. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  37. package/dist-types/runtimeConfig.d.ts +1 -1
  38. package/dist-types/runtimeConfig.native.d.ts +1 -1
  39. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  40. package/dist-types/ts3.4/commandBuilder.d.ts +46 -0
  41. package/dist-types/ts3.4/commands/BatchGetFindingsCommand.d.ts +7 -16
  42. package/dist-types/ts3.4/commands/CreateScanCommand.d.ts +7 -16
  43. package/dist-types/ts3.4/commands/CreateUploadUrlCommand.d.ts +7 -16
  44. package/dist-types/ts3.4/commands/GetAccountConfigurationCommand.d.ts +7 -16
  45. package/dist-types/ts3.4/commands/GetFindingsCommand.d.ts +7 -16
  46. package/dist-types/ts3.4/commands/GetMetricsSummaryCommand.d.ts +7 -16
  47. package/dist-types/ts3.4/commands/GetScanCommand.d.ts +7 -16
  48. package/dist-types/ts3.4/commands/ListFindingsMetricsCommand.d.ts +7 -16
  49. package/dist-types/ts3.4/commands/ListScansCommand.d.ts +7 -16
  50. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +7 -16
  51. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +7 -16
  52. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +7 -16
  53. package/dist-types/ts3.4/commands/UpdateAccountConfigurationCommand.d.ts +7 -16
  54. package/dist-types/ts3.4/index.d.ts +1 -0
  55. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  56. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  57. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  58. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -0
  59. package/package.json +8 -10
package/dist-cjs/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
2
2
  const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require("@smithy/core");
3
- const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
4
- exports.$Command = Command;
3
+ const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require("@smithy/core/client");
4
+ const { Command: $Command } = require("@smithy/core/client");
5
+ exports.$Command = $Command;
5
6
  exports.__Client = Client;
6
7
  const { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require("@smithy/core/config");
7
8
  const { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
@@ -10,9 +11,10 @@ const { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CON
10
11
  const { TypeRegistry, getSchemaSerdePlugin } = require("@smithy/core/schema");
11
12
  const { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
12
13
  const { defaultProvider } = require("@aws-sdk/credential-provider-node");
13
- const { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require("@smithy/core/serde");
14
+ const { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require("@smithy/core/serde");
14
15
  const { streamCollector, NodeHttpHandler } = require("@smithy/node-http-handler");
15
16
  const { AwsRestJsonProtocol } = require("@aws-sdk/core/protocols");
17
+ const { Sha256 } = require("@smithy/core/checksum");
16
18
 
17
19
  const defaultCodeGuruSecurityHttpAuthSchemeParametersProvider = async (config, context, input) => {
18
20
  return {
@@ -67,7 +69,7 @@ const commonParams = {
67
69
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
68
70
  };
69
71
 
70
- var version = "3.1075.0";
72
+ var version = "3.1077.0";
71
73
  var packageInfo = {
72
74
  version: version};
73
75
 
@@ -785,6 +787,7 @@ const getRuntimeConfig$1 = (config) => {
785
787
  serviceTarget: "AwsCodeGuruSecurity",
786
788
  },
787
789
  serviceId: config?.serviceId ?? "CodeGuru Security",
790
+ sha256: config?.sha256 ?? Sha256,
788
791
  urlParser: config?.urlParser ?? parseUrl,
789
792
  utf8Decoder: config?.utf8Decoder ?? fromUtf8,
790
793
  utf8Encoder: config?.utf8Encoder ?? toUtf8,
@@ -818,7 +821,6 @@ const getRuntimeConfig = (config) => {
818
821
  ...NODE_RETRY_MODE_CONFIG_OPTIONS,
819
822
  default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
820
823
  }, config),
821
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
822
824
  streamCollector: config?.streamCollector ?? streamCollector,
823
825
  useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
824
826
  useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
@@ -906,160 +908,47 @@ class CodeGuruSecurityClient extends Client {
906
908
  }
907
909
  }
908
910
 
909
- class BatchGetFindingsCommand extends Command
910
- .classBuilder()
911
- .ep(commonParams)
912
- .m(function (Command, cs, config, o) {
913
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
914
- })
915
- .s("AwsCodeGuruSecurity", "BatchGetFindings", {})
916
- .n("CodeGuruSecurityClient", "BatchGetFindingsCommand")
917
- .sc(BatchGetFindings$)
918
- .build() {
911
+ const command = makeBuilder(commonParams, "AwsCodeGuruSecurity", "CodeGuruSecurityClient", getEndpointPlugin);
912
+ const _ep0 = {};
913
+ const _mw0 = (Command, cs, config, o) => [];
914
+
915
+ class BatchGetFindingsCommand extends command(_ep0, _mw0, "BatchGetFindings", BatchGetFindings$) {
919
916
  }
920
917
 
921
- class CreateScanCommand extends Command
922
- .classBuilder()
923
- .ep(commonParams)
924
- .m(function (Command, cs, config, o) {
925
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
926
- })
927
- .s("AwsCodeGuruSecurity", "CreateScan", {})
928
- .n("CodeGuruSecurityClient", "CreateScanCommand")
929
- .sc(CreateScan$)
930
- .build() {
918
+ class CreateScanCommand extends command(_ep0, _mw0, "CreateScan", CreateScan$) {
931
919
  }
932
920
 
933
- class CreateUploadUrlCommand extends Command
934
- .classBuilder()
935
- .ep(commonParams)
936
- .m(function (Command, cs, config, o) {
937
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
938
- })
939
- .s("AwsCodeGuruSecurity", "CreateUploadUrl", {})
940
- .n("CodeGuruSecurityClient", "CreateUploadUrlCommand")
941
- .sc(CreateUploadUrl$)
942
- .build() {
921
+ class CreateUploadUrlCommand extends command(_ep0, _mw0, "CreateUploadUrl", CreateUploadUrl$) {
943
922
  }
944
923
 
945
- class GetAccountConfigurationCommand extends Command
946
- .classBuilder()
947
- .ep(commonParams)
948
- .m(function (Command, cs, config, o) {
949
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
950
- })
951
- .s("AwsCodeGuruSecurity", "GetAccountConfiguration", {})
952
- .n("CodeGuruSecurityClient", "GetAccountConfigurationCommand")
953
- .sc(GetAccountConfiguration$)
954
- .build() {
924
+ class GetAccountConfigurationCommand extends command(_ep0, _mw0, "GetAccountConfiguration", GetAccountConfiguration$) {
955
925
  }
956
926
 
957
- class GetFindingsCommand extends Command
958
- .classBuilder()
959
- .ep(commonParams)
960
- .m(function (Command, cs, config, o) {
961
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
962
- })
963
- .s("AwsCodeGuruSecurity", "GetFindings", {})
964
- .n("CodeGuruSecurityClient", "GetFindingsCommand")
965
- .sc(GetFindings$)
966
- .build() {
927
+ class GetFindingsCommand extends command(_ep0, _mw0, "GetFindings", GetFindings$) {
967
928
  }
968
929
 
969
- class GetMetricsSummaryCommand extends Command
970
- .classBuilder()
971
- .ep(commonParams)
972
- .m(function (Command, cs, config, o) {
973
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
974
- })
975
- .s("AwsCodeGuruSecurity", "GetMetricsSummary", {})
976
- .n("CodeGuruSecurityClient", "GetMetricsSummaryCommand")
977
- .sc(GetMetricsSummary$)
978
- .build() {
930
+ class GetMetricsSummaryCommand extends command(_ep0, _mw0, "GetMetricsSummary", GetMetricsSummary$) {
979
931
  }
980
932
 
981
- class GetScanCommand extends Command
982
- .classBuilder()
983
- .ep(commonParams)
984
- .m(function (Command, cs, config, o) {
985
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
986
- })
987
- .s("AwsCodeGuruSecurity", "GetScan", {})
988
- .n("CodeGuruSecurityClient", "GetScanCommand")
989
- .sc(GetScan$)
990
- .build() {
933
+ class GetScanCommand extends command(_ep0, _mw0, "GetScan", GetScan$) {
991
934
  }
992
935
 
993
- class ListFindingsMetricsCommand extends Command
994
- .classBuilder()
995
- .ep(commonParams)
996
- .m(function (Command, cs, config, o) {
997
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
998
- })
999
- .s("AwsCodeGuruSecurity", "ListFindingsMetrics", {})
1000
- .n("CodeGuruSecurityClient", "ListFindingsMetricsCommand")
1001
- .sc(ListFindingsMetrics$)
1002
- .build() {
936
+ class ListFindingsMetricsCommand extends command(_ep0, _mw0, "ListFindingsMetrics", ListFindingsMetrics$) {
1003
937
  }
1004
938
 
1005
- class ListScansCommand extends Command
1006
- .classBuilder()
1007
- .ep(commonParams)
1008
- .m(function (Command, cs, config, o) {
1009
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1010
- })
1011
- .s("AwsCodeGuruSecurity", "ListScans", {})
1012
- .n("CodeGuruSecurityClient", "ListScansCommand")
1013
- .sc(ListScans$)
1014
- .build() {
939
+ class ListScansCommand extends command(_ep0, _mw0, "ListScans", ListScans$) {
1015
940
  }
1016
941
 
1017
- class ListTagsForResourceCommand extends Command
1018
- .classBuilder()
1019
- .ep(commonParams)
1020
- .m(function (Command, cs, config, o) {
1021
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1022
- })
1023
- .s("AwsCodeGuruSecurity", "ListTagsForResource", {})
1024
- .n("CodeGuruSecurityClient", "ListTagsForResourceCommand")
1025
- .sc(ListTagsForResource$)
1026
- .build() {
942
+ class ListTagsForResourceCommand extends command(_ep0, _mw0, "ListTagsForResource", ListTagsForResource$) {
1027
943
  }
1028
944
 
1029
- class TagResourceCommand extends Command
1030
- .classBuilder()
1031
- .ep(commonParams)
1032
- .m(function (Command, cs, config, o) {
1033
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1034
- })
1035
- .s("AwsCodeGuruSecurity", "TagResource", {})
1036
- .n("CodeGuruSecurityClient", "TagResourceCommand")
1037
- .sc(TagResource$)
1038
- .build() {
945
+ class TagResourceCommand extends command(_ep0, _mw0, "TagResource", TagResource$) {
1039
946
  }
1040
947
 
1041
- class UntagResourceCommand extends Command
1042
- .classBuilder()
1043
- .ep(commonParams)
1044
- .m(function (Command, cs, config, o) {
1045
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1046
- })
1047
- .s("AwsCodeGuruSecurity", "UntagResource", {})
1048
- .n("CodeGuruSecurityClient", "UntagResourceCommand")
1049
- .sc(UntagResource$)
1050
- .build() {
948
+ class UntagResourceCommand extends command(_ep0, _mw0, "UntagResource", UntagResource$) {
1051
949
  }
1052
950
 
1053
- class UpdateAccountConfigurationCommand extends Command
1054
- .classBuilder()
1055
- .ep(commonParams)
1056
- .m(function (Command, cs, config, o) {
1057
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
1058
- })
1059
- .s("AwsCodeGuruSecurity", "UpdateAccountConfiguration", {})
1060
- .n("CodeGuruSecurityClient", "UpdateAccountConfigurationCommand")
1061
- .sc(UpdateAccountConfiguration$)
1062
- .build() {
951
+ class UpdateAccountConfigurationCommand extends command(_ep0, _mw0, "UpdateAccountConfiguration", UpdateAccountConfiguration$) {
1063
952
  }
1064
953
 
1065
954
  const paginateGetFindings = createPaginator(CodeGuruSecurityClient, GetFindingsCommand, "nextToken", "nextToken", "maxResults");
@@ -0,0 +1,6 @@
1
+ import { makeBuilder } from "@smithy/core/client";
2
+ import { getEndpointPlugin } from "@smithy/core/endpoints";
3
+ import { commonParams } from "./endpoint/EndpointParameters";
4
+ export const command = makeBuilder(commonParams, "AwsCodeGuruSecurity", "CodeGuruSecurityClient", getEndpointPlugin);
5
+ export const _ep0 = {};
6
+ export const _mw0 = (Command, cs, config, o) => [];
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { BatchGetFindings$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class BatchGetFindingsCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "BatchGetFindings", {})
13
- .n("CodeGuruSecurityClient", "BatchGetFindingsCommand")
14
- .sc(BatchGetFindings$)
15
- .build() {
3
+ export class BatchGetFindingsCommand extends command(_ep0, _mw0, "BatchGetFindings", BatchGetFindings$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { CreateScan$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class CreateScanCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "CreateScan", {})
13
- .n("CodeGuruSecurityClient", "CreateScanCommand")
14
- .sc(CreateScan$)
15
- .build() {
3
+ export class CreateScanCommand extends command(_ep0, _mw0, "CreateScan", CreateScan$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { CreateUploadUrl$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class CreateUploadUrlCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "CreateUploadUrl", {})
13
- .n("CodeGuruSecurityClient", "CreateUploadUrlCommand")
14
- .sc(CreateUploadUrl$)
15
- .build() {
3
+ export class CreateUploadUrlCommand extends command(_ep0, _mw0, "CreateUploadUrl", CreateUploadUrl$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetAccountConfiguration$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetAccountConfigurationCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "GetAccountConfiguration", {})
13
- .n("CodeGuruSecurityClient", "GetAccountConfigurationCommand")
14
- .sc(GetAccountConfiguration$)
15
- .build() {
3
+ export class GetAccountConfigurationCommand extends command(_ep0, _mw0, "GetAccountConfiguration", GetAccountConfiguration$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetFindings$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetFindingsCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "GetFindings", {})
13
- .n("CodeGuruSecurityClient", "GetFindingsCommand")
14
- .sc(GetFindings$)
15
- .build() {
3
+ export class GetFindingsCommand extends command(_ep0, _mw0, "GetFindings", GetFindings$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetMetricsSummary$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetMetricsSummaryCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "GetMetricsSummary", {})
13
- .n("CodeGuruSecurityClient", "GetMetricsSummaryCommand")
14
- .sc(GetMetricsSummary$)
15
- .build() {
3
+ export class GetMetricsSummaryCommand extends command(_ep0, _mw0, "GetMetricsSummary", GetMetricsSummary$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetScan$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetScanCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "GetScan", {})
13
- .n("CodeGuruSecurityClient", "GetScanCommand")
14
- .sc(GetScan$)
15
- .build() {
3
+ export class GetScanCommand extends command(_ep0, _mw0, "GetScan", GetScan$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { ListFindingsMetrics$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class ListFindingsMetricsCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "ListFindingsMetrics", {})
13
- .n("CodeGuruSecurityClient", "ListFindingsMetricsCommand")
14
- .sc(ListFindingsMetrics$)
15
- .build() {
3
+ export class ListFindingsMetricsCommand extends command(_ep0, _mw0, "ListFindingsMetrics", ListFindingsMetrics$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { ListScans$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class ListScansCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "ListScans", {})
13
- .n("CodeGuruSecurityClient", "ListScansCommand")
14
- .sc(ListScans$)
15
- .build() {
3
+ export class ListScansCommand extends command(_ep0, _mw0, "ListScans", ListScans$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { ListTagsForResource$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class ListTagsForResourceCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "ListTagsForResource", {})
13
- .n("CodeGuruSecurityClient", "ListTagsForResourceCommand")
14
- .sc(ListTagsForResource$)
15
- .build() {
3
+ export class ListTagsForResourceCommand extends command(_ep0, _mw0, "ListTagsForResource", ListTagsForResource$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { TagResource$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class TagResourceCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "TagResource", {})
13
- .n("CodeGuruSecurityClient", "TagResourceCommand")
14
- .sc(TagResource$)
15
- .build() {
3
+ export class TagResourceCommand extends command(_ep0, _mw0, "TagResource", TagResource$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { UntagResource$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class UntagResourceCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "UntagResource", {})
13
- .n("CodeGuruSecurityClient", "UntagResourceCommand")
14
- .sc(UntagResource$)
15
- .build() {
3
+ export class UntagResourceCommand extends command(_ep0, _mw0, "UntagResource", UntagResource$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { UpdateAccountConfiguration$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class UpdateAccountConfigurationCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("AwsCodeGuruSecurity", "UpdateAccountConfiguration", {})
13
- .n("CodeGuruSecurityClient", "UpdateAccountConfigurationCommand")
14
- .sc(UpdateAccountConfiguration$)
15
- .build() {
3
+ export class UpdateAccountConfigurationCommand extends command(_ep0, _mw0, "UpdateAccountConfiguration", UpdateAccountConfiguration$) {
16
4
  }
package/dist-es/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from "./CodeGuruSecurityClient";
2
2
  export * from "./CodeGuruSecurity";
3
3
  export * from "./commands";
4
+ export { Command as $Command } from "@smithy/core/client";
4
5
  export * from "./schemas/schemas_0";
5
6
  export * from "./pagination";
6
7
  export * from "./models/enums";
@@ -1,5 +1,4 @@
1
1
  import packageInfo from "../package.json";
2
- import { Sha256 } from "@aws-crypto/sha256-browser";
3
2
  import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
4
3
  import { invalidProvider, loadConfigsForDefaultMode } from "@smithy/core/client";
5
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig, } from "@smithy/core/config";
@@ -23,7 +22,6 @@ export const getRuntimeConfig = (config) => {
23
22
  region: config?.region ?? invalidProvider("Region is missing"),
24
23
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
25
24
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
26
- sha256: config?.sha256 ?? Sha256,
27
25
  streamCollector: config?.streamCollector ?? streamCollector,
28
26
  useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
29
27
  useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
@@ -5,7 +5,7 @@ import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credentia
5
5
  import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
6
6
  import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
7
7
  import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
8
- import { calculateBodyLength, Hash } from "@smithy/core/serde";
8
+ import { calculateBodyLength } from "@smithy/core/serde";
9
9
  import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
10
10
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
11
11
  export const getRuntimeConfig = (config) => {
@@ -35,7 +35,6 @@ export const getRuntimeConfig = (config) => {
35
35
  ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
36
  default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
37
37
  }, config),
38
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
39
38
  streamCollector: config?.streamCollector ?? streamCollector,
40
39
  useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
41
40
  useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
@@ -1,4 +1,3 @@
1
- import { Sha256 } from "@aws-crypto/sha256-js";
2
1
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
3
2
  export const getRuntimeConfig = (config) => {
4
3
  const browserDefaults = getBrowserRuntimeConfig(config);
@@ -6,6 +5,5 @@ export const getRuntimeConfig = (config) => {
6
5
  ...browserDefaults,
7
6
  ...config,
8
7
  runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
8
  };
11
9
  };
@@ -1,5 +1,6 @@
1
1
  import { AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
2
2
  import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
3
+ import { Sha256 } from "@smithy/core/checksum";
3
4
  import { NoOpLogger } from "@smithy/core/client";
4
5
  import { parseUrl } from "@smithy/core/protocols";
5
6
  import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
@@ -31,6 +32,7 @@ export const getRuntimeConfig = (config) => {
31
32
  serviceTarget: "AwsCodeGuruSecurity",
32
33
  },
33
34
  serviceId: config?.serviceId ?? "CodeGuru Security",
35
+ sha256: config?.sha256 ?? Sha256,
34
36
  urlParser: config?.urlParser ?? parseUrl,
35
37
  utf8Decoder: config?.utf8Decoder ?? fromUtf8,
36
38
  utf8Encoder: config?.utf8Encoder ?? toUtf8,
@@ -0,0 +1,18 @@
1
+ import type { EndpointParameterInstructions } from "@smithy/types";
2
+ import type { CodeGuruSecurityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "./CodeGuruSecurityClient";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare const command: <I extends ServiceInputTypes, O extends ServiceOutputTypes>(added: EndpointParameterInstructions, plugins: (CommandCtor: any, clientStack: any, config: any, options: any) => import("@smithy/types").Pluggable<any, any>[], op: string, $: import("@smithy/types").StaticOperationSchema, smithyContext?: Record<string, unknown>) => {
7
+ new (input: I): import("@smithy/core/client").CommandImpl<I, O, CodeGuruSecurityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
8
+ new (...[input]: import("@smithy/types").OptionalParameter<I>): import("@smithy/core/client").CommandImpl<I, O, CodeGuruSecurityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
9
+ getEndpointParameterInstructions(): EndpointParameterInstructions;
10
+ };
11
+ /**
12
+ * @internal
13
+ */
14
+ export declare const _ep0: EndpointParameterInstructions;
15
+ /**
16
+ * @internal
17
+ */
18
+ export declare const _mw0: (Command: any, cs: any, config: any, o: any) => never[];
@@ -1,12 +1,9 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
1
  import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
- import type { CodeGuruSecurityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeGuruSecurityClient";
4
2
  import type { BatchGetFindingsRequest, BatchGetFindingsResponse } from "../models/models_0";
5
3
  /**
6
4
  * @public
7
5
  */
8
6
  export type { __MetadataBearer };
9
- export { $Command };
10
7
  /**
11
8
  * @public
12
9
  *
@@ -22,11 +19,9 @@ export interface BatchGetFindingsCommandInput extends BatchGetFindingsRequest {
22
19
  export interface BatchGetFindingsCommandOutput extends BatchGetFindingsResponse, __MetadataBearer {
23
20
  }
24
21
  declare const BatchGetFindingsCommand_base: {
25
- new (input: BatchGetFindingsCommandInput): import("@smithy/core/client").CommandImpl<BatchGetFindingsCommandInput, BatchGetFindingsCommandOutput, CodeGuruSecurityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (input: BatchGetFindingsCommandInput): import("@smithy/core/client").CommandImpl<BatchGetFindingsCommandInput, BatchGetFindingsCommandOutput, CodeGuruSecurityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
22
+ new (input: BatchGetFindingsCommandInput): import("@smithy/core/client").CommandImpl<BatchGetFindingsCommandInput, BatchGetFindingsCommandOutput, import("..").CodeGuruSecurityClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: BatchGetFindingsCommandInput): import("@smithy/core/client").CommandImpl<BatchGetFindingsCommandInput, BatchGetFindingsCommandOutput, import("..").CodeGuruSecurityClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
30
25
  };
31
26
  /**
32
27
  * <p>Returns a list of requested findings from standard scans.</p>
@@ -1,12 +1,9 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
1
  import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
- import type { CodeGuruSecurityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CodeGuruSecurityClient";
4
2
  import type { CreateScanRequest, CreateScanResponse } from "../models/models_0";
5
3
  /**
6
4
  * @public
7
5
  */
8
6
  export type { __MetadataBearer };
9
- export { $Command };
10
7
  /**
11
8
  * @public
12
9
  *
@@ -22,11 +19,9 @@ export interface CreateScanCommandInput extends CreateScanRequest {
22
19
  export interface CreateScanCommandOutput extends CreateScanResponse, __MetadataBearer {
23
20
  }
24
21
  declare const CreateScanCommand_base: {
25
- new (input: CreateScanCommandInput): import("@smithy/core/client").CommandImpl<CreateScanCommandInput, CreateScanCommandOutput, CodeGuruSecurityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (input: CreateScanCommandInput): import("@smithy/core/client").CommandImpl<CreateScanCommandInput, CreateScanCommandOutput, CodeGuruSecurityClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
22
+ new (input: CreateScanCommandInput): import("@smithy/core/client").CommandImpl<CreateScanCommandInput, CreateScanCommandOutput, import("..").CodeGuruSecurityClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: CreateScanCommandInput): import("@smithy/core/client").CommandImpl<CreateScanCommandInput, CreateScanCommandOutput, import("..").CodeGuruSecurityClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
30
25
  };
31
26
  /**
32
27
  * <p>Use to create a scan using code uploaded to an Amazon S3 bucket.</p>