Skip to content

Commit 7759481

Browse files
author
Steven Yuan
authored
chore(codegen): update smithy-typescript commit (#5510)
* chore(codegen): revert 03d6230 This reverts commit 03d6230. * chore(codegen): update smithy-typescript commit * feat(experimentalIdentityAndAuth): update STS customizations * chore(codegen): generate clients
1 parent 03d6230 commit 7759481

File tree

24 files changed

+4980
-94
lines changed

24 files changed

+4980
-94
lines changed

clients/client-bedrock-agent-runtime/src/commands/InvokeAgentCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,12 @@ export class InvokeAgentCommand extends $Command<
369369
[SMITHY_CONTEXT_KEY]: {
370370
service: "AmazonBedrockAgentRunTimeService",
371371
operation: "InvokeAgent",
372+
/**
373+
* @internal
374+
*/
375+
eventStream: {
376+
output: true,
377+
},
372378
},
373379
};
374380
const { requestHandler } = configuration;

clients/client-bedrock-runtime/src/commands/InvokeModelWithResponseStreamCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ export class InvokeModelWithResponseStreamCommand extends $Command<
190190
[SMITHY_CONTEXT_KEY]: {
191191
service: "AmazonBedrockFrontendService",
192192
operation: "InvokeModelWithResponseStream",
193+
/**
194+
* @internal
195+
*/
196+
eventStream: {
197+
output: true,
198+
},
193199
},
194200
};
195201
const { requestHandler } = configuration;

clients/client-cloudwatch-logs/src/commands/StartLiveTailCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ export class StartLiveTailCommand extends $Command<
212212
[SMITHY_CONTEXT_KEY]: {
213213
service: "Logs_20140328",
214214
operation: "StartLiveTail",
215+
/**
216+
* @internal
217+
*/
218+
eventStream: {
219+
output: true,
220+
},
215221
},
216222
};
217223
const { requestHandler } = configuration;

clients/client-codecatalyst/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@aws-sdk/util-user-agent-browser": "*",
3333
"@aws-sdk/util-user-agent-node": "*",
3434
"@smithy/config-resolver": "^2.0.21",
35-
"@smithy/core": "^1.0.5",
35+
"@smithy/core": "^1.1.0",
3636
"@smithy/fetch-http-handler": "^2.3.1",
3737
"@smithy/hash-node": "^2.0.17",
3838
"@smithy/invalid-dependency": "^2.0.15",

clients/client-kinesis/src/commands/SubscribeToShardCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@ export class SubscribeToShardCommand extends $Command<
221221
[SMITHY_CONTEXT_KEY]: {
222222
service: "Kinesis_20131202",
223223
operation: "SubscribeToShard",
224+
/**
225+
* @internal
226+
*/
227+
eventStream: {
228+
output: true,
229+
},
224230
},
225231
};
226232
const { requestHandler } = configuration;

clients/client-lambda/src/commands/InvokeWithResponseStreamCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,12 @@ export class InvokeWithResponseStreamCommand extends $Command<
250250
[SMITHY_CONTEXT_KEY]: {
251251
service: "AWSGirApiService",
252252
operation: "InvokeWithResponseStream",
253+
/**
254+
* @internal
255+
*/
256+
eventStream: {
257+
output: true,
258+
},
253259
},
254260
};
255261
const { requestHandler } = configuration;

clients/client-lex-runtime-v2/src/commands/StartConversationCommand.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,13 @@ export class StartConversationCommand extends $Command<
523523
[SMITHY_CONTEXT_KEY]: {
524524
service: "AWSDeepSenseRunTimeServiceApi2_0",
525525
operation: "StartConversation",
526+
/**
527+
* @internal
528+
*/
529+
eventStream: {
530+
input: true,
531+
output: true,
532+
},
526533
},
527534
};
528535
const { requestHandler } = configuration;

clients/client-rekognitionstreaming/src/commands/StartFaceLivenessSessionCommand.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,13 @@ export class StartFaceLivenessSessionCommand extends $Command<
280280
[SMITHY_CONTEXT_KEY]: {
281281
service: "RekognitionStreamingService",
282282
operation: "StartFaceLivenessSession",
283+
/**
284+
* @internal
285+
*/
286+
eventStream: {
287+
input: true,
288+
output: true,
289+
},
283290
},
284291
};
285292
const { requestHandler } = configuration;

clients/client-s3/src/commands/SelectObjectContentCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,12 @@ export class SelectObjectContentCommand extends $Command<
311311
[SMITHY_CONTEXT_KEY]: {
312312
service: "AmazonS3",
313313
operation: "SelectObjectContent",
314+
/**
315+
* @internal
316+
*/
317+
eventStream: {
318+
output: true,
319+
},
314320
},
315321
};
316322
const { requestHandler } = configuration;

clients/client-sagemaker-runtime/src/commands/InvokeEndpointWithResponseStreamCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ export class InvokeEndpointWithResponseStreamCommand extends $Command<
209209
[SMITHY_CONTEXT_KEY]: {
210210
service: "AmazonSageMakerRuntime",
211211
operation: "InvokeEndpointWithResponseStream",
212+
/**
213+
* @internal
214+
*/
215+
eventStream: {
216+
output: true,
217+
},
212218
},
213219
};
214220
const { requestHandler } = configuration;

clients/client-sts/src/defaultStsRoleAssumers.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ export const decorateDefaultCredentialProvider =
122122
(provider: DefaultCredentialProvider): DefaultCredentialProvider =>
123123
(input: STSClientResolvedConfig) =>
124124
provider({
125-
roleAssumer: getDefaultRoleAssumer(input, input.stsClientCtor),
126-
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input, input.stsClientCtor),
125+
roleAssumer: getDefaultRoleAssumer(input, input.stsClientCtor as new (options: STSClientConfig) => STSClient),
126+
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(
127+
input,
128+
input.stsClientCtor as new (options: STSClientConfig) => STSClient
129+
),
127130
...input,
128131
});

clients/client-transcribe-streaming/src/commands/StartCallAnalyticsStreamTranscriptionCommand.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,13 @@ export class StartCallAnalyticsStreamTranscriptionCommand extends $Command<
288288
[SMITHY_CONTEXT_KEY]: {
289289
service: "Transcribe",
290290
operation: "StartCallAnalyticsStreamTranscription",
291+
/**
292+
* @internal
293+
*/
294+
eventStream: {
295+
input: true,
296+
output: true,
297+
},
291298
},
292299
};
293300
const { requestHandler } = configuration;

clients/client-transcribe-streaming/src/commands/StartMedicalStreamTranscriptionCommand.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,13 @@ export class StartMedicalStreamTranscriptionCommand extends $Command<
269269
[SMITHY_CONTEXT_KEY]: {
270270
service: "Transcribe",
271271
operation: "StartMedicalStreamTranscription",
272+
/**
273+
* @internal
274+
*/
275+
eventStream: {
276+
input: true,
277+
output: true,
278+
},
272279
},
273280
};
274281
const { requestHandler } = configuration;

clients/client-transcribe-streaming/src/commands/StartStreamTranscriptionCommand.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,13 @@ export class StartStreamTranscriptionCommand extends $Command<
293293
[SMITHY_CONTEXT_KEY]: {
294294
service: "Transcribe",
295295
operation: "StartStreamTranscription",
296+
/**
297+
* @internal
298+
*/
299+
eventStream: {
300+
input: true,
301+
output: true,
302+
},
296303
},
297304
};
298305
const { requestHandler } = configuration;

codegen/generic-client-test-codegen/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ plugins {
3737
dependencies {
3838
implementation("software.amazon.smithy:smithy-aws-protocol-tests:$smithyVersion")
3939
implementation("software.amazon.smithy:smithy-aws-traits:$smithyVersion")
40-
implementation("software.amazon.smithy:smithy-rules-engine:$smithyVersion")
4140
implementation(project(":smithy-aws-typescript-codegen"))
4241
}
4342

codegen/generic-client-test-codegen/model/weather.smithy

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ $version: "2.0"
33
namespace example.weather
44

55
use aws.auth#sigv4
6-
use aws.api#service
76

87
@authDefinition
98
@trait
@@ -13,7 +12,6 @@ structure customAuth {}
1312
@protocolDefinition
1413
structure fakeProtocol {}
1514

16-
@service(sdkId: "weather")
1715
@fakeProtocol
1816
@httpApiKeyAuth(name: "X-Api-Key", in: "header")
1917
@httpBearerAuth
@@ -88,30 +86,3 @@ operation SameAsService {
8886
service: String
8987
}
9088
}
91-
92-
apply Weather @smithy.rules#endpointRuleSet({
93-
"version": "1.3",
94-
"parameters": {
95-
"Region": {
96-
"required": true,
97-
"type": "String",
98-
"documentation": "docs"
99-
}
100-
},
101-
"rules": [
102-
{
103-
"conditions": [],
104-
"documentation": "base rule",
105-
"endpoint": {
106-
"url": "https://{Region}.amazonaws.com",
107-
"properties": {},
108-
"headers": {}
109-
},
110-
"type": "endpoint"
111-
}
112-
]
113-
})
114-
115-
apply Weather @smithy.rules#clientContextParams(
116-
Region: {type: "string", documentation: "docs"}
117-
)

codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/auth/http/integration/AddSTSAuthCustomizations.java

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import software.amazon.smithy.typescript.codegen.CodegenUtils;
2828
import software.amazon.smithy.typescript.codegen.LanguageTarget;
2929
import software.amazon.smithy.typescript.codegen.TypeScriptCodegenContext;
30+
import software.amazon.smithy.typescript.codegen.TypeScriptDependency;
3031
import software.amazon.smithy.typescript.codegen.TypeScriptSettings;
3132
import software.amazon.smithy.typescript.codegen.TypeScriptWriter;
3233
import software.amazon.smithy.typescript.codegen.auth.AuthUtils;
@@ -78,27 +79,6 @@ public List<String> runAfter() {
7879
AwsSdkCustomizeSigV4Auth.class.getCanonicalName());
7980
}
8081

81-
// @Override
82-
// public List<RuntimeClientPlugin> getClientPlugins() {
83-
// return ListUtils.of(
84-
// RuntimeClientPlugin.builder()
85-
// .inputConfig(Symbol.builder()
86-
// .namespace(AuthUtils.HTTP_AUTH_SCHEME_PROVIDER_MODULE, "/")
87-
// .name("StsAuthInputConfig")
88-
// .build())
89-
// .resolvedConfig(Symbol.builder()
90-
// .namespace(AuthUtils.HTTP_AUTH_SCHEME_PROVIDER_MODULE, "/")
91-
// .name("StsAuthResolvedConfig")
92-
// .build())
93-
// .resolveFunction(Symbol.builder()
94-
// .namespace(AuthUtils.HTTP_AUTH_SCHEME_PROVIDER_MODULE, "/")
95-
// .name("resolveStsAuthConfig")
96-
// .build())
97-
// .servicePredicate((m, s) -> isSTSService(s.toShapeId()))
98-
// .build()
99-
// );
100-
// }
101-
10282
@Override
10383
public Model preprocessModel(Model model, TypeScriptSettings settings) {
10484
return backfillOptionalAuthOperations(model, settings);
@@ -208,12 +188,13 @@ public void customize(TypeScriptCodegenContext codegenContext) {
208188
w.addRelativeImport(serviceSymbol.getName() + "Config", null,
209189
Paths.get(".", serviceSymbol.getNamespace()));
210190
w.write("export interface StsAuthInputConfig {}\n");
211-
w.openBlock("export interface StsAuthResolvedConfig {", "}\n", () -> {
212-
w.writeDocs("""
191+
w.openBlock("export interface StsAuthResolvedConfig {", "}\n", () -> w
192+
.writeDocs("""
213193
Reference to STSClient class constructor.
214194
@internal""")
215-
.write("stsClientCtor: new (config: STSClientConfig) => STSClient");
216-
});
195+
.addDependency(TypeScriptDependency.SMITHY_TYPES)
196+
.addImport("Client", null, TypeScriptDependency.SMITHY_TYPES)
197+
.write("stsClientCtor: new (clientConfig: any) => Client<any, any, any>;"));
217198
w.openBlock("""
218199
export const resolveStsAuthConfig = <T>(
219200
input: T & StsAuthInputConfig

codegen/smithy-aws-typescript-codegen/src/main/resources/software/amazon/smithy/aws/typescript/codegen/sts-client-defaultStsRoleAssumers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const decorateDefaultCredentialProvider =
119119
(provider: DefaultCredentialProvider): DefaultCredentialProvider =>
120120
(input: STSClientResolvedConfig) =>
121121
provider({
122-
roleAssumer: getDefaultRoleAssumer(input, input.stsClientCtor),
123-
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input, input.stsClientCtor),
122+
roleAssumer: getDefaultRoleAssumer(input, input.stsClientCtor as new (options: STSClientConfig) => STSClient),
123+
roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input, input.stsClientCtor as new (options: STSClientConfig) => STSClient),
124124
...input,
125125
});

0 commit comments

Comments
 (0)