agentmail 0.5.41 → 0.5.43

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 (234) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/calendar/types/UpdateCalendarEventRequest.d.ts +2 -1
  3. package/dist/cjs/api/resources/inboxes/resources/calendar/client/Client.d.ts +21 -21
  4. package/dist/cjs/api/resources/inboxes/resources/calendar/client/Client.js +21 -21
  5. package/dist/cjs/api/resources/inboxes/resources/webhooks/client/Client.d.ts +3 -0
  6. package/dist/cjs/api/resources/inboxes/resources/webhooks/client/Client.js +5 -0
  7. package/dist/cjs/api/resources/inboxes/resources/webhooks/exports.d.ts +1 -0
  8. package/dist/cjs/api/resources/inboxes/resources/webhooks/exports.js +1 -0
  9. package/dist/cjs/api/resources/inboxes/resources/webhooks/index.d.ts +1 -0
  10. package/dist/cjs/api/resources/inboxes/resources/webhooks/index.js +1 -0
  11. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/index.d.ts +2 -0
  12. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/index.js +41 -0
  13. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/Client.d.ts +89 -0
  14. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/Client.js +351 -0
  15. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/index.js +17 -0
  17. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/InboxListPollingWebhooksRequest.d.ts +10 -0
  18. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/InboxListPollingWebhooksRequest.js +3 -0
  19. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/index.js +2 -0
  21. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/exports.d.ts +2 -0
  22. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/exports.js +21 -0
  23. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/index.d.ts +1 -0
  24. package/dist/cjs/api/resources/inboxes/resources/webhooks/resources/polling/index.js +17 -0
  25. package/dist/cjs/api/resources/messages/types/Message.d.ts +1 -0
  26. package/dist/cjs/api/resources/messages/types/MessageCalendarEventId.d.ts +8 -0
  27. package/dist/cjs/api/resources/messages/types/MessageCalendarEventId.js +3 -0
  28. package/dist/cjs/api/resources/messages/types/MessageItem.d.ts +1 -0
  29. package/dist/cjs/api/resources/messages/types/index.d.ts +1 -0
  30. package/dist/cjs/api/resources/messages/types/index.js +1 -0
  31. package/dist/cjs/api/resources/pods/resources/webhooks/client/Client.d.ts +3 -0
  32. package/dist/cjs/api/resources/pods/resources/webhooks/client/Client.js +5 -0
  33. package/dist/cjs/api/resources/pods/resources/webhooks/exports.d.ts +1 -0
  34. package/dist/cjs/api/resources/pods/resources/webhooks/exports.js +1 -0
  35. package/dist/cjs/api/resources/pods/resources/webhooks/index.d.ts +1 -0
  36. package/dist/cjs/api/resources/pods/resources/webhooks/index.js +1 -0
  37. package/dist/cjs/api/resources/pods/resources/webhooks/resources/index.d.ts +2 -0
  38. package/dist/cjs/api/resources/pods/resources/webhooks/resources/index.js +41 -0
  39. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/Client.d.ts +89 -0
  40. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/Client.js +351 -0
  41. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/index.d.ts +1 -0
  42. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/index.js +17 -0
  43. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/requests/PodListPollingWebhooksRequest.d.ts +10 -0
  44. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/requests/PodListPollingWebhooksRequest.js +3 -0
  45. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/requests/index.d.ts +1 -0
  46. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/client/requests/index.js +2 -0
  47. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/exports.d.ts +2 -0
  48. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/exports.js +21 -0
  49. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/index.d.ts +1 -0
  50. package/dist/cjs/api/resources/pods/resources/webhooks/resources/polling/index.js +17 -0
  51. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +3 -0
  52. package/dist/cjs/api/resources/webhooks/client/Client.js +5 -0
  53. package/dist/cjs/api/resources/webhooks/resources/index.d.ts +3 -0
  54. package/dist/cjs/api/resources/webhooks/resources/index.js +4 -1
  55. package/dist/cjs/api/resources/webhooks/resources/polling/client/Client.d.ts +92 -0
  56. package/dist/cjs/api/resources/webhooks/resources/polling/client/Client.js +354 -0
  57. package/dist/cjs/api/resources/webhooks/resources/polling/client/index.d.ts +1 -0
  58. package/dist/cjs/api/resources/webhooks/resources/polling/client/index.js +17 -0
  59. package/dist/cjs/api/resources/webhooks/resources/polling/client/requests/ListPollingWebhooksRequest.d.ts +10 -0
  60. package/dist/cjs/api/resources/webhooks/resources/polling/client/requests/ListPollingWebhooksRequest.js +3 -0
  61. package/dist/cjs/api/resources/webhooks/resources/polling/client/requests/index.d.ts +1 -0
  62. package/dist/cjs/api/resources/webhooks/resources/polling/client/requests/index.js +2 -0
  63. package/dist/cjs/api/resources/webhooks/resources/polling/exports.d.ts +2 -0
  64. package/dist/cjs/api/resources/webhooks/resources/polling/exports.js +21 -0
  65. package/dist/cjs/api/resources/webhooks/resources/polling/index.d.ts +2 -0
  66. package/dist/cjs/api/resources/webhooks/resources/polling/index.js +18 -0
  67. package/dist/cjs/api/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.d.ts +9 -0
  68. package/dist/cjs/api/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.js +3 -0
  69. package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.d.ts +9 -0
  70. package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.js +3 -0
  71. package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.d.ts +9 -0
  72. package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.js +3 -0
  73. package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.d.ts +7 -0
  74. package/dist/cjs/api/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.js +3 -0
  75. package/dist/cjs/api/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.d.ts +12 -0
  76. package/dist/cjs/api/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.js +3 -0
  77. package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingClientId.d.ts +7 -0
  78. package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingClientId.js +3 -0
  79. package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingToken.d.ts +8 -0
  80. package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingToken.js +3 -0
  81. package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingWebhook.d.ts +27 -0
  82. package/dist/cjs/api/resources/webhooks/resources/polling/types/PollingWebhook.js +3 -0
  83. package/dist/cjs/api/resources/webhooks/resources/polling/types/index.d.ts +8 -0
  84. package/dist/cjs/api/resources/webhooks/resources/polling/types/index.js +24 -0
  85. package/dist/cjs/serialization/resources/messages/types/Message.d.ts +2 -0
  86. package/dist/cjs/serialization/resources/messages/types/Message.js +2 -0
  87. package/dist/cjs/serialization/resources/messages/types/MessageCalendarEventId.d.ts +7 -0
  88. package/dist/cjs/serialization/resources/messages/types/MessageCalendarEventId.js +39 -0
  89. package/dist/cjs/serialization/resources/messages/types/MessageItem.d.ts +2 -0
  90. package/dist/cjs/serialization/resources/messages/types/MessageItem.js +2 -0
  91. package/dist/cjs/serialization/resources/messages/types/index.d.ts +1 -0
  92. package/dist/cjs/serialization/resources/messages/types/index.js +1 -0
  93. package/dist/cjs/serialization/resources/webhooks/resources/index.d.ts +2 -0
  94. package/dist/cjs/serialization/resources/webhooks/resources/index.js +3 -1
  95. package/dist/cjs/serialization/resources/webhooks/resources/polling/index.d.ts +1 -0
  96. package/dist/cjs/serialization/resources/webhooks/resources/polling/index.js +17 -0
  97. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.d.ts +12 -0
  98. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.js +44 -0
  99. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.d.ts +11 -0
  100. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.js +45 -0
  101. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.d.ts +11 -0
  102. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.js +45 -0
  103. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.d.ts +11 -0
  104. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.js +45 -0
  105. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.d.ts +16 -0
  106. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.js +48 -0
  107. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingClientId.d.ts +8 -0
  108. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingClientId.js +6 -0
  109. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingToken.d.ts +7 -0
  110. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingToken.js +39 -0
  111. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingWebhook.d.ts +22 -0
  112. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/PollingWebhook.js +54 -0
  113. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/index.d.ts +8 -0
  114. package/dist/cjs/serialization/resources/webhooks/resources/polling/types/index.js +24 -0
  115. package/dist/cjs/version.d.ts +1 -1
  116. package/dist/cjs/version.js +1 -1
  117. package/dist/esm/BaseClient.mjs +2 -2
  118. package/dist/esm/api/resources/calendar/types/UpdateCalendarEventRequest.d.mts +2 -1
  119. package/dist/esm/api/resources/inboxes/resources/calendar/client/Client.d.mts +21 -21
  120. package/dist/esm/api/resources/inboxes/resources/calendar/client/Client.mjs +21 -21
  121. package/dist/esm/api/resources/inboxes/resources/webhooks/client/Client.d.mts +3 -0
  122. package/dist/esm/api/resources/inboxes/resources/webhooks/client/Client.mjs +5 -0
  123. package/dist/esm/api/resources/inboxes/resources/webhooks/exports.d.mts +1 -0
  124. package/dist/esm/api/resources/inboxes/resources/webhooks/exports.mjs +1 -0
  125. package/dist/esm/api/resources/inboxes/resources/webhooks/index.d.mts +1 -0
  126. package/dist/esm/api/resources/inboxes/resources/webhooks/index.mjs +1 -0
  127. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/index.d.mts +2 -0
  128. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/index.mjs +2 -0
  129. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/Client.d.mts +89 -0
  130. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/Client.mjs +314 -0
  131. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/index.d.mts +1 -0
  132. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/index.mjs +1 -0
  133. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/InboxListPollingWebhooksRequest.d.mts +10 -0
  134. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/InboxListPollingWebhooksRequest.mjs +2 -0
  135. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/index.d.mts +1 -0
  136. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/client/requests/index.mjs +1 -0
  137. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/exports.d.mts +2 -0
  138. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/exports.mjs +3 -0
  139. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/index.d.mts +1 -0
  140. package/dist/esm/api/resources/inboxes/resources/webhooks/resources/polling/index.mjs +1 -0
  141. package/dist/esm/api/resources/messages/types/Message.d.mts +1 -0
  142. package/dist/esm/api/resources/messages/types/MessageCalendarEventId.d.mts +8 -0
  143. package/dist/esm/api/resources/messages/types/MessageCalendarEventId.mjs +2 -0
  144. package/dist/esm/api/resources/messages/types/MessageItem.d.mts +1 -0
  145. package/dist/esm/api/resources/messages/types/index.d.mts +1 -0
  146. package/dist/esm/api/resources/messages/types/index.mjs +1 -0
  147. package/dist/esm/api/resources/pods/resources/webhooks/client/Client.d.mts +3 -0
  148. package/dist/esm/api/resources/pods/resources/webhooks/client/Client.mjs +5 -0
  149. package/dist/esm/api/resources/pods/resources/webhooks/exports.d.mts +1 -0
  150. package/dist/esm/api/resources/pods/resources/webhooks/exports.mjs +1 -0
  151. package/dist/esm/api/resources/pods/resources/webhooks/index.d.mts +1 -0
  152. package/dist/esm/api/resources/pods/resources/webhooks/index.mjs +1 -0
  153. package/dist/esm/api/resources/pods/resources/webhooks/resources/index.d.mts +2 -0
  154. package/dist/esm/api/resources/pods/resources/webhooks/resources/index.mjs +2 -0
  155. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/Client.d.mts +89 -0
  156. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/Client.mjs +314 -0
  157. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/index.d.mts +1 -0
  158. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/index.mjs +1 -0
  159. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/requests/PodListPollingWebhooksRequest.d.mts +10 -0
  160. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/requests/PodListPollingWebhooksRequest.mjs +2 -0
  161. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/requests/index.d.mts +1 -0
  162. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/client/requests/index.mjs +1 -0
  163. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/exports.d.mts +2 -0
  164. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/exports.mjs +3 -0
  165. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/index.d.mts +1 -0
  166. package/dist/esm/api/resources/pods/resources/webhooks/resources/polling/index.mjs +1 -0
  167. package/dist/esm/api/resources/webhooks/client/Client.d.mts +3 -0
  168. package/dist/esm/api/resources/webhooks/client/Client.mjs +5 -0
  169. package/dist/esm/api/resources/webhooks/resources/index.d.mts +3 -0
  170. package/dist/esm/api/resources/webhooks/resources/index.mjs +3 -0
  171. package/dist/esm/api/resources/webhooks/resources/polling/client/Client.d.mts +92 -0
  172. package/dist/esm/api/resources/webhooks/resources/polling/client/Client.mjs +317 -0
  173. package/dist/esm/api/resources/webhooks/resources/polling/client/index.d.mts +1 -0
  174. package/dist/esm/api/resources/webhooks/resources/polling/client/index.mjs +1 -0
  175. package/dist/esm/api/resources/webhooks/resources/polling/client/requests/ListPollingWebhooksRequest.d.mts +10 -0
  176. package/dist/esm/api/resources/webhooks/resources/polling/client/requests/ListPollingWebhooksRequest.mjs +2 -0
  177. package/dist/esm/api/resources/webhooks/resources/polling/client/requests/index.d.mts +1 -0
  178. package/dist/esm/api/resources/webhooks/resources/polling/client/requests/index.mjs +1 -0
  179. package/dist/esm/api/resources/webhooks/resources/polling/exports.d.mts +2 -0
  180. package/dist/esm/api/resources/webhooks/resources/polling/exports.mjs +3 -0
  181. package/dist/esm/api/resources/webhooks/resources/polling/index.d.mts +2 -0
  182. package/dist/esm/api/resources/webhooks/resources/polling/index.mjs +2 -0
  183. package/dist/esm/api/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.d.mts +9 -0
  184. package/dist/esm/api/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.mjs +2 -0
  185. package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.d.mts +9 -0
  186. package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.mjs +2 -0
  187. package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.d.mts +9 -0
  188. package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.mjs +2 -0
  189. package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.d.mts +7 -0
  190. package/dist/esm/api/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.mjs +2 -0
  191. package/dist/esm/api/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.d.mts +12 -0
  192. package/dist/esm/api/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.mjs +2 -0
  193. package/dist/esm/api/resources/webhooks/resources/polling/types/PollingClientId.d.mts +7 -0
  194. package/dist/esm/api/resources/webhooks/resources/polling/types/PollingClientId.mjs +2 -0
  195. package/dist/esm/api/resources/webhooks/resources/polling/types/PollingToken.d.mts +8 -0
  196. package/dist/esm/api/resources/webhooks/resources/polling/types/PollingToken.mjs +2 -0
  197. package/dist/esm/api/resources/webhooks/resources/polling/types/PollingWebhook.d.mts +27 -0
  198. package/dist/esm/api/resources/webhooks/resources/polling/types/PollingWebhook.mjs +2 -0
  199. package/dist/esm/api/resources/webhooks/resources/polling/types/index.d.mts +8 -0
  200. package/dist/esm/api/resources/webhooks/resources/polling/types/index.mjs +8 -0
  201. package/dist/esm/serialization/resources/messages/types/Message.d.mts +2 -0
  202. package/dist/esm/serialization/resources/messages/types/Message.mjs +2 -0
  203. package/dist/esm/serialization/resources/messages/types/MessageCalendarEventId.d.mts +7 -0
  204. package/dist/esm/serialization/resources/messages/types/MessageCalendarEventId.mjs +3 -0
  205. package/dist/esm/serialization/resources/messages/types/MessageItem.d.mts +2 -0
  206. package/dist/esm/serialization/resources/messages/types/MessageItem.mjs +2 -0
  207. package/dist/esm/serialization/resources/messages/types/index.d.mts +1 -0
  208. package/dist/esm/serialization/resources/messages/types/index.mjs +1 -0
  209. package/dist/esm/serialization/resources/webhooks/resources/index.d.mts +2 -0
  210. package/dist/esm/serialization/resources/webhooks/resources/index.mjs +2 -0
  211. package/dist/esm/serialization/resources/webhooks/resources/polling/index.d.mts +1 -0
  212. package/dist/esm/serialization/resources/webhooks/resources/polling/index.mjs +1 -0
  213. package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.d.mts +12 -0
  214. package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreateInboxPollingWebhookRequest.mjs +8 -0
  215. package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.d.mts +11 -0
  216. package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePodPollingWebhookRequest.mjs +9 -0
  217. package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.d.mts +11 -0
  218. package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookRequest.mjs +9 -0
  219. package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.d.mts +11 -0
  220. package/dist/esm/serialization/resources/webhooks/resources/polling/types/CreatePollingWebhookResponse.mjs +9 -0
  221. package/dist/esm/serialization/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.d.mts +16 -0
  222. package/dist/esm/serialization/resources/webhooks/resources/polling/types/ListPollingWebhooksResponse.mjs +12 -0
  223. package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingClientId.d.mts +8 -0
  224. package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingClientId.mjs +3 -0
  225. package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingToken.d.mts +7 -0
  226. package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingToken.mjs +3 -0
  227. package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingWebhook.d.mts +22 -0
  228. package/dist/esm/serialization/resources/webhooks/resources/polling/types/PollingWebhook.mjs +18 -0
  229. package/dist/esm/serialization/resources/webhooks/resources/polling/types/index.d.mts +8 -0
  230. package/dist/esm/serialization/resources/webhooks/resources/polling/types/index.mjs +8 -0
  231. package/dist/esm/version.d.mts +1 -1
  232. package/dist/esm/version.mjs +1 -1
  233. package/package.json +34 -1
  234. package/reference.md +1462 -575
@@ -0,0 +1,89 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../BaseClient.js";
3
+ import * as core from "../../../../../../../../core/index.js";
4
+ import * as AgentMail from "../../../../../../../index.js";
5
+ export declare namespace PollingClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class PollingClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<PollingClient.Options>;
12
+ constructor(options?: PollingClient.Options);
13
+ /**
14
+ * Lists the polling webhooks created through this pod route.
15
+ *
16
+ * **CLI:**
17
+ * ```bash
18
+ * agentmail pods webhooks polling list --pod-id <pod_id>
19
+ * ```
20
+ *
21
+ * @param {AgentMail.pods.PodId} pod_id
22
+ * @param {AgentMail.pods.webhooks.PodListPollingWebhooksRequest} request
23
+ * @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
24
+ *
25
+ * @throws {@link AgentMail.ValidationError}
26
+ *
27
+ * @example
28
+ * await client.pods.webhooks.polling.list("pod_id")
29
+ */
30
+ list(pod_id: AgentMail.pods.PodId, request?: AgentMail.pods.webhooks.PodListPollingWebhooksRequest, requestOptions?: PollingClient.RequestOptions): core.HttpResponsePromise<AgentMail.webhooks.ListPollingWebhooksResponse>;
31
+ private __list;
32
+ /**
33
+ * **CLI:**
34
+ * ```bash
35
+ * agentmail pods webhooks polling get --pod-id <pod_id> --webhook-id <webhook_id>
36
+ * ```
37
+ *
38
+ * @param {AgentMail.pods.PodId} pod_id
39
+ * @param {AgentMail.webhooks.WebhookId} webhook_id
40
+ * @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
41
+ *
42
+ * @throws {@link AgentMail.NotFoundError}
43
+ *
44
+ * @example
45
+ * await client.pods.webhooks.polling.get("pod_id", "webhook_id")
46
+ */
47
+ get(pod_id: AgentMail.pods.PodId, webhook_id: AgentMail.webhooks.WebhookId, requestOptions?: PollingClient.RequestOptions): core.HttpResponsePromise<AgentMail.webhooks.PollingWebhook>;
48
+ private __get;
49
+ /**
50
+ * Create a polling webhook scoped to this pod and return the `token` that reads it.
51
+ *
52
+ * **CLI:**
53
+ * ```bash
54
+ * agentmail pods webhooks polling create --pod-id <pod_id> --client-id my-agent --event-types message.received
55
+ * ```
56
+ *
57
+ * @param {AgentMail.pods.PodId} pod_id
58
+ * @param {AgentMail.webhooks.CreatePodPollingWebhookRequest} request
59
+ * @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
60
+ *
61
+ * @throws {@link AgentMail.ValidationError}
62
+ * @throws {@link AgentMail.ConflictError}
63
+ *
64
+ * @example
65
+ * await client.pods.webhooks.polling.create("pod_id", {
66
+ * clientId: "client_id",
67
+ * eventTypes: ["message.received", "message.received"]
68
+ * })
69
+ */
70
+ create(pod_id: AgentMail.pods.PodId, request: AgentMail.webhooks.CreatePodPollingWebhookRequest, requestOptions?: PollingClient.RequestOptions): core.HttpResponsePromise<AgentMail.webhooks.CreatePollingWebhookResponse>;
71
+ private __create;
72
+ /**
73
+ * **CLI:**
74
+ * ```bash
75
+ * agentmail pods webhooks polling delete --pod-id <pod_id> --webhook-id <webhook_id>
76
+ * ```
77
+ *
78
+ * @param {AgentMail.pods.PodId} pod_id
79
+ * @param {AgentMail.webhooks.WebhookId} webhook_id
80
+ * @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
81
+ *
82
+ * @throws {@link AgentMail.NotFoundError}
83
+ *
84
+ * @example
85
+ * await client.pods.webhooks.polling.delete("pod_id", "webhook_id")
86
+ */
87
+ delete(pod_id: AgentMail.pods.PodId, webhook_id: AgentMail.webhooks.WebhookId, requestOptions?: PollingClient.RequestOptions): core.HttpResponsePromise<void>;
88
+ private __delete;
89
+ }
@@ -0,0 +1,351 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.PollingClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../../../../../errors/index.js"));
53
+ const serializers = __importStar(require("../../../../../../../../serialization/index.js"));
54
+ const AgentMail = __importStar(require("../../../../../../../index.js"));
55
+ class PollingClient {
56
+ constructor(options = {}) {
57
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
58
+ }
59
+ /**
60
+ * Lists the polling webhooks created through this pod route.
61
+ *
62
+ * **CLI:**
63
+ * ```bash
64
+ * agentmail pods webhooks polling list --pod-id <pod_id>
65
+ * ```
66
+ *
67
+ * @param {AgentMail.pods.PodId} pod_id
68
+ * @param {AgentMail.pods.webhooks.PodListPollingWebhooksRequest} request
69
+ * @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
70
+ *
71
+ * @throws {@link AgentMail.ValidationError}
72
+ *
73
+ * @example
74
+ * await client.pods.webhooks.polling.list("pod_id")
75
+ */
76
+ list(pod_id, request = {}, requestOptions) {
77
+ return core.HttpResponsePromise.fromPromise(this.__list(pod_id, request, requestOptions));
78
+ }
79
+ __list(pod_id_1) {
80
+ return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
81
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
82
+ const { limit, pageToken, ascending } = request;
83
+ const _queryParams = {
84
+ limit,
85
+ page_token: pageToken,
86
+ ascending,
87
+ };
88
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
89
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
90
+ const _response = yield core.fetcher({
91
+ 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.Prod)
92
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/webhooks/polling`),
93
+ method: "GET",
94
+ headers: _headers,
95
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
96
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
97
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
98
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
99
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
100
+ logging: this._options.logging,
101
+ });
102
+ if (_response.ok) {
103
+ return {
104
+ data: serializers.webhooks.ListPollingWebhooksResponse.parseOrThrow(_response.body, {
105
+ unrecognizedObjectKeys: "passthrough",
106
+ allowUnrecognizedUnionMembers: true,
107
+ allowUnrecognizedEnumValues: true,
108
+ skipValidation: true,
109
+ breadcrumbsPrefix: ["response"],
110
+ }),
111
+ rawResponse: _response.rawResponse,
112
+ };
113
+ }
114
+ if (_response.error.reason === "status-code") {
115
+ switch (_response.error.statusCode) {
116
+ case 400:
117
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
118
+ unrecognizedObjectKeys: "passthrough",
119
+ allowUnrecognizedUnionMembers: true,
120
+ allowUnrecognizedEnumValues: true,
121
+ skipValidation: true,
122
+ breadcrumbsPrefix: ["response"],
123
+ }), _response.rawResponse);
124
+ default:
125
+ throw new errors.AgentMailError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.body,
128
+ rawResponse: _response.rawResponse,
129
+ });
130
+ }
131
+ }
132
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/webhooks/polling");
133
+ });
134
+ }
135
+ /**
136
+ * **CLI:**
137
+ * ```bash
138
+ * agentmail pods webhooks polling get --pod-id <pod_id> --webhook-id <webhook_id>
139
+ * ```
140
+ *
141
+ * @param {AgentMail.pods.PodId} pod_id
142
+ * @param {AgentMail.webhooks.WebhookId} webhook_id
143
+ * @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
144
+ *
145
+ * @throws {@link AgentMail.NotFoundError}
146
+ *
147
+ * @example
148
+ * await client.pods.webhooks.polling.get("pod_id", "webhook_id")
149
+ */
150
+ get(pod_id, webhook_id, requestOptions) {
151
+ return core.HttpResponsePromise.fromPromise(this.__get(pod_id, webhook_id, requestOptions));
152
+ }
153
+ __get(pod_id, webhook_id, requestOptions) {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
156
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
157
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
158
+ const _response = yield core.fetcher({
159
+ 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.Prod)
160
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/webhooks/polling/${core.url.encodePathParam(serializers.webhooks.WebhookId.jsonOrThrow(webhook_id, { omitUndefined: true }))}`),
161
+ method: "GET",
162
+ headers: _headers,
163
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
164
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
165
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
166
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
167
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
168
+ logging: this._options.logging,
169
+ });
170
+ if (_response.ok) {
171
+ return {
172
+ data: serializers.webhooks.PollingWebhook.parseOrThrow(_response.body, {
173
+ unrecognizedObjectKeys: "passthrough",
174
+ allowUnrecognizedUnionMembers: true,
175
+ allowUnrecognizedEnumValues: true,
176
+ skipValidation: true,
177
+ breadcrumbsPrefix: ["response"],
178
+ }),
179
+ rawResponse: _response.rawResponse,
180
+ };
181
+ }
182
+ if (_response.error.reason === "status-code") {
183
+ switch (_response.error.statusCode) {
184
+ case 404:
185
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
186
+ unrecognizedObjectKeys: "passthrough",
187
+ allowUnrecognizedUnionMembers: true,
188
+ allowUnrecognizedEnumValues: true,
189
+ skipValidation: true,
190
+ breadcrumbsPrefix: ["response"],
191
+ }), _response.rawResponse);
192
+ default:
193
+ throw new errors.AgentMailError({
194
+ statusCode: _response.error.statusCode,
195
+ body: _response.error.body,
196
+ rawResponse: _response.rawResponse,
197
+ });
198
+ }
199
+ }
200
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/webhooks/polling/{webhook_id}");
201
+ });
202
+ }
203
+ /**
204
+ * Create a polling webhook scoped to this pod and return the `token` that reads it.
205
+ *
206
+ * **CLI:**
207
+ * ```bash
208
+ * agentmail pods webhooks polling create --pod-id <pod_id> --client-id my-agent --event-types message.received
209
+ * ```
210
+ *
211
+ * @param {AgentMail.pods.PodId} pod_id
212
+ * @param {AgentMail.webhooks.CreatePodPollingWebhookRequest} request
213
+ * @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
214
+ *
215
+ * @throws {@link AgentMail.ValidationError}
216
+ * @throws {@link AgentMail.ConflictError}
217
+ *
218
+ * @example
219
+ * await client.pods.webhooks.polling.create("pod_id", {
220
+ * clientId: "client_id",
221
+ * eventTypes: ["message.received", "message.received"]
222
+ * })
223
+ */
224
+ create(pod_id, request, requestOptions) {
225
+ return core.HttpResponsePromise.fromPromise(this.__create(pod_id, request, requestOptions));
226
+ }
227
+ __create(pod_id, request, requestOptions) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
230
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
231
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
232
+ const _response = yield core.fetcher({
233
+ 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.Prod)
234
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/webhooks/polling`),
235
+ method: "POST",
236
+ headers: _headers,
237
+ contentType: "application/json",
238
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
239
+ requestType: "json",
240
+ body: serializers.webhooks.CreatePodPollingWebhookRequest.jsonOrThrow(request, {
241
+ unrecognizedObjectKeys: "strip",
242
+ omitUndefined: true,
243
+ }),
244
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
245
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
246
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
247
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
248
+ logging: this._options.logging,
249
+ });
250
+ if (_response.ok) {
251
+ return {
252
+ data: serializers.webhooks.CreatePollingWebhookResponse.parseOrThrow(_response.body, {
253
+ unrecognizedObjectKeys: "passthrough",
254
+ allowUnrecognizedUnionMembers: true,
255
+ allowUnrecognizedEnumValues: true,
256
+ skipValidation: true,
257
+ breadcrumbsPrefix: ["response"],
258
+ }),
259
+ rawResponse: _response.rawResponse,
260
+ };
261
+ }
262
+ if (_response.error.reason === "status-code") {
263
+ switch (_response.error.statusCode) {
264
+ case 400:
265
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
266
+ unrecognizedObjectKeys: "passthrough",
267
+ allowUnrecognizedUnionMembers: true,
268
+ allowUnrecognizedEnumValues: true,
269
+ skipValidation: true,
270
+ breadcrumbsPrefix: ["response"],
271
+ }), _response.rawResponse);
272
+ case 409:
273
+ throw new AgentMail.ConflictError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
274
+ unrecognizedObjectKeys: "passthrough",
275
+ allowUnrecognizedUnionMembers: true,
276
+ allowUnrecognizedEnumValues: true,
277
+ skipValidation: true,
278
+ breadcrumbsPrefix: ["response"],
279
+ }), _response.rawResponse);
280
+ default:
281
+ throw new errors.AgentMailError({
282
+ statusCode: _response.error.statusCode,
283
+ body: _response.error.body,
284
+ rawResponse: _response.rawResponse,
285
+ });
286
+ }
287
+ }
288
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/webhooks/polling");
289
+ });
290
+ }
291
+ /**
292
+ * **CLI:**
293
+ * ```bash
294
+ * agentmail pods webhooks polling delete --pod-id <pod_id> --webhook-id <webhook_id>
295
+ * ```
296
+ *
297
+ * @param {AgentMail.pods.PodId} pod_id
298
+ * @param {AgentMail.webhooks.WebhookId} webhook_id
299
+ * @param {PollingClient.RequestOptions} requestOptions - Request-specific configuration.
300
+ *
301
+ * @throws {@link AgentMail.NotFoundError}
302
+ *
303
+ * @example
304
+ * await client.pods.webhooks.polling.delete("pod_id", "webhook_id")
305
+ */
306
+ delete(pod_id, webhook_id, requestOptions) {
307
+ return core.HttpResponsePromise.fromPromise(this.__delete(pod_id, webhook_id, requestOptions));
308
+ }
309
+ __delete(pod_id, webhook_id, requestOptions) {
310
+ return __awaiter(this, void 0, void 0, function* () {
311
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
312
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
313
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
314
+ const _response = yield core.fetcher({
315
+ 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.Prod)
316
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/webhooks/polling/${core.url.encodePathParam(serializers.webhooks.WebhookId.jsonOrThrow(webhook_id, { omitUndefined: true }))}`),
317
+ method: "DELETE",
318
+ headers: _headers,
319
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
320
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
321
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
322
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
323
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
324
+ logging: this._options.logging,
325
+ });
326
+ if (_response.ok) {
327
+ return { data: undefined, rawResponse: _response.rawResponse };
328
+ }
329
+ if (_response.error.reason === "status-code") {
330
+ switch (_response.error.statusCode) {
331
+ case 404:
332
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
333
+ unrecognizedObjectKeys: "passthrough",
334
+ allowUnrecognizedUnionMembers: true,
335
+ allowUnrecognizedEnumValues: true,
336
+ skipValidation: true,
337
+ breadcrumbsPrefix: ["response"],
338
+ }), _response.rawResponse);
339
+ default:
340
+ throw new errors.AgentMailError({
341
+ statusCode: _response.error.statusCode,
342
+ body: _response.error.body,
343
+ rawResponse: _response.rawResponse,
344
+ });
345
+ }
346
+ }
347
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v0/pods/{pod_id}/webhooks/polling/{webhook_id}");
348
+ });
349
+ }
350
+ }
351
+ exports.PollingClient = PollingClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,10 @@
1
+ import type * as AgentMail from "../../../../../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {}
5
+ */
6
+ export interface PodListPollingWebhooksRequest {
7
+ limit?: AgentMail.Limit;
8
+ pageToken?: AgentMail.PageToken;
9
+ ascending?: AgentMail.Ascending;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { PodListPollingWebhooksRequest } from "./PodListPollingWebhooksRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { PollingClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.PollingClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "PollingClient", { enumerable: true, get: function () { return Client_js_1.PollingClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./client/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
@@ -2,6 +2,7 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClie
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as AgentMail from "../../../index.js";
5
+ import { PollingClient } from "../resources/polling/client/Client.js";
5
6
  export declare namespace WebhooksClient {
6
7
  type Options = BaseClientOptions;
7
8
  interface RequestOptions extends BaseRequestOptions {
@@ -9,7 +10,9 @@ export declare namespace WebhooksClient {
9
10
  }
10
11
  export declare class WebhooksClient {
11
12
  protected readonly _options: NormalizedClientOptionsWithAuth<WebhooksClient.Options>;
13
+ protected _polling: PollingClient | undefined;
12
14
  constructor(options?: WebhooksClient.Options);
15
+ get polling(): PollingClient;
13
16
  /**
14
17
  * **CLI:**
15
18
  * ```bash
@@ -52,10 +52,15 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
52
52
  const errors = __importStar(require("../../../../errors/index.js"));
53
53
  const serializers = __importStar(require("../../../../serialization/index.js"));
54
54
  const AgentMail = __importStar(require("../../../index.js"));
55
+ const Client_js_1 = require("../resources/polling/client/Client.js");
55
56
  class WebhooksClient {
56
57
  constructor(options = {}) {
57
58
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
58
59
  }
60
+ get polling() {
61
+ var _a;
62
+ return ((_a = this._polling) !== null && _a !== void 0 ? _a : (this._polling = new Client_js_1.PollingClient(this._options)));
63
+ }
59
64
  /**
60
65
  * **CLI:**
61
66
  * ```bash
@@ -1,2 +1,5 @@
1
1
  export * as events from "./events/index.js";
2
2
  export * from "./events/types/index.js";
3
+ export * from "./polling/client/requests/index.js";
4
+ export * as polling from "./polling/index.js";
5
+ export * from "./polling/types/index.js";
@@ -36,6 +36,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.events = void 0;
39
+ exports.polling = exports.events = void 0;
40
40
  exports.events = __importStar(require("./events/index.js"));
41
41
  __exportStar(require("./events/types/index.js"), exports);
42
+ __exportStar(require("./polling/client/requests/index.js"), exports);
43
+ exports.polling = __importStar(require("./polling/index.js"));
44
+ __exportStar(require("./polling/types/index.js"), exports);