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;
|
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' },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
3
packages/types/index.d.ts
vendored
3
packages/types/index.d.ts
vendored
@@ -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;
|
||||||
|
Reference in New Issue
Block a user