Skip to content

Commit eb4e29b

Browse files
authored
chore(codegen): type imports and index tests (aws#7545)
* chore(codegen): type imports and index tests * chore: enable index tests * chore: add index tests
1 parent ab68395 commit eb4e29b

File tree

30,151 files changed

+304958
-91547
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

30,151 files changed

+304958
-91547
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This is the public Makefile containing some build commands.
22
# You can implement some additional personal commands such as login and sync in Makefile.private.mk (unversioned).
33

4-
.PHONY: bundles test-unit test-integration test-protocols test-e2e
4+
.PHONY: bundles test-unit test-integration test-protocols test-e2e test-indices test-schema test-endpoints test-bundlers
55

66
# fetch AWS testing credentials
77
login:
@@ -26,6 +26,9 @@ test-unit: bundles
2626
test-types:
2727
npx tsc -p tsconfig.test.json
2828

29+
test-indices:
30+
node ./scripts/validation/client-index-tests.mjs
31+
2932
test-protocols: bundles
3033
yarn g:vitest run -c vitest.config.protocols.integ.mts
3134

@@ -38,6 +41,7 @@ test-integration: bundles
3841
yarn g:vitest run -c vitest.config.integ.mts
3942
make test-protocols
4043
make test-types
44+
make test-indices
4145
make test-endpoints
4246

4347
test-endpoints:

clients/client-accessanalyzer/package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
1212
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
1313
"extract:docs": "api-extractor run --local",
14-
"generate:client": "node ../../scripts/generate-clients/single-service --solo accessanalyzer"
14+
"generate:client": "node ../../scripts/generate-clients/single-service --solo accessanalyzer",
15+
"test:index": "tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"
1516
},
1617
"main": "./dist-cjs/index.js",
1718
"types": "./dist-types/index.d.ts",
@@ -32,26 +33,26 @@
3233
"@aws-sdk/util-user-agent-browser": "*",
3334
"@aws-sdk/util-user-agent-node": "*",
3435
"@smithy/config-resolver": "^4.4.3",
35-
"@smithy/core": "^3.18.5",
36+
"@smithy/core": "^3.18.6",
3637
"@smithy/fetch-http-handler": "^5.3.6",
3738
"@smithy/hash-node": "^4.2.5",
3839
"@smithy/invalid-dependency": "^4.2.5",
3940
"@smithy/middleware-content-length": "^4.2.5",
40-
"@smithy/middleware-endpoint": "^4.3.12",
41-
"@smithy/middleware-retry": "^4.4.12",
41+
"@smithy/middleware-endpoint": "^4.3.13",
42+
"@smithy/middleware-retry": "^4.4.13",
4243
"@smithy/middleware-serde": "^4.2.6",
4344
"@smithy/middleware-stack": "^4.2.5",
4445
"@smithy/node-config-provider": "^4.3.5",
4546
"@smithy/node-http-handler": "^4.4.5",
4647
"@smithy/protocol-http": "^5.3.5",
47-
"@smithy/smithy-client": "^4.9.8",
48+
"@smithy/smithy-client": "^4.9.9",
4849
"@smithy/types": "^4.9.0",
4950
"@smithy/url-parser": "^4.2.5",
5051
"@smithy/util-base64": "^4.3.0",
5152
"@smithy/util-body-length-browser": "^4.2.0",
5253
"@smithy/util-body-length-node": "^4.2.1",
53-
"@smithy/util-defaults-mode-browser": "^4.3.11",
54-
"@smithy/util-defaults-mode-node": "^4.2.14",
54+
"@smithy/util-defaults-mode-browser": "^4.3.12",
55+
"@smithy/util-defaults-mode-node": "^4.2.15",
5556
"@smithy/util-endpoints": "^3.2.5",
5657
"@smithy/util-middleware": "^4.2.5",
5758
"@smithy/util-retry": "^4.2.5",

clients/client-accessanalyzer/src/AccessAnalyzer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// smithy-typescript generated code
22
import { createAggregatedClient } from "@smithy/smithy-client";
3-
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
3+
import type { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
44

5-
import { AccessAnalyzerClient, AccessAnalyzerClientConfig } from "./AccessAnalyzerClient";
5+
import { AccessAnalyzerClient } from "./AccessAnalyzerClient";
66
import {
77
ApplyArchiveRuleCommand,
88
ApplyArchiveRuleCommandInput,

clients/client-accessanalyzer/src/AccessAnalyzerClient.ts

Lines changed: 37 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,69 @@
11
// smithy-typescript generated code
22
import {
3+
type HostHeaderInputConfig,
4+
type HostHeaderResolvedConfig,
35
getHostHeaderPlugin,
4-
HostHeaderInputConfig,
5-
HostHeaderResolvedConfig,
66
resolveHostHeaderConfig,
77
} from "@aws-sdk/middleware-host-header";
88
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
99
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
1010
import {
11+
type UserAgentInputConfig,
12+
type UserAgentResolvedConfig,
1113
getUserAgentPlugin,
1214
resolveUserAgentConfig,
13-
UserAgentInputConfig,
14-
UserAgentResolvedConfig,
1515
} from "@aws-sdk/middleware-user-agent";
16-
import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver";
16+
import { type RegionInputConfig, type RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver";
1717
import {
1818
DefaultIdentityProviderConfig,
1919
getHttpAuthSchemeEndpointRuleSetPlugin,
2020
getHttpSigningPlugin,
2121
} from "@smithy/core";
2222
import { getSchemaSerdePlugin } from "@smithy/core/schema";
2323
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
24-
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint";
25-
import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
26-
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
2724
import {
25+
type EndpointInputConfig,
26+
type EndpointResolvedConfig,
27+
resolveEndpointConfig,
28+
} from "@smithy/middleware-endpoint";
29+
import {
30+
type RetryInputConfig,
31+
type RetryResolvedConfig,
32+
getRetryPlugin,
33+
resolveRetryConfig,
34+
} from "@smithy/middleware-retry";
35+
import type { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
36+
import {
37+
type DefaultsMode as __DefaultsMode,
38+
type SmithyConfiguration as __SmithyConfiguration,
39+
type SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
2840
Client as __Client,
29-
DefaultsMode as __DefaultsMode,
30-
SmithyConfiguration as __SmithyConfiguration,
31-
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
3241
} from "@smithy/smithy-client";
3342
import {
43+
type BodyLengthCalculator as __BodyLengthCalculator,
44+
type CheckOptionalClientConfig as __CheckOptionalClientConfig,
45+
type ChecksumConstructor as __ChecksumConstructor,
46+
type ClientProtocol,
47+
type Decoder as __Decoder,
48+
type Encoder as __Encoder,
49+
type HashConstructor as __HashConstructor,
50+
type HttpHandlerOptions as __HttpHandlerOptions,
51+
type HttpRequest,
52+
type HttpResponse,
53+
type Logger as __Logger,
54+
type Provider as __Provider,
55+
type StreamCollector as __StreamCollector,
56+
type UrlParser as __UrlParser,
3457
AwsCredentialIdentityProvider,
35-
BodyLengthCalculator as __BodyLengthCalculator,
36-
CheckOptionalClientConfig as __CheckOptionalClientConfig,
37-
ChecksumConstructor as __ChecksumConstructor,
38-
ClientProtocol,
39-
Decoder as __Decoder,
40-
Encoder as __Encoder,
4158
EndpointV2 as __EndpointV2,
42-
HashConstructor as __HashConstructor,
43-
HttpHandlerOptions as __HttpHandlerOptions,
44-
HttpRequest,
45-
HttpResponse,
46-
Logger as __Logger,
47-
Provider as __Provider,
4859
Provider,
49-
StreamCollector as __StreamCollector,
50-
UrlParser as __UrlParser,
5160
UserAgent as __UserAgent,
5261
} from "@smithy/types";
5362

5463
import {
64+
type HttpAuthSchemeInputConfig,
65+
type HttpAuthSchemeResolvedConfig,
5566
defaultAccessAnalyzerHttpAuthSchemeParametersProvider,
56-
HttpAuthSchemeInputConfig,
57-
HttpAuthSchemeResolvedConfig,
5867
resolveHttpAuthSchemeConfig,
5968
} from "./auth/httpAuthSchemeProvider";
6069
import { ApplyArchiveRuleCommandInput, ApplyArchiveRuleCommandOutput } from "./commands/ApplyArchiveRuleCommand";
@@ -140,7 +149,7 @@ import {
140149
resolveClientEndpointParameters,
141150
} from "./endpoint/EndpointParameters";
142151
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
143-
import { resolveRuntimeExtensions, RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
152+
import { type RuntimeExtension, type RuntimeExtensionsConfig, resolveRuntimeExtensions } from "./runtimeExtensions";
144153

145154
export { __Client };
146155

clients/client-accessanalyzer/src/auth/httpAuthExtensionConfiguration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// smithy-typescript generated code
2-
import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
2+
import { type HttpAuthScheme, AwsCredentialIdentity, AwsCredentialIdentityProvider } from "@smithy/types";
33

4-
import { AccessAnalyzerHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
4+
import type { AccessAnalyzerHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
55

66
/**
77
* @internal

clients/client-accessanalyzer/src/auth/httpAuthSchemeProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
AwsSdkSigV4PreviouslyResolved,
66
resolveAwsSdkSigV4Config,
77
} from "@aws-sdk/core";
8-
import {
8+
import type {
99
HandlerExecutionContext,
1010
HttpAuthOption,
1111
HttpAuthScheme,
@@ -16,7 +16,7 @@ import {
1616
} from "@smithy/types";
1717
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
1818

19-
import { AccessAnalyzerClientConfig, AccessAnalyzerClientResolvedConfig } from "../AccessAnalyzerClient";
19+
import { type AccessAnalyzerClientResolvedConfig, AccessAnalyzerClientConfig } from "../AccessAnalyzerClient";
2020

2121
/**
2222
* @internal

clients/client-accessanalyzer/src/commands/ApplyArchiveRuleCommand.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
33
import { Command as $Command } from "@smithy/smithy-client";
4-
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
4+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

6-
import { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient";
6+
import type {
7+
AccessAnalyzerClientResolvedConfig,
8+
ServiceInputTypes,
9+
ServiceOutputTypes,
10+
} from "../AccessAnalyzerClient";
711
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { ApplyArchiveRuleRequest } from "../models/models_0";
12+
import type { ApplyArchiveRuleRequest } from "../models/models_0";
913
import { ApplyArchiveRule } from "../schemas/schemas_0";
1014

1115
/**

clients/client-accessanalyzer/src/commands/CancelPolicyGenerationCommand.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
33
import { Command as $Command } from "@smithy/smithy-client";
4-
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
4+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

6-
import { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient";
6+
import type {
7+
AccessAnalyzerClientResolvedConfig,
8+
ServiceInputTypes,
9+
ServiceOutputTypes,
10+
} from "../AccessAnalyzerClient";
711
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { CancelPolicyGenerationRequest, CancelPolicyGenerationResponse } from "../models/models_0";
12+
import type { CancelPolicyGenerationRequest, CancelPolicyGenerationResponse } from "../models/models_0";
913
import { CancelPolicyGeneration } from "../schemas/schemas_0";
1014

1115
/**

clients/client-accessanalyzer/src/commands/CheckAccessNotGrantedCommand.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
33
import { Command as $Command } from "@smithy/smithy-client";
4-
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
4+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

6-
import { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient";
6+
import type {
7+
AccessAnalyzerClientResolvedConfig,
8+
ServiceInputTypes,
9+
ServiceOutputTypes,
10+
} from "../AccessAnalyzerClient";
711
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { CheckAccessNotGrantedRequest, CheckAccessNotGrantedResponse } from "../models/models_0";
12+
import type { CheckAccessNotGrantedRequest, CheckAccessNotGrantedResponse } from "../models/models_0";
913
import { CheckAccessNotGranted } from "../schemas/schemas_0";
1014

1115
/**

clients/client-accessanalyzer/src/commands/CheckNoNewAccessCommand.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
// smithy-typescript generated code
22
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
33
import { Command as $Command } from "@smithy/smithy-client";
4-
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
4+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
55

6-
import { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient";
6+
import type {
7+
AccessAnalyzerClientResolvedConfig,
8+
ServiceInputTypes,
9+
ServiceOutputTypes,
10+
} from "../AccessAnalyzerClient";
711
import { commonParams } from "../endpoint/EndpointParameters";
8-
import { CheckNoNewAccessRequest, CheckNoNewAccessResponse } from "../models/models_0";
12+
import type { CheckNoNewAccessRequest, CheckNoNewAccessResponse } from "../models/models_0";
913
import { CheckNoNewAccess } from "../schemas/schemas_0";
1014

1115
/**

0 commit comments

Comments
 (0)