n8n-nodes-confirm8 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +5 -0
- package/dist/credentials/ApiCustomCredentials.credentials.d.ts +9 -0
- package/dist/credentials/ApiCustomCredentials.credentials.js +66 -0
- package/dist/credentials/index.d.ts +1 -0
- package/dist/credentials/index.js +17 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -0
- package/dist/nodes/ApiCustom/ApiAgentNode.node.d.ts +9 -0
- package/dist/nodes/ApiCustom/ApiAgentNode.node.js +599 -0
- package/dist/nodes/ApiCustom/ApiAgentTool.node.d.ts +19 -0
- package/dist/nodes/ApiCustom/ApiAgentTool.node.js +170 -0
- package/dist/nodes/ApiCustom/ApiCustom.node.d.ts +5 -0
- package/dist/nodes/ApiCustom/ApiCustom.node.js +973 -0
- package/dist/nodes/RegularNode.js +2 -1
- package/dist/nodes/index.d.ts +3 -0
- package/dist/nodes/index.js +19 -0
- package/package.json +32 -14
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ICredentialType, INodeProperties, ICredentialTestRequest, IHttpRequestOptions, ICredentialDataDecryptedObject } from "n8n-workflow";
|
|
2
|
+
export declare class ApiCustomCredentials implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
properties: INodeProperties[];
|
|
7
|
+
test: ICredentialTestRequest;
|
|
8
|
+
authenticate(credentials: ICredentialDataDecryptedObject, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApiCustomCredentials = void 0;
|
|
4
|
+
class ApiCustomCredentials {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = "apiCustomCredentials";
|
|
7
|
+
this.displayName = "Custom API Credentials";
|
|
8
|
+
this.documentationUrl = "https://your-api-documentation-url.com";
|
|
9
|
+
this.properties = [
|
|
10
|
+
{
|
|
11
|
+
displayName: "Base URL",
|
|
12
|
+
name: "baseUrl",
|
|
13
|
+
type: "string",
|
|
14
|
+
default: "",
|
|
15
|
+
placeholder: "https://api.example.com",
|
|
16
|
+
required: true,
|
|
17
|
+
description: "The base URL of your API endpoint (without trailing slash)",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: "Bearer Token",
|
|
21
|
+
name: "bearerToken",
|
|
22
|
+
type: "string",
|
|
23
|
+
typeOptions: { password: true },
|
|
24
|
+
default: "",
|
|
25
|
+
required: true,
|
|
26
|
+
description: "Bearer token for Authorization header",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
displayName: "X-API-DOMAIN",
|
|
30
|
+
name: "apiDomain",
|
|
31
|
+
type: "string",
|
|
32
|
+
default: "",
|
|
33
|
+
required: true,
|
|
34
|
+
description: "Value for X-API-DOMAIN header",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
displayName: "X-APIKEY-TOKEN",
|
|
38
|
+
name: "apiKeyToken",
|
|
39
|
+
type: "string",
|
|
40
|
+
typeOptions: { password: true },
|
|
41
|
+
default: "",
|
|
42
|
+
required: true,
|
|
43
|
+
description: "Value for X-APIKEY-TOKEN header",
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
// Used by the UI "Test" button
|
|
47
|
+
this.test = {
|
|
48
|
+
request: {
|
|
49
|
+
baseURL: "={{$credentials.baseUrl}}",
|
|
50
|
+
url: "/health",
|
|
51
|
+
method: "GET",
|
|
52
|
+
headers: {
|
|
53
|
+
Authorization: '={{"Bearer " + $credentials.bearerToken}}',
|
|
54
|
+
"X-API-DOMAIN": "={{$credentials.apiDomain}}",
|
|
55
|
+
"X-APIKEY-TOKEN": "={{$credentials.apiKeyToken}}",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
async authenticate(credentials, requestOptions) {
|
|
61
|
+
requestOptions.headers = requestOptions.headers || {};
|
|
62
|
+
requestOptions.headers.Authorization = `Bearer ${credentials.apiKey}`;
|
|
63
|
+
return requestOptions;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.ApiCustomCredentials = ApiCustomCredentials;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ApiCustomCredentials.credentials';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ApiCustomCredentials.credentials"), exports);
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ApiCustomNode } from './nodes/ApiCustom/ApiCustom.node';
|
|
2
|
+
import { ApiCustomCredentials } from './credentials/ApiCustomCredentials.credentials';
|
|
3
|
+
export declare const nodes: (typeof ApiCustomNode)[];
|
|
4
|
+
export declare const credentials: (typeof ApiCustomCredentials)[];
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.credentials = exports.nodes = void 0;
|
|
4
|
+
const ApiCustom_node_1 = require("./nodes/ApiCustom/ApiCustom.node");
|
|
5
|
+
const ApiAgentNode_node_1 = require("./nodes/ApiCustom/ApiAgentNode.node");
|
|
6
|
+
const ApiAgentTool_node_1 = require("./nodes/ApiCustom/ApiAgentTool.node");
|
|
7
|
+
const ApiCustomCredentials_credentials_1 = require("./credentials/ApiCustomCredentials.credentials");
|
|
8
|
+
exports.nodes = [ApiCustom_node_1.ApiCustomNode, ApiAgentNode_node_1.ApiAgentNode, ApiAgentTool_node_1.ApiAgentTool];
|
|
9
|
+
exports.credentials = [ApiCustomCredentials_credentials_1.ApiCustomCredentials];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, IDataObject } from 'n8n-workflow';
|
|
2
|
+
export declare class ApiAgentNode implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
5
|
+
executeSimpleMode(itemIndex: number, baseUrl: string, customHeaders: IDataObject, options: IDataObject, executeFunctions: IExecuteFunctions): Promise<IDataObject>;
|
|
6
|
+
executeAdvancedMode(itemIndex: number, baseUrl: string, customHeaders: IDataObject, options: IDataObject, executeFunctions: IExecuteFunctions): Promise<IDataObject>;
|
|
7
|
+
executeBatchMode(itemIndex: number, baseUrl: string, customHeaders: IDataObject, options: IDataObject, executeFunctions: IExecuteFunctions): Promise<IDataObject[]>;
|
|
8
|
+
makeRequest(baseUrl: string, endpoint: string, method: string, body: IDataObject, queryParams: IDataObject, customHeaders: IDataObject, options: IDataObject, executeFunctions: IExecuteFunctions): Promise<IDataObject>;
|
|
9
|
+
}
|