agentmail 0.4.14 → 0.4.16

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 (311) hide show
  1. package/README.md +46 -14
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +12 -0
  4. package/dist/cjs/Client.js +74 -0
  5. package/dist/cjs/api/resources/agent/client/Client.d.ts +13 -1
  6. package/dist/cjs/api/resources/agent/client/Client.js +13 -1
  7. package/dist/cjs/api/resources/agent/exports.d.ts +2 -0
  8. package/dist/cjs/api/resources/agent/exports.js +21 -0
  9. package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +16 -3
  10. package/dist/cjs/api/resources/apiKeys/client/Client.js +16 -3
  11. package/dist/cjs/api/resources/apiKeys/exports.d.ts +2 -0
  12. package/dist/cjs/api/resources/apiKeys/exports.js +21 -0
  13. package/dist/cjs/api/resources/apiKeys/types/CreateApiKeyRequest.d.ts +1 -1
  14. package/dist/cjs/api/resources/attachments/exports.d.ts +1 -0
  15. package/dist/cjs/api/resources/attachments/exports.js +18 -0
  16. package/dist/cjs/api/resources/domains/client/Client.d.ts +35 -0
  17. package/dist/cjs/api/resources/domains/client/Client.js +35 -0
  18. package/dist/cjs/api/resources/domains/exports.d.ts +2 -0
  19. package/dist/cjs/api/resources/domains/exports.js +21 -0
  20. package/dist/cjs/api/resources/domains/types/DomainItem.d.ts +0 -1
  21. package/dist/cjs/api/resources/drafts/client/Client.d.ts +15 -0
  22. package/dist/cjs/api/resources/drafts/client/Client.js +15 -0
  23. package/dist/cjs/api/resources/drafts/exports.d.ts +2 -0
  24. package/dist/cjs/api/resources/drafts/exports.js +21 -0
  25. package/dist/cjs/api/resources/events/exports.d.ts +1 -0
  26. package/dist/cjs/api/resources/events/exports.js +18 -0
  27. package/dist/cjs/api/resources/inboxes/client/Client.d.ts +25 -0
  28. package/dist/cjs/api/resources/inboxes/client/Client.js +25 -0
  29. package/dist/cjs/api/resources/inboxes/exports.d.ts +3 -0
  30. package/dist/cjs/api/resources/inboxes/exports.js +22 -0
  31. package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/Client.d.ts +16 -3
  32. package/dist/cjs/api/resources/inboxes/resources/apiKeys/client/Client.js +16 -3
  33. package/dist/cjs/api/resources/inboxes/resources/apiKeys/exports.d.ts +2 -0
  34. package/dist/cjs/api/resources/inboxes/resources/apiKeys/exports.js +21 -0
  35. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +35 -0
  36. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +35 -0
  37. package/dist/cjs/api/resources/inboxes/resources/drafts/exports.d.ts +2 -0
  38. package/dist/cjs/api/resources/inboxes/resources/drafts/exports.js +21 -0
  39. package/dist/cjs/api/resources/inboxes/resources/lists/client/Client.d.ts +20 -0
  40. package/dist/cjs/api/resources/inboxes/resources/lists/client/Client.js +20 -0
  41. package/dist/cjs/api/resources/inboxes/resources/lists/exports.d.ts +2 -0
  42. package/dist/cjs/api/resources/inboxes/resources/lists/exports.js +21 -0
  43. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +45 -0
  44. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +45 -0
  45. package/dist/cjs/api/resources/inboxes/resources/messages/exports.d.ts +2 -0
  46. package/dist/cjs/api/resources/inboxes/resources/messages/exports.js +21 -0
  47. package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.d.ts +5 -0
  48. package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.js +5 -0
  49. package/dist/cjs/api/resources/inboxes/resources/metrics/exports.d.ts +2 -0
  50. package/dist/cjs/api/resources/inboxes/resources/metrics/exports.js +21 -0
  51. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.d.ts +20 -0
  52. package/dist/cjs/api/resources/inboxes/resources/threads/client/Client.js +20 -0
  53. package/dist/cjs/api/resources/inboxes/resources/threads/exports.d.ts +2 -0
  54. package/dist/cjs/api/resources/inboxes/resources/threads/exports.js +21 -0
  55. package/dist/cjs/api/resources/lists/client/Client.d.ts +20 -0
  56. package/dist/cjs/api/resources/lists/client/Client.js +20 -0
  57. package/dist/cjs/api/resources/lists/exports.d.ts +2 -0
  58. package/dist/cjs/api/resources/lists/exports.js +21 -0
  59. package/dist/cjs/api/resources/messages/exports.d.ts +1 -0
  60. package/dist/cjs/api/resources/messages/exports.js +18 -0
  61. package/dist/cjs/api/resources/messages/types/UpdateMessageLabels.d.ts +4 -0
  62. package/dist/cjs/api/resources/messages/types/UpdateMessageLabels.js +3 -0
  63. package/dist/cjs/api/resources/messages/types/UpdateMessageRequest.d.ts +5 -4
  64. package/dist/cjs/api/resources/messages/types/index.d.ts +1 -0
  65. package/dist/cjs/api/resources/messages/types/index.js +1 -0
  66. package/dist/cjs/api/resources/metrics/client/Client.d.ts +5 -0
  67. package/dist/cjs/api/resources/metrics/client/Client.js +5 -0
  68. package/dist/cjs/api/resources/metrics/exports.d.ts +2 -0
  69. package/dist/cjs/api/resources/metrics/exports.js +21 -0
  70. package/dist/cjs/api/resources/metrics/types/QueryMetricsResponse.d.ts +1 -1
  71. package/dist/cjs/api/resources/organizations/exports.d.ts +2 -0
  72. package/dist/cjs/api/resources/organizations/exports.js +21 -0
  73. package/dist/cjs/api/resources/pods/client/Client.d.ts +20 -0
  74. package/dist/cjs/api/resources/pods/client/Client.js +20 -0
  75. package/dist/cjs/api/resources/pods/exports.d.ts +3 -0
  76. package/dist/cjs/api/resources/pods/exports.js +22 -0
  77. package/dist/cjs/api/resources/pods/resources/apiKeys/client/Client.d.ts +16 -3
  78. package/dist/cjs/api/resources/pods/resources/apiKeys/client/Client.js +16 -3
  79. package/dist/cjs/api/resources/pods/resources/apiKeys/exports.d.ts +2 -0
  80. package/dist/cjs/api/resources/pods/resources/apiKeys/exports.js +21 -0
  81. package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +35 -0
  82. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +35 -0
  83. package/dist/cjs/api/resources/pods/resources/domains/exports.d.ts +2 -0
  84. package/dist/cjs/api/resources/pods/resources/domains/exports.js +21 -0
  85. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.d.ts +15 -0
  86. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +15 -0
  87. package/dist/cjs/api/resources/pods/resources/drafts/exports.d.ts +2 -0
  88. package/dist/cjs/api/resources/pods/resources/drafts/exports.js +21 -0
  89. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +25 -0
  90. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +25 -0
  91. package/dist/cjs/api/resources/pods/resources/inboxes/exports.d.ts +2 -0
  92. package/dist/cjs/api/resources/pods/resources/inboxes/exports.js +21 -0
  93. package/dist/cjs/api/resources/pods/resources/lists/client/Client.d.ts +20 -0
  94. package/dist/cjs/api/resources/pods/resources/lists/client/Client.js +20 -0
  95. package/dist/cjs/api/resources/pods/resources/lists/exports.d.ts +2 -0
  96. package/dist/cjs/api/resources/pods/resources/lists/exports.js +21 -0
  97. package/dist/cjs/api/resources/pods/resources/metrics/client/Client.d.ts +5 -0
  98. package/dist/cjs/api/resources/pods/resources/metrics/client/Client.js +5 -0
  99. package/dist/cjs/api/resources/pods/resources/metrics/exports.d.ts +2 -0
  100. package/dist/cjs/api/resources/pods/resources/metrics/exports.js +21 -0
  101. package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +20 -0
  102. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +20 -0
  103. package/dist/cjs/api/resources/pods/resources/threads/exports.d.ts +2 -0
  104. package/dist/cjs/api/resources/pods/resources/threads/exports.js +21 -0
  105. package/dist/cjs/api/resources/threads/client/Client.d.ts +20 -0
  106. package/dist/cjs/api/resources/threads/client/Client.js +20 -0
  107. package/dist/cjs/api/resources/threads/exports.d.ts +2 -0
  108. package/dist/cjs/api/resources/threads/exports.js +21 -0
  109. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +25 -0
  110. package/dist/cjs/api/resources/webhooks/client/Client.js +25 -0
  111. package/dist/cjs/api/resources/webhooks/exports.d.ts +3 -0
  112. package/dist/cjs/api/resources/webhooks/exports.js +22 -0
  113. package/dist/cjs/api/resources/webhooks/resources/events/exports.d.ts +1 -0
  114. package/dist/cjs/api/resources/webhooks/resources/events/exports.js +18 -0
  115. package/dist/cjs/api/resources/websockets/client/Client.d.ts +6 -0
  116. package/dist/cjs/api/resources/websockets/client/Client.js +8 -3
  117. package/dist/cjs/api/resources/websockets/client/Socket.d.ts +2 -2
  118. package/dist/cjs/api/resources/websockets/client/Socket.js +2 -2
  119. package/dist/cjs/api/resources/websockets/exports.d.ts +3 -0
  120. package/dist/cjs/api/resources/websockets/exports.js +23 -0
  121. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
  122. package/dist/cjs/core/fetcher/Fetcher.js +8 -2
  123. package/dist/cjs/core/fetcher/index.d.ts +2 -0
  124. package/dist/cjs/core/fetcher/index.js +3 -1
  125. package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
  126. package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
  127. package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
  128. package/dist/cjs/core/fetcher/makeRequest.js +30 -9
  129. package/dist/cjs/core/runtime/runtime.js +8 -7
  130. package/dist/cjs/core/schemas/builders/list/list.js +12 -17
  131. package/dist/cjs/core/schemas/builders/object/object.js +102 -40
  132. package/dist/cjs/core/schemas/builders/object-like/getObjectLikeUtils.js +10 -3
  133. package/dist/cjs/core/schemas/builders/record/index.d.ts +2 -2
  134. package/dist/cjs/core/schemas/builders/record/index.js +2 -1
  135. package/dist/cjs/core/schemas/builders/record/record.d.ts +2 -1
  136. package/dist/cjs/core/schemas/builders/record/record.js +63 -25
  137. package/dist/cjs/core/schemas/builders/record/types.d.ts +2 -0
  138. package/dist/cjs/core/schemas/builders/union/union.js +9 -12
  139. package/dist/cjs/core/schemas/utils/isPlainObject.js +4 -6
  140. package/dist/cjs/core/websocket/ws.d.ts +14 -2
  141. package/dist/cjs/core/websocket/ws.js +51 -7
  142. package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyRequest.d.ts +1 -1
  143. package/dist/cjs/serialization/resources/apiKeys/types/CreateApiKeyRequest.js +1 -1
  144. package/dist/cjs/serialization/resources/domains/types/DomainItem.d.ts +0 -2
  145. package/dist/cjs/serialization/resources/domains/types/DomainItem.js +0 -2
  146. package/dist/cjs/serialization/resources/messages/types/UpdateMessageLabels.d.ts +7 -0
  147. package/dist/cjs/serialization/resources/messages/types/UpdateMessageLabels.js +42 -0
  148. package/dist/cjs/serialization/resources/messages/types/UpdateMessageRequest.d.ts +3 -2
  149. package/dist/cjs/serialization/resources/messages/types/UpdateMessageRequest.js +3 -2
  150. package/dist/cjs/serialization/resources/messages/types/index.d.ts +1 -0
  151. package/dist/cjs/serialization/resources/messages/types/index.js +1 -0
  152. package/dist/cjs/serialization/resources/metrics/types/QueryMetricsResponse.js +1 -1
  153. package/dist/cjs/version.d.ts +1 -1
  154. package/dist/cjs/version.js +1 -1
  155. package/dist/esm/BaseClient.mjs +2 -2
  156. package/dist/esm/Client.d.mts +12 -0
  157. package/dist/esm/Client.mjs +41 -0
  158. package/dist/esm/api/resources/agent/client/Client.d.mts +13 -1
  159. package/dist/esm/api/resources/agent/client/Client.mjs +13 -1
  160. package/dist/esm/api/resources/agent/exports.d.mts +2 -0
  161. package/dist/esm/api/resources/agent/exports.mjs +3 -0
  162. package/dist/esm/api/resources/apiKeys/client/Client.d.mts +16 -3
  163. package/dist/esm/api/resources/apiKeys/client/Client.mjs +16 -3
  164. package/dist/esm/api/resources/apiKeys/exports.d.mts +2 -0
  165. package/dist/esm/api/resources/apiKeys/exports.mjs +3 -0
  166. package/dist/esm/api/resources/apiKeys/types/CreateApiKeyRequest.d.mts +1 -1
  167. package/dist/esm/api/resources/attachments/exports.d.mts +1 -0
  168. package/dist/esm/api/resources/attachments/exports.mjs +2 -0
  169. package/dist/esm/api/resources/domains/client/Client.d.mts +35 -0
  170. package/dist/esm/api/resources/domains/client/Client.mjs +35 -0
  171. package/dist/esm/api/resources/domains/exports.d.mts +2 -0
  172. package/dist/esm/api/resources/domains/exports.mjs +3 -0
  173. package/dist/esm/api/resources/domains/types/DomainItem.d.mts +0 -1
  174. package/dist/esm/api/resources/drafts/client/Client.d.mts +15 -0
  175. package/dist/esm/api/resources/drafts/client/Client.mjs +15 -0
  176. package/dist/esm/api/resources/drafts/exports.d.mts +2 -0
  177. package/dist/esm/api/resources/drafts/exports.mjs +3 -0
  178. package/dist/esm/api/resources/events/exports.d.mts +1 -0
  179. package/dist/esm/api/resources/events/exports.mjs +2 -0
  180. package/dist/esm/api/resources/inboxes/client/Client.d.mts +25 -0
  181. package/dist/esm/api/resources/inboxes/client/Client.mjs +25 -0
  182. package/dist/esm/api/resources/inboxes/exports.d.mts +3 -0
  183. package/dist/esm/api/resources/inboxes/exports.mjs +4 -0
  184. package/dist/esm/api/resources/inboxes/resources/apiKeys/client/Client.d.mts +16 -3
  185. package/dist/esm/api/resources/inboxes/resources/apiKeys/client/Client.mjs +16 -3
  186. package/dist/esm/api/resources/inboxes/resources/apiKeys/exports.d.mts +2 -0
  187. package/dist/esm/api/resources/inboxes/resources/apiKeys/exports.mjs +3 -0
  188. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +35 -0
  189. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +35 -0
  190. package/dist/esm/api/resources/inboxes/resources/drafts/exports.d.mts +2 -0
  191. package/dist/esm/api/resources/inboxes/resources/drafts/exports.mjs +3 -0
  192. package/dist/esm/api/resources/inboxes/resources/lists/client/Client.d.mts +20 -0
  193. package/dist/esm/api/resources/inboxes/resources/lists/client/Client.mjs +20 -0
  194. package/dist/esm/api/resources/inboxes/resources/lists/exports.d.mts +2 -0
  195. package/dist/esm/api/resources/inboxes/resources/lists/exports.mjs +3 -0
  196. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +45 -0
  197. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +45 -0
  198. package/dist/esm/api/resources/inboxes/resources/messages/exports.d.mts +2 -0
  199. package/dist/esm/api/resources/inboxes/resources/messages/exports.mjs +3 -0
  200. package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.d.mts +5 -0
  201. package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.mjs +5 -0
  202. package/dist/esm/api/resources/inboxes/resources/metrics/exports.d.mts +2 -0
  203. package/dist/esm/api/resources/inboxes/resources/metrics/exports.mjs +3 -0
  204. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.d.mts +20 -0
  205. package/dist/esm/api/resources/inboxes/resources/threads/client/Client.mjs +20 -0
  206. package/dist/esm/api/resources/inboxes/resources/threads/exports.d.mts +2 -0
  207. package/dist/esm/api/resources/inboxes/resources/threads/exports.mjs +3 -0
  208. package/dist/esm/api/resources/lists/client/Client.d.mts +20 -0
  209. package/dist/esm/api/resources/lists/client/Client.mjs +20 -0
  210. package/dist/esm/api/resources/lists/exports.d.mts +2 -0
  211. package/dist/esm/api/resources/lists/exports.mjs +3 -0
  212. package/dist/esm/api/resources/messages/exports.d.mts +1 -0
  213. package/dist/esm/api/resources/messages/exports.mjs +2 -0
  214. package/dist/esm/api/resources/messages/types/UpdateMessageLabels.d.mts +4 -0
  215. package/dist/esm/api/resources/messages/types/UpdateMessageLabels.mjs +2 -0
  216. package/dist/esm/api/resources/messages/types/UpdateMessageRequest.d.mts +5 -4
  217. package/dist/esm/api/resources/messages/types/index.d.mts +1 -0
  218. package/dist/esm/api/resources/messages/types/index.mjs +1 -0
  219. package/dist/esm/api/resources/metrics/client/Client.d.mts +5 -0
  220. package/dist/esm/api/resources/metrics/client/Client.mjs +5 -0
  221. package/dist/esm/api/resources/metrics/exports.d.mts +2 -0
  222. package/dist/esm/api/resources/metrics/exports.mjs +3 -0
  223. package/dist/esm/api/resources/metrics/types/QueryMetricsResponse.d.mts +1 -1
  224. package/dist/esm/api/resources/organizations/exports.d.mts +2 -0
  225. package/dist/esm/api/resources/organizations/exports.mjs +3 -0
  226. package/dist/esm/api/resources/pods/client/Client.d.mts +20 -0
  227. package/dist/esm/api/resources/pods/client/Client.mjs +20 -0
  228. package/dist/esm/api/resources/pods/exports.d.mts +3 -0
  229. package/dist/esm/api/resources/pods/exports.mjs +4 -0
  230. package/dist/esm/api/resources/pods/resources/apiKeys/client/Client.d.mts +16 -3
  231. package/dist/esm/api/resources/pods/resources/apiKeys/client/Client.mjs +16 -3
  232. package/dist/esm/api/resources/pods/resources/apiKeys/exports.d.mts +2 -0
  233. package/dist/esm/api/resources/pods/resources/apiKeys/exports.mjs +3 -0
  234. package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +35 -0
  235. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +35 -0
  236. package/dist/esm/api/resources/pods/resources/domains/exports.d.mts +2 -0
  237. package/dist/esm/api/resources/pods/resources/domains/exports.mjs +3 -0
  238. package/dist/esm/api/resources/pods/resources/drafts/client/Client.d.mts +15 -0
  239. package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +15 -0
  240. package/dist/esm/api/resources/pods/resources/drafts/exports.d.mts +2 -0
  241. package/dist/esm/api/resources/pods/resources/drafts/exports.mjs +3 -0
  242. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +25 -0
  243. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +25 -0
  244. package/dist/esm/api/resources/pods/resources/inboxes/exports.d.mts +2 -0
  245. package/dist/esm/api/resources/pods/resources/inboxes/exports.mjs +3 -0
  246. package/dist/esm/api/resources/pods/resources/lists/client/Client.d.mts +20 -0
  247. package/dist/esm/api/resources/pods/resources/lists/client/Client.mjs +20 -0
  248. package/dist/esm/api/resources/pods/resources/lists/exports.d.mts +2 -0
  249. package/dist/esm/api/resources/pods/resources/lists/exports.mjs +3 -0
  250. package/dist/esm/api/resources/pods/resources/metrics/client/Client.d.mts +5 -0
  251. package/dist/esm/api/resources/pods/resources/metrics/client/Client.mjs +5 -0
  252. package/dist/esm/api/resources/pods/resources/metrics/exports.d.mts +2 -0
  253. package/dist/esm/api/resources/pods/resources/metrics/exports.mjs +3 -0
  254. package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +20 -0
  255. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +20 -0
  256. package/dist/esm/api/resources/pods/resources/threads/exports.d.mts +2 -0
  257. package/dist/esm/api/resources/pods/resources/threads/exports.mjs +3 -0
  258. package/dist/esm/api/resources/threads/client/Client.d.mts +20 -0
  259. package/dist/esm/api/resources/threads/client/Client.mjs +20 -0
  260. package/dist/esm/api/resources/threads/exports.d.mts +2 -0
  261. package/dist/esm/api/resources/threads/exports.mjs +3 -0
  262. package/dist/esm/api/resources/webhooks/client/Client.d.mts +25 -0
  263. package/dist/esm/api/resources/webhooks/client/Client.mjs +25 -0
  264. package/dist/esm/api/resources/webhooks/exports.d.mts +3 -0
  265. package/dist/esm/api/resources/webhooks/exports.mjs +4 -0
  266. package/dist/esm/api/resources/webhooks/resources/events/exports.d.mts +1 -0
  267. package/dist/esm/api/resources/webhooks/resources/events/exports.mjs +2 -0
  268. package/dist/esm/api/resources/websockets/client/Client.d.mts +6 -0
  269. package/dist/esm/api/resources/websockets/client/Client.mjs +8 -3
  270. package/dist/esm/api/resources/websockets/client/Socket.d.mts +2 -2
  271. package/dist/esm/api/resources/websockets/client/Socket.mjs +2 -2
  272. package/dist/esm/api/resources/websockets/exports.d.mts +3 -0
  273. package/dist/esm/api/resources/websockets/exports.mjs +4 -0
  274. package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
  275. package/dist/esm/core/fetcher/Fetcher.mjs +8 -2
  276. package/dist/esm/core/fetcher/index.d.mts +2 -0
  277. package/dist/esm/core/fetcher/index.mjs +1 -0
  278. package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
  279. package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
  280. package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
  281. package/dist/esm/core/fetcher/makeRequest.mjs +28 -9
  282. package/dist/esm/core/runtime/runtime.mjs +8 -7
  283. package/dist/esm/core/schemas/builders/list/list.mjs +12 -17
  284. package/dist/esm/core/schemas/builders/object/object.mjs +102 -40
  285. package/dist/esm/core/schemas/builders/object-like/getObjectLikeUtils.mjs +10 -3
  286. package/dist/esm/core/schemas/builders/record/index.d.mts +2 -2
  287. package/dist/esm/core/schemas/builders/record/index.mjs +1 -1
  288. package/dist/esm/core/schemas/builders/record/record.d.mts +2 -1
  289. package/dist/esm/core/schemas/builders/record/record.mjs +62 -25
  290. package/dist/esm/core/schemas/builders/record/types.d.mts +2 -0
  291. package/dist/esm/core/schemas/builders/union/union.mjs +9 -12
  292. package/dist/esm/core/schemas/utils/isPlainObject.mjs +4 -6
  293. package/dist/esm/core/websocket/ws.d.mts +14 -2
  294. package/dist/esm/core/websocket/ws.mjs +51 -7
  295. package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyRequest.d.mts +1 -1
  296. package/dist/esm/serialization/resources/apiKeys/types/CreateApiKeyRequest.mjs +1 -1
  297. package/dist/esm/serialization/resources/domains/types/DomainItem.d.mts +0 -2
  298. package/dist/esm/serialization/resources/domains/types/DomainItem.mjs +0 -2
  299. package/dist/esm/serialization/resources/messages/types/UpdateMessageLabels.d.mts +7 -0
  300. package/dist/esm/serialization/resources/messages/types/UpdateMessageLabels.mjs +6 -0
  301. package/dist/esm/serialization/resources/messages/types/UpdateMessageRequest.d.mts +3 -2
  302. package/dist/esm/serialization/resources/messages/types/UpdateMessageRequest.mjs +3 -2
  303. package/dist/esm/serialization/resources/messages/types/index.d.mts +1 -0
  304. package/dist/esm/serialization/resources/messages/types/index.mjs +1 -0
  305. package/dist/esm/serialization/resources/metrics/types/QueryMetricsResponse.mjs +1 -1
  306. package/dist/esm/version.d.mts +1 -1
  307. package/dist/esm/version.mjs +1 -1
  308. package/dist/llms-full.txt +2836 -568
  309. package/dist/llms.txt +3 -0
  310. package/package.json +286 -12
  311. package/reference.md +1544 -26
package/README.md CHANGED
@@ -10,10 +10,12 @@ The Agentmail TypeScript library provides convenient access to the Agentmail API
10
10
  - [Installation](#installation)
11
11
  - [Reference](#reference)
12
12
  - [Usage](#usage)
13
+ - [Environments](#environments)
13
14
  - [Request and Response Types](#request-and-response-types)
14
15
  - [Exception Handling](#exception-handling)
15
16
  - [Binary Response](#binary-response)
16
17
  - [Advanced](#advanced)
18
+ - [Subpackage Exports](#subpackage-exports)
17
19
  - [Additional Headers](#additional-headers)
18
20
  - [Additional Query String Parameters](#additional-query-string-parameters)
19
21
  - [Retries](#retries)
@@ -21,6 +23,7 @@ The Agentmail TypeScript library provides convenient access to the Agentmail API
21
23
  - [Aborting Requests](#aborting-requests)
22
24
  - [Access Raw Response Data](#access-raw-response-data)
23
25
  - [Logging](#logging)
26
+ - [Custom Fetch](#custom-fetch)
24
27
  - [Runtime Compatibility](#runtime-compatibility)
25
28
  - [Contributing](#contributing)
26
29
 
@@ -45,6 +48,18 @@ const client = new AgentMailClient({ apiKey: "YOUR_API_KEY" });
45
48
  await client.inboxes.create(undefined);
46
49
  ```
47
50
 
51
+ ## Environments
52
+
53
+ This SDK allows you to configure different environments for API requests.
54
+
55
+ ```typescript
56
+ import { AgentMailClient, AgentMailEnvironment } from "agentmail";
57
+
58
+ const client = new AgentMailClient({
59
+ environment: AgentMailEnvironment.Prod,
60
+ });
61
+ ```
62
+
48
63
  ## Request and Response Types
49
64
 
50
65
  The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
@@ -469,6 +484,16 @@ const text = new TextDecoder().decode(bytes);
469
484
 
470
485
  ## Advanced
471
486
 
487
+ ### Subpackage Exports
488
+
489
+ This SDK supports direct imports of subpackage clients, which allows JavaScript bundlers to tree-shake and include only the imported subpackage code. This results in much smaller bundle sizes.
490
+
491
+ ```typescript
492
+ import { InboxesClient } from 'agentmail/inboxes';
493
+
494
+ const client = new InboxesClient({...});
495
+ ```
496
+
472
497
  ### Additional Headers
473
498
 
474
499
  If you would like to send additional headers as part of the request, use the `headers` request option.
@@ -619,6 +644,26 @@ const logger: logging.ILogger = {
619
644
  </details>
620
645
 
621
646
 
647
+ ### Custom Fetch
648
+
649
+ The SDK provides a low-level `fetch` method for making custom HTTP requests while still
650
+ benefiting from SDK-level configuration like authentication, retries, timeouts, and logging.
651
+ This is useful for calling API endpoints not yet supported in the SDK.
652
+
653
+ ```typescript
654
+ const response = await client.fetch("/v1/custom/endpoint", {
655
+ method: "GET",
656
+ }, {
657
+ timeoutInSeconds: 30,
658
+ maxRetries: 3,
659
+ headers: {
660
+ "X-Custom-Header": "custom-value",
661
+ },
662
+ });
663
+
664
+ const data = await response.json();
665
+ ```
666
+
622
667
  ### Runtime Compatibility
623
668
 
624
669
 
@@ -633,19 +678,6 @@ The SDK works in the following runtimes:
633
678
  - Bun 1.0+
634
679
  - React Native
635
680
 
636
- ### Customizing Fetch Client
637
-
638
- The SDK provides a way for you to customize the underlying HTTP client / Fetch function. If you're running in an
639
- unsupported environment, this provides a way for you to break glass and ensure the SDK works.
640
-
641
- ```typescript
642
- import { AgentMailClient } from "agentmail";
643
-
644
- const client = new AgentMailClient({
645
- ...
646
- fetcher: // provide your implementation here
647
- });
648
- ```
649
681
 
650
682
  ## Contributing
651
683
 
@@ -655,4 +687,4 @@ otherwise they would be overwritten upon the next generated release. Feel free t
655
687
  a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
656
688
  an issue first to discuss with us!
657
689
 
658
- On the other hand, contributions to the README are always very welcome!
690
+ On the other hand, contributions to the README are always very welcome!
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "agentmail",
46
- "X-Fern-SDK-Version": "0.4.14",
47
- "User-Agent": "agentmail/0.4.14",
46
+ "X-Fern-SDK-Version": "0.4.16",
47
+ "User-Agent": "agentmail/0.4.16",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -12,6 +12,7 @@ import { WebhooksClient } from "./api/resources/webhooks/client/Client.js";
12
12
  import { WebsocketsClient } from "./api/resources/websockets/client/Client.js";
13
13
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
14
14
  import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
15
+ import * as core from "./core/index.js";
15
16
  export declare namespace AgentMailClient {
16
17
  type Options = BaseClientOptions;
17
18
  interface RequestOptions extends BaseRequestOptions {
@@ -44,4 +45,15 @@ export declare class AgentMailClient {
44
45
  get organizations(): OrganizationsClient;
45
46
  get threads(): ThreadsClient;
46
47
  get websockets(): WebsocketsClient;
48
+ /**
49
+ * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
50
+ * This is useful for making requests to endpoints not yet supported in the SDK.
51
+ * The input can be a URL string, URL object, or Request object. Relative paths are resolved against the configured base URL.
52
+ *
53
+ * @param {Request | string | URL} input - The URL, path, or Request object.
54
+ * @param {RequestInit} init - Standard fetch RequestInit options.
55
+ * @param {core.PassthroughRequest.RequestOptions} requestOptions - Per-request overrides (timeout, retries, headers, abort signal).
56
+ * @returns {Promise<Response>} A standard Response object.
57
+ */
58
+ fetch(input: Request | string | URL, init?: RequestInit, requestOptions?: core.PassthroughRequest.RequestOptions): Promise<Response>;
47
59
  }
@@ -1,5 +1,47 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
3
45
  Object.defineProperty(exports, "__esModule", { value: true });
4
46
  exports.AgentMailClient = void 0;
5
47
  const Client_js_1 = require("./api/resources/agent/client/Client.js");
@@ -15,6 +57,8 @@ const Client_js_10 = require("./api/resources/threads/client/Client.js");
15
57
  const Client_js_11 = require("./api/resources/webhooks/client/Client.js");
16
58
  const Client_js_12 = require("./api/resources/websockets/client/Client.js");
17
59
  const BaseClient_js_1 = require("./BaseClient.js");
60
+ const core = __importStar(require("./core/index.js"));
61
+ const environments = __importStar(require("./environments.js"));
18
62
  class AgentMailClient {
19
63
  constructor(options = {}) {
20
64
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
@@ -67,5 +111,35 @@ class AgentMailClient {
67
111
  var _a;
68
112
  return ((_a = this._websockets) !== null && _a !== void 0 ? _a : (this._websockets = new Client_js_12.WebsocketsClient(this._options)));
69
113
  }
114
+ /**
115
+ * Make a passthrough request using the SDK's configured auth, retry, logging, etc.
116
+ * This is useful for making requests to endpoints not yet supported in the SDK.
117
+ * The input can be a URL string, URL object, or Request object. Relative paths are resolved against the configured base URL.
118
+ *
119
+ * @param {Request | string | URL} input - The URL, path, or Request object.
120
+ * @param {RequestInit} init - Standard fetch RequestInit options.
121
+ * @param {core.PassthroughRequest.RequestOptions} requestOptions - Per-request overrides (timeout, retries, headers, abort signal).
122
+ * @returns {Promise<Response>} A standard Response object.
123
+ */
124
+ fetch(input, init, requestOptions) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ var _a;
127
+ return core.makePassthroughRequest(input, init, {
128
+ baseUrl: (_a = this._options.baseUrl) !== null && _a !== void 0 ? _a : (() => __awaiter(this, void 0, void 0, function* () {
129
+ var _a;
130
+ const env = yield core.Supplier.get(this._options.environment);
131
+ return typeof env === "string"
132
+ ? env
133
+ : ((_a = env === null || env === void 0 ? void 0 : env.http) !== null && _a !== void 0 ? _a : environments.AgentMailEnvironment.Prod.http);
134
+ })),
135
+ headers: this._options.headers,
136
+ timeoutInSeconds: this._options.timeoutInSeconds,
137
+ maxRetries: this._options.maxRetries,
138
+ fetch: this._options.fetch,
139
+ logging: this._options.logging,
140
+ getAuthHeaders: () => __awaiter(this, void 0, void 0, function* () { return (yield this._options.authProvider.getAuthRequest()).headers; }),
141
+ }, requestOptions);
142
+ });
143
+ }
70
144
  }
71
145
  exports.AgentMailClient = AgentMailClient;
@@ -11,12 +11,19 @@ export declare class AgentClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<AgentClient.Options>;
12
12
  constructor(options?: AgentClient.Options);
13
13
  /**
14
- * Create a new agent organization with an inbox and API key. A 6-digit OTP is sent to the human's email for verification.
14
+ * Create a new agent organization with an inbox and API key. This endpoint is for signing up for the first time. If you've already signed up, you're all set — just use your existing API key.
15
+ *
16
+ * A 6-digit OTP is sent to the human's email for verification.
15
17
  *
16
18
  * This endpoint is idempotent. Calling it again with the same `human_email` will rotate the API key and resend the OTP if expired.
17
19
  *
18
20
  * The returned API key has limited permissions until the organization is verified via the verify endpoint.
19
21
  *
22
+ * **CLI:**
23
+ * ```bash
24
+ * agentmail agent sign-up --human-email user@example.com --username my-agent
25
+ * ```
26
+ *
20
27
  * @param {AgentMail.AgentSignupRequest} request
21
28
  * @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
22
29
  *
@@ -37,6 +44,11 @@ export declare class AgentClient {
37
44
  *
38
45
  * The OTP expires after 24 hours and allows a maximum of 10 attempts.
39
46
  *
47
+ * **CLI:**
48
+ * ```bash
49
+ * agentmail agent verify --otp-code 123456
50
+ * ```
51
+ *
40
52
  * @param {AgentMail.AgentVerifyRequest} request
41
53
  * @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
42
54
  *
@@ -57,12 +57,19 @@ class AgentClient {
57
57
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
58
58
  }
59
59
  /**
60
- * Create a new agent organization with an inbox and API key. A 6-digit OTP is sent to the human's email for verification.
60
+ * Create a new agent organization with an inbox and API key. This endpoint is for signing up for the first time. If you've already signed up, you're all set — just use your existing API key.
61
+ *
62
+ * A 6-digit OTP is sent to the human's email for verification.
61
63
  *
62
64
  * This endpoint is idempotent. Calling it again with the same `human_email` will rotate the API key and resend the OTP if expired.
63
65
  *
64
66
  * The returned API key has limited permissions until the organization is verified via the verify endpoint.
65
67
  *
68
+ * **CLI:**
69
+ * ```bash
70
+ * agentmail agent sign-up --human-email user@example.com --username my-agent
71
+ * ```
72
+ *
66
73
  * @param {AgentMail.AgentSignupRequest} request
67
74
  * @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
68
75
  *
@@ -139,6 +146,11 @@ class AgentClient {
139
146
  *
140
147
  * The OTP expires after 24 hours and allows a maximum of 10 attempts.
141
148
  *
149
+ * **CLI:**
150
+ * ```bash
151
+ * agentmail agent verify --otp-code 123456
152
+ * ```
153
+ *
142
154
  * @param {AgentMail.AgentVerifyRequest} request
143
155
  * @param {AgentClient.RequestOptions} requestOptions - Request-specific configuration.
144
156
  *
@@ -0,0 +1,2 @@
1
+ export { AgentClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.AgentClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "AgentClient", { enumerable: true, get: function () { return Client_js_1.AgentClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -11,6 +11,11 @@ export declare class ApiKeysClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<ApiKeysClient.Options>;
12
12
  constructor(options?: ApiKeysClient.Options);
13
13
  /**
14
+ * **CLI:**
15
+ * ```bash
16
+ * agentmail api-keys list
17
+ * ```
18
+ *
14
19
  * @param {AgentMail.ListApiKeysRequest} request
15
20
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
16
21
  *
@@ -20,19 +25,27 @@ export declare class ApiKeysClient {
20
25
  list(request?: AgentMail.ListApiKeysRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListApiKeysResponse>;
21
26
  private __list;
22
27
  /**
28
+ * **CLI:**
29
+ * ```bash
30
+ * agentmail api-keys create --name "My Key"
31
+ * ```
32
+ *
23
33
  * @param {AgentMail.CreateApiKeyRequest} request
24
34
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
25
35
  *
26
36
  * @throws {@link AgentMail.ValidationError}
27
37
  *
28
38
  * @example
29
- * await client.apiKeys.create({
30
- * name: "name"
31
- * })
39
+ * await client.apiKeys.create({})
32
40
  */
33
41
  create(request: AgentMail.CreateApiKeyRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<AgentMail.CreateApiKeyResponse>;
34
42
  private __create;
35
43
  /**
44
+ * **CLI:**
45
+ * ```bash
46
+ * agentmail api-keys delete --api-key-id <api_key_id>
47
+ * ```
48
+ *
36
49
  * @param {AgentMail.ApiKeyId} api_key_id
37
50
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
38
51
  *
@@ -57,6 +57,11 @@ class ApiKeysClient {
57
57
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
58
58
  }
59
59
  /**
60
+ * **CLI:**
61
+ * ```bash
62
+ * agentmail api-keys list
63
+ * ```
64
+ *
60
65
  * @param {AgentMail.ListApiKeysRequest} request
61
66
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
62
67
  *
@@ -112,15 +117,18 @@ class ApiKeysClient {
112
117
  });
113
118
  }
114
119
  /**
120
+ * **CLI:**
121
+ * ```bash
122
+ * agentmail api-keys create --name "My Key"
123
+ * ```
124
+ *
115
125
  * @param {AgentMail.CreateApiKeyRequest} request
116
126
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
117
127
  *
118
128
  * @throws {@link AgentMail.ValidationError}
119
129
  *
120
130
  * @example
121
- * await client.apiKeys.create({
122
- * name: "name"
123
- * })
131
+ * await client.apiKeys.create({})
124
132
  */
125
133
  create(request, requestOptions) {
126
134
  return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
@@ -182,6 +190,11 @@ class ApiKeysClient {
182
190
  });
183
191
  }
184
192
  /**
193
+ * **CLI:**
194
+ * ```bash
195
+ * agentmail api-keys delete --api-key-id <api_key_id>
196
+ * ```
197
+ *
185
198
  * @param {AgentMail.ApiKeyId} api_key_id
186
199
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
187
200
  *
@@ -0,0 +1,2 @@
1
+ export { ApiKeysClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ApiKeysClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "ApiKeysClient", { enumerable: true, get: function () { return Client_js_1.ApiKeysClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -1,5 +1,5 @@
1
1
  import type * as AgentMail from "../../../index.js";
2
2
  export interface CreateApiKeyRequest {
3
- name: AgentMail.Name;
3
+ name?: AgentMail.Name;
4
4
  permissions?: AgentMail.ApiKeyPermissions;
5
5
  }
@@ -0,0 +1 @@
1
+ export * from "./index.js";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ __exportStar(require("./index.js"), exports);
@@ -11,6 +11,11 @@ export declare class DomainsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<DomainsClient.Options>;
12
12
  constructor(options?: DomainsClient.Options);
13
13
  /**
14
+ * **CLI:**
15
+ * ```bash
16
+ * agentmail domains list
17
+ * ```
18
+ *
14
19
  * @param {AgentMail.ListDomainsRequest} request
15
20
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
16
21
  *
@@ -20,6 +25,11 @@ export declare class DomainsClient {
20
25
  list(request?: AgentMail.ListDomainsRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListDomainsResponse>;
21
26
  private __list;
22
27
  /**
28
+ * **CLI:**
29
+ * ```bash
30
+ * agentmail domains retrieve --domain-id <domain_id>
31
+ * ```
32
+ *
23
33
  * @param {AgentMail.DomainId} domain_id
24
34
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
25
35
  *
@@ -31,11 +41,21 @@ export declare class DomainsClient {
31
41
  get(domain_id: AgentMail.DomainId, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
32
42
  private __get;
33
43
  /**
44
+ * **CLI:**
45
+ * ```bash
46
+ * agentmail domains get-zone-file --domain-id <domain_id>
47
+ * ```
48
+ *
34
49
  * @throws {@link AgentMail.NotFoundError}
35
50
  */
36
51
  getZoneFile(domain_id: AgentMail.DomainId, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
37
52
  private __getZoneFile;
38
53
  /**
54
+ * **CLI:**
55
+ * ```bash
56
+ * agentmail domains create --domain example.com
57
+ * ```
58
+ *
39
59
  * @param {AgentMail.CreateDomainRequest} request
40
60
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
41
61
  *
@@ -50,6 +70,11 @@ export declare class DomainsClient {
50
70
  create(request: AgentMail.CreateDomainRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
51
71
  private __create;
52
72
  /**
73
+ * **CLI:**
74
+ * ```bash
75
+ * agentmail domains update --domain-id <domain_id>
76
+ * ```
77
+ *
53
78
  * @param {AgentMail.DomainId} domain_id
54
79
  * @param {AgentMail.UpdateDomainRequest} request
55
80
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -62,6 +87,11 @@ export declare class DomainsClient {
62
87
  update(domain_id: AgentMail.DomainId, request: AgentMail.UpdateDomainRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
63
88
  private __update;
64
89
  /**
90
+ * **CLI:**
91
+ * ```bash
92
+ * agentmail domains delete --domain-id <domain_id>
93
+ * ```
94
+ *
65
95
  * @param {AgentMail.DomainId} domain_id
66
96
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
67
97
  *
@@ -73,6 +103,11 @@ export declare class DomainsClient {
73
103
  delete(domain_id: AgentMail.DomainId, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<void>;
74
104
  private __delete;
75
105
  /**
106
+ * **CLI:**
107
+ * ```bash
108
+ * agentmail domains verify --domain-id <domain_id>
109
+ * ```
110
+ *
76
111
  * @param {AgentMail.DomainId} domain_id
77
112
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
78
113
  *
@@ -57,6 +57,11 @@ class DomainsClient {
57
57
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
58
58
  }
59
59
  /**
60
+ * **CLI:**
61
+ * ```bash
62
+ * agentmail domains list
63
+ * ```
64
+ *
60
65
  * @param {AgentMail.ListDomainsRequest} request
61
66
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
62
67
  *
@@ -112,6 +117,11 @@ class DomainsClient {
112
117
  });
113
118
  }
114
119
  /**
120
+ * **CLI:**
121
+ * ```bash
122
+ * agentmail domains retrieve --domain-id <domain_id>
123
+ * ```
124
+ *
115
125
  * @param {AgentMail.DomainId} domain_id
116
126
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
117
127
  *
@@ -174,6 +184,11 @@ class DomainsClient {
174
184
  });
175
185
  }
176
186
  /**
187
+ * **CLI:**
188
+ * ```bash
189
+ * agentmail domains get-zone-file --domain-id <domain_id>
190
+ * ```
191
+ *
177
192
  * @throws {@link AgentMail.NotFoundError}
178
193
  */
179
194
  getZoneFile(domain_id, requestOptions) {
@@ -222,6 +237,11 @@ class DomainsClient {
222
237
  });
223
238
  }
224
239
  /**
240
+ * **CLI:**
241
+ * ```bash
242
+ * agentmail domains create --domain example.com
243
+ * ```
244
+ *
225
245
  * @param {AgentMail.CreateDomainRequest} request
226
246
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
227
247
  *
@@ -293,6 +313,11 @@ class DomainsClient {
293
313
  });
294
314
  }
295
315
  /**
316
+ * **CLI:**
317
+ * ```bash
318
+ * agentmail domains update --domain-id <domain_id>
319
+ * ```
320
+ *
296
321
  * @param {AgentMail.DomainId} domain_id
297
322
  * @param {AgentMail.UpdateDomainRequest} request
298
323
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -362,6 +387,11 @@ class DomainsClient {
362
387
  });
363
388
  }
364
389
  /**
390
+ * **CLI:**
391
+ * ```bash
392
+ * agentmail domains delete --domain-id <domain_id>
393
+ * ```
394
+ *
365
395
  * @param {AgentMail.DomainId} domain_id
366
396
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
367
397
  *
@@ -415,6 +445,11 @@ class DomainsClient {
415
445
  });
416
446
  }
417
447
  /**
448
+ * **CLI:**
449
+ * ```bash
450
+ * agentmail domains verify --domain-id <domain_id>
451
+ * ```
452
+ *
418
453
  * @param {AgentMail.DomainId} domain_id
419
454
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
420
455
  *
@@ -0,0 +1,2 @@
1
+ export { DomainsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.DomainsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "DomainsClient", { enumerable: true, get: function () { return Client_js_1.DomainsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);