@aws-sdk/types
Advanced tools
Comparing version 3.110.0 to 3.127.0
@@ -62,6 +62,22 @@ import { HttpRequest } from "./http"; | ||
} | ||
export interface EventStreamMarshaller { | ||
deserialize: (body: any, deserializer: (input: Record<string, Message>) => any) => AsyncIterable<any>; | ||
serialize: (input: AsyncIterable<any>, serializer: (event: any) => Message) => any; | ||
/** | ||
* A function which deserializes binary event stream message into modeled shape. | ||
*/ | ||
export interface EventStreamMarshallerDeserFn<StreamType> { | ||
<T>(body: StreamType, deserializer: (input: Record<string, Message>) => Promise<T>): AsyncIterable<T>; | ||
} | ||
/** | ||
* A function that serializes modeled shape into binary stream message. | ||
*/ | ||
export interface EventStreamMarshallerSerFn<StreamType> { | ||
<T>(input: AsyncIterable<T>, serializer: (event: T) => Message): StreamType; | ||
} | ||
/** | ||
* An interface which provides functions for serializing and deserializing binary event stream | ||
* to/from corresponsing modeled shape. | ||
*/ | ||
export interface EventStreamMarshaller<StreamType = any> { | ||
deserialize: EventStreamMarshallerDeserFn<StreamType>; | ||
serialize: EventStreamMarshallerSerFn<StreamType>; | ||
} | ||
export interface EventStreamRequestSigner { | ||
@@ -68,0 +84,0 @@ sign(request: HttpRequest): Promise<HttpRequest>; |
@@ -50,1 +50,16 @@ import { Endpoint } from "./http"; | ||
} | ||
/** | ||
* The interface contains mix-in utility functions to transfer the runtime-specific | ||
* stream implementation to specified format. Each stream can ONLY be transformed | ||
* once. | ||
*/ | ||
export interface SdkStreamMixin { | ||
transformToByteArray: () => Promise<Uint8Array>; | ||
transformToString: (encoding?: string) => Promise<string>; | ||
transformToWebStream: () => ReadableStream; | ||
} | ||
/** | ||
* The type describing a runtime-specific stream implementation with mix-in | ||
* utility functions. | ||
*/ | ||
export declare type SdkStream<BaseStream> = BaseStream & SdkStreamMixin; |
@@ -56,6 +56,15 @@ import { HttpRequest } from "./http"; | ||
} | ||
export interface EventStreamMarshaller { | ||
deserialize: (body: any, deserializer: (input: Record<string, Message>) => any) => AsyncIterable<any>; | ||
serialize: (input: AsyncIterable<any>, serializer: (event: any) => Message) => any; | ||
export interface EventStreamMarshallerDeserFn<StreamType> { | ||
<T>(body: StreamType, deserializer: (input: Record<string, Message>) => Promise<T>): AsyncIterable<T>; | ||
} | ||
export interface EventStreamMarshallerSerFn<StreamType> { | ||
<T>(input: AsyncIterable<T>, serializer: (event: T) => Message): StreamType; | ||
} | ||
export interface EventStreamMarshaller<StreamType = any> { | ||
deserialize: EventStreamMarshallerDeserFn<StreamType>; | ||
serialize: EventStreamMarshallerSerFn<StreamType>; | ||
} | ||
export interface EventStreamRequestSigner { | ||
@@ -62,0 +71,0 @@ sign(request: HttpRequest): Promise<HttpRequest>; |
@@ -30,1 +30,9 @@ import { Endpoint } from "./http"; | ||
} | ||
export interface SdkStreamMixin { | ||
transformToByteArray: () => Promise<Uint8Array>; | ||
transformToString: (encoding?: string) => Promise<string>; | ||
transformToWebStream: () => ReadableStream; | ||
} | ||
export declare type SdkStream<BaseStream> = BaseStream & SdkStreamMixin; |
{ | ||
"name": "@aws-sdk/types", | ||
"version": "3.110.0", | ||
"version": "3.127.0", | ||
"main": "./dist-cjs/index.js", | ||
@@ -5,0 +5,0 @@ "module": "./dist-es/index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
165983
1781