@pidgeon-ai/sdk 1.42.0 → 1.43.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,19 @@ 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.43.0 — a person approves the risky sends
11
+
12
+ - Every send result carries `status`: `sent`, or `pending_approval` — nothing
13
+ was sent, the message is a draft waiting for a person, `draft_id` names it
14
+ and `approval` says why (`first_contact` or `risky_thread`) and when it
15
+ expires (24 hours). Read `status` before treating a send as sent.
16
+ - `draftsApproval` (`GET /drafts/{id}/approval`) says where a held send
17
+ stands; `message_id` is set once it is approved and sent.
18
+ - `Draft.approval`, and `Identity.send_approval` (`none` or `first_contact`),
19
+ settable with `identitiesUpdate`.
20
+ - Events `draft.approval_requested`, `draft.approved`, `draft.rejected` and
21
+ `draft.expired`, carrying `draft_id`, `thread_id` and `reason`.
22
+
10
23
  ## 1.42.0 — suspicious mail is held for a person
11
24
 
12
25
  - `Message.is_held` and `MessageListItem.is_held`. A held message's content is
package/dist/index.cjs CHANGED
@@ -54,6 +54,7 @@ __export(index_exports, {
54
54
  domainsUpdate: () => domainsUpdate,
55
55
  domainsVerify: () => domainsVerify,
56
56
  domainsZoneFile: () => domainsZoneFile,
57
+ draftsApproval: () => draftsApproval,
57
58
  draftsCancelSchedule: () => draftsCancelSchedule,
58
59
  draftsCreate: () => draftsCreate,
59
60
  draftsDelete: () => draftsDelete,
@@ -1647,6 +1648,11 @@ var draftsSend = (options) => (options.client ?? client).post({
1647
1648
  url: "/drafts/{id}/send",
1648
1649
  ...options
1649
1650
  });
1651
+ var draftsApproval = (options) => (options.client ?? client).get({
1652
+ security: [{ scheme: "bearer", type: "http" }],
1653
+ url: "/drafts/{id}/approval",
1654
+ ...options
1655
+ });
1650
1656
  var draftsCancelSchedule = (options) => (options.client ?? client).delete({
1651
1657
  security: [{ scheme: "bearer", type: "http" }],
1652
1658
  url: "/drafts/{id}/schedule",
@@ -1891,6 +1897,7 @@ function sleep(ms, signal) {
1891
1897
  domainsUpdate,
1892
1898
  domainsVerify,
1893
1899
  domainsZoneFile,
1900
+ draftsApproval,
1894
1901
  draftsCancelSchedule,
1895
1902
  draftsCreate,
1896
1903
  draftsDelete,