fix(core): update
This commit is contained in:
parent
38df866c05
commit
4161c8f8b0
35
ts/index.ts
35
ts/index.ts
@ -1,19 +1,54 @@
|
|||||||
export interface ITypedRequest {
|
export interface ITypedRequest {
|
||||||
|
/**
|
||||||
|
* the method that the request response data is meant for
|
||||||
|
*/
|
||||||
method: string;
|
method: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* any needed auth data
|
||||||
|
*/
|
||||||
authInfo?: {
|
authInfo?: {
|
||||||
jwt: string;
|
jwt: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* server data that is added for dealing with the request server side. Will be omitted when sending the response
|
||||||
|
*/
|
||||||
serverData?: {
|
serverData?: {
|
||||||
jwtData: any;
|
jwtData: any;
|
||||||
jwtValid: boolean;
|
jwtValid: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the request data
|
||||||
|
*/
|
||||||
request: object;
|
request: object;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the response data
|
||||||
|
*/
|
||||||
response: object;
|
response: object;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* any error information that might be encountered while dealing with a request
|
||||||
|
*/
|
||||||
error?: { text: string; data: any };
|
error?: { text: string; data: any };
|
||||||
|
|
||||||
|
/**
|
||||||
|
* retry information for smartly advising the client to retry at a later point in time
|
||||||
|
*/
|
||||||
retry?: {
|
retry?: {
|
||||||
waitForMs: number;
|
waitForMs: number;
|
||||||
reason: string;
|
reason: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* a correlation id that
|
||||||
|
*/
|
||||||
|
correlation?: {
|
||||||
|
id: string;
|
||||||
|
phase: 'request' | 'response'
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export type implementsTR<T, U extends T> = {};
|
export type implementsTR<T, U extends T> = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user