n8n-nodes-openapi-compatible 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 (49) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +62 -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/OpenApi.credentials.d.ts +14 -0
  10. package/dist/credentials/OpenApi.credentials.js +71 -0
  11. package/dist/credentials/OpenApi.credentials.js.map +1 -0
  12. package/dist/nodes/ExampleNode/ExampleNode.node.d.ts +5 -0
  13. package/dist/nodes/ExampleNode/ExampleNode.node.js +59 -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/OpenAPINode/OpenAPIDescription.d.ts +3 -0
  23. package/dist/nodes/OpenAPINode/OpenAPIDescription.js +145 -0
  24. package/dist/nodes/OpenAPINode/OpenAPIDescription.js.map +1 -0
  25. package/dist/nodes/OpenAPINode/OpenAPIHelper.d.ts +3 -0
  26. package/dist/nodes/OpenAPINode/OpenAPIHelper.js +79 -0
  27. package/dist/nodes/OpenAPINode/OpenAPIHelper.js.map +1 -0
  28. package/dist/nodes/OpenAPINode/OpenAPINode.node.d.ts +10 -0
  29. package/dist/nodes/OpenAPINode/OpenAPINode.node.js +117 -0
  30. package/dist/nodes/OpenAPINode/OpenAPINode.node.js.map +1 -0
  31. package/dist/nodes/OpenAPINode/OpenApi.credentials.d.ts +14 -0
  32. package/dist/nodes/OpenAPINode/OpenApi.credentials.js +71 -0
  33. package/dist/nodes/OpenAPINode/OpenApi.credentials.js.map +1 -0
  34. package/dist/nodes/OpenAPINode/OpenApi.svg +0 -0
  35. package/dist/nodes/OpenAPINode/OpenApiDescription.d.ts +3 -0
  36. package/dist/nodes/OpenAPINode/OpenApiDescription.js +145 -0
  37. package/dist/nodes/OpenAPINode/OpenApiDescription.js.map +1 -0
  38. package/dist/nodes/OpenAPINode/OpenApiHelper.d.ts +3 -0
  39. package/dist/nodes/OpenAPINode/OpenApiHelper.js +156 -0
  40. package/dist/nodes/OpenAPINode/OpenApiHelper.js.map +1 -0
  41. package/dist/nodes/OpenAPINode/OpenApiNode.node.d.ts +10 -0
  42. package/dist/nodes/OpenAPINode/OpenApiNode.node.js +157 -0
  43. package/dist/nodes/OpenAPINode/OpenApiNode.node.js.map +1 -0
  44. package/dist/nodes/OpenAPINode/openapi.png +0 -0
  45. package/dist/nodes/OpenAPINode/openapi.svg +20 -0
  46. package/dist/package.json +67 -0
  47. package/dist/tsconfig.tsbuildinfo +1 -0
  48. package/index.js +0 -0
  49. package/package.json +65 -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,62 @@
1
+ # n8n-nodes-_node-name_
2
+
3
+ This is an n8n community node. It lets you use Swagger/OpenAPI capable endpoints in your n8n workflows.
4
+
5
+ @kphillipsjr1101/n8n-nodes-openapi-compatible is a community node for [n8n](https://n8n.io/). It lets you use Swagger/OpenAPI capable endpoints in your n8n workflows. 🚀
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) <!-- delete if no auth needed -->
12
+ [Compatibility](#compatibility)
13
+ [Usage](#usage) <!-- delete if not using this section -->
14
+ [Resources](#resources)
15
+ [Version history](#version-history) <!-- delete if not using this section -->
16
+
17
+ ## Installation
18
+
19
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
20
+
21
+ ## Operations
22
+
23
+ Operations are queried dynamically from the remote Swagger/OpenAPI endpoint. The available operations are determined by the endpoint's schema.
24
+
25
+ ## Credentials
26
+
27
+ Credentials are ✨ _optional_ ✨. You can use them to authenticate with the remote endpoint. Only some basic types of authentication are supported at this time. You will need to work around this limitation for authentication like OAuth2.
28
+
29
+ When you create the credentials, it will ask you for the value of the authentication type you're using. Fill out the fields where appropriate. If you're not sure, you don't have to add a credential here. You can just add the values directly to the headers or query parameters in the node. Just make sure to refer to the documentation of the endpoint you're using. 📑
30
+ ![image](https://github.com/user-attachments/assets/2cb27b3a-5e03-4bdd-ad9f-52de6dd8f803)
31
+
32
+
33
+ ## Compatibility
34
+
35
+ This node was tested with the following n8n version:
36
+ 1.83.2
37
+
38
+ ## Usage
39
+
40
+ Should be relatively self explanatory once you've added the node to your flow. Fill out the fields as needed. If you're not sure what to put in a field, refer to the documentation of the endpoint you're using. 📑
41
+
42
+ ![image](https://github.com/user-attachments/assets/44454deb-1613-4a5f-9873-6f77d71458fa)
43
+
44
+ In some cases a remote endpoint may not provide a baseUrl or you may want to develop and test against a different environment. You can set the baseUrl in the node settings. This will override the baseUrl provided by the remote endpoint.
45
+ Once you have filled out the spec URL, on operations you can click the dots and refresh to get a dynamic list of valid API endpoints from the spec.
46
+
47
+ ![image](https://github.com/user-attachments/assets/59dc9389-266a-4fb3-ab3a-90e3afb61b9a)
48
+
49
+
50
+ This does not currently populate the parameters for the operation, so you will need to refer to the documentation of the endpoint you're using to know what parameters are required. This was just a quick handjam to get something working. I will be adding more features as I have time. Feel free to contribute!
51
+
52
+ ## Resources
53
+
54
+ * [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
55
+ * [n8n.io](https://n8n.io/)
56
+ * [n8n-node-openapi-compatible](https://github.com/kphillipsjr1101/n8n-nodes-openapi-compatible)
57
+ * [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification)
58
+
59
+ ## Version history
60
+
61
+ * 0.1.0
62
+ * Initial release
@@ -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;QACC,SAAI,GAAG,uBAAuB,CAAC;QAC/B,gBAAW,GAAG,yBAAyB,CAAC;QACxC,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;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;QACC,SAAI,GAAG,YAAY,CAAC;QACpB,gBAAW,GAAG,aAAa,CAAC;QAC5B,qBAAgB,GAAG,iBAAiB,CAAC;QACrC,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,14 @@
1
+ import { IAuthenticateGeneric, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class OpenApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: {
9
+ request: {
10
+ baseURL: string;
11
+ url: string;
12
+ };
13
+ };
14
+ }
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OpenApi = void 0;
4
+ class OpenApi {
5
+ constructor() {
6
+ this.name = 'openApi';
7
+ this.displayName = 'OpenAPI Auth API';
8
+ this.documentationUrl = 'https://docs.n8n.io/integrations/creating-nodes/build/credentials/';
9
+ this.properties = [
10
+ {
11
+ displayName: 'API Key Name',
12
+ name: 'apiKeyName',
13
+ type: 'string',
14
+ typeOptions: {
15
+ password: true,
16
+ },
17
+ default: 'X-API-Key',
18
+ description: 'Name of the API key header or query parameter',
19
+ },
20
+ {
21
+ displayName: 'API Key',
22
+ name: 'apiKey',
23
+ type: 'string',
24
+ typeOptions: {
25
+ password: true,
26
+ },
27
+ default: '',
28
+ description: 'The API key value',
29
+ },
30
+ {
31
+ displayName: 'Username',
32
+ name: 'username',
33
+ type: 'string',
34
+ default: '',
35
+ description: 'Username for Basic Authentication',
36
+ },
37
+ {
38
+ displayName: 'Password',
39
+ name: 'password',
40
+ type: 'string',
41
+ typeOptions: {
42
+ password: true,
43
+ },
44
+ default: '',
45
+ description: 'Password for Basic Authentication',
46
+ },
47
+ {
48
+ displayName: 'Token',
49
+ name: 'token',
50
+ type: 'string',
51
+ typeOptions: {
52
+ password: true,
53
+ },
54
+ default: '',
55
+ description: 'Bearer token for Authentication',
56
+ },
57
+ ];
58
+ this.authenticate = {
59
+ type: 'generic',
60
+ properties: {},
61
+ };
62
+ this.test = {
63
+ request: {
64
+ baseURL: '={{$credentials.url}}',
65
+ url: '/',
66
+ },
67
+ };
68
+ }
69
+ }
70
+ exports.OpenApi = OpenApi;
71
+ //# sourceMappingURL=OpenApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OpenApi.credentials.js","sourceRoot":"","sources":["../../credentials/OpenApi.credentials.ts"],"names":[],"mappings":";;;AAMA,MAAa,OAAO;IAApB;QACC,SAAI,GAAG,SAAS,CAAC;QACjB,gBAAW,GAAG,kBAAkB,CAAC;QACjC,qBAAgB,GAAG,oEAAoE,CAAC;QAGxF,eAAU,GAAsB;YAE/B;gBACC,WAAW,EAAE,cAAc;gBAC3B,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,WAAW;gBACpB,WAAW,EAAE,+CAA+C;aAC5D;YACD;gBACC,WAAW,EAAE,SAAS;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,mBAAmB;aAChC;YAGD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,mCAAmC;aAChD;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;gBACX,WAAW,EAAE,mCAAmC;aAChD;YAGD;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,iCAAiC;aAC9C;SACD,CAAC;QAGF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,EAGX;SACD,CAAC;QAGF,SAAI,GAAmD;YACtD,OAAO,EAAE;gBACR,OAAO,EAAE,uBAAuB;gBAChC,GAAG,EAAE,GAAG;aACR;SACD,CAAC;IACH,CAAC;CAAA;AA7ED,0BA6EC"}
@@ -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,59 @@
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({ json: this.getInputData(itemIndex)[0].json, error, pairedItem: itemIndex });
43
+ }
44
+ else {
45
+ if (error.context) {
46
+ error.context.itemIndex = itemIndex;
47
+ throw error;
48
+ }
49
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, {
50
+ itemIndex,
51
+ });
52
+ }
53
+ }
54
+ }
55
+ return [items];
56
+ }
57
+ }
58
+ exports.ExampleNode = ExampleNode;
59
+ //# 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,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;AAnED,kCAmEC"}
@@ -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":";;;AACA,+DAA2E;AAE3E,MAAa,OAAO;IAApB;QACC,gBAAW,GAAyB;YACnC,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;gBACT,IAAI,EAAE,SAAS;aACf;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,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;AA1DD,0BA0DC"}
@@ -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[];