1- import { AuthScheme , HttpAuthDefinition } from "./auth/auth" ;
2- import { EndpointV2 } from "./endpoint" ;
3- import { Logger } from "./logger" ;
4- import { UserAgent } from "./util" ;
1+ import type { AuthScheme , HttpAuthDefinition } from "./auth/auth" ;
2+ import type { SelectedHttpAuthScheme } from "./auth/HttpAuthScheme" ;
3+ import type { Command } from "./command" ;
4+ import type { EndpointV2 } from "./endpoint" ;
5+ import type { SmithyFeatures } from "./feature-ids" ;
6+ import type { Logger } from "./logger" ;
7+ import type { UserAgent } from "./util" ;
58
69/**
710 * @public
@@ -554,6 +557,7 @@ export interface HandlerExecutionContext {
554557 currentAuthConfig ?: HttpAuthDefinition ;
555558
556559 /**
560+ * @deprecated do not extend this field, it is a carryover from AWS SDKs.
557561 * Used by DynamoDbDocumentClient.
558562 */
559563 dynamoDbDocumentClientOptions ?: Partial < {
@@ -563,10 +567,30 @@ export interface HandlerExecutionContext {
563567
564568 /**
565569 * @internal
566- * Context for Smithy properties
570+ * Context for Smithy properties.
571+ */
572+ [ SMITHY_CONTEXT_KEY ] ?: {
573+ service ?: string ;
574+ operation ?: string ;
575+ commandInstance ?: Command < any , any , any , any , any > ;
576+ selectedHttpAuthScheme ?: SelectedHttpAuthScheme ;
577+ features ?: SmithyFeatures ;
578+ /**
579+ * @deprecated
580+ * Do not assign arbitrary members to the Smithy Context,
581+ * fields should be explicitly declared here to avoid collisions.
582+ */
583+ [ key : string ] : unknown ;
584+ } ;
585+
586+ /**
587+ * @deprecated
588+ * Do not assign arbitrary members to the context, since
589+ * they can interfere with existing functionality.
590+ *
591+ * Additional members should instead be declared on the SMITHY_CONTEXT_KEY
592+ * or other reserved keys.
567593 */
568- [ SMITHY_CONTEXT_KEY ] ?: Record < string , unknown > ;
569-
570594 [ key : string ] : any ;
571595}
572596
0 commit comments