@pidgeon-ai/sdk 1.4.0 → 1.8.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
@@ -9,6 +9,69 @@ call shapes, the result shape — not to the API behind it.
9
9
 
10
10
  ## Unreleased
11
11
 
12
+ ## 1.8.0 — wait for a message, and read the code out of it
13
+
14
+ **`messagesAwait`** (`GET /v1/messages/await`) holds the request open until a
15
+ message matching your filters arrives at an address — `from`, `subject_contains`,
16
+ `has_code` — or `timeout` seconds pass, up to 280. It answers
17
+ `{ message, timed_out, cursor }`; pass `cursor` back as `after` so a message
18
+ arriving between two calls is never missed. One call where an agent waiting
19
+ for a sign-up code used to write a polling loop.
20
+
21
+ **Every `Message` carries `extracted`**: `codes` and `links`, most likely
22
+ first, each with its kind. Candidates rather than one answer, because
23
+ extraction is a heuristic — take the first, and when it fails the second is
24
+ right there. Read from the new text, never the quoted history.
25
+
26
+ ## 1.7.0 — a pod's reputation you can see
27
+
28
+ `GET /metrics` takes `pod_id`, and its window carries `pod` and `reputation`.
29
+ 1.6.0 claimed each pod had its own sending reputation and gave no way to
30
+ check it; this is the check. `/metrics` also rejects an unknown query
31
+ parameter instead of ignoring it, so a caller passing a misspelt filter is
32
+ told rather than answered for the whole account.
33
+
34
+ ## 1.6.0 — a pod is a boundary now
35
+
36
+ **No field changed.** What changed is what a pod means, and that is worth a
37
+ release because 1.5.0's own description told you the opposite.
38
+
39
+ **Each pod has its own sending reputation.** Bounces and complaints from one
40
+ customer's mail are counted against that customer's pod and nothing else, so
41
+ one bad tenant cannot degrade delivery for the rest. Mail from an address in
42
+ a pod sends under that pod whichever domain it is on, so two pods sharing one
43
+ domain are still separate.
44
+
45
+ 1.5.0 said _"a pod carries no sending reputation of its own"_, which was true
46
+ and is not. Leaving it would be the worse kind of stale documentation — a
47
+ caller reading it would decline to use something they already have.
48
+
49
+ A pod is still **not** a key scope. A key is a list of address ids, which is
50
+ what makes its reach checkable.
51
+
52
+ ## 1.5.0 — a container your customers live in
53
+
54
+ **Additive.** Every account has exactly one pod already, every address is in
55
+ it, and a caller who never mentions a pod cannot tell this release from the
56
+ last one.
57
+
58
+ **Added.** `podsList`, `podsCreate`, `podsGet`, `podsUpdate`, the `Pod` type,
59
+ `pod_id` on an address, and `pod_id` as a filter on `identitiesList`.
60
+
61
+ A **pod** holds addresses and domains: one of your customers, a client, or
62
+ just test kept apart from production. It has a name and an optional
63
+ `client_id` that is your own id for it, carried and never parsed.
64
+
65
+ **It is organisational and not a boundary**, and the types say so because the
66
+ risk in shipping the container before the isolation is a reader assuming the
67
+ isolation. A pod carries no sending reputation of its own — one SES tenant
68
+ per _account_, unchanged — and **a key is still a list of address ids**,
69
+ never something scoped to a pod.
70
+
71
+ **No delete.** The verb that destroys a container full of mailboxes is worth
72
+ making somebody ask for, and nothing yet moves addresses between pods, so it
73
+ would either refuse every non-empty pod or destroy mail.
74
+
12
75
  ## 1.4.0 — things the prose promised and the types did not have
13
76
 
14
77
  **Additive, and two corrections to descriptions that were wrong.**
package/dist/index.cjs CHANGED
@@ -93,6 +93,7 @@ __export(index_exports, {
93
93
  mailboxesListFolder: () => mailboxesListFolder,
94
94
  meGet: () => meGet,
95
95
  messagesAct: () => messagesAct,
96
+ messagesAwait: () => messagesAwait,
96
97
  messagesForward: () => messagesForward,
97
98
  messagesGet: () => messagesGet,
98
99
  messagesListInThread: () => messagesListInThread,
@@ -105,6 +106,10 @@ __export(index_exports, {
105
106
  messagesUndo: () => messagesUndo,
106
107
  messagesUpdate: () => messagesUpdate,
107
108
  metricsQuery: () => metricsQuery,
109
+ podsCreate: () => podsCreate,
110
+ podsGet: () => podsGet,
111
+ podsList: () => podsList,
112
+ podsUpdate: () => podsUpdate,
108
113
  routingCreate: () => routingCreate,
109
114
  routingDelete: () => routingDelete,
110
115
  routingList: () => routingList,
@@ -1059,6 +1064,34 @@ var identitiesSuspendTenant = (options) => (options.client ?? client).post({
1059
1064
  url: "/tenants/{id}/suspend",
1060
1065
  ...options
1061
1066
  });
1067
+ var podsList = (options) => (options?.client ?? client).get({
1068
+ security: [{ scheme: "bearer", type: "http" }],
1069
+ url: "/pods",
1070
+ ...options
1071
+ });
1072
+ var podsCreate = (options) => (options.client ?? client).post({
1073
+ security: [{ scheme: "bearer", type: "http" }],
1074
+ url: "/pods",
1075
+ ...options,
1076
+ headers: {
1077
+ "Content-Type": "application/json",
1078
+ ...options.headers
1079
+ }
1080
+ });
1081
+ var podsGet = (options) => (options.client ?? client).get({
1082
+ security: [{ scheme: "bearer", type: "http" }],
1083
+ url: "/pods/{id}",
1084
+ ...options
1085
+ });
1086
+ var podsUpdate = (options) => (options.client ?? client).patch({
1087
+ security: [{ scheme: "bearer", type: "http" }],
1088
+ url: "/pods/{id}",
1089
+ ...options,
1090
+ headers: {
1091
+ "Content-Type": "application/json",
1092
+ ...options.headers
1093
+ }
1094
+ });
1062
1095
  var labelsList = (options) => (options.client ?? client).get({
1063
1096
  security: [{ scheme: "bearer", type: "http" }],
1064
1097
  url: "/labels",
@@ -1143,6 +1176,11 @@ var messagesUndo = (options) => (options.client ?? client).post({
1143
1176
  ...options.headers
1144
1177
  }
1145
1178
  });
1179
+ var messagesAwait = (options) => (options.client ?? client).get({
1180
+ security: [{ scheme: "bearer", type: "http" }],
1181
+ url: "/messages/await",
1182
+ ...options
1183
+ });
1146
1184
  var messagesGet = (options) => (options.client ?? client).get({
1147
1185
  security: [{ scheme: "bearer", type: "http" }],
1148
1186
  url: "/messages/{id}",
@@ -1822,6 +1860,7 @@ function sleep(ms, signal) {
1822
1860
  mailboxesListFolder,
1823
1861
  meGet,
1824
1862
  messagesAct,
1863
+ messagesAwait,
1825
1864
  messagesForward,
1826
1865
  messagesGet,
1827
1866
  messagesListInThread,
@@ -1834,6 +1873,10 @@ function sleep(ms, signal) {
1834
1873
  messagesUndo,
1835
1874
  messagesUpdate,
1836
1875
  metricsQuery,
1876
+ podsCreate,
1877
+ podsGet,
1878
+ podsList,
1879
+ podsUpdate,
1837
1880
  routingCreate,
1838
1881
  routingDelete,
1839
1882
  routingList,