@distilled.cloud/cloudflare 0.0.0-john

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