n8n-nodes-vntana 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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 VNTANA
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,136 @@
1
+ # n8n-nodes-vntana
2
+
3
+ This is an n8n community node for [VNTANA](https://www.vntana.com/), a product content platform that automates and scales 3D content. It enables n8n workflows to interact with VNTANA's Admin API for automating workflows with 3D products, renders, and attachments.
4
+
5
+ [n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/reference/license/) workflow automation platform.
6
+
7
+ ## Installation
8
+
9
+ Follow the [installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) in the n8n community nodes documentation.
10
+
11
+ ### npm
12
+
13
+ ```bash
14
+ npm install n8n-nodes-vntana
15
+ ```
16
+
17
+ ### Manual Installation
18
+
19
+ 1. Clone or download this repository
20
+ 2. Run `npm install` and `npm run build`
21
+ 3. Link the package: `npm link`
22
+ 4. In your n8n custom nodes directory (`~/.n8n/custom`):
23
+ ```bash
24
+ npm init -y # if not already initialized
25
+ npm link n8n-nodes-vntana
26
+ ```
27
+ 5. Restart n8n
28
+
29
+ ## Credentials
30
+
31
+ To use this node, you need to configure VNTANA API credentials:
32
+
33
+ | Field | Required | Description |
34
+ |-------|----------|-------------|
35
+ | **API Token** | Yes | Organization-specific X-AUTH-TOKEN |
36
+ | **Organization UUID** | Yes | Your VNTANA organization UUID |
37
+ | **Default Workspace UUID** | No | Default workspace to use when not specified |
38
+
39
+ ### Obtaining Credentials
40
+
41
+ 1. Log in to VNTANA with your email/password or personal access token
42
+ 2. Get your organization UUID from the organizations list
43
+ 3. Refresh your token with the organization UUID to get an org-specific token
44
+ 4. Use this org-specific token as your API Token
45
+
46
+ For detailed authentication steps, see [VNTANA API Authentication](https://help.vntana.com/api-authentication).
47
+
48
+ ## Operations
49
+
50
+ ### Product
51
+
52
+ | Operation | Description |
53
+ |-----------|-------------|
54
+ | **Search** | Search for products in a workspace with filters |
55
+ | **Download Model** | Download a 3D model file (GLB, USDZ, FBX, OBJ, STEP) |
56
+
57
+ #### Search Filters
58
+ - Search term (text search)
59
+ - Status (Draft, Live Public, Live Internal, Approved, Rejected, Waiting Review)
60
+ - Conversion status (Pending, Converting, Completed, Failed, No Asset)
61
+ - Name (exact match)
62
+ - Tag UUIDs
63
+
64
+ ### Render
65
+
66
+ | Operation | Description |
67
+ |-----------|-------------|
68
+ | **Download** | Download renders (still images or turntable videos) for a product |
69
+ | **Upload** | Upload a render image/video to a product |
70
+
71
+ ### Attachment
72
+
73
+ | Operation | Description |
74
+ |-----------|-------------|
75
+ | **Upload** | Upload an attachment file to a product |
76
+
77
+ ## Usage Examples
78
+
79
+ ### Search Products
80
+
81
+ 1. Add the VNTANA node to your workflow
82
+ 2. Select **Product** resource and **Search** operation
83
+ 3. Enter your Workspace UUID
84
+ 4. Optionally add filters (search term, status, etc.)
85
+ 5. Execute to retrieve matching products
86
+
87
+ ### Download a 3D Model
88
+
89
+ 1. Add the VNTANA node to your workflow
90
+ 2. Select **Product** resource and **Download Model** operation
91
+ 3. Enter the Product UUID and Workspace UUID
92
+ 4. Select the format (GLB, USDZ, FBX, OBJ, or STEP)
93
+ 5. Execute to download the model as binary data
94
+
95
+ ### Upload a Render
96
+
97
+ 1. Add a node that provides binary data (e.g., HTTP Request, Read Binary File)
98
+ 2. Add the VNTANA node
99
+ 3. Select **Render** resource and **Upload** operation
100
+ 4. Enter the Product UUID and Workspace UUID
101
+ 5. Specify the binary property name containing your file
102
+ 6. Execute to upload the render to VNTANA
103
+
104
+ ## Compatibility
105
+
106
+ - **n8n version**: 1.0.0+
107
+ - **Node.js version**: 18.x+
108
+
109
+ ## Resources
110
+
111
+ - [VNTANA Documentation](https://help.vntana.com/)
112
+ - [VNTANA API Reference](https://help.vntana.com/api-documentation)
113
+ - [n8n Community Nodes Documentation](https://docs.n8n.io/integrations/community-nodes/)
114
+
115
+ ## Development
116
+
117
+ ```bash
118
+ # Install dependencies
119
+ npm install
120
+
121
+ # Build the node
122
+ npm run build
123
+
124
+ # Watch mode for development
125
+ npm run dev
126
+
127
+ # Lint the code
128
+ npm run lint
129
+
130
+ # Fix lint issues
131
+ npm run lintfix
132
+ ```
133
+
134
+ ## License
135
+
136
+ [MIT](LICENSE)
@@ -0,0 +1,8 @@
1
+ import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class VntanaApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ test: ICredentialTestRequest;
7
+ properties: INodeProperties[];
8
+ }
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VntanaApi = void 0;
4
+ class VntanaApi {
5
+ constructor() {
6
+ this.name = 'vntanaApi';
7
+ this.displayName = 'VNTANA API';
8
+ this.documentationUrl = 'https://help.vntana.com/api-documentation';
9
+ // Test credentials by attempting login
10
+ this.test = {
11
+ request: {
12
+ baseURL: 'https://api-platform.vntana.com',
13
+ url: '/v1/auth/login',
14
+ method: 'POST',
15
+ headers: {
16
+ 'Content-Type': 'application/json',
17
+ },
18
+ body: {
19
+ email: '={{$credentials.email}}',
20
+ password: '={{$credentials.password}}',
21
+ },
22
+ },
23
+ };
24
+ this.properties = [
25
+ {
26
+ displayName: 'Email',
27
+ name: 'email',
28
+ type: 'string',
29
+ placeholder: 'user@example.com',
30
+ default: '',
31
+ required: true,
32
+ description: 'Email address for your VNTANA account',
33
+ },
34
+ {
35
+ displayName: 'Password',
36
+ name: 'password',
37
+ type: 'string',
38
+ typeOptions: {
39
+ password: true,
40
+ },
41
+ default: '',
42
+ required: true,
43
+ description: 'Password for your VNTANA account',
44
+ },
45
+ {
46
+ displayName: 'Organization UUID',
47
+ name: 'organizationUuid',
48
+ type: 'string',
49
+ default: '',
50
+ required: true,
51
+ description: 'UUID of your VNTANA organization',
52
+ },
53
+ {
54
+ displayName: 'Default Workspace UUID',
55
+ name: 'defaultClientUuid',
56
+ type: 'string',
57
+ default: '',
58
+ required: false,
59
+ description: 'Default workspace (client) UUID to use when not specified in operations',
60
+ },
61
+ ];
62
+ }
63
+ }
64
+ exports.VntanaApi = VntanaApi;
65
+ //# sourceMappingURL=VntanaApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VntanaApi.credentials.js","sourceRoot":"","sources":["../../credentials/VntanaApi.credentials.ts"],"names":[],"mappings":";;;AAMA,MAAa,SAAS;IAAtB;QACC,SAAI,GAAG,WAAW,CAAC;QACnB,gBAAW,GAAG,YAAY,CAAC;QAC3B,qBAAgB,GAAG,2CAA2C,CAAC;QAE/D,uCAAuC;QACvC,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,OAAO,EAAE,iCAAiC;gBAC1C,GAAG,EAAE,gBAAgB;gBACrB,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACR,cAAc,EAAE,kBAAkB;iBAClC;gBACD,IAAI,EAAE;oBACL,KAAK,EAAE,yBAAyB;oBAChC,QAAQ,EAAE,4BAA4B;iBACtC;aACD;SACD,CAAC;QAEF,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kBAAkB;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,uCAAuC;aACpD;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,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,kCAAkC;aAC/C;YACD;gBACC,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,kCAAkC;aAC/C;YACD;gBACC,WAAW,EAAE,wBAAwB;gBACrC,IAAI,EAAE,mBAAmB;gBACzB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,KAAK;gBACf,WAAW,EAAE,yEAAyE;aACtF;SACD,CAAC;IACH,CAAC;CAAA;AA3DD,8BA2DC"}
@@ -0,0 +1,34 @@
1
+ import type { IDataObject, IExecuteFunctions, IHttpRequestMethods, IHttpRequestOptions, INodeExecutionData } from 'n8n-workflow';
2
+ /**
3
+ * Make an authenticated request to the VNTANA API
4
+ */
5
+ export declare function vntanaApiRequest(this: IExecuteFunctions, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, qs?: IDataObject, options?: Partial<IHttpRequestOptions>): Promise<IDataObject>;
6
+ /**
7
+ * Make a request to download binary data from VNTANA API
8
+ */
9
+ export declare function vntanaApiRequestBinary(this: IExecuteFunctions, method: IHttpRequestMethods, endpoint: string, qs?: IDataObject): Promise<Buffer>;
10
+ /**
11
+ * Make an authenticated request with pagination support
12
+ */
13
+ export declare function vntanaApiRequestAllItems(this: IExecuteFunctions, method: IHttpRequestMethods, endpoint: string, body?: IDataObject, qs?: IDataObject): Promise<IDataObject[]>;
14
+ /**
15
+ * Upload binary data to a signed URL (Google Cloud Storage)
16
+ * Note: This does NOT use VNTANA auth - the signed URL includes authentication
17
+ */
18
+ export declare function uploadToSignedUrl(this: IExecuteFunctions, signedUrl: string, binaryData: Buffer, contentType: string): Promise<void>;
19
+ /**
20
+ * Download binary data from a URL (e.g., attachment download)
21
+ */
22
+ export declare function downloadFromUrl(this: IExecuteFunctions, url: string): Promise<Buffer>;
23
+ /**
24
+ * Convert VNTANA API response items to n8n execution data format
25
+ */
26
+ export declare function prepareOutputItems(items: IDataObject[]): INodeExecutionData[];
27
+ /**
28
+ * Get the workspace UUID, either from the parameter or from credentials default
29
+ */
30
+ export declare function getClientUuid(this: IExecuteFunctions, itemIndex: number): Promise<string>;
31
+ /**
32
+ * Clear the cached token (useful for testing or forced re-authentication)
33
+ */
34
+ export declare function clearTokenCache(): void;
@@ -0,0 +1,270 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.vntanaApiRequest = vntanaApiRequest;
4
+ exports.vntanaApiRequestBinary = vntanaApiRequestBinary;
5
+ exports.vntanaApiRequestAllItems = vntanaApiRequestAllItems;
6
+ exports.uploadToSignedUrl = uploadToSignedUrl;
7
+ exports.downloadFromUrl = downloadFromUrl;
8
+ exports.prepareOutputItems = prepareOutputItems;
9
+ exports.getClientUuid = getClientUuid;
10
+ exports.clearTokenCache = clearTokenCache;
11
+ const n8n_workflow_1 = require("n8n-workflow");
12
+ const BASE_URL = 'https://api-platform.vntana.com';
13
+ // Token cache to avoid re-authenticating on every request within the same execution
14
+ let cachedToken = null;
15
+ const TOKEN_CACHE_TTL = 5 * 60 * 1000; // 5 minutes
16
+ /**
17
+ * Authenticate with VNTANA using email/password, then refresh with organization UUID
18
+ * Returns a Bearer token string ready to use in headers
19
+ */
20
+ async function getAuthToken(executeFunctions) {
21
+ var _a, _b;
22
+ // Check cache first
23
+ if (cachedToken && Date.now() - cachedToken.timestamp < TOKEN_CACHE_TTL) {
24
+ return cachedToken.token;
25
+ }
26
+ const credentials = await executeFunctions.getCredentials('vntanaApi');
27
+ const email = credentials.email;
28
+ const password = credentials.password;
29
+ const organizationUuid = credentials.organizationUuid;
30
+ // Step 1: Login to get initial token
31
+ const loginOptions = {
32
+ method: 'POST',
33
+ url: `${BASE_URL}/v1/auth/login`,
34
+ headers: {
35
+ 'Content-Type': 'application/json',
36
+ },
37
+ body: {
38
+ email,
39
+ password,
40
+ },
41
+ json: true,
42
+ returnFullResponse: true,
43
+ };
44
+ let loginResponse;
45
+ try {
46
+ loginResponse = await executeFunctions.helpers.httpRequest(loginOptions);
47
+ }
48
+ catch (error) {
49
+ throw new n8n_workflow_1.NodeApiError(executeFunctions.getNode(), error, {
50
+ message: 'VNTANA login failed - check your email and password',
51
+ });
52
+ }
53
+ const loginToken = (_a = loginResponse.headers) === null || _a === void 0 ? void 0 : _a['x-auth-token'];
54
+ if (!loginToken) {
55
+ throw new n8n_workflow_1.NodeApiError(executeFunctions.getNode(), {}, {
56
+ message: 'No auth token received from VNTANA login',
57
+ });
58
+ }
59
+ // Step 2: Refresh token with organization UUID to get org-specific token
60
+ const refreshOptions = {
61
+ method: 'POST',
62
+ url: `${BASE_URL}/v1/auth/refresh-token`,
63
+ headers: {
64
+ 'X-AUTH-TOKEN': `Bearer ${loginToken}`,
65
+ 'organizationUuid': organizationUuid,
66
+ },
67
+ json: true,
68
+ returnFullResponse: true,
69
+ };
70
+ let refreshResponse;
71
+ try {
72
+ refreshResponse = await executeFunctions.helpers.httpRequest(refreshOptions);
73
+ }
74
+ catch (error) {
75
+ throw new n8n_workflow_1.NodeApiError(executeFunctions.getNode(), error, {
76
+ message: 'VNTANA token refresh failed - check your organization UUID',
77
+ });
78
+ }
79
+ const refreshToken = (_b = refreshResponse.headers) === null || _b === void 0 ? void 0 : _b['x-auth-token'];
80
+ if (!refreshToken) {
81
+ throw new n8n_workflow_1.NodeApiError(executeFunctions.getNode(), {}, {
82
+ message: 'No refresh token received from VNTANA',
83
+ });
84
+ }
85
+ // Cache the token
86
+ const bearerToken = `Bearer ${refreshToken}`;
87
+ cachedToken = {
88
+ token: bearerToken,
89
+ timestamp: Date.now(),
90
+ };
91
+ return bearerToken;
92
+ }
93
+ /**
94
+ * Make an authenticated request to the VNTANA API
95
+ */
96
+ async function vntanaApiRequest(method, endpoint, body = {}, qs = {}, options = {}) {
97
+ // Get auth token (handles login flow automatically)
98
+ const authToken = await getAuthToken(this);
99
+ const requestOptions = {
100
+ method,
101
+ url: `${BASE_URL}${endpoint}`,
102
+ headers: {
103
+ Accept: 'application/json',
104
+ 'Content-Type': 'application/json',
105
+ 'X-AUTH-TOKEN': authToken,
106
+ },
107
+ qs,
108
+ body,
109
+ json: true,
110
+ ...options,
111
+ };
112
+ // Remove empty body for GET requests
113
+ if (method === 'GET') {
114
+ delete requestOptions.body;
115
+ }
116
+ // Remove empty qs
117
+ if (Object.keys(qs).length === 0) {
118
+ delete requestOptions.qs;
119
+ }
120
+ // Remove empty body
121
+ if (Object.keys(body).length === 0 && method !== 'GET') {
122
+ delete requestOptions.body;
123
+ }
124
+ try {
125
+ const response = await this.helpers.httpRequest(requestOptions);
126
+ // VNTANA wraps responses in { success, errors, response }
127
+ if (response.success === false) {
128
+ const errorMessage = Array.isArray(response.errors) && response.errors.length > 0
129
+ ? response.errors.map((e) => e.message || JSON.stringify(e)).join(', ')
130
+ : 'Unknown VNTANA API error';
131
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), response, { message: errorMessage });
132
+ }
133
+ return response;
134
+ }
135
+ catch (error) {
136
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
137
+ }
138
+ }
139
+ /**
140
+ * Make a request to download binary data from VNTANA API
141
+ */
142
+ async function vntanaApiRequestBinary(method, endpoint, qs = {}) {
143
+ // Get auth token (handles login flow automatically)
144
+ const authToken = await getAuthToken(this);
145
+ const requestOptions = {
146
+ method,
147
+ url: `${BASE_URL}${endpoint}`,
148
+ headers: {
149
+ Accept: '*/*',
150
+ 'X-AUTH-TOKEN': authToken,
151
+ },
152
+ qs,
153
+ encoding: 'arraybuffer',
154
+ returnFullResponse: false,
155
+ };
156
+ if (Object.keys(qs).length === 0) {
157
+ delete requestOptions.qs;
158
+ }
159
+ try {
160
+ const response = await this.helpers.httpRequest(requestOptions);
161
+ return response;
162
+ }
163
+ catch (error) {
164
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
165
+ }
166
+ }
167
+ /**
168
+ * Make an authenticated request with pagination support
169
+ */
170
+ async function vntanaApiRequestAllItems(method, endpoint, body = {}, qs = {}) {
171
+ var _a, _b;
172
+ const returnData = [];
173
+ // VNTANA uses 1-based pagination
174
+ let page = 1;
175
+ const size = 50;
176
+ let hasMore = true;
177
+ while (hasMore) {
178
+ // For POST endpoints, pagination params go in body
179
+ const requestBody = { ...body, page, size };
180
+ const response = await vntanaApiRequest.call(this, method, endpoint, requestBody, qs);
181
+ const items = (_a = response.response) === null || _a === void 0 ? void 0 : _a.grid;
182
+ if (items && items.length > 0) {
183
+ returnData.push(...items);
184
+ const totalCount = (_b = response.response) === null || _b === void 0 ? void 0 : _b.totalCount;
185
+ hasMore = returnData.length < totalCount;
186
+ page++;
187
+ }
188
+ else {
189
+ hasMore = false;
190
+ }
191
+ }
192
+ return returnData;
193
+ }
194
+ /**
195
+ * Upload binary data to a signed URL (Google Cloud Storage)
196
+ * Note: This does NOT use VNTANA auth - the signed URL includes authentication
197
+ */
198
+ async function uploadToSignedUrl(signedUrl, binaryData, contentType) {
199
+ const requestOptions = {
200
+ method: 'POST',
201
+ url: signedUrl,
202
+ headers: {
203
+ 'Origin': 'https://api-platform.vntana.com',
204
+ 'Content-Type': contentType,
205
+ 'Content-Length': binaryData.length.toString(),
206
+ },
207
+ body: binaryData,
208
+ returnFullResponse: true,
209
+ };
210
+ try {
211
+ await this.helpers.httpRequest(requestOptions);
212
+ // Google Cloud Storage signed URLs return empty response on success
213
+ }
214
+ catch (error) {
215
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error, {
216
+ message: 'Failed to upload file to signed URL',
217
+ });
218
+ }
219
+ }
220
+ /**
221
+ * Download binary data from a URL (e.g., attachment download)
222
+ */
223
+ async function downloadFromUrl(url) {
224
+ const requestOptions = {
225
+ method: 'GET',
226
+ url,
227
+ encoding: 'arraybuffer',
228
+ returnFullResponse: false,
229
+ };
230
+ try {
231
+ const response = await this.helpers.httpRequest(requestOptions);
232
+ return response;
233
+ }
234
+ catch (error) {
235
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), error);
236
+ }
237
+ }
238
+ /**
239
+ * Convert VNTANA API response items to n8n execution data format
240
+ */
241
+ function prepareOutputItems(items) {
242
+ return items.map((item) => ({
243
+ json: item,
244
+ }));
245
+ }
246
+ /**
247
+ * Get the workspace UUID, either from the parameter or from credentials default
248
+ */
249
+ async function getClientUuid(itemIndex) {
250
+ const clientUuid = this.getNodeParameter('clientUuid', itemIndex, '');
251
+ if (clientUuid) {
252
+ return clientUuid;
253
+ }
254
+ // Fall back to default from credentials
255
+ const credentials = await this.getCredentials('vntanaApi');
256
+ const defaultClientUuid = credentials.defaultClientUuid;
257
+ if (!defaultClientUuid) {
258
+ throw new n8n_workflow_1.NodeApiError(this.getNode(), {
259
+ message: 'No workspace UUID provided and no default workspace configured in credentials',
260
+ });
261
+ }
262
+ return defaultClientUuid;
263
+ }
264
+ /**
265
+ * Clear the cached token (useful for testing or forced re-authentication)
266
+ */
267
+ function clearTokenCache() {
268
+ cachedToken = null;
269
+ }
270
+ //# sourceMappingURL=GenericFunctions.js.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AK,UAAU,aAAa,CAElC,SAAiB;IAEjB,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE,CAAW,CAAC;IAEhF,IAAI,UAAU,EAAE,CAAC;QAChB,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,wCAAwC;IACxC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAC3D,MAAM,iBAAiB,GAAG,WAAW,CAAC,iBAA2B,CAAC;IAElE,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACxB,MAAM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE;YACtC,OAAO,EAAE,+EAA+E;SAC1E,CAAC,CAAC;IAClB,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC1B,CAAC;AAED;;GAEG;AACH,SAAgB,eAAe;IAC9B,WAAW,GAAG,IAAI,CAAC;AACpB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ICredentialDataDecryptedObject, ICredentialsDecrypted, ICredentialTestFunctions, IExecuteFunctions, INodeCredentialTestResult, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ export declare class Vntana implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ credentialTest: {
6
+ testVntanaCredentials(this: ICredentialTestFunctions, credential: ICredentialsDecrypted<ICredentialDataDecryptedObject>): Promise<INodeCredentialTestResult>;
7
+ };
8
+ };
9
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
10
+ }