n8n-nodes-syncmate 1.0.10 → 1.0.13

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.
@@ -44,4 +44,3 @@ class AssistroOAuth2Api {
44
44
  }
45
45
  }
46
46
  exports.AssistroOAuth2Api = AssistroOAuth2Api;
47
- //# sourceMappingURL=AssistroOAuth2Api.credentials.js.map
package/dist/index.js ADDED
@@ -0,0 +1,4 @@
1
+
2
+ // This file is generated during build
3
+ // It exports all nodes and credentials for n8n
4
+ module.exports = {};
@@ -5,181 +5,266 @@ const n8n_workflow_1 = require("n8n-workflow");
5
5
  class WhatsAuto {
6
6
  constructor() {
7
7
  this.description = {
8
- displayName: 'WhatsApp Notifications and Alerts by SyncMate',
8
+ displayName: 'WhatsApp Notifications by SyncMate',
9
9
  name: 'whatsAuto',
10
- icon: 'file:assistro.svg',
10
+ icon: 'file:whatsauto.svg',
11
+ group: ['output'],
11
12
  version: 1,
12
- description: 'Send WhatsApp messages or media using SyncMate.',
13
- defaults: { name: 'WhatsAuto' },
13
+ subtitle: '={{$parameter["operation"]}}',
14
+ description: 'Send WhatsApp messages or media using SyncMate Assistro API',
15
+ defaults: {
16
+ name: 'WhatsAuto',
17
+ },
14
18
  inputs: ['main'],
15
19
  outputs: ['main'],
16
- subtitle: `={{
17
- $parameter["operation"] === "normal" ? "Send Notification" :
18
- $parameter["operation"] === "group" ? "Send Group Message" :
19
- $parameter["operation"] === "newsletter" ? "Send Newsletter" : ""
20
- }}`,
21
- group: ['output'],
22
20
  credentials: [
23
- { name: 'assistroOAuth2Api', required: true },
21
+ {
22
+ name: 'assistroOAuth2Api',
23
+ required: true,
24
+ },
24
25
  ],
25
26
  properties: [
26
27
  {
27
28
  displayName: 'Operation',
28
29
  name: 'operation',
29
30
  type: 'options',
31
+ noDataExpression: true,
30
32
  options: [
31
- { name: 'Send Whatsapp Notification', value: 'normal' },
32
- { name: 'Send Whatsapp Group Message', value: 'group' },
33
- { name: 'Send Whatsapp Channel/Newsletter Message', value: 'newsletter' },
33
+ {
34
+ name: 'Send Notification',
35
+ value: 'normal',
36
+ description: 'Send a WhatsApp notification to a phone number',
37
+ action: 'Send a notification',
38
+ },
39
+ {
40
+ name: 'Send Group Message',
41
+ value: 'group',
42
+ description: 'Send a message to a WhatsApp group',
43
+ action: 'Send a group message',
44
+ },
45
+ {
46
+ name: 'Send Newsletter',
47
+ value: 'newsletter',
48
+ description: 'Send a message to a WhatsApp channel/newsletter',
49
+ action: 'Send a newsletter',
50
+ },
34
51
  ],
35
52
  default: 'normal',
53
+ },
54
+ {
55
+ displayName: 'Phone Number',
56
+ name: 'phoneNumber',
57
+ type: 'string',
36
58
  required: true,
37
- typeOptions: { displayMode: 'buttons', buttonStyle: 'full' },
38
- noDataExpression: true,
59
+ displayOptions: {
60
+ show: {
61
+ operation: ['normal'],
62
+ },
63
+ },
64
+ default: '',
65
+ placeholder: '919876543210',
66
+ description: 'Phone number with country code (without + or spaces)',
39
67
  },
40
68
  {
41
- displayName: 'Send WhatsApp Notification',
42
- name: 'normalInput',
43
- type: 'fixedCollection',
44
- placeholder: 'Add Normal Message',
45
- default: {},
46
- typeOptions: { multipleValues: false },
47
- displayOptions: { show: { operation: ['normal'] } },
48
- options: [
49
- {
50
- name: 'input',
51
- displayName: 'Input',
52
- values: [
53
- { displayName: 'Phone Number', name: 'number', type: 'string', default: '', required: true },
54
- { displayName: 'Message', name: 'message', type: 'string', default: '', required: true },
55
- {
56
- displayName: 'Media',
57
- name: 'media',
58
- type: 'fixedCollection',
59
- typeOptions: { multipleValues: true },
60
- placeholder: 'Add Media',
61
- default: {},
62
- options: [
63
- {
64
- name: 'files',
65
- displayName: 'File',
66
- values: [
67
- { displayName: 'Base64 Content', name: 'media_base64', type: 'string', default: '' },
68
- { displayName: 'File Name', name: 'file_name', type: 'string', default: 'file' },
69
- ],
70
- },
71
- ],
72
- },
73
- ],
69
+ displayName: 'Message',
70
+ name: 'message',
71
+ type: 'string',
72
+ required: true,
73
+ displayOptions: {
74
+ show: {
75
+ operation: ['normal', 'group'],
74
76
  },
75
- ],
77
+ },
78
+ typeOptions: {
79
+ rows: 4,
80
+ },
81
+ default: '',
82
+ description: 'Message text to send',
76
83
  },
77
84
  {
78
- displayName: 'Send WhatsApp Group Message',
79
- name: 'groupInput',
85
+ displayName: 'Media Files',
86
+ name: 'mediaFiles',
80
87
  type: 'fixedCollection',
81
- placeholder: 'Add Group Message',
88
+ typeOptions: {
89
+ multipleValues: true,
90
+ },
91
+ displayOptions: {
92
+ show: {
93
+ operation: ['normal', 'group'],
94
+ },
95
+ },
82
96
  default: {},
83
- typeOptions: { multipleValues: false },
84
- displayOptions: { show: { operation: ['group'] } },
97
+ placeholder: 'Add Media File',
85
98
  options: [
86
99
  {
87
- name: 'input',
88
- displayName: 'Input',
100
+ name: 'mediaFile',
101
+ displayName: 'Media File',
89
102
  values: [
90
- { displayName: 'Group ID', name: 'groupId', type: 'string', default: '', required: true },
91
- { displayName: 'Message', name: 'message', type: 'string', default: '', required: true },
92
103
  {
93
- displayName: 'Media',
94
- name: 'media',
95
- type: 'fixedCollection',
96
- typeOptions: { multipleValues: true },
97
- placeholder: 'Add Media',
98
- default: {},
99
- options: [
100
- {
101
- name: 'files',
102
- displayName: 'File',
103
- values: [
104
- { displayName: 'Base64 Content', name: 'media_base64', type: 'string', default: '' },
105
- { displayName: 'File Name', name: 'file_name', type: 'string', default: 'file' },
106
- ],
107
- },
108
- ],
104
+ displayName: 'Base64 Content',
105
+ name: 'media_base64',
106
+ type: 'string',
107
+ default: '',
108
+ required: true,
109
+ description: 'Base64 encoded file content',
110
+ placeholder: 'data:image/png;base64,iVBORw0KG...',
111
+ },
112
+ {
113
+ displayName: 'File Name',
114
+ name: 'file_name',
115
+ type: 'string',
116
+ default: '',
117
+ required: true,
118
+ placeholder: 'document.pdf',
119
+ description: 'Name of the file with extension',
109
120
  },
110
121
  ],
111
122
  },
112
123
  ],
113
124
  },
114
125
  {
115
- displayName: 'Send Whatsapp Channel/Newsletter Message',
116
- name: 'newsletterInput',
117
- type: 'fixedCollection',
118
- placeholder: 'Add Channel/Newsletter Message',
119
- default: {},
120
- typeOptions: { multipleValues: false },
121
- displayOptions: { show: { operation: ['newsletter'] } },
122
- options: [
123
- {
124
- name: 'input',
125
- displayName: 'Input',
126
- values: [
127
- { displayName: 'Channel/Newsletter ID', name: 'groupId', type: 'string', default: '', required: true },
128
- { displayName: 'Message', name: 'message', type: 'string', default: '', required: true },
129
- ],
126
+ displayName: 'Group ID',
127
+ name: 'groupId',
128
+ type: 'string',
129
+ required: true,
130
+ displayOptions: {
131
+ show: {
132
+ operation: ['group'],
130
133
  },
131
- ],
134
+ },
135
+ default: '',
136
+ placeholder: '123456789@g.us or 123456789',
137
+ description: 'WhatsApp group ID (with or without @g.us suffix)',
138
+ },
139
+ {
140
+ displayName: 'Channel/Newsletter ID',
141
+ name: 'newsletterId',
142
+ type: 'string',
143
+ required: true,
144
+ displayOptions: {
145
+ show: {
146
+ operation: ['newsletter'],
147
+ },
148
+ },
149
+ default: '',
150
+ placeholder: '123456789@newsletter or 123456789',
151
+ description: 'WhatsApp channel/newsletter ID (with or without @newsletter suffix)',
152
+ },
153
+ {
154
+ displayName: 'Message',
155
+ name: 'newsletterMessage',
156
+ type: 'string',
157
+ required: true,
158
+ displayOptions: {
159
+ show: {
160
+ operation: ['newsletter'],
161
+ },
162
+ },
163
+ typeOptions: {
164
+ rows: 4,
165
+ },
166
+ default: '',
167
+ description: 'Message text to send to channel/newsletter',
132
168
  },
133
169
  ],
134
170
  };
135
171
  }
136
172
  async execute() {
137
- var _a, _b, _c, _d, _e;
173
+ var _a, _b, _c;
174
+ const items = this.getInputData();
138
175
  const returnData = [];
139
- const operation = this.getNodeParameter('operation', 0);
140
- let body = {};
141
- if (operation === 'normal') {
142
- const input = this.getNodeParameter('normalInput.input', 0);
143
- const number = input.number.trim();
144
- const message = input.message;
145
- const media = (_b = (_a = input.media) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b.map((m) => ({ media_base64: m.media_base64, file_name: m.file_name }));
146
- body = { msgs: [{ number, message, type: 1, ...(media ? { media } : {}) }] };
147
- }
148
- if (operation === 'group') {
149
- const input = this.getNodeParameter('groupInput.input', 0);
150
- let groupId = input.groupId.trim();
151
- if (!groupId.endsWith('@g.us'))
152
- groupId += '@g.us';
153
- const message = input.message;
154
- const media = (_d = (_c = input.media) === null || _c === void 0 ? void 0 : _c.files) === null || _d === void 0 ? void 0 : _d.map((m) => ({ media_base64: m.media_base64, file_name: m.file_name }));
155
- body = { msgs: [{ number: groupId, message, type: 2, ...(media ? { media } : {}) }] };
156
- }
157
- if (operation === 'newsletter') {
158
- const input = this.getNodeParameter('newsletterInput.input', 0);
159
- let groupId = input.groupId.trim();
160
- if (!groupId.endsWith('@newsletter'))
161
- groupId += '@newsletter';
162
- const message = input.message;
163
- body = { msgs: [{ number: groupId, message, type: 3 }] };
164
- }
165
- try {
166
- const response = await this.helpers.requestOAuth2.call(this, 'assistroOAuth2Api', {
167
- method: 'POST',
168
- url: 'https://app.assistro.co/api/v1/wapushplus/singlePass/message',
169
- headers: { 'Content-Type': 'application/json' },
170
- body,
171
- json: true,
172
- });
173
- returnData.push({ json: response });
174
- }
175
- catch (error) {
176
- if (((_e = error.response) === null || _e === void 0 ? void 0 : _e.status) === 500) {
177
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Access token expired or refresh failed. Reconnect OAuth credentials.');
176
+ for (let i = 0; i < items.length; i++) {
177
+ try {
178
+ const operation = this.getNodeParameter('operation', i);
179
+ let body = {};
180
+ if (operation === 'normal') {
181
+ const phoneNumber = this.getNodeParameter('phoneNumber', i);
182
+ const message = this.getNodeParameter('message', i);
183
+ const mediaFiles = this.getNodeParameter('mediaFiles', i);
184
+ const cleanNumber = phoneNumber.trim().replace(/\s+/g, '');
185
+ const msgObj = {
186
+ number: cleanNumber,
187
+ message: message,
188
+ type: 1,
189
+ };
190
+ if ((mediaFiles === null || mediaFiles === void 0 ? void 0 : mediaFiles.mediaFile) && mediaFiles.mediaFile.length > 0) {
191
+ msgObj.media = mediaFiles.mediaFile.map((file) => ({
192
+ media_base64: file.media_base64,
193
+ file_name: file.file_name,
194
+ }));
195
+ }
196
+ body = { msgs: [msgObj] };
197
+ }
198
+ if (operation === 'group') {
199
+ const groupId = this.getNodeParameter('groupId', i);
200
+ const message = this.getNodeParameter('message', i);
201
+ const mediaFiles = this.getNodeParameter('mediaFiles', i);
202
+ let cleanGroupId = groupId.trim();
203
+ if (!cleanGroupId.endsWith('@g.us')) {
204
+ cleanGroupId = cleanGroupId.replace('@g.us', '') + '@g.us';
205
+ }
206
+ const msgObj = {
207
+ number: cleanGroupId,
208
+ message: message,
209
+ type: 2,
210
+ };
211
+ if ((mediaFiles === null || mediaFiles === void 0 ? void 0 : mediaFiles.mediaFile) && mediaFiles.mediaFile.length > 0) {
212
+ msgObj.media = mediaFiles.mediaFile.map((file) => ({
213
+ media_base64: file.media_base64,
214
+ file_name: file.file_name,
215
+ }));
216
+ }
217
+ body = { msgs: [msgObj] };
218
+ }
219
+ if (operation === 'newsletter') {
220
+ const newsletterId = this.getNodeParameter('newsletterId', i);
221
+ const message = this.getNodeParameter('newsletterMessage', i);
222
+ let cleanNewsletterId = newsletterId.trim();
223
+ if (!cleanNewsletterId.endsWith('@newsletter')) {
224
+ cleanNewsletterId = cleanNewsletterId.replace('@newsletter', '') + '@newsletter';
225
+ }
226
+ body = {
227
+ msgs: [{
228
+ number: cleanNewsletterId,
229
+ message: message,
230
+ type: 3,
231
+ }],
232
+ };
233
+ }
234
+ const response = await this.helpers.requestOAuth2.call(this, 'assistroOAuth2Api', {
235
+ method: 'POST',
236
+ url: 'https://app.assistro.co/api/v1/wapushplus/singlePass/message',
237
+ headers: {
238
+ 'Content-Type': 'application/json',
239
+ },
240
+ body,
241
+ json: true,
242
+ });
243
+ returnData.push({
244
+ json: response,
245
+ pairedItem: { item: i },
246
+ });
247
+ }
248
+ catch (error) {
249
+ if (this.continueOnFail()) {
250
+ returnData.push({
251
+ json: {
252
+ error: error.message,
253
+ },
254
+ pairedItem: { item: i },
255
+ });
256
+ continue;
257
+ }
258
+ if (((_a = error.response) === null || _a === void 0 ? void 0 : _a.status) === 401 || ((_b = error.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
259
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Authentication failed. Please reconnect your OAuth credentials.', { itemIndex: i });
260
+ }
261
+ if (((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 500) {
262
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Server error. Your access token may have expired. Please reconnect OAuth credentials.', { itemIndex: i });
263
+ }
264
+ throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to send message: ${error.message}`, { itemIndex: i });
178
265
  }
179
- throw error;
180
266
  }
181
267
  return [returnData];
182
268
  }
183
269
  }
184
270
  exports.WhatsAuto = WhatsAuto;
185
- //# sourceMappingURL=WhatsAuto.node.js.map
@@ -34,14 +34,19 @@ class AssistroOAuth2Api {
34
34
  type: 'hidden',
35
35
  default: 'all',
36
36
  },
37
+ {
38
+ displayName: 'Auth URI Query Parameters',
39
+ name: 'authQueryParameters',
40
+ type: 'hidden',
41
+ default: '',
42
+ },
37
43
  {
38
44
  displayName: 'Authentication',
39
45
  name: 'authentication',
40
46
  type: 'hidden',
41
- default: 'header',
47
+ default: 'body',
42
48
  },
43
49
  ];
44
50
  }
45
51
  }
46
52
  exports.AssistroOAuth2Api = AssistroOAuth2Api;
47
- //# sourceMappingURL=AssistroOAuth2Api.credentials.js.map
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ // Entry point - required by n8n
2
+ module.exports = require('./dist/index.js');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-syncmate",
3
- "version": "1.0.10",
3
+ "version": "1.0.13",
4
4
  "description": "Send WhatsApp messages or media using SyncMate Assistro API.",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",
@@ -19,23 +19,24 @@
19
19
  "type": "git",
20
20
  "url": "git+https://github.com/heratshah-collab/n8n-nodes-syncmate.git"
21
21
  },
22
+ "bugs": {
23
+ "url": "https://github.com/heratshah-collab/n8n-nodes-syncmate/issues"
24
+ },
22
25
  "engines": {
23
- "node": ">=18.10.0"
26
+ "node": ">=18.10",
27
+ "pnpm": ">=8.0"
24
28
  },
25
- "main": "dist/index.js",
29
+ "main": "index.js",
26
30
  "scripts": {
27
- "build": "rimraf dist && tsc && gulp build:icons",
31
+ "build": "tsc && gulp build:icons",
28
32
  "dev": "tsc --watch",
29
33
  "format": "prettier nodes credentials --write",
30
- "lint": "eslint nodes credentials package.json",
31
- "lintfix": "eslint nodes credentials package.json --fix",
32
- "prepublishOnly": "npm run build && npm run lint"
34
+ "lint": "eslint nodes/**/*.ts credentials/**/*.ts",
35
+ "lintfix": "eslint nodes credentials --fix",
36
+ "prepublishOnly": "npm run build"
33
37
  },
34
38
  "files": [
35
- "dist",
36
- "package.json",
37
- "README.md",
38
- "LICENSE"
39
+ "dist"
39
40
  ],
40
41
  "n8n": {
41
42
  "n8nNodesApiVersion": 1,
@@ -47,17 +48,19 @@
47
48
  ]
48
49
  },
49
50
  "devDependencies": {
50
- "@types/node": "^20.0.0",
51
- "@typescript-eslint/parser": "^7.0.0",
52
- "eslint": "^8.57.0",
53
- "eslint-plugin-n8n-nodes-base": "^1.16.0",
51
+ "@types/node": "^20.14.9",
52
+ "@typescript-eslint/parser": "~7.15.0",
53
+ "eslint": "^8.56.0",
54
+ "eslint-plugin-n8n-nodes-base": "^1.16.1",
54
55
  "gulp": "^4.0.2",
55
- "prettier": "^3.0.0",
56
- "rimraf": "^5.0.0",
57
- "typescript": "^5.0.0"
56
+ "n8n-workflow": "^1.53.0",
57
+ "prettier": "^3.3.2",
58
+ "typescript": "~5.5.3"
58
59
  },
59
60
  "peerDependencies": {
60
- "n8n-workflow": ">=1.0.0",
61
- "n8n-core": ">=1.0.0"
61
+ "n8n-workflow": "*"
62
+ },
63
+ "dependencies": {
64
+ "n8n-nodes-syncmate": "file:n8n-nodes-syncmate-1.0.13.tgz"
62
65
  }
63
66
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssistroOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/AssistroOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,iBAAiB;IAA9B;QACI,SAAI,GAAG,mBAAmB,CAAC;QAC3B,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QACxB,gBAAW,GAAG,qBAAqB,CAAC;QACpC,qBAAgB,GAAG,gCAAgC,CAAC;QAEpD,eAAU,GAAsB;YAC5B;gBACI,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB;aAC/B;YACD;gBACI,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6CAA6C;gBACtD,QAAQ,EAAE,IAAI;aACjB;YACD;gBACI,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,yCAAyC;gBAClD,QAAQ,EAAE,IAAI;aACjB;YACD;gBACI,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACd;YACD;gBACI,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,QAAQ;aACpB;SACJ,CAAC;IACN,CAAC;CAAA;AAxCD,8CAwCC"}
@@ -1,9 +0,0 @@
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
- }
@@ -1,47 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,9 +0,0 @@
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
- }
@@ -1,43 +0,0 @@
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
@@ -1 +0,0 @@
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"}