@distilled.cloud/cloudflare 0.0.0 → 0.2.3

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 (560) hide show
  1. package/README.md +41 -7
  2. package/lib/auth.d.ts +13 -0
  3. package/lib/auth.d.ts.map +1 -0
  4. package/lib/auth.js +12 -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 +14 -0
  11. package/lib/client/api.d.ts.map +1 -0
  12. package/lib/client/api.js +245 -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 +14 -0
  19. package/lib/credentials.d.ts.map +1 -0
  20. package/lib/credentials.js +17 -0
  21. package/lib/credentials.js.map +1 -0
  22. package/lib/errors.d.ts +37 -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/services/abuse-reports.d.ts +224 -0
  39. package/lib/services/abuse-reports.d.ts.map +1 -0
  40. package/lib/services/abuse-reports.js +353 -0
  41. package/lib/services/abuse-reports.js.map +1 -0
  42. package/lib/services/accounts.d.ts +682 -0
  43. package/lib/services/accounts.d.ts.map +1 -0
  44. package/lib/services/accounts.js +805 -0
  45. package/lib/services/accounts.js.map +1 -0
  46. package/lib/services/acm.d.ts +73 -0
  47. package/lib/services/acm.d.ts.map +1 -0
  48. package/lib/services/acm.js +76 -0
  49. package/lib/services/acm.js.map +1 -0
  50. package/lib/services/addressing.d.ts +1208 -0
  51. package/lib/services/addressing.d.ts.map +1 -0
  52. package/lib/services/addressing.js +1776 -0
  53. package/lib/services/addressing.js.map +1 -0
  54. package/lib/services/ai-gateway.d.ts +956 -0
  55. package/lib/services/ai-gateway.d.ts.map +1 -0
  56. package/lib/services/ai-gateway.js +1706 -0
  57. package/lib/services/ai-gateway.js.map +1 -0
  58. package/lib/services/ai.d.ts +243 -0
  59. package/lib/services/ai.d.ts.map +1 -0
  60. package/lib/services/ai.js +299 -0
  61. package/lib/services/ai.js.map +1 -0
  62. package/lib/services/aisearch.d.ts +915 -0
  63. package/lib/services/aisearch.d.ts.map +1 -0
  64. package/lib/services/aisearch.js +2425 -0
  65. package/lib/services/aisearch.js.map +1 -0
  66. package/lib/services/alerting.d.ts +718 -0
  67. package/lib/services/alerting.d.ts.map +1 -0
  68. package/lib/services/alerting.js +1388 -0
  69. package/lib/services/alerting.js.map +1 -0
  70. package/lib/services/api-gateway.d.ts +830 -0
  71. package/lib/services/api-gateway.d.ts.map +1 -0
  72. package/lib/services/api-gateway.js +1548 -0
  73. package/lib/services/api-gateway.js.map +1 -0
  74. package/lib/services/argo.d.ts +101 -0
  75. package/lib/services/argo.d.ts.map +1 -0
  76. package/lib/services/argo.js +105 -0
  77. package/lib/services/argo.js.map +1 -0
  78. package/lib/services/audit-logs.d.ts +46 -0
  79. package/lib/services/audit-logs.d.ts.map +1 -0
  80. package/lib/services/audit-logs.js +37 -0
  81. package/lib/services/audit-logs.js.map +1 -0
  82. package/lib/services/billing.d.ts +62 -0
  83. package/lib/services/billing.d.ts.map +1 -0
  84. package/lib/services/billing.js +100 -0
  85. package/lib/services/billing.js.map +1 -0
  86. package/lib/services/bot-management.d.ts +124 -0
  87. package/lib/services/bot-management.d.ts.map +1 -0
  88. package/lib/services/bot-management.js +262 -0
  89. package/lib/services/bot-management.js.map +1 -0
  90. package/lib/services/botnet-feed.d.ts +65 -0
  91. package/lib/services/botnet-feed.d.ts.map +1 -0
  92. package/lib/services/botnet-feed.js +84 -0
  93. package/lib/services/botnet-feed.js.map +1 -0
  94. package/lib/services/brand-protection.d.ts +188 -0
  95. package/lib/services/brand-protection.d.ts.map +1 -0
  96. package/lib/services/brand-protection.js +214 -0
  97. package/lib/services/brand-protection.js.map +1 -0
  98. package/lib/services/browser-rendering.d.ts +857 -0
  99. package/lib/services/browser-rendering.d.ts.map +1 -0
  100. package/lib/services/browser-rendering.js +1141 -0
  101. package/lib/services/browser-rendering.js.map +1 -0
  102. package/lib/services/cache.d.ts +287 -0
  103. package/lib/services/cache.d.ts.map +1 -0
  104. package/lib/services/cache.js +330 -0
  105. package/lib/services/cache.js.map +1 -0
  106. package/lib/services/calls.d.ts +202 -0
  107. package/lib/services/calls.d.ts.map +1 -0
  108. package/lib/services/calls.js +175 -0
  109. package/lib/services/calls.js.map +1 -0
  110. package/lib/services/certificate-authorities.d.ts +40 -0
  111. package/lib/services/certificate-authorities.d.ts.map +1 -0
  112. package/lib/services/certificate-authorities.js +49 -0
  113. package/lib/services/certificate-authorities.js.map +1 -0
  114. package/lib/services/client-certificates.d.ts +254 -0
  115. package/lib/services/client-certificates.d.ts.map +1 -0
  116. package/lib/services/client-certificates.js +350 -0
  117. package/lib/services/client-certificates.js.map +1 -0
  118. package/lib/services/cloud-connector.d.ts +59 -0
  119. package/lib/services/cloud-connector.d.ts.map +1 -0
  120. package/lib/services/cloud-connector.js +84 -0
  121. package/lib/services/cloud-connector.js.map +1 -0
  122. package/lib/services/cloudforce-one.d.ts +1318 -0
  123. package/lib/services/cloudforce-one.d.ts.map +1 -0
  124. package/lib/services/cloudforce-one.js +1684 -0
  125. package/lib/services/cloudforce-one.js.map +1 -0
  126. package/lib/services/connectivity.d.ts +248 -0
  127. package/lib/services/connectivity.d.ts.map +1 -0
  128. package/lib/services/connectivity.js +377 -0
  129. package/lib/services/connectivity.js.map +1 -0
  130. package/lib/services/content-scanning.d.ts +131 -0
  131. package/lib/services/content-scanning.d.ts.map +1 -0
  132. package/lib/services/content-scanning.js +156 -0
  133. package/lib/services/content-scanning.js.map +1 -0
  134. package/lib/services/custom-certificates.d.ts +211 -0
  135. package/lib/services/custom-certificates.d.ts.map +1 -0
  136. package/lib/services/custom-certificates.js +309 -0
  137. package/lib/services/custom-certificates.js.map +1 -0
  138. package/lib/services/custom-hostnames.d.ts +525 -0
  139. package/lib/services/custom-hostnames.d.ts.map +1 -0
  140. package/lib/services/custom-hostnames.js +1164 -0
  141. package/lib/services/custom-hostnames.js.map +1 -0
  142. package/lib/services/custom-nameservers.d.ts +67 -0
  143. package/lib/services/custom-nameservers.d.ts.map +1 -0
  144. package/lib/services/custom-nameservers.js +80 -0
  145. package/lib/services/custom-nameservers.js.map +1 -0
  146. package/lib/services/custom-pages.d.ts +74 -0
  147. package/lib/services/custom-pages.d.ts.map +1 -0
  148. package/lib/services/custom-pages.js +125 -0
  149. package/lib/services/custom-pages.js.map +1 -0
  150. package/lib/services/d1.d.ts +326 -0
  151. package/lib/services/d1.d.ts.map +1 -0
  152. package/lib/services/d1.js +448 -0
  153. package/lib/services/d1.js.map +1 -0
  154. package/lib/services/dcv-delegation.d.ts +24 -0
  155. package/lib/services/dcv-delegation.d.ts.map +1 -0
  156. package/lib/services/dcv-delegation.js +24 -0
  157. package/lib/services/dcv-delegation.js.map +1 -0
  158. package/lib/services/diagnostics.d.ts +175 -0
  159. package/lib/services/diagnostics.d.ts.map +1 -0
  160. package/lib/services/diagnostics.js +273 -0
  161. package/lib/services/diagnostics.js.map +1 -0
  162. package/lib/services/dns-firewall.d.ts +288 -0
  163. package/lib/services/dns-firewall.d.ts.map +1 -0
  164. package/lib/services/dns-firewall.js +373 -0
  165. package/lib/services/dns-firewall.js.map +1 -0
  166. package/lib/services/dns.d.ts +2946 -0
  167. package/lib/services/dns.d.ts.map +1 -0
  168. package/lib/services/dns.js +4511 -0
  169. package/lib/services/dns.js.map +1 -0
  170. package/lib/services/durable-objects.d.ts +61 -0
  171. package/lib/services/durable-objects.d.ts.map +1 -0
  172. package/lib/services/durable-objects.js +66 -0
  173. package/lib/services/durable-objects.js.map +1 -0
  174. package/lib/services/email-routing.d.ts +542 -0
  175. package/lib/services/email-routing.d.ts.map +1 -0
  176. package/lib/services/email-routing.js +662 -0
  177. package/lib/services/email-routing.js.map +1 -0
  178. package/lib/services/email-security.d.ts +1131 -0
  179. package/lib/services/email-security.d.ts.map +1 -0
  180. package/lib/services/email-security.js +2065 -0
  181. package/lib/services/email-security.js.map +1 -0
  182. package/lib/services/filters.d.ts +157 -0
  183. package/lib/services/filters.d.ts.map +1 -0
  184. package/lib/services/filters.js +135 -0
  185. package/lib/services/filters.js.map +1 -0
  186. package/lib/services/firewall.d.ts +1080 -0
  187. package/lib/services/firewall.d.ts.map +1 -0
  188. package/lib/services/firewall.js +1881 -0
  189. package/lib/services/firewall.js.map +1 -0
  190. package/lib/services/healthchecks.d.ts +464 -0
  191. package/lib/services/healthchecks.d.ts.map +1 -0
  192. package/lib/services/healthchecks.js +838 -0
  193. package/lib/services/healthchecks.js.map +1 -0
  194. package/lib/services/hostnames.d.ts +74 -0
  195. package/lib/services/hostnames.d.ts.map +1 -0
  196. package/lib/services/hostnames.js +100 -0
  197. package/lib/services/hostnames.js.map +1 -0
  198. package/lib/services/hyperdrive.d.ts +203 -0
  199. package/lib/services/hyperdrive.d.ts.map +1 -0
  200. package/lib/services/hyperdrive.js +299 -0
  201. package/lib/services/hyperdrive.js.map +1 -0
  202. package/lib/services/iam.d.ts +554 -0
  203. package/lib/services/iam.d.ts.map +1 -0
  204. package/lib/services/iam.js +743 -0
  205. package/lib/services/iam.js.map +1 -0
  206. package/lib/services/images.d.ts +403 -0
  207. package/lib/services/images.d.ts.map +1 -0
  208. package/lib/services/images.js +417 -0
  209. package/lib/services/images.js.map +1 -0
  210. package/lib/services/intel.d.ts +768 -0
  211. package/lib/services/intel.d.ts.map +1 -0
  212. package/lib/services/intel.js +1179 -0
  213. package/lib/services/intel.js.map +1 -0
  214. package/lib/services/ips.d.ts +28 -0
  215. package/lib/services/ips.d.ts.map +1 -0
  216. package/lib/services/ips.js +39 -0
  217. package/lib/services/ips.js.map +1 -0
  218. package/lib/services/keyless-certificates.d.ts +177 -0
  219. package/lib/services/keyless-certificates.d.ts.map +1 -0
  220. package/lib/services/keyless-certificates.js +216 -0
  221. package/lib/services/keyless-certificates.js.map +1 -0
  222. package/lib/services/kv.d.ts +339 -0
  223. package/lib/services/kv.d.ts.map +1 -0
  224. package/lib/services/kv.js +402 -0
  225. package/lib/services/kv.js.map +1 -0
  226. package/lib/services/leaked-credential-checks.d.ts +119 -0
  227. package/lib/services/leaked-credential-checks.d.ts.map +1 -0
  228. package/lib/services/leaked-credential-checks.js +130 -0
  229. package/lib/services/leaked-credential-checks.js.map +1 -0
  230. package/lib/services/load-balancers.d.ts +1767 -0
  231. package/lib/services/load-balancers.d.ts.map +1 -0
  232. package/lib/services/load-balancers.js +3068 -0
  233. package/lib/services/load-balancers.js.map +1 -0
  234. package/lib/services/logpush.d.ts +401 -0
  235. package/lib/services/logpush.d.ts.map +1 -0
  236. package/lib/services/logpush.js +724 -0
  237. package/lib/services/logpush.js.map +1 -0
  238. package/lib/services/logs.d.ts +125 -0
  239. package/lib/services/logs.d.ts.map +1 -0
  240. package/lib/services/logs.js +145 -0
  241. package/lib/services/logs.js.map +1 -0
  242. package/lib/services/magic-cloud-networking.d.ts +1599 -0
  243. package/lib/services/magic-cloud-networking.d.ts.map +1 -0
  244. package/lib/services/magic-cloud-networking.js +5205 -0
  245. package/lib/services/magic-cloud-networking.js.map +1 -0
  246. package/lib/services/magic-network-monitoring.d.ts +379 -0
  247. package/lib/services/magic-network-monitoring.d.ts.map +1 -0
  248. package/lib/services/magic-network-monitoring.js +535 -0
  249. package/lib/services/magic-network-monitoring.js.map +1 -0
  250. package/lib/services/magic-transit.d.ts +3650 -0
  251. package/lib/services/magic-transit.d.ts.map +1 -0
  252. package/lib/services/magic-transit.js +6120 -0
  253. package/lib/services/magic-transit.js.map +1 -0
  254. package/lib/services/managed-transforms.d.ts +79 -0
  255. package/lib/services/managed-transforms.d.ts.map +1 -0
  256. package/lib/services/managed-transforms.js +107 -0
  257. package/lib/services/managed-transforms.js.map +1 -0
  258. package/lib/services/memberships.d.ts +172 -0
  259. package/lib/services/memberships.d.ts.map +1 -0
  260. package/lib/services/memberships.js +282 -0
  261. package/lib/services/memberships.js.map +1 -0
  262. package/lib/services/mtls-certificates.d.ts +140 -0
  263. package/lib/services/mtls-certificates.d.ts.map +1 -0
  264. package/lib/services/mtls-certificates.js +173 -0
  265. package/lib/services/mtls-certificates.js.map +1 -0
  266. package/lib/services/network-interconnects.d.ts +410 -0
  267. package/lib/services/network-interconnects.d.ts.map +1 -0
  268. package/lib/services/network-interconnects.js +583 -0
  269. package/lib/services/network-interconnects.js.map +1 -0
  270. package/lib/services/organizations.d.ts +201 -0
  271. package/lib/services/organizations.d.ts.map +1 -0
  272. package/lib/services/organizations.js +355 -0
  273. package/lib/services/organizations.js.map +1 -0
  274. package/lib/services/origin-ca-certificates.d.ts +99 -0
  275. package/lib/services/origin-ca-certificates.d.ts.map +1 -0
  276. package/lib/services/origin-ca-certificates.js +156 -0
  277. package/lib/services/origin-ca-certificates.js.map +1 -0
  278. package/lib/services/origin-post-quantum-encryption.d.ts +50 -0
  279. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -0
  280. package/lib/services/origin-post-quantum-encryption.js +60 -0
  281. package/lib/services/origin-post-quantum-encryption.js.map +1 -0
  282. package/lib/services/origin-tls-client-auth.d.ts +273 -0
  283. package/lib/services/origin-tls-client-auth.d.ts.map +1 -0
  284. package/lib/services/origin-tls-client-auth.js +401 -0
  285. package/lib/services/origin-tls-client-auth.js.map +1 -0
  286. package/lib/services/page-rules.d.ts +773 -0
  287. package/lib/services/page-rules.d.ts.map +1 -0
  288. package/lib/services/page-rules.js +1365 -0
  289. package/lib/services/page-rules.js.map +1 -0
  290. package/lib/services/page-shield.d.ts +426 -0
  291. package/lib/services/page-shield.d.ts.map +1 -0
  292. package/lib/services/page-shield.js +484 -0
  293. package/lib/services/page-shield.js.map +1 -0
  294. package/lib/services/pages.d.ts +1654 -0
  295. package/lib/services/pages.d.ts.map +1 -0
  296. package/lib/services/pages.js +2954 -0
  297. package/lib/services/pages.js.map +1 -0
  298. package/lib/services/pipelines.d.ts +1461 -0
  299. package/lib/services/pipelines.d.ts.map +1 -0
  300. package/lib/services/pipelines.js +2912 -0
  301. package/lib/services/pipelines.js.map +1 -0
  302. package/lib/services/queues.d.ts +807 -0
  303. package/lib/services/queues.d.ts.map +1 -0
  304. package/lib/services/queues.js +1194 -0
  305. package/lib/services/queues.js.map +1 -0
  306. package/lib/services/r2-data-catalog.d.ts +341 -0
  307. package/lib/services/r2-data-catalog.d.ts.map +1 -0
  308. package/lib/services/r2-data-catalog.js +499 -0
  309. package/lib/services/r2-data-catalog.js.map +1 -0
  310. package/lib/services/r2.d.ts +1041 -0
  311. package/lib/services/r2.d.ts.map +1 -0
  312. package/lib/services/r2.js +1384 -0
  313. package/lib/services/r2.js.map +1 -0
  314. package/lib/services/radar.d.ts +9276 -0
  315. package/lib/services/radar.d.ts.map +1 -0
  316. package/lib/services/radar.js +20491 -0
  317. package/lib/services/radar.js.map +1 -0
  318. package/lib/services/rate-limits.d.ts +315 -0
  319. package/lib/services/rate-limits.d.ts.map +1 -0
  320. package/lib/services/rate-limits.js +521 -0
  321. package/lib/services/rate-limits.js.map +1 -0
  322. package/lib/services/realtime-kit.d.ts +2728 -0
  323. package/lib/services/realtime-kit.d.ts.map +1 -0
  324. package/lib/services/realtime-kit.js +5401 -0
  325. package/lib/services/realtime-kit.js.map +1 -0
  326. package/lib/services/registrar.d.ts +81 -0
  327. package/lib/services/registrar.d.ts.map +1 -0
  328. package/lib/services/registrar.js +154 -0
  329. package/lib/services/registrar.js.map +1 -0
  330. package/lib/services/request-tracers.d.ts +61 -0
  331. package/lib/services/request-tracers.d.ts.map +1 -0
  332. package/lib/services/request-tracers.js +82 -0
  333. package/lib/services/request-tracers.js.map +1 -0
  334. package/lib/services/resource-sharing.d.ts +540 -0
  335. package/lib/services/resource-sharing.d.ts.map +1 -0
  336. package/lib/services/resource-sharing.js +846 -0
  337. package/lib/services/resource-sharing.js.map +1 -0
  338. package/lib/services/rules.d.ts +297 -0
  339. package/lib/services/rules.d.ts.map +1 -0
  340. package/lib/services/rules.js +396 -0
  341. package/lib/services/rules.js.map +1 -0
  342. package/lib/services/rulesets.d.ts +3300 -0
  343. package/lib/services/rulesets.d.ts.map +1 -0
  344. package/lib/services/rulesets.js +7852 -0
  345. package/lib/services/rulesets.js.map +1 -0
  346. package/lib/services/rum.d.ts +289 -0
  347. package/lib/services/rum.d.ts.map +1 -0
  348. package/lib/services/rum.js +409 -0
  349. package/lib/services/rum.js.map +1 -0
  350. package/lib/services/schema-validation.d.ts +240 -0
  351. package/lib/services/schema-validation.d.ts.map +1 -0
  352. package/lib/services/schema-validation.js +306 -0
  353. package/lib/services/schema-validation.js.map +1 -0
  354. package/lib/services/secrets-store.d.ts +321 -0
  355. package/lib/services/secrets-store.d.ts.map +1 -0
  356. package/lib/services/secrets-store.js +385 -0
  357. package/lib/services/secrets-store.js.map +1 -0
  358. package/lib/services/security-center.d.ts +102 -0
  359. package/lib/services/security-center.d.ts.map +1 -0
  360. package/lib/services/security-center.js +170 -0
  361. package/lib/services/security-center.js.map +1 -0
  362. package/lib/services/security-txt.d.ts +105 -0
  363. package/lib/services/security-txt.d.ts.map +1 -0
  364. package/lib/services/security-txt.js +136 -0
  365. package/lib/services/security-txt.js.map +1 -0
  366. package/lib/services/snippets.d.ts +138 -0
  367. package/lib/services/snippets.d.ts.map +1 -0
  368. package/lib/services/snippets.js +178 -0
  369. package/lib/services/snippets.js.map +1 -0
  370. package/lib/services/spectrum.d.ts +316 -0
  371. package/lib/services/spectrum.d.ts.map +1 -0
  372. package/lib/services/spectrum.js +510 -0
  373. package/lib/services/spectrum.js.map +1 -0
  374. package/lib/services/speed.d.ts +227 -0
  375. package/lib/services/speed.d.ts.map +1 -0
  376. package/lib/services/speed.js +444 -0
  377. package/lib/services/speed.js.map +1 -0
  378. package/lib/services/ssl.d.ts +370 -0
  379. package/lib/services/ssl.d.ts.map +1 -0
  380. package/lib/services/ssl.js +732 -0
  381. package/lib/services/ssl.js.map +1 -0
  382. package/lib/services/stream.d.ts +1014 -0
  383. package/lib/services/stream.d.ts.map +1 -0
  384. package/lib/services/stream.js +1049 -0
  385. package/lib/services/stream.js.map +1 -0
  386. package/lib/services/token-validation.d.ts +547 -0
  387. package/lib/services/token-validation.d.ts.map +1 -0
  388. package/lib/services/token-validation.js +768 -0
  389. package/lib/services/token-validation.js.map +1 -0
  390. package/lib/services/turnstile.d.ts +248 -0
  391. package/lib/services/turnstile.d.ts.map +1 -0
  392. package/lib/services/turnstile.js +308 -0
  393. package/lib/services/turnstile.js.map +1 -0
  394. package/lib/services/url-normalization.d.ts +53 -0
  395. package/lib/services/url-normalization.d.ts.map +1 -0
  396. package/lib/services/url-normalization.js +52 -0
  397. package/lib/services/url-normalization.js.map +1 -0
  398. package/lib/services/url-scanner.d.ts +612 -0
  399. package/lib/services/url-scanner.d.ts.map +1 -0
  400. package/lib/services/url-scanner.js +915 -0
  401. package/lib/services/url-scanner.js.map +1 -0
  402. package/lib/services/user.d.ts +441 -0
  403. package/lib/services/user.d.ts.map +1 -0
  404. package/lib/services/user.js +567 -0
  405. package/lib/services/user.js.map +1 -0
  406. package/lib/services/vectorize.d.ts +282 -0
  407. package/lib/services/vectorize.d.ts.map +1 -0
  408. package/lib/services/vectorize.js +340 -0
  409. package/lib/services/vectorize.js.map +1 -0
  410. package/lib/services/waiting-rooms.d.ts +1009 -0
  411. package/lib/services/waiting-rooms.d.ts.map +1 -0
  412. package/lib/services/waiting-rooms.js +1757 -0
  413. package/lib/services/waiting-rooms.js.map +1 -0
  414. package/lib/services/web3.d.ts +274 -0
  415. package/lib/services/web3.d.ts.map +1 -0
  416. package/lib/services/web3.js +362 -0
  417. package/lib/services/web3.js.map +1 -0
  418. package/lib/services/workers-for-platforms.d.ts +1224 -0
  419. package/lib/services/workers-for-platforms.d.ts.map +1 -0
  420. package/lib/services/workers-for-platforms.js +2078 -0
  421. package/lib/services/workers-for-platforms.js.map +1 -0
  422. package/lib/services/workers.d.ts +3498 -0
  423. package/lib/services/workers.d.ts.map +1 -0
  424. package/lib/services/workers.js +5967 -0
  425. package/lib/services/workers.js.map +1 -0
  426. package/lib/services/workflows.d.ts +359 -0
  427. package/lib/services/workflows.d.ts.map +1 -0
  428. package/lib/services/workflows.js +516 -0
  429. package/lib/services/workflows.js.map +1 -0
  430. package/lib/services/zaraz.d.ts +300 -0
  431. package/lib/services/zaraz.d.ts.map +1 -0
  432. package/lib/services/zaraz.js +298 -0
  433. package/lib/services/zaraz.js.map +1 -0
  434. package/lib/services/zero-trust.d.ts +15449 -0
  435. package/lib/services/zero-trust.d.ts.map +1 -0
  436. package/lib/services/zero-trust.js +29194 -0
  437. package/lib/services/zero-trust.js.map +1 -0
  438. package/lib/services/zones.d.ts +1278 -0
  439. package/lib/services/zones.d.ts.map +1 -0
  440. package/lib/services/zones.js +2416 -0
  441. package/lib/services/zones.js.map +1 -0
  442. package/lib/traits.d.ts +28 -0
  443. package/lib/traits.d.ts.map +1 -0
  444. package/lib/traits.js +26 -0
  445. package/lib/traits.js.map +1 -0
  446. package/package.json +68 -5
  447. package/src/auth.ts +14 -0
  448. package/src/category.ts +1 -0
  449. package/src/client/api.ts +329 -0
  450. package/src/client/index.ts +7 -0
  451. package/src/credentials.ts +30 -0
  452. package/src/errors.ts +57 -0
  453. package/src/index.ts +9 -0
  454. package/src/retry.ts +35 -0
  455. package/src/schemas.ts +51 -0
  456. package/src/services/abuse-reports.ts +747 -0
  457. package/src/services/accounts.ts +1947 -0
  458. package/src/services/acm.ts +170 -0
  459. package/src/services/addressing.ts +3947 -0
  460. package/src/services/ai-gateway.ts +3335 -0
  461. package/src/services/ai.ts +727 -0
  462. package/src/services/aisearch.ts +4750 -0
  463. package/src/services/alerting.ts +2947 -0
  464. package/src/services/api-gateway.ts +3391 -0
  465. package/src/services/argo.ts +254 -0
  466. package/src/services/audit-logs.ts +90 -0
  467. package/src/services/billing.ts +172 -0
  468. package/src/services/bot-management.ts +541 -0
  469. package/src/services/botnet-feed.ts +193 -0
  470. package/src/services/brand-protection.ts +553 -0
  471. package/src/services/browser-rendering.ts +2707 -0
  472. package/src/services/cache.ts +827 -0
  473. package/src/services/calls.ts +483 -0
  474. package/src/services/certificate-authorities.ts +110 -0
  475. package/src/services/client-certificates.ts +718 -0
  476. package/src/services/cloud-connector.ts +181 -0
  477. package/src/services/cloudforce-one.ts +3876 -0
  478. package/src/services/connectivity.ts +629 -0
  479. package/src/services/content-scanning.ts +385 -0
  480. package/src/services/custom-certificates.ts +611 -0
  481. package/src/services/custom-hostnames.ts +2453 -0
  482. package/src/services/custom-nameservers.ts +182 -0
  483. package/src/services/custom-pages.ts +264 -0
  484. package/src/services/d1.ts +1034 -0
  485. package/src/services/dcv-delegation.ts +52 -0
  486. package/src/services/diagnostics.ts +603 -0
  487. package/src/services/dns-firewall.ts +823 -0
  488. package/src/services/dns.ts +8897 -0
  489. package/src/services/durable-objects.ts +148 -0
  490. package/src/services/email-routing.ts +1602 -0
  491. package/src/services/email-security.ts +4283 -0
  492. package/src/services/filters.ts +370 -0
  493. package/src/services/firewall.ts +3896 -0
  494. package/src/services/healthchecks.ts +1750 -0
  495. package/src/services/hostnames.ts +218 -0
  496. package/src/services/hyperdrive.ts +592 -0
  497. package/src/services/iam.ts +1668 -0
  498. package/src/services/images.ts +1086 -0
  499. package/src/services/intel.ts +2768 -0
  500. package/src/services/ips.ts +88 -0
  501. package/src/services/keyless-certificates.ts +462 -0
  502. package/src/services/kv.ts +1011 -0
  503. package/src/services/leaked-credential-checks.ts +325 -0
  504. package/src/services/load-balancers.ts +6438 -0
  505. package/src/services/logpush.ts +1667 -0
  506. package/src/services/logs.ts +375 -0
  507. package/src/services/magic-cloud-networking.ts +10020 -0
  508. package/src/services/magic-network-monitoring.ts +1156 -0
  509. package/src/services/magic-transit.ts +13050 -0
  510. package/src/services/managed-transforms.ts +237 -0
  511. package/src/services/memberships.ts +615 -0
  512. package/src/services/mtls-certificates.ts +374 -0
  513. package/src/services/network-interconnects.ts +1253 -0
  514. package/src/services/organizations.ts +674 -0
  515. package/src/services/origin-ca-certificates.ts +303 -0
  516. package/src/services/origin-post-quantum-encryption.ts +128 -0
  517. package/src/services/origin-tls-client-auth.ts +878 -0
  518. package/src/services/page-rules.ts +2612 -0
  519. package/src/services/page-shield.ts +1195 -0
  520. package/src/services/pages.ts +5709 -0
  521. package/src/services/pipelines.ts +6000 -0
  522. package/src/services/queues.ts +2629 -0
  523. package/src/services/r2-data-catalog.ts +1119 -0
  524. package/src/services/r2.ts +3348 -0
  525. package/src/services/radar.ts +42152 -0
  526. package/src/services/rate-limits.ts +1150 -0
  527. package/src/services/realtime-kit.ts +11079 -0
  528. package/src/services/registrar.ts +295 -0
  529. package/src/services/request-tracers.ts +158 -0
  530. package/src/services/resource-sharing.ts +1832 -0
  531. package/src/services/rules.ts +837 -0
  532. package/src/services/rulesets.ts +15144 -0
  533. package/src/services/rum.ts +901 -0
  534. package/src/services/schema-validation.ts +733 -0
  535. package/src/services/secrets-store.ts +860 -0
  536. package/src/services/security-center.ts +397 -0
  537. package/src/services/security-txt.ts +315 -0
  538. package/src/services/snippets.ts +420 -0
  539. package/src/services/spectrum.ts +1103 -0
  540. package/src/services/speed.ts +1056 -0
  541. package/src/services/ssl.ts +1587 -0
  542. package/src/services/stream.ts +2756 -0
  543. package/src/services/token-validation.ts +1585 -0
  544. package/src/services/turnstile.ts +643 -0
  545. package/src/services/url-normalization.ts +129 -0
  546. package/src/services/url-scanner.ts +1851 -0
  547. package/src/services/user.ts +1384 -0
  548. package/src/services/vectorize.ts +816 -0
  549. package/src/services/waiting-rooms.ts +3807 -0
  550. package/src/services/web3.ts +834 -0
  551. package/src/services/workers-for-platforms.ts +3859 -0
  552. package/src/services/workers.ts +11637 -0
  553. package/src/services/workflows.ts +1124 -0
  554. package/src/services/zaraz.ts +797 -0
  555. package/src/services/zero-trust.ts +58929 -0
  556. package/src/services/zones.ts +4875 -0
  557. package/src/traits.ts +47 -0
  558. package/bun.lock +0 -26
  559. package/index.ts +0 -1
  560. package/tsconfig.json +0 -29
@@ -0,0 +1,3859 @@
1
+ /**
2
+ * Cloudflare WORKERS-FOR-PLATFORMS API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service workers-for-platforms
6
+ */
7
+
8
+ import * as Schema from "effect/Schema";
9
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
10
+ import * as API from "../client/api.ts";
11
+ import * as T from "../traits";
12
+ import type { Credentials } from "../credentials";
13
+ import { type DefaultErrors } from "../errors";
14
+ import { UploadableSchema } from "../schemas";
15
+
16
+ // =============================================================================
17
+ // DispatchNamespace
18
+ // =============================================================================
19
+
20
+ export interface GetDispatchNamespaceRequest {
21
+ dispatchNamespace: string;
22
+ /** Identifier. */
23
+ accountId: string;
24
+ }
25
+
26
+ export const GetDispatchNamespaceRequest =
27
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
28
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
29
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
30
+ }).pipe(
31
+ T.Http({
32
+ method: "GET",
33
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}",
34
+ }),
35
+ ) as unknown as Schema.Schema<GetDispatchNamespaceRequest>;
36
+
37
+ export interface GetDispatchNamespaceResponse {
38
+ /** Identifier. */
39
+ createdBy?: string | null;
40
+ /** When the script was created. */
41
+ createdOn?: string | null;
42
+ /** Identifier. */
43
+ modifiedBy?: string | null;
44
+ /** When the script was last modified. */
45
+ modifiedOn?: string | null;
46
+ /** API Resource UUID tag. */
47
+ namespaceId?: string | null;
48
+ /** Name of the Workers for Platforms dispatch namespace. */
49
+ namespaceName?: string | null;
50
+ /** The current number of scripts in this Dispatch Namespace. */
51
+ scriptCount?: number | null;
52
+ /** Whether the Workers in the namespace are executed in a "trusted" manner. When a Worker is trusted, it has access to the shared caches for the zone in the Cache API, and has access to the `request.cf` */
53
+ trustedWorkers?: boolean | null;
54
+ }
55
+
56
+ export const GetDispatchNamespaceResponse =
57
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
58
+ createdBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
59
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
60
+ modifiedBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
61
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
62
+ namespaceId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
63
+ namespaceName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
64
+ scriptCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
65
+ trustedWorkers: Schema.optional(
66
+ Schema.Union([Schema.Boolean, Schema.Null]),
67
+ ),
68
+ }).pipe(
69
+ Schema.encodeKeys({
70
+ createdBy: "created_by",
71
+ createdOn: "created_on",
72
+ modifiedBy: "modified_by",
73
+ modifiedOn: "modified_on",
74
+ namespaceId: "namespace_id",
75
+ namespaceName: "namespace_name",
76
+ scriptCount: "script_count",
77
+ trustedWorkers: "trusted_workers",
78
+ }),
79
+ ) as unknown as Schema.Schema<GetDispatchNamespaceResponse>;
80
+
81
+ export type GetDispatchNamespaceError = DefaultErrors;
82
+
83
+ export const getDispatchNamespace: API.OperationMethod<
84
+ GetDispatchNamespaceRequest,
85
+ GetDispatchNamespaceResponse,
86
+ GetDispatchNamespaceError,
87
+ Credentials | HttpClient.HttpClient
88
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
89
+ input: GetDispatchNamespaceRequest,
90
+ output: GetDispatchNamespaceResponse,
91
+ errors: [],
92
+ }));
93
+
94
+ export interface ListDispatchNamespacesRequest {
95
+ /** Identifier. */
96
+ accountId: string;
97
+ }
98
+
99
+ export const ListDispatchNamespacesRequest =
100
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
101
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
102
+ }).pipe(
103
+ T.Http({
104
+ method: "GET",
105
+ path: "/accounts/{account_id}/workers/dispatch/namespaces",
106
+ }),
107
+ ) as unknown as Schema.Schema<ListDispatchNamespacesRequest>;
108
+
109
+ export type ListDispatchNamespacesResponse = {
110
+ createdBy?: string | null;
111
+ createdOn?: string | null;
112
+ modifiedBy?: string | null;
113
+ modifiedOn?: string | null;
114
+ namespaceId?: string | null;
115
+ namespaceName?: string | null;
116
+ scriptCount?: number | null;
117
+ trustedWorkers?: boolean | null;
118
+ }[];
119
+
120
+ export const ListDispatchNamespacesResponse =
121
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
122
+ Schema.Struct({
123
+ createdBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
124
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
125
+ modifiedBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
126
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
127
+ namespaceId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
128
+ namespaceName: Schema.optional(
129
+ Schema.Union([Schema.String, Schema.Null]),
130
+ ),
131
+ scriptCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
132
+ trustedWorkers: Schema.optional(
133
+ Schema.Union([Schema.Boolean, Schema.Null]),
134
+ ),
135
+ }).pipe(
136
+ Schema.encodeKeys({
137
+ createdBy: "created_by",
138
+ createdOn: "created_on",
139
+ modifiedBy: "modified_by",
140
+ modifiedOn: "modified_on",
141
+ namespaceId: "namespace_id",
142
+ namespaceName: "namespace_name",
143
+ scriptCount: "script_count",
144
+ trustedWorkers: "trusted_workers",
145
+ }),
146
+ ),
147
+ ) as unknown as Schema.Schema<ListDispatchNamespacesResponse>;
148
+
149
+ export type ListDispatchNamespacesError = DefaultErrors;
150
+
151
+ export const listDispatchNamespaces: API.OperationMethod<
152
+ ListDispatchNamespacesRequest,
153
+ ListDispatchNamespacesResponse,
154
+ ListDispatchNamespacesError,
155
+ Credentials | HttpClient.HttpClient
156
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
157
+ input: ListDispatchNamespacesRequest,
158
+ output: ListDispatchNamespacesResponse,
159
+ errors: [],
160
+ }));
161
+
162
+ export interface CreateDispatchNamespaceRequest {
163
+ /** Path param: Identifier. */
164
+ accountId: string;
165
+ /** Body param: The name of the dispatch namespace. */
166
+ name?: string;
167
+ }
168
+
169
+ export const CreateDispatchNamespaceRequest =
170
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
171
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
172
+ name: Schema.optional(Schema.String),
173
+ }).pipe(
174
+ T.Http({
175
+ method: "POST",
176
+ path: "/accounts/{account_id}/workers/dispatch/namespaces",
177
+ }),
178
+ ) as unknown as Schema.Schema<CreateDispatchNamespaceRequest>;
179
+
180
+ export interface CreateDispatchNamespaceResponse {
181
+ /** Identifier. */
182
+ createdBy?: string | null;
183
+ /** When the script was created. */
184
+ createdOn?: string | null;
185
+ /** Identifier. */
186
+ modifiedBy?: string | null;
187
+ /** When the script was last modified. */
188
+ modifiedOn?: string | null;
189
+ /** API Resource UUID tag. */
190
+ namespaceId?: string | null;
191
+ /** Name of the Workers for Platforms dispatch namespace. */
192
+ namespaceName?: string | null;
193
+ /** The current number of scripts in this Dispatch Namespace. */
194
+ scriptCount?: number | null;
195
+ /** Whether the Workers in the namespace are executed in a "trusted" manner. When a Worker is trusted, it has access to the shared caches for the zone in the Cache API, and has access to the `request.cf` */
196
+ trustedWorkers?: boolean | null;
197
+ }
198
+
199
+ export const CreateDispatchNamespaceResponse =
200
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
201
+ createdBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
202
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
203
+ modifiedBy: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
204
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
205
+ namespaceId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
206
+ namespaceName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
207
+ scriptCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
208
+ trustedWorkers: Schema.optional(
209
+ Schema.Union([Schema.Boolean, Schema.Null]),
210
+ ),
211
+ }).pipe(
212
+ Schema.encodeKeys({
213
+ createdBy: "created_by",
214
+ createdOn: "created_on",
215
+ modifiedBy: "modified_by",
216
+ modifiedOn: "modified_on",
217
+ namespaceId: "namespace_id",
218
+ namespaceName: "namespace_name",
219
+ scriptCount: "script_count",
220
+ trustedWorkers: "trusted_workers",
221
+ }),
222
+ ) as unknown as Schema.Schema<CreateDispatchNamespaceResponse>;
223
+
224
+ export type CreateDispatchNamespaceError = DefaultErrors;
225
+
226
+ export const createDispatchNamespace: API.OperationMethod<
227
+ CreateDispatchNamespaceRequest,
228
+ CreateDispatchNamespaceResponse,
229
+ CreateDispatchNamespaceError,
230
+ Credentials | HttpClient.HttpClient
231
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
232
+ input: CreateDispatchNamespaceRequest,
233
+ output: CreateDispatchNamespaceResponse,
234
+ errors: [],
235
+ }));
236
+
237
+ export interface DeleteDispatchNamespaceRequest {
238
+ dispatchNamespace: string;
239
+ /** Identifier. */
240
+ accountId: string;
241
+ }
242
+
243
+ export const DeleteDispatchNamespaceRequest =
244
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
245
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
246
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
247
+ }).pipe(
248
+ T.Http({
249
+ method: "DELETE",
250
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}",
251
+ }),
252
+ ) as unknown as Schema.Schema<DeleteDispatchNamespaceRequest>;
253
+
254
+ export type DeleteDispatchNamespaceResponse = unknown;
255
+
256
+ export const DeleteDispatchNamespaceResponse =
257
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<DeleteDispatchNamespaceResponse>;
258
+
259
+ export type DeleteDispatchNamespaceError = DefaultErrors;
260
+
261
+ export const deleteDispatchNamespace: API.OperationMethod<
262
+ DeleteDispatchNamespaceRequest,
263
+ DeleteDispatchNamespaceResponse,
264
+ DeleteDispatchNamespaceError,
265
+ Credentials | HttpClient.HttpClient
266
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
267
+ input: DeleteDispatchNamespaceRequest,
268
+ output: DeleteDispatchNamespaceResponse,
269
+ errors: [],
270
+ }));
271
+
272
+ // =============================================================================
273
+ // DispatchNamespaceScript
274
+ // =============================================================================
275
+
276
+ export interface GetDispatchNamespaceScriptRequest {
277
+ dispatchNamespace: string;
278
+ scriptName: string;
279
+ /** Identifier. */
280
+ accountId: string;
281
+ }
282
+
283
+ export const GetDispatchNamespaceScriptRequest =
284
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
285
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
286
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
287
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
288
+ }).pipe(
289
+ T.Http({
290
+ method: "GET",
291
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}",
292
+ }),
293
+ ) as unknown as Schema.Schema<GetDispatchNamespaceScriptRequest>;
294
+
295
+ export interface GetDispatchNamespaceScriptResponse {
296
+ /** When the script was created. */
297
+ createdOn?: string | null;
298
+ /** Name of the Workers for Platforms dispatch namespace. */
299
+ dispatchNamespace?: string | null;
300
+ /** When the script was last modified. */
301
+ modifiedOn?: string | null;
302
+ script?: unknown | null;
303
+ }
304
+
305
+ export const GetDispatchNamespaceScriptResponse =
306
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
307
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
308
+ dispatchNamespace: Schema.optional(
309
+ Schema.Union([Schema.String, Schema.Null]),
310
+ ),
311
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
312
+ script: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
313
+ }).pipe(
314
+ Schema.encodeKeys({
315
+ createdOn: "created_on",
316
+ dispatchNamespace: "dispatch_namespace",
317
+ modifiedOn: "modified_on",
318
+ script: "script",
319
+ }),
320
+ ) as unknown as Schema.Schema<GetDispatchNamespaceScriptResponse>;
321
+
322
+ export type GetDispatchNamespaceScriptError = DefaultErrors;
323
+
324
+ export const getDispatchNamespaceScript: API.OperationMethod<
325
+ GetDispatchNamespaceScriptRequest,
326
+ GetDispatchNamespaceScriptResponse,
327
+ GetDispatchNamespaceScriptError,
328
+ Credentials | HttpClient.HttpClient
329
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
330
+ input: GetDispatchNamespaceScriptRequest,
331
+ output: GetDispatchNamespaceScriptResponse,
332
+ errors: [],
333
+ }));
334
+
335
+ export interface PutDispatchNamespaceScriptRequest {
336
+ dispatchNamespace: string;
337
+ scriptName: string;
338
+ /** Path param: Identifier. */
339
+ accountId: string;
340
+ /** Body param: JSON-encoded metadata about the uploaded parts and Worker configuration. */
341
+ metadata: {
342
+ assets?: {
343
+ config?: {
344
+ headers?: string;
345
+ redirects?: string;
346
+ htmlHandling?:
347
+ | "auto-trailing-slash"
348
+ | "force-trailing-slash"
349
+ | "drop-trailing-slash"
350
+ | "none";
351
+ notFoundHandling?: "none" | "404-page" | "single-page-application";
352
+ runWorkerFirst?: string[] | boolean;
353
+ serveDirectly?: boolean;
354
+ };
355
+ jwt?: string;
356
+ };
357
+ bindings?: (
358
+ | { name: string; type: "ai" }
359
+ | { dataset: string; name: string; type: "analytics_engine" }
360
+ | { name: string; type: "assets" }
361
+ | { name: string; type: "browser" }
362
+ | { id: string; name: string; type: "d1" }
363
+ | { name: string; part: string; type: "data_blob" }
364
+ | {
365
+ name: string;
366
+ namespace: string;
367
+ type: "dispatch_namespace";
368
+ outbound?: {
369
+ params?: string[];
370
+ worker?: { environment?: string; service?: string };
371
+ };
372
+ }
373
+ | {
374
+ name: string;
375
+ type: "durable_object_namespace";
376
+ className?: string;
377
+ environment?: string;
378
+ namespaceId?: string;
379
+ scriptName?: string;
380
+ }
381
+ | { id: string; name: string; type: "hyperdrive" }
382
+ | { name: string; type: "inherit"; oldName?: string; versionId?: string }
383
+ | { name: string; type: "images" }
384
+ | { json: string; name: string; type: "json" }
385
+ | { name: string; namespaceId: string; type: "kv_namespace" }
386
+ | { certificateId: string; name: string; type: "mtls_certificate" }
387
+ | { name: string; text: string; type: "plain_text" }
388
+ | { name: string; pipeline: string; type: "pipelines" }
389
+ | { name: string; queueName: string; type: "queue" }
390
+ | {
391
+ bucketName: string;
392
+ name: string;
393
+ type: "r2_bucket";
394
+ jurisdiction?: "eu" | "fedramp";
395
+ }
396
+ | { name: string; text: string; type: "secret_text" }
397
+ | {
398
+ name: string;
399
+ type: "send_email";
400
+ allowedDestinationAddresses?: string[];
401
+ allowedSenderAddresses?: string[];
402
+ destinationAddress?: string;
403
+ }
404
+ | { name: string; service: string; type: "service"; environment?: string }
405
+ | { name: string; part: string; type: "text_blob" }
406
+ | { indexName: string; name: string; type: "vectorize" }
407
+ | { name: string; type: "version_metadata" }
408
+ | {
409
+ name: string;
410
+ secretName: string;
411
+ storeId: string;
412
+ type: "secrets_store_secret";
413
+ }
414
+ | {
415
+ algorithm: unknown;
416
+ format: "raw" | "pkcs8" | "spki" | "jwk";
417
+ name: string;
418
+ type: "secret_key";
419
+ usages: (
420
+ | "encrypt"
421
+ | "decrypt"
422
+ | "sign"
423
+ | "verify"
424
+ | "deriveKey"
425
+ | "deriveBits"
426
+ | "wrapKey"
427
+ | "unwrapKey"
428
+ )[];
429
+ keyBase64?: string;
430
+ keyJwk?: unknown;
431
+ }
432
+ | {
433
+ name: string;
434
+ type: "workflow";
435
+ workflowName: string;
436
+ className?: string;
437
+ scriptName?: string;
438
+ }
439
+ | { name: string; part: string; type: "wasm_module" }
440
+ )[];
441
+ bodyPart?: string;
442
+ compatibilityDate?: string;
443
+ compatibilityFlags?: string[];
444
+ keepAssets?: boolean;
445
+ keepBindings?: string[];
446
+ limits?: { cpuMs?: number };
447
+ logpush?: boolean;
448
+ mainModule?: string;
449
+ migrations?:
450
+ | unknown
451
+ | { newTag?: string; oldTag?: string; steps?: unknown[] };
452
+ observability?: {
453
+ enabled: boolean;
454
+ headSamplingRate?: number | null;
455
+ logs?: {
456
+ enabled: boolean;
457
+ invocationLogs: boolean;
458
+ destinations?: string[];
459
+ headSamplingRate?: number | null;
460
+ persist?: boolean;
461
+ } | null;
462
+ };
463
+ placement?:
464
+ | { mode: "smart" }
465
+ | { region: string }
466
+ | { hostname: string }
467
+ | { host: string };
468
+ tags?: string[];
469
+ tailConsumers?: unknown[] | null;
470
+ usageModel?: "standard" | "bundled" | "unbound";
471
+ };
472
+ /** Body param: An array of modules (often JavaScript files) comprising a Worker script. At least one module must be present and referenced in the metadata as `main_module` or `body_part` by filename.<br/ */
473
+ files?: (File | Blob)[];
474
+ }
475
+
476
+ export const PutDispatchNamespaceScriptRequest =
477
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
478
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
479
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
480
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
481
+ metadata: Schema.Struct({
482
+ assets: Schema.optional(
483
+ Schema.Struct({
484
+ config: Schema.optional(
485
+ Schema.Struct({
486
+ headers: Schema.optional(Schema.String),
487
+ redirects: Schema.optional(Schema.String),
488
+ htmlHandling: Schema.optional(
489
+ Schema.Literals([
490
+ "auto-trailing-slash",
491
+ "force-trailing-slash",
492
+ "drop-trailing-slash",
493
+ "none",
494
+ ]),
495
+ ),
496
+ notFoundHandling: Schema.optional(
497
+ Schema.Literals([
498
+ "none",
499
+ "404-page",
500
+ "single-page-application",
501
+ ]),
502
+ ),
503
+ runWorkerFirst: Schema.optional(
504
+ Schema.Union([Schema.Array(Schema.String), Schema.Boolean]),
505
+ ),
506
+ serveDirectly: Schema.optional(Schema.Boolean),
507
+ }).pipe(
508
+ Schema.encodeKeys({
509
+ headers: "_headers",
510
+ redirects: "_redirects",
511
+ htmlHandling: "html_handling",
512
+ notFoundHandling: "not_found_handling",
513
+ runWorkerFirst: "run_worker_first",
514
+ serveDirectly: "serve_directly",
515
+ }),
516
+ ),
517
+ ),
518
+ jwt: Schema.optional(Schema.String),
519
+ }),
520
+ ),
521
+ bindings: Schema.optional(
522
+ Schema.Array(
523
+ Schema.Union([
524
+ Schema.Struct({
525
+ name: Schema.String,
526
+ type: Schema.Literal("ai"),
527
+ }),
528
+ Schema.Struct({
529
+ dataset: Schema.String,
530
+ name: Schema.String,
531
+ type: Schema.Literal("analytics_engine"),
532
+ }),
533
+ Schema.Struct({
534
+ name: Schema.String,
535
+ type: Schema.Literal("assets"),
536
+ }),
537
+ Schema.Struct({
538
+ name: Schema.String,
539
+ type: Schema.Literal("browser"),
540
+ }),
541
+ Schema.Struct({
542
+ id: Schema.String,
543
+ name: Schema.String,
544
+ type: Schema.Literal("d1"),
545
+ }),
546
+ Schema.Struct({
547
+ name: Schema.String,
548
+ part: Schema.String,
549
+ type: Schema.Literal("data_blob"),
550
+ }),
551
+ Schema.Struct({
552
+ name: Schema.String,
553
+ namespace: Schema.String,
554
+ type: Schema.Literal("dispatch_namespace"),
555
+ outbound: Schema.optional(
556
+ Schema.Struct({
557
+ params: Schema.optional(Schema.Array(Schema.String)),
558
+ worker: Schema.optional(
559
+ Schema.Struct({
560
+ environment: Schema.optional(Schema.String),
561
+ service: Schema.optional(Schema.String),
562
+ }),
563
+ ),
564
+ }),
565
+ ),
566
+ }),
567
+ Schema.Struct({
568
+ name: Schema.String,
569
+ type: Schema.Literal("durable_object_namespace"),
570
+ className: Schema.optional(Schema.String),
571
+ environment: Schema.optional(Schema.String),
572
+ namespaceId: Schema.optional(Schema.String),
573
+ scriptName: Schema.optional(Schema.String),
574
+ }).pipe(
575
+ Schema.encodeKeys({
576
+ name: "name",
577
+ type: "type",
578
+ className: "class_name",
579
+ environment: "environment",
580
+ namespaceId: "namespace_id",
581
+ scriptName: "script_name",
582
+ }),
583
+ ),
584
+ Schema.Struct({
585
+ id: Schema.String,
586
+ name: Schema.String,
587
+ type: Schema.Literal("hyperdrive"),
588
+ }),
589
+ Schema.Struct({
590
+ name: Schema.String,
591
+ type: Schema.Literal("inherit"),
592
+ oldName: Schema.optional(Schema.String),
593
+ versionId: Schema.optional(Schema.String),
594
+ }).pipe(
595
+ Schema.encodeKeys({
596
+ name: "name",
597
+ type: "type",
598
+ oldName: "old_name",
599
+ versionId: "version_id",
600
+ }),
601
+ ),
602
+ Schema.Struct({
603
+ name: Schema.String,
604
+ type: Schema.Literal("images"),
605
+ }),
606
+ Schema.Struct({
607
+ json: Schema.String,
608
+ name: Schema.String,
609
+ type: Schema.Literal("json"),
610
+ }),
611
+ Schema.Struct({
612
+ name: Schema.String,
613
+ namespaceId: Schema.String,
614
+ type: Schema.Literal("kv_namespace"),
615
+ }).pipe(
616
+ Schema.encodeKeys({
617
+ name: "name",
618
+ namespaceId: "namespace_id",
619
+ type: "type",
620
+ }),
621
+ ),
622
+ Schema.Struct({
623
+ certificateId: Schema.String,
624
+ name: Schema.String,
625
+ type: Schema.Literal("mtls_certificate"),
626
+ }).pipe(
627
+ Schema.encodeKeys({
628
+ certificateId: "certificate_id",
629
+ name: "name",
630
+ type: "type",
631
+ }),
632
+ ),
633
+ Schema.Struct({
634
+ name: Schema.String,
635
+ text: Schema.String,
636
+ type: Schema.Literal("plain_text"),
637
+ }),
638
+ Schema.Struct({
639
+ name: Schema.String,
640
+ pipeline: Schema.String,
641
+ type: Schema.Literal("pipelines"),
642
+ }),
643
+ Schema.Struct({
644
+ name: Schema.String,
645
+ queueName: Schema.String,
646
+ type: Schema.Literal("queue"),
647
+ }).pipe(
648
+ Schema.encodeKeys({
649
+ name: "name",
650
+ queueName: "queue_name",
651
+ type: "type",
652
+ }),
653
+ ),
654
+ Schema.Struct({
655
+ bucketName: Schema.String,
656
+ name: Schema.String,
657
+ type: Schema.Literal("r2_bucket"),
658
+ jurisdiction: Schema.optional(Schema.Literals(["eu", "fedramp"])),
659
+ }).pipe(
660
+ Schema.encodeKeys({
661
+ bucketName: "bucket_name",
662
+ name: "name",
663
+ type: "type",
664
+ jurisdiction: "jurisdiction",
665
+ }),
666
+ ),
667
+ Schema.Struct({
668
+ name: Schema.String,
669
+ text: Schema.String,
670
+ type: Schema.Literal("secret_text"),
671
+ }),
672
+ Schema.Struct({
673
+ name: Schema.String,
674
+ type: Schema.Literal("send_email"),
675
+ allowedDestinationAddresses: Schema.optional(
676
+ Schema.Array(Schema.String),
677
+ ),
678
+ allowedSenderAddresses: Schema.optional(
679
+ Schema.Array(Schema.String),
680
+ ),
681
+ destinationAddress: Schema.optional(Schema.String),
682
+ }).pipe(
683
+ Schema.encodeKeys({
684
+ name: "name",
685
+ type: "type",
686
+ allowedDestinationAddresses: "allowed_destination_addresses",
687
+ allowedSenderAddresses: "allowed_sender_addresses",
688
+ destinationAddress: "destination_address",
689
+ }),
690
+ ),
691
+ Schema.Struct({
692
+ name: Schema.String,
693
+ service: Schema.String,
694
+ type: Schema.Literal("service"),
695
+ environment: Schema.optional(Schema.String),
696
+ }),
697
+ Schema.Struct({
698
+ name: Schema.String,
699
+ part: Schema.String,
700
+ type: Schema.Literal("text_blob"),
701
+ }),
702
+ Schema.Struct({
703
+ indexName: Schema.String,
704
+ name: Schema.String,
705
+ type: Schema.Literal("vectorize"),
706
+ }).pipe(
707
+ Schema.encodeKeys({
708
+ indexName: "index_name",
709
+ name: "name",
710
+ type: "type",
711
+ }),
712
+ ),
713
+ Schema.Struct({
714
+ name: Schema.String,
715
+ type: Schema.Literal("version_metadata"),
716
+ }),
717
+ Schema.Struct({
718
+ name: Schema.String,
719
+ secretName: Schema.String,
720
+ storeId: Schema.String,
721
+ type: Schema.Literal("secrets_store_secret"),
722
+ }).pipe(
723
+ Schema.encodeKeys({
724
+ name: "name",
725
+ secretName: "secret_name",
726
+ storeId: "store_id",
727
+ type: "type",
728
+ }),
729
+ ),
730
+ Schema.Struct({
731
+ algorithm: Schema.Unknown,
732
+ format: Schema.Literals(["raw", "pkcs8", "spki", "jwk"]),
733
+ name: Schema.String,
734
+ type: Schema.Literal("secret_key"),
735
+ usages: Schema.Array(
736
+ Schema.Literals([
737
+ "encrypt",
738
+ "decrypt",
739
+ "sign",
740
+ "verify",
741
+ "deriveKey",
742
+ "deriveBits",
743
+ "wrapKey",
744
+ "unwrapKey",
745
+ ]),
746
+ ),
747
+ keyBase64: Schema.optional(Schema.String),
748
+ keyJwk: Schema.optional(Schema.Unknown),
749
+ }).pipe(
750
+ Schema.encodeKeys({
751
+ algorithm: "algorithm",
752
+ format: "format",
753
+ name: "name",
754
+ type: "type",
755
+ usages: "usages",
756
+ keyBase64: "key_base64",
757
+ keyJwk: "key_jwk",
758
+ }),
759
+ ),
760
+ Schema.Struct({
761
+ name: Schema.String,
762
+ type: Schema.Literal("workflow"),
763
+ workflowName: Schema.String,
764
+ className: Schema.optional(Schema.String),
765
+ scriptName: Schema.optional(Schema.String),
766
+ }).pipe(
767
+ Schema.encodeKeys({
768
+ name: "name",
769
+ type: "type",
770
+ workflowName: "workflow_name",
771
+ className: "class_name",
772
+ scriptName: "script_name",
773
+ }),
774
+ ),
775
+ Schema.Struct({
776
+ name: Schema.String,
777
+ part: Schema.String,
778
+ type: Schema.Literal("wasm_module"),
779
+ }),
780
+ ]),
781
+ ),
782
+ ),
783
+ bodyPart: Schema.optional(Schema.String),
784
+ compatibilityDate: Schema.optional(Schema.String),
785
+ compatibilityFlags: Schema.optional(Schema.Array(Schema.String)),
786
+ keepAssets: Schema.optional(Schema.Boolean),
787
+ keepBindings: Schema.optional(Schema.Array(Schema.String)),
788
+ limits: Schema.optional(
789
+ Schema.Struct({
790
+ cpuMs: Schema.optional(Schema.Number),
791
+ }).pipe(Schema.encodeKeys({ cpuMs: "cpu_ms" })),
792
+ ),
793
+ logpush: Schema.optional(Schema.Boolean),
794
+ mainModule: Schema.optional(Schema.String),
795
+ migrations: Schema.optional(
796
+ Schema.Union([
797
+ Schema.Unknown,
798
+ Schema.Struct({
799
+ newTag: Schema.optional(Schema.String),
800
+ oldTag: Schema.optional(Schema.String),
801
+ steps: Schema.optional(Schema.Array(Schema.Unknown)),
802
+ }).pipe(
803
+ Schema.encodeKeys({
804
+ newTag: "new_tag",
805
+ oldTag: "old_tag",
806
+ steps: "steps",
807
+ }),
808
+ ),
809
+ ]),
810
+ ),
811
+ observability: Schema.optional(
812
+ Schema.Struct({
813
+ enabled: Schema.Boolean,
814
+ headSamplingRate: Schema.optional(
815
+ Schema.Union([Schema.Number, Schema.Null]),
816
+ ),
817
+ logs: Schema.optional(
818
+ Schema.Union([
819
+ Schema.Struct({
820
+ enabled: Schema.Boolean,
821
+ invocationLogs: Schema.Boolean,
822
+ destinations: Schema.optional(Schema.Array(Schema.String)),
823
+ headSamplingRate: Schema.optional(
824
+ Schema.Union([Schema.Number, Schema.Null]),
825
+ ),
826
+ persist: Schema.optional(Schema.Boolean),
827
+ }).pipe(
828
+ Schema.encodeKeys({
829
+ enabled: "enabled",
830
+ invocationLogs: "invocation_logs",
831
+ destinations: "destinations",
832
+ headSamplingRate: "head_sampling_rate",
833
+ persist: "persist",
834
+ }),
835
+ ),
836
+ Schema.Null,
837
+ ]),
838
+ ),
839
+ }).pipe(
840
+ Schema.encodeKeys({
841
+ enabled: "enabled",
842
+ headSamplingRate: "head_sampling_rate",
843
+ logs: "logs",
844
+ }),
845
+ ),
846
+ ),
847
+ placement: Schema.optional(
848
+ Schema.Union([
849
+ Schema.Struct({
850
+ mode: Schema.Literal("smart"),
851
+ }),
852
+ Schema.Struct({
853
+ region: Schema.String,
854
+ }),
855
+ Schema.Struct({
856
+ hostname: Schema.String,
857
+ }),
858
+ Schema.Struct({
859
+ host: Schema.String,
860
+ }),
861
+ ]),
862
+ ),
863
+ tags: Schema.optional(Schema.Array(Schema.String)),
864
+ tailConsumers: Schema.optional(
865
+ Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
866
+ ),
867
+ usageModel: Schema.optional(
868
+ Schema.Literals(["standard", "bundled", "unbound"]),
869
+ ),
870
+ }).pipe(
871
+ Schema.encodeKeys({
872
+ assets: "assets",
873
+ bindings: "bindings",
874
+ bodyPart: "body_part",
875
+ compatibilityDate: "compatibility_date",
876
+ compatibilityFlags: "compatibility_flags",
877
+ keepAssets: "keep_assets",
878
+ keepBindings: "keep_bindings",
879
+ limits: "limits",
880
+ logpush: "logpush",
881
+ mainModule: "main_module",
882
+ migrations: "migrations",
883
+ observability: "observability",
884
+ placement: "placement",
885
+ tags: "tags",
886
+ tailConsumers: "tail_consumers",
887
+ usageModel: "usage_model",
888
+ }),
889
+ ),
890
+ files: Schema.optional(
891
+ Schema.Array(UploadableSchema.pipe(T.HttpFormDataFile())),
892
+ ),
893
+ }).pipe(
894
+ T.Http({
895
+ method: "PUT",
896
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}",
897
+ contentType: "multipart",
898
+ }),
899
+ ) as unknown as Schema.Schema<PutDispatchNamespaceScriptRequest>;
900
+
901
+ export interface PutDispatchNamespaceScriptResponse {
902
+ startupTimeMs: number;
903
+ /** The name used to identify the script. */
904
+ id?: string | null;
905
+ /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */
906
+ compatibilityDate?: string | null;
907
+ /** Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a `compatibility_date`. */
908
+ compatibilityFlags?: string[] | null;
909
+ /** When the script was created. */
910
+ createdOn?: string | null;
911
+ /** The entry point for the script. */
912
+ entryPoint?: string | null;
913
+ /** Hashed script content, can be used in a If-None-Match header when updating. */
914
+ etag?: string | null;
915
+ /** The names of handlers exported as part of the default export. */
916
+ handlers?: string[] | null;
917
+ /** Whether a Worker contains assets. */
918
+ hasAssets?: boolean | null;
919
+ /** Whether a Worker contains modules. */
920
+ hasModules?: boolean | null;
921
+ /** The client most recently used to deploy this Worker. */
922
+ lastDeployedFrom?: string | null;
923
+ /** Whether Logpush is turned on for the Worker. */
924
+ logpush?: boolean | null;
925
+ /** The tag of the Durable Object migration that was most recently applied for this Worker. */
926
+ migrationTag?: string | null;
927
+ /** When the script was last modified. */
928
+ modifiedOn?: string | null;
929
+ /** Named exports, such as Durable Object class implementations and named entrypoints. */
930
+ namedHandlers?: { handlers?: string[] | null; name?: string | null }[] | null;
931
+ /** Observability settings for the Worker. */
932
+ observability?: {
933
+ enabled: boolean;
934
+ headSamplingRate?: number | null;
935
+ logs?: {
936
+ enabled: boolean;
937
+ invocationLogs: boolean;
938
+ destinations?: string[] | null;
939
+ headSamplingRate?: number | null;
940
+ persist?: boolean | null;
941
+ } | null;
942
+ } | null;
943
+ /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify either mode for Smart Placement, or one of region/hostname/host for targeted place */
944
+ placement?:
945
+ | {
946
+ mode: "smart";
947
+ lastAnalyzedAt?: string | null;
948
+ status?:
949
+ | "SUCCESS"
950
+ | "UNSUPPORTED_APPLICATION"
951
+ | "INSUFFICIENT_INVOCATIONS"
952
+ | null;
953
+ }
954
+ | {
955
+ region: string;
956
+ lastAnalyzedAt?: string | null;
957
+ status?:
958
+ | "SUCCESS"
959
+ | "UNSUPPORTED_APPLICATION"
960
+ | "INSUFFICIENT_INVOCATIONS"
961
+ | null;
962
+ }
963
+ | {
964
+ hostname: string;
965
+ lastAnalyzedAt?: string | null;
966
+ status?:
967
+ | "SUCCESS"
968
+ | "UNSUPPORTED_APPLICATION"
969
+ | "INSUFFICIENT_INVOCATIONS"
970
+ | null;
971
+ }
972
+ | {
973
+ host: string;
974
+ lastAnalyzedAt?: string | null;
975
+ status?:
976
+ | "SUCCESS"
977
+ | "UNSUPPORTED_APPLICATION"
978
+ | "INSUFFICIENT_INVOCATIONS"
979
+ | null;
980
+ }
981
+ | null;
982
+ /** @deprecated */
983
+ placementMode?: "smart" | null;
984
+ /** @deprecated */
985
+ placementStatus?:
986
+ | "SUCCESS"
987
+ | "UNSUPPORTED_APPLICATION"
988
+ | "INSUFFICIENT_INVOCATIONS"
989
+ | null;
990
+ /** The immutable ID of the script. */
991
+ tag?: string | null;
992
+ /** Tags associated with the Worker. */
993
+ tags?: string[] | null;
994
+ /** List of Workers that will consume logs from the attached Worker. */
995
+ tailConsumers?: unknown[] | null;
996
+ /** Usage model for the Worker invocations. */
997
+ usageModel?: "standard" | "bundled" | "unbound" | null;
998
+ }
999
+
1000
+ export const PutDispatchNamespaceScriptResponse =
1001
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1002
+ startupTimeMs: Schema.Number,
1003
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1004
+ compatibilityDate: Schema.optional(
1005
+ Schema.Union([Schema.String, Schema.Null]),
1006
+ ),
1007
+ compatibilityFlags: Schema.optional(
1008
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1009
+ ),
1010
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1011
+ entryPoint: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1012
+ etag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1013
+ handlers: Schema.optional(
1014
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1015
+ ),
1016
+ hasAssets: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1017
+ hasModules: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1018
+ lastDeployedFrom: Schema.optional(
1019
+ Schema.Union([Schema.String, Schema.Null]),
1020
+ ),
1021
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1022
+ migrationTag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1023
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1024
+ namedHandlers: Schema.optional(
1025
+ Schema.Union([
1026
+ Schema.Array(
1027
+ Schema.Struct({
1028
+ handlers: Schema.optional(
1029
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1030
+ ),
1031
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1032
+ }),
1033
+ ),
1034
+ Schema.Null,
1035
+ ]),
1036
+ ),
1037
+ observability: Schema.optional(
1038
+ Schema.Union([
1039
+ Schema.Struct({
1040
+ enabled: Schema.Boolean,
1041
+ headSamplingRate: Schema.optional(
1042
+ Schema.Union([Schema.Number, Schema.Null]),
1043
+ ),
1044
+ logs: Schema.optional(
1045
+ Schema.Union([
1046
+ Schema.Struct({
1047
+ enabled: Schema.Boolean,
1048
+ invocationLogs: Schema.Boolean,
1049
+ destinations: Schema.optional(
1050
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1051
+ ),
1052
+ headSamplingRate: Schema.optional(
1053
+ Schema.Union([Schema.Number, Schema.Null]),
1054
+ ),
1055
+ persist: Schema.optional(
1056
+ Schema.Union([Schema.Boolean, Schema.Null]),
1057
+ ),
1058
+ }).pipe(
1059
+ Schema.encodeKeys({
1060
+ enabled: "enabled",
1061
+ invocationLogs: "invocation_logs",
1062
+ destinations: "destinations",
1063
+ headSamplingRate: "head_sampling_rate",
1064
+ persist: "persist",
1065
+ }),
1066
+ ),
1067
+ Schema.Null,
1068
+ ]),
1069
+ ),
1070
+ }).pipe(
1071
+ Schema.encodeKeys({
1072
+ enabled: "enabled",
1073
+ headSamplingRate: "head_sampling_rate",
1074
+ logs: "logs",
1075
+ }),
1076
+ ),
1077
+ Schema.Null,
1078
+ ]),
1079
+ ),
1080
+ placement: Schema.optional(
1081
+ Schema.Union([
1082
+ Schema.Union([
1083
+ Schema.Struct({
1084
+ mode: Schema.Literal("smart"),
1085
+ lastAnalyzedAt: Schema.optional(
1086
+ Schema.Union([Schema.String, Schema.Null]),
1087
+ ),
1088
+ status: Schema.optional(
1089
+ Schema.Union([
1090
+ Schema.Literals([
1091
+ "SUCCESS",
1092
+ "UNSUPPORTED_APPLICATION",
1093
+ "INSUFFICIENT_INVOCATIONS",
1094
+ ]),
1095
+ Schema.Null,
1096
+ ]),
1097
+ ),
1098
+ }).pipe(
1099
+ Schema.encodeKeys({
1100
+ mode: "mode",
1101
+ lastAnalyzedAt: "last_analyzed_at",
1102
+ status: "status",
1103
+ }),
1104
+ ),
1105
+ Schema.Struct({
1106
+ region: Schema.String,
1107
+ lastAnalyzedAt: Schema.optional(
1108
+ Schema.Union([Schema.String, Schema.Null]),
1109
+ ),
1110
+ status: Schema.optional(
1111
+ Schema.Union([
1112
+ Schema.Literals([
1113
+ "SUCCESS",
1114
+ "UNSUPPORTED_APPLICATION",
1115
+ "INSUFFICIENT_INVOCATIONS",
1116
+ ]),
1117
+ Schema.Null,
1118
+ ]),
1119
+ ),
1120
+ }).pipe(
1121
+ Schema.encodeKeys({
1122
+ region: "region",
1123
+ lastAnalyzedAt: "last_analyzed_at",
1124
+ status: "status",
1125
+ }),
1126
+ ),
1127
+ Schema.Struct({
1128
+ hostname: Schema.String,
1129
+ lastAnalyzedAt: Schema.optional(
1130
+ Schema.Union([Schema.String, Schema.Null]),
1131
+ ),
1132
+ status: Schema.optional(
1133
+ Schema.Union([
1134
+ Schema.Literals([
1135
+ "SUCCESS",
1136
+ "UNSUPPORTED_APPLICATION",
1137
+ "INSUFFICIENT_INVOCATIONS",
1138
+ ]),
1139
+ Schema.Null,
1140
+ ]),
1141
+ ),
1142
+ }).pipe(
1143
+ Schema.encodeKeys({
1144
+ hostname: "hostname",
1145
+ lastAnalyzedAt: "last_analyzed_at",
1146
+ status: "status",
1147
+ }),
1148
+ ),
1149
+ Schema.Struct({
1150
+ host: Schema.String,
1151
+ lastAnalyzedAt: Schema.optional(
1152
+ Schema.Union([Schema.String, Schema.Null]),
1153
+ ),
1154
+ status: Schema.optional(
1155
+ Schema.Union([
1156
+ Schema.Literals([
1157
+ "SUCCESS",
1158
+ "UNSUPPORTED_APPLICATION",
1159
+ "INSUFFICIENT_INVOCATIONS",
1160
+ ]),
1161
+ Schema.Null,
1162
+ ]),
1163
+ ),
1164
+ }).pipe(
1165
+ Schema.encodeKeys({
1166
+ host: "host",
1167
+ lastAnalyzedAt: "last_analyzed_at",
1168
+ status: "status",
1169
+ }),
1170
+ ),
1171
+ ]),
1172
+ Schema.Null,
1173
+ ]),
1174
+ ),
1175
+ placementMode: Schema.optional(
1176
+ Schema.Union([Schema.Literal("smart"), Schema.Null]),
1177
+ ),
1178
+ placementStatus: Schema.optional(
1179
+ Schema.Union([
1180
+ Schema.Literals([
1181
+ "SUCCESS",
1182
+ "UNSUPPORTED_APPLICATION",
1183
+ "INSUFFICIENT_INVOCATIONS",
1184
+ ]),
1185
+ Schema.Null,
1186
+ ]),
1187
+ ),
1188
+ tag: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1189
+ tags: Schema.optional(
1190
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1191
+ ),
1192
+ tailConsumers: Schema.optional(
1193
+ Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
1194
+ ),
1195
+ usageModel: Schema.optional(
1196
+ Schema.Union([
1197
+ Schema.Literals(["standard", "bundled", "unbound"]),
1198
+ Schema.Null,
1199
+ ]),
1200
+ ),
1201
+ }).pipe(
1202
+ Schema.encodeKeys({
1203
+ startupTimeMs: "startup_time_ms",
1204
+ id: "id",
1205
+ compatibilityDate: "compatibility_date",
1206
+ compatibilityFlags: "compatibility_flags",
1207
+ createdOn: "created_on",
1208
+ entryPoint: "entry_point",
1209
+ etag: "etag",
1210
+ handlers: "handlers",
1211
+ hasAssets: "has_assets",
1212
+ hasModules: "has_modules",
1213
+ lastDeployedFrom: "last_deployed_from",
1214
+ logpush: "logpush",
1215
+ migrationTag: "migration_tag",
1216
+ modifiedOn: "modified_on",
1217
+ namedHandlers: "named_handlers",
1218
+ observability: "observability",
1219
+ placement: "placement",
1220
+ placementMode: "placement_mode",
1221
+ placementStatus: "placement_status",
1222
+ tag: "tag",
1223
+ tags: "tags",
1224
+ tailConsumers: "tail_consumers",
1225
+ usageModel: "usage_model",
1226
+ }),
1227
+ ) as unknown as Schema.Schema<PutDispatchNamespaceScriptResponse>;
1228
+
1229
+ export type PutDispatchNamespaceScriptError = DefaultErrors;
1230
+
1231
+ export const putDispatchNamespaceScript: API.OperationMethod<
1232
+ PutDispatchNamespaceScriptRequest,
1233
+ PutDispatchNamespaceScriptResponse,
1234
+ PutDispatchNamespaceScriptError,
1235
+ Credentials | HttpClient.HttpClient
1236
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1237
+ input: PutDispatchNamespaceScriptRequest,
1238
+ output: PutDispatchNamespaceScriptResponse,
1239
+ errors: [],
1240
+ }));
1241
+
1242
+ export interface DeleteDispatchNamespaceScriptRequest {
1243
+ dispatchNamespace: string;
1244
+ scriptName: string;
1245
+ /** Path param: Identifier. */
1246
+ accountId: string;
1247
+ /** Query param: If set to true, delete will not be stopped by associated service binding, durable object, or other binding. Any of these associated bindings/durable objects will be deleted along with the */
1248
+ force?: boolean;
1249
+ }
1250
+
1251
+ export const DeleteDispatchNamespaceScriptRequest =
1252
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1253
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
1254
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
1255
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1256
+ force: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("force")),
1257
+ }).pipe(
1258
+ T.Http({
1259
+ method: "DELETE",
1260
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}",
1261
+ }),
1262
+ ) as unknown as Schema.Schema<DeleteDispatchNamespaceScriptRequest>;
1263
+
1264
+ export type DeleteDispatchNamespaceScriptResponse = unknown;
1265
+
1266
+ export const DeleteDispatchNamespaceScriptResponse =
1267
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<DeleteDispatchNamespaceScriptResponse>;
1268
+
1269
+ export type DeleteDispatchNamespaceScriptError = DefaultErrors;
1270
+
1271
+ export const deleteDispatchNamespaceScript: API.OperationMethod<
1272
+ DeleteDispatchNamespaceScriptRequest,
1273
+ DeleteDispatchNamespaceScriptResponse,
1274
+ DeleteDispatchNamespaceScriptError,
1275
+ Credentials | HttpClient.HttpClient
1276
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1277
+ input: DeleteDispatchNamespaceScriptRequest,
1278
+ output: DeleteDispatchNamespaceScriptResponse,
1279
+ errors: [],
1280
+ }));
1281
+
1282
+ // =============================================================================
1283
+ // DispatchNamespaceScriptAssetUpload
1284
+ // =============================================================================
1285
+
1286
+ export interface CreateDispatchNamespaceScriptAssetUploadRequest {
1287
+ dispatchNamespace: string;
1288
+ scriptName: string;
1289
+ /** Path param: Identifier. */
1290
+ accountId: string;
1291
+ /** Body param: A manifest ([path]: {hash, size}) map of files to upload. As an example, `/blog/hello-world.html` would be a valid path key. */
1292
+ manifest: Record<string, unknown>;
1293
+ }
1294
+
1295
+ export const CreateDispatchNamespaceScriptAssetUploadRequest =
1296
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1297
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
1298
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
1299
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1300
+ manifest: Schema.Struct({}),
1301
+ }).pipe(
1302
+ T.Http({
1303
+ method: "POST",
1304
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/assets-upload-session",
1305
+ }),
1306
+ ) as unknown as Schema.Schema<CreateDispatchNamespaceScriptAssetUploadRequest>;
1307
+
1308
+ export interface CreateDispatchNamespaceScriptAssetUploadResponse {
1309
+ /** The requests to make to upload assets. */
1310
+ buckets?: string[][] | null;
1311
+ /** A JWT to use as authentication for uploading assets. */
1312
+ jwt?: string | null;
1313
+ }
1314
+
1315
+ export const CreateDispatchNamespaceScriptAssetUploadResponse =
1316
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1317
+ buckets: Schema.optional(
1318
+ Schema.Union([Schema.Array(Schema.Array(Schema.String)), Schema.Null]),
1319
+ ),
1320
+ jwt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1321
+ }) as unknown as Schema.Schema<CreateDispatchNamespaceScriptAssetUploadResponse>;
1322
+
1323
+ export type CreateDispatchNamespaceScriptAssetUploadError = DefaultErrors;
1324
+
1325
+ export const createDispatchNamespaceScriptAssetUpload: API.OperationMethod<
1326
+ CreateDispatchNamespaceScriptAssetUploadRequest,
1327
+ CreateDispatchNamespaceScriptAssetUploadResponse,
1328
+ CreateDispatchNamespaceScriptAssetUploadError,
1329
+ Credentials | HttpClient.HttpClient
1330
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1331
+ input: CreateDispatchNamespaceScriptAssetUploadRequest,
1332
+ output: CreateDispatchNamespaceScriptAssetUploadResponse,
1333
+ errors: [],
1334
+ }));
1335
+
1336
+ // =============================================================================
1337
+ // DispatchNamespaceScriptBinding
1338
+ // =============================================================================
1339
+
1340
+ export interface GetDispatchNamespaceScriptBindingRequest {
1341
+ dispatchNamespace: string;
1342
+ scriptName: string;
1343
+ /** Identifier. */
1344
+ accountId: string;
1345
+ }
1346
+
1347
+ export const GetDispatchNamespaceScriptBindingRequest =
1348
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1349
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
1350
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
1351
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1352
+ }).pipe(
1353
+ T.Http({
1354
+ method: "GET",
1355
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/bindings",
1356
+ }),
1357
+ ) as unknown as Schema.Schema<GetDispatchNamespaceScriptBindingRequest>;
1358
+
1359
+ export type GetDispatchNamespaceScriptBindingResponse = (
1360
+ | { name: string; type: "ai" }
1361
+ | { dataset: string; name: string; type: "analytics_engine" }
1362
+ | { name: string; type: "assets" }
1363
+ | { name: string; type: "browser" }
1364
+ | { id: string; name: string; type: "d1" }
1365
+ | { name: string; part: string; type: "data_blob" }
1366
+ | {
1367
+ name: string;
1368
+ namespace: string;
1369
+ type: "dispatch_namespace";
1370
+ outbound?: {
1371
+ params?: string[] | null;
1372
+ worker?: {
1373
+ environment?: string | null;
1374
+ service?: string | null;
1375
+ } | null;
1376
+ } | null;
1377
+ }
1378
+ | {
1379
+ name: string;
1380
+ type: "durable_object_namespace";
1381
+ className?: string | null;
1382
+ environment?: string | null;
1383
+ namespaceId?: string | null;
1384
+ scriptName?: string | null;
1385
+ }
1386
+ | { id: string; name: string; type: "hyperdrive" }
1387
+ | {
1388
+ name: string;
1389
+ type: "inherit";
1390
+ oldName?: string | null;
1391
+ versionId?: string | null;
1392
+ }
1393
+ | { name: string; type: "images" }
1394
+ | { json: string; name: string; type: "json" }
1395
+ | { name: string; namespaceId: string; type: "kv_namespace" }
1396
+ | { certificateId: string; name: string; type: "mtls_certificate" }
1397
+ | { name: string; text: string; type: "plain_text" }
1398
+ | { name: string; pipeline: string; type: "pipelines" }
1399
+ | { name: string; queueName: string; type: "queue" }
1400
+ | {
1401
+ bucketName: string;
1402
+ name: string;
1403
+ type: "r2_bucket";
1404
+ jurisdiction?: "eu" | "fedramp" | null;
1405
+ }
1406
+ | { name: string; type: "secret_text" }
1407
+ | {
1408
+ name: string;
1409
+ type: "send_email";
1410
+ allowedDestinationAddresses?: string[] | null;
1411
+ allowedSenderAddresses?: string[] | null;
1412
+ destinationAddress?: string | null;
1413
+ }
1414
+ | {
1415
+ name: string;
1416
+ service: string;
1417
+ type: "service";
1418
+ environment?: string | null;
1419
+ }
1420
+ | { name: string; part: string; type: "text_blob" }
1421
+ | { indexName: string; name: string; type: "vectorize" }
1422
+ | { name: string; type: "version_metadata" }
1423
+ | {
1424
+ name: string;
1425
+ secretName: string;
1426
+ storeId: string;
1427
+ type: "secrets_store_secret";
1428
+ }
1429
+ | {
1430
+ algorithm: unknown;
1431
+ format: "raw" | "pkcs8" | "spki" | "jwk";
1432
+ name: string;
1433
+ type: "secret_key";
1434
+ usages: (
1435
+ | "encrypt"
1436
+ | "decrypt"
1437
+ | "sign"
1438
+ | "verify"
1439
+ | "deriveKey"
1440
+ | "deriveBits"
1441
+ | "wrapKey"
1442
+ | "unwrapKey"
1443
+ )[];
1444
+ }
1445
+ | {
1446
+ name: string;
1447
+ type: "workflow";
1448
+ workflowName: string;
1449
+ className?: string | null;
1450
+ scriptName?: string | null;
1451
+ }
1452
+ | { name: string; part: string; type: "wasm_module" }
1453
+ )[];
1454
+
1455
+ export const GetDispatchNamespaceScriptBindingResponse =
1456
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1457
+ Schema.Union([
1458
+ Schema.Struct({
1459
+ name: Schema.String,
1460
+ type: Schema.Literal("ai"),
1461
+ }),
1462
+ Schema.Struct({
1463
+ dataset: Schema.String,
1464
+ name: Schema.String,
1465
+ type: Schema.Literal("analytics_engine"),
1466
+ }),
1467
+ Schema.Struct({
1468
+ name: Schema.String,
1469
+ type: Schema.Literal("assets"),
1470
+ }),
1471
+ Schema.Struct({
1472
+ name: Schema.String,
1473
+ type: Schema.Literal("browser"),
1474
+ }),
1475
+ Schema.Struct({
1476
+ id: Schema.String,
1477
+ name: Schema.String,
1478
+ type: Schema.Literal("d1"),
1479
+ }),
1480
+ Schema.Struct({
1481
+ name: Schema.String,
1482
+ part: Schema.String,
1483
+ type: Schema.Literal("data_blob"),
1484
+ }),
1485
+ Schema.Struct({
1486
+ name: Schema.String,
1487
+ namespace: Schema.String,
1488
+ type: Schema.Literal("dispatch_namespace"),
1489
+ outbound: Schema.optional(
1490
+ Schema.Union([
1491
+ Schema.Struct({
1492
+ params: Schema.optional(
1493
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1494
+ ),
1495
+ worker: Schema.optional(
1496
+ Schema.Union([
1497
+ Schema.Struct({
1498
+ environment: Schema.optional(
1499
+ Schema.Union([Schema.String, Schema.Null]),
1500
+ ),
1501
+ service: Schema.optional(
1502
+ Schema.Union([Schema.String, Schema.Null]),
1503
+ ),
1504
+ }),
1505
+ Schema.Null,
1506
+ ]),
1507
+ ),
1508
+ }),
1509
+ Schema.Null,
1510
+ ]),
1511
+ ),
1512
+ }),
1513
+ Schema.Struct({
1514
+ name: Schema.String,
1515
+ type: Schema.Literal("durable_object_namespace"),
1516
+ className: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1517
+ environment: Schema.optional(
1518
+ Schema.Union([Schema.String, Schema.Null]),
1519
+ ),
1520
+ namespaceId: Schema.optional(
1521
+ Schema.Union([Schema.String, Schema.Null]),
1522
+ ),
1523
+ scriptName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1524
+ }).pipe(
1525
+ Schema.encodeKeys({
1526
+ name: "name",
1527
+ type: "type",
1528
+ className: "class_name",
1529
+ environment: "environment",
1530
+ namespaceId: "namespace_id",
1531
+ scriptName: "script_name",
1532
+ }),
1533
+ ),
1534
+ Schema.Struct({
1535
+ id: Schema.String,
1536
+ name: Schema.String,
1537
+ type: Schema.Literal("hyperdrive"),
1538
+ }),
1539
+ Schema.Struct({
1540
+ name: Schema.String,
1541
+ type: Schema.Literal("inherit"),
1542
+ oldName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1543
+ versionId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1544
+ }).pipe(
1545
+ Schema.encodeKeys({
1546
+ name: "name",
1547
+ type: "type",
1548
+ oldName: "old_name",
1549
+ versionId: "version_id",
1550
+ }),
1551
+ ),
1552
+ Schema.Struct({
1553
+ name: Schema.String,
1554
+ type: Schema.Literal("images"),
1555
+ }),
1556
+ Schema.Struct({
1557
+ json: Schema.String,
1558
+ name: Schema.String,
1559
+ type: Schema.Literal("json"),
1560
+ }),
1561
+ Schema.Struct({
1562
+ name: Schema.String,
1563
+ namespaceId: Schema.String,
1564
+ type: Schema.Literal("kv_namespace"),
1565
+ }).pipe(
1566
+ Schema.encodeKeys({
1567
+ name: "name",
1568
+ namespaceId: "namespace_id",
1569
+ type: "type",
1570
+ }),
1571
+ ),
1572
+ Schema.Struct({
1573
+ certificateId: Schema.String,
1574
+ name: Schema.String,
1575
+ type: Schema.Literal("mtls_certificate"),
1576
+ }).pipe(
1577
+ Schema.encodeKeys({
1578
+ certificateId: "certificate_id",
1579
+ name: "name",
1580
+ type: "type",
1581
+ }),
1582
+ ),
1583
+ Schema.Struct({
1584
+ name: Schema.String,
1585
+ text: Schema.String,
1586
+ type: Schema.Literal("plain_text"),
1587
+ }),
1588
+ Schema.Struct({
1589
+ name: Schema.String,
1590
+ pipeline: Schema.String,
1591
+ type: Schema.Literal("pipelines"),
1592
+ }),
1593
+ Schema.Struct({
1594
+ name: Schema.String,
1595
+ queueName: Schema.String,
1596
+ type: Schema.Literal("queue"),
1597
+ }).pipe(
1598
+ Schema.encodeKeys({
1599
+ name: "name",
1600
+ queueName: "queue_name",
1601
+ type: "type",
1602
+ }),
1603
+ ),
1604
+ Schema.Struct({
1605
+ bucketName: Schema.String,
1606
+ name: Schema.String,
1607
+ type: Schema.Literal("r2_bucket"),
1608
+ jurisdiction: Schema.optional(
1609
+ Schema.Union([Schema.Literals(["eu", "fedramp"]), Schema.Null]),
1610
+ ),
1611
+ }).pipe(
1612
+ Schema.encodeKeys({
1613
+ bucketName: "bucket_name",
1614
+ name: "name",
1615
+ type: "type",
1616
+ jurisdiction: "jurisdiction",
1617
+ }),
1618
+ ),
1619
+ Schema.Struct({
1620
+ name: Schema.String,
1621
+ type: Schema.Literal("secret_text"),
1622
+ }),
1623
+ Schema.Struct({
1624
+ name: Schema.String,
1625
+ type: Schema.Literal("send_email"),
1626
+ allowedDestinationAddresses: Schema.optional(
1627
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1628
+ ),
1629
+ allowedSenderAddresses: Schema.optional(
1630
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1631
+ ),
1632
+ destinationAddress: Schema.optional(
1633
+ Schema.Union([Schema.String, Schema.Null]),
1634
+ ),
1635
+ }).pipe(
1636
+ Schema.encodeKeys({
1637
+ name: "name",
1638
+ type: "type",
1639
+ allowedDestinationAddresses: "allowed_destination_addresses",
1640
+ allowedSenderAddresses: "allowed_sender_addresses",
1641
+ destinationAddress: "destination_address",
1642
+ }),
1643
+ ),
1644
+ Schema.Struct({
1645
+ name: Schema.String,
1646
+ service: Schema.String,
1647
+ type: Schema.Literal("service"),
1648
+ environment: Schema.optional(
1649
+ Schema.Union([Schema.String, Schema.Null]),
1650
+ ),
1651
+ }),
1652
+ Schema.Struct({
1653
+ name: Schema.String,
1654
+ part: Schema.String,
1655
+ type: Schema.Literal("text_blob"),
1656
+ }),
1657
+ Schema.Struct({
1658
+ indexName: Schema.String,
1659
+ name: Schema.String,
1660
+ type: Schema.Literal("vectorize"),
1661
+ }).pipe(
1662
+ Schema.encodeKeys({
1663
+ indexName: "index_name",
1664
+ name: "name",
1665
+ type: "type",
1666
+ }),
1667
+ ),
1668
+ Schema.Struct({
1669
+ name: Schema.String,
1670
+ type: Schema.Literal("version_metadata"),
1671
+ }),
1672
+ Schema.Struct({
1673
+ name: Schema.String,
1674
+ secretName: Schema.String,
1675
+ storeId: Schema.String,
1676
+ type: Schema.Literal("secrets_store_secret"),
1677
+ }).pipe(
1678
+ Schema.encodeKeys({
1679
+ name: "name",
1680
+ secretName: "secret_name",
1681
+ storeId: "store_id",
1682
+ type: "type",
1683
+ }),
1684
+ ),
1685
+ Schema.Struct({
1686
+ algorithm: Schema.Unknown,
1687
+ format: Schema.Literals(["raw", "pkcs8", "spki", "jwk"]),
1688
+ name: Schema.String,
1689
+ type: Schema.Literal("secret_key"),
1690
+ usages: Schema.Array(
1691
+ Schema.Literals([
1692
+ "encrypt",
1693
+ "decrypt",
1694
+ "sign",
1695
+ "verify",
1696
+ "deriveKey",
1697
+ "deriveBits",
1698
+ "wrapKey",
1699
+ "unwrapKey",
1700
+ ]),
1701
+ ),
1702
+ }),
1703
+ Schema.Struct({
1704
+ name: Schema.String,
1705
+ type: Schema.Literal("workflow"),
1706
+ workflowName: Schema.String,
1707
+ className: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1708
+ scriptName: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1709
+ }).pipe(
1710
+ Schema.encodeKeys({
1711
+ name: "name",
1712
+ type: "type",
1713
+ workflowName: "workflow_name",
1714
+ className: "class_name",
1715
+ scriptName: "script_name",
1716
+ }),
1717
+ ),
1718
+ Schema.Struct({
1719
+ name: Schema.String,
1720
+ part: Schema.String,
1721
+ type: Schema.Literal("wasm_module"),
1722
+ }),
1723
+ ]),
1724
+ ) as unknown as Schema.Schema<GetDispatchNamespaceScriptBindingResponse>;
1725
+
1726
+ export type GetDispatchNamespaceScriptBindingError = DefaultErrors;
1727
+
1728
+ export const getDispatchNamespaceScriptBinding: API.OperationMethod<
1729
+ GetDispatchNamespaceScriptBindingRequest,
1730
+ GetDispatchNamespaceScriptBindingResponse,
1731
+ GetDispatchNamespaceScriptBindingError,
1732
+ Credentials | HttpClient.HttpClient
1733
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1734
+ input: GetDispatchNamespaceScriptBindingRequest,
1735
+ output: GetDispatchNamespaceScriptBindingResponse,
1736
+ errors: [],
1737
+ }));
1738
+
1739
+ // =============================================================================
1740
+ // DispatchNamespaceScriptContent
1741
+ // =============================================================================
1742
+
1743
+ export interface GetDispatchNamespaceScriptContentRequest {
1744
+ dispatchNamespace: string;
1745
+ scriptName: string;
1746
+ /** Identifier. */
1747
+ accountId: string;
1748
+ }
1749
+
1750
+ export const GetDispatchNamespaceScriptContentRequest =
1751
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1752
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
1753
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
1754
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1755
+ }).pipe(
1756
+ T.Http({
1757
+ method: "GET",
1758
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/content",
1759
+ }),
1760
+ ) as unknown as Schema.Schema<GetDispatchNamespaceScriptContentRequest>;
1761
+
1762
+ export type GetDispatchNamespaceScriptContentResponse = unknown;
1763
+
1764
+ export const GetDispatchNamespaceScriptContentResponse =
1765
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetDispatchNamespaceScriptContentResponse>;
1766
+
1767
+ export type GetDispatchNamespaceScriptContentError = DefaultErrors;
1768
+
1769
+ export const getDispatchNamespaceScriptContent: API.OperationMethod<
1770
+ GetDispatchNamespaceScriptContentRequest,
1771
+ GetDispatchNamespaceScriptContentResponse,
1772
+ GetDispatchNamespaceScriptContentError,
1773
+ Credentials | HttpClient.HttpClient
1774
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1775
+ input: GetDispatchNamespaceScriptContentRequest,
1776
+ output: GetDispatchNamespaceScriptContentResponse,
1777
+ errors: [],
1778
+ }));
1779
+
1780
+ export interface PutDispatchNamespaceScriptContentRequest {
1781
+ dispatchNamespace: string;
1782
+ scriptName: string;
1783
+ /** Path param: Identifier. */
1784
+ accountId: string;
1785
+ /** Header param: The multipart name of a script upload part containing script content in service worker format. Alternative to including in a metadata part. */
1786
+ cfworkerbodypart?: string;
1787
+ /** Header param: The multipart name of a script upload part containing script content in es module format. Alternative to including in a metadata part. */
1788
+ cfworkermainmodulepart?: string;
1789
+ /** Body param: JSON-encoded metadata about the uploaded parts and Worker configuration. */
1790
+ metadata: unknown;
1791
+ /** Body param: An array of modules (often JavaScript files) comprising a Worker script. At least one module must be present and referenced in the metadata as `main_module` or `body_part` by filename.<br/ */
1792
+ files?: (File | Blob)[];
1793
+ }
1794
+
1795
+ export const PutDispatchNamespaceScriptContentRequest =
1796
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1797
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
1798
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
1799
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1800
+ cfworkerbodypart: Schema.optional(Schema.String).pipe(
1801
+ T.HttpHeader("CF-WORKER-BODY-PART"),
1802
+ ),
1803
+ cfworkermainmodulepart: Schema.optional(Schema.String).pipe(
1804
+ T.HttpHeader("CF-WORKER-MAIN-MODULE-PART"),
1805
+ ),
1806
+ metadata: Schema.Unknown,
1807
+ files: Schema.optional(
1808
+ Schema.Array(UploadableSchema.pipe(T.HttpFormDataFile())),
1809
+ ),
1810
+ }).pipe(
1811
+ T.Http({
1812
+ method: "PUT",
1813
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/content",
1814
+ contentType: "multipart",
1815
+ }),
1816
+ ) as unknown as Schema.Schema<PutDispatchNamespaceScriptContentRequest>;
1817
+
1818
+ export type PutDispatchNamespaceScriptContentResponse = unknown;
1819
+
1820
+ export const PutDispatchNamespaceScriptContentResponse =
1821
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PutDispatchNamespaceScriptContentResponse>;
1822
+
1823
+ export type PutDispatchNamespaceScriptContentError = DefaultErrors;
1824
+
1825
+ export const putDispatchNamespaceScriptContent: API.OperationMethod<
1826
+ PutDispatchNamespaceScriptContentRequest,
1827
+ PutDispatchNamespaceScriptContentResponse,
1828
+ PutDispatchNamespaceScriptContentError,
1829
+ Credentials | HttpClient.HttpClient
1830
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1831
+ input: PutDispatchNamespaceScriptContentRequest,
1832
+ output: PutDispatchNamespaceScriptContentResponse,
1833
+ errors: [],
1834
+ }));
1835
+
1836
+ // =============================================================================
1837
+ // DispatchNamespaceScriptSecret
1838
+ // =============================================================================
1839
+
1840
+ export interface GetDispatchNamespaceScriptSecretRequest {
1841
+ dispatchNamespace: string;
1842
+ scriptName: string;
1843
+ secretName: string;
1844
+ /** Path param: Identifier. */
1845
+ accountId: string;
1846
+ /** Query param: Flag that indicates whether the secret name is URL encoded. */
1847
+ urlEncoded?: boolean;
1848
+ }
1849
+
1850
+ export const GetDispatchNamespaceScriptSecretRequest =
1851
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1852
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
1853
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
1854
+ secretName: Schema.String.pipe(T.HttpPath("secretName")),
1855
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1856
+ urlEncoded: Schema.optional(Schema.Boolean).pipe(
1857
+ T.HttpQuery("url_encoded"),
1858
+ ),
1859
+ }).pipe(
1860
+ T.Http({
1861
+ method: "GET",
1862
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/secrets/{secretName}",
1863
+ }),
1864
+ ) as unknown as Schema.Schema<GetDispatchNamespaceScriptSecretRequest>;
1865
+
1866
+ export type GetDispatchNamespaceScriptSecretResponse =
1867
+ | { name: string; type: "secret_text" }
1868
+ | {
1869
+ algorithm: unknown;
1870
+ format: "raw" | "pkcs8" | "spki" | "jwk";
1871
+ name: string;
1872
+ type: "secret_key";
1873
+ usages: (
1874
+ | "encrypt"
1875
+ | "decrypt"
1876
+ | "sign"
1877
+ | "verify"
1878
+ | "deriveKey"
1879
+ | "deriveBits"
1880
+ | "wrapKey"
1881
+ | "unwrapKey"
1882
+ )[];
1883
+ };
1884
+
1885
+ export const GetDispatchNamespaceScriptSecretResponse =
1886
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
1887
+ Schema.Struct({
1888
+ name: Schema.String,
1889
+ type: Schema.Literal("secret_text"),
1890
+ }),
1891
+ Schema.Struct({
1892
+ algorithm: Schema.Unknown,
1893
+ format: Schema.Literals(["raw", "pkcs8", "spki", "jwk"]),
1894
+ name: Schema.String,
1895
+ type: Schema.Literal("secret_key"),
1896
+ usages: Schema.Array(
1897
+ Schema.Literals([
1898
+ "encrypt",
1899
+ "decrypt",
1900
+ "sign",
1901
+ "verify",
1902
+ "deriveKey",
1903
+ "deriveBits",
1904
+ "wrapKey",
1905
+ "unwrapKey",
1906
+ ]),
1907
+ ),
1908
+ }),
1909
+ ]) as unknown as Schema.Schema<GetDispatchNamespaceScriptSecretResponse>;
1910
+
1911
+ export type GetDispatchNamespaceScriptSecretError = DefaultErrors;
1912
+
1913
+ export const getDispatchNamespaceScriptSecret: API.OperationMethod<
1914
+ GetDispatchNamespaceScriptSecretRequest,
1915
+ GetDispatchNamespaceScriptSecretResponse,
1916
+ GetDispatchNamespaceScriptSecretError,
1917
+ Credentials | HttpClient.HttpClient
1918
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1919
+ input: GetDispatchNamespaceScriptSecretRequest,
1920
+ output: GetDispatchNamespaceScriptSecretResponse,
1921
+ errors: [],
1922
+ }));
1923
+
1924
+ export interface ListDispatchNamespaceScriptSecretsRequest {
1925
+ dispatchNamespace: string;
1926
+ scriptName: string;
1927
+ /** Identifier. */
1928
+ accountId: string;
1929
+ }
1930
+
1931
+ export const ListDispatchNamespaceScriptSecretsRequest =
1932
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1933
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
1934
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
1935
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1936
+ }).pipe(
1937
+ T.Http({
1938
+ method: "GET",
1939
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/secrets",
1940
+ }),
1941
+ ) as unknown as Schema.Schema<ListDispatchNamespaceScriptSecretsRequest>;
1942
+
1943
+ export type ListDispatchNamespaceScriptSecretsResponse = (
1944
+ | { name: string; type: "secret_text" }
1945
+ | {
1946
+ algorithm: unknown;
1947
+ format: "raw" | "pkcs8" | "spki" | "jwk";
1948
+ name: string;
1949
+ type: "secret_key";
1950
+ usages: (
1951
+ | "encrypt"
1952
+ | "decrypt"
1953
+ | "sign"
1954
+ | "verify"
1955
+ | "deriveKey"
1956
+ | "deriveBits"
1957
+ | "wrapKey"
1958
+ | "unwrapKey"
1959
+ )[];
1960
+ }
1961
+ )[];
1962
+
1963
+ export const ListDispatchNamespaceScriptSecretsResponse =
1964
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1965
+ Schema.Union([
1966
+ Schema.Struct({
1967
+ name: Schema.String,
1968
+ type: Schema.Literal("secret_text"),
1969
+ }),
1970
+ Schema.Struct({
1971
+ algorithm: Schema.Unknown,
1972
+ format: Schema.Literals(["raw", "pkcs8", "spki", "jwk"]),
1973
+ name: Schema.String,
1974
+ type: Schema.Literal("secret_key"),
1975
+ usages: Schema.Array(
1976
+ Schema.Literals([
1977
+ "encrypt",
1978
+ "decrypt",
1979
+ "sign",
1980
+ "verify",
1981
+ "deriveKey",
1982
+ "deriveBits",
1983
+ "wrapKey",
1984
+ "unwrapKey",
1985
+ ]),
1986
+ ),
1987
+ }),
1988
+ ]),
1989
+ ) as unknown as Schema.Schema<ListDispatchNamespaceScriptSecretsResponse>;
1990
+
1991
+ export type ListDispatchNamespaceScriptSecretsError = DefaultErrors;
1992
+
1993
+ export const listDispatchNamespaceScriptSecrets: API.OperationMethod<
1994
+ ListDispatchNamespaceScriptSecretsRequest,
1995
+ ListDispatchNamespaceScriptSecretsResponse,
1996
+ ListDispatchNamespaceScriptSecretsError,
1997
+ Credentials | HttpClient.HttpClient
1998
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1999
+ input: ListDispatchNamespaceScriptSecretsRequest,
2000
+ output: ListDispatchNamespaceScriptSecretsResponse,
2001
+ errors: [],
2002
+ }));
2003
+
2004
+ export interface PutDispatchNamespaceScriptSecretRequest {
2005
+ dispatchNamespace: string;
2006
+ scriptName: string;
2007
+ /** Path param: Identifier. */
2008
+ accountId: string;
2009
+ /** Body param: A JavaScript variable name for the binding. */
2010
+ name: string;
2011
+ /** Body param: The secret value to use. */
2012
+ text: string;
2013
+ /** Body param: The kind of resource that the binding provides. */
2014
+ type: "secret_text";
2015
+ }
2016
+
2017
+ export const PutDispatchNamespaceScriptSecretRequest =
2018
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2019
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
2020
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
2021
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2022
+ name: Schema.String,
2023
+ text: Schema.String,
2024
+ type: Schema.Literal("secret_text"),
2025
+ }).pipe(
2026
+ T.Http({
2027
+ method: "PUT",
2028
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/secrets",
2029
+ }),
2030
+ ) as unknown as Schema.Schema<PutDispatchNamespaceScriptSecretRequest>;
2031
+
2032
+ export type PutDispatchNamespaceScriptSecretResponse =
2033
+ | { name: string; type: "secret_text" }
2034
+ | {
2035
+ algorithm: unknown;
2036
+ format: "raw" | "pkcs8" | "spki" | "jwk";
2037
+ name: string;
2038
+ type: "secret_key";
2039
+ usages: (
2040
+ | "encrypt"
2041
+ | "decrypt"
2042
+ | "sign"
2043
+ | "verify"
2044
+ | "deriveKey"
2045
+ | "deriveBits"
2046
+ | "wrapKey"
2047
+ | "unwrapKey"
2048
+ )[];
2049
+ };
2050
+
2051
+ export const PutDispatchNamespaceScriptSecretResponse =
2052
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
2053
+ Schema.Struct({
2054
+ name: Schema.String,
2055
+ type: Schema.Literal("secret_text"),
2056
+ }),
2057
+ Schema.Struct({
2058
+ algorithm: Schema.Unknown,
2059
+ format: Schema.Literals(["raw", "pkcs8", "spki", "jwk"]),
2060
+ name: Schema.String,
2061
+ type: Schema.Literal("secret_key"),
2062
+ usages: Schema.Array(
2063
+ Schema.Literals([
2064
+ "encrypt",
2065
+ "decrypt",
2066
+ "sign",
2067
+ "verify",
2068
+ "deriveKey",
2069
+ "deriveBits",
2070
+ "wrapKey",
2071
+ "unwrapKey",
2072
+ ]),
2073
+ ),
2074
+ }),
2075
+ ]) as unknown as Schema.Schema<PutDispatchNamespaceScriptSecretResponse>;
2076
+
2077
+ export type PutDispatchNamespaceScriptSecretError = DefaultErrors;
2078
+
2079
+ export const putDispatchNamespaceScriptSecret: API.OperationMethod<
2080
+ PutDispatchNamespaceScriptSecretRequest,
2081
+ PutDispatchNamespaceScriptSecretResponse,
2082
+ PutDispatchNamespaceScriptSecretError,
2083
+ Credentials | HttpClient.HttpClient
2084
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2085
+ input: PutDispatchNamespaceScriptSecretRequest,
2086
+ output: PutDispatchNamespaceScriptSecretResponse,
2087
+ errors: [],
2088
+ }));
2089
+
2090
+ export interface DeleteDispatchNamespaceScriptSecretRequest {
2091
+ dispatchNamespace: string;
2092
+ scriptName: string;
2093
+ secretName: string;
2094
+ /** Path param: Identifier. */
2095
+ accountId: string;
2096
+ /** Query param: Flag that indicates whether the secret name is URL encoded. */
2097
+ urlEncoded?: boolean;
2098
+ }
2099
+
2100
+ export const DeleteDispatchNamespaceScriptSecretRequest =
2101
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2102
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
2103
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
2104
+ secretName: Schema.String.pipe(T.HttpPath("secretName")),
2105
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2106
+ urlEncoded: Schema.optional(Schema.Boolean).pipe(
2107
+ T.HttpQuery("url_encoded"),
2108
+ ),
2109
+ }).pipe(
2110
+ T.Http({
2111
+ method: "DELETE",
2112
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/secrets/{secretName}",
2113
+ }),
2114
+ ) as unknown as Schema.Schema<DeleteDispatchNamespaceScriptSecretRequest>;
2115
+
2116
+ export type DeleteDispatchNamespaceScriptSecretResponse = unknown;
2117
+
2118
+ export const DeleteDispatchNamespaceScriptSecretResponse =
2119
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<DeleteDispatchNamespaceScriptSecretResponse>;
2120
+
2121
+ export type DeleteDispatchNamespaceScriptSecretError = DefaultErrors;
2122
+
2123
+ export const deleteDispatchNamespaceScriptSecret: API.OperationMethod<
2124
+ DeleteDispatchNamespaceScriptSecretRequest,
2125
+ DeleteDispatchNamespaceScriptSecretResponse,
2126
+ DeleteDispatchNamespaceScriptSecretError,
2127
+ Credentials | HttpClient.HttpClient
2128
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2129
+ input: DeleteDispatchNamespaceScriptSecretRequest,
2130
+ output: DeleteDispatchNamespaceScriptSecretResponse,
2131
+ errors: [],
2132
+ }));
2133
+
2134
+ // =============================================================================
2135
+ // DispatchNamespaceScriptSetting
2136
+ // =============================================================================
2137
+
2138
+ export interface GetDispatchNamespaceScriptSettingRequest {
2139
+ dispatchNamespace: string;
2140
+ scriptName: string;
2141
+ /** Identifier. */
2142
+ accountId: string;
2143
+ }
2144
+
2145
+ export const GetDispatchNamespaceScriptSettingRequest =
2146
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2147
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
2148
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
2149
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2150
+ }).pipe(
2151
+ T.Http({
2152
+ method: "GET",
2153
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/settings",
2154
+ }),
2155
+ ) as unknown as Schema.Schema<GetDispatchNamespaceScriptSettingRequest>;
2156
+
2157
+ export interface GetDispatchNamespaceScriptSettingResponse {
2158
+ /** List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. */
2159
+ bindings?:
2160
+ | (
2161
+ | { name: string; type: "ai" }
2162
+ | { dataset: string; name: string; type: "analytics_engine" }
2163
+ | { name: string; type: "assets" }
2164
+ | { name: string; type: "browser" }
2165
+ | { id: string; name: string; type: "d1" }
2166
+ | { name: string; part: string; type: "data_blob" }
2167
+ | {
2168
+ name: string;
2169
+ namespace: string;
2170
+ type: "dispatch_namespace";
2171
+ outbound?: {
2172
+ params?: string[] | null;
2173
+ worker?: {
2174
+ environment?: string | null;
2175
+ service?: string | null;
2176
+ } | null;
2177
+ } | null;
2178
+ }
2179
+ | {
2180
+ name: string;
2181
+ type: "durable_object_namespace";
2182
+ className?: string | null;
2183
+ environment?: string | null;
2184
+ namespaceId?: string | null;
2185
+ scriptName?: string | null;
2186
+ }
2187
+ | { id: string; name: string; type: "hyperdrive" }
2188
+ | {
2189
+ name: string;
2190
+ type: "inherit";
2191
+ oldName?: string | null;
2192
+ versionId?: string | null;
2193
+ }
2194
+ | { name: string; type: "images" }
2195
+ | { json: string; name: string; type: "json" }
2196
+ | { name: string; namespaceId: string; type: "kv_namespace" }
2197
+ | { certificateId: string; name: string; type: "mtls_certificate" }
2198
+ | { name: string; text: string; type: "plain_text" }
2199
+ | { name: string; pipeline: string; type: "pipelines" }
2200
+ | { name: string; queueName: string; type: "queue" }
2201
+ | {
2202
+ bucketName: string;
2203
+ name: string;
2204
+ type: "r2_bucket";
2205
+ jurisdiction?: "eu" | "fedramp" | null;
2206
+ }
2207
+ | { name: string; type: "secret_text" }
2208
+ | {
2209
+ name: string;
2210
+ type: "send_email";
2211
+ allowedDestinationAddresses?: string[] | null;
2212
+ allowedSenderAddresses?: string[] | null;
2213
+ destinationAddress?: string | null;
2214
+ }
2215
+ | {
2216
+ name: string;
2217
+ service: string;
2218
+ type: "service";
2219
+ environment?: string | null;
2220
+ }
2221
+ | { name: string; part: string; type: "text_blob" }
2222
+ | { indexName: string; name: string; type: "vectorize" }
2223
+ | { name: string; type: "version_metadata" }
2224
+ | {
2225
+ name: string;
2226
+ secretName: string;
2227
+ storeId: string;
2228
+ type: "secrets_store_secret";
2229
+ }
2230
+ | {
2231
+ algorithm: unknown;
2232
+ format: "raw" | "pkcs8" | "spki" | "jwk";
2233
+ name: string;
2234
+ type: "secret_key";
2235
+ usages: (
2236
+ | "encrypt"
2237
+ | "decrypt"
2238
+ | "sign"
2239
+ | "verify"
2240
+ | "deriveKey"
2241
+ | "deriveBits"
2242
+ | "wrapKey"
2243
+ | "unwrapKey"
2244
+ )[];
2245
+ }
2246
+ | {
2247
+ name: string;
2248
+ type: "workflow";
2249
+ workflowName: string;
2250
+ className?: string | null;
2251
+ scriptName?: string | null;
2252
+ }
2253
+ | { name: string; part: string; type: "wasm_module" }
2254
+ )[]
2255
+ | null;
2256
+ /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */
2257
+ compatibilityDate?: string | null;
2258
+ /** Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a `compatibility_date`. */
2259
+ compatibilityFlags?: string[] | null;
2260
+ /** Limits to apply for this Worker. */
2261
+ limits?: { cpuMs?: number | null } | null;
2262
+ /** Whether Logpush is turned on for the Worker. */
2263
+ logpush?: boolean | null;
2264
+ /** Observability settings for the Worker. */
2265
+ observability?: {
2266
+ enabled: boolean;
2267
+ headSamplingRate?: number | null;
2268
+ logs?: {
2269
+ enabled: boolean;
2270
+ invocationLogs: boolean;
2271
+ destinations?: string[] | null;
2272
+ headSamplingRate?: number | null;
2273
+ persist?: boolean | null;
2274
+ } | null;
2275
+ } | null;
2276
+ /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify either mode for Smart Placement, or one of region/hostname/host for targeted place */
2277
+ placement?:
2278
+ | { mode: "smart" }
2279
+ | { region: string }
2280
+ | { hostname: string }
2281
+ | { host: string }
2282
+ | null;
2283
+ /** Tags associated with the Worker. */
2284
+ tags?: string[] | null;
2285
+ /** List of Workers that will consume logs from the attached Worker. */
2286
+ tailConsumers?: unknown[] | null;
2287
+ /** Usage model for the Worker invocations. */
2288
+ usageModel?: "standard" | "bundled" | "unbound" | null;
2289
+ }
2290
+
2291
+ export const GetDispatchNamespaceScriptSettingResponse =
2292
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2293
+ bindings: Schema.optional(
2294
+ Schema.Union([
2295
+ Schema.Array(
2296
+ Schema.Union([
2297
+ Schema.Struct({
2298
+ name: Schema.String,
2299
+ type: Schema.Literal("ai"),
2300
+ }),
2301
+ Schema.Struct({
2302
+ dataset: Schema.String,
2303
+ name: Schema.String,
2304
+ type: Schema.Literal("analytics_engine"),
2305
+ }),
2306
+ Schema.Struct({
2307
+ name: Schema.String,
2308
+ type: Schema.Literal("assets"),
2309
+ }),
2310
+ Schema.Struct({
2311
+ name: Schema.String,
2312
+ type: Schema.Literal("browser"),
2313
+ }),
2314
+ Schema.Struct({
2315
+ id: Schema.String,
2316
+ name: Schema.String,
2317
+ type: Schema.Literal("d1"),
2318
+ }),
2319
+ Schema.Struct({
2320
+ name: Schema.String,
2321
+ part: Schema.String,
2322
+ type: Schema.Literal("data_blob"),
2323
+ }),
2324
+ Schema.Struct({
2325
+ name: Schema.String,
2326
+ namespace: Schema.String,
2327
+ type: Schema.Literal("dispatch_namespace"),
2328
+ outbound: Schema.optional(
2329
+ Schema.Union([
2330
+ Schema.Struct({
2331
+ params: Schema.optional(
2332
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2333
+ ),
2334
+ worker: Schema.optional(
2335
+ Schema.Union([
2336
+ Schema.Struct({
2337
+ environment: Schema.optional(
2338
+ Schema.Union([Schema.String, Schema.Null]),
2339
+ ),
2340
+ service: Schema.optional(
2341
+ Schema.Union([Schema.String, Schema.Null]),
2342
+ ),
2343
+ }),
2344
+ Schema.Null,
2345
+ ]),
2346
+ ),
2347
+ }),
2348
+ Schema.Null,
2349
+ ]),
2350
+ ),
2351
+ }),
2352
+ Schema.Struct({
2353
+ name: Schema.String,
2354
+ type: Schema.Literal("durable_object_namespace"),
2355
+ className: Schema.optional(
2356
+ Schema.Union([Schema.String, Schema.Null]),
2357
+ ),
2358
+ environment: Schema.optional(
2359
+ Schema.Union([Schema.String, Schema.Null]),
2360
+ ),
2361
+ namespaceId: Schema.optional(
2362
+ Schema.Union([Schema.String, Schema.Null]),
2363
+ ),
2364
+ scriptName: Schema.optional(
2365
+ Schema.Union([Schema.String, Schema.Null]),
2366
+ ),
2367
+ }).pipe(
2368
+ Schema.encodeKeys({
2369
+ name: "name",
2370
+ type: "type",
2371
+ className: "class_name",
2372
+ environment: "environment",
2373
+ namespaceId: "namespace_id",
2374
+ scriptName: "script_name",
2375
+ }),
2376
+ ),
2377
+ Schema.Struct({
2378
+ id: Schema.String,
2379
+ name: Schema.String,
2380
+ type: Schema.Literal("hyperdrive"),
2381
+ }),
2382
+ Schema.Struct({
2383
+ name: Schema.String,
2384
+ type: Schema.Literal("inherit"),
2385
+ oldName: Schema.optional(
2386
+ Schema.Union([Schema.String, Schema.Null]),
2387
+ ),
2388
+ versionId: Schema.optional(
2389
+ Schema.Union([Schema.String, Schema.Null]),
2390
+ ),
2391
+ }).pipe(
2392
+ Schema.encodeKeys({
2393
+ name: "name",
2394
+ type: "type",
2395
+ oldName: "old_name",
2396
+ versionId: "version_id",
2397
+ }),
2398
+ ),
2399
+ Schema.Struct({
2400
+ name: Schema.String,
2401
+ type: Schema.Literal("images"),
2402
+ }),
2403
+ Schema.Struct({
2404
+ json: Schema.String,
2405
+ name: Schema.String,
2406
+ type: Schema.Literal("json"),
2407
+ }),
2408
+ Schema.Struct({
2409
+ name: Schema.String,
2410
+ namespaceId: Schema.String,
2411
+ type: Schema.Literal("kv_namespace"),
2412
+ }).pipe(
2413
+ Schema.encodeKeys({
2414
+ name: "name",
2415
+ namespaceId: "namespace_id",
2416
+ type: "type",
2417
+ }),
2418
+ ),
2419
+ Schema.Struct({
2420
+ certificateId: Schema.String,
2421
+ name: Schema.String,
2422
+ type: Schema.Literal("mtls_certificate"),
2423
+ }).pipe(
2424
+ Schema.encodeKeys({
2425
+ certificateId: "certificate_id",
2426
+ name: "name",
2427
+ type: "type",
2428
+ }),
2429
+ ),
2430
+ Schema.Struct({
2431
+ name: Schema.String,
2432
+ text: Schema.String,
2433
+ type: Schema.Literal("plain_text"),
2434
+ }),
2435
+ Schema.Struct({
2436
+ name: Schema.String,
2437
+ pipeline: Schema.String,
2438
+ type: Schema.Literal("pipelines"),
2439
+ }),
2440
+ Schema.Struct({
2441
+ name: Schema.String,
2442
+ queueName: Schema.String,
2443
+ type: Schema.Literal("queue"),
2444
+ }).pipe(
2445
+ Schema.encodeKeys({
2446
+ name: "name",
2447
+ queueName: "queue_name",
2448
+ type: "type",
2449
+ }),
2450
+ ),
2451
+ Schema.Struct({
2452
+ bucketName: Schema.String,
2453
+ name: Schema.String,
2454
+ type: Schema.Literal("r2_bucket"),
2455
+ jurisdiction: Schema.optional(
2456
+ Schema.Union([Schema.Literals(["eu", "fedramp"]), Schema.Null]),
2457
+ ),
2458
+ }).pipe(
2459
+ Schema.encodeKeys({
2460
+ bucketName: "bucket_name",
2461
+ name: "name",
2462
+ type: "type",
2463
+ jurisdiction: "jurisdiction",
2464
+ }),
2465
+ ),
2466
+ Schema.Struct({
2467
+ name: Schema.String,
2468
+ type: Schema.Literal("secret_text"),
2469
+ }),
2470
+ Schema.Struct({
2471
+ name: Schema.String,
2472
+ type: Schema.Literal("send_email"),
2473
+ allowedDestinationAddresses: Schema.optional(
2474
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2475
+ ),
2476
+ allowedSenderAddresses: Schema.optional(
2477
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2478
+ ),
2479
+ destinationAddress: Schema.optional(
2480
+ Schema.Union([Schema.String, Schema.Null]),
2481
+ ),
2482
+ }).pipe(
2483
+ Schema.encodeKeys({
2484
+ name: "name",
2485
+ type: "type",
2486
+ allowedDestinationAddresses: "allowed_destination_addresses",
2487
+ allowedSenderAddresses: "allowed_sender_addresses",
2488
+ destinationAddress: "destination_address",
2489
+ }),
2490
+ ),
2491
+ Schema.Struct({
2492
+ name: Schema.String,
2493
+ service: Schema.String,
2494
+ type: Schema.Literal("service"),
2495
+ environment: Schema.optional(
2496
+ Schema.Union([Schema.String, Schema.Null]),
2497
+ ),
2498
+ }),
2499
+ Schema.Struct({
2500
+ name: Schema.String,
2501
+ part: Schema.String,
2502
+ type: Schema.Literal("text_blob"),
2503
+ }),
2504
+ Schema.Struct({
2505
+ indexName: Schema.String,
2506
+ name: Schema.String,
2507
+ type: Schema.Literal("vectorize"),
2508
+ }).pipe(
2509
+ Schema.encodeKeys({
2510
+ indexName: "index_name",
2511
+ name: "name",
2512
+ type: "type",
2513
+ }),
2514
+ ),
2515
+ Schema.Struct({
2516
+ name: Schema.String,
2517
+ type: Schema.Literal("version_metadata"),
2518
+ }),
2519
+ Schema.Struct({
2520
+ name: Schema.String,
2521
+ secretName: Schema.String,
2522
+ storeId: Schema.String,
2523
+ type: Schema.Literal("secrets_store_secret"),
2524
+ }).pipe(
2525
+ Schema.encodeKeys({
2526
+ name: "name",
2527
+ secretName: "secret_name",
2528
+ storeId: "store_id",
2529
+ type: "type",
2530
+ }),
2531
+ ),
2532
+ Schema.Struct({
2533
+ algorithm: Schema.Unknown,
2534
+ format: Schema.Literals(["raw", "pkcs8", "spki", "jwk"]),
2535
+ name: Schema.String,
2536
+ type: Schema.Literal("secret_key"),
2537
+ usages: Schema.Array(
2538
+ Schema.Literals([
2539
+ "encrypt",
2540
+ "decrypt",
2541
+ "sign",
2542
+ "verify",
2543
+ "deriveKey",
2544
+ "deriveBits",
2545
+ "wrapKey",
2546
+ "unwrapKey",
2547
+ ]),
2548
+ ),
2549
+ }),
2550
+ Schema.Struct({
2551
+ name: Schema.String,
2552
+ type: Schema.Literal("workflow"),
2553
+ workflowName: Schema.String,
2554
+ className: Schema.optional(
2555
+ Schema.Union([Schema.String, Schema.Null]),
2556
+ ),
2557
+ scriptName: Schema.optional(
2558
+ Schema.Union([Schema.String, Schema.Null]),
2559
+ ),
2560
+ }).pipe(
2561
+ Schema.encodeKeys({
2562
+ name: "name",
2563
+ type: "type",
2564
+ workflowName: "workflow_name",
2565
+ className: "class_name",
2566
+ scriptName: "script_name",
2567
+ }),
2568
+ ),
2569
+ Schema.Struct({
2570
+ name: Schema.String,
2571
+ part: Schema.String,
2572
+ type: Schema.Literal("wasm_module"),
2573
+ }),
2574
+ ]),
2575
+ ),
2576
+ Schema.Null,
2577
+ ]),
2578
+ ),
2579
+ compatibilityDate: Schema.optional(
2580
+ Schema.Union([Schema.String, Schema.Null]),
2581
+ ),
2582
+ compatibilityFlags: Schema.optional(
2583
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2584
+ ),
2585
+ limits: Schema.optional(
2586
+ Schema.Union([
2587
+ Schema.Struct({
2588
+ cpuMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2589
+ }).pipe(Schema.encodeKeys({ cpuMs: "cpu_ms" })),
2590
+ Schema.Null,
2591
+ ]),
2592
+ ),
2593
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2594
+ observability: Schema.optional(
2595
+ Schema.Union([
2596
+ Schema.Struct({
2597
+ enabled: Schema.Boolean,
2598
+ headSamplingRate: Schema.optional(
2599
+ Schema.Union([Schema.Number, Schema.Null]),
2600
+ ),
2601
+ logs: Schema.optional(
2602
+ Schema.Union([
2603
+ Schema.Struct({
2604
+ enabled: Schema.Boolean,
2605
+ invocationLogs: Schema.Boolean,
2606
+ destinations: Schema.optional(
2607
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2608
+ ),
2609
+ headSamplingRate: Schema.optional(
2610
+ Schema.Union([Schema.Number, Schema.Null]),
2611
+ ),
2612
+ persist: Schema.optional(
2613
+ Schema.Union([Schema.Boolean, Schema.Null]),
2614
+ ),
2615
+ }).pipe(
2616
+ Schema.encodeKeys({
2617
+ enabled: "enabled",
2618
+ invocationLogs: "invocation_logs",
2619
+ destinations: "destinations",
2620
+ headSamplingRate: "head_sampling_rate",
2621
+ persist: "persist",
2622
+ }),
2623
+ ),
2624
+ Schema.Null,
2625
+ ]),
2626
+ ),
2627
+ }).pipe(
2628
+ Schema.encodeKeys({
2629
+ enabled: "enabled",
2630
+ headSamplingRate: "head_sampling_rate",
2631
+ logs: "logs",
2632
+ }),
2633
+ ),
2634
+ Schema.Null,
2635
+ ]),
2636
+ ),
2637
+ placement: Schema.optional(
2638
+ Schema.Union([
2639
+ Schema.Union([
2640
+ Schema.Struct({
2641
+ mode: Schema.Literal("smart"),
2642
+ }),
2643
+ Schema.Struct({
2644
+ region: Schema.String,
2645
+ }),
2646
+ Schema.Struct({
2647
+ hostname: Schema.String,
2648
+ }),
2649
+ Schema.Struct({
2650
+ host: Schema.String,
2651
+ }),
2652
+ ]),
2653
+ Schema.Null,
2654
+ ]),
2655
+ ),
2656
+ tags: Schema.optional(
2657
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2658
+ ),
2659
+ tailConsumers: Schema.optional(
2660
+ Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
2661
+ ),
2662
+ usageModel: Schema.optional(
2663
+ Schema.Union([
2664
+ Schema.Literals(["standard", "bundled", "unbound"]),
2665
+ Schema.Null,
2666
+ ]),
2667
+ ),
2668
+ }).pipe(
2669
+ Schema.encodeKeys({
2670
+ bindings: "bindings",
2671
+ compatibilityDate: "compatibility_date",
2672
+ compatibilityFlags: "compatibility_flags",
2673
+ limits: "limits",
2674
+ logpush: "logpush",
2675
+ observability: "observability",
2676
+ placement: "placement",
2677
+ tags: "tags",
2678
+ tailConsumers: "tail_consumers",
2679
+ usageModel: "usage_model",
2680
+ }),
2681
+ ) as unknown as Schema.Schema<GetDispatchNamespaceScriptSettingResponse>;
2682
+
2683
+ export type GetDispatchNamespaceScriptSettingError = DefaultErrors;
2684
+
2685
+ export const getDispatchNamespaceScriptSetting: API.OperationMethod<
2686
+ GetDispatchNamespaceScriptSettingRequest,
2687
+ GetDispatchNamespaceScriptSettingResponse,
2688
+ GetDispatchNamespaceScriptSettingError,
2689
+ Credentials | HttpClient.HttpClient
2690
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2691
+ input: GetDispatchNamespaceScriptSettingRequest,
2692
+ output: GetDispatchNamespaceScriptSettingResponse,
2693
+ errors: [],
2694
+ }));
2695
+
2696
+ export interface PatchDispatchNamespaceScriptSettingRequest {
2697
+ dispatchNamespace: string;
2698
+ scriptName: string;
2699
+ /** Path param: Identifier. */
2700
+ accountId: string;
2701
+ /** Body param: */
2702
+ settings?: {
2703
+ bindings?: (
2704
+ | { name: string; type: "ai" }
2705
+ | { dataset: string; name: string; type: "analytics_engine" }
2706
+ | { name: string; type: "assets" }
2707
+ | { name: string; type: "browser" }
2708
+ | { id: string; name: string; type: "d1" }
2709
+ | { name: string; part: string; type: "data_blob" }
2710
+ | {
2711
+ name: string;
2712
+ namespace: string;
2713
+ type: "dispatch_namespace";
2714
+ outbound?: {
2715
+ params?: string[];
2716
+ worker?: { environment?: string; service?: string };
2717
+ };
2718
+ }
2719
+ | {
2720
+ name: string;
2721
+ type: "durable_object_namespace";
2722
+ className?: string;
2723
+ environment?: string;
2724
+ namespaceId?: string;
2725
+ scriptName?: string;
2726
+ }
2727
+ | { id: string; name: string; type: "hyperdrive" }
2728
+ | { name: string; type: "inherit"; oldName?: string; versionId?: string }
2729
+ | { name: string; type: "images" }
2730
+ | { json: string; name: string; type: "json" }
2731
+ | { name: string; namespaceId: string; type: "kv_namespace" }
2732
+ | { certificateId: string; name: string; type: "mtls_certificate" }
2733
+ | { name: string; text: string; type: "plain_text" }
2734
+ | { name: string; pipeline: string; type: "pipelines" }
2735
+ | { name: string; queueName: string; type: "queue" }
2736
+ | {
2737
+ bucketName: string;
2738
+ name: string;
2739
+ type: "r2_bucket";
2740
+ jurisdiction?: "eu" | "fedramp";
2741
+ }
2742
+ | { name: string; text: string; type: "secret_text" }
2743
+ | {
2744
+ name: string;
2745
+ type: "send_email";
2746
+ allowedDestinationAddresses?: string[];
2747
+ allowedSenderAddresses?: string[];
2748
+ destinationAddress?: string;
2749
+ }
2750
+ | { name: string; service: string; type: "service"; environment?: string }
2751
+ | { name: string; part: string; type: "text_blob" }
2752
+ | { indexName: string; name: string; type: "vectorize" }
2753
+ | { name: string; type: "version_metadata" }
2754
+ | {
2755
+ name: string;
2756
+ secretName: string;
2757
+ storeId: string;
2758
+ type: "secrets_store_secret";
2759
+ }
2760
+ | {
2761
+ algorithm: unknown;
2762
+ format: "raw" | "pkcs8" | "spki" | "jwk";
2763
+ name: string;
2764
+ type: "secret_key";
2765
+ usages: (
2766
+ | "encrypt"
2767
+ | "decrypt"
2768
+ | "sign"
2769
+ | "verify"
2770
+ | "deriveKey"
2771
+ | "deriveBits"
2772
+ | "wrapKey"
2773
+ | "unwrapKey"
2774
+ )[];
2775
+ keyBase64?: string;
2776
+ keyJwk?: unknown;
2777
+ }
2778
+ | {
2779
+ name: string;
2780
+ type: "workflow";
2781
+ workflowName: string;
2782
+ className?: string;
2783
+ scriptName?: string;
2784
+ }
2785
+ | { name: string; part: string; type: "wasm_module" }
2786
+ )[];
2787
+ compatibilityDate?: string;
2788
+ compatibilityFlags?: string[];
2789
+ limits?: { cpuMs?: number };
2790
+ logpush?: boolean;
2791
+ migrations?:
2792
+ | unknown
2793
+ | { newTag?: string; oldTag?: string; steps?: unknown[] };
2794
+ observability?: {
2795
+ enabled: boolean;
2796
+ headSamplingRate?: number | null;
2797
+ logs?: {
2798
+ enabled: boolean;
2799
+ invocationLogs: boolean;
2800
+ destinations?: string[];
2801
+ headSamplingRate?: number | null;
2802
+ persist?: boolean;
2803
+ } | null;
2804
+ };
2805
+ placement?:
2806
+ | { mode: "smart" }
2807
+ | { region: string }
2808
+ | { hostname: string }
2809
+ | { host: string };
2810
+ tags?: string[] | null;
2811
+ tailConsumers?: unknown[] | null;
2812
+ usageModel?: "standard" | "bundled" | "unbound";
2813
+ };
2814
+ }
2815
+
2816
+ export const PatchDispatchNamespaceScriptSettingRequest =
2817
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2818
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
2819
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
2820
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2821
+ settings: Schema.optional(
2822
+ Schema.Struct({
2823
+ bindings: Schema.optional(
2824
+ Schema.Array(
2825
+ Schema.Union([
2826
+ Schema.Struct({
2827
+ name: Schema.String,
2828
+ type: Schema.Literal("ai"),
2829
+ }),
2830
+ Schema.Struct({
2831
+ dataset: Schema.String,
2832
+ name: Schema.String,
2833
+ type: Schema.Literal("analytics_engine"),
2834
+ }),
2835
+ Schema.Struct({
2836
+ name: Schema.String,
2837
+ type: Schema.Literal("assets"),
2838
+ }),
2839
+ Schema.Struct({
2840
+ name: Schema.String,
2841
+ type: Schema.Literal("browser"),
2842
+ }),
2843
+ Schema.Struct({
2844
+ id: Schema.String,
2845
+ name: Schema.String,
2846
+ type: Schema.Literal("d1"),
2847
+ }),
2848
+ Schema.Struct({
2849
+ name: Schema.String,
2850
+ part: Schema.String,
2851
+ type: Schema.Literal("data_blob"),
2852
+ }),
2853
+ Schema.Struct({
2854
+ name: Schema.String,
2855
+ namespace: Schema.String,
2856
+ type: Schema.Literal("dispatch_namespace"),
2857
+ outbound: Schema.optional(
2858
+ Schema.Struct({
2859
+ params: Schema.optional(Schema.Array(Schema.String)),
2860
+ worker: Schema.optional(
2861
+ Schema.Struct({
2862
+ environment: Schema.optional(Schema.String),
2863
+ service: Schema.optional(Schema.String),
2864
+ }),
2865
+ ),
2866
+ }),
2867
+ ),
2868
+ }),
2869
+ Schema.Struct({
2870
+ name: Schema.String,
2871
+ type: Schema.Literal("durable_object_namespace"),
2872
+ className: Schema.optional(Schema.String),
2873
+ environment: Schema.optional(Schema.String),
2874
+ namespaceId: Schema.optional(Schema.String),
2875
+ scriptName: Schema.optional(Schema.String),
2876
+ }).pipe(
2877
+ Schema.encodeKeys({
2878
+ name: "name",
2879
+ type: "type",
2880
+ className: "class_name",
2881
+ environment: "environment",
2882
+ namespaceId: "namespace_id",
2883
+ scriptName: "script_name",
2884
+ }),
2885
+ ),
2886
+ Schema.Struct({
2887
+ id: Schema.String,
2888
+ name: Schema.String,
2889
+ type: Schema.Literal("hyperdrive"),
2890
+ }),
2891
+ Schema.Struct({
2892
+ name: Schema.String,
2893
+ type: Schema.Literal("inherit"),
2894
+ oldName: Schema.optional(Schema.String),
2895
+ versionId: Schema.optional(Schema.String),
2896
+ }).pipe(
2897
+ Schema.encodeKeys({
2898
+ name: "name",
2899
+ type: "type",
2900
+ oldName: "old_name",
2901
+ versionId: "version_id",
2902
+ }),
2903
+ ),
2904
+ Schema.Struct({
2905
+ name: Schema.String,
2906
+ type: Schema.Literal("images"),
2907
+ }),
2908
+ Schema.Struct({
2909
+ json: Schema.String,
2910
+ name: Schema.String,
2911
+ type: Schema.Literal("json"),
2912
+ }),
2913
+ Schema.Struct({
2914
+ name: Schema.String,
2915
+ namespaceId: Schema.String,
2916
+ type: Schema.Literal("kv_namespace"),
2917
+ }).pipe(
2918
+ Schema.encodeKeys({
2919
+ name: "name",
2920
+ namespaceId: "namespace_id",
2921
+ type: "type",
2922
+ }),
2923
+ ),
2924
+ Schema.Struct({
2925
+ certificateId: Schema.String,
2926
+ name: Schema.String,
2927
+ type: Schema.Literal("mtls_certificate"),
2928
+ }).pipe(
2929
+ Schema.encodeKeys({
2930
+ certificateId: "certificate_id",
2931
+ name: "name",
2932
+ type: "type",
2933
+ }),
2934
+ ),
2935
+ Schema.Struct({
2936
+ name: Schema.String,
2937
+ text: Schema.String,
2938
+ type: Schema.Literal("plain_text"),
2939
+ }),
2940
+ Schema.Struct({
2941
+ name: Schema.String,
2942
+ pipeline: Schema.String,
2943
+ type: Schema.Literal("pipelines"),
2944
+ }),
2945
+ Schema.Struct({
2946
+ name: Schema.String,
2947
+ queueName: Schema.String,
2948
+ type: Schema.Literal("queue"),
2949
+ }).pipe(
2950
+ Schema.encodeKeys({
2951
+ name: "name",
2952
+ queueName: "queue_name",
2953
+ type: "type",
2954
+ }),
2955
+ ),
2956
+ Schema.Struct({
2957
+ bucketName: Schema.String,
2958
+ name: Schema.String,
2959
+ type: Schema.Literal("r2_bucket"),
2960
+ jurisdiction: Schema.optional(
2961
+ Schema.Literals(["eu", "fedramp"]),
2962
+ ),
2963
+ }).pipe(
2964
+ Schema.encodeKeys({
2965
+ bucketName: "bucket_name",
2966
+ name: "name",
2967
+ type: "type",
2968
+ jurisdiction: "jurisdiction",
2969
+ }),
2970
+ ),
2971
+ Schema.Struct({
2972
+ name: Schema.String,
2973
+ text: Schema.String,
2974
+ type: Schema.Literal("secret_text"),
2975
+ }),
2976
+ Schema.Struct({
2977
+ name: Schema.String,
2978
+ type: Schema.Literal("send_email"),
2979
+ allowedDestinationAddresses: Schema.optional(
2980
+ Schema.Array(Schema.String),
2981
+ ),
2982
+ allowedSenderAddresses: Schema.optional(
2983
+ Schema.Array(Schema.String),
2984
+ ),
2985
+ destinationAddress: Schema.optional(Schema.String),
2986
+ }).pipe(
2987
+ Schema.encodeKeys({
2988
+ name: "name",
2989
+ type: "type",
2990
+ allowedDestinationAddresses: "allowed_destination_addresses",
2991
+ allowedSenderAddresses: "allowed_sender_addresses",
2992
+ destinationAddress: "destination_address",
2993
+ }),
2994
+ ),
2995
+ Schema.Struct({
2996
+ name: Schema.String,
2997
+ service: Schema.String,
2998
+ type: Schema.Literal("service"),
2999
+ environment: Schema.optional(Schema.String),
3000
+ }),
3001
+ Schema.Struct({
3002
+ name: Schema.String,
3003
+ part: Schema.String,
3004
+ type: Schema.Literal("text_blob"),
3005
+ }),
3006
+ Schema.Struct({
3007
+ indexName: Schema.String,
3008
+ name: Schema.String,
3009
+ type: Schema.Literal("vectorize"),
3010
+ }).pipe(
3011
+ Schema.encodeKeys({
3012
+ indexName: "index_name",
3013
+ name: "name",
3014
+ type: "type",
3015
+ }),
3016
+ ),
3017
+ Schema.Struct({
3018
+ name: Schema.String,
3019
+ type: Schema.Literal("version_metadata"),
3020
+ }),
3021
+ Schema.Struct({
3022
+ name: Schema.String,
3023
+ secretName: Schema.String,
3024
+ storeId: Schema.String,
3025
+ type: Schema.Literal("secrets_store_secret"),
3026
+ }).pipe(
3027
+ Schema.encodeKeys({
3028
+ name: "name",
3029
+ secretName: "secret_name",
3030
+ storeId: "store_id",
3031
+ type: "type",
3032
+ }),
3033
+ ),
3034
+ Schema.Struct({
3035
+ algorithm: Schema.Unknown,
3036
+ format: Schema.Literals(["raw", "pkcs8", "spki", "jwk"]),
3037
+ name: Schema.String,
3038
+ type: Schema.Literal("secret_key"),
3039
+ usages: Schema.Array(
3040
+ Schema.Literals([
3041
+ "encrypt",
3042
+ "decrypt",
3043
+ "sign",
3044
+ "verify",
3045
+ "deriveKey",
3046
+ "deriveBits",
3047
+ "wrapKey",
3048
+ "unwrapKey",
3049
+ ]),
3050
+ ),
3051
+ keyBase64: Schema.optional(Schema.String),
3052
+ keyJwk: Schema.optional(Schema.Unknown),
3053
+ }).pipe(
3054
+ Schema.encodeKeys({
3055
+ algorithm: "algorithm",
3056
+ format: "format",
3057
+ name: "name",
3058
+ type: "type",
3059
+ usages: "usages",
3060
+ keyBase64: "key_base64",
3061
+ keyJwk: "key_jwk",
3062
+ }),
3063
+ ),
3064
+ Schema.Struct({
3065
+ name: Schema.String,
3066
+ type: Schema.Literal("workflow"),
3067
+ workflowName: Schema.String,
3068
+ className: Schema.optional(Schema.String),
3069
+ scriptName: Schema.optional(Schema.String),
3070
+ }).pipe(
3071
+ Schema.encodeKeys({
3072
+ name: "name",
3073
+ type: "type",
3074
+ workflowName: "workflow_name",
3075
+ className: "class_name",
3076
+ scriptName: "script_name",
3077
+ }),
3078
+ ),
3079
+ Schema.Struct({
3080
+ name: Schema.String,
3081
+ part: Schema.String,
3082
+ type: Schema.Literal("wasm_module"),
3083
+ }),
3084
+ ]),
3085
+ ),
3086
+ ),
3087
+ compatibilityDate: Schema.optional(Schema.String),
3088
+ compatibilityFlags: Schema.optional(Schema.Array(Schema.String)),
3089
+ limits: Schema.optional(
3090
+ Schema.Struct({
3091
+ cpuMs: Schema.optional(Schema.Number),
3092
+ }).pipe(Schema.encodeKeys({ cpuMs: "cpu_ms" })),
3093
+ ),
3094
+ logpush: Schema.optional(Schema.Boolean),
3095
+ migrations: Schema.optional(
3096
+ Schema.Union([
3097
+ Schema.Unknown,
3098
+ Schema.Struct({
3099
+ newTag: Schema.optional(Schema.String),
3100
+ oldTag: Schema.optional(Schema.String),
3101
+ steps: Schema.optional(Schema.Array(Schema.Unknown)),
3102
+ }).pipe(
3103
+ Schema.encodeKeys({
3104
+ newTag: "new_tag",
3105
+ oldTag: "old_tag",
3106
+ steps: "steps",
3107
+ }),
3108
+ ),
3109
+ ]),
3110
+ ),
3111
+ observability: Schema.optional(
3112
+ Schema.Struct({
3113
+ enabled: Schema.Boolean,
3114
+ headSamplingRate: Schema.optional(
3115
+ Schema.Union([Schema.Number, Schema.Null]),
3116
+ ),
3117
+ logs: Schema.optional(
3118
+ Schema.Union([
3119
+ Schema.Struct({
3120
+ enabled: Schema.Boolean,
3121
+ invocationLogs: Schema.Boolean,
3122
+ destinations: Schema.optional(Schema.Array(Schema.String)),
3123
+ headSamplingRate: Schema.optional(
3124
+ Schema.Union([Schema.Number, Schema.Null]),
3125
+ ),
3126
+ persist: Schema.optional(Schema.Boolean),
3127
+ }).pipe(
3128
+ Schema.encodeKeys({
3129
+ enabled: "enabled",
3130
+ invocationLogs: "invocation_logs",
3131
+ destinations: "destinations",
3132
+ headSamplingRate: "head_sampling_rate",
3133
+ persist: "persist",
3134
+ }),
3135
+ ),
3136
+ Schema.Null,
3137
+ ]),
3138
+ ),
3139
+ }).pipe(
3140
+ Schema.encodeKeys({
3141
+ enabled: "enabled",
3142
+ headSamplingRate: "head_sampling_rate",
3143
+ logs: "logs",
3144
+ }),
3145
+ ),
3146
+ ),
3147
+ placement: Schema.optional(
3148
+ Schema.Union([
3149
+ Schema.Struct({
3150
+ mode: Schema.Literal("smart"),
3151
+ }),
3152
+ Schema.Struct({
3153
+ region: Schema.String,
3154
+ }),
3155
+ Schema.Struct({
3156
+ hostname: Schema.String,
3157
+ }),
3158
+ Schema.Struct({
3159
+ host: Schema.String,
3160
+ }),
3161
+ ]),
3162
+ ),
3163
+ tags: Schema.optional(
3164
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3165
+ ),
3166
+ tailConsumers: Schema.optional(
3167
+ Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
3168
+ ),
3169
+ usageModel: Schema.optional(
3170
+ Schema.Literals(["standard", "bundled", "unbound"]),
3171
+ ),
3172
+ }).pipe(
3173
+ Schema.encodeKeys({
3174
+ bindings: "bindings",
3175
+ compatibilityDate: "compatibility_date",
3176
+ compatibilityFlags: "compatibility_flags",
3177
+ limits: "limits",
3178
+ logpush: "logpush",
3179
+ migrations: "migrations",
3180
+ observability: "observability",
3181
+ placement: "placement",
3182
+ tags: "tags",
3183
+ tailConsumers: "tail_consumers",
3184
+ usageModel: "usage_model",
3185
+ }),
3186
+ ),
3187
+ ),
3188
+ }).pipe(
3189
+ T.Http({
3190
+ method: "PATCH",
3191
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/settings",
3192
+ contentType: "multipart",
3193
+ }),
3194
+ ) as unknown as Schema.Schema<PatchDispatchNamespaceScriptSettingRequest>;
3195
+
3196
+ export interface PatchDispatchNamespaceScriptSettingResponse {
3197
+ /** List of bindings attached to a Worker. You can find more about bindings on our docs: https://developers.cloudflare.com/workers/configuration/multipart-upload-metadata/#bindings. */
3198
+ bindings?:
3199
+ | (
3200
+ | { name: string; type: "ai" }
3201
+ | { dataset: string; name: string; type: "analytics_engine" }
3202
+ | { name: string; type: "assets" }
3203
+ | { name: string; type: "browser" }
3204
+ | { id: string; name: string; type: "d1" }
3205
+ | { name: string; part: string; type: "data_blob" }
3206
+ | {
3207
+ name: string;
3208
+ namespace: string;
3209
+ type: "dispatch_namespace";
3210
+ outbound?: {
3211
+ params?: string[] | null;
3212
+ worker?: {
3213
+ environment?: string | null;
3214
+ service?: string | null;
3215
+ } | null;
3216
+ } | null;
3217
+ }
3218
+ | {
3219
+ name: string;
3220
+ type: "durable_object_namespace";
3221
+ className?: string | null;
3222
+ environment?: string | null;
3223
+ namespaceId?: string | null;
3224
+ scriptName?: string | null;
3225
+ }
3226
+ | { id: string; name: string; type: "hyperdrive" }
3227
+ | {
3228
+ name: string;
3229
+ type: "inherit";
3230
+ oldName?: string | null;
3231
+ versionId?: string | null;
3232
+ }
3233
+ | { name: string; type: "images" }
3234
+ | { json: string; name: string; type: "json" }
3235
+ | { name: string; namespaceId: string; type: "kv_namespace" }
3236
+ | { certificateId: string; name: string; type: "mtls_certificate" }
3237
+ | { name: string; text: string; type: "plain_text" }
3238
+ | { name: string; pipeline: string; type: "pipelines" }
3239
+ | { name: string; queueName: string; type: "queue" }
3240
+ | {
3241
+ bucketName: string;
3242
+ name: string;
3243
+ type: "r2_bucket";
3244
+ jurisdiction?: "eu" | "fedramp" | null;
3245
+ }
3246
+ | { name: string; type: "secret_text" }
3247
+ | {
3248
+ name: string;
3249
+ type: "send_email";
3250
+ allowedDestinationAddresses?: string[] | null;
3251
+ allowedSenderAddresses?: string[] | null;
3252
+ destinationAddress?: string | null;
3253
+ }
3254
+ | {
3255
+ name: string;
3256
+ service: string;
3257
+ type: "service";
3258
+ environment?: string | null;
3259
+ }
3260
+ | { name: string; part: string; type: "text_blob" }
3261
+ | { indexName: string; name: string; type: "vectorize" }
3262
+ | { name: string; type: "version_metadata" }
3263
+ | {
3264
+ name: string;
3265
+ secretName: string;
3266
+ storeId: string;
3267
+ type: "secrets_store_secret";
3268
+ }
3269
+ | {
3270
+ algorithm: unknown;
3271
+ format: "raw" | "pkcs8" | "spki" | "jwk";
3272
+ name: string;
3273
+ type: "secret_key";
3274
+ usages: (
3275
+ | "encrypt"
3276
+ | "decrypt"
3277
+ | "sign"
3278
+ | "verify"
3279
+ | "deriveKey"
3280
+ | "deriveBits"
3281
+ | "wrapKey"
3282
+ | "unwrapKey"
3283
+ )[];
3284
+ }
3285
+ | {
3286
+ name: string;
3287
+ type: "workflow";
3288
+ workflowName: string;
3289
+ className?: string | null;
3290
+ scriptName?: string | null;
3291
+ }
3292
+ | { name: string; part: string; type: "wasm_module" }
3293
+ )[]
3294
+ | null;
3295
+ /** Date indicating targeted support in the Workers runtime. Backwards incompatible fixes to the runtime following this date will not affect this Worker. */
3296
+ compatibilityDate?: string | null;
3297
+ /** Flags that enable or disable certain features in the Workers runtime. Used to enable upcoming features or opt in or out of specific changes not included in a `compatibility_date`. */
3298
+ compatibilityFlags?: string[] | null;
3299
+ /** Limits to apply for this Worker. */
3300
+ limits?: { cpuMs?: number | null } | null;
3301
+ /** Whether Logpush is turned on for the Worker. */
3302
+ logpush?: boolean | null;
3303
+ /** Observability settings for the Worker. */
3304
+ observability?: {
3305
+ enabled: boolean;
3306
+ headSamplingRate?: number | null;
3307
+ logs?: {
3308
+ enabled: boolean;
3309
+ invocationLogs: boolean;
3310
+ destinations?: string[] | null;
3311
+ headSamplingRate?: number | null;
3312
+ persist?: boolean | null;
3313
+ } | null;
3314
+ } | null;
3315
+ /** Configuration for [Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement). Specify either mode for Smart Placement, or one of region/hostname/host for targeted place */
3316
+ placement?:
3317
+ | { mode: "smart" }
3318
+ | { region: string }
3319
+ | { hostname: string }
3320
+ | { host: string }
3321
+ | null;
3322
+ /** Tags associated with the Worker. */
3323
+ tags?: string[] | null;
3324
+ /** List of Workers that will consume logs from the attached Worker. */
3325
+ tailConsumers?: unknown[] | null;
3326
+ /** Usage model for the Worker invocations. */
3327
+ usageModel?: "standard" | "bundled" | "unbound" | null;
3328
+ }
3329
+
3330
+ export const PatchDispatchNamespaceScriptSettingResponse =
3331
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3332
+ bindings: Schema.optional(
3333
+ Schema.Union([
3334
+ Schema.Array(
3335
+ Schema.Union([
3336
+ Schema.Struct({
3337
+ name: Schema.String,
3338
+ type: Schema.Literal("ai"),
3339
+ }),
3340
+ Schema.Struct({
3341
+ dataset: Schema.String,
3342
+ name: Schema.String,
3343
+ type: Schema.Literal("analytics_engine"),
3344
+ }),
3345
+ Schema.Struct({
3346
+ name: Schema.String,
3347
+ type: Schema.Literal("assets"),
3348
+ }),
3349
+ Schema.Struct({
3350
+ name: Schema.String,
3351
+ type: Schema.Literal("browser"),
3352
+ }),
3353
+ Schema.Struct({
3354
+ id: Schema.String,
3355
+ name: Schema.String,
3356
+ type: Schema.Literal("d1"),
3357
+ }),
3358
+ Schema.Struct({
3359
+ name: Schema.String,
3360
+ part: Schema.String,
3361
+ type: Schema.Literal("data_blob"),
3362
+ }),
3363
+ Schema.Struct({
3364
+ name: Schema.String,
3365
+ namespace: Schema.String,
3366
+ type: Schema.Literal("dispatch_namespace"),
3367
+ outbound: Schema.optional(
3368
+ Schema.Union([
3369
+ Schema.Struct({
3370
+ params: Schema.optional(
3371
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3372
+ ),
3373
+ worker: Schema.optional(
3374
+ Schema.Union([
3375
+ Schema.Struct({
3376
+ environment: Schema.optional(
3377
+ Schema.Union([Schema.String, Schema.Null]),
3378
+ ),
3379
+ service: Schema.optional(
3380
+ Schema.Union([Schema.String, Schema.Null]),
3381
+ ),
3382
+ }),
3383
+ Schema.Null,
3384
+ ]),
3385
+ ),
3386
+ }),
3387
+ Schema.Null,
3388
+ ]),
3389
+ ),
3390
+ }),
3391
+ Schema.Struct({
3392
+ name: Schema.String,
3393
+ type: Schema.Literal("durable_object_namespace"),
3394
+ className: Schema.optional(
3395
+ Schema.Union([Schema.String, Schema.Null]),
3396
+ ),
3397
+ environment: Schema.optional(
3398
+ Schema.Union([Schema.String, Schema.Null]),
3399
+ ),
3400
+ namespaceId: Schema.optional(
3401
+ Schema.Union([Schema.String, Schema.Null]),
3402
+ ),
3403
+ scriptName: Schema.optional(
3404
+ Schema.Union([Schema.String, Schema.Null]),
3405
+ ),
3406
+ }).pipe(
3407
+ Schema.encodeKeys({
3408
+ name: "name",
3409
+ type: "type",
3410
+ className: "class_name",
3411
+ environment: "environment",
3412
+ namespaceId: "namespace_id",
3413
+ scriptName: "script_name",
3414
+ }),
3415
+ ),
3416
+ Schema.Struct({
3417
+ id: Schema.String,
3418
+ name: Schema.String,
3419
+ type: Schema.Literal("hyperdrive"),
3420
+ }),
3421
+ Schema.Struct({
3422
+ name: Schema.String,
3423
+ type: Schema.Literal("inherit"),
3424
+ oldName: Schema.optional(
3425
+ Schema.Union([Schema.String, Schema.Null]),
3426
+ ),
3427
+ versionId: Schema.optional(
3428
+ Schema.Union([Schema.String, Schema.Null]),
3429
+ ),
3430
+ }).pipe(
3431
+ Schema.encodeKeys({
3432
+ name: "name",
3433
+ type: "type",
3434
+ oldName: "old_name",
3435
+ versionId: "version_id",
3436
+ }),
3437
+ ),
3438
+ Schema.Struct({
3439
+ name: Schema.String,
3440
+ type: Schema.Literal("images"),
3441
+ }),
3442
+ Schema.Struct({
3443
+ json: Schema.String,
3444
+ name: Schema.String,
3445
+ type: Schema.Literal("json"),
3446
+ }),
3447
+ Schema.Struct({
3448
+ name: Schema.String,
3449
+ namespaceId: Schema.String,
3450
+ type: Schema.Literal("kv_namespace"),
3451
+ }).pipe(
3452
+ Schema.encodeKeys({
3453
+ name: "name",
3454
+ namespaceId: "namespace_id",
3455
+ type: "type",
3456
+ }),
3457
+ ),
3458
+ Schema.Struct({
3459
+ certificateId: Schema.String,
3460
+ name: Schema.String,
3461
+ type: Schema.Literal("mtls_certificate"),
3462
+ }).pipe(
3463
+ Schema.encodeKeys({
3464
+ certificateId: "certificate_id",
3465
+ name: "name",
3466
+ type: "type",
3467
+ }),
3468
+ ),
3469
+ Schema.Struct({
3470
+ name: Schema.String,
3471
+ text: Schema.String,
3472
+ type: Schema.Literal("plain_text"),
3473
+ }),
3474
+ Schema.Struct({
3475
+ name: Schema.String,
3476
+ pipeline: Schema.String,
3477
+ type: Schema.Literal("pipelines"),
3478
+ }),
3479
+ Schema.Struct({
3480
+ name: Schema.String,
3481
+ queueName: Schema.String,
3482
+ type: Schema.Literal("queue"),
3483
+ }).pipe(
3484
+ Schema.encodeKeys({
3485
+ name: "name",
3486
+ queueName: "queue_name",
3487
+ type: "type",
3488
+ }),
3489
+ ),
3490
+ Schema.Struct({
3491
+ bucketName: Schema.String,
3492
+ name: Schema.String,
3493
+ type: Schema.Literal("r2_bucket"),
3494
+ jurisdiction: Schema.optional(
3495
+ Schema.Union([Schema.Literals(["eu", "fedramp"]), Schema.Null]),
3496
+ ),
3497
+ }).pipe(
3498
+ Schema.encodeKeys({
3499
+ bucketName: "bucket_name",
3500
+ name: "name",
3501
+ type: "type",
3502
+ jurisdiction: "jurisdiction",
3503
+ }),
3504
+ ),
3505
+ Schema.Struct({
3506
+ name: Schema.String,
3507
+ type: Schema.Literal("secret_text"),
3508
+ }),
3509
+ Schema.Struct({
3510
+ name: Schema.String,
3511
+ type: Schema.Literal("send_email"),
3512
+ allowedDestinationAddresses: Schema.optional(
3513
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3514
+ ),
3515
+ allowedSenderAddresses: Schema.optional(
3516
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3517
+ ),
3518
+ destinationAddress: Schema.optional(
3519
+ Schema.Union([Schema.String, Schema.Null]),
3520
+ ),
3521
+ }).pipe(
3522
+ Schema.encodeKeys({
3523
+ name: "name",
3524
+ type: "type",
3525
+ allowedDestinationAddresses: "allowed_destination_addresses",
3526
+ allowedSenderAddresses: "allowed_sender_addresses",
3527
+ destinationAddress: "destination_address",
3528
+ }),
3529
+ ),
3530
+ Schema.Struct({
3531
+ name: Schema.String,
3532
+ service: Schema.String,
3533
+ type: Schema.Literal("service"),
3534
+ environment: Schema.optional(
3535
+ Schema.Union([Schema.String, Schema.Null]),
3536
+ ),
3537
+ }),
3538
+ Schema.Struct({
3539
+ name: Schema.String,
3540
+ part: Schema.String,
3541
+ type: Schema.Literal("text_blob"),
3542
+ }),
3543
+ Schema.Struct({
3544
+ indexName: Schema.String,
3545
+ name: Schema.String,
3546
+ type: Schema.Literal("vectorize"),
3547
+ }).pipe(
3548
+ Schema.encodeKeys({
3549
+ indexName: "index_name",
3550
+ name: "name",
3551
+ type: "type",
3552
+ }),
3553
+ ),
3554
+ Schema.Struct({
3555
+ name: Schema.String,
3556
+ type: Schema.Literal("version_metadata"),
3557
+ }),
3558
+ Schema.Struct({
3559
+ name: Schema.String,
3560
+ secretName: Schema.String,
3561
+ storeId: Schema.String,
3562
+ type: Schema.Literal("secrets_store_secret"),
3563
+ }).pipe(
3564
+ Schema.encodeKeys({
3565
+ name: "name",
3566
+ secretName: "secret_name",
3567
+ storeId: "store_id",
3568
+ type: "type",
3569
+ }),
3570
+ ),
3571
+ Schema.Struct({
3572
+ algorithm: Schema.Unknown,
3573
+ format: Schema.Literals(["raw", "pkcs8", "spki", "jwk"]),
3574
+ name: Schema.String,
3575
+ type: Schema.Literal("secret_key"),
3576
+ usages: Schema.Array(
3577
+ Schema.Literals([
3578
+ "encrypt",
3579
+ "decrypt",
3580
+ "sign",
3581
+ "verify",
3582
+ "deriveKey",
3583
+ "deriveBits",
3584
+ "wrapKey",
3585
+ "unwrapKey",
3586
+ ]),
3587
+ ),
3588
+ }),
3589
+ Schema.Struct({
3590
+ name: Schema.String,
3591
+ type: Schema.Literal("workflow"),
3592
+ workflowName: Schema.String,
3593
+ className: Schema.optional(
3594
+ Schema.Union([Schema.String, Schema.Null]),
3595
+ ),
3596
+ scriptName: Schema.optional(
3597
+ Schema.Union([Schema.String, Schema.Null]),
3598
+ ),
3599
+ }).pipe(
3600
+ Schema.encodeKeys({
3601
+ name: "name",
3602
+ type: "type",
3603
+ workflowName: "workflow_name",
3604
+ className: "class_name",
3605
+ scriptName: "script_name",
3606
+ }),
3607
+ ),
3608
+ Schema.Struct({
3609
+ name: Schema.String,
3610
+ part: Schema.String,
3611
+ type: Schema.Literal("wasm_module"),
3612
+ }),
3613
+ ]),
3614
+ ),
3615
+ Schema.Null,
3616
+ ]),
3617
+ ),
3618
+ compatibilityDate: Schema.optional(
3619
+ Schema.Union([Schema.String, Schema.Null]),
3620
+ ),
3621
+ compatibilityFlags: Schema.optional(
3622
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3623
+ ),
3624
+ limits: Schema.optional(
3625
+ Schema.Union([
3626
+ Schema.Struct({
3627
+ cpuMs: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3628
+ }).pipe(Schema.encodeKeys({ cpuMs: "cpu_ms" })),
3629
+ Schema.Null,
3630
+ ]),
3631
+ ),
3632
+ logpush: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
3633
+ observability: Schema.optional(
3634
+ Schema.Union([
3635
+ Schema.Struct({
3636
+ enabled: Schema.Boolean,
3637
+ headSamplingRate: Schema.optional(
3638
+ Schema.Union([Schema.Number, Schema.Null]),
3639
+ ),
3640
+ logs: Schema.optional(
3641
+ Schema.Union([
3642
+ Schema.Struct({
3643
+ enabled: Schema.Boolean,
3644
+ invocationLogs: Schema.Boolean,
3645
+ destinations: Schema.optional(
3646
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3647
+ ),
3648
+ headSamplingRate: Schema.optional(
3649
+ Schema.Union([Schema.Number, Schema.Null]),
3650
+ ),
3651
+ persist: Schema.optional(
3652
+ Schema.Union([Schema.Boolean, Schema.Null]),
3653
+ ),
3654
+ }).pipe(
3655
+ Schema.encodeKeys({
3656
+ enabled: "enabled",
3657
+ invocationLogs: "invocation_logs",
3658
+ destinations: "destinations",
3659
+ headSamplingRate: "head_sampling_rate",
3660
+ persist: "persist",
3661
+ }),
3662
+ ),
3663
+ Schema.Null,
3664
+ ]),
3665
+ ),
3666
+ }).pipe(
3667
+ Schema.encodeKeys({
3668
+ enabled: "enabled",
3669
+ headSamplingRate: "head_sampling_rate",
3670
+ logs: "logs",
3671
+ }),
3672
+ ),
3673
+ Schema.Null,
3674
+ ]),
3675
+ ),
3676
+ placement: Schema.optional(
3677
+ Schema.Union([
3678
+ Schema.Union([
3679
+ Schema.Struct({
3680
+ mode: Schema.Literal("smart"),
3681
+ }),
3682
+ Schema.Struct({
3683
+ region: Schema.String,
3684
+ }),
3685
+ Schema.Struct({
3686
+ hostname: Schema.String,
3687
+ }),
3688
+ Schema.Struct({
3689
+ host: Schema.String,
3690
+ }),
3691
+ ]),
3692
+ Schema.Null,
3693
+ ]),
3694
+ ),
3695
+ tags: Schema.optional(
3696
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3697
+ ),
3698
+ tailConsumers: Schema.optional(
3699
+ Schema.Union([Schema.Array(Schema.Unknown), Schema.Null]),
3700
+ ),
3701
+ usageModel: Schema.optional(
3702
+ Schema.Union([
3703
+ Schema.Literals(["standard", "bundled", "unbound"]),
3704
+ Schema.Null,
3705
+ ]),
3706
+ ),
3707
+ }).pipe(
3708
+ Schema.encodeKeys({
3709
+ bindings: "bindings",
3710
+ compatibilityDate: "compatibility_date",
3711
+ compatibilityFlags: "compatibility_flags",
3712
+ limits: "limits",
3713
+ logpush: "logpush",
3714
+ observability: "observability",
3715
+ placement: "placement",
3716
+ tags: "tags",
3717
+ tailConsumers: "tail_consumers",
3718
+ usageModel: "usage_model",
3719
+ }),
3720
+ ) as unknown as Schema.Schema<PatchDispatchNamespaceScriptSettingResponse>;
3721
+
3722
+ export type PatchDispatchNamespaceScriptSettingError = DefaultErrors;
3723
+
3724
+ export const patchDispatchNamespaceScriptSetting: API.OperationMethod<
3725
+ PatchDispatchNamespaceScriptSettingRequest,
3726
+ PatchDispatchNamespaceScriptSettingResponse,
3727
+ PatchDispatchNamespaceScriptSettingError,
3728
+ Credentials | HttpClient.HttpClient
3729
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3730
+ input: PatchDispatchNamespaceScriptSettingRequest,
3731
+ output: PatchDispatchNamespaceScriptSettingResponse,
3732
+ errors: [],
3733
+ }));
3734
+
3735
+ // =============================================================================
3736
+ // DispatchNamespaceScriptTag
3737
+ // =============================================================================
3738
+
3739
+ export interface ListDispatchNamespaceScriptTagsRequest {
3740
+ dispatchNamespace: string;
3741
+ scriptName: string;
3742
+ /** Identifier. */
3743
+ accountId: string;
3744
+ }
3745
+
3746
+ export const ListDispatchNamespaceScriptTagsRequest =
3747
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3748
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
3749
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
3750
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3751
+ }).pipe(
3752
+ T.Http({
3753
+ method: "GET",
3754
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/tags",
3755
+ }),
3756
+ ) as unknown as Schema.Schema<ListDispatchNamespaceScriptTagsRequest>;
3757
+
3758
+ export type ListDispatchNamespaceScriptTagsResponse = string[];
3759
+
3760
+ export const ListDispatchNamespaceScriptTagsResponse =
3761
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3762
+ Schema.String,
3763
+ ) as unknown as Schema.Schema<ListDispatchNamespaceScriptTagsResponse>;
3764
+
3765
+ export type ListDispatchNamespaceScriptTagsError = DefaultErrors;
3766
+
3767
+ export const listDispatchNamespaceScriptTags: API.OperationMethod<
3768
+ ListDispatchNamespaceScriptTagsRequest,
3769
+ ListDispatchNamespaceScriptTagsResponse,
3770
+ ListDispatchNamespaceScriptTagsError,
3771
+ Credentials | HttpClient.HttpClient
3772
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3773
+ input: ListDispatchNamespaceScriptTagsRequest,
3774
+ output: ListDispatchNamespaceScriptTagsResponse,
3775
+ errors: [],
3776
+ }));
3777
+
3778
+ export interface PutDispatchNamespaceScriptTagRequest {
3779
+ dispatchNamespace: string;
3780
+ scriptName: string;
3781
+ /** Path param: Identifier. */
3782
+ accountId: string;
3783
+ /** Body param: Tags associated with the Worker. */
3784
+ body: string[] | null;
3785
+ }
3786
+
3787
+ export const PutDispatchNamespaceScriptTagRequest =
3788
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3789
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
3790
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
3791
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3792
+ body: Schema.Union([Schema.Array(Schema.String), Schema.Null]).pipe(
3793
+ T.HttpBody(),
3794
+ ),
3795
+ }).pipe(
3796
+ T.Http({
3797
+ method: "PUT",
3798
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/tags",
3799
+ }),
3800
+ ) as unknown as Schema.Schema<PutDispatchNamespaceScriptTagRequest>;
3801
+
3802
+ export type PutDispatchNamespaceScriptTagResponse = string[];
3803
+
3804
+ export const PutDispatchNamespaceScriptTagResponse =
3805
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3806
+ Schema.String,
3807
+ ) as unknown as Schema.Schema<PutDispatchNamespaceScriptTagResponse>;
3808
+
3809
+ export type PutDispatchNamespaceScriptTagError = DefaultErrors;
3810
+
3811
+ export const putDispatchNamespaceScriptTag: API.OperationMethod<
3812
+ PutDispatchNamespaceScriptTagRequest,
3813
+ PutDispatchNamespaceScriptTagResponse,
3814
+ PutDispatchNamespaceScriptTagError,
3815
+ Credentials | HttpClient.HttpClient
3816
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3817
+ input: PutDispatchNamespaceScriptTagRequest,
3818
+ output: PutDispatchNamespaceScriptTagResponse,
3819
+ errors: [],
3820
+ }));
3821
+
3822
+ export interface DeleteDispatchNamespaceScriptTagRequest {
3823
+ dispatchNamespace: string;
3824
+ scriptName: string;
3825
+ tag: string;
3826
+ /** Identifier. */
3827
+ accountId: string;
3828
+ }
3829
+
3830
+ export const DeleteDispatchNamespaceScriptTagRequest =
3831
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3832
+ dispatchNamespace: Schema.String.pipe(T.HttpPath("dispatchNamespace")),
3833
+ scriptName: Schema.String.pipe(T.HttpPath("scriptName")),
3834
+ tag: Schema.String.pipe(T.HttpPath("tag")),
3835
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
3836
+ }).pipe(
3837
+ T.Http({
3838
+ method: "DELETE",
3839
+ path: "/accounts/{account_id}/workers/dispatch/namespaces/{dispatchNamespace}/scripts/{scriptName}/tags/{tag}",
3840
+ }),
3841
+ ) as unknown as Schema.Schema<DeleteDispatchNamespaceScriptTagRequest>;
3842
+
3843
+ export type DeleteDispatchNamespaceScriptTagResponse = unknown;
3844
+
3845
+ export const DeleteDispatchNamespaceScriptTagResponse =
3846
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<DeleteDispatchNamespaceScriptTagResponse>;
3847
+
3848
+ export type DeleteDispatchNamespaceScriptTagError = DefaultErrors;
3849
+
3850
+ export const deleteDispatchNamespaceScriptTag: API.OperationMethod<
3851
+ DeleteDispatchNamespaceScriptTagRequest,
3852
+ DeleteDispatchNamespaceScriptTagResponse,
3853
+ DeleteDispatchNamespaceScriptTagError,
3854
+ Credentials | HttpClient.HttpClient
3855
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3856
+ input: DeleteDispatchNamespaceScriptTagRequest,
3857
+ output: DeleteDispatchNamespaceScriptTagResponse,
3858
+ errors: [],
3859
+ }));