@atom8n/n8n-nodes-base 2.4.2 → 2.5.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/nodes/ActionNetwork/GenericFunctions.d.ts +19 -19
- package/dist/nodes/Airtable/v2/helpers/utils.d.ts +1 -1
- package/dist/nodes/Airtop/__schema__/v1.0.0/interaction/type.json +56 -0
- package/dist/nodes/Airtop/actions/common/output.utils.d.ts +1 -1
- package/dist/nodes/Aws/DynamoDB/__schema__/v1.0.0/item/delete.json +9 -0
- package/dist/nodes/Aws/SES/__schema__/v1.0.0/email/sendTemplate.json +30 -0
- package/dist/nodes/BambooHr/__schema__/v1.0.0/employee/update.json +9 -0
- package/dist/nodes/DataTable/__schema__/v1.1.0/row/get.json +15 -0
- package/dist/nodes/DataTable/__schema__/v1.1.0/row/insert.json +15 -0
- package/dist/nodes/DateTime/V1/DateTimeV1.node.js +1 -1
- package/dist/nodes/DateTime/V2/GenericFunctions.d.ts +1 -1
- package/dist/nodes/Dropbox/__schema__/v1.0.0/folder/delete.json +26 -0
- package/dist/nodes/Facebook/GenericFunctions.d.ts +1 -1
- package/dist/nodes/Git/GenericFunctions.d.ts +8 -0
- package/dist/nodes/Git/GenericFunctions.js +30 -0
- package/dist/nodes/Git/descriptions/ReflogDescription.d.ts +2 -0
- package/dist/nodes/Git/descriptions/ReflogDescription.js +56 -0
- package/dist/nodes/Github/GithubTriggerHelpers.d.ts +13 -0
- package/dist/nodes/Github/GithubTriggerHelpers.js +62 -0
- package/dist/nodes/Github/__schema__/v1.1.0/workflow/dispatchAndWait.json +9 -0
- package/dist/nodes/Github/__schema__/v1.1.0/workflow/get.json +36 -0
- package/dist/nodes/Github/__schema__/v1.1.0/workflow/list.json +47 -0
- package/dist/nodes/Gitlab/__schema__/v1.0.0/file/create.json +12 -0
- package/dist/nodes/Google/Analytics/v2/helpers/utils.d.ts +1 -1
- package/dist/nodes/Google/BigQuery/v2/helpers/utils.d.ts +1 -1
- package/dist/nodes/Google/Calendar/GenericFunctions.js +1 -1
- package/dist/nodes/Google/GSuiteAdmin/__schema__/v1.0.0/group/create.json +27 -0
- package/dist/nodes/Google/GSuiteAdmin/__schema__/v1.0.0/user/addToGroup.json +9 -0
- package/dist/nodes/Google/Gmail/GenericFunctions.js +1 -1
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/draft/create.json +26 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/label/getAll.json +21 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/message/addLabels.json +18 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/message/get.json +151 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/message/getAll.json +55 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/message/markAsRead.json +18 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/message/reply.json +18 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/message/send.json +18 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/message/sendAndWait.json +14 -0
- package/dist/nodes/Google/Gmail/__schema__/v2.2.0/thread/getAll.json +15 -0
- package/dist/nodes/Google/Sheet/v2/helpers/GoogleSheets.utils.d.ts +1 -1
- package/dist/nodes/HelpScout/__schema__/v1.0.0/mailbox/getAll.json +53 -0
- package/dist/nodes/HighLevel/v1/GenericFunctions.js +1 -1
- package/dist/nodes/HighLevel/v2/GenericFunctions.d.ts +1 -1
- package/dist/nodes/HighLevel/v2/GenericFunctions.js +1 -1
- package/dist/nodes/Hubspot/V1/GenericFunctions.d.ts +19 -19
- package/dist/nodes/Hubspot/V2/GenericFunctions.d.ts +19 -19
- package/dist/nodes/Hubspot/__schema__/v2.2.0/company/getAll.json +83 -0
- package/dist/nodes/Hubspot/__schema__/v2.2.0/contactList/add.json +30 -0
- package/dist/nodes/Hubspot/__schema__/v2.2.0/deal/getAll.json +83 -0
- package/dist/nodes/Hubspot/__schema__/v2.2.0/ticket/get.json +81 -0
- package/dist/nodes/Hubspot/__schema__/v2.2.0/ticket/getAll.json +18 -0
- package/dist/nodes/Jira/__schema__/v1.0.0/issue/delete.json +9 -0
- package/dist/nodes/Linear/GenericFunctions.d.ts +1 -1
- package/dist/nodes/Linear/__schema__/v1.1.0/comment/addComment.json +17 -0
- package/dist/nodes/Linear/__schema__/v1.1.0/issue/create.json +49 -0
- package/dist/nodes/Linear/__schema__/v1.1.0/issue/get.json +43 -0
- package/dist/nodes/Magento/GenericFunctions.d.ts +1 -1
- package/dist/nodes/Mailcheck/__schema__/v1.0.0/email/check.json +30 -0
- package/dist/nodes/Microsoft/AzureCosmosDb/__schema__/v1.0.0/item/get.json +9 -0
- package/dist/nodes/Microsoft/Dynamics/GenericFunctions.d.ts +1 -1
- package/dist/nodes/Microsoft/OneDrive/__schema__/v1.0.0/folder/share.json +41 -0
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/create.operation.js +2 -1
- package/dist/nodes/Microsoft/Outlook/v2/actions/event/update.operation.js +2 -1
- package/dist/nodes/Microsoft/Outlook/v2/helpers/utils.d.ts +8 -8
- package/dist/nodes/Microsoft/Storage/__schema__/v1.0.0/container/getAll.json +41 -0
- package/dist/nodes/Microsoft/ToDo/__schema__/v1.0.0/list/get.json +27 -0
- package/dist/nodes/MistralAI/__schema__/v1.0.0/document/extractText.json +98 -0
- package/dist/nodes/MySql/v2/helpers/utils.d.ts +4 -1
- package/dist/nodes/Notion/shared/GenericFunctions.d.ts +1 -1
- package/dist/nodes/PayPal/__schema__/v1.0.0/payout/create.json +45 -0
- package/dist/nodes/QuickBase/__schema__/v1.0.0/record/create.json +9 -0
- package/dist/nodes/S3/__schema__/v1.0.0/bucket/create.json +9 -0
- package/dist/nodes/Salesforce/GenericFunctions.js +1 -1
- package/dist/nodes/Salesforce/__schema__/v1.0.0/account/delete.json +9 -0
- package/dist/nodes/Salesforce/__schema__/v1.0.0/flow/getAll.json +18 -0
- package/dist/nodes/TheHiveProject/helpers/utils.d.ts +6 -6
- package/dist/nodes/UrlScanIo/GenericFunctions.d.ts +1 -1
- package/dist/nodes/Wise/GenericFunctions.d.ts +1 -1
- package/dist/nodes/Zoho/GenericFunctions.d.ts +2 -2
- package/dist/typecheck.tsbuildinfo +1 -1
- package/dist/types/nodes.json +2 -2
- package/dist/utils/sendAndWait/utils.d.ts +1 -1
- package/package.json +9 -9
|
@@ -15,15 +15,15 @@ export declare const makeOsdiLink: (personId: string) => {
|
|
|
15
15
|
export declare const isPrimary: (field: FieldWithPrimaryField) => boolean;
|
|
16
16
|
declare function adjustLocation(allFields: AllFieldsUi): AllFieldsUi | {
|
|
17
17
|
location: IDataObject;
|
|
18
|
+
target: string;
|
|
18
19
|
languages_spoken: import("./types").LanguageCodes;
|
|
19
|
-
|
|
20
|
-
phone_numbers_fields: import("./types").PhoneNumberField[];
|
|
21
|
-
};
|
|
20
|
+
email_addresses: import("./types").EmailAddressUi;
|
|
22
21
|
postal_addresses: {
|
|
23
22
|
postal_addresses_fields: import("./types").PostalAddressField[];
|
|
24
23
|
};
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
phone_numbers: {
|
|
25
|
+
phone_numbers_fields: import("./types").PhoneNumberField[];
|
|
26
|
+
};
|
|
27
27
|
};
|
|
28
28
|
declare function adjustTargets(allFields: AllFieldsUi): AllFieldsUi | {
|
|
29
29
|
target: {
|
|
@@ -33,13 +33,13 @@ declare function adjustTargets(allFields: AllFieldsUi): AllFieldsUi | {
|
|
|
33
33
|
postal_addresses_fields: import("./types").PostalAddressField;
|
|
34
34
|
};
|
|
35
35
|
languages_spoken: import("./types").LanguageCodes;
|
|
36
|
-
|
|
37
|
-
phone_numbers_fields: import("./types").PhoneNumberField[];
|
|
38
|
-
};
|
|
36
|
+
email_addresses: import("./types").EmailAddressUi;
|
|
39
37
|
postal_addresses: {
|
|
40
38
|
postal_addresses_fields: import("./types").PostalAddressField[];
|
|
41
39
|
};
|
|
42
|
-
|
|
40
|
+
phone_numbers: {
|
|
41
|
+
phone_numbers_fields: import("./types").PhoneNumberField[];
|
|
42
|
+
};
|
|
43
43
|
};
|
|
44
44
|
export declare const adjustPersonPayload: (...args: any[]) => any;
|
|
45
45
|
export declare const adjustPetitionPayload: typeof adjustTargets;
|
|
@@ -58,18 +58,18 @@ export declare const simplifyResponse: (response: Response, resource: Resource)
|
|
|
58
58
|
language_spoken: any;
|
|
59
59
|
postal_address: {
|
|
60
60
|
address_lines: string;
|
|
61
|
-
region: string;
|
|
62
|
-
primary: boolean;
|
|
63
|
-
locality: string;
|
|
64
|
-
postal_code: string;
|
|
65
61
|
country: string;
|
|
66
|
-
language: import("./types").LanguageCodes;
|
|
67
62
|
location: {
|
|
68
63
|
location_fields: {
|
|
69
64
|
latitude: string;
|
|
70
65
|
longitude: string;
|
|
71
66
|
};
|
|
72
67
|
};
|
|
68
|
+
language: import("./types").LanguageCodes;
|
|
69
|
+
primary: boolean;
|
|
70
|
+
locality: string;
|
|
71
|
+
region: string;
|
|
72
|
+
postal_code: string;
|
|
73
73
|
};
|
|
74
74
|
phone_number: string;
|
|
75
75
|
email_address: string;
|
|
@@ -79,18 +79,18 @@ export declare const simplifyResponse: (response: Response, resource: Resource)
|
|
|
79
79
|
language_spoken: any;
|
|
80
80
|
postal_address: {
|
|
81
81
|
address_lines: string;
|
|
82
|
-
region: string;
|
|
83
|
-
primary: boolean;
|
|
84
|
-
locality: string;
|
|
85
|
-
postal_code: string;
|
|
86
82
|
country: string;
|
|
87
|
-
language: import("./types").LanguageCodes;
|
|
88
83
|
location: {
|
|
89
84
|
location_fields: {
|
|
90
85
|
latitude: string;
|
|
91
86
|
longitude: string;
|
|
92
87
|
};
|
|
93
88
|
};
|
|
89
|
+
language: import("./types").LanguageCodes;
|
|
90
|
+
primary: boolean;
|
|
91
|
+
locality: string;
|
|
92
|
+
region: string;
|
|
93
|
+
postal_code: string;
|
|
94
94
|
};
|
|
95
95
|
phone_number: string;
|
|
96
96
|
email_address: string;
|
|
@@ -4,5 +4,5 @@ export declare function removeIgnored(data: IDataObject, ignore: string | string
|
|
|
4
4
|
export declare function findMatches(data: UpdateRecord[], keys: string[], fields: IDataObject, updateAll?: boolean): UpdateRecord[];
|
|
5
5
|
export declare function processAirtableError(error: NodeApiError, id?: string, itemIndex?: number): NodeApiError;
|
|
6
6
|
export declare const flattenOutput: (record: IDataObject) => {
|
|
7
|
-
[x: string]: IDataObject | import("n8n-workflow").GenericValue | import("n8n-workflow").GenericValue[]
|
|
7
|
+
[x: string]: IDataObject | IDataObject[] | import("n8n-workflow").GenericValue | import("n8n-workflow").GenericValue[];
|
|
8
8
|
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"data": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"modelResponse": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"meta": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"actionId": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"requestId": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"status": {
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
"usage": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"credits": {
|
|
28
|
+
"type": "integer"
|
|
29
|
+
},
|
|
30
|
+
"id": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"sessionId": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"warnings": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"message": {
|
|
46
|
+
"type": "string"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"windowId": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"version": 1
|
|
56
|
+
}
|
|
@@ -16,7 +16,7 @@ export declare function parseJsonIfPresent(this: IExecuteFunctions, index: numbe
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function cleanOutputForToolUse(output: IAirtopNodeExecutionData[]): {
|
|
18
18
|
json: {
|
|
19
|
-
[key: string]: IDataObject | import("n8n-workflow").GenericValue | import("n8n-workflow").GenericValue[]
|
|
19
|
+
[key: string]: IDataObject | IDataObject[] | import("n8n-workflow").GenericValue | import("n8n-workflow").GenericValue[];
|
|
20
20
|
};
|
|
21
21
|
binary?: import("n8n-workflow").IBinaryKeyData;
|
|
22
22
|
error?: import("n8n-workflow").NodeApiError | NodeOperationError;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"$": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"xmlns": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"ResponseMetadata": {
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"RequestId": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"SendTemplatedEmailResult": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"MessageId": {
|
|
24
|
+
"type": "string"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"version": 1
|
|
30
|
+
}
|
|
@@ -400,7 +400,7 @@ class DateTimeV1 {
|
|
|
400
400
|
const options = this.getNodeParameter('options', i);
|
|
401
401
|
let newDate;
|
|
402
402
|
if (currentDate instanceof luxon_1.DateTime) {
|
|
403
|
-
currentDate = currentDate.toISO();
|
|
403
|
+
currentDate = currentDate.toISO() || '';
|
|
404
404
|
}
|
|
405
405
|
// Check if the input is a number
|
|
406
406
|
if (!Number.isNaN(Number(currentDate))) {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"metadata": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
".tag": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"id": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"name": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"path_display": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"path_lower": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"version": 1
|
|
26
|
+
}
|
|
@@ -3,4 +3,4 @@ export declare function facebookApiRequest(this: IHookFunctions | IExecuteFuncti
|
|
|
3
3
|
export declare function getFields(object: string): {
|
|
4
4
|
name: string;
|
|
5
5
|
}[];
|
|
6
|
-
export declare function getAllFields(object: string): (IDataObject | import("n8n-workflow").GenericValue | import("n8n-workflow").GenericValue[]
|
|
6
|
+
export declare function getAllFields(object: string): (IDataObject | IDataObject[] | import("n8n-workflow").GenericValue | import("n8n-workflow").GenericValue[])[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { INode } from 'n8n-workflow';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a git reference to prevent command injection attacks
|
|
4
|
+
* @param reference - The git reference to validate (e.g., branch name, HEAD, refs/heads/main)
|
|
5
|
+
* @param node - The node instance for error throwing
|
|
6
|
+
* @throws {NodeOperationError} If the reference contains unsafe characters or patterns
|
|
7
|
+
*/
|
|
8
|
+
export declare function validateGitReference(reference: string, node: INode): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateGitReference = validateGitReference;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
/**
|
|
6
|
+
* Validates a git reference to prevent command injection attacks
|
|
7
|
+
* @param reference - The git reference to validate (e.g., branch name, HEAD, refs/heads/main)
|
|
8
|
+
* @param node - The node instance for error throwing
|
|
9
|
+
* @throws {NodeOperationError} If the reference contains unsafe characters or patterns
|
|
10
|
+
*/
|
|
11
|
+
function validateGitReference(reference, node) {
|
|
12
|
+
// Allow only safe characters: alphanumeric, /, @, {, }, ., -, _, :
|
|
13
|
+
const safeReferencePattern = /^[a-zA-Z0-9/@{}._:-]+$/;
|
|
14
|
+
if (!safeReferencePattern.test(reference)) {
|
|
15
|
+
throw new n8n_workflow_1.NodeOperationError(node, 'Invalid reference format. Reference contains unsafe characters. Only alphanumeric characters and /@{}._:- are allowed');
|
|
16
|
+
}
|
|
17
|
+
// Prevent argument injection by blocking references starting with -
|
|
18
|
+
if (reference.startsWith('-')) {
|
|
19
|
+
throw new n8n_workflow_1.NodeOperationError(node, 'Invalid reference format. Reference cannot start with a hyphen');
|
|
20
|
+
}
|
|
21
|
+
// Prevent path traversal attempts
|
|
22
|
+
if (reference.includes('..')) {
|
|
23
|
+
throw new n8n_workflow_1.NodeOperationError(node, 'Invalid reference format. Reference cannot contain ".."');
|
|
24
|
+
}
|
|
25
|
+
// Prevent control characters that could be used for injection
|
|
26
|
+
// eslint-disable-next-line no-control-regex
|
|
27
|
+
if (/[\x00-\x1f\x7f]/.test(reference)) {
|
|
28
|
+
throw new n8n_workflow_1.NodeOperationError(node, 'Invalid reference format. Reference cannot contain control characters');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reflogFields = void 0;
|
|
4
|
+
exports.reflogFields = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Return All',
|
|
7
|
+
name: 'returnAll',
|
|
8
|
+
type: 'boolean',
|
|
9
|
+
displayOptions: {
|
|
10
|
+
show: {
|
|
11
|
+
operation: ['reflog'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
default: false,
|
|
15
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
displayName: 'Limit',
|
|
19
|
+
name: 'limit',
|
|
20
|
+
type: 'number',
|
|
21
|
+
displayOptions: {
|
|
22
|
+
show: {
|
|
23
|
+
operation: ['reflog'],
|
|
24
|
+
returnAll: [false],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
typeOptions: {
|
|
28
|
+
minValue: 1,
|
|
29
|
+
maxValue: 100,
|
|
30
|
+
},
|
|
31
|
+
default: 100,
|
|
32
|
+
description: 'Max number of results to return',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
displayName: 'Options',
|
|
36
|
+
name: 'options',
|
|
37
|
+
type: 'collection',
|
|
38
|
+
displayOptions: {
|
|
39
|
+
show: {
|
|
40
|
+
operation: ['reflog'],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
placeholder: 'Add option',
|
|
44
|
+
default: {},
|
|
45
|
+
options: [
|
|
46
|
+
{
|
|
47
|
+
displayName: 'Reference',
|
|
48
|
+
name: 'reference',
|
|
49
|
+
type: 'string',
|
|
50
|
+
default: '',
|
|
51
|
+
placeholder: 'HEAD',
|
|
52
|
+
description: 'The reference to show the reflog for (e.g., HEAD, branch name). Leave empty for HEAD.',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IWebhookFunctions } from 'n8n-workflow';
|
|
2
|
+
/**
|
|
3
|
+
* Verifies the GitHub webhook signature using HMAC-SHA256.
|
|
4
|
+
*
|
|
5
|
+
* GitHub sends a signature in the `X-Hub-Signature-256` header in the format:
|
|
6
|
+
* `sha256=<HMAC hex digest>`
|
|
7
|
+
*
|
|
8
|
+
* This function computes the expected signature using the stored webhook secret
|
|
9
|
+
* and compares it with the provided signature using a constant-time comparison.
|
|
10
|
+
*
|
|
11
|
+
* @returns true if signature is valid or no secret is configured, false otherwise
|
|
12
|
+
*/
|
|
13
|
+
export declare function verifySignature(this: IWebhookFunctions): boolean;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.verifySignature = verifySignature;
|
|
4
|
+
const crypto_1 = require("crypto");
|
|
5
|
+
/**
|
|
6
|
+
* Verifies the GitHub webhook signature using HMAC-SHA256.
|
|
7
|
+
*
|
|
8
|
+
* GitHub sends a signature in the `X-Hub-Signature-256` header in the format:
|
|
9
|
+
* `sha256=<HMAC hex digest>`
|
|
10
|
+
*
|
|
11
|
+
* This function computes the expected signature using the stored webhook secret
|
|
12
|
+
* and compares it with the provided signature using a constant-time comparison.
|
|
13
|
+
*
|
|
14
|
+
* @returns true if signature is valid or no secret is configured, false otherwise
|
|
15
|
+
*/
|
|
16
|
+
function verifySignature() {
|
|
17
|
+
// Get the secret from workflow static data (set during webhook creation)
|
|
18
|
+
const webhookData = this.getWorkflowStaticData('node');
|
|
19
|
+
const webhookSecret = webhookData.webhookSecret;
|
|
20
|
+
// If no secret is configured, skip verification (backwards compatibility)
|
|
21
|
+
if (!webhookSecret) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
const req = this.getRequestObject();
|
|
25
|
+
// Get the signature from GitHub's header
|
|
26
|
+
const signature = req.header('x-hub-signature-256');
|
|
27
|
+
if (!signature) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
// Validate signature format (must start with "sha256=")
|
|
31
|
+
if (!signature.startsWith('sha256=')) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
// Extract just the hex digest part
|
|
35
|
+
const providedSignature = signature.substring(7);
|
|
36
|
+
try {
|
|
37
|
+
// Get the raw request body
|
|
38
|
+
if (!req.rawBody) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
// Compute HMAC-SHA256 of the raw body using our secret
|
|
42
|
+
const hmac = (0, crypto_1.createHmac)('sha256', webhookSecret);
|
|
43
|
+
if (Buffer.isBuffer(req.rawBody)) {
|
|
44
|
+
hmac.update(req.rawBody);
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
const rawBodyString = typeof req.rawBody === 'string' ? req.rawBody : JSON.stringify(req.rawBody);
|
|
48
|
+
hmac.update(rawBodyString);
|
|
49
|
+
}
|
|
50
|
+
const computedSignature = hmac.digest('hex');
|
|
51
|
+
const computedBuffer = Buffer.from(computedSignature, 'utf8');
|
|
52
|
+
const providedBuffer = Buffer.from(providedSignature, 'utf8');
|
|
53
|
+
// Buffers must be same length for timingSafeEqual
|
|
54
|
+
if (computedBuffer.length !== providedBuffer.length) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
return (0, crypto_1.timingSafeEqual)(computedBuffer, providedBuffer);
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"badge_url": {
|
|
5
|
+
"type": "string"
|
|
6
|
+
},
|
|
7
|
+
"created_at": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"html_url": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"id": {
|
|
14
|
+
"type": "integer"
|
|
15
|
+
},
|
|
16
|
+
"name": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"node_id": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"path": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"state": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"updated_at": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"url": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"version": 1
|
|
36
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"total_count": {
|
|
5
|
+
"type": "integer"
|
|
6
|
+
},
|
|
7
|
+
"workflows": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"badge_url": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"created_at": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"html_url": {
|
|
19
|
+
"type": "string"
|
|
20
|
+
},
|
|
21
|
+
"id": {
|
|
22
|
+
"type": "integer"
|
|
23
|
+
},
|
|
24
|
+
"name": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"node_id": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"path": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"state": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"updated_at": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"url": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"version": 1
|
|
47
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IExecuteFunctions, ILoadOptionsFunctions, IDataObject, INodeListSearchItems, INodePropertyOptions } from 'n8n-workflow';
|
|
2
2
|
export declare function simplify(responseData: any | [any]): {
|
|
3
|
-
[x: string]: IDataObject | import("n8n-workflow").GenericValue | import("n8n-workflow").GenericValue[]
|
|
3
|
+
[x: string]: IDataObject | IDataObject[] | import("n8n-workflow").GenericValue | import("n8n-workflow").GenericValue[];
|
|
4
4
|
}[];
|
|
5
5
|
export declare function merge(responseData: [any]): {
|
|
6
6
|
columnHeader: IDataObject;
|
|
@@ -4,5 +4,5 @@ export declare function wrapData(data: IDataObject | IDataObject[]): INodeExecut
|
|
|
4
4
|
export declare function simplify(data: TableRawData[], schema: SchemaField[], includeSchema?: boolean, parseTimestamps?: boolean): IDataObject[];
|
|
5
5
|
export declare function prepareOutput(this: IExecuteFunctions, response: IDataObject, itemIndex: number, rawOutput: boolean, includeSchema?: boolean): import("n8n-workflow").NodeExecutionWithMetadata[];
|
|
6
6
|
export declare function checkSchema(this: IExecuteFunctions, schema: TableSchema, record: IDataObject, i: number): {
|
|
7
|
-
[key: string]: IDataObject | import("n8n-workflow").GenericValue | import("n8n-workflow").GenericValue[]
|
|
7
|
+
[key: string]: IDataObject | IDataObject[] | import("n8n-workflow").GenericValue | import("n8n-workflow").GenericValue[];
|
|
8
8
|
};
|
|
@@ -186,7 +186,7 @@ const eventExtendYearIntoFuture = (data, timezone, currentYear) => {
|
|
|
186
186
|
exports.eventExtendYearIntoFuture = eventExtendYearIntoFuture;
|
|
187
187
|
function dateObjectToISO(date) {
|
|
188
188
|
if (date instanceof luxon_1.DateTime)
|
|
189
|
-
return date.toISO();
|
|
189
|
+
return date.toISO() || '';
|
|
190
190
|
if (date instanceof Date)
|
|
191
191
|
return date.toISOString();
|
|
192
192
|
return date;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"adminCreated": {
|
|
5
|
+
"type": "boolean"
|
|
6
|
+
},
|
|
7
|
+
"description": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"email": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"etag": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"id": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"kind": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
"name": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"version": 1
|
|
27
|
+
}
|
|
@@ -207,7 +207,7 @@ function extractEmail(s) {
|
|
|
207
207
|
}
|
|
208
208
|
const prepareTimestamp = (node, itemIndex, query, dateValue, label) => {
|
|
209
209
|
if (dateValue instanceof luxon_1.DateTime) {
|
|
210
|
-
dateValue = dateValue.toISO();
|
|
210
|
+
dateValue = dateValue.toISO() || '';
|
|
211
211
|
}
|
|
212
212
|
let timestamp = luxon_1.DateTime.fromISO(dateValue).toSeconds();
|
|
213
213
|
const timestampLengthInMilliseconds1990 = 12;
|