n8n-nodes-extended-forms 0.1.1
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/LICENSE.md +19 -0
- package/README.md +52 -0
- package/dist/credentials/GithubIssuesApi.credentials.d.ts +10 -0
- package/dist/credentials/GithubIssuesApi.credentials.js +37 -0
- package/dist/credentials/GithubIssuesApi.credentials.js.map +1 -0
- package/dist/credentials/GithubIssuesOAuth2Api.credentials.d.ts +9 -0
- package/dist/credentials/GithubIssuesOAuth2Api.credentials.js +54 -0
- package/dist/credentials/GithubIssuesOAuth2Api.credentials.js.map +1 -0
- package/dist/icons/github.dark.svg +3 -0
- package/dist/icons/github.svg +3 -0
- package/dist/nodes/Form123/Form.node.d.ts +9 -0
- package/dist/nodes/Form123/Form.node.js +369 -0
- package/dist/nodes/Form123/Form.node.js.map +1 -0
- package/dist/nodes/Form123/Form.node.json +18 -0
- package/dist/nodes/Form123/FormTrigger.node.d.ts +4 -0
- package/dist/nodes/Form123/FormTrigger.node.js +28 -0
- package/dist/nodes/Form123/FormTrigger.node.js.map +1 -0
- package/dist/nodes/Form123/FormTrigger.node.json +18 -0
- package/dist/nodes/Form123/common.descriptions.d.ts +21 -0
- package/dist/nodes/Form123/common.descriptions.js +565 -0
- package/dist/nodes/Form123/common.descriptions.js.map +1 -0
- package/dist/nodes/Form123/cssVariables.d.ts +1 -0
- package/dist/nodes/Form123/cssVariables.js +74 -0
- package/dist/nodes/Form123/cssVariables.js.map +1 -0
- package/dist/nodes/Form123/form.svg +2 -0
- package/dist/nodes/Form123/interfaces.d.ts +52 -0
- package/dist/nodes/Form123/interfaces.js +5 -0
- package/dist/nodes/Form123/interfaces.js.map +1 -0
- package/dist/nodes/Form123/templates/form-trigger.handlebars +1496 -0
- package/dist/nodes/Form123/utils/descriptions.d.ts +2 -0
- package/dist/nodes/Form123/utils/descriptions.js +11 -0
- package/dist/nodes/Form123/utils/descriptions.js.map +1 -0
- package/dist/nodes/Form123/utils/formCompletionUtils.d.ts +8 -0
- package/dist/nodes/Form123/utils/formCompletionUtils.js +84 -0
- package/dist/nodes/Form123/utils/formCompletionUtils.js.map +1 -0
- package/dist/nodes/Form123/utils/formNodeUtils.d.ts +4 -0
- package/dist/nodes/Form123/utils/formNodeUtils.js +74 -0
- package/dist/nodes/Form123/utils/formNodeUtils.js.map +1 -0
- package/dist/nodes/Form123/utils/templateRenderer.d.ts +1 -0
- package/dist/nodes/Form123/utils/templateRenderer.js +69 -0
- package/dist/nodes/Form123/utils/templateRenderer.js.map +1 -0
- package/dist/nodes/Form123/utils/utilities.d.ts +6 -0
- package/dist/nodes/Form123/utils/utilities.js +47 -0
- package/dist/nodes/Form123/utils/utilities.js.map +1 -0
- package/dist/nodes/Form123/utils/utils.d.ts +76 -0
- package/dist/nodes/Form123/utils/utils.js +550 -0
- package/dist/nodes/Form123/utils/utils.js.map +1 -0
- package/dist/nodes/Form123/utils/waitUtils.d.ts +3 -0
- package/dist/nodes/Form123/utils/waitUtils.js +66 -0
- package/dist/nodes/Form123/utils/waitUtils.js.map +1 -0
- package/dist/nodes/Form123/v1/FormTriggerV1.node.d.ts +16 -0
- package/dist/nodes/Form123/v1/FormTriggerV1.node.js +83 -0
- package/dist/nodes/Form123/v1/FormTriggerV1.node.js.map +1 -0
- package/dist/nodes/Form123/v2/FormTriggerV2.node.d.ts +16 -0
- package/dist/nodes/Form123/v2/FormTriggerV2.node.js +194 -0
- package/dist/nodes/Form123/v2/FormTriggerV2.node.js.map +1 -0
- package/dist/package.json +61 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appendAttributionOption = void 0;
|
|
4
|
+
exports.appendAttributionOption = {
|
|
5
|
+
displayName: 'Append Attribution',
|
|
6
|
+
name: 'appendAttribution',
|
|
7
|
+
type: 'boolean',
|
|
8
|
+
default: true,
|
|
9
|
+
description: 'Whether to include the "Form automated with n8n" link at the bottom of the form',
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=descriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descriptions.js","sourceRoot":"","sources":["../../../../nodes/Form123/utils/descriptions.ts"],"names":[],"mappings":";;;AAUa,QAAA,uBAAuB,GAAoB;IACvD,WAAW,EAAE,oBAAoB;IACjC,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,iFAAiF;CAC9F,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Response } from 'express';
|
|
2
|
+
import { type NodeTypeAndVersion, type IWebhookFunctions, type IWebhookResponseData } from 'n8n-workflow';
|
|
3
|
+
export declare const binaryResponse: (context: IWebhookFunctions) => Promise<{
|
|
4
|
+
data: string | Buffer;
|
|
5
|
+
fileName: string;
|
|
6
|
+
type: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const renderFormCompletion: (context: IWebhookFunctions, res: Response, trigger: NodeTypeAndVersion) => Promise<IWebhookResponseData>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderFormCompletion = exports.binaryResponse = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const utils_1 = require("./utils");
|
|
6
|
+
const templateRenderer_1 = require("./templateRenderer");
|
|
7
|
+
const SANDBOX_CSP = 'sandbox allow-downloads allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-presentation allow-scripts allow-top-navigation allow-top-navigation-by-user-activation allow-top-navigation-to-custom-protocols';
|
|
8
|
+
const getBinaryDataFromNode = (context, nodeName) => {
|
|
9
|
+
return context.evaluateExpression(`{{ $('${nodeName}').first().binary }}`);
|
|
10
|
+
};
|
|
11
|
+
const binaryResponse = async (context) => {
|
|
12
|
+
var _a;
|
|
13
|
+
const inputDataFieldName = context.getNodeParameter('inputDataFieldName', '');
|
|
14
|
+
const parentNodes = context.getParentNodes(context.getNode().name);
|
|
15
|
+
const binaryNode = parentNodes
|
|
16
|
+
.reverse()
|
|
17
|
+
.find((node) => { var _a; return (_a = getBinaryDataFromNode(context, node === null || node === void 0 ? void 0 : node.name)) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(inputDataFieldName); });
|
|
18
|
+
if (!binaryNode) {
|
|
19
|
+
throw new n8n_workflow_1.OperationalError(`No binary data with field ${inputDataFieldName} found.`);
|
|
20
|
+
}
|
|
21
|
+
const binaryData = getBinaryDataFromNode(context, binaryNode === null || binaryNode === void 0 ? void 0 : binaryNode.name)[inputDataFieldName];
|
|
22
|
+
return {
|
|
23
|
+
data: binaryData.id
|
|
24
|
+
? await context.helpers.binaryToBuffer(await context.helpers.getBinaryStream(binaryData.id))
|
|
25
|
+
: atob(binaryData.data),
|
|
26
|
+
fileName: (_a = binaryData.fileName) !== null && _a !== void 0 ? _a : 'file',
|
|
27
|
+
type: binaryData.mimeType,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports.binaryResponse = binaryResponse;
|
|
31
|
+
const renderFormCompletion = async (context, res, trigger) => {
|
|
32
|
+
var _a;
|
|
33
|
+
const completionTitle = context.getNodeParameter('completionTitle', '');
|
|
34
|
+
const completionMessage = context.getNodeParameter('completionMessage', '');
|
|
35
|
+
const redirectUrl = context.getNodeParameter('redirectUrl', '');
|
|
36
|
+
const options = context.getNodeParameter('options', {});
|
|
37
|
+
const responseText = (_a = context.getNodeParameter('responseText', '')) !== null && _a !== void 0 ? _a : '';
|
|
38
|
+
const respondWith = context.getNodeParameter('respondWith', '');
|
|
39
|
+
const binary = respondWith === 'returnBinary' ? await (0, exports.binaryResponse)(context) : '';
|
|
40
|
+
let title = options.formTitle;
|
|
41
|
+
if (!title) {
|
|
42
|
+
title = context.evaluateExpression(`{{ $('${trigger === null || trigger === void 0 ? void 0 : trigger.name}').params.formTitle }}`);
|
|
43
|
+
}
|
|
44
|
+
const appendAttribution = context.evaluateExpression(`{{ $('${trigger === null || trigger === void 0 ? void 0 : trigger.name}').params.options?.appendAttribution === false ? false : true }}`);
|
|
45
|
+
if (respondWith !== 'redirect') {
|
|
46
|
+
res.setHeader('Content-Security-Policy', SANDBOX_CSP);
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const html = (0, templateRenderer_1.renderTemplate)('form-trigger-completion', {
|
|
50
|
+
title: completionTitle,
|
|
51
|
+
message: (0, utils_1.sanitizeHtml)(completionMessage),
|
|
52
|
+
formTitle: title,
|
|
53
|
+
appendAttribution,
|
|
54
|
+
responseText,
|
|
55
|
+
responseBinary: encodeURIComponent(JSON.stringify(binary)),
|
|
56
|
+
dangerousCustomCss: (0, utils_1.sanitizeCustomCss)(options.customCss),
|
|
57
|
+
redirectUrl,
|
|
58
|
+
});
|
|
59
|
+
res.setHeader('Content-Type', 'text/html');
|
|
60
|
+
res.send(html);
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
const html = `
|
|
64
|
+
<!DOCTYPE html>
|
|
65
|
+
<html>
|
|
66
|
+
<head>
|
|
67
|
+
<title>${completionTitle || 'Form Submitted'}</title>
|
|
68
|
+
${options.customCss ? `<style>${(0, utils_1.sanitizeCustomCss)(options.customCss)}</style>` : ''}
|
|
69
|
+
</head>
|
|
70
|
+
<body>
|
|
71
|
+
<h1>${completionTitle || 'Form Submitted'}</h1>
|
|
72
|
+
${completionMessage ? `<p>${(0, utils_1.sanitizeHtml)(completionMessage)}</p>` : ''}
|
|
73
|
+
${responseText ? `<div>${responseText}</div>` : ''}
|
|
74
|
+
${redirectUrl ? `<script>window.location.replace('${redirectUrl}');</script>` : ''}
|
|
75
|
+
</body>
|
|
76
|
+
</html>
|
|
77
|
+
`;
|
|
78
|
+
res.setHeader('Content-Type', 'text/html');
|
|
79
|
+
res.send(html);
|
|
80
|
+
}
|
|
81
|
+
return { noWebhookResponse: true };
|
|
82
|
+
};
|
|
83
|
+
exports.renderFormCompletion = renderFormCompletion;
|
|
84
|
+
//# sourceMappingURL=formCompletionUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formCompletionUtils.js","sourceRoot":"","sources":["../../../../nodes/Form123/utils/formCompletionUtils.ts"],"names":[],"mappings":";;;AAEA,+CAOsB;AAEtB,mCAA0D;AAC1D,yDAAoD;AAEpD,MAAM,WAAW,GAChB,gPAAgP,CAAC;AAElP,MAAM,qBAAqB,GAAG,CAAC,OAA0B,EAAE,QAAgB,EAAe,EAAE;IAC3F,OAAO,OAAO,CAAC,kBAAkB,CAAC,SAAS,QAAQ,sBAAsB,CAAgB,CAAC;AAC3F,CAAC,CAAC;AAEK,MAAM,cAAc,GAAG,KAAK,EAClC,OAA0B,EAC2C,EAAE;;IACvE,MAAM,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,EAAE,CAAW,CAAC;IACxF,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;IACnE,MAAM,UAAU,GAAG,WAAW;SAC5B,OAAO,EAAE;SAET,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,WAAC,OAAA,MAAA,qBAAqB,CAAC,OAAO,EAAE,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,CAAC,0CAAE,cAAc,CAAC,kBAAkB,CAAC,CAAA,EAAA,CAAC,CAAC;IACjG,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,MAAM,IAAI,+BAAgB,CAAC,6BAA6B,kBAAkB,SAAS,CAAC,CAAC;IACtF,CAAC;IACD,MAAM,UAAU,GAAG,qBAAqB,CAAC,OAAO,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,CAClE,kBAAkB,CACH,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CAAC,CAAC,EAAE;MAChD,WAAW,CAAC,CAAC,CAAC,oCAAoC,WAAW,cAAc,CAAC,CAAC,CAAC,EAAE;;;GAGnF,CAAC;QACF,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;QAC3C,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;IAED,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;AACpC,CAAC,CAAC;AArEW,QAAA,oBAAoB,wBAqE/B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Response } from 'express';
|
|
2
|
+
import { type NodeTypeAndVersion, type IWebhookFunctions, type FormFieldsParameter, type IWebhookResponseData } from 'n8n-workflow';
|
|
3
|
+
export declare const renderFormNode: (context: IWebhookFunctions, res: Response, trigger: NodeTypeAndVersion, fields: FormFieldsParameter, mode: "test" | "production") => Promise<IWebhookResponseData>;
|
|
4
|
+
export declare function getFormTriggerNode(context: IWebhookFunctions): NodeTypeAndVersion;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.renderFormNode = void 0;
|
|
4
|
+
exports.getFormTriggerNode = getFormTriggerNode;
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
const utils_1 = require("./utils");
|
|
7
|
+
const renderFormNode = async (context, res, trigger, fields, mode) => {
|
|
8
|
+
const options = context.getNodeParameter('options', {});
|
|
9
|
+
let header = options.formHeader;
|
|
10
|
+
if (!header || !header.trim()) {
|
|
11
|
+
try {
|
|
12
|
+
const triggerHeader = context.evaluateExpression(`{{ $('${trigger === null || trigger === void 0 ? void 0 : trigger.name}').params.formHeader }}`);
|
|
13
|
+
header = triggerHeader && triggerHeader.trim() ? triggerHeader : undefined;
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
header = undefined;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
if (header && header.trim()) {
|
|
20
|
+
header = (0, utils_1.sanitizeHtml)(header);
|
|
21
|
+
if (!header.trim()) {
|
|
22
|
+
header = undefined;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
header = undefined;
|
|
27
|
+
}
|
|
28
|
+
let title = options.formTitle;
|
|
29
|
+
if (!title) {
|
|
30
|
+
title = context.evaluateExpression(`{{ $('${trigger === null || trigger === void 0 ? void 0 : trigger.name}').params.formTitle }}`);
|
|
31
|
+
}
|
|
32
|
+
let buttonLabel = options.buttonLabel;
|
|
33
|
+
if (!buttonLabel) {
|
|
34
|
+
buttonLabel =
|
|
35
|
+
context.evaluateExpression(`{{ $('${trigger === null || trigger === void 0 ? void 0 : trigger.name}').params.options?.buttonLabel }}`) || 'Submit';
|
|
36
|
+
}
|
|
37
|
+
const appendAttribution = context.evaluateExpression(`{{ $('${trigger === null || trigger === void 0 ? void 0 : trigger.name}').params.options?.appendAttribution === false ? false : true }}`);
|
|
38
|
+
(0, utils_1.renderForm)({
|
|
39
|
+
context,
|
|
40
|
+
res,
|
|
41
|
+
formHeader: header,
|
|
42
|
+
formTitle: title,
|
|
43
|
+
formDescription: options.formDescription,
|
|
44
|
+
formFields: fields,
|
|
45
|
+
responseMode: 'responseNode',
|
|
46
|
+
mode,
|
|
47
|
+
redirectUrl: undefined,
|
|
48
|
+
appendAttribution,
|
|
49
|
+
buttonLabel,
|
|
50
|
+
customCss: options.customCss,
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
noWebhookResponse: true,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
exports.renderFormNode = renderFormNode;
|
|
57
|
+
function getFormTriggerNode(context) {
|
|
58
|
+
const parentNodes = context.getParentNodes(context.getNode().name);
|
|
59
|
+
const formTriggers = parentNodes.filter((node) => node.type === n8n_workflow_1.FORM_TRIGGER_NODE_TYPE);
|
|
60
|
+
if (!formTriggers.length) {
|
|
61
|
+
throw new n8n_workflow_1.NodeOperationError(context.getNode(), 'Form Trigger node must be set before this node');
|
|
62
|
+
}
|
|
63
|
+
for (const trigger of formTriggers) {
|
|
64
|
+
try {
|
|
65
|
+
context.evaluateExpression(`{{ $('${trigger.name}').first() }}`);
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
return trigger;
|
|
71
|
+
}
|
|
72
|
+
throw new n8n_workflow_1.NodeOperationError(context.getNode(), 'Form Trigger node was not executed');
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=formNodeUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formNodeUtils.js","sourceRoot":"","sources":["../../../../nodes/Form123/utils/formNodeUtils.ts"],"names":[],"mappings":";;;AAiGA,gDAuBC;AAtHD,+CAOsB;AAEtB,mCAAmD;AAE5C,MAAM,cAAc,GAAG,KAAK,EAClC,OAA0B,EAC1B,GAAa,EACb,OAA2B,EAC3B,MAA2B,EAC3B,IAA2B,EACK,EAAE;IAClC,MAAM,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,SAAS,EAAE,EAAE,CAMrD,CAAC;IAEF,IAAI,MAAM,GAAuB,OAAO,CAAC,UAAU,CAAC;IACpD,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;QAC/B,IAAI,CAAC;YACJ,MAAM,aAAa,GAAG,OAAO,CAAC,kBAAkB,CAAC,SAAS,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,yBAAyB,CAAW,CAAC;YAC5G,MAAM,GAAG,aAAa,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;QAE5E,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,GAAG,SAAS,CAAC;QACpB,CAAC;IACF,CAAC;IAGD,IAAI,MAAM,I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AAC,OAA0B;IAC5D,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;IAEnE,MAAM,YAAY,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,qCAAsB,CAAC,CAAC;IAExF,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QAC1B,MAAM,IAAI,iCAAkB,CAC3B,OAAO,CAAC,OAAO,EAAE,EACjB,gDAAgD,CAChD,CAAC;IACH,CAAC;IAED,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;QACpC,IAAI,CAAC;YACJ,OAAO,CAAC,kBAAkB,CAAC,SAAS,OAAO,CAAC,IAAI,eAAe,CAAC,CAAC;QAElE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,SAAS;QACV,CAAC;QACD,OAAO,OAAO,CAAC;IAChB,CAAC;IAED,MAAM,IAAI,iCAAkB,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,oCAAoC,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function renderTemplate(templateName: string, data: any): string;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.renderTemplate = renderTemplate;
|
|
40
|
+
const fs = __importStar(require("fs"));
|
|
41
|
+
const path = __importStar(require("path"));
|
|
42
|
+
const handlebars_1 = __importDefault(require("handlebars"));
|
|
43
|
+
const templateCache = {};
|
|
44
|
+
function renderTemplate(templateName, data) {
|
|
45
|
+
if (templateCache[templateName]) {
|
|
46
|
+
return templateCache[templateName](data);
|
|
47
|
+
}
|
|
48
|
+
const possiblePaths = [
|
|
49
|
+
path.join(__dirname, '..', 'templates', `${templateName}.handlebars`),
|
|
50
|
+
path.join(__dirname, '..', 'templates', `${templateName}.handlebars`),
|
|
51
|
+
path.join(process.cwd(), 'nodes', 'Form123', 'templates', `${templateName}.handlebars`),
|
|
52
|
+
path.join(process.cwd(), 'dist', 'nodes', 'Form123', 'templates', `${templateName}.handlebars`),
|
|
53
|
+
];
|
|
54
|
+
let templateContent = null;
|
|
55
|
+
for (const templatePath of possiblePaths) {
|
|
56
|
+
if (fs.existsSync(templatePath)) {
|
|
57
|
+
templateContent = fs.readFileSync(templatePath, 'utf-8');
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
if (!templateContent) {
|
|
62
|
+
throw new Error(`Template not found: ${templateName}.handlebars\n` +
|
|
63
|
+
`Searched in:\n${possiblePaths.map(p => ` - ${p}`).join('\n')}`);
|
|
64
|
+
}
|
|
65
|
+
const template = handlebars_1.default.compile(templateContent);
|
|
66
|
+
templateCache[templateName] = template;
|
|
67
|
+
return template(data);
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=templateRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateRenderer.js","sourceRoot":"","sources":["../../../../nodes/Form123/utils/templateRenderer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,wCA8CC;AA3DD,uCAAyB;AAEzB,2CAA6B;AAE7B,4DAAoC;AAEpC,MAAM,aAAa,GAAkD,EAAE,CAAC;AAOxE,SAAgB,cAAc,CAAC,YAAoB,EAAE,IAAS;IAE7D,IAAI,aAAa,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,OAAO,aAAa,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IAMD,MAAM,aAAa,GAAG;QAGrB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,YAAY,aAAa,CAAC;QAGrE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,YAAY,aAAa,CAAC;QAGrE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,YAAY,aAAa,CAAC;QAEvF,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,YAAY,aAAa,CAAC;KAC/F,CAAC;IAEF,IAAI,eAAe,GAAkB,IAAI,CAAC;IAE1C,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QAC1C,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YACjC,eAAe,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;YACzD,MAAM;QACP,CAAC;IACF,CAAC;IAED,IAAI,CAAC,eAAe,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACd,uBAAuB,YAAY,eAAe;YAClD,iBAAiB,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAChE,CAAC;IACH,CAAC;IAGD,MAAM,QAAQ,GAAG,oBAAU,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IACrD,aAAa,CAAC,YAAY,CAAC,GAAG,QAAQ,CAAC;IAGvC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function getResolvables(text: string): string[];
|
|
2
|
+
export declare class WebhookAuthorizationError extends Error {
|
|
3
|
+
statusCode: number;
|
|
4
|
+
constructor(statusCode: number, message?: string);
|
|
5
|
+
}
|
|
6
|
+
export declare function validateWebhookAuthentication(context: any, authProperty: string): Promise<void>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebhookAuthorizationError = void 0;
|
|
4
|
+
exports.getResolvables = getResolvables;
|
|
5
|
+
exports.validateWebhookAuthentication = validateWebhookAuthentication;
|
|
6
|
+
function getResolvables(text) {
|
|
7
|
+
const resolvables = [];
|
|
8
|
+
const regex = /\{\{[\s\S]*?\}\}/g;
|
|
9
|
+
let match;
|
|
10
|
+
while ((match = regex.exec(text)) !== null) {
|
|
11
|
+
resolvables.push(match[0]);
|
|
12
|
+
}
|
|
13
|
+
return resolvables;
|
|
14
|
+
}
|
|
15
|
+
class WebhookAuthorizationError extends Error {
|
|
16
|
+
constructor(statusCode, message) {
|
|
17
|
+
super(message || `Webhook authorization failed with status ${statusCode}`);
|
|
18
|
+
this.statusCode = statusCode;
|
|
19
|
+
this.name = 'WebhookAuthorizationError';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.WebhookAuthorizationError = WebhookAuthorizationError;
|
|
23
|
+
async function validateWebhookAuthentication(context, authProperty) {
|
|
24
|
+
const authType = context.getNodeParameter(authProperty, 'none');
|
|
25
|
+
if (authType === 'none') {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (authType === 'basicAuth') {
|
|
29
|
+
const req = context.getRequestObject();
|
|
30
|
+
const authHeader = req.headers.authorization;
|
|
31
|
+
if (!authHeader || !authHeader.startsWith('Basic ')) {
|
|
32
|
+
throw new WebhookAuthorizationError(401, 'Basic authentication required');
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
const credentials = await context.getCredentials('httpBasicAuth');
|
|
36
|
+
if (credentials) {
|
|
37
|
+
const expectedAuth = Buffer.from(`${credentials.user}:${credentials.password}`).toString('base64');
|
|
38
|
+
if (authHeader !== `Basic ${expectedAuth}`) {
|
|
39
|
+
throw new WebhookAuthorizationError(401, 'Invalid credentials');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=utilities.js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C,CAAC;QAC3E,CAAC;QAKD,IAAI,CAAC;YACJ,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;YAClE,IAAI,WAAW,EAAE,CAAC;gBAEjB,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAC/B,GAAG,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,QAAQ,EAAE,CAC7C,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBAErB,IAAI,UAAU,KAAK,SAAS,YAAY,EAAE,EAAE,CAAC;oBAC5C,MAAM,IAAI,yBAAyB,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;gBACjE,CAAC;YACF,CAAC;QAIF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;QAIjB,CAAC;IACF,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { Response } from 'express';
|
|
2
|
+
import type { INodeExecutionData, IDataObject, IWebhookFunctions, FormFieldsParameter, NodeTypeAndVersion } from 'n8n-workflow';
|
|
3
|
+
import type { FormTriggerData } from '../interfaces';
|
|
4
|
+
export declare function sanitizeHtml(text: string): string;
|
|
5
|
+
export declare const prepareFormFields: (context: IWebhookFunctions, fields: FormFieldsParameter) => {
|
|
6
|
+
fieldLabel: string;
|
|
7
|
+
elementName?: string;
|
|
8
|
+
fieldType?: string;
|
|
9
|
+
requiredField?: boolean;
|
|
10
|
+
fieldOptions?: {
|
|
11
|
+
values: Array<{
|
|
12
|
+
option: string;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
multiselect?: boolean;
|
|
16
|
+
multipleFiles?: boolean;
|
|
17
|
+
acceptFileTypes?: string;
|
|
18
|
+
formatDate?: string;
|
|
19
|
+
html?: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
fieldName?: string;
|
|
22
|
+
fieldValue?: string;
|
|
23
|
+
limitSelection?: "exact" | "range" | "unlimited";
|
|
24
|
+
numberOfSelections?: number;
|
|
25
|
+
minSelections?: number;
|
|
26
|
+
maxSelections?: number;
|
|
27
|
+
}[];
|
|
28
|
+
export declare function sanitizeCustomCss(css: string | undefined): string | undefined;
|
|
29
|
+
export declare function createDescriptionMetadata(description: string): string;
|
|
30
|
+
export declare function prepareFormData({ formHeader, formTitle, formDescription, formSubmittedHeader, formSubmittedText, redirectUrl, formFields, testRun, query, instanceId, useResponseData, appendAttribution, buttonLabel, customCss, }: {
|
|
31
|
+
formHeader?: string;
|
|
32
|
+
formTitle: string;
|
|
33
|
+
formDescription: string;
|
|
34
|
+
formSubmittedText: string | undefined;
|
|
35
|
+
redirectUrl: string | undefined;
|
|
36
|
+
formFields: FormFieldsParameter;
|
|
37
|
+
testRun: boolean;
|
|
38
|
+
query: IDataObject;
|
|
39
|
+
instanceId?: string;
|
|
40
|
+
useResponseData?: boolean;
|
|
41
|
+
appendAttribution?: boolean;
|
|
42
|
+
buttonLabel?: string;
|
|
43
|
+
formSubmittedHeader?: string;
|
|
44
|
+
customCss?: string;
|
|
45
|
+
}): FormTriggerData;
|
|
46
|
+
export declare const validateResponseModeConfiguration: (context: IWebhookFunctions) => void;
|
|
47
|
+
export declare function addFormResponseDataToReturnItem(returnItem: INodeExecutionData, formFields: FormFieldsParameter, bodyData: IDataObject): void;
|
|
48
|
+
export declare function prepareFormReturnItem(context: IWebhookFunctions, formFields: FormFieldsParameter, mode: 'test' | 'production', useWorkflowTimezone?: boolean): Promise<INodeExecutionData>;
|
|
49
|
+
export declare function renderForm({ context, res, formHeader, formTitle, formDescription, formFields, responseMode, mode, formSubmittedText, redirectUrl, appendAttribution, buttonLabel, customCss, }: {
|
|
50
|
+
context: IWebhookFunctions;
|
|
51
|
+
res: Response;
|
|
52
|
+
formHeader?: string;
|
|
53
|
+
formTitle: string;
|
|
54
|
+
formDescription: string;
|
|
55
|
+
formFields: FormFieldsParameter;
|
|
56
|
+
responseMode: string;
|
|
57
|
+
mode: 'test' | 'production';
|
|
58
|
+
formSubmittedText?: string;
|
|
59
|
+
redirectUrl?: string;
|
|
60
|
+
appendAttribution?: boolean;
|
|
61
|
+
buttonLabel?: string;
|
|
62
|
+
customCss?: string;
|
|
63
|
+
}): void;
|
|
64
|
+
export declare const isFormConnected: (nodes: NodeTypeAndVersion[]) => boolean;
|
|
65
|
+
export declare function formWebhook(context: IWebhookFunctions, authProperty?: string): Promise<{
|
|
66
|
+
noWebhookResponse: boolean;
|
|
67
|
+
webhookResponse?: undefined;
|
|
68
|
+
workflowData?: undefined;
|
|
69
|
+
} | {
|
|
70
|
+
webhookResponse: {
|
|
71
|
+
status: number;
|
|
72
|
+
};
|
|
73
|
+
workflowData: INodeExecutionData[][];
|
|
74
|
+
noWebhookResponse?: undefined;
|
|
75
|
+
}>;
|
|
76
|
+
export declare function resolveRawData(context: IWebhookFunctions, rawData: string): string;
|