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,273 @@
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 Threads {
21
+ constructor(_options = {}) {
22
+ this._options = _options;
23
+ }
24
+ /**
25
+ * @param {AgentMail.pods.PodId} podId
26
+ * @param {AgentMail.pods.ListThreadsRequest} request
27
+ * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
28
+ *
29
+ * @throws {@link AgentMail.NotFoundError}
30
+ *
31
+ * @example
32
+ * await client.pods.threads.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 }))}/threads`),
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.ListThreadsResponse.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}/threads.");
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.threads) !== 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.ThreadId} threadId
133
+ * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
134
+ *
135
+ * @throws {@link AgentMail.NotFoundError}
136
+ *
137
+ * @example
138
+ * await client.pods.threads.get("pod_id", "thread_id")
139
+ */
140
+ get(podId, threadId, requestOptions) {
141
+ return core.HttpResponsePromise.fromPromise(this.__get(podId, threadId, requestOptions));
142
+ }
143
+ __get(podId, threadId, 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 }))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId, { 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.Thread.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}/threads/{thread_id}.");
195
+ case "unknown":
196
+ throw new errors.AgentMailError({
197
+ message: _response.error.errorMessage,
198
+ rawResponse: _response.rawResponse,
199
+ });
200
+ }
201
+ });
202
+ }
203
+ /**
204
+ * @throws {@link AgentMail.NotFoundError}
205
+ */
206
+ getAttachment(podId, threadId, attachmentId, requestOptions) {
207
+ return core.HttpResponsePromise.fromPromise(this.__getAttachment(podId, threadId, attachmentId, requestOptions));
208
+ }
209
+ __getAttachment(podId, threadId, attachmentId, requestOptions) {
210
+ return __awaiter(this, void 0, void 0, function* () {
211
+ var _a, _b, _c;
212
+ 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);
213
+ const _response = yield core.fetcher({
214
+ 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 }))}/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId, { omitUndefined: true }))}/attachments/${encodeURIComponent(serializers.AttachmentId.jsonOrThrow(attachmentId, { omitUndefined: true }))}`),
215
+ method: "GET",
216
+ headers: _headers,
217
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
218
+ responseType: "binary-response",
219
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
220
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
221
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
222
+ });
223
+ if (_response.ok) {
224
+ return { data: _response.body, rawResponse: _response.rawResponse };
225
+ }
226
+ if (_response.error.reason === "status-code") {
227
+ switch (_response.error.statusCode) {
228
+ case 404:
229
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
230
+ unrecognizedObjectKeys: "passthrough",
231
+ allowUnrecognizedUnionMembers: true,
232
+ allowUnrecognizedEnumValues: true,
233
+ skipValidation: true,
234
+ breadcrumbsPrefix: ["response"],
235
+ }), _response.rawResponse);
236
+ default:
237
+ throw new errors.AgentMailError({
238
+ statusCode: _response.error.statusCode,
239
+ body: _response.error.body,
240
+ rawResponse: _response.rawResponse,
241
+ });
242
+ }
243
+ }
244
+ switch (_response.error.reason) {
245
+ case "non-json":
246
+ throw new errors.AgentMailError({
247
+ statusCode: _response.error.statusCode,
248
+ body: _response.error.rawBody,
249
+ rawResponse: _response.rawResponse,
250
+ });
251
+ case "timeout":
252
+ throw new errors.AgentMailTimeoutError("Timeout exceeded when calling GET /v0/pods/{pod_id}/threads/{thread_id}/attachments/{attachment_id}.");
253
+ case "unknown":
254
+ throw new errors.AgentMailError({
255
+ message: _response.error.errorMessage,
256
+ rawResponse: _response.rawResponse,
257
+ });
258
+ }
259
+ });
260
+ }
261
+ _getAuthorizationHeader() {
262
+ return __awaiter(this, void 0, void 0, function* () {
263
+ var _a;
264
+ 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"];
265
+ if (bearer == null) {
266
+ throw new errors.AgentMailError({
267
+ message: "Please specify a bearer by either passing it in to the constructor or initializing a AGENTMAIL_API_KEY environment variable",
268
+ });
269
+ }
270
+ return `Bearer ${bearer}`;
271
+ });
272
+ }
273
+ }
@@ -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 ListThreadsRequest {
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 ListThreadsRequest } from "./ListThreadsRequest.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Client ID of pod.
6
+ */
7
+ export type ClientId = string;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AgentMail from "../../../index.mjs";
5
+ export interface CreatePodRequest {
6
+ name?: AgentMail.pods.Name;
7
+ clientId?: AgentMail.pods.ClientId;
8
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AgentMail from "../../../index.mjs";
5
+ export interface ListPodsResponse {
6
+ count: AgentMail.Count;
7
+ limit?: AgentMail.Limit;
8
+ nextPageToken?: AgentMail.PageToken;
9
+ /** Ordered by `created_at` descending. */
10
+ pods: AgentMail.pods.Pod[];
11
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Name of pod.
6
+ */
7
+ export type Name = string;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as AgentMail from "../../../index.mjs";
5
+ export interface Pod {
6
+ podId: AgentMail.pods.PodId;
7
+ name: AgentMail.pods.Name;
8
+ /** Time at which pod was last updated. */
9
+ updatedAt: Date;
10
+ /** Time at which pod was created. */
11
+ createdAt: Date;
12
+ clientId?: AgentMail.pods.ClientId;
13
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * ID of pod.
6
+ */
7
+ export type PodId = string;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from "./PodId.mjs";
2
+ export * from "./Name.mjs";
3
+ export * from "./ClientId.mjs";
4
+ export * from "./Pod.mjs";
5
+ export * from "./ListPodsResponse.mjs";
6
+ export * from "./CreatePodRequest.mjs";
@@ -0,0 +1,6 @@
1
+ export * from "./PodId.mjs";
2
+ export * from "./Name.mjs";
3
+ export * from "./ClientId.mjs";
4
+ export * from "./Pod.mjs";
5
+ export * from "./ListPodsResponse.mjs";
6
+ export * from "./CreatePodRequest.mjs";
@@ -55,16 +55,5 @@ export declare class Threads {
55
55
  */
56
56
  getAttachment(threadId: AgentMail.ThreadId, attachmentId: AgentMail.AttachmentId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
57
57
  private __getAttachment;
58
- /**
59
- * @param {AgentMail.ThreadId} threadId
60
- * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
61
- *
62
- * @throws {@link AgentMail.NotFoundError}
63
- *
64
- * @example
65
- * await client.threads.delete("thread_id")
66
- */
67
- delete(threadId: AgentMail.ThreadId, requestOptions?: Threads.RequestOptions): core.HttpResponsePromise<void>;
68
- private __delete;
69
58
  protected _getAuthorizationHeader(): Promise<string>;
70
59
  }
@@ -256,69 +256,6 @@ export class Threads {
256
256
  }
257
257
  });
258
258
  }
259
- /**
260
- * @param {AgentMail.ThreadId} threadId
261
- * @param {Threads.RequestOptions} requestOptions - Request-specific configuration.
262
- *
263
- * @throws {@link AgentMail.NotFoundError}
264
- *
265
- * @example
266
- * await client.threads.delete("thread_id")
267
- */
268
- delete(threadId, requestOptions) {
269
- return core.HttpResponsePromise.fromPromise(this.__delete(threadId, requestOptions));
270
- }
271
- __delete(threadId, requestOptions) {
272
- return __awaiter(this, void 0, void 0, function* () {
273
- var _a, _b, _c;
274
- 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);
275
- const _response = yield core.fetcher({
276
- 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/threads/${encodeURIComponent(serializers.ThreadId.jsonOrThrow(threadId, { omitUndefined: true }))}`),
277
- method: "DELETE",
278
- headers: _headers,
279
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
280
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
281
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
282
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
283
- });
284
- if (_response.ok) {
285
- return { data: undefined, rawResponse: _response.rawResponse };
286
- }
287
- if (_response.error.reason === "status-code") {
288
- switch (_response.error.statusCode) {
289
- case 404:
290
- throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
291
- unrecognizedObjectKeys: "passthrough",
292
- allowUnrecognizedUnionMembers: true,
293
- allowUnrecognizedEnumValues: true,
294
- skipValidation: true,
295
- breadcrumbsPrefix: ["response"],
296
- }), _response.rawResponse);
297
- default:
298
- throw new errors.AgentMailError({
299
- statusCode: _response.error.statusCode,
300
- body: _response.error.body,
301
- rawResponse: _response.rawResponse,
302
- });
303
- }
304
- }
305
- switch (_response.error.reason) {
306
- case "non-json":
307
- throw new errors.AgentMailError({
308
- statusCode: _response.error.statusCode,
309
- body: _response.error.rawBody,
310
- rawResponse: _response.rawResponse,
311
- });
312
- case "timeout":
313
- throw new errors.AgentMailTimeoutError("Timeout exceeded when calling DELETE /v0/threads/{thread_id}.");
314
- case "unknown":
315
- throw new errors.AgentMailError({
316
- message: _response.error.errorMessage,
317
- rawResponse: _response.rawResponse,
318
- });
319
- }
320
- });
321
- }
322
259
  _getAuthorizationHeader() {
323
260
  return __awaiter(this, void 0, void 0, function* () {
324
261
  var _a;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index.mjs";
5
+ import * as AgentMail from "../../../../api/index.mjs";
6
+ import * as core from "../../../../core/index.mjs";
7
+ export declare const ClientId: core.serialization.Schema<serializers.ClientId.Raw, AgentMail.ClientId>;
8
+ export declare namespace ClientId {
9
+ type Raw = string;
10
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as core from "../../../../core/index.mjs";
5
+ export const ClientId = core.serialization.string();
@@ -5,10 +5,11 @@ import * as serializers from "../../../index.mjs";
5
5
  import * as AgentMail from "../../../../api/index.mjs";
6
6
  import * as core from "../../../../core/index.mjs";
7
7
  import { DomainName } from "./DomainName.mjs";
8
+ import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
8
9
  export declare const CreateDomainRequest: core.serialization.ObjectSchema<serializers.CreateDomainRequest.Raw, AgentMail.CreateDomainRequest>;
9
10
  export declare namespace CreateDomainRequest {
10
11
  interface Raw {
11
12
  domain: DomainName.Raw;
12
- feedback_enabled?: boolean | null;
13
+ feedback_enabled: FeedbackEnabled.Raw;
13
14
  }
14
15
  }
@@ -3,7 +3,8 @@
3
3
  */
4
4
  import * as core from "../../../../core/index.mjs";
5
5
  import { DomainName } from "./DomainName.mjs";
6
+ import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
6
7
  export const CreateDomainRequest = core.serialization.object({
7
8
  domain: DomainName,
8
- feedbackEnabled: core.serialization.property("feedback_enabled", core.serialization.boolean().optional()),
9
+ feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled),
9
10
  });
@@ -5,17 +5,20 @@ import * as serializers from "../../../index.mjs";
5
5
  import * as AgentMail from "../../../../api/index.mjs";
6
6
  import * as core from "../../../../core/index.mjs";
7
7
  import { DomainId } from "./DomainId.mjs";
8
- import { OrganizationId } from "../../../types/OrganizationId.mjs";
8
+ import { DomainName } from "./DomainName.mjs";
9
9
  import { VerificationStatus } from "./VerificationStatus.mjs";
10
+ import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
10
11
  import { VerificationRecord } from "./VerificationRecord.mjs";
12
+ import { ClientId } from "./ClientId.mjs";
11
13
  export declare const Domain: core.serialization.ObjectSchema<serializers.Domain.Raw, AgentMail.Domain>;
12
14
  export declare namespace Domain {
13
15
  interface Raw {
14
16
  domain_id: DomainId.Raw;
15
- organization_id: OrganizationId.Raw;
17
+ domain: DomainName.Raw;
16
18
  status: VerificationStatus.Raw;
17
- feedback_enabled?: boolean | null;
19
+ feedback_enabled: FeedbackEnabled.Raw;
18
20
  records: VerificationRecord.Raw[];
21
+ client_id?: ClientId.Raw | null;
19
22
  updated_at: string;
20
23
  created_at: string;
21
24
  }
@@ -3,15 +3,18 @@
3
3
  */
4
4
  import * as core from "../../../../core/index.mjs";
5
5
  import { DomainId } from "./DomainId.mjs";
6
- import { OrganizationId } from "../../../types/OrganizationId.mjs";
6
+ import { DomainName } from "./DomainName.mjs";
7
7
  import { VerificationStatus } from "./VerificationStatus.mjs";
8
+ import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
8
9
  import { VerificationRecord } from "./VerificationRecord.mjs";
10
+ import { ClientId } from "./ClientId.mjs";
9
11
  export const Domain = core.serialization.object({
10
12
  domainId: core.serialization.property("domain_id", DomainId),
11
- organizationId: core.serialization.property("organization_id", OrganizationId),
13
+ domain: DomainName,
12
14
  status: VerificationStatus,
13
- feedbackEnabled: core.serialization.property("feedback_enabled", core.serialization.boolean().optional()),
15
+ feedbackEnabled: core.serialization.property("feedback_enabled", FeedbackEnabled),
14
16
  records: core.serialization.list(VerificationRecord),
17
+ clientId: core.serialization.property("client_id", ClientId.optional()),
15
18
  updatedAt: core.serialization.property("updated_at", core.serialization.date()),
16
19
  createdAt: core.serialization.property("created_at", core.serialization.date()),
17
20
  });
@@ -5,14 +5,15 @@ import * as serializers from "../../../index.mjs";
5
5
  import * as AgentMail from "../../../../api/index.mjs";
6
6
  import * as core from "../../../../core/index.mjs";
7
7
  import { DomainId } from "./DomainId.mjs";
8
- import { OrganizationId } from "../../../types/OrganizationId.mjs";
8
+ import { FeedbackEnabled } from "./FeedbackEnabled.mjs";
9
+ import { ClientId } from "./ClientId.mjs";
9
10
  export declare const DomainSummary: core.serialization.ObjectSchema<serializers.DomainSummary.Raw, AgentMail.DomainSummary>;
10
11
  export declare namespace DomainSummary {
11
12
  interface Raw {
12
13
  domain_id: DomainId.Raw;
13
- organization_id: OrganizationId.Raw;
14
+ feedback_enabled: FeedbackEnabled.Raw;
15
+ client_id?: ClientId.Raw | null;
14
16
  updated_at: string;
15
17
  created_at: string;
16
- feedback_enabled?: boolean | null;
17
18
  }
18
19
  }