From 89d73590603badd5b43d1c1a60755fa540f8fdf6 Mon Sep 17 00:00:00 2001 From: Ali BARIN Date: Thu, 6 Oct 2022 23:12:08 +0200 Subject: [PATCH] fix(IAuth): add missing func signatures --- packages/types/index.d.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/types/index.d.ts b/packages/types/index.d.ts index 07344b6c..43898860 100644 --- a/packages/types/index.d.ts +++ b/packages/types/index.d.ts @@ -161,12 +161,20 @@ export interface IApp { auth: IAuth; connectionCount: number; flowCount: number; + data: IData; triggers: ITrigger[]; actions: IAction[]; connections: IConnection[]; } +export interface IData { + [index: string]: any; +} + export interface IAuth { + createAuthData($: IGlobalVariable): Promise, + verifyCredentials($: IGlobalVariable): Promise, + isStillVerified($: IGlobalVariable): Promise, fields: IField[]; authenticationSteps: IAuthenticationStep[]; reconnectionSteps: IAuthenticationStep[]; @@ -185,8 +193,9 @@ export interface ITrigger { pollInterval: number; description: string; substeps: ISubstep[]; - run(startTime?: Date): Promise; - testRun(startTime?: Date): Promise; + getInterval(parameters: IGlobalVariable["db"]["step"]["parameters"]): string; + run($: IGlobalVariable): Promise<{ data: IJSONObject[], error: IJSONObject | null }>; + testRun($: IGlobalVariable, startTime?: Date): Promise<{ data: IJSONObject[], error: IJSONObject | null }>; } export interface IAction { @@ -194,7 +203,7 @@ export interface IAction { key: string, description: string; substeps: ISubstep[]; - run(startTime?: Date): Promise; + run($: IGlobalVariable): Promise<{ data: IJSONObject, error: IJSONObject | null }>; } export interface IAuthentication {