@distilled.cloud/cloudflare 0.0.0-john

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 (562) hide show
  1. package/README.md +59 -0
  2. package/lib/auth.d.ts +14 -0
  3. package/lib/auth.d.ts.map +1 -0
  4. package/lib/auth.js +13 -0
  5. package/lib/auth.js.map +1 -0
  6. package/lib/category.d.ts +2 -0
  7. package/lib/category.d.ts.map +1 -0
  8. package/lib/category.js +2 -0
  9. package/lib/category.js.map +1 -0
  10. package/lib/client/api.d.ts +12 -0
  11. package/lib/client/api.d.ts.map +1 -0
  12. package/lib/client/api.js +292 -0
  13. package/lib/client/api.js.map +1 -0
  14. package/lib/client/index.d.ts +8 -0
  15. package/lib/client/index.d.ts.map +1 -0
  16. package/lib/client/index.js +8 -0
  17. package/lib/client/index.js.map +1 -0
  18. package/lib/credentials.d.ts +68 -0
  19. package/lib/credentials.d.ts.map +1 -0
  20. package/lib/credentials.js +136 -0
  21. package/lib/credentials.js.map +1 -0
  22. package/lib/errors.d.ts +48 -0
  23. package/lib/errors.d.ts.map +1 -0
  24. package/lib/errors.js +31 -0
  25. package/lib/errors.js.map +1 -0
  26. package/lib/index.d.ts +10 -0
  27. package/lib/index.d.ts.map +1 -0
  28. package/lib/index.js +10 -0
  29. package/lib/index.js.map +1 -0
  30. package/lib/retry.d.ts +14 -0
  31. package/lib/retry.d.ts.map +1 -0
  32. package/lib/retry.js +14 -0
  33. package/lib/retry.js.map +1 -0
  34. package/lib/schemas.d.ts +29 -0
  35. package/lib/schemas.d.ts.map +1 -0
  36. package/lib/schemas.js +34 -0
  37. package/lib/schemas.js.map +1 -0
  38. package/lib/sensitive.d.ts +5 -0
  39. package/lib/sensitive.d.ts.map +1 -0
  40. package/lib/sensitive.js +5 -0
  41. package/lib/sensitive.js.map +1 -0
  42. package/lib/services/abuse-reports.d.ts +296 -0
  43. package/lib/services/abuse-reports.d.ts.map +1 -0
  44. package/lib/services/abuse-reports.js +414 -0
  45. package/lib/services/abuse-reports.js.map +1 -0
  46. package/lib/services/accounts.d.ts +766 -0
  47. package/lib/services/accounts.d.ts.map +1 -0
  48. package/lib/services/accounts.js +860 -0
  49. package/lib/services/accounts.js.map +1 -0
  50. package/lib/services/acm.d.ts +73 -0
  51. package/lib/services/acm.d.ts.map +1 -0
  52. package/lib/services/acm.js +80 -0
  53. package/lib/services/acm.js.map +1 -0
  54. package/lib/services/addressing.d.ts +1321 -0
  55. package/lib/services/addressing.d.ts.map +1 -0
  56. package/lib/services/addressing.js +1863 -0
  57. package/lib/services/addressing.js.map +1 -0
  58. package/lib/services/ai-gateway.d.ts +1137 -0
  59. package/lib/services/ai-gateway.d.ts.map +1 -0
  60. package/lib/services/ai-gateway.js +1830 -0
  61. package/lib/services/ai-gateway.js.map +1 -0
  62. package/lib/services/ai.d.ts +297 -0
  63. package/lib/services/ai.d.ts.map +1 -0
  64. package/lib/services/ai.js +352 -0
  65. package/lib/services/ai.js.map +1 -0
  66. package/lib/services/aisearch.d.ts +1069 -0
  67. package/lib/services/aisearch.d.ts.map +1 -0
  68. package/lib/services/aisearch.js +2542 -0
  69. package/lib/services/aisearch.js.map +1 -0
  70. package/lib/services/alerting.d.ts +855 -0
  71. package/lib/services/alerting.d.ts.map +1 -0
  72. package/lib/services/alerting.js +1445 -0
  73. package/lib/services/alerting.js.map +1 -0
  74. package/lib/services/api-gateway.d.ts +1088 -0
  75. package/lib/services/api-gateway.d.ts.map +1 -0
  76. package/lib/services/api-gateway.js +1655 -0
  77. package/lib/services/api-gateway.js.map +1 -0
  78. package/lib/services/argo.d.ts +101 -0
  79. package/lib/services/argo.d.ts.map +1 -0
  80. package/lib/services/argo.js +113 -0
  81. package/lib/services/argo.js.map +1 -0
  82. package/lib/services/audit-logs.d.ts +46 -0
  83. package/lib/services/audit-logs.d.ts.map +1 -0
  84. package/lib/services/audit-logs.js +37 -0
  85. package/lib/services/audit-logs.js.map +1 -0
  86. package/lib/services/billing.d.ts +62 -0
  87. package/lib/services/billing.d.ts.map +1 -0
  88. package/lib/services/billing.js +102 -0
  89. package/lib/services/billing.js.map +1 -0
  90. package/lib/services/bot-management.d.ts +124 -0
  91. package/lib/services/bot-management.d.ts.map +1 -0
  92. package/lib/services/bot-management.js +262 -0
  93. package/lib/services/bot-management.js.map +1 -0
  94. package/lib/services/botnet-feed.d.ts +65 -0
  95. package/lib/services/botnet-feed.d.ts.map +1 -0
  96. package/lib/services/botnet-feed.js +88 -0
  97. package/lib/services/botnet-feed.js.map +1 -0
  98. package/lib/services/brand-protection.d.ts +194 -0
  99. package/lib/services/brand-protection.d.ts.map +1 -0
  100. package/lib/services/brand-protection.js +221 -0
  101. package/lib/services/brand-protection.js.map +1 -0
  102. package/lib/services/browser-rendering.d.ts +857 -0
  103. package/lib/services/browser-rendering.d.ts.map +1 -0
  104. package/lib/services/browser-rendering.js +1142 -0
  105. package/lib/services/browser-rendering.js.map +1 -0
  106. package/lib/services/cache.d.ts +287 -0
  107. package/lib/services/cache.d.ts.map +1 -0
  108. package/lib/services/cache.js +354 -0
  109. package/lib/services/cache.js.map +1 -0
  110. package/lib/services/calls.d.ts +223 -0
  111. package/lib/services/calls.d.ts.map +1 -0
  112. package/lib/services/calls.js +188 -0
  113. package/lib/services/calls.js.map +1 -0
  114. package/lib/services/certificate-authorities.d.ts +40 -0
  115. package/lib/services/certificate-authorities.d.ts.map +1 -0
  116. package/lib/services/certificate-authorities.js +49 -0
  117. package/lib/services/certificate-authorities.js.map +1 -0
  118. package/lib/services/client-certificates.d.ts +288 -0
  119. package/lib/services/client-certificates.d.ts.map +1 -0
  120. package/lib/services/client-certificates.js +379 -0
  121. package/lib/services/client-certificates.js.map +1 -0
  122. package/lib/services/cloud-connector.d.ts +88 -0
  123. package/lib/services/cloud-connector.d.ts.map +1 -0
  124. package/lib/services/cloud-connector.js +97 -0
  125. package/lib/services/cloud-connector.js.map +1 -0
  126. package/lib/services/cloudforce-one.d.ts +1387 -0
  127. package/lib/services/cloudforce-one.d.ts.map +1 -0
  128. package/lib/services/cloudforce-one.js +1741 -0
  129. package/lib/services/cloudforce-one.js.map +1 -0
  130. package/lib/services/connectivity.d.ts +291 -0
  131. package/lib/services/connectivity.d.ts.map +1 -0
  132. package/lib/services/connectivity.js +404 -0
  133. package/lib/services/connectivity.js.map +1 -0
  134. package/lib/services/content-scanning.d.ts +156 -0
  135. package/lib/services/content-scanning.d.ts.map +1 -0
  136. package/lib/services/content-scanning.js +175 -0
  137. package/lib/services/content-scanning.js.map +1 -0
  138. package/lib/services/custom-certificates.d.ts +240 -0
  139. package/lib/services/custom-certificates.d.ts.map +1 -0
  140. package/lib/services/custom-certificates.js +336 -0
  141. package/lib/services/custom-certificates.js.map +1 -0
  142. package/lib/services/custom-hostnames.d.ts +590 -0
  143. package/lib/services/custom-hostnames.d.ts.map +1 -0
  144. package/lib/services/custom-hostnames.js +1204 -0
  145. package/lib/services/custom-hostnames.js.map +1 -0
  146. package/lib/services/custom-nameservers.d.ts +87 -0
  147. package/lib/services/custom-nameservers.d.ts.map +1 -0
  148. package/lib/services/custom-nameservers.js +95 -0
  149. package/lib/services/custom-nameservers.js.map +1 -0
  150. package/lib/services/custom-pages.d.ts +89 -0
  151. package/lib/services/custom-pages.d.ts.map +1 -0
  152. package/lib/services/custom-pages.js +140 -0
  153. package/lib/services/custom-pages.js.map +1 -0
  154. package/lib/services/d1.d.ts +392 -0
  155. package/lib/services/d1.d.ts.map +1 -0
  156. package/lib/services/d1.js +487 -0
  157. package/lib/services/d1.js.map +1 -0
  158. package/lib/services/dcv-delegation.d.ts +24 -0
  159. package/lib/services/dcv-delegation.d.ts.map +1 -0
  160. package/lib/services/dcv-delegation.js +24 -0
  161. package/lib/services/dcv-delegation.js.map +1 -0
  162. package/lib/services/diagnostics.d.ts +208 -0
  163. package/lib/services/diagnostics.d.ts.map +1 -0
  164. package/lib/services/diagnostics.js +288 -0
  165. package/lib/services/diagnostics.js.map +1 -0
  166. package/lib/services/dns-firewall.d.ts +317 -0
  167. package/lib/services/dns-firewall.d.ts.map +1 -0
  168. package/lib/services/dns-firewall.js +400 -0
  169. package/lib/services/dns-firewall.js.map +1 -0
  170. package/lib/services/dns.d.ts +3065 -0
  171. package/lib/services/dns.d.ts.map +1 -0
  172. package/lib/services/dns.js +4627 -0
  173. package/lib/services/dns.js.map +1 -0
  174. package/lib/services/durable-objects.d.ts +92 -0
  175. package/lib/services/durable-objects.d.ts.map +1 -0
  176. package/lib/services/durable-objects.js +103 -0
  177. package/lib/services/durable-objects.js.map +1 -0
  178. package/lib/services/email-routing.d.ts +598 -0
  179. package/lib/services/email-routing.d.ts.map +1 -0
  180. package/lib/services/email-routing.js +715 -0
  181. package/lib/services/email-routing.js.map +1 -0
  182. package/lib/services/email-security.d.ts +1389 -0
  183. package/lib/services/email-security.d.ts.map +1 -0
  184. package/lib/services/email-security.js +2261 -0
  185. package/lib/services/email-security.js.map +1 -0
  186. package/lib/services/filters.d.ts +197 -0
  187. package/lib/services/filters.d.ts.map +1 -0
  188. package/lib/services/filters.js +168 -0
  189. package/lib/services/filters.js.map +1 -0
  190. package/lib/services/firewall.d.ts +1352 -0
  191. package/lib/services/firewall.d.ts.map +1 -0
  192. package/lib/services/firewall.js +2084 -0
  193. package/lib/services/firewall.js.map +1 -0
  194. package/lib/services/healthchecks.d.ts +507 -0
  195. package/lib/services/healthchecks.d.ts.map +1 -0
  196. package/lib/services/healthchecks.js +867 -0
  197. package/lib/services/healthchecks.js.map +1 -0
  198. package/lib/services/hostnames.d.ts +86 -0
  199. package/lib/services/hostnames.d.ts.map +1 -0
  200. package/lib/services/hostnames.js +111 -0
  201. package/lib/services/hostnames.js.map +1 -0
  202. package/lib/services/hyperdrive.d.ts +203 -0
  203. package/lib/services/hyperdrive.d.ts.map +1 -0
  204. package/lib/services/hyperdrive.js +300 -0
  205. package/lib/services/hyperdrive.js.map +1 -0
  206. package/lib/services/iam.d.ts +657 -0
  207. package/lib/services/iam.d.ts.map +1 -0
  208. package/lib/services/iam.js +843 -0
  209. package/lib/services/iam.js.map +1 -0
  210. package/lib/services/images.d.ts +427 -0
  211. package/lib/services/images.d.ts.map +1 -0
  212. package/lib/services/images.js +444 -0
  213. package/lib/services/images.js.map +1 -0
  214. package/lib/services/intel.d.ts +865 -0
  215. package/lib/services/intel.d.ts.map +1 -0
  216. package/lib/services/intel.js +1266 -0
  217. package/lib/services/intel.js.map +1 -0
  218. package/lib/services/ips.d.ts +28 -0
  219. package/lib/services/ips.d.ts.map +1 -0
  220. package/lib/services/ips.js +39 -0
  221. package/lib/services/ips.js.map +1 -0
  222. package/lib/services/keyless-certificates.d.ts +197 -0
  223. package/lib/services/keyless-certificates.d.ts.map +1 -0
  224. package/lib/services/keyless-certificates.js +229 -0
  225. package/lib/services/keyless-certificates.js.map +1 -0
  226. package/lib/services/kv.d.ts +369 -0
  227. package/lib/services/kv.d.ts.map +1 -0
  228. package/lib/services/kv.js +453 -0
  229. package/lib/services/kv.js.map +1 -0
  230. package/lib/services/leaked-credential-checks.d.ts +129 -0
  231. package/lib/services/leaked-credential-checks.d.ts.map +1 -0
  232. package/lib/services/leaked-credential-checks.js +138 -0
  233. package/lib/services/leaked-credential-checks.js.map +1 -0
  234. package/lib/services/load-balancers.d.ts +1973 -0
  235. package/lib/services/load-balancers.d.ts.map +1 -0
  236. package/lib/services/load-balancers.js +3181 -0
  237. package/lib/services/load-balancers.js.map +1 -0
  238. package/lib/services/logpush.d.ts +401 -0
  239. package/lib/services/logpush.d.ts.map +1 -0
  240. package/lib/services/logpush.js +732 -0
  241. package/lib/services/logpush.js.map +1 -0
  242. package/lib/services/logs.d.ts +125 -0
  243. package/lib/services/logs.d.ts.map +1 -0
  244. package/lib/services/logs.js +149 -0
  245. package/lib/services/logs.js.map +1 -0
  246. package/lib/services/magic-cloud-networking.d.ts +1892 -0
  247. package/lib/services/magic-cloud-networking.d.ts.map +1 -0
  248. package/lib/services/magic-cloud-networking.js +5291 -0
  249. package/lib/services/magic-cloud-networking.js.map +1 -0
  250. package/lib/services/magic-network-monitoring.d.ts +379 -0
  251. package/lib/services/magic-network-monitoring.d.ts.map +1 -0
  252. package/lib/services/magic-network-monitoring.js +557 -0
  253. package/lib/services/magic-network-monitoring.js.map +1 -0
  254. package/lib/services/magic-transit.d.ts +3886 -0
  255. package/lib/services/magic-transit.d.ts.map +1 -0
  256. package/lib/services/magic-transit.js +6284 -0
  257. package/lib/services/magic-transit.js.map +1 -0
  258. package/lib/services/managed-transforms.d.ts +79 -0
  259. package/lib/services/managed-transforms.d.ts.map +1 -0
  260. package/lib/services/managed-transforms.js +111 -0
  261. package/lib/services/managed-transforms.js.map +1 -0
  262. package/lib/services/memberships.d.ts +204 -0
  263. package/lib/services/memberships.d.ts.map +1 -0
  264. package/lib/services/memberships.js +308 -0
  265. package/lib/services/memberships.js.map +1 -0
  266. package/lib/services/mtls-certificates.d.ts +164 -0
  267. package/lib/services/mtls-certificates.d.ts.map +1 -0
  268. package/lib/services/mtls-certificates.js +192 -0
  269. package/lib/services/mtls-certificates.js.map +1 -0
  270. package/lib/services/network-interconnects.d.ts +410 -0
  271. package/lib/services/network-interconnects.d.ts.map +1 -0
  272. package/lib/services/network-interconnects.js +583 -0
  273. package/lib/services/network-interconnects.js.map +1 -0
  274. package/lib/services/organizations.d.ts +232 -0
  275. package/lib/services/organizations.d.ts.map +1 -0
  276. package/lib/services/organizations.js +370 -0
  277. package/lib/services/organizations.js.map +1 -0
  278. package/lib/services/origin-ca-certificates.d.ts +119 -0
  279. package/lib/services/origin-ca-certificates.d.ts.map +1 -0
  280. package/lib/services/origin-ca-certificates.js +183 -0
  281. package/lib/services/origin-ca-certificates.js.map +1 -0
  282. package/lib/services/origin-post-quantum-encryption.d.ts +50 -0
  283. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -0
  284. package/lib/services/origin-post-quantum-encryption.js +64 -0
  285. package/lib/services/origin-post-quantum-encryption.js.map +1 -0
  286. package/lib/services/origin-tls-client-auth.d.ts +308 -0
  287. package/lib/services/origin-tls-client-auth.d.ts.map +1 -0
  288. package/lib/services/origin-tls-client-auth.js +435 -0
  289. package/lib/services/origin-tls-client-auth.js.map +1 -0
  290. package/lib/services/page-rules.d.ts +773 -0
  291. package/lib/services/page-rules.d.ts.map +1 -0
  292. package/lib/services/page-rules.js +1373 -0
  293. package/lib/services/page-rules.js.map +1 -0
  294. package/lib/services/page-shield.d.ts +505 -0
  295. package/lib/services/page-shield.d.ts.map +1 -0
  296. package/lib/services/page-shield.js +520 -0
  297. package/lib/services/page-shield.js.map +1 -0
  298. package/lib/services/pages.d.ts +1949 -0
  299. package/lib/services/pages.d.ts.map +1 -0
  300. package/lib/services/pages.js +3030 -0
  301. package/lib/services/pages.js.map +1 -0
  302. package/lib/services/pipelines.d.ts +1716 -0
  303. package/lib/services/pipelines.d.ts.map +1 -0
  304. package/lib/services/pipelines.js +2991 -0
  305. package/lib/services/pipelines.js.map +1 -0
  306. package/lib/services/queues.d.ts +904 -0
  307. package/lib/services/queues.d.ts.map +1 -0
  308. package/lib/services/queues.js +1250 -0
  309. package/lib/services/queues.js.map +1 -0
  310. package/lib/services/r2-data-catalog.d.ts +341 -0
  311. package/lib/services/r2-data-catalog.d.ts.map +1 -0
  312. package/lib/services/r2-data-catalog.js +513 -0
  313. package/lib/services/r2-data-catalog.js.map +1 -0
  314. package/lib/services/r2.d.ts +1087 -0
  315. package/lib/services/r2.d.ts.map +1 -0
  316. package/lib/services/r2.js +1404 -0
  317. package/lib/services/r2.js.map +1 -0
  318. package/lib/services/radar.d.ts +9365 -0
  319. package/lib/services/radar.d.ts.map +1 -0
  320. package/lib/services/radar.js +20552 -0
  321. package/lib/services/radar.js.map +1 -0
  322. package/lib/services/rate-limits.d.ts +360 -0
  323. package/lib/services/rate-limits.d.ts.map +1 -0
  324. package/lib/services/rate-limits.js +545 -0
  325. package/lib/services/rate-limits.js.map +1 -0
  326. package/lib/services/realtime-kit.d.ts +2728 -0
  327. package/lib/services/realtime-kit.d.ts.map +1 -0
  328. package/lib/services/realtime-kit.js +5402 -0
  329. package/lib/services/realtime-kit.js.map +1 -0
  330. package/lib/services/registrar.d.ts +121 -0
  331. package/lib/services/registrar.d.ts.map +1 -0
  332. package/lib/services/registrar.js +167 -0
  333. package/lib/services/registrar.js.map +1 -0
  334. package/lib/services/request-tracers.d.ts +61 -0
  335. package/lib/services/request-tracers.d.ts.map +1 -0
  336. package/lib/services/request-tracers.js +85 -0
  337. package/lib/services/request-tracers.js.map +1 -0
  338. package/lib/services/resource-sharing.d.ts +622 -0
  339. package/lib/services/resource-sharing.d.ts.map +1 -0
  340. package/lib/services/resource-sharing.js +929 -0
  341. package/lib/services/resource-sharing.js.map +1 -0
  342. package/lib/services/rules.d.ts +346 -0
  343. package/lib/services/rules.d.ts.map +1 -0
  344. package/lib/services/rules.js +431 -0
  345. package/lib/services/rules.js.map +1 -0
  346. package/lib/services/rulesets.d.ts +3345 -0
  347. package/lib/services/rulesets.d.ts.map +1 -0
  348. package/lib/services/rulesets.js +7904 -0
  349. package/lib/services/rulesets.js.map +1 -0
  350. package/lib/services/rum.d.ts +314 -0
  351. package/lib/services/rum.d.ts.map +1 -0
  352. package/lib/services/rum.js +442 -0
  353. package/lib/services/rum.js.map +1 -0
  354. package/lib/services/schema-validation.d.ts +273 -0
  355. package/lib/services/schema-validation.d.ts.map +1 -0
  356. package/lib/services/schema-validation.js +365 -0
  357. package/lib/services/schema-validation.js.map +1 -0
  358. package/lib/services/secrets-store.d.ts +393 -0
  359. package/lib/services/secrets-store.d.ts.map +1 -0
  360. package/lib/services/secrets-store.js +452 -0
  361. package/lib/services/secrets-store.js.map +1 -0
  362. package/lib/services/security-center.d.ts +136 -0
  363. package/lib/services/security-center.d.ts.map +1 -0
  364. package/lib/services/security-center.js +196 -0
  365. package/lib/services/security-center.js.map +1 -0
  366. package/lib/services/security-txt.d.ts +105 -0
  367. package/lib/services/security-txt.d.ts.map +1 -0
  368. package/lib/services/security-txt.js +136 -0
  369. package/lib/services/security-txt.js.map +1 -0
  370. package/lib/services/snippets.d.ts +190 -0
  371. package/lib/services/snippets.d.ts.map +1 -0
  372. package/lib/services/snippets.js +221 -0
  373. package/lib/services/snippets.js.map +1 -0
  374. package/lib/services/spectrum.d.ts +350 -0
  375. package/lib/services/spectrum.d.ts.map +1 -0
  376. package/lib/services/spectrum.js +535 -0
  377. package/lib/services/spectrum.js.map +1 -0
  378. package/lib/services/speed.d.ts +257 -0
  379. package/lib/services/speed.d.ts.map +1 -0
  380. package/lib/services/speed.js +471 -0
  381. package/lib/services/speed.js.map +1 -0
  382. package/lib/services/ssl.d.ts +412 -0
  383. package/lib/services/ssl.d.ts.map +1 -0
  384. package/lib/services/ssl.js +755 -0
  385. package/lib/services/ssl.js.map +1 -0
  386. package/lib/services/stream.d.ts +1110 -0
  387. package/lib/services/stream.d.ts.map +1 -0
  388. package/lib/services/stream.js +1085 -0
  389. package/lib/services/stream.js.map +1 -0
  390. package/lib/services/token-validation.d.ts +662 -0
  391. package/lib/services/token-validation.d.ts.map +1 -0
  392. package/lib/services/token-validation.js +834 -0
  393. package/lib/services/token-validation.js.map +1 -0
  394. package/lib/services/turnstile.d.ts +272 -0
  395. package/lib/services/turnstile.d.ts.map +1 -0
  396. package/lib/services/turnstile.js +339 -0
  397. package/lib/services/turnstile.js.map +1 -0
  398. package/lib/services/url-normalization.d.ts +53 -0
  399. package/lib/services/url-normalization.d.ts.map +1 -0
  400. package/lib/services/url-normalization.js +52 -0
  401. package/lib/services/url-normalization.js.map +1 -0
  402. package/lib/services/url-scanner.d.ts +612 -0
  403. package/lib/services/url-scanner.d.ts.map +1 -0
  404. package/lib/services/url-scanner.js +915 -0
  405. package/lib/services/url-scanner.js.map +1 -0
  406. package/lib/services/user.d.ts +507 -0
  407. package/lib/services/user.d.ts.map +1 -0
  408. package/lib/services/user.js +634 -0
  409. package/lib/services/user.js.map +1 -0
  410. package/lib/services/vectorize.d.ts +297 -0
  411. package/lib/services/vectorize.d.ts.map +1 -0
  412. package/lib/services/vectorize.js +351 -0
  413. package/lib/services/vectorize.js.map +1 -0
  414. package/lib/services/waiting-rooms.d.ts +1149 -0
  415. package/lib/services/waiting-rooms.d.ts.map +1 -0
  416. package/lib/services/waiting-rooms.js +1859 -0
  417. package/lib/services/waiting-rooms.js.map +1 -0
  418. package/lib/services/web3.d.ts +289 -0
  419. package/lib/services/web3.d.ts.map +1 -0
  420. package/lib/services/web3.js +381 -0
  421. package/lib/services/web3.js.map +1 -0
  422. package/lib/services/workers-for-platforms.d.ts +1394 -0
  423. package/lib/services/workers-for-platforms.d.ts.map +1 -0
  424. package/lib/services/workers-for-platforms.js +2121 -0
  425. package/lib/services/workers-for-platforms.js.map +1 -0
  426. package/lib/services/workers.d.ts +3827 -0
  427. package/lib/services/workers.d.ts.map +1 -0
  428. package/lib/services/workers.js +6105 -0
  429. package/lib/services/workers.js.map +1 -0
  430. package/lib/services/workflows.d.ts +442 -0
  431. package/lib/services/workflows.d.ts.map +1 -0
  432. package/lib/services/workflows.js +599 -0
  433. package/lib/services/workflows.js.map +1 -0
  434. package/lib/services/zaraz.d.ts +312 -0
  435. package/lib/services/zaraz.d.ts.map +1 -0
  436. package/lib/services/zaraz.js +305 -0
  437. package/lib/services/zaraz.js.map +1 -0
  438. package/lib/services/zero-trust.d.ts +18235 -0
  439. package/lib/services/zero-trust.d.ts.map +1 -0
  440. package/lib/services/zero-trust.js +30268 -0
  441. package/lib/services/zero-trust.js.map +1 -0
  442. package/lib/services/zones.d.ts +1382 -0
  443. package/lib/services/zones.d.ts.map +1 -0
  444. package/lib/services/zones.js +2477 -0
  445. package/lib/services/zones.js.map +1 -0
  446. package/lib/traits.d.ts +28 -0
  447. package/lib/traits.d.ts.map +1 -0
  448. package/lib/traits.js +26 -0
  449. package/lib/traits.js.map +1 -0
  450. package/package.json +82 -0
  451. package/src/auth.ts +15 -0
  452. package/src/category.ts +1 -0
  453. package/src/client/api.ts +421 -0
  454. package/src/client/index.ts +7 -0
  455. package/src/credentials.ts +271 -0
  456. package/src/errors.ts +73 -0
  457. package/src/index.ts +9 -0
  458. package/src/retry.ts +35 -0
  459. package/src/schemas.ts +51 -0
  460. package/src/sensitive.ts +4 -0
  461. package/src/services/abuse-reports.ts +955 -0
  462. package/src/services/accounts.ts +2152 -0
  463. package/src/services/acm.ts +178 -0
  464. package/src/services/addressing.ts +4262 -0
  465. package/src/services/ai-gateway.ts +3773 -0
  466. package/src/services/ai.ts +901 -0
  467. package/src/services/aisearch.ts +5215 -0
  468. package/src/services/alerting.ts +3303 -0
  469. package/src/services/api-gateway.ts +3890 -0
  470. package/src/services/argo.ts +270 -0
  471. package/src/services/audit-logs.ts +90 -0
  472. package/src/services/billing.ts +176 -0
  473. package/src/services/bot-management.ts +545 -0
  474. package/src/services/botnet-feed.ts +205 -0
  475. package/src/services/brand-protection.ts +575 -0
  476. package/src/services/browser-rendering.ts +2720 -0
  477. package/src/services/cache.ts +877 -0
  478. package/src/services/calls.ts +548 -0
  479. package/src/services/certificate-authorities.ts +114 -0
  480. package/src/services/client-certificates.ts +815 -0
  481. package/src/services/cloud-connector.ts +248 -0
  482. package/src/services/cloudforce-one.ts +4104 -0
  483. package/src/services/connectivity.ts +706 -0
  484. package/src/services/content-scanning.ts +458 -0
  485. package/src/services/custom-certificates.ts +690 -0
  486. package/src/services/custom-hostnames.ts +2641 -0
  487. package/src/services/custom-nameservers.ts +235 -0
  488. package/src/services/custom-pages.ts +311 -0
  489. package/src/services/d1.ts +1208 -0
  490. package/src/services/dcv-delegation.ts +54 -0
  491. package/src/services/diagnostics.ts +677 -0
  492. package/src/services/dns-firewall.ts +904 -0
  493. package/src/services/dns.ts +9277 -0
  494. package/src/services/durable-objects.ts +237 -0
  495. package/src/services/email-routing.ts +1796 -0
  496. package/src/services/email-security.ts +5052 -0
  497. package/src/services/filters.ts +488 -0
  498. package/src/services/firewall.ts +4728 -0
  499. package/src/services/healthchecks.ts +1866 -0
  500. package/src/services/hostnames.ts +254 -0
  501. package/src/services/hyperdrive.ts +595 -0
  502. package/src/services/iam.ts +1969 -0
  503. package/src/services/images.ts +1180 -0
  504. package/src/services/intel.ts +3072 -0
  505. package/src/services/ips.ts +88 -0
  506. package/src/services/keyless-certificates.ts +509 -0
  507. package/src/services/kv.ts +1129 -0
  508. package/src/services/leaked-credential-checks.ts +364 -0
  509. package/src/services/load-balancers.ts +6993 -0
  510. package/src/services/logpush.ts +1695 -0
  511. package/src/services/logs.ts +389 -0
  512. package/src/services/magic-cloud-networking.ts +10747 -0
  513. package/src/services/magic-network-monitoring.ts +1200 -0
  514. package/src/services/magic-transit.ts +13673 -0
  515. package/src/services/managed-transforms.ts +245 -0
  516. package/src/services/memberships.ts +698 -0
  517. package/src/services/mtls-certificates.ts +444 -0
  518. package/src/services/network-interconnects.ts +1253 -0
  519. package/src/services/organizations.ts +738 -0
  520. package/src/services/origin-ca-certificates.ts +369 -0
  521. package/src/services/origin-post-quantum-encryption.ts +136 -0
  522. package/src/services/origin-tls-client-auth.ts +1002 -0
  523. package/src/services/page-rules.ts +2632 -0
  524. package/src/services/page-shield.ts +1371 -0
  525. package/src/services/pages.ts +6167 -0
  526. package/src/services/pipelines.ts +6455 -0
  527. package/src/services/queues.ts +2827 -0
  528. package/src/services/r2-data-catalog.ts +1151 -0
  529. package/src/services/r2.ts +3529 -0
  530. package/src/services/radar.ts +42836 -0
  531. package/src/services/rate-limits.ts +1252 -0
  532. package/src/services/realtime-kit.ts +11080 -0
  533. package/src/services/registrar.ts +390 -0
  534. package/src/services/request-tracers.ts +161 -0
  535. package/src/services/resource-sharing.ts +2082 -0
  536. package/src/services/rules.ts +953 -0
  537. package/src/services/rulesets.ts +15361 -0
  538. package/src/services/rum.ts +994 -0
  539. package/src/services/schema-validation.ts +869 -0
  540. package/src/services/secrets-store.ts +1050 -0
  541. package/src/services/security-center.ts +495 -0
  542. package/src/services/security-txt.ts +317 -0
  543. package/src/services/snippets.ts +562 -0
  544. package/src/services/spectrum.ts +1190 -0
  545. package/src/services/speed.ts +1154 -0
  546. package/src/services/ssl.ts +1714 -0
  547. package/src/services/stream.ts +3008 -0
  548. package/src/services/token-validation.ts +1825 -0
  549. package/src/services/turnstile.ts +725 -0
  550. package/src/services/url-normalization.ts +133 -0
  551. package/src/services/url-scanner.ts +1851 -0
  552. package/src/services/user.ts +1587 -0
  553. package/src/services/vectorize.ts +875 -0
  554. package/src/services/waiting-rooms.ts +4216 -0
  555. package/src/services/web3.ts +899 -0
  556. package/src/services/workers-for-platforms.ts +4134 -0
  557. package/src/services/workers.ts +12298 -0
  558. package/src/services/workflows.ts +1372 -0
  559. package/src/services/zaraz.ts +833 -0
  560. package/src/services/zero-trust.ts +64685 -0
  561. package/src/services/zones.ts +5106 -0
  562. package/src/traits.ts +47 -0
@@ -0,0 +1,1250 @@
1
+ /**
2
+ * Cloudflare QUEUES API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service queues
6
+ */
7
+ import * as stream from "effect/Stream";
8
+ import * as Schema from "effect/Schema";
9
+ import * as API from "../client/api.js";
10
+ import * as T from "../traits.js";
11
+ import {} from "../errors.js";
12
+ // =============================================================================
13
+ // Errors
14
+ // =============================================================================
15
+ export class InvalidMessageBody extends Schema.TaggedErrorClass()("InvalidMessageBody", { code: Schema.Number, message: Schema.String }) {
16
+ }
17
+ T.applyErrorMatchers(InvalidMessageBody, [{ code: 10207 }, { code: 10013 }]);
18
+ export class InvalidQueueName extends Schema.TaggedErrorClass()("InvalidQueueName", { code: Schema.Number, message: Schema.String }) {
19
+ }
20
+ T.applyErrorMatchers(InvalidQueueName, [{ code: 11003 }]);
21
+ export class InvalidRequestBody extends Schema.TaggedErrorClass()("InvalidRequestBody", { code: Schema.Number, message: Schema.String }) {
22
+ }
23
+ T.applyErrorMatchers(InvalidRequestBody, [{ code: 10026 }]);
24
+ export class UnrecognizedEventType extends Schema.TaggedErrorClass()("UnrecognizedEventType", { code: Schema.Number, message: Schema.String }) {
25
+ }
26
+ T.applyErrorMatchers(UnrecognizedEventType, [
27
+ { code: 0, message: { includes: "Unrecognized event types" } },
28
+ ]);
29
+ export const GetConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
30
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
31
+ consumerId: Schema.String.pipe(T.HttpPath("consumerId")),
32
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
33
+ }).pipe(T.Http({
34
+ method: "GET",
35
+ path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}",
36
+ }));
37
+ export const GetConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
38
+ Schema.Struct({
39
+ consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
40
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
41
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
42
+ script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
43
+ settings: Schema.optional(Schema.Union([
44
+ Schema.Struct({
45
+ batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
46
+ maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
47
+ maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
48
+ maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
49
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
50
+ }).pipe(Schema.encodeKeys({
51
+ batchSize: "batch_size",
52
+ maxConcurrency: "max_concurrency",
53
+ maxRetries: "max_retries",
54
+ maxWaitTimeMs: "max_wait_time_ms",
55
+ retryDelay: "retry_delay",
56
+ })),
57
+ Schema.Null,
58
+ ])),
59
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
60
+ }).pipe(Schema.encodeKeys({
61
+ consumerId: "consumer_id",
62
+ createdOn: "created_on",
63
+ queueId: "queue_id",
64
+ script: "script",
65
+ settings: "settings",
66
+ type: "type",
67
+ })),
68
+ Schema.Struct({
69
+ consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
70
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
71
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
72
+ settings: Schema.optional(Schema.Union([
73
+ Schema.Struct({
74
+ batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
75
+ maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
76
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
77
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
78
+ }).pipe(Schema.encodeKeys({
79
+ batchSize: "batch_size",
80
+ maxRetries: "max_retries",
81
+ retryDelay: "retry_delay",
82
+ visibilityTimeoutMs: "visibility_timeout_ms",
83
+ })),
84
+ Schema.Null,
85
+ ])),
86
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
87
+ }).pipe(Schema.encodeKeys({
88
+ consumerId: "consumer_id",
89
+ createdOn: "created_on",
90
+ queueId: "queue_id",
91
+ settings: "settings",
92
+ type: "type",
93
+ })),
94
+ ]).pipe(T.ResponsePath("result"));
95
+ export const getConsumer = API.make(() => ({
96
+ input: GetConsumerRequest,
97
+ output: GetConsumerResponse,
98
+ errors: [InvalidRequestBody],
99
+ }));
100
+ export const ListConsumersRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
101
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
102
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
103
+ }).pipe(T.Http({
104
+ method: "GET",
105
+ path: "/accounts/{account_id}/queues/{queueId}/consumers",
106
+ }));
107
+ export const ListConsumersResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
108
+ result: Schema.Array(Schema.Union([
109
+ Schema.Struct({
110
+ consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
111
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
112
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
113
+ script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
114
+ settings: Schema.optional(Schema.Union([
115
+ Schema.Struct({
116
+ batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
117
+ maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
118
+ maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
119
+ maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
120
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
121
+ }).pipe(Schema.encodeKeys({
122
+ batchSize: "batch_size",
123
+ maxConcurrency: "max_concurrency",
124
+ maxRetries: "max_retries",
125
+ maxWaitTimeMs: "max_wait_time_ms",
126
+ retryDelay: "retry_delay",
127
+ })),
128
+ Schema.Null,
129
+ ])),
130
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
131
+ }).pipe(Schema.encodeKeys({
132
+ consumerId: "consumer_id",
133
+ createdOn: "created_on",
134
+ queueId: "queue_id",
135
+ script: "script",
136
+ settings: "settings",
137
+ type: "type",
138
+ })),
139
+ Schema.Struct({
140
+ consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
141
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
142
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
143
+ settings: Schema.optional(Schema.Union([
144
+ Schema.Struct({
145
+ batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
146
+ maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
147
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
148
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
149
+ }).pipe(Schema.encodeKeys({
150
+ batchSize: "batch_size",
151
+ maxRetries: "max_retries",
152
+ retryDelay: "retry_delay",
153
+ visibilityTimeoutMs: "visibility_timeout_ms",
154
+ })),
155
+ Schema.Null,
156
+ ])),
157
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
158
+ }).pipe(Schema.encodeKeys({
159
+ consumerId: "consumer_id",
160
+ createdOn: "created_on",
161
+ queueId: "queue_id",
162
+ settings: "settings",
163
+ type: "type",
164
+ })),
165
+ ])),
166
+ });
167
+ export const listConsumers = API.makePaginated(() => ({
168
+ input: ListConsumersRequest,
169
+ output: ListConsumersResponse,
170
+ errors: [InvalidRequestBody],
171
+ pagination: {
172
+ mode: "single",
173
+ items: "result",
174
+ },
175
+ }));
176
+ export const CreateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
177
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
178
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
179
+ deadLetterQueue: Schema.optional(Schema.String),
180
+ scriptName: Schema.optional(Schema.String),
181
+ settings: Schema.optional(Schema.Struct({
182
+ batchSize: Schema.optional(Schema.Number),
183
+ maxConcurrency: Schema.optional(Schema.Number),
184
+ maxRetries: Schema.optional(Schema.Number),
185
+ maxWaitTimeMs: Schema.optional(Schema.Number),
186
+ retryDelay: Schema.optional(Schema.Number),
187
+ }).pipe(Schema.encodeKeys({
188
+ batchSize: "batch_size",
189
+ maxConcurrency: "max_concurrency",
190
+ maxRetries: "max_retries",
191
+ maxWaitTimeMs: "max_wait_time_ms",
192
+ retryDelay: "retry_delay",
193
+ }))),
194
+ type: Schema.optional(Schema.Literal("worker")),
195
+ }).pipe(Schema.encodeKeys({
196
+ deadLetterQueue: "dead_letter_queue",
197
+ scriptName: "script_name",
198
+ settings: "settings",
199
+ type: "type",
200
+ }), T.Http({
201
+ method: "POST",
202
+ path: "/accounts/{account_id}/queues/{queueId}/consumers",
203
+ }));
204
+ export const CreateConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
205
+ Schema.Struct({
206
+ consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
207
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
208
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
209
+ script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
210
+ settings: Schema.optional(Schema.Union([
211
+ Schema.Struct({
212
+ batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
213
+ maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
214
+ maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
215
+ maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
216
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
217
+ }).pipe(Schema.encodeKeys({
218
+ batchSize: "batch_size",
219
+ maxConcurrency: "max_concurrency",
220
+ maxRetries: "max_retries",
221
+ maxWaitTimeMs: "max_wait_time_ms",
222
+ retryDelay: "retry_delay",
223
+ })),
224
+ Schema.Null,
225
+ ])),
226
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
227
+ }).pipe(Schema.encodeKeys({
228
+ consumerId: "consumer_id",
229
+ createdOn: "created_on",
230
+ queueId: "queue_id",
231
+ script: "script",
232
+ settings: "settings",
233
+ type: "type",
234
+ })),
235
+ Schema.Struct({
236
+ consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
237
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
238
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
239
+ settings: Schema.optional(Schema.Union([
240
+ Schema.Struct({
241
+ batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
242
+ maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
243
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
244
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
245
+ }).pipe(Schema.encodeKeys({
246
+ batchSize: "batch_size",
247
+ maxRetries: "max_retries",
248
+ retryDelay: "retry_delay",
249
+ visibilityTimeoutMs: "visibility_timeout_ms",
250
+ })),
251
+ Schema.Null,
252
+ ])),
253
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
254
+ }).pipe(Schema.encodeKeys({
255
+ consumerId: "consumer_id",
256
+ createdOn: "created_on",
257
+ queueId: "queue_id",
258
+ settings: "settings",
259
+ type: "type",
260
+ })),
261
+ ]).pipe(T.ResponsePath("result"));
262
+ export const createConsumer = API.make(() => ({
263
+ input: CreateConsumerRequest,
264
+ output: CreateConsumerResponse,
265
+ errors: [InvalidRequestBody],
266
+ }));
267
+ export const UpdateConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
268
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
269
+ consumerId: Schema.String.pipe(T.HttpPath("consumerId")),
270
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
271
+ deadLetterQueue: Schema.optional(Schema.String),
272
+ scriptName: Schema.optional(Schema.String),
273
+ settings: Schema.optional(Schema.Struct({
274
+ batchSize: Schema.optional(Schema.Number),
275
+ maxConcurrency: Schema.optional(Schema.Number),
276
+ maxRetries: Schema.optional(Schema.Number),
277
+ maxWaitTimeMs: Schema.optional(Schema.Number),
278
+ retryDelay: Schema.optional(Schema.Number),
279
+ }).pipe(Schema.encodeKeys({
280
+ batchSize: "batch_size",
281
+ maxConcurrency: "max_concurrency",
282
+ maxRetries: "max_retries",
283
+ maxWaitTimeMs: "max_wait_time_ms",
284
+ retryDelay: "retry_delay",
285
+ }))),
286
+ type: Schema.optional(Schema.Literal("worker")),
287
+ }).pipe(Schema.encodeKeys({
288
+ deadLetterQueue: "dead_letter_queue",
289
+ scriptName: "script_name",
290
+ settings: "settings",
291
+ type: "type",
292
+ }), T.Http({
293
+ method: "PUT",
294
+ path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}",
295
+ }));
296
+ export const UpdateConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
297
+ Schema.Struct({
298
+ consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
299
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
300
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
301
+ script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
302
+ settings: Schema.optional(Schema.Union([
303
+ Schema.Struct({
304
+ batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
305
+ maxConcurrency: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
306
+ maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
307
+ maxWaitTimeMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
308
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
309
+ }).pipe(Schema.encodeKeys({
310
+ batchSize: "batch_size",
311
+ maxConcurrency: "max_concurrency",
312
+ maxRetries: "max_retries",
313
+ maxWaitTimeMs: "max_wait_time_ms",
314
+ retryDelay: "retry_delay",
315
+ })),
316
+ Schema.Null,
317
+ ])),
318
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
319
+ }).pipe(Schema.encodeKeys({
320
+ consumerId: "consumer_id",
321
+ createdOn: "created_on",
322
+ queueId: "queue_id",
323
+ script: "script",
324
+ settings: "settings",
325
+ type: "type",
326
+ })),
327
+ Schema.Struct({
328
+ consumerId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
329
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
330
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
331
+ settings: Schema.optional(Schema.Union([
332
+ Schema.Struct({
333
+ batchSize: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
334
+ maxRetries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
335
+ retryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
336
+ visibilityTimeoutMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
337
+ }).pipe(Schema.encodeKeys({
338
+ batchSize: "batch_size",
339
+ maxRetries: "max_retries",
340
+ retryDelay: "retry_delay",
341
+ visibilityTimeoutMs: "visibility_timeout_ms",
342
+ })),
343
+ Schema.Null,
344
+ ])),
345
+ type: Schema.optional(Schema.Union([Schema.Literal("http_pull"), Schema.Null])),
346
+ }).pipe(Schema.encodeKeys({
347
+ consumerId: "consumer_id",
348
+ createdOn: "created_on",
349
+ queueId: "queue_id",
350
+ settings: "settings",
351
+ type: "type",
352
+ })),
353
+ ]).pipe(T.ResponsePath("result"));
354
+ export const updateConsumer = API.make(() => ({
355
+ input: UpdateConsumerRequest,
356
+ output: UpdateConsumerResponse,
357
+ errors: [InvalidRequestBody],
358
+ }));
359
+ export const DeleteConsumerRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
360
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
361
+ consumerId: Schema.String.pipe(T.HttpPath("consumerId")),
362
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
363
+ }).pipe(T.Http({
364
+ method: "DELETE",
365
+ path: "/accounts/{account_id}/queues/{queueId}/consumers/{consumerId}",
366
+ }));
367
+ export const DeleteConsumerResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
368
+ errors: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
369
+ messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
370
+ success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
371
+ });
372
+ export const deleteConsumer = API.make(() => ({
373
+ input: DeleteConsumerRequest,
374
+ output: DeleteConsumerResponse,
375
+ errors: [InvalidRequestBody],
376
+ }));
377
+ export const BulkPushMessagesRequest =
378
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
379
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
380
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
381
+ delaySeconds: Schema.optional(Schema.Number),
382
+ messages: Schema.optional(Schema.Array(Schema.Union([
383
+ Schema.Struct({
384
+ body: Schema.optional(Schema.String),
385
+ contentType: Schema.optional(Schema.Literal("text")),
386
+ delaySeconds: Schema.optional(Schema.Number),
387
+ }).pipe(Schema.encodeKeys({
388
+ body: "body",
389
+ contentType: "content_type",
390
+ delaySeconds: "delay_seconds",
391
+ })),
392
+ Schema.Struct({
393
+ body: Schema.optional(Schema.Unknown),
394
+ contentType: Schema.optional(Schema.Literal("json")),
395
+ delaySeconds: Schema.optional(Schema.Number),
396
+ }).pipe(Schema.encodeKeys({
397
+ body: "body",
398
+ contentType: "content_type",
399
+ delaySeconds: "delay_seconds",
400
+ })),
401
+ ]))),
402
+ }).pipe(Schema.encodeKeys({ delaySeconds: "delay_seconds", messages: "messages" }), T.Http({
403
+ method: "POST",
404
+ path: "/accounts/{account_id}/queues/{queueId}/messages/batch",
405
+ }));
406
+ export const BulkPushMessagesResponse =
407
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
408
+ errors: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
409
+ messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
410
+ success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
411
+ });
412
+ export const bulkPushMessages = API.make(() => ({
413
+ input: BulkPushMessagesRequest,
414
+ output: BulkPushMessagesResponse,
415
+ errors: [InvalidMessageBody],
416
+ }));
417
+ export const PullMessageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
418
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
419
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
420
+ batchSize: Schema.optional(Schema.Number),
421
+ visibilityTimeoutMs: Schema.optional(Schema.Number),
422
+ }).pipe(Schema.encodeKeys({
423
+ batchSize: "batch_size",
424
+ visibilityTimeoutMs: "visibility_timeout_ms",
425
+ }), T.Http({
426
+ method: "POST",
427
+ path: "/accounts/{account_id}/queues/{queueId}/messages/pull",
428
+ }));
429
+ export const PullMessageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
430
+ messageBacklogCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
431
+ messages: Schema.optional(Schema.Union([
432
+ Schema.Array(Schema.Struct({
433
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
434
+ attempts: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
435
+ body: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
436
+ leaseId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
437
+ metadata: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
438
+ timestampMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
439
+ }).pipe(Schema.encodeKeys({
440
+ id: "id",
441
+ attempts: "attempts",
442
+ body: "body",
443
+ leaseId: "lease_id",
444
+ metadata: "metadata",
445
+ timestampMs: "timestamp_ms",
446
+ }))),
447
+ Schema.Null,
448
+ ])),
449
+ })
450
+ .pipe(Schema.encodeKeys({
451
+ messageBacklogCount: "message_backlog_count",
452
+ messages: "messages",
453
+ }))
454
+ .pipe(T.ResponsePath("result"));
455
+ export const pullMessage = API.make(() => ({
456
+ input: PullMessageRequest,
457
+ output: PullMessageResponse,
458
+ errors: [InvalidRequestBody],
459
+ }));
460
+ export const PushMessageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
461
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
462
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
463
+ body: Schema.optional(Schema.String).pipe(T.HttpBody()),
464
+ contentType: Schema.optional(Schema.Literal("text")),
465
+ delaySeconds: Schema.optional(Schema.Number),
466
+ }).pipe(Schema.encodeKeys({
467
+ contentType: "content_type",
468
+ delaySeconds: "delay_seconds",
469
+ }), T.Http({
470
+ method: "POST",
471
+ path: "/accounts/{account_id}/queues/{queueId}/messages",
472
+ }));
473
+ export const PushMessageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
474
+ errors: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
475
+ messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
476
+ success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
477
+ });
478
+ export const pushMessage = API.make(() => ({
479
+ input: PushMessageRequest,
480
+ output: PushMessageResponse,
481
+ errors: [InvalidMessageBody],
482
+ }));
483
+ export const AckMessageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
484
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
485
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
486
+ acks: Schema.optional(Schema.Array(Schema.Struct({
487
+ leaseId: Schema.optional(Schema.String),
488
+ }).pipe(Schema.encodeKeys({ leaseId: "lease_id" })))),
489
+ retries: Schema.optional(Schema.Array(Schema.Struct({
490
+ delaySeconds: Schema.optional(Schema.Number),
491
+ leaseId: Schema.optional(Schema.String),
492
+ }).pipe(Schema.encodeKeys({
493
+ delaySeconds: "delay_seconds",
494
+ leaseId: "lease_id",
495
+ })))),
496
+ }).pipe(T.Http({
497
+ method: "POST",
498
+ path: "/accounts/{account_id}/queues/{queueId}/messages/ack",
499
+ }));
500
+ export const AckMessageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
501
+ ackCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
502
+ retryCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
503
+ warnings: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
504
+ }).pipe(T.ResponsePath("result"));
505
+ export const ackMessage = API.make(() => ({
506
+ input: AckMessageRequest,
507
+ output: AckMessageResponse,
508
+ errors: [InvalidRequestBody],
509
+ }));
510
+ export const StartPurgeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
511
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
512
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
513
+ deleteMessagesPermanently: Schema.optional(Schema.Boolean),
514
+ }).pipe(Schema.encodeKeys({
515
+ deleteMessagesPermanently: "delete_messages_permanently",
516
+ }), T.Http({
517
+ method: "POST",
518
+ path: "/accounts/{account_id}/queues/{queueId}/purge",
519
+ }));
520
+ export const StartPurgeResponse =
521
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
522
+ export const startPurge = API.make(() => ({
523
+ input: StartPurgeRequest,
524
+ output: StartPurgeResponse,
525
+ errors: [],
526
+ }));
527
+ export const StatusPurgeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
528
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
529
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
530
+ }).pipe(T.Http({
531
+ method: "GET",
532
+ path: "/accounts/{account_id}/queues/{queueId}/purge",
533
+ }));
534
+ export const StatusPurgeResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
535
+ completed: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
536
+ startedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
537
+ })
538
+ .pipe(Schema.encodeKeys({ completed: "completed", startedAt: "started_at" }))
539
+ .pipe(T.ResponsePath("result"));
540
+ export const statusPurge = API.make(() => ({
541
+ input: StatusPurgeRequest,
542
+ output: StatusPurgeResponse,
543
+ errors: [],
544
+ }));
545
+ export const GetQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
546
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
547
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
548
+ }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues/{queueId}" }));
549
+ export const GetQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
550
+ consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
551
+ consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
552
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
553
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
554
+ producers: Schema.optional(Schema.Union([
555
+ Schema.Array(Schema.Union([
556
+ Schema.Struct({
557
+ script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
558
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
559
+ }),
560
+ Schema.Struct({
561
+ bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
562
+ type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null])),
563
+ }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" })),
564
+ ])),
565
+ Schema.Null,
566
+ ])),
567
+ producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
568
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
569
+ queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
570
+ settings: Schema.optional(Schema.Union([
571
+ Schema.Struct({
572
+ deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
573
+ deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
574
+ messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
575
+ }).pipe(Schema.encodeKeys({
576
+ deliveryDelay: "delivery_delay",
577
+ deliveryPaused: "delivery_paused",
578
+ messageRetentionPeriod: "message_retention_period",
579
+ })),
580
+ Schema.Null,
581
+ ])),
582
+ })
583
+ .pipe(Schema.encodeKeys({
584
+ consumers: "consumers",
585
+ consumersTotalCount: "consumers_total_count",
586
+ createdOn: "created_on",
587
+ modifiedOn: "modified_on",
588
+ producers: "producers",
589
+ producersTotalCount: "producers_total_count",
590
+ queueId: "queue_id",
591
+ queueName: "queue_name",
592
+ settings: "settings",
593
+ }))
594
+ .pipe(T.ResponsePath("result"));
595
+ export const getQueue = API.make(() => ({
596
+ input: GetQueueRequest,
597
+ output: GetQueueResponse,
598
+ errors: [],
599
+ }));
600
+ export const ListQueuesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
601
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
602
+ }).pipe(T.Http({ method: "GET", path: "/accounts/{account_id}/queues" }));
603
+ export const ListQueuesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
604
+ result: Schema.Array(Schema.Struct({
605
+ consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
606
+ consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
607
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
608
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
609
+ producers: Schema.optional(Schema.Union([
610
+ Schema.Array(Schema.Union([
611
+ Schema.Struct({
612
+ script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
613
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
614
+ }),
615
+ Schema.Struct({
616
+ bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
617
+ type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null])),
618
+ }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" })),
619
+ ])),
620
+ Schema.Null,
621
+ ])),
622
+ producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
623
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
624
+ queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
625
+ settings: Schema.optional(Schema.Union([
626
+ Schema.Struct({
627
+ deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
628
+ deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
629
+ messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
630
+ }).pipe(Schema.encodeKeys({
631
+ deliveryDelay: "delivery_delay",
632
+ deliveryPaused: "delivery_paused",
633
+ messageRetentionPeriod: "message_retention_period",
634
+ })),
635
+ Schema.Null,
636
+ ])),
637
+ }).pipe(Schema.encodeKeys({
638
+ consumers: "consumers",
639
+ consumersTotalCount: "consumers_total_count",
640
+ createdOn: "created_on",
641
+ modifiedOn: "modified_on",
642
+ producers: "producers",
643
+ producersTotalCount: "producers_total_count",
644
+ queueId: "queue_id",
645
+ queueName: "queue_name",
646
+ settings: "settings",
647
+ }))),
648
+ });
649
+ export const listQueues = API.makePaginated(() => ({
650
+ input: ListQueuesRequest,
651
+ output: ListQueuesResponse,
652
+ errors: [],
653
+ pagination: {
654
+ mode: "single",
655
+ items: "result",
656
+ },
657
+ }));
658
+ export const CreateQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
659
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
660
+ queueName: Schema.String,
661
+ }).pipe(Schema.encodeKeys({ queueName: "queue_name" }), T.Http({ method: "POST", path: "/accounts/{account_id}/queues" }));
662
+ export const CreateQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
663
+ consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
664
+ consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
665
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
666
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
667
+ producers: Schema.optional(Schema.Union([
668
+ Schema.Array(Schema.Union([
669
+ Schema.Struct({
670
+ script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
671
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
672
+ }),
673
+ Schema.Struct({
674
+ bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
675
+ type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null])),
676
+ }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" })),
677
+ ])),
678
+ Schema.Null,
679
+ ])),
680
+ producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
681
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
682
+ queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
683
+ settings: Schema.optional(Schema.Union([
684
+ Schema.Struct({
685
+ deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
686
+ deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
687
+ messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
688
+ }).pipe(Schema.encodeKeys({
689
+ deliveryDelay: "delivery_delay",
690
+ deliveryPaused: "delivery_paused",
691
+ messageRetentionPeriod: "message_retention_period",
692
+ })),
693
+ Schema.Null,
694
+ ])),
695
+ })
696
+ .pipe(Schema.encodeKeys({
697
+ consumers: "consumers",
698
+ consumersTotalCount: "consumers_total_count",
699
+ createdOn: "created_on",
700
+ modifiedOn: "modified_on",
701
+ producers: "producers",
702
+ producersTotalCount: "producers_total_count",
703
+ queueId: "queue_id",
704
+ queueName: "queue_name",
705
+ settings: "settings",
706
+ }))
707
+ .pipe(T.ResponsePath("result"));
708
+ export const createQueue = API.make(() => ({
709
+ input: CreateQueueRequest,
710
+ output: CreateQueueResponse,
711
+ errors: [],
712
+ }));
713
+ export const UpdateQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
714
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
715
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
716
+ queueName: Schema.optional(Schema.String),
717
+ settings: Schema.optional(Schema.Struct({
718
+ deliveryDelay: Schema.optional(Schema.Number),
719
+ deliveryPaused: Schema.optional(Schema.Boolean),
720
+ messageRetentionPeriod: Schema.optional(Schema.Number),
721
+ }).pipe(Schema.encodeKeys({
722
+ deliveryDelay: "delivery_delay",
723
+ deliveryPaused: "delivery_paused",
724
+ messageRetentionPeriod: "message_retention_period",
725
+ }))),
726
+ }).pipe(Schema.encodeKeys({ queueName: "queue_name", settings: "settings" }), T.Http({ method: "PUT", path: "/accounts/{account_id}/queues/{queueId}" }));
727
+ export const UpdateQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
728
+ consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
729
+ consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
730
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
731
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
732
+ producers: Schema.optional(Schema.Union([
733
+ Schema.Array(Schema.Union([
734
+ Schema.Struct({
735
+ script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
736
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
737
+ }),
738
+ Schema.Struct({
739
+ bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
740
+ type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null])),
741
+ }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" })),
742
+ ])),
743
+ Schema.Null,
744
+ ])),
745
+ producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
746
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
747
+ queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
748
+ settings: Schema.optional(Schema.Union([
749
+ Schema.Struct({
750
+ deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
751
+ deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
752
+ messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
753
+ }).pipe(Schema.encodeKeys({
754
+ deliveryDelay: "delivery_delay",
755
+ deliveryPaused: "delivery_paused",
756
+ messageRetentionPeriod: "message_retention_period",
757
+ })),
758
+ Schema.Null,
759
+ ])),
760
+ })
761
+ .pipe(Schema.encodeKeys({
762
+ consumers: "consumers",
763
+ consumersTotalCount: "consumers_total_count",
764
+ createdOn: "created_on",
765
+ modifiedOn: "modified_on",
766
+ producers: "producers",
767
+ producersTotalCount: "producers_total_count",
768
+ queueId: "queue_id",
769
+ queueName: "queue_name",
770
+ settings: "settings",
771
+ }))
772
+ .pipe(T.ResponsePath("result"));
773
+ export const updateQueue = API.make(() => ({
774
+ input: UpdateQueueRequest,
775
+ output: UpdateQueueResponse,
776
+ errors: [InvalidQueueName],
777
+ }));
778
+ export const PatchQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
779
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
780
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
781
+ queueName: Schema.optional(Schema.String),
782
+ settings: Schema.optional(Schema.Struct({
783
+ deliveryDelay: Schema.optional(Schema.Number),
784
+ deliveryPaused: Schema.optional(Schema.Boolean),
785
+ messageRetentionPeriod: Schema.optional(Schema.Number),
786
+ }).pipe(Schema.encodeKeys({
787
+ deliveryDelay: "delivery_delay",
788
+ deliveryPaused: "delivery_paused",
789
+ messageRetentionPeriod: "message_retention_period",
790
+ }))),
791
+ }).pipe(Schema.encodeKeys({ queueName: "queue_name", settings: "settings" }), T.Http({ method: "PATCH", path: "/accounts/{account_id}/queues/{queueId}" }));
792
+ export const PatchQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
793
+ consumers: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
794
+ consumersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
795
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
796
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
797
+ producers: Schema.optional(Schema.Union([
798
+ Schema.Array(Schema.Union([
799
+ Schema.Struct({
800
+ script: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
801
+ type: Schema.optional(Schema.Union([Schema.Literal("worker"), Schema.Null])),
802
+ }),
803
+ Schema.Struct({
804
+ bucketName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
805
+ type: Schema.optional(Schema.Union([Schema.Literal("r2_bucket"), Schema.Null])),
806
+ }).pipe(Schema.encodeKeys({ bucketName: "bucket_name", type: "type" })),
807
+ ])),
808
+ Schema.Null,
809
+ ])),
810
+ producersTotalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
811
+ queueId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
812
+ queueName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
813
+ settings: Schema.optional(Schema.Union([
814
+ Schema.Struct({
815
+ deliveryDelay: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
816
+ deliveryPaused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
817
+ messageRetentionPeriod: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
818
+ }).pipe(Schema.encodeKeys({
819
+ deliveryDelay: "delivery_delay",
820
+ deliveryPaused: "delivery_paused",
821
+ messageRetentionPeriod: "message_retention_period",
822
+ })),
823
+ Schema.Null,
824
+ ])),
825
+ })
826
+ .pipe(Schema.encodeKeys({
827
+ consumers: "consumers",
828
+ consumersTotalCount: "consumers_total_count",
829
+ createdOn: "created_on",
830
+ modifiedOn: "modified_on",
831
+ producers: "producers",
832
+ producersTotalCount: "producers_total_count",
833
+ queueId: "queue_id",
834
+ queueName: "queue_name",
835
+ settings: "settings",
836
+ }))
837
+ .pipe(T.ResponsePath("result"));
838
+ export const patchQueue = API.make(() => ({
839
+ input: PatchQueueRequest,
840
+ output: PatchQueueResponse,
841
+ errors: [],
842
+ }));
843
+ export const DeleteQueueRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
844
+ queueId: Schema.String.pipe(T.HttpPath("queueId")),
845
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
846
+ }).pipe(T.Http({ method: "DELETE", path: "/accounts/{account_id}/queues/{queueId}" }));
847
+ export const DeleteQueueResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
848
+ errors: Schema.optional(Schema.Union([Schema.Array(Schema.Unknown), Schema.Null])),
849
+ messages: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
850
+ success: Schema.optional(Schema.Union([Schema.Literal(true), Schema.Null])),
851
+ });
852
+ export const deleteQueue = API.make(() => ({
853
+ input: DeleteQueueRequest,
854
+ output: DeleteQueueResponse,
855
+ errors: [],
856
+ }));
857
+ export const GetSubscriptionRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
858
+ subscriptionId: Schema.String.pipe(T.HttpPath("subscriptionId")),
859
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
860
+ }).pipe(T.Http({
861
+ method: "GET",
862
+ path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}",
863
+ }));
864
+ export const GetSubscriptionResponse =
865
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
866
+ id: Schema.String,
867
+ createdAt: Schema.String,
868
+ destination: Schema.Struct({
869
+ queueId: Schema.String,
870
+ type: Schema.Literal("queues.queue"),
871
+ }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
872
+ enabled: Schema.Boolean,
873
+ events: Schema.Array(Schema.String),
874
+ modifiedAt: Schema.String,
875
+ name: Schema.String,
876
+ source: Schema.Union([
877
+ Schema.Struct({
878
+ type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null])),
879
+ }),
880
+ Schema.Struct({
881
+ type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null])),
882
+ }),
883
+ Schema.Struct({
884
+ type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null])),
885
+ }),
886
+ Schema.Struct({
887
+ type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null])),
888
+ }),
889
+ Schema.Struct({
890
+ type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null])),
891
+ }),
892
+ Schema.Struct({
893
+ modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
894
+ type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null])),
895
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
896
+ Schema.Struct({
897
+ type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
898
+ workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
899
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
900
+ Schema.Struct({
901
+ type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
902
+ workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
903
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
904
+ ]),
905
+ })
906
+ .pipe(Schema.encodeKeys({
907
+ id: "id",
908
+ createdAt: "created_at",
909
+ destination: "destination",
910
+ enabled: "enabled",
911
+ events: "events",
912
+ modifiedAt: "modified_at",
913
+ name: "name",
914
+ source: "source",
915
+ }))
916
+ .pipe(T.ResponsePath("result"));
917
+ export const getSubscription = API.make(() => ({
918
+ input: GetSubscriptionRequest,
919
+ output: GetSubscriptionResponse,
920
+ errors: [UnrecognizedEventType],
921
+ }));
922
+ export const ListSubscriptionsRequest =
923
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
924
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
925
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(T.HttpQuery("direction")),
926
+ order: Schema.optional(Schema.Literals(["created_at", "name", "enabled", "source"])).pipe(T.HttpQuery("order")),
927
+ }).pipe(T.Http({
928
+ method: "GET",
929
+ path: "/accounts/{account_id}/event_subscriptions/subscriptions",
930
+ }));
931
+ export const ListSubscriptionsResponse =
932
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
933
+ result: Schema.Array(Schema.Struct({
934
+ id: Schema.String,
935
+ createdAt: Schema.String,
936
+ destination: Schema.Struct({
937
+ queueId: Schema.String,
938
+ type: Schema.Literal("queues.queue"),
939
+ }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
940
+ enabled: Schema.Boolean,
941
+ events: Schema.Array(Schema.String),
942
+ modifiedAt: Schema.String,
943
+ name: Schema.String,
944
+ source: Schema.Union([
945
+ Schema.Struct({
946
+ type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null])),
947
+ }),
948
+ Schema.Struct({
949
+ type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null])),
950
+ }),
951
+ Schema.Struct({
952
+ type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null])),
953
+ }),
954
+ Schema.Struct({
955
+ type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null])),
956
+ }),
957
+ Schema.Struct({
958
+ type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null])),
959
+ }),
960
+ Schema.Struct({
961
+ modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
962
+ type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null])),
963
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
964
+ Schema.Struct({
965
+ type: Schema.optional(Schema.Union([
966
+ Schema.Literal("workersBuilds.worker"),
967
+ Schema.Null,
968
+ ])),
969
+ workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
970
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
971
+ Schema.Struct({
972
+ type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
973
+ workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
974
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
975
+ ]),
976
+ }).pipe(Schema.encodeKeys({
977
+ id: "id",
978
+ createdAt: "created_at",
979
+ destination: "destination",
980
+ enabled: "enabled",
981
+ events: "events",
982
+ modifiedAt: "modified_at",
983
+ name: "name",
984
+ source: "source",
985
+ }))),
986
+ resultInfo: Schema.Struct({
987
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
988
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
989
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
990
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
991
+ }).pipe(Schema.encodeKeys({
992
+ count: "count",
993
+ page: "page",
994
+ perPage: "per_page",
995
+ totalCount: "total_count",
996
+ })),
997
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
998
+ export const listSubscriptions = API.makePaginated(() => ({
999
+ input: ListSubscriptionsRequest,
1000
+ output: ListSubscriptionsResponse,
1001
+ errors: [],
1002
+ pagination: {
1003
+ mode: "page",
1004
+ inputToken: "page",
1005
+ outputToken: "resultInfo.page",
1006
+ items: "result",
1007
+ pageSize: "perPage",
1008
+ },
1009
+ }));
1010
+ export const CreateSubscriptionRequest =
1011
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1012
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1013
+ destination: Schema.optional(Schema.Struct({
1014
+ queueId: Schema.String,
1015
+ type: Schema.Literal("queues.queue"),
1016
+ }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" }))),
1017
+ enabled: Schema.optional(Schema.Boolean),
1018
+ events: Schema.optional(Schema.Array(Schema.String)),
1019
+ name: Schema.optional(Schema.String),
1020
+ source: Schema.optional(Schema.Union([
1021
+ Schema.Struct({
1022
+ type: Schema.optional(Schema.Literal("images")),
1023
+ }),
1024
+ Schema.Struct({
1025
+ type: Schema.optional(Schema.Literal("kv")),
1026
+ }),
1027
+ Schema.Struct({
1028
+ type: Schema.optional(Schema.Literal("r2")),
1029
+ }),
1030
+ Schema.Struct({
1031
+ type: Schema.optional(Schema.Literal("superSlurper")),
1032
+ }),
1033
+ Schema.Struct({
1034
+ type: Schema.optional(Schema.Literal("vectorize")),
1035
+ }),
1036
+ Schema.Struct({
1037
+ modelName: Schema.optional(Schema.String),
1038
+ type: Schema.optional(Schema.Literal("workersAi.model")),
1039
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
1040
+ Schema.Struct({
1041
+ type: Schema.optional(Schema.Literal("workersBuilds.worker")),
1042
+ workerName: Schema.optional(Schema.String),
1043
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
1044
+ Schema.Struct({
1045
+ type: Schema.optional(Schema.Literal("workflows.workflow")),
1046
+ workflowName: Schema.optional(Schema.String),
1047
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
1048
+ ])),
1049
+ }).pipe(T.Http({
1050
+ method: "POST",
1051
+ path: "/accounts/{account_id}/event_subscriptions/subscriptions",
1052
+ }));
1053
+ export const CreateSubscriptionResponse =
1054
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1055
+ id: Schema.String,
1056
+ createdAt: Schema.String,
1057
+ destination: Schema.Struct({
1058
+ queueId: Schema.String,
1059
+ type: Schema.Literal("queues.queue"),
1060
+ }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
1061
+ enabled: Schema.Boolean,
1062
+ events: Schema.Array(Schema.String),
1063
+ modifiedAt: Schema.String,
1064
+ name: Schema.String,
1065
+ source: Schema.Union([
1066
+ Schema.Struct({
1067
+ type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null])),
1068
+ }),
1069
+ Schema.Struct({
1070
+ type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null])),
1071
+ }),
1072
+ Schema.Struct({
1073
+ type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null])),
1074
+ }),
1075
+ Schema.Struct({
1076
+ type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null])),
1077
+ }),
1078
+ Schema.Struct({
1079
+ type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null])),
1080
+ }),
1081
+ Schema.Struct({
1082
+ modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1083
+ type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null])),
1084
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
1085
+ Schema.Struct({
1086
+ type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
1087
+ workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1088
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
1089
+ Schema.Struct({
1090
+ type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
1091
+ workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1092
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
1093
+ ]),
1094
+ })
1095
+ .pipe(Schema.encodeKeys({
1096
+ id: "id",
1097
+ createdAt: "created_at",
1098
+ destination: "destination",
1099
+ enabled: "enabled",
1100
+ events: "events",
1101
+ modifiedAt: "modified_at",
1102
+ name: "name",
1103
+ source: "source",
1104
+ }))
1105
+ .pipe(T.ResponsePath("result"));
1106
+ export const createSubscription = API.make(() => ({
1107
+ input: CreateSubscriptionRequest,
1108
+ output: CreateSubscriptionResponse,
1109
+ errors: [UnrecognizedEventType],
1110
+ }));
1111
+ export const PatchSubscriptionRequest =
1112
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1113
+ subscriptionId: Schema.String.pipe(T.HttpPath("subscriptionId")),
1114
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1115
+ destination: Schema.optional(Schema.Struct({
1116
+ queueId: Schema.String,
1117
+ type: Schema.Literal("queues.queue"),
1118
+ }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" }))),
1119
+ enabled: Schema.optional(Schema.Boolean),
1120
+ events: Schema.optional(Schema.Array(Schema.String)),
1121
+ name: Schema.optional(Schema.String),
1122
+ }).pipe(T.Http({
1123
+ method: "PATCH",
1124
+ path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}",
1125
+ }));
1126
+ export const PatchSubscriptionResponse =
1127
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1128
+ id: Schema.String,
1129
+ createdAt: Schema.String,
1130
+ destination: Schema.Struct({
1131
+ queueId: Schema.String,
1132
+ type: Schema.Literal("queues.queue"),
1133
+ }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
1134
+ enabled: Schema.Boolean,
1135
+ events: Schema.Array(Schema.String),
1136
+ modifiedAt: Schema.String,
1137
+ name: Schema.String,
1138
+ source: Schema.Union([
1139
+ Schema.Struct({
1140
+ type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null])),
1141
+ }),
1142
+ Schema.Struct({
1143
+ type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null])),
1144
+ }),
1145
+ Schema.Struct({
1146
+ type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null])),
1147
+ }),
1148
+ Schema.Struct({
1149
+ type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null])),
1150
+ }),
1151
+ Schema.Struct({
1152
+ type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null])),
1153
+ }),
1154
+ Schema.Struct({
1155
+ modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1156
+ type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null])),
1157
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
1158
+ Schema.Struct({
1159
+ type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
1160
+ workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1161
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
1162
+ Schema.Struct({
1163
+ type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
1164
+ workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1165
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
1166
+ ]),
1167
+ })
1168
+ .pipe(Schema.encodeKeys({
1169
+ id: "id",
1170
+ createdAt: "created_at",
1171
+ destination: "destination",
1172
+ enabled: "enabled",
1173
+ events: "events",
1174
+ modifiedAt: "modified_at",
1175
+ name: "name",
1176
+ source: "source",
1177
+ }))
1178
+ .pipe(T.ResponsePath("result"));
1179
+ export const patchSubscription = API.make(() => ({
1180
+ input: PatchSubscriptionRequest,
1181
+ output: PatchSubscriptionResponse,
1182
+ errors: [UnrecognizedEventType],
1183
+ }));
1184
+ export const DeleteSubscriptionRequest =
1185
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1186
+ subscriptionId: Schema.String.pipe(T.HttpPath("subscriptionId")),
1187
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1188
+ }).pipe(T.Http({
1189
+ method: "DELETE",
1190
+ path: "/accounts/{account_id}/event_subscriptions/subscriptions/{subscriptionId}",
1191
+ }));
1192
+ export const DeleteSubscriptionResponse =
1193
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1194
+ id: Schema.String,
1195
+ createdAt: Schema.String,
1196
+ destination: Schema.Struct({
1197
+ queueId: Schema.String,
1198
+ type: Schema.Literal("queues.queue"),
1199
+ }).pipe(Schema.encodeKeys({ queueId: "queue_id", type: "type" })),
1200
+ enabled: Schema.Boolean,
1201
+ events: Schema.Array(Schema.String),
1202
+ modifiedAt: Schema.String,
1203
+ name: Schema.String,
1204
+ source: Schema.Union([
1205
+ Schema.Struct({
1206
+ type: Schema.optional(Schema.Union([Schema.Literal("images"), Schema.Null])),
1207
+ }),
1208
+ Schema.Struct({
1209
+ type: Schema.optional(Schema.Union([Schema.Literal("kv"), Schema.Null])),
1210
+ }),
1211
+ Schema.Struct({
1212
+ type: Schema.optional(Schema.Union([Schema.Literal("r2"), Schema.Null])),
1213
+ }),
1214
+ Schema.Struct({
1215
+ type: Schema.optional(Schema.Union([Schema.Literal("superSlurper"), Schema.Null])),
1216
+ }),
1217
+ Schema.Struct({
1218
+ type: Schema.optional(Schema.Union([Schema.Literal("vectorize"), Schema.Null])),
1219
+ }),
1220
+ Schema.Struct({
1221
+ modelName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1222
+ type: Schema.optional(Schema.Union([Schema.Literal("workersAi.model"), Schema.Null])),
1223
+ }).pipe(Schema.encodeKeys({ modelName: "model_name", type: "type" })),
1224
+ Schema.Struct({
1225
+ type: Schema.optional(Schema.Union([Schema.Literal("workersBuilds.worker"), Schema.Null])),
1226
+ workerName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1227
+ }).pipe(Schema.encodeKeys({ type: "type", workerName: "worker_name" })),
1228
+ Schema.Struct({
1229
+ type: Schema.optional(Schema.Union([Schema.Literal("workflows.workflow"), Schema.Null])),
1230
+ workflowName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1231
+ }).pipe(Schema.encodeKeys({ type: "type", workflowName: "workflow_name" })),
1232
+ ]),
1233
+ })
1234
+ .pipe(Schema.encodeKeys({
1235
+ id: "id",
1236
+ createdAt: "created_at",
1237
+ destination: "destination",
1238
+ enabled: "enabled",
1239
+ events: "events",
1240
+ modifiedAt: "modified_at",
1241
+ name: "name",
1242
+ source: "source",
1243
+ }))
1244
+ .pipe(T.ResponsePath("result"));
1245
+ export const deleteSubscription = API.make(() => ({
1246
+ input: DeleteSubscriptionRequest,
1247
+ output: DeleteSubscriptionResponse,
1248
+ errors: [UnrecognizedEventType],
1249
+ }));
1250
+ //# sourceMappingURL=queues.js.map