From b2266252c51761366d5b65cf6f60d7711cd5e73b Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Wed, 16 Oct 2024 23:38:18 +0530 Subject: [PATCH] feat: move gsheet metadata to robot --- 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 ed9d7780..ed751ca8 100644 --- a/server/src/models/Robot.ts +++ b/server/src/models/Robot.ts @@ -19,6 +19,10 @@ interface RobotAttributes { id: string; recording_meta: RobotMeta; recording: RobotWorkflow; + google_sheets_email?: string | null; + google_sheet_id?: string | null; + google_access_token?: string | null; + google_refresh_token?: string | null; } interface RobotCreationAttributes extends Optional { } @@ -27,6 +31,10 @@ class Robot extends Model implements R public id!: string; public recording_meta!: RobotMeta; public recording!: RobotWorkflow; + public google_sheets_email!: string | null; + public google_sheet_id?: string | null; + public google_access_token!: string | null; + public google_refresh_token!: string | null; } Robot.init( @@ -44,6 +52,22 @@ Robot.init( type: DataTypes.JSONB, allowNull: false, }, + google_sheets_email: { + type: DataTypes.STRING, + allowNull: true, + }, + google_sheet_id: { + type: DataTypes.STRING, + allowNull: true, + }, + google_access_token: { + type: DataTypes.STRING, + allowNull: true, + }, + google_refresh_token: { + type: DataTypes.STRING, + allowNull: true, + }, }, { sequelize,