n8n-nodes-quipu 0.1.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 (40) hide show
  1. package/LICENSE.md +18 -0
  2. package/README.md +176 -0
  3. package/dist/credentials/ExampleCredentialsApi.credentials.d.ts +8 -0
  4. package/dist/credentials/ExampleCredentialsApi.credentials.js +46 -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/QuipuApi.credentials.d.ts +9 -0
  10. package/dist/credentials/QuipuApi.credentials.js +75 -0
  11. package/dist/credentials/QuipuApi.credentials.js.map +1 -0
  12. package/dist/nodes/ExampleNode/ExampleNode.node.d.ts +5 -0
  13. package/dist/nodes/ExampleNode/ExampleNode.node.js +63 -0
  14. package/dist/nodes/ExampleNode/ExampleNode.node.js.map +1 -0
  15. package/dist/nodes/HttpBin/HttpBin.node.d.ts +4 -0
  16. package/dist/nodes/HttpBin/HttpBin.node.js +55 -0
  17. package/dist/nodes/HttpBin/HttpBin.node.js.map +1 -0
  18. package/dist/nodes/HttpBin/HttpBin.node.json +18 -0
  19. package/dist/nodes/HttpBin/HttpVerbDescription.d.ts +3 -0
  20. package/dist/nodes/HttpBin/HttpVerbDescription.js +234 -0
  21. package/dist/nodes/HttpBin/HttpVerbDescription.js.map +1 -0
  22. package/dist/nodes/HttpBin/httpbin.svg +18 -0
  23. package/dist/nodes/Quipu/HttpBin.node.d.ts +4 -0
  24. package/dist/nodes/Quipu/HttpBin.node.js +76 -0
  25. package/dist/nodes/Quipu/HttpBin.node.js.map +1 -0
  26. package/dist/nodes/Quipu/HttpBin.node.json +19 -0
  27. package/dist/nodes/Quipu/HttpVerbDescription.d.ts +3 -0
  28. package/dist/nodes/Quipu/HttpVerbDescription.js +234 -0
  29. package/dist/nodes/Quipu/HttpVerbDescription.js.map +1 -0
  30. package/dist/nodes/Quipu/Quipu.node.d.ts +4 -0
  31. package/dist/nodes/Quipu/Quipu.node.js +76 -0
  32. package/dist/nodes/Quipu/Quipu.node.js.map +1 -0
  33. package/dist/nodes/Quipu/Quipu.node.json +19 -0
  34. package/dist/nodes/Quipu/httpbin.svg +18 -0
  35. package/dist/nodes/Quipu/openapi.json +3147 -0
  36. package/dist/nodes/Quipu/quipu.svg +18 -0
  37. package/dist/package.json +57 -0
  38. package/dist/tsconfig.tsbuildinfo +1 -0
  39. package/index.js +0 -0
  40. package/package.json +56 -0
package/LICENSE.md ADDED
@@ -0,0 +1,18 @@
1
+ Copyright 2025 Aldo Borrero
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 of
7
+ the Software, and to permit persons to whom the Software is furnished to do so,
8
+ 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, FITNESS
15
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,176 @@
1
+ <div align="center">
2
+
3
+ # n8n-nodes-quipu
4
+
5
+ **Quipu integration for n8n - invoice and taxes software for freelancers and
6
+ companies**
7
+
8
+ <p>
9
+ <img alt="Static Badge" src="https://img.shields.io/badge/Status-experimental-orange" />
10
+ </p>
11
+
12
+ </div>
13
+
14
+ This is an n8n community node. It lets you use Quipu in your n8n workflows.
15
+
16
+ Quipu is an invoice and taxes software as a service for freelancers and
17
+ companies that helps you manage accounting, invoicing, and tax filing in one
18
+ place.
19
+
20
+ [n8n](https://n8n.io/) is a
21
+ [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation
22
+ platform.
23
+
24
+ [Installation](#installation) [Operations](#operations)
25
+ [Credentials](#credentials) [Compatibility](#compatibility)
26
+ [Development](#development) [Resources](#resources)
27
+
28
+ ## Installation
29
+
30
+ Follow the
31
+ [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/)
32
+ in the n8n community nodes documentation.
33
+
34
+ ```bash
35
+ npm install n8n-nodes-quipu
36
+ ```
37
+
38
+ ## Operations
39
+
40
+ This node supports the following Quipu API operations:
41
+
42
+ ### Contacts
43
+
44
+ - Get all contacts
45
+ - Get a contact by ID
46
+ - Create a new contact
47
+ - Update a contact
48
+ - Delete a contact
49
+
50
+ ### Invoices
51
+
52
+ - Get all invoices
53
+ - Get an invoice by ID
54
+ - Create a new invoice
55
+ - Update an invoice
56
+ - Delete an invoice
57
+
58
+ ### Tickets
59
+
60
+ - Get all tickets
61
+ - Get a ticket by ID
62
+ - Create a new ticket
63
+ - Update a ticket
64
+ - Delete a ticket
65
+
66
+ ### Paysheets
67
+
68
+ - Get all paysheets
69
+ - Get a paysheet by ID
70
+ - Create a new paysheet
71
+ - Update a paysheet
72
+ - Delete a paysheet
73
+
74
+ ### Other Operations
75
+
76
+ - Get all book entries
77
+ - Get all accounting categories and subcategories
78
+ - Manage numbering series for invoices and tickets
79
+ - Upload and manage attachments
80
+
81
+ ## Credentials
82
+
83
+ You need to obtain OAuth2 credentials from Quipu to authenticate with the API.
84
+
85
+ ### Prerequisites
86
+
87
+ 1. Sign up for a Quipu account at [getquipu.com](https://getquipu.com/)
88
+ 2. [Enable API](https://getquipu.com/d/aldoborrero/integrations)
89
+ 3. Generate the credentials
90
+
91
+ ### Setting up credentials in n8n
92
+
93
+ 1. Open your n8n workflow
94
+ 2. Click on the Quipu node
95
+ 3. Click on _Create new credential_
96
+ 4. Enter your Client ID and Client Secret
97
+ 5. Click _Save_
98
+
99
+ The node automatically handles token generation and renewal using the OAuth2
100
+ client credentials flow.
101
+
102
+ ## Compatibility
103
+
104
+ This node has been tested with n8n version 1.0+ and Quipu API v1.
105
+
106
+ ## Development
107
+
108
+ ### Standard Development
109
+
110
+ If you want to contribute to this node, you can set up your development
111
+ environment as follows:
112
+
113
+ ```bash
114
+ # Clone the repository
115
+ git clone https://github.com/aldoborrero/n8n-nodes-quipu.git
116
+ cd n8n-nodes-quipu
117
+
118
+ # Install dependencies
119
+ npm install
120
+
121
+ # Build the node
122
+ npm run build
123
+
124
+ # Run in development mode
125
+ npm run dev
126
+ ```
127
+
128
+ ### Development with Nix
129
+
130
+ This project provides a Nix flake for a reproducible development environment.
131
+
132
+ #### Prerequisites
133
+
134
+ - [Nix package manager](https://nixos.org/download.html) installed on your
135
+ system
136
+ - [direnv](https://direnv.net/) (optional but recommended)
137
+
138
+ #### Setup with direnv
139
+
140
+ If you have direnv installed and configured, simply clone the repository and
141
+ enter the directory:
142
+
143
+ ```bash
144
+ git clone https://github.com/aldoborrero/n8n-nodes-quipu.git
145
+ cd n8n-nodes-quipu
146
+ direnv allow
147
+ ```
148
+
149
+ This will automatically set up your development environment based on the flake.
150
+
151
+ #### Manual Nix Shell
152
+
153
+ If you don't use direnv, you can manually enter the development environment:
154
+
155
+ ```bash
156
+ nix develop
157
+ ```
158
+
159
+ You can create a `.envrc.local` file for your personal environment
160
+ customizations. This file is gitignored and will be automatically loaded by
161
+ direnv.
162
+
163
+ ## Resources
164
+
165
+ - [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
166
+ - [Quipu API documentation](https://getquipu.com/en/integrations)
167
+ - [Quipu website](https://getquipu.com/)
168
+
169
+ ## Support
170
+
171
+ If you have any questions or issues with this node, please:
172
+
173
+ 1. Check the [n8n community forum](https://community.n8n.io/) for existing
174
+ solutions
175
+ 2. Open an issue on the
176
+ [GitHub repository](https://github.com/aldoborrero/n8n-nodes-quipu)
@@ -0,0 +1,8 @@
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from "n8n-workflow";
2
+ export declare class ExampleCredentialsApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ properties: INodeProperties[];
6
+ authenticate: IAuthenticateGeneric;
7
+ test: ICredentialTestRequest;
8
+ }
@@ -0,0 +1,46 @@
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.properties = [
9
+ {
10
+ displayName: "User Name",
11
+ name: "username",
12
+ type: "string",
13
+ default: "",
14
+ },
15
+ {
16
+ displayName: "Password",
17
+ name: "password",
18
+ type: "string",
19
+ typeOptions: {
20
+ password: true,
21
+ },
22
+ default: "",
23
+ },
24
+ ];
25
+ this.authenticate = {
26
+ type: "generic",
27
+ properties: {
28
+ auth: {
29
+ username: "={{ $credentials.username }}",
30
+ password: "={{ $credentials.password }}",
31
+ },
32
+ qs: {
33
+ n8n: "rocks",
34
+ },
35
+ },
36
+ };
37
+ this.test = {
38
+ request: {
39
+ baseURL: "https://example.com/",
40
+ url: "",
41
+ },
42
+ };
43
+ }
44
+ }
45
+ exports.ExampleCredentialsApi = ExampleCredentialsApi;
46
+ //# 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;QACE,SAAI,GAAG,uBAAuB,CAAC;QAC/B,gBAAW,GAAG,yBAAyB,CAAC;QACxC,eAAU,GAAsB;YAI9B;gBACE,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACZ;YACD;gBACE,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD,OAAO,EAAE,EAAE;aACZ;SACF,CAAC;QAKF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,QAAQ,EAAE,8BAA8B;oBACxC,QAAQ,EAAE,8BAA8B;iBACzC;gBACD,EAAE,EAAE;oBAEF,GAAG,EAAE,OAAO;iBACb;aACF;SACF,CAAC;QAGF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,sBAAsB;gBAC/B,GAAG,EAAE,EAAE;aACR;SACF,CAAC;IACJ,CAAC;CAAA;AAhDD,sDAgDC"}
@@ -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 = "<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;QACE,SAAI,GAAG,YAAY,CAAC;QACpB,gBAAW,GAAG,aAAa,CAAC;QAC5B,qBAAgB,GAAG,iBAAiB,CAAC;QACrC,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;aACF;YACD;gBACE,WAAW,EAAE,QAAQ;gBACrB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,qBAAqB;aAC/B;SACF,CAAC;QAMF,iBAAY,GAAyB;YACnC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,aAAa,EAAE,qCAAqC;iBACrD;aACF;SACF,CAAC;QAGF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,2BAA2B;gBACpC,GAAG,EAAE,SAAS;aACf;SACF,CAAC;IACJ,CAAC;CAAA;AA1CD,gCA0CC"}
@@ -0,0 +1,9 @@
1
+ import { ICredentialDataDecryptedObject, ICredentialType, IHttpRequestOptions, INodeProperties } from "n8n-workflow";
2
+ export declare class QuipuApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate(credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
8
+ getToken(credentials: ICredentialDataDecryptedObject): Promise<any>;
9
+ }
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QuipuApi = void 0;
4
+ class QuipuApi {
5
+ constructor() {
6
+ this.name = "quipuApi";
7
+ this.displayName = "Quipu API";
8
+ this.documentationUrl = "https://getquipu.com/en/integrations";
9
+ this.properties = [
10
+ {
11
+ displayName: "Client ID",
12
+ name: "clientId",
13
+ type: "string",
14
+ default: "",
15
+ },
16
+ {
17
+ displayName: "Client Secret",
18
+ name: "clientSecret",
19
+ type: "string",
20
+ default: "",
21
+ typeOptions: {
22
+ password: true,
23
+ },
24
+ },
25
+ {
26
+ displayName: "Environment",
27
+ name: "environment",
28
+ type: "options",
29
+ default: "production",
30
+ options: [
31
+ {
32
+ name: "Production",
33
+ value: "production",
34
+ },
35
+ ],
36
+ },
37
+ ];
38
+ }
39
+ async authenticate(credentials, requestOptions) {
40
+ const response = await this.getToken(credentials);
41
+ const { access_token } = response;
42
+ requestOptions.headers = {
43
+ ...requestOptions.headers,
44
+ Accept: "application/vnd.quipu.v1+json",
45
+ Authorization: `Bearer ${access_token}`,
46
+ };
47
+ return requestOptions;
48
+ }
49
+ async getToken(credentials) {
50
+ const { clientId, clientSecret } = credentials;
51
+ const baseUrl = "https://getquipu.com";
52
+ const options = {
53
+ headers: {
54
+ "Content-Type": "application/x-www-form-urlencoded",
55
+ },
56
+ method: "POST",
57
+ form: {
58
+ grant_type: "client_credentials",
59
+ scope: "ecommerce",
60
+ client_id: clientId,
61
+ client_secret: clientSecret,
62
+ },
63
+ uri: `${baseUrl}/oauth/token`,
64
+ json: true,
65
+ };
66
+ try {
67
+ return await this.helpers.request(options);
68
+ }
69
+ catch (error) {
70
+ throw new Error("Failed to get access token from Quipu API: " + error);
71
+ }
72
+ }
73
+ }
74
+ exports.QuipuApi = QuipuApi;
75
+ //# sourceMappingURL=QuipuApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuipuApi.credentials.js","sourceRoot":"","sources":["../../credentials/QuipuApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,QAAQ;IAArB;QACE,SAAI,GAAG,UAAU,CAAC;QAClB,gBAAW,GAAG,WAAW,CAAC;QAC1B,qBAAgB,GAAG,sCAAsC,CAAC;QAE1D,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACZ;YACD;gBACE,WAAW,EAAE,eAAe;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE;oBACX,QAAQ,EAAE,IAAI;iBACf;aACF;YACD;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,YAAY;gBACrB,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,YAAY;qBACpB;iBACF;aACF;SACF,CAAC;IA6CJ,CAAC;IA3CC,KAAK,CAAC,YAAY,CAChB,WAA2C,EAC3C,cAAmC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAClD,MAAM,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC;QAElC,cAAc,CAAC,OAAO,GAAG;YACvB,GAAG,cAAc,CAAC,OAAO;YACzB,MAAM,EAAE,+BAA+B;YACvC,aAAa,EAAE,UAAU,YAAY,EAAE;SACxC,CAAC;QAEF,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,WAA2C;QACxD,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,WAAW,CAAC;QAE/C,MAAM,OAAO,GAAG,sBAAsB,CAAC;QAEvC,MAAM,OAAO,GAAG;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,mCAAmC;aACpD;YACD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,UAAU,EAAE,oBAAoB;gBAChC,KAAK,EAAE,WAAW;gBAClB,SAAS,EAAE,QAAkB;gBAC7B,aAAa,EAAE,YAAsB;aACtC;YACD,GAAG,EAAE,GAAG,OAAO,cAAc;YAC7B,IAAI,EAAE,IAAI;SACX,CAAC;QAEF,IAAI,CAAC;YAEH,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,6CAA6C,GAAG,KAAK,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CACF;AA9ED,4BA8EC"}
@@ -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,63 @@
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
+ properties: [
19
+ {
20
+ displayName: "My String",
21
+ name: "myString",
22
+ type: "string",
23
+ default: "",
24
+ placeholder: "Placeholder value",
25
+ description: "The description text",
26
+ },
27
+ ],
28
+ };
29
+ }
30
+ async execute() {
31
+ const items = this.getInputData();
32
+ let item;
33
+ let myString;
34
+ for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
35
+ try {
36
+ myString = this.getNodeParameter("myString", itemIndex, "");
37
+ item = items[itemIndex];
38
+ item.json.myString = myString;
39
+ }
40
+ catch (error) {
41
+ if (this.continueOnFail()) {
42
+ items.push({
43
+ json: this.getInputData(itemIndex)[0].json,
44
+ error,
45
+ pairedItem: itemIndex,
46
+ });
47
+ }
48
+ else {
49
+ if (error.context) {
50
+ error.context.itemIndex = itemIndex;
51
+ throw error;
52
+ }
53
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, {
54
+ itemIndex,
55
+ });
56
+ }
57
+ }
58
+ }
59
+ return [items];
60
+ }
61
+ }
62
+ exports.ExampleNode = ExampleNode;
63
+ //# 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;QACE,gBAAW,GAAyB;YAClC,WAAW,EAAE,cAAc;YAC3B,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE;gBACR,IAAI,EAAE,cAAc;aACrB;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,UAAU,EAAE;gBAGV;oBACE,WAAW,EAAE,WAAW;oBACxB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,mBAAmB;oBAChC,WAAW,EAAE,sBAAsB;iBACpC;aACF;SACF,CAAC;IA+CJ,CAAC;IAzCC,KAAK,CAAC,OAAO;QACX,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;YAC9D,IAAI,CAAC;gBACH,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;YAChC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAGf,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;oBAC1B,KAAK,CAAC,IAAI,CAAC;wBACT,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI;wBAC1C,KAAK;wBACL,UAAU,EAAE,SAAS;qBACtB,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBAEN,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;wBAGlB,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC;wBACpC,MAAM,KAAK,CAAC;oBACd,CAAC;oBACD,MAAM,IAAI,iCAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE;wBAClD,SAAS;qBACV,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC;CACF;AAvED,kCAuEC"}
@@ -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,55 @@
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: "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
+ credentials: [
21
+ {
22
+ name: "httpbinApi",
23
+ required: false,
24
+ },
25
+ ],
26
+ requestDefaults: {
27
+ baseURL: "https://httpbin.org",
28
+ url: "",
29
+ headers: {
30
+ Accept: "application/json",
31
+ "Content-Type": "application/json",
32
+ },
33
+ },
34
+ properties: [
35
+ {
36
+ displayName: "Resource",
37
+ name: "resource",
38
+ type: "options",
39
+ noDataExpression: true,
40
+ options: [
41
+ {
42
+ name: "HTTP Verb",
43
+ value: "httpVerb",
44
+ },
45
+ ],
46
+ default: "httpVerb",
47
+ },
48
+ ...HttpVerbDescription_1.httpVerbOperations,
49
+ ...HttpVerbDescription_1.httpVerbFields,
50
+ ],
51
+ };
52
+ }
53
+ }
54
+ exports.HttpBin = HttpBin;
55
+ //# sourceMappingURL=HttpBin.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpBin.node.js","sourceRoot":"","sources":["../../../nodes/HttpBin/HttpBin.node.ts"],"names":[],"mappings":";;;AAKA,+DAA2E;AAE3E,MAAa,OAAO;IAApB;QACE,gBAAW,GAAyB;YAClC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,2BAA2B;YACxC,QAAQ,EAAE;gBACR,IAAI,EAAE,SAAS;aAChB;YACD,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACX;oBACE,IAAI,EAAE,YAAY;oBAClB,QAAQ,EAAE,KAAK;iBAChB;aACF;YACD,eAAe,EAAE;gBACf,OAAO,EAAE,qBAAqB;gBAC9B,GAAG,EAAE,EAAE;gBACP,OAAO,EAAE;oBACP,MAAM,EAAE,kBAAkB;oBAC1B,cAAc,EAAE,kBAAkB;iBACnC;aACF;YAWD,UAAU,EAAE;gBACV;oBACE,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,WAAW;4BACjB,KAAK,EAAE,UAAU;yBAClB;qBACF;oBACD,OAAO,EAAE,UAAU;iBACpB;gBAED,GAAG,wCAAkB;gBACrB,GAAG,oCAAc;aAClB;SACF,CAAC;IACJ,CAAC;CAAA;AAzDD,0BAyDC"}
@@ -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[];