@pidgeon-ai/sdk 1.51.1 → 1.52.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
@@ -7,6 +7,25 @@ the two would publish a release for every unrelated product deploy.
7
7
  Semver applies to **this package's own surface** — the exported names, the
8
8
  call shapes, the result shape — not to the API behind it.
9
9
 
10
+ ## 1.52.0 — send later, from Pidgeon's side
11
+
12
+ - `send_at` (ISO 8601 with an offset) on `messagesSend` and `messagesReply`:
13
+ the message is queued on Pidgeon and sent at that time with no further
14
+ call. The result is `status: "scheduled"` with `draft_id`, `send_at` and a
15
+ `cancel` call (`DELETE /v1/drafts/{id}/schedule`). A forward cannot be
16
+ scheduled.
17
+ - An address that asks a person first now holds a scheduled send when it is
18
+ scheduled, not when it falls due; approved before its time, it goes at
19
+ `send_at`.
20
+ - `thread_id` on a send result is nullable: a scheduled new message has no
21
+ conversation until it goes. New fields `send_at` and `cancel` are null on
22
+ every other result.
23
+
24
+ ## 1.51.2 — the new description
25
+
26
+ - The package description says "Email inboxes for your team and your AI
27
+ agents". No change to any call or type.
28
+
10
29
  ## 1.51.1 — three new messages to one person, not one
11
30
 
12
31
  - `recipient_cooldown` (`429`) now refuses the fourth new message to the same
package/dist/index.d.cts CHANGED
@@ -356,18 +356,29 @@ type AgentSignup = {
356
356
  };
357
357
  type Sent = {
358
358
  /**
359
- * `sent`: handed to the network. `pending_approval`: **nothing was sent** — the message is a draft waiting for a person to approve it (`approval` says why and until when). Poll `GET /drafts/{draft_id}/approval`, or subscribe to `draft.approved`, `draft.rejected` and `draft.expired`.
359
+ * `sent`: handed to the network. `pending_approval`: **nothing was sent** — the message is a draft waiting for a person to approve it (`approval` says why and until when). Poll `GET /drafts/{draft_id}/approval`, or subscribe to `draft.approved`, `draft.rejected` and `draft.expired`. `scheduled`: it was given a `send_at`, and Pidgeon sends it then with no further call; `cancel` takes it back. With `approval` set it also waits for a person, and goes at `send_at` once they approve.
360
360
  */
361
- status: 'sent' | 'pending_approval';
361
+ status: 'sent' | 'pending_approval' | 'scheduled';
362
362
  /**
363
363
  * The message. On `pending_approval` it is the draft’s id, which the message keeps if it is approved.
364
364
  */
365
365
  id: string;
366
366
  /**
367
- * The held draft on `pending_approval`; null on `sent`.
367
+ * The draft that holds it on `pending_approval` or `scheduled`; null on `sent`.
368
368
  */
369
369
  draft_id: string | null;
370
- thread_id: string;
370
+ /**
371
+ * The conversation. Null on a `scheduled` new message, which starts one when sent.
372
+ */
373
+ thread_id: string | null;
374
+ /**
375
+ * When a `scheduled` send goes out. Null otherwise.
376
+ */
377
+ send_at: string | null;
378
+ /**
379
+ * On `scheduled`: the call that takes it back, `DELETE /v1/drafts/{id}/schedule`.
380
+ */
381
+ cancel: string | null;
371
382
  rejected: Array<{
372
383
  address: string;
373
384
  reason: string;
@@ -4827,6 +4838,7 @@ type MessagesSendData = {
4827
4838
  * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
4828
4839
  */
4829
4840
  attachment_ids?: Array<string>;
4841
+ send_at?: string;
4830
4842
  /**
4831
4843
  * The message being answered. Keeps the conversation together in the recipient’s client too.
4832
4844
  */
@@ -4941,6 +4953,7 @@ type MessagesCheckData = {
4941
4953
  * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
4942
4954
  */
4943
4955
  attachment_ids?: Array<string>;
4956
+ send_at?: string;
4944
4957
  /**
4945
4958
  * The message being answered. Keeps the conversation together in the recipient’s client too.
4946
4959
  */
@@ -5451,6 +5464,7 @@ type MessagesReplyData = {
5451
5464
  * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
5452
5465
  */
5453
5466
  attachment_ids?: Array<string>;
5467
+ send_at?: string;
5454
5468
  };
5455
5469
  headers?: {
5456
5470
  /**
@@ -5551,6 +5565,7 @@ type MessagesReplyAllData = {
5551
5565
  * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
5552
5566
  */
5553
5567
  attachment_ids?: Array<string>;
5568
+ send_at?: string;
5554
5569
  };
5555
5570
  headers?: {
5556
5571
  /**
@@ -5651,6 +5666,7 @@ type MessagesForwardData = {
5651
5666
  * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
5652
5667
  */
5653
5668
  attachment_ids?: Array<string>;
5669
+ send_at?: string;
5654
5670
  };
5655
5671
  headers?: {
5656
5672
  /**
package/dist/index.d.ts CHANGED
@@ -356,18 +356,29 @@ type AgentSignup = {
356
356
  };
357
357
  type Sent = {
358
358
  /**
359
- * `sent`: handed to the network. `pending_approval`: **nothing was sent** — the message is a draft waiting for a person to approve it (`approval` says why and until when). Poll `GET /drafts/{draft_id}/approval`, or subscribe to `draft.approved`, `draft.rejected` and `draft.expired`.
359
+ * `sent`: handed to the network. `pending_approval`: **nothing was sent** — the message is a draft waiting for a person to approve it (`approval` says why and until when). Poll `GET /drafts/{draft_id}/approval`, or subscribe to `draft.approved`, `draft.rejected` and `draft.expired`. `scheduled`: it was given a `send_at`, and Pidgeon sends it then with no further call; `cancel` takes it back. With `approval` set it also waits for a person, and goes at `send_at` once they approve.
360
360
  */
361
- status: 'sent' | 'pending_approval';
361
+ status: 'sent' | 'pending_approval' | 'scheduled';
362
362
  /**
363
363
  * The message. On `pending_approval` it is the draft’s id, which the message keeps if it is approved.
364
364
  */
365
365
  id: string;
366
366
  /**
367
- * The held draft on `pending_approval`; null on `sent`.
367
+ * The draft that holds it on `pending_approval` or `scheduled`; null on `sent`.
368
368
  */
369
369
  draft_id: string | null;
370
- thread_id: string;
370
+ /**
371
+ * The conversation. Null on a `scheduled` new message, which starts one when sent.
372
+ */
373
+ thread_id: string | null;
374
+ /**
375
+ * When a `scheduled` send goes out. Null otherwise.
376
+ */
377
+ send_at: string | null;
378
+ /**
379
+ * On `scheduled`: the call that takes it back, `DELETE /v1/drafts/{id}/schedule`.
380
+ */
381
+ cancel: string | null;
371
382
  rejected: Array<{
372
383
  address: string;
373
384
  reason: string;
@@ -4827,6 +4838,7 @@ type MessagesSendData = {
4827
4838
  * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
4828
4839
  */
4829
4840
  attachment_ids?: Array<string>;
4841
+ send_at?: string;
4830
4842
  /**
4831
4843
  * The message being answered. Keeps the conversation together in the recipient’s client too.
4832
4844
  */
@@ -4941,6 +4953,7 @@ type MessagesCheckData = {
4941
4953
  * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
4942
4954
  */
4943
4955
  attachment_ids?: Array<string>;
4956
+ send_at?: string;
4944
4957
  /**
4945
4958
  * The message being answered. Keeps the conversation together in the recipient’s client too.
4946
4959
  */
@@ -5451,6 +5464,7 @@ type MessagesReplyData = {
5451
5464
  * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
5452
5465
  */
5453
5466
  attachment_ids?: Array<string>;
5467
+ send_at?: string;
5454
5468
  };
5455
5469
  headers?: {
5456
5470
  /**
@@ -5551,6 +5565,7 @@ type MessagesReplyAllData = {
5551
5565
  * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
5552
5566
  */
5553
5567
  attachment_ids?: Array<string>;
5568
+ send_at?: string;
5554
5569
  };
5555
5570
  headers?: {
5556
5571
  /**
@@ -5651,6 +5666,7 @@ type MessagesForwardData = {
5651
5666
  * Ids from `POST /attachments`, uploaded before the message that carries them. Up to 20.
5652
5667
  */
5653
5668
  attachment_ids?: Array<string>;
5669
+ send_at?: string;
5654
5670
  };
5655
5671
  headers?: {
5656
5672
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pidgeon-ai/sdk",
3
- "version": "1.51.1",
4
- "description": "Email inboxes for AI agents — TypeScript SDK for Pidgeon: create addresses, send, receive and reply.",
3
+ "version": "1.52.0",
4
+ "description": "Email inboxes for your team and your AI agents — TypeScript SDK for Pidgeon: create addresses, send, receive and reply.",
5
5
  "keywords": [
6
6
  "email",
7
7
  "email-api",