diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index f8f394e..e5e5a2e 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@api.global/typedrequest-interfaces', - version: '3.0.8', + version: '3.0.9', description: 'interfaces for making typed requests' } diff --git a/ts/index.ts b/ts/index.ts index 793fcbb..ef204d2 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -76,23 +76,21 @@ export interface ITag { export type implementsTag = {}; +export interface IUnifiedStreamReqResObject { + streamId: string; + cycle: 'request' | 'response'; + cycleId: string; + type: 'start' | 'binaryChunk' | 'object' | 'end' | 'keepAlive'; + streamChunk?: any; + keepAlive?: boolean; + next?: boolean; +} + export interface IStreamRequest extends implementsTR< ITypedRequest, IStreamRequest > { method: '##VirtualStream##'; - request: { - streamId: string; - type: 'start' | 'binaryChunk' | 'object' | 'end' | 'keepAlive'; - streamChunk?: any; - keepAlive?: boolean; - next?: boolean; - }; - response: { - streamId: string; - type: 'start' | 'binaryChunk' | 'object' | 'end' | 'keepAlive'; - streamChunk?: any; - keepAlive?: boolean; - next?: boolean; - }; + request: IUnifiedStreamReqResObject; + response: IUnifiedStreamReqResObject; }