agentmail 0.4.2 → 0.4.4

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 (233) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/domains/client/Client.d.ts +12 -0
  3. package/dist/cjs/api/resources/domains/client/Client.js +69 -0
  4. package/dist/cjs/api/resources/domains/types/UpdateDomainRequest.d.ts +4 -0
  5. package/dist/cjs/api/resources/domains/types/index.d.ts +1 -0
  6. package/dist/cjs/api/resources/domains/types/index.js +1 -0
  7. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.d.ts +9 -9
  8. package/dist/cjs/api/resources/inboxes/resources/drafts/client/Client.js +50 -50
  9. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.d.ts +22 -15
  10. package/dist/cjs/api/resources/inboxes/resources/messages/client/Client.js +71 -56
  11. package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.d.ts +4 -8
  12. package/dist/cjs/api/resources/inboxes/resources/metrics/client/Client.js +17 -28
  13. package/dist/cjs/api/resources/inboxes/resources/metrics/client/requests/QueryMetricsRequest.d.ts +13 -0
  14. package/dist/cjs/api/resources/inboxes/resources/metrics/client/requests/index.d.ts +1 -1
  15. package/dist/cjs/api/resources/lists/client/Client.d.ts +15 -15
  16. package/dist/cjs/api/resources/lists/client/Client.js +67 -67
  17. package/dist/cjs/api/resources/messages/types/RawMessageResponse.d.ts +14 -0
  18. package/dist/cjs/api/resources/messages/types/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/messages/types/index.js +1 -0
  20. package/dist/cjs/api/resources/metrics/client/Client.d.ts +5 -8
  21. package/dist/cjs/api/resources/metrics/client/Client.js +20 -22
  22. package/dist/cjs/api/resources/metrics/client/requests/QueryMetricsRequest.d.ts +13 -0
  23. package/dist/cjs/api/resources/metrics/client/requests/index.d.ts +1 -1
  24. package/dist/cjs/api/resources/metrics/types/Descending.d.ts +4 -0
  25. package/dist/cjs/api/resources/metrics/types/End.d.ts +4 -0
  26. package/dist/cjs/api/resources/metrics/types/MetricBucket.d.ts +6 -0
  27. package/dist/cjs/api/resources/metrics/types/MetricEventTypes.d.ts +1 -1
  28. package/dist/cjs/api/resources/metrics/types/MetricLimit.d.ts +4 -0
  29. package/dist/cjs/api/resources/metrics/types/MetricLimit.js +3 -0
  30. package/dist/cjs/api/resources/metrics/types/Period.d.ts +4 -0
  31. package/dist/cjs/api/resources/metrics/types/Period.js +3 -0
  32. package/dist/cjs/api/resources/metrics/types/QueryMetricsResponse.d.ts +5 -0
  33. package/dist/cjs/api/resources/metrics/types/QueryMetricsResponse.js +3 -0
  34. package/dist/cjs/api/resources/metrics/types/Start.d.ts +4 -0
  35. package/dist/cjs/api/resources/metrics/types/Start.js +3 -0
  36. package/dist/cjs/api/resources/metrics/types/index.d.ts +7 -5
  37. package/dist/cjs/api/resources/metrics/types/index.js +7 -5
  38. package/dist/cjs/api/resources/pods/client/Client.d.ts +7 -4
  39. package/dist/cjs/api/resources/pods/client/Client.js +13 -8
  40. package/dist/cjs/api/resources/pods/resources/apiKeys/client/Client.d.ts +11 -11
  41. package/dist/cjs/api/resources/pods/resources/apiKeys/client/Client.js +42 -42
  42. package/dist/cjs/api/resources/pods/resources/domains/client/Client.d.ts +33 -3
  43. package/dist/cjs/api/resources/pods/resources/domains/client/Client.js +178 -6
  44. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.d.ts +15 -0
  45. package/dist/cjs/api/resources/pods/resources/inboxes/client/Client.js +72 -0
  46. package/dist/cjs/api/resources/pods/resources/index.d.ts +2 -0
  47. package/dist/cjs/api/resources/pods/resources/index.js +3 -1
  48. package/dist/cjs/api/resources/pods/resources/lists/client/Client.d.ts +16 -16
  49. package/dist/cjs/api/resources/pods/resources/lists/client/Client.js +67 -67
  50. package/dist/cjs/api/resources/pods/resources/metrics/client/Client.d.ts +25 -0
  51. package/dist/cjs/api/resources/pods/resources/metrics/client/Client.js +142 -0
  52. package/dist/cjs/api/resources/pods/resources/metrics/client/index.d.ts +1 -0
  53. package/dist/cjs/api/resources/pods/resources/metrics/client/index.js +17 -0
  54. package/dist/cjs/api/resources/pods/resources/metrics/client/requests/QueryMetricsRequest.d.ts +13 -0
  55. package/dist/cjs/api/resources/pods/resources/metrics/client/requests/QueryMetricsRequest.js +3 -0
  56. package/dist/cjs/api/resources/pods/resources/metrics/client/requests/index.d.ts +1 -0
  57. package/dist/cjs/api/resources/pods/resources/metrics/client/requests/index.js +2 -0
  58. package/dist/cjs/api/resources/pods/resources/metrics/index.d.ts +1 -0
  59. package/dist/cjs/api/resources/pods/resources/metrics/index.js +17 -0
  60. package/dist/cjs/api/resources/pods/resources/threads/client/Client.d.ts +15 -0
  61. package/dist/cjs/api/resources/pods/resources/threads/client/Client.js +61 -0
  62. package/dist/cjs/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.d.ts +8 -0
  63. package/dist/cjs/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.js +3 -0
  64. package/dist/cjs/api/resources/pods/resources/threads/client/requests/index.d.ts +1 -0
  65. package/dist/cjs/api/resources/threads/client/Client.d.ts +14 -0
  66. package/dist/cjs/api/resources/threads/client/Client.js +60 -0
  67. package/dist/cjs/api/resources/threads/client/requests/DeleteThreadRequest.d.ts +8 -0
  68. package/dist/cjs/api/resources/threads/client/requests/DeleteThreadRequest.js +3 -0
  69. package/dist/cjs/api/resources/threads/client/requests/index.d.ts +1 -0
  70. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +13 -13
  71. package/dist/cjs/api/resources/webhooks/client/Client.js +31 -31
  72. package/dist/cjs/serialization/resources/domains/types/UpdateDomainRequest.d.ts +10 -0
  73. package/dist/cjs/serialization/resources/domains/types/UpdateDomainRequest.js +42 -0
  74. package/dist/cjs/serialization/resources/domains/types/index.d.ts +1 -0
  75. package/dist/cjs/serialization/resources/domains/types/index.js +1 -0
  76. package/dist/cjs/serialization/resources/messages/types/RawMessageResponse.d.ts +14 -0
  77. package/dist/cjs/serialization/resources/messages/types/RawMessageResponse.js +46 -0
  78. package/dist/cjs/serialization/resources/messages/types/index.d.ts +1 -0
  79. package/dist/cjs/serialization/resources/messages/types/index.js +1 -0
  80. package/dist/cjs/serialization/resources/metrics/types/Descending.d.ts +7 -0
  81. package/dist/cjs/serialization/resources/metrics/types/{MetricTimestamp.js → Descending.js} +2 -2
  82. package/dist/cjs/serialization/resources/metrics/types/{MetricTimestamp.d.ts → End.d.ts} +2 -2
  83. package/dist/cjs/serialization/resources/metrics/types/{MetricEndTimestamp.js → End.js} +2 -2
  84. package/dist/cjs/serialization/resources/metrics/types/MetricBucket.d.ts +10 -0
  85. package/dist/cjs/serialization/resources/metrics/types/{ListMetricsResponse.js → MetricBucket.js} +4 -4
  86. package/dist/cjs/serialization/resources/metrics/types/MetricLimit.d.ts +7 -0
  87. package/dist/cjs/serialization/resources/metrics/types/{MetricStartTimestamp.js → MetricLimit.js} +2 -2
  88. package/dist/cjs/serialization/resources/metrics/types/{MetricEndTimestamp.d.ts → Period.d.ts} +2 -2
  89. package/dist/cjs/serialization/resources/metrics/types/Period.js +39 -0
  90. package/dist/cjs/serialization/resources/metrics/types/QueryMetricsResponse.d.ts +9 -0
  91. package/dist/cjs/serialization/resources/metrics/types/QueryMetricsResponse.js +41 -0
  92. package/dist/cjs/serialization/resources/metrics/types/{MetricStartTimestamp.d.ts → Start.d.ts} +2 -2
  93. package/dist/cjs/serialization/resources/metrics/types/Start.js +39 -0
  94. package/dist/cjs/serialization/resources/metrics/types/index.d.ts +7 -5
  95. package/dist/cjs/serialization/resources/metrics/types/index.js +7 -5
  96. package/dist/cjs/version.d.ts +1 -1
  97. package/dist/cjs/version.js +1 -1
  98. package/dist/esm/BaseClient.mjs +2 -2
  99. package/dist/esm/api/resources/domains/client/Client.d.mts +12 -0
  100. package/dist/esm/api/resources/domains/client/Client.mjs +69 -0
  101. package/dist/esm/api/resources/domains/types/UpdateDomainRequest.d.mts +4 -0
  102. package/dist/esm/api/resources/domains/types/index.d.mts +1 -0
  103. package/dist/esm/api/resources/domains/types/index.mjs +1 -0
  104. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.d.mts +9 -9
  105. package/dist/esm/api/resources/inboxes/resources/drafts/client/Client.mjs +50 -50
  106. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.d.mts +22 -15
  107. package/dist/esm/api/resources/inboxes/resources/messages/client/Client.mjs +71 -56
  108. package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.d.mts +4 -8
  109. package/dist/esm/api/resources/inboxes/resources/metrics/client/Client.mjs +17 -28
  110. package/dist/esm/api/resources/inboxes/resources/metrics/client/requests/QueryMetricsRequest.d.mts +13 -0
  111. package/dist/esm/api/resources/inboxes/resources/metrics/client/requests/index.d.mts +1 -1
  112. package/dist/esm/api/resources/lists/client/Client.d.mts +15 -15
  113. package/dist/esm/api/resources/lists/client/Client.mjs +67 -67
  114. package/dist/esm/api/resources/messages/types/RawMessageResponse.d.mts +14 -0
  115. package/dist/esm/api/resources/messages/types/index.d.mts +1 -0
  116. package/dist/esm/api/resources/messages/types/index.mjs +1 -0
  117. package/dist/esm/api/resources/metrics/client/Client.d.mts +5 -8
  118. package/dist/esm/api/resources/metrics/client/Client.mjs +20 -22
  119. package/dist/esm/api/resources/metrics/client/requests/QueryMetricsRequest.d.mts +13 -0
  120. package/dist/esm/api/resources/metrics/client/requests/index.d.mts +1 -1
  121. package/dist/esm/api/resources/metrics/types/Descending.d.mts +4 -0
  122. package/dist/esm/api/resources/metrics/types/End.d.mts +4 -0
  123. package/dist/esm/api/resources/metrics/types/MetricBucket.d.mts +6 -0
  124. package/dist/esm/api/resources/metrics/types/MetricEventTypes.d.mts +1 -1
  125. package/dist/esm/api/resources/metrics/types/MetricLimit.d.mts +4 -0
  126. package/dist/esm/api/resources/metrics/types/MetricLimit.mjs +2 -0
  127. package/dist/esm/api/resources/metrics/types/Period.d.mts +4 -0
  128. package/dist/esm/api/resources/metrics/types/Period.mjs +2 -0
  129. package/dist/esm/api/resources/metrics/types/QueryMetricsResponse.d.mts +5 -0
  130. package/dist/esm/api/resources/metrics/types/QueryMetricsResponse.mjs +2 -0
  131. package/dist/esm/api/resources/metrics/types/Start.d.mts +4 -0
  132. package/dist/esm/api/resources/metrics/types/Start.mjs +2 -0
  133. package/dist/esm/api/resources/metrics/types/index.d.mts +7 -5
  134. package/dist/esm/api/resources/metrics/types/index.mjs +7 -5
  135. package/dist/esm/api/resources/pods/client/Client.d.mts +7 -4
  136. package/dist/esm/api/resources/pods/client/Client.mjs +11 -6
  137. package/dist/esm/api/resources/pods/resources/apiKeys/client/Client.d.mts +11 -11
  138. package/dist/esm/api/resources/pods/resources/apiKeys/client/Client.mjs +42 -42
  139. package/dist/esm/api/resources/pods/resources/domains/client/Client.d.mts +33 -3
  140. package/dist/esm/api/resources/pods/resources/domains/client/Client.mjs +178 -6
  141. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.d.mts +15 -0
  142. package/dist/esm/api/resources/pods/resources/inboxes/client/Client.mjs +72 -0
  143. package/dist/esm/api/resources/pods/resources/index.d.mts +2 -0
  144. package/dist/esm/api/resources/pods/resources/index.mjs +2 -0
  145. package/dist/esm/api/resources/pods/resources/lists/client/Client.d.mts +16 -16
  146. package/dist/esm/api/resources/pods/resources/lists/client/Client.mjs +67 -67
  147. package/dist/esm/api/resources/pods/resources/metrics/client/Client.d.mts +25 -0
  148. package/dist/esm/api/resources/pods/resources/metrics/client/Client.mjs +105 -0
  149. package/dist/esm/api/resources/pods/resources/metrics/client/index.d.mts +1 -0
  150. package/dist/esm/api/resources/pods/resources/metrics/client/index.mjs +1 -0
  151. package/dist/esm/api/resources/pods/resources/metrics/client/requests/QueryMetricsRequest.d.mts +13 -0
  152. package/dist/esm/api/resources/pods/resources/metrics/client/requests/QueryMetricsRequest.mjs +2 -0
  153. package/dist/esm/api/resources/pods/resources/metrics/client/requests/index.d.mts +1 -0
  154. package/dist/esm/api/resources/pods/resources/metrics/client/requests/index.mjs +1 -0
  155. package/dist/esm/api/resources/pods/resources/metrics/index.d.mts +1 -0
  156. package/dist/esm/api/resources/pods/resources/metrics/index.mjs +1 -0
  157. package/dist/esm/api/resources/pods/resources/threads/client/Client.d.mts +15 -0
  158. package/dist/esm/api/resources/pods/resources/threads/client/Client.mjs +61 -0
  159. package/dist/esm/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.d.mts +8 -0
  160. package/dist/esm/api/resources/pods/resources/threads/client/requests/DeleteThreadRequest.mjs +2 -0
  161. package/dist/esm/api/resources/pods/resources/threads/client/requests/index.d.mts +1 -0
  162. package/dist/esm/api/resources/threads/client/Client.d.mts +14 -0
  163. package/dist/esm/api/resources/threads/client/Client.mjs +60 -0
  164. package/dist/esm/api/resources/threads/client/requests/DeleteThreadRequest.d.mts +8 -0
  165. package/dist/esm/api/resources/threads/client/requests/DeleteThreadRequest.mjs +2 -0
  166. package/dist/esm/api/resources/threads/client/requests/index.d.mts +1 -0
  167. package/dist/esm/api/resources/webhooks/client/Client.d.mts +13 -13
  168. package/dist/esm/api/resources/webhooks/client/Client.mjs +31 -31
  169. package/dist/esm/serialization/resources/domains/types/UpdateDomainRequest.d.mts +10 -0
  170. package/dist/esm/serialization/resources/domains/types/UpdateDomainRequest.mjs +6 -0
  171. package/dist/esm/serialization/resources/domains/types/index.d.mts +1 -0
  172. package/dist/esm/serialization/resources/domains/types/index.mjs +1 -0
  173. package/dist/esm/serialization/resources/messages/types/RawMessageResponse.d.mts +14 -0
  174. package/dist/esm/serialization/resources/messages/types/RawMessageResponse.mjs +10 -0
  175. package/dist/esm/serialization/resources/messages/types/index.d.mts +1 -0
  176. package/dist/esm/serialization/resources/messages/types/index.mjs +1 -0
  177. package/dist/esm/serialization/resources/metrics/types/Descending.d.mts +7 -0
  178. package/dist/esm/serialization/resources/metrics/types/{MetricTimestamp.mjs → Descending.mjs} +1 -1
  179. package/dist/esm/serialization/resources/metrics/types/{MetricTimestamp.d.mts → End.d.mts} +2 -2
  180. package/dist/esm/serialization/resources/metrics/types/{MetricEndTimestamp.mjs → End.mjs} +1 -1
  181. package/dist/esm/serialization/resources/metrics/types/MetricBucket.d.mts +10 -0
  182. package/dist/esm/serialization/resources/metrics/types/MetricBucket.mjs +6 -0
  183. package/dist/esm/serialization/resources/metrics/types/MetricLimit.d.mts +7 -0
  184. package/dist/esm/serialization/resources/metrics/types/{MetricStartTimestamp.mjs → MetricLimit.mjs} +1 -1
  185. package/dist/esm/serialization/resources/metrics/types/{MetricEndTimestamp.d.mts → Period.d.mts} +2 -2
  186. package/dist/esm/serialization/resources/metrics/types/Period.mjs +3 -0
  187. package/dist/esm/serialization/resources/metrics/types/QueryMetricsResponse.d.mts +9 -0
  188. package/dist/esm/serialization/resources/metrics/types/QueryMetricsResponse.mjs +5 -0
  189. package/dist/esm/serialization/resources/metrics/types/{MetricStartTimestamp.d.mts → Start.d.mts} +2 -2
  190. package/dist/esm/serialization/resources/metrics/types/Start.mjs +3 -0
  191. package/dist/esm/serialization/resources/metrics/types/index.d.mts +7 -5
  192. package/dist/esm/serialization/resources/metrics/types/index.mjs +7 -5
  193. package/dist/esm/version.d.mts +1 -1
  194. package/dist/esm/version.mjs +1 -1
  195. package/dist/llms-full.txt +16825 -11774
  196. package/dist/llms.txt +94 -25
  197. package/package.json +1 -1
  198. package/reference.md +634 -129
  199. package/dist/cjs/api/resources/inboxes/resources/metrics/client/requests/ListInboxMetricsRequest.d.ts +0 -13
  200. package/dist/cjs/api/resources/metrics/client/requests/ListMetricsRequest.d.ts +0 -13
  201. package/dist/cjs/api/resources/metrics/types/ListMetricsResponse.d.ts +0 -5
  202. package/dist/cjs/api/resources/metrics/types/MessageMetrics.d.ts +0 -17
  203. package/dist/cjs/api/resources/metrics/types/MetricEndTimestamp.d.ts +0 -4
  204. package/dist/cjs/api/resources/metrics/types/MetricStartTimestamp.d.ts +0 -4
  205. package/dist/cjs/api/resources/metrics/types/MetricTimestamp.d.ts +0 -4
  206. package/dist/cjs/serialization/resources/metrics/types/ListMetricsResponse.d.ts +0 -10
  207. package/dist/cjs/serialization/resources/metrics/types/MessageMetrics.d.ts +0 -16
  208. package/dist/cjs/serialization/resources/metrics/types/MessageMetrics.js +0 -48
  209. package/dist/esm/api/resources/inboxes/resources/metrics/client/requests/ListInboxMetricsRequest.d.mts +0 -13
  210. package/dist/esm/api/resources/metrics/client/requests/ListMetricsRequest.d.mts +0 -13
  211. package/dist/esm/api/resources/metrics/types/ListMetricsResponse.d.mts +0 -5
  212. package/dist/esm/api/resources/metrics/types/MessageMetrics.d.mts +0 -17
  213. package/dist/esm/api/resources/metrics/types/MetricEndTimestamp.d.mts +0 -4
  214. package/dist/esm/api/resources/metrics/types/MetricStartTimestamp.d.mts +0 -4
  215. package/dist/esm/api/resources/metrics/types/MetricTimestamp.d.mts +0 -4
  216. package/dist/esm/serialization/resources/metrics/types/ListMetricsResponse.d.mts +0 -10
  217. package/dist/esm/serialization/resources/metrics/types/ListMetricsResponse.mjs +0 -6
  218. package/dist/esm/serialization/resources/metrics/types/MessageMetrics.d.mts +0 -16
  219. package/dist/esm/serialization/resources/metrics/types/MessageMetrics.mjs +0 -12
  220. /package/dist/cjs/api/resources/{inboxes/resources/metrics/client/requests/ListInboxMetricsRequest.js → domains/types/UpdateDomainRequest.js} +0 -0
  221. /package/dist/cjs/api/resources/{metrics/client/requests/ListMetricsRequest.js → inboxes/resources/metrics/client/requests/QueryMetricsRequest.js} +0 -0
  222. /package/dist/cjs/api/resources/{metrics/types/ListMetricsResponse.js → messages/types/RawMessageResponse.js} +0 -0
  223. /package/dist/cjs/api/resources/metrics/{types/MessageMetrics.js → client/requests/QueryMetricsRequest.js} +0 -0
  224. /package/dist/cjs/api/resources/metrics/types/{MetricEndTimestamp.js → Descending.js} +0 -0
  225. /package/dist/cjs/api/resources/metrics/types/{MetricStartTimestamp.js → End.js} +0 -0
  226. /package/dist/cjs/api/resources/metrics/types/{MetricTimestamp.js → MetricBucket.js} +0 -0
  227. /package/dist/esm/api/resources/{inboxes/resources/metrics/client/requests/ListInboxMetricsRequest.mjs → domains/types/UpdateDomainRequest.mjs} +0 -0
  228. /package/dist/esm/api/resources/{metrics/client/requests/ListMetricsRequest.mjs → inboxes/resources/metrics/client/requests/QueryMetricsRequest.mjs} +0 -0
  229. /package/dist/esm/api/resources/{metrics/types/ListMetricsResponse.mjs → messages/types/RawMessageResponse.mjs} +0 -0
  230. /package/dist/esm/api/resources/metrics/{types/MessageMetrics.mjs → client/requests/QueryMetricsRequest.mjs} +0 -0
  231. /package/dist/esm/api/resources/metrics/types/{MetricEndTimestamp.mjs → Descending.mjs} +0 -0
  232. /package/dist/esm/api/resources/metrics/types/{MetricStartTimestamp.mjs → End.mjs} +0 -0
  233. /package/dist/esm/api/resources/metrics/types/{MetricTimestamp.mjs → MetricBucket.mjs} +0 -0
@@ -22,37 +22,33 @@ export class ApiKeysClient {
22
22
  }
23
23
  /**
24
24
  * @param {AgentMail.pods.PodId} pod_id
25
- * @param {AgentMail.CreateApiKeyRequest} request
25
+ * @param {AgentMail.pods.ListApiKeysRequest} request
26
26
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
27
27
  *
28
28
  * @throws {@link AgentMail.NotFoundError}
29
- * @throws {@link AgentMail.ValidationError}
30
29
  *
31
30
  * @example
32
- * await client.pods.apiKeys.create("pod_id", {
33
- * name: "name"
34
- * })
31
+ * await client.pods.apiKeys.list("pod_id")
35
32
  */
36
- create(pod_id, request, requestOptions) {
37
- return core.HttpResponsePromise.fromPromise(this.__create(pod_id, request, requestOptions));
33
+ list(pod_id, request = {}, requestOptions) {
34
+ return core.HttpResponsePromise.fromPromise(this.__list(pod_id, request, requestOptions));
38
35
  }
39
- __create(pod_id, request, requestOptions) {
40
- return __awaiter(this, void 0, void 0, function* () {
36
+ __list(pod_id_1) {
37
+ return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
41
38
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
+ const { limit, pageToken } = request;
40
+ const _queryParams = {
41
+ limit,
42
+ page_token: pageToken,
43
+ };
42
44
  const _authRequest = yield this._options.authProvider.getAuthRequest();
43
45
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
44
46
  const _response = yield core.fetcher({
45
47
  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)
46
48
  .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/api-keys`),
47
- method: "POST",
49
+ method: "GET",
48
50
  headers: _headers,
49
- contentType: "application/json",
50
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
51
- requestType: "json",
52
- body: serializers.CreateApiKeyRequest.jsonOrThrow(request, {
53
- unrecognizedObjectKeys: "strip",
54
- omitUndefined: true,
55
- }),
51
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
56
52
  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,
57
53
  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,
58
54
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -61,7 +57,7 @@ export class ApiKeysClient {
61
57
  });
62
58
  if (_response.ok) {
63
59
  return {
64
- data: serializers.CreateApiKeyResponse.parseOrThrow(_response.body, {
60
+ data: serializers.ListApiKeysResponse.parseOrThrow(_response.body, {
65
61
  unrecognizedObjectKeys: "passthrough",
66
62
  allowUnrecognizedUnionMembers: true,
67
63
  allowUnrecognizedEnumValues: true,
@@ -81,14 +77,6 @@ export class ApiKeysClient {
81
77
  skipValidation: true,
82
78
  breadcrumbsPrefix: ["response"],
83
79
  }), _response.rawResponse);
84
- case 400:
85
- throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
86
- unrecognizedObjectKeys: "passthrough",
87
- allowUnrecognizedUnionMembers: true,
88
- allowUnrecognizedEnumValues: true,
89
- skipValidation: true,
90
- breadcrumbsPrefix: ["response"],
91
- }), _response.rawResponse);
92
80
  default:
93
81
  throw new errors.AgentMailError({
94
82
  statusCode: _response.error.statusCode,
@@ -97,38 +85,42 @@ export class ApiKeysClient {
97
85
  });
98
86
  }
99
87
  }
100
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/api-keys");
88
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/api-keys");
101
89
  });
102
90
  }
103
91
  /**
104
92
  * @param {AgentMail.pods.PodId} pod_id
105
- * @param {AgentMail.pods.ListApiKeysRequest} request
93
+ * @param {AgentMail.CreateApiKeyRequest} request
106
94
  * @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
107
95
  *
108
96
  * @throws {@link AgentMail.NotFoundError}
97
+ * @throws {@link AgentMail.ValidationError}
109
98
  *
110
99
  * @example
111
- * await client.pods.apiKeys.list("pod_id")
100
+ * await client.pods.apiKeys.create("pod_id", {
101
+ * name: "name"
102
+ * })
112
103
  */
113
- list(pod_id, request = {}, requestOptions) {
114
- return core.HttpResponsePromise.fromPromise(this.__list(pod_id, request, requestOptions));
104
+ create(pod_id, request, requestOptions) {
105
+ return core.HttpResponsePromise.fromPromise(this.__create(pod_id, request, requestOptions));
115
106
  }
116
- __list(pod_id_1) {
117
- return __awaiter(this, arguments, void 0, function* (pod_id, request = {}, requestOptions) {
107
+ __create(pod_id, request, requestOptions) {
108
+ return __awaiter(this, void 0, void 0, function* () {
118
109
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
119
- const { limit, pageToken } = request;
120
- const _queryParams = {
121
- limit,
122
- page_token: pageToken,
123
- };
124
110
  const _authRequest = yield this._options.authProvider.getAuthRequest();
125
111
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
126
112
  const _response = yield core.fetcher({
127
113
  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)
128
114
  .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/api-keys`),
129
- method: "GET",
115
+ method: "POST",
130
116
  headers: _headers,
131
- queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
117
+ contentType: "application/json",
118
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
119
+ requestType: "json",
120
+ body: serializers.CreateApiKeyRequest.jsonOrThrow(request, {
121
+ unrecognizedObjectKeys: "strip",
122
+ omitUndefined: true,
123
+ }),
132
124
  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,
133
125
  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,
134
126
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -137,7 +129,7 @@ export class ApiKeysClient {
137
129
  });
138
130
  if (_response.ok) {
139
131
  return {
140
- data: serializers.ListApiKeysResponse.parseOrThrow(_response.body, {
132
+ data: serializers.CreateApiKeyResponse.parseOrThrow(_response.body, {
141
133
  unrecognizedObjectKeys: "passthrough",
142
134
  allowUnrecognizedUnionMembers: true,
143
135
  allowUnrecognizedEnumValues: true,
@@ -157,6 +149,14 @@ export class ApiKeysClient {
157
149
  skipValidation: true,
158
150
  breadcrumbsPrefix: ["response"],
159
151
  }), _response.rawResponse);
152
+ case 400:
153
+ throw new AgentMail.ValidationError(serializers.ValidationErrorResponse.parseOrThrow(_response.error.body, {
154
+ unrecognizedObjectKeys: "passthrough",
155
+ allowUnrecognizedUnionMembers: true,
156
+ allowUnrecognizedEnumValues: true,
157
+ skipValidation: true,
158
+ breadcrumbsPrefix: ["response"],
159
+ }), _response.rawResponse);
160
160
  default:
161
161
  throw new errors.AgentMailError({
162
162
  statusCode: _response.error.statusCode,
@@ -165,7 +165,7 @@ export class ApiKeysClient {
165
165
  });
166
166
  }
167
167
  }
168
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/api-keys");
168
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/api-keys");
169
169
  });
170
170
  }
171
171
  /**
@@ -22,6 +22,23 @@ export declare class DomainsClient {
22
22
  */
23
23
  list(pod_id: AgentMail.pods.PodId, request?: AgentMail.pods.ListDomainsRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.ListDomainsResponse>;
24
24
  private __list;
25
+ /**
26
+ * @param {AgentMail.pods.PodId} pod_id
27
+ * @param {AgentMail.DomainId} domain_id
28
+ * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
29
+ *
30
+ * @throws {@link AgentMail.NotFoundError}
31
+ *
32
+ * @example
33
+ * await client.pods.domains.get("pod_id", "domain_id")
34
+ */
35
+ get(pod_id: AgentMail.pods.PodId, domain_id: AgentMail.DomainId, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
36
+ private __get;
37
+ /**
38
+ * @throws {@link AgentMail.NotFoundError}
39
+ */
40
+ getZoneFile(pod_id: AgentMail.pods.PodId, domain_id: AgentMail.DomainId, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
41
+ private __getZoneFile;
25
42
  /**
26
43
  * @param {AgentMail.pods.PodId} pod_id
27
44
  * @param {AgentMail.CreateDomainRequest} request
@@ -40,15 +57,16 @@ export declare class DomainsClient {
40
57
  /**
41
58
  * @param {AgentMail.pods.PodId} pod_id
42
59
  * @param {AgentMail.DomainId} domain_id
60
+ * @param {AgentMail.UpdateDomainRequest} request
43
61
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
44
62
  *
45
63
  * @throws {@link AgentMail.NotFoundError}
46
64
  *
47
65
  * @example
48
- * await client.pods.domains.get("pod_id", "domain_id")
66
+ * await client.pods.domains.update("pod_id", "domain_id", {})
49
67
  */
50
- get(pod_id: AgentMail.pods.PodId, domain_id: AgentMail.DomainId, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
51
- private __get;
68
+ update(pod_id: AgentMail.pods.PodId, domain_id: AgentMail.DomainId, request: AgentMail.UpdateDomainRequest, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<AgentMail.Domain>;
69
+ private __update;
52
70
  /**
53
71
  * @param {AgentMail.pods.PodId} pod_id
54
72
  * @param {AgentMail.DomainId} domain_id
@@ -61,4 +79,16 @@ export declare class DomainsClient {
61
79
  */
62
80
  delete(pod_id: AgentMail.pods.PodId, domain_id: AgentMail.DomainId, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<void>;
63
81
  private __delete;
82
+ /**
83
+ * @param {AgentMail.pods.PodId} pod_id
84
+ * @param {AgentMail.DomainId} domain_id
85
+ * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
86
+ *
87
+ * @throws {@link AgentMail.NotFoundError}
88
+ *
89
+ * @example
90
+ * await client.pods.domains.verify("pod_id", "domain_id")
91
+ */
92
+ verify(pod_id: AgentMail.pods.PodId, domain_id: AgentMail.DomainId, requestOptions?: DomainsClient.RequestOptions): core.HttpResponsePromise<void>;
93
+ private __verify;
64
94
  }
@@ -89,6 +89,117 @@ export class DomainsClient {
89
89
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains");
90
90
  });
91
91
  }
92
+ /**
93
+ * @param {AgentMail.pods.PodId} pod_id
94
+ * @param {AgentMail.DomainId} domain_id
95
+ * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
96
+ *
97
+ * @throws {@link AgentMail.NotFoundError}
98
+ *
99
+ * @example
100
+ * await client.pods.domains.get("pod_id", "domain_id")
101
+ */
102
+ get(pod_id, domain_id, requestOptions) {
103
+ return core.HttpResponsePromise.fromPromise(this.__get(pod_id, domain_id, requestOptions));
104
+ }
105
+ __get(pod_id, domain_id, requestOptions) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
108
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
109
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
110
+ const _response = yield core.fetcher({
111
+ 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)
112
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/domains/${core.url.encodePathParam(serializers.DomainId.jsonOrThrow(domain_id, { omitUndefined: true }))}`),
113
+ method: "GET",
114
+ headers: _headers,
115
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
116
+ 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,
117
+ 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,
118
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
119
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
120
+ logging: this._options.logging,
121
+ });
122
+ if (_response.ok) {
123
+ return {
124
+ data: serializers.Domain.parseOrThrow(_response.body, {
125
+ unrecognizedObjectKeys: "passthrough",
126
+ allowUnrecognizedUnionMembers: true,
127
+ allowUnrecognizedEnumValues: true,
128
+ skipValidation: true,
129
+ breadcrumbsPrefix: ["response"],
130
+ }),
131
+ rawResponse: _response.rawResponse,
132
+ };
133
+ }
134
+ if (_response.error.reason === "status-code") {
135
+ switch (_response.error.statusCode) {
136
+ case 404:
137
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
138
+ unrecognizedObjectKeys: "passthrough",
139
+ allowUnrecognizedUnionMembers: true,
140
+ allowUnrecognizedEnumValues: true,
141
+ skipValidation: true,
142
+ breadcrumbsPrefix: ["response"],
143
+ }), _response.rawResponse);
144
+ default:
145
+ throw new errors.AgentMailError({
146
+ statusCode: _response.error.statusCode,
147
+ body: _response.error.body,
148
+ rawResponse: _response.rawResponse,
149
+ });
150
+ }
151
+ }
152
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains/{domain_id}");
153
+ });
154
+ }
155
+ /**
156
+ * @throws {@link AgentMail.NotFoundError}
157
+ */
158
+ getZoneFile(pod_id, domain_id, requestOptions) {
159
+ return core.HttpResponsePromise.fromPromise(this.__getZoneFile(pod_id, domain_id, requestOptions));
160
+ }
161
+ __getZoneFile(pod_id, domain_id, requestOptions) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
164
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
165
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
166
+ const _response = yield core.fetcher({
167
+ 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)
168
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/domains/${core.url.encodePathParam(serializers.DomainId.jsonOrThrow(domain_id, { omitUndefined: true }))}/zone-file`),
169
+ method: "GET",
170
+ headers: _headers,
171
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
172
+ responseType: "binary-response",
173
+ 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,
174
+ 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,
175
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
176
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
177
+ logging: this._options.logging,
178
+ });
179
+ if (_response.ok) {
180
+ return { data: _response.body, rawResponse: _response.rawResponse };
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 handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains/{domain_id}/zone-file");
201
+ });
202
+ }
92
203
  /**
93
204
  * @param {AgentMail.pods.PodId} pod_id
94
205
  * @param {AgentMail.CreateDomainRequest} request
@@ -164,17 +275,18 @@ export class DomainsClient {
164
275
  /**
165
276
  * @param {AgentMail.pods.PodId} pod_id
166
277
  * @param {AgentMail.DomainId} domain_id
278
+ * @param {AgentMail.UpdateDomainRequest} request
167
279
  * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
168
280
  *
169
281
  * @throws {@link AgentMail.NotFoundError}
170
282
  *
171
283
  * @example
172
- * await client.pods.domains.get("pod_id", "domain_id")
284
+ * await client.pods.domains.update("pod_id", "domain_id", {})
173
285
  */
174
- get(pod_id, domain_id, requestOptions) {
175
- return core.HttpResponsePromise.fromPromise(this.__get(pod_id, domain_id, requestOptions));
286
+ update(pod_id, domain_id, request, requestOptions) {
287
+ return core.HttpResponsePromise.fromPromise(this.__update(pod_id, domain_id, request, requestOptions));
176
288
  }
177
- __get(pod_id, domain_id, requestOptions) {
289
+ __update(pod_id, domain_id, request, requestOptions) {
178
290
  return __awaiter(this, void 0, void 0, function* () {
179
291
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
180
292
  const _authRequest = yield this._options.authProvider.getAuthRequest();
@@ -182,9 +294,15 @@ export class DomainsClient {
182
294
  const _response = yield core.fetcher({
183
295
  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)
184
296
  .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/domains/${core.url.encodePathParam(serializers.DomainId.jsonOrThrow(domain_id, { omitUndefined: true }))}`),
185
- method: "GET",
297
+ method: "PATCH",
186
298
  headers: _headers,
299
+ contentType: "application/json",
187
300
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
301
+ requestType: "json",
302
+ body: serializers.UpdateDomainRequest.jsonOrThrow(request, {
303
+ unrecognizedObjectKeys: "strip",
304
+ omitUndefined: true,
305
+ }),
188
306
  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,
189
307
  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,
190
308
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -221,7 +339,7 @@ export class DomainsClient {
221
339
  });
222
340
  }
223
341
  }
224
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v0/pods/{pod_id}/domains/{domain_id}");
342
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v0/pods/{pod_id}/domains/{domain_id}");
225
343
  });
226
344
  }
227
345
  /**
@@ -278,4 +396,58 @@ export class DomainsClient {
278
396
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v0/pods/{pod_id}/domains/{domain_id}");
279
397
  });
280
398
  }
399
+ /**
400
+ * @param {AgentMail.pods.PodId} pod_id
401
+ * @param {AgentMail.DomainId} domain_id
402
+ * @param {DomainsClient.RequestOptions} requestOptions - Request-specific configuration.
403
+ *
404
+ * @throws {@link AgentMail.NotFoundError}
405
+ *
406
+ * @example
407
+ * await client.pods.domains.verify("pod_id", "domain_id")
408
+ */
409
+ verify(pod_id, domain_id, requestOptions) {
410
+ return core.HttpResponsePromise.fromPromise(this.__verify(pod_id, domain_id, requestOptions));
411
+ }
412
+ __verify(pod_id, domain_id, requestOptions) {
413
+ return __awaiter(this, void 0, void 0, function* () {
414
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
415
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
416
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
417
+ const _response = yield core.fetcher({
418
+ 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)
419
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/domains/${core.url.encodePathParam(serializers.DomainId.jsonOrThrow(domain_id, { omitUndefined: true }))}/verify`),
420
+ method: "POST",
421
+ headers: _headers,
422
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
423
+ 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,
424
+ 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,
425
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
426
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
427
+ logging: this._options.logging,
428
+ });
429
+ if (_response.ok) {
430
+ return { data: undefined, rawResponse: _response.rawResponse };
431
+ }
432
+ if (_response.error.reason === "status-code") {
433
+ switch (_response.error.statusCode) {
434
+ case 404:
435
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
436
+ unrecognizedObjectKeys: "passthrough",
437
+ allowUnrecognizedUnionMembers: true,
438
+ allowUnrecognizedEnumValues: true,
439
+ skipValidation: true,
440
+ breadcrumbsPrefix: ["response"],
441
+ }), _response.rawResponse);
442
+ default:
443
+ throw new errors.AgentMailError({
444
+ statusCode: _response.error.statusCode,
445
+ body: _response.error.body,
446
+ rawResponse: _response.rawResponse,
447
+ });
448
+ }
449
+ }
450
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/domains/{domain_id}/verify");
451
+ });
452
+ }
281
453
  }
@@ -46,6 +46,21 @@ export declare class InboxesClient {
46
46
  */
47
47
  create(pod_id: AgentMail.pods.PodId, request: AgentMail.inboxes.CreateInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
48
48
  private __create;
49
+ /**
50
+ * @param {AgentMail.pods.PodId} pod_id
51
+ * @param {AgentMail.inboxes.InboxId} inbox_id
52
+ * @param {AgentMail.inboxes.UpdateInboxRequest} request
53
+ * @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @throws {@link AgentMail.NotFoundError}
56
+ *
57
+ * @example
58
+ * await client.pods.inboxes.update("pod_id", "inbox_id", {
59
+ * displayName: "display_name"
60
+ * })
61
+ */
62
+ update(pod_id: AgentMail.pods.PodId, inbox_id: AgentMail.inboxes.InboxId, request: AgentMail.inboxes.UpdateInboxRequest, requestOptions?: InboxesClient.RequestOptions): core.HttpResponsePromise<AgentMail.inboxes.Inbox>;
63
+ private __update;
49
64
  /**
50
65
  * @param {AgentMail.pods.PodId} pod_id
51
66
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -221,6 +221,78 @@ export class InboxesClient {
221
221
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v0/pods/{pod_id}/inboxes");
222
222
  });
223
223
  }
224
+ /**
225
+ * @param {AgentMail.pods.PodId} pod_id
226
+ * @param {AgentMail.inboxes.InboxId} inbox_id
227
+ * @param {AgentMail.inboxes.UpdateInboxRequest} request
228
+ * @param {InboxesClient.RequestOptions} requestOptions - Request-specific configuration.
229
+ *
230
+ * @throws {@link AgentMail.NotFoundError}
231
+ *
232
+ * @example
233
+ * await client.pods.inboxes.update("pod_id", "inbox_id", {
234
+ * displayName: "display_name"
235
+ * })
236
+ */
237
+ update(pod_id, inbox_id, request, requestOptions) {
238
+ return core.HttpResponsePromise.fromPromise(this.__update(pod_id, inbox_id, request, requestOptions));
239
+ }
240
+ __update(pod_id, inbox_id, request, requestOptions) {
241
+ return __awaiter(this, void 0, void 0, function* () {
242
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
243
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
244
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
245
+ const _response = yield core.fetcher({
246
+ 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)
247
+ .http, `/v0/pods/${core.url.encodePathParam(serializers.pods.PodId.jsonOrThrow(pod_id, { omitUndefined: true }))}/inboxes/${core.url.encodePathParam(serializers.inboxes.InboxId.jsonOrThrow(inbox_id, { omitUndefined: true }))}`),
248
+ method: "PATCH",
249
+ headers: _headers,
250
+ contentType: "application/json",
251
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
252
+ requestType: "json",
253
+ body: serializers.inboxes.UpdateInboxRequest.jsonOrThrow(request, {
254
+ unrecognizedObjectKeys: "strip",
255
+ omitUndefined: true,
256
+ }),
257
+ 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,
258
+ 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,
259
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
260
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
261
+ logging: this._options.logging,
262
+ });
263
+ if (_response.ok) {
264
+ return {
265
+ data: serializers.inboxes.Inbox.parseOrThrow(_response.body, {
266
+ unrecognizedObjectKeys: "passthrough",
267
+ allowUnrecognizedUnionMembers: true,
268
+ allowUnrecognizedEnumValues: true,
269
+ skipValidation: true,
270
+ breadcrumbsPrefix: ["response"],
271
+ }),
272
+ rawResponse: _response.rawResponse,
273
+ };
274
+ }
275
+ if (_response.error.reason === "status-code") {
276
+ switch (_response.error.statusCode) {
277
+ case 404:
278
+ throw new AgentMail.NotFoundError(serializers.ErrorResponse.parseOrThrow(_response.error.body, {
279
+ unrecognizedObjectKeys: "passthrough",
280
+ allowUnrecognizedUnionMembers: true,
281
+ allowUnrecognizedEnumValues: true,
282
+ skipValidation: true,
283
+ breadcrumbsPrefix: ["response"],
284
+ }), _response.rawResponse);
285
+ default:
286
+ throw new errors.AgentMailError({
287
+ statusCode: _response.error.statusCode,
288
+ body: _response.error.body,
289
+ rawResponse: _response.rawResponse,
290
+ });
291
+ }
292
+ }
293
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v0/pods/{pod_id}/inboxes/{inbox_id}");
294
+ });
295
+ }
224
296
  /**
225
297
  * @param {AgentMail.pods.PodId} pod_id
226
298
  * @param {AgentMail.inboxes.InboxId} inbox_id
@@ -8,5 +8,7 @@ export * from "./inboxes/client/requests/index.mjs";
8
8
  export * as inboxes from "./inboxes/index.mjs";
9
9
  export * from "./lists/client/requests/index.mjs";
10
10
  export * as lists from "./lists/index.mjs";
11
+ export * from "./metrics/client/requests/index.mjs";
12
+ export * as metrics from "./metrics/index.mjs";
11
13
  export * from "./threads/client/requests/index.mjs";
12
14
  export * as threads from "./threads/index.mjs";
@@ -8,5 +8,7 @@ export * from "./inboxes/client/requests/index.mjs";
8
8
  export * as inboxes from "./inboxes/index.mjs";
9
9
  export * from "./lists/client/requests/index.mjs";
10
10
  export * as lists from "./lists/index.mjs";
11
+ export * from "./metrics/client/requests/index.mjs";
12
+ export * as metrics from "./metrics/index.mjs";
11
13
  export * from "./threads/client/requests/index.mjs";
12
14
  export * as threads from "./threads/index.mjs";
@@ -10,22 +10,6 @@ export declare namespace ListsClient {
10
10
  export declare class ListsClient {
11
11
  protected readonly _options: NormalizedClientOptionsWithAuth<ListsClient.Options>;
12
12
  constructor(options?: ListsClient.Options);
13
- /**
14
- * @param {AgentMail.pods.PodId} pod_id
15
- * @param {AgentMail.Direction} direction
16
- * @param {AgentMail.ListType} type
17
- * @param {AgentMail.CreateListEntryRequest} request
18
- * @param {ListsClient.RequestOptions} requestOptions - Request-specific configuration.
19
- *
20
- * @throws {@link AgentMail.ValidationError}
21
- *
22
- * @example
23
- * await client.pods.lists.create("pod_id", "send", "allow", {
24
- * entry: "entry"
25
- * })
26
- */
27
- create(pod_id: AgentMail.pods.PodId, direction: AgentMail.Direction, type: AgentMail.ListType, request: AgentMail.CreateListEntryRequest, requestOptions?: ListsClient.RequestOptions): core.HttpResponsePromise<AgentMail.PodListEntry>;
28
- private __create;
29
13
  /**
30
14
  * @param {AgentMail.pods.PodId} pod_id
31
15
  * @param {AgentMail.Direction} direction
@@ -52,6 +36,22 @@ export declare class ListsClient {
52
36
  */
53
37
  get(pod_id: AgentMail.pods.PodId, direction: AgentMail.Direction, type: AgentMail.ListType, entry: string, requestOptions?: ListsClient.RequestOptions): core.HttpResponsePromise<AgentMail.PodListEntry>;
54
38
  private __get;
39
+ /**
40
+ * @param {AgentMail.pods.PodId} pod_id
41
+ * @param {AgentMail.Direction} direction
42
+ * @param {AgentMail.ListType} type
43
+ * @param {AgentMail.CreateListEntryRequest} request
44
+ * @param {ListsClient.RequestOptions} requestOptions - Request-specific configuration.
45
+ *
46
+ * @throws {@link AgentMail.ValidationError}
47
+ *
48
+ * @example
49
+ * await client.pods.lists.create("pod_id", "send", "allow", {
50
+ * entry: "entry"
51
+ * })
52
+ */
53
+ create(pod_id: AgentMail.pods.PodId, direction: AgentMail.Direction, type: AgentMail.ListType, request: AgentMail.CreateListEntryRequest, requestOptions?: ListsClient.RequestOptions): core.HttpResponsePromise<AgentMail.PodListEntry>;
54
+ private __create;
55
55
  /**
56
56
  * @param {AgentMail.pods.PodId} pod_id
57
57
  * @param {AgentMail.Direction} direction