n8n-nodes-pilot-status 2.16.0 → 2.17.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,16 @@
2
2
 
3
3
  All notable changes to `n8n-nodes-pilot-status`.
4
4
 
5
+ ## 2.17.0 - 2026-11-11
6
+
7
+ ### Added
8
+
9
+ - **Story → Create: "Deliver At"** (dateTime, optional) — schedules the story; sent as
10
+ `deliverAt` (normalized to ISO-8601 UTC). Past/now sends immediately; the Media URL is
11
+ downloaded at send time; billed only when it goes out.
12
+ - Story → Delete documents cancelling a scheduled story → `{ id, canceledAt }` (status
13
+ `CANCELED`, never billed). Story → Get documents `deliverAt`.
14
+
5
15
  ## 2.16.0 - 2026-11-10
6
16
 
7
17
  ### Added
@@ -7,7 +7,7 @@ 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.16.0";
10
+ export declare const USER_AGENT = "pilot-status-n8n/2.17.0";
11
11
  export declare class PilotStatusApi implements ICredentialType {
12
12
  name: string;
13
13
  displayName: string;
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "2.16.0";
1
+ export declare const PACKAGE_VERSION = "2.17.0";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PACKAGE_VERSION = void 0;
4
4
  // GENERATED by scripts/write-version.cjs from package.json — do not edit by hand.
5
- exports.PACKAGE_VERSION = "2.16.0";
5
+ exports.PACKAGE_VERSION = "2.17.0";
@@ -103,7 +103,9 @@ export declare const STORY_FONT_OPTIONS: INodePropertyOptions[];
103
103
  * Story → Create: builds the WHOLE `POST /v1/stories` body. The route refuses unknown
104
104
  * fields (400), so only the fields of the chosen type are sent, and blanks are dropped
105
105
  * (the API then applies its defaults). Recipients: a comma-separated string or an array,
106
- * trimmed, `+` stripped, deduped; empty = the device privacy settings decide. The optional
106
+ * trimmed, `+` stripped, deduped; empty = the device privacy settings decide. "Deliver At"
107
+ * (optional) goes out as `deliverAt`, normalized with `new Date(...).toISOString()` like the
108
+ * message send; an unparseable value is sent as typed so the API answers 400. The optional
107
109
  * Idempotency Key goes out as the `Idempotency-Key` HEADER; blank = not sent.
108
110
  */
109
111
  export declare function storyCreatePreSend(this: IExecuteSingleFunctions, requestOptions: IHttpRequestOptions): Promise<IHttpRequestOptions>;
@@ -320,7 +320,9 @@ exports.STORY_FONT_OPTIONS = [
320
320
  * Story → Create: builds the WHOLE `POST /v1/stories` body. The route refuses unknown
321
321
  * fields (400), so only the fields of the chosen type are sent, and blanks are dropped
322
322
  * (the API then applies its defaults). Recipients: a comma-separated string or an array,
323
- * trimmed, `+` stripped, deduped; empty = the device privacy settings decide. The optional
323
+ * trimmed, `+` stripped, deduped; empty = the device privacy settings decide. "Deliver At"
324
+ * (optional) goes out as `deliverAt`, normalized with `new Date(...).toISOString()` like the
325
+ * message send; an unparseable value is sent as typed so the API answers 400. The optional
324
326
  * Idempotency Key goes out as the `Idempotency-Key` HEADER; blank = not sent.
325
327
  */
326
328
  async function storyCreatePreSend(requestOptions) {
@@ -359,6 +361,11 @@ async function storyCreatePreSend(requestOptions) {
359
361
  ];
360
362
  if (recipients.length)
361
363
  body.recipients = recipients;
364
+ const deliverAt = str('storyDeliverAt');
365
+ if (deliverAt) {
366
+ const parsed = new Date(deliverAt);
367
+ body.deliverAt = Number.isNaN(parsed.getTime()) ? deliverAt : parsed.toISOString();
368
+ }
362
369
  requestOptions.body = body;
363
370
  const key = str('storyIdempotencyKey');
364
371
  if (key)
@@ -4455,7 +4462,7 @@ class PilotStatus {
4455
4462
  {
4456
4463
  name: 'Create',
4457
4464
  value: 'create',
4458
- description: 'Post a story (WhatsApp status) from the credential\'s number: text, image or video. Answers 202 { id, status: "QUEUED", type, recipients: "explicit" | "privacy" }. Evolution Go numbers only (400 NOT_SUPPORTED_FOR_META / NOT_SUPPORTED_FOR_PROVIDER); disconnected instance → 409 WHATSAPP_INSTANCE_NOT_CONNECTED.',
4465
+ description: 'Post a story (WhatsApp status) from the credential\'s number: text, image or video. Answers 202 { id, status: "QUEUED", type, recipients: "explicit" | "privacy", deliverAt (ISO or null) }. Set Deliver At to schedule it. Evolution Go numbers only (400 NOT_SUPPORTED_FOR_META / NOT_SUPPORTED_FOR_PROVIDER); disconnected instance → 409 WHATSAPP_INSTANCE_NOT_CONNECTED.',
4459
4466
  action: 'Create a story',
4460
4467
  routing: {
4461
4468
  request: { method: 'POST', url: '/stories' },
@@ -4465,7 +4472,7 @@ class PilotStatus {
4465
4472
  {
4466
4473
  name: 'Get',
4467
4474
  value: 'get',
4468
- description: 'Get a story: { id, type, status, caption, recipientsMode, recipientCount, recipients (null while QUEUED or outside retention, then redacted: true), createdAt, sentAt, revokedAt }. An id that is not a story → 404.',
4475
+ description: 'Get a story: { id, type, status, caption, recipientsMode, recipientCount, recipients (null while QUEUED or outside retention, then redacted: true), createdAt, deliverAt (null when immediate), sentAt, revokedAt }. A scheduled story canceled with Delete has status CANCELED. An id that is not a story → 404.',
4469
4476
  action: 'Get a story',
4470
4477
  routing: {
4471
4478
  request: { method: 'GET', url: '=/stories/{{encodeURIComponent($parameter.storyId)}}' },
@@ -4474,7 +4481,7 @@ class PilotStatus {
4474
4481
  {
4475
4482
  name: 'Delete',
4476
4483
  value: 'delete',
4477
- description: 'Revoke a sent (also delivered/read/played) story from the recipients\' devices → { id, revokedAt }. Not sent or already revoked → 409 STORY_NOT_REVOCABLE; more than 24 h after sentAt → 410 STORY_EXPIRED. Not billed.',
4484
+ description: 'Cancel a scheduled story (QUEUED with a future Deliver At) → { id, canceledAt }, status CANCELED, never billed. Revoke a sent (also delivered/read/played) story from the recipients\' devices → { id, revokedAt }. QUEUED and already due (retry once SENT) or already revoked → 409 STORY_NOT_REVOCABLE; more than 24 h after sentAt → 410 STORY_EXPIRED. Not billed.',
4478
4485
  action: 'Delete a story',
4479
4486
  routing: {
4480
4487
  request: { method: 'DELETE', url: '=/stories/{{encodeURIComponent($parameter.storyId)}}' },
@@ -4569,6 +4576,14 @@ class PilotStatus {
4569
4576
  displayOptions: { show: { resource: ['story'], operation: ['create'] } },
4570
4577
  default: '',
4571
4578
  },
4579
+ {
4580
+ displayName: 'Deliver At',
4581
+ name: 'storyDeliverAt',
4582
+ type: 'dateTime',
4583
+ description: 'Optional. Schedule the story (sent as deliverAt, ISO-8601 in UTC). Past/now = sent immediately; no maximum ahead. The Media URL is downloaded at SEND time, so it must still be reachable then. Billed only when it goes out; Delete before then cancels it. Blank = sent now.',
4584
+ displayOptions: { show: { resource: ['story'], operation: ['create'] } },
4585
+ default: '',
4586
+ },
4572
4587
  {
4573
4588
  displayName: 'Idempotency Key',
4574
4589
  name: 'storyIdempotencyKey',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-pilot-status",
3
- "version": "2.16.0",
3
+ "version": "2.17.0",
4
4
  "description": "n8n node for Pilot Status API",
5
5
  "keywords": [
6
6
  "n8ncommunity",