From 4489e33234e19ffe90ceeda081169e726f5eae9e Mon Sep 17 00:00:00 2001 From: Rohit Date: Tue, 14 Jan 2025 16:07:54 +0530 Subject: [PATCH] feat: add schema fields for n8n integration --- server/src/models/Robot.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/server/src/models/Robot.ts b/server/src/models/Robot.ts index 3b2717d64..497807c85 100644 --- a/server/src/models/Robot.ts +++ b/server/src/models/Robot.ts @@ -25,6 +25,10 @@ interface RobotAttributes { google_sheet_id?: string | null; google_access_token?: string | null; google_refresh_token?: string | null; + n8n_email?: string | null; + n8n_access_token?: string | null; + n8n_refresh_token?: string | null; + n8n_workflow_id?: string | null; schedule?: ScheduleConfig | null; } @@ -53,6 +57,10 @@ class Robot extends Model implements R public google_sheet_id?: string | null; public google_access_token!: string | null; public google_refresh_token!: string | null; + public n8n_email!: string | null; + public n8n_access_token!: string | null; + public n8n_refresh_token!: string | null; + public n8n_workflow_id!: string | null; public schedule!: ScheduleConfig | null; } @@ -95,6 +103,22 @@ Robot.init( type: DataTypes.STRING, allowNull: true, }, + n8n_email: { + type: DataTypes.STRING, + allowNull: true, + }, + n8n_access_token: { + type: DataTypes.STRING, + allowNull: true, + }, + n8n_refresh_token: { + type: DataTypes.STRING, + allowNull: true, + }, + n8n_workflow_id: { + type: DataTypes.STRING, + allowNull: true, + }, schedule: { type: DataTypes.JSONB, allowNull: true,