agentmail 0.5.46 → 0.5.47

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.
Files changed (163) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/agent/client/Client.d.ts +3 -1
  3. package/dist/cjs/api/resources/agent/client/Client.js +3 -1
  4. package/dist/cjs/api/resources/apiKeys/types/ApiKeyPermissions.d.ts +4 -4
  5. package/dist/cjs/api/resources/calendar/types/IanaTimezone.d.ts +5 -3
  6. package/dist/cjs/api/resources/domains/types/Domain.d.ts +11 -4
  7. package/dist/cjs/api/resources/domains/types/RecordType.d.ts +1 -0
  8. package/dist/cjs/api/resources/domains/types/RecordType.js +1 -0
  9. package/dist/cjs/api/resources/domains/types/TrackingEnabled.d.ts +4 -3
  10. package/dist/cjs/api/resources/domains/types/TrackingStatus.d.ts +10 -0
  11. package/dist/cjs/api/resources/domains/types/TrackingStatus.js +3 -0
  12. package/dist/cjs/api/resources/domains/types/UpdateDomainRequest.d.ts +2 -1
  13. package/dist/cjs/api/resources/domains/types/VerificationRecord.d.ts +1 -1
  14. package/dist/cjs/api/resources/domains/types/index.d.ts +1 -0
  15. package/dist/cjs/api/resources/domains/types/index.js +1 -0
  16. package/dist/cjs/api/resources/events/types/EventId.d.ts +3 -1
  17. package/dist/cjs/api/resources/events/types/InboxIds.d.ts +1 -1
  18. package/dist/cjs/api/resources/events/types/MessageReceivedEvent.d.ts +1 -1
  19. package/dist/cjs/api/resources/events/types/PodIds.d.ts +1 -1
  20. package/dist/cjs/api/resources/events/types/ReceivedMessage.d.ts +18 -0
  21. package/dist/cjs/api/resources/events/types/ReceivedMessage.js +3 -0
  22. package/dist/cjs/api/resources/events/types/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/events/types/index.js +1 -0
  24. package/dist/cjs/api/resources/inboxes/resources/calendar/client/Client.d.ts +20 -21
  25. package/dist/cjs/api/resources/inboxes/resources/calendar/client/Client.js +20 -21
  26. package/dist/cjs/api/resources/messages/types/Message.d.ts +1 -0
  27. package/dist/cjs/api/resources/messages/types/MessageAuthenticationDomain.d.ts +5 -0
  28. package/dist/cjs/api/resources/messages/types/MessageAuthenticationDomain.js +3 -0
  29. package/dist/cjs/api/resources/messages/types/MessageAuthenticationResults.d.ts +56 -0
  30. package/dist/cjs/api/resources/messages/types/MessageAuthenticationResults.js +3 -0
  31. package/dist/cjs/api/resources/messages/types/MessageAuthenticationVerdict.d.ts +16 -0
  32. package/dist/cjs/api/resources/messages/types/MessageAuthenticationVerdict.js +19 -0
  33. package/dist/cjs/api/resources/messages/types/MessageCalendarEventId.d.ts +3 -2
  34. package/dist/cjs/api/resources/messages/types/MessageHeaders.d.ts +4 -1
  35. package/dist/cjs/api/resources/messages/types/MessageItem.d.ts +1 -0
  36. package/dist/cjs/api/resources/messages/types/index.d.ts +3 -0
  37. package/dist/cjs/api/resources/messages/types/index.js +3 -0
  38. package/dist/cjs/api/resources/metrics/client/Client.d.ts +3 -4
  39. package/dist/cjs/api/resources/metrics/client/Client.js +3 -4
  40. package/dist/cjs/api/resources/organizations/client/Client.d.ts +1 -1
  41. package/dist/cjs/api/resources/organizations/client/Client.js +1 -1
  42. package/dist/cjs/api/resources/organizations/types/Organization.d.ts +12 -0
  43. package/dist/cjs/api/resources/webhooks/types/CreatePodWebhookRequest.d.ts +4 -0
  44. package/dist/cjs/api/resources/webhooks/types/CreateWebhookEventTypes.d.ts +3 -2
  45. package/dist/cjs/api/resources/webhooks/types/CreateWebhookRequest.d.ts +3 -2
  46. package/dist/cjs/api/resources/webhooks/types/UpdateInboxWebhookRequest.d.ts +6 -4
  47. package/dist/cjs/api/resources/webhooks/types/UpdatePodWebhookRequest.d.ts +2 -1
  48. package/dist/cjs/api/resources/webhooks/types/UpdateWebhookEventTypes.d.ts +2 -2
  49. package/dist/cjs/api/resources/webhooks/types/UpdateWebhookRequest.d.ts +4 -1
  50. package/dist/cjs/api/resources/webhooks/types/Webhook.d.ts +5 -1
  51. package/dist/cjs/serialization/resources/domains/types/Domain.d.ts +3 -0
  52. package/dist/cjs/serialization/resources/domains/types/Domain.js +3 -0
  53. package/dist/cjs/serialization/resources/domains/types/RecordType.d.ts +1 -1
  54. package/dist/cjs/serialization/resources/domains/types/RecordType.js +1 -1
  55. package/dist/cjs/serialization/resources/domains/types/TrackingStatus.d.ts +8 -0
  56. package/dist/cjs/serialization/resources/domains/types/TrackingStatus.js +6 -0
  57. package/dist/cjs/serialization/resources/domains/types/index.d.ts +1 -0
  58. package/dist/cjs/serialization/resources/domains/types/index.js +1 -0
  59. package/dist/cjs/serialization/resources/events/types/MessageReceivedEvent.d.ts +2 -2
  60. package/dist/cjs/serialization/resources/events/types/MessageReceivedEvent.js +2 -2
  61. package/dist/cjs/serialization/resources/events/types/ReceivedMessage.d.ts +11 -0
  62. package/dist/cjs/serialization/resources/events/types/ReceivedMessage.js +45 -0
  63. package/dist/cjs/serialization/resources/events/types/index.d.ts +1 -0
  64. package/dist/cjs/serialization/resources/events/types/index.js +1 -0
  65. package/dist/cjs/serialization/resources/messages/types/Message.d.ts +2 -0
  66. package/dist/cjs/serialization/resources/messages/types/Message.js +2 -0
  67. package/dist/cjs/serialization/resources/messages/types/MessageAuthenticationDomain.d.ts +7 -0
  68. package/dist/cjs/serialization/resources/messages/types/MessageAuthenticationDomain.js +39 -0
  69. package/dist/cjs/serialization/resources/messages/types/MessageAuthenticationResults.d.ts +17 -0
  70. package/dist/cjs/serialization/resources/messages/types/MessageAuthenticationResults.js +49 -0
  71. package/dist/cjs/serialization/resources/messages/types/MessageAuthenticationVerdict.d.ts +7 -0
  72. package/dist/cjs/serialization/resources/messages/types/MessageAuthenticationVerdict.js +39 -0
  73. package/dist/cjs/serialization/resources/messages/types/MessageItem.d.ts +2 -0
  74. package/dist/cjs/serialization/resources/messages/types/MessageItem.js +2 -0
  75. package/dist/cjs/serialization/resources/messages/types/index.d.ts +3 -0
  76. package/dist/cjs/serialization/resources/messages/types/index.js +3 -0
  77. package/dist/cjs/serialization/resources/organizations/types/Organization.d.ts +2 -0
  78. package/dist/cjs/serialization/resources/organizations/types/Organization.js +2 -0
  79. package/dist/cjs/version.d.ts +1 -1
  80. package/dist/cjs/version.js +1 -1
  81. package/dist/esm/BaseClient.mjs +2 -2
  82. package/dist/esm/api/resources/agent/client/Client.d.mts +3 -1
  83. package/dist/esm/api/resources/agent/client/Client.mjs +3 -1
  84. package/dist/esm/api/resources/apiKeys/types/ApiKeyPermissions.d.mts +4 -4
  85. package/dist/esm/api/resources/calendar/types/IanaTimezone.d.mts +5 -3
  86. package/dist/esm/api/resources/domains/types/Domain.d.mts +11 -4
  87. package/dist/esm/api/resources/domains/types/RecordType.d.mts +1 -0
  88. package/dist/esm/api/resources/domains/types/RecordType.mjs +1 -0
  89. package/dist/esm/api/resources/domains/types/TrackingEnabled.d.mts +4 -3
  90. package/dist/esm/api/resources/domains/types/TrackingStatus.d.mts +10 -0
  91. package/dist/esm/api/resources/domains/types/TrackingStatus.mjs +2 -0
  92. package/dist/esm/api/resources/domains/types/UpdateDomainRequest.d.mts +2 -1
  93. package/dist/esm/api/resources/domains/types/VerificationRecord.d.mts +1 -1
  94. package/dist/esm/api/resources/domains/types/index.d.mts +1 -0
  95. package/dist/esm/api/resources/domains/types/index.mjs +1 -0
  96. package/dist/esm/api/resources/events/types/EventId.d.mts +3 -1
  97. package/dist/esm/api/resources/events/types/InboxIds.d.mts +1 -1
  98. package/dist/esm/api/resources/events/types/MessageReceivedEvent.d.mts +1 -1
  99. package/dist/esm/api/resources/events/types/PodIds.d.mts +1 -1
  100. package/dist/esm/api/resources/events/types/ReceivedMessage.d.mts +18 -0
  101. package/dist/esm/api/resources/events/types/ReceivedMessage.mjs +2 -0
  102. package/dist/esm/api/resources/events/types/index.d.mts +1 -0
  103. package/dist/esm/api/resources/events/types/index.mjs +1 -0
  104. package/dist/esm/api/resources/inboxes/resources/calendar/client/Client.d.mts +20 -21
  105. package/dist/esm/api/resources/inboxes/resources/calendar/client/Client.mjs +20 -21
  106. package/dist/esm/api/resources/messages/types/Message.d.mts +1 -0
  107. package/dist/esm/api/resources/messages/types/MessageAuthenticationDomain.d.mts +5 -0
  108. package/dist/esm/api/resources/messages/types/MessageAuthenticationDomain.mjs +2 -0
  109. package/dist/esm/api/resources/messages/types/MessageAuthenticationResults.d.mts +56 -0
  110. package/dist/esm/api/resources/messages/types/MessageAuthenticationResults.mjs +2 -0
  111. package/dist/esm/api/resources/messages/types/MessageAuthenticationVerdict.d.mts +16 -0
  112. package/dist/esm/api/resources/messages/types/MessageAuthenticationVerdict.mjs +16 -0
  113. package/dist/esm/api/resources/messages/types/MessageCalendarEventId.d.mts +3 -2
  114. package/dist/esm/api/resources/messages/types/MessageHeaders.d.mts +4 -1
  115. package/dist/esm/api/resources/messages/types/MessageItem.d.mts +1 -0
  116. package/dist/esm/api/resources/messages/types/index.d.mts +3 -0
  117. package/dist/esm/api/resources/messages/types/index.mjs +3 -0
  118. package/dist/esm/api/resources/metrics/client/Client.d.mts +3 -4
  119. package/dist/esm/api/resources/metrics/client/Client.mjs +3 -4
  120. package/dist/esm/api/resources/organizations/client/Client.d.mts +1 -1
  121. package/dist/esm/api/resources/organizations/client/Client.mjs +1 -1
  122. package/dist/esm/api/resources/organizations/types/Organization.d.mts +12 -0
  123. package/dist/esm/api/resources/webhooks/types/CreatePodWebhookRequest.d.mts +4 -0
  124. package/dist/esm/api/resources/webhooks/types/CreateWebhookEventTypes.d.mts +3 -2
  125. package/dist/esm/api/resources/webhooks/types/CreateWebhookRequest.d.mts +3 -2
  126. package/dist/esm/api/resources/webhooks/types/UpdateInboxWebhookRequest.d.mts +6 -4
  127. package/dist/esm/api/resources/webhooks/types/UpdatePodWebhookRequest.d.mts +2 -1
  128. package/dist/esm/api/resources/webhooks/types/UpdateWebhookEventTypes.d.mts +2 -2
  129. package/dist/esm/api/resources/webhooks/types/UpdateWebhookRequest.d.mts +4 -1
  130. package/dist/esm/api/resources/webhooks/types/Webhook.d.mts +5 -1
  131. package/dist/esm/serialization/resources/domains/types/Domain.d.mts +3 -0
  132. package/dist/esm/serialization/resources/domains/types/Domain.mjs +3 -0
  133. package/dist/esm/serialization/resources/domains/types/RecordType.d.mts +1 -1
  134. package/dist/esm/serialization/resources/domains/types/RecordType.mjs +1 -1
  135. package/dist/esm/serialization/resources/domains/types/TrackingStatus.d.mts +8 -0
  136. package/dist/esm/serialization/resources/domains/types/TrackingStatus.mjs +3 -0
  137. package/dist/esm/serialization/resources/domains/types/index.d.mts +1 -0
  138. package/dist/esm/serialization/resources/domains/types/index.mjs +1 -0
  139. package/dist/esm/serialization/resources/events/types/MessageReceivedEvent.d.mts +2 -2
  140. package/dist/esm/serialization/resources/events/types/MessageReceivedEvent.mjs +2 -2
  141. package/dist/esm/serialization/resources/events/types/ReceivedMessage.d.mts +11 -0
  142. package/dist/esm/serialization/resources/events/types/ReceivedMessage.mjs +9 -0
  143. package/dist/esm/serialization/resources/events/types/index.d.mts +1 -0
  144. package/dist/esm/serialization/resources/events/types/index.mjs +1 -0
  145. package/dist/esm/serialization/resources/messages/types/Message.d.mts +2 -0
  146. package/dist/esm/serialization/resources/messages/types/Message.mjs +2 -0
  147. package/dist/esm/serialization/resources/messages/types/MessageAuthenticationDomain.d.mts +7 -0
  148. package/dist/esm/serialization/resources/messages/types/MessageAuthenticationDomain.mjs +3 -0
  149. package/dist/esm/serialization/resources/messages/types/MessageAuthenticationResults.d.mts +17 -0
  150. package/dist/esm/serialization/resources/messages/types/MessageAuthenticationResults.mjs +13 -0
  151. package/dist/esm/serialization/resources/messages/types/MessageAuthenticationVerdict.d.mts +7 -0
  152. package/dist/esm/serialization/resources/messages/types/MessageAuthenticationVerdict.mjs +3 -0
  153. package/dist/esm/serialization/resources/messages/types/MessageItem.d.mts +2 -0
  154. package/dist/esm/serialization/resources/messages/types/MessageItem.mjs +2 -0
  155. package/dist/esm/serialization/resources/messages/types/index.d.mts +3 -0
  156. package/dist/esm/serialization/resources/messages/types/index.mjs +3 -0
  157. package/dist/esm/serialization/resources/organizations/types/Organization.d.mts +2 -0
  158. package/dist/esm/serialization/resources/organizations/types/Organization.mjs +2 -0
  159. package/dist/esm/version.d.mts +1 -1
  160. package/dist/esm/version.mjs +1 -1
  161. package/dist/llms.txt +20 -2
  162. package/package.json +3 -2
  163. package/reference.md +27 -27
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "agentmail",
46
- "X-Fern-SDK-Version": "0.5.46",
47
- "User-Agent": "agentmail/0.5.46",
46
+ "X-Fern-SDK-Version": "0.5.47",
47
+ "User-Agent": "agentmail/0.5.47",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -15,6 +15,8 @@ export declare class AgentClient {
15
15
  *
16
16
  * A 6-digit OTP is sent to the human's email for verification.
17
17
  *
18
+ * The new organization starts with 1 inbox, no custom domains, and 10 emails per day, which can be sent only to `human_email` until the organization is verified.
19
+ *
18
20
  * `human_email` is optional. Without it, the inbox can receive email but cannot send to anyone until a human is attached with the attach human endpoint or, for a US-region inbox, claims it in the AgentMail Console with the API key (see [How do I claim my agent's inbox?](https://docs.agentmail.to/knowledge-base/claiming-agent-inbox)). There is also no way to recover the API key, so store it durably. Calling sign-up again without `human_email` creates a new organization, which needs a different `username`: the original username stays with the lost organization's inbox.
19
21
  *
20
22
  * This endpoint is idempotent. Calling it again with the same `human_email` will rotate the API key and resend the OTP if expired.
@@ -70,7 +72,7 @@ export declare class AgentClient {
70
72
  /**
71
73
  * Verify an agent organization using the 6-digit OTP sent to the human's email during sign-up.
72
74
  *
73
- * On success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and free plan entitlements are applied.
75
+ * On success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and the Free plan's entitlements are applied: 3 inboxes and 100 emails per day, at first to at most 3 distinct recipients in the first hour, 5 in the first day, and 10 in the first week.
74
76
  *
75
77
  * The OTP expires after 24 hours and allows a maximum of 10 attempts. If the OTP expired, call the attach human endpoint with the same `human_email` to get a new one without rotating the API key. Once all 10 attempts are used, even the correct OTP is rejected, and attach human keeps returning the same OTP until it expires, so wait for it to expire before asking for a new one. An organization that signed up without a `human_email` has no OTP until a human is attached. If you run into any difficulties receiving the OTP code, you can also create an account on [console.agentmail.to](https://console.agentmail.to) using the human email address you provided to verify your account.
76
78
  *
@@ -61,6 +61,8 @@ class AgentClient {
61
61
  *
62
62
  * A 6-digit OTP is sent to the human's email for verification.
63
63
  *
64
+ * The new organization starts with 1 inbox, no custom domains, and 10 emails per day, which can be sent only to `human_email` until the organization is verified.
65
+ *
64
66
  * `human_email` is optional. Without it, the inbox can receive email but cannot send to anyone until a human is attached with the attach human endpoint or, for a US-region inbox, claims it in the AgentMail Console with the API key (see [How do I claim my agent's inbox?](https://docs.agentmail.to/knowledge-base/claiming-agent-inbox)). There is also no way to recover the API key, so store it durably. Calling sign-up again without `human_email` creates a new organization, which needs a different `username`: the original username stays with the lost organization's inbox.
65
67
  *
66
68
  * This endpoint is idempotent. Calling it again with the same `human_email` will rotate the API key and resend the OTP if expired.
@@ -237,7 +239,7 @@ class AgentClient {
237
239
  /**
238
240
  * Verify an agent organization using the 6-digit OTP sent to the human's email during sign-up.
239
241
  *
240
- * On success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and free plan entitlements are applied.
242
+ * On success, the organization is upgraded from `agent_unverified` to `agent_verified`, the send allowlist is removed, and the Free plan's entitlements are applied: 3 inboxes and 100 emails per day, at first to at most 3 distinct recipients in the first hour, 5 in the first day, and 10 in the first week.
241
243
  *
242
244
  * The OTP expires after 24 hours and allows a maximum of 10 attempts. If the OTP expired, call the attach human endpoint with the same `human_email` to get a new one without rotating the API key. Once all 10 attempts are used, even the correct OTP is rejected, and attach human keeps returning the same OTP until it expires, so wait for it to expire before asking for a new one. An organization that signed up without a `human_email` has no OTP until a human is attached. If you run into any difficulties receiving the OTP code, you can also create an account on [console.agentmail.to](https://console.agentmail.to) using the human email address you provided to verify your account.
243
245
  *
@@ -110,12 +110,12 @@ export interface ApiKeyPermissions {
110
110
  calendarEventUpdate?: boolean;
111
111
  /** Delete calendar events. */
112
112
  calendarEventDelete?: boolean;
113
- /** List and get Agent Drive files, with their download URLs. */
113
+ /** Reserved; not released yet. */
114
114
  fileRead?: boolean;
115
- /** Upload Agent Drive files (Create File and Complete File). */
115
+ /** Reserved; not released yet. */
116
116
  fileCreate?: boolean;
117
- /** Update Agent Drive files. Reserved; no endpoint uses it yet. */
117
+ /** Reserved; not released yet. */
118
118
  fileUpdate?: boolean;
119
- /** Delete Agent Drive files. */
119
+ /** Reserved; not released yet. */
120
120
  fileDelete?: boolean;
121
121
  }
@@ -1,6 +1,8 @@
1
1
  /**
2
- * Canonical IANA time zone name, for example `America/New_York`, `Europe/London` or `UTC`.
3
- * Abbreviations such as `PST`, Windows names such as `Pacific Standard Time`, and spellings that
4
- * differ from the canonical name are rejected.
2
+ * IANA time zone name, for example `America/New_York`, `Europe/London` or `UTC`. Requests accept
3
+ * any capitalization and IANA aliases such as `US/Eastern`. The calendar stores and returns the
4
+ * canonical name, which for some zones is an older spelling: `Asia/Kolkata` is returned as
5
+ * `Asia/Calcutta`. Abbreviations such as `PST` and Windows names such as `Pacific Standard Time`
6
+ * are rejected.
5
7
  */
6
8
  export type IanaTimezone = string;
@@ -4,17 +4,24 @@ export interface Domain {
4
4
  domainId: AgentMail.DomainId;
5
5
  domain: AgentMail.DomainName;
6
6
  status: AgentMail.Status;
7
- /** Why the domain is not (yet) VERIFIED, when known. `dns_records_missing` / `dns_records_invalid` point at the DNS records. The `ses_*` values mean the records look right and sending-infrastructure validation has not converged: `ses_dkim_pending` / `ses_mail_from_pending` (still checking), `ses_dkim_temporary_failure` / `ses_mail_from_temporary_failure` (a transient error the infrastructure keeps retrying on its own — usually resolves without changes), `ses_dkim_failed` / `ses_mail_from_failed` (a terminal verdict; re-verify after fixing), `ses_dkim_not_started` / `ses_mail_from_not_started` (the attribute was never configured on the identity — re-verify to push it), and `ses_not_verified_for_sending`. Absent when VERIFIED. */
7
+ /** Why the domain is not (yet) VERIFIED, when known. `dns_records_missing` / `dns_records_invalid` point at the DNS records. The `ses_*` values mean the records look right and sending-infrastructure validation has not converged: `ses_dkim_pending` / `ses_mail_from_pending` (still checking), `ses_dkim_temporary_failure` / `ses_mail_from_temporary_failure` (a transient error the infrastructure keeps retrying on its own — usually resolves without changes), `ses_dkim_failed` / `ses_mail_from_failed` (a terminal verdict; re-verify after fixing), `ses_dkim_not_started` / `ses_mail_from_not_started` (the attribute was never configured on the identity — re-verify to push it), `ses_not_verified_for_sending`, and `tracking_certificate_failed` (the certificate for the open tracking `link.` subdomain was refused; fix CAA or DNS, then turn tracking off and back on). Absent when VERIFIED. */
8
8
  reason?: string;
9
9
  feedbackEnabled: AgentMail.FeedbackEnabled;
10
10
  /** Absent on domains created before this field existed; those receive email. */
11
11
  inboundEnabled?: AgentMail.InboundEnabled;
12
12
  subdomainsEnabled: AgentMail.SubdomainsEnabled;
13
13
  trackingEnabled: AgentMail.TrackingEnabled;
14
+ /** Present when `tracking_enabled` is true. */
15
+ trackingStatus?: AgentMail.TrackingStatus;
16
+ /** Why open tracking is not (yet) VERIFIED, when known. `dns_records_missing` / `dns_records_invalid` point at the `link.<domain>` CNAME. `caa_blocked` means the domain's CAA records leave Amazon out: add the `CAA` record listed in `records`, and AgentMail retries the certificate on its own within a few minutes. `certificate_failed` means the certificate was refused; fix the DNS, then turn tracking off and back on. Absent when `tracking_status` is VERIFIED. */
17
+ trackingReason?: string;
14
18
  /**
15
- * A list of DNS records required to verify the domain. Includes the apex
16
- * MX record unless `inbound_enabled` is false, and a wildcard MX record
17
- * (`*.<domain>`) when `subdomains_enabled` is true.
19
+ * A list of DNS records for the domain. Includes the apex MX record unless
20
+ * `inbound_enabled` is false, and a wildcard MX record (`*.<domain>`) when
21
+ * `subdomains_enabled` is true. When `tracking_enabled` is true it also lists
22
+ * the `link.<domain>` CNAME and, if the domain's CAA records restrict
23
+ * issuance, a `CAA` record. Those two are for open tracking only: they
24
+ * feed `tracking_status` and do not affect `status`.
18
25
  */
19
26
  records: AgentMail.VerificationRecord[];
20
27
  clientId?: AgentMail.ClientId;
@@ -2,5 +2,6 @@ export declare const RecordType: {
2
2
  readonly Txt: "TXT";
3
3
  readonly Cname: "CNAME";
4
4
  readonly Mx: "MX";
5
+ readonly Caa: "CAA";
5
6
  };
6
7
  export type RecordType = (typeof RecordType)[keyof typeof RecordType];
@@ -6,4 +6,5 @@ exports.RecordType = {
6
6
  Txt: "TXT",
7
7
  Cname: "CNAME",
8
8
  Mx: "MX",
9
+ Caa: "CAA",
9
10
  };
@@ -1,6 +1,7 @@
1
1
  /**
2
- * Serve open tracking pixels from this domain. Adds a required `link.<domain>`
3
- * CNAME record to `records`, which must be published and verified before
4
- * `track_opens` can be used on a send.
2
+ * Serve open tracking pixels from this domain. Adds a `link.<domain>` CNAME
3
+ * record to `records`. Open tracking reports its readiness in `tracking_status`
4
+ * and never changes the domain's `status`. Sends with `track_opens` are accepted
5
+ * once `tracking_status` is `VERIFIED`.
5
6
  */
6
7
  export type TrackingEnabled = boolean;
@@ -0,0 +1,10 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ /**
3
+ * Whether open tracking is ready on this domain, independent of the domain's
4
+ * `status`. `PENDING`: the `link.<domain>` CNAME is not published yet.
5
+ * `INVALID`: the CNAME is wrong, or the domain's CAA records do not allow
6
+ * Amazon to issue its certificate. `VERIFYING`: the certificate is being
7
+ * issued. `VERIFIED`: `track_opens` can be used. `FAILED`: the certificate was
8
+ * refused; turn tracking off and back on to request a new one.
9
+ */
10
+ export type TrackingStatus = AgentMail.VerificationStatus;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,7 +5,8 @@ import type * as AgentMail from "../../../index.js";
5
5
  * unchanged; an empty body is rejected. Enabling `inbound_enabled` or
6
6
  * `subdomains_enabled` on a verified domain returns it to `PENDING` until the
7
7
  * newly required MX record (the apex MX, or the wildcard `*.<domain>`) is
8
- * published and verified.
8
+ * published and verified. Enabling `tracking_enabled` leaves `status` as it is
9
+ * and starts `tracking_status` at `PENDING`.
9
10
  */
10
11
  export interface UpdateDomainRequest {
11
12
  feedbackEnabled?: AgentMail.FeedbackEnabled;
@@ -1,6 +1,6 @@
1
1
  import type * as AgentMail from "../../../index.js";
2
2
  export interface VerificationRecord {
3
- /** The type of the DNS record. */
3
+ /** The type of the DNS record. A `CAA` record is listed only when open tracking is on and the domain's CAA records restrict which certificate authorities may issue for it: add it next to the existing CAA records, not in place of them. */
4
4
  type: AgentMail.RecordType;
5
5
  /** The name or host of the record. */
6
6
  name: string;
@@ -13,6 +13,7 @@ export * from "./RecordType.js";
13
13
  export * from "./Status.js";
14
14
  export * from "./SubdomainsEnabled.js";
15
15
  export * from "./TrackingEnabled.js";
16
+ export * from "./TrackingStatus.js";
16
17
  export * from "./UpdateDomainRequest.js";
17
18
  export * from "./VerificationRecord.js";
18
19
  export * from "./VerificationStatus.js";
@@ -29,6 +29,7 @@ __exportStar(require("./RecordType.js"), exports);
29
29
  __exportStar(require("./Status.js"), exports);
30
30
  __exportStar(require("./SubdomainsEnabled.js"), exports);
31
31
  __exportStar(require("./TrackingEnabled.js"), exports);
32
+ __exportStar(require("./TrackingStatus.js"), exports);
32
33
  __exportStar(require("./UpdateDomainRequest.js"), exports);
33
34
  __exportStar(require("./VerificationRecord.js"), exports);
34
35
  __exportStar(require("./VerificationStatus.js"), exports);
@@ -1,4 +1,6 @@
1
1
  /**
2
- * ID of event.
2
+ * ID of the event. It is the same on every retry and redelivery of the event and on every webhook
3
+ * or WebSocket subscription that receives it, so use it to deduplicate. The format varies by event
4
+ * type; treat it as an opaque string.
3
5
  */
4
6
  export type EventId = string;
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Inboxes for which to send events. Maximum 10 per webhook.
2
+ * Inboxes for which to send events.
3
3
  */
4
4
  export type InboxIds = string[];
@@ -6,6 +6,6 @@ export interface MessageReceivedEvent {
6
6
  type: "event";
7
7
  eventType: AgentMail.MessageReceivedEventType;
8
8
  eventId: AgentMail.EventId;
9
- message: AgentMail.Message;
9
+ message: AgentMail.ReceivedMessage;
10
10
  thread: AgentMail.ThreadItem;
11
11
  }
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Pods for which to send events. Maximum 10 per webhook.
2
+ * Pods for which to send events.
3
3
  */
4
4
  export type PodIds = string[];
@@ -0,0 +1,18 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ /**
3
+ * The received message. The body (`text`, `html`, `extracted_text`, and `extracted_html`) is included
4
+ * inline only when it is small enough. Webhooks omit it when the stored body is larger than 64 KiB;
5
+ * WebSocket events also omit it when the serialized event would be larger than 30 KiB. When the body
6
+ * is omitted, `body_url` and `body_expires_at` are set instead.
7
+ */
8
+ export interface ReceivedMessage extends AgentMail.Message {
9
+ /**
10
+ * Pre-signed URL that downloads the stored body as a JSON object including `text`, `html`,
11
+ * `extracted_text`, and `extracted_html`. Present only when the body is omitted from the event.
12
+ * Valid until `body_expires_at`, one hour after the event was built. The body stays available
13
+ * through the get message endpoint after the URL expires.
14
+ */
15
+ bodyUrl?: string;
16
+ /** Time at which `body_url` expires. Present only with `body_url`. */
17
+ bodyExpiresAt?: Date;
18
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -28,6 +28,7 @@ export * from "./MessageSecurityReviewEvent.js";
28
28
  export * from "./MessageSentEvent.js";
29
29
  export * from "./Open.js";
30
30
  export * from "./PodIds.js";
31
+ export * from "./ReceivedMessage.js";
31
32
  export * from "./Recipient.js";
32
33
  export * from "./Reject.js";
33
34
  export * from "./Send.js";
@@ -44,6 +44,7 @@ __exportStar(require("./MessageSecurityReviewEvent.js"), exports);
44
44
  __exportStar(require("./MessageSentEvent.js"), exports);
45
45
  __exportStar(require("./Open.js"), exports);
46
46
  __exportStar(require("./PodIds.js"), exports);
47
+ __exportStar(require("./ReceivedMessage.js"), exports);
47
48
  __exportStar(require("./Recipient.js"), exports);
48
49
  __exportStar(require("./Reject.js"), exports);
49
50
  __exportStar(require("./Send.js"), exports);
@@ -17,9 +17,8 @@ export declare class CalendarClient {
17
17
  * created. Its `etag` (also the `ETag` response header) is the value to send in `If-Match` to
18
18
  * make an update conditional.
19
19
  *
20
- * Requires the `calendar_read` permission. Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`)
21
- * but not yet in EU production (`api.agentmail.eu`). Organizations that have not joined
22
- * Labs receive a `403`.
20
+ * Requires the `calendar_read` permission. Calendar is available in US production
21
+ * (`api.agentmail.to`) but not yet in EU production (`api.agentmail.eu`), which returns `403`.
23
22
  *
24
23
  * @param {AgentMail.inboxes.InboxId} inbox_id
25
24
  * @param {AgentMail.inboxes.GetCalendarRequest} request
@@ -44,8 +43,8 @@ export declare class CalendarClient {
44
43
  * calendar's current `etag` in `If-Match`: a stale value returns `412`. Without `If-Match` the
45
44
  * update applies to the calendar as it is.
46
45
  *
47
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
48
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
46
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
47
+ * (`api.agentmail.eu`), which returns `403`.
49
48
  *
50
49
  * @param {AgentMail.inboxes.InboxId} inbox_id
51
50
  * @param {AgentMail.inboxes.UpdateCalendarRequestWrapper} request
@@ -77,8 +76,8 @@ export declare class CalendarClient {
77
76
  * The list is always read in the region that serves the request, so it can trail a change made
78
77
  * moments earlier by a few seconds. Requires the `calendar_event_read` permission.
79
78
  *
80
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
81
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
79
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
80
+ * (`api.agentmail.eu`), which returns `403`.
82
81
  *
83
82
  * @param {AgentMail.inboxes.InboxId} inbox_id
84
83
  * @param {AgentMail.inboxes.ListCalendarEventsRequest} request
@@ -115,8 +114,8 @@ export declare class CalendarClient {
115
114
  * moments earlier by a few seconds. Pass `consistency=primary` to read your own change right
116
115
  * away. Requires the `calendar_event_read` permission.
117
116
  *
118
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
119
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
117
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
118
+ * (`api.agentmail.eu`), which returns `403`.
120
119
  *
121
120
  * @param {AgentMail.inboxes.InboxId} inbox_id
122
121
  * @param {AgentMail.inboxes.GetCalendarAgendaRequest} request
@@ -158,8 +157,8 @@ export declare class CalendarClient {
158
157
  * The event's `etag` is the value to send in `If-Match` to make a later update or delete
159
158
  * conditional. Requires the `calendar_event_create` permission.
160
159
  *
161
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
162
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
160
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
161
+ * (`api.agentmail.eu`), which returns `403`.
163
162
  *
164
163
  * @param {AgentMail.inboxes.InboxId} inbox_id
165
164
  * @param {AgentMail.CreateCalendarEventRequest} request
@@ -220,8 +219,8 @@ export declare class CalendarClient {
220
219
  * reads back as it ran, even if a later change to the series no longer produces it. Requires
221
220
  * the `calendar_event_read` permission.
222
221
  *
223
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
224
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
222
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
223
+ * (`api.agentmail.eu`), which returns `403`.
225
224
  *
226
225
  * @param {AgentMail.inboxes.InboxId} inbox_id
227
226
  * @param {AgentMail.CalendarEventId} event_id
@@ -269,8 +268,8 @@ export declare class CalendarClient {
269
268
  * send limits, charged before the change is saved; an over-limit request returns `429`
270
269
  * `rate_limit_exceeded` and changes nothing.
271
270
  *
272
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
273
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
271
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
272
+ * (`api.agentmail.eu`), which returns `403`.
274
273
  *
275
274
  * @param {AgentMail.inboxes.InboxId} inbox_id
276
275
  * @param {AgentMail.CalendarEventId} event_id
@@ -327,8 +326,8 @@ export declare class CalendarClient {
327
326
  * send limits, charged before the delete; an over-limit request returns `429`
328
327
  * `rate_limit_exceeded` and deletes nothing.
329
328
  *
330
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
331
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
329
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
330
+ * (`api.agentmail.eu`), which returns `403`.
332
331
  *
333
332
  * @param {AgentMail.inboxes.InboxId} inbox_id
334
333
  * @param {AgentMail.CalendarEventId} event_id
@@ -368,8 +367,8 @@ export declare class CalendarClient {
368
367
  * trail a change made moments earlier by a few seconds; pass `consistency=primary` to read
369
368
  * your own change right away. Requires the `calendar_event_read` permission.
370
369
  *
371
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
372
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
370
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
371
+ * (`api.agentmail.eu`), which returns `403`.
373
372
  *
374
373
  * @param {AgentMail.inboxes.InboxId} inbox_id
375
374
  * @param {string} event_id - UUID of the recurring event.
@@ -407,8 +406,8 @@ export declare class CalendarClient {
407
406
  * charged before the response is saved; an over-limit request returns `429`
408
407
  * `rate_limit_exceeded` and changes nothing.
409
408
  *
410
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
411
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
409
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
410
+ * (`api.agentmail.eu`), which returns `403`.
412
411
  *
413
412
  * @param {AgentMail.inboxes.InboxId} inbox_id
414
413
  * @param {AgentMail.CalendarEventId} event_id
@@ -74,9 +74,8 @@ class CalendarClient {
74
74
  * created. Its `etag` (also the `ETag` response header) is the value to send in `If-Match` to
75
75
  * make an update conditional.
76
76
  *
77
- * Requires the `calendar_read` permission. Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`)
78
- * but not yet in EU production (`api.agentmail.eu`). Organizations that have not joined
79
- * Labs receive a `403`.
77
+ * Requires the `calendar_read` permission. Calendar is available in US production
78
+ * (`api.agentmail.to`) but not yet in EU production (`api.agentmail.eu`), which returns `403`.
80
79
  *
81
80
  * @param {AgentMail.inboxes.InboxId} inbox_id
82
81
  * @param {AgentMail.inboxes.GetCalendarRequest} request
@@ -177,8 +176,8 @@ class CalendarClient {
177
176
  * calendar's current `etag` in `If-Match`: a stale value returns `412`. Without `If-Match` the
178
177
  * update applies to the calendar as it is.
179
178
  *
180
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
181
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
179
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
180
+ * (`api.agentmail.eu`), which returns `403`.
182
181
  *
183
182
  * @param {AgentMail.inboxes.InboxId} inbox_id
184
183
  * @param {AgentMail.inboxes.UpdateCalendarRequestWrapper} request
@@ -308,8 +307,8 @@ class CalendarClient {
308
307
  * The list is always read in the region that serves the request, so it can trail a change made
309
308
  * moments earlier by a few seconds. Requires the `calendar_event_read` permission.
310
309
  *
311
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
312
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
310
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
311
+ * (`api.agentmail.eu`), which returns `403`.
313
312
  *
314
313
  * @param {AgentMail.inboxes.InboxId} inbox_id
315
314
  * @param {AgentMail.inboxes.ListCalendarEventsRequest} request
@@ -418,8 +417,8 @@ class CalendarClient {
418
417
  * moments earlier by a few seconds. Pass `consistency=primary` to read your own change right
419
418
  * away. Requires the `calendar_event_read` permission.
420
419
  *
421
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
422
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
420
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
421
+ * (`api.agentmail.eu`), which returns `403`.
423
422
  *
424
423
  * @param {AgentMail.inboxes.InboxId} inbox_id
425
424
  * @param {AgentMail.inboxes.GetCalendarAgendaRequest} request
@@ -552,8 +551,8 @@ class CalendarClient {
552
551
  * The event's `etag` is the value to send in `If-Match` to make a later update or delete
553
552
  * conditional. Requires the `calendar_event_create` permission.
554
553
  *
555
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
556
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
554
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
555
+ * (`api.agentmail.eu`), which returns `403`.
557
556
  *
558
557
  * @param {AgentMail.inboxes.InboxId} inbox_id
559
558
  * @param {AgentMail.CreateCalendarEventRequest} request
@@ -711,8 +710,8 @@ class CalendarClient {
711
710
  * reads back as it ran, even if a later change to the series no longer produces it. Requires
712
711
  * the `calendar_event_read` permission.
713
712
  *
714
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
715
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
713
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
714
+ * (`api.agentmail.eu`), which returns `403`.
716
715
  *
717
716
  * @param {AgentMail.inboxes.InboxId} inbox_id
718
717
  * @param {AgentMail.CalendarEventId} event_id
@@ -844,8 +843,8 @@ class CalendarClient {
844
843
  * send limits, charged before the change is saved; an over-limit request returns `429`
845
844
  * `rate_limit_exceeded` and changes nothing.
846
845
  *
847
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
848
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
846
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
847
+ * (`api.agentmail.eu`), which returns `403`.
849
848
  *
850
849
  * @param {AgentMail.inboxes.InboxId} inbox_id
851
850
  * @param {AgentMail.CalendarEventId} event_id
@@ -1024,8 +1023,8 @@ class CalendarClient {
1024
1023
  * send limits, charged before the delete; an over-limit request returns `429`
1025
1024
  * `rate_limit_exceeded` and deletes nothing.
1026
1025
  *
1027
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
1028
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
1026
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
1027
+ * (`api.agentmail.eu`), which returns `403`.
1029
1028
  *
1030
1029
  * @param {AgentMail.inboxes.InboxId} inbox_id
1031
1030
  * @param {AgentMail.CalendarEventId} event_id
@@ -1174,8 +1173,8 @@ class CalendarClient {
1174
1173
  * trail a change made moments earlier by a few seconds; pass `consistency=primary` to read
1175
1174
  * your own change right away. Requires the `calendar_event_read` permission.
1176
1175
  *
1177
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
1178
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
1176
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
1177
+ * (`api.agentmail.eu`), which returns `403`.
1179
1178
  *
1180
1179
  * @param {AgentMail.inboxes.InboxId} inbox_id
1181
1180
  * @param {string} event_id - UUID of the recurring event.
@@ -1312,8 +1311,8 @@ class CalendarClient {
1312
1311
  * charged before the response is saved; an over-limit request returns `429`
1313
1312
  * `rate_limit_exceeded` and changes nothing.
1314
1313
  *
1315
- * Calendar is in AgentMail Labs, available in US production (`api.agentmail.to`) but not yet
1316
- * in EU production (`api.agentmail.eu`). Organizations that have not joined Labs receive a `403`.
1314
+ * Calendar is available in US production (`api.agentmail.to`) but not yet in EU production
1315
+ * (`api.agentmail.eu`), which returns `403`.
1317
1316
  *
1318
1317
  * @param {AgentMail.inboxes.InboxId} inbox_id
1319
1318
  * @param {AgentMail.CalendarEventId} event_id
@@ -24,6 +24,7 @@ export interface Message {
24
24
  calendarEventId?: AgentMail.MessageCalendarEventId;
25
25
  references?: AgentMail.MessageReferences;
26
26
  headers?: AgentMail.MessageHeaders;
27
+ authenticationResults?: AgentMail.MessageAuthenticationResults;
27
28
  agentArmor?: AgentMail.AgentArmorResult;
28
29
  size: AgentMail.MessageSize;
29
30
  updatedAt: AgentMail.MessageUpdatedAt;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The domain an authentication verdict is about, lowercase. Present only beside its verdict:
3
+ * when the verdict is withheld, so is the domain.
4
+ */
5
+ export type MessageAuthenticationDomain = string;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,56 @@
1
+ import type * as AgentMail from "../../../index.js";
2
+ /**
3
+ * Per-mechanism SPF, DKIM, and DMARC verdicts for a received message, each with the domain it
4
+ * is about, kept only where they speak for the sender's From identity. A verdict that could
5
+ * not be computed is absent, so the field can be `{}`. The field is absent on sent messages
6
+ * and on messages received before 2026-09-09; the `*_domain` and `arc_sealer` keys appear on
7
+ * messages received after they were introduced.
8
+ *
9
+ * The verdicts are the ones Amazon SES computed when the message reached AgentMail, with one
10
+ * exception. Forwarded mail fails DMARC at the receiving hop by construction. When AgentMail
11
+ * delivers a forwarded message as authenticated because a trusted forwarder (such as Google or
12
+ * Microsoft) sealed a valid ARC chain vouching for the original, the field reports the
13
+ * verdicts that forwarder recorded for the original message, and `arc_sealer` names it.
14
+ *
15
+ * - `spf` is about the envelope MAIL FROM (Return-Path) domain, named in `spf_domain`. It is
16
+ * present only when that domain is aligned with the sender's domain (the From mailbox, or
17
+ * the Sender header when From spans domains), meaning the two share an organizational
18
+ * domain: `mail.example.com` is aligned with `example.com`. An unaligned SPF result is
19
+ * withheld whatever its value.
20
+ * - `dkim` is the DKIM verdict, and `dkim_domain` the signing domain (the `d=` tag). On
21
+ * directly received mail the domain is named only when every DKIM signature on the message
22
+ * is from the same domain; a message signed by more than one domain (a sender and its email
23
+ * provider, for instance) keeps the verdict and omits the domain. `dkim_domain` is the
24
+ * signing domain as written, so compare it with the From domain before relying on it.
25
+ * - `dmarc` is the DMARC verdict for the From domain, named in `dmarc_domain`.
26
+ * - `dkim` and `dmarc` are withheld when the From list spans more than one domain or could not
27
+ * be fully parsed.
28
+ * - On forwarded mail each sealed verdict is reported only when the domain the forwarder
29
+ * recorded it for matches the message's current From domain. If the forwarder rewrote From,
30
+ * or vouched for nothing, the field is `{}`.
31
+ *
32
+ * The `unauthenticated` label, not this field, is AgentMail's acceptance decision, and it uses
33
+ * a looser rule, so the two can disagree: a single-From message whose only pass is an
34
+ * unaligned envelope SPF is delivered without the label while this field shows no pass. Use
35
+ * the label to tell whether AgentMail accepted the message as legitimate, and this field to
36
+ * see which domain each mechanism authenticated. Do not reject mail on `dmarc: fail` alone.
37
+ */
38
+ export interface MessageAuthenticationResults {
39
+ spf?: AgentMail.MessageAuthenticationVerdict;
40
+ dkim?: AgentMail.MessageAuthenticationVerdict;
41
+ dmarc?: AgentMail.MessageAuthenticationVerdict;
42
+ /** Envelope MAIL FROM domain the `spf` verdict is about (`smtp.mailfrom`). */
43
+ spfDomain?: AgentMail.MessageAuthenticationDomain;
44
+ /**
45
+ * Signing domain the `dkim` verdict is about (`header.d`). Present only when `dkim` is
46
+ * `pass` or `fail`.
47
+ */
48
+ dkimDomain?: AgentMail.MessageAuthenticationDomain;
49
+ /** From domain the `dmarc` verdict is about (`header.from`). */
50
+ dmarcDomain?: AgentMail.MessageAuthenticationDomain;
51
+ /**
52
+ * Domain of the trusted forwarder whose ARC seal the verdicts were taken from, such as
53
+ * `google.com`. Present only on forwarded mail, and only beside at least one verdict.
54
+ */
55
+ arcSealer?: AgentMail.MessageAuthenticationDomain;
56
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Result of one email authentication mechanism, in the vocabulary of the
3
+ * `Authentication-Results` header (RFC 8601). `none` means there was nothing to evaluate
4
+ * (Amazon SES calls this GRAY): no SPF record for the envelope MAIL FROM domain, no DKIM
5
+ * signature to check, or no DMARC record for the From domain.
6
+ */
7
+ export declare const MessageAuthenticationVerdict: {
8
+ readonly Pass: "pass";
9
+ readonly Fail: "fail";
10
+ readonly None: "none";
11
+ readonly Neutral: "neutral";
12
+ readonly Softfail: "softfail";
13
+ readonly Temperror: "temperror";
14
+ readonly Permerror: "permerror";
15
+ };
16
+ export type MessageAuthenticationVerdict = (typeof MessageAuthenticationVerdict)[keyof typeof MessageAuthenticationVerdict];
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.MessageAuthenticationVerdict = void 0;
5
+ /**
6
+ * Result of one email authentication mechanism, in the vocabulary of the
7
+ * `Authentication-Results` header (RFC 8601). `none` means there was nothing to evaluate
8
+ * (Amazon SES calls this GRAY): no SPF record for the envelope MAIL FROM domain, no DKIM
9
+ * signature to check, or no DMARC record for the From domain.
10
+ */
11
+ exports.MessageAuthenticationVerdict = {
12
+ Pass: "pass",
13
+ Fail: "fail",
14
+ None: "none",
15
+ Neutral: "neutral",
16
+ Softfail: "softfail",
17
+ Temperror: "temperror",
18
+ Permerror: "permerror",
19
+ };