Compare commits

...

4 Commits

Author SHA1 Message Date
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
3 changed files with 44 additions and 2 deletions

2
package-lock.json generated
View File

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

View File

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

View File

@ -1,12 +1,54 @@
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> = {};