Compare commits

...

8 Commits

Author SHA1 Message Date
708c5d8a5b 1.0.16 2022-10-26 11:24:41 +02:00
d63621fe82 fix(core): update 2022-10-26 11:24:41 +02:00
8e1459bc86 1.0.15 2020-07-13 01:13:30 +00:00
4161c8f8b0 fix(core): update 2020-07-13 01:13:29 +00:00
38df866c05 1.0.14 2020-07-04 16:57:07 +00:00
d3fc1d3256 fix(core): update 2020-07-04 16:57:05 +00:00
ca0c191a8d 1.0.13 2020-02-20 22:01:59 +00:00
6b1791e578 fix(core): update 2020-02-20 22:01:58 +00:00
4 changed files with 60 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@apiglobal/typedrequest-interfaces",
"version": "1.0.12",
"version": "1.0.16",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "@apiglobal/typedrequest-interfaces",
"version": "1.0.12",
"version": "1.0.16",
"private": false,
"description": "interfaces for making typed requests",
"main": "dist/index.js",

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@apiglobal/typedrequest-interfaces',
version: '1.0.16',
description: 'interfaces for making typed requests'
}

View File

@ -1,18 +1,67 @@
export interface ITypedRequest {
/**
* the method that the request response data is meant for
*/
method: string;
/**
* any needed auth data
*/
authInfo?: {
jwt: string;
};
/**
* server data that is added for dealing with the request server side. Will be omitted when sending the response
*/
serverData?: {
jwtData: any;
jwtValid: boolean;
};
/**
* the request data
*/
request: object;
/**
* the response data
*/
response: object;
/**
* any error information that might be encountered while dealing with a request
*/
error?: { text: string; data: any };
/**
* retry information for smartly advising the client to retry at a later point in time
*/
retry?: {
waitForMs: number;
reason: string;
};
/**
* a correlation id that
*/
correlation?: {
id: string;
phase: 'request' | 'response'
};
}
export type implementsTR<T, U extends T> = {};
export interface IBroadCastEvent<T> {
export interface ITypedEvent<T> {
name: string;
uniqueEventId: string;
payload: T;
}
export interface ITag {
name: string;
payload: any;
}
export type implementsTag<T, U extends T> = {};