Compare commits

...

6 Commits

Author SHA1 Message Date
b680ab8c23 3.0.16 2024-02-24 14:45:32 +01:00
f0547b33d3 fix(core): update 2024-02-24 14:45:31 +01:00
20c5b115d8 3.0.15 2024-02-24 14:45:18 +01:00
c3801ecd53 fix(core): update 2024-02-24 14:45:17 +01:00
51f03a45b6 3.0.14 2024-02-24 11:10:04 +01:00
ed8879a4c8 fix(core): update 2024-02-24 11:10:03 +01:00
3 changed files with 20 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@api.global/typedrequest-interfaces",
"version": "3.0.13",
"version": "3.0.16",
"private": false,
"description": "interfaces for making typed requests",
"main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@api.global/typedrequest-interfaces',
version: '3.0.13',
version: '3.0.16',
description: 'interfaces for making typed requests'
}

View File

@ -76,6 +76,21 @@ export interface ITag {
export type implementsTag<T, U extends T> = {};
// stream stuff
export interface IVirtualStream<T = ArrayBufferLike> {
// Properties
side: 'requesting' | 'responding';
streamId: string;
// Methods
handleStreamTr(streamTrArg: IStreamRequest): Promise<IStreamRequest>;
cleanup(): Promise<void>;
sendData(dataArg: T): Promise<void>;
fetchData(): Promise<T>;
pipeWebStream(webStream: any): void; // Consider defining a more specific type for webStream if possible
}
export interface IUnifiedStreamDataPackage {
/**
* the stream id, so Virtual Streams can talk to each other
@ -91,12 +106,12 @@ export interface IUnifiedStreamDataPackage {
/**
* the main purpose of the data package
* start: indicates the start of a stream
* binaryChunk: indicates a binary chunk of data
* object: indicates a json object
* chunk: indicates a binary chunk of data
* read: indicates the introduction to send data
* end: indicates the end of a stream
* feedback: indicates a feedback message
*/
mainPurpose: 'start' | 'chunk' | 'object' | 'end' | 'feedback' | 'keepAlive';
mainPurpose: 'start' | 'chunk' | 'read' | 'end' | 'feedback' | 'keepAlive';
/**
* the data package