@distilled.cloud/stackit 1.0.0-rc.20 → 1.0.0-rc.22

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 (369) hide show
  1. package/README.md +13 -2
  2. package/lib/.lazy.json +1 -1
  3. package/lib/_bundle/sdk.js +1 -1
  4. package/lib/_bundle/sdk.js.map +1 -1
  5. package/lib/credentials.d.ts +17 -3
  6. package/lib/credentials.d.ts.map +1 -1
  7. package/lib/credentials.js +1 -1
  8. package/lib/errors.d.ts +8 -0
  9. package/lib/errors.d.ts.map +1 -1
  10. package/lib/errors.js +1 -1
  11. package/lib/index.d.ts +9 -6
  12. package/lib/index.d.ts.map +1 -1
  13. package/lib/index.js +0 -1
  14. package/lib/pagination.d.ts.map +1 -1
  15. package/lib/protocol.d.ts +33 -12
  16. package/lib/protocol.d.ts.map +1 -1
  17. package/lib/retry.d.ts.map +1 -1
  18. package/lib/services/alb.d.ts +8 -0
  19. package/lib/services/alb.d.ts.map +1 -1
  20. package/lib/services/alb.js +26 -26
  21. package/lib/services/alb.js.map +1 -1
  22. package/lib/services/alb_waf.d.ts +8 -0
  23. package/lib/services/alb_waf.d.ts.map +1 -1
  24. package/lib/services/alb_waf.js +31 -31
  25. package/lib/services/alb_waf.js.map +1 -1
  26. package/lib/services/authorization.d.ts +13 -0
  27. package/lib/services/authorization.d.ts.map +1 -1
  28. package/lib/services/authorization.js +1 -1
  29. package/lib/services/authorization.js.map +1 -1
  30. package/lib/services/automation.d.ts +23 -0
  31. package/lib/services/automation.d.ts.map +1 -1
  32. package/lib/services/automation.js +23 -22
  33. package/lib/services/automation.js.map +1 -1
  34. package/lib/services/cdn.d.ts +39 -1
  35. package/lib/services/cdn.d.ts.map +1 -1
  36. package/lib/services/cdn.js +31 -30
  37. package/lib/services/cdn.js.map +1 -1
  38. package/lib/services/certificates.d.ts +6 -0
  39. package/lib/services/certificates.d.ts.map +1 -1
  40. package/lib/services/certificates.js +1 -1
  41. package/lib/services/certificates.js.map +1 -1
  42. package/lib/services/cost.d.ts +19 -0
  43. package/lib/services/cost.d.ts.map +1 -1
  44. package/lib/services/cost.js +1 -1
  45. package/lib/services/cost.js.map +1 -1
  46. package/lib/services/dns.d.ts +16 -0
  47. package/lib/services/dns.d.ts.map +1 -1
  48. package/lib/services/dns.js +40 -40
  49. package/lib/services/dns.js.map +1 -1
  50. package/lib/services/iaas.d.ts +17 -0
  51. package/lib/services/iaas.d.ts.map +1 -1
  52. package/lib/services/iaas.js +181 -180
  53. package/lib/services/iaas.js.map +1 -1
  54. package/lib/services/identity.d.ts +19 -0
  55. package/lib/services/identity.d.ts.map +1 -1
  56. package/lib/services/identity.js +1 -1
  57. package/lib/services/identity.js.map +1 -1
  58. package/lib/services/index.d.ts +0 -10
  59. package/lib/services/index.d.ts.map +1 -1
  60. package/lib/services/index.js +0 -10
  61. package/lib/services/kms.d.ts +16 -0
  62. package/lib/services/kms.d.ts.map +1 -1
  63. package/lib/services/kms.js +41 -40
  64. package/lib/services/kms.js.map +1 -1
  65. package/lib/services/load_balancer.d.ts +8 -0
  66. package/lib/services/load_balancer.d.ts.map +1 -1
  67. package/lib/services/load_balancer.js +27 -27
  68. package/lib/services/load_balancer.js.map +1 -1
  69. package/lib/services/logme.d.ts +14 -1
  70. package/lib/services/logme.d.ts.map +1 -1
  71. package/lib/services/logme.js +36 -35
  72. package/lib/services/logme.js.map +1 -1
  73. package/lib/services/logs.d.ts +6 -0
  74. package/lib/services/logs.d.ts.map +1 -1
  75. package/lib/services/logs.js +34 -34
  76. package/lib/services/logs.js.map +1 -1
  77. package/lib/services/mariadb.d.ts +14 -1
  78. package/lib/services/mariadb.d.ts.map +1 -1
  79. package/lib/services/mariadb.js +37 -36
  80. package/lib/services/mariadb.js.map +1 -1
  81. package/lib/services/model_experiments.d.ts +20 -0
  82. package/lib/services/model_experiments.d.ts.map +1 -1
  83. package/lib/services/model_experiments.js +1 -1
  84. package/lib/services/model_experiments.js.map +1 -1
  85. package/lib/services/model_serving.d.ts +13 -0
  86. package/lib/services/model_serving.d.ts.map +1 -1
  87. package/lib/services/model_serving.js +1 -1
  88. package/lib/services/model_serving.js.map +1 -1
  89. package/lib/services/mongodb_flex.d.ts +19 -0
  90. package/lib/services/mongodb_flex.d.ts.map +1 -1
  91. package/lib/services/mongodb_flex.js +42 -41
  92. package/lib/services/mongodb_flex.js.map +1 -1
  93. package/lib/services/object_storage.d.ts +36 -0
  94. package/lib/services/object_storage.d.ts.map +1 -1
  95. package/lib/services/object_storage.js +38 -37
  96. package/lib/services/object_storage.js.map +1 -1
  97. package/lib/services/observability.d.ts +34 -8
  98. package/lib/services/observability.d.ts.map +1 -1
  99. package/lib/services/observability.js +159 -158
  100. package/lib/services/observability.js.map +1 -1
  101. package/lib/services/opensearch.d.ts +14 -1
  102. package/lib/services/opensearch.d.ts.map +1 -1
  103. package/lib/services/opensearch.js +37 -36
  104. package/lib/services/opensearch.js.map +1 -1
  105. package/lib/services/pim.d.ts +22 -0
  106. package/lib/services/pim.d.ts.map +1 -1
  107. package/lib/services/pim.js +31 -30
  108. package/lib/services/pim.js.map +1 -1
  109. package/lib/services/postgres_flex.d.ts +37 -0
  110. package/lib/services/postgres_flex.d.ts.map +1 -1
  111. package/lib/services/postgres_flex.js +48 -47
  112. package/lib/services/postgres_flex.js.map +1 -1
  113. package/lib/services/rabbitmq.d.ts +14 -1
  114. package/lib/services/rabbitmq.d.ts.map +1 -1
  115. package/lib/services/rabbitmq.js +38 -37
  116. package/lib/services/rabbitmq.js.map +1 -1
  117. package/lib/services/registry.d.ts +37 -0
  118. package/lib/services/registry.d.ts.map +1 -1
  119. package/lib/services/registry.js +1 -1
  120. package/lib/services/registry.js.map +1 -1
  121. package/lib/services/resource_manager.d.ts +24 -0
  122. package/lib/services/resource_manager.d.ts.map +1 -1
  123. package/lib/services/resource_manager.js +36 -35
  124. package/lib/services/resource_manager.js.map +1 -1
  125. package/lib/services/run_command.d.ts +12 -0
  126. package/lib/services/run_command.d.ts.map +1 -1
  127. package/lib/services/run_command.js +1 -1
  128. package/lib/services/run_command.js.map +1 -1
  129. package/lib/services/scf.d.ts +13 -0
  130. package/lib/services/scf.d.ts.map +1 -1
  131. package/lib/services/scf.js +40 -39
  132. package/lib/services/scf.js.map +1 -1
  133. package/lib/services/secrets_manager.d.ts +21 -0
  134. package/lib/services/secrets_manager.d.ts.map +1 -1
  135. package/lib/services/secrets_manager.js +42 -41
  136. package/lib/services/secrets_manager.js.map +1 -1
  137. package/lib/services/server_backup.d.ts +6 -0
  138. package/lib/services/server_backup.d.ts.map +1 -1
  139. package/lib/services/server_backup.js +28 -28
  140. package/lib/services/server_backup.js.map +1 -1
  141. package/lib/services/server_update.d.ts +6 -0
  142. package/lib/services/server_update.d.ts.map +1 -1
  143. package/lib/services/server_update.js +1 -1
  144. package/lib/services/server_update.js.map +1 -1
  145. package/lib/services/service_account.d.ts +28 -0
  146. package/lib/services/service_account.d.ts.map +1 -1
  147. package/lib/services/service_account.js +30 -29
  148. package/lib/services/service_account.js.map +1 -1
  149. package/lib/services/service_enablement.d.ts +14 -0
  150. package/lib/services/service_enablement.d.ts.map +1 -1
  151. package/lib/services/service_enablement.js +1 -1
  152. package/lib/services/service_enablement.js.map +1 -1
  153. package/lib/services/sfs.d.ts +33 -0
  154. package/lib/services/sfs.d.ts.map +1 -1
  155. package/lib/services/sfs.js +46 -46
  156. package/lib/services/sfs.js.map +1 -1
  157. package/lib/services/ske.d.ts +8 -3
  158. package/lib/services/ske.d.ts.map +1 -1
  159. package/lib/services/ske.js +25 -25
  160. package/lib/services/ske.js.map +1 -1
  161. package/lib/services/sqlserverflex.d.ts +34 -0
  162. package/lib/services/sqlserverflex.d.ts.map +1 -1
  163. package/lib/services/sqlserverflex.js +46 -45
  164. package/lib/services/sqlserverflex.js.map +1 -1
  165. package/lib/services/stackit_marketplace.d.ts +26 -1
  166. package/lib/services/stackit_marketplace.d.ts.map +1 -1
  167. package/lib/services/stackit_marketplace.js +26 -25
  168. package/lib/services/stackit_marketplace.js.map +1 -1
  169. package/lib/services/telemetry_link.d.ts +12 -0
  170. package/lib/services/telemetry_link.d.ts.map +1 -1
  171. package/lib/services/telemetry_link.js +35 -34
  172. package/lib/services/telemetry_link.js.map +1 -1
  173. package/lib/services/telemetry_router.d.ts +49 -3
  174. package/lib/services/telemetry_router.d.ts.map +1 -1
  175. package/lib/services/telemetry_router.js +33 -31
  176. package/lib/services/telemetry_router.js.map +1 -1
  177. package/lib/services/ufw.d.ts +15 -0
  178. package/lib/services/ufw.d.ts.map +1 -1
  179. package/lib/services/ufw.js +1 -1
  180. package/lib/services/ufw.js.map +1 -1
  181. package/lib/services/valkey.d.ts +14 -1
  182. package/lib/services/valkey.d.ts.map +1 -1
  183. package/lib/services/valkey.js +37 -36
  184. package/lib/services/valkey.js.map +1 -1
  185. package/lib/services/vpn.d.ts +43 -1
  186. package/lib/services/vpn.d.ts.map +1 -1
  187. package/lib/services/vpn.js +43 -42
  188. package/lib/services/vpn.js.map +1 -1
  189. package/lib/services.lazy/alb.js +1 -1
  190. package/lib/services.lazy/alb_waf.js +1 -1
  191. package/lib/services.lazy/automation.js +1 -1
  192. package/lib/services.lazy/cdn.js +1 -1
  193. package/lib/services.lazy/dns.js +1 -1
  194. package/lib/services.lazy/iaas.js +1 -1
  195. package/lib/services.lazy/index.js +2 -2
  196. package/lib/services.lazy/kms.js +1 -1
  197. package/lib/services.lazy/load_balancer.js +1 -1
  198. package/lib/services.lazy/logme.js +1 -1
  199. package/lib/services.lazy/logs.js +1 -1
  200. package/lib/services.lazy/mariadb.js +1 -1
  201. package/lib/services.lazy/mongodb_flex.js +1 -1
  202. package/lib/services.lazy/object_storage.js +1 -1
  203. package/lib/services.lazy/observability.js +1 -1
  204. package/lib/services.lazy/opensearch.js +1 -1
  205. package/lib/services.lazy/pim.js +1 -1
  206. package/lib/services.lazy/postgres_flex.js +1 -1
  207. package/lib/services.lazy/rabbitmq.js +1 -1
  208. package/lib/services.lazy/resource_manager.js +1 -1
  209. package/lib/services.lazy/scf.js +1 -1
  210. package/lib/services.lazy/secrets_manager.js +1 -1
  211. package/lib/services.lazy/server_backup.js +1 -1
  212. package/lib/services.lazy/service_account.js +1 -1
  213. package/lib/services.lazy/sfs.js +1 -1
  214. package/lib/services.lazy/ske.js +1 -1
  215. package/lib/services.lazy/sqlserverflex.js +1 -1
  216. package/lib/services.lazy/stackit_marketplace.js +1 -1
  217. package/lib/services.lazy/telemetry_link.js +1 -1
  218. package/lib/services.lazy/telemetry_router.js +1 -1
  219. package/lib/services.lazy/valkey.js +1 -1
  220. package/lib/services.lazy/vpn.js +1 -1
  221. package/lib/traits.d.ts.map +1 -1
  222. package/lib/{services → unstable-services}/dremio.d.ts +19 -4
  223. package/lib/unstable-services/dremio.d.ts.map +1 -0
  224. package/lib/unstable-services/dremio.js +2 -0
  225. package/lib/unstable-services/dremio.js.map +1 -0
  226. package/lib/{services → unstable-services}/edge.d.ts +13 -1
  227. package/lib/unstable-services/edge.d.ts.map +1 -0
  228. package/lib/unstable-services/edge.js +29 -0
  229. package/lib/unstable-services/edge.js.map +1 -0
  230. package/lib/unstable-services/functions.d.ts.map +1 -0
  231. package/lib/unstable-services/functions.js +28 -0
  232. package/lib/unstable-services/functions.js.map +1 -0
  233. package/lib/{services → unstable-services}/git.d.ts +63 -2
  234. package/lib/unstable-services/git.d.ts.map +1 -0
  235. package/lib/unstable-services/git.js +44 -0
  236. package/lib/unstable-services/git.js.map +1 -0
  237. package/lib/unstable-services/index.d.ts +11 -0
  238. package/lib/unstable-services/index.d.ts.map +1 -0
  239. package/lib/unstable-services/index.js +10 -0
  240. package/lib/{services → unstable-services}/intake.d.ts +8 -2
  241. package/lib/unstable-services/intake.d.ts.map +1 -0
  242. package/lib/unstable-services/intake.js +31 -0
  243. package/lib/unstable-services/intake.js.map +1 -0
  244. package/lib/{services → unstable-services}/lb_ip_lists.d.ts +9 -1
  245. package/lib/unstable-services/lb_ip_lists.d.ts.map +1 -0
  246. package/lib/unstable-services/lb_ip_lists.js +2 -0
  247. package/lib/unstable-services/lb_ip_lists.js.map +1 -0
  248. package/lib/{services → unstable-services}/mailout.d.ts +95 -126
  249. package/lib/unstable-services/mailout.d.ts.map +1 -0
  250. package/lib/unstable-services/mailout.js +30 -0
  251. package/lib/unstable-services/mailout.js.map +1 -0
  252. package/lib/{services → unstable-services}/pubsub.d.ts +10 -0
  253. package/lib/unstable-services/pubsub.d.ts.map +1 -0
  254. package/lib/unstable-services/pubsub.js +39 -0
  255. package/lib/unstable-services/pubsub.js.map +1 -0
  256. package/lib/{services → unstable-services}/sca.d.ts +73 -23
  257. package/lib/unstable-services/sca.d.ts.map +1 -0
  258. package/lib/unstable-services/sca.js +41 -0
  259. package/lib/unstable-services/sca.js.map +1 -0
  260. package/lib/{services → unstable-services}/workflows.d.ts +29 -1
  261. package/lib/unstable-services/workflows.d.ts.map +1 -0
  262. package/lib/unstable-services/workflows.js +30 -0
  263. package/lib/unstable-services/workflows.js.map +1 -0
  264. package/lib/unstable-services.lazy/dremio.js +1 -0
  265. package/lib/{services.lazy → unstable-services.lazy}/edge.js +1 -1
  266. package/lib/{services.lazy → unstable-services.lazy}/functions.js +1 -1
  267. package/lib/{services.lazy → unstable-services.lazy}/git.js +2 -2
  268. package/lib/unstable-services.lazy/index.js +3 -0
  269. package/lib/{services.lazy → unstable-services.lazy}/intake.js +1 -1
  270. package/lib/unstable-services.lazy/lb_ip_lists.js +1 -0
  271. package/lib/unstable-services.lazy/mailout.js +4 -0
  272. package/lib/{services.lazy → unstable-services.lazy}/pubsub.js +1 -1
  273. package/lib/{services.lazy → unstable-services.lazy}/sca.js +2 -2
  274. package/lib/{services.lazy → unstable-services.lazy}/workflows.js +1 -1
  275. package/package.json +12 -6
  276. package/src/credentials.ts +44 -7
  277. package/src/errors.ts +10 -1
  278. package/src/index.ts +9 -6
  279. package/src/protocol.ts +108 -127
  280. package/src/services/alb.ts +35 -14
  281. package/src/services/alb_waf.ts +41 -17
  282. package/src/services/authorization.ts +121 -75
  283. package/src/services/automation.ts +151 -76
  284. package/src/services/cdn.ts +284 -187
  285. package/src/services/certificates.ts +17 -6
  286. package/src/services/cost.ts +75 -17
  287. package/src/services/dns.ts +219 -149
  288. package/src/services/iaas.ts +888 -708
  289. package/src/services/identity.ts +109 -51
  290. package/src/services/index.ts +0 -10
  291. package/src/services/kms.ts +185 -118
  292. package/src/services/load_balancer.ts +35 -14
  293. package/src/services/logme.ts +181 -123
  294. package/src/services/logs.ts +43 -19
  295. package/src/services/mariadb.ts +179 -121
  296. package/src/services/model_experiments.ts +122 -64
  297. package/src/services/model_serving.ts +102 -58
  298. package/src/services/mongodb_flex.ts +196 -131
  299. package/src/services/object_storage.ts +229 -106
  300. package/src/services/observability.ts +880 -709
  301. package/src/services/opensearch.ts +182 -124
  302. package/src/services/pim.ts +166 -104
  303. package/src/services/postgres_flex.ts +291 -170
  304. package/src/services/rabbitmq.ts +188 -130
  305. package/src/services/registry.ts +146 -40
  306. package/src/services/resource_manager.ts +180 -110
  307. package/src/services/run_command.ts +73 -37
  308. package/src/services/scf.ts +178 -119
  309. package/src/services/secrets_manager.ts +198 -129
  310. package/src/services/server_backup.ts +39 -17
  311. package/src/services/server_update.ts +31 -13
  312. package/src/services/service_account.ts +180 -85
  313. package/src/services/service_enablement.ts +64 -28
  314. package/src/services/sfs.ts +265 -163
  315. package/src/services/ske.ts +39 -20
  316. package/src/services/sqlserverflex.ts +290 -175
  317. package/src/services/stackit_marketplace.ts +138 -70
  318. package/src/services/telemetry_link.ts +151 -100
  319. package/src/services/telemetry_router.ts +241 -109
  320. package/src/services/ufw.ts +97 -50
  321. package/src/services/valkey.ts +179 -121
  322. package/src/services/vpn.ts +305 -194
  323. package/src/{services → unstable-services}/dremio.ts +113 -74
  324. package/src/{services → unstable-services}/edge.ts +113 -72
  325. package/src/{services → unstable-services}/functions.ts +31 -16
  326. package/src/{services → unstable-services}/git.ts +353 -137
  327. package/src/unstable-services/index.ts +11 -0
  328. package/src/{services → unstable-services}/intake.ts +41 -20
  329. package/src/{services → unstable-services}/lb_ip_lists.ts +20 -7
  330. package/src/{services → unstable-services}/mailout.ts +290 -381
  331. package/src/{services → unstable-services}/pubsub.ts +47 -19
  332. package/src/{services → unstable-services}/sca.ts +349 -172
  333. package/src/{services → unstable-services}/workflows.ts +149 -76
  334. package/lib/index.lazy.js +0 -7
  335. package/lib/index.lazy.js.map +0 -1
  336. package/lib/services/dremio.d.ts.map +0 -1
  337. package/lib/services/dremio.js +0 -2
  338. package/lib/services/dremio.js.map +0 -1
  339. package/lib/services/edge.d.ts.map +0 -1
  340. package/lib/services/edge.js +0 -29
  341. package/lib/services/edge.js.map +0 -1
  342. package/lib/services/functions.d.ts.map +0 -1
  343. package/lib/services/functions.js +0 -28
  344. package/lib/services/functions.js.map +0 -1
  345. package/lib/services/git.d.ts.map +0 -1
  346. package/lib/services/git.js +0 -41
  347. package/lib/services/git.js.map +0 -1
  348. package/lib/services/intake.d.ts.map +0 -1
  349. package/lib/services/intake.js +0 -31
  350. package/lib/services/intake.js.map +0 -1
  351. package/lib/services/lb_ip_lists.d.ts.map +0 -1
  352. package/lib/services/lb_ip_lists.js +0 -2
  353. package/lib/services/lb_ip_lists.js.map +0 -1
  354. package/lib/services/mailout.d.ts.map +0 -1
  355. package/lib/services/mailout.js +0 -33
  356. package/lib/services/mailout.js.map +0 -1
  357. package/lib/services/pubsub.d.ts.map +0 -1
  358. package/lib/services/pubsub.js +0 -39
  359. package/lib/services/pubsub.js.map +0 -1
  360. package/lib/services/sca.d.ts.map +0 -1
  361. package/lib/services/sca.js +0 -35
  362. package/lib/services/sca.js.map +0 -1
  363. package/lib/services/workflows.d.ts.map +0 -1
  364. package/lib/services/workflows.js +0 -29
  365. package/lib/services/workflows.js.map +0 -1
  366. package/lib/services.lazy/dremio.js +0 -1
  367. package/lib/services.lazy/lb_ip_lists.js +0 -1
  368. package/lib/services.lazy/mailout.js +0 -4
  369. /package/lib/{services → unstable-services}/functions.d.ts +0 -0
@@ -4,7 +4,7 @@ import * as C from "@distilled.cloud/core/category";
4
4
  import * as S from "@distilled.cloud/core/schema-lite";
5
5
  import * as __L from "@distilled.cloud/core/schema-lite";
6
6
  import type * as Redacted from "effect/Redacted";
7
- import { UnknownStackitError } from "../errors.ts";
7
+ import { StackitServiceErrors } from "../errors.ts";
8
8
  import { StackitProtocol, type StackitOpError, type StackitOpContext } from "../protocol.ts";
9
9
  import * as Retry from "../retry.ts";
10
10
  import * as T from "../traits.ts";
@@ -31,27 +31,48 @@ export class BadRequest
31
31
  /*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
32
32
  code: S.Number,
33
33
  message: S.String,
34
+ body: /*@__PURE__*/ S.optional(
35
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(0, __c0, 0)), S.String]),
36
+ ),
37
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
34
38
  }).pipe(C.withBadRequestError),
35
39
  [{ status: 400 }],
36
- ) {}
40
+ )
41
+ {
42
+ declare readonly body?: ErrorResponse | string;
43
+ }
37
44
 
38
45
  export class Conflict
39
46
  extends /*@__PURE__*/ T.applyErrorMatchers(
40
47
  /*@__PURE__*/ S.TaggedError<Conflict>()("Conflict", {
41
48
  code: S.Number,
42
49
  message: S.String,
50
+ body: /*@__PURE__*/ S.optional(
51
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(0, __c0, 0)), S.String]),
52
+ ),
53
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
43
54
  }).pipe(C.withConflictError),
44
55
  [{ status: 409 }],
45
- ) {}
56
+ )
57
+ {
58
+ declare readonly body?: ErrorResponse | string;
59
+ }
46
60
 
47
61
  export class NotFound
48
62
  extends /*@__PURE__*/ T.applyErrorMatchers(
49
63
  /*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
50
64
  code: S.Number,
51
65
  message: S.String,
66
+ body: /*@__PURE__*/ S.optional(
67
+ /*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(0, __c0, 0)), S.String]),
68
+ ),
69
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
52
70
  }).pipe(C.withBadRequestError),
53
71
  [{ status: 404 }],
54
- ) {}
72
+ )
73
+ {
74
+ declare readonly body?: ErrorResponse | string;
75
+ }
55
76
 
56
77
  export type AddRecipientToSuppressionListRequestRegionId = "eu01" | "eu02";
57
78
  export interface AddRecipientToSuppressionListRequest {
@@ -186,6 +207,84 @@ export interface GetAuthorizedSenderResponse {
186
207
  /** Auto-generated username for SMTP authentication */
187
208
  username: string;
188
209
  }
210
+ export type GetMessageRequestRegionId = "eu01" | "eu02";
211
+ export interface GetMessageRequest {
212
+ /** The STACKIT portal project UUID the resource is located in. */
213
+ projectId: string;
214
+ /** The STACKIT region name the resource is located in. */
215
+ regionId: GetMessageRequestRegionId | (string & {});
216
+ /** UUID of the sending domain resource */
217
+ sendingDomainId: string;
218
+ /** The message spool id of the email */
219
+ messageSpoolId: string;
220
+ }
221
+ /** Customer-facing delivery status. */
222
+ export type MessageDetailsStatus =
223
+ | "Delivered"
224
+ | "Queued"
225
+ | "Soft Bounce"
226
+ | "Hard Bounce"
227
+ | "Expired"
228
+ | "Hard Bounce (OOB)";
229
+ /** The logged email event details plus the resolved status. */
230
+ export interface MessageDetails {
231
+ accepted_at?: string | undefined;
232
+ attachment: string;
233
+ attachment_size: number;
234
+ attempts: number;
235
+ delivered_at?: string | undefined;
236
+ from: string;
237
+ last_attempt?: string | undefined;
238
+ message_direction: string;
239
+ message_id: string;
240
+ message_size: number;
241
+ message_spool_id: string;
242
+ recipient: string;
243
+ smtp_code: number;
244
+ smtp_description: string;
245
+ /** Customer-facing delivery status. */
246
+ status: MessageDetailsStatus;
247
+ subject: string;
248
+ timestamp: number;
249
+ to: string;
250
+ }
251
+ /** The original email headers. */
252
+ export type MessageHeadersMap = { [key: string]: string | undefined };
253
+ export interface Message {
254
+ details: MessageDetails;
255
+ /** The original email headers. */
256
+ headers: MessageHeadersMap;
257
+ }
258
+ export type GetMetricsRequestRegionId = "eu01" | "eu02";
259
+ export type MetricsTimespan = "day" | "week" | "all";
260
+ export interface GetMetricsRequest {
261
+ /** The STACKIT portal project UUID the resource is located in. */
262
+ projectId: string;
263
+ /** The STACKIT region name the resource is located in. */
264
+ regionId: GetMetricsRequestRegionId | (string & {});
265
+ /** UUID of the sending domain resource */
266
+ sendingDomainId: string;
267
+ /** The time span for the metrics query. Can be combined with startTime or endTime to query relative time intervals (e.g., timespan=day with startTime queries 24h starting from startTime; timespan=week with endTime queries 7d ending at endTime). Ignored if both startTime and endTime are provided. Defaults to all time if omitted. */
268
+ timespan?: MetricsTimespan | (string & {}) | undefined;
269
+ /** The start time for a metrics timespan (RFC 3339). Must not be after endTime (returns HTTP 400 if startTime > endTime). When specified with a timespan (e.g. day, week), the query interval spans forward by that duration starting from startTime. If timespan is 'all' or omitted, queries from startTime until the current time. */
270
+ startTime?: string | undefined;
271
+ /** The end time for a metrics timespan (RFC 3339). Must not be before startTime (returns HTTP 400 if startTime > endTime). When specified with a timespan (e.g. day, week), the query interval spans backward by that duration ending at endTime. If timespan is 'all' or omitted, queries all history up to endTime. */
272
+ endTime?: string | undefined;
273
+ }
274
+ export interface MetricsResponse {
275
+ /** Number of accepted e-mails */
276
+ acceptedEmails: number;
277
+ /** Bounce rate as a percentage, or "-" if deliveredEmails is 0 */
278
+ bounceRatePercent: string;
279
+ /** Number of delivered e-mails */
280
+ deliveredEmails: number;
281
+ /** Delivery rate as a percentage, or "-" if acceptedEmails is 0 */
282
+ deliveryRatePercent: string;
283
+ /** Number of hard bounces */
284
+ hardBounces: number;
285
+ /** Number of soft bounces */
286
+ softBounces: number;
287
+ }
189
288
  export type GetSendingDomainRequestRegionId = "eu01" | "eu02";
190
289
  export interface GetSendingDomainRequest {
191
290
  /** The STACKIT portal project UUID the resource is located in. */
@@ -269,84 +368,6 @@ export interface GetSendingDomainResponse {
269
368
  state: SendingDomainState;
270
369
  config: SendingDomainConfig;
271
370
  }
272
- export type GetSendingDomainMessageRequestRegionId = "eu01" | "eu02";
273
- export interface GetSendingDomainMessageRequest {
274
- /** The STACKIT portal project UUID the resource is located in. */
275
- projectId: string;
276
- /** The STACKIT region name the resource is located in. */
277
- regionId: GetSendingDomainMessageRequestRegionId | (string & {});
278
- /** UUID of the sending domain resource */
279
- sendingDomainId: string;
280
- /** The message spool id of the email */
281
- messageSpoolId: string;
282
- }
283
- /** Customer-facing delivery status. */
284
- export type SendingDomainMessageDetailsStatus =
285
- | "Delivered"
286
- | "Queued"
287
- | "Soft Bounce"
288
- | "Hard Bounce"
289
- | "Expired"
290
- | "Hard Bounce (OOB)";
291
- /** The logged email event details plus the resolved status. */
292
- export interface SendingDomainMessageDetails {
293
- accepted_at?: string | undefined;
294
- attachment: string;
295
- attachment_size: number;
296
- attempts: number;
297
- delivered_at?: string | undefined;
298
- from: string;
299
- last_attempt?: string | undefined;
300
- message_direction: string;
301
- message_id: string;
302
- message_size: number;
303
- message_spool_id: string;
304
- recipient: string;
305
- smtp_code: number;
306
- smtp_description: string;
307
- /** Customer-facing delivery status. */
308
- status: SendingDomainMessageDetailsStatus;
309
- subject: string;
310
- timestamp: number;
311
- to: string;
312
- }
313
- /** The original email headers. */
314
- export type SendingDomainMessageHeadersMap = { [key: string]: string | undefined };
315
- export interface SendingDomainMessage {
316
- details: SendingDomainMessageDetails;
317
- /** The original email headers. */
318
- headers: SendingDomainMessageHeadersMap;
319
- }
320
- export type GetSendingDomainMetricsRequestRegionId = "eu01" | "eu02";
321
- export type MetricsTimespan = "day" | "week" | "all";
322
- export interface GetSendingDomainMetricsRequest {
323
- /** The STACKIT portal project UUID the resource is located in. */
324
- projectId: string;
325
- /** The STACKIT region name the resource is located in. */
326
- regionId: GetSendingDomainMetricsRequestRegionId | (string & {});
327
- /** UUID of the sending domain resource */
328
- sendingDomainId: string;
329
- /** The time span for the metrics query. Can be combined with startTime or endTime to query relative time intervals (e.g., timespan=day with startTime queries 24h starting from startTime; timespan=week with endTime queries 7d ending at endTime). Ignored if both startTime and endTime are provided. Defaults to all time if omitted. */
330
- timespan?: MetricsTimespan | (string & {}) | undefined;
331
- /** The start time for a metrics timespan (RFC 3339). Must not be after endTime (returns HTTP 400 if startTime > endTime). When specified with a timespan (e.g. day, week), the query interval spans forward by that duration starting from startTime. If timespan is 'all' or omitted, queries from startTime until the current time. */
332
- startTime?: string | undefined;
333
- /** The end time for a metrics timespan (RFC 3339). Must not be before startTime (returns HTTP 400 if startTime > endTime). When specified with a timespan (e.g. day, week), the query interval spans backward by that duration ending at endTime. If timespan is 'all' or omitted, queries all history up to endTime. */
334
- endTime?: string | undefined;
335
- }
336
- export interface MetricsResponse {
337
- /** Number of accepted e-mails */
338
- acceptedEmails: number;
339
- /** Bounce rate as a percentage, or "-" if deliveredEmails is 0 */
340
- bounceRatePercent: string;
341
- /** Number of delivered e-mails */
342
- deliveredEmails: number;
343
- /** Delivery rate as a percentage, or "-" if acceptedEmails is 0 */
344
- deliveryRatePercent: string;
345
- /** Number of hard bounces */
346
- hardBounces: number;
347
- /** Number of soft bounces */
348
- softBounces: number;
349
- }
350
371
  export type ListAuthorizedSendersRequestRegionId = "eu01" | "eu02";
351
372
  export interface ListAuthorizedSendersRequest {
352
373
  /** The STACKIT portal project UUID the resource is located in. */
@@ -371,33 +392,6 @@ export type ListAuthorizedSendersResponseItemsList = Array<AuthorizedSender>;
371
392
  export interface ListAuthorizedSendersResponse {
372
393
  items: ListAuthorizedSendersResponseItemsList;
373
394
  }
374
- export type ListSendingDomainMessagesRequestRegionId = "eu01" | "eu02";
375
- export interface ListSendingDomainMessagesRequest {
376
- /** The STACKIT portal project UUID the resource is located in. */
377
- projectId: string;
378
- /** The STACKIT region name the resource is located in. */
379
- regionId: ListSendingDomainMessagesRequestRegionId | (string & {});
380
- /** UUID of the sending domain resource */
381
- sendingDomainId: string;
382
- /** Maximum number of messages to return per page. */
383
- limit?: number | undefined;
384
- /** Pagination cursor from a previous response's nextCursor */
385
- cursor?: string | undefined;
386
- /** Filter by the state of the message (maps to event_type). */
387
- state?: string | undefined;
388
- /** Case-insensitive substring search for subject (minimum 3 characters). */
389
- subject?: string | undefined;
390
- /** Case-insensitive substring search for sender address (minimum 3 characters). */
391
- sender?: string | undefined;
392
- /** Case-insensitive substring search for recipient address (minimum 3 characters). */
393
- recipient?: string | undefined;
394
- }
395
- export type ListMessagesResponseItemsList = Array<SendingDomainMessage>;
396
- export interface ListMessagesResponse {
397
- items: ListMessagesResponseItemsList;
398
- /** Timestamp cursor for the next page. Absent when there are no more messages. */
399
- nextCursor?: string | undefined;
400
- }
401
395
  export type ListSendingDomainsRequestRegionId = "eu01" | "eu02";
402
396
  export interface ListSendingDomainsRequest {
403
397
  /** The STACKIT portal project UUID the resource is located in. */
@@ -420,19 +414,6 @@ export type ListSendingDomainsResponseItemsList = Array<SendingDomain>;
420
414
  export interface ListSendingDomainsResponse {
421
415
  items: ListSendingDomainsResponseItemsList;
422
416
  }
423
- export type ListSuppressedRecipientsRequestRegionId = "eu01" | "eu02";
424
- export interface ListSuppressedRecipientsRequest {
425
- /** The STACKIT portal project UUID the resource is located in. */
426
- projectId: string;
427
- /** The STACKIT region name the resource is located in. */
428
- regionId: ListSuppressedRecipientsRequestRegionId | (string & {});
429
- /** UUID of the sending domain resource */
430
- sendingDomainId: string;
431
- }
432
- export type ListSuppressedRecipientsResponseItemsList = Array<Suppression>;
433
- export interface ListSuppressedRecipientsResponse {
434
- items: ListSuppressedRecipientsResponseItemsList;
435
- }
436
417
  export type RemoveRecipientFromSuppressionListRequestRegionId = "eu01" | "eu02";
437
418
  export interface RemoveRecipientFromSuppressionListRequest {
438
419
  /** The STACKIT portal project UUID the resource is located in. */
@@ -455,6 +436,12 @@ export interface ValidateSendingDomainRequest {
455
436
  sendingDomainId: string;
456
437
  }
457
438
  export interface ValidateSendingDomainResponse {}
439
+ export interface ErrorResponse {
440
+ /** A specific, machine-readable string representing the exact error condition. */
441
+ code: string;
442
+ /** A human-readable explanation of the error. */
443
+ message: string;
444
+ }
458
445
  export type AddRecipientToSuppressionListError = BadRequest | NotFound | Conflict | StackitOpError;
459
446
  /** Add a recipient to the suppression list */
460
447
  export const addRecipientToSuppressionList: API.OperationMethod<
@@ -463,9 +450,10 @@ export const addRecipientToSuppressionList: API.OperationMethod<
463
450
  AddRecipientToSuppressionListError,
464
451
  StackitOpContext
465
452
  > = /*@__PURE__*/ API.make(() => ({
466
- input: __S(160, __c10, 0) as any as S.Schema<AddRecipientToSuppressionListRequest>,
467
- output: __S(176, __c11, 0) as any as S.Schema<Suppression>,
468
- errors: [BadRequest, NotFound, Conflict, UnknownStackitError],
453
+ input: __S(128, __c8, 0) as any as S.Schema<AddRecipientToSuppressionListRequest>,
454
+ output: __S(129, __c8, 1) as any as S.Schema<Suppression>,
455
+ errors: [BadRequest, NotFound, Conflict],
456
+ serviceErrors: StackitServiceErrors,
469
457
  protocol: StackitProtocol,
470
458
  retry: Retry.Retry,
471
459
  telemetry: TELEMETRY,
@@ -480,9 +468,10 @@ export const createAuthorizedSender: API.OperationMethod<
480
468
  CreateAuthorizedSenderError,
481
469
  StackitOpContext
482
470
  > = /*@__PURE__*/ API.make(() => ({
483
- input: __S(192, __c12, 0) as any as S.Schema<CreateAuthorizedSenderRequest>,
484
- output: __S(193, __c12, 1) as any as S.Schema<CreateAuthorizedSenderResponse>,
485
- errors: [BadRequest, NotFound, Conflict, UnknownStackitError],
471
+ input: __S(144, __c9, 0) as any as S.Schema<CreateAuthorizedSenderRequest>,
472
+ output: __S(145, __c9, 1) as any as S.Schema<CreateAuthorizedSenderResponse>,
473
+ errors: [BadRequest, NotFound, Conflict],
474
+ serviceErrors: StackitServiceErrors,
486
475
  protocol: StackitProtocol,
487
476
  retry: Retry.Retry,
488
477
  telemetry: TELEMETRY,
@@ -497,9 +486,10 @@ export const createSendingDomain: API.OperationMethod<
497
486
  CreateSendingDomainError,
498
487
  StackitOpContext
499
488
  > = /*@__PURE__*/ API.make(() => ({
500
- input: __S(208, __c13, 0) as any as S.Schema<CreateSendingDomainRequest>,
501
- output: __S(240, __c15, 0) as any as S.Schema<CreateSendingDomainResponse>,
502
- errors: [BadRequest, Conflict, UnknownStackitError],
489
+ input: __S(160, __c10, 0) as any as S.Schema<CreateSendingDomainRequest>,
490
+ output: __S(192, __c12, 0) as any as S.Schema<CreateSendingDomainResponse>,
491
+ errors: [BadRequest, Conflict],
492
+ serviceErrors: StackitServiceErrors,
503
493
  protocol: StackitProtocol,
504
494
  retry: Retry.Retry,
505
495
  telemetry: TELEMETRY,
@@ -514,9 +504,10 @@ export const deleteAuthorizedSender: API.OperationMethod<
514
504
  DeleteAuthorizedSenderError,
515
505
  StackitOpContext
516
506
  > = /*@__PURE__*/ API.make(() => ({
517
- input: __S(256, __c16, 0) as any as S.Schema<DeleteAuthorizedSenderRequest>,
518
- output: __S(272, __c17, 0) as any as S.Schema<DeleteAuthorizedSenderResponse>,
519
- errors: [BadRequest, NotFound, Conflict, UnknownStackitError],
507
+ input: __S(208, __c13, 0) as any as S.Schema<DeleteAuthorizedSenderRequest>,
508
+ output: __S(224, __c14, 0) as any as S.Schema<DeleteAuthorizedSenderResponse>,
509
+ errors: [BadRequest, NotFound, Conflict],
510
+ serviceErrors: StackitServiceErrors,
520
511
  protocol: StackitProtocol,
521
512
  retry: Retry.Retry,
522
513
  telemetry: TELEMETRY,
@@ -531,9 +522,10 @@ export const deleteSendingDomain: API.OperationMethod<
531
522
  DeleteSendingDomainError,
532
523
  StackitOpContext
533
524
  > = /*@__PURE__*/ API.make(() => ({
534
- input: __S(288, __c18, 0) as any as S.Schema<DeleteSendingDomainRequest>,
535
- output: __S(272, __c17, 0) as any as S.Schema<DeleteSendingDomainResponse>,
536
- errors: [BadRequest, NotFound, Conflict, UnknownStackitError],
525
+ input: __S(240, __c15, 0) as any as S.Schema<DeleteSendingDomainRequest>,
526
+ output: __S(224, __c14, 0) as any as S.Schema<DeleteSendingDomainResponse>,
527
+ errors: [BadRequest, NotFound, Conflict],
528
+ serviceErrors: StackitServiceErrors,
537
529
  protocol: StackitProtocol,
538
530
  retry: Retry.Retry,
539
531
  telemetry: TELEMETRY,
@@ -548,9 +540,10 @@ export const exportSendingDomainDNSRecords: API.OperationMethod<
548
540
  ExportSendingDomainDNSRecordsError,
549
541
  StackitOpContext
550
542
  > = /*@__PURE__*/ API.make(() => ({
551
- input: __S(304, __c19, 0) as any as S.Schema<ExportSendingDomainDNSRecordsRequest>,
552
- output: __S(305, __c19, 1) as any as S.Schema<ExportSendingDomainDNSRecordsResponse>,
553
- errors: [BadRequest, NotFound, Conflict, UnknownStackitError],
543
+ input: __S(256, __c16, 0) as any as S.Schema<ExportSendingDomainDNSRecordsRequest>,
544
+ output: __S(257, __c16, 1) as any as S.Schema<ExportSendingDomainDNSRecordsResponse>,
545
+ errors: [BadRequest, NotFound, Conflict],
546
+ serviceErrors: StackitServiceErrors,
554
547
  protocol: StackitProtocol,
555
548
  retry: Retry.Retry,
556
549
  telemetry: TELEMETRY,
@@ -565,64 +558,68 @@ export const getAuthorizedSender: API.OperationMethod<
565
558
  GetAuthorizedSenderError,
566
559
  StackitOpContext
567
560
  > = /*@__PURE__*/ API.make(() => ({
568
- input: __S(320, __c20, 0) as any as S.Schema<GetAuthorizedSenderRequest>,
569
- output: __S(336, __c21, 0) as any as S.Schema<GetAuthorizedSenderResponse>,
570
- errors: [BadRequest, NotFound, UnknownStackitError],
561
+ input: __S(272, __c17, 0) as any as S.Schema<GetAuthorizedSenderRequest>,
562
+ output: __S(288, __c18, 0) as any as S.Schema<GetAuthorizedSenderResponse>,
563
+ errors: [BadRequest, NotFound],
564
+ serviceErrors: StackitServiceErrors,
571
565
  protocol: StackitProtocol,
572
566
  retry: Retry.Retry,
573
567
  telemetry: TELEMETRY,
574
568
  span: "GetAuthorizedSender",
575
569
  }));
576
570
 
577
- export type GetSendingDomainError = BadRequest | NotFound | StackitOpError;
578
- /** Get configuration for a sending domain */
579
- export const getSendingDomain: API.OperationMethod<
580
- GetSendingDomainRequest,
581
- GetSendingDomainResponse,
582
- GetSendingDomainError,
571
+ export type GetMessageError = BadRequest | NotFound | StackitOpError;
572
+ /** Get the newest event of a message */
573
+ export const getMessage: API.OperationMethod<
574
+ GetMessageRequest,
575
+ Message,
576
+ GetMessageError,
583
577
  StackitOpContext
584
578
  > = /*@__PURE__*/ API.make(() => ({
585
- input: __S(0, __c0, 0) as any as S.Schema<GetSendingDomainRequest>,
586
- output: __S(10, __c0, 10) as any as S.Schema<GetSendingDomainResponse>,
587
- errors: [BadRequest, NotFound, UnknownStackitError],
579
+ input: __S(16, __c1, 0) as any as S.Schema<GetMessageRequest>,
580
+ output: __S(19, __c1, 3) as any as S.Schema<Message>,
581
+ errors: [BadRequest, NotFound],
582
+ serviceErrors: StackitServiceErrors,
588
583
  protocol: StackitProtocol,
589
584
  retry: Retry.Retry,
590
585
  telemetry: TELEMETRY,
591
- span: "GetSendingDomain",
586
+ span: "GetMessage",
592
587
  }));
593
588
 
594
- export type GetSendingDomainMessageError = BadRequest | NotFound | StackitOpError;
595
- /** Get the newest event of a message */
596
- export const getSendingDomainMessage: API.OperationMethod<
597
- GetSendingDomainMessageRequest,
598
- SendingDomainMessage,
599
- GetSendingDomainMessageError,
589
+ export type GetMetricsError = BadRequest | NotFound | StackitOpError;
590
+ /** Retrieves aggregated email metrics for a sending domain */
591
+ export const getMetrics: API.OperationMethod<
592
+ GetMetricsRequest,
593
+ MetricsResponse,
594
+ GetMetricsError,
600
595
  StackitOpContext
601
596
  > = /*@__PURE__*/ API.make(() => ({
602
- input: __S(16, __c1, 0) as any as S.Schema<GetSendingDomainMessageRequest>,
603
- output: __S(34, __c2, 2) as any as S.Schema<SendingDomainMessage>,
604
- errors: [BadRequest, NotFound, UnknownStackitError],
597
+ input: __S(32, __c2, 0) as any as S.Schema<GetMetricsRequest>,
598
+ output: __S(33, __c2, 1) as any as S.Schema<MetricsResponse>,
599
+ errors: [BadRequest, NotFound],
600
+ serviceErrors: StackitServiceErrors,
605
601
  protocol: StackitProtocol,
606
602
  retry: Retry.Retry,
607
603
  telemetry: TELEMETRY,
608
- span: "GetSendingDomainMessage",
604
+ span: "GetMetrics",
609
605
  }));
610
606
 
611
- export type GetSendingDomainMetricsError = BadRequest | NotFound | StackitOpError;
612
- /** Retrieves aggregated email metrics for a sending domain */
613
- export const getSendingDomainMetrics: API.OperationMethod<
614
- GetSendingDomainMetricsRequest,
615
- MetricsResponse,
616
- GetSendingDomainMetricsError,
607
+ export type GetSendingDomainError = BadRequest | NotFound | StackitOpError;
608
+ /** Get configuration for a sending domain */
609
+ export const getSendingDomain: API.OperationMethod<
610
+ GetSendingDomainRequest,
611
+ GetSendingDomainResponse,
612
+ GetSendingDomainError,
617
613
  StackitOpContext
618
614
  > = /*@__PURE__*/ API.make(() => ({
619
- input: __S(48, __c3, 0) as any as S.Schema<GetSendingDomainMetricsRequest>,
620
- output: __S(49, __c3, 1) as any as S.Schema<MetricsResponse>,
621
- errors: [BadRequest, NotFound, UnknownStackitError],
615
+ input: __S(48, __c3, 0) as any as S.Schema<GetSendingDomainRequest>,
616
+ output: __S(58, __c3, 10) as any as S.Schema<GetSendingDomainResponse>,
617
+ errors: [BadRequest, NotFound],
618
+ serviceErrors: StackitServiceErrors,
622
619
  protocol: StackitProtocol,
623
620
  retry: Retry.Retry,
624
621
  telemetry: TELEMETRY,
625
- span: "GetSendingDomainMetrics",
622
+ span: "GetSendingDomain",
626
623
  }));
627
624
 
628
625
  export type ListAuthorizedSendersError = BadRequest | NotFound | StackitOpError;
@@ -635,30 +632,14 @@ export const listAuthorizedSenders: API.OperationMethod<
635
632
  > = /*@__PURE__*/ API.make(() => ({
636
633
  input: __S(64, __c4, 0) as any as S.Schema<ListAuthorizedSendersRequest>,
637
634
  output: __S(66, __c4, 2) as any as S.Schema<ListAuthorizedSendersResponse>,
638
- errors: [BadRequest, NotFound, UnknownStackitError],
635
+ errors: [BadRequest, NotFound],
636
+ serviceErrors: StackitServiceErrors,
639
637
  protocol: StackitProtocol,
640
638
  retry: Retry.Retry,
641
639
  telemetry: TELEMETRY,
642
640
  span: "ListAuthorizedSenders",
643
641
  }));
644
642
 
645
- export type ListSendingDomainMessagesError = BadRequest | NotFound | StackitOpError;
646
- /** List messages for a specific sending domain */
647
- export const listSendingDomainMessages: API.OperationMethod<
648
- ListSendingDomainMessagesRequest,
649
- ListMessagesResponse,
650
- ListSendingDomainMessagesError,
651
- StackitOpContext
652
- > = /*@__PURE__*/ API.make(() => ({
653
- input: __S(80, __c5, 0) as any as S.Schema<ListSendingDomainMessagesRequest>,
654
- output: __S(82, __c5, 2) as any as S.Schema<ListMessagesResponse>,
655
- errors: [BadRequest, NotFound, UnknownStackitError],
656
- protocol: StackitProtocol,
657
- retry: Retry.Retry,
658
- telemetry: TELEMETRY,
659
- span: "ListSendingDomainMessages",
660
- }));
661
-
662
643
  export type ListSendingDomainsError = BadRequest | StackitOpError;
663
644
  /** List sending domains */
664
645
  export const listSendingDomains: API.OperationMethod<
@@ -667,32 +648,16 @@ export const listSendingDomains: API.OperationMethod<
667
648
  ListSendingDomainsError,
668
649
  StackitOpContext
669
650
  > = /*@__PURE__*/ API.make(() => ({
670
- input: __S(96, __c6, 0) as any as S.Schema<ListSendingDomainsRequest>,
671
- output: __S(98, __c6, 2) as any as S.Schema<ListSendingDomainsResponse>,
672
- errors: [BadRequest, UnknownStackitError],
651
+ input: __S(80, __c5, 0) as any as S.Schema<ListSendingDomainsRequest>,
652
+ output: __S(82, __c5, 2) as any as S.Schema<ListSendingDomainsResponse>,
653
+ errors: [BadRequest],
654
+ serviceErrors: StackitServiceErrors,
673
655
  protocol: StackitProtocol,
674
656
  retry: Retry.Retry,
675
657
  telemetry: TELEMETRY,
676
658
  span: "ListSendingDomains",
677
659
  }));
678
660
 
679
- export type ListSuppressedRecipientsError = BadRequest | NotFound | StackitOpError;
680
- /** List suppressions for a specific sending domain */
681
- export const listSuppressedRecipients: API.OperationMethod<
682
- ListSuppressedRecipientsRequest,
683
- ListSuppressedRecipientsResponse,
684
- ListSuppressedRecipientsError,
685
- StackitOpContext
686
- > = /*@__PURE__*/ API.make(() => ({
687
- input: __S(112, __c7, 0) as any as S.Schema<ListSuppressedRecipientsRequest>,
688
- output: __S(114, __c7, 2) as any as S.Schema<ListSuppressedRecipientsResponse>,
689
- errors: [BadRequest, NotFound, UnknownStackitError],
690
- protocol: StackitProtocol,
691
- retry: Retry.Retry,
692
- telemetry: TELEMETRY,
693
- span: "ListSuppressedRecipients",
694
- }));
695
-
696
661
  export type RemoveRecipientFromSuppressionListError = BadRequest | NotFound | StackitOpError;
697
662
  /** Delete a recipient from the suppression list */
698
663
  export const removeRecipientFromSuppressionList: API.OperationMethod<
@@ -701,9 +666,10 @@ export const removeRecipientFromSuppressionList: API.OperationMethod<
701
666
  RemoveRecipientFromSuppressionListError,
702
667
  StackitOpContext
703
668
  > = /*@__PURE__*/ API.make(() => ({
704
- input: __S(128, __c8, 0) as any as S.Schema<RemoveRecipientFromSuppressionListRequest>,
705
- output: __S(272, __c17, 0) as any as S.Schema<RemoveRecipientFromSuppressionListResponse>,
706
- errors: [BadRequest, NotFound, UnknownStackitError],
669
+ input: __S(96, __c6, 0) as any as S.Schema<RemoveRecipientFromSuppressionListRequest>,
670
+ output: __S(224, __c14, 0) as any as S.Schema<RemoveRecipientFromSuppressionListResponse>,
671
+ errors: [BadRequest, NotFound],
672
+ serviceErrors: StackitServiceErrors,
707
673
  protocol: StackitProtocol,
708
674
  retry: Retry.Retry,
709
675
  telemetry: TELEMETRY,
@@ -718,9 +684,10 @@ export const validateSendingDomain: API.OperationMethod<
718
684
  ValidateSendingDomainError,
719
685
  StackitOpContext
720
686
  > = /*@__PURE__*/ API.make(() => ({
721
- input: __S(144, __c9, 0) as any as S.Schema<ValidateSendingDomainRequest>,
722
- output: __S(272, __c17, 0) as any as S.Schema<ValidateSendingDomainResponse>,
723
- errors: [BadRequest, NotFound, UnknownStackitError],
687
+ input: __S(112, __c7, 0) as any as S.Schema<ValidateSendingDomainRequest>,
688
+ output: __S(224, __c14, 0) as any as S.Schema<ValidateSendingDomainResponse>,
689
+ errors: [BadRequest, NotFound],
690
+ serviceErrors: StackitServiceErrors,
724
691
  protocol: StackitProtocol,
725
692
  retry: Retry.Retry,
726
693
  telemetry: TELEMETRY,
@@ -733,90 +700,10 @@ function __c0(j: number): any {
733
700
  case 0:
734
701
  return S.suspend(() =>
735
702
  S.Struct({
736
- projectId: S.String.pipe(T.Label()),
737
- regionId: S.String.pipe(T.Label()),
738
- sendingDomainId: S.String.pipe(T.Label()),
739
- }).pipe(
740
- T.Http({
741
- method: "GET",
742
- uri: "/v1beta1/projects/{projectId}/regions/{regionId}/sending-domains/{sendingDomainId}",
743
- code: 200,
744
- baseUrl: "https://mailout.api.{region}stackit.cloud",
745
- }),
746
- ),
747
- ).annotate({ identifier: "GetSendingDomainRequest" });
748
- case 1:
749
- return S.suspend(() =>
750
- S.Struct({
751
- host: S.String,
752
- type: S.String,
753
- value: S.String,
754
- }),
755
- ).annotate({ identifier: "DNSRecord" });
756
- case 2:
757
- return S.Array(__S(1, __c0, 1));
758
- case 3:
759
- return S.suspend(() =>
760
- S.Struct({
761
- dkim: S.optional(__S(2, __c0, 2)),
762
- dmarc: S.optional(__S(1, __c0, 1)),
763
- returnPath: S.optional(__S(1, __c0, 1)),
764
- spf: S.optional(__S(1, __c0, 1)),
765
- }),
766
- ).annotate({ identifier: "DNSRecords" });
767
- case 4:
768
- return S.suspend(() =>
769
- S.Struct({
770
- message: S.optional(S.String),
771
- selector: S.optional(S.String),
772
- status: S.String,
773
- }),
774
- ).annotate({ identifier: "DKIMValidationReport" });
775
- case 5:
776
- return S.Array(__S(4, __c0, 4));
777
- case 6:
778
- return S.suspend(() =>
779
- S.Struct({
780
- message: S.optional(S.String),
781
- status: S.String,
782
- }),
783
- ).annotate({ identifier: "ValidationReport" });
784
- case 7:
785
- return S.suspend(() =>
786
- S.Struct({
787
- dkim: S.optional(__S(5, __c0, 5)),
788
- dmarc: S.optional(__S(6, __c0, 6)),
789
- returnPath: S.optional(__S(6, __c0, 6)),
790
- spf: S.optional(__S(6, __c0, 6)),
791
- }),
792
- ).annotate({ identifier: "DomainValidationReport" });
793
- case 8:
794
- return S.suspend(() =>
795
- S.Struct({
796
- lastValidationTime: S.optional(S.String),
797
- status: S.optional(S.String),
798
- validationReport: S.optional(__S(7, __c0, 7)),
799
- }),
800
- ).annotate({ identifier: "DomainValidationStatus" });
801
- case 9:
802
- return S.suspend(() =>
803
- S.Struct({
804
- dnsRecords: S.optional(__S(3, __c0, 3)),
805
- domainValidationStatus: S.optional(__S(8, __c0, 8)),
806
- region: S.optional(S.String),
807
- }),
808
- ).annotate({ identifier: "SendingDomainConfig" });
809
- case 10:
810
- return S.suspend(() =>
811
- S.Struct({
812
- blockedUntil: S.optional(S.String),
813
- domain: S.String,
814
- id: S.String,
815
- messages: S.optional(__S(224, __c14, 0)),
816
- state: S.String,
817
- config: __S(9, __c0, 9),
703
+ code: S.String,
704
+ message: S.String,
818
705
  }),
819
- ).annotate({ identifier: "GetSendingDomainResponse" });
706
+ ).annotate({ identifier: "ErrorResponse" });
820
707
  }
821
708
  }
822
709
  function __c1(j: number): any {
@@ -836,12 +723,8 @@ function __c1(j: number): any {
836
723
  baseUrl: "https://mailout.api.{region}stackit.cloud",
837
724
  }),
838
725
  ),
839
- ).annotate({ identifier: "GetSendingDomainMessageRequest" });
840
- }
841
- }
842
- function __c2(j: number): any {
843
- switch (j) {
844
- case 0:
726
+ ).annotate({ identifier: "GetMessageRequest" });
727
+ case 1:
845
728
  return S.suspend(() =>
846
729
  S.Struct({
847
730
  accepted_at: S.optional(S.String),
@@ -863,19 +746,19 @@ function __c2(j: number): any {
863
746
  timestamp: S.Number,
864
747
  to: S.String,
865
748
  }),
866
- ).annotate({ identifier: "SendingDomainMessageDetails" });
867
- case 1:
868
- return S.Record(S.String, S.String);
749
+ ).annotate({ identifier: "MessageDetails" });
869
750
  case 2:
751
+ return S.Record(S.String, S.String);
752
+ case 3:
870
753
  return S.suspend(() =>
871
754
  S.Struct({
872
- details: __S(32, __c2, 0),
873
- headers: __S(33, __c2, 1),
755
+ details: __S(17, __c1, 1),
756
+ headers: __S(18, __c1, 2),
874
757
  }),
875
- ).annotate({ identifier: "SendingDomainMessage" });
758
+ ).annotate({ identifier: "Message" });
876
759
  }
877
760
  }
878
- function __c3(j: number): any {
761
+ function __c2(j: number): any {
879
762
  switch (j) {
880
763
  case 0:
881
764
  return S.suspend(() =>
@@ -894,7 +777,7 @@ function __c3(j: number): any {
894
777
  baseUrl: "https://mailout.api.{region}stackit.cloud",
895
778
  }),
896
779
  ),
897
- ).annotate({ identifier: "GetSendingDomainMetricsRequest" });
780
+ ).annotate({ identifier: "GetMetricsRequest" });
898
781
  case 1:
899
782
  return S.suspend(() =>
900
783
  S.Struct({
@@ -908,7 +791,7 @@ function __c3(j: number): any {
908
791
  ).annotate({ identifier: "MetricsResponse" });
909
792
  }
910
793
  }
911
- function __c4(j: number): any {
794
+ function __c3(j: number): any {
912
795
  switch (j) {
913
796
  case 0:
914
797
  return S.suspend(() =>
@@ -919,110 +802,140 @@ function __c4(j: number): any {
919
802
  }).pipe(
920
803
  T.Http({
921
804
  method: "GET",
922
- uri: "/v1beta1/projects/{projectId}/regions/{regionId}/sending-domains/{sendingDomainId}/authorized-senders",
805
+ uri: "/v1beta1/projects/{projectId}/regions/{regionId}/sending-domains/{sendingDomainId}",
923
806
  code: 200,
924
807
  baseUrl: "https://mailout.api.{region}stackit.cloud",
925
808
  }),
926
809
  ),
927
- ).annotate({ identifier: "ListAuthorizedSendersRequest" });
810
+ ).annotate({ identifier: "GetSendingDomainRequest" });
928
811
  case 1:
929
- return S.Array(__S(336, __c21, 0));
812
+ return S.suspend(() =>
813
+ S.Struct({
814
+ host: S.String,
815
+ type: S.String,
816
+ value: S.String,
817
+ }),
818
+ ).annotate({ identifier: "DNSRecord" });
930
819
  case 2:
820
+ return S.Array(__S(49, __c3, 1));
821
+ case 3:
931
822
  return S.suspend(() =>
932
823
  S.Struct({
933
- items: __S(65, __c4, 1),
824
+ dkim: S.optional(__S(50, __c3, 2)),
825
+ dmarc: S.optional(__S(49, __c3, 1)),
826
+ returnPath: S.optional(__S(49, __c3, 1)),
827
+ spf: S.optional(__S(49, __c3, 1)),
934
828
  }),
935
- ).annotate({ identifier: "ListAuthorizedSendersResponse" });
936
- }
937
- }
938
- function __c5(j: number): any {
939
- switch (j) {
940
- case 0:
829
+ ).annotate({ identifier: "DNSRecords" });
830
+ case 4:
941
831
  return S.suspend(() =>
942
832
  S.Struct({
943
- projectId: S.String.pipe(T.Label()),
944
- regionId: S.String.pipe(T.Label()),
945
- sendingDomainId: S.String.pipe(T.Label()),
946
- limit: S.optional(S.Number.pipe(T.Query())),
947
- cursor: S.optional(S.String.pipe(T.Query())),
948
- state: S.optional(S.String.pipe(T.Query())),
949
- subject: S.optional(S.String.pipe(T.Query())),
950
- sender: S.optional(S.String.pipe(T.Query())),
951
- recipient: S.optional(S.String.pipe(T.Query())),
952
- }).pipe(
953
- T.Http({
954
- method: "GET",
955
- uri: "/v1beta1/projects/{projectId}/regions/{regionId}/sending-domains/{sendingDomainId}/messages",
956
- code: 200,
957
- baseUrl: "https://mailout.api.{region}stackit.cloud",
958
- }),
959
- ),
960
- ).annotate({ identifier: "ListSendingDomainMessagesRequest" });
961
- case 1:
962
- return S.Array(__S(34, __c2, 2));
963
- case 2:
833
+ message: S.optional(S.String),
834
+ selector: S.optional(S.String),
835
+ status: S.String,
836
+ }),
837
+ ).annotate({ identifier: "DKIMValidationReport" });
838
+ case 5:
839
+ return S.Array(__S(52, __c3, 4));
840
+ case 6:
964
841
  return S.suspend(() =>
965
842
  S.Struct({
966
- items: __S(81, __c5, 1),
967
- nextCursor: S.optional(S.String),
843
+ message: S.optional(S.String),
844
+ status: S.String,
845
+ }),
846
+ ).annotate({ identifier: "ValidationReport" });
847
+ case 7:
848
+ return S.suspend(() =>
849
+ S.Struct({
850
+ dkim: S.optional(__S(53, __c3, 5)),
851
+ dmarc: S.optional(__S(54, __c3, 6)),
852
+ returnPath: S.optional(__S(54, __c3, 6)),
853
+ spf: S.optional(__S(54, __c3, 6)),
854
+ }),
855
+ ).annotate({ identifier: "DomainValidationReport" });
856
+ case 8:
857
+ return S.suspend(() =>
858
+ S.Struct({
859
+ lastValidationTime: S.optional(S.String),
860
+ status: S.optional(S.String),
861
+ validationReport: S.optional(__S(55, __c3, 7)),
862
+ }),
863
+ ).annotate({ identifier: "DomainValidationStatus" });
864
+ case 9:
865
+ return S.suspend(() =>
866
+ S.Struct({
867
+ dnsRecords: S.optional(__S(51, __c3, 3)),
868
+ domainValidationStatus: S.optional(__S(56, __c3, 8)),
869
+ region: S.optional(S.String),
870
+ }),
871
+ ).annotate({ identifier: "SendingDomainConfig" });
872
+ case 10:
873
+ return S.suspend(() =>
874
+ S.Struct({
875
+ blockedUntil: S.optional(S.String),
876
+ domain: S.String,
877
+ id: S.String,
878
+ messages: S.optional(__S(176, __c11, 0)),
879
+ state: S.String,
880
+ config: __S(57, __c3, 9),
968
881
  }),
969
- ).annotate({ identifier: "ListMessagesResponse" });
882
+ ).annotate({ identifier: "GetSendingDomainResponse" });
970
883
  }
971
884
  }
972
- function __c6(j: number): any {
885
+ function __c4(j: number): any {
973
886
  switch (j) {
974
887
  case 0:
975
888
  return S.suspend(() =>
976
889
  S.Struct({
977
890
  projectId: S.String.pipe(T.Label()),
978
891
  regionId: S.String.pipe(T.Label()),
892
+ sendingDomainId: S.String.pipe(T.Label()),
979
893
  }).pipe(
980
894
  T.Http({
981
895
  method: "GET",
982
- uri: "/v1beta1/projects/{projectId}/regions/{regionId}/sending-domains",
896
+ uri: "/v1beta1/projects/{projectId}/regions/{regionId}/sending-domains/{sendingDomainId}/authorized-senders",
983
897
  code: 200,
984
898
  baseUrl: "https://mailout.api.{region}stackit.cloud",
985
899
  }),
986
900
  ),
987
- ).annotate({ identifier: "ListSendingDomainsRequest" });
901
+ ).annotate({ identifier: "ListAuthorizedSendersRequest" });
988
902
  case 1:
989
- return S.Array(__S(240, __c15, 0));
903
+ return S.Array(__S(288, __c18, 0));
990
904
  case 2:
991
905
  return S.suspend(() =>
992
906
  S.Struct({
993
- items: __S(97, __c6, 1),
907
+ items: __S(65, __c4, 1),
994
908
  }),
995
- ).annotate({ identifier: "ListSendingDomainsResponse" });
909
+ ).annotate({ identifier: "ListAuthorizedSendersResponse" });
996
910
  }
997
911
  }
998
- function __c7(j: number): any {
912
+ function __c5(j: number): any {
999
913
  switch (j) {
1000
914
  case 0:
1001
915
  return S.suspend(() =>
1002
916
  S.Struct({
1003
917
  projectId: S.String.pipe(T.Label()),
1004
918
  regionId: S.String.pipe(T.Label()),
1005
- sendingDomainId: S.String.pipe(T.Label()),
1006
919
  }).pipe(
1007
920
  T.Http({
1008
921
  method: "GET",
1009
- uri: "/v1beta1/projects/{projectId}/regions/{regionId}/sending-domains/{sendingDomainId}/suppressions",
922
+ uri: "/v1beta1/projects/{projectId}/regions/{regionId}/sending-domains",
1010
923
  code: 200,
1011
924
  baseUrl: "https://mailout.api.{region}stackit.cloud",
1012
925
  }),
1013
926
  ),
1014
- ).annotate({ identifier: "ListSuppressedRecipientsRequest" });
927
+ ).annotate({ identifier: "ListSendingDomainsRequest" });
1015
928
  case 1:
1016
- return S.Array(__S(176, __c11, 0));
929
+ return S.Array(__S(192, __c12, 0));
1017
930
  case 2:
1018
931
  return S.suspend(() =>
1019
932
  S.Struct({
1020
- items: __S(113, __c7, 1),
933
+ items: __S(81, __c5, 1),
1021
934
  }),
1022
- ).annotate({ identifier: "ListSuppressedRecipientsResponse" });
935
+ ).annotate({ identifier: "ListSendingDomainsResponse" });
1023
936
  }
1024
937
  }
1025
- function __c8(j: number): any {
938
+ function __c6(j: number): any {
1026
939
  switch (j) {
1027
940
  case 0:
1028
941
  return S.suspend(() =>
@@ -1042,7 +955,7 @@ function __c8(j: number): any {
1042
955
  ).annotate({ identifier: "RemoveRecipientFromSuppressionListRequest" });
1043
956
  }
1044
957
  }
1045
- function __c9(j: number): any {
958
+ function __c7(j: number): any {
1046
959
  switch (j) {
1047
960
  case 0:
1048
961
  return S.suspend(() =>
@@ -1061,7 +974,7 @@ function __c9(j: number): any {
1061
974
  ).annotate({ identifier: "ValidateSendingDomainRequest" });
1062
975
  }
1063
976
  }
1064
- function __c10(j: number): any {
977
+ function __c8(j: number): any {
1065
978
  switch (j) {
1066
979
  case 0:
1067
980
  return S.suspend(() =>
@@ -1079,11 +992,7 @@ function __c10(j: number): any {
1079
992
  }),
1080
993
  ),
1081
994
  ).annotate({ identifier: "AddRecipientToSuppressionListRequest" });
1082
- }
1083
- }
1084
- function __c11(j: number): any {
1085
- switch (j) {
1086
- case 0:
995
+ case 1:
1087
996
  return S.suspend(() =>
1088
997
  S.Struct({
1089
998
  addedAt: S.String,
@@ -1096,7 +1005,7 @@ function __c11(j: number): any {
1096
1005
  ).annotate({ identifier: "Suppression" });
1097
1006
  }
1098
1007
  }
1099
- function __c12(j: number): any {
1008
+ function __c9(j: number): any {
1100
1009
  switch (j) {
1101
1010
  case 0:
1102
1011
  return S.suspend(() =>
@@ -1127,7 +1036,7 @@ function __c12(j: number): any {
1127
1036
  ).annotate({ identifier: "CreateAuthorizedSenderResponse" });
1128
1037
  }
1129
1038
  }
1130
- function __c13(j: number): any {
1039
+ function __c10(j: number): any {
1131
1040
  switch (j) {
1132
1041
  case 0:
1133
1042
  return S.suspend(() =>
@@ -1146,13 +1055,13 @@ function __c13(j: number): any {
1146
1055
  ).annotate({ identifier: "CreateSendingDomainRequest" });
1147
1056
  }
1148
1057
  }
1149
- function __c14(j: number): any {
1058
+ function __c11(j: number): any {
1150
1059
  switch (j) {
1151
1060
  case 0:
1152
1061
  return S.Array(S.String);
1153
1062
  }
1154
1063
  }
1155
- function __c15(j: number): any {
1064
+ function __c12(j: number): any {
1156
1065
  switch (j) {
1157
1066
  case 0:
1158
1067
  return S.suspend(() =>
@@ -1160,13 +1069,13 @@ function __c15(j: number): any {
1160
1069
  blockedUntil: S.optional(S.String),
1161
1070
  domain: S.String,
1162
1071
  id: S.String,
1163
- messages: S.optional(__S(224, __c14, 0)),
1072
+ messages: S.optional(__S(176, __c11, 0)),
1164
1073
  state: S.String,
1165
1074
  }),
1166
1075
  ).annotate({ identifier: "CreateSendingDomainResponse" });
1167
1076
  }
1168
1077
  }
1169
- function __c16(j: number): any {
1078
+ function __c13(j: number): any {
1170
1079
  switch (j) {
1171
1080
  case 0:
1172
1081
  return S.suspend(() =>
@@ -1186,7 +1095,7 @@ function __c16(j: number): any {
1186
1095
  ).annotate({ identifier: "DeleteAuthorizedSenderRequest" });
1187
1096
  }
1188
1097
  }
1189
- function __c17(j: number): any {
1098
+ function __c14(j: number): any {
1190
1099
  switch (j) {
1191
1100
  case 0:
1192
1101
  return S.suspend(() => S.Struct({})).annotate({
@@ -1194,7 +1103,7 @@ function __c17(j: number): any {
1194
1103
  });
1195
1104
  }
1196
1105
  }
1197
- function __c18(j: number): any {
1106
+ function __c15(j: number): any {
1198
1107
  switch (j) {
1199
1108
  case 0:
1200
1109
  return S.suspend(() =>
@@ -1213,7 +1122,7 @@ function __c18(j: number): any {
1213
1122
  ).annotate({ identifier: "DeleteSendingDomainRequest" });
1214
1123
  }
1215
1124
  }
1216
- function __c19(j: number): any {
1125
+ function __c16(j: number): any {
1217
1126
  switch (j) {
1218
1127
  case 0:
1219
1128
  return S.suspend(() =>
@@ -1237,7 +1146,7 @@ function __c19(j: number): any {
1237
1146
  });
1238
1147
  }
1239
1148
  }
1240
- function __c20(j: number): any {
1149
+ function __c17(j: number): any {
1241
1150
  switch (j) {
1242
1151
  case 0:
1243
1152
  return S.suspend(() =>
@@ -1257,7 +1166,7 @@ function __c20(j: number): any {
1257
1166
  ).annotate({ identifier: "GetAuthorizedSenderRequest" });
1258
1167
  }
1259
1168
  }
1260
- function __c21(j: number): any {
1169
+ function __c18(j: number): any {
1261
1170
  switch (j) {
1262
1171
  case 0:
1263
1172
  return S.suspend(() =>