n8n-nodes-pilot-status 2.13.0 → 2.14.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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `n8n-nodes-pilot-status`.
|
|
4
4
|
|
|
5
|
+
## 2.14.0 - 2026-11-05
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- The **Pilot Status API** credential sends `User-Agent: pilot-status-n8n/<version>`
|
|
10
|
+
(here `pilot-status-n8n/2.14.0`) on every request made with it: node operations,
|
|
11
|
+
dropdowns, the trigger's webhook calls and the credential test. n8n only falls back to
|
|
12
|
+
its generic `User-Agent: n8n` when none is set, so the token reaches the API as is.
|
|
13
|
+
The version comes from `package.json` (generated into `credentials/version.ts` by
|
|
14
|
+
`scripts/write-version.cjs` on `prebuild`).
|
|
15
|
+
|
|
5
16
|
## 2.13.0 - 2026-10-29
|
|
6
17
|
|
|
7
18
|
### Added
|
package/README.md
CHANGED
|
@@ -39,6 +39,8 @@ The credential has three optional fields:
|
|
|
39
39
|
- **WhatsApp Number ID** — sent as `x-whatsapp-number-id` on every request. Fill it in when your key is **tenant-scoped** and the operation is per-number; a **number-scoped** key already carries its number, and the header is ignored.
|
|
40
40
|
- **Workspace ID** — only for an **account key** (`ps_account_...`, created in *Profile → API*): sent as `x-workspace-id` to name the workspace the key acts on (an id from **Workspace (Account Key) → Get Many**). Without it, every workspace operation answers `400 WORKSPACE_ID_REQUIRED`; a workspace the key's user is not an active member of answers `403 WORKSPACE_MEMBERSHIP_REQUIRED`. Leave it empty for a workspace or number key. With an account key and no Workspace ID, the credential test calls `GET /v1/workspaces` instead of `/v1/templates`.
|
|
41
41
|
|
|
42
|
+
Every request made with the credential (operations, dropdowns, the trigger's webhook registration and the credential test) carries `User-Agent: pilot-status-n8n/<version>` (e.g. `pilot-status-n8n/2.14.0`) instead of n8n's generic `n8n`.
|
|
43
|
+
|
|
42
44
|
*Note: TEST keys will only send messages to the WhatsApp number registered in your Pilot Status Profile.*
|
|
43
45
|
|
|
44
46
|
---
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
2
|
/** Production. This is the value stored in every credential that does not pick another one. */
|
|
3
3
|
export declare const DEFAULT_BASE_URL = "https://pilotstatus.com.br";
|
|
4
|
+
/**
|
|
5
|
+
* Sent on every request made with this credential (node operations, load options,
|
|
6
|
+
* the trigger's webhook calls and the credential test). The Pilot Status API buckets
|
|
7
|
+
* `/v1` callers by User-Agent and recognises this node only when the header STARTS
|
|
8
|
+
* with `pilot-status-n8n/<version>`; without it n8n would send its generic `n8n`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const USER_AGENT = "pilot-status-n8n/2.14.0";
|
|
4
11
|
export declare class PilotStatusApi implements ICredentialType {
|
|
5
12
|
name: string;
|
|
6
13
|
displayName: string;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PilotStatusApi = exports.DEFAULT_BASE_URL = void 0;
|
|
3
|
+
exports.PilotStatusApi = exports.USER_AGENT = exports.DEFAULT_BASE_URL = void 0;
|
|
4
|
+
const version_1 = require("./version");
|
|
4
5
|
/** Production. This is the value stored in every credential that does not pick another one. */
|
|
5
6
|
exports.DEFAULT_BASE_URL = 'https://pilotstatus.com.br';
|
|
7
|
+
/**
|
|
8
|
+
* Sent on every request made with this credential (node operations, load options,
|
|
9
|
+
* the trigger's webhook calls and the credential test). The Pilot Status API buckets
|
|
10
|
+
* `/v1` callers by User-Agent and recognises this node only when the header STARTS
|
|
11
|
+
* with `pilot-status-n8n/<version>`; without it n8n would send its generic `n8n`.
|
|
12
|
+
*/
|
|
13
|
+
exports.USER_AGENT = `pilot-status-n8n/${version_1.PACKAGE_VERSION}`;
|
|
6
14
|
class PilotStatusApi {
|
|
7
15
|
constructor() {
|
|
8
16
|
this.name = 'pilotStatusApi';
|
|
@@ -50,6 +58,7 @@ class PilotStatusApi {
|
|
|
50
58
|
properties: {
|
|
51
59
|
headers: {
|
|
52
60
|
'x-api-key': '={{$credentials.apiKey}}',
|
|
61
|
+
'User-Agent': exports.USER_AGENT,
|
|
53
62
|
// An empty header is omitted by n8n, so a credential without a number
|
|
54
63
|
// keeps behaving exactly as before — it does not become
|
|
55
64
|
// `x-whatsapp-number-id: `, which the server would read as a header
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PACKAGE_VERSION = "2.14.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-pilot-status",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "n8n node for Pilot Status API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8ncommunity",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"main": "dist/index.js",
|
|
12
12
|
"scripts": {
|
|
13
|
+
"prebuild": "node scripts/write-version.cjs",
|
|
13
14
|
"build": "rimraf dist && tsc && npm run build:icons",
|
|
14
15
|
"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
16
|
"dev": "tsc --watch",
|