agentmail 0.5.50 → 0.5.51

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 (211) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +21 -16
  4. package/dist/cjs/api/resources/forwarding/client/Client.d.ts +127 -0
  5. package/dist/cjs/api/resources/forwarding/client/Client.js +503 -0
  6. package/dist/cjs/api/resources/forwarding/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/forwarding/client/index.js +2 -0
  8. package/dist/cjs/api/resources/forwarding/errors/ForwardingForbiddenError.d.ts +6 -0
  9. package/dist/cjs/api/resources/forwarding/errors/ForwardingForbiddenError.js +54 -0
  10. package/dist/cjs/api/resources/forwarding/errors/ForwardingRateLimitError.d.ts +6 -0
  11. package/dist/cjs/api/resources/forwarding/errors/ForwardingRateLimitError.js +54 -0
  12. package/dist/cjs/api/resources/forwarding/errors/index.d.ts +2 -0
  13. package/dist/cjs/api/resources/forwarding/errors/index.js +18 -0
  14. package/dist/cjs/api/resources/forwarding/exports.d.ts +2 -0
  15. package/dist/cjs/api/resources/forwarding/exports.js +21 -0
  16. package/dist/cjs/api/resources/forwarding/index.d.ts +3 -0
  17. package/dist/cjs/api/resources/forwarding/index.js +19 -0
  18. package/dist/cjs/api/resources/forwarding/types/ConfirmForwardingVerificationRequest.d.ts +10 -0
  19. package/dist/cjs/api/resources/forwarding/types/ConfirmForwardingVerificationRequest.js +3 -0
  20. package/dist/cjs/api/resources/forwarding/types/Forwarding.d.ts +15 -0
  21. package/dist/cjs/api/resources/forwarding/types/Forwarding.js +3 -0
  22. package/dist/cjs/api/resources/forwarding/types/ForwardingDestination.d.ts +5 -0
  23. package/dist/cjs/api/resources/forwarding/types/ForwardingDestination.js +3 -0
  24. package/dist/cjs/api/resources/forwarding/types/ForwardingVerificationConfirmed.d.ts +4 -0
  25. package/dist/cjs/api/resources/forwarding/types/ForwardingVerificationConfirmed.js +3 -0
  26. package/dist/cjs/api/resources/forwarding/types/ForwardingVerificationStarted.d.ts +4 -0
  27. package/dist/cjs/api/resources/forwarding/types/ForwardingVerificationStarted.js +3 -0
  28. package/dist/cjs/api/resources/forwarding/types/StartForwardingVerificationRequest.d.ts +5 -0
  29. package/dist/cjs/api/resources/forwarding/types/StartForwardingVerificationRequest.js +3 -0
  30. package/dist/cjs/api/resources/forwarding/types/UpdateForwardingRequest.d.ts +9 -0
  31. package/dist/cjs/api/resources/forwarding/types/UpdateForwardingRequest.js +3 -0
  32. package/dist/cjs/api/resources/forwarding/types/UpdateForwardingResponse.d.ts +8 -0
  33. package/dist/cjs/api/resources/forwarding/types/UpdateForwardingResponse.js +3 -0
  34. package/dist/cjs/api/resources/forwarding/types/index.d.ts +8 -0
  35. package/dist/cjs/api/resources/forwarding/types/index.js +24 -0
  36. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +7 -1
  37. package/dist/cjs/api/resources/inboxes/client/Client.js +27 -11
  38. package/dist/cjs/api/resources/inboxes/resources/forwarding/client/Client.d.ts +79 -0
  39. package/dist/cjs/api/resources/inboxes/resources/forwarding/client/Client.js +317 -0
  40. package/dist/cjs/api/resources/inboxes/resources/forwarding/client/index.d.ts +1 -0
  41. package/dist/cjs/api/resources/inboxes/resources/forwarding/client/index.js +2 -0
  42. package/dist/cjs/api/resources/inboxes/resources/forwarding/exports.d.ts +2 -0
  43. package/dist/cjs/api/resources/inboxes/resources/forwarding/exports.js +21 -0
  44. package/dist/cjs/api/resources/inboxes/resources/forwarding/index.d.ts +1 -0
  45. package/dist/cjs/api/resources/inboxes/resources/forwarding/index.js +17 -0
  46. package/dist/cjs/api/resources/inboxes/resources/index.d.ts +1 -0
  47. package/dist/cjs/api/resources/inboxes/resources/index.js +2 -1
  48. package/dist/cjs/api/resources/index.d.ts +3 -0
  49. package/dist/cjs/api/resources/index.js +4 -1
  50. package/dist/cjs/api/resources/messages/types/Message.d.ts +2 -0
  51. package/dist/cjs/api/resources/messages/types/MessageItem.d.ts +2 -0
  52. package/dist/cjs/api/resources/messages/types/MessageOpenedAt.d.ts +6 -0
  53. package/dist/cjs/api/resources/messages/types/MessageOpenedAt.js +3 -0
  54. package/dist/cjs/api/resources/messages/types/MessageTrackOpens.d.ts +5 -0
  55. package/dist/cjs/api/resources/messages/types/MessageTrackOpens.js +3 -0
  56. package/dist/cjs/api/resources/messages/types/TrackOpens.d.ts +4 -3
  57. package/dist/cjs/api/resources/messages/types/index.d.ts +2 -0
  58. package/dist/cjs/api/resources/messages/types/index.js +2 -0
  59. package/dist/cjs/api/resources/pods/client/Client.d.ts +3 -0
  60. package/dist/cjs/api/resources/pods/client/Client.js +15 -10
  61. package/dist/cjs/api/resources/pods/resources/forwarding/client/Client.d.ts +80 -0
  62. package/dist/cjs/api/resources/pods/resources/forwarding/client/Client.js +318 -0
  63. package/dist/cjs/api/resources/pods/resources/forwarding/client/index.d.ts +1 -0
  64. package/dist/cjs/api/resources/pods/resources/forwarding/client/index.js +2 -0
  65. package/dist/cjs/api/resources/pods/resources/forwarding/exports.d.ts +2 -0
  66. package/dist/cjs/api/resources/pods/resources/forwarding/exports.js +21 -0
  67. package/dist/cjs/api/resources/pods/resources/forwarding/index.d.ts +1 -0
  68. package/dist/cjs/api/resources/pods/resources/forwarding/index.js +17 -0
  69. package/dist/cjs/api/resources/pods/resources/index.d.ts +1 -0
  70. package/dist/cjs/api/resources/pods/resources/index.js +2 -1
  71. package/dist/cjs/serialization/resources/forwarding/index.d.ts +1 -0
  72. package/dist/cjs/serialization/resources/forwarding/index.js +17 -0
  73. package/dist/cjs/serialization/resources/forwarding/types/ConfirmForwardingVerificationRequest.d.ts +11 -0
  74. package/dist/cjs/serialization/resources/forwarding/types/ConfirmForwardingVerificationRequest.js +43 -0
  75. package/dist/cjs/serialization/resources/forwarding/types/Forwarding.d.ts +11 -0
  76. package/dist/cjs/serialization/resources/forwarding/types/Forwarding.js +43 -0
  77. package/dist/cjs/serialization/resources/forwarding/types/ForwardingDestination.d.ts +7 -0
  78. package/dist/cjs/serialization/resources/forwarding/types/ForwardingDestination.js +39 -0
  79. package/dist/cjs/serialization/resources/forwarding/types/ForwardingVerificationConfirmed.d.ts +9 -0
  80. package/dist/cjs/serialization/resources/forwarding/types/ForwardingVerificationConfirmed.js +41 -0
  81. package/dist/cjs/serialization/resources/forwarding/types/ForwardingVerificationStarted.d.ts +9 -0
  82. package/dist/cjs/serialization/resources/forwarding/types/ForwardingVerificationStarted.js +41 -0
  83. package/dist/cjs/serialization/resources/forwarding/types/StartForwardingVerificationRequest.d.ts +10 -0
  84. package/dist/cjs/serialization/resources/forwarding/types/StartForwardingVerificationRequest.js +42 -0
  85. package/dist/cjs/serialization/resources/forwarding/types/UpdateForwardingRequest.d.ts +10 -0
  86. package/dist/cjs/serialization/resources/forwarding/types/UpdateForwardingRequest.js +42 -0
  87. package/dist/cjs/serialization/resources/forwarding/types/UpdateForwardingResponse.d.ts +10 -0
  88. package/dist/cjs/serialization/resources/forwarding/types/UpdateForwardingResponse.js +42 -0
  89. package/dist/cjs/serialization/resources/forwarding/types/index.d.ts +8 -0
  90. package/dist/cjs/serialization/resources/forwarding/types/index.js +24 -0
  91. package/dist/cjs/serialization/resources/index.d.ts +2 -0
  92. package/dist/cjs/serialization/resources/index.js +3 -1
  93. package/dist/cjs/serialization/resources/messages/types/Message.d.ts +4 -0
  94. package/dist/cjs/serialization/resources/messages/types/Message.js +4 -0
  95. package/dist/cjs/serialization/resources/messages/types/MessageItem.d.ts +4 -0
  96. package/dist/cjs/serialization/resources/messages/types/MessageItem.js +4 -0
  97. package/dist/cjs/serialization/resources/messages/types/MessageOpenedAt.d.ts +7 -0
  98. package/dist/cjs/serialization/resources/messages/types/MessageOpenedAt.js +39 -0
  99. package/dist/cjs/serialization/resources/messages/types/MessageTrackOpens.d.ts +7 -0
  100. package/dist/cjs/serialization/resources/messages/types/MessageTrackOpens.js +39 -0
  101. package/dist/cjs/serialization/resources/messages/types/index.d.ts +2 -0
  102. package/dist/cjs/serialization/resources/messages/types/index.js +2 -0
  103. package/dist/cjs/version.d.ts +1 -1
  104. package/dist/cjs/version.js +1 -1
  105. package/dist/esm/BaseClient.mjs +2 -2
  106. package/dist/esm/Client.d.mts +3 -0
  107. package/dist/esm/Client.mjs +5 -0
  108. package/dist/esm/api/resources/forwarding/client/Client.d.mts +127 -0
  109. package/dist/esm/api/resources/forwarding/client/Client.mjs +466 -0
  110. package/dist/esm/api/resources/forwarding/client/index.d.mts +1 -0
  111. package/dist/esm/api/resources/forwarding/client/index.mjs +1 -0
  112. package/dist/esm/api/resources/forwarding/errors/ForwardingForbiddenError.d.mts +6 -0
  113. package/dist/esm/api/resources/forwarding/errors/ForwardingForbiddenError.mjs +17 -0
  114. package/dist/esm/api/resources/forwarding/errors/ForwardingRateLimitError.d.mts +6 -0
  115. package/dist/esm/api/resources/forwarding/errors/ForwardingRateLimitError.mjs +17 -0
  116. package/dist/esm/api/resources/forwarding/errors/index.d.mts +2 -0
  117. package/dist/esm/api/resources/forwarding/errors/index.mjs +2 -0
  118. package/dist/esm/api/resources/forwarding/exports.d.mts +2 -0
  119. package/dist/esm/api/resources/forwarding/exports.mjs +3 -0
  120. package/dist/esm/api/resources/forwarding/index.d.mts +3 -0
  121. package/dist/esm/api/resources/forwarding/index.mjs +3 -0
  122. package/dist/esm/api/resources/forwarding/types/ConfirmForwardingVerificationRequest.d.mts +10 -0
  123. package/dist/esm/api/resources/forwarding/types/ConfirmForwardingVerificationRequest.mjs +2 -0
  124. package/dist/esm/api/resources/forwarding/types/Forwarding.d.mts +15 -0
  125. package/dist/esm/api/resources/forwarding/types/Forwarding.mjs +2 -0
  126. package/dist/esm/api/resources/forwarding/types/ForwardingDestination.d.mts +5 -0
  127. package/dist/esm/api/resources/forwarding/types/ForwardingDestination.mjs +2 -0
  128. package/dist/esm/api/resources/forwarding/types/ForwardingVerificationConfirmed.d.mts +4 -0
  129. package/dist/esm/api/resources/forwarding/types/ForwardingVerificationConfirmed.mjs +2 -0
  130. package/dist/esm/api/resources/forwarding/types/ForwardingVerificationStarted.d.mts +4 -0
  131. package/dist/esm/api/resources/forwarding/types/ForwardingVerificationStarted.mjs +2 -0
  132. package/dist/esm/api/resources/forwarding/types/StartForwardingVerificationRequest.d.mts +5 -0
  133. package/dist/esm/api/resources/forwarding/types/StartForwardingVerificationRequest.mjs +2 -0
  134. package/dist/esm/api/resources/forwarding/types/UpdateForwardingRequest.d.mts +9 -0
  135. package/dist/esm/api/resources/forwarding/types/UpdateForwardingRequest.mjs +2 -0
  136. package/dist/esm/api/resources/forwarding/types/UpdateForwardingResponse.d.mts +8 -0
  137. package/dist/esm/api/resources/forwarding/types/UpdateForwardingResponse.mjs +2 -0
  138. package/dist/esm/api/resources/forwarding/types/index.d.mts +8 -0
  139. package/dist/esm/api/resources/forwarding/types/index.mjs +8 -0
  140. package/dist/esm/api/resources/inboxes/client/Client.d.mts +7 -1
  141. package/dist/esm/api/resources/inboxes/client/Client.mjs +17 -1
  142. package/dist/esm/api/resources/inboxes/resources/forwarding/client/Client.d.mts +79 -0
  143. package/dist/esm/api/resources/inboxes/resources/forwarding/client/Client.mjs +280 -0
  144. package/dist/esm/api/resources/inboxes/resources/forwarding/client/index.d.mts +1 -0
  145. package/dist/esm/api/resources/inboxes/resources/forwarding/client/index.mjs +1 -0
  146. package/dist/esm/api/resources/inboxes/resources/forwarding/exports.d.mts +2 -0
  147. package/dist/esm/api/resources/inboxes/resources/forwarding/exports.mjs +3 -0
  148. package/dist/esm/api/resources/inboxes/resources/forwarding/index.d.mts +1 -0
  149. package/dist/esm/api/resources/inboxes/resources/forwarding/index.mjs +1 -0
  150. package/dist/esm/api/resources/inboxes/resources/index.d.mts +1 -0
  151. package/dist/esm/api/resources/inboxes/resources/index.mjs +1 -0
  152. package/dist/esm/api/resources/index.d.mts +3 -0
  153. package/dist/esm/api/resources/index.mjs +3 -0
  154. package/dist/esm/api/resources/messages/types/Message.d.mts +2 -0
  155. package/dist/esm/api/resources/messages/types/MessageItem.d.mts +2 -0
  156. package/dist/esm/api/resources/messages/types/MessageOpenedAt.d.mts +6 -0
  157. package/dist/esm/api/resources/messages/types/MessageOpenedAt.mjs +2 -0
  158. package/dist/esm/api/resources/messages/types/MessageTrackOpens.d.mts +5 -0
  159. package/dist/esm/api/resources/messages/types/MessageTrackOpens.mjs +2 -0
  160. package/dist/esm/api/resources/messages/types/TrackOpens.d.mts +4 -3
  161. package/dist/esm/api/resources/messages/types/index.d.mts +2 -0
  162. package/dist/esm/api/resources/messages/types/index.mjs +2 -0
  163. package/dist/esm/api/resources/pods/client/Client.d.mts +3 -0
  164. package/dist/esm/api/resources/pods/client/Client.mjs +5 -0
  165. package/dist/esm/api/resources/pods/resources/forwarding/client/Client.d.mts +80 -0
  166. package/dist/esm/api/resources/pods/resources/forwarding/client/Client.mjs +281 -0
  167. package/dist/esm/api/resources/pods/resources/forwarding/client/index.d.mts +1 -0
  168. package/dist/esm/api/resources/pods/resources/forwarding/client/index.mjs +1 -0
  169. package/dist/esm/api/resources/pods/resources/forwarding/exports.d.mts +2 -0
  170. package/dist/esm/api/resources/pods/resources/forwarding/exports.mjs +3 -0
  171. package/dist/esm/api/resources/pods/resources/forwarding/index.d.mts +1 -0
  172. package/dist/esm/api/resources/pods/resources/forwarding/index.mjs +1 -0
  173. package/dist/esm/api/resources/pods/resources/index.d.mts +1 -0
  174. package/dist/esm/api/resources/pods/resources/index.mjs +1 -0
  175. package/dist/esm/serialization/resources/forwarding/index.d.mts +1 -0
  176. package/dist/esm/serialization/resources/forwarding/index.mjs +1 -0
  177. package/dist/esm/serialization/resources/forwarding/types/ConfirmForwardingVerificationRequest.d.mts +11 -0
  178. package/dist/esm/serialization/resources/forwarding/types/ConfirmForwardingVerificationRequest.mjs +7 -0
  179. package/dist/esm/serialization/resources/forwarding/types/Forwarding.d.mts +11 -0
  180. package/dist/esm/serialization/resources/forwarding/types/Forwarding.mjs +7 -0
  181. package/dist/esm/serialization/resources/forwarding/types/ForwardingDestination.d.mts +7 -0
  182. package/dist/esm/serialization/resources/forwarding/types/ForwardingDestination.mjs +3 -0
  183. package/dist/esm/serialization/resources/forwarding/types/ForwardingVerificationConfirmed.d.mts +9 -0
  184. package/dist/esm/serialization/resources/forwarding/types/ForwardingVerificationConfirmed.mjs +5 -0
  185. package/dist/esm/serialization/resources/forwarding/types/ForwardingVerificationStarted.d.mts +9 -0
  186. package/dist/esm/serialization/resources/forwarding/types/ForwardingVerificationStarted.mjs +5 -0
  187. package/dist/esm/serialization/resources/forwarding/types/StartForwardingVerificationRequest.d.mts +10 -0
  188. package/dist/esm/serialization/resources/forwarding/types/StartForwardingVerificationRequest.mjs +6 -0
  189. package/dist/esm/serialization/resources/forwarding/types/UpdateForwardingRequest.d.mts +10 -0
  190. package/dist/esm/serialization/resources/forwarding/types/UpdateForwardingRequest.mjs +6 -0
  191. package/dist/esm/serialization/resources/forwarding/types/UpdateForwardingResponse.d.mts +10 -0
  192. package/dist/esm/serialization/resources/forwarding/types/UpdateForwardingResponse.mjs +6 -0
  193. package/dist/esm/serialization/resources/forwarding/types/index.d.mts +8 -0
  194. package/dist/esm/serialization/resources/forwarding/types/index.mjs +8 -0
  195. package/dist/esm/serialization/resources/index.d.mts +2 -0
  196. package/dist/esm/serialization/resources/index.mjs +2 -0
  197. package/dist/esm/serialization/resources/messages/types/Message.d.mts +4 -0
  198. package/dist/esm/serialization/resources/messages/types/Message.mjs +4 -0
  199. package/dist/esm/serialization/resources/messages/types/MessageItem.d.mts +4 -0
  200. package/dist/esm/serialization/resources/messages/types/MessageItem.mjs +4 -0
  201. package/dist/esm/serialization/resources/messages/types/MessageOpenedAt.d.mts +7 -0
  202. package/dist/esm/serialization/resources/messages/types/MessageOpenedAt.mjs +3 -0
  203. package/dist/esm/serialization/resources/messages/types/MessageTrackOpens.d.mts +7 -0
  204. package/dist/esm/serialization/resources/messages/types/MessageTrackOpens.mjs +3 -0
  205. package/dist/esm/serialization/resources/messages/types/index.d.mts +2 -0
  206. package/dist/esm/serialization/resources/messages/types/index.mjs +2 -0
  207. package/dist/esm/version.d.mts +1 -1
  208. package/dist/esm/version.mjs +1 -1
  209. package/dist/llms.txt +3 -1
  210. package/package.json +34 -1
  211. package/reference.md +1026 -239
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export class ForwardingForbiddenError extends errors.AgentMailError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "ForwardingForbiddenError",
7
+ statusCode: 403,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
16
+ }
17
+ }
@@ -0,0 +1,6 @@
1
+ import type * as core from "../../../../core/index.mjs";
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ import type * as AgentMail from "../../../index.mjs";
4
+ export declare class ForwardingRateLimitError extends errors.AgentMailError {
5
+ constructor(body: AgentMail.ErrorResponse, rawResponse?: core.RawResponse);
6
+ }
@@ -0,0 +1,17 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as errors from "../../../../errors/index.mjs";
3
+ export class ForwardingRateLimitError extends errors.AgentMailError {
4
+ constructor(body, rawResponse) {
5
+ super({
6
+ message: "ForwardingRateLimitError",
7
+ statusCode: 429,
8
+ body: body,
9
+ rawResponse: rawResponse,
10
+ });
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
16
+ }
17
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./ForwardingForbiddenError.mjs";
2
+ export * from "./ForwardingRateLimitError.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./ForwardingForbiddenError.mjs";
2
+ export * from "./ForwardingRateLimitError.mjs";
@@ -0,0 +1,2 @@
1
+ export { ForwardingClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { ForwardingClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./errors/index.mjs";
3
+ export * from "./types/index.mjs";
@@ -0,0 +1,3 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./errors/index.mjs";
3
+ export * from "./types/index.mjs";
@@ -0,0 +1,10 @@
1
+ import type * as AgentMail from "../../../index.mjs";
2
+ export interface ConfirmForwardingVerificationRequest {
3
+ /** Address the code was sent to. */
4
+ destination: AgentMail.ForwardingDestination;
5
+ /**
6
+ * The 10-character code from the email, shown as `XXXXX-XXXXX`. Case, spaces and the dash are
7
+ * ignored.
8
+ */
9
+ code: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,15 @@
1
+ import type * as AgentMail from "../../../index.mjs";
2
+ export interface Forwarding {
3
+ /**
4
+ * Addresses this level forwards to. `null` when the level sets nothing and uses the forwarding
5
+ * of the level above. An empty list means forwarding is turned off at this level, even when a
6
+ * level above forwards.
7
+ */
8
+ destinations: AgentMail.ForwardingDestination[] | null;
9
+ /**
10
+ * Addresses in `destinations` that receive nothing yet because they are not verified, or because
11
+ * the address now reaches a different AgentMail inbox than the one it was verified for. Verify
12
+ * them with Start Verification and Confirm Verification. Empty when `destinations` is `null`.
13
+ */
14
+ unverified: AgentMail.ForwardingDestination[];
15
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Email address that receives a copy of each email. Stored trimmed and lowercased, at most 320
3
+ * characters.
4
+ */
5
+ export type ForwardingDestination = string;
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface ForwardingVerificationConfirmed {
2
+ /** Time at which the address was verified. */
3
+ verifiedAt: Date;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface ForwardingVerificationStarted {
2
+ /** Time at which the emailed code stops working, 24 hours after it was sent. */
3
+ expiresAt: Date;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,5 @@
1
+ import type * as AgentMail from "../../../index.mjs";
2
+ export interface StartForwardingVerificationRequest {
3
+ /** Address to verify. AgentMail emails it a confirmation code. */
4
+ destination: AgentMail.ForwardingDestination;
5
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ import type * as AgentMail from "../../../index.mjs";
2
+ export interface UpdateForwardingRequest {
3
+ /**
4
+ * The full list of addresses this level forwards to. It replaces the level's current list. At
5
+ * most 5, with no repeats. Send an empty list to turn forwarding off at this level, even when a
6
+ * level above forwards.
7
+ */
8
+ destinations: AgentMail.ForwardingDestination[];
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ import type * as AgentMail from "../../../index.mjs";
2
+ export interface UpdateForwardingResponse {
3
+ /**
4
+ * The list now set on this level. It does not say which addresses are verified; Get Forwarding
5
+ * does.
6
+ */
7
+ destinations: AgentMail.ForwardingDestination[];
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ export * from "./ConfirmForwardingVerificationRequest.mjs";
2
+ export * from "./Forwarding.mjs";
3
+ export * from "./ForwardingDestination.mjs";
4
+ export * from "./ForwardingVerificationConfirmed.mjs";
5
+ export * from "./ForwardingVerificationStarted.mjs";
6
+ export * from "./StartForwardingVerificationRequest.mjs";
7
+ export * from "./UpdateForwardingRequest.mjs";
8
+ export * from "./UpdateForwardingResponse.mjs";
@@ -0,0 +1,8 @@
1
+ export * from "./ConfirmForwardingVerificationRequest.mjs";
2
+ export * from "./Forwarding.mjs";
3
+ export * from "./ForwardingDestination.mjs";
4
+ export * from "./ForwardingVerificationConfirmed.mjs";
5
+ export * from "./ForwardingVerificationStarted.mjs";
6
+ export * from "./StartForwardingVerificationRequest.mjs";
7
+ export * from "./UpdateForwardingRequest.mjs";
8
+ export * from "./UpdateForwardingResponse.mjs";
@@ -8,6 +8,7 @@ import { CalendarClient } from "../resources/calendar/client/Client.mjs";
8
8
  import { DraftsClient } from "../resources/drafts/client/Client.mjs";
9
9
  import { EventsClient } from "../resources/events/client/Client.mjs";
10
10
  import { FilesClient } from "../resources/files/client/Client.mjs";
11
+ import { ForwardingClient } from "../resources/forwarding/client/Client.mjs";
11
12
  import { ListsClient } from "../resources/lists/client/Client.mjs";
12
13
  import { MessagesClient } from "../resources/messages/client/Client.mjs";
13
14
  import { MetricsClient } from "../resources/metrics/client/Client.mjs";
@@ -25,6 +26,7 @@ export declare class InboxesClient {
25
26
  protected _drafts: DraftsClient | undefined;
26
27
  protected _webhooks: WebhooksClient | undefined;
27
28
  protected _lists: ListsClient | undefined;
29
+ protected _forwarding: ForwardingClient | undefined;
28
30
  protected _metrics: MetricsClient | undefined;
29
31
  protected _events: EventsClient | undefined;
30
32
  protected _apiKeys: ApiKeysClient | undefined;
@@ -37,6 +39,7 @@ export declare class InboxesClient {
37
39
  get drafts(): DraftsClient;
38
40
  get webhooks(): WebhooksClient;
39
41
  get lists(): ListsClient;
42
+ get forwarding(): ForwardingClient;
40
43
  get metrics(): MetricsClient;
41
44
  get events(): EventsClient;
42
45
  get apiKeys(): ApiKeysClient;
@@ -134,6 +137,8 @@ export declare class InboxesClient {
134
137
  update(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.UpdateInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
135
138
  private __update;
136
139
  /**
140
+ * Deletion is asynchronous. A `202` means it has started. While it runs, requests for this inbox return `409` `resource_deleting`. Poll `GET /v0/inboxes/{inbox_id}` until it returns `404`, then the address is free. If the inbox still has its own API keys, delete returns `409` `cannot_delete`: revoke those keys first.
141
+ *
137
142
  * **CLI:**
138
143
  * ```bash
139
144
  * agentmail inboxes delete --inbox-id <inbox_id>
@@ -143,9 +148,10 @@ export declare class InboxesClient {
143
148
  * @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
144
149
  *
145
150
  * @throws {@link AgentMail.NotFoundError}
151
+ * @throws {@link AgentMail.ConflictError}
146
152
  *
147
153
  * @example
148
- * await client.inboxes.delete("inbox_id")
154
+ * await client.inboxes.delete("my-agent@agentmail.to")
149
155
  */
150
156
  delete(inbox_id: AgentMail.inboxes.InboxId, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<void>;
151
157
  private __delete;
@@ -22,6 +22,7 @@ import { CalendarClient } from "../resources/calendar/client/Client.mjs";
22
22
  import { DraftsClient } from "../resources/drafts/client/Client.mjs";
23
23
  import { EventsClient } from "../resources/events/client/Client.mjs";
24
24
  import { FilesClient } from "../resources/files/client/Client.mjs";
25
+ import { ForwardingClient } from "../resources/forwarding/client/Client.mjs";
25
26
  import { ListsClient } from "../resources/lists/client/Client.mjs";
26
27
  import { MessagesClient } from "../resources/messages/client/Client.mjs";
27
28
  import { MetricsClient } from "../resources/metrics/client/Client.mjs";
@@ -51,6 +52,10 @@ export class InboxesClient {
51
52
  var _a;
52
53
  return ((_a = this._lists) !== null && _a !== void 0 ? _a : (this._lists = new ListsClient(this._options)));
53
54
  }
55
+ get forwarding() {
56
+ var _a;
57
+ return ((_a = this._forwarding) !== null && _a !== void 0 ? _a : (this._forwarding = new ForwardingClient(this._options)));
58
+ }
54
59
  get metrics() {
55
60
  var _a;
56
61
  return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new MetricsClient(this._options)));
@@ -458,6 +463,8 @@ export class InboxesClient {
458
463
  });
459
464
  }
460
465
  /**
466
+ * Deletion is asynchronous. A `202` means it has started. While it runs, requests for this inbox return `409` `resource_deleting`. Poll `GET /v0/inboxes/{inbox_id}` until it returns `404`, then the address is free. If the inbox still has its own API keys, delete returns `409` `cannot_delete`: revoke those keys first.
467
+ *
461
468
  * **CLI:**
462
469
  * ```bash
463
470
  * agentmail inboxes delete --inbox-id <inbox_id>
@@ -467,9 +474,10 @@ export class InboxesClient {
467
474
  * @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
468
475
  *
469
476
  * @throws {@link AgentMail.NotFoundError}
477
+ * @throws {@link AgentMail.ConflictError}
470
478
  *
471
479
  * @example
472
- * await client.inboxes.delete("inbox_id")
480
+ * await client.inboxes.delete("my-agent@agentmail.to")
473
481
  */
474
482
  delete(inbox_id, requestOptions) {
475
483
  return core.HttpResponsePromise.fromPromise(this.__delete(inbox_id, requestOptions));
@@ -504,6 +512,14 @@ export class InboxesClient {
504
512
  skipValidation: true,
505
513
  breadcrumbsPrefix: ["response"],
506
514
  }), _response.rawResponse);
515
+ case 409:
516
+ throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
517
+ unrecognizedObjectKeys: "passthrough",
518
+ allowUnrecognizedUnionMembers: true,
519
+ allowUnrecognizedEnumValues: true,
520
+ skipValidation: true,
521
+ breadcrumbsPrefix: ["response"],
522
+ }), _response.rawResponse);
507
523
  default:
508
524
  throw new errors.AgentMailError({
509
525
  statusCode: _response.error.statusCode,
@@ -0,0 +1,79 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
3
+ import * as core from "../../../../../../core/index.mjs";
4
+ import * as AgentMail from "../../../../../index.mjs";
5
+ export declare namespace ForwardingClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class ForwardingClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<ForwardingClient.Options>;
12
+ constructor(options?: ForwardingClient.Options);
13
+ /**
14
+ * Get the forwarding this inbox sets. When the inbox sets nothing, `destinations` is `null` and
15
+ * the inbox uses its pod's forwarding, or the organization's when the pod sets none.
16
+ *
17
+ * **CLI:**
18
+ * ```bash
19
+ * agentmail inboxes forwarding get --inbox-id <inbox_id>
20
+ * ```
21
+ *
22
+ * @param {AgentMail.inboxes.InboxId} inbox_id
23
+ * @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
24
+ *
25
+ * @throws {@link AgentMail.NotFoundError}
26
+ * @throws {@link AgentMail.ForwardingForbiddenError}
27
+ *
28
+ * @example
29
+ * await client.inboxes.forwarding.get("inbox_id")
30
+ */
31
+ get(inbox_id: AgentMail.inboxes.InboxId, requestOptions?: ForwardingClient.RequestOptions): core.HttpResponsePromise<AgentMail.Forwarding>;
32
+ private __get;
33
+ /**
34
+ * Set the addresses this inbox forwards to. The list replaces the inbox's current one and any pod
35
+ * or organization list for this inbox; lists are never combined. Send an empty list to stop this
36
+ * inbox forwarding even when its pod or the organization forwards. An address that is not
37
+ * verified is saved but receives nothing until it is verified.
38
+ *
39
+ * **CLI:**
40
+ * ```bash
41
+ * agentmail inboxes forwarding update --inbox-id <inbox_id> --destinations ops@example.com
42
+ * ```
43
+ *
44
+ * @param {AgentMail.inboxes.InboxId} inbox_id
45
+ * @param {AgentMail.UpdateForwardingRequest} request
46
+ * @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
47
+ *
48
+ * @throws {@link AgentMail.ValidationError}
49
+ * @throws {@link AgentMail.NotFoundError}
50
+ * @throws {@link AgentMail.ForwardingForbiddenError}
51
+ *
52
+ * @example
53
+ * await client.inboxes.forwarding.update("inbox_id", {
54
+ * destinations: ["destinations", "destinations"]
55
+ * })
56
+ */
57
+ update(inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.UpdateForwardingRequest, requestOptions?: ForwardingClient.RequestOptions): core.HttpResponsePromise<AgentMail.UpdateForwardingResponse>;
58
+ private __update;
59
+ /**
60
+ * Remove this inbox's own forwarding, so the inbox uses its pod's or the organization's forwarding
61
+ * again. Verified addresses stay verified. Returns `not_found` when the inbox sets no forwarding.
62
+ *
63
+ * **CLI:**
64
+ * ```bash
65
+ * agentmail inboxes forwarding delete --inbox-id <inbox_id>
66
+ * ```
67
+ *
68
+ * @param {AgentMail.inboxes.InboxId} inbox_id
69
+ * @param {ForwardingClient.RequestOptions} requestOptions - Request-specific configuration.
70
+ *
71
+ * @throws {@link AgentMail.NotFoundError}
72
+ * @throws {@link AgentMail.ForwardingForbiddenError}
73
+ *
74
+ * @example
75
+ * await client.inboxes.forwarding.delete("inbox_id")
76
+ */
77
+ delete(inbox_id: AgentMail.inboxes.InboxId, requestOptions?: ForwardingClient.RequestOptions): core.HttpResponsePromise<AgentMail.Forwarding>;
78
+ private __delete;
79
+ }