agentmail 0.0.72 → 0.0.74

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 (355) hide show
  1. package/dist/cjs/Client.d.ts +3 -0
  2. package/dist/cjs/Client.js +21 -16
  3. package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +2 -1
  4. package/dist/cjs/api/resources/apiKeys/client/Client.js +52 -62
  5. package/dist/cjs/api/resources/domains/client/Client.d.ts +21 -9
  6. package/dist/cjs/api/resources/domains/client/Client.js +131 -78
  7. package/dist/cjs/api/resources/domains/types/ClientId.d.ts +7 -0
  8. package/dist/cjs/api/resources/domains/types/CreateDomainRequest.d.ts +1 -2
  9. package/dist/cjs/api/resources/domains/types/Domain.d.ts +2 -3
  10. package/dist/cjs/api/resources/domains/types/DomainSummary.d.ts +2 -3
  11. package/dist/cjs/api/resources/domains/types/FeedbackEnabled.d.ts +7 -0
  12. package/dist/cjs/api/resources/domains/types/FeedbackEnabled.js +5 -0
  13. package/dist/cjs/api/resources/domains/types/index.d.ts +2 -1
  14. package/dist/cjs/api/resources/domains/types/index.js +2 -1
  15. package/dist/cjs/api/resources/drafts/client/Client.d.ts +2 -1
  16. package/dist/cjs/api/resources/drafts/client/Client.js +70 -83
  17. package/dist/cjs/api/resources/drafts/types/CreateDraftRequest.d.ts +1 -0
  18. package/dist/cjs/api/resources/drafts/types/Draft.d.ts +1 -0
  19. package/dist/cjs/api/resources/drafts/types/DraftClientId.d.ts +7 -0
  20. package/dist/cjs/api/resources/drafts/types/DraftClientId.js +5 -0
  21. package/dist/cjs/api/resources/drafts/types/UpdateDraftRequest.d.ts +14 -0
  22. package/dist/cjs/api/resources/drafts/types/UpdateDraftRequest.js +5 -0
  23. package/dist/cjs/api/resources/drafts/types/index.d.ts +2 -0
  24. package/dist/cjs/api/resources/drafts/types/index.js +2 -0
  25. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +2 -1
  26. package/dist/cjs/api/resources/inboxes/client/Client.js +52 -62
  27. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +26 -2
  28. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +161 -84
  29. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +2 -1
  30. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +70 -83
  31. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +2 -1
  32. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +70 -83
  33. package/dist/cjs/api/resources/inboxes/types/CreateInboxRequest.d.ts +1 -2
  34. package/dist/cjs/api/resources/inboxes/types/DisplayName.d.ts +7 -0
  35. package/dist/cjs/api/resources/inboxes/types/DisplayName.js +5 -0
  36. package/dist/cjs/api/resources/inboxes/types/Inbox.d.ts +2 -3
  37. package/dist/cjs/api/resources/inboxes/types/index.d.ts +1 -0
  38. package/dist/cjs/api/resources/inboxes/types/index.js +1 -0
  39. package/dist/cjs/api/resources/index.d.ts +1 -0
  40. package/dist/cjs/api/resources/index.js +2 -1
  41. package/dist/cjs/api/resources/pods/client/Client.d.ts +90 -0
  42. package/dist/cjs/api/resources/pods/client/Client.js +375 -0
  43. package/dist/cjs/api/resources/pods/client/index.d.ts +2 -0
  44. package/dist/cjs/api/resources/pods/client/index.js +17 -0
  45. package/dist/cjs/api/resources/pods/client/requests/ListPodsRequest.d.ts +12 -0
  46. package/dist/cjs/api/resources/pods/client/requests/ListPodsRequest.js +5 -0
  47. package/dist/cjs/api/resources/pods/client/requests/index.d.ts +1 -0
  48. package/dist/cjs/api/resources/pods/client/requests/index.js +2 -0
  49. package/dist/cjs/api/resources/pods/index.d.ts +3 -0
  50. package/dist/cjs/api/resources/pods/index.js +19 -0
  51. package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +72 -0
  52. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +312 -0
  53. package/dist/cjs/api/resources/pods/resources/domains/client/index.d.ts +2 -0
  54. package/dist/cjs/api/resources/pods/resources/domains/client/index.js +17 -0
  55. package/dist/cjs/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.ts +16 -0
  56. package/dist/cjs/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.js +5 -0
  57. package/dist/cjs/api/resources/pods/resources/domains/client/requests/index.d.ts +1 -0
  58. package/dist/cjs/api/resources/pods/resources/domains/client/requests/index.js +2 -0
  59. package/dist/cjs/api/resources/pods/resources/domains/index.d.ts +1 -0
  60. package/dist/cjs/api/resources/pods/resources/domains/index.js +17 -0
  61. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.d.ts +57 -0
  62. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +239 -0
  63. package/dist/cjs/api/resources/pods/resources/drafts/client/index.d.ts +2 -0
  64. package/dist/cjs/api/resources/pods/resources/drafts/client/index.js +17 -0
  65. package/dist/cjs/api/resources/pods/resources/drafts/client/requests/ListDraftsRequest.d.ts +16 -0
  66. package/dist/cjs/api/resources/pods/resources/drafts/client/requests/ListDraftsRequest.js +5 -0
  67. package/dist/cjs/api/resources/pods/resources/drafts/client/requests/index.d.ts +1 -0
  68. package/dist/cjs/api/resources/pods/resources/drafts/client/requests/index.js +2 -0
  69. package/dist/cjs/api/resources/pods/resources/drafts/index.d.ts +1 -0
  70. package/dist/cjs/api/resources/pods/resources/drafts/index.js +17 -0
  71. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +86 -0
  72. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +387 -0
  73. package/dist/cjs/api/resources/pods/resources/inboxes/client/index.d.ts +2 -0
  74. package/dist/cjs/api/resources/pods/resources/inboxes/client/index.js +17 -0
  75. package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.ts +16 -0
  76. package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.js +5 -0
  77. package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/index.d.ts +1 -0
  78. package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/index.js +2 -0
  79. package/dist/cjs/api/resources/pods/resources/inboxes/index.d.ts +1 -0
  80. package/dist/cjs/api/resources/pods/resources/inboxes/index.js +17 -0
  81. package/dist/cjs/api/resources/pods/resources/index.d.ts +8 -0
  82. package/dist/cjs/api/resources/pods/resources/index.js +47 -0
  83. package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +62 -0
  84. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +297 -0
  85. package/dist/cjs/api/resources/pods/resources/threads/client/index.d.ts +2 -0
  86. package/dist/cjs/api/resources/pods/resources/threads/client/index.js +17 -0
  87. package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.ts +16 -0
  88. package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.js +5 -0
  89. package/dist/cjs/api/resources/pods/resources/threads/client/requests/index.d.ts +1 -0
  90. package/dist/cjs/api/resources/pods/resources/threads/client/requests/index.js +2 -0
  91. package/dist/cjs/api/resources/pods/resources/threads/index.d.ts +1 -0
  92. package/dist/cjs/api/resources/pods/resources/threads/index.js +17 -0
  93. package/dist/cjs/api/resources/pods/types/ClientId.d.ts +7 -0
  94. package/dist/cjs/api/resources/pods/types/ClientId.js +5 -0
  95. package/dist/cjs/api/resources/pods/types/CreatePodRequest.d.ts +8 -0
  96. package/dist/cjs/api/resources/pods/types/CreatePodRequest.js +5 -0
  97. package/dist/cjs/api/resources/pods/types/ListPodsResponse.d.ts +11 -0
  98. package/dist/cjs/api/resources/pods/types/ListPodsResponse.js +5 -0
  99. package/dist/cjs/api/resources/pods/types/Name.d.ts +7 -0
  100. package/dist/cjs/api/resources/pods/types/Name.js +5 -0
  101. package/dist/cjs/api/resources/pods/types/Pod.d.ts +13 -0
  102. package/dist/cjs/api/resources/pods/types/Pod.js +5 -0
  103. package/dist/cjs/api/resources/pods/types/PodId.d.ts +7 -0
  104. package/dist/cjs/api/resources/pods/types/PodId.js +5 -0
  105. package/dist/cjs/api/resources/pods/types/index.d.ts +6 -0
  106. package/dist/cjs/api/resources/pods/types/index.js +22 -0
  107. package/dist/cjs/api/resources/threads/client/Client.d.ts +2 -12
  108. package/dist/cjs/api/resources/threads/client/Client.js +57 -133
  109. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +2 -1
  110. package/dist/cjs/api/resources/webhooks/client/Client.js +52 -62
  111. package/dist/cjs/core/index.d.ts +0 -2
  112. package/dist/cjs/core/index.js +0 -2
  113. package/dist/cjs/serialization/resources/domains/types/ClientId.d.ts +10 -0
  114. package/dist/cjs/serialization/resources/domains/types/ClientId.js +41 -0
  115. package/dist/cjs/serialization/resources/domains/types/CreateDomainRequest.d.ts +2 -1
  116. package/dist/cjs/serialization/resources/domains/types/CreateDomainRequest.js +2 -1
  117. package/dist/cjs/serialization/resources/domains/types/Domain.d.ts +4 -3
  118. package/dist/cjs/serialization/resources/domains/types/Domain.js +4 -3
  119. package/dist/cjs/serialization/resources/domains/types/DomainSummary.d.ts +4 -3
  120. package/dist/cjs/serialization/resources/domains/types/DomainSummary.js +4 -3
  121. package/dist/cjs/serialization/resources/domains/types/FeedbackEnabled.d.ts +10 -0
  122. package/dist/cjs/serialization/resources/domains/types/FeedbackEnabled.js +41 -0
  123. package/dist/cjs/serialization/resources/domains/types/index.d.ts +2 -1
  124. package/dist/cjs/serialization/resources/domains/types/index.js +2 -1
  125. package/dist/cjs/serialization/resources/drafts/types/CreateDraftRequest.d.ts +2 -0
  126. package/dist/cjs/serialization/resources/drafts/types/CreateDraftRequest.js +2 -0
  127. package/dist/cjs/serialization/resources/drafts/types/Draft.d.ts +2 -0
  128. package/dist/cjs/serialization/resources/drafts/types/Draft.js +2 -0
  129. package/dist/cjs/serialization/resources/drafts/types/DraftClientId.d.ts +10 -0
  130. package/dist/cjs/serialization/resources/drafts/types/DraftClientId.js +41 -0
  131. package/dist/cjs/serialization/resources/drafts/types/UpdateDraftRequest.d.ts +27 -0
  132. package/dist/cjs/serialization/resources/drafts/types/UpdateDraftRequest.js +58 -0
  133. package/dist/cjs/serialization/resources/drafts/types/index.d.ts +2 -0
  134. package/dist/cjs/serialization/resources/drafts/types/index.js +2 -0
  135. package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -1
  136. package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -1
  137. package/dist/cjs/serialization/resources/inboxes/types/DisplayName.d.ts +10 -0
  138. package/dist/cjs/serialization/resources/inboxes/types/DisplayName.js +41 -0
  139. package/dist/cjs/serialization/resources/inboxes/types/Inbox.d.ts +3 -2
  140. package/dist/cjs/serialization/resources/inboxes/types/Inbox.js +3 -2
  141. package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +1 -0
  142. package/dist/cjs/serialization/resources/inboxes/types/index.js +1 -0
  143. package/dist/cjs/serialization/resources/index.d.ts +1 -0
  144. package/dist/cjs/serialization/resources/index.js +2 -1
  145. package/dist/cjs/serialization/resources/pods/index.d.ts +1 -0
  146. package/dist/cjs/serialization/resources/pods/index.js +17 -0
  147. package/dist/cjs/serialization/resources/pods/types/ClientId.d.ts +10 -0
  148. package/dist/cjs/serialization/resources/pods/types/ClientId.js +41 -0
  149. package/dist/cjs/serialization/resources/pods/types/CreatePodRequest.d.ts +15 -0
  150. package/dist/cjs/serialization/resources/pods/types/CreatePodRequest.js +46 -0
  151. package/dist/cjs/serialization/resources/pods/types/ListPodsResponse.d.ts +19 -0
  152. package/dist/cjs/serialization/resources/pods/types/ListPodsResponse.js +50 -0
  153. package/dist/cjs/serialization/resources/pods/types/Name.d.ts +10 -0
  154. package/dist/cjs/serialization/resources/pods/types/Name.js +41 -0
  155. package/dist/cjs/serialization/resources/pods/types/Pod.d.ts +19 -0
  156. package/dist/cjs/serialization/resources/{domains/types/CreateDomainResponse.js → pods/types/Pod.js} +8 -11
  157. package/dist/cjs/serialization/resources/pods/types/PodId.d.ts +10 -0
  158. package/dist/cjs/serialization/resources/pods/types/PodId.js +41 -0
  159. package/dist/cjs/serialization/resources/pods/types/index.d.ts +6 -0
  160. package/dist/cjs/serialization/resources/pods/types/index.js +22 -0
  161. package/dist/cjs/version.d.ts +1 -1
  162. package/dist/cjs/version.js +1 -1
  163. package/dist/esm/Client.d.mts +3 -0
  164. package/dist/esm/Client.mjs +7 -2
  165. package/dist/esm/api/resources/apiKeys/client/Client.d.mts +2 -1
  166. package/dist/esm/api/resources/apiKeys/client/Client.mjs +52 -62
  167. package/dist/esm/api/resources/domains/client/Client.d.mts +21 -9
  168. package/dist/esm/api/resources/domains/client/Client.mjs +131 -78
  169. package/dist/esm/api/resources/domains/types/ClientId.d.mts +7 -0
  170. package/dist/esm/api/resources/domains/types/CreateDomainRequest.d.mts +1 -2
  171. package/dist/esm/api/resources/domains/types/Domain.d.mts +2 -3
  172. package/dist/esm/api/resources/domains/types/DomainSummary.d.mts +2 -3
  173. package/dist/esm/api/resources/domains/types/FeedbackEnabled.d.mts +7 -0
  174. package/dist/esm/api/resources/domains/types/FeedbackEnabled.mjs +4 -0
  175. package/dist/esm/api/resources/domains/types/index.d.mts +2 -1
  176. package/dist/esm/api/resources/domains/types/index.mjs +2 -1
  177. package/dist/esm/api/resources/drafts/client/Client.d.mts +2 -1
  178. package/dist/esm/api/resources/drafts/client/Client.mjs +70 -83
  179. package/dist/esm/api/resources/drafts/types/CreateDraftRequest.d.mts +1 -0
  180. package/dist/esm/api/resources/drafts/types/Draft.d.mts +1 -0
  181. package/dist/esm/api/resources/drafts/types/DraftClientId.d.mts +7 -0
  182. package/dist/esm/api/resources/drafts/types/DraftClientId.mjs +4 -0
  183. package/dist/esm/api/resources/drafts/types/UpdateDraftRequest.d.mts +14 -0
  184. package/dist/esm/api/resources/drafts/types/UpdateDraftRequest.mjs +4 -0
  185. package/dist/esm/api/resources/drafts/types/index.d.mts +2 -0
  186. package/dist/esm/api/resources/drafts/types/index.mjs +2 -0
  187. package/dist/esm/api/resources/inboxes/client/Client.d.mts +2 -1
  188. package/dist/esm/api/resources/inboxes/client/Client.mjs +52 -62
  189. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +26 -2
  190. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +161 -84
  191. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +2 -1
  192. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +70 -83
  193. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +2 -1
  194. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +70 -83
  195. package/dist/esm/api/resources/inboxes/types/CreateInboxRequest.d.mts +1 -2
  196. package/dist/esm/api/resources/inboxes/types/DisplayName.d.mts +7 -0
  197. package/dist/esm/api/resources/inboxes/types/DisplayName.mjs +4 -0
  198. package/dist/esm/api/resources/inboxes/types/Inbox.d.mts +2 -3
  199. package/dist/esm/api/resources/inboxes/types/index.d.mts +1 -0
  200. package/dist/esm/api/resources/inboxes/types/index.mjs +1 -0
  201. package/dist/esm/api/resources/index.d.mts +1 -0
  202. package/dist/esm/api/resources/index.mjs +1 -0
  203. package/dist/esm/api/resources/pods/client/Client.d.mts +90 -0
  204. package/dist/esm/api/resources/pods/client/Client.mjs +338 -0
  205. package/dist/esm/api/resources/pods/client/index.d.mts +2 -0
  206. package/dist/esm/api/resources/pods/client/index.mjs +1 -0
  207. package/dist/esm/api/resources/pods/client/requests/ListPodsRequest.d.mts +12 -0
  208. package/dist/esm/api/resources/pods/client/requests/ListPodsRequest.mjs +4 -0
  209. package/dist/esm/api/resources/pods/client/requests/index.d.mts +1 -0
  210. package/dist/esm/api/resources/pods/client/requests/index.mjs +1 -0
  211. package/dist/esm/api/resources/pods/index.d.mts +3 -0
  212. package/dist/esm/api/resources/pods/index.mjs +3 -0
  213. package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +72 -0
  214. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +275 -0
  215. package/dist/esm/api/resources/pods/resources/domains/client/index.d.mts +2 -0
  216. package/dist/esm/api/resources/pods/resources/domains/client/index.mjs +1 -0
  217. package/dist/esm/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.mts +16 -0
  218. package/dist/esm/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.mjs +4 -0
  219. package/dist/esm/api/resources/pods/resources/domains/client/requests/index.d.mts +1 -0
  220. package/dist/esm/api/resources/pods/resources/domains/client/requests/index.mjs +1 -0
  221. package/dist/esm/api/resources/pods/resources/domains/index.d.mts +1 -0
  222. package/dist/esm/api/resources/pods/resources/domains/index.mjs +1 -0
  223. package/dist/esm/api/resources/pods/resources/drafts/client/Client.d.mts +57 -0
  224. package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +202 -0
  225. package/dist/esm/api/resources/pods/resources/drafts/client/index.d.mts +2 -0
  226. package/dist/esm/api/resources/pods/resources/drafts/client/index.mjs +1 -0
  227. package/dist/esm/api/resources/pods/resources/drafts/client/requests/ListDraftsRequest.d.mts +16 -0
  228. package/dist/esm/api/resources/pods/resources/drafts/client/requests/ListDraftsRequest.mjs +4 -0
  229. package/dist/esm/api/resources/pods/resources/drafts/client/requests/index.d.mts +1 -0
  230. package/dist/esm/api/resources/pods/resources/drafts/client/requests/index.mjs +1 -0
  231. package/dist/esm/api/resources/pods/resources/drafts/index.d.mts +1 -0
  232. package/dist/esm/api/resources/pods/resources/drafts/index.mjs +1 -0
  233. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +86 -0
  234. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +350 -0
  235. package/dist/esm/api/resources/pods/resources/inboxes/client/index.d.mts +2 -0
  236. package/dist/esm/api/resources/pods/resources/inboxes/client/index.mjs +1 -0
  237. package/dist/esm/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.mts +16 -0
  238. package/dist/esm/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.mjs +4 -0
  239. package/dist/esm/api/resources/pods/resources/inboxes/client/requests/index.d.mts +1 -0
  240. package/dist/esm/api/resources/pods/resources/inboxes/client/requests/index.mjs +1 -0
  241. package/dist/esm/api/resources/pods/resources/inboxes/index.d.mts +1 -0
  242. package/dist/esm/api/resources/pods/resources/inboxes/index.mjs +1 -0
  243. package/dist/esm/api/resources/pods/resources/index.d.mts +8 -0
  244. package/dist/esm/api/resources/pods/resources/index.mjs +8 -0
  245. package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +62 -0
  246. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +260 -0
  247. package/dist/esm/api/resources/pods/resources/threads/client/index.d.mts +2 -0
  248. package/dist/esm/api/resources/pods/resources/threads/client/index.mjs +1 -0
  249. package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.mts +16 -0
  250. package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.mjs +4 -0
  251. package/dist/esm/api/resources/pods/resources/threads/client/requests/index.d.mts +1 -0
  252. package/dist/esm/api/resources/pods/resources/threads/client/requests/index.mjs +1 -0
  253. package/dist/esm/api/resources/pods/resources/threads/index.d.mts +1 -0
  254. package/dist/esm/api/resources/pods/resources/threads/index.mjs +1 -0
  255. package/dist/esm/api/resources/pods/types/ClientId.d.mts +7 -0
  256. package/dist/esm/api/resources/pods/types/ClientId.mjs +4 -0
  257. package/dist/esm/api/resources/pods/types/CreatePodRequest.d.mts +8 -0
  258. package/dist/esm/api/resources/pods/types/CreatePodRequest.mjs +4 -0
  259. package/dist/esm/api/resources/pods/types/ListPodsResponse.d.mts +11 -0
  260. package/dist/esm/api/resources/pods/types/ListPodsResponse.mjs +4 -0
  261. package/dist/esm/api/resources/pods/types/Name.d.mts +7 -0
  262. package/dist/esm/api/resources/pods/types/Name.mjs +4 -0
  263. package/dist/esm/api/resources/pods/types/Pod.d.mts +13 -0
  264. package/dist/esm/api/resources/pods/types/Pod.mjs +4 -0
  265. package/dist/esm/api/resources/pods/types/PodId.d.mts +7 -0
  266. package/dist/esm/api/resources/pods/types/PodId.mjs +4 -0
  267. package/dist/esm/api/resources/pods/types/index.d.mts +6 -0
  268. package/dist/esm/api/resources/pods/types/index.mjs +6 -0
  269. package/dist/esm/api/resources/threads/client/Client.d.mts +2 -12
  270. package/dist/esm/api/resources/threads/client/Client.mjs +57 -133
  271. package/dist/esm/api/resources/webhooks/client/Client.d.mts +2 -1
  272. package/dist/esm/api/resources/webhooks/client/Client.mjs +52 -62
  273. package/dist/esm/core/index.d.mts +0 -2
  274. package/dist/esm/core/index.mjs +0 -2
  275. package/dist/esm/serialization/resources/domains/types/ClientId.d.mts +10 -0
  276. package/dist/esm/serialization/resources/domains/types/ClientId.mjs +5 -0
  277. package/dist/esm/serialization/resources/domains/types/CreateDomainRequest.d.mts +2 -1
  278. package/dist/esm/serialization/resources/domains/types/CreateDomainRequest.mjs +2 -1
  279. package/dist/esm/serialization/resources/domains/types/Domain.d.mts +4 -3
  280. package/dist/esm/serialization/resources/domains/types/Domain.mjs +4 -3
  281. package/dist/esm/serialization/resources/domains/types/DomainSummary.d.mts +4 -3
  282. package/dist/esm/serialization/resources/domains/types/DomainSummary.mjs +4 -3
  283. package/dist/esm/serialization/resources/domains/types/FeedbackEnabled.d.mts +10 -0
  284. package/dist/esm/serialization/resources/domains/types/FeedbackEnabled.mjs +5 -0
  285. package/dist/esm/serialization/resources/domains/types/index.d.mts +2 -1
  286. package/dist/esm/serialization/resources/domains/types/index.mjs +2 -1
  287. package/dist/esm/serialization/resources/drafts/types/CreateDraftRequest.d.mts +2 -0
  288. package/dist/esm/serialization/resources/drafts/types/CreateDraftRequest.mjs +2 -0
  289. package/dist/esm/serialization/resources/drafts/types/Draft.d.mts +2 -0
  290. package/dist/esm/serialization/resources/drafts/types/Draft.mjs +2 -0
  291. package/dist/esm/serialization/resources/drafts/types/DraftClientId.d.mts +10 -0
  292. package/dist/esm/serialization/resources/drafts/types/DraftClientId.mjs +5 -0
  293. package/dist/esm/serialization/resources/drafts/types/UpdateDraftRequest.d.mts +27 -0
  294. package/dist/esm/serialization/resources/drafts/types/UpdateDraftRequest.mjs +22 -0
  295. package/dist/esm/serialization/resources/drafts/types/index.d.mts +2 -0
  296. package/dist/esm/serialization/resources/drafts/types/index.mjs +2 -0
  297. package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.d.mts +2 -1
  298. package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.mjs +2 -1
  299. package/dist/esm/serialization/resources/inboxes/types/DisplayName.d.mts +10 -0
  300. package/dist/esm/serialization/resources/inboxes/types/DisplayName.mjs +5 -0
  301. package/dist/esm/serialization/resources/inboxes/types/Inbox.d.mts +3 -2
  302. package/dist/esm/serialization/resources/inboxes/types/Inbox.mjs +3 -2
  303. package/dist/esm/serialization/resources/inboxes/types/index.d.mts +1 -0
  304. package/dist/esm/serialization/resources/inboxes/types/index.mjs +1 -0
  305. package/dist/esm/serialization/resources/index.d.mts +1 -0
  306. package/dist/esm/serialization/resources/index.mjs +1 -0
  307. package/dist/esm/serialization/resources/pods/index.d.mts +1 -0
  308. package/dist/esm/serialization/resources/pods/index.mjs +1 -0
  309. package/dist/esm/serialization/resources/pods/types/ClientId.d.mts +10 -0
  310. package/dist/esm/serialization/resources/pods/types/ClientId.mjs +5 -0
  311. package/dist/esm/serialization/resources/pods/types/CreatePodRequest.d.mts +15 -0
  312. package/dist/esm/serialization/resources/pods/types/CreatePodRequest.mjs +10 -0
  313. package/dist/esm/serialization/resources/pods/types/ListPodsResponse.d.mts +19 -0
  314. package/dist/esm/serialization/resources/pods/types/ListPodsResponse.mjs +14 -0
  315. package/dist/esm/serialization/resources/pods/types/Name.d.mts +10 -0
  316. package/dist/esm/serialization/resources/pods/types/Name.mjs +5 -0
  317. package/dist/esm/serialization/resources/pods/types/Pod.d.mts +19 -0
  318. package/dist/esm/serialization/resources/pods/types/Pod.mjs +14 -0
  319. package/dist/esm/serialization/resources/pods/types/PodId.d.mts +10 -0
  320. package/dist/esm/serialization/resources/pods/types/PodId.mjs +5 -0
  321. package/dist/esm/serialization/resources/pods/types/index.d.mts +6 -0
  322. package/dist/esm/serialization/resources/pods/types/index.mjs +6 -0
  323. package/dist/esm/version.d.mts +1 -1
  324. package/dist/esm/version.mjs +1 -1
  325. package/dist/llms-full.txt +10453 -1871
  326. package/dist/llms.txt +19 -2
  327. package/package.json +1 -1
  328. package/reference.md +1195 -309
  329. package/dist/cjs/api/resources/domains/types/CreateDomainResponse.d.ts +0 -18
  330. package/dist/cjs/core/pagination/Page.d.ts +0 -32
  331. package/dist/cjs/core/pagination/Page.js +0 -100
  332. package/dist/cjs/core/pagination/Pageable.d.ts +0 -14
  333. package/dist/cjs/core/pagination/Pageable.js +0 -10
  334. package/dist/cjs/core/pagination/index.d.ts +0 -2
  335. package/dist/cjs/core/pagination/index.js +0 -7
  336. package/dist/cjs/core/utils/index.d.ts +0 -1
  337. package/dist/cjs/core/utils/index.js +0 -5
  338. package/dist/cjs/core/utils/setObjectProperty.d.ts +0 -11
  339. package/dist/cjs/core/utils/setObjectProperty.js +0 -42
  340. package/dist/cjs/serialization/resources/domains/types/CreateDomainResponse.d.ts +0 -22
  341. package/dist/esm/api/resources/domains/types/CreateDomainResponse.d.mts +0 -18
  342. package/dist/esm/core/pagination/Page.d.mts +0 -32
  343. package/dist/esm/core/pagination/Page.mjs +0 -96
  344. package/dist/esm/core/pagination/Pageable.d.mts +0 -14
  345. package/dist/esm/core/pagination/Pageable.mjs +0 -6
  346. package/dist/esm/core/pagination/index.d.mts +0 -2
  347. package/dist/esm/core/pagination/index.mjs +0 -2
  348. package/dist/esm/core/utils/index.d.mts +0 -1
  349. package/dist/esm/core/utils/index.mjs +0 -1
  350. package/dist/esm/core/utils/setObjectProperty.d.mts +0 -11
  351. package/dist/esm/core/utils/setObjectProperty.mjs +0 -39
  352. package/dist/esm/serialization/resources/domains/types/CreateDomainResponse.d.mts +0 -22
  353. package/dist/esm/serialization/resources/domains/types/CreateDomainResponse.mjs +0 -17
  354. /package/dist/cjs/api/resources/domains/types/{CreateDomainResponse.js → ClientId.js} +0 -0
  355. /package/dist/esm/api/resources/domains/types/{CreateDomainResponse.mjs → ClientId.mjs} +0 -0
@@ -4,6 +4,7 @@
4
4
  import * as environments from "./environments.js";
5
5
  import * as core from "./core/index.js";
6
6
  import { Inboxes } from "./api/resources/inboxes/client/Client.js";
7
+ import { Pods } from "./api/resources/pods/client/Client.js";
7
8
  import { Webhooks } from "./api/resources/webhooks/client/Client.js";
8
9
  import { ApiKeys } from "./api/resources/apiKeys/client/Client.js";
9
10
  import { Domains } from "./api/resources/domains/client/Client.js";
@@ -36,6 +37,7 @@ export declare namespace AgentMailClient {
36
37
  export declare class AgentMailClient {
37
38
  protected readonly _options: AgentMailClient.Options;
38
39
  protected _inboxes: Inboxes | undefined;
40
+ protected _pods: Pods | undefined;
39
41
  protected _webhooks: Webhooks | undefined;
40
42
  protected _apiKeys: ApiKeys | undefined;
41
43
  protected _domains: Domains | undefined;
@@ -45,6 +47,7 @@ export declare class AgentMailClient {
45
47
  protected _websockets: Websockets | undefined;
46
48
  constructor(_options?: AgentMailClient.Options);
47
49
  get inboxes(): Inboxes;
50
+ get pods(): Pods;
48
51
  get webhooks(): Webhooks;
49
52
  get apiKeys(): ApiKeys;
50
53
  get domains(): Domains;
@@ -40,20 +40,21 @@ exports.AgentMailClient = void 0;
40
40
  const core = __importStar(require("./core/index.js"));
41
41
  const headers_js_1 = require("./core/headers.js");
42
42
  const Client_js_1 = require("./api/resources/inboxes/client/Client.js");
43
- const Client_js_2 = require("./api/resources/webhooks/client/Client.js");
44
- const Client_js_3 = require("./api/resources/apiKeys/client/Client.js");
45
- const Client_js_4 = require("./api/resources/domains/client/Client.js");
46
- const Client_js_5 = require("./api/resources/drafts/client/Client.js");
47
- const Client_js_6 = require("./api/resources/metrics/client/Client.js");
48
- const Client_js_7 = require("./api/resources/threads/client/Client.js");
49
- const Client_js_8 = require("./api/resources/websockets/client/Client.js");
43
+ const Client_js_2 = require("./api/resources/pods/client/Client.js");
44
+ const Client_js_3 = require("./api/resources/webhooks/client/Client.js");
45
+ const Client_js_4 = require("./api/resources/apiKeys/client/Client.js");
46
+ const Client_js_5 = require("./api/resources/domains/client/Client.js");
47
+ const Client_js_6 = require("./api/resources/drafts/client/Client.js");
48
+ const Client_js_7 = require("./api/resources/metrics/client/Client.js");
49
+ const Client_js_8 = require("./api/resources/threads/client/Client.js");
50
+ const Client_js_9 = require("./api/resources/websockets/client/Client.js");
50
51
  class AgentMailClient {
51
52
  constructor(_options = {}) {
52
53
  this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
53
54
  "X-Fern-Language": "JavaScript",
54
55
  "X-Fern-SDK-Name": "agentmail",
55
- "X-Fern-SDK-Version": "0.0.72",
56
- "User-Agent": "agentmail/0.0.72",
56
+ "X-Fern-SDK-Version": "0.0.74",
57
+ "User-Agent": "agentmail/0.0.74",
57
58
  "X-Fern-Runtime": core.RUNTIME.type,
58
59
  "X-Fern-Runtime-Version": core.RUNTIME.version,
59
60
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -62,33 +63,37 @@ class AgentMailClient {
62
63
  var _a;
63
64
  return ((_a = this._inboxes) !== null && _a !== void 0 ? _a : (this._inboxes = new Client_js_1.Inboxes(this._options)));
64
65
  }
66
+ get pods() {
67
+ var _a;
68
+ return ((_a = this._pods) !== null && _a !== void 0 ? _a : (this._pods = new Client_js_2.Pods(this._options)));
69
+ }
65
70
  get webhooks() {
66
71
  var _a;
67
- return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_2.Webhooks(this._options)));
72
+ return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_3.Webhooks(this._options)));
68
73
  }
69
74
  get apiKeys() {
70
75
  var _a;
71
- return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new Client_js_3.ApiKeys(this._options)));
76
+ return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new Client_js_4.ApiKeys(this._options)));
72
77
  }
73
78
  get domains() {
74
79
  var _a;
75
- return ((_a = this._domains) !== null && _a !== void 0 ? _a : (this._domains = new Client_js_4.Domains(this._options)));
80
+ return ((_a = this._domains) !== null && _a !== void 0 ? _a : (this._domains = new Client_js_5.Domains(this._options)));
76
81
  }
77
82
  get drafts() {
78
83
  var _a;
79
- return ((_a = this._drafts) !== null && _a !== void 0 ? _a : (this._drafts = new Client_js_5.Drafts(this._options)));
84
+ return ((_a = this._drafts) !== null && _a !== void 0 ? _a : (this._drafts = new Client_js_6.Drafts(this._options)));
80
85
  }
81
86
  get metrics() {
82
87
  var _a;
83
- return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new Client_js_6.Metrics(this._options)));
88
+ return ((_a = this._metrics) !== null && _a !== void 0 ? _a : (this._metrics = new Client_js_7.Metrics(this._options)));
84
89
  }
85
90
  get threads() {
86
91
  var _a;
87
- return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new Client_js_7.Threads(this._options)));
92
+ return ((_a = this._threads) !== null && _a !== void 0 ? _a : (this._threads = new Client_js_8.Threads(this._options)));
88
93
  }
89
94
  get websockets() {
90
95
  var _a;
91
- return ((_a = this._websockets) !== null && _a !== void 0 ? _a : (this._websockets = new Client_js_8.Websockets(this._options)));
96
+ return ((_a = this._websockets) !== null && _a !== void 0 ? _a : (this._websockets = new Client_js_9.Websockets(this._options)));
92
97
  }
93
98
  }
94
99
  exports.AgentMailClient = AgentMailClient;
@@ -36,7 +36,8 @@ export declare class ApiKeys {
36
36
  * @example
37
37
  * await client.apiKeys.list()
38
38
  */
39
- list(request?: AgentMail.ListApiKeysRequest, requestOptions?: ApiKeys.RequestOptions): Promise<core.Page<AgentMail.ApiKey>>;
39
+ list(request?: AgentMail.ListApiKeysRequest, requestOptions?: ApiKeys.RequestOptions): core.HttpResponsePromise<AgentMail.ListApiKeysResponse>;
40
+ private __list;
40
41
  /**
41
42
  * @param {AgentMail.CreateApiKeyRequest} request
42
43
  * @param {ApiKeys.RequestOptions} requestOptions - Request-specific configuration.
@@ -63,74 +63,64 @@ class ApiKeys {
63
63
  * @example
64
64
  * await client.apiKeys.list()
65
65
  */
66
- list() {
66
+ list(request = {}, requestOptions) {
67
+ return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
68
+ }
69
+ __list() {
67
70
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
68
- const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
69
- var _a, _b, _c;
70
- const { limit, pageToken } = request;
71
- const _queryParams = {};
72
- if (limit != null) {
73
- _queryParams["limit"] = limit.toString();
74
- }
75
- if (pageToken != null) {
76
- _queryParams["page_token"] = pageToken;
77
- }
78
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
79
- const _response = yield core.fetcher({
80
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/api-keys"),
81
- method: "GET",
82
- headers: _headers,
83
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
84
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
85
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
86
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
71
+ var _a, _b, _c;
72
+ const { limit, pageToken } = request;
73
+ const _queryParams = {};
74
+ if (limit != null) {
75
+ _queryParams["limit"] = limit.toString();
76
+ }
77
+ if (pageToken != null) {
78
+ _queryParams["page_token"] = pageToken;
79
+ }
80
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
81
+ const _response = yield core.fetcher({
82
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/api-keys"),
83
+ method: "GET",
84
+ headers: _headers,
85
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
86
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
87
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
88
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
89
+ });
90
+ if (_response.ok) {
91
+ return {
92
+ data: serializers.ListApiKeysResponse.parseOrThrow(_response.body, {
93
+ unrecognizedObjectKeys: "passthrough",
94
+ allowUnrecognizedUnionMembers: true,
95
+ allowUnrecognizedEnumValues: true,
96
+ skipValidation: true,
97
+ breadcrumbsPrefix: ["response"],
98
+ }),
99
+ rawResponse: _response.rawResponse,
100
+ };
101
+ }
102
+ if (_response.error.reason === "status-code") {
103
+ throw new errors.AgentMailError({
104
+ statusCode: _response.error.statusCode,
105
+ body: _response.error.body,
106
+ rawResponse: _response.rawResponse,
87
107
  });
88
- if (_response.ok) {
89
- return {
90
- data: serializers.ListApiKeysResponse.parseOrThrow(_response.body, {
91
- unrecognizedObjectKeys: "passthrough",
92
- allowUnrecognizedUnionMembers: true,
93
- allowUnrecognizedEnumValues: true,
94
- skipValidation: true,
95
- breadcrumbsPrefix: ["response"],
96
- }),
97
- rawResponse: _response.rawResponse,
98
- };
99
- }
100
- if (_response.error.reason === "status-code") {
108
+ }
109
+ switch (_response.error.reason) {
110
+ case "non-json":
101
111
  throw new errors.AgentMailError({
102
112
  statusCode: _response.error.statusCode,
103
- body: _response.error.body,
113
+ body: _response.error.rawBody,
104
114
  rawResponse: _response.rawResponse,
105
115
  });
106
- }
107
- switch (_response.error.reason) {
108
- case "non-json":
109
- throw new errors.AgentMailError({
110
- statusCode: _response.error.statusCode,
111
- body: _response.error.rawBody,
112
- rawResponse: _response.rawResponse,
113
- });
114
- case "timeout":
115
- throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/api-keys.");
116
- case "unknown":
117
- throw new errors.AgentMailError({
118
- message: _response.error.errorMessage,
119
- rawResponse: _response.rawResponse,
120
- });
121
- }
122
- }));
123
- const dataWithRawResponse = yield list(request).withRawResponse();
124
- return new core.Pageable({
125
- response: dataWithRawResponse.data,
126
- rawResponse: dataWithRawResponse.rawResponse,
127
- hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
128
- !(typeof (response === null || response === void 0 ? void 0 : response.nextPageToken) === "string" && (response === null || response === void 0 ? void 0 : response.nextPageToken) === ""),
129
- getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.apiKeys) !== null && _a !== void 0 ? _a : []; },
130
- loadPage: (response) => {
131
- return list(core.setObjectProperty(request, "pageToken", response === null || response === void 0 ? void 0 : response.nextPageToken));
132
- },
133
- });
116
+ case "timeout":
117
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/api-keys.");
118
+ case "unknown":
119
+ throw new errors.AgentMailError({
120
+ message: _response.error.errorMessage,
121
+ rawResponse: _response.rawResponse,
122
+ });
123
+ }
134
124
  });
135
125
  }
136
126
  /**
@@ -36,17 +36,18 @@ export declare class Domains {
36
36
  * @example
37
37
  * await client.domains.list()
38
38
  */
39
- list(request?: AgentMail.ListDomainsRequest, requestOptions?: Domains.RequestOptions): Promise<core.Page<AgentMail.DomainSummary>>;
39
+ list(request?: AgentMail.ListDomainsRequest, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<AgentMail.ListDomainsResponse>;
40
+ private __list;
40
41
  /**
41
- * @param {AgentMail.DomainId} domain
42
+ * @param {AgentMail.DomainId} domainId
42
43
  * @param {Domains.RequestOptions} requestOptions - Request-specific configuration.
43
44
  *
44
45
  * @throws {@link AgentMail.NotFoundError}
45
46
  *
46
47
  * @example
47
- * await client.domains.get("domain")
48
+ * await client.domains.get("domain_id")
48
49
  */
49
- get(domain: AgentMail.DomainId, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
50
+ get(domainId: AgentMail.DomainId, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
50
51
  private __get;
51
52
  /**
52
53
  * @param {AgentMail.CreateDomainRequest} request
@@ -57,21 +58,32 @@ export declare class Domains {
57
58
  * @example
58
59
  * await client.domains.create({
59
60
  * domain: "domain",
60
- * feedbackEnabled: undefined
61
+ * feedbackEnabled: true
61
62
  * })
62
63
  */
63
- create(request: AgentMail.CreateDomainRequest, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<AgentMail.CreateDomainResponse>;
64
+ create(request: AgentMail.CreateDomainRequest, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
64
65
  private __create;
65
66
  /**
66
- * @param {AgentMail.DomainId} domain
67
+ * @param {AgentMail.DomainId} domainId
67
68
  * @param {Domains.RequestOptions} requestOptions - Request-specific configuration.
68
69
  *
69
70
  * @throws {@link AgentMail.NotFoundError}
70
71
  *
71
72
  * @example
72
- * await client.domains.delete("domain")
73
+ * await client.domains.delete("domain_id")
73
74
  */
74
- delete(domain: AgentMail.DomainId, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<void>;
75
+ delete(domainId: AgentMail.DomainId, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<void>;
75
76
  private __delete;
77
+ /**
78
+ * @param {AgentMail.DomainId} domainId
79
+ * @param {Domains.RequestOptions} requestOptions - Request-specific configuration.
80
+ *
81
+ * @throws {@link AgentMail.NotFoundError}
82
+ *
83
+ * @example
84
+ * await client.domains.verify("domain_id")
85
+ */
86
+ verify(domainId: AgentMail.DomainId, requestOptions?: Domains.RequestOptions): core.HttpResponsePromise<void>;
87
+ private __verify;
76
88
  protected _getAuthorizationHeader(): Promise<string>;
77
89
  }
@@ -63,94 +63,84 @@ class Domains {
63
63
  * @example
64
64
  * await client.domains.list()
65
65
  */
66
- list() {
66
+ list(request = {}, requestOptions) {
67
+ return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
68
+ }
69
+ __list() {
67
70
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
68
- const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
69
- var _a, _b, _c;
70
- const { limit, pageToken } = request;
71
- const _queryParams = {};
72
- if (limit != null) {
73
- _queryParams["limit"] = limit.toString();
74
- }
75
- if (pageToken != null) {
76
- _queryParams["page_token"] = pageToken;
77
- }
78
- let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
79
- const _response = yield core.fetcher({
80
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/domains"),
81
- method: "GET",
82
- headers: _headers,
83
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
84
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
85
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
86
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
71
+ var _a, _b, _c;
72
+ const { limit, pageToken } = request;
73
+ const _queryParams = {};
74
+ if (limit != null) {
75
+ _queryParams["limit"] = limit.toString();
76
+ }
77
+ if (pageToken != null) {
78
+ _queryParams["page_token"] = pageToken;
79
+ }
80
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
81
+ const _response = yield core.fetcher({
82
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, "/v0/domains"),
83
+ method: "GET",
84
+ headers: _headers,
85
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
86
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
87
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
88
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
89
+ });
90
+ if (_response.ok) {
91
+ return {
92
+ data: serializers.ListDomainsResponse.parseOrThrow(_response.body, {
93
+ unrecognizedObjectKeys: "passthrough",
94
+ allowUnrecognizedUnionMembers: true,
95
+ allowUnrecognizedEnumValues: true,
96
+ skipValidation: true,
97
+ breadcrumbsPrefix: ["response"],
98
+ }),
99
+ rawResponse: _response.rawResponse,
100
+ };
101
+ }
102
+ if (_response.error.reason === "status-code") {
103
+ throw new errors.AgentMailError({
104
+ statusCode: _response.error.statusCode,
105
+ body: _response.error.body,
106
+ rawResponse: _response.rawResponse,
87
107
  });
88
- if (_response.ok) {
89
- return {
90
- data: serializers.ListDomainsResponse.parseOrThrow(_response.body, {
91
- unrecognizedObjectKeys: "passthrough",
92
- allowUnrecognizedUnionMembers: true,
93
- allowUnrecognizedEnumValues: true,
94
- skipValidation: true,
95
- breadcrumbsPrefix: ["response"],
96
- }),
97
- rawResponse: _response.rawResponse,
98
- };
99
- }
100
- if (_response.error.reason === "status-code") {
108
+ }
109
+ switch (_response.error.reason) {
110
+ case "non-json":
101
111
  throw new errors.AgentMailError({
102
112
  statusCode: _response.error.statusCode,
103
- body: _response.error.body,
113
+ body: _response.error.rawBody,
104
114
  rawResponse: _response.rawResponse,
105
115
  });
106
- }
107
- switch (_response.error.reason) {
108
- case "non-json":
109
- throw new errors.AgentMailError({
110
- statusCode: _response.error.statusCode,
111
- body: _response.error.rawBody,
112
- rawResponse: _response.rawResponse,
113
- });
114
- case "timeout":
115
- throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/domains.");
116
- case "unknown":
117
- throw new errors.AgentMailError({
118
- message: _response.error.errorMessage,
119
- rawResponse: _response.rawResponse,
120
- });
121
- }
122
- }));
123
- const dataWithRawResponse = yield list(request).withRawResponse();
124
- return new core.Pageable({
125
- response: dataWithRawResponse.data,
126
- rawResponse: dataWithRawResponse.rawResponse,
127
- hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
128
- !(typeof (response === null || response === void 0 ? void 0 : response.nextPageToken) === "string" && (response === null || response === void 0 ? void 0 : response.nextPageToken) === ""),
129
- getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.domains) !== null && _a !== void 0 ? _a : []; },
130
- loadPage: (response) => {
131
- return list(core.setObjectProperty(request, "pageToken", response === null || response === void 0 ? void 0 : response.nextPageToken));
132
- },
133
- });
116
+ case "timeout":
117
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/domains.");
118
+ case "unknown":
119
+ throw new errors.AgentMailError({
120
+ message: _response.error.errorMessage,
121
+ rawResponse: _response.rawResponse,
122
+ });
123
+ }
134
124
  });
135
125
  }
136
126
  /**
137
- * @param {AgentMail.DomainId} domain
127
+ * @param {AgentMail.DomainId} domainId
138
128
  * @param {Domains.RequestOptions} requestOptions - Request-specific configuration.
139
129
  *
140
130
  * @throws {@link AgentMail.NotFoundError}
141
131
  *
142
132
  * @example
143
- * await client.domains.get("domain")
133
+ * await client.domains.get("domain_id")
144
134
  */
145
- get(domain, requestOptions) {
146
- return core.HttpResponsePromise.fromPromise(this.__get(domain, requestOptions));
135
+ get(domainId, requestOptions) {
136
+ return core.HttpResponsePromise.fromPromise(this.__get(domainId, requestOptions));
147
137
  }
148
- __get(domain, requestOptions) {
138
+ __get(domainId, requestOptions) {
149
139
  return __awaiter(this, void 0, void 0, function* () {
150
140
  var _a, _b, _c;
151
141
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
152
142
  const _response = yield core.fetcher({
153
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/domains/${encodeURIComponent(serializers.DomainId.jsonOrThrow(domain, { omitUndefined: true }))}`),
143
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/domains/${encodeURIComponent(serializers.DomainId.jsonOrThrow(domainId, { omitUndefined: true }))}`),
154
144
  method: "GET",
155
145
  headers: _headers,
156
146
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -196,7 +186,7 @@ class Domains {
196
186
  rawResponse: _response.rawResponse,
197
187
  });
198
188
  case "timeout":
199
- throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/domains/{domain}.");
189
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/domains/{domain_id}.");
200
190
  case "unknown":
201
191
  throw new errors.AgentMailError({
202
192
  message: _response.error.errorMessage,
@@ -214,7 +204,7 @@ class Domains {
214
204
  * @example
215
205
  * await client.domains.create({
216
206
  * domain: "domain",
217
- * feedbackEnabled: undefined
207
+ * feedbackEnabled: true
218
208
  * })
219
209
  */
220
210
  create(request, requestOptions) {
@@ -241,7 +231,7 @@ class Domains {
241
231
  });
242
232
  if (_response.ok) {
243
233
  return {
244
- data: serializers.CreateDomainResponse.parseOrThrow(_response.body, {
234
+ data: serializers.Domain.parseOrThrow(_response.body, {
245
235
  unrecognizedObjectKeys: "passthrough",
246
236
  allowUnrecognizedUnionMembers: true,
247
237
  allowUnrecognizedEnumValues: true,
@@ -287,23 +277,23 @@ class Domains {
287
277
  });
288
278
  }
289
279
  /**
290
- * @param {AgentMail.DomainId} domain
280
+ * @param {AgentMail.DomainId} domainId
291
281
  * @param {Domains.RequestOptions} requestOptions - Request-specific configuration.
292
282
  *
293
283
  * @throws {@link AgentMail.NotFoundError}
294
284
  *
295
285
  * @example
296
- * await client.domains.delete("domain")
286
+ * await client.domains.delete("domain_id")
297
287
  */
298
- delete(domain, requestOptions) {
299
- return core.HttpResponsePromise.fromPromise(this.__delete(domain, requestOptions));
288
+ delete(domainId, requestOptions) {
289
+ return core.HttpResponsePromise.fromPromise(this.__delete(domainId, requestOptions));
300
290
  }
301
- __delete(domain, requestOptions) {
291
+ __delete(domainId, requestOptions) {
302
292
  return __awaiter(this, void 0, void 0, function* () {
303
293
  var _a, _b, _c;
304
294
  let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
305
295
  const _response = yield core.fetcher({
306
- url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/domains/${encodeURIComponent(serializers.DomainId.jsonOrThrow(domain, { omitUndefined: true }))}`),
296
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/domains/${encodeURIComponent(serializers.DomainId.jsonOrThrow(domainId, { omitUndefined: true }))}`),
307
297
  method: "DELETE",
308
298
  headers: _headers,
309
299
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -340,7 +330,70 @@ class Domains {
340
330
  rawResponse: _response.rawResponse,
341
331
  });
342
332
  case "timeout":
343
- throw new errors.AgentMailTimeoutError("Timeout exceeded when calling DELETE /v0/domains/{domain}.");
333
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling DELETE /v0/domains/{domain_id}.");
334
+ case "unknown":
335
+ throw new errors.AgentMailError({
336
+ message: _response.error.errorMessage,
337
+ rawResponse: _response.rawResponse,
338
+ });
339
+ }
340
+ });
341
+ }
342
+ /**
343
+ * @param {AgentMail.DomainId} domainId
344
+ * @param {Domains.RequestOptions} requestOptions - Request-specific configuration.
345
+ *
346
+ * @throws {@link AgentMail.NotFoundError}
347
+ *
348
+ * @example
349
+ * await client.domains.verify("domain_id")
350
+ */
351
+ verify(domainId, requestOptions) {
352
+ return core.HttpResponsePromise.fromPromise(this.__verify(domainId, requestOptions));
353
+ }
354
+ __verify(domainId, requestOptions) {
355
+ return __awaiter(this, void 0, void 0, function* () {
356
+ var _a, _b, _c;
357
+ let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
358
+ const _response = yield core.fetcher({
359
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : ((_c = (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.AgentMailEnvironment.Production).http, `/v0/domains/${encodeURIComponent(serializers.DomainId.jsonOrThrow(domainId, { omitUndefined: true }))}/verify`),
360
+ method: "POST",
361
+ headers: _headers,
362
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
363
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
364
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
365
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
366
+ });
367
+ if (_response.ok) {
368
+ return { data: undefined, rawResponse: _response.rawResponse };
369
+ }
370
+ if (_response.error.reason === "status-code") {
371
+ switch (_response.error.statusCode) {
372
+ case 404:
373
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
374
+ unrecognizedObjectKeys: "passthrough",
375
+ allowUnrecognizedUnionMembers: true,
376
+ allowUnrecognizedEnumValues: true,
377
+ skipValidation: true,
378
+ breadcrumbsPrefix: ["response"],
379
+ }), _response.rawResponse);
380
+ default:
381
+ throw new errors.AgentMailError({
382
+ statusCode: _response.error.statusCode,
383
+ body: _response.error.body,
384
+ rawResponse: _response.rawResponse,
385
+ });
386
+ }
387
+ }
388
+ switch (_response.error.reason) {
389
+ case "non-json":
390
+ throw new errors.AgentMailError({
391
+ statusCode: _response.error.statusCode,
392
+ body: _response.error.rawBody,
393
+ rawResponse: _response.rawResponse,
394
+ });
395
+ case "timeout":
396
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling POST /v0/domains/{domain_id}/verify.");
344
397
  case "unknown":
345
398
  throw new errors.AgentMailError({
346
399
  message: _response.error.errorMessage,
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Client ID of domain.
6
+ */
7
+ export type ClientId = string;
@@ -4,6 +4,5 @@
4
4
  import * as AgentMail from "../../../index.js";
5
5
  export interface CreateDomainRequest {
6
6
  domain: AgentMail.DomainName;
7
- /** Whether to forward bounce and complaint notifications to your domain. */
8
- feedbackEnabled?: boolean;
7
+ feedbackEnabled: AgentMail.FeedbackEnabled;
9
8
  }
@@ -4,13 +4,12 @@
4
4
  import * as AgentMail from "../../../index.js";
5
5
  export interface Domain {
6
6
  domainId: AgentMail.DomainId;
7
- organizationId: AgentMail.OrganizationId;
8
7
  /** The verification status of the domain. */
9
8
  status: AgentMail.VerificationStatus;
10
- /** Whether bounce and complaint notifications are forwarded to your domain. */
11
- feedbackEnabled?: boolean;
9
+ feedbackEnabled: AgentMail.FeedbackEnabled;
12
10
  /** A list of DNS records required to verify the domain. */
13
11
  records: AgentMail.VerificationRecord[];
12
+ clientId?: AgentMail.ClientId;
14
13
  /** Time at which the domain was last updated. */
15
14
  updatedAt: Date;
16
15
  /** Time at which the domain was created. */
@@ -4,11 +4,10 @@
4
4
  import * as AgentMail from "../../../index.js";
5
5
  export interface DomainSummary {
6
6
  domainId: AgentMail.DomainId;
7
- organizationId: AgentMail.OrganizationId;
7
+ feedbackEnabled: AgentMail.FeedbackEnabled;
8
+ clientId?: AgentMail.ClientId;
8
9
  /** Time at which the domain was last updated. */
9
10
  updatedAt: Date;
10
11
  /** Time at which the domain was created. */
11
12
  createdAt: Date;
12
- /** Whether to forward bounce and complaint notifications to your domain. */
13
- feedbackEnabled?: boolean;
14
13
  }