agentmail 0.0.72 → 0.0.73

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 (266) 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/domains/client/Client.d.ts +2 -2
  4. package/dist/cjs/api/resources/domains/client/Client.js +2 -2
  5. package/dist/cjs/api/resources/domains/types/ClientId.d.ts +7 -0
  6. package/dist/cjs/api/resources/domains/types/CreateDomainRequest.d.ts +1 -2
  7. package/dist/cjs/api/resources/domains/types/Domain.d.ts +3 -3
  8. package/dist/cjs/api/resources/domains/types/DomainSummary.d.ts +2 -3
  9. package/dist/cjs/api/resources/domains/types/FeedbackEnabled.d.ts +7 -0
  10. package/dist/cjs/api/resources/domains/types/FeedbackEnabled.js +5 -0
  11. package/dist/cjs/api/resources/domains/types/index.d.ts +2 -1
  12. package/dist/cjs/api/resources/domains/types/index.js +2 -1
  13. package/dist/cjs/api/resources/inboxes/types/CreateInboxRequest.d.ts +1 -2
  14. package/dist/cjs/api/resources/inboxes/types/DisplayName.d.ts +7 -0
  15. package/dist/cjs/api/resources/inboxes/types/DisplayName.js +5 -0
  16. package/dist/cjs/api/resources/inboxes/types/Inbox.d.ts +2 -3
  17. package/dist/cjs/api/resources/inboxes/types/index.d.ts +1 -0
  18. package/dist/cjs/api/resources/inboxes/types/index.js +1 -0
  19. package/dist/cjs/api/resources/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/index.js +2 -1
  21. package/dist/cjs/api/resources/pods/client/Client.d.ts +89 -0
  22. package/dist/cjs/api/resources/pods/client/Client.js +385 -0
  23. package/dist/cjs/api/resources/pods/client/index.d.ts +2 -0
  24. package/dist/cjs/api/resources/pods/client/index.js +17 -0
  25. package/dist/cjs/api/resources/pods/client/requests/ListPodsRequest.d.ts +12 -0
  26. package/dist/cjs/api/resources/pods/client/requests/ListPodsRequest.js +5 -0
  27. package/dist/cjs/api/resources/pods/client/requests/index.d.ts +1 -0
  28. package/dist/cjs/api/resources/pods/client/requests/index.js +2 -0
  29. package/dist/cjs/api/resources/pods/index.d.ts +3 -0
  30. package/dist/cjs/api/resources/pods/index.js +19 -0
  31. package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +71 -0
  32. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +325 -0
  33. package/dist/cjs/api/resources/pods/resources/domains/client/index.d.ts +2 -0
  34. package/dist/cjs/api/resources/pods/resources/domains/client/index.js +17 -0
  35. package/dist/cjs/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.ts +16 -0
  36. package/dist/cjs/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.js +5 -0
  37. package/dist/cjs/api/resources/pods/resources/domains/client/requests/index.d.ts +1 -0
  38. package/dist/cjs/api/resources/pods/resources/domains/client/requests/index.js +2 -0
  39. package/dist/cjs/api/resources/pods/resources/domains/index.d.ts +1 -0
  40. package/dist/cjs/api/resources/pods/resources/domains/index.js +17 -0
  41. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.d.ts +56 -0
  42. package/dist/cjs/api/resources/pods/resources/drafts/client/Client.js +252 -0
  43. package/dist/cjs/api/resources/pods/resources/drafts/client/index.d.ts +2 -0
  44. package/dist/cjs/api/resources/pods/resources/drafts/client/index.js +17 -0
  45. package/dist/cjs/api/resources/pods/resources/drafts/client/requests/ListDraftsRequest.d.ts +16 -0
  46. package/dist/cjs/api/resources/pods/resources/drafts/client/requests/ListDraftsRequest.js +5 -0
  47. package/dist/cjs/api/resources/pods/resources/drafts/client/requests/index.d.ts +1 -0
  48. package/dist/cjs/api/resources/pods/resources/drafts/client/requests/index.js +2 -0
  49. package/dist/cjs/api/resources/pods/resources/drafts/index.d.ts +1 -0
  50. package/dist/cjs/api/resources/pods/resources/drafts/index.js +17 -0
  51. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +85 -0
  52. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +400 -0
  53. package/dist/cjs/api/resources/pods/resources/inboxes/client/index.d.ts +2 -0
  54. package/dist/cjs/api/resources/pods/resources/inboxes/client/index.js +17 -0
  55. package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.ts +16 -0
  56. package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.js +5 -0
  57. package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/index.d.ts +1 -0
  58. package/dist/cjs/api/resources/pods/resources/inboxes/client/requests/index.js +2 -0
  59. package/dist/cjs/api/resources/pods/resources/inboxes/index.d.ts +1 -0
  60. package/dist/cjs/api/resources/pods/resources/inboxes/index.js +17 -0
  61. package/dist/cjs/api/resources/pods/resources/index.d.ts +8 -0
  62. package/dist/cjs/api/resources/pods/resources/index.js +47 -0
  63. package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +61 -0
  64. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +310 -0
  65. package/dist/cjs/api/resources/pods/resources/threads/client/index.d.ts +2 -0
  66. package/dist/cjs/api/resources/pods/resources/threads/client/index.js +17 -0
  67. package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.ts +16 -0
  68. package/dist/cjs/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.js +5 -0
  69. package/dist/cjs/api/resources/pods/resources/threads/client/requests/index.d.ts +1 -0
  70. package/dist/cjs/api/resources/pods/resources/threads/client/requests/index.js +2 -0
  71. package/dist/cjs/api/resources/pods/resources/threads/index.d.ts +1 -0
  72. package/dist/cjs/api/resources/pods/resources/threads/index.js +17 -0
  73. package/dist/cjs/api/resources/pods/types/ClientId.d.ts +7 -0
  74. package/dist/cjs/api/resources/pods/types/ClientId.js +5 -0
  75. package/dist/cjs/api/resources/pods/types/CreatePodRequest.d.ts +8 -0
  76. package/dist/cjs/api/resources/pods/types/CreatePodRequest.js +5 -0
  77. package/dist/cjs/api/resources/pods/types/ListPodsResponse.d.ts +11 -0
  78. package/dist/cjs/api/resources/pods/types/ListPodsResponse.js +5 -0
  79. package/dist/cjs/api/resources/pods/types/Name.d.ts +7 -0
  80. package/dist/cjs/api/resources/pods/types/Name.js +5 -0
  81. package/dist/cjs/api/resources/pods/types/Pod.d.ts +13 -0
  82. package/dist/cjs/api/resources/pods/types/Pod.js +5 -0
  83. package/dist/cjs/api/resources/pods/types/PodId.d.ts +7 -0
  84. package/dist/cjs/api/resources/pods/types/PodId.js +5 -0
  85. package/dist/cjs/api/resources/pods/types/index.d.ts +6 -0
  86. package/dist/cjs/api/resources/pods/types/index.js +22 -0
  87. package/dist/cjs/api/resources/threads/client/Client.d.ts +0 -11
  88. package/dist/cjs/api/resources/threads/client/Client.js +0 -63
  89. package/dist/cjs/serialization/resources/domains/types/ClientId.d.ts +10 -0
  90. package/dist/cjs/serialization/resources/domains/types/ClientId.js +41 -0
  91. package/dist/cjs/serialization/resources/domains/types/CreateDomainRequest.d.ts +2 -1
  92. package/dist/cjs/serialization/resources/domains/types/CreateDomainRequest.js +2 -1
  93. package/dist/cjs/serialization/resources/domains/types/Domain.d.ts +6 -3
  94. package/dist/cjs/serialization/resources/domains/types/Domain.js +6 -3
  95. package/dist/cjs/serialization/resources/domains/types/DomainSummary.d.ts +4 -3
  96. package/dist/cjs/serialization/resources/domains/types/DomainSummary.js +4 -3
  97. package/dist/cjs/serialization/resources/domains/types/FeedbackEnabled.d.ts +10 -0
  98. package/dist/cjs/serialization/resources/domains/types/FeedbackEnabled.js +41 -0
  99. package/dist/cjs/serialization/resources/domains/types/index.d.ts +2 -1
  100. package/dist/cjs/serialization/resources/domains/types/index.js +2 -1
  101. package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.d.ts +2 -1
  102. package/dist/cjs/serialization/resources/inboxes/types/CreateInboxRequest.js +2 -1
  103. package/dist/cjs/serialization/resources/inboxes/types/DisplayName.d.ts +10 -0
  104. package/dist/cjs/serialization/resources/inboxes/types/DisplayName.js +41 -0
  105. package/dist/cjs/serialization/resources/inboxes/types/Inbox.d.ts +3 -2
  106. package/dist/cjs/serialization/resources/inboxes/types/Inbox.js +3 -2
  107. package/dist/cjs/serialization/resources/inboxes/types/index.d.ts +1 -0
  108. package/dist/cjs/serialization/resources/inboxes/types/index.js +1 -0
  109. package/dist/cjs/serialization/resources/index.d.ts +1 -0
  110. package/dist/cjs/serialization/resources/index.js +2 -1
  111. package/dist/cjs/serialization/resources/pods/index.d.ts +1 -0
  112. package/dist/cjs/serialization/resources/pods/index.js +17 -0
  113. package/dist/cjs/serialization/resources/pods/types/ClientId.d.ts +10 -0
  114. package/dist/cjs/serialization/resources/pods/types/ClientId.js +41 -0
  115. package/dist/cjs/serialization/resources/pods/types/CreatePodRequest.d.ts +15 -0
  116. package/dist/cjs/serialization/resources/pods/types/CreatePodRequest.js +46 -0
  117. package/dist/cjs/serialization/resources/pods/types/ListPodsResponse.d.ts +19 -0
  118. package/dist/cjs/serialization/resources/pods/types/ListPodsResponse.js +50 -0
  119. package/dist/cjs/serialization/resources/pods/types/Name.d.ts +10 -0
  120. package/dist/cjs/serialization/resources/pods/types/Name.js +41 -0
  121. package/dist/cjs/serialization/resources/pods/types/Pod.d.ts +19 -0
  122. package/dist/cjs/serialization/resources/{domains/types/CreateDomainResponse.js → pods/types/Pod.js} +8 -11
  123. package/dist/cjs/serialization/resources/pods/types/PodId.d.ts +10 -0
  124. package/dist/cjs/serialization/resources/pods/types/PodId.js +41 -0
  125. package/dist/cjs/serialization/resources/pods/types/index.d.ts +6 -0
  126. package/dist/cjs/serialization/resources/pods/types/index.js +22 -0
  127. package/dist/cjs/version.d.ts +1 -1
  128. package/dist/cjs/version.js +1 -1
  129. package/dist/esm/Client.d.mts +3 -0
  130. package/dist/esm/Client.mjs +7 -2
  131. package/dist/esm/api/resources/domains/client/Client.d.mts +2 -2
  132. package/dist/esm/api/resources/domains/client/Client.mjs +2 -2
  133. package/dist/esm/api/resources/domains/types/ClientId.d.mts +7 -0
  134. package/dist/esm/api/resources/domains/types/CreateDomainRequest.d.mts +1 -2
  135. package/dist/esm/api/resources/domains/types/Domain.d.mts +3 -3
  136. package/dist/esm/api/resources/domains/types/DomainSummary.d.mts +2 -3
  137. package/dist/esm/api/resources/domains/types/FeedbackEnabled.d.mts +7 -0
  138. package/dist/esm/api/resources/domains/types/FeedbackEnabled.mjs +4 -0
  139. package/dist/esm/api/resources/domains/types/index.d.mts +2 -1
  140. package/dist/esm/api/resources/domains/types/index.mjs +2 -1
  141. package/dist/esm/api/resources/inboxes/types/CreateInboxRequest.d.mts +1 -2
  142. package/dist/esm/api/resources/inboxes/types/DisplayName.d.mts +7 -0
  143. package/dist/esm/api/resources/inboxes/types/DisplayName.mjs +4 -0
  144. package/dist/esm/api/resources/inboxes/types/Inbox.d.mts +2 -3
  145. package/dist/esm/api/resources/inboxes/types/index.d.mts +1 -0
  146. package/dist/esm/api/resources/inboxes/types/index.mjs +1 -0
  147. package/dist/esm/api/resources/index.d.mts +1 -0
  148. package/dist/esm/api/resources/index.mjs +1 -0
  149. package/dist/esm/api/resources/pods/client/Client.d.mts +89 -0
  150. package/dist/esm/api/resources/pods/client/Client.mjs +348 -0
  151. package/dist/esm/api/resources/pods/client/index.d.mts +2 -0
  152. package/dist/esm/api/resources/pods/client/index.mjs +1 -0
  153. package/dist/esm/api/resources/pods/client/requests/ListPodsRequest.d.mts +12 -0
  154. package/dist/esm/api/resources/pods/client/requests/ListPodsRequest.mjs +4 -0
  155. package/dist/esm/api/resources/pods/client/requests/index.d.mts +1 -0
  156. package/dist/esm/api/resources/pods/client/requests/index.mjs +1 -0
  157. package/dist/esm/api/resources/pods/index.d.mts +3 -0
  158. package/dist/esm/api/resources/pods/index.mjs +3 -0
  159. package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +71 -0
  160. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +288 -0
  161. package/dist/esm/api/resources/pods/resources/domains/client/index.d.mts +2 -0
  162. package/dist/esm/api/resources/pods/resources/domains/client/index.mjs +1 -0
  163. package/dist/esm/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.d.mts +16 -0
  164. package/dist/esm/api/resources/pods/resources/domains/client/requests/ListDomainsRequest.mjs +4 -0
  165. package/dist/esm/api/resources/pods/resources/domains/client/requests/index.d.mts +1 -0
  166. package/dist/esm/api/resources/pods/resources/domains/client/requests/index.mjs +1 -0
  167. package/dist/esm/api/resources/pods/resources/domains/index.d.mts +1 -0
  168. package/dist/esm/api/resources/pods/resources/domains/index.mjs +1 -0
  169. package/dist/esm/api/resources/pods/resources/drafts/client/Client.d.mts +56 -0
  170. package/dist/esm/api/resources/pods/resources/drafts/client/Client.mjs +215 -0
  171. package/dist/esm/api/resources/pods/resources/drafts/client/index.d.mts +2 -0
  172. package/dist/esm/api/resources/pods/resources/drafts/client/index.mjs +1 -0
  173. package/dist/esm/api/resources/pods/resources/drafts/client/requests/ListDraftsRequest.d.mts +16 -0
  174. package/dist/esm/api/resources/pods/resources/drafts/client/requests/ListDraftsRequest.mjs +4 -0
  175. package/dist/esm/api/resources/pods/resources/drafts/client/requests/index.d.mts +1 -0
  176. package/dist/esm/api/resources/pods/resources/drafts/client/requests/index.mjs +1 -0
  177. package/dist/esm/api/resources/pods/resources/drafts/index.d.mts +1 -0
  178. package/dist/esm/api/resources/pods/resources/drafts/index.mjs +1 -0
  179. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +85 -0
  180. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +363 -0
  181. package/dist/esm/api/resources/pods/resources/inboxes/client/index.d.mts +2 -0
  182. package/dist/esm/api/resources/pods/resources/inboxes/client/index.mjs +1 -0
  183. package/dist/esm/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.d.mts +16 -0
  184. package/dist/esm/api/resources/pods/resources/inboxes/client/requests/ListInboxesRequest.mjs +4 -0
  185. package/dist/esm/api/resources/pods/resources/inboxes/client/requests/index.d.mts +1 -0
  186. package/dist/esm/api/resources/pods/resources/inboxes/client/requests/index.mjs +1 -0
  187. package/dist/esm/api/resources/pods/resources/inboxes/index.d.mts +1 -0
  188. package/dist/esm/api/resources/pods/resources/inboxes/index.mjs +1 -0
  189. package/dist/esm/api/resources/pods/resources/index.d.mts +8 -0
  190. package/dist/esm/api/resources/pods/resources/index.mjs +8 -0
  191. package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +61 -0
  192. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +273 -0
  193. package/dist/esm/api/resources/pods/resources/threads/client/index.d.mts +2 -0
  194. package/dist/esm/api/resources/pods/resources/threads/client/index.mjs +1 -0
  195. package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.d.mts +16 -0
  196. package/dist/esm/api/resources/pods/resources/threads/client/requests/ListThreadsRequest.mjs +4 -0
  197. package/dist/esm/api/resources/pods/resources/threads/client/requests/index.d.mts +1 -0
  198. package/dist/esm/api/resources/pods/resources/threads/client/requests/index.mjs +1 -0
  199. package/dist/esm/api/resources/pods/resources/threads/index.d.mts +1 -0
  200. package/dist/esm/api/resources/pods/resources/threads/index.mjs +1 -0
  201. package/dist/esm/api/resources/pods/types/ClientId.d.mts +7 -0
  202. package/dist/esm/api/resources/pods/types/ClientId.mjs +4 -0
  203. package/dist/esm/api/resources/pods/types/CreatePodRequest.d.mts +8 -0
  204. package/dist/esm/api/resources/pods/types/CreatePodRequest.mjs +4 -0
  205. package/dist/esm/api/resources/pods/types/ListPodsResponse.d.mts +11 -0
  206. package/dist/esm/api/resources/pods/types/ListPodsResponse.mjs +4 -0
  207. package/dist/esm/api/resources/pods/types/Name.d.mts +7 -0
  208. package/dist/esm/api/resources/pods/types/Name.mjs +4 -0
  209. package/dist/esm/api/resources/pods/types/Pod.d.mts +13 -0
  210. package/dist/esm/api/resources/pods/types/Pod.mjs +4 -0
  211. package/dist/esm/api/resources/pods/types/PodId.d.mts +7 -0
  212. package/dist/esm/api/resources/pods/types/PodId.mjs +4 -0
  213. package/dist/esm/api/resources/pods/types/index.d.mts +6 -0
  214. package/dist/esm/api/resources/pods/types/index.mjs +6 -0
  215. package/dist/esm/api/resources/threads/client/Client.d.mts +0 -11
  216. package/dist/esm/api/resources/threads/client/Client.mjs +0 -63
  217. package/dist/esm/serialization/resources/domains/types/ClientId.d.mts +10 -0
  218. package/dist/esm/serialization/resources/domains/types/ClientId.mjs +5 -0
  219. package/dist/esm/serialization/resources/domains/types/CreateDomainRequest.d.mts +2 -1
  220. package/dist/esm/serialization/resources/domains/types/CreateDomainRequest.mjs +2 -1
  221. package/dist/esm/serialization/resources/domains/types/Domain.d.mts +6 -3
  222. package/dist/esm/serialization/resources/domains/types/Domain.mjs +6 -3
  223. package/dist/esm/serialization/resources/domains/types/DomainSummary.d.mts +4 -3
  224. package/dist/esm/serialization/resources/domains/types/DomainSummary.mjs +4 -3
  225. package/dist/esm/serialization/resources/domains/types/FeedbackEnabled.d.mts +10 -0
  226. package/dist/esm/serialization/resources/domains/types/FeedbackEnabled.mjs +5 -0
  227. package/dist/esm/serialization/resources/domains/types/index.d.mts +2 -1
  228. package/dist/esm/serialization/resources/domains/types/index.mjs +2 -1
  229. package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.d.mts +2 -1
  230. package/dist/esm/serialization/resources/inboxes/types/CreateInboxRequest.mjs +2 -1
  231. package/dist/esm/serialization/resources/inboxes/types/DisplayName.d.mts +10 -0
  232. package/dist/esm/serialization/resources/inboxes/types/DisplayName.mjs +5 -0
  233. package/dist/esm/serialization/resources/inboxes/types/Inbox.d.mts +3 -2
  234. package/dist/esm/serialization/resources/inboxes/types/Inbox.mjs +3 -2
  235. package/dist/esm/serialization/resources/inboxes/types/index.d.mts +1 -0
  236. package/dist/esm/serialization/resources/inboxes/types/index.mjs +1 -0
  237. package/dist/esm/serialization/resources/index.d.mts +1 -0
  238. package/dist/esm/serialization/resources/index.mjs +1 -0
  239. package/dist/esm/serialization/resources/pods/index.d.mts +1 -0
  240. package/dist/esm/serialization/resources/pods/index.mjs +1 -0
  241. package/dist/esm/serialization/resources/pods/types/ClientId.d.mts +10 -0
  242. package/dist/esm/serialization/resources/pods/types/ClientId.mjs +5 -0
  243. package/dist/esm/serialization/resources/pods/types/CreatePodRequest.d.mts +15 -0
  244. package/dist/esm/serialization/resources/pods/types/CreatePodRequest.mjs +10 -0
  245. package/dist/esm/serialization/resources/pods/types/ListPodsResponse.d.mts +19 -0
  246. package/dist/esm/serialization/resources/pods/types/ListPodsResponse.mjs +14 -0
  247. package/dist/esm/serialization/resources/pods/types/Name.d.mts +10 -0
  248. package/dist/esm/serialization/resources/pods/types/Name.mjs +5 -0
  249. package/dist/esm/serialization/resources/pods/types/Pod.d.mts +19 -0
  250. package/dist/esm/serialization/resources/pods/types/Pod.mjs +14 -0
  251. package/dist/esm/serialization/resources/pods/types/PodId.d.mts +10 -0
  252. package/dist/esm/serialization/resources/pods/types/PodId.mjs +5 -0
  253. package/dist/esm/serialization/resources/pods/types/index.d.mts +6 -0
  254. package/dist/esm/serialization/resources/pods/types/index.mjs +6 -0
  255. package/dist/esm/version.d.mts +1 -1
  256. package/dist/esm/version.mjs +1 -1
  257. package/dist/llms-full.txt +4305 -207
  258. package/package.json +1 -1
  259. package/reference.md +910 -20
  260. package/dist/cjs/api/resources/domains/types/CreateDomainResponse.d.ts +0 -18
  261. package/dist/cjs/serialization/resources/domains/types/CreateDomainResponse.d.ts +0 -22
  262. package/dist/esm/api/resources/domains/types/CreateDomainResponse.d.mts +0 -18
  263. package/dist/esm/serialization/resources/domains/types/CreateDomainResponse.d.mts +0 -22
  264. package/dist/esm/serialization/resources/domains/types/CreateDomainResponse.mjs +0 -17
  265. /package/dist/cjs/api/resources/domains/types/{CreateDomainResponse.js → ClientId.js} +0 -0
  266. /package/dist/esm/api/resources/domains/types/{CreateDomainResponse.mjs → ClientId.mjs} +0 -0
@@ -0,0 +1,85 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments.mjs";
5
+ import * as core from "../../../../../../core/index.mjs";
6
+ import * as AgentMail from "../../../../../index.mjs";
7
+ export declare namespace Inboxes {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.AgentMailEnvironment | environments.AgentMailEnvironmentUrls>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ apiKey?: core.Supplier<core.BearerToken | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ }
16
+ interface RequestOptions {
17
+ /** The maximum time to wait for a response in seconds. */
18
+ timeoutInSeconds?: number;
19
+ /** The number of times to retry the request. Defaults to 2. */
20
+ maxRetries?: number;
21
+ /** A hook to abort the request. */
22
+ abortSignal?: AbortSignal;
23
+ /** Additional query string parameters to include in the request. */
24
+ queryParams?: Record<string, unknown>;
25
+ /** Additional headers to include in the request. */
26
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
27
+ }
28
+ }
29
+ export declare class Inboxes {
30
+ protected readonly _options: Inboxes.Options;
31
+ constructor(_options?: Inboxes.Options);
32
+ /**
33
+ * @param {AgentMail.pods.PodId} podId
34
+ * @param {AgentMail.pods.ListInboxesRequest} request
35
+ * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link AgentMail.NotFoundError}
38
+ *
39
+ * @example
40
+ * await client.pods.inboxes.list("pod_id")
41
+ */
42
+ list(podId: AgentMail.pods.PodId, request?: AgentMail.pods.ListInboxesRequest, requestOptions?: Inboxes.RequestOptions): Promise<core.Page<AgentMail.inboxes.Inbox>>;
43
+ /**
44
+ * @param {AgentMail.pods.PodId} podId
45
+ * @param {AgentMail.inboxes.InboxId} inboxId
46
+ * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
47
+ *
48
+ * @throws {@link AgentMail.NotFoundError}
49
+ *
50
+ * @example
51
+ * await client.pods.inboxes.get("pod_id", "inbox_id")
52
+ */
53
+ get(podId: AgentMail.pods.PodId, inboxId: AgentMail.inboxes.InboxId, requestOptions?: Inboxes.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
54
+ private __get;
55
+ /**
56
+ * @param {AgentMail.pods.PodId} podId
57
+ * @param {AgentMail.inboxes.CreateInboxRequest} request
58
+ * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
59
+ *
60
+ * @throws {@link AgentMail.ValidationError}
61
+ *
62
+ * @example
63
+ * await client.pods.inboxes.create("pod_id", {
64
+ * username: undefined,
65
+ * domain: undefined,
66
+ * displayName: undefined,
67
+ * clientId: undefined
68
+ * })
69
+ */
70
+ create(podId: AgentMail.pods.PodId, request: AgentMail.inboxes.CreateInboxRequest, requestOptions?: Inboxes.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
71
+ private __create;
72
+ /**
73
+ * @param {AgentMail.pods.PodId} podId
74
+ * @param {AgentMail.inboxes.InboxId} inboxId
75
+ * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @throws {@link AgentMail.NotFoundError}
78
+ *
79
+ * @example
80
+ * await client.pods.inboxes.delete("pod_id", "inbox_id")
81
+ */
82
+ delete(podId: AgentMail.pods.PodId, inboxId: AgentMail.inboxes.InboxId, requestOptions?: Inboxes.RequestOptions): core.HttpResponsePromise<void>;
83
+ private __delete;
84
+ protected _getAuthorizationHeader(): Promise<string>;
85
+ }
@@ -0,0 +1,363 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
+ return new (P || (P = Promise))(function (resolve, reject) {
7
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11
+ });
12
+ };
13
+ import * as environments from "../../../../../../environments.mjs";
14
+ import * as core from "../../../../../../core/index.mjs";
15
+ import * as AgentMail from "../../../../../index.mjs";
16
+ import * as serializers from "../../../../../../serialization/index.mjs";
17
+ import { toJson } from "../../../../../../core/json.mjs";
18
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
19
+ import * as errors from "../../../../../../errors/index.mjs";
20
+ export class Inboxes {
21
+ constructor(_options = {}) {
22
+ this._options = _options;
23
+ }
24
+ /**
25
+ * @param {AgentMail.pods.PodId} podId
26
+ * @param {AgentMail.pods.ListInboxesRequest} request
27
+ * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @throws {@link AgentMail.NotFoundError}
30
+ *
31
+ * @example
32
+ * await client.pods.inboxes.list("pod_id")
33
+ */
34
+ list(podId_1) {
35
+ return __awaiter(this, arguments, void 0, function* (podId, request = {}, requestOptions) {
36
+ const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
37
+ var _a, _b, _c;
38
+ const { limit, pageToken, labels, before, after, ascending } = request;
39
+ const _queryParams = {};
40
+ if (limit != null) {
41
+ _queryParams["limit"] = limit.toString();
42
+ }
43
+ if (pageToken != null) {
44
+ _queryParams["page_token"] = pageToken;
45
+ }
46
+ if (labels != null) {
47
+ _queryParams["labels"] = toJson(serializers.Labels.jsonOrThrow(labels, {
48
+ unrecognizedObjectKeys: "strip",
49
+ omitUndefined: true,
50
+ }));
51
+ }
52
+ if (before != null) {
53
+ _queryParams["before"] = before.toISOString();
54
+ }
55
+ if (after != null) {
56
+ _queryParams["after"] = after.toISOString();
57
+ }
58
+ if (ascending != null) {
59
+ _queryParams["ascending"] = ascending.toString();
60
+ }
61
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
62
+ const _response = yield core.fetcher({
63
+ 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/pods/${encodeURIComponent(serializers.pods.PodId.jsonOrThrow(podId, { omitUndefined: true }))}/inboxes`),
64
+ method: "GET",
65
+ headers: _headers,
66
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
67
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
68
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
69
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
70
+ });
71
+ if (_response.ok) {
72
+ return {
73
+ data: serializers.inboxes.ListInboxesResponse.parseOrThrow(_response.body, {
74
+ unrecognizedObjectKeys: "passthrough",
75
+ allowUnrecognizedUnionMembers: true,
76
+ allowUnrecognizedEnumValues: true,
77
+ skipValidation: true,
78
+ breadcrumbsPrefix: ["response"],
79
+ }),
80
+ rawResponse: _response.rawResponse,
81
+ };
82
+ }
83
+ if (_response.error.reason === "status-code") {
84
+ switch (_response.error.statusCode) {
85
+ case 404:
86
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
87
+ unrecognizedObjectKeys: "passthrough",
88
+ allowUnrecognizedUnionMembers: true,
89
+ allowUnrecognizedEnumValues: true,
90
+ skipValidation: true,
91
+ breadcrumbsPrefix: ["response"],
92
+ }), _response.rawResponse);
93
+ default:
94
+ throw new errors.AgentMailError({
95
+ statusCode: _response.error.statusCode,
96
+ body: _response.error.body,
97
+ rawResponse: _response.rawResponse,
98
+ });
99
+ }
100
+ }
101
+ switch (_response.error.reason) {
102
+ case "non-json":
103
+ throw new errors.AgentMailError({
104
+ statusCode: _response.error.statusCode,
105
+ body: _response.error.rawBody,
106
+ rawResponse: _response.rawResponse,
107
+ });
108
+ case "timeout":
109
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/pods/{pod_id}/inboxes.");
110
+ case "unknown":
111
+ throw new errors.AgentMailError({
112
+ message: _response.error.errorMessage,
113
+ rawResponse: _response.rawResponse,
114
+ });
115
+ }
116
+ }));
117
+ const dataWithRawResponse = yield list(request).withRawResponse();
118
+ return new core.Pageable({
119
+ response: dataWithRawResponse.data,
120
+ rawResponse: dataWithRawResponse.rawResponse,
121
+ hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.nextPageToken) != null &&
122
+ !(typeof (response === null || response === void 0 ? void 0 : response.nextPageToken) === "string" && (response === null || response === void 0 ? void 0 : response.nextPageToken) === ""),
123
+ getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.inboxes) !== null && _a !== void 0 ? _a : []; },
124
+ loadPage: (response) => {
125
+ return list(core.setObjectProperty(request, "pageToken", response === null || response === void 0 ? void 0 : response.nextPageToken));
126
+ },
127
+ });
128
+ });
129
+ }
130
+ /**
131
+ * @param {AgentMail.pods.PodId} podId
132
+ * @param {AgentMail.inboxes.InboxId} inboxId
133
+ * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
134
+ *
135
+ * @throws {@link AgentMail.NotFoundError}
136
+ *
137
+ * @example
138
+ * await client.pods.inboxes.get("pod_id", "inbox_id")
139
+ */
140
+ get(podId, inboxId, requestOptions) {
141
+ return core.HttpResponsePromise.fromPromise(this.__get(podId, inboxId, requestOptions));
142
+ }
143
+ __get(podId, inboxId, requestOptions) {
144
+ return __awaiter(this, void 0, void 0, function* () {
145
+ var _a, _b, _c;
146
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
147
+ const _response = yield core.fetcher({
148
+ 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/pods/${encodeURIComponent(serializers.pods.PodId.jsonOrThrow(podId, { omitUndefined: true }))}/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}`),
149
+ method: "GET",
150
+ headers: _headers,
151
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
152
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
153
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
154
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
155
+ });
156
+ if (_response.ok) {
157
+ return {
158
+ data: serializers.inboxes.Inbox.parseOrThrow(_response.body, {
159
+ unrecognizedObjectKeys: "passthrough",
160
+ allowUnrecognizedUnionMembers: true,
161
+ allowUnrecognizedEnumValues: true,
162
+ skipValidation: true,
163
+ breadcrumbsPrefix: ["response"],
164
+ }),
165
+ rawResponse: _response.rawResponse,
166
+ };
167
+ }
168
+ if (_response.error.reason === "status-code") {
169
+ switch (_response.error.statusCode) {
170
+ case 404:
171
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
172
+ unrecognizedObjectKeys: "passthrough",
173
+ allowUnrecognizedUnionMembers: true,
174
+ allowUnrecognizedEnumValues: true,
175
+ skipValidation: true,
176
+ breadcrumbsPrefix: ["response"],
177
+ }), _response.rawResponse);
178
+ default:
179
+ throw new errors.AgentMailError({
180
+ statusCode: _response.error.statusCode,
181
+ body: _response.error.body,
182
+ rawResponse: _response.rawResponse,
183
+ });
184
+ }
185
+ }
186
+ switch (_response.error.reason) {
187
+ case "non-json":
188
+ throw new errors.AgentMailError({
189
+ statusCode: _response.error.statusCode,
190
+ body: _response.error.rawBody,
191
+ rawResponse: _response.rawResponse,
192
+ });
193
+ case "timeout":
194
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/pods/{pod_id}/inboxes/{inbox_id}.");
195
+ case "unknown":
196
+ throw new errors.AgentMailError({
197
+ message: _response.error.errorMessage,
198
+ rawResponse: _response.rawResponse,
199
+ });
200
+ }
201
+ });
202
+ }
203
+ /**
204
+ * @param {AgentMail.pods.PodId} podId
205
+ * @param {AgentMail.inboxes.CreateInboxRequest} request
206
+ * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
207
+ *
208
+ * @throws {@link AgentMail.ValidationError}
209
+ *
210
+ * @example
211
+ * await client.pods.inboxes.create("pod_id", {
212
+ * username: undefined,
213
+ * domain: undefined,
214
+ * displayName: undefined,
215
+ * clientId: undefined
216
+ * })
217
+ */
218
+ create(podId, request, requestOptions) {
219
+ return core.HttpResponsePromise.fromPromise(this.__create(podId, request, requestOptions));
220
+ }
221
+ __create(podId, request, requestOptions) {
222
+ return __awaiter(this, void 0, void 0, function* () {
223
+ var _a, _b, _c;
224
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
225
+ const _response = yield core.fetcher({
226
+ 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/pods/${encodeURIComponent(serializers.pods.PodId.jsonOrThrow(podId, { omitUndefined: true }))}/inboxes`),
227
+ method: "POST",
228
+ headers: _headers,
229
+ contentType: "application/json",
230
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
231
+ requestType: "json",
232
+ body: serializers.inboxes.CreateInboxRequest.jsonOrThrow(request, {
233
+ unrecognizedObjectKeys: "strip",
234
+ omitUndefined: true,
235
+ }),
236
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
237
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
238
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
239
+ });
240
+ if (_response.ok) {
241
+ return {
242
+ data: serializers.inboxes.Inbox.parseOrThrow(_response.body, {
243
+ unrecognizedObjectKeys: "passthrough",
244
+ allowUnrecognizedUnionMembers: true,
245
+ allowUnrecognizedEnumValues: true,
246
+ skipValidation: true,
247
+ breadcrumbsPrefix: ["response"],
248
+ }),
249
+ rawResponse: _response.rawResponse,
250
+ };
251
+ }
252
+ if (_response.error.reason === "status-code") {
253
+ switch (_response.error.statusCode) {
254
+ case 400:
255
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
256
+ unrecognizedObjectKeys: "passthrough",
257
+ allowUnrecognizedUnionMembers: true,
258
+ allowUnrecognizedEnumValues: true,
259
+ skipValidation: true,
260
+ breadcrumbsPrefix: ["response"],
261
+ }), _response.rawResponse);
262
+ default:
263
+ throw new errors.AgentMailError({
264
+ statusCode: _response.error.statusCode,
265
+ body: _response.error.body,
266
+ rawResponse: _response.rawResponse,
267
+ });
268
+ }
269
+ }
270
+ switch (_response.error.reason) {
271
+ case "non-json":
272
+ throw new errors.AgentMailError({
273
+ statusCode: _response.error.statusCode,
274
+ body: _response.error.rawBody,
275
+ rawResponse: _response.rawResponse,
276
+ });
277
+ case "timeout":
278
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling POST /v0/pods/{pod_id}/inboxes.");
279
+ case "unknown":
280
+ throw new errors.AgentMailError({
281
+ message: _response.error.errorMessage,
282
+ rawResponse: _response.rawResponse,
283
+ });
284
+ }
285
+ });
286
+ }
287
+ /**
288
+ * @param {AgentMail.pods.PodId} podId
289
+ * @param {AgentMail.inboxes.InboxId} inboxId
290
+ * @param {Inboxes.RequestOptions} requestOptions - Request-specific configuration.
291
+ *
292
+ * @throws {@link AgentMail.NotFoundError}
293
+ *
294
+ * @example
295
+ * await client.pods.inboxes.delete("pod_id", "inbox_id")
296
+ */
297
+ delete(podId, inboxId, requestOptions) {
298
+ return core.HttpResponsePromise.fromPromise(this.__delete(podId, inboxId, requestOptions));
299
+ }
300
+ __delete(podId, inboxId, requestOptions) {
301
+ return __awaiter(this, void 0, void 0, function* () {
302
+ var _a, _b, _c;
303
+ let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
304
+ const _response = yield core.fetcher({
305
+ 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/pods/${encodeURIComponent(serializers.pods.PodId.jsonOrThrow(podId, { omitUndefined: true }))}/inboxes/${encodeURIComponent(serializers.inboxes.InboxId.jsonOrThrow(inboxId, { omitUndefined: true }))}`),
306
+ method: "DELETE",
307
+ headers: _headers,
308
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
309
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
310
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
311
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
312
+ });
313
+ if (_response.ok) {
314
+ return { data: undefined, rawResponse: _response.rawResponse };
315
+ }
316
+ if (_response.error.reason === "status-code") {
317
+ switch (_response.error.statusCode) {
318
+ case 404:
319
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
320
+ unrecognizedObjectKeys: "passthrough",
321
+ allowUnrecognizedUnionMembers: true,
322
+ allowUnrecognizedEnumValues: true,
323
+ skipValidation: true,
324
+ breadcrumbsPrefix: ["response"],
325
+ }), _response.rawResponse);
326
+ default:
327
+ throw new errors.AgentMailError({
328
+ statusCode: _response.error.statusCode,
329
+ body: _response.error.body,
330
+ rawResponse: _response.rawResponse,
331
+ });
332
+ }
333
+ }
334
+ switch (_response.error.reason) {
335
+ case "non-json":
336
+ throw new errors.AgentMailError({
337
+ statusCode: _response.error.statusCode,
338
+ body: _response.error.rawBody,
339
+ rawResponse: _response.rawResponse,
340
+ });
341
+ case "timeout":
342
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling DELETE /v0/pods/{pod_id}/inboxes/{inbox_id}.");
343
+ case "unknown":
344
+ throw new errors.AgentMailError({
345
+ message: _response.error.errorMessage,
346
+ rawResponse: _response.rawResponse,
347
+ });
348
+ }
349
+ });
350
+ }
351
+ _getAuthorizationHeader() {
352
+ return __awaiter(this, void 0, void 0, function* () {
353
+ var _a;
354
+ const bearer = (_a = (yield core.Supplier.get(this._options.apiKey))) !== null && _a !== void 0 ? _a : process === null || process === void 0 ? void 0 : process.env["AGENTMAIL_API_KEY"];
355
+ if (bearer == null) {
356
+ throw new errors.AgentMailError({
357
+ message: "Please specify a bearer by either passing it in to the constructor or initializing a AGENTMAIL_API_KEY environment variable",
358
+ });
359
+ }
360
+ return `Bearer ${bearer}`;
361
+ });
362
+ }
363
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AgentMail from "../../../../../../index.mjs";
5
+ /**
6
+ * @example
7
+ * {}
8
+ */
9
+ export interface ListInboxesRequest {
10
+ limit?: AgentMail.Limit;
11
+ pageToken?: AgentMail.PageToken;
12
+ labels?: AgentMail.Labels;
13
+ before?: AgentMail.Before;
14
+ after?: AgentMail.After;
15
+ ascending?: AgentMail.Ascending;
16
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1 @@
1
+ export { type ListInboxesRequest } from "./ListInboxesRequest.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1,8 @@
1
+ export * as domains from "./domains/index.mjs";
2
+ export * as drafts from "./drafts/index.mjs";
3
+ export * as inboxes from "./inboxes/index.mjs";
4
+ export * as threads from "./threads/index.mjs";
5
+ export * from "./domains/client/requests/index.mjs";
6
+ export * from "./drafts/client/requests/index.mjs";
7
+ export * from "./inboxes/client/requests/index.mjs";
8
+ export * from "./threads/client/requests/index.mjs";
@@ -0,0 +1,8 @@
1
+ export * as domains from "./domains/index.mjs";
2
+ export * as drafts from "./drafts/index.mjs";
3
+ export * as inboxes from "./inboxes/index.mjs";
4
+ export * as threads from "./threads/index.mjs";
5
+ export * from "./domains/client/requests/index.mjs";
6
+ export * from "./drafts/client/requests/index.mjs";
7
+ export * from "./inboxes/client/requests/index.mjs";
8
+ export * from "./threads/client/requests/index.mjs";
@@ -0,0 +1,61 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments.mjs";
5
+ import * as core from "../../../../../../core/index.mjs";
6
+ import * as AgentMail from "../../../../../index.mjs";
7
+ export declare namespace Threads {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.AgentMailEnvironment | environments.AgentMailEnvironmentUrls>;
10
+ /** Specify a custom URL to connect the client to. */
11
+ baseUrl?: core.Supplier<string>;
12
+ apiKey?: core.Supplier<core.BearerToken | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
15
+ }
16
+ interface RequestOptions {
17
+ /** The maximum time to wait for a response in seconds. */
18
+ timeoutInSeconds?: number;
19
+ /** The number of times to retry the request. Defaults to 2. */
20
+ maxRetries?: number;
21
+ /** A hook to abort the request. */
22
+ abortSignal?: AbortSignal;
23
+ /** Additional query string parameters to include in the request. */
24
+ queryParams?: Record<string, unknown>;
25
+ /** Additional headers to include in the request. */
26
+ headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
27
+ }
28
+ }
29
+ export declare class Threads {
30
+ protected readonly _options: Threads.Options;
31
+ constructor(_options?: Threads.Options);
32
+ /**
33
+ * @param {AgentMail.pods.PodId} podId
34
+ * @param {AgentMail.pods.ListThreadsRequest} request
35
+ * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
36
+ *
37
+ * @throws {@link AgentMail.NotFoundError}
38
+ *
39
+ * @example
40
+ * await client.pods.threads.list("pod_id")
41
+ */
42
+ list(podId: AgentMail.pods.PodId, request?: AgentMail.pods.ListThreadsRequest, requestOptions?: Threads.RequestOptions): Promise<core.Page<AgentMail.ThreadItem>>;
43
+ /**
44
+ * @param {AgentMail.pods.PodId} podId
45
+ * @param {AgentMail.ThreadId} threadId
46
+ * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
47
+ *
48
+ * @throws {@link AgentMail.NotFoundError}
49
+ *
50
+ * @example
51
+ * await client.pods.threads.get("pod_id", "thread_id")
52
+ */
53
+ get(podId: AgentMail.pods.PodId, threadId: AgentMail.ThreadId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise<AgentMail.Thread>;
54
+ private __get;
55
+ /**
56
+ * @throws {@link AgentMail.NotFoundError}
57
+ */
58
+ getAttachment(podId: AgentMail.pods.PodId, threadId: AgentMail.ThreadId, attachmentId: AgentMail.AttachmentId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
59
+ private __getAttachment;
60
+ protected _getAuthorizationHeader(): Promise<string>;
61
+ }