@distilled.cloud/cloudflare 0.0.0 → 0.2.0-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (560) hide show
  1. package/lib/auth.d.ts +13 -0
  2. package/lib/auth.d.ts.map +1 -0
  3. package/lib/auth.js +12 -0
  4. package/lib/auth.js.map +1 -0
  5. package/lib/category.d.ts +2 -0
  6. package/lib/category.d.ts.map +1 -0
  7. package/lib/category.js +2 -0
  8. package/lib/category.js.map +1 -0
  9. package/lib/client/api.d.ts +14 -0
  10. package/lib/client/api.d.ts.map +1 -0
  11. package/lib/client/api.js +197 -0
  12. package/lib/client/api.js.map +1 -0
  13. package/lib/client/index.d.ts +8 -0
  14. package/lib/client/index.d.ts.map +1 -0
  15. package/lib/client/index.js +8 -0
  16. package/lib/client/index.js.map +1 -0
  17. package/lib/credentials.d.ts +14 -0
  18. package/lib/credentials.d.ts.map +1 -0
  19. package/lib/credentials.js +17 -0
  20. package/lib/credentials.js.map +1 -0
  21. package/lib/errors.d.ts +48 -0
  22. package/lib/errors.d.ts.map +1 -0
  23. package/lib/errors.js +38 -0
  24. package/lib/errors.js.map +1 -0
  25. package/lib/index.d.ts +10 -0
  26. package/lib/index.d.ts.map +1 -0
  27. package/lib/index.js +10 -0
  28. package/lib/index.js.map +1 -0
  29. package/lib/retry.d.ts +14 -0
  30. package/lib/retry.d.ts.map +1 -0
  31. package/lib/retry.js +14 -0
  32. package/lib/retry.js.map +1 -0
  33. package/lib/schemas.d.ts +29 -0
  34. package/lib/schemas.d.ts.map +1 -0
  35. package/lib/schemas.js +34 -0
  36. package/lib/schemas.js.map +1 -0
  37. package/lib/services/abuse-reports.d.ts +224 -0
  38. package/lib/services/abuse-reports.d.ts.map +1 -0
  39. package/lib/services/abuse-reports.js +353 -0
  40. package/lib/services/abuse-reports.js.map +1 -0
  41. package/lib/services/accounts.d.ts +682 -0
  42. package/lib/services/accounts.d.ts.map +1 -0
  43. package/lib/services/accounts.js +805 -0
  44. package/lib/services/accounts.js.map +1 -0
  45. package/lib/services/acm.d.ts +73 -0
  46. package/lib/services/acm.d.ts.map +1 -0
  47. package/lib/services/acm.js +76 -0
  48. package/lib/services/acm.js.map +1 -0
  49. package/lib/services/addressing.d.ts +1208 -0
  50. package/lib/services/addressing.d.ts.map +1 -0
  51. package/lib/services/addressing.js +1776 -0
  52. package/lib/services/addressing.js.map +1 -0
  53. package/lib/services/ai-gateway.d.ts +956 -0
  54. package/lib/services/ai-gateway.d.ts.map +1 -0
  55. package/lib/services/ai-gateway.js +1706 -0
  56. package/lib/services/ai-gateway.js.map +1 -0
  57. package/lib/services/ai.d.ts +243 -0
  58. package/lib/services/ai.d.ts.map +1 -0
  59. package/lib/services/ai.js +299 -0
  60. package/lib/services/ai.js.map +1 -0
  61. package/lib/services/aisearch.d.ts +915 -0
  62. package/lib/services/aisearch.d.ts.map +1 -0
  63. package/lib/services/aisearch.js +2425 -0
  64. package/lib/services/aisearch.js.map +1 -0
  65. package/lib/services/alerting.d.ts +718 -0
  66. package/lib/services/alerting.d.ts.map +1 -0
  67. package/lib/services/alerting.js +1388 -0
  68. package/lib/services/alerting.js.map +1 -0
  69. package/lib/services/api-gateway.d.ts +830 -0
  70. package/lib/services/api-gateway.d.ts.map +1 -0
  71. package/lib/services/api-gateway.js +1548 -0
  72. package/lib/services/api-gateway.js.map +1 -0
  73. package/lib/services/argo.d.ts +101 -0
  74. package/lib/services/argo.d.ts.map +1 -0
  75. package/lib/services/argo.js +105 -0
  76. package/lib/services/argo.js.map +1 -0
  77. package/lib/services/audit-logs.d.ts +46 -0
  78. package/lib/services/audit-logs.d.ts.map +1 -0
  79. package/lib/services/audit-logs.js +37 -0
  80. package/lib/services/audit-logs.js.map +1 -0
  81. package/lib/services/billing.d.ts +62 -0
  82. package/lib/services/billing.d.ts.map +1 -0
  83. package/lib/services/billing.js +100 -0
  84. package/lib/services/billing.js.map +1 -0
  85. package/lib/services/bot-management.d.ts +124 -0
  86. package/lib/services/bot-management.d.ts.map +1 -0
  87. package/lib/services/bot-management.js +262 -0
  88. package/lib/services/bot-management.js.map +1 -0
  89. package/lib/services/botnet-feed.d.ts +65 -0
  90. package/lib/services/botnet-feed.d.ts.map +1 -0
  91. package/lib/services/botnet-feed.js +84 -0
  92. package/lib/services/botnet-feed.js.map +1 -0
  93. package/lib/services/brand-protection.d.ts +188 -0
  94. package/lib/services/brand-protection.d.ts.map +1 -0
  95. package/lib/services/brand-protection.js +214 -0
  96. package/lib/services/brand-protection.js.map +1 -0
  97. package/lib/services/browser-rendering.d.ts +857 -0
  98. package/lib/services/browser-rendering.d.ts.map +1 -0
  99. package/lib/services/browser-rendering.js +1141 -0
  100. package/lib/services/browser-rendering.js.map +1 -0
  101. package/lib/services/cache.d.ts +287 -0
  102. package/lib/services/cache.d.ts.map +1 -0
  103. package/lib/services/cache.js +330 -0
  104. package/lib/services/cache.js.map +1 -0
  105. package/lib/services/calls.d.ts +202 -0
  106. package/lib/services/calls.d.ts.map +1 -0
  107. package/lib/services/calls.js +175 -0
  108. package/lib/services/calls.js.map +1 -0
  109. package/lib/services/certificate-authorities.d.ts +40 -0
  110. package/lib/services/certificate-authorities.d.ts.map +1 -0
  111. package/lib/services/certificate-authorities.js +49 -0
  112. package/lib/services/certificate-authorities.js.map +1 -0
  113. package/lib/services/client-certificates.d.ts +254 -0
  114. package/lib/services/client-certificates.d.ts.map +1 -0
  115. package/lib/services/client-certificates.js +350 -0
  116. package/lib/services/client-certificates.js.map +1 -0
  117. package/lib/services/cloud-connector.d.ts +59 -0
  118. package/lib/services/cloud-connector.d.ts.map +1 -0
  119. package/lib/services/cloud-connector.js +84 -0
  120. package/lib/services/cloud-connector.js.map +1 -0
  121. package/lib/services/cloudforce-one.d.ts +1318 -0
  122. package/lib/services/cloudforce-one.d.ts.map +1 -0
  123. package/lib/services/cloudforce-one.js +1684 -0
  124. package/lib/services/cloudforce-one.js.map +1 -0
  125. package/lib/services/connectivity.d.ts +248 -0
  126. package/lib/services/connectivity.d.ts.map +1 -0
  127. package/lib/services/connectivity.js +377 -0
  128. package/lib/services/connectivity.js.map +1 -0
  129. package/lib/services/content-scanning.d.ts +131 -0
  130. package/lib/services/content-scanning.d.ts.map +1 -0
  131. package/lib/services/content-scanning.js +156 -0
  132. package/lib/services/content-scanning.js.map +1 -0
  133. package/lib/services/custom-certificates.d.ts +211 -0
  134. package/lib/services/custom-certificates.d.ts.map +1 -0
  135. package/lib/services/custom-certificates.js +309 -0
  136. package/lib/services/custom-certificates.js.map +1 -0
  137. package/lib/services/custom-hostnames.d.ts +525 -0
  138. package/lib/services/custom-hostnames.d.ts.map +1 -0
  139. package/lib/services/custom-hostnames.js +1164 -0
  140. package/lib/services/custom-hostnames.js.map +1 -0
  141. package/lib/services/custom-nameservers.d.ts +67 -0
  142. package/lib/services/custom-nameservers.d.ts.map +1 -0
  143. package/lib/services/custom-nameservers.js +80 -0
  144. package/lib/services/custom-nameservers.js.map +1 -0
  145. package/lib/services/custom-pages.d.ts +74 -0
  146. package/lib/services/custom-pages.d.ts.map +1 -0
  147. package/lib/services/custom-pages.js +125 -0
  148. package/lib/services/custom-pages.js.map +1 -0
  149. package/lib/services/d1.d.ts +326 -0
  150. package/lib/services/d1.d.ts.map +1 -0
  151. package/lib/services/d1.js +448 -0
  152. package/lib/services/d1.js.map +1 -0
  153. package/lib/services/dcv-delegation.d.ts +24 -0
  154. package/lib/services/dcv-delegation.d.ts.map +1 -0
  155. package/lib/services/dcv-delegation.js +24 -0
  156. package/lib/services/dcv-delegation.js.map +1 -0
  157. package/lib/services/diagnostics.d.ts +175 -0
  158. package/lib/services/diagnostics.d.ts.map +1 -0
  159. package/lib/services/diagnostics.js +273 -0
  160. package/lib/services/diagnostics.js.map +1 -0
  161. package/lib/services/dns-firewall.d.ts +288 -0
  162. package/lib/services/dns-firewall.d.ts.map +1 -0
  163. package/lib/services/dns-firewall.js +373 -0
  164. package/lib/services/dns-firewall.js.map +1 -0
  165. package/lib/services/dns.d.ts +2946 -0
  166. package/lib/services/dns.d.ts.map +1 -0
  167. package/lib/services/dns.js +4511 -0
  168. package/lib/services/dns.js.map +1 -0
  169. package/lib/services/durable-objects.d.ts +61 -0
  170. package/lib/services/durable-objects.d.ts.map +1 -0
  171. package/lib/services/durable-objects.js +66 -0
  172. package/lib/services/durable-objects.js.map +1 -0
  173. package/lib/services/email-routing.d.ts +542 -0
  174. package/lib/services/email-routing.d.ts.map +1 -0
  175. package/lib/services/email-routing.js +662 -0
  176. package/lib/services/email-routing.js.map +1 -0
  177. package/lib/services/email-security.d.ts +1131 -0
  178. package/lib/services/email-security.d.ts.map +1 -0
  179. package/lib/services/email-security.js +2065 -0
  180. package/lib/services/email-security.js.map +1 -0
  181. package/lib/services/filters.d.ts +157 -0
  182. package/lib/services/filters.d.ts.map +1 -0
  183. package/lib/services/filters.js +135 -0
  184. package/lib/services/filters.js.map +1 -0
  185. package/lib/services/firewall.d.ts +1080 -0
  186. package/lib/services/firewall.d.ts.map +1 -0
  187. package/lib/services/firewall.js +1881 -0
  188. package/lib/services/firewall.js.map +1 -0
  189. package/lib/services/healthchecks.d.ts +464 -0
  190. package/lib/services/healthchecks.d.ts.map +1 -0
  191. package/lib/services/healthchecks.js +838 -0
  192. package/lib/services/healthchecks.js.map +1 -0
  193. package/lib/services/hostnames.d.ts +74 -0
  194. package/lib/services/hostnames.d.ts.map +1 -0
  195. package/lib/services/hostnames.js +100 -0
  196. package/lib/services/hostnames.js.map +1 -0
  197. package/lib/services/hyperdrive.d.ts +203 -0
  198. package/lib/services/hyperdrive.d.ts.map +1 -0
  199. package/lib/services/hyperdrive.js +299 -0
  200. package/lib/services/hyperdrive.js.map +1 -0
  201. package/lib/services/iam.d.ts +554 -0
  202. package/lib/services/iam.d.ts.map +1 -0
  203. package/lib/services/iam.js +743 -0
  204. package/lib/services/iam.js.map +1 -0
  205. package/lib/services/images.d.ts +403 -0
  206. package/lib/services/images.d.ts.map +1 -0
  207. package/lib/services/images.js +417 -0
  208. package/lib/services/images.js.map +1 -0
  209. package/lib/services/intel.d.ts +768 -0
  210. package/lib/services/intel.d.ts.map +1 -0
  211. package/lib/services/intel.js +1179 -0
  212. package/lib/services/intel.js.map +1 -0
  213. package/lib/services/ips.d.ts +28 -0
  214. package/lib/services/ips.d.ts.map +1 -0
  215. package/lib/services/ips.js +39 -0
  216. package/lib/services/ips.js.map +1 -0
  217. package/lib/services/keyless-certificates.d.ts +177 -0
  218. package/lib/services/keyless-certificates.d.ts.map +1 -0
  219. package/lib/services/keyless-certificates.js +216 -0
  220. package/lib/services/keyless-certificates.js.map +1 -0
  221. package/lib/services/kv.d.ts +339 -0
  222. package/lib/services/kv.d.ts.map +1 -0
  223. package/lib/services/kv.js +402 -0
  224. package/lib/services/kv.js.map +1 -0
  225. package/lib/services/leaked-credential-checks.d.ts +119 -0
  226. package/lib/services/leaked-credential-checks.d.ts.map +1 -0
  227. package/lib/services/leaked-credential-checks.js +130 -0
  228. package/lib/services/leaked-credential-checks.js.map +1 -0
  229. package/lib/services/load-balancers.d.ts +1767 -0
  230. package/lib/services/load-balancers.d.ts.map +1 -0
  231. package/lib/services/load-balancers.js +3068 -0
  232. package/lib/services/load-balancers.js.map +1 -0
  233. package/lib/services/logpush.d.ts +401 -0
  234. package/lib/services/logpush.d.ts.map +1 -0
  235. package/lib/services/logpush.js +724 -0
  236. package/lib/services/logpush.js.map +1 -0
  237. package/lib/services/logs.d.ts +125 -0
  238. package/lib/services/logs.d.ts.map +1 -0
  239. package/lib/services/logs.js +145 -0
  240. package/lib/services/logs.js.map +1 -0
  241. package/lib/services/magic-cloud-networking.d.ts +1599 -0
  242. package/lib/services/magic-cloud-networking.d.ts.map +1 -0
  243. package/lib/services/magic-cloud-networking.js +5205 -0
  244. package/lib/services/magic-cloud-networking.js.map +1 -0
  245. package/lib/services/magic-network-monitoring.d.ts +379 -0
  246. package/lib/services/magic-network-monitoring.d.ts.map +1 -0
  247. package/lib/services/magic-network-monitoring.js +535 -0
  248. package/lib/services/magic-network-monitoring.js.map +1 -0
  249. package/lib/services/magic-transit.d.ts +3650 -0
  250. package/lib/services/magic-transit.d.ts.map +1 -0
  251. package/lib/services/magic-transit.js +6120 -0
  252. package/lib/services/magic-transit.js.map +1 -0
  253. package/lib/services/managed-transforms.d.ts +79 -0
  254. package/lib/services/managed-transforms.d.ts.map +1 -0
  255. package/lib/services/managed-transforms.js +107 -0
  256. package/lib/services/managed-transforms.js.map +1 -0
  257. package/lib/services/memberships.d.ts +172 -0
  258. package/lib/services/memberships.d.ts.map +1 -0
  259. package/lib/services/memberships.js +282 -0
  260. package/lib/services/memberships.js.map +1 -0
  261. package/lib/services/mtls-certificates.d.ts +140 -0
  262. package/lib/services/mtls-certificates.d.ts.map +1 -0
  263. package/lib/services/mtls-certificates.js +173 -0
  264. package/lib/services/mtls-certificates.js.map +1 -0
  265. package/lib/services/network-interconnects.d.ts +410 -0
  266. package/lib/services/network-interconnects.d.ts.map +1 -0
  267. package/lib/services/network-interconnects.js +583 -0
  268. package/lib/services/network-interconnects.js.map +1 -0
  269. package/lib/services/organizations.d.ts +201 -0
  270. package/lib/services/organizations.d.ts.map +1 -0
  271. package/lib/services/organizations.js +355 -0
  272. package/lib/services/organizations.js.map +1 -0
  273. package/lib/services/origin-ca-certificates.d.ts +99 -0
  274. package/lib/services/origin-ca-certificates.d.ts.map +1 -0
  275. package/lib/services/origin-ca-certificates.js +156 -0
  276. package/lib/services/origin-ca-certificates.js.map +1 -0
  277. package/lib/services/origin-post-quantum-encryption.d.ts +50 -0
  278. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -0
  279. package/lib/services/origin-post-quantum-encryption.js +60 -0
  280. package/lib/services/origin-post-quantum-encryption.js.map +1 -0
  281. package/lib/services/origin-tls-client-auth.d.ts +273 -0
  282. package/lib/services/origin-tls-client-auth.d.ts.map +1 -0
  283. package/lib/services/origin-tls-client-auth.js +401 -0
  284. package/lib/services/origin-tls-client-auth.js.map +1 -0
  285. package/lib/services/page-rules.d.ts +773 -0
  286. package/lib/services/page-rules.d.ts.map +1 -0
  287. package/lib/services/page-rules.js +1365 -0
  288. package/lib/services/page-rules.js.map +1 -0
  289. package/lib/services/page-shield.d.ts +426 -0
  290. package/lib/services/page-shield.d.ts.map +1 -0
  291. package/lib/services/page-shield.js +484 -0
  292. package/lib/services/page-shield.js.map +1 -0
  293. package/lib/services/pages.d.ts +1654 -0
  294. package/lib/services/pages.d.ts.map +1 -0
  295. package/lib/services/pages.js +2954 -0
  296. package/lib/services/pages.js.map +1 -0
  297. package/lib/services/pipelines.d.ts +1461 -0
  298. package/lib/services/pipelines.d.ts.map +1 -0
  299. package/lib/services/pipelines.js +2912 -0
  300. package/lib/services/pipelines.js.map +1 -0
  301. package/lib/services/queues.d.ts +807 -0
  302. package/lib/services/queues.d.ts.map +1 -0
  303. package/lib/services/queues.js +1194 -0
  304. package/lib/services/queues.js.map +1 -0
  305. package/lib/services/r2-data-catalog.d.ts +341 -0
  306. package/lib/services/r2-data-catalog.d.ts.map +1 -0
  307. package/lib/services/r2-data-catalog.js +499 -0
  308. package/lib/services/r2-data-catalog.js.map +1 -0
  309. package/lib/services/r2.d.ts +1041 -0
  310. package/lib/services/r2.d.ts.map +1 -0
  311. package/lib/services/r2.js +1384 -0
  312. package/lib/services/r2.js.map +1 -0
  313. package/lib/services/radar.d.ts +9276 -0
  314. package/lib/services/radar.d.ts.map +1 -0
  315. package/lib/services/radar.js +20491 -0
  316. package/lib/services/radar.js.map +1 -0
  317. package/lib/services/rate-limits.d.ts +315 -0
  318. package/lib/services/rate-limits.d.ts.map +1 -0
  319. package/lib/services/rate-limits.js +521 -0
  320. package/lib/services/rate-limits.js.map +1 -0
  321. package/lib/services/realtime-kit.d.ts +2728 -0
  322. package/lib/services/realtime-kit.d.ts.map +1 -0
  323. package/lib/services/realtime-kit.js +5401 -0
  324. package/lib/services/realtime-kit.js.map +1 -0
  325. package/lib/services/registrar.d.ts +81 -0
  326. package/lib/services/registrar.d.ts.map +1 -0
  327. package/lib/services/registrar.js +154 -0
  328. package/lib/services/registrar.js.map +1 -0
  329. package/lib/services/request-tracers.d.ts +61 -0
  330. package/lib/services/request-tracers.d.ts.map +1 -0
  331. package/lib/services/request-tracers.js +82 -0
  332. package/lib/services/request-tracers.js.map +1 -0
  333. package/lib/services/resource-sharing.d.ts +540 -0
  334. package/lib/services/resource-sharing.d.ts.map +1 -0
  335. package/lib/services/resource-sharing.js +846 -0
  336. package/lib/services/resource-sharing.js.map +1 -0
  337. package/lib/services/rules.d.ts +297 -0
  338. package/lib/services/rules.d.ts.map +1 -0
  339. package/lib/services/rules.js +396 -0
  340. package/lib/services/rules.js.map +1 -0
  341. package/lib/services/rulesets.d.ts +3300 -0
  342. package/lib/services/rulesets.d.ts.map +1 -0
  343. package/lib/services/rulesets.js +7852 -0
  344. package/lib/services/rulesets.js.map +1 -0
  345. package/lib/services/rum.d.ts +289 -0
  346. package/lib/services/rum.d.ts.map +1 -0
  347. package/lib/services/rum.js +409 -0
  348. package/lib/services/rum.js.map +1 -0
  349. package/lib/services/schema-validation.d.ts +240 -0
  350. package/lib/services/schema-validation.d.ts.map +1 -0
  351. package/lib/services/schema-validation.js +306 -0
  352. package/lib/services/schema-validation.js.map +1 -0
  353. package/lib/services/secrets-store.d.ts +321 -0
  354. package/lib/services/secrets-store.d.ts.map +1 -0
  355. package/lib/services/secrets-store.js +385 -0
  356. package/lib/services/secrets-store.js.map +1 -0
  357. package/lib/services/security-center.d.ts +102 -0
  358. package/lib/services/security-center.d.ts.map +1 -0
  359. package/lib/services/security-center.js +170 -0
  360. package/lib/services/security-center.js.map +1 -0
  361. package/lib/services/security-txt.d.ts +105 -0
  362. package/lib/services/security-txt.d.ts.map +1 -0
  363. package/lib/services/security-txt.js +136 -0
  364. package/lib/services/security-txt.js.map +1 -0
  365. package/lib/services/snippets.d.ts +138 -0
  366. package/lib/services/snippets.d.ts.map +1 -0
  367. package/lib/services/snippets.js +178 -0
  368. package/lib/services/snippets.js.map +1 -0
  369. package/lib/services/spectrum.d.ts +316 -0
  370. package/lib/services/spectrum.d.ts.map +1 -0
  371. package/lib/services/spectrum.js +510 -0
  372. package/lib/services/spectrum.js.map +1 -0
  373. package/lib/services/speed.d.ts +227 -0
  374. package/lib/services/speed.d.ts.map +1 -0
  375. package/lib/services/speed.js +444 -0
  376. package/lib/services/speed.js.map +1 -0
  377. package/lib/services/ssl.d.ts +370 -0
  378. package/lib/services/ssl.d.ts.map +1 -0
  379. package/lib/services/ssl.js +732 -0
  380. package/lib/services/ssl.js.map +1 -0
  381. package/lib/services/stream.d.ts +1014 -0
  382. package/lib/services/stream.d.ts.map +1 -0
  383. package/lib/services/stream.js +1049 -0
  384. package/lib/services/stream.js.map +1 -0
  385. package/lib/services/token-validation.d.ts +547 -0
  386. package/lib/services/token-validation.d.ts.map +1 -0
  387. package/lib/services/token-validation.js +768 -0
  388. package/lib/services/token-validation.js.map +1 -0
  389. package/lib/services/turnstile.d.ts +248 -0
  390. package/lib/services/turnstile.d.ts.map +1 -0
  391. package/lib/services/turnstile.js +308 -0
  392. package/lib/services/turnstile.js.map +1 -0
  393. package/lib/services/url-normalization.d.ts +53 -0
  394. package/lib/services/url-normalization.d.ts.map +1 -0
  395. package/lib/services/url-normalization.js +52 -0
  396. package/lib/services/url-normalization.js.map +1 -0
  397. package/lib/services/url-scanner.d.ts +612 -0
  398. package/lib/services/url-scanner.d.ts.map +1 -0
  399. package/lib/services/url-scanner.js +915 -0
  400. package/lib/services/url-scanner.js.map +1 -0
  401. package/lib/services/user.d.ts +441 -0
  402. package/lib/services/user.d.ts.map +1 -0
  403. package/lib/services/user.js +567 -0
  404. package/lib/services/user.js.map +1 -0
  405. package/lib/services/vectorize.d.ts +282 -0
  406. package/lib/services/vectorize.d.ts.map +1 -0
  407. package/lib/services/vectorize.js +340 -0
  408. package/lib/services/vectorize.js.map +1 -0
  409. package/lib/services/waiting-rooms.d.ts +1009 -0
  410. package/lib/services/waiting-rooms.d.ts.map +1 -0
  411. package/lib/services/waiting-rooms.js +1757 -0
  412. package/lib/services/waiting-rooms.js.map +1 -0
  413. package/lib/services/web3.d.ts +274 -0
  414. package/lib/services/web3.d.ts.map +1 -0
  415. package/lib/services/web3.js +362 -0
  416. package/lib/services/web3.js.map +1 -0
  417. package/lib/services/workers-for-platforms.d.ts +1224 -0
  418. package/lib/services/workers-for-platforms.d.ts.map +1 -0
  419. package/lib/services/workers-for-platforms.js +2078 -0
  420. package/lib/services/workers-for-platforms.js.map +1 -0
  421. package/lib/services/workers.d.ts +3498 -0
  422. package/lib/services/workers.d.ts.map +1 -0
  423. package/lib/services/workers.js +5967 -0
  424. package/lib/services/workers.js.map +1 -0
  425. package/lib/services/workflows.d.ts +359 -0
  426. package/lib/services/workflows.d.ts.map +1 -0
  427. package/lib/services/workflows.js +516 -0
  428. package/lib/services/workflows.js.map +1 -0
  429. package/lib/services/zaraz.d.ts +300 -0
  430. package/lib/services/zaraz.d.ts.map +1 -0
  431. package/lib/services/zaraz.js +298 -0
  432. package/lib/services/zaraz.js.map +1 -0
  433. package/lib/services/zero-trust.d.ts +15449 -0
  434. package/lib/services/zero-trust.d.ts.map +1 -0
  435. package/lib/services/zero-trust.js +29194 -0
  436. package/lib/services/zero-trust.js.map +1 -0
  437. package/lib/services/zones.d.ts +1278 -0
  438. package/lib/services/zones.d.ts.map +1 -0
  439. package/lib/services/zones.js +2416 -0
  440. package/lib/services/zones.js.map +1 -0
  441. package/lib/traits.d.ts +28 -0
  442. package/lib/traits.d.ts.map +1 -0
  443. package/lib/traits.js +26 -0
  444. package/lib/traits.js.map +1 -0
  445. package/package.json +67 -5
  446. package/src/auth.ts +14 -0
  447. package/src/category.ts +1 -0
  448. package/src/client/api.ts +269 -0
  449. package/src/client/index.ts +7 -0
  450. package/src/credentials.ts +30 -0
  451. package/src/errors.ts +65 -0
  452. package/src/index.ts +9 -0
  453. package/src/retry.ts +35 -0
  454. package/src/schemas.ts +51 -0
  455. package/src/services/abuse-reports.ts +747 -0
  456. package/src/services/accounts.ts +1947 -0
  457. package/src/services/acm.ts +170 -0
  458. package/src/services/addressing.ts +3947 -0
  459. package/src/services/ai-gateway.ts +3335 -0
  460. package/src/services/ai.ts +727 -0
  461. package/src/services/aisearch.ts +4750 -0
  462. package/src/services/alerting.ts +2947 -0
  463. package/src/services/api-gateway.ts +3391 -0
  464. package/src/services/argo.ts +254 -0
  465. package/src/services/audit-logs.ts +90 -0
  466. package/src/services/billing.ts +172 -0
  467. package/src/services/bot-management.ts +541 -0
  468. package/src/services/botnet-feed.ts +193 -0
  469. package/src/services/brand-protection.ts +553 -0
  470. package/src/services/browser-rendering.ts +2707 -0
  471. package/src/services/cache.ts +827 -0
  472. package/src/services/calls.ts +483 -0
  473. package/src/services/certificate-authorities.ts +110 -0
  474. package/src/services/client-certificates.ts +718 -0
  475. package/src/services/cloud-connector.ts +181 -0
  476. package/src/services/cloudforce-one.ts +3876 -0
  477. package/src/services/connectivity.ts +629 -0
  478. package/src/services/content-scanning.ts +385 -0
  479. package/src/services/custom-certificates.ts +611 -0
  480. package/src/services/custom-hostnames.ts +2453 -0
  481. package/src/services/custom-nameservers.ts +182 -0
  482. package/src/services/custom-pages.ts +264 -0
  483. package/src/services/d1.ts +1034 -0
  484. package/src/services/dcv-delegation.ts +52 -0
  485. package/src/services/diagnostics.ts +603 -0
  486. package/src/services/dns-firewall.ts +823 -0
  487. package/src/services/dns.ts +8897 -0
  488. package/src/services/durable-objects.ts +148 -0
  489. package/src/services/email-routing.ts +1602 -0
  490. package/src/services/email-security.ts +4283 -0
  491. package/src/services/filters.ts +370 -0
  492. package/src/services/firewall.ts +3896 -0
  493. package/src/services/healthchecks.ts +1750 -0
  494. package/src/services/hostnames.ts +218 -0
  495. package/src/services/hyperdrive.ts +592 -0
  496. package/src/services/iam.ts +1668 -0
  497. package/src/services/images.ts +1086 -0
  498. package/src/services/intel.ts +2768 -0
  499. package/src/services/ips.ts +88 -0
  500. package/src/services/keyless-certificates.ts +462 -0
  501. package/src/services/kv.ts +1011 -0
  502. package/src/services/leaked-credential-checks.ts +325 -0
  503. package/src/services/load-balancers.ts +6438 -0
  504. package/src/services/logpush.ts +1667 -0
  505. package/src/services/logs.ts +375 -0
  506. package/src/services/magic-cloud-networking.ts +10020 -0
  507. package/src/services/magic-network-monitoring.ts +1156 -0
  508. package/src/services/magic-transit.ts +13050 -0
  509. package/src/services/managed-transforms.ts +237 -0
  510. package/src/services/memberships.ts +615 -0
  511. package/src/services/mtls-certificates.ts +374 -0
  512. package/src/services/network-interconnects.ts +1253 -0
  513. package/src/services/organizations.ts +674 -0
  514. package/src/services/origin-ca-certificates.ts +303 -0
  515. package/src/services/origin-post-quantum-encryption.ts +128 -0
  516. package/src/services/origin-tls-client-auth.ts +878 -0
  517. package/src/services/page-rules.ts +2612 -0
  518. package/src/services/page-shield.ts +1195 -0
  519. package/src/services/pages.ts +5709 -0
  520. package/src/services/pipelines.ts +6000 -0
  521. package/src/services/queues.ts +2629 -0
  522. package/src/services/r2-data-catalog.ts +1119 -0
  523. package/src/services/r2.ts +3348 -0
  524. package/src/services/radar.ts +42152 -0
  525. package/src/services/rate-limits.ts +1150 -0
  526. package/src/services/realtime-kit.ts +11079 -0
  527. package/src/services/registrar.ts +295 -0
  528. package/src/services/request-tracers.ts +158 -0
  529. package/src/services/resource-sharing.ts +1832 -0
  530. package/src/services/rules.ts +837 -0
  531. package/src/services/rulesets.ts +15144 -0
  532. package/src/services/rum.ts +901 -0
  533. package/src/services/schema-validation.ts +733 -0
  534. package/src/services/secrets-store.ts +860 -0
  535. package/src/services/security-center.ts +397 -0
  536. package/src/services/security-txt.ts +315 -0
  537. package/src/services/snippets.ts +420 -0
  538. package/src/services/spectrum.ts +1103 -0
  539. package/src/services/speed.ts +1056 -0
  540. package/src/services/ssl.ts +1587 -0
  541. package/src/services/stream.ts +2756 -0
  542. package/src/services/token-validation.ts +1585 -0
  543. package/src/services/turnstile.ts +643 -0
  544. package/src/services/url-normalization.ts +129 -0
  545. package/src/services/url-scanner.ts +1851 -0
  546. package/src/services/user.ts +1384 -0
  547. package/src/services/vectorize.ts +816 -0
  548. package/src/services/waiting-rooms.ts +3807 -0
  549. package/src/services/web3.ts +834 -0
  550. package/src/services/workers-for-platforms.ts +3859 -0
  551. package/src/services/workers.ts +11637 -0
  552. package/src/services/workflows.ts +1124 -0
  553. package/src/services/zaraz.ts +797 -0
  554. package/src/services/zero-trust.ts +58933 -0
  555. package/src/services/zones.ts +4875 -0
  556. package/src/traits.ts +47 -0
  557. package/README.md +0 -15
  558. package/bun.lock +0 -26
  559. package/index.ts +0 -1
  560. package/tsconfig.json +0 -29
@@ -0,0 +1,1585 @@
1
+ /**
2
+ * Cloudflare TOKEN-VALIDATION API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service token-validation
6
+ */
7
+
8
+ import * as Schema from "effect/Schema";
9
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
10
+ import * as API from "../client/api.ts";
11
+ import * as T from "../traits";
12
+ import type { Credentials } from "../credentials";
13
+ import { type DefaultErrors } from "../errors";
14
+
15
+ // =============================================================================
16
+ // Configuration
17
+ // =============================================================================
18
+
19
+ export interface GetConfigurationRequest {
20
+ configId: string;
21
+ /** Identifier. */
22
+ zoneId: string;
23
+ }
24
+
25
+ export const GetConfigurationRequest =
26
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
27
+ configId: Schema.String.pipe(T.HttpPath("configId")),
28
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
29
+ }).pipe(
30
+ T.Http({
31
+ method: "GET",
32
+ path: "/zones/{zone_id}/token_validation/config/{configId}",
33
+ }),
34
+ ) as unknown as Schema.Schema<GetConfigurationRequest>;
35
+
36
+ export interface GetConfigurationResponse {
37
+ /** UUID. */
38
+ id: string;
39
+ createdAt: string;
40
+ credentials: {
41
+ keys: (
42
+ | {
43
+ alg: "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512";
44
+ e: string;
45
+ kid: string;
46
+ kty: "RSA";
47
+ n: string;
48
+ }
49
+ | {
50
+ alg: "ES256";
51
+ crv: "P-256";
52
+ kid: string;
53
+ kty: "EC";
54
+ x: string;
55
+ y: string;
56
+ }
57
+ | {
58
+ alg: "ES384";
59
+ crv: "P-384";
60
+ kid: string;
61
+ kty: "EC";
62
+ x: string;
63
+ y: string;
64
+ }
65
+ )[];
66
+ };
67
+ description: string;
68
+ lastUpdated: string;
69
+ title: string;
70
+ tokenSources: string[];
71
+ tokenType: "JWT";
72
+ }
73
+
74
+ export const GetConfigurationResponse =
75
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
76
+ id: Schema.String,
77
+ createdAt: Schema.String,
78
+ credentials: Schema.Struct({
79
+ keys: Schema.Array(
80
+ Schema.Union([
81
+ Schema.Struct({
82
+ alg: Schema.Literals([
83
+ "RS256",
84
+ "RS384",
85
+ "RS512",
86
+ "PS256",
87
+ "PS384",
88
+ "PS512",
89
+ ]),
90
+ e: Schema.String,
91
+ kid: Schema.String,
92
+ kty: Schema.Literal("RSA"),
93
+ n: Schema.String,
94
+ }),
95
+ Schema.Struct({
96
+ alg: Schema.Literal("ES256"),
97
+ crv: Schema.Literal("P-256"),
98
+ kid: Schema.String,
99
+ kty: Schema.Literal("EC"),
100
+ x: Schema.String,
101
+ y: Schema.String,
102
+ }),
103
+ Schema.Struct({
104
+ alg: Schema.Literal("ES384"),
105
+ crv: Schema.Literal("P-384"),
106
+ kid: Schema.String,
107
+ kty: Schema.Literal("EC"),
108
+ x: Schema.String,
109
+ y: Schema.String,
110
+ }),
111
+ ]),
112
+ ),
113
+ }),
114
+ description: Schema.String,
115
+ lastUpdated: Schema.String,
116
+ title: Schema.String,
117
+ tokenSources: Schema.Array(Schema.String),
118
+ tokenType: Schema.Literal("JWT"),
119
+ }).pipe(
120
+ Schema.encodeKeys({
121
+ id: "id",
122
+ createdAt: "created_at",
123
+ credentials: "credentials",
124
+ description: "description",
125
+ lastUpdated: "last_updated",
126
+ title: "title",
127
+ tokenSources: "token_sources",
128
+ tokenType: "token_type",
129
+ }),
130
+ ) as unknown as Schema.Schema<GetConfigurationResponse>;
131
+
132
+ export type GetConfigurationError = DefaultErrors;
133
+
134
+ export const getConfiguration: API.OperationMethod<
135
+ GetConfigurationRequest,
136
+ GetConfigurationResponse,
137
+ GetConfigurationError,
138
+ Credentials | HttpClient.HttpClient
139
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
140
+ input: GetConfigurationRequest,
141
+ output: GetConfigurationResponse,
142
+ errors: [],
143
+ }));
144
+
145
+ export interface ListConfigurationsRequest {
146
+ /** Path param: Identifier. */
147
+ zoneId: string;
148
+ }
149
+
150
+ export const ListConfigurationsRequest =
151
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
152
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
153
+ }).pipe(
154
+ T.Http({ method: "GET", path: "/zones/{zone_id}/token_validation/config" }),
155
+ ) as unknown as Schema.Schema<ListConfigurationsRequest>;
156
+
157
+ export type ListConfigurationsResponse = {
158
+ id: string;
159
+ createdAt: string;
160
+ credentials: {
161
+ keys: (
162
+ | {
163
+ alg: "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512";
164
+ e: string;
165
+ kid: string;
166
+ kty: "RSA";
167
+ n: string;
168
+ }
169
+ | {
170
+ alg: "ES256";
171
+ crv: "P-256";
172
+ kid: string;
173
+ kty: "EC";
174
+ x: string;
175
+ y: string;
176
+ }
177
+ | {
178
+ alg: "ES384";
179
+ crv: "P-384";
180
+ kid: string;
181
+ kty: "EC";
182
+ x: string;
183
+ y: string;
184
+ }
185
+ )[];
186
+ };
187
+ description: string;
188
+ lastUpdated: string;
189
+ title: string;
190
+ tokenSources: string[];
191
+ tokenType: "JWT";
192
+ }[];
193
+
194
+ export const ListConfigurationsResponse =
195
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
196
+ Schema.Struct({
197
+ id: Schema.String,
198
+ createdAt: Schema.String,
199
+ credentials: Schema.Struct({
200
+ keys: Schema.Array(
201
+ Schema.Union([
202
+ Schema.Struct({
203
+ alg: Schema.Literals([
204
+ "RS256",
205
+ "RS384",
206
+ "RS512",
207
+ "PS256",
208
+ "PS384",
209
+ "PS512",
210
+ ]),
211
+ e: Schema.String,
212
+ kid: Schema.String,
213
+ kty: Schema.Literal("RSA"),
214
+ n: Schema.String,
215
+ }),
216
+ Schema.Struct({
217
+ alg: Schema.Literal("ES256"),
218
+ crv: Schema.Literal("P-256"),
219
+ kid: Schema.String,
220
+ kty: Schema.Literal("EC"),
221
+ x: Schema.String,
222
+ y: Schema.String,
223
+ }),
224
+ Schema.Struct({
225
+ alg: Schema.Literal("ES384"),
226
+ crv: Schema.Literal("P-384"),
227
+ kid: Schema.String,
228
+ kty: Schema.Literal("EC"),
229
+ x: Schema.String,
230
+ y: Schema.String,
231
+ }),
232
+ ]),
233
+ ),
234
+ }),
235
+ description: Schema.String,
236
+ lastUpdated: Schema.String,
237
+ title: Schema.String,
238
+ tokenSources: Schema.Array(Schema.String),
239
+ tokenType: Schema.Literal("JWT"),
240
+ }).pipe(
241
+ Schema.encodeKeys({
242
+ id: "id",
243
+ createdAt: "created_at",
244
+ credentials: "credentials",
245
+ description: "description",
246
+ lastUpdated: "last_updated",
247
+ title: "title",
248
+ tokenSources: "token_sources",
249
+ tokenType: "token_type",
250
+ }),
251
+ ),
252
+ ) as unknown as Schema.Schema<ListConfigurationsResponse>;
253
+
254
+ export type ListConfigurationsError = DefaultErrors;
255
+
256
+ export const listConfigurations: API.OperationMethod<
257
+ ListConfigurationsRequest,
258
+ ListConfigurationsResponse,
259
+ ListConfigurationsError,
260
+ Credentials | HttpClient.HttpClient
261
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
262
+ input: ListConfigurationsRequest,
263
+ output: ListConfigurationsResponse,
264
+ errors: [],
265
+ }));
266
+
267
+ export interface CreateConfigurationRequest {
268
+ /** Path param: Identifier. */
269
+ zoneId: string;
270
+ /** Body param: */
271
+ credentials: {
272
+ keys: (
273
+ | {
274
+ alg: "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512";
275
+ e: string;
276
+ kid: string;
277
+ kty: "RSA";
278
+ n: string;
279
+ }
280
+ | {
281
+ alg: "ES256";
282
+ crv: "P-256";
283
+ kid: string;
284
+ kty: "EC";
285
+ x: string;
286
+ y: string;
287
+ }
288
+ | {
289
+ alg: "ES384";
290
+ crv: "P-384";
291
+ kid: string;
292
+ kty: "EC";
293
+ x: string;
294
+ y: string;
295
+ }
296
+ )[];
297
+ };
298
+ /** Body param: */
299
+ description: string;
300
+ /** Body param: */
301
+ title: string;
302
+ /** Body param: */
303
+ tokenSources: string[];
304
+ /** Body param: */
305
+ tokenType: "JWT";
306
+ }
307
+
308
+ export const CreateConfigurationRequest =
309
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
310
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
311
+ credentials: Schema.Struct({
312
+ keys: Schema.Array(
313
+ Schema.Union([
314
+ Schema.Struct({
315
+ alg: Schema.Literals([
316
+ "RS256",
317
+ "RS384",
318
+ "RS512",
319
+ "PS256",
320
+ "PS384",
321
+ "PS512",
322
+ ]),
323
+ e: Schema.String,
324
+ kid: Schema.String,
325
+ kty: Schema.Literal("RSA"),
326
+ n: Schema.String,
327
+ }),
328
+ Schema.Struct({
329
+ alg: Schema.Literal("ES256"),
330
+ crv: Schema.Literal("P-256"),
331
+ kid: Schema.String,
332
+ kty: Schema.Literal("EC"),
333
+ x: Schema.String,
334
+ y: Schema.String,
335
+ }),
336
+ Schema.Struct({
337
+ alg: Schema.Literal("ES384"),
338
+ crv: Schema.Literal("P-384"),
339
+ kid: Schema.String,
340
+ kty: Schema.Literal("EC"),
341
+ x: Schema.String,
342
+ y: Schema.String,
343
+ }),
344
+ ]),
345
+ ),
346
+ }),
347
+ description: Schema.String,
348
+ title: Schema.String,
349
+ tokenSources: Schema.Array(Schema.String),
350
+ tokenType: Schema.Literal("JWT"),
351
+ }).pipe(
352
+ Schema.encodeKeys({
353
+ credentials: "credentials",
354
+ description: "description",
355
+ title: "title",
356
+ tokenSources: "token_sources",
357
+ tokenType: "token_type",
358
+ }),
359
+ T.Http({
360
+ method: "POST",
361
+ path: "/zones/{zone_id}/token_validation/config",
362
+ }),
363
+ ) as unknown as Schema.Schema<CreateConfigurationRequest>;
364
+
365
+ export interface CreateConfigurationResponse {
366
+ /** UUID. */
367
+ id: string;
368
+ createdAt: string;
369
+ credentials: {
370
+ keys: (
371
+ | {
372
+ alg: "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512";
373
+ e: string;
374
+ kid: string;
375
+ kty: "RSA";
376
+ n: string;
377
+ }
378
+ | {
379
+ alg: "ES256";
380
+ crv: "P-256";
381
+ kid: string;
382
+ kty: "EC";
383
+ x: string;
384
+ y: string;
385
+ }
386
+ | {
387
+ alg: "ES384";
388
+ crv: "P-384";
389
+ kid: string;
390
+ kty: "EC";
391
+ x: string;
392
+ y: string;
393
+ }
394
+ )[];
395
+ };
396
+ description: string;
397
+ lastUpdated: string;
398
+ title: string;
399
+ tokenSources: string[];
400
+ tokenType: "JWT";
401
+ }
402
+
403
+ export const CreateConfigurationResponse =
404
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
405
+ id: Schema.String,
406
+ createdAt: Schema.String,
407
+ credentials: Schema.Struct({
408
+ keys: Schema.Array(
409
+ Schema.Union([
410
+ Schema.Struct({
411
+ alg: Schema.Literals([
412
+ "RS256",
413
+ "RS384",
414
+ "RS512",
415
+ "PS256",
416
+ "PS384",
417
+ "PS512",
418
+ ]),
419
+ e: Schema.String,
420
+ kid: Schema.String,
421
+ kty: Schema.Literal("RSA"),
422
+ n: Schema.String,
423
+ }),
424
+ Schema.Struct({
425
+ alg: Schema.Literal("ES256"),
426
+ crv: Schema.Literal("P-256"),
427
+ kid: Schema.String,
428
+ kty: Schema.Literal("EC"),
429
+ x: Schema.String,
430
+ y: Schema.String,
431
+ }),
432
+ Schema.Struct({
433
+ alg: Schema.Literal("ES384"),
434
+ crv: Schema.Literal("P-384"),
435
+ kid: Schema.String,
436
+ kty: Schema.Literal("EC"),
437
+ x: Schema.String,
438
+ y: Schema.String,
439
+ }),
440
+ ]),
441
+ ),
442
+ }),
443
+ description: Schema.String,
444
+ lastUpdated: Schema.String,
445
+ title: Schema.String,
446
+ tokenSources: Schema.Array(Schema.String),
447
+ tokenType: Schema.Literal("JWT"),
448
+ }).pipe(
449
+ Schema.encodeKeys({
450
+ id: "id",
451
+ createdAt: "created_at",
452
+ credentials: "credentials",
453
+ description: "description",
454
+ lastUpdated: "last_updated",
455
+ title: "title",
456
+ tokenSources: "token_sources",
457
+ tokenType: "token_type",
458
+ }),
459
+ ) as unknown as Schema.Schema<CreateConfigurationResponse>;
460
+
461
+ export type CreateConfigurationError = DefaultErrors;
462
+
463
+ export const createConfiguration: API.OperationMethod<
464
+ CreateConfigurationRequest,
465
+ CreateConfigurationResponse,
466
+ CreateConfigurationError,
467
+ Credentials | HttpClient.HttpClient
468
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
469
+ input: CreateConfigurationRequest,
470
+ output: CreateConfigurationResponse,
471
+ errors: [],
472
+ }));
473
+
474
+ export interface PatchConfigurationRequest {
475
+ configId: string;
476
+ /** Path param: Identifier. */
477
+ zoneId: string;
478
+ /** Body param: */
479
+ description?: string;
480
+ /** Body param: */
481
+ title?: string;
482
+ /** Body param: */
483
+ tokenSources?: string[];
484
+ }
485
+
486
+ export const PatchConfigurationRequest =
487
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
488
+ configId: Schema.String.pipe(T.HttpPath("configId")),
489
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
490
+ description: Schema.optional(Schema.String),
491
+ title: Schema.optional(Schema.String),
492
+ tokenSources: Schema.optional(Schema.Array(Schema.String)),
493
+ }).pipe(
494
+ Schema.encodeKeys({
495
+ description: "description",
496
+ title: "title",
497
+ tokenSources: "token_sources",
498
+ }),
499
+ T.Http({
500
+ method: "PATCH",
501
+ path: "/zones/{zone_id}/token_validation/config/{configId}",
502
+ }),
503
+ ) as unknown as Schema.Schema<PatchConfigurationRequest>;
504
+
505
+ export interface PatchConfigurationResponse {
506
+ description?: string | null;
507
+ title?: string | null;
508
+ tokenSources?: string[] | null;
509
+ }
510
+
511
+ export const PatchConfigurationResponse =
512
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
513
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
514
+ title: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
515
+ tokenSources: Schema.optional(
516
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
517
+ ),
518
+ }).pipe(
519
+ Schema.encodeKeys({
520
+ description: "description",
521
+ title: "title",
522
+ tokenSources: "token_sources",
523
+ }),
524
+ ) as unknown as Schema.Schema<PatchConfigurationResponse>;
525
+
526
+ export type PatchConfigurationError = DefaultErrors;
527
+
528
+ export const patchConfiguration: API.OperationMethod<
529
+ PatchConfigurationRequest,
530
+ PatchConfigurationResponse,
531
+ PatchConfigurationError,
532
+ Credentials | HttpClient.HttpClient
533
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
534
+ input: PatchConfigurationRequest,
535
+ output: PatchConfigurationResponse,
536
+ errors: [],
537
+ }));
538
+
539
+ export interface DeleteConfigurationRequest {
540
+ configId: string;
541
+ /** Identifier. */
542
+ zoneId: string;
543
+ }
544
+
545
+ export const DeleteConfigurationRequest =
546
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
547
+ configId: Schema.String.pipe(T.HttpPath("configId")),
548
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
549
+ }).pipe(
550
+ T.Http({
551
+ method: "DELETE",
552
+ path: "/zones/{zone_id}/token_validation/config/{configId}",
553
+ }),
554
+ ) as unknown as Schema.Schema<DeleteConfigurationRequest>;
555
+
556
+ export interface DeleteConfigurationResponse {
557
+ /** UUID. */
558
+ id?: string | null;
559
+ }
560
+
561
+ export const DeleteConfigurationResponse =
562
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
563
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
564
+ }) as unknown as Schema.Schema<DeleteConfigurationResponse>;
565
+
566
+ export type DeleteConfigurationError = DefaultErrors;
567
+
568
+ export const deleteConfiguration: API.OperationMethod<
569
+ DeleteConfigurationRequest,
570
+ DeleteConfigurationResponse,
571
+ DeleteConfigurationError,
572
+ Credentials | HttpClient.HttpClient
573
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
574
+ input: DeleteConfigurationRequest,
575
+ output: DeleteConfigurationResponse,
576
+ errors: [],
577
+ }));
578
+
579
+ // =============================================================================
580
+ // ConfigurationCredential
581
+ // =============================================================================
582
+
583
+ export interface PutConfigurationCredentialRequest {
584
+ configId: string;
585
+ /** Path param: Identifier. */
586
+ zoneId: string;
587
+ /** Body param: */
588
+ keys: (
589
+ | {
590
+ alg: "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512";
591
+ e: string;
592
+ kid: string;
593
+ kty: "RSA";
594
+ n: string;
595
+ }
596
+ | {
597
+ alg: "ES256";
598
+ crv: "P-256";
599
+ kid: string;
600
+ kty: "EC";
601
+ x: string;
602
+ y: string;
603
+ }
604
+ | {
605
+ alg: "ES384";
606
+ crv: "P-384";
607
+ kid: string;
608
+ kty: "EC";
609
+ x: string;
610
+ y: string;
611
+ }
612
+ )[];
613
+ }
614
+
615
+ export const PutConfigurationCredentialRequest =
616
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
617
+ configId: Schema.String.pipe(T.HttpPath("configId")),
618
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
619
+ keys: Schema.Array(
620
+ Schema.Union([
621
+ Schema.Struct({
622
+ alg: Schema.Literals([
623
+ "RS256",
624
+ "RS384",
625
+ "RS512",
626
+ "PS256",
627
+ "PS384",
628
+ "PS512",
629
+ ]),
630
+ e: Schema.String,
631
+ kid: Schema.String,
632
+ kty: Schema.Literal("RSA"),
633
+ n: Schema.String,
634
+ }),
635
+ Schema.Struct({
636
+ alg: Schema.Literal("ES256"),
637
+ crv: Schema.Literal("P-256"),
638
+ kid: Schema.String,
639
+ kty: Schema.Literal("EC"),
640
+ x: Schema.String,
641
+ y: Schema.String,
642
+ }),
643
+ Schema.Struct({
644
+ alg: Schema.Literal("ES384"),
645
+ crv: Schema.Literal("P-384"),
646
+ kid: Schema.String,
647
+ kty: Schema.Literal("EC"),
648
+ x: Schema.String,
649
+ y: Schema.String,
650
+ }),
651
+ ]),
652
+ ),
653
+ }).pipe(
654
+ T.Http({
655
+ method: "PUT",
656
+ path: "/zones/{zone_id}/token_validation/config/{configId}/credentials",
657
+ }),
658
+ ) as unknown as Schema.Schema<PutConfigurationCredentialRequest>;
659
+
660
+ export interface PutConfigurationCredentialResponse {
661
+ errors: unknown;
662
+ keys: (
663
+ | {
664
+ alg: "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512";
665
+ e: string;
666
+ kid: string;
667
+ kty: "RSA";
668
+ n: string;
669
+ }
670
+ | {
671
+ alg: "ES256";
672
+ crv: "P-256";
673
+ kid: string;
674
+ kty: "EC";
675
+ x: string;
676
+ y: string;
677
+ }
678
+ | {
679
+ alg: "ES384";
680
+ crv: "P-384";
681
+ kid: string;
682
+ kty: "EC";
683
+ x: string;
684
+ y: string;
685
+ }
686
+ )[];
687
+ messages: unknown;
688
+ /** Whether the API call was successful. */
689
+ success: true;
690
+ }
691
+
692
+ export const PutConfigurationCredentialResponse =
693
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
694
+ errors: Schema.Unknown,
695
+ keys: Schema.Array(
696
+ Schema.Union([
697
+ Schema.Struct({
698
+ alg: Schema.Literals([
699
+ "RS256",
700
+ "RS384",
701
+ "RS512",
702
+ "PS256",
703
+ "PS384",
704
+ "PS512",
705
+ ]),
706
+ e: Schema.String,
707
+ kid: Schema.String,
708
+ kty: Schema.Literal("RSA"),
709
+ n: Schema.String,
710
+ }),
711
+ Schema.Struct({
712
+ alg: Schema.Literal("ES256"),
713
+ crv: Schema.Literal("P-256"),
714
+ kid: Schema.String,
715
+ kty: Schema.Literal("EC"),
716
+ x: Schema.String,
717
+ y: Schema.String,
718
+ }),
719
+ Schema.Struct({
720
+ alg: Schema.Literal("ES384"),
721
+ crv: Schema.Literal("P-384"),
722
+ kid: Schema.String,
723
+ kty: Schema.Literal("EC"),
724
+ x: Schema.String,
725
+ y: Schema.String,
726
+ }),
727
+ ]),
728
+ ),
729
+ messages: Schema.Unknown,
730
+ success: Schema.Literal(true),
731
+ }) as unknown as Schema.Schema<PutConfigurationCredentialResponse>;
732
+
733
+ export type PutConfigurationCredentialError = DefaultErrors;
734
+
735
+ export const putConfigurationCredential: API.OperationMethod<
736
+ PutConfigurationCredentialRequest,
737
+ PutConfigurationCredentialResponse,
738
+ PutConfigurationCredentialError,
739
+ Credentials | HttpClient.HttpClient
740
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
741
+ input: PutConfigurationCredentialRequest,
742
+ output: PutConfigurationCredentialResponse,
743
+ errors: [],
744
+ }));
745
+
746
+ // =============================================================================
747
+ // Rule
748
+ // =============================================================================
749
+
750
+ export interface GetRuleRequest {
751
+ ruleId: string;
752
+ /** Identifier. */
753
+ zoneId: string;
754
+ }
755
+
756
+ export const GetRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
757
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
758
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
759
+ }).pipe(
760
+ T.Http({
761
+ method: "GET",
762
+ path: "/zones/{zone_id}/token_validation/rules/{ruleId}",
763
+ }),
764
+ ) as unknown as Schema.Schema<GetRuleRequest>;
765
+
766
+ export interface GetRuleResponse {
767
+ /** Action to take on requests that match operations included in `selector` and fail `expression`. */
768
+ action: "log" | "block";
769
+ /** A human-readable description that gives more details than `title`. */
770
+ description: string;
771
+ /** Toggle rule on or off. */
772
+ enabled: boolean;
773
+ /** Rule expression. Requests that fail to match this expression will be subject to `action`. For details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/j */
774
+ expression: string;
775
+ /** Select operations covered by this rule. For details on selectors, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/). */
776
+ selector: {
777
+ exclude?: { operationIds?: string[] | null }[] | null;
778
+ include?: { host?: string[] | null }[] | null;
779
+ };
780
+ /** A human-readable name for the rule. */
781
+ title: string;
782
+ /** UUID. */
783
+ id?: string | null;
784
+ createdAt?: string | null;
785
+ lastUpdated?: string | null;
786
+ }
787
+
788
+ export const GetRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
789
+ action: Schema.Literals(["log", "block"]),
790
+ description: Schema.String,
791
+ enabled: Schema.Boolean,
792
+ expression: Schema.String,
793
+ selector: Schema.Struct({
794
+ exclude: Schema.optional(
795
+ Schema.Union([
796
+ Schema.Array(
797
+ Schema.Struct({
798
+ operationIds: Schema.optional(
799
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
800
+ ),
801
+ }).pipe(Schema.encodeKeys({ operationIds: "operation_ids" })),
802
+ ),
803
+ Schema.Null,
804
+ ]),
805
+ ),
806
+ include: Schema.optional(
807
+ Schema.Union([
808
+ Schema.Array(
809
+ Schema.Struct({
810
+ host: Schema.optional(
811
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
812
+ ),
813
+ }),
814
+ ),
815
+ Schema.Null,
816
+ ]),
817
+ ),
818
+ }),
819
+ title: Schema.String,
820
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
821
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
822
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
823
+ }).pipe(
824
+ Schema.encodeKeys({
825
+ action: "action",
826
+ description: "description",
827
+ enabled: "enabled",
828
+ expression: "expression",
829
+ selector: "selector",
830
+ title: "title",
831
+ id: "id",
832
+ createdAt: "created_at",
833
+ lastUpdated: "last_updated",
834
+ }),
835
+ ) as unknown as Schema.Schema<GetRuleResponse>;
836
+
837
+ export type GetRuleError = DefaultErrors;
838
+
839
+ export const getRule: API.OperationMethod<
840
+ GetRuleRequest,
841
+ GetRuleResponse,
842
+ GetRuleError,
843
+ Credentials | HttpClient.HttpClient
844
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
845
+ input: GetRuleRequest,
846
+ output: GetRuleResponse,
847
+ errors: [],
848
+ }));
849
+
850
+ export interface ListRulesRequest {
851
+ /** Path param: Identifier. */
852
+ zoneId: string;
853
+ /** Query param: Select rules with these IDs. */
854
+ id?: string;
855
+ /** Query param: Action to take on requests that match operations included in `selector` and fail `expression`. */
856
+ action?: "log" | "block";
857
+ /** Query param: Toggle rule on or off. */
858
+ enabled?: boolean;
859
+ /** Query param: Select rules with this host in `include`. */
860
+ host?: string;
861
+ /** Query param: Select rules with this host in `include`. */
862
+ hostname?: string;
863
+ /** Query param: Select rules with these IDs. */
864
+ ruleId?: string;
865
+ /** Query param: Select rules using any of these token configurations. */
866
+ tokenConfiguration?: string[];
867
+ }
868
+
869
+ export const ListRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
870
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
871
+ id: Schema.optional(Schema.String).pipe(T.HttpQuery("id")),
872
+ action: Schema.optional(Schema.Literals(["log", "block"])).pipe(
873
+ T.HttpQuery("action"),
874
+ ),
875
+ enabled: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("enabled")),
876
+ host: Schema.optional(Schema.String).pipe(T.HttpQuery("host")),
877
+ hostname: Schema.optional(Schema.String).pipe(T.HttpQuery("hostname")),
878
+ ruleId: Schema.optional(Schema.String).pipe(T.HttpQuery("rule_id")),
879
+ tokenConfiguration: Schema.optional(Schema.Array(Schema.String)).pipe(
880
+ T.HttpQuery("token_configuration"),
881
+ ),
882
+ }).pipe(
883
+ T.Http({ method: "GET", path: "/zones/{zone_id}/token_validation/rules" }),
884
+ ) as unknown as Schema.Schema<ListRulesRequest>;
885
+
886
+ export type ListRulesResponse = {
887
+ action: "log" | "block";
888
+ description: string;
889
+ enabled: boolean;
890
+ expression: string;
891
+ selector: {
892
+ exclude?: { operationIds?: string[] | null }[] | null;
893
+ include?: { host?: string[] | null }[] | null;
894
+ };
895
+ title: string;
896
+ id?: string | null;
897
+ createdAt?: string | null;
898
+ lastUpdated?: string | null;
899
+ }[];
900
+
901
+ export const ListRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
902
+ Schema.Struct({
903
+ action: Schema.Literals(["log", "block"]),
904
+ description: Schema.String,
905
+ enabled: Schema.Boolean,
906
+ expression: Schema.String,
907
+ selector: Schema.Struct({
908
+ exclude: Schema.optional(
909
+ Schema.Union([
910
+ Schema.Array(
911
+ Schema.Struct({
912
+ operationIds: Schema.optional(
913
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
914
+ ),
915
+ }).pipe(Schema.encodeKeys({ operationIds: "operation_ids" })),
916
+ ),
917
+ Schema.Null,
918
+ ]),
919
+ ),
920
+ include: Schema.optional(
921
+ Schema.Union([
922
+ Schema.Array(
923
+ Schema.Struct({
924
+ host: Schema.optional(
925
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
926
+ ),
927
+ }),
928
+ ),
929
+ Schema.Null,
930
+ ]),
931
+ ),
932
+ }),
933
+ title: Schema.String,
934
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
935
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
936
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
937
+ }).pipe(
938
+ Schema.encodeKeys({
939
+ action: "action",
940
+ description: "description",
941
+ enabled: "enabled",
942
+ expression: "expression",
943
+ selector: "selector",
944
+ title: "title",
945
+ id: "id",
946
+ createdAt: "created_at",
947
+ lastUpdated: "last_updated",
948
+ }),
949
+ ),
950
+ ) as unknown as Schema.Schema<ListRulesResponse>;
951
+
952
+ export type ListRulesError = DefaultErrors;
953
+
954
+ export const listRules: API.OperationMethod<
955
+ ListRulesRequest,
956
+ ListRulesResponse,
957
+ ListRulesError,
958
+ Credentials | HttpClient.HttpClient
959
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
960
+ input: ListRulesRequest,
961
+ output: ListRulesResponse,
962
+ errors: [],
963
+ }));
964
+
965
+ export interface CreateRuleRequest {
966
+ /** Path param: Identifier. */
967
+ zoneId: string;
968
+ /** Body param: Action to take on requests that match operations included in `selector` and fail `expression`. */
969
+ action: "log" | "block";
970
+ /** Body param: A human-readable description that gives more details than `title`. */
971
+ description: string;
972
+ /** Body param: Toggle rule on or off. */
973
+ enabled: boolean;
974
+ /** Body param: Rule expression. Requests that fail to match this expression will be subject to `action`. For details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shiel */
975
+ expression: string;
976
+ /** Body param: Select operations covered by this rule. For details on selectors, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/). */
977
+ selector: {
978
+ exclude?: { operationIds?: string[] }[] | null;
979
+ include?: { host?: string[] }[] | null;
980
+ };
981
+ /** Body param: A human-readable name for the rule. */
982
+ title: string;
983
+ }
984
+
985
+ export const CreateRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
986
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
987
+ action: Schema.Literals(["log", "block"]),
988
+ description: Schema.String,
989
+ enabled: Schema.Boolean,
990
+ expression: Schema.String,
991
+ selector: Schema.Struct({
992
+ exclude: Schema.optional(
993
+ Schema.Union([
994
+ Schema.Array(
995
+ Schema.Struct({
996
+ operationIds: Schema.optional(Schema.Array(Schema.String)),
997
+ }).pipe(Schema.encodeKeys({ operationIds: "operation_ids" })),
998
+ ),
999
+ Schema.Null,
1000
+ ]),
1001
+ ),
1002
+ include: Schema.optional(
1003
+ Schema.Union([
1004
+ Schema.Array(
1005
+ Schema.Struct({
1006
+ host: Schema.optional(Schema.Array(Schema.String)),
1007
+ }),
1008
+ ),
1009
+ Schema.Null,
1010
+ ]),
1011
+ ),
1012
+ }),
1013
+ title: Schema.String,
1014
+ }).pipe(
1015
+ T.Http({ method: "POST", path: "/zones/{zone_id}/token_validation/rules" }),
1016
+ ) as unknown as Schema.Schema<CreateRuleRequest>;
1017
+
1018
+ export interface CreateRuleResponse {
1019
+ /** Action to take on requests that match operations included in `selector` and fail `expression`. */
1020
+ action: "log" | "block";
1021
+ /** A human-readable description that gives more details than `title`. */
1022
+ description: string;
1023
+ /** Toggle rule on or off. */
1024
+ enabled: boolean;
1025
+ /** Rule expression. Requests that fail to match this expression will be subject to `action`. For details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/j */
1026
+ expression: string;
1027
+ /** Select operations covered by this rule. For details on selectors, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/). */
1028
+ selector: {
1029
+ exclude?: { operationIds?: string[] | null }[] | null;
1030
+ include?: { host?: string[] | null }[] | null;
1031
+ };
1032
+ /** A human-readable name for the rule. */
1033
+ title: string;
1034
+ /** UUID. */
1035
+ id?: string | null;
1036
+ createdAt?: string | null;
1037
+ lastUpdated?: string | null;
1038
+ }
1039
+
1040
+ export const CreateRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1041
+ action: Schema.Literals(["log", "block"]),
1042
+ description: Schema.String,
1043
+ enabled: Schema.Boolean,
1044
+ expression: Schema.String,
1045
+ selector: Schema.Struct({
1046
+ exclude: Schema.optional(
1047
+ Schema.Union([
1048
+ Schema.Array(
1049
+ Schema.Struct({
1050
+ operationIds: Schema.optional(
1051
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1052
+ ),
1053
+ }).pipe(Schema.encodeKeys({ operationIds: "operation_ids" })),
1054
+ ),
1055
+ Schema.Null,
1056
+ ]),
1057
+ ),
1058
+ include: Schema.optional(
1059
+ Schema.Union([
1060
+ Schema.Array(
1061
+ Schema.Struct({
1062
+ host: Schema.optional(
1063
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1064
+ ),
1065
+ }),
1066
+ ),
1067
+ Schema.Null,
1068
+ ]),
1069
+ ),
1070
+ }),
1071
+ title: Schema.String,
1072
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1073
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1074
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1075
+ }).pipe(
1076
+ Schema.encodeKeys({
1077
+ action: "action",
1078
+ description: "description",
1079
+ enabled: "enabled",
1080
+ expression: "expression",
1081
+ selector: "selector",
1082
+ title: "title",
1083
+ id: "id",
1084
+ createdAt: "created_at",
1085
+ lastUpdated: "last_updated",
1086
+ }),
1087
+ ) as unknown as Schema.Schema<CreateRuleResponse>;
1088
+
1089
+ export type CreateRuleError = DefaultErrors;
1090
+
1091
+ export const createRule: API.OperationMethod<
1092
+ CreateRuleRequest,
1093
+ CreateRuleResponse,
1094
+ CreateRuleError,
1095
+ Credentials | HttpClient.HttpClient
1096
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1097
+ input: CreateRuleRequest,
1098
+ output: CreateRuleResponse,
1099
+ errors: [],
1100
+ }));
1101
+
1102
+ export interface PatchRuleRequest {
1103
+ ruleId: string;
1104
+ /** Path param: Identifier. */
1105
+ zoneId: string;
1106
+ /** Body param: Action to take on requests that match operations included in `selector` and fail `expression`. */
1107
+ action?: "log" | "block";
1108
+ /** Body param: A human-readable description that gives more details than `title`. */
1109
+ description?: string;
1110
+ /** Body param: Toggle rule on or off. */
1111
+ enabled?: boolean;
1112
+ /** Body param: Rule expression. Requests that fail to match this expression will be subject to `action`. For details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shiel */
1113
+ expression?: string;
1114
+ /** Body param: Update rule order among zone rules. */
1115
+ position?: { index: number } | { before?: string } | { after?: string };
1116
+ /** Body param: Select operations covered by this rule. For details on selectors, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/). */
1117
+ selector?: {
1118
+ exclude?: { operationIds?: string[] }[] | null;
1119
+ include?: { host?: string[] }[] | null;
1120
+ };
1121
+ /** Body param: A human-readable name for the rule. */
1122
+ title?: string;
1123
+ }
1124
+
1125
+ export const PatchRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1126
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
1127
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1128
+ action: Schema.optional(Schema.Literals(["log", "block"])),
1129
+ description: Schema.optional(Schema.String),
1130
+ enabled: Schema.optional(Schema.Boolean),
1131
+ expression: Schema.optional(Schema.String),
1132
+ position: Schema.optional(
1133
+ Schema.Union([
1134
+ Schema.Struct({
1135
+ index: Schema.Number,
1136
+ }),
1137
+ Schema.Struct({
1138
+ before: Schema.optional(Schema.String),
1139
+ }),
1140
+ Schema.Struct({
1141
+ after: Schema.optional(Schema.String),
1142
+ }),
1143
+ ]),
1144
+ ),
1145
+ selector: Schema.optional(
1146
+ Schema.Struct({
1147
+ exclude: Schema.optional(
1148
+ Schema.Union([
1149
+ Schema.Array(
1150
+ Schema.Struct({
1151
+ operationIds: Schema.optional(Schema.Array(Schema.String)),
1152
+ }).pipe(Schema.encodeKeys({ operationIds: "operation_ids" })),
1153
+ ),
1154
+ Schema.Null,
1155
+ ]),
1156
+ ),
1157
+ include: Schema.optional(
1158
+ Schema.Union([
1159
+ Schema.Array(
1160
+ Schema.Struct({
1161
+ host: Schema.optional(Schema.Array(Schema.String)),
1162
+ }),
1163
+ ),
1164
+ Schema.Null,
1165
+ ]),
1166
+ ),
1167
+ }),
1168
+ ),
1169
+ title: Schema.optional(Schema.String),
1170
+ }).pipe(
1171
+ T.Http({
1172
+ method: "PATCH",
1173
+ path: "/zones/{zone_id}/token_validation/rules/{ruleId}",
1174
+ }),
1175
+ ) as unknown as Schema.Schema<PatchRuleRequest>;
1176
+
1177
+ export interface PatchRuleResponse {
1178
+ /** Action to take on requests that match operations included in `selector` and fail `expression`. */
1179
+ action: "log" | "block";
1180
+ /** A human-readable description that gives more details than `title`. */
1181
+ description: string;
1182
+ /** Toggle rule on or off. */
1183
+ enabled: boolean;
1184
+ /** Rule expression. Requests that fail to match this expression will be subject to `action`. For details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/j */
1185
+ expression: string;
1186
+ /** Select operations covered by this rule. For details on selectors, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/). */
1187
+ selector: {
1188
+ exclude?: { operationIds?: string[] | null }[] | null;
1189
+ include?: { host?: string[] | null }[] | null;
1190
+ };
1191
+ /** A human-readable name for the rule. */
1192
+ title: string;
1193
+ /** UUID. */
1194
+ id?: string | null;
1195
+ createdAt?: string | null;
1196
+ lastUpdated?: string | null;
1197
+ }
1198
+
1199
+ export const PatchRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1200
+ action: Schema.Literals(["log", "block"]),
1201
+ description: Schema.String,
1202
+ enabled: Schema.Boolean,
1203
+ expression: Schema.String,
1204
+ selector: Schema.Struct({
1205
+ exclude: Schema.optional(
1206
+ Schema.Union([
1207
+ Schema.Array(
1208
+ Schema.Struct({
1209
+ operationIds: Schema.optional(
1210
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1211
+ ),
1212
+ }).pipe(Schema.encodeKeys({ operationIds: "operation_ids" })),
1213
+ ),
1214
+ Schema.Null,
1215
+ ]),
1216
+ ),
1217
+ include: Schema.optional(
1218
+ Schema.Union([
1219
+ Schema.Array(
1220
+ Schema.Struct({
1221
+ host: Schema.optional(
1222
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1223
+ ),
1224
+ }),
1225
+ ),
1226
+ Schema.Null,
1227
+ ]),
1228
+ ),
1229
+ }),
1230
+ title: Schema.String,
1231
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1232
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1233
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1234
+ }).pipe(
1235
+ Schema.encodeKeys({
1236
+ action: "action",
1237
+ description: "description",
1238
+ enabled: "enabled",
1239
+ expression: "expression",
1240
+ selector: "selector",
1241
+ title: "title",
1242
+ id: "id",
1243
+ createdAt: "created_at",
1244
+ lastUpdated: "last_updated",
1245
+ }),
1246
+ ) as unknown as Schema.Schema<PatchRuleResponse>;
1247
+
1248
+ export type PatchRuleError = DefaultErrors;
1249
+
1250
+ export const patchRule: API.OperationMethod<
1251
+ PatchRuleRequest,
1252
+ PatchRuleResponse,
1253
+ PatchRuleError,
1254
+ Credentials | HttpClient.HttpClient
1255
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1256
+ input: PatchRuleRequest,
1257
+ output: PatchRuleResponse,
1258
+ errors: [],
1259
+ }));
1260
+
1261
+ export interface DeleteRuleRequest {
1262
+ ruleId: string;
1263
+ /** Identifier. */
1264
+ zoneId: string;
1265
+ }
1266
+
1267
+ export const DeleteRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1268
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
1269
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1270
+ }).pipe(
1271
+ T.Http({
1272
+ method: "DELETE",
1273
+ path: "/zones/{zone_id}/token_validation/rules/{ruleId}",
1274
+ }),
1275
+ ) as unknown as Schema.Schema<DeleteRuleRequest>;
1276
+
1277
+ export type DeleteRuleResponse = unknown;
1278
+
1279
+ export const DeleteRuleResponse =
1280
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<DeleteRuleResponse>;
1281
+
1282
+ export type DeleteRuleError = DefaultErrors;
1283
+
1284
+ export const deleteRule: API.OperationMethod<
1285
+ DeleteRuleRequest,
1286
+ DeleteRuleResponse,
1287
+ DeleteRuleError,
1288
+ Credentials | HttpClient.HttpClient
1289
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1290
+ input: DeleteRuleRequest,
1291
+ output: DeleteRuleResponse,
1292
+ errors: [],
1293
+ }));
1294
+
1295
+ export interface BulkCreateRulesRequest {
1296
+ /** Path param: Identifier. */
1297
+ zoneId: string;
1298
+ /** Body param: */
1299
+ body: {
1300
+ action: "log" | "block";
1301
+ description: string;
1302
+ enabled: boolean;
1303
+ expression: string;
1304
+ selector: {
1305
+ exclude?: { operationIds?: string[] }[] | null;
1306
+ include?: { host?: string[] }[] | null;
1307
+ };
1308
+ title: string;
1309
+ }[];
1310
+ }
1311
+
1312
+ export const BulkCreateRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1313
+ {
1314
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1315
+ body: Schema.Array(
1316
+ Schema.Struct({
1317
+ action: Schema.Literals(["log", "block"]),
1318
+ description: Schema.String,
1319
+ enabled: Schema.Boolean,
1320
+ expression: Schema.String,
1321
+ selector: Schema.Struct({
1322
+ exclude: Schema.optional(
1323
+ Schema.Union([
1324
+ Schema.Array(
1325
+ Schema.Struct({
1326
+ operationIds: Schema.optional(Schema.Array(Schema.String)),
1327
+ }).pipe(Schema.encodeKeys({ operationIds: "operation_ids" })),
1328
+ ),
1329
+ Schema.Null,
1330
+ ]),
1331
+ ),
1332
+ include: Schema.optional(
1333
+ Schema.Union([
1334
+ Schema.Array(
1335
+ Schema.Struct({
1336
+ host: Schema.optional(Schema.Array(Schema.String)),
1337
+ }),
1338
+ ),
1339
+ Schema.Null,
1340
+ ]),
1341
+ ),
1342
+ }),
1343
+ title: Schema.String,
1344
+ }),
1345
+ ).pipe(T.HttpBody()),
1346
+ },
1347
+ ).pipe(
1348
+ T.Http({
1349
+ method: "POST",
1350
+ path: "/zones/{zone_id}/token_validation/rules/bulk",
1351
+ }),
1352
+ ) as unknown as Schema.Schema<BulkCreateRulesRequest>;
1353
+
1354
+ export type BulkCreateRulesResponse = {
1355
+ action: "log" | "block";
1356
+ description: string;
1357
+ enabled: boolean;
1358
+ expression: string;
1359
+ selector: {
1360
+ exclude?: { operationIds?: string[] | null }[] | null;
1361
+ include?: { host?: string[] | null }[] | null;
1362
+ };
1363
+ title: string;
1364
+ id?: string | null;
1365
+ createdAt?: string | null;
1366
+ lastUpdated?: string | null;
1367
+ }[];
1368
+
1369
+ export const BulkCreateRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1370
+ Schema.Struct({
1371
+ action: Schema.Literals(["log", "block"]),
1372
+ description: Schema.String,
1373
+ enabled: Schema.Boolean,
1374
+ expression: Schema.String,
1375
+ selector: Schema.Struct({
1376
+ exclude: Schema.optional(
1377
+ Schema.Union([
1378
+ Schema.Array(
1379
+ Schema.Struct({
1380
+ operationIds: Schema.optional(
1381
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1382
+ ),
1383
+ }).pipe(Schema.encodeKeys({ operationIds: "operation_ids" })),
1384
+ ),
1385
+ Schema.Null,
1386
+ ]),
1387
+ ),
1388
+ include: Schema.optional(
1389
+ Schema.Union([
1390
+ Schema.Array(
1391
+ Schema.Struct({
1392
+ host: Schema.optional(
1393
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1394
+ ),
1395
+ }),
1396
+ ),
1397
+ Schema.Null,
1398
+ ]),
1399
+ ),
1400
+ }),
1401
+ title: Schema.String,
1402
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1403
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1404
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1405
+ }).pipe(
1406
+ Schema.encodeKeys({
1407
+ action: "action",
1408
+ description: "description",
1409
+ enabled: "enabled",
1410
+ expression: "expression",
1411
+ selector: "selector",
1412
+ title: "title",
1413
+ id: "id",
1414
+ createdAt: "created_at",
1415
+ lastUpdated: "last_updated",
1416
+ }),
1417
+ ),
1418
+ ) as unknown as Schema.Schema<BulkCreateRulesResponse>;
1419
+
1420
+ export type BulkCreateRulesError = DefaultErrors;
1421
+
1422
+ export const bulkCreateRules: API.OperationMethod<
1423
+ BulkCreateRulesRequest,
1424
+ BulkCreateRulesResponse,
1425
+ BulkCreateRulesError,
1426
+ Credentials | HttpClient.HttpClient
1427
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1428
+ input: BulkCreateRulesRequest,
1429
+ output: BulkCreateRulesResponse,
1430
+ errors: [],
1431
+ }));
1432
+
1433
+ export interface BulkPatchRulesRequest {
1434
+ /** Path param: Identifier. */
1435
+ zoneId: string;
1436
+ /** Body param: */
1437
+ body: {
1438
+ id: string;
1439
+ action?: "log" | "block";
1440
+ description?: string;
1441
+ enabled?: boolean;
1442
+ expression?: string;
1443
+ position?: { index: number } | { before?: string } | { after?: string };
1444
+ selector?: {
1445
+ exclude?: { operationIds?: string[] }[] | null;
1446
+ include?: { host?: string[] }[] | null;
1447
+ };
1448
+ title?: string;
1449
+ }[];
1450
+ }
1451
+
1452
+ export const BulkPatchRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1453
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1454
+ body: Schema.Array(
1455
+ Schema.Struct({
1456
+ id: Schema.String,
1457
+ action: Schema.optional(Schema.Literals(["log", "block"])),
1458
+ description: Schema.optional(Schema.String),
1459
+ enabled: Schema.optional(Schema.Boolean),
1460
+ expression: Schema.optional(Schema.String),
1461
+ position: Schema.optional(
1462
+ Schema.Union([
1463
+ Schema.Struct({
1464
+ index: Schema.Number,
1465
+ }),
1466
+ Schema.Struct({
1467
+ before: Schema.optional(Schema.String),
1468
+ }),
1469
+ Schema.Struct({
1470
+ after: Schema.optional(Schema.String),
1471
+ }),
1472
+ ]),
1473
+ ),
1474
+ selector: Schema.optional(
1475
+ Schema.Struct({
1476
+ exclude: Schema.optional(
1477
+ Schema.Union([
1478
+ Schema.Array(
1479
+ Schema.Struct({
1480
+ operationIds: Schema.optional(Schema.Array(Schema.String)),
1481
+ }).pipe(Schema.encodeKeys({ operationIds: "operation_ids" })),
1482
+ ),
1483
+ Schema.Null,
1484
+ ]),
1485
+ ),
1486
+ include: Schema.optional(
1487
+ Schema.Union([
1488
+ Schema.Array(
1489
+ Schema.Struct({
1490
+ host: Schema.optional(Schema.Array(Schema.String)),
1491
+ }),
1492
+ ),
1493
+ Schema.Null,
1494
+ ]),
1495
+ ),
1496
+ }),
1497
+ ),
1498
+ title: Schema.optional(Schema.String),
1499
+ }),
1500
+ ).pipe(T.HttpBody()),
1501
+ }).pipe(
1502
+ T.Http({
1503
+ method: "PATCH",
1504
+ path: "/zones/{zone_id}/token_validation/rules/bulk",
1505
+ }),
1506
+ ) as unknown as Schema.Schema<BulkPatchRulesRequest>;
1507
+
1508
+ export type BulkPatchRulesResponse = {
1509
+ action: "log" | "block";
1510
+ description: string;
1511
+ enabled: boolean;
1512
+ expression: string;
1513
+ selector: {
1514
+ exclude?: { operationIds?: string[] | null }[] | null;
1515
+ include?: { host?: string[] | null }[] | null;
1516
+ };
1517
+ title: string;
1518
+ id?: string | null;
1519
+ createdAt?: string | null;
1520
+ lastUpdated?: string | null;
1521
+ }[];
1522
+
1523
+ export const BulkPatchRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1524
+ Schema.Struct({
1525
+ action: Schema.Literals(["log", "block"]),
1526
+ description: Schema.String,
1527
+ enabled: Schema.Boolean,
1528
+ expression: Schema.String,
1529
+ selector: Schema.Struct({
1530
+ exclude: Schema.optional(
1531
+ Schema.Union([
1532
+ Schema.Array(
1533
+ Schema.Struct({
1534
+ operationIds: Schema.optional(
1535
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1536
+ ),
1537
+ }).pipe(Schema.encodeKeys({ operationIds: "operation_ids" })),
1538
+ ),
1539
+ Schema.Null,
1540
+ ]),
1541
+ ),
1542
+ include: Schema.optional(
1543
+ Schema.Union([
1544
+ Schema.Array(
1545
+ Schema.Struct({
1546
+ host: Schema.optional(
1547
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1548
+ ),
1549
+ }),
1550
+ ),
1551
+ Schema.Null,
1552
+ ]),
1553
+ ),
1554
+ }),
1555
+ title: Schema.String,
1556
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1557
+ createdAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1558
+ lastUpdated: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1559
+ }).pipe(
1560
+ Schema.encodeKeys({
1561
+ action: "action",
1562
+ description: "description",
1563
+ enabled: "enabled",
1564
+ expression: "expression",
1565
+ selector: "selector",
1566
+ title: "title",
1567
+ id: "id",
1568
+ createdAt: "created_at",
1569
+ lastUpdated: "last_updated",
1570
+ }),
1571
+ ),
1572
+ ) as unknown as Schema.Schema<BulkPatchRulesResponse>;
1573
+
1574
+ export type BulkPatchRulesError = DefaultErrors;
1575
+
1576
+ export const bulkPatchRules: API.OperationMethod<
1577
+ BulkPatchRulesRequest,
1578
+ BulkPatchRulesResponse,
1579
+ BulkPatchRulesError,
1580
+ Credentials | HttpClient.HttpClient
1581
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1582
+ input: BulkPatchRulesRequest,
1583
+ output: BulkPatchRulesResponse,
1584
+ errors: [],
1585
+ }));