Skip to content

Commit f514422

Browse files
AllanZhengYPsrchase
authored andcommitted
fix: remove duplicated declaration of endpoints (#416)
* fix: remove duplicated declaration of endpoints * fix: rename serializerUtils to serializerContext
1 parent 23bb14b commit f514422

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

packages/types/src/deserializer.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ export interface StreamCollector {
1010
}
1111

1212
/**
13-
* Response deserializer utils functions for AWS services
13+
* Function execution context contains util functions for deserializers
1414
*/
15-
export interface DeserializerUtils {
15+
export interface DeserializerContext {
1616
base64Decoder: Decoder;
1717
utf8Encoder: Encoder;
1818
streamCollector: StreamCollector;
@@ -21,7 +21,7 @@ export interface DeserializerUtils {
2121
export interface ResponseDeserializer<
2222
OutputType,
2323
ResponseType = any,
24-
RuntimeUtils = any
24+
Context = any
2525
> {
2626
/**
2727
* Converts the output of an operation into JavaScript types.
@@ -30,10 +30,9 @@ export interface ResponseDeserializer<
3030
* response received
3131
* @param input The HTTP response received from the service
3232
*
33-
* @param utils The runtime-specific util functions. If provided will
34-
* overwrite the provided ones
33+
* @param context context containing runtime-specific util functions.
3534
*/
36-
(output: ResponseType, protocolName: string, utils: RuntimeUtils): Promise<
35+
(output: ResponseType, protocolName: string, context: Context): Promise<
3736
OutputType
3837
>;
3938
}

packages/types/src/serializer.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ export interface EndpointBearer {
1111
/**
1212
* Response deserializer util functions for AWS services
1313
*/
14-
export interface SerializerUtils extends EndpointBearer {
14+
export interface SerializerContext extends EndpointBearer {
1515
utf8Decoder: Decoder;
1616
base64Encoder: Encoder;
1717
}
1818

1919
export interface RequestSerializer<
2020
Request,
21-
RuntimeUtils extends EndpointBearer = any
21+
Context extends EndpointBearer = any
2222
> {
2323
/**
2424
* Converts the provided `input` into a request object
@@ -27,8 +27,7 @@ export interface RequestSerializer<
2727
* to. Like `RestJson`, `RestXML`
2828
* @param input The user input to serialize.
2929
*
30-
* @param config The runtime-specific util functions. If provided will
31-
* overwrite the provided ones
30+
* @param context Context containing runtime-specific util functions.
3231
*/
33-
(input: any, transferProtocol: string, utils: RuntimeUtils): Request;
32+
(input: any, transferProtocol: string, context: Context): Request;
3433
}

0 commit comments

Comments
 (0)