Compare commits

..

22 Commits

Author SHA1 Message Date
806970c701 3.0.13 2024-02-23 20:18:20 +01:00
9638f74440 fix(core): update 2024-02-23 20:18:19 +01:00
b538c4fbdb 3.0.12 2024-02-23 17:02:13 +01:00
1d3dc08e39 fix(core): update 2024-02-23 17:02:12 +01:00
56f59bf640 3.0.11 2024-02-23 16:00:37 +01:00
268df991c4 fix(core): update 2024-02-23 16:00:36 +01:00
b3d8dd1573 3.0.10 2024-02-23 15:48:32 +01:00
0fb36ea928 fix(core): update 2024-02-23 15:48:31 +01:00
10148f7c50 3.0.9 2024-02-22 15:15:45 +01:00
274bf30973 fix(core): update 2024-02-22 15:15:44 +01:00
e3ff1c3c4b 3.0.8 2024-02-22 13:28:47 +01:00
446a9d1723 fix(core): update 2024-02-22 13:28:47 +01:00
a749f91a8f 3.0.7 2024-02-21 21:01:35 +01:00
8ea6db7b7f fix(core): update 2024-02-21 21:01:35 +01:00
715ee43bcc 3.0.6 2024-02-21 14:54:45 +01:00
c314b4e86f fix(core): update 2024-02-21 14:54:45 +01:00
5824d34764 3.0.5 2024-02-21 01:57:19 +01:00
5eb9035dfe fix(core): update 2024-02-21 01:57:19 +01:00
a49b1813fb 3.0.4 2024-02-21 01:55:50 +01:00
e33ae24f17 fix(core): update 2024-02-21 01:55:49 +01:00
2e13632fec 3.0.3 2024-02-21 00:34:24 +01:00
9175af027b fix(core): update 2024-02-21 00:34:24 +01:00
4 changed files with 69 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@api.global/typedrequest-interfaces",
"version": "3.0.2",
"version": "3.0.13",
"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.2',
version: '3.0.13',
description: 'interfaces for making typed requests'
}

View File

@ -16,8 +16,8 @@ export interface ITypedRequest {
* needed for VirtualStreams
*/
localData?: {
firstTypedrouter: any;
}
firstTypedrouter?: any;
};
/**
* server data that is added for dealing with the request server side. Will be omitted when sending the response
@ -75,3 +75,61 @@ export interface ITag {
}
export type implementsTag<T, U extends T> = {};
export interface IUnifiedStreamDataPackage {
/**
* the stream id, so Virtual Streams can talk to each other
*/
streamId: string;
/**
* stream data is sent in cycles. This id is used to match the request and response
*/
cycleId: string;
cycle: 'request' | 'response';
/**
* 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
* end: indicates the end of a stream
* feedback: indicates a feedback message
*/
mainPurpose: 'start' | 'chunk' | 'object' | 'end' | 'feedback' | 'keepAlive';
/**
* the data package
*/
chunkData?: any;
/**
* feedback message
*/
feedback?: {
message?: string;
data?: any;
sha265?: string;
};
/**
* keepAlive boolean
*/
keepAlive?: boolean;
/**
* is backpressure detected on the readable side?
*/
backpressure?: boolean;
/**
* does the writable side have more data scheduled to be sent?
*/
next?: boolean;
}
export interface IStreamRequest extends implementsTR<ITypedRequest, IStreamRequest> {
method: '##VirtualStream##';
request: IUnifiedStreamDataPackage;
response: IUnifiedStreamDataPackage;
}

View File

@ -3,9 +3,12 @@
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "nodenext",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true,
}
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}