feat: add remoteWebhookId in Flow
This commit is contained in:
@@ -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');
|
||||
});
|
||||
}
|
@@ -13,6 +13,7 @@ class Flow extends Base {
|
||||
active: boolean;
|
||||
steps: Step[];
|
||||
published_at: string;
|
||||
remoteWebhookId: string;
|
||||
executions?: Execution[];
|
||||
|
||||
static tableName = 'flows';
|
||||
@@ -25,6 +26,7 @@ class Flow extends Base {
|
||||
id: { type: 'string', format: 'uuid' },
|
||||
name: { type: 'string', minLength: 1 },
|
||||
userId: { type: 'string', format: 'uuid' },
|
||||
remoteWebhookId: { type: 'string' },
|
||||
active: { type: 'boolean' },
|
||||
},
|
||||
};
|
||||
|
3
packages/types/index.d.ts
vendored
3
packages/types/index.d.ts
vendored
@@ -76,6 +76,7 @@ export interface IFlow {
|
||||
steps: IStep[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
remoteWebhookId: string;
|
||||
lastInternalId: () => Promise<string>;
|
||||
}
|
||||
|
||||
@@ -279,6 +280,8 @@ export type IGlobalVariable = {
|
||||
id: string;
|
||||
lastInternalId: string;
|
||||
isAlreadyProcessed?: (internalId: string) => boolean;
|
||||
remoteWebhookId?: string;
|
||||
setRemoteWebhookId?: (remoteWebhookId: string) => Promise<void>;
|
||||
};
|
||||
step?: {
|
||||
id: string;
|
||||
|
Reference in New Issue
Block a user