@@ -248,6 +248,15 @@ private void generateHttpAuthSchemeInputConfigInterface(
248
248
w .write (" {" );
249
249
w .indent ();
250
250
w .addDependency (TypeScriptDependency .SMITHY_TYPES );
251
+
252
+ w .addImport ("Provider" , null , TypeScriptDependency .SMITHY_TYPES );
253
+ w .writeDocs ("""
254
+ A comma-separated list of case-sensitive auth scheme names. \
255
+ An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed. \
256
+ For example, the auth scheme with ID aws.auth#sigv4 is named sigv4. \
257
+ @public""" );
258
+ w .write ("authSchemePreference?: string[] | Provider<string[]>;\n " );
259
+
251
260
w .addImport ("HttpAuthScheme" , null , TypeScriptDependency .SMITHY_TYPES );
252
261
w .writeDocs ("""
253
262
Configuration of HttpAuthSchemes for a client which provides \
@@ -314,6 +323,15 @@ private void generateHttpAuthSchemeResolvedConfigInterface(
314
323
w .write (" {" );
315
324
w .indent ();
316
325
w .addDependency (TypeScriptDependency .SMITHY_TYPES );
326
+
327
+ w .addImport ("Provider" , null , TypeScriptDependency .SMITHY_TYPES );
328
+ w .writeDocs ("""
329
+ A comma-separated list of case-sensitive auth scheme names. \
330
+ An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed. \
331
+ For example, the auth scheme with ID aws.auth#sigv4 is named sigv4. \
332
+ @public""" );
333
+ w .write ("readonly authSchemePreference: Provider<string[]>;\n " );
334
+
317
335
w .addImport ("HttpAuthScheme" , null , TypeScriptDependency .SMITHY_TYPES );
318
336
w .writeDocs ("""
319
337
Configuration of HttpAuthSchemes for a client which provides \
@@ -421,6 +439,8 @@ private void generateResolveHttpAuthSchemeConfigFunction(
421
439
w .write ("return Object.assign(" );
422
440
w .indent ();
423
441
w .write ("$L, {" , configName );
442
+ w .addImport ("normalizeProvider" , null , TypeScriptDependency .UTIL_MIDDLEWARE );
443
+ w .write ("authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])," );
424
444
for (ConfigField configField : configFields .values ()) {
425
445
if (configField .configFieldWriter ().isPresent ()) {
426
446
w .write ("$L," , configField .name ());
0 commit comments