@hexabot-ai/api 3.2.7-beta.0 → 3.3.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channel/channel.module.js +2 -0
- package/dist/channel/channel.module.js.map +1 -1
- package/dist/channel/entities/source.entity.d.ts +38 -0
- package/dist/channel/webhook.controller.d.ts +4 -1
- package/dist/channel/webhook.controller.js +19 -1
- package/dist/channel/webhook.controller.js.map +1 -1
- package/dist/chat/services/chat.service.js +4 -2
- package/dist/chat/services/chat.service.js.map +1 -1
- package/dist/chat/services/thread.service.js +6 -2
- package/dist/chat/services/thread.service.js.map +1 -1
- package/dist/mcp/tools/hexabot-mcp-tool.base.d.ts +0 -3
- package/dist/mcp/tools/hexabot-mcp-tool.base.js +0 -6
- package/dist/mcp/tools/hexabot-mcp-tool.base.js.map +1 -1
- package/dist/mcp/tools/hexabot-mcp.utils.d.ts +3 -0
- package/dist/mcp/tools/hexabot-mcp.utils.js +8 -1
- package/dist/mcp/tools/hexabot-mcp.utils.js.map +1 -1
- package/dist/mcp/tools/workflow-mcp.helper.d.ts +19 -1
- package/dist/mcp/tools/workflow-mcp.helper.js +2 -7
- package/dist/mcp/tools/workflow-mcp.helper.js.map +1 -1
- package/dist/mcp/tools/workflow-mcp.tools.d.ts +114 -0
- package/dist/mcp/tools/workflow-run-mcp.tools.d.ts +38 -0
- package/dist/mcp/tools/workflow-run-mcp.tools.js +1 -1
- package/dist/mcp/tools/workflow-run-mcp.tools.js.map +1 -1
- package/dist/mcp/tools/workflow-version-mcp.tools.d.ts +0 -22
- package/dist/mcp/tools/workflow-version-mcp.tools.js +3 -24
- package/dist/mcp/tools/workflow-version-mcp.tools.js.map +1 -1
- package/dist/static/assets/{cssMode-v8DOzA4o.js → cssMode-CVfTJuzy.js} +1 -1
- package/dist/static/assets/{freemarker2-B92dv90I.js → freemarker2-BA7GKqB7.js} +1 -1
- package/dist/static/assets/{handlebars-Dw3f_475.js → handlebars-BCwvKzIX.js} +1 -1
- package/dist/static/assets/{html-BLTdldWn.js → html-f6_JN1YY.js} +1 -1
- package/dist/static/assets/{htmlMode-tP1xHfwv.js → htmlMode-f4asMwRs.js} +1 -1
- package/dist/static/assets/index-CLS5CNoN.css +1 -0
- package/dist/static/assets/{index-1C1RUhvE.js → index-X6nbc-0C.js} +399 -392
- package/dist/static/assets/{javascript-D6zFkYDA.js → javascript-DaS6vtZ9.js} +1 -1
- package/dist/static/assets/{jsonMode-Casc9QAu.js → jsonMode-Ct41J50t.js} +1 -1
- package/dist/static/assets/{liquid-CiiGxWfs.js → liquid-4giXfRN2.js} +1 -1
- package/dist/static/assets/{lspLanguageFeatures-DDa9NCMy.js → lspLanguageFeatures-CqJlQWTJ.js} +1 -1
- package/dist/static/assets/{mdx-CkcXhfmV.js → mdx-DcO2npTr.js} +1 -1
- package/dist/static/assets/{python-CBPYdNzT.js → python-D7O1gNbd.js} +1 -1
- package/dist/static/assets/{razor-BU2J-T3U.js → razor-K5r5YQ4D.js} +1 -1
- package/dist/static/assets/{tsMode-CMXRM61t.js → tsMode-CvIEOKtw.js} +1 -1
- package/dist/static/assets/{typescript-GDvJ0GIf.js → typescript-BKjAKJn9.js} +1 -1
- package/dist/static/assets/{xml-CSlsq1iC.js → xml-BpIa2Zv1.js} +1 -1
- package/dist/static/assets/{yaml-stKXP2Du.js → yaml-BJzMbZhP.js} +1 -1
- package/dist/static/index.html +2 -2
- package/dist/static/locales/en/translation.json +75 -2
- package/dist/static/locales/fr/translation.json +72 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/user/services/passwordReset.service.js +2 -1
- package/dist/user/services/passwordReset.service.js.map +1 -1
- package/dist/workflow/controllers/workflow-version.controller.d.ts +38 -0
- package/dist/workflow/controllers/workflow.controller.d.ts +43 -6
- package/dist/workflow/controllers/workflow.controller.js +23 -13
- package/dist/workflow/controllers/workflow.controller.js.map +1 -1
- package/dist/workflow/dto/workflow.dto.d.ts +40 -1
- package/dist/workflow/dto/workflow.dto.js +10 -0
- package/dist/workflow/dto/workflow.dto.js.map +1 -1
- package/dist/workflow/entities/memory-record.entity.d.ts +38 -0
- package/dist/workflow/entities/workflow-run.entity.d.ts +38 -0
- package/dist/workflow/entities/workflow-version.entity.d.ts +38 -0
- package/dist/workflow/entities/workflow.entity.d.ts +78 -0
- package/dist/workflow/entities/workflow.entity.js +4 -0
- package/dist/workflow/entities/workflow.entity.js.map +1 -1
- package/dist/workflow/guards/webhook-trigger.guard.d.ts +17 -0
- package/dist/workflow/guards/webhook-trigger.guard.js +139 -0
- package/dist/workflow/guards/webhook-trigger.guard.js.map +1 -0
- package/dist/workflow/services/agentic.service.d.ts +14 -2
- package/dist/workflow/services/agentic.service.js +17 -4
- package/dist/workflow/services/agentic.service.js.map +1 -1
- package/dist/workflow/services/webhook-trigger.service.d.ts +27 -0
- package/dist/workflow/services/webhook-trigger.service.js +90 -0
- package/dist/workflow/services/webhook-trigger.service.js.map +1 -0
- package/dist/workflow/services/workflow-run.service.d.ts +1 -0
- package/dist/workflow/services/workflow-run.service.js +9 -0
- package/dist/workflow/services/workflow-run.service.js.map +1 -1
- package/dist/workflow/workflow.module.js +8 -0
- package/dist/workflow/workflow.module.js.map +1 -1
- package/package.json +5 -6
- package/src/channel/README.md +17 -0
- package/src/channel/channel.module.ts +4 -0
- package/src/channel/webhook.controller.ts +46 -1
- package/src/chat/services/chat.service.ts +5 -4
- package/src/chat/services/thread.service.ts +10 -2
- package/src/mcp/README.md +2 -3
- package/src/mcp/tools/hexabot-mcp-tool.base.ts +0 -10
- package/src/mcp/tools/hexabot-mcp.utils.ts +10 -0
- package/src/mcp/tools/workflow-mcp.helper.ts +3 -11
- package/src/mcp/tools/workflow-run-mcp.tools.ts +2 -2
- package/src/mcp/tools/workflow-version-mcp.tools.ts +3 -29
- package/src/user/services/passwordReset.service.ts +9 -2
- package/src/workflow/controllers/workflow.controller.ts +36 -10
- package/src/workflow/dto/workflow.dto.ts +12 -0
- package/src/workflow/entities/workflow.entity.ts +11 -1
- package/src/workflow/guards/webhook-trigger.guard.ts +193 -0
- package/src/workflow/services/agentic.service.ts +27 -3
- package/src/workflow/services/webhook-trigger.service.ts +169 -0
- package/src/workflow/services/workflow-run.service.ts +21 -0
- package/src/workflow/workflow.module.ts +8 -0
- package/dist/static/assets/index-DyBPx3f5.css +0 -1
|
@@ -41,7 +41,8 @@ let PasswordResetService = class PasswordResetService {
|
|
|
41
41
|
where: { email: dto.email },
|
|
42
42
|
});
|
|
43
43
|
if (!user) {
|
|
44
|
-
|
|
44
|
+
this.logger.log(`Password reset requested for a non-existent email`, 'PasswordResetService');
|
|
45
|
+
return;
|
|
45
46
|
}
|
|
46
47
|
const jwt = await this.sign({ ...dto });
|
|
47
48
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"passwordReset.service.js","sourceRoot":"","sources":["../../../src/user/services/passwordReset.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,
|
|
1
|
+
{"version":3,"file":"passwordReset.service.js","sourceRoot":"","sources":["../../../src/user/services/passwordReset.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,2CAMwB;AACxB,qCAA2E;AAC3E,uCAAuC;AAEvC,yCAAkC;AAClC,mEAA2D;AAC3D,2EAAmE;AACnE,gEAAwD;AACxD,gEAAwD;AAIxD,iDAA6C;AAGtC,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YACsB,UAAuC,EACnD,MAAqB,EACZ,WAAwB,EACzB,IAAiB,EACjB,eAAgC,EAC/B,aAA4B;QALR,eAAU,GAAV,UAAU,CAAY;QACnD,WAAM,GAAN,MAAM,CAAe;QACZ,gBAAW,GAAX,WAAW,CAAa;QACzB,SAAI,GAAJ,IAAI,CAAa;QACjB,oBAAe,GAAf,eAAe,CAAiB;QAC/B,kBAAa,GAAb,aAAa,CAAe;QAG/B,mBAAc,GAAmB;YAC/C,MAAM,EAAE,eAAM,CAAC,cAAc,CAAC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IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IACnE,CAAC;IASD,KAAK,CAAC,MAAM,CAAC,KAAa;QACxB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CACtC,KAAK,EACL,IAAI,CAAC,cAAkC,CACxC,CAAC;IACJ,CAAC;CACF,CAAA;AA3HY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,gBAAU,CAAC,CAAA;qCAA8B,gBAAU;QAC3C,8BAAa;QACC,0BAAW;QACnB,0BAAW;QACA,kCAAe;QAChB,8BAAa;GAPpC,oBAAoB,CA2HhC"}
|
|
@@ -53,6 +53,25 @@ export declare class WorkflowVersionController extends BaseOrmController<Workflo
|
|
|
53
53
|
direction: import("@hexabot-ai/types").DirectionType;
|
|
54
54
|
createdBy: string | null;
|
|
55
55
|
runAfterMs: number;
|
|
56
|
+
webhookTrigger?: {
|
|
57
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
58
|
+
enabled: boolean;
|
|
59
|
+
} | {
|
|
60
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
61
|
+
username: string | null | undefined;
|
|
62
|
+
passwordCredentialId: string | null | undefined;
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
} | {
|
|
65
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
66
|
+
headerName: string | null | undefined;
|
|
67
|
+
headerValueCredentialId: string | null | undefined;
|
|
68
|
+
enabled: boolean;
|
|
69
|
+
} | {
|
|
70
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
71
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
72
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
73
|
+
enabled: boolean;
|
|
74
|
+
} | null | undefined;
|
|
56
75
|
currentVersion?: string | null | undefined;
|
|
57
76
|
publishedVersion?: string | null | undefined;
|
|
58
77
|
};
|
|
@@ -153,6 +172,25 @@ export declare class WorkflowVersionController extends BaseOrmController<Workflo
|
|
|
153
172
|
direction: import("@hexabot-ai/types").DirectionType;
|
|
154
173
|
createdBy: string | null;
|
|
155
174
|
runAfterMs: number;
|
|
175
|
+
webhookTrigger?: {
|
|
176
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
177
|
+
enabled: boolean;
|
|
178
|
+
} | {
|
|
179
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
180
|
+
username: string | null | undefined;
|
|
181
|
+
passwordCredentialId: string | null | undefined;
|
|
182
|
+
enabled: boolean;
|
|
183
|
+
} | {
|
|
184
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
185
|
+
headerName: string | null | undefined;
|
|
186
|
+
headerValueCredentialId: string | null | undefined;
|
|
187
|
+
enabled: boolean;
|
|
188
|
+
} | {
|
|
189
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
190
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
191
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
192
|
+
enabled: boolean;
|
|
193
|
+
} | null | undefined;
|
|
156
194
|
currentVersion?: string | null | undefined;
|
|
157
195
|
publishedVersion?: string | null | undefined;
|
|
158
196
|
};
|
|
@@ -4,22 +4,20 @@ import { FindManyOptions } from 'typeorm';
|
|
|
4
4
|
import { DeleteResult } from 'typeorm/driver/mongodb/typings';
|
|
5
5
|
import { ActionService } from "../../actions/actions.service";
|
|
6
6
|
import { I18nService } from "../../i18n/services/i18n.service";
|
|
7
|
-
import { UserService } from "../../user/services/user.service";
|
|
8
7
|
import { BaseOrmController } from "../../utils/generics/base-orm.controller";
|
|
9
8
|
import { RuntimeBindingsService } from '../../bindings/runtime-bindings.service';
|
|
10
9
|
import { WorkflowCreateDto, WorkflowUpdateDto } from '../dto/workflow.dto';
|
|
11
10
|
import { WorkflowOrmEntity } from '../entities/workflow.entity';
|
|
12
|
-
import {
|
|
11
|
+
import { WebhookTokenResult, WebhookTriggerService } from '../services/webhook-trigger.service';
|
|
13
12
|
import { WorkflowService } from '../services/workflow.service';
|
|
14
13
|
import { WorkflowType } from '../types';
|
|
15
14
|
export declare class WorkflowController extends BaseOrmController<WorkflowOrmEntity> {
|
|
16
15
|
private readonly workflowService;
|
|
17
|
-
private readonly
|
|
18
|
-
private readonly userService;
|
|
16
|
+
private readonly webhookTriggerService;
|
|
19
17
|
private readonly actionService;
|
|
20
18
|
private readonly runtimeBindingsService;
|
|
21
19
|
private readonly i18nService;
|
|
22
|
-
constructor(workflowService: WorkflowService,
|
|
20
|
+
constructor(workflowService: WorkflowService, webhookTriggerService: WebhookTriggerService, actionService: ActionService, runtimeBindingsService: RuntimeBindingsService, i18nService: I18nService);
|
|
23
21
|
create(workflowCreateDto: WorkflowCreateDto, req: Request): Promise<Workflow>;
|
|
24
22
|
findWorkflows(options?: FindManyOptions<WorkflowOrmEntity>, populate?: string[]): Promise<{
|
|
25
23
|
id: string;
|
|
@@ -95,6 +93,25 @@ export declare class WorkflowController extends BaseOrmController<WorkflowOrmEnt
|
|
|
95
93
|
sub?: string | undefined;
|
|
96
94
|
} | undefined;
|
|
97
95
|
} | null;
|
|
96
|
+
webhookTrigger?: {
|
|
97
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
98
|
+
enabled: boolean;
|
|
99
|
+
} | {
|
|
100
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
101
|
+
username: string | null | undefined;
|
|
102
|
+
passwordCredentialId: string | null | undefined;
|
|
103
|
+
enabled: boolean;
|
|
104
|
+
} | {
|
|
105
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
106
|
+
headerName: string | null | undefined;
|
|
107
|
+
headerValueCredentialId: string | null | undefined;
|
|
108
|
+
enabled: boolean;
|
|
109
|
+
} | {
|
|
110
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
111
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
112
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
113
|
+
enabled: boolean;
|
|
114
|
+
} | null | undefined;
|
|
98
115
|
definitionYml?: string | undefined;
|
|
99
116
|
definition?: any;
|
|
100
117
|
}[] | {
|
|
@@ -113,10 +130,29 @@ export declare class WorkflowController extends BaseOrmController<WorkflowOrmEnt
|
|
|
113
130
|
direction: import("@hexabot-ai/types").DirectionType;
|
|
114
131
|
createdBy: string | null;
|
|
115
132
|
runAfterMs: number;
|
|
133
|
+
webhookTrigger?: {
|
|
134
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
135
|
+
enabled: boolean;
|
|
136
|
+
} | {
|
|
137
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
138
|
+
username: string | null | undefined;
|
|
139
|
+
passwordCredentialId: string | null | undefined;
|
|
140
|
+
enabled: boolean;
|
|
141
|
+
} | {
|
|
142
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
143
|
+
headerName: string | null | undefined;
|
|
144
|
+
headerValueCredentialId: string | null | undefined;
|
|
145
|
+
enabled: boolean;
|
|
146
|
+
} | {
|
|
147
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
148
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
149
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
150
|
+
enabled: boolean;
|
|
151
|
+
} | null | undefined;
|
|
116
152
|
currentVersion?: string | null | undefined;
|
|
117
153
|
publishedVersion?: string | null | undefined;
|
|
118
154
|
}[]>;
|
|
119
|
-
findActions(type?: WorkflowType): {
|
|
155
|
+
findActions(type?: WorkflowType | undefined): {
|
|
120
156
|
description: unknown;
|
|
121
157
|
name: `${string}_${string}`;
|
|
122
158
|
icon: string;
|
|
@@ -146,4 +182,5 @@ export declare class WorkflowController extends BaseOrmController<WorkflowOrmEnt
|
|
|
146
182
|
runManually(id: string, input: unknown | undefined, req: Request): Promise<{
|
|
147
183
|
accepted: true;
|
|
148
184
|
}>;
|
|
185
|
+
generateWebhookToken(id: string, req: Request): Promise<WebhookTokenResult>;
|
|
149
186
|
}
|
|
@@ -17,7 +17,6 @@ const common_1 = require("@nestjs/common");
|
|
|
17
17
|
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
18
18
|
const actions_service_1 = require("../../actions/actions.service");
|
|
19
19
|
const i18n_service_1 = require("../../i18n/services/i18n.service");
|
|
20
|
-
const user_service_1 = require("../../user/services/user.service");
|
|
21
20
|
const uuid_param_decorator_1 = require("../../utils/decorators/uuid-param.decorator");
|
|
22
21
|
const base_orm_controller_1 = require("../../utils/generics/base-orm.controller");
|
|
23
22
|
const populate_pipe_1 = require("../../utils/pipes/populate.pipe");
|
|
@@ -25,15 +24,14 @@ const typeorm_search_filter_pipe_1 = require("../../utils/pipes/typeorm-search-f
|
|
|
25
24
|
const runtime_bindings_service_1 = require("../../bindings/runtime-bindings.service");
|
|
26
25
|
const workflow_dto_1 = require("../dto/workflow.dto");
|
|
27
26
|
const trigger_event_wrapper_1 = require("../lib/trigger-event-wrapper");
|
|
28
|
-
const
|
|
27
|
+
const webhook_trigger_service_1 = require("../services/webhook-trigger.service");
|
|
29
28
|
const workflow_service_1 = require("../services/workflow.service");
|
|
30
29
|
const types_1 = require("../types");
|
|
31
30
|
let WorkflowController = class WorkflowController extends base_orm_controller_1.BaseOrmController {
|
|
32
|
-
constructor(workflowService,
|
|
31
|
+
constructor(workflowService, webhookTriggerService, actionService, runtimeBindingsService, i18nService) {
|
|
33
32
|
super(workflowService);
|
|
34
33
|
this.workflowService = workflowService;
|
|
35
|
-
this.
|
|
36
|
-
this.userService = userService;
|
|
34
|
+
this.webhookTriggerService = webhookTriggerService;
|
|
37
35
|
this.actionService = actionService;
|
|
38
36
|
this.runtimeBindingsService = runtimeBindingsService;
|
|
39
37
|
this.i18nService = i18nService;
|
|
@@ -127,7 +125,7 @@ let WorkflowController = class WorkflowController extends base_orm_controller_1.
|
|
|
127
125
|
if (!userId) {
|
|
128
126
|
throw new common_1.UnauthorizedException('Only authenticated users can run workflows manually');
|
|
129
127
|
}
|
|
130
|
-
const workflow = await this.workflowService.
|
|
128
|
+
const workflow = await this.workflowService.findOneAndPopulate(id);
|
|
131
129
|
if (!workflow) {
|
|
132
130
|
this.logger.warn(`Unable to run Workflow by id ${id}`);
|
|
133
131
|
throw new common_1.NotFoundException(`Workflow with ID ${id} not found`);
|
|
@@ -145,12 +143,16 @@ let WorkflowController = class WorkflowController extends base_orm_controller_1.
|
|
|
145
143
|
triggeredAt: new Date(),
|
|
146
144
|
})
|
|
147
145
|
: new trigger_event_wrapper_1.ManualEventWrapper(manualInput, userId);
|
|
148
|
-
|
|
149
|
-
event.setInitiator(initiator);
|
|
150
|
-
event.setWorkflowId(workflow.id);
|
|
151
|
-
await this.agenticService.handleEvent(event);
|
|
146
|
+
await this.webhookTriggerService.dispatchTriggerEvent(workflow, event, userId);
|
|
152
147
|
return { accepted: true };
|
|
153
148
|
}
|
|
149
|
+
async generateWebhookToken(id, req) {
|
|
150
|
+
const userId = req.session?.passport?.user?.id;
|
|
151
|
+
if (!userId) {
|
|
152
|
+
throw new common_1.UnauthorizedException('Only authenticated users can generate webhook tokens');
|
|
153
|
+
}
|
|
154
|
+
return await this.webhookTriggerService.generateToken(id);
|
|
155
|
+
}
|
|
154
156
|
};
|
|
155
157
|
exports.WorkflowController = WorkflowController;
|
|
156
158
|
__decorate([
|
|
@@ -182,7 +184,7 @@ __decorate([
|
|
|
182
184
|
(0, common_1.Get)('actions{/:type}'),
|
|
183
185
|
__param(0, (0, common_1.Param)('type')),
|
|
184
186
|
__metadata("design:type", Function),
|
|
185
|
-
__metadata("design:paramtypes", [
|
|
187
|
+
__metadata("design:paramtypes", [Object]),
|
|
186
188
|
__metadata("design:returntype", void 0)
|
|
187
189
|
], WorkflowController.prototype, "findActions", null);
|
|
188
190
|
__decorate([
|
|
@@ -241,11 +243,19 @@ __decorate([
|
|
|
241
243
|
__metadata("design:paramtypes", [String, Object, Object]),
|
|
242
244
|
__metadata("design:returntype", Promise)
|
|
243
245
|
], WorkflowController.prototype, "runManually", null);
|
|
246
|
+
__decorate([
|
|
247
|
+
(0, common_1.Post)(':id/webhook-token'),
|
|
248
|
+
(0, common_1.HttpCode)(201),
|
|
249
|
+
__param(0, (0, uuid_param_decorator_1.UuidParam)('id')),
|
|
250
|
+
__param(1, (0, common_1.Req)()),
|
|
251
|
+
__metadata("design:type", Function),
|
|
252
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
253
|
+
__metadata("design:returntype", Promise)
|
|
254
|
+
], WorkflowController.prototype, "generateWebhookToken", null);
|
|
244
255
|
exports.WorkflowController = WorkflowController = __decorate([
|
|
245
256
|
(0, common_1.Controller)('workflow'),
|
|
246
257
|
__metadata("design:paramtypes", [workflow_service_1.WorkflowService,
|
|
247
|
-
|
|
248
|
-
user_service_1.UserService,
|
|
258
|
+
webhook_trigger_service_1.WebhookTriggerService,
|
|
249
259
|
actions_service_1.ActionService,
|
|
250
260
|
runtime_bindings_service_1.RuntimeBindingsService,
|
|
251
261
|
i18n_service_1.I18nService])
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.controller.js","sourceRoot":"","sources":["../../../src/workflow/controllers/workflow.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAOA,2CAcwB;AAExB,6CAA0C;AAI1C,mEAA0D;AAC1D,mEAA2D;AAC3D,
|
|
1
|
+
{"version":3,"file":"workflow.controller.js","sourceRoot":"","sources":["../../../src/workflow/controllers/workflow.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAOA,2CAcwB;AAExB,6CAA0C;AAI1C,mEAA0D;AAC1D,mEAA2D;AAC3D,sFAAoE;AACpE,kFAAyE;AACzE,mEAA2D;AAC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AAQ,EAAC,GAAG,CAAC;IAEX,WAAA,IAAA,gCAAS,EAAC,IAAI,CAAC,CAAA;IACf,WAAA,IAAA,YAAG,GAAE,CAAA;;;;8DAUP;6BAzTU,kBAAkB;IAD9B,IAAA,mBAAU,EAAC,UAAU,CAAC;qCAGe,kCAAe;QACT,+CAAqB;QAC7B,+BAAa;QACJ,iDAAsB;QACjC,0BAAW;GANhC,kBAAkB,CA0T9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { workflowSchema } from '@hexabot-ai/types';
|
|
1
|
+
import { WebhookTriggerConfig, workflowSchema } from '@hexabot-ai/types';
|
|
2
2
|
import { JSONSchema7 as JsonSchema } from 'json-schema';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { TDto } from "../../utils/types/dto.types";
|
|
@@ -77,6 +77,25 @@ export declare const workflowFullSchema: z.ZodType<{
|
|
|
77
77
|
sub?: string | undefined;
|
|
78
78
|
} | undefined;
|
|
79
79
|
} | null;
|
|
80
|
+
webhookTrigger?: {
|
|
81
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
82
|
+
enabled: boolean;
|
|
83
|
+
} | {
|
|
84
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
85
|
+
username: string | null | undefined;
|
|
86
|
+
passwordCredentialId: string | null | undefined;
|
|
87
|
+
enabled: boolean;
|
|
88
|
+
} | {
|
|
89
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
90
|
+
headerName: string | null | undefined;
|
|
91
|
+
headerValueCredentialId: string | null | undefined;
|
|
92
|
+
enabled: boolean;
|
|
93
|
+
} | {
|
|
94
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
95
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
96
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
97
|
+
enabled: boolean;
|
|
98
|
+
} | null | undefined;
|
|
80
99
|
definitionYml?: string | undefined;
|
|
81
100
|
definition?: any;
|
|
82
101
|
}, unknown, z.core.$ZodTypeInternals<{
|
|
@@ -153,6 +172,25 @@ export declare const workflowFullSchema: z.ZodType<{
|
|
|
153
172
|
sub?: string | undefined;
|
|
154
173
|
} | undefined;
|
|
155
174
|
} | null;
|
|
175
|
+
webhookTrigger?: {
|
|
176
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
177
|
+
enabled: boolean;
|
|
178
|
+
} | {
|
|
179
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
180
|
+
username: string | null | undefined;
|
|
181
|
+
passwordCredentialId: string | null | undefined;
|
|
182
|
+
enabled: boolean;
|
|
183
|
+
} | {
|
|
184
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
185
|
+
headerName: string | null | undefined;
|
|
186
|
+
headerValueCredentialId: string | null | undefined;
|
|
187
|
+
enabled: boolean;
|
|
188
|
+
} | {
|
|
189
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
190
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
191
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
192
|
+
enabled: boolean;
|
|
193
|
+
} | null | undefined;
|
|
156
194
|
definitionYml?: string | undefined;
|
|
157
195
|
definition?: any;
|
|
158
196
|
}, unknown>>;
|
|
@@ -162,6 +200,7 @@ export declare class WorkflowCreateDto {
|
|
|
162
200
|
type?: WorkflowType;
|
|
163
201
|
schedule?: string | null;
|
|
164
202
|
inputSchema?: JsonSchema;
|
|
203
|
+
webhookTrigger?: WebhookTriggerConfig | null;
|
|
165
204
|
builtin?: boolean;
|
|
166
205
|
x?: number;
|
|
167
206
|
y?: number;
|
|
@@ -69,6 +69,16 @@ __decorate([
|
|
|
69
69
|
(0, utils_1.Validate)(WorkflowInputSchemaValidator),
|
|
70
70
|
__metadata("design:type", Object)
|
|
71
71
|
], WorkflowCreateDto.prototype, "inputSchema", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
74
|
+
description: 'Webhook trigger configuration (manual workflows only). Enables a public ' +
|
|
75
|
+
'trigger URL and defines how incoming calls authenticate.',
|
|
76
|
+
type: Object,
|
|
77
|
+
}),
|
|
78
|
+
(0, class_validator_1.IsOptional)(),
|
|
79
|
+
(0, utils_1.Validate)(types_1.webhookTriggerSchema),
|
|
80
|
+
__metadata("design:type", Object)
|
|
81
|
+
], WorkflowCreateDto.prototype, "webhookTrigger", void 0);
|
|
72
82
|
__decorate([
|
|
73
83
|
(0, swagger_1.ApiPropertyOptional)({
|
|
74
84
|
description: 'Indicates if the workflow is built-in',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.dto.js","sourceRoot":"","sources":["../../../src/workflow/dto/workflow.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,
|
|
1
|
+
{"version":3,"file":"workflow.dto.js","sourceRoot":"","sources":["../../../src/workflow/dto/workflow.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,6CAK2B;AAC3B,6CAKyB;AACzB,qDAQyB;AAEzB,6BAAwB;AAExB,uCAAmC;AACnC,gFAAgE;AAGhE,oEAAqE;AACrE,kEAA6D;AAC7D,oCAAuD;AAE1C,QAAA,kBAAkB,GAAG,IAAA,gCAA6B,EAAC;IAC9D,eAAe,EAAE,6CAAuB;CACzC,CAAC,CAAC;AAEH,MAAM,4BAA4B,GAAG,OAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;AAEvD,MAAa,iBAAiB;CAiG7B;AAjGD,8CAiGC;AA7FC;IAHC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAC3D,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;+CACG;AAKd;IAHC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,sBAAs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,wCAAwC;KAClD,CAAC;;2DAC+B"}
|
|
@@ -179,6 +179,25 @@ export declare class MemoryRecordOrmEntity extends BaseOrmEntity<MemoryRecordDto
|
|
|
179
179
|
direction: import("@hexabot-ai/types").DirectionType;
|
|
180
180
|
createdBy: string | null;
|
|
181
181
|
runAfterMs: number;
|
|
182
|
+
webhookTrigger?: {
|
|
183
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
184
|
+
enabled: boolean;
|
|
185
|
+
} | {
|
|
186
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
187
|
+
username: string | null | undefined;
|
|
188
|
+
passwordCredentialId: string | null | undefined;
|
|
189
|
+
enabled: boolean;
|
|
190
|
+
} | {
|
|
191
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
192
|
+
headerName: string | null | undefined;
|
|
193
|
+
headerValueCredentialId: string | null | undefined;
|
|
194
|
+
enabled: boolean;
|
|
195
|
+
} | {
|
|
196
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
197
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
198
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
199
|
+
enabled: boolean;
|
|
200
|
+
} | null | undefined;
|
|
182
201
|
currentVersion?: string | null | undefined;
|
|
183
202
|
publishedVersion?: string | null | undefined;
|
|
184
203
|
}, unknown, import("zod/v4/core").$ZodTypeInternals<{
|
|
@@ -197,6 +216,25 @@ export declare class MemoryRecordOrmEntity extends BaseOrmEntity<MemoryRecordDto
|
|
|
197
216
|
direction: import("@hexabot-ai/types").DirectionType;
|
|
198
217
|
createdBy: string | null;
|
|
199
218
|
runAfterMs: number;
|
|
219
|
+
webhookTrigger?: {
|
|
220
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
221
|
+
enabled: boolean;
|
|
222
|
+
} | {
|
|
223
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
224
|
+
username: string | null | undefined;
|
|
225
|
+
passwordCredentialId: string | null | undefined;
|
|
226
|
+
enabled: boolean;
|
|
227
|
+
} | {
|
|
228
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
229
|
+
headerName: string | null | undefined;
|
|
230
|
+
headerValueCredentialId: string | null | undefined;
|
|
231
|
+
enabled: boolean;
|
|
232
|
+
} | {
|
|
233
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
234
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
235
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
236
|
+
enabled: boolean;
|
|
237
|
+
} | null | undefined;
|
|
200
238
|
currentVersion?: string | null | undefined;
|
|
201
239
|
publishedVersion?: string | null | undefined;
|
|
202
240
|
}, unknown>>>>;
|
|
@@ -104,6 +104,25 @@ export declare class WorkflowRunOrmEntity extends BaseOrmEntity<WorkflowRunDto>
|
|
|
104
104
|
direction: import("@hexabot-ai/types").DirectionType;
|
|
105
105
|
createdBy: string | null;
|
|
106
106
|
runAfterMs: number;
|
|
107
|
+
webhookTrigger?: {
|
|
108
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
109
|
+
enabled: boolean;
|
|
110
|
+
} | {
|
|
111
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
112
|
+
username: string | null | undefined;
|
|
113
|
+
passwordCredentialId: string | null | undefined;
|
|
114
|
+
enabled: boolean;
|
|
115
|
+
} | {
|
|
116
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
117
|
+
headerName: string | null | undefined;
|
|
118
|
+
headerValueCredentialId: string | null | undefined;
|
|
119
|
+
enabled: boolean;
|
|
120
|
+
} | {
|
|
121
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
122
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
123
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
124
|
+
enabled: boolean;
|
|
125
|
+
} | null | undefined;
|
|
107
126
|
currentVersion?: string | null | undefined;
|
|
108
127
|
publishedVersion?: string | null | undefined;
|
|
109
128
|
};
|
|
@@ -258,6 +277,25 @@ export declare class WorkflowRunOrmEntity extends BaseOrmEntity<WorkflowRunDto>
|
|
|
258
277
|
direction: import("@hexabot-ai/types").DirectionType;
|
|
259
278
|
createdBy: string | null;
|
|
260
279
|
runAfterMs: number;
|
|
280
|
+
webhookTrigger?: {
|
|
281
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
282
|
+
enabled: boolean;
|
|
283
|
+
} | {
|
|
284
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
285
|
+
username: string | null | undefined;
|
|
286
|
+
passwordCredentialId: string | null | undefined;
|
|
287
|
+
enabled: boolean;
|
|
288
|
+
} | {
|
|
289
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
290
|
+
headerName: string | null | undefined;
|
|
291
|
+
headerValueCredentialId: string | null | undefined;
|
|
292
|
+
enabled: boolean;
|
|
293
|
+
} | {
|
|
294
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
295
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
296
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
297
|
+
enabled: boolean;
|
|
298
|
+
} | null | undefined;
|
|
261
299
|
currentVersion?: string | null | undefined;
|
|
262
300
|
publishedVersion?: string | null | undefined;
|
|
263
301
|
};
|
|
@@ -80,6 +80,25 @@ export declare class WorkflowVersionOrmEntity extends BaseOrmEntity<WorkflowVers
|
|
|
80
80
|
direction: import("@hexabot-ai/types").DirectionType;
|
|
81
81
|
createdBy: string | null;
|
|
82
82
|
runAfterMs: number;
|
|
83
|
+
webhookTrigger?: {
|
|
84
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
85
|
+
enabled: boolean;
|
|
86
|
+
} | {
|
|
87
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
88
|
+
username: string | null | undefined;
|
|
89
|
+
passwordCredentialId: string | null | undefined;
|
|
90
|
+
enabled: boolean;
|
|
91
|
+
} | {
|
|
92
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
93
|
+
headerName: string | null | undefined;
|
|
94
|
+
headerValueCredentialId: string | null | undefined;
|
|
95
|
+
enabled: boolean;
|
|
96
|
+
} | {
|
|
97
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
98
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
99
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
100
|
+
enabled: boolean;
|
|
101
|
+
} | null | undefined;
|
|
83
102
|
currentVersion?: string | null | undefined;
|
|
84
103
|
publishedVersion?: string | null | undefined;
|
|
85
104
|
}, unknown, import("zod/v4/core").$ZodTypeInternals<{
|
|
@@ -98,6 +117,25 @@ export declare class WorkflowVersionOrmEntity extends BaseOrmEntity<WorkflowVers
|
|
|
98
117
|
direction: import("@hexabot-ai/types").DirectionType;
|
|
99
118
|
createdBy: string | null;
|
|
100
119
|
runAfterMs: number;
|
|
120
|
+
webhookTrigger?: {
|
|
121
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.none;
|
|
122
|
+
enabled: boolean;
|
|
123
|
+
} | {
|
|
124
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.basic;
|
|
125
|
+
username: string | null | undefined;
|
|
126
|
+
passwordCredentialId: string | null | undefined;
|
|
127
|
+
enabled: boolean;
|
|
128
|
+
} | {
|
|
129
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.header;
|
|
130
|
+
headerName: string | null | undefined;
|
|
131
|
+
headerValueCredentialId: string | null | undefined;
|
|
132
|
+
enabled: boolean;
|
|
133
|
+
} | {
|
|
134
|
+
authType: import("@hexabot-ai/types").WebhookAuthType.jwt;
|
|
135
|
+
jwtSecretCredentialId: string | null | undefined;
|
|
136
|
+
jwtAlgorithm: import("@hexabot-ai/types").WebhookJwtAlgorithm | null | undefined;
|
|
137
|
+
enabled: boolean;
|
|
138
|
+
} | null | undefined;
|
|
101
139
|
currentVersion?: string | null | undefined;
|
|
102
140
|
publishedVersion?: string | null | undefined;
|
|
103
141
|
}, unknown>>>;
|