feat: introduce singleton webhook URL

This commit is contained in:
Ali BARIN
2023-06-07 22:29:40 +00:00
parent 92638c2e97
commit de7a35dfe9
19 changed files with 285 additions and 78 deletions

View File

@@ -60,7 +60,7 @@ export interface IStep {
key?: string;
appKey?: string;
iconUrl: string;
webhookUrl: string;
webhookUrl?: string;
type: 'action' | 'trigger';
connectionId?: string;
status: string;
@@ -241,14 +241,16 @@ export interface IBaseTrigger {
name: string;
key: string;
type?: 'webhook' | 'polling';
showWebhookUrl?: boolean;
pollInterval?: number;
description: string;
useSingletonWebhook?: boolean;
singletonWebhookRefValueParameter?: string;
getInterval?(parameters: IStep['parameters']): string;
run?($: IGlobalVariable): Promise<void>;
testRun?($: IGlobalVariable): Promise<void>;
registerHook?($: IGlobalVariable): Promise<void>;
unregisterHook?($: IGlobalVariable): Promise<void>;
sort?(item: ITriggerItem, nextItem: ITriggerItem): number;
}
export interface IRawTrigger extends IBaseTrigger {
@@ -306,7 +308,7 @@ export type IGlobalVariable = {
set: (args: IJSONObject) => Promise<null>;
data: IJSONObject;
};
app: IApp;
app?: IApp;
http?: IHttpClient;
request?: IRequest;
flow?: {
@@ -333,6 +335,7 @@ export type IGlobalVariable = {
};
getLastExecutionStep?: () => Promise<IExecutionStep>;
webhookUrl?: string;
singletonWebhookUrl?: string;
triggerOutput?: ITriggerOutput;
actionOutput?: IActionOutput;
pushTriggerItem?: (triggerItem: ITriggerItem) => void;