n8n-nodes-pilot-status 1.1.0 → 1.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Pilot Status - n8n Integration
2
2
 
3
- This is the official [n8n](https://n8n.io/) node for [Pilot Status](https://pilotstatus.online) — a WhatsApp transactional, marketing, and bulk messaging platform.
3
+ This is the official [n8n](https://n8n.io/) node for [Pilot Status](https://pilotstatus.com.br) — a WhatsApp transactional, marketing, and bulk messaging platform.
4
4
 
5
5
  With this integration, you can seamlessly connect your n8n workflows to Pilot Status to send messages, manage projects, connect WhatsApp numbers, and react to incoming messages or status changes in real time.
6
6
 
@@ -27,8 +27,8 @@ npm install n8n-nodes-pilot-status
27
27
 
28
28
  To use the Pilot Status node, you need an **API Key**.
29
29
 
30
- 1. Go to your [Pilot Status Dashboard](https://pilotstatus.online/api-keys).
31
- 2. Create a new API Key (you can choose between a `TEST` key or a `LIVE` key).
30
+ 1. Go to your [Pilot Status Dashboard](https://pilotstatus.com.br/api-keys).
31
+ 2. Create a new API Key.
32
32
  3. In n8n, add a new **Pilot Status API** credential and paste your API Key.
33
33
 
34
34
  *Note: TEST keys will only send messages to the WhatsApp number registered in your Pilot Status Profile.*
@@ -53,7 +53,7 @@ To use it:
53
53
  - **Message Reply:** Triggered when a user replies specifically to an automated message.
54
54
  - **Message Received:** Triggered when a general inbound message is received on your connected WhatsApp number.
55
55
  - **Group Message:** Triggered when an inbound group message is received (group subject is included when available).
56
- - **Opt-in Created:** Triggered when an opt-in is recorded (consent message received by the Pilot Status number).
56
+ - **Call Ringing / Call Connected / Call Ended / Call Missed / Call Permission Updated:** WhatsApp Business Calling events (`call.*`) — Meta Cloud API **and web (Pilot Status) numbers** (`call.permission_updated` is Meta-only). Payloads are **flat** (fields next to `event`, no `data` wrapper): `{ event, callId, externalCallId?, direction, status, from, to, timestamp, duration? }`; `duration` (seconds) appears on `call.ended` only when the call was answered. `externalCallId` is the provider call id (Meta `wacid...` or Evolution GO CallID).
57
57
 
58
58
  Webhook payload notes:
59
59
  - Customer webhook payloads do not include: `projectSlug`, `lastMessageId`. Optional `correlationId` (same as HTTP 202 when present) may appear on outbound status events and on `message.reply` / `message.received` when correlated to a prior send.
@@ -70,24 +70,36 @@ The **Pilot Status** node provides several resources and operations to manage yo
70
70
  ### 1. Message
71
71
  - **Send:** Send a template message (OTP, Utility, or Marketing). Choose **Phone Number** or **WhatsApp Group**; for groups use `groupId` (JID ending in `@g.us`) instead of `destinationNumber`. Optional dropdown loads groups from `GET /v1/groups` when the WhatsApp session is connected. Variables can be provided via JSON or the UI collection (including placeholders used in button labels).
72
72
  - **Get Status:** Retrieve the current status of a specific message using either its Pilot Status message id or WhatsApp provider id.
73
- - **Check Opt-In:** Check if a specific destination number has opted in to receive messages from your project (required for LIVE environments when using the Pilot Status shared number).
73
+ - **Get History:** Read the conversation history of the number, newest first — both directions, every provider, including messages imported from the device on connect. Filters by **Start Date** / **End Date** over the *provider* timestamp (when the message happened, not when it was ingested). This is how you fetch old messages: the webhook does not replay history by default. Requires a number-scoped API key.
74
74
 
75
75
  ### 2. Number
76
76
  - **Create:** Provision a new WhatsApp number instance. It returns a base64 QR Code and optional `pairingCode` (letter code) for WhatsApp “link a device”. By default, the number is linked to the API Key used in the request.
77
77
  - **Connect (QR + pairing code):** Regenerate QR and pairing code for an existing instance (only when not `OPEN`).
78
78
  - **Get Status:** Check the connection status of a WhatsApp instance (e.g., `CONNECTING`, `OPEN`).
79
+ - **Get:** Full detail of one number, including the `settings` block and — for official Meta numbers — the nested `meta` block.
80
+ - **Update Settings:** Per-number settings. This is the only settings endpoint: there is no `POST /numbers/{id}/settings`, and Evolution's `syncFullHistory` does not exist here. Partial — only the fields you add to the collection change.
81
+ - **History Import Enabled** / **Webhook Historical Messages** apply to every provider. The second is off by default: each reconnect replays up to 30 days of conversation, and your integration cannot tell it apart from new traffic (on the FREE plan it also consumes inbound quota). To *read* history, use Message → Get History.
82
+ - **Always Online**, **Reject Call**, **Reject Call Message**, **Read Messages**, **Ignore Groups**, **Ignore Status** are the Evolution GO advanced settings, in the GO dialect (`ignoreGroups`, not the v2 `groupsIgnore`). They are tri-state: *Inherit From Provider* leaves the field untouched, *Reset to Provider Default* clears the stored value. On a Meta number they are stored but never applied.
79
83
 
80
84
  ### 3. Project
81
85
  - **Create:** Programmatically create a new project in your workspace.
82
86
  - **Get Many:** List all projects associated with your account.
83
87
 
84
88
  ### 4. API Key
85
- - **Create:** Generate new API Keys. This is highly useful for SaaS platforms that want to generate a specific API Key for each of their clients dynamically.
86
- - **Get Many:** List existing API Keys.
89
+ - **Regenerate:** Regenerate the default API Key of a single WhatsApp number (tenant-scoped), identified by its `whatsappNumberId`. The previous key for that number is rotated and the new key is returned.
90
+ - **Get Many:** List API Keys. With a tenant key, this reveals every number's real API key.
87
91
 
88
92
  ### 5. Analytics
89
93
  - **Get Dashboard:** Retrieve your messaging statistics (Total Sent, Total Failed, Failure Rate, and Daily charts) based on your timezone.
90
94
 
95
+ ### 6. Call (WhatsApp Business Calling — Meta Cloud API + web/Pilot Status numbers)
96
+ - **Initiate:** Start a business-initiated voice call (BIC) — provide the destination phone. On **Meta** numbers also provide the SDP offer (RFC 8866) from your WebRTC client and a prior user call permission; BIC minutes are billed by **Meta directly on your WABA** (per minute, 6-second pulses, only when answered). On **web (Pilot Status) numbers** leave the SDP empty — media is handled server-side, no permission step and no Meta billing. Pilot Status does not charge for calls.
97
+ - **Terminate:** Hang up an active call by its Pilot Status id (`call_...`) or provider call id (Meta wacid / Evolution GO CallID).
98
+ - **Play** *(web numbers only)*: Play an audio file into an active call by public URL (`.mp3`/`.wav`/`.opus`). Queued and played on connect when the call is not active yet. Meta numbers return `400 FEATURE_NOT_SUPPORTED`.
99
+ - **Realtime Session** *(web numbers only)*: Open a short-lived full-duplex realtime media session — returns `{ wsUrl, token, expiresInSeconds }`. Connect a WebSocket to `wsUrl` and exchange **raw binary PCM16 LE audio frames** (plain WebSocket transport, NOT WebRTC; single-use token, ~2 minutes). `talk` sends and receives audio; `listen` only receives.
100
+ - **Get Settings / Update Settings** *(Meta only)*: Read the number's `calling` settings object or enable/disable calling.
101
+ - **Get Permission / Request Permission** *(Meta only)*: Check whether the business may call a user, and send the interactive call-permission request (inside the 24h service window). The user's reply arrives as the `call.permission_updated` webhook.
102
+
91
103
  ---
92
104
 
93
105
  ## 💡 Use Case Examples
@@ -103,7 +115,7 @@ Here are some ideas of what you can build with this integration:
103
115
 
104
116
  ## 📚 Documentation & Support
105
117
 
106
- - **API Documentation:** [https://pilotstatus.online/docs](https://pilotstatus.online/docs)
107
- - **Official Website:** [https://pilotstatus.online](https://pilotstatus.online)
118
+ - **API Documentation:** [https://pilotstatus.com.br/docs](https://pilotstatus.com.br/docs)
119
+ - **Official Website:** [https://pilotstatus.com.br](https://pilotstatus.com.br)
108
120
 
109
121
  If you have any questions or need help, feel free to reach out to our support via the dashboard!
@@ -5,7 +5,7 @@ class PilotStatusApi {
5
5
  constructor() {
6
6
  this.name = 'pilotStatusApi';
7
7
  this.displayName = 'Pilot Status API';
8
- this.documentationUrl = 'https://pilotstatus.online/docs';
8
+ this.documentationUrl = 'https://pilotstatus.com.br/docs';
9
9
  this.properties = [
10
10
  {
11
11
  displayName: 'API Key',
@@ -29,7 +29,7 @@ class PilotStatusApi {
29
29
  };
30
30
  this.test = {
31
31
  request: {
32
- baseURL: 'https://pilotstatus.online/v1',
32
+ baseURL: 'https://pilotstatus.com.br/v1',
33
33
  url: '/templates',
34
34
  },
35
35
  };
@@ -1,4 +1,10 @@
1
1
  import { ILoadOptionsFunctions, INodePropertyOptions, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
+ /**
3
+ * Tri-estado dos `advancedSettings` do Evolution GO. A API distingue `true`,
4
+ * `false` e `null` (= volta ao default do provider), e o `type: 'boolean'` do
5
+ * n8n só produz dois valores — daí strings + tradução no hidden normalizado.
6
+ */
7
+ export declare const GO_TRISTATE: INodePropertyOptions[];
2
8
  export declare class PilotStatus implements INodeType {
3
9
  methods: {
4
10
  loadOptions: {
@@ -1,6 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PilotStatus = void 0;
3
+ exports.PilotStatus = exports.GO_TRISTATE = void 0;
4
+ /**
5
+ * Tri-estado dos `advancedSettings` do Evolution GO. A API distingue `true`,
6
+ * `false` e `null` (= volta ao default do provider), e o `type: 'boolean'` do
7
+ * n8n só produz dois valores — daí strings + tradução no hidden normalizado.
8
+ */
9
+ exports.GO_TRISTATE = [
10
+ { name: 'Inherit From Provider', value: 'inherit', description: 'Leave this setting untouched' },
11
+ { name: 'On', value: 'on' },
12
+ { name: 'Off', value: 'off' },
13
+ { name: 'Reset to Provider Default', value: 'default', description: 'Clear the stored value (sends null)' },
14
+ ];
4
15
  class PilotStatus {
5
16
  constructor() {
6
17
  this.methods = {
@@ -8,7 +19,7 @@ class PilotStatus {
8
19
  async getTemplates() {
9
20
  const response = (await this.helpers.requestWithAuthentication.call(this, 'pilotStatusApi', {
10
21
  method: 'GET',
11
- baseURL: 'https://pilotstatus.online/v1',
22
+ baseURL: 'https://pilotstatus.com.br/v1',
12
23
  url: '/templates',
13
24
  json: true,
14
25
  }));
@@ -30,7 +41,7 @@ class PilotStatus {
30
41
  return [];
31
42
  const response = (await this.helpers.requestWithAuthentication.call(this, 'pilotStatusApi', {
32
43
  method: 'GET',
33
- baseURL: 'https://pilotstatus.online/v1',
44
+ baseURL: 'https://pilotstatus.com.br/v1',
34
45
  url: `/templates/${templateId}`,
35
46
  json: true,
36
47
  }));
@@ -40,7 +51,7 @@ class PilotStatus {
40
51
  async getGroups() {
41
52
  const response = (await this.helpers.requestWithAuthentication.call(this, 'pilotStatusApi', {
42
53
  method: 'GET',
43
- baseURL: 'https://pilotstatus.online/v1',
54
+ baseURL: 'https://pilotstatus.com.br/v1',
44
55
  url: '/groups',
45
56
  json: true,
46
57
  }));
@@ -52,7 +63,7 @@ class PilotStatus {
52
63
  async getNewsletters() {
53
64
  const response = (await this.helpers.requestWithAuthentication.call(this, 'pilotStatusApi', {
54
65
  method: 'GET',
55
- baseURL: 'https://pilotstatus.online/v1',
66
+ baseURL: 'https://pilotstatus.com.br/v1',
56
67
  url: '/newsletters',
57
68
  json: true,
58
69
  }));
@@ -83,7 +94,7 @@ class PilotStatus {
83
94
  },
84
95
  ],
85
96
  requestDefaults: {
86
- baseURL: 'https://pilotstatus.online/v1',
97
+ baseURL: 'https://pilotstatus.com.br/v1',
87
98
  headers: {
88
99
  Accept: 'application/json',
89
100
  'Content-Type': 'application/json',
@@ -97,6 +108,7 @@ class PilotStatus {
97
108
  noDataExpression: true,
98
109
  options: [
99
110
  { name: 'Message', value: 'message' },
111
+ { name: 'Media', value: 'media' },
100
112
  { name: 'Project', value: 'project' },
101
113
  { name: 'API Key', value: 'apiKey' },
102
114
  { name: 'Number', value: 'number' },
@@ -104,6 +116,8 @@ class PilotStatus {
104
116
  { name: 'Group', value: 'group' },
105
117
  { name: 'Newsletter', value: 'newsletter' },
106
118
  { name: 'Analytics', value: 'analytics' },
119
+ { name: 'Remote Pairing', value: 'remotePairing' },
120
+ { name: 'Call', value: 'call' },
107
121
  ],
108
122
  default: 'message',
109
123
  },
@@ -182,9 +196,12 @@ class PilotStatus {
182
196
  variables[entry.name] = String((_b = entry.value) !== null && _b !== void 0 ? _b : '');
183
197
  }
184
198
  }
199
+ // reason: defensive re-guard — requestOptions.body is already an object here (set above by the first guard / destination handling), so this branch is unreachable.
200
+ /* v8 ignore start */
185
201
  if (!requestOptions.body || typeof requestOptions.body !== 'object') {
186
202
  requestOptions.body = {};
187
203
  }
204
+ /* v8 ignore stop */
188
205
  requestOptions.body['variables'] = variables;
189
206
  return requestOptions;
190
207
  },
@@ -202,15 +219,36 @@ class PilotStatus {
202
219
  },
203
220
  },
204
221
  {
205
- name: 'Check Opt-In',
206
- value: 'checkOptIn',
207
- description: 'Check opt-in status for a number',
208
- action: 'Check opt in status for a number',
222
+ name: 'Get History',
223
+ value: 'getHistory',
224
+ description: 'Read the conversation history of the number, newest first — both directions, every provider, including messages imported from the device on connect. This is how you fetch old messages: the webhook does not replay history by default. Filters by the PROVIDER timestamp (when the message happened), not by ingestion time. Requires a number-scoped API key.',
225
+ action: 'Get message history',
209
226
  routing: {
210
- request: {
211
- method: 'GET',
212
- url: '/messages/opt-in',
213
- qs: { destinationNumber: '={{$parameter.destinationNumber}}' },
227
+ request: { method: 'GET', url: '/messages/history' },
228
+ },
229
+ },
230
+ {
231
+ name: 'Cancel',
232
+ value: 'cancel',
233
+ description: 'Cancel scheduled messages',
234
+ action: 'Cancel messages',
235
+ routing: {
236
+ request: { method: 'DELETE', url: '/messages/cancel' },
237
+ send: {
238
+ preSend: [
239
+ async function (requestOptions) {
240
+ const raw = this.getNodeParameter('messageIds');
241
+ const ids = raw
242
+ .split(',')
243
+ .map((s) => s.trim())
244
+ .filter((s) => s);
245
+ if (!requestOptions.body || typeof requestOptions.body !== 'object') {
246
+ requestOptions.body = {};
247
+ }
248
+ requestOptions.body['messageIds'] = ids;
249
+ return requestOptions;
250
+ },
251
+ ],
214
252
  },
215
253
  },
216
254
  },
@@ -225,7 +263,7 @@ class PilotStatus {
225
263
  typeOptions: { loadOptionsMethod: 'getTemplates' },
226
264
  displayOptions: { show: { resource: ['message'], operation: ['send'] } },
227
265
  default: '',
228
- required: true,
266
+ required: false,
229
267
  routing: { send: { type: 'body', property: 'templateId' } },
230
268
  },
231
269
  {
@@ -257,18 +295,6 @@ class PilotStatus {
257
295
  required: true,
258
296
  routing: { send: { type: 'body', property: 'destinationNumber' } },
259
297
  },
260
- {
261
- displayName: 'Destination Number',
262
- name: 'destinationNumber',
263
- type: 'string',
264
- description: 'E.164 format (e.g. +5511999999999)',
265
- displayOptions: {
266
- show: { resource: ['message'], operation: ['checkOptIn'] },
267
- },
268
- default: '',
269
- required: true,
270
- routing: { send: { type: 'query', property: 'destinationNumber' } },
271
- },
272
298
  {
273
299
  displayName: 'Group ID',
274
300
  name: 'groupId',
@@ -278,7 +304,7 @@ class PilotStatus {
278
304
  },
279
305
  default: '',
280
306
  required: true,
281
- description: 'ID do grupo (@g.us)',
307
+ description: 'ID do grupo (JID terminando em @g.us). Funciona para números não oficiais e para números Meta Cloud API (Official Business Account aprovado) — para Meta o JID é o pseudo-JID <META_GROUP_ID>@g.us.',
282
308
  routing: { send: { type: 'body', property: 'groupId' } },
283
309
  },
284
310
  {
@@ -414,8 +440,95 @@ class PilotStatus {
414
440
  default: '',
415
441
  description: 'JSON array of button objects (reply, url, call, copy)',
416
442
  },
443
+ {
444
+ displayName: 'Text',
445
+ name: 'text',
446
+ type: 'string',
447
+ default: '',
448
+ description: 'Free-form message body text (used without templateId)',
449
+ },
450
+ {
451
+ displayName: 'Header Type',
452
+ name: 'headerType',
453
+ type: 'options',
454
+ options: [
455
+ { name: 'Text', value: 'text' },
456
+ { name: 'Image', value: 'image' },
457
+ { name: 'Video', value: 'video' },
458
+ { name: 'Document', value: 'document' },
459
+ ],
460
+ default: 'text',
461
+ description: 'Type of header for free-form message',
462
+ },
463
+ {
464
+ displayName: 'Header Content',
465
+ name: 'headerContent',
466
+ type: 'string',
467
+ default: '',
468
+ description: 'Header content (text string or URL for image/video/document)',
469
+ },
470
+ {
471
+ displayName: 'Footer',
472
+ name: 'footer',
473
+ type: 'string',
474
+ default: '',
475
+ description: 'Footer text for free-form message',
476
+ },
417
477
  ],
418
478
  },
479
+ // Message: Get History — filtros (query string, não body)
480
+ {
481
+ displayName: 'Start Date',
482
+ name: 'historyStartDate',
483
+ type: 'dateTime',
484
+ displayOptions: { show: { resource: ['message'], operation: ['getHistory'] } },
485
+ default: '',
486
+ description: 'Only messages at or after this instant. Compared against the provider timestamp — when the message happened, not when it was ingested.',
487
+ },
488
+ {
489
+ displayName: 'End Date',
490
+ name: 'historyEndDate',
491
+ type: 'dateTime',
492
+ displayOptions: { show: { resource: ['message'], operation: ['getHistory'] } },
493
+ default: '',
494
+ description: 'Only messages at or before this instant. Must not precede Start Date.',
495
+ },
496
+ {
497
+ displayName: 'Page',
498
+ name: 'historyPage',
499
+ type: 'number',
500
+ typeOptions: { minValue: 1 },
501
+ displayOptions: { show: { resource: ['message'], operation: ['getHistory'] } },
502
+ default: 1,
503
+ routing: { send: { type: 'query', property: 'page' } },
504
+ },
505
+ {
506
+ displayName: 'Page Size',
507
+ name: 'historyPageSize',
508
+ type: 'number',
509
+ typeOptions: { minValue: 1, maxValue: 100 },
510
+ displayOptions: { show: { resource: ['message'], operation: ['getHistory'] } },
511
+ default: 30,
512
+ description: 'Items per page (max 100)',
513
+ routing: { send: { type: 'query', property: 'pageSize' } },
514
+ },
515
+ // A API espera ISO 8601; o picker do n8n entrega outro formato.
516
+ {
517
+ displayName: 'Start Date',
518
+ name: 'historyStartDateNormalized',
519
+ type: 'hidden',
520
+ displayOptions: { show: { resource: ['message'], operation: ['getHistory'] } },
521
+ default: '={{ $parameter.historyStartDate ? new Date($parameter.historyStartDate).toISOString() : undefined }}',
522
+ routing: { send: { type: 'query', property: 'startDate' } },
523
+ },
524
+ {
525
+ displayName: 'End Date',
526
+ name: 'historyEndDateNormalized',
527
+ type: 'hidden',
528
+ displayOptions: { show: { resource: ['message'], operation: ['getHistory'] } },
529
+ default: '={{ $parameter.historyEndDate ? new Date($parameter.historyEndDate).toISOString() : undefined }}',
530
+ routing: { send: { type: 'query', property: 'endDate' } },
531
+ },
419
532
  // Hidden fields para deliverAt / deliverUntil normalizados
420
533
  {
421
534
  displayName: 'Deliver At',
@@ -473,6 +586,30 @@ class PilotStatus {
473
586
  default: '={{ $parameter.additionalFields?.buttons ? (() => { try { return JSON.parse($parameter.additionalFields.buttons); } catch { return undefined; } })() : undefined }}',
474
587
  routing: { send: { type: 'body', property: 'buttons' } },
475
588
  },
589
+ {
590
+ displayName: 'Text',
591
+ name: 'textNormalized',
592
+ type: 'hidden',
593
+ displayOptions: { show: { resource: ['message'], operation: ['send'] } },
594
+ default: '={{ $parameter.additionalFields?.text || undefined }}',
595
+ routing: { send: { type: 'body', property: 'text' } },
596
+ },
597
+ {
598
+ displayName: 'Header',
599
+ name: 'headerNormalized',
600
+ type: 'hidden',
601
+ displayOptions: { show: { resource: ['message'], operation: ['send'] } },
602
+ default: '={{ $parameter.additionalFields?.headerContent ? { type: $parameter.additionalFields.headerType || "text", content: $parameter.additionalFields.headerContent } : undefined }}',
603
+ routing: { send: { type: 'body', property: 'header' } },
604
+ },
605
+ {
606
+ displayName: 'Footer',
607
+ name: 'footerNormalized',
608
+ type: 'hidden',
609
+ displayOptions: { show: { resource: ['message'], operation: ['send'] } },
610
+ default: '={{ $parameter.additionalFields?.footer || undefined }}',
611
+ routing: { send: { type: 'body', property: 'footer' } },
612
+ },
476
613
  // Message: Get Status
477
614
  {
478
615
  displayName: 'Message ID',
@@ -483,6 +620,67 @@ class PilotStatus {
483
620
  default: '',
484
621
  required: true,
485
622
  },
623
+ // Message: Cancel
624
+ {
625
+ displayName: 'Message IDs',
626
+ name: 'messageIds',
627
+ type: 'string',
628
+ description: 'Comma-separated message IDs to cancel (1-100)',
629
+ displayOptions: { show: { resource: ['message'], operation: ['cancel'] } },
630
+ default: '',
631
+ required: true,
632
+ placeholder: 'id1,id2,id3',
633
+ },
634
+ // ----------------------------------
635
+ // Media Operations
636
+ // ----------------------------------
637
+ {
638
+ displayName: 'Operation',
639
+ name: 'operation',
640
+ type: 'options',
641
+ noDataExpression: true,
642
+ displayOptions: { show: { resource: ['media'] } },
643
+ options: [
644
+ {
645
+ name: 'Download',
646
+ value: 'download',
647
+ description: 'Download inbound media as base64',
648
+ action: 'Download inbound media',
649
+ routing: {
650
+ request: {
651
+ method: 'GET',
652
+ url: '=/media/{{$parameter.mediaId}}',
653
+ },
654
+ },
655
+ },
656
+ ],
657
+ default: 'download',
658
+ },
659
+ // Media: Download
660
+ {
661
+ displayName: 'Media ID',
662
+ name: 'mediaId',
663
+ type: 'string',
664
+ description: 'Meta media object ID from inbound webhook payload',
665
+ displayOptions: { show: { resource: ['media'], operation: ['download'] } },
666
+ default: '',
667
+ required: true,
668
+ },
669
+ {
670
+ displayName: 'Phone Number ID',
671
+ name: 'phoneNumberId',
672
+ type: 'string',
673
+ description: 'Meta Phone Number ID that received the message (from webhook payload)',
674
+ displayOptions: { show: { resource: ['media'], operation: ['download'] } },
675
+ default: '',
676
+ required: true,
677
+ routing: {
678
+ send: {
679
+ type: 'query',
680
+ property: 'phoneNumberId',
681
+ },
682
+ },
683
+ },
486
684
  // ----------------------------------
487
685
  // Project Operations
488
686
  // ----------------------------------
@@ -538,16 +736,16 @@ class PilotStatus {
538
736
  displayOptions: { show: { resource: ['apiKey'] } },
539
737
  options: [
540
738
  {
541
- name: 'Create',
542
- value: 'create',
543
- description: 'Create a new API Key',
544
- action: 'Create an api key',
739
+ name: 'Regenerate',
740
+ value: 'regenerate',
741
+ description: "Regenerate a number's default API key (tenant-scoped)",
742
+ action: 'Regenerate an api key',
545
743
  routing: { request: { method: 'POST', url: '/api-keys' } },
546
744
  },
547
745
  {
548
746
  name: 'Get Many',
549
747
  value: 'getAll',
550
- description: 'Get many API Keys',
748
+ description: "Get many API Keys — one entry per number (the most recently created key), with the real key revealed when the credential is tenant-scoped. Older keys of the same number are not listed, but they keep working.",
551
749
  action: 'Get many api keys',
552
750
  routing: { request: { method: 'GET', url: '/api-keys' } },
553
751
  },
@@ -555,21 +753,14 @@ class PilotStatus {
555
753
  default: 'getAll',
556
754
  },
557
755
  {
558
- displayName: 'Name',
559
- name: 'name',
756
+ displayName: 'WhatsApp Number ID',
757
+ name: 'whatsappNumberId',
560
758
  type: 'string',
561
- displayOptions: { show: { resource: ['apiKey'], operation: ['create'] } },
562
- default: '',
563
759
  required: true,
564
- routing: { send: { type: 'body', property: 'name' } },
565
- },
566
- {
567
- displayName: 'Retention Days',
568
- name: 'retentionDays',
569
- type: 'number',
570
- displayOptions: { show: { resource: ['apiKey'], operation: ['create'] } },
571
- default: 3650,
572
- routing: { send: { type: 'body', property: 'retentionDays' } },
760
+ displayOptions: { show: { resource: ['apiKey'], operation: ['regenerate'] } },
761
+ default: '',
762
+ description: 'ID of the WhatsApp number whose default API key to regenerate',
763
+ routing: { send: { type: 'body', property: 'whatsappNumberId' } },
573
764
  },
574
765
  // ----------------------------------
575
766
  // Number Operations
@@ -591,7 +782,7 @@ class PilotStatus {
591
782
  {
592
783
  name: 'Get Status',
593
784
  value: 'getStatus',
594
- description: 'Get connection status of a number',
785
+ description: 'Get connection status of a number. Returns state plus stale — when true the provider did not answer and this is the last known value (lastKnownAt); when false it is a live reading (checkedAt). On failure the body carries code: PROVIDER_NOT_CONFIGURED is permanent (stop polling), UPSTREAM_TIMEOUT/UPSTREAM_ERROR are transient (retry).',
595
786
  action: 'Get status of a number',
596
787
  routing: { request: { method: 'GET', url: '=/numbers/{{$parameter.numberId}}/status' } },
597
788
  },
@@ -616,6 +807,20 @@ class PilotStatus {
616
807
  action: 'Remote pairing a number',
617
808
  routing: { request: { method: 'POST', url: '/numbers/remote-pairing' } },
618
809
  },
810
+ {
811
+ name: 'Get',
812
+ value: 'get',
813
+ description: 'Full detail of one number, including the settings block (history + Evolution GO advanced settings) and, for official Meta numbers, the nested meta block',
814
+ action: 'Get a number',
815
+ routing: { request: { method: 'GET', url: '=/numbers/{{$parameter.numberId}}' } },
816
+ },
817
+ {
818
+ name: 'Update Settings',
819
+ value: 'updateSettings',
820
+ description: 'Change per-number settings. This is the ONLY settings endpoint — there is no POST /numbers/{id}/settings, and Evolution syncFullHistory does not exist here (use History Import Enabled). Partial: only the fields you fill in change.',
821
+ action: 'Update settings of a number',
822
+ routing: { request: { method: 'PATCH', url: '=/numbers/{{$parameter.numberId}}' } },
823
+ },
619
824
  ],
620
825
  default: 'create',
621
826
  },
@@ -638,31 +843,123 @@ class PilotStatus {
638
843
  description: 'E.164 format (e.g. +5511999999999)',
639
844
  routing: { send: { type: 'body', property: 'number' } },
640
845
  },
641
- {
642
- displayName: 'Link to API Key',
643
- name: 'linkToApiKey',
644
- type: 'boolean',
645
- displayOptions: { show: { resource: ['number'], operation: ['create', 'remotePairing'] } },
646
- default: true,
647
- routing: { send: { type: 'body', property: 'linkToApiKey' } },
648
- },
649
- {
650
- displayName: 'Send via WhatsApp',
651
- name: 'sendViaWhatsApp',
652
- type: 'boolean',
653
- displayOptions: { show: { resource: ['number'], operation: ['remotePairing'] } },
654
- default: false,
655
- description: 'Whether to send the pairing code via WhatsApp message',
656
- routing: { send: { type: 'body', property: 'sendViaWhatsApp' } },
657
- },
846
+ // Removed: 'Link to API Key' (linkToApiKey) and 'Send via WhatsApp'
847
+ // (sendViaWhatsApp). Both were toggles that no longer do anything.
848
+ // linkToApiKey used to re-point the calling key at the new number, silently
849
+ // unscoping it from the number it was bound to — it is retired server-side
850
+ // and `linkedApiKeyId` always comes back null. sendViaWhatsApp no longer
851
+ // delivers the link; the endpoint hands back `remotePairingUrl` for the
852
+ // workflow to deliver. Both fields are still ACCEPTED by the API, so any
853
+ // saved workflow that carries them keeps running unchanged.
658
854
  {
659
855
  displayName: 'Number Instance ID',
660
856
  name: 'numberId',
661
857
  type: 'string',
662
- displayOptions: { show: { resource: ['number'], operation: ['getStatus', 'connect', 'delete'] } },
858
+ displayOptions: {
859
+ show: {
860
+ resource: ['number'],
861
+ operation: ['getStatus', 'connect', 'delete', 'get', 'updateSettings'],
862
+ },
863
+ },
663
864
  default: '',
664
865
  required: true,
665
866
  },
867
+ // Number: Update Settings
868
+ //
869
+ // Os seis campos do Evolution GO são tri-estado (true / false / herdar do
870
+ // provider), e `type: 'boolean'` do n8n não produz null — por isso são
871
+ // `options` com strings, traduzidas no hidden normalizado abaixo. Deixar de
872
+ // fora do collection é o que mantém o PATCH parcial: campo não preenchido
873
+ // não vai no corpo e portanto não é alterado.
874
+ {
875
+ displayName: 'Settings',
876
+ name: 'numberSettings',
877
+ type: 'collection',
878
+ placeholder: 'Add setting',
879
+ displayOptions: { show: { resource: ['number'], operation: ['updateSettings'] } },
880
+ default: {},
881
+ options: [
882
+ {
883
+ displayName: 'History Import Enabled',
884
+ name: 'historyImportEnabled',
885
+ type: 'boolean',
886
+ default: true,
887
+ description: 'Whether to import the history the provider dumps on connect (up to 30 days back) into the chat. Applies to every provider.',
888
+ },
889
+ {
890
+ displayName: 'Webhook Historical Messages',
891
+ name: 'webhookHistoricalMessages',
892
+ type: 'boolean',
893
+ default: false,
894
+ description: 'Whether to DELIVER those historical messages to your webhooks. Off by default: every reconnect replays the history and your integration cannot tell it apart from new traffic. To read history use the Message → Get History operation instead.',
895
+ },
896
+ {
897
+ displayName: 'Always Online',
898
+ name: 'alwaysOnline',
899
+ type: 'options',
900
+ options: exports.GO_TRISTATE,
901
+ default: 'inherit',
902
+ description: 'Keep the WhatsApp presence permanently online. Evolution GO only.',
903
+ },
904
+ {
905
+ displayName: 'Reject Call',
906
+ name: 'rejectCall',
907
+ type: 'options',
908
+ options: exports.GO_TRISTATE,
909
+ default: 'inherit',
910
+ description: 'Auto-reject incoming calls. Evolution GO only.',
911
+ },
912
+ {
913
+ displayName: 'Reject Call Message',
914
+ name: 'msgRejectCall',
915
+ type: 'string',
916
+ typeOptions: { maxValue: 1000 },
917
+ default: '',
918
+ description: 'Text replied when a call is rejected (max 1000 chars). Leave empty to keep the current value; use Reset Reject Call Message to clear it. Evolution GO only.',
919
+ },
920
+ {
921
+ displayName: 'Reset Reject Call Message',
922
+ name: 'msgRejectCallReset',
923
+ type: 'boolean',
924
+ default: false,
925
+ description: 'Whether to reset the reject-call message to the provider default. Wins over Reject Call Message.',
926
+ },
927
+ {
928
+ displayName: 'Read Messages',
929
+ name: 'readMessages',
930
+ type: 'options',
931
+ options: exports.GO_TRISTATE,
932
+ default: 'inherit',
933
+ description: 'Mark every received message as read. Evolution GO only.',
934
+ },
935
+ {
936
+ displayName: 'Ignore Groups',
937
+ name: 'ignoreGroups',
938
+ type: 'options',
939
+ options: exports.GO_TRISTATE,
940
+ default: 'inherit',
941
+ description: 'Drop group messages inside the provider. GO dialect (ignoreGroups), not the v2 groupsIgnore. Setting it explicitly beats the value derived from your group webhook subscriptions. Evolution GO only.',
942
+ },
943
+ {
944
+ displayName: 'Ignore Status',
945
+ name: 'ignoreStatus',
946
+ type: 'options',
947
+ options: exports.GO_TRISTATE,
948
+ default: 'inherit',
949
+ description: 'Drop status/stories updates. Evolution GO only.',
950
+ },
951
+ ],
952
+ },
953
+ {
954
+ displayName: 'Settings',
955
+ name: 'settingsNormalized',
956
+ type: 'hidden',
957
+ displayOptions: { show: { resource: ['number'], operation: ['updateSettings'] } },
958
+ // `|| undefined` no fim: um `settings: {}` seria rejeitado com 400
959
+ // EMPTY_PATCH pelo servidor.
960
+ default: '={{ (() => { const c = $parameter.numberSettings || {}; const out = {}; if (c.historyImportEnabled !== undefined) out.historyImportEnabled = c.historyImportEnabled; if (c.webhookHistoricalMessages !== undefined) out.webhookHistoricalMessages = c.webhookHistoricalMessages; for (const k of ["alwaysOnline","rejectCall","readMessages","ignoreGroups","ignoreStatus"]) { const v = c[k]; if (v === "on") out[k] = true; else if (v === "off") out[k] = false; else if (v === "default") out[k] = null; } if (c.msgRejectCallReset === true) out.msgRejectCall = null; else if (c.msgRejectCall) out.msgRejectCall = c.msgRejectCall; return Object.keys(out).length ? out : undefined; })() }}',
961
+ routing: { send: { type: 'body', property: 'settings' } },
962
+ },
666
963
  // ----------------------------------
667
964
  // Template Operations
668
965
  // ----------------------------------
@@ -767,6 +1064,260 @@ class PilotStatus {
767
1064
  description: 'IANA timezone (e.g. America/Sao_Paulo)',
768
1065
  routing: { send: { type: 'query', property: 'tz' } },
769
1066
  },
1067
+ // ----------------------------------
1068
+ // Remote Pairing Operations
1069
+ // ----------------------------------
1070
+ {
1071
+ displayName: 'Operation',
1072
+ name: 'operation',
1073
+ type: 'options',
1074
+ noDataExpression: true,
1075
+ displayOptions: { show: { resource: ['remotePairing'] } },
1076
+ options: [
1077
+ {
1078
+ name: 'Get Info',
1079
+ value: 'getInfo',
1080
+ description: 'Get remote pairing info by token',
1081
+ action: 'Get remote pairing info',
1082
+ routing: { request: { method: 'GET', url: '=/remote-pairing/{{$parameter.pairingToken}}' } },
1083
+ },
1084
+ {
1085
+ name: 'Get Status',
1086
+ value: 'getStatus',
1087
+ description: 'Get remote pairing connection status',
1088
+ action: 'Get remote pairing status',
1089
+ routing: { request: { method: 'GET', url: '=/remote-pairing/{{$parameter.pairingToken}}/status' } },
1090
+ },
1091
+ {
1092
+ name: 'Connect',
1093
+ value: 'connect',
1094
+ description: 'Initiate remote pairing connection (generate QR/pairing code)',
1095
+ action: 'Connect remote pairing',
1096
+ routing: { request: { method: 'POST', url: '=/remote-pairing/{{$parameter.pairingToken}}/connect' } },
1097
+ },
1098
+ ],
1099
+ default: 'getInfo',
1100
+ },
1101
+ {
1102
+ displayName: 'Pairing Token',
1103
+ name: 'pairingToken',
1104
+ type: 'string',
1105
+ displayOptions: { show: { resource: ['remotePairing'] } },
1106
+ default: '',
1107
+ required: true,
1108
+ description: 'The remote pairing token',
1109
+ },
1110
+ // ----------------------------------
1111
+ // Call Operations (WhatsApp Business Calling — Meta Cloud API + web/Pilot Status numbers;
1112
+ // settings/permissions are Meta-only, Play/Realtime Session are web-only)
1113
+ // ----------------------------------
1114
+ {
1115
+ displayName: 'Operation',
1116
+ name: 'operation',
1117
+ type: 'options',
1118
+ noDataExpression: true,
1119
+ displayOptions: { show: { resource: ['call'] } },
1120
+ options: [
1121
+ {
1122
+ name: 'Initiate',
1123
+ value: 'initiate',
1124
+ description: 'Start a business-initiated voice call (BIC). Meta numbers: requires the SDP offer and a prior user call permission; BIC minutes are billed by Meta directly on the WABA (6s pulses, only when answered). Web (Pilot Status) numbers: no SDP, no permission step and no Meta billing. Pilot Status does not charge.',
1125
+ action: 'Initiate a call',
1126
+ routing: { request: { method: 'POST', url: '/calls' } },
1127
+ },
1128
+ {
1129
+ name: 'Terminate',
1130
+ value: 'terminate',
1131
+ description: 'Hang up an active call',
1132
+ action: 'Terminate a call',
1133
+ routing: {
1134
+ request: { method: 'POST', url: '=/calls/{{$parameter.callId}}/terminate' },
1135
+ },
1136
+ },
1137
+ {
1138
+ name: 'Play',
1139
+ value: 'play',
1140
+ description: 'Play an audio file into an active call by URL (.mp3/.wav/.opus). Web (Pilot Status) numbers only — Meta numbers return 400 FEATURE_NOT_SUPPORTED. Queued and played on connect when the call is not active yet.',
1141
+ action: 'Play audio into a call',
1142
+ routing: {
1143
+ request: { method: 'POST', url: '=/calls/{{$parameter.callId}}/play' },
1144
+ },
1145
+ },
1146
+ {
1147
+ name: 'Realtime Session',
1148
+ value: 'realtimeSession',
1149
+ description: 'Open a short-lived full-duplex realtime media session on an active call. Web (Pilot Status) numbers only. Returns { wsUrl, token, expiresInSeconds }: connect a WebSocket to wsUrl and exchange raw binary PCM16 LE audio frames (NOT WebRTC; single-use token, ~2 min).',
1150
+ action: 'Open a realtime media session',
1151
+ routing: {
1152
+ request: { method: 'POST', url: '=/calls/{{$parameter.callId}}/realtime-session' },
1153
+ },
1154
+ },
1155
+ {
1156
+ name: 'Get Settings',
1157
+ value: 'getSettings',
1158
+ description: "Read the number's calling settings (the Meta calling object). Meta numbers only.",
1159
+ action: 'Get calling settings',
1160
+ routing: { request: { method: 'GET', url: '/calls/settings' } },
1161
+ },
1162
+ {
1163
+ name: 'Update Settings',
1164
+ value: 'updateSettings',
1165
+ description: 'Enable/disable calling on the number (partial settings update). Meta numbers only.',
1166
+ action: 'Update calling settings',
1167
+ routing: { request: { method: 'PUT', url: '/calls/settings' } },
1168
+ },
1169
+ {
1170
+ name: 'Get Permission',
1171
+ value: 'getPermission',
1172
+ description: 'Check whether the business may call a user (required before Initiate on Meta numbers). Meta numbers only.',
1173
+ action: 'Get call permission',
1174
+ routing: { request: { method: 'GET', url: '/calls/permissions' } },
1175
+ },
1176
+ {
1177
+ name: 'Request Permission',
1178
+ value: 'requestPermission',
1179
+ description: 'Send the interactive call-permission request to a user (inside the 24h service window). Meta numbers only.',
1180
+ action: 'Request call permission',
1181
+ routing: { request: { method: 'POST', url: '/calls/permissions/request' } },
1182
+ },
1183
+ ],
1184
+ default: 'getSettings',
1185
+ },
1186
+ // Call: Initiate
1187
+ {
1188
+ displayName: 'To',
1189
+ name: 'callTo',
1190
+ type: 'string',
1191
+ description: 'User phone to call (E.164, e.g. +5511999999999)',
1192
+ displayOptions: { show: { resource: ['call'], operation: ['initiate'] } },
1193
+ default: '',
1194
+ required: true,
1195
+ routing: { send: { type: 'body', property: 'to' } },
1196
+ },
1197
+ {
1198
+ displayName: 'SDP Offer',
1199
+ name: 'callSdp',
1200
+ type: 'string',
1201
+ typeOptions: { rows: 4 },
1202
+ description: 'SDP offer (RFC 8866) produced by your WebRTC client — REQUIRED for Meta Cloud API numbers (business-side SDP must use a=setup:active; media flows browser↔WhatsApp directly). LEAVE EMPTY for web (Pilot Status) numbers: their call media is handled server-side (no SDP).',
1203
+ displayOptions: { show: { resource: ['call'], operation: ['initiate'] } },
1204
+ default: '',
1205
+ },
1206
+ {
1207
+ displayName: 'SDP Offer',
1208
+ name: 'callSdpNormalized',
1209
+ type: 'hidden',
1210
+ displayOptions: { show: { resource: ['call'], operation: ['initiate'] } },
1211
+ default: '={{ $parameter.callSdp || undefined }}',
1212
+ routing: { send: { type: 'body', property: 'sdp' } },
1213
+ },
1214
+ {
1215
+ displayName: 'Opaque Callback Data',
1216
+ name: 'callBizOpaqueCallbackData',
1217
+ type: 'string',
1218
+ description: 'Optional opaque data echoed back on the call.ended webhook',
1219
+ displayOptions: { show: { resource: ['call'], operation: ['initiate'] } },
1220
+ default: '',
1221
+ },
1222
+ {
1223
+ displayName: 'Opaque Callback Data',
1224
+ name: 'callBizOpaqueCallbackDataNormalized',
1225
+ type: 'hidden',
1226
+ displayOptions: { show: { resource: ['call'], operation: ['initiate'] } },
1227
+ default: '={{ $parameter.callBizOpaqueCallbackData || undefined }}',
1228
+ routing: { send: { type: 'body', property: 'bizOpaqueCallbackData' } },
1229
+ },
1230
+ // Call: Terminate / Play / Realtime Session
1231
+ {
1232
+ displayName: 'Call ID',
1233
+ name: 'callId',
1234
+ type: 'string',
1235
+ description: 'The Pilot Status call id (call_...) OR the provider call id (Meta wacid / Evolution GO CallID)',
1236
+ displayOptions: {
1237
+ show: { resource: ['call'], operation: ['terminate', 'play', 'realtimeSession'] },
1238
+ },
1239
+ default: '',
1240
+ required: true,
1241
+ },
1242
+ // Call: Play
1243
+ {
1244
+ displayName: 'Media URL',
1245
+ name: 'callMediaUrl',
1246
+ type: 'string',
1247
+ description: 'Public http(s) URL of the audio file to play into the call (.mp3, .wav or .opus)',
1248
+ displayOptions: { show: { resource: ['call'], operation: ['play'] } },
1249
+ default: '',
1250
+ required: true,
1251
+ routing: { send: { type: 'body', property: 'mediaUrl' } },
1252
+ },
1253
+ // Call: Realtime Session
1254
+ {
1255
+ displayName: 'Mode',
1256
+ name: 'callRealtimeMode',
1257
+ type: 'options',
1258
+ options: [
1259
+ { name: 'Talk (send mic + receive)', value: 'talk' },
1260
+ { name: 'Listen (receive only)', value: 'listen' },
1261
+ ],
1262
+ description: 'talk sends your audio AND receives the peer audio; listen only receives. The returned wsUrl speaks raw binary PCM16 LE frames over WebSocket.',
1263
+ displayOptions: { show: { resource: ['call'], operation: ['realtimeSession'] } },
1264
+ default: 'talk',
1265
+ required: true,
1266
+ routing: { send: { type: 'body', property: 'mode' } },
1267
+ },
1268
+ // Call: Update Settings
1269
+ {
1270
+ displayName: 'Status',
1271
+ name: 'callSettingsStatus',
1272
+ type: 'options',
1273
+ options: [
1274
+ { name: 'Enabled', value: 'ENABLED' },
1275
+ { name: 'Disabled', value: 'DISABLED' },
1276
+ ],
1277
+ description: 'Enable or disable WhatsApp calling on the number',
1278
+ displayOptions: { show: { resource: ['call'], operation: ['updateSettings'] } },
1279
+ default: 'ENABLED',
1280
+ required: true,
1281
+ routing: { send: { type: 'body', property: 'status' } },
1282
+ },
1283
+ // Call: Get Permission
1284
+ {
1285
+ displayName: 'To',
1286
+ name: 'callPermissionTo',
1287
+ type: 'string',
1288
+ description: 'User phone to probe (E.164)',
1289
+ displayOptions: { show: { resource: ['call'], operation: ['getPermission'] } },
1290
+ default: '',
1291
+ required: true,
1292
+ routing: { send: { type: 'query', property: 'to' } },
1293
+ },
1294
+ // Call: Request Permission
1295
+ {
1296
+ displayName: 'To',
1297
+ name: 'callPermissionRequestTo',
1298
+ type: 'string',
1299
+ description: 'User phone (E.164)',
1300
+ displayOptions: { show: { resource: ['call'], operation: ['requestPermission'] } },
1301
+ default: '',
1302
+ required: true,
1303
+ routing: { send: { type: 'body', property: 'to' } },
1304
+ },
1305
+ {
1306
+ displayName: 'Text',
1307
+ name: 'callPermissionText',
1308
+ type: 'string',
1309
+ description: 'Optional reason shown on the permission request',
1310
+ displayOptions: { show: { resource: ['call'], operation: ['requestPermission'] } },
1311
+ default: '',
1312
+ },
1313
+ {
1314
+ displayName: 'Text',
1315
+ name: 'callPermissionTextNormalized',
1316
+ type: 'hidden',
1317
+ displayOptions: { show: { resource: ['call'], operation: ['requestPermission'] } },
1318
+ default: '={{ $parameter.callPermissionText || undefined }}',
1319
+ routing: { send: { type: 'body', property: 'text' } },
1320
+ },
770
1321
  ],
771
1322
  };
772
1323
  }
@@ -65,10 +65,6 @@ class PilotStatusTrigger {
65
65
  name: 'Newsletter Message',
66
66
  value: 'message.newsletter',
67
67
  },
68
- {
69
- name: 'Opt-in Created',
70
- value: 'optin.created',
71
- },
72
68
  {
73
69
  name: 'Number Created',
74
70
  value: 'number.created',
@@ -85,6 +81,26 @@ class PilotStatusTrigger {
85
81
  name: 'Number Removed',
86
82
  value: 'number.removed',
87
83
  },
84
+ {
85
+ name: 'Call Ringing',
86
+ value: 'call.ringing',
87
+ },
88
+ {
89
+ name: 'Call Connected',
90
+ value: 'call.connected',
91
+ },
92
+ {
93
+ name: 'Call Ended',
94
+ value: 'call.ended',
95
+ },
96
+ {
97
+ name: 'Call Missed',
98
+ value: 'call.missed',
99
+ },
100
+ {
101
+ name: 'Call Permission Updated',
102
+ value: 'call.permission_updated',
103
+ },
88
104
  ],
89
105
  default: '*',
90
106
  description: 'The event to listen to',
@@ -101,7 +117,7 @@ class PilotStatusTrigger {
101
117
  name: 'payloadNotice',
102
118
  type: 'notice',
103
119
  default: '',
104
- description: 'The full JSON body is passed through (event + data). Outbound events may include optional correlationId. message.reply always includes messageRepliedId (string or null).',
120
+ description: 'The full JSON body is passed through (event + data). Phones are E.164 with a leading "+"; message.* events carry from/to/numberId/id/messageId/type/createdAt and may include an optional correlationId. message.reply adds contentReplied and quotedMessageId. call.* events (WhatsApp Business Calling — Meta Cloud API and web/Pilot Status numbers; call.permission_updated is Meta-only) are FLAT — fields sit next to event with no data wrapper: { event, callId, externalCallId?, direction, status, from, to, timestamp, duration? }. externalCallId is the provider call id (Meta wacid or Evolution GO CallID). On every number.* event, data.numberId is the WhatsApp NUMBER id — the same id GET /v1/numbers returns and the other number operations take. It used to carry the underlying instance id on number.created/connected/removed, so a workflow that stored that value and matched later events against it never matched.',
105
121
  },
106
122
  ],
107
123
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-pilot-status",
3
- "version": "1.1.0",
3
+ "version": "1.3.0",
4
4
  "description": "n8n node for Pilot Status API",
5
5
  "keywords": [
6
6
  "n8ncommunity",
@@ -14,6 +14,7 @@
14
14
  "build:icons": "mkdir -p dist/nodes/PilotStatus dist/nodes/PilotStatusTrigger && cp nodes/PilotStatus/*.svg dist/nodes/PilotStatus/ && cp nodes/PilotStatusTrigger/*.svg dist/nodes/PilotStatusTrigger/",
15
15
  "dev": "tsc --watch",
16
16
  "test": "jest",
17
+ "test:coverage": "jest --coverage",
17
18
  "prepublishOnly": "npm run build"
18
19
  },
19
20
  "files": [