n8n-nodes-pilot-status 1.0.9 → 1.0.11

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.
@@ -4,8 +4,6 @@ export declare class PilotStatus implements INodeType {
4
4
  loadOptions: {
5
5
  getTemplates(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
6
6
  getTemplateVariables(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
- getGroups(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
8
- getNewsletters(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
9
7
  };
10
8
  };
11
9
  description: INodeTypeDescription;
@@ -37,30 +37,6 @@ class PilotStatus {
37
37
  const vars = (_b = (_a = response === null || response === void 0 ? void 0 : response.latestVersion) === null || _a === void 0 ? void 0 : _a.variables) !== null && _b !== void 0 ? _b : [];
38
38
  return Array.isArray(vars) ? vars.map((v) => ({ name: v, value: v })) : [];
39
39
  },
40
- async getGroups() {
41
- const response = (await this.helpers.requestWithAuthentication.call(this, 'pilotStatusApi', {
42
- method: 'GET',
43
- url: '/groups',
44
- json: true,
45
- }));
46
- const groups = Array.isArray(response === null || response === void 0 ? void 0 : response.groups) ? response.groups : [];
47
- return groups.map((g) => ({
48
- name: g.name ? `${g.name} (${g.id})` : g.id,
49
- value: g.id,
50
- }));
51
- },
52
- async getNewsletters() {
53
- const response = (await this.helpers.requestWithAuthentication.call(this, 'pilotStatusApi', {
54
- method: 'GET',
55
- url: '/newsletters',
56
- json: true,
57
- }));
58
- const newsletters = Array.isArray(response === null || response === void 0 ? void 0 : response.newsletters) ? response.newsletters : [];
59
- return newsletters.map((n) => ({
60
- name: n.name ? `${n.name} (${n.id})` : n.id,
61
- value: n.id,
62
- }));
63
- },
64
40
  },
65
41
  };
66
42
  this.description = {
@@ -273,27 +249,25 @@ class PilotStatus {
273
249
  {
274
250
  displayName: 'Group ID',
275
251
  name: 'groupId',
276
- type: 'options',
277
- typeOptions: { loadOptionsMethod: 'getGroups' },
252
+ type: 'string',
278
253
  displayOptions: {
279
254
  show: { resource: ['message'], operation: ['send'], sendDestinationType: ['group'] },
280
255
  },
281
256
  default: '',
282
257
  required: true,
283
- description: 'JID do grupo (@g.us). Lista via GET /v1/groups; também pode usar expressão n8n.',
258
+ description: 'ID do grupo (@g.us)',
284
259
  routing: { send: { type: 'body', property: 'groupId' } },
285
260
  },
286
261
  {
287
262
  displayName: 'Newsletter ID',
288
263
  name: 'newsletterId',
289
- type: 'options',
290
- typeOptions: { loadOptionsMethod: 'getNewsletters' },
264
+ type: 'string',
291
265
  displayOptions: {
292
266
  show: { resource: ['message'], operation: ['send'], sendDestinationType: ['newsletter'] },
293
267
  },
294
268
  default: '',
295
269
  required: true,
296
- description: 'JID do canal (@newsletter). Lista via GET /v1/newsletters; também pode usar expressão n8n.',
270
+ description: 'ID do canal (@newsletter)',
297
271
  routing: { send: { type: 'body', property: 'newsletterId' } },
298
272
  },
299
273
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-pilot-status",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "n8n node for Pilot Status API",
5
5
  "keywords": [
6
6
  "n8ncommunity",