n8n-nodes-pilot-status 2.23.0 → 2.24.1
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/CHANGELOG.md +20 -0
- package/README.md +2 -1
- package/dist/credentials/PilotStatusApi.credentials.d.ts +2 -2
- package/dist/credentials/version.d.ts +1 -1
- package/dist/credentials/version.js +1 -1
- package/dist/nodes/PilotStatus/PilotStatus.node.d.ts +5 -0
- package/dist/nodes/PilotStatus/PilotStatus.node.js +85 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `n8n-nodes-pilot-status`.
|
|
4
4
|
|
|
5
|
+
## 2.24.1 - 2026-12-01
|
|
6
|
+
|
|
7
|
+
### Changed (BREAKING)
|
|
8
|
+
|
|
9
|
+
- Number → List Contacts / Get Contact / Get Contact Picture / Block / Unblock descriptions
|
|
10
|
+
follow the simplified API responses. Contacts are `{ phone, name, whatsappName }` (removed
|
|
11
|
+
`lid`, `jid`, `firstName`, `fullName`, `businessName`, `pushName`, `found`); the list lost
|
|
12
|
+
`totalPages`; the picture is `{ phone, url }` (removed `jid`, `pictureId`,
|
|
13
|
+
`cachedForSeconds`); block/unblock answer `{ phone, blocked }` (removed `success`,
|
|
14
|
+
`numberId`, `provider`, `jid`, `occurredAt`). `phone` is E.164 or `<id>@lid` (opaque).
|
|
15
|
+
|
|
16
|
+
## 2.24.0 - 2026-11-30
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Number operations **List Contacts** (`GET /v1/numbers/{id}/contacts`, Search + Page/Page
|
|
21
|
+
Size), **Get Contact** (`GET /v1/numbers/{id}/contacts/{phone}`) and **Get Contact Picture**
|
|
22
|
+
(`GET /v1/numbers/{id}/contacts/{phone}/picture`). QR numbers only (official numbers answer
|
|
23
|
+
422 `FEATURE_NOT_SUPPORTED`); need `chat:read`.
|
|
24
|
+
|
|
5
25
|
## 2.23.0 - 2026-11-29
|
|
6
26
|
|
|
7
27
|
### Added
|
package/README.md
CHANGED
|
@@ -142,7 +142,8 @@ The **Pilot Status** node provides several resources and operations to manage yo
|
|
|
142
142
|
- **Create Meta Number:** `POST /v1/numbers/meta` with `{ name, number, metaPhoneId, metaWabaId, metaAccessToken, metaAppSecret, metaAppId, routeWebhooksToPilot }` → `201 { number, webhook, linkedApiKeyId }`. Your own WABA credentials: the ids are node fields, `metaAccessToken` and `metaAppSecret` come from the **Pilot Status Meta Number** credential. **Route Webhooks to Pilot Status** subscribes the WHOLE WABA to our callback. A number key cannot create numbers; an existing number is `409`.
|
|
143
143
|
- **Get Many API Keys:** `GET /v1/numbers/{id}/api-keys` → `{ data }`, masked. **Create API Key:** `POST /v1/numbers/{id}/api-keys` with `{ name }` → `201 { apiKey }` — the secret `apiKey.key` is returned **only once**; `409 NUMBER_KEY_LIMIT_REACHED` at the limit. **Revoke API Key:** `DELETE /v1/numbers/{id}/api-keys/{keyId}` → `{ revoked, id }`; the default key is `409 PRIMARY_KEY_USE_REGENERATE` (use API Key → Regenerate). All three need an account credential (`403 NUMBER_SCOPE_NOT_ALLOWED` for a number key).
|
|
144
144
|
- **Archive / Unarchive Chat:** `POST` / `DELETE /v1/numbers/{id}/chats/{jid}/archive`, no body. QR (Evolution GO) numbers only — an official number is `422 NOT_AVAILABLE_FOR_OFFICIAL_NUMBERS`. **Chat JID** (E.164 or full JID) is URL-encoded.
|
|
145
|
-
- **
|
|
145
|
+
- **List Contacts / Get Contact / Get Contact Picture:** `GET /v1/numbers/{id}/contacts` (Search, Page, Page Size — same pagination as Conversation → Get Many; `{ contacts, total, page, pageSize }`, each contact `{ phone, name, whatsappName }`), `GET …/contacts/{phone}` (`{ contact, inAddressBook }`) and `GET …/contacts/{phone}/picture` (`{ phone, url }`; 404 when there is none). `phone` is E.164 or, when WhatsApp hasn't exposed the number yet, `<id>@lid` — treat it as opaque. QR numbers only: an official number answers `422 FEATURE_NOT_SUPPORTED`. Need `chat:read`.
|
|
146
|
+
- **Block / Unblock Contact:** `POST` / `DELETE /v1/numbers/{id}/contacts/{phone}/block`, no body; answers `{ phone, blocked }`. QR and official numbers; any other rail is `422 FEATURE_NOT_SUPPORTED`. **Contact Phone** is URL-encoded. Archive and block need `contacts:manage`.
|
|
146
147
|
|
|
147
148
|
### 3. API Key
|
|
148
149
|
- **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.
|
|
@@ -7,9 +7,9 @@ export declare const DEFAULT_BASE_URL = "https://pilotstatus.com.br";
|
|
|
7
7
|
* `/v1` callers by User-Agent and recognises this node only when the header STARTS
|
|
8
8
|
* with `pilot-status-n8n/<version>`; without it n8n would send its generic `n8n`.
|
|
9
9
|
*/
|
|
10
|
-
export declare const USER_AGENT = "pilot-status-n8n/2.
|
|
10
|
+
export declare const USER_AGENT = "pilot-status-n8n/2.24.1";
|
|
11
11
|
/** `x-pilot-status-client: n8n/<version>`, read by the API BEFORE the User-Agent. */
|
|
12
|
-
export declare const CLIENT_HEADER = "n8n/2.
|
|
12
|
+
export declare const CLIENT_HEADER = "n8n/2.24.1";
|
|
13
13
|
export declare class PilotStatusApi implements ICredentialType {
|
|
14
14
|
name: string;
|
|
15
15
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "2.
|
|
1
|
+
export declare const PACKAGE_VERSION = "2.24.1";
|
|
@@ -250,6 +250,11 @@ export declare function subscriptionBuyExtraNumbersPreSend(this: IExecuteSingleF
|
|
|
250
250
|
* by last activity) only when set, plus `page` and `pageSize` (1–100).
|
|
251
251
|
*/
|
|
252
252
|
export declare function conversationListPreSend(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
253
|
+
/**
|
|
254
|
+
* Number → List Contacts (`GET /v1/numbers/{id}/contacts`): `page`/`pageSize` always (same
|
|
255
|
+
* pagination as Conversation → Get Many), `search` only when set.
|
|
256
|
+
*/
|
|
257
|
+
export declare function numberContactsListPreSend(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
|
|
253
258
|
/**
|
|
254
259
|
* Meta Pricing → Get (`GET /v1/meta/pricing`): `market`, `currency`, `category` only when set
|
|
255
260
|
* (none = the catalogue of markets/currencies/categories; all three = a price; a partial set is
|
|
@@ -37,6 +37,7 @@ exports.workspaceMemberRemovePreSend = workspaceMemberRemovePreSend;
|
|
|
37
37
|
exports.workspaceMemberResendPreSend = workspaceMemberResendPreSend;
|
|
38
38
|
exports.subscriptionBuyExtraNumbersPreSend = subscriptionBuyExtraNumbersPreSend;
|
|
39
39
|
exports.conversationListPreSend = conversationListPreSend;
|
|
40
|
+
exports.numberContactsListPreSend = numberContactsListPreSend;
|
|
40
41
|
exports.metaPricingGetPreSend = metaPricingGetPreSend;
|
|
41
42
|
exports.embedCreateSessionPreSend = embedCreateSessionPreSend;
|
|
42
43
|
exports.knowledgeSearchPreSend = knowledgeSearchPreSend;
|
|
@@ -889,6 +890,22 @@ async function conversationListPreSend(requestOptions) {
|
|
|
889
890
|
requestOptions.qs = { ...((_a = requestOptions.qs) !== null && _a !== void 0 ? _a : {}), ...qs };
|
|
890
891
|
return requestOptions;
|
|
891
892
|
}
|
|
893
|
+
/**
|
|
894
|
+
* Number → List Contacts (`GET /v1/numbers/{id}/contacts`): `page`/`pageSize` always (same
|
|
895
|
+
* pagination as Conversation → Get Many), `search` only when set.
|
|
896
|
+
*/
|
|
897
|
+
async function numberContactsListPreSend(requestOptions) {
|
|
898
|
+
var _a;
|
|
899
|
+
const qs = {
|
|
900
|
+
page: Number(this.getNodeParameter('contactPage', 1)),
|
|
901
|
+
pageSize: Number(this.getNodeParameter('contactPageSize', 30)),
|
|
902
|
+
};
|
|
903
|
+
const search = textOrUndefined(this.getNodeParameter('contactSearch', ''));
|
|
904
|
+
if (search)
|
|
905
|
+
qs.search = search;
|
|
906
|
+
requestOptions.qs = { ...((_a = requestOptions.qs) !== null && _a !== void 0 ? _a : {}), ...qs };
|
|
907
|
+
return requestOptions;
|
|
908
|
+
}
|
|
892
909
|
/**
|
|
893
910
|
* Meta Pricing → Get (`GET /v1/meta/pricing`): `market`, `currency`, `category` only when set
|
|
894
911
|
* (none = the catalogue of markets/currencies/categories; all three = a price; a partial set is
|
|
@@ -2645,10 +2662,44 @@ class PilotStatus {
|
|
|
2645
2662
|
},
|
|
2646
2663
|
},
|
|
2647
2664
|
},
|
|
2665
|
+
{
|
|
2666
|
+
name: 'List Contacts',
|
|
2667
|
+
value: 'listContacts',
|
|
2668
|
+
description: "The number's address book: {contacts, total, page, pageSize}; each contact {phone, name, whatsappName} (name = best resolved name, whatsappName = WhatsApp push name or null); phone is E.164 or, when WhatsApp has not exposed the number yet, <id>@lid (treat it as opaque), or null when neither is known. Search filters by name or phone. QR numbers only: an official number answers 422 FEATURE_NOT_SUPPORTED. Needs chat:read.",
|
|
2669
|
+
action: 'List contacts of a number',
|
|
2670
|
+
routing: {
|
|
2671
|
+
request: { method: 'GET', url: '=/numbers/{{$parameter.numberId}}/contacts' },
|
|
2672
|
+
send: { preSend: [numberContactsListPreSend] },
|
|
2673
|
+
},
|
|
2674
|
+
},
|
|
2675
|
+
{
|
|
2676
|
+
name: 'Get Contact',
|
|
2677
|
+
value: 'getContact',
|
|
2678
|
+
description: 'One contact of the address book: {contact: {phone, name, whatsappName}, inAddressBook}; phone may be null when neither a phone nor a LID is known. 404 when not found. QR numbers only (official: 422 FEATURE_NOT_SUPPORTED). Needs chat:read.',
|
|
2679
|
+
action: 'Get a contact of a number',
|
|
2680
|
+
routing: {
|
|
2681
|
+
request: {
|
|
2682
|
+
method: 'GET',
|
|
2683
|
+
url: '=/numbers/{{$parameter.numberId}}/contacts/{{encodeURIComponent($parameter.contactPhone)}}',
|
|
2684
|
+
},
|
|
2685
|
+
},
|
|
2686
|
+
},
|
|
2687
|
+
{
|
|
2688
|
+
name: 'Get Contact Picture',
|
|
2689
|
+
value: 'getContactPicture',
|
|
2690
|
+
description: "A contact's profile picture: {phone, url}. 404 when there is none. QR numbers only (official: 422 FEATURE_NOT_SUPPORTED). Needs chat:read.",
|
|
2691
|
+
action: 'Get the profile picture of a contact',
|
|
2692
|
+
routing: {
|
|
2693
|
+
request: {
|
|
2694
|
+
method: 'GET',
|
|
2695
|
+
url: '=/numbers/{{$parameter.numberId}}/contacts/{{encodeURIComponent($parameter.contactPhone)}}/picture',
|
|
2696
|
+
},
|
|
2697
|
+
},
|
|
2698
|
+
},
|
|
2648
2699
|
{
|
|
2649
2700
|
name: 'Block Contact',
|
|
2650
2701
|
value: 'block',
|
|
2651
|
-
description: 'Block a contact. QR (Evolution GO) and official (Meta) numbers; any other rail is 422 FEATURE_NOT_SUPPORTED. Needs contacts:manage.',
|
|
2702
|
+
description: 'Block a contact: {phone, blocked}. QR (Evolution GO) and official (Meta) numbers; any other rail is 422 FEATURE_NOT_SUPPORTED. Needs contacts:manage.',
|
|
2652
2703
|
action: 'Block a contact',
|
|
2653
2704
|
routing: {
|
|
2654
2705
|
request: {
|
|
@@ -2660,7 +2711,7 @@ class PilotStatus {
|
|
|
2660
2711
|
{
|
|
2661
2712
|
name: 'Unblock Contact',
|
|
2662
2713
|
value: 'unblock',
|
|
2663
|
-
description: 'Unblock a contact. QR (Evolution GO) and official (Meta) numbers. Needs contacts:manage.',
|
|
2714
|
+
description: 'Unblock a contact: {phone, blocked}. QR (Evolution GO) and official (Meta) numbers. Needs contacts:manage.',
|
|
2664
2715
|
action: 'Unblock a contact',
|
|
2665
2716
|
routing: {
|
|
2666
2717
|
request: {
|
|
@@ -2723,6 +2774,9 @@ class PilotStatus {
|
|
|
2723
2774
|
'unarchive',
|
|
2724
2775
|
'block',
|
|
2725
2776
|
'unblock',
|
|
2777
|
+
'listContacts',
|
|
2778
|
+
'getContact',
|
|
2779
|
+
'getContactPicture',
|
|
2726
2780
|
],
|
|
2727
2781
|
},
|
|
2728
2782
|
},
|
|
@@ -2800,11 +2854,39 @@ class PilotStatus {
|
|
|
2800
2854
|
displayName: 'Contact Phone',
|
|
2801
2855
|
name: 'contactPhone',
|
|
2802
2856
|
type: 'string',
|
|
2803
|
-
displayOptions: {
|
|
2857
|
+
displayOptions: {
|
|
2858
|
+
show: { resource: ['number'], operation: ['block', 'unblock', 'getContact', 'getContactPicture'] },
|
|
2859
|
+
},
|
|
2804
2860
|
default: '',
|
|
2805
2861
|
required: true,
|
|
2806
2862
|
description: 'Contact number in E.164 (+ optional); URL-encoded',
|
|
2807
2863
|
},
|
|
2864
|
+
{
|
|
2865
|
+
displayName: 'Search',
|
|
2866
|
+
name: 'contactSearch',
|
|
2867
|
+
type: 'string',
|
|
2868
|
+
displayOptions: { show: { resource: ['number'], operation: ['listContacts'] } },
|
|
2869
|
+
default: '',
|
|
2870
|
+
description: 'Free-text filter on the contact name or phone. Blank = every contact.',
|
|
2871
|
+
},
|
|
2872
|
+
{
|
|
2873
|
+
displayName: 'Page',
|
|
2874
|
+
name: 'contactPage',
|
|
2875
|
+
type: 'number',
|
|
2876
|
+
typeOptions: { minValue: 1 },
|
|
2877
|
+
displayOptions: { show: { resource: ['number'], operation: ['listContacts'] } },
|
|
2878
|
+
default: 1,
|
|
2879
|
+
description: 'Page number, from 1',
|
|
2880
|
+
},
|
|
2881
|
+
{
|
|
2882
|
+
displayName: 'Page Size',
|
|
2883
|
+
name: 'contactPageSize',
|
|
2884
|
+
type: 'number',
|
|
2885
|
+
typeOptions: { minValue: 1, maxValue: 100 },
|
|
2886
|
+
displayOptions: { show: { resource: ['number'], operation: ['listContacts'] } },
|
|
2887
|
+
default: 30,
|
|
2888
|
+
description: 'Contacts per page (1–100)',
|
|
2889
|
+
},
|
|
2808
2890
|
{
|
|
2809
2891
|
displayName: 'Phone Number',
|
|
2810
2892
|
name: 'checkNumber',
|