feat: add remoteWebhookId in Flow

This commit is contained in:
Ali BARIN
2022-12-14 20:00:08 +01:00
parent 9a55333ce8
commit 0970db3295
3 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import { Knex } from 'knex';
export async function up(knex: Knex): Promise<void> {
return knex.schema.table('flows', (table) => {
table.string('remote_webhook_id');
});
}
export async function down(knex: Knex): Promise<void> {
return knex.schema.table('flows', (table) => {
table.dropColumn('remote_webhook_id');
});
}

View File

@@ -13,6 +13,7 @@ class Flow extends Base {
active: boolean; active: boolean;
steps: Step[]; steps: Step[];
published_at: string; published_at: string;
remoteWebhookId: string;
executions?: Execution[]; executions?: Execution[];
static tableName = 'flows'; static tableName = 'flows';
@@ -25,6 +26,7 @@ class Flow extends Base {
id: { type: 'string', format: 'uuid' }, id: { type: 'string', format: 'uuid' },
name: { type: 'string', minLength: 1 }, name: { type: 'string', minLength: 1 },
userId: { type: 'string', format: 'uuid' }, userId: { type: 'string', format: 'uuid' },
remoteWebhookId: { type: 'string' },
active: { type: 'boolean' }, active: { type: 'boolean' },
}, },
}; };

View File

@@ -76,6 +76,7 @@ export interface IFlow {
steps: IStep[]; steps: IStep[];
createdAt: string; createdAt: string;
updatedAt: string; updatedAt: string;
remoteWebhookId: string;
lastInternalId: () => Promise<string>; lastInternalId: () => Promise<string>;
} }
@@ -279,6 +280,8 @@ export type IGlobalVariable = {
id: string; id: string;
lastInternalId: string; lastInternalId: string;
isAlreadyProcessed?: (internalId: string) => boolean; isAlreadyProcessed?: (internalId: string) => boolean;
remoteWebhookId?: string;
setRemoteWebhookId?: (remoteWebhookId: string) => Promise<void>;
}; };
step?: { step?: {
id: string; id: string;