@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,3896 @@
1
+ /**
2
+ * Cloudflare FIREWALL API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service firewall
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
+ // AccessRule
17
+ // =============================================================================
18
+
19
+ export interface GetAccessRuleRequest {
20
+ ruleId: string;
21
+ }
22
+
23
+ export const GetAccessRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
24
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
25
+ }).pipe(
26
+ T.Http({
27
+ method: "GET",
28
+ path: "/{accountOrZone}/{accountOrZoneId}/firewall/access_rules/rules/{ruleId}",
29
+ }),
30
+ ) as unknown as Schema.Schema<GetAccessRuleRequest>;
31
+
32
+ export interface GetAccessRuleResponse {
33
+ /** The unique identifier of the IP Access rule. */
34
+ id: string;
35
+ /** The available actions that a rule can apply to a matched request. */
36
+ allowedModes: (
37
+ | "block"
38
+ | "challenge"
39
+ | "whitelist"
40
+ | "js_challenge"
41
+ | "managed_challenge"
42
+ )[];
43
+ /** The rule configuration. */
44
+ configuration:
45
+ | { target?: "ip" | null; value?: string | null }
46
+ | { target?: "ip6" | null; value?: string | null }
47
+ | { target?: "ip_range" | null; value?: string | null }
48
+ | { target?: "asn" | null; value?: string | null }
49
+ | { target?: "country" | null; value?: string | null };
50
+ /** The action to apply to a matched request. */
51
+ mode:
52
+ | "block"
53
+ | "challenge"
54
+ | "whitelist"
55
+ | "js_challenge"
56
+ | "managed_challenge";
57
+ /** The timestamp of when the rule was created. */
58
+ createdOn?: string | null;
59
+ /** The timestamp of when the rule was last modified. */
60
+ modifiedOn?: string | null;
61
+ /** An informative summary of the rule, typically used as a reminder or explanation. */
62
+ notes?: string | null;
63
+ /** All zones owned by the user will have the rule applied. */
64
+ scope?: {
65
+ id?: string | null;
66
+ email?: string | null;
67
+ type?: "user" | "organization" | null;
68
+ } | null;
69
+ }
70
+
71
+ export const GetAccessRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
72
+ id: Schema.String,
73
+ allowedModes: Schema.Array(
74
+ Schema.Literals([
75
+ "block",
76
+ "challenge",
77
+ "whitelist",
78
+ "js_challenge",
79
+ "managed_challenge",
80
+ ]),
81
+ ),
82
+ configuration: Schema.Union([
83
+ Schema.Struct({
84
+ target: Schema.optional(
85
+ Schema.Union([Schema.Literal("ip"), Schema.Null]),
86
+ ),
87
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
88
+ }),
89
+ Schema.Struct({
90
+ target: Schema.optional(
91
+ Schema.Union([Schema.Literal("ip6"), Schema.Null]),
92
+ ),
93
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
94
+ }),
95
+ Schema.Struct({
96
+ target: Schema.optional(
97
+ Schema.Union([Schema.Literal("ip_range"), Schema.Null]),
98
+ ),
99
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
100
+ }),
101
+ Schema.Struct({
102
+ target: Schema.optional(
103
+ Schema.Union([Schema.Literal("asn"), Schema.Null]),
104
+ ),
105
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
106
+ }),
107
+ Schema.Struct({
108
+ target: Schema.optional(
109
+ Schema.Union([Schema.Literal("country"), Schema.Null]),
110
+ ),
111
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
112
+ }),
113
+ ]),
114
+ mode: Schema.Literals([
115
+ "block",
116
+ "challenge",
117
+ "whitelist",
118
+ "js_challenge",
119
+ "managed_challenge",
120
+ ]),
121
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
122
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
123
+ notes: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
124
+ scope: Schema.optional(
125
+ Schema.Union([
126
+ Schema.Struct({
127
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
128
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
129
+ type: Schema.optional(
130
+ Schema.Union([
131
+ Schema.Literals(["user", "organization"]),
132
+ Schema.Null,
133
+ ]),
134
+ ),
135
+ }),
136
+ Schema.Null,
137
+ ]),
138
+ ),
139
+ }).pipe(
140
+ Schema.encodeKeys({
141
+ id: "id",
142
+ allowedModes: "allowed_modes",
143
+ configuration: "configuration",
144
+ mode: "mode",
145
+ createdOn: "created_on",
146
+ modifiedOn: "modified_on",
147
+ notes: "notes",
148
+ scope: "scope",
149
+ }),
150
+ ) as unknown as Schema.Schema<GetAccessRuleResponse>;
151
+
152
+ export type GetAccessRuleError = DefaultErrors;
153
+
154
+ export const getAccessRule: API.OperationMethod<
155
+ GetAccessRuleRequest,
156
+ GetAccessRuleResponse,
157
+ GetAccessRuleError,
158
+ Credentials | HttpClient.HttpClient
159
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
160
+ input: GetAccessRuleRequest,
161
+ output: GetAccessRuleResponse,
162
+ errors: [],
163
+ }));
164
+
165
+ export interface ListAccessRulesRequest {}
166
+
167
+ export const ListAccessRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
168
+ {},
169
+ ).pipe(
170
+ T.Http({
171
+ method: "GET",
172
+ path: "/{accountOrZone}/{accountOrZoneId}/firewall/access_rules/rules",
173
+ }),
174
+ ) as unknown as Schema.Schema<ListAccessRulesRequest>;
175
+
176
+ export type ListAccessRulesResponse = {
177
+ id: string;
178
+ allowedModes: (
179
+ | "block"
180
+ | "challenge"
181
+ | "whitelist"
182
+ | "js_challenge"
183
+ | "managed_challenge"
184
+ )[];
185
+ configuration:
186
+ | { target?: "ip" | null; value?: string | null }
187
+ | { target?: "ip6" | null; value?: string | null }
188
+ | { target?: "ip_range" | null; value?: string | null }
189
+ | { target?: "asn" | null; value?: string | null }
190
+ | { target?: "country" | null; value?: string | null };
191
+ mode:
192
+ | "block"
193
+ | "challenge"
194
+ | "whitelist"
195
+ | "js_challenge"
196
+ | "managed_challenge";
197
+ createdOn?: string | null;
198
+ modifiedOn?: string | null;
199
+ notes?: string | null;
200
+ scope?: {
201
+ id?: string | null;
202
+ email?: string | null;
203
+ type?: "user" | "organization" | null;
204
+ } | null;
205
+ }[];
206
+
207
+ export const ListAccessRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
208
+ Schema.Struct({
209
+ id: Schema.String,
210
+ allowedModes: Schema.Array(
211
+ Schema.Literals([
212
+ "block",
213
+ "challenge",
214
+ "whitelist",
215
+ "js_challenge",
216
+ "managed_challenge",
217
+ ]),
218
+ ),
219
+ configuration: Schema.Union([
220
+ Schema.Struct({
221
+ target: Schema.optional(
222
+ Schema.Union([Schema.Literal("ip"), Schema.Null]),
223
+ ),
224
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
225
+ }),
226
+ Schema.Struct({
227
+ target: Schema.optional(
228
+ Schema.Union([Schema.Literal("ip6"), Schema.Null]),
229
+ ),
230
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
231
+ }),
232
+ Schema.Struct({
233
+ target: Schema.optional(
234
+ Schema.Union([Schema.Literal("ip_range"), Schema.Null]),
235
+ ),
236
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
237
+ }),
238
+ Schema.Struct({
239
+ target: Schema.optional(
240
+ Schema.Union([Schema.Literal("asn"), Schema.Null]),
241
+ ),
242
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
243
+ }),
244
+ Schema.Struct({
245
+ target: Schema.optional(
246
+ Schema.Union([Schema.Literal("country"), Schema.Null]),
247
+ ),
248
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
249
+ }),
250
+ ]),
251
+ mode: Schema.Literals([
252
+ "block",
253
+ "challenge",
254
+ "whitelist",
255
+ "js_challenge",
256
+ "managed_challenge",
257
+ ]),
258
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
259
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
260
+ notes: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
261
+ scope: Schema.optional(
262
+ Schema.Union([
263
+ Schema.Struct({
264
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
265
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
266
+ type: Schema.optional(
267
+ Schema.Union([
268
+ Schema.Literals(["user", "organization"]),
269
+ Schema.Null,
270
+ ]),
271
+ ),
272
+ }),
273
+ Schema.Null,
274
+ ]),
275
+ ),
276
+ }).pipe(
277
+ Schema.encodeKeys({
278
+ id: "id",
279
+ allowedModes: "allowed_modes",
280
+ configuration: "configuration",
281
+ mode: "mode",
282
+ createdOn: "created_on",
283
+ modifiedOn: "modified_on",
284
+ notes: "notes",
285
+ scope: "scope",
286
+ }),
287
+ ),
288
+ ) as unknown as Schema.Schema<ListAccessRulesResponse>;
289
+
290
+ export type ListAccessRulesError = DefaultErrors;
291
+
292
+ export const listAccessRules: API.OperationMethod<
293
+ ListAccessRulesRequest,
294
+ ListAccessRulesResponse,
295
+ ListAccessRulesError,
296
+ Credentials | HttpClient.HttpClient
297
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
298
+ input: ListAccessRulesRequest,
299
+ output: ListAccessRulesResponse,
300
+ errors: [],
301
+ }));
302
+
303
+ export interface CreateAccessRuleRequest {
304
+ /** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
305
+ accountId?: string;
306
+ /** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
307
+ zoneId?: string;
308
+ /** Body param: The rule configuration. */
309
+ configuration:
310
+ | { target?: "ip"; value?: string }
311
+ | { target?: "ip6"; value?: string }
312
+ | { target?: "ip_range"; value?: string }
313
+ | { target?: "asn"; value?: string }
314
+ | { target?: "country"; value?: string };
315
+ /** Body param: The action to apply to a matched request. */
316
+ mode:
317
+ | "block"
318
+ | "challenge"
319
+ | "whitelist"
320
+ | "js_challenge"
321
+ | "managed_challenge";
322
+ /** Body param: An informative summary of the rule, typically used as a reminder or explanation. */
323
+ notes?: string;
324
+ }
325
+
326
+ export const CreateAccessRuleRequest =
327
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
328
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
329
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
330
+ configuration: Schema.Union([
331
+ Schema.Struct({
332
+ target: Schema.optional(Schema.Literal("ip")),
333
+ value: Schema.optional(Schema.String),
334
+ }),
335
+ Schema.Struct({
336
+ target: Schema.optional(Schema.Literal("ip6")),
337
+ value: Schema.optional(Schema.String),
338
+ }),
339
+ Schema.Struct({
340
+ target: Schema.optional(Schema.Literal("ip_range")),
341
+ value: Schema.optional(Schema.String),
342
+ }),
343
+ Schema.Struct({
344
+ target: Schema.optional(Schema.Literal("asn")),
345
+ value: Schema.optional(Schema.String),
346
+ }),
347
+ Schema.Struct({
348
+ target: Schema.optional(Schema.Literal("country")),
349
+ value: Schema.optional(Schema.String),
350
+ }),
351
+ ]),
352
+ mode: Schema.Literals([
353
+ "block",
354
+ "challenge",
355
+ "whitelist",
356
+ "js_challenge",
357
+ "managed_challenge",
358
+ ]),
359
+ notes: Schema.optional(Schema.String),
360
+ }).pipe(
361
+ T.Http({
362
+ method: "POST",
363
+ path: "/{accountOrZone}/{accountOrZoneId}/firewall/access_rules/rules",
364
+ }),
365
+ ) as unknown as Schema.Schema<CreateAccessRuleRequest>;
366
+
367
+ export interface CreateAccessRuleResponse {
368
+ /** The unique identifier of the IP Access rule. */
369
+ id: string;
370
+ /** The available actions that a rule can apply to a matched request. */
371
+ allowedModes: (
372
+ | "block"
373
+ | "challenge"
374
+ | "whitelist"
375
+ | "js_challenge"
376
+ | "managed_challenge"
377
+ )[];
378
+ /** The rule configuration. */
379
+ configuration:
380
+ | { target?: "ip" | null; value?: string | null }
381
+ | { target?: "ip6" | null; value?: string | null }
382
+ | { target?: "ip_range" | null; value?: string | null }
383
+ | { target?: "asn" | null; value?: string | null }
384
+ | { target?: "country" | null; value?: string | null };
385
+ /** The action to apply to a matched request. */
386
+ mode:
387
+ | "block"
388
+ | "challenge"
389
+ | "whitelist"
390
+ | "js_challenge"
391
+ | "managed_challenge";
392
+ /** The timestamp of when the rule was created. */
393
+ createdOn?: string | null;
394
+ /** The timestamp of when the rule was last modified. */
395
+ modifiedOn?: string | null;
396
+ /** An informative summary of the rule, typically used as a reminder or explanation. */
397
+ notes?: string | null;
398
+ /** All zones owned by the user will have the rule applied. */
399
+ scope?: {
400
+ id?: string | null;
401
+ email?: string | null;
402
+ type?: "user" | "organization" | null;
403
+ } | null;
404
+ }
405
+
406
+ export const CreateAccessRuleResponse =
407
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
408
+ id: Schema.String,
409
+ allowedModes: Schema.Array(
410
+ Schema.Literals([
411
+ "block",
412
+ "challenge",
413
+ "whitelist",
414
+ "js_challenge",
415
+ "managed_challenge",
416
+ ]),
417
+ ),
418
+ configuration: Schema.Union([
419
+ Schema.Struct({
420
+ target: Schema.optional(
421
+ Schema.Union([Schema.Literal("ip"), Schema.Null]),
422
+ ),
423
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
424
+ }),
425
+ Schema.Struct({
426
+ target: Schema.optional(
427
+ Schema.Union([Schema.Literal("ip6"), Schema.Null]),
428
+ ),
429
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
430
+ }),
431
+ Schema.Struct({
432
+ target: Schema.optional(
433
+ Schema.Union([Schema.Literal("ip_range"), Schema.Null]),
434
+ ),
435
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
436
+ }),
437
+ Schema.Struct({
438
+ target: Schema.optional(
439
+ Schema.Union([Schema.Literal("asn"), Schema.Null]),
440
+ ),
441
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
442
+ }),
443
+ Schema.Struct({
444
+ target: Schema.optional(
445
+ Schema.Union([Schema.Literal("country"), Schema.Null]),
446
+ ),
447
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
448
+ }),
449
+ ]),
450
+ mode: Schema.Literals([
451
+ "block",
452
+ "challenge",
453
+ "whitelist",
454
+ "js_challenge",
455
+ "managed_challenge",
456
+ ]),
457
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
458
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
459
+ notes: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
460
+ scope: Schema.optional(
461
+ Schema.Union([
462
+ Schema.Struct({
463
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
464
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
465
+ type: Schema.optional(
466
+ Schema.Union([
467
+ Schema.Literals(["user", "organization"]),
468
+ Schema.Null,
469
+ ]),
470
+ ),
471
+ }),
472
+ Schema.Null,
473
+ ]),
474
+ ),
475
+ }).pipe(
476
+ Schema.encodeKeys({
477
+ id: "id",
478
+ allowedModes: "allowed_modes",
479
+ configuration: "configuration",
480
+ mode: "mode",
481
+ createdOn: "created_on",
482
+ modifiedOn: "modified_on",
483
+ notes: "notes",
484
+ scope: "scope",
485
+ }),
486
+ ) as unknown as Schema.Schema<CreateAccessRuleResponse>;
487
+
488
+ export type CreateAccessRuleError = DefaultErrors;
489
+
490
+ export const createAccessRule: API.OperationMethod<
491
+ CreateAccessRuleRequest,
492
+ CreateAccessRuleResponse,
493
+ CreateAccessRuleError,
494
+ Credentials | HttpClient.HttpClient
495
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
496
+ input: CreateAccessRuleRequest,
497
+ output: CreateAccessRuleResponse,
498
+ errors: [],
499
+ }));
500
+
501
+ export interface PatchAccessRuleRequest {
502
+ ruleId: string;
503
+ /** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
504
+ accountId?: string;
505
+ /** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
506
+ zoneId?: string;
507
+ /** Body param: The rule configuration. */
508
+ configuration:
509
+ | { target?: "ip"; value?: string }
510
+ | { target?: "ip6"; value?: string }
511
+ | { target?: "ip_range"; value?: string }
512
+ | { target?: "asn"; value?: string }
513
+ | { target?: "country"; value?: string };
514
+ /** Body param: The action to apply to a matched request. */
515
+ mode:
516
+ | "block"
517
+ | "challenge"
518
+ | "whitelist"
519
+ | "js_challenge"
520
+ | "managed_challenge";
521
+ /** Body param: An informative summary of the rule, typically used as a reminder or explanation. */
522
+ notes?: string;
523
+ }
524
+
525
+ export const PatchAccessRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
526
+ {
527
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
528
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
529
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
530
+ configuration: Schema.Union([
531
+ Schema.Struct({
532
+ target: Schema.optional(Schema.Literal("ip")),
533
+ value: Schema.optional(Schema.String),
534
+ }),
535
+ Schema.Struct({
536
+ target: Schema.optional(Schema.Literal("ip6")),
537
+ value: Schema.optional(Schema.String),
538
+ }),
539
+ Schema.Struct({
540
+ target: Schema.optional(Schema.Literal("ip_range")),
541
+ value: Schema.optional(Schema.String),
542
+ }),
543
+ Schema.Struct({
544
+ target: Schema.optional(Schema.Literal("asn")),
545
+ value: Schema.optional(Schema.String),
546
+ }),
547
+ Schema.Struct({
548
+ target: Schema.optional(Schema.Literal("country")),
549
+ value: Schema.optional(Schema.String),
550
+ }),
551
+ ]),
552
+ mode: Schema.Literals([
553
+ "block",
554
+ "challenge",
555
+ "whitelist",
556
+ "js_challenge",
557
+ "managed_challenge",
558
+ ]),
559
+ notes: Schema.optional(Schema.String),
560
+ },
561
+ ).pipe(
562
+ T.Http({
563
+ method: "PATCH",
564
+ path: "/{accountOrZone}/{accountOrZoneId}/firewall/access_rules/rules/{ruleId}",
565
+ }),
566
+ ) as unknown as Schema.Schema<PatchAccessRuleRequest>;
567
+
568
+ export interface PatchAccessRuleResponse {
569
+ /** The unique identifier of the IP Access rule. */
570
+ id: string;
571
+ /** The available actions that a rule can apply to a matched request. */
572
+ allowedModes: (
573
+ | "block"
574
+ | "challenge"
575
+ | "whitelist"
576
+ | "js_challenge"
577
+ | "managed_challenge"
578
+ )[];
579
+ /** The rule configuration. */
580
+ configuration:
581
+ | { target?: "ip" | null; value?: string | null }
582
+ | { target?: "ip6" | null; value?: string | null }
583
+ | { target?: "ip_range" | null; value?: string | null }
584
+ | { target?: "asn" | null; value?: string | null }
585
+ | { target?: "country" | null; value?: string | null };
586
+ /** The action to apply to a matched request. */
587
+ mode:
588
+ | "block"
589
+ | "challenge"
590
+ | "whitelist"
591
+ | "js_challenge"
592
+ | "managed_challenge";
593
+ /** The timestamp of when the rule was created. */
594
+ createdOn?: string | null;
595
+ /** The timestamp of when the rule was last modified. */
596
+ modifiedOn?: string | null;
597
+ /** An informative summary of the rule, typically used as a reminder or explanation. */
598
+ notes?: string | null;
599
+ /** All zones owned by the user will have the rule applied. */
600
+ scope?: {
601
+ id?: string | null;
602
+ email?: string | null;
603
+ type?: "user" | "organization" | null;
604
+ } | null;
605
+ }
606
+
607
+ export const PatchAccessRuleResponse =
608
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
609
+ id: Schema.String,
610
+ allowedModes: Schema.Array(
611
+ Schema.Literals([
612
+ "block",
613
+ "challenge",
614
+ "whitelist",
615
+ "js_challenge",
616
+ "managed_challenge",
617
+ ]),
618
+ ),
619
+ configuration: Schema.Union([
620
+ Schema.Struct({
621
+ target: Schema.optional(
622
+ Schema.Union([Schema.Literal("ip"), Schema.Null]),
623
+ ),
624
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
625
+ }),
626
+ Schema.Struct({
627
+ target: Schema.optional(
628
+ Schema.Union([Schema.Literal("ip6"), Schema.Null]),
629
+ ),
630
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
631
+ }),
632
+ Schema.Struct({
633
+ target: Schema.optional(
634
+ Schema.Union([Schema.Literal("ip_range"), Schema.Null]),
635
+ ),
636
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
637
+ }),
638
+ Schema.Struct({
639
+ target: Schema.optional(
640
+ Schema.Union([Schema.Literal("asn"), Schema.Null]),
641
+ ),
642
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
643
+ }),
644
+ Schema.Struct({
645
+ target: Schema.optional(
646
+ Schema.Union([Schema.Literal("country"), Schema.Null]),
647
+ ),
648
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
649
+ }),
650
+ ]),
651
+ mode: Schema.Literals([
652
+ "block",
653
+ "challenge",
654
+ "whitelist",
655
+ "js_challenge",
656
+ "managed_challenge",
657
+ ]),
658
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
659
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
660
+ notes: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
661
+ scope: Schema.optional(
662
+ Schema.Union([
663
+ Schema.Struct({
664
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
665
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
666
+ type: Schema.optional(
667
+ Schema.Union([
668
+ Schema.Literals(["user", "organization"]),
669
+ Schema.Null,
670
+ ]),
671
+ ),
672
+ }),
673
+ Schema.Null,
674
+ ]),
675
+ ),
676
+ }).pipe(
677
+ Schema.encodeKeys({
678
+ id: "id",
679
+ allowedModes: "allowed_modes",
680
+ configuration: "configuration",
681
+ mode: "mode",
682
+ createdOn: "created_on",
683
+ modifiedOn: "modified_on",
684
+ notes: "notes",
685
+ scope: "scope",
686
+ }),
687
+ ) as unknown as Schema.Schema<PatchAccessRuleResponse>;
688
+
689
+ export type PatchAccessRuleError = DefaultErrors;
690
+
691
+ export const patchAccessRule: API.OperationMethod<
692
+ PatchAccessRuleRequest,
693
+ PatchAccessRuleResponse,
694
+ PatchAccessRuleError,
695
+ Credentials | HttpClient.HttpClient
696
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
697
+ input: PatchAccessRuleRequest,
698
+ output: PatchAccessRuleResponse,
699
+ errors: [],
700
+ }));
701
+
702
+ export interface DeleteAccessRuleRequest {
703
+ ruleId: string;
704
+ }
705
+
706
+ export const DeleteAccessRuleRequest =
707
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
708
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
709
+ }).pipe(
710
+ T.Http({
711
+ method: "DELETE",
712
+ path: "/{accountOrZone}/{accountOrZoneId}/firewall/access_rules/rules/{ruleId}",
713
+ }),
714
+ ) as unknown as Schema.Schema<DeleteAccessRuleRequest>;
715
+
716
+ export interface DeleteAccessRuleResponse {
717
+ /** Defines an identifier. */
718
+ id: string;
719
+ }
720
+
721
+ export const DeleteAccessRuleResponse =
722
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
723
+ id: Schema.String,
724
+ }) as unknown as Schema.Schema<DeleteAccessRuleResponse>;
725
+
726
+ export type DeleteAccessRuleError = DefaultErrors;
727
+
728
+ export const deleteAccessRule: API.OperationMethod<
729
+ DeleteAccessRuleRequest,
730
+ DeleteAccessRuleResponse,
731
+ DeleteAccessRuleError,
732
+ Credentials | HttpClient.HttpClient
733
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
734
+ input: DeleteAccessRuleRequest,
735
+ output: DeleteAccessRuleResponse,
736
+ errors: [],
737
+ }));
738
+
739
+ // =============================================================================
740
+ // Lockdown
741
+ // =============================================================================
742
+
743
+ export interface GetLockdownRequest {
744
+ lockDownsId: string;
745
+ /** Defines an identifier. */
746
+ zoneId: string;
747
+ }
748
+
749
+ export const GetLockdownRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
750
+ lockDownsId: Schema.String.pipe(T.HttpPath("lockDownsId")),
751
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
752
+ }).pipe(
753
+ T.Http({
754
+ method: "GET",
755
+ path: "/zones/{zone_id}/firewall/lockdowns/{lockDownsId}",
756
+ }),
757
+ ) as unknown as Schema.Schema<GetLockdownRequest>;
758
+
759
+ export interface GetLockdownResponse {
760
+ /** The unique identifier of the Zone Lockdown rule. */
761
+ id: string;
762
+ /** A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. */
763
+ configurations: unknown;
764
+ /** The timestamp of when the rule was created. */
765
+ createdOn: string;
766
+ /** An informative summary of the rule. */
767
+ description: string;
768
+ /** The timestamp of when the rule was last modified. */
769
+ modifiedOn: string;
770
+ /** When true, indicates that the rule is currently paused. */
771
+ paused: boolean;
772
+ /** The URLs to include in the rule definition. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. */
773
+ urls: string[];
774
+ }
775
+
776
+ export const GetLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
777
+ id: Schema.String,
778
+ configurations: Schema.Unknown,
779
+ createdOn: Schema.String,
780
+ description: Schema.String,
781
+ modifiedOn: Schema.String,
782
+ paused: Schema.Boolean,
783
+ urls: Schema.Array(Schema.String),
784
+ }).pipe(
785
+ Schema.encodeKeys({
786
+ id: "id",
787
+ configurations: "configurations",
788
+ createdOn: "created_on",
789
+ description: "description",
790
+ modifiedOn: "modified_on",
791
+ paused: "paused",
792
+ urls: "urls",
793
+ }),
794
+ ) as unknown as Schema.Schema<GetLockdownResponse>;
795
+
796
+ export type GetLockdownError = DefaultErrors;
797
+
798
+ export const getLockdown: API.OperationMethod<
799
+ GetLockdownRequest,
800
+ GetLockdownResponse,
801
+ GetLockdownError,
802
+ Credentials | HttpClient.HttpClient
803
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
804
+ input: GetLockdownRequest,
805
+ output: GetLockdownResponse,
806
+ errors: [],
807
+ }));
808
+
809
+ export interface ListLockdownsRequest {
810
+ /** Path param: Defines an identifier. */
811
+ zoneId: string;
812
+ /** Query param: The timestamp of when the rule was created. */
813
+ createdOn?: string;
814
+ /** Query param: A string to search for in the description of existing rules. */
815
+ description?: string;
816
+ /** Query param: A string to search for in the description of existing rules. */
817
+ descriptionSearch?: string;
818
+ /** Query param: A single IP address to search for in existing rules. */
819
+ ip?: string;
820
+ /** Query param: A single IP address range to search for in existing rules. */
821
+ ipRangeSearch?: string;
822
+ /** Query param: A single IP address to search for in existing rules. */
823
+ ipSearch?: string;
824
+ /** Query param: The timestamp of when the rule was last modified. */
825
+ modifiedOn?: string;
826
+ /** Query param: The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules wi */
827
+ priority?: number;
828
+ /** Query param: A single URI to search for in the list of URLs of existing rules. */
829
+ uriSearch?: string;
830
+ }
831
+
832
+ export const ListLockdownsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
833
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
834
+ createdOn: Schema.optional(Schema.String).pipe(T.HttpQuery("created_on")),
835
+ description: Schema.optional(Schema.String).pipe(T.HttpQuery("description")),
836
+ descriptionSearch: Schema.optional(Schema.String).pipe(
837
+ T.HttpQuery("description_search"),
838
+ ),
839
+ ip: Schema.optional(Schema.String).pipe(T.HttpQuery("ip")),
840
+ ipRangeSearch: Schema.optional(Schema.String).pipe(
841
+ T.HttpQuery("ip_range_search"),
842
+ ),
843
+ ipSearch: Schema.optional(Schema.String).pipe(T.HttpQuery("ip_search")),
844
+ modifiedOn: Schema.optional(Schema.String).pipe(T.HttpQuery("modified_on")),
845
+ priority: Schema.optional(Schema.Number).pipe(T.HttpQuery("priority")),
846
+ uriSearch: Schema.optional(Schema.String).pipe(T.HttpQuery("uri_search")),
847
+ }).pipe(
848
+ T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/lockdowns" }),
849
+ ) as unknown as Schema.Schema<ListLockdownsRequest>;
850
+
851
+ export type ListLockdownsResponse = {
852
+ id: string;
853
+ configurations: unknown;
854
+ createdOn: string;
855
+ description: string;
856
+ modifiedOn: string;
857
+ paused: boolean;
858
+ urls: string[];
859
+ }[];
860
+
861
+ export const ListLockdownsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
862
+ Schema.Struct({
863
+ id: Schema.String,
864
+ configurations: Schema.Unknown,
865
+ createdOn: Schema.String,
866
+ description: Schema.String,
867
+ modifiedOn: Schema.String,
868
+ paused: Schema.Boolean,
869
+ urls: Schema.Array(Schema.String),
870
+ }).pipe(
871
+ Schema.encodeKeys({
872
+ id: "id",
873
+ configurations: "configurations",
874
+ createdOn: "created_on",
875
+ description: "description",
876
+ modifiedOn: "modified_on",
877
+ paused: "paused",
878
+ urls: "urls",
879
+ }),
880
+ ),
881
+ ) as unknown as Schema.Schema<ListLockdownsResponse>;
882
+
883
+ export type ListLockdownsError = DefaultErrors;
884
+
885
+ export const listLockdowns: API.OperationMethod<
886
+ ListLockdownsRequest,
887
+ ListLockdownsResponse,
888
+ ListLockdownsError,
889
+ Credentials | HttpClient.HttpClient
890
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
891
+ input: ListLockdownsRequest,
892
+ output: ListLockdownsResponse,
893
+ errors: [],
894
+ }));
895
+
896
+ export interface CreateLockdownRequest {
897
+ /** Path param: Defines an identifier. */
898
+ zoneId: string;
899
+ /** Body param: A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. */
900
+ configurations: unknown;
901
+ /** Body param: The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. */
902
+ urls: string[];
903
+ /** Body param: An informative summary of the rule. This value is sanitized and any tags will be removed. */
904
+ description?: string;
905
+ /** Body param: When true, indicates that the rule is currently paused. */
906
+ paused?: boolean;
907
+ /** Body param: The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules wit */
908
+ priority?: number;
909
+ }
910
+
911
+ export const CreateLockdownRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
912
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
913
+ configurations: Schema.Unknown,
914
+ urls: Schema.Array(Schema.String),
915
+ description: Schema.optional(Schema.String),
916
+ paused: Schema.optional(Schema.Boolean),
917
+ priority: Schema.optional(Schema.Number),
918
+ }).pipe(
919
+ T.Http({ method: "POST", path: "/zones/{zone_id}/firewall/lockdowns" }),
920
+ ) as unknown as Schema.Schema<CreateLockdownRequest>;
921
+
922
+ export interface CreateLockdownResponse {
923
+ /** The unique identifier of the Zone Lockdown rule. */
924
+ id: string;
925
+ /** A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. */
926
+ configurations: unknown;
927
+ /** The timestamp of when the rule was created. */
928
+ createdOn: string;
929
+ /** An informative summary of the rule. */
930
+ description: string;
931
+ /** The timestamp of when the rule was last modified. */
932
+ modifiedOn: string;
933
+ /** When true, indicates that the rule is currently paused. */
934
+ paused: boolean;
935
+ /** The URLs to include in the rule definition. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. */
936
+ urls: string[];
937
+ }
938
+
939
+ export const CreateLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
940
+ {
941
+ id: Schema.String,
942
+ configurations: Schema.Unknown,
943
+ createdOn: Schema.String,
944
+ description: Schema.String,
945
+ modifiedOn: Schema.String,
946
+ paused: Schema.Boolean,
947
+ urls: Schema.Array(Schema.String),
948
+ },
949
+ ).pipe(
950
+ Schema.encodeKeys({
951
+ id: "id",
952
+ configurations: "configurations",
953
+ createdOn: "created_on",
954
+ description: "description",
955
+ modifiedOn: "modified_on",
956
+ paused: "paused",
957
+ urls: "urls",
958
+ }),
959
+ ) as unknown as Schema.Schema<CreateLockdownResponse>;
960
+
961
+ export type CreateLockdownError = DefaultErrors;
962
+
963
+ export const createLockdown: API.OperationMethod<
964
+ CreateLockdownRequest,
965
+ CreateLockdownResponse,
966
+ CreateLockdownError,
967
+ Credentials | HttpClient.HttpClient
968
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
969
+ input: CreateLockdownRequest,
970
+ output: CreateLockdownResponse,
971
+ errors: [],
972
+ }));
973
+
974
+ export interface UpdateLockdownRequest {
975
+ lockDownsId: string;
976
+ /** Path param: Defines an identifier. */
977
+ zoneId: string;
978
+ /** Body param: A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. */
979
+ configurations: unknown;
980
+ /** Body param: The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. */
981
+ urls: string[];
982
+ }
983
+
984
+ export const UpdateLockdownRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
985
+ lockDownsId: Schema.String.pipe(T.HttpPath("lockDownsId")),
986
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
987
+ configurations: Schema.Unknown,
988
+ urls: Schema.Array(Schema.String),
989
+ }).pipe(
990
+ T.Http({
991
+ method: "PUT",
992
+ path: "/zones/{zone_id}/firewall/lockdowns/{lockDownsId}",
993
+ }),
994
+ ) as unknown as Schema.Schema<UpdateLockdownRequest>;
995
+
996
+ export interface UpdateLockdownResponse {
997
+ /** The unique identifier of the Zone Lockdown rule. */
998
+ id: string;
999
+ /** A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. */
1000
+ configurations: unknown;
1001
+ /** The timestamp of when the rule was created. */
1002
+ createdOn: string;
1003
+ /** An informative summary of the rule. */
1004
+ description: string;
1005
+ /** The timestamp of when the rule was last modified. */
1006
+ modifiedOn: string;
1007
+ /** When true, indicates that the rule is currently paused. */
1008
+ paused: boolean;
1009
+ /** The URLs to include in the rule definition. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. */
1010
+ urls: string[];
1011
+ }
1012
+
1013
+ export const UpdateLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1014
+ {
1015
+ id: Schema.String,
1016
+ configurations: Schema.Unknown,
1017
+ createdOn: Schema.String,
1018
+ description: Schema.String,
1019
+ modifiedOn: Schema.String,
1020
+ paused: Schema.Boolean,
1021
+ urls: Schema.Array(Schema.String),
1022
+ },
1023
+ ).pipe(
1024
+ Schema.encodeKeys({
1025
+ id: "id",
1026
+ configurations: "configurations",
1027
+ createdOn: "created_on",
1028
+ description: "description",
1029
+ modifiedOn: "modified_on",
1030
+ paused: "paused",
1031
+ urls: "urls",
1032
+ }),
1033
+ ) as unknown as Schema.Schema<UpdateLockdownResponse>;
1034
+
1035
+ export type UpdateLockdownError = DefaultErrors;
1036
+
1037
+ export const updateLockdown: API.OperationMethod<
1038
+ UpdateLockdownRequest,
1039
+ UpdateLockdownResponse,
1040
+ UpdateLockdownError,
1041
+ Credentials | HttpClient.HttpClient
1042
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1043
+ input: UpdateLockdownRequest,
1044
+ output: UpdateLockdownResponse,
1045
+ errors: [],
1046
+ }));
1047
+
1048
+ export interface DeleteLockdownRequest {
1049
+ lockDownsId: string;
1050
+ /** Defines an identifier. */
1051
+ zoneId: string;
1052
+ }
1053
+
1054
+ export const DeleteLockdownRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1055
+ lockDownsId: Schema.String.pipe(T.HttpPath("lockDownsId")),
1056
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1057
+ }).pipe(
1058
+ T.Http({
1059
+ method: "DELETE",
1060
+ path: "/zones/{zone_id}/firewall/lockdowns/{lockDownsId}",
1061
+ }),
1062
+ ) as unknown as Schema.Schema<DeleteLockdownRequest>;
1063
+
1064
+ export interface DeleteLockdownResponse {
1065
+ /** The unique identifier of the Zone Lockdown rule. */
1066
+ id?: string | null;
1067
+ }
1068
+
1069
+ export const DeleteLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1070
+ {
1071
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1072
+ },
1073
+ ) as unknown as Schema.Schema<DeleteLockdownResponse>;
1074
+
1075
+ export type DeleteLockdownError = DefaultErrors;
1076
+
1077
+ export const deleteLockdown: API.OperationMethod<
1078
+ DeleteLockdownRequest,
1079
+ DeleteLockdownResponse,
1080
+ DeleteLockdownError,
1081
+ Credentials | HttpClient.HttpClient
1082
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1083
+ input: DeleteLockdownRequest,
1084
+ output: DeleteLockdownResponse,
1085
+ errors: [],
1086
+ }));
1087
+
1088
+ // =============================================================================
1089
+ // PutRule
1090
+ // =============================================================================
1091
+
1092
+ export interface BulkPutRulesRequest {
1093
+ /** Path param: Defines an identifier. */
1094
+ zoneId: string;
1095
+ /** Body param: */
1096
+ body: unknown;
1097
+ }
1098
+
1099
+ export const BulkPutRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1100
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1101
+ body: Schema.Unknown.pipe(T.HttpBody()),
1102
+ }).pipe(
1103
+ T.Http({ method: "PUT", path: "/zones/{zone_id}/firewall/rules" }),
1104
+ ) as unknown as Schema.Schema<BulkPutRulesRequest>;
1105
+
1106
+ export type BulkPutRulesResponse = {
1107
+ id?: string | null;
1108
+ action?:
1109
+ | "block"
1110
+ | "challenge"
1111
+ | "js_challenge"
1112
+ | "managed_challenge"
1113
+ | "allow"
1114
+ | "log"
1115
+ | "bypass"
1116
+ | null;
1117
+ description?: string | null;
1118
+ filter?: unknown | { id: string; deleted: boolean } | null;
1119
+ paused?: boolean | null;
1120
+ priority?: number | null;
1121
+ products?:
1122
+ | (
1123
+ | "zoneLockdown"
1124
+ | "uaBlock"
1125
+ | "bic"
1126
+ | "hot"
1127
+ | "securityLevel"
1128
+ | "rateLimit"
1129
+ | "waf"
1130
+ )[]
1131
+ | null;
1132
+ ref?: string | null;
1133
+ }[];
1134
+
1135
+ export const BulkPutRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1136
+ Schema.Struct({
1137
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1138
+ action: Schema.optional(
1139
+ Schema.Union([
1140
+ Schema.Literals([
1141
+ "block",
1142
+ "challenge",
1143
+ "js_challenge",
1144
+ "managed_challenge",
1145
+ "allow",
1146
+ "log",
1147
+ "bypass",
1148
+ ]),
1149
+ Schema.Null,
1150
+ ]),
1151
+ ),
1152
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1153
+ filter: Schema.optional(
1154
+ Schema.Union([
1155
+ Schema.Union([
1156
+ Schema.Unknown,
1157
+ Schema.Struct({
1158
+ id: Schema.String,
1159
+ deleted: Schema.Boolean,
1160
+ }),
1161
+ ]),
1162
+ Schema.Null,
1163
+ ]),
1164
+ ),
1165
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1166
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1167
+ products: Schema.optional(
1168
+ Schema.Union([
1169
+ Schema.Array(
1170
+ Schema.Literals([
1171
+ "zoneLockdown",
1172
+ "uaBlock",
1173
+ "bic",
1174
+ "hot",
1175
+ "securityLevel",
1176
+ "rateLimit",
1177
+ "waf",
1178
+ ]),
1179
+ ),
1180
+ Schema.Null,
1181
+ ]),
1182
+ ),
1183
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1184
+ }),
1185
+ ) as unknown as Schema.Schema<BulkPutRulesResponse>;
1186
+
1187
+ export type BulkPutRulesError = DefaultErrors;
1188
+
1189
+ export const bulkPutRules: API.OperationMethod<
1190
+ BulkPutRulesRequest,
1191
+ BulkPutRulesResponse,
1192
+ BulkPutRulesError,
1193
+ Credentials | HttpClient.HttpClient
1194
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1195
+ input: BulkPutRulesRequest,
1196
+ output: BulkPutRulesResponse,
1197
+ errors: [],
1198
+ }));
1199
+
1200
+ // =============================================================================
1201
+ // Rule
1202
+ // =============================================================================
1203
+
1204
+ export interface GetRuleRequest {
1205
+ ruleId: string;
1206
+ /** Defines an identifier. */
1207
+ zoneId: string;
1208
+ }
1209
+
1210
+ export const GetRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1211
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
1212
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1213
+ }).pipe(
1214
+ T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/rules/{ruleId}" }),
1215
+ ) as unknown as Schema.Schema<GetRuleRequest>;
1216
+
1217
+ export interface GetRuleResponse {
1218
+ /** The unique identifier of the firewall rule. */
1219
+ id?: string | null;
1220
+ /** The action to apply to a matched request. The `log` action is only available on an Enterprise plan. */
1221
+ action?:
1222
+ | "block"
1223
+ | "challenge"
1224
+ | "js_challenge"
1225
+ | "managed_challenge"
1226
+ | "allow"
1227
+ | "log"
1228
+ | "bypass"
1229
+ | null;
1230
+ /** An informative summary of the firewall rule. */
1231
+ description?: string | null;
1232
+ filter?: unknown | { id: string; deleted: boolean } | null;
1233
+ /** When true, indicates that the firewall rule is currently paused. */
1234
+ paused?: boolean | null;
1235
+ /** The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules */
1236
+ priority?: number | null;
1237
+ products?:
1238
+ | (
1239
+ | "zoneLockdown"
1240
+ | "uaBlock"
1241
+ | "bic"
1242
+ | "hot"
1243
+ | "securityLevel"
1244
+ | "rateLimit"
1245
+ | "waf"
1246
+ )[]
1247
+ | null;
1248
+ /** A short reference tag. Allows you to select related firewall rules. */
1249
+ ref?: string | null;
1250
+ }
1251
+
1252
+ export const GetRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1253
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1254
+ action: Schema.optional(
1255
+ Schema.Union([
1256
+ Schema.Literals([
1257
+ "block",
1258
+ "challenge",
1259
+ "js_challenge",
1260
+ "managed_challenge",
1261
+ "allow",
1262
+ "log",
1263
+ "bypass",
1264
+ ]),
1265
+ Schema.Null,
1266
+ ]),
1267
+ ),
1268
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1269
+ filter: Schema.optional(
1270
+ Schema.Union([
1271
+ Schema.Union([
1272
+ Schema.Unknown,
1273
+ Schema.Struct({
1274
+ id: Schema.String,
1275
+ deleted: Schema.Boolean,
1276
+ }),
1277
+ ]),
1278
+ Schema.Null,
1279
+ ]),
1280
+ ),
1281
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1282
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1283
+ products: Schema.optional(
1284
+ Schema.Union([
1285
+ Schema.Array(
1286
+ Schema.Literals([
1287
+ "zoneLockdown",
1288
+ "uaBlock",
1289
+ "bic",
1290
+ "hot",
1291
+ "securityLevel",
1292
+ "rateLimit",
1293
+ "waf",
1294
+ ]),
1295
+ ),
1296
+ Schema.Null,
1297
+ ]),
1298
+ ),
1299
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1300
+ }) as unknown as Schema.Schema<GetRuleResponse>;
1301
+
1302
+ export type GetRuleError = DefaultErrors;
1303
+
1304
+ export const getRule: API.OperationMethod<
1305
+ GetRuleRequest,
1306
+ GetRuleResponse,
1307
+ GetRuleError,
1308
+ Credentials | HttpClient.HttpClient
1309
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1310
+ input: GetRuleRequest,
1311
+ output: GetRuleResponse,
1312
+ errors: [],
1313
+ }));
1314
+
1315
+ export interface ListRulesRequest {
1316
+ /** Path param: Defines an identifier. */
1317
+ zoneId: string;
1318
+ /** Query param: The unique identifier of the firewall rule. */
1319
+ id?: string;
1320
+ /** Query param: The action to search for. Must be an exact match. */
1321
+ action?: string;
1322
+ /** Query param: A case-insensitive string to find in the description. */
1323
+ description?: string;
1324
+ /** Query param: When true, indicates that the firewall rule is currently paused. */
1325
+ paused?: boolean;
1326
+ }
1327
+
1328
+ export const ListRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1329
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1330
+ id: Schema.optional(Schema.String).pipe(T.HttpQuery("id")),
1331
+ action: Schema.optional(Schema.String).pipe(T.HttpQuery("action")),
1332
+ description: Schema.optional(Schema.String).pipe(T.HttpQuery("description")),
1333
+ paused: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("paused")),
1334
+ }).pipe(
1335
+ T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/rules" }),
1336
+ ) as unknown as Schema.Schema<ListRulesRequest>;
1337
+
1338
+ export type ListRulesResponse = {
1339
+ id?: string | null;
1340
+ action?:
1341
+ | "block"
1342
+ | "challenge"
1343
+ | "js_challenge"
1344
+ | "managed_challenge"
1345
+ | "allow"
1346
+ | "log"
1347
+ | "bypass"
1348
+ | null;
1349
+ description?: string | null;
1350
+ filter?: unknown | { id: string; deleted: boolean } | null;
1351
+ paused?: boolean | null;
1352
+ priority?: number | null;
1353
+ products?:
1354
+ | (
1355
+ | "zoneLockdown"
1356
+ | "uaBlock"
1357
+ | "bic"
1358
+ | "hot"
1359
+ | "securityLevel"
1360
+ | "rateLimit"
1361
+ | "waf"
1362
+ )[]
1363
+ | null;
1364
+ ref?: string | null;
1365
+ }[];
1366
+
1367
+ export const ListRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1368
+ Schema.Struct({
1369
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1370
+ action: Schema.optional(
1371
+ Schema.Union([
1372
+ Schema.Literals([
1373
+ "block",
1374
+ "challenge",
1375
+ "js_challenge",
1376
+ "managed_challenge",
1377
+ "allow",
1378
+ "log",
1379
+ "bypass",
1380
+ ]),
1381
+ Schema.Null,
1382
+ ]),
1383
+ ),
1384
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1385
+ filter: Schema.optional(
1386
+ Schema.Union([
1387
+ Schema.Union([
1388
+ Schema.Unknown,
1389
+ Schema.Struct({
1390
+ id: Schema.String,
1391
+ deleted: Schema.Boolean,
1392
+ }),
1393
+ ]),
1394
+ Schema.Null,
1395
+ ]),
1396
+ ),
1397
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1398
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1399
+ products: Schema.optional(
1400
+ Schema.Union([
1401
+ Schema.Array(
1402
+ Schema.Literals([
1403
+ "zoneLockdown",
1404
+ "uaBlock",
1405
+ "bic",
1406
+ "hot",
1407
+ "securityLevel",
1408
+ "rateLimit",
1409
+ "waf",
1410
+ ]),
1411
+ ),
1412
+ Schema.Null,
1413
+ ]),
1414
+ ),
1415
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1416
+ }),
1417
+ ) as unknown as Schema.Schema<ListRulesResponse>;
1418
+
1419
+ export type ListRulesError = DefaultErrors;
1420
+
1421
+ export const listRules: API.OperationMethod<
1422
+ ListRulesRequest,
1423
+ ListRulesResponse,
1424
+ ListRulesError,
1425
+ Credentials | HttpClient.HttpClient
1426
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1427
+ input: ListRulesRequest,
1428
+ output: ListRulesResponse,
1429
+ errors: [],
1430
+ }));
1431
+
1432
+ export interface CreateRuleRequest {
1433
+ /** Path param: Defines an identifier. */
1434
+ zoneId: string;
1435
+ /** Body param: The action to perform when the threshold of matched traffic within the configured period is exceeded. */
1436
+ action: {
1437
+ mode?:
1438
+ | "simulate"
1439
+ | "ban"
1440
+ | "challenge"
1441
+ | "js_challenge"
1442
+ | "managed_challenge";
1443
+ response?: { body?: string; contentType?: string };
1444
+ timeout?: number;
1445
+ };
1446
+ /** Body param: */
1447
+ filter: unknown;
1448
+ }
1449
+
1450
+ export const CreateRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1451
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1452
+ action: Schema.Struct({
1453
+ mode: Schema.optional(
1454
+ Schema.Literals([
1455
+ "simulate",
1456
+ "ban",
1457
+ "challenge",
1458
+ "js_challenge",
1459
+ "managed_challenge",
1460
+ ]),
1461
+ ),
1462
+ response: Schema.optional(
1463
+ Schema.Struct({
1464
+ body: Schema.optional(Schema.String),
1465
+ contentType: Schema.optional(Schema.String),
1466
+ }).pipe(Schema.encodeKeys({ body: "body", contentType: "content_type" })),
1467
+ ),
1468
+ timeout: Schema.optional(Schema.Number),
1469
+ }),
1470
+ filter: Schema.Unknown,
1471
+ }).pipe(
1472
+ T.Http({ method: "POST", path: "/zones/{zone_id}/firewall/rules" }),
1473
+ ) as unknown as Schema.Schema<CreateRuleRequest>;
1474
+
1475
+ export type CreateRuleResponse = {
1476
+ id?: string | null;
1477
+ action?:
1478
+ | "block"
1479
+ | "challenge"
1480
+ | "js_challenge"
1481
+ | "managed_challenge"
1482
+ | "allow"
1483
+ | "log"
1484
+ | "bypass"
1485
+ | null;
1486
+ description?: string | null;
1487
+ filter?: unknown | { id: string; deleted: boolean } | null;
1488
+ paused?: boolean | null;
1489
+ priority?: number | null;
1490
+ products?:
1491
+ | (
1492
+ | "zoneLockdown"
1493
+ | "uaBlock"
1494
+ | "bic"
1495
+ | "hot"
1496
+ | "securityLevel"
1497
+ | "rateLimit"
1498
+ | "waf"
1499
+ )[]
1500
+ | null;
1501
+ ref?: string | null;
1502
+ }[];
1503
+
1504
+ export const CreateRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1505
+ Schema.Struct({
1506
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1507
+ action: Schema.optional(
1508
+ Schema.Union([
1509
+ Schema.Literals([
1510
+ "block",
1511
+ "challenge",
1512
+ "js_challenge",
1513
+ "managed_challenge",
1514
+ "allow",
1515
+ "log",
1516
+ "bypass",
1517
+ ]),
1518
+ Schema.Null,
1519
+ ]),
1520
+ ),
1521
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1522
+ filter: Schema.optional(
1523
+ Schema.Union([
1524
+ Schema.Union([
1525
+ Schema.Unknown,
1526
+ Schema.Struct({
1527
+ id: Schema.String,
1528
+ deleted: Schema.Boolean,
1529
+ }),
1530
+ ]),
1531
+ Schema.Null,
1532
+ ]),
1533
+ ),
1534
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1535
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1536
+ products: Schema.optional(
1537
+ Schema.Union([
1538
+ Schema.Array(
1539
+ Schema.Literals([
1540
+ "zoneLockdown",
1541
+ "uaBlock",
1542
+ "bic",
1543
+ "hot",
1544
+ "securityLevel",
1545
+ "rateLimit",
1546
+ "waf",
1547
+ ]),
1548
+ ),
1549
+ Schema.Null,
1550
+ ]),
1551
+ ),
1552
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1553
+ }),
1554
+ ) as unknown as Schema.Schema<CreateRuleResponse>;
1555
+
1556
+ export type CreateRuleError = DefaultErrors;
1557
+
1558
+ export const createRule: API.OperationMethod<
1559
+ CreateRuleRequest,
1560
+ CreateRuleResponse,
1561
+ CreateRuleError,
1562
+ Credentials | HttpClient.HttpClient
1563
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1564
+ input: CreateRuleRequest,
1565
+ output: CreateRuleResponse,
1566
+ errors: [],
1567
+ }));
1568
+
1569
+ export interface UpdateRuleRequest {
1570
+ ruleId: string;
1571
+ /** Path param: Defines an identifier. */
1572
+ zoneId: string;
1573
+ /** Body param: The action to perform when the threshold of matched traffic within the configured period is exceeded. */
1574
+ action: {
1575
+ mode?:
1576
+ | "simulate"
1577
+ | "ban"
1578
+ | "challenge"
1579
+ | "js_challenge"
1580
+ | "managed_challenge";
1581
+ response?: { body?: string; contentType?: string };
1582
+ timeout?: number;
1583
+ };
1584
+ /** Body param: */
1585
+ filter: unknown;
1586
+ }
1587
+
1588
+ export const UpdateRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1589
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
1590
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1591
+ action: Schema.Struct({
1592
+ mode: Schema.optional(
1593
+ Schema.Literals([
1594
+ "simulate",
1595
+ "ban",
1596
+ "challenge",
1597
+ "js_challenge",
1598
+ "managed_challenge",
1599
+ ]),
1600
+ ),
1601
+ response: Schema.optional(
1602
+ Schema.Struct({
1603
+ body: Schema.optional(Schema.String),
1604
+ contentType: Schema.optional(Schema.String),
1605
+ }).pipe(Schema.encodeKeys({ body: "body", contentType: "content_type" })),
1606
+ ),
1607
+ timeout: Schema.optional(Schema.Number),
1608
+ }),
1609
+ filter: Schema.Unknown,
1610
+ }).pipe(
1611
+ T.Http({ method: "PUT", path: "/zones/{zone_id}/firewall/rules/{ruleId}" }),
1612
+ ) as unknown as Schema.Schema<UpdateRuleRequest>;
1613
+
1614
+ export interface UpdateRuleResponse {
1615
+ /** The unique identifier of the firewall rule. */
1616
+ id?: string | null;
1617
+ /** The action to apply to a matched request. The `log` action is only available on an Enterprise plan. */
1618
+ action?:
1619
+ | "block"
1620
+ | "challenge"
1621
+ | "js_challenge"
1622
+ | "managed_challenge"
1623
+ | "allow"
1624
+ | "log"
1625
+ | "bypass"
1626
+ | null;
1627
+ /** An informative summary of the firewall rule. */
1628
+ description?: string | null;
1629
+ filter?: unknown | { id: string; deleted: boolean } | null;
1630
+ /** When true, indicates that the firewall rule is currently paused. */
1631
+ paused?: boolean | null;
1632
+ /** The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules */
1633
+ priority?: number | null;
1634
+ products?:
1635
+ | (
1636
+ | "zoneLockdown"
1637
+ | "uaBlock"
1638
+ | "bic"
1639
+ | "hot"
1640
+ | "securityLevel"
1641
+ | "rateLimit"
1642
+ | "waf"
1643
+ )[]
1644
+ | null;
1645
+ /** A short reference tag. Allows you to select related firewall rules. */
1646
+ ref?: string | null;
1647
+ }
1648
+
1649
+ export const UpdateRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1650
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1651
+ action: Schema.optional(
1652
+ Schema.Union([
1653
+ Schema.Literals([
1654
+ "block",
1655
+ "challenge",
1656
+ "js_challenge",
1657
+ "managed_challenge",
1658
+ "allow",
1659
+ "log",
1660
+ "bypass",
1661
+ ]),
1662
+ Schema.Null,
1663
+ ]),
1664
+ ),
1665
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1666
+ filter: Schema.optional(
1667
+ Schema.Union([
1668
+ Schema.Union([
1669
+ Schema.Unknown,
1670
+ Schema.Struct({
1671
+ id: Schema.String,
1672
+ deleted: Schema.Boolean,
1673
+ }),
1674
+ ]),
1675
+ Schema.Null,
1676
+ ]),
1677
+ ),
1678
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1679
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1680
+ products: Schema.optional(
1681
+ Schema.Union([
1682
+ Schema.Array(
1683
+ Schema.Literals([
1684
+ "zoneLockdown",
1685
+ "uaBlock",
1686
+ "bic",
1687
+ "hot",
1688
+ "securityLevel",
1689
+ "rateLimit",
1690
+ "waf",
1691
+ ]),
1692
+ ),
1693
+ Schema.Null,
1694
+ ]),
1695
+ ),
1696
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1697
+ }) as unknown as Schema.Schema<UpdateRuleResponse>;
1698
+
1699
+ export type UpdateRuleError = DefaultErrors;
1700
+
1701
+ export const updateRule: API.OperationMethod<
1702
+ UpdateRuleRequest,
1703
+ UpdateRuleResponse,
1704
+ UpdateRuleError,
1705
+ Credentials | HttpClient.HttpClient
1706
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1707
+ input: UpdateRuleRequest,
1708
+ output: UpdateRuleResponse,
1709
+ errors: [],
1710
+ }));
1711
+
1712
+ export interface PatchRuleRequest {
1713
+ ruleId: string;
1714
+ /** Defines an identifier. */
1715
+ zoneId: string;
1716
+ }
1717
+
1718
+ export const PatchRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1719
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
1720
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1721
+ }).pipe(
1722
+ T.Http({ method: "PATCH", path: "/zones/{zone_id}/firewall/rules/{ruleId}" }),
1723
+ ) as unknown as Schema.Schema<PatchRuleRequest>;
1724
+
1725
+ export type PatchRuleResponse = {
1726
+ id?: string | null;
1727
+ action?:
1728
+ | "block"
1729
+ | "challenge"
1730
+ | "js_challenge"
1731
+ | "managed_challenge"
1732
+ | "allow"
1733
+ | "log"
1734
+ | "bypass"
1735
+ | null;
1736
+ description?: string | null;
1737
+ filter?: unknown | { id: string; deleted: boolean } | null;
1738
+ paused?: boolean | null;
1739
+ priority?: number | null;
1740
+ products?:
1741
+ | (
1742
+ | "zoneLockdown"
1743
+ | "uaBlock"
1744
+ | "bic"
1745
+ | "hot"
1746
+ | "securityLevel"
1747
+ | "rateLimit"
1748
+ | "waf"
1749
+ )[]
1750
+ | null;
1751
+ ref?: string | null;
1752
+ }[];
1753
+
1754
+ export const PatchRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1755
+ Schema.Struct({
1756
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1757
+ action: Schema.optional(
1758
+ Schema.Union([
1759
+ Schema.Literals([
1760
+ "block",
1761
+ "challenge",
1762
+ "js_challenge",
1763
+ "managed_challenge",
1764
+ "allow",
1765
+ "log",
1766
+ "bypass",
1767
+ ]),
1768
+ Schema.Null,
1769
+ ]),
1770
+ ),
1771
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1772
+ filter: Schema.optional(
1773
+ Schema.Union([
1774
+ Schema.Union([
1775
+ Schema.Unknown,
1776
+ Schema.Struct({
1777
+ id: Schema.String,
1778
+ deleted: Schema.Boolean,
1779
+ }),
1780
+ ]),
1781
+ Schema.Null,
1782
+ ]),
1783
+ ),
1784
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1785
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1786
+ products: Schema.optional(
1787
+ Schema.Union([
1788
+ Schema.Array(
1789
+ Schema.Literals([
1790
+ "zoneLockdown",
1791
+ "uaBlock",
1792
+ "bic",
1793
+ "hot",
1794
+ "securityLevel",
1795
+ "rateLimit",
1796
+ "waf",
1797
+ ]),
1798
+ ),
1799
+ Schema.Null,
1800
+ ]),
1801
+ ),
1802
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1803
+ }),
1804
+ ) as unknown as Schema.Schema<PatchRuleResponse>;
1805
+
1806
+ export type PatchRuleError = DefaultErrors;
1807
+
1808
+ export const patchRule: API.OperationMethod<
1809
+ PatchRuleRequest,
1810
+ PatchRuleResponse,
1811
+ PatchRuleError,
1812
+ Credentials | HttpClient.HttpClient
1813
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1814
+ input: PatchRuleRequest,
1815
+ output: PatchRuleResponse,
1816
+ errors: [],
1817
+ }));
1818
+
1819
+ export interface DeleteRuleRequest {
1820
+ ruleId: string;
1821
+ /** Defines an identifier. */
1822
+ zoneId: string;
1823
+ }
1824
+
1825
+ export const DeleteRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1826
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
1827
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1828
+ }).pipe(
1829
+ T.Http({
1830
+ method: "DELETE",
1831
+ path: "/zones/{zone_id}/firewall/rules/{ruleId}",
1832
+ }),
1833
+ ) as unknown as Schema.Schema<DeleteRuleRequest>;
1834
+
1835
+ export interface DeleteRuleResponse {
1836
+ /** The unique identifier of the firewall rule. */
1837
+ id?: string | null;
1838
+ /** The action to apply to a matched request. The `log` action is only available on an Enterprise plan. */
1839
+ action?:
1840
+ | "block"
1841
+ | "challenge"
1842
+ | "js_challenge"
1843
+ | "managed_challenge"
1844
+ | "allow"
1845
+ | "log"
1846
+ | "bypass"
1847
+ | null;
1848
+ /** An informative summary of the firewall rule. */
1849
+ description?: string | null;
1850
+ filter?: unknown | { id: string; deleted: boolean } | null;
1851
+ /** When true, indicates that the firewall rule is currently paused. */
1852
+ paused?: boolean | null;
1853
+ /** The priority of the rule. Optional value used to define the processing order. A lower number indicates a higher priority. If not provided, rules with a defined priority will be processed before rules */
1854
+ priority?: number | null;
1855
+ products?:
1856
+ | (
1857
+ | "zoneLockdown"
1858
+ | "uaBlock"
1859
+ | "bic"
1860
+ | "hot"
1861
+ | "securityLevel"
1862
+ | "rateLimit"
1863
+ | "waf"
1864
+ )[]
1865
+ | null;
1866
+ /** A short reference tag. Allows you to select related firewall rules. */
1867
+ ref?: string | null;
1868
+ }
1869
+
1870
+ export const DeleteRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1871
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1872
+ action: Schema.optional(
1873
+ Schema.Union([
1874
+ Schema.Literals([
1875
+ "block",
1876
+ "challenge",
1877
+ "js_challenge",
1878
+ "managed_challenge",
1879
+ "allow",
1880
+ "log",
1881
+ "bypass",
1882
+ ]),
1883
+ Schema.Null,
1884
+ ]),
1885
+ ),
1886
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1887
+ filter: Schema.optional(
1888
+ Schema.Union([
1889
+ Schema.Union([
1890
+ Schema.Unknown,
1891
+ Schema.Struct({
1892
+ id: Schema.String,
1893
+ deleted: Schema.Boolean,
1894
+ }),
1895
+ ]),
1896
+ Schema.Null,
1897
+ ]),
1898
+ ),
1899
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1900
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1901
+ products: Schema.optional(
1902
+ Schema.Union([
1903
+ Schema.Array(
1904
+ Schema.Literals([
1905
+ "zoneLockdown",
1906
+ "uaBlock",
1907
+ "bic",
1908
+ "hot",
1909
+ "securityLevel",
1910
+ "rateLimit",
1911
+ "waf",
1912
+ ]),
1913
+ ),
1914
+ Schema.Null,
1915
+ ]),
1916
+ ),
1917
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1918
+ }) as unknown as Schema.Schema<DeleteRuleResponse>;
1919
+
1920
+ export type DeleteRuleError = DefaultErrors;
1921
+
1922
+ export const deleteRule: API.OperationMethod<
1923
+ DeleteRuleRequest,
1924
+ DeleteRuleResponse,
1925
+ DeleteRuleError,
1926
+ Credentials | HttpClient.HttpClient
1927
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1928
+ input: DeleteRuleRequest,
1929
+ output: DeleteRuleResponse,
1930
+ errors: [],
1931
+ }));
1932
+
1933
+ export interface BulkPatchRulesRequest {
1934
+ /** Path param: Defines an identifier. */
1935
+ zoneId: string;
1936
+ /** Body param: */
1937
+ body: unknown;
1938
+ }
1939
+
1940
+ export const BulkPatchRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1941
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1942
+ body: Schema.Unknown.pipe(T.HttpBody()),
1943
+ }).pipe(
1944
+ T.Http({ method: "PATCH", path: "/zones/{zone_id}/firewall/rules" }),
1945
+ ) as unknown as Schema.Schema<BulkPatchRulesRequest>;
1946
+
1947
+ export type BulkPatchRulesResponse = {
1948
+ id?: string | null;
1949
+ action?:
1950
+ | "block"
1951
+ | "challenge"
1952
+ | "js_challenge"
1953
+ | "managed_challenge"
1954
+ | "allow"
1955
+ | "log"
1956
+ | "bypass"
1957
+ | null;
1958
+ description?: string | null;
1959
+ filter?: unknown | { id: string; deleted: boolean } | null;
1960
+ paused?: boolean | null;
1961
+ priority?: number | null;
1962
+ products?:
1963
+ | (
1964
+ | "zoneLockdown"
1965
+ | "uaBlock"
1966
+ | "bic"
1967
+ | "hot"
1968
+ | "securityLevel"
1969
+ | "rateLimit"
1970
+ | "waf"
1971
+ )[]
1972
+ | null;
1973
+ ref?: string | null;
1974
+ }[];
1975
+
1976
+ export const BulkPatchRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
1977
+ Schema.Struct({
1978
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1979
+ action: Schema.optional(
1980
+ Schema.Union([
1981
+ Schema.Literals([
1982
+ "block",
1983
+ "challenge",
1984
+ "js_challenge",
1985
+ "managed_challenge",
1986
+ "allow",
1987
+ "log",
1988
+ "bypass",
1989
+ ]),
1990
+ Schema.Null,
1991
+ ]),
1992
+ ),
1993
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1994
+ filter: Schema.optional(
1995
+ Schema.Union([
1996
+ Schema.Union([
1997
+ Schema.Unknown,
1998
+ Schema.Struct({
1999
+ id: Schema.String,
2000
+ deleted: Schema.Boolean,
2001
+ }),
2002
+ ]),
2003
+ Schema.Null,
2004
+ ]),
2005
+ ),
2006
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2007
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2008
+ products: Schema.optional(
2009
+ Schema.Union([
2010
+ Schema.Array(
2011
+ Schema.Literals([
2012
+ "zoneLockdown",
2013
+ "uaBlock",
2014
+ "bic",
2015
+ "hot",
2016
+ "securityLevel",
2017
+ "rateLimit",
2018
+ "waf",
2019
+ ]),
2020
+ ),
2021
+ Schema.Null,
2022
+ ]),
2023
+ ),
2024
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2025
+ }),
2026
+ ) as unknown as Schema.Schema<BulkPatchRulesResponse>;
2027
+
2028
+ export type BulkPatchRulesError = DefaultErrors;
2029
+
2030
+ export const bulkPatchRules: API.OperationMethod<
2031
+ BulkPatchRulesRequest,
2032
+ BulkPatchRulesResponse,
2033
+ BulkPatchRulesError,
2034
+ Credentials | HttpClient.HttpClient
2035
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2036
+ input: BulkPatchRulesRequest,
2037
+ output: BulkPatchRulesResponse,
2038
+ errors: [],
2039
+ }));
2040
+
2041
+ export interface BulkDeleteRulesRequest {
2042
+ /** Defines an identifier. */
2043
+ zoneId: string;
2044
+ }
2045
+
2046
+ export const BulkDeleteRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
2047
+ {
2048
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2049
+ },
2050
+ ).pipe(
2051
+ T.Http({ method: "DELETE", path: "/zones/{zone_id}/firewall/rules" }),
2052
+ ) as unknown as Schema.Schema<BulkDeleteRulesRequest>;
2053
+
2054
+ export type BulkDeleteRulesResponse = {
2055
+ id?: string | null;
2056
+ action?:
2057
+ | "block"
2058
+ | "challenge"
2059
+ | "js_challenge"
2060
+ | "managed_challenge"
2061
+ | "allow"
2062
+ | "log"
2063
+ | "bypass"
2064
+ | null;
2065
+ description?: string | null;
2066
+ filter?: unknown | { id: string; deleted: boolean } | null;
2067
+ paused?: boolean | null;
2068
+ priority?: number | null;
2069
+ products?:
2070
+ | (
2071
+ | "zoneLockdown"
2072
+ | "uaBlock"
2073
+ | "bic"
2074
+ | "hot"
2075
+ | "securityLevel"
2076
+ | "rateLimit"
2077
+ | "waf"
2078
+ )[]
2079
+ | null;
2080
+ ref?: string | null;
2081
+ }[];
2082
+
2083
+ export const BulkDeleteRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2084
+ Schema.Struct({
2085
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2086
+ action: Schema.optional(
2087
+ Schema.Union([
2088
+ Schema.Literals([
2089
+ "block",
2090
+ "challenge",
2091
+ "js_challenge",
2092
+ "managed_challenge",
2093
+ "allow",
2094
+ "log",
2095
+ "bypass",
2096
+ ]),
2097
+ Schema.Null,
2098
+ ]),
2099
+ ),
2100
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2101
+ filter: Schema.optional(
2102
+ Schema.Union([
2103
+ Schema.Union([
2104
+ Schema.Unknown,
2105
+ Schema.Struct({
2106
+ id: Schema.String,
2107
+ deleted: Schema.Boolean,
2108
+ }),
2109
+ ]),
2110
+ Schema.Null,
2111
+ ]),
2112
+ ),
2113
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2114
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2115
+ products: Schema.optional(
2116
+ Schema.Union([
2117
+ Schema.Array(
2118
+ Schema.Literals([
2119
+ "zoneLockdown",
2120
+ "uaBlock",
2121
+ "bic",
2122
+ "hot",
2123
+ "securityLevel",
2124
+ "rateLimit",
2125
+ "waf",
2126
+ ]),
2127
+ ),
2128
+ Schema.Null,
2129
+ ]),
2130
+ ),
2131
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2132
+ }),
2133
+ ) as unknown as Schema.Schema<BulkDeleteRulesResponse>;
2134
+
2135
+ export type BulkDeleteRulesError = DefaultErrors;
2136
+
2137
+ export const bulkDeleteRules: API.OperationMethod<
2138
+ BulkDeleteRulesRequest,
2139
+ BulkDeleteRulesResponse,
2140
+ BulkDeleteRulesError,
2141
+ Credentials | HttpClient.HttpClient
2142
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2143
+ input: BulkDeleteRulesRequest,
2144
+ output: BulkDeleteRulesResponse,
2145
+ errors: [],
2146
+ }));
2147
+
2148
+ // =============================================================================
2149
+ // UaRule
2150
+ // =============================================================================
2151
+
2152
+ export interface GetUaRuleRequest {
2153
+ uaRuleId: string;
2154
+ /** Defines an identifier. */
2155
+ zoneId: string;
2156
+ }
2157
+
2158
+ export const GetUaRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2159
+ uaRuleId: Schema.String.pipe(T.HttpPath("uaRuleId")),
2160
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2161
+ }).pipe(
2162
+ T.Http({
2163
+ method: "GET",
2164
+ path: "/zones/{zone_id}/firewall/ua_rules/{uaRuleId}",
2165
+ }),
2166
+ ) as unknown as Schema.Schema<GetUaRuleRequest>;
2167
+
2168
+ export interface GetUaRuleResponse {
2169
+ /** The unique identifier of the User Agent Blocking rule. */
2170
+ id?: string | null;
2171
+ /** The configuration object for the current rule. */
2172
+ configuration?: { target?: string | null; value?: string | null } | null;
2173
+ /** An informative summary of the rule. */
2174
+ description?: string | null;
2175
+ /** The action to apply to a matched request. */
2176
+ mode?: "block" | "challenge" | "js_challenge" | "managed_challenge" | null;
2177
+ /** When true, indicates that the rule is currently paused. */
2178
+ paused?: boolean | null;
2179
+ }
2180
+
2181
+ export const GetUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2182
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2183
+ configuration: Schema.optional(
2184
+ Schema.Union([
2185
+ Schema.Struct({
2186
+ target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2187
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2188
+ }),
2189
+ Schema.Null,
2190
+ ]),
2191
+ ),
2192
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2193
+ mode: Schema.optional(
2194
+ Schema.Union([
2195
+ Schema.Literals([
2196
+ "block",
2197
+ "challenge",
2198
+ "js_challenge",
2199
+ "managed_challenge",
2200
+ ]),
2201
+ Schema.Null,
2202
+ ]),
2203
+ ),
2204
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2205
+ }) as unknown as Schema.Schema<GetUaRuleResponse>;
2206
+
2207
+ export type GetUaRuleError = DefaultErrors;
2208
+
2209
+ export const getUaRule: API.OperationMethod<
2210
+ GetUaRuleRequest,
2211
+ GetUaRuleResponse,
2212
+ GetUaRuleError,
2213
+ Credentials | HttpClient.HttpClient
2214
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2215
+ input: GetUaRuleRequest,
2216
+ output: GetUaRuleResponse,
2217
+ errors: [],
2218
+ }));
2219
+
2220
+ export interface ListUaRulesRequest {
2221
+ /** Path param: Defines an identifier. */
2222
+ zoneId: string;
2223
+ /** Query param: A string to search for in the description of existing rules. */
2224
+ description?: string;
2225
+ /** Query param: When true, indicates that the rule is currently paused. */
2226
+ paused?: boolean;
2227
+ /** Query param: A string to search for in the user agent values of existing rules. */
2228
+ userAgent?: string;
2229
+ }
2230
+
2231
+ export const ListUaRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2232
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2233
+ description: Schema.optional(Schema.String).pipe(T.HttpQuery("description")),
2234
+ paused: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("paused")),
2235
+ userAgent: Schema.optional(Schema.String).pipe(T.HttpQuery("user_agent")),
2236
+ }).pipe(
2237
+ T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/ua_rules" }),
2238
+ ) as unknown as Schema.Schema<ListUaRulesRequest>;
2239
+
2240
+ export type ListUaRulesResponse = {
2241
+ id?: string | null;
2242
+ configuration?: { target?: string | null; value?: string | null } | null;
2243
+ description?: string | null;
2244
+ mode?: "block" | "challenge" | "js_challenge" | "managed_challenge" | null;
2245
+ paused?: boolean | null;
2246
+ }[];
2247
+
2248
+ export const ListUaRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2249
+ Schema.Struct({
2250
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2251
+ configuration: Schema.optional(
2252
+ Schema.Union([
2253
+ Schema.Struct({
2254
+ target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2255
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2256
+ }),
2257
+ Schema.Null,
2258
+ ]),
2259
+ ),
2260
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2261
+ mode: Schema.optional(
2262
+ Schema.Union([
2263
+ Schema.Literals([
2264
+ "block",
2265
+ "challenge",
2266
+ "js_challenge",
2267
+ "managed_challenge",
2268
+ ]),
2269
+ Schema.Null,
2270
+ ]),
2271
+ ),
2272
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2273
+ }),
2274
+ ) as unknown as Schema.Schema<ListUaRulesResponse>;
2275
+
2276
+ export type ListUaRulesError = DefaultErrors;
2277
+
2278
+ export const listUaRules: API.OperationMethod<
2279
+ ListUaRulesRequest,
2280
+ ListUaRulesResponse,
2281
+ ListUaRulesError,
2282
+ Credentials | HttpClient.HttpClient
2283
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2284
+ input: ListUaRulesRequest,
2285
+ output: ListUaRulesResponse,
2286
+ errors: [],
2287
+ }));
2288
+
2289
+ export interface CreateUaRuleRequest {
2290
+ /** Path param: Defines an identifier. */
2291
+ zoneId: string;
2292
+ /** Body param: */
2293
+ configuration: { target?: "ua"; value?: string };
2294
+ /** Body param: The action to apply to a matched request. */
2295
+ mode:
2296
+ | "block"
2297
+ | "challenge"
2298
+ | "whitelist"
2299
+ | "js_challenge"
2300
+ | "managed_challenge";
2301
+ /** Body param: An informative summary of the rule. This value is sanitized and any tags will be removed. */
2302
+ description?: string;
2303
+ /** Body param: When true, indicates that the rule is currently paused. */
2304
+ paused?: boolean;
2305
+ }
2306
+
2307
+ export const CreateUaRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2308
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2309
+ configuration: Schema.Struct({
2310
+ target: Schema.optional(Schema.Literal("ua")),
2311
+ value: Schema.optional(Schema.String),
2312
+ }),
2313
+ mode: Schema.Literals([
2314
+ "block",
2315
+ "challenge",
2316
+ "whitelist",
2317
+ "js_challenge",
2318
+ "managed_challenge",
2319
+ ]),
2320
+ description: Schema.optional(Schema.String),
2321
+ paused: Schema.optional(Schema.Boolean),
2322
+ }).pipe(
2323
+ T.Http({ method: "POST", path: "/zones/{zone_id}/firewall/ua_rules" }),
2324
+ ) as unknown as Schema.Schema<CreateUaRuleRequest>;
2325
+
2326
+ export interface CreateUaRuleResponse {
2327
+ /** The unique identifier of the User Agent Blocking rule. */
2328
+ id?: string | null;
2329
+ /** The configuration object for the current rule. */
2330
+ configuration?: { target?: string | null; value?: string | null } | null;
2331
+ /** An informative summary of the rule. */
2332
+ description?: string | null;
2333
+ /** The action to apply to a matched request. */
2334
+ mode?: "block" | "challenge" | "js_challenge" | "managed_challenge" | null;
2335
+ /** When true, indicates that the rule is currently paused. */
2336
+ paused?: boolean | null;
2337
+ }
2338
+
2339
+ export const CreateUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2340
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2341
+ configuration: Schema.optional(
2342
+ Schema.Union([
2343
+ Schema.Struct({
2344
+ target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2345
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2346
+ }),
2347
+ Schema.Null,
2348
+ ]),
2349
+ ),
2350
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2351
+ mode: Schema.optional(
2352
+ Schema.Union([
2353
+ Schema.Literals([
2354
+ "block",
2355
+ "challenge",
2356
+ "js_challenge",
2357
+ "managed_challenge",
2358
+ ]),
2359
+ Schema.Null,
2360
+ ]),
2361
+ ),
2362
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2363
+ }) as unknown as Schema.Schema<CreateUaRuleResponse>;
2364
+
2365
+ export type CreateUaRuleError = DefaultErrors;
2366
+
2367
+ export const createUaRule: API.OperationMethod<
2368
+ CreateUaRuleRequest,
2369
+ CreateUaRuleResponse,
2370
+ CreateUaRuleError,
2371
+ Credentials | HttpClient.HttpClient
2372
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2373
+ input: CreateUaRuleRequest,
2374
+ output: CreateUaRuleResponse,
2375
+ errors: [],
2376
+ }));
2377
+
2378
+ export interface UpdateUaRuleRequest {
2379
+ uaRuleId: string;
2380
+ /** Path param: Defines an identifier. */
2381
+ zoneId: string;
2382
+ /** Body param: The rule configuration. */
2383
+ configuration: unknown;
2384
+ /** Body param: The action to apply to a matched request. */
2385
+ mode:
2386
+ | "block"
2387
+ | "challenge"
2388
+ | "whitelist"
2389
+ | "js_challenge"
2390
+ | "managed_challenge";
2391
+ /** Body param: An informative summary of the rule. This value is sanitized and any tags will be removed. */
2392
+ description?: string;
2393
+ /** Body param: When true, indicates that the rule is currently paused. */
2394
+ paused?: boolean;
2395
+ }
2396
+
2397
+ export const UpdateUaRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2398
+ uaRuleId: Schema.String.pipe(T.HttpPath("uaRuleId")),
2399
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2400
+ configuration: Schema.Unknown,
2401
+ mode: Schema.Literals([
2402
+ "block",
2403
+ "challenge",
2404
+ "whitelist",
2405
+ "js_challenge",
2406
+ "managed_challenge",
2407
+ ]),
2408
+ description: Schema.optional(Schema.String),
2409
+ paused: Schema.optional(Schema.Boolean),
2410
+ }).pipe(
2411
+ T.Http({
2412
+ method: "PUT",
2413
+ path: "/zones/{zone_id}/firewall/ua_rules/{uaRuleId}",
2414
+ }),
2415
+ ) as unknown as Schema.Schema<UpdateUaRuleRequest>;
2416
+
2417
+ export interface UpdateUaRuleResponse {
2418
+ /** The unique identifier of the User Agent Blocking rule. */
2419
+ id?: string | null;
2420
+ /** The configuration object for the current rule. */
2421
+ configuration?: { target?: string | null; value?: string | null } | null;
2422
+ /** An informative summary of the rule. */
2423
+ description?: string | null;
2424
+ /** The action to apply to a matched request. */
2425
+ mode?: "block" | "challenge" | "js_challenge" | "managed_challenge" | null;
2426
+ /** When true, indicates that the rule is currently paused. */
2427
+ paused?: boolean | null;
2428
+ }
2429
+
2430
+ export const UpdateUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2431
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2432
+ configuration: Schema.optional(
2433
+ Schema.Union([
2434
+ Schema.Struct({
2435
+ target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2436
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2437
+ }),
2438
+ Schema.Null,
2439
+ ]),
2440
+ ),
2441
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2442
+ mode: Schema.optional(
2443
+ Schema.Union([
2444
+ Schema.Literals([
2445
+ "block",
2446
+ "challenge",
2447
+ "js_challenge",
2448
+ "managed_challenge",
2449
+ ]),
2450
+ Schema.Null,
2451
+ ]),
2452
+ ),
2453
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2454
+ }) as unknown as Schema.Schema<UpdateUaRuleResponse>;
2455
+
2456
+ export type UpdateUaRuleError = DefaultErrors;
2457
+
2458
+ export const updateUaRule: API.OperationMethod<
2459
+ UpdateUaRuleRequest,
2460
+ UpdateUaRuleResponse,
2461
+ UpdateUaRuleError,
2462
+ Credentials | HttpClient.HttpClient
2463
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2464
+ input: UpdateUaRuleRequest,
2465
+ output: UpdateUaRuleResponse,
2466
+ errors: [],
2467
+ }));
2468
+
2469
+ export interface DeleteUaRuleRequest {
2470
+ uaRuleId: string;
2471
+ /** Defines an identifier. */
2472
+ zoneId: string;
2473
+ }
2474
+
2475
+ export const DeleteUaRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2476
+ uaRuleId: Schema.String.pipe(T.HttpPath("uaRuleId")),
2477
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2478
+ }).pipe(
2479
+ T.Http({
2480
+ method: "DELETE",
2481
+ path: "/zones/{zone_id}/firewall/ua_rules/{uaRuleId}",
2482
+ }),
2483
+ ) as unknown as Schema.Schema<DeleteUaRuleRequest>;
2484
+
2485
+ export interface DeleteUaRuleResponse {
2486
+ /** The unique identifier of the User Agent Blocking rule. */
2487
+ id?: string | null;
2488
+ /** The configuration object for the current rule. */
2489
+ configuration?: { target?: string | null; value?: string | null } | null;
2490
+ /** An informative summary of the rule. */
2491
+ description?: string | null;
2492
+ /** The action to apply to a matched request. */
2493
+ mode?: "block" | "challenge" | "js_challenge" | "managed_challenge" | null;
2494
+ /** When true, indicates that the rule is currently paused. */
2495
+ paused?: boolean | null;
2496
+ }
2497
+
2498
+ export const DeleteUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2499
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2500
+ configuration: Schema.optional(
2501
+ Schema.Union([
2502
+ Schema.Struct({
2503
+ target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2504
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2505
+ }),
2506
+ Schema.Null,
2507
+ ]),
2508
+ ),
2509
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2510
+ mode: Schema.optional(
2511
+ Schema.Union([
2512
+ Schema.Literals([
2513
+ "block",
2514
+ "challenge",
2515
+ "js_challenge",
2516
+ "managed_challenge",
2517
+ ]),
2518
+ Schema.Null,
2519
+ ]),
2520
+ ),
2521
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2522
+ }) as unknown as Schema.Schema<DeleteUaRuleResponse>;
2523
+
2524
+ export type DeleteUaRuleError = DefaultErrors;
2525
+
2526
+ export const deleteUaRule: API.OperationMethod<
2527
+ DeleteUaRuleRequest,
2528
+ DeleteUaRuleResponse,
2529
+ DeleteUaRuleError,
2530
+ Credentials | HttpClient.HttpClient
2531
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2532
+ input: DeleteUaRuleRequest,
2533
+ output: DeleteUaRuleResponse,
2534
+ errors: [],
2535
+ }));
2536
+
2537
+ // =============================================================================
2538
+ // WafOverride
2539
+ // =============================================================================
2540
+
2541
+ export interface GetWafOverrideRequest {
2542
+ overridesId: string;
2543
+ /** Defines an identifier. */
2544
+ zoneId: string;
2545
+ }
2546
+
2547
+ export const GetWafOverrideRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2548
+ overridesId: Schema.String.pipe(T.HttpPath("overridesId")),
2549
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2550
+ }).pipe(
2551
+ T.Http({
2552
+ method: "GET",
2553
+ path: "/zones/{zone_id}/firewall/waf/overrides/{overridesId}",
2554
+ }),
2555
+ ) as unknown as Schema.Schema<GetWafOverrideRequest>;
2556
+
2557
+ export interface GetWafOverrideResponse {
2558
+ /** The unique identifier of the WAF override. */
2559
+ id?: string | null;
2560
+ /** An informative summary of the current URI-based WAF override. */
2561
+ description?: string | null;
2562
+ /** An object that allows you to enable or disable WAF rule groups for the current WAF override. Each key of this object must be the ID of a WAF rule group, and each value must be a valid WAF action (usua */
2563
+ groups?: Record<string, unknown> | null;
2564
+ /** When true, indicates that the rule is currently paused. */
2565
+ paused?: boolean | null;
2566
+ /** The relative priority of the current URI-based WAF override when multiple overrides match a single URL. A lower number indicates higher priority. Higher priority overrides may overwrite values set by */
2567
+ priority?: number | null;
2568
+ /** Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object. */
2569
+ rewriteAction?: {
2570
+ block?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2571
+ challenge?:
2572
+ | "challenge"
2573
+ | "block"
2574
+ | "simulate"
2575
+ | "disable"
2576
+ | "default"
2577
+ | null;
2578
+ default?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2579
+ disable?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2580
+ simulate?:
2581
+ | "challenge"
2582
+ | "block"
2583
+ | "simulate"
2584
+ | "disable"
2585
+ | "default"
2586
+ | null;
2587
+ } | null;
2588
+ /** An object that allows you to override the action of specific WAF rules. Each key of this object must be the ID of a WAF rule, and each value must be a valid WAF action. Unless you are disabling a rule */
2589
+ rules?: unknown | null;
2590
+ /** The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. */
2591
+ urls?: string[] | null;
2592
+ }
2593
+
2594
+ export const GetWafOverrideResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
2595
+ {
2596
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2597
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2598
+ groups: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
2599
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2600
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2601
+ rewriteAction: Schema.optional(
2602
+ Schema.Union([
2603
+ Schema.Struct({
2604
+ block: Schema.optional(
2605
+ Schema.Union([
2606
+ Schema.Literals([
2607
+ "challenge",
2608
+ "block",
2609
+ "simulate",
2610
+ "disable",
2611
+ "default",
2612
+ ]),
2613
+ Schema.Null,
2614
+ ]),
2615
+ ),
2616
+ challenge: Schema.optional(
2617
+ Schema.Union([
2618
+ Schema.Literals([
2619
+ "challenge",
2620
+ "block",
2621
+ "simulate",
2622
+ "disable",
2623
+ "default",
2624
+ ]),
2625
+ Schema.Null,
2626
+ ]),
2627
+ ),
2628
+ default: Schema.optional(
2629
+ Schema.Union([
2630
+ Schema.Literals([
2631
+ "challenge",
2632
+ "block",
2633
+ "simulate",
2634
+ "disable",
2635
+ "default",
2636
+ ]),
2637
+ Schema.Null,
2638
+ ]),
2639
+ ),
2640
+ disable: Schema.optional(
2641
+ Schema.Union([
2642
+ Schema.Literals([
2643
+ "challenge",
2644
+ "block",
2645
+ "simulate",
2646
+ "disable",
2647
+ "default",
2648
+ ]),
2649
+ Schema.Null,
2650
+ ]),
2651
+ ),
2652
+ simulate: Schema.optional(
2653
+ Schema.Union([
2654
+ Schema.Literals([
2655
+ "challenge",
2656
+ "block",
2657
+ "simulate",
2658
+ "disable",
2659
+ "default",
2660
+ ]),
2661
+ Schema.Null,
2662
+ ]),
2663
+ ),
2664
+ }),
2665
+ Schema.Null,
2666
+ ]),
2667
+ ),
2668
+ rules: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
2669
+ urls: Schema.optional(
2670
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2671
+ ),
2672
+ },
2673
+ ).pipe(
2674
+ Schema.encodeKeys({
2675
+ id: "id",
2676
+ description: "description",
2677
+ groups: "groups",
2678
+ paused: "paused",
2679
+ priority: "priority",
2680
+ rewriteAction: "rewrite_action",
2681
+ rules: "rules",
2682
+ urls: "urls",
2683
+ }),
2684
+ ) as unknown as Schema.Schema<GetWafOverrideResponse>;
2685
+
2686
+ export type GetWafOverrideError = DefaultErrors;
2687
+
2688
+ export const getWafOverride: API.OperationMethod<
2689
+ GetWafOverrideRequest,
2690
+ GetWafOverrideResponse,
2691
+ GetWafOverrideError,
2692
+ Credentials | HttpClient.HttpClient
2693
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2694
+ input: GetWafOverrideRequest,
2695
+ output: GetWafOverrideResponse,
2696
+ errors: [],
2697
+ }));
2698
+
2699
+ export interface ListWafOverridesRequest {
2700
+ /** Path param: Defines an identifier. */
2701
+ zoneId: string;
2702
+ }
2703
+
2704
+ export const ListWafOverridesRequest =
2705
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2706
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2707
+ }).pipe(
2708
+ T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/waf/overrides" }),
2709
+ ) as unknown as Schema.Schema<ListWafOverridesRequest>;
2710
+
2711
+ export type ListWafOverridesResponse = {
2712
+ id?: string | null;
2713
+ description?: string | null;
2714
+ groups?: Record<string, unknown> | null;
2715
+ paused?: boolean | null;
2716
+ priority?: number | null;
2717
+ rewriteAction?: {
2718
+ block?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2719
+ challenge?:
2720
+ | "challenge"
2721
+ | "block"
2722
+ | "simulate"
2723
+ | "disable"
2724
+ | "default"
2725
+ | null;
2726
+ default?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2727
+ disable?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2728
+ simulate?:
2729
+ | "challenge"
2730
+ | "block"
2731
+ | "simulate"
2732
+ | "disable"
2733
+ | "default"
2734
+ | null;
2735
+ } | null;
2736
+ rules?: unknown | null;
2737
+ urls?: string[] | null;
2738
+ }[];
2739
+
2740
+ export const ListWafOverridesResponse =
2741
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
2742
+ Schema.Struct({
2743
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2744
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2745
+ groups: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
2746
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2747
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2748
+ rewriteAction: Schema.optional(
2749
+ Schema.Union([
2750
+ Schema.Struct({
2751
+ block: Schema.optional(
2752
+ Schema.Union([
2753
+ Schema.Literals([
2754
+ "challenge",
2755
+ "block",
2756
+ "simulate",
2757
+ "disable",
2758
+ "default",
2759
+ ]),
2760
+ Schema.Null,
2761
+ ]),
2762
+ ),
2763
+ challenge: Schema.optional(
2764
+ Schema.Union([
2765
+ Schema.Literals([
2766
+ "challenge",
2767
+ "block",
2768
+ "simulate",
2769
+ "disable",
2770
+ "default",
2771
+ ]),
2772
+ Schema.Null,
2773
+ ]),
2774
+ ),
2775
+ default: Schema.optional(
2776
+ Schema.Union([
2777
+ Schema.Literals([
2778
+ "challenge",
2779
+ "block",
2780
+ "simulate",
2781
+ "disable",
2782
+ "default",
2783
+ ]),
2784
+ Schema.Null,
2785
+ ]),
2786
+ ),
2787
+ disable: Schema.optional(
2788
+ Schema.Union([
2789
+ Schema.Literals([
2790
+ "challenge",
2791
+ "block",
2792
+ "simulate",
2793
+ "disable",
2794
+ "default",
2795
+ ]),
2796
+ Schema.Null,
2797
+ ]),
2798
+ ),
2799
+ simulate: Schema.optional(
2800
+ Schema.Union([
2801
+ Schema.Literals([
2802
+ "challenge",
2803
+ "block",
2804
+ "simulate",
2805
+ "disable",
2806
+ "default",
2807
+ ]),
2808
+ Schema.Null,
2809
+ ]),
2810
+ ),
2811
+ }),
2812
+ Schema.Null,
2813
+ ]),
2814
+ ),
2815
+ rules: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
2816
+ urls: Schema.optional(
2817
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2818
+ ),
2819
+ }).pipe(
2820
+ Schema.encodeKeys({
2821
+ id: "id",
2822
+ description: "description",
2823
+ groups: "groups",
2824
+ paused: "paused",
2825
+ priority: "priority",
2826
+ rewriteAction: "rewrite_action",
2827
+ rules: "rules",
2828
+ urls: "urls",
2829
+ }),
2830
+ ),
2831
+ ) as unknown as Schema.Schema<ListWafOverridesResponse>;
2832
+
2833
+ export type ListWafOverridesError = DefaultErrors;
2834
+
2835
+ export const listWafOverrides: API.OperationMethod<
2836
+ ListWafOverridesRequest,
2837
+ ListWafOverridesResponse,
2838
+ ListWafOverridesError,
2839
+ Credentials | HttpClient.HttpClient
2840
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2841
+ input: ListWafOverridesRequest,
2842
+ output: ListWafOverridesResponse,
2843
+ errors: [],
2844
+ }));
2845
+
2846
+ export interface CreateWafOverrideRequest {
2847
+ /** Path param: Defines an identifier. */
2848
+ zoneId: string;
2849
+ /** Body param: The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. */
2850
+ urls: string[];
2851
+ }
2852
+
2853
+ export const CreateWafOverrideRequest =
2854
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2855
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2856
+ urls: Schema.Array(Schema.String),
2857
+ }).pipe(
2858
+ T.Http({ method: "POST", path: "/zones/{zone_id}/firewall/waf/overrides" }),
2859
+ ) as unknown as Schema.Schema<CreateWafOverrideRequest>;
2860
+
2861
+ export interface CreateWafOverrideResponse {
2862
+ /** The unique identifier of the WAF override. */
2863
+ id?: string | null;
2864
+ /** An informative summary of the current URI-based WAF override. */
2865
+ description?: string | null;
2866
+ /** An object that allows you to enable or disable WAF rule groups for the current WAF override. Each key of this object must be the ID of a WAF rule group, and each value must be a valid WAF action (usua */
2867
+ groups?: Record<string, unknown> | null;
2868
+ /** When true, indicates that the rule is currently paused. */
2869
+ paused?: boolean | null;
2870
+ /** The relative priority of the current URI-based WAF override when multiple overrides match a single URL. A lower number indicates higher priority. Higher priority overrides may overwrite values set by */
2871
+ priority?: number | null;
2872
+ /** Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object. */
2873
+ rewriteAction?: {
2874
+ block?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2875
+ challenge?:
2876
+ | "challenge"
2877
+ | "block"
2878
+ | "simulate"
2879
+ | "disable"
2880
+ | "default"
2881
+ | null;
2882
+ default?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2883
+ disable?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
2884
+ simulate?:
2885
+ | "challenge"
2886
+ | "block"
2887
+ | "simulate"
2888
+ | "disable"
2889
+ | "default"
2890
+ | null;
2891
+ } | null;
2892
+ /** An object that allows you to override the action of specific WAF rules. Each key of this object must be the ID of a WAF rule, and each value must be a valid WAF action. Unless you are disabling a rule */
2893
+ rules?: unknown | null;
2894
+ /** The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. */
2895
+ urls?: string[] | null;
2896
+ }
2897
+
2898
+ export const CreateWafOverrideResponse =
2899
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2900
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2901
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2902
+ groups: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
2903
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2904
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2905
+ rewriteAction: Schema.optional(
2906
+ Schema.Union([
2907
+ Schema.Struct({
2908
+ block: Schema.optional(
2909
+ Schema.Union([
2910
+ Schema.Literals([
2911
+ "challenge",
2912
+ "block",
2913
+ "simulate",
2914
+ "disable",
2915
+ "default",
2916
+ ]),
2917
+ Schema.Null,
2918
+ ]),
2919
+ ),
2920
+ challenge: Schema.optional(
2921
+ Schema.Union([
2922
+ Schema.Literals([
2923
+ "challenge",
2924
+ "block",
2925
+ "simulate",
2926
+ "disable",
2927
+ "default",
2928
+ ]),
2929
+ Schema.Null,
2930
+ ]),
2931
+ ),
2932
+ default: Schema.optional(
2933
+ Schema.Union([
2934
+ Schema.Literals([
2935
+ "challenge",
2936
+ "block",
2937
+ "simulate",
2938
+ "disable",
2939
+ "default",
2940
+ ]),
2941
+ Schema.Null,
2942
+ ]),
2943
+ ),
2944
+ disable: Schema.optional(
2945
+ Schema.Union([
2946
+ Schema.Literals([
2947
+ "challenge",
2948
+ "block",
2949
+ "simulate",
2950
+ "disable",
2951
+ "default",
2952
+ ]),
2953
+ Schema.Null,
2954
+ ]),
2955
+ ),
2956
+ simulate: Schema.optional(
2957
+ Schema.Union([
2958
+ Schema.Literals([
2959
+ "challenge",
2960
+ "block",
2961
+ "simulate",
2962
+ "disable",
2963
+ "default",
2964
+ ]),
2965
+ Schema.Null,
2966
+ ]),
2967
+ ),
2968
+ }),
2969
+ Schema.Null,
2970
+ ]),
2971
+ ),
2972
+ rules: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
2973
+ urls: Schema.optional(
2974
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2975
+ ),
2976
+ }).pipe(
2977
+ Schema.encodeKeys({
2978
+ id: "id",
2979
+ description: "description",
2980
+ groups: "groups",
2981
+ paused: "paused",
2982
+ priority: "priority",
2983
+ rewriteAction: "rewrite_action",
2984
+ rules: "rules",
2985
+ urls: "urls",
2986
+ }),
2987
+ ) as unknown as Schema.Schema<CreateWafOverrideResponse>;
2988
+
2989
+ export type CreateWafOverrideError = DefaultErrors;
2990
+
2991
+ export const createWafOverride: API.OperationMethod<
2992
+ CreateWafOverrideRequest,
2993
+ CreateWafOverrideResponse,
2994
+ CreateWafOverrideError,
2995
+ Credentials | HttpClient.HttpClient
2996
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2997
+ input: CreateWafOverrideRequest,
2998
+ output: CreateWafOverrideResponse,
2999
+ errors: [],
3000
+ }));
3001
+
3002
+ export interface UpdateWafOverrideRequest {
3003
+ overridesId: string;
3004
+ /** Path param: Defines an identifier. */
3005
+ zoneId: string;
3006
+ /** Body param: Defines an identifier. */
3007
+ id: string;
3008
+ /** Body param: Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object. */
3009
+ rewriteAction: {
3010
+ block?: "challenge" | "block" | "simulate" | "disable" | "default";
3011
+ challenge?: "challenge" | "block" | "simulate" | "disable" | "default";
3012
+ default?: "challenge" | "block" | "simulate" | "disable" | "default";
3013
+ disable?: "challenge" | "block" | "simulate" | "disable" | "default";
3014
+ simulate?: "challenge" | "block" | "simulate" | "disable" | "default";
3015
+ };
3016
+ /** Body param: An object that allows you to override the action of specific WAF rules. Each key of this object must be the ID of a WAF rule, and each value must be a valid WAF action. Unless you are disa */
3017
+ rules: unknown;
3018
+ /** Body param: The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. */
3019
+ urls: string[];
3020
+ }
3021
+
3022
+ export const UpdateWafOverrideRequest =
3023
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3024
+ overridesId: Schema.String.pipe(T.HttpPath("overridesId")),
3025
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
3026
+ id: Schema.String,
3027
+ rewriteAction: Schema.Struct({
3028
+ block: Schema.optional(
3029
+ Schema.Literals([
3030
+ "challenge",
3031
+ "block",
3032
+ "simulate",
3033
+ "disable",
3034
+ "default",
3035
+ ]),
3036
+ ),
3037
+ challenge: Schema.optional(
3038
+ Schema.Literals([
3039
+ "challenge",
3040
+ "block",
3041
+ "simulate",
3042
+ "disable",
3043
+ "default",
3044
+ ]),
3045
+ ),
3046
+ default: Schema.optional(
3047
+ Schema.Literals([
3048
+ "challenge",
3049
+ "block",
3050
+ "simulate",
3051
+ "disable",
3052
+ "default",
3053
+ ]),
3054
+ ),
3055
+ disable: Schema.optional(
3056
+ Schema.Literals([
3057
+ "challenge",
3058
+ "block",
3059
+ "simulate",
3060
+ "disable",
3061
+ "default",
3062
+ ]),
3063
+ ),
3064
+ simulate: Schema.optional(
3065
+ Schema.Literals([
3066
+ "challenge",
3067
+ "block",
3068
+ "simulate",
3069
+ "disable",
3070
+ "default",
3071
+ ]),
3072
+ ),
3073
+ }),
3074
+ rules: Schema.Unknown,
3075
+ urls: Schema.Array(Schema.String),
3076
+ }).pipe(
3077
+ Schema.encodeKeys({
3078
+ id: "id",
3079
+ rewriteAction: "rewrite_action",
3080
+ rules: "rules",
3081
+ urls: "urls",
3082
+ }),
3083
+ T.Http({
3084
+ method: "PUT",
3085
+ path: "/zones/{zone_id}/firewall/waf/overrides/{overridesId}",
3086
+ }),
3087
+ ) as unknown as Schema.Schema<UpdateWafOverrideRequest>;
3088
+
3089
+ export interface UpdateWafOverrideResponse {
3090
+ /** The unique identifier of the WAF override. */
3091
+ id?: string | null;
3092
+ /** An informative summary of the current URI-based WAF override. */
3093
+ description?: string | null;
3094
+ /** An object that allows you to enable or disable WAF rule groups for the current WAF override. Each key of this object must be the ID of a WAF rule group, and each value must be a valid WAF action (usua */
3095
+ groups?: Record<string, unknown> | null;
3096
+ /** When true, indicates that the rule is currently paused. */
3097
+ paused?: boolean | null;
3098
+ /** The relative priority of the current URI-based WAF override when multiple overrides match a single URL. A lower number indicates higher priority. Higher priority overrides may overwrite values set by */
3099
+ priority?: number | null;
3100
+ /** Specifies that, when a WAF rule matches, its configured action will be replaced by the action configured in this object. */
3101
+ rewriteAction?: {
3102
+ block?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
3103
+ challenge?:
3104
+ | "challenge"
3105
+ | "block"
3106
+ | "simulate"
3107
+ | "disable"
3108
+ | "default"
3109
+ | null;
3110
+ default?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
3111
+ disable?: "challenge" | "block" | "simulate" | "disable" | "default" | null;
3112
+ simulate?:
3113
+ | "challenge"
3114
+ | "block"
3115
+ | "simulate"
3116
+ | "disable"
3117
+ | "default"
3118
+ | null;
3119
+ } | null;
3120
+ /** An object that allows you to override the action of specific WAF rules. Each key of this object must be the ID of a WAF rule, and each value must be a valid WAF action. Unless you are disabling a rule */
3121
+ rules?: unknown | null;
3122
+ /** The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns. */
3123
+ urls?: string[] | null;
3124
+ }
3125
+
3126
+ export const UpdateWafOverrideResponse =
3127
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3128
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3129
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3130
+ groups: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
3131
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
3132
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
3133
+ rewriteAction: Schema.optional(
3134
+ Schema.Union([
3135
+ Schema.Struct({
3136
+ block: Schema.optional(
3137
+ Schema.Union([
3138
+ Schema.Literals([
3139
+ "challenge",
3140
+ "block",
3141
+ "simulate",
3142
+ "disable",
3143
+ "default",
3144
+ ]),
3145
+ Schema.Null,
3146
+ ]),
3147
+ ),
3148
+ challenge: Schema.optional(
3149
+ Schema.Union([
3150
+ Schema.Literals([
3151
+ "challenge",
3152
+ "block",
3153
+ "simulate",
3154
+ "disable",
3155
+ "default",
3156
+ ]),
3157
+ Schema.Null,
3158
+ ]),
3159
+ ),
3160
+ default: Schema.optional(
3161
+ Schema.Union([
3162
+ Schema.Literals([
3163
+ "challenge",
3164
+ "block",
3165
+ "simulate",
3166
+ "disable",
3167
+ "default",
3168
+ ]),
3169
+ Schema.Null,
3170
+ ]),
3171
+ ),
3172
+ disable: Schema.optional(
3173
+ Schema.Union([
3174
+ Schema.Literals([
3175
+ "challenge",
3176
+ "block",
3177
+ "simulate",
3178
+ "disable",
3179
+ "default",
3180
+ ]),
3181
+ Schema.Null,
3182
+ ]),
3183
+ ),
3184
+ simulate: Schema.optional(
3185
+ Schema.Union([
3186
+ Schema.Literals([
3187
+ "challenge",
3188
+ "block",
3189
+ "simulate",
3190
+ "disable",
3191
+ "default",
3192
+ ]),
3193
+ Schema.Null,
3194
+ ]),
3195
+ ),
3196
+ }),
3197
+ Schema.Null,
3198
+ ]),
3199
+ ),
3200
+ rules: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
3201
+ urls: Schema.optional(
3202
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
3203
+ ),
3204
+ }).pipe(
3205
+ Schema.encodeKeys({
3206
+ id: "id",
3207
+ description: "description",
3208
+ groups: "groups",
3209
+ paused: "paused",
3210
+ priority: "priority",
3211
+ rewriteAction: "rewrite_action",
3212
+ rules: "rules",
3213
+ urls: "urls",
3214
+ }),
3215
+ ) as unknown as Schema.Schema<UpdateWafOverrideResponse>;
3216
+
3217
+ export type UpdateWafOverrideError = DefaultErrors;
3218
+
3219
+ export const updateWafOverride: API.OperationMethod<
3220
+ UpdateWafOverrideRequest,
3221
+ UpdateWafOverrideResponse,
3222
+ UpdateWafOverrideError,
3223
+ Credentials | HttpClient.HttpClient
3224
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3225
+ input: UpdateWafOverrideRequest,
3226
+ output: UpdateWafOverrideResponse,
3227
+ errors: [],
3228
+ }));
3229
+
3230
+ export interface DeleteWafOverrideRequest {
3231
+ overridesId: string;
3232
+ /** Defines an identifier. */
3233
+ zoneId: string;
3234
+ }
3235
+
3236
+ export const DeleteWafOverrideRequest =
3237
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3238
+ overridesId: Schema.String.pipe(T.HttpPath("overridesId")),
3239
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
3240
+ }).pipe(
3241
+ T.Http({
3242
+ method: "DELETE",
3243
+ path: "/zones/{zone_id}/firewall/waf/overrides/{overridesId}",
3244
+ }),
3245
+ ) as unknown as Schema.Schema<DeleteWafOverrideRequest>;
3246
+
3247
+ export interface DeleteWafOverrideResponse {
3248
+ /** The unique identifier of the WAF override. */
3249
+ id?: string | null;
3250
+ }
3251
+
3252
+ export const DeleteWafOverrideResponse =
3253
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3254
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3255
+ }) as unknown as Schema.Schema<DeleteWafOverrideResponse>;
3256
+
3257
+ export type DeleteWafOverrideError = DefaultErrors;
3258
+
3259
+ export const deleteWafOverride: API.OperationMethod<
3260
+ DeleteWafOverrideRequest,
3261
+ DeleteWafOverrideResponse,
3262
+ DeleteWafOverrideError,
3263
+ Credentials | HttpClient.HttpClient
3264
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3265
+ input: DeleteWafOverrideRequest,
3266
+ output: DeleteWafOverrideResponse,
3267
+ errors: [],
3268
+ }));
3269
+
3270
+ // =============================================================================
3271
+ // WafPackage
3272
+ // =============================================================================
3273
+
3274
+ export interface GetWafPackageRequest {
3275
+ packageId: string;
3276
+ /** Defines an identifier. */
3277
+ zoneId: string;
3278
+ }
3279
+
3280
+ export const GetWafPackageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3281
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
3282
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
3283
+ }).pipe(
3284
+ T.Http({
3285
+ method: "GET",
3286
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}",
3287
+ }),
3288
+ ) as unknown as Schema.Schema<GetWafPackageRequest>;
3289
+
3290
+ export type GetWafPackageResponse =
3291
+ | {
3292
+ errors: unknown[];
3293
+ messages: unknown[];
3294
+ result: string | null;
3295
+ success: true;
3296
+ }
3297
+ | { result?: unknown | null };
3298
+
3299
+ export const GetWafPackageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
3300
+ Schema.Struct({
3301
+ errors: Schema.Array(Schema.Unknown),
3302
+ messages: Schema.Array(Schema.Unknown),
3303
+ result: Schema.Union([Schema.String, Schema.Null]),
3304
+ success: Schema.Literal(true),
3305
+ }),
3306
+ Schema.Struct({
3307
+ result: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
3308
+ }),
3309
+ ]) as unknown as Schema.Schema<GetWafPackageResponse>;
3310
+
3311
+ export type GetWafPackageError = DefaultErrors;
3312
+
3313
+ export const getWafPackage: API.OperationMethod<
3314
+ GetWafPackageRequest,
3315
+ GetWafPackageResponse,
3316
+ GetWafPackageError,
3317
+ Credentials | HttpClient.HttpClient
3318
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3319
+ input: GetWafPackageRequest,
3320
+ output: GetWafPackageResponse,
3321
+ errors: [],
3322
+ }));
3323
+
3324
+ export interface ListWafPackagesRequest {
3325
+ /** Path param: Defines an identifier. */
3326
+ zoneId: string;
3327
+ /** Query param: The direction used to sort returned packages. */
3328
+ direction?: "asc" | "desc";
3329
+ /** Query param: When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. */
3330
+ match?: "any" | "all";
3331
+ /** Query param: The name of the WAF package. */
3332
+ name?: string;
3333
+ /** Query param: The field used to sort returned packages. */
3334
+ order?: "name";
3335
+ }
3336
+
3337
+ export const ListWafPackagesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
3338
+ {
3339
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
3340
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
3341
+ T.HttpQuery("direction"),
3342
+ ),
3343
+ match: Schema.optional(Schema.Literals(["any", "all"])).pipe(
3344
+ T.HttpQuery("match"),
3345
+ ),
3346
+ name: Schema.optional(Schema.String).pipe(T.HttpQuery("name")),
3347
+ order: Schema.optional(Schema.Literal("name")).pipe(T.HttpQuery("order")),
3348
+ },
3349
+ ).pipe(
3350
+ T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/waf/packages" }),
3351
+ ) as unknown as Schema.Schema<ListWafPackagesRequest>;
3352
+
3353
+ export type ListWafPackagesResponse = unknown[];
3354
+
3355
+ export const ListWafPackagesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3356
+ Schema.Unknown,
3357
+ ) as unknown as Schema.Schema<ListWafPackagesResponse>;
3358
+
3359
+ export type ListWafPackagesError = DefaultErrors;
3360
+
3361
+ export const listWafPackages: API.OperationMethod<
3362
+ ListWafPackagesRequest,
3363
+ ListWafPackagesResponse,
3364
+ ListWafPackagesError,
3365
+ Credentials | HttpClient.HttpClient
3366
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3367
+ input: ListWafPackagesRequest,
3368
+ output: ListWafPackagesResponse,
3369
+ errors: [],
3370
+ }));
3371
+
3372
+ // =============================================================================
3373
+ // WafPackageGroup
3374
+ // =============================================================================
3375
+
3376
+ export interface GetWafPackageGroupRequest {
3377
+ packageId: string;
3378
+ groupId: string;
3379
+ /** Defines an identifier of a schema. */
3380
+ zoneId: string;
3381
+ }
3382
+
3383
+ export const GetWafPackageGroupRequest =
3384
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3385
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
3386
+ groupId: Schema.String.pipe(T.HttpPath("groupId")),
3387
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
3388
+ }).pipe(
3389
+ T.Http({
3390
+ method: "GET",
3391
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/groups/{groupId}",
3392
+ }),
3393
+ ) as unknown as Schema.Schema<GetWafPackageGroupRequest>;
3394
+
3395
+ export type GetWafPackageGroupResponse = string | null;
3396
+
3397
+ export const GetWafPackageGroupResponse =
3398
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
3399
+ Schema.String,
3400
+ Schema.Null,
3401
+ ]) as unknown as Schema.Schema<GetWafPackageGroupResponse>;
3402
+
3403
+ export type GetWafPackageGroupError = DefaultErrors;
3404
+
3405
+ export const getWafPackageGroup: API.OperationMethod<
3406
+ GetWafPackageGroupRequest,
3407
+ GetWafPackageGroupResponse,
3408
+ GetWafPackageGroupError,
3409
+ Credentials | HttpClient.HttpClient
3410
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3411
+ input: GetWafPackageGroupRequest,
3412
+ output: GetWafPackageGroupResponse,
3413
+ errors: [],
3414
+ }));
3415
+
3416
+ export interface ListWafPackageGroupsRequest {
3417
+ packageId: string;
3418
+ /** Path param: Defines an identifier of a schema. */
3419
+ zoneId: string;
3420
+ /** Query param: Defines the direction used to sort returned rule groups. */
3421
+ direction?: "asc" | "desc";
3422
+ /** Query param: Defines the condition for search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. */
3423
+ match?: "any" | "all";
3424
+ /** Query param: Defines the state of the rules contained in the rule group. When `on`, the rules in the group are configurable/usable. */
3425
+ mode?: "on" | "off";
3426
+ /** Query param: Defines the name of the rule group. */
3427
+ name?: string;
3428
+ /** Query param: Defines the field used to sort returned rule groups. */
3429
+ order?: "mode" | "rules_count";
3430
+ /** Query param: Defines the number of rules in the current rule group. */
3431
+ rulesCount?: number;
3432
+ }
3433
+
3434
+ export const ListWafPackageGroupsRequest =
3435
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3436
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
3437
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
3438
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
3439
+ T.HttpQuery("direction"),
3440
+ ),
3441
+ match: Schema.optional(Schema.Literals(["any", "all"])).pipe(
3442
+ T.HttpQuery("match"),
3443
+ ),
3444
+ mode: Schema.optional(Schema.Literals(["on", "off"])).pipe(
3445
+ T.HttpQuery("mode"),
3446
+ ),
3447
+ name: Schema.optional(Schema.String).pipe(T.HttpQuery("name")),
3448
+ order: Schema.optional(Schema.Literals(["mode", "rules_count"])).pipe(
3449
+ T.HttpQuery("order"),
3450
+ ),
3451
+ rulesCount: Schema.optional(Schema.Number).pipe(T.HttpQuery("rules_count")),
3452
+ }).pipe(
3453
+ T.Http({
3454
+ method: "GET",
3455
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/groups",
3456
+ }),
3457
+ ) as unknown as Schema.Schema<ListWafPackageGroupsRequest>;
3458
+
3459
+ export type ListWafPackageGroupsResponse = {
3460
+ id: string;
3461
+ description: string | null;
3462
+ mode: "on" | "off";
3463
+ name: string;
3464
+ rulesCount: number;
3465
+ allowedModes?: ("on" | "off")[] | null;
3466
+ modifiedRulesCount?: number | null;
3467
+ packageId?: string | null;
3468
+ }[];
3469
+
3470
+ export const ListWafPackageGroupsResponse =
3471
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3472
+ Schema.Struct({
3473
+ id: Schema.String,
3474
+ description: Schema.Union([Schema.String, Schema.Null]),
3475
+ mode: Schema.Literals(["on", "off"]),
3476
+ name: Schema.String,
3477
+ rulesCount: Schema.Number,
3478
+ allowedModes: Schema.optional(
3479
+ Schema.Union([
3480
+ Schema.Array(Schema.Literals(["on", "off"])),
3481
+ Schema.Null,
3482
+ ]),
3483
+ ),
3484
+ modifiedRulesCount: Schema.optional(
3485
+ Schema.Union([Schema.Number, Schema.Null]),
3486
+ ),
3487
+ packageId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
3488
+ }).pipe(
3489
+ Schema.encodeKeys({
3490
+ id: "id",
3491
+ description: "description",
3492
+ mode: "mode",
3493
+ name: "name",
3494
+ rulesCount: "rules_count",
3495
+ allowedModes: "allowed_modes",
3496
+ modifiedRulesCount: "modified_rules_count",
3497
+ packageId: "package_id",
3498
+ }),
3499
+ ),
3500
+ ) as unknown as Schema.Schema<ListWafPackageGroupsResponse>;
3501
+
3502
+ export type ListWafPackageGroupsError = DefaultErrors;
3503
+
3504
+ export const listWafPackageGroups: API.OperationMethod<
3505
+ ListWafPackageGroupsRequest,
3506
+ ListWafPackageGroupsResponse,
3507
+ ListWafPackageGroupsError,
3508
+ Credentials | HttpClient.HttpClient
3509
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3510
+ input: ListWafPackageGroupsRequest,
3511
+ output: ListWafPackageGroupsResponse,
3512
+ errors: [],
3513
+ }));
3514
+
3515
+ export interface PatchWafPackageGroupRequest {
3516
+ packageId: string;
3517
+ groupId: string;
3518
+ /** Path param: Defines an identifier of a schema. */
3519
+ zoneId: string;
3520
+ /** Body param: Defines the state of the rules contained in the rule group. When `on`, the rules in the group are configurable/usable. */
3521
+ mode?: "on" | "off";
3522
+ }
3523
+
3524
+ export const PatchWafPackageGroupRequest =
3525
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3526
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
3527
+ groupId: Schema.String.pipe(T.HttpPath("groupId")),
3528
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
3529
+ mode: Schema.optional(Schema.Literals(["on", "off"])),
3530
+ }).pipe(
3531
+ T.Http({
3532
+ method: "PATCH",
3533
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/groups/{groupId}",
3534
+ }),
3535
+ ) as unknown as Schema.Schema<PatchWafPackageGroupRequest>;
3536
+
3537
+ export type PatchWafPackageGroupResponse = string | null;
3538
+
3539
+ export const PatchWafPackageGroupResponse =
3540
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
3541
+ Schema.String,
3542
+ Schema.Null,
3543
+ ]) as unknown as Schema.Schema<PatchWafPackageGroupResponse>;
3544
+
3545
+ export type PatchWafPackageGroupError = DefaultErrors;
3546
+
3547
+ export const patchWafPackageGroup: API.OperationMethod<
3548
+ PatchWafPackageGroupRequest,
3549
+ PatchWafPackageGroupResponse,
3550
+ PatchWafPackageGroupError,
3551
+ Credentials | HttpClient.HttpClient
3552
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3553
+ input: PatchWafPackageGroupRequest,
3554
+ output: PatchWafPackageGroupResponse,
3555
+ errors: [],
3556
+ }));
3557
+
3558
+ // =============================================================================
3559
+ // WafPackageRule
3560
+ // =============================================================================
3561
+
3562
+ export interface GetWafPackageRuleRequest {
3563
+ packageId: string;
3564
+ ruleId: string;
3565
+ /** Defines an identifier of a schema. */
3566
+ zoneId: string;
3567
+ }
3568
+
3569
+ export const GetWafPackageRuleRequest =
3570
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3571
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
3572
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
3573
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
3574
+ }).pipe(
3575
+ T.Http({
3576
+ method: "GET",
3577
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/rules/{ruleId}",
3578
+ }),
3579
+ ) as unknown as Schema.Schema<GetWafPackageRuleRequest>;
3580
+
3581
+ export type GetWafPackageRuleResponse = string | null;
3582
+
3583
+ export const GetWafPackageRuleResponse =
3584
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
3585
+ Schema.String,
3586
+ Schema.Null,
3587
+ ]) as unknown as Schema.Schema<GetWafPackageRuleResponse>;
3588
+
3589
+ export type GetWafPackageRuleError = DefaultErrors;
3590
+
3591
+ export const getWafPackageRule: API.OperationMethod<
3592
+ GetWafPackageRuleRequest,
3593
+ GetWafPackageRuleResponse,
3594
+ GetWafPackageRuleError,
3595
+ Credentials | HttpClient.HttpClient
3596
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3597
+ input: GetWafPackageRuleRequest,
3598
+ output: GetWafPackageRuleResponse,
3599
+ errors: [],
3600
+ }));
3601
+
3602
+ export interface ListWafPackageRulesRequest {
3603
+ packageId: string;
3604
+ /** Path param: Defines an identifier of a schema. */
3605
+ zoneId: string;
3606
+ /** Query param: Defines the public description of the WAF rule. */
3607
+ description?: string;
3608
+ /** Query param: Defines the direction used to sort returned rules. */
3609
+ direction?: "asc" | "desc";
3610
+ /** Query param: Defines the unique identifier of the rule group. */
3611
+ groupId?: string;
3612
+ /** Query param: Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. */
3613
+ match?: "any" | "all";
3614
+ /** Query param: Defines the action/mode a rule has been overridden to perform. */
3615
+ mode?: "DIS" | "CHL" | "BLK" | "SIM";
3616
+ /** Query param: Defines the field used to sort returned rules. */
3617
+ order?: "priority" | "group_id" | "description";
3618
+ /** Query param: Defines the order in which the individual WAF rule is executed within its rule group. */
3619
+ priority?: string;
3620
+ }
3621
+
3622
+ export const ListWafPackageRulesRequest =
3623
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3624
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
3625
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
3626
+ description: Schema.optional(Schema.String).pipe(
3627
+ T.HttpQuery("description"),
3628
+ ),
3629
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
3630
+ T.HttpQuery("direction"),
3631
+ ),
3632
+ groupId: Schema.optional(Schema.String).pipe(T.HttpQuery("group_id")),
3633
+ match: Schema.optional(Schema.Literals(["any", "all"])).pipe(
3634
+ T.HttpQuery("match"),
3635
+ ),
3636
+ mode: Schema.optional(Schema.Literals(["DIS", "CHL", "BLK", "SIM"])).pipe(
3637
+ T.HttpQuery("mode"),
3638
+ ),
3639
+ order: Schema.optional(
3640
+ Schema.Literals(["priority", "group_id", "description"]),
3641
+ ).pipe(T.HttpQuery("order")),
3642
+ priority: Schema.optional(Schema.String).pipe(T.HttpQuery("priority")),
3643
+ }).pipe(
3644
+ T.Http({
3645
+ method: "GET",
3646
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/rules",
3647
+ }),
3648
+ ) as unknown as Schema.Schema<ListWafPackageRulesRequest>;
3649
+
3650
+ export type ListWafPackageRulesResponse = (
3651
+ | {
3652
+ id: string;
3653
+ allowedModes: ("on" | "off")[];
3654
+ description: string;
3655
+ group: unknown;
3656
+ mode: "on" | "off";
3657
+ packageId: string;
3658
+ priority: string;
3659
+ }
3660
+ | {
3661
+ id: string;
3662
+ allowedModes: (
3663
+ | "default"
3664
+ | "disable"
3665
+ | "simulate"
3666
+ | "block"
3667
+ | "challenge"
3668
+ )[];
3669
+ defaultMode: "disable" | "simulate" | "block" | "challenge";
3670
+ description: string;
3671
+ group: unknown;
3672
+ mode: "default" | "disable" | "simulate" | "block" | "challenge";
3673
+ packageId: string;
3674
+ priority: string;
3675
+ }
3676
+ )[];
3677
+
3678
+ export const ListWafPackageRulesResponse =
3679
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
3680
+ Schema.Union([
3681
+ Schema.Struct({
3682
+ id: Schema.String,
3683
+ allowedModes: Schema.Array(Schema.Literals(["on", "off"])),
3684
+ description: Schema.String,
3685
+ group: Schema.Unknown,
3686
+ mode: Schema.Literals(["on", "off"]),
3687
+ packageId: Schema.String,
3688
+ priority: Schema.String,
3689
+ }).pipe(
3690
+ Schema.encodeKeys({
3691
+ id: "id",
3692
+ allowedModes: "allowed_modes",
3693
+ description: "description",
3694
+ group: "group",
3695
+ mode: "mode",
3696
+ packageId: "package_id",
3697
+ priority: "priority",
3698
+ }),
3699
+ ),
3700
+ Schema.Struct({
3701
+ id: Schema.String,
3702
+ allowedModes: Schema.Array(
3703
+ Schema.Literals([
3704
+ "default",
3705
+ "disable",
3706
+ "simulate",
3707
+ "block",
3708
+ "challenge",
3709
+ ]),
3710
+ ),
3711
+ defaultMode: Schema.Literals([
3712
+ "disable",
3713
+ "simulate",
3714
+ "block",
3715
+ "challenge",
3716
+ ]),
3717
+ description: Schema.String,
3718
+ group: Schema.Unknown,
3719
+ mode: Schema.Literals([
3720
+ "default",
3721
+ "disable",
3722
+ "simulate",
3723
+ "block",
3724
+ "challenge",
3725
+ ]),
3726
+ packageId: Schema.String,
3727
+ priority: Schema.String,
3728
+ }).pipe(
3729
+ Schema.encodeKeys({
3730
+ id: "id",
3731
+ allowedModes: "allowed_modes",
3732
+ defaultMode: "default_mode",
3733
+ description: "description",
3734
+ group: "group",
3735
+ mode: "mode",
3736
+ packageId: "package_id",
3737
+ priority: "priority",
3738
+ }),
3739
+ ),
3740
+ ]),
3741
+ ) as unknown as Schema.Schema<ListWafPackageRulesResponse>;
3742
+
3743
+ export type ListWafPackageRulesError = DefaultErrors;
3744
+
3745
+ export const listWafPackageRules: API.OperationMethod<
3746
+ ListWafPackageRulesRequest,
3747
+ ListWafPackageRulesResponse,
3748
+ ListWafPackageRulesError,
3749
+ Credentials | HttpClient.HttpClient
3750
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3751
+ input: ListWafPackageRulesRequest,
3752
+ output: ListWafPackageRulesResponse,
3753
+ errors: [],
3754
+ }));
3755
+
3756
+ export interface PatchWafPackageRuleRequest {
3757
+ packageId: string;
3758
+ ruleId: string;
3759
+ /** Path param: Defines an identifier of a schema. */
3760
+ zoneId: string;
3761
+ /** Body param: Defines the mode/action of the rule when triggered. You must use a value from the `allowed_modes` array of the current rule. */
3762
+ mode?:
3763
+ | "default"
3764
+ | "disable"
3765
+ | "simulate"
3766
+ | "block"
3767
+ | "challenge"
3768
+ | "on"
3769
+ | "off";
3770
+ }
3771
+
3772
+ export const PatchWafPackageRuleRequest =
3773
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
3774
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
3775
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
3776
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
3777
+ mode: Schema.optional(
3778
+ Schema.Literals([
3779
+ "default",
3780
+ "disable",
3781
+ "simulate",
3782
+ "block",
3783
+ "challenge",
3784
+ "on",
3785
+ "off",
3786
+ ]),
3787
+ ),
3788
+ }).pipe(
3789
+ T.Http({
3790
+ method: "PATCH",
3791
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/rules/{ruleId}",
3792
+ }),
3793
+ ) as unknown as Schema.Schema<PatchWafPackageRuleRequest>;
3794
+
3795
+ export type PatchWafPackageRuleResponse =
3796
+ | {
3797
+ id: string;
3798
+ allowedModes: ("on" | "off")[];
3799
+ description: string;
3800
+ group: unknown;
3801
+ mode: "on" | "off";
3802
+ packageId: string;
3803
+ priority: string;
3804
+ }
3805
+ | {
3806
+ id: string;
3807
+ allowedModes: (
3808
+ | "default"
3809
+ | "disable"
3810
+ | "simulate"
3811
+ | "block"
3812
+ | "challenge"
3813
+ )[];
3814
+ defaultMode: "disable" | "simulate" | "block" | "challenge";
3815
+ description: string;
3816
+ group: unknown;
3817
+ mode: "default" | "disable" | "simulate" | "block" | "challenge";
3818
+ packageId: string;
3819
+ priority: string;
3820
+ };
3821
+
3822
+ export const PatchWafPackageRuleResponse =
3823
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
3824
+ Schema.Struct({
3825
+ id: Schema.String,
3826
+ allowedModes: Schema.Array(Schema.Literals(["on", "off"])),
3827
+ description: Schema.String,
3828
+ group: Schema.Unknown,
3829
+ mode: Schema.Literals(["on", "off"]),
3830
+ packageId: Schema.String,
3831
+ priority: Schema.String,
3832
+ }).pipe(
3833
+ Schema.encodeKeys({
3834
+ id: "id",
3835
+ allowedModes: "allowed_modes",
3836
+ description: "description",
3837
+ group: "group",
3838
+ mode: "mode",
3839
+ packageId: "package_id",
3840
+ priority: "priority",
3841
+ }),
3842
+ ),
3843
+ Schema.Struct({
3844
+ id: Schema.String,
3845
+ allowedModes: Schema.Array(
3846
+ Schema.Literals([
3847
+ "default",
3848
+ "disable",
3849
+ "simulate",
3850
+ "block",
3851
+ "challenge",
3852
+ ]),
3853
+ ),
3854
+ defaultMode: Schema.Literals([
3855
+ "disable",
3856
+ "simulate",
3857
+ "block",
3858
+ "challenge",
3859
+ ]),
3860
+ description: Schema.String,
3861
+ group: Schema.Unknown,
3862
+ mode: Schema.Literals([
3863
+ "default",
3864
+ "disable",
3865
+ "simulate",
3866
+ "block",
3867
+ "challenge",
3868
+ ]),
3869
+ packageId: Schema.String,
3870
+ priority: Schema.String,
3871
+ }).pipe(
3872
+ Schema.encodeKeys({
3873
+ id: "id",
3874
+ allowedModes: "allowed_modes",
3875
+ defaultMode: "default_mode",
3876
+ description: "description",
3877
+ group: "group",
3878
+ mode: "mode",
3879
+ packageId: "package_id",
3880
+ priority: "priority",
3881
+ }),
3882
+ ),
3883
+ ]) as unknown as Schema.Schema<PatchWafPackageRuleResponse>;
3884
+
3885
+ export type PatchWafPackageRuleError = DefaultErrors;
3886
+
3887
+ export const patchWafPackageRule: API.OperationMethod<
3888
+ PatchWafPackageRuleRequest,
3889
+ PatchWafPackageRuleResponse,
3890
+ PatchWafPackageRuleError,
3891
+ Credentials | HttpClient.HttpClient
3892
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3893
+ input: PatchWafPackageRuleRequest,
3894
+ output: PatchWafPackageRuleResponse,
3895
+ errors: [],
3896
+ }));