n8n-nodes-base 0.141.0 → 0.142.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.
Files changed (48) hide show
  1. package/dist/credentials/Aws.credentials.js +1 -1
  2. package/dist/credentials/S3.credentials.js +1 -1
  3. package/dist/nodes/Aws/Textract/AwsTextract.node.d.ts +11 -0
  4. package/dist/nodes/Aws/Textract/AwsTextract.node.js +141 -0
  5. package/dist/nodes/Aws/Textract/AwsTextract.node.js.map +1 -0
  6. package/dist/nodes/Aws/Textract/GenericFunctions.d.ts +28 -0
  7. package/dist/nodes/Aws/Textract/GenericFunctions.js +114 -0
  8. package/dist/nodes/Aws/Textract/GenericFunctions.js.map +1 -0
  9. package/dist/nodes/Aws/Textract/textract.svg +18 -0
  10. package/dist/nodes/Bitbucket/BitbucketTrigger.node.d.ts +6 -4
  11. package/dist/nodes/Bitbucket/BitbucketTrigger.node.js +88 -114
  12. package/dist/nodes/Bitbucket/BitbucketTrigger.node.js.map +1 -1
  13. package/dist/nodes/Github/Github.node.d.ts +6 -1
  14. package/dist/nodes/Github/Github.node.js +38 -0
  15. package/dist/nodes/Github/Github.node.js.map +1 -1
  16. package/dist/nodes/Google/Drive/GenericFunctions.d.ts +4 -3
  17. package/dist/nodes/Google/Drive/GenericFunctions.js +16 -4
  18. package/dist/nodes/Google/Drive/GenericFunctions.js.map +1 -1
  19. package/dist/nodes/Google/Drive/GoogleDriveTrigger.node.d.ts +11 -0
  20. package/dist/nodes/Google/Drive/GoogleDriveTrigger.node.js +394 -0
  21. package/dist/nodes/Google/Drive/GoogleDriveTrigger.node.js.map +1 -1
  22. package/dist/nodes/HomeAssistant/HomeAssistant.node.d.ts +6 -1
  23. package/dist/nodes/HomeAssistant/HomeAssistant.node.js +36 -0
  24. package/dist/nodes/HomeAssistant/HomeAssistant.node.js.map +1 -1
  25. package/dist/nodes/Jira/IssueDescription.js +1 -1
  26. package/dist/nodes/Jira/IssueDescription.js.map +1 -1
  27. package/dist/nodes/Jira/Jira.node.d.ts +4 -1
  28. package/dist/nodes/Jira/Jira.node.js +43 -2
  29. package/dist/nodes/Jira/Jira.node.js.map +1 -1
  30. package/dist/nodes/Microsoft/OneDrive/FolderDescription.js +2 -1
  31. package/dist/nodes/Microsoft/OneDrive/FolderDescription.js.map +1 -1
  32. package/dist/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.js +16 -9
  33. package/dist/nodes/Microsoft/OneDrive/MicrosoftOneDrive.node.js.map +1 -1
  34. package/dist/nodes/Pipedrive/Pipedrive.node.js +7 -0
  35. package/dist/nodes/Pipedrive/Pipedrive.node.js.map +1 -1
  36. package/dist/nodes/Slack/GenericFunctions.js +8 -3
  37. package/dist/nodes/Slack/GenericFunctions.js.map +1 -1
  38. package/dist/nodes/Slack/Slack.node.js +4 -4
  39. package/dist/nodes/Slack/Slack.node.js.map +1 -1
  40. package/dist/nodes/Strapi/GenericFunctions.js +3 -0
  41. package/dist/nodes/Strapi/GenericFunctions.js.map +1 -1
  42. package/dist/nodes/Twitter/TweetDescription.js +17 -0
  43. package/dist/nodes/Twitter/TweetDescription.js.map +1 -1
  44. package/dist/nodes/Twitter/Twitter.node.js +1 -0
  45. package/dist/nodes/Twitter/Twitter.node.js.map +1 -1
  46. package/dist/nodes/WooCommerce/OrderDescription.js +2 -2
  47. package/dist/nodes/WooCommerce/OrderDescription.js.map +1 -1
  48. package/package.json +6 -4
@@ -15,7 +15,7 @@ class Aws {
15
15
  default: 'us-east-1',
16
16
  },
17
17
  {
18
- displayName: 'Access Key Id',
18
+ displayName: 'Access Key ID',
19
19
  name: 'accessKeyId',
20
20
  type: 'string',
21
21
  default: '',
@@ -20,7 +20,7 @@ class S3 {
20
20
  default: 'us-east-1',
21
21
  },
22
22
  {
23
- displayName: 'Access Key Id',
23
+ displayName: 'Access Key ID',
24
24
  name: 'accessKeyId',
25
25
  type: 'string',
26
26
  default: '',
@@ -0,0 +1,11 @@
1
+ import { IExecuteFunctions } from 'n8n-core';
2
+ import { ICredentialsDecrypted, ICredentialTestFunctions, INodeExecutionData, INodeType, INodeTypeDescription, NodeCredentialTestResult } from 'n8n-workflow';
3
+ export declare class AwsTextract implements INodeType {
4
+ description: INodeTypeDescription;
5
+ methods: {
6
+ credentialTest: {
7
+ awsTextractApiCredentialTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<NodeCredentialTestResult>;
8
+ };
9
+ };
10
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
11
+ }
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AwsTextract = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ const GenericFunctions_1 = require("./GenericFunctions");
6
+ class AwsTextract {
7
+ constructor() {
8
+ this.description = {
9
+ displayName: 'AWS Textract',
10
+ name: 'awsTextract',
11
+ icon: 'file:textract.svg',
12
+ group: ['output'],
13
+ version: 1,
14
+ subtitle: '={{$parameter["operation"]}}',
15
+ description: 'Sends data to Amazon Textract',
16
+ defaults: {
17
+ name: 'AWS Textract',
18
+ color: '#5aa08d',
19
+ },
20
+ inputs: ['main'],
21
+ outputs: ['main'],
22
+ credentials: [
23
+ {
24
+ name: 'aws',
25
+ required: true,
26
+ testedBy: 'awsTextractApiCredentialTest',
27
+ },
28
+ ],
29
+ properties: [
30
+ {
31
+ displayName: 'Operation',
32
+ name: 'operation',
33
+ type: 'options',
34
+ options: [
35
+ {
36
+ name: 'Analyze Receipt or Invoice',
37
+ value: 'analyzeExpense',
38
+ },
39
+ ],
40
+ default: 'analyzeExpense',
41
+ description: '',
42
+ },
43
+ {
44
+ displayName: 'Input Data Field Name',
45
+ name: 'binaryPropertyName',
46
+ type: 'string',
47
+ default: 'data',
48
+ displayOptions: {
49
+ show: {
50
+ operation: [
51
+ 'analyzeExpense',
52
+ ],
53
+ },
54
+ },
55
+ required: true,
56
+ description: 'The name of the input field containing the binary file data to be uploaded. Supported file types: PNG, JPEG',
57
+ },
58
+ {
59
+ displayName: 'Simplify Response',
60
+ name: 'simple',
61
+ type: 'boolean',
62
+ displayOptions: {
63
+ show: {
64
+ operation: [
65
+ 'analyzeExpense',
66
+ ],
67
+ },
68
+ },
69
+ default: true,
70
+ description: 'Return a simplified version of the response instead of the raw data.',
71
+ },
72
+ ],
73
+ };
74
+ this.methods = {
75
+ credentialTest: {
76
+ async awsTextractApiCredentialTest(credential) {
77
+ try {
78
+ await GenericFunctions_1.validateCrendetials.call(this, credential.data, 'sts');
79
+ }
80
+ catch (error) {
81
+ return {
82
+ status: 'Error',
83
+ message: 'The security token included in the request is invalid',
84
+ };
85
+ }
86
+ return {
87
+ status: 'OK',
88
+ message: 'Connection successful!',
89
+ };
90
+ },
91
+ },
92
+ };
93
+ }
94
+ async execute() {
95
+ const items = this.getInputData();
96
+ const returnData = [];
97
+ let responseData;
98
+ const operation = this.getNodeParameter('operation', 0);
99
+ for (let i = 0; i < items.length; i++) {
100
+ try {
101
+ if (operation === 'analyzeExpense') {
102
+ const binaryProperty = this.getNodeParameter('binaryPropertyName', i);
103
+ const simple = this.getNodeParameter('simple', i);
104
+ if (items[i].binary === undefined) {
105
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No binary data exists on item!');
106
+ }
107
+ if (items[i].binary[binaryProperty] === undefined) {
108
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `No binary data property "${binaryProperty}" does not exists on item!`);
109
+ }
110
+ const binaryPropertyData = items[i].binary[binaryProperty];
111
+ const body = {
112
+ Document: {
113
+ Bytes: binaryPropertyData.data,
114
+ },
115
+ };
116
+ const action = 'Textract.AnalyzeExpense';
117
+ responseData = await GenericFunctions_1.awsApiRequestREST.call(this, 'textract', 'POST', '', JSON.stringify(body), { 'x-amz-target': action, 'Content-Type': 'application/x-amz-json-1.1' });
118
+ if (simple) {
119
+ responseData = GenericFunctions_1.simplify(responseData);
120
+ }
121
+ }
122
+ if (Array.isArray(responseData)) {
123
+ returnData.push.apply(returnData, responseData);
124
+ }
125
+ else {
126
+ returnData.push(responseData);
127
+ }
128
+ }
129
+ catch (error) {
130
+ if (this.continueOnFail()) {
131
+ returnData.push({ error: error.message });
132
+ continue;
133
+ }
134
+ throw error;
135
+ }
136
+ }
137
+ return [this.helpers.returnJsonArray(returnData)];
138
+ }
139
+ }
140
+ exports.AwsTextract = AwsTextract;
141
+ //# sourceMappingURL=AwsTextract.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AwsTextract.node.js","sourceRoot":"","sources":["../../../../nodes/Aws/Textract/AwsTextract.node.ts"],"names":[],"mappings":";;;AAIA,+CAWsB;AAEtB,yDAK4B;AAE5B,MAAa,WAAW;IAAxB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,cAAc;YAC3B,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,mBAAmB;YACzB,KAAK,EAAE,CAAC,QAAQ,CAAC;YACjB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8BAA8B;YACxC,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE;gBACT,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,SAAS;aAChB;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,KAAK;oBACX,QAAQ,EAAE,IAAI;oBACd,QAAQ,EAAE,8BAA8B;iBACxC;aACD;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,4BAA4B;4BAClC,KAAK,EAAE,gBAAgB;yBACvB;qBACD;oBACD,OAAO,EAAE,gBAAgB;oBACzB,WAAW,EAAE,EAAE;iBACf;gBACD;oBACC,WAAW,EAAE,uBAAuB;oBACpC,IAAI,EAAE,oBAAoB;oBAC1B,IAAI,EAA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xD;aACD;YAAC,OAAO,KAAK,EAAE;gBACf,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE;oBAC1B,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;oBAC1C,SAAS;iBACT;gBACD,MAAM,KAAK,CAAC;aACZ;SACD;QACD,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,CAAC;IACnD,CAAC;CACD;AA1ID,kCA0IC"}
@@ -0,0 +1,28 @@
1
+ import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions, IWebhookFunctions } from 'n8n-core';
2
+ import { ICredentialDataDecryptedObject, ICredentialTestFunctions } from 'n8n-workflow';
3
+ export declare function awsApiRequest(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, service: string, method: string, path: string, body?: string, headers?: object): Promise<any>;
4
+ export declare function awsApiRequestREST(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, service: string, method: string, path: string, body?: string, headers?: object): Promise<any>;
5
+ export declare function awsApiRequestSOAP(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions | IWebhookFunctions, service: string, method: string, path: string, body?: string, headers?: object): Promise<any>;
6
+ export declare function simplify(data: IExpenseDocument): {
7
+ [key: string]: string;
8
+ };
9
+ export interface IExpenseDocument {
10
+ ExpenseDocuments: [
11
+ {
12
+ SummaryFields: [
13
+ {
14
+ LabelDetection: {
15
+ Text: string;
16
+ };
17
+ ValueDetection: {
18
+ Text: string;
19
+ };
20
+ Type: {
21
+ Text: string;
22
+ };
23
+ }
24
+ ];
25
+ }
26
+ ];
27
+ }
28
+ export declare function validateCrendetials(this: ICredentialTestFunctions, decryptedCredentials: ICredentialDataDecryptedObject, service: string): Promise<any>;
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateCrendetials = exports.simplify = exports.awsApiRequestSOAP = exports.awsApiRequestREST = exports.awsApiRequest = void 0;
4
+ const url_1 = require("url");
5
+ const aws4_1 = require("aws4");
6
+ const xml2js_1 = require("xml2js");
7
+ const n8n_workflow_1 = require("n8n-workflow");
8
+ function getEndpointForService(service, credentials) {
9
+ let endpoint;
10
+ if (service === 'lambda' && credentials.lambdaEndpoint) {
11
+ endpoint = credentials.lambdaEndpoint;
12
+ }
13
+ else if (service === 'sns' && credentials.snsEndpoint) {
14
+ endpoint = credentials.snsEndpoint;
15
+ }
16
+ else {
17
+ endpoint = `https://${service}.${credentials.region}.amazonaws.com`;
18
+ }
19
+ return endpoint.replace('{region}', credentials.region);
20
+ }
21
+ async function awsApiRequest(service, method, path, body, headers) {
22
+ var _a, _b, _c, _d;
23
+ const credentials = await this.getCredentials('aws');
24
+ if (credentials === undefined) {
25
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'No credentials got returned!');
26
+ }
27
+ const endpoint = new url_1.URL(getEndpointForService(service, credentials) + path);
28
+ const signOpts = { headers: headers || {}, host: endpoint.host, method, path, body };
29
+ aws4_1.sign(signOpts, { accessKeyId: `${credentials.accessKeyId}`.trim(), secretAccessKey: `${credentials.secretAccessKey}`.trim() });
30
+ const options = {
31
+ headers: signOpts.headers,
32
+ method,
33
+ uri: endpoint.href,
34
+ body: signOpts.body,
35
+ };
36
+ try {
37
+ return await this.helpers.request(options);
38
+ }
39
+ catch (error) {
40
+ if (((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) || ((_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.body)) {
41
+ const errorMessage = ((_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) || ((_d = error === null || error === void 0 ? void 0 : error.response) === null || _d === void 0 ? void 0 : _d.body);
42
+ if (errorMessage.includes('AccessDeniedException')) {
43
+ const user = JSON.parse(errorMessage).Message.split(' ')[1];
44
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error, {
45
+ message: 'Unauthorized — please check your AWS policy configuration',
46
+ description: `Make sure an identity-based policy allows user ${user} to perform textract:AnalyzeExpense`
47
+ });
48
+ }
49
+ }
50
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
51
+ }
52
+ }
53
+ exports.awsApiRequest = awsApiRequest;
54
+ async function awsApiRequestREST(service, method, path, body, headers) {
55
+ const response = await awsApiRequest.call(this, service, method, path, body, headers);
56
+ try {
57
+ return JSON.parse(response);
58
+ }
59
+ catch (error) {
60
+ return response;
61
+ }
62
+ }
63
+ exports.awsApiRequestREST = awsApiRequestREST;
64
+ async function awsApiRequestSOAP(service, method, path, body, headers) {
65
+ const response = await awsApiRequest.call(this, service, method, path, body, headers);
66
+ try {
67
+ return await new Promise((resolve, reject) => {
68
+ xml2js_1.parseString(response, { explicitArray: false }, (err, data) => {
69
+ if (err) {
70
+ return reject(err);
71
+ }
72
+ resolve(data);
73
+ });
74
+ });
75
+ }
76
+ catch (error) {
77
+ return response;
78
+ }
79
+ }
80
+ exports.awsApiRequestSOAP = awsApiRequestSOAP;
81
+ function simplify(data) {
82
+ var _a, _b;
83
+ const result = {};
84
+ for (const document of data.ExpenseDocuments) {
85
+ for (const field of document.SummaryFields) {
86
+ result[((_a = field === null || field === void 0 ? void 0 : field.Type) === null || _a === void 0 ? void 0 : _a.Text) || ((_b = field === null || field === void 0 ? void 0 : field.LabelDetection) === null || _b === void 0 ? void 0 : _b.Text)] = field.ValueDetection.Text;
87
+ }
88
+ }
89
+ return result;
90
+ }
91
+ exports.simplify = simplify;
92
+ async function validateCrendetials(decryptedCredentials, service) {
93
+ const credentials = decryptedCredentials;
94
+ const endpoint = new url_1.URL(getEndpointForService(service, credentials) + `?Action=GetCallerIdentity&Version=2011-06-15`);
95
+ const signOpts = { host: endpoint.host, method: 'POST', path: '?Action=GetCallerIdentity&Version=2011-06-15' };
96
+ aws4_1.sign(signOpts, { accessKeyId: `${credentials.accessKeyId}`.trim(), secretAccessKey: `${credentials.secretAccessKey}`.trim() });
97
+ const options = {
98
+ headers: signOpts.headers,
99
+ method: 'POST',
100
+ uri: endpoint.href,
101
+ body: signOpts.body,
102
+ };
103
+ const response = await this.helpers.request(options);
104
+ return await new Promise((resolve, reject) => {
105
+ xml2js_1.parseString(response, { explicitArray: false }, (err, data) => {
106
+ if (err) {
107
+ return reject(err);
108
+ }
109
+ resolve(data);
110
+ });
111
+ });
112
+ }
113
+ exports.validateCrendetials = validateCrendetials;
114
+ //# sourceMappingURL=GenericFunctions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../../nodes/Aws/Textract/GenericFunctions.ts"],"names":[],"mappings":";;;AAAA,6BAEa;AAEb,+BAGc;AAMd,mCAEgB;AAShB,+CAKsB;AAEtB,SAAS,qBAAqB,CAAC,OAAe,EAAE,WAA2C;IAC1F,IAAI,QAAQ,CAAC;IACb,IAAI,OAAO,KAAK,QAAQ,IAAI,WAAW,CAAC,cAAc,EAAE;QACvD,QAAQ,GAAG,WAAW,CAAC,cAAc,CAAC;KACtC;SAAM,IAAI,OAAO,KAAK,KAAK,IAAI,WAAW,CAAC,WAAW,EAAE;QACxD,QAAQ,GAAG,WAAW,CAAC,WAAW,CAAC;KACnC;SAAM;QACN,QAAQ,GAAG,WAAW,OAAO,IAAI,WAAW,CAAC,MAAM,gBAAgB,CAAC;KACpE;IACD,OAAQ,QAAmB,CAAC,OAAO,CAAC,UAAU,EAAE,WAAW,CAAC,MAAgB,CAAC,CAAC;AAC/E,CAAC;AAEM,KAAK,UAAU,aAAa,CAAuF,OAAe,EAAE,MAAc,EAAE,IAAY,EAAE,IAAa,EAAE,OAAgB;;IACvM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACrD,IAAI,WAAW,KAAK,SAAS,EAAE;QAC9B,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,8BAA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AAC,IAAI;KACnB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAQ,CAAC,OAAO,CAAC,CAAC;IAEtD,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC5C,oBAAW,CAAC,QAAQ,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAC7D,IAAI,GAAG,EAAE;gBACR,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;aACnB;YACD,OAAO,CAAC,IAAI,CAAC,CAAC;QACf,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC;AA3BD,kDA2BC"}
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="80px" height="80px" viewBox="0 0 80 80" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 64 (93537) - https://sketch.com -->
4
+ <title>Icon-Architecture/64/Arch_AWS-Textract_64</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <linearGradient x1="0%" y1="100%" x2="100%" y2="0%" id="linearGradient-1">
8
+ <stop stop-color="#055F4E" offset="0%"></stop>
9
+ <stop stop-color="#56C0A7" offset="100%"></stop>
10
+ </linearGradient>
11
+ </defs>
12
+ <g id="Icon-Architecture/64/Arch_AWS-Textract_64" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
13
+ <g id="Icon-Architecture-BG/64/Machine-Learning" fill="url(#linearGradient-1)">
14
+ <rect id="Rectangle" x="0" y="0" width="80" height="80"></rect>
15
+ </g>
16
+ <path d="M22.0624102,50 C24.3763895,53.603 28.4103535,56 33.0003125,56 C40.1672485,56 45.9991964,50.168 45.9991964,43 C45.9991964,35.832 40.1672485,30 33.0003125,30 C27.6033607,30 22.9664021,33.307 21.0024196,38 L23.2143999,38 C25.0393836,34.444 28.7363506,32 33.0003125,32 C39.0652583,32 43.9992143,36.935 43.9992143,43 C43.9992143,49.065 39.0652583,54 33.0003125,54 C29.5913429,54 26.5413702,52.441 24.5213882,50 L22.0624102,50 Z M37.0002768,45 L37.0002768,43 L41.9992321,43 C41.9992321,38.038 37.9622682,34 33.0003125,34 C28.0373568,34 23.9993929,38.038 23.9993929,43 L28.9993482,43 L28.9993482,45 L24.2313908,45 C25.1443826,49.002 28.7253507,52 33.0003125,52 C35.1362934,52 37.0992759,51.249 38.6442621,50 L34.0003036,50 L34.0003036,48 L40.4782457,48 C41.0812403,47.102 41.5202364,46.087 41.7682342,45 L37.0002768,45 Z M21.0024196,48 L23.2143999,48 C22.4434068,46.498 22.0004107,44.801 22.0004107,43 C22.0004107,41.959 22.1554093,40.955 22.4264069,40 L20.3634253,40 C20.1344274,40.965 19.9994286,41.966 19.9994286,43 C19.9994286,44.771 20.3584254,46.46 21.0024196,48 L21.0024196,48 Z M19.7434309,50 L17.0004554,50 L17.0004554,48 L18.8744386,48 C18.5344417,47.04 18.2894438,46.038 18.1494451,45 L15.4144695,45 L16.707458,46.293 L15.2924706,47.707 L12.2924974,44.707 C11.9025009,44.316 11.9025009,43.684 12.2924974,43.293 L15.2924706,40.293 L16.707458,41.707 L15.4144695,43 L18.0004464,43 C18.0004464,41.973 18.1044455,40.97 18.3024437,40 L17.0004554,40 L17.0004554,38 L18.8744386,38 C20.9404202,32.184 26.4833707,28 33.0003125,28 C37.427273,28 41.4002375,29.939 44.148213,33 L59.0000804,33 L59.0000804,35 L45.6661994,35 C47.1351863,37.318 47.9991786,40.058 47.9991786,43 L59.0000804,43 L59.0000804,45 L47.8501799,45 C46.8681887,52.327 40.5912447,58 33.0003125,58 C27.2563638,58 22.2624084,54.752 19.7434309,50 L19.7434309,50 Z M37.0002768,39 C37.0002768,38.448 36.5522808,38 36.0002857,38 L29.9993482,38 C29.4473442,38 28.9993482,38.448 28.9993482,39 L28.9993482,41 L31.0003304,41 L31.0003304,40 L32.0003214,40 L32.0003214,43 L31.0003304,43 L31.0003304,45 L35.0002946,45 L35.0002946,43 L34.0003036,43 L34.0003036,40 L35.0002946,40 L35.0002946,41 L37.0002768,41 L37.0002768,39 Z M49.0001696,40 L59.0000804,40 L59.0000804,38 L49.0001696,38 L49.0001696,40 Z M49.0001696,50 L59.0000804,50 L59.0000804,48 L49.0001696,48 L49.0001696,50 Z M57.0000982,27 L60.5850662,27 L57.0000982,23.414 L57.0000982,27 Z M63.7070383,27.293 C63.8940367,27.48 64.0000357,27.735 64.0000357,28 L64.0000357,63 C64.0000357,63.552 63.5520397,64 63.0000446,64 L32.0003304,64 C31.4473264,64 31.0003304,63.552 31.0003304,63 L31.0003304,59 L33.0003125,59 L33.0003125,62 L62.0000536,62 L62.0000536,29 L56.0001071,29 C55.4471121,29 55.0001161,28.552 55.0001161,28 L55.0001161,22 L33.0003125,22 L33.0003125,27 L31.0003304,27 L31.0003304,21 C31.0003304,20.448 31.4473264,20 32.0003304,20 L56.0001071,20 C56.2651048,20 56.5191025,20.105 56.7071008,20.293 L63.7070383,27.293 Z M68,24.166 L68,61 C68,61.552 67.552004,62 67.0000089,62 L65.0000268,62 L65.0000268,60 L66.0000179,60 L66.0000179,24.612 L58.6170838,18 L36.0002857,18 L36.0002857,19 L34.0003036,19 L34.0003036,17 C34.0003036,16.448 34.4472996,16 35.0003036,16 L59.0000804,16 C59.2460782,16 59.483076,16.091 59.6660744,16.255 L67.666003,23.42 C67.8780011,23.61 68,23.881 68,24.166 L68,24.166 Z" id="Amazon-Textract_Icon_64_Squid" fill="#FFFFFF"></path>
17
+ </g>
18
+ </svg>
@@ -1,14 +1,16 @@
1
1
  import { IHookFunctions, IWebhookFunctions } from 'n8n-core';
2
- import { ILoadOptionsFunctions, INodePropertyOptions, INodeType, INodeTypeDescription, IWebhookResponseData } from 'n8n-workflow';
2
+ import { ICredentialsDecrypted, ICredentialTestFunctions, ILoadOptionsFunctions, INodePropertyOptions, INodeType, INodeTypeDescription, IWebhookResponseData, NodeCredentialTestResult } from 'n8n-workflow';
3
3
  export declare class BitbucketTrigger implements INodeType {
4
4
  description: INodeTypeDescription;
5
5
  methods: {
6
+ credentialTest: {
7
+ bitbucketApiTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<NodeCredentialTestResult>;
8
+ };
6
9
  loadOptions: {
7
- getUsersEvents(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
8
- getTeamEvents(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
10
+ getWorkspaceEvents(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
9
11
  getRepositoriesEvents(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
10
12
  getRepositories(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
11
- getTeams(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
13
+ getWorkspaces(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
12
14
  };
13
15
  };
14
16
  webhookMethods: {