n8n-nodes-metricool-or 0.1.2

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 (84) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +73 -0
  3. package/dist/credentials/ExampleCredentialsApi.credentials.d.ts +9 -0
  4. package/dist/credentials/ExampleCredentialsApi.credentials.js +47 -0
  5. package/dist/credentials/ExampleCredentialsApi.credentials.js.map +1 -0
  6. package/dist/credentials/HttpBinApi.credentials.d.ts +9 -0
  7. package/dist/credentials/HttpBinApi.credentials.js +43 -0
  8. package/dist/credentials/HttpBinApi.credentials.js.map +1 -0
  9. package/dist/credentials/MetricoolApi.credentials.d.ts +32 -0
  10. package/dist/credentials/MetricoolApi.credentials.d.ts.map +1 -0
  11. package/dist/credentials/MetricoolApi.credentials.js +59 -0
  12. package/dist/credentials/MetricoolApi.credentials.js.map +1 -0
  13. package/dist/nodes/ExampleNode/ExampleNode.node.d.ts +5 -0
  14. package/dist/nodes/ExampleNode/ExampleNode.node.js +60 -0
  15. package/dist/nodes/ExampleNode/ExampleNode.node.js.map +1 -0
  16. package/dist/nodes/HttpBin/HttpBin.node.d.ts +4 -0
  17. package/dist/nodes/HttpBin/HttpBin.node.js +56 -0
  18. package/dist/nodes/HttpBin/HttpBin.node.js.map +1 -0
  19. package/dist/nodes/HttpBin/HttpBin.node.json +18 -0
  20. package/dist/nodes/HttpBin/HttpVerbDescription.d.ts +3 -0
  21. package/dist/nodes/HttpBin/HttpVerbDescription.js +236 -0
  22. package/dist/nodes/HttpBin/HttpVerbDescription.js.map +1 -0
  23. package/dist/nodes/HttpBin/httpbin.svg +18 -0
  24. package/dist/nodes/Metricool/AdvertisingOperations.d.ts +3 -0
  25. package/dist/nodes/Metricool/AdvertisingOperations.js +112 -0
  26. package/dist/nodes/Metricool/AdvertisingOperations.js.map +1 -0
  27. package/dist/nodes/Metricool/AnalyticsOperations.d.ts +4 -0
  28. package/dist/nodes/Metricool/AnalyticsOperations.d.ts.map +1 -0
  29. package/dist/nodes/Metricool/AnalyticsOperations.js +163 -0
  30. package/dist/nodes/Metricool/AnalyticsOperations.js.map +1 -0
  31. package/dist/nodes/Metricool/BlueskyOperations.d.ts +3 -0
  32. package/dist/nodes/Metricool/BlueskyOperations.js +78 -0
  33. package/dist/nodes/Metricool/BlueskyOperations.js.map +1 -0
  34. package/dist/nodes/Metricool/BrandOperations.d.ts +4 -0
  35. package/dist/nodes/Metricool/BrandOperations.d.ts.map +1 -0
  36. package/dist/nodes/Metricool/BrandOperations.js +33 -0
  37. package/dist/nodes/Metricool/BrandOperations.js.map +1 -0
  38. package/dist/nodes/Metricool/CompetitorOperations.d.ts +3 -0
  39. package/dist/nodes/Metricool/CompetitorOperations.js +136 -0
  40. package/dist/nodes/Metricool/CompetitorOperations.js.map +1 -0
  41. package/dist/nodes/Metricool/FacebookOperations.d.ts +3 -0
  42. package/dist/nodes/Metricool/FacebookOperations.js +112 -0
  43. package/dist/nodes/Metricool/FacebookOperations.js.map +1 -0
  44. package/dist/nodes/Metricool/InstagramOperations.d.ts +4 -0
  45. package/dist/nodes/Metricool/InstagramOperations.d.ts.map +1 -0
  46. package/dist/nodes/Metricool/InstagramOperations.js +79 -0
  47. package/dist/nodes/Metricool/InstagramOperations.js.map +1 -0
  48. package/dist/nodes/Metricool/LinkedinOperations.d.ts +3 -0
  49. package/dist/nodes/Metricool/LinkedinOperations.js +78 -0
  50. package/dist/nodes/Metricool/LinkedinOperations.js.map +1 -0
  51. package/dist/nodes/Metricool/Metricool.node.d.ts +6 -0
  52. package/dist/nodes/Metricool/Metricool.node.d.ts.map +1 -0
  53. package/dist/nodes/Metricool/Metricool.node.js +215 -0
  54. package/dist/nodes/Metricool/Metricool.node.js.map +1 -0
  55. package/dist/nodes/Metricool/Metricool.node.json +18 -0
  56. package/dist/nodes/Metricool/MetricoolResources.d.ts +2 -0
  57. package/dist/nodes/Metricool/MetricoolResources.js +66 -0
  58. package/dist/nodes/Metricool/MetricoolResources.js.map +1 -0
  59. package/dist/nodes/Metricool/PinterestOperations.d.ts +3 -0
  60. package/dist/nodes/Metricool/PinterestOperations.js +78 -0
  61. package/dist/nodes/Metricool/PinterestOperations.js.map +1 -0
  62. package/dist/nodes/Metricool/PostOperations.d.ts +4 -0
  63. package/dist/nodes/Metricool/PostOperations.d.ts.map +1 -0
  64. package/dist/nodes/Metricool/PostOperations.js +299 -0
  65. package/dist/nodes/Metricool/PostOperations.js.map +1 -0
  66. package/dist/nodes/Metricool/ThreadsOperations.d.ts +3 -0
  67. package/dist/nodes/Metricool/ThreadsOperations.js +78 -0
  68. package/dist/nodes/Metricool/ThreadsOperations.js.map +1 -0
  69. package/dist/nodes/Metricool/TiktokOperations.d.ts +3 -0
  70. package/dist/nodes/Metricool/TiktokOperations.js +78 -0
  71. package/dist/nodes/Metricool/TiktokOperations.js.map +1 -0
  72. package/dist/nodes/Metricool/TwitchOperations.d.ts +3 -0
  73. package/dist/nodes/Metricool/TwitchOperations.js +78 -0
  74. package/dist/nodes/Metricool/TwitchOperations.js.map +1 -0
  75. package/dist/nodes/Metricool/TwitterOperations.d.ts +3 -0
  76. package/dist/nodes/Metricool/TwitterOperations.js +78 -0
  77. package/dist/nodes/Metricool/TwitterOperations.js.map +1 -0
  78. package/dist/nodes/Metricool/YoutubeOperations.d.ts +3 -0
  79. package/dist/nodes/Metricool/YoutubeOperations.js +78 -0
  80. package/dist/nodes/Metricool/YoutubeOperations.js.map +1 -0
  81. package/dist/nodes/Metricool/metricool.svg +3 -0
  82. package/dist/package.json +56 -0
  83. package/dist/tsconfig.tsbuildinfo +1 -0
  84. package/package.json +54 -0
package/LICENSE.md ADDED
@@ -0,0 +1,19 @@
1
+ Copyright 2022 n8n
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+ this software and associated documentation files (the "Software"), to deal in
5
+ the Software without restriction, including without limitation the rights to
6
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7
+ of the Software, and to permit persons to whom the Software is furnished to do
8
+ so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in all
11
+ copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # n8n-nodes-metricool
2
+
3
+ This is an n8n community node. It lets you use Metricool in your n8n workflows.
4
+
5
+ [Metricool](https://metricool.com/) is a social media management platform that allows you to analyze, manage, and schedule content across multiple social networks.
6
+
7
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
8
+
9
+ [Installation](#installation)
10
+ [Operations](#operations)
11
+ [Credentials](#credentials)
12
+ [Compatibility](#compatibility)
13
+ [Resources](#resources)
14
+
15
+ ## Installation
16
+
17
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
18
+
19
+ ## Operations
20
+
21
+ ### Brand Operations
22
+ - Get Brands - Get a list of brands from your Metricool account
23
+ - Get Brands (Complete) - Get a detailed list of brands with all available information
24
+
25
+ ### Social Media Content Operations
26
+ - Get Instagram Posts, Reels, and Stories
27
+ - Get Facebook Posts, Reels, and Stories
28
+ - Get TikTok Videos
29
+ - Get LinkedIn Posts
30
+ - Get Pinterest Pins
31
+ - Get YouTube Videos
32
+ - Get Twitch Videos
33
+ - Get X (Twitter) Posts
34
+ - Get Bluesky Posts
35
+ - Get Threads Posts
36
+
37
+ ### Analytics Operations
38
+ - Get Metrics - Get available metrics for a specific network
39
+ - Get Analytics - Get analytics data for a specific network and metrics
40
+
41
+ ### Post Management Operations
42
+ - Schedule Post - Schedule a post to multiple social networks
43
+ - Get Scheduled Posts - Get a list of scheduled posts
44
+ - Update Scheduled Post - Update an existing scheduled post
45
+
46
+ ### Competitor Analysis Operations
47
+ - Get Network Competitors - Get a list of competitors for supported networks
48
+ - Get Network Competitors Posts - Get and analyze posts from competitors
49
+
50
+ ### Optimal Timing Operations
51
+ - Get Best Time to Post - Get the best time to post for a specific network
52
+
53
+ ### Advertising Operations
54
+ - Get Facebook Ads Campaigns
55
+ - Get Google Ads Campaigns
56
+ - Get TikTok Ads Campaigns
57
+
58
+ ## Credentials
59
+
60
+ To use this node, you need to have a Metricool account with API access (Advanced Tier) and obtain your API credentials:
61
+
62
+ 1. Sign up for a Metricool account at [metricool.com](https://metricool.com/)
63
+ 2. Upgrade to the Advanced Tier to get API access
64
+ 3. Get your User Token and User ID from the API section in your account settings
65
+
66
+ ## Compatibility
67
+
68
+ This node has been tested with n8n version 1.0.0 and later.
69
+
70
+ ## Resources
71
+
72
+ * [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
73
+ * [Metricool API documentation](https://metricool.com/api-docs/)
@@ -0,0 +1,9 @@
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class ExampleCredentialsApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExampleCredentialsApi = void 0;
4
+ class ExampleCredentialsApi {
5
+ constructor() {
6
+ this.name = 'exampleCredentialsApi';
7
+ this.displayName = 'Example Credentials API';
8
+ this.documentationUrl = 'https://your-docs-url';
9
+ this.properties = [
10
+ {
11
+ displayName: 'User Name',
12
+ name: 'username',
13
+ type: 'string',
14
+ default: '',
15
+ },
16
+ {
17
+ displayName: 'Password',
18
+ name: 'password',
19
+ type: 'string',
20
+ typeOptions: {
21
+ password: true,
22
+ },
23
+ default: '',
24
+ },
25
+ ];
26
+ this.authenticate = {
27
+ type: 'generic',
28
+ properties: {
29
+ auth: {
30
+ username: '={{ $credentials.username }}',
31
+ password: '={{ $credentials.password }}',
32
+ },
33
+ qs: {
34
+ n8n: 'rocks',
35
+ },
36
+ },
37
+ };
38
+ this.test = {
39
+ request: {
40
+ baseURL: 'https://example.com/',
41
+ url: '',
42
+ },
43
+ };
44
+ }
45
+ }
46
+ exports.ExampleCredentialsApi = ExampleCredentialsApi;
47
+ //# sourceMappingURL=ExampleCredentialsApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExampleCredentialsApi.credentials.js","sourceRoot":"","sources":["../../credentials/ExampleCredentialsApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,qBAAqB;IAAlC;QACC,SAAI,GAAG,uBAAuB,CAAC;QAC/B,gBAAW,GAAG,yBAAyB,CAAC;QAExC,qBAAgB,GAAG,uBAAuB,CAAC;QAE3C,eAAU,GAAsB;YAI/B;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACX;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;aACX;SACD,CAAC;QAKF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,IAAI,EAAE;oBACL,QAAQ,EAAE,8BAA8B;oBACxC,QAAQ,EAAE,8BAA8B;iBACxC;gBACD,EAAE,EAAE;oBAEH,GAAG,EAAE,OAAO;iBACZ;aACD;SACD,CAAC;QAGF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,sBAAsB;gBAC/B,GAAG,EAAE,EAAE;aACP;SACD,CAAC;IACH,CAAC;CAAA;AAnDD,sDAmDC"}
@@ -0,0 +1,9 @@
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class HttpBinApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpBinApi = void 0;
4
+ class HttpBinApi {
5
+ constructor() {
6
+ this.name = 'httpbinApi';
7
+ this.displayName = 'HttpBin API';
8
+ this.documentationUrl = 'https://your-docs-url';
9
+ this.properties = [
10
+ {
11
+ displayName: 'Token',
12
+ name: 'token',
13
+ type: 'string',
14
+ default: '',
15
+ typeOptions: {
16
+ password: true,
17
+ },
18
+ },
19
+ {
20
+ displayName: 'Domain',
21
+ name: 'domain',
22
+ type: 'string',
23
+ default: 'https://httpbin.org',
24
+ },
25
+ ];
26
+ this.authenticate = {
27
+ type: 'generic',
28
+ properties: {
29
+ headers: {
30
+ Authorization: '={{"Bearer " + $credentials.token}}',
31
+ },
32
+ },
33
+ };
34
+ this.test = {
35
+ request: {
36
+ baseURL: '={{$credentials?.domain}}',
37
+ url: '/bearer',
38
+ },
39
+ };
40
+ }
41
+ }
42
+ exports.HttpBinApi = HttpBinApi;
43
+ //# sourceMappingURL=HttpBinApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpBinApi.credentials.js","sourceRoot":"","sources":["../../credentials/HttpBinApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,UAAU;IAAvB;QACC,SAAI,GAAG,YAAY,CAAC;QACpB,gBAAW,GAAG,aAAa,CAAC;QAC5B,qBAAgB,GAAG,uBAAuB,CAAC;QAC3C,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;aACD;YACD;gBACC,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,qBAAqB;aAC9B;SACD,CAAC;QAMF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,qCAAqC;iBACpD;aACD;SACD,CAAC;QAGF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,2BAA2B;gBACpC,GAAG,EAAE,SAAS;aACd;SACD,CAAC;IACH,CAAC;CAAA;AA1CD,gCA0CC"}
@@ -0,0 +1,32 @@
1
+ import { ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class MetricoolApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: {
8
+ type: "generic";
9
+ properties: {
10
+ headers: {
11
+ 'X-Auth-Token': string;
12
+ 'X-Auth-UserId': string;
13
+ };
14
+ };
15
+ };
16
+ test: {
17
+ request: {
18
+ baseURL: string;
19
+ url: string;
20
+ method: "GET";
21
+ };
22
+ rules: {
23
+ type: "responseSuccessBody";
24
+ properties: {
25
+ message: string;
26
+ key: string;
27
+ value: string;
28
+ };
29
+ }[];
30
+ };
31
+ }
32
+ //# sourceMappingURL=MetricoolApi.credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetricoolApi.credentials.d.ts","sourceRoot":"","sources":["../../credentials/MetricoolApi.credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,eAAe,EAClB,MAAM,cAAc,CAAC;AAEtB,qBAAa,YAAa,YAAW,eAAe;IAChD,IAAI,SAAkB;IACtB,WAAW,SAAmB;IAC9B,gBAAgB,SAAqC;IACrD,UAAU,EAAE,eAAe,EAAE,CAoB3B;IACF,YAAY;;;;;;;;MAQV;IACF,IAAI;;;;;;;;;;;;;;MAgBF;CACL"}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MetricoolApi = void 0;
4
+ class MetricoolApi {
5
+ constructor() {
6
+ this.name = 'metricoolApi';
7
+ this.displayName = 'Metricool API';
8
+ this.documentationUrl = 'https://metricool.com/api-docs/';
9
+ this.properties = [
10
+ {
11
+ displayName: 'User Token',
12
+ name: 'userToken',
13
+ type: 'string',
14
+ default: '',
15
+ required: true,
16
+ typeOptions: {
17
+ password: true,
18
+ },
19
+ description: 'The Metricool API user token found in your account settings under API section',
20
+ },
21
+ {
22
+ displayName: 'User ID',
23
+ name: 'userId',
24
+ type: 'string',
25
+ default: '',
26
+ required: true,
27
+ description: 'The Metricool API user ID found in your account settings under API section',
28
+ },
29
+ ];
30
+ this.authenticate = {
31
+ type: 'generic',
32
+ properties: {
33
+ headers: {
34
+ 'X-Auth-Token': '={{$credentials.userToken}}',
35
+ 'X-Auth-UserId': '={{$credentials.userId}}',
36
+ },
37
+ },
38
+ };
39
+ this.test = {
40
+ request: {
41
+ baseURL: 'https://api.metricool.com/v1',
42
+ url: '/brands',
43
+ method: 'GET',
44
+ },
45
+ rules: [
46
+ {
47
+ type: 'responseSuccessBody',
48
+ properties: {
49
+ message: 'API credentials are valid',
50
+ key: 'brands.data',
51
+ value: 'array',
52
+ },
53
+ },
54
+ ],
55
+ };
56
+ }
57
+ }
58
+ exports.MetricoolApi = MetricoolApi;
59
+ //# sourceMappingURL=MetricoolApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MetricoolApi.credentials.js","sourceRoot":"","sources":["../../credentials/MetricoolApi.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,YAAY;IAAzB;QACI,SAAI,GAAG,cAAc,CAAC;QACtB,gBAAW,GAAG,eAAe,CAAC;QAC9B,qBAAgB,GAAG,iCAAiC,CAAC;QACrD,eAAU,GAAsB;YAC5B;gBACI,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE;oBACT,QAAQ,EAAE,IAAI;iBACjB;gBACD,WAAW,EAAE,+EAA+E;aAC/F;YACD;gBACI,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,4EAA4E;aAC5F;SACJ,CAAC;QACF,iBAAY,GAAG;YACX,IAAI,EAAE,SAAkB;YACxB,UAAU,EAAE;gBACR,OAAO,EAAE;oBACL,cAAc,EAAE,6BAA6B;oBAC7C,eAAe,EAAE,0BAA0B;iBAC9C;aACJ;SACJ,CAAC;QACF,SAAI,GAAG;YACH,OAAO,EAAE;gBACL,OAAO,EAAE,8BAA8B;gBACvC,GAAG,EAAE,SAAS;gBACd,MAAM,EAAE,KAAc;aACzB;YACD,KAAK,EAAE;gBACH;oBACI,IAAI,EAAE,qBAA8B;oBACpC,UAAU,EAAE;wBACR,OAAO,EAAE,2BAA2B;wBACpC,GAAG,EAAE,aAAa;wBAClB,KAAK,EAAE,OAAO;qBACjB;iBACJ;aACJ;SACJ,CAAC;IACN,CAAC;CAAA;AAnDD,oCAmDC"}
@@ -0,0 +1,5 @@
1
+ import type { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class ExampleNode implements INodeType {
3
+ description: INodeTypeDescription;
4
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
+ }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExampleNode = void 0;
4
+ const n8n_workflow_1 = require("n8n-workflow");
5
+ class ExampleNode {
6
+ constructor() {
7
+ this.description = {
8
+ displayName: 'Example Node',
9
+ name: 'exampleNode',
10
+ group: ['transform'],
11
+ version: 1,
12
+ description: 'Basic Example Node',
13
+ defaults: {
14
+ name: 'Example Node',
15
+ },
16
+ inputs: ["main"],
17
+ outputs: ["main"],
18
+ usableAsTool: true,
19
+ properties: [
20
+ {
21
+ displayName: 'My String',
22
+ name: 'myString',
23
+ type: 'string',
24
+ default: '',
25
+ placeholder: 'Placeholder value',
26
+ description: 'The description text',
27
+ },
28
+ ],
29
+ };
30
+ }
31
+ async execute() {
32
+ const items = this.getInputData();
33
+ let item;
34
+ let myString;
35
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
36
+ try {
37
+ myString = this.getNodeParameter('myString', itemIndex, '');
38
+ item = items[itemIndex];
39
+ item.json.myString = myString;
40
+ }
41
+ catch (error) {
42
+ if (this.continueOnFail()) {
43
+ items.push({ json: this.getInputData(itemIndex)[0].json, error, pairedItem: itemIndex });
44
+ }
45
+ else {
46
+ if (error.context) {
47
+ error.context.itemIndex = itemIndex;
48
+ throw error;
49
+ }
50
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, {
51
+ itemIndex,
52
+ });
53
+ }
54
+ }
55
+ }
56
+ return [items];
57
+ }
58
+ }
59
+ exports.ExampleNode = ExampleNode;
60
+ //# sourceMappingURL=ExampleNode.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExampleNode.node.js","sourceRoot":"","sources":["../../../nodes/ExampleNode/ExampleNode.node.ts"],"names":[],"mappings":";;;AAMA,+CAAsE;AAEtE,MAAa,WAAW;IAAxB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,cAAc;YAC3B,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE;gBACT,IAAI,EAAE,cAAc;aACpB;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,YAAY,EAAE,IAAI;YAClB,UAAU,EAAE;gBAGX;oBACC,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,mBAAmB;oBAChC,WAAW,EAAE,sBAAsB;iBACnC;aACD;SACD,CAAC;IA2CH,CAAC;IArCA,KAAK,CAAC,OAAO;QACZ,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAElC,IAAI,IAAwB,CAAC;QAC7B,IAAI,QAAgB,CAAC;QAKrB,KAAK,IAAI,SAAS,GAAG,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,EAAE,CAAC;YAC/D,IAAI,CAAC;gBACJ,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,CAAW,CAAC;gBACtE,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;gBAExB,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC/B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAGhB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;gBAC1F,CAAC;qBAAM,CAAC;oBAEP,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;wBAGnB,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;wBACpC,MAAM,KAAK,CAAC;oBACb,CAAC;oBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE;wBACnD,SAAS;qBACT,CAAC,CAAC;gBACJ,CAAC;YACF,CAAC;QACF,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,CAAC;IAChB,CAAC;CACD;AApED,kCAoEC"}
@@ -0,0 +1,4 @@
1
+ import { INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class HttpBin implements INodeType {
3
+ description: INodeTypeDescription;
4
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpBin = void 0;
4
+ const HttpVerbDescription_1 = require("./HttpVerbDescription");
5
+ class HttpBin {
6
+ constructor() {
7
+ this.description = {
8
+ displayName: 'HttpBin',
9
+ name: 'httpBin',
10
+ icon: { light: 'file:httpbin.svg', dark: 'file:httpbin.svg' },
11
+ group: ['transform'],
12
+ version: 1,
13
+ subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
14
+ description: 'Interact with HttpBin API',
15
+ defaults: {
16
+ name: 'HttpBin',
17
+ },
18
+ inputs: ["main"],
19
+ outputs: ["main"],
20
+ usableAsTool: true,
21
+ credentials: [
22
+ {
23
+ name: 'httpbinApi',
24
+ required: false,
25
+ },
26
+ ],
27
+ requestDefaults: {
28
+ baseURL: 'https://httpbin.org',
29
+ url: '',
30
+ headers: {
31
+ Accept: 'application/json',
32
+ 'Content-Type': 'application/json',
33
+ },
34
+ },
35
+ properties: [
36
+ {
37
+ displayName: 'Resource',
38
+ name: 'resource',
39
+ type: 'options',
40
+ noDataExpression: true,
41
+ options: [
42
+ {
43
+ name: 'HTTP Verb',
44
+ value: 'httpVerb',
45
+ },
46
+ ],
47
+ default: 'httpVerb',
48
+ },
49
+ ...HttpVerbDescription_1.httpVerbOperations,
50
+ ...HttpVerbDescription_1.httpVerbFields,
51
+ ],
52
+ };
53
+ }
54
+ }
55
+ exports.HttpBin = HttpBin;
56
+ //# sourceMappingURL=HttpBin.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpBin.node.js","sourceRoot":"","sources":["../../../nodes/HttpBin/HttpBin.node.ts"],"names":[],"mappings":";;;AACA,+DAA2E;AAE3E,MAAa,OAAO;IAApB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,kBAAkB,EAAE;YAC7D,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;aACf;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,YAAY;oBAClB,QAAQ,EAAE,KAAK;iBACf;aACD;YACD,eAAe,EAAE;gBAChB,OAAO,EAAE,qBAAqB;gBAC9B,GAAG,EAAE,EAAE;gBACP,OAAO,EAAE;oBACR,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBAClC;aACD;YAYD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,WAAW;4BACjB,KAAK,EAAE,UAAU;yBACjB;qBACD;oBACD,OAAO,EAAE,UAAU;iBACnB;gBAED,GAAG,wCAAkB;gBACrB,GAAG,oCAAc;aACjB;SACD,CAAC;IACH,CAAC;CAAA;AA3DD,0BA2DC"}
@@ -0,0 +1,18 @@
1
+ {
2
+ "node": "n8n-nodes-base.httpbin",
3
+ "nodeVersion": "1.0",
4
+ "codexVersion": "1.0",
5
+ "categories": ["Development", "Developer Tools"],
6
+ "resources": {
7
+ "credentialDocumentation": [
8
+ {
9
+ "url": "http://httpbin.org/#/Auth/get_bearer"
10
+ }
11
+ ],
12
+ "primaryDocumentation": [
13
+ {
14
+ "url": "http://httpbin.org/"
15
+ }
16
+ ]
17
+ }
18
+ }
@@ -0,0 +1,3 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ export declare const httpVerbOperations: INodeProperties[];
3
+ export declare const httpVerbFields: INodeProperties[];