From 4161c8f8b055ab258d043fda07f15d2c33cd629e Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 13 Jul 2020 01:13:29 +0000 Subject: [PATCH] fix(core): update --- ts/index.ts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/ts/index.ts b/ts/index.ts index 4db8dec..051af24 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -1,19 +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 = {};