wip: Restructure twitter integration

This commit is contained in:
Faruk AYDIN
2022-10-04 23:09:50 +03:00
parent dc0e03245f
commit 8308265a62
21 changed files with 358 additions and 136 deletions

View File

@@ -3,14 +3,15 @@ import Base from './base';
import Execution from './execution';
import Step from './step';
import Telemetry from '../helpers/telemetry';
import { IJSONObject } from '@automatisch/types';
class ExecutionStep extends Base {
id!: string;
executionId!: string;
stepId!: string;
dataIn!: Record<string, unknown>;
dataOut!: Record<string, unknown>;
errorDetails: Record<string, unknown>;
dataIn!: IJSONObject;
dataOut!: IJSONObject;
errorDetails: IJSONObject;
status = 'failure';
step: Step;
@@ -23,7 +24,7 @@ class ExecutionStep extends Base {
id: { type: 'string', format: 'uuid' },
executionId: { type: 'string', format: 'uuid' },
stepId: { type: 'string' },
dataIn: { type: 'object' },
dataIn: { type: ['object', 'null'] },
dataOut: { type: ['object', 'null'] },
status: { type: 'string', enum: ['success', 'failure'] },
errorDetails: { type: ['object', 'null'] },

View File

@@ -10,7 +10,7 @@ class Flow extends Base {
name!: string;
userId!: string;
active: boolean;
steps?: [Step];
steps: Step[];
published_at: string;
static tableName = 'flows';

View File

@@ -20,7 +20,7 @@ class Step extends Base {
parameters: Record<string, unknown>;
connection?: Connection;
flow: Flow;
executionSteps?: [ExecutionStep];
executionSteps: ExecutionStep[];
static tableName = 'steps';

View File

@@ -10,9 +10,9 @@ class User extends Base {
id!: string;
email!: string;
password!: string;
connections?: [Connection];
flows?: [Flow];
steps?: [Step];
connections?: Connection[];
flows?: Flow[];
steps?: Step[];
static tableName = 'users';