@distilled.cloud/cloudflare 0.0.0-john

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (562) hide show
  1. package/README.md +59 -0
  2. package/lib/auth.d.ts +14 -0
  3. package/lib/auth.d.ts.map +1 -0
  4. package/lib/auth.js +13 -0
  5. package/lib/auth.js.map +1 -0
  6. package/lib/category.d.ts +2 -0
  7. package/lib/category.d.ts.map +1 -0
  8. package/lib/category.js +2 -0
  9. package/lib/category.js.map +1 -0
  10. package/lib/client/api.d.ts +12 -0
  11. package/lib/client/api.d.ts.map +1 -0
  12. package/lib/client/api.js +292 -0
  13. package/lib/client/api.js.map +1 -0
  14. package/lib/client/index.d.ts +8 -0
  15. package/lib/client/index.d.ts.map +1 -0
  16. package/lib/client/index.js +8 -0
  17. package/lib/client/index.js.map +1 -0
  18. package/lib/credentials.d.ts +68 -0
  19. package/lib/credentials.d.ts.map +1 -0
  20. package/lib/credentials.js +136 -0
  21. package/lib/credentials.js.map +1 -0
  22. package/lib/errors.d.ts +48 -0
  23. package/lib/errors.d.ts.map +1 -0
  24. package/lib/errors.js +31 -0
  25. package/lib/errors.js.map +1 -0
  26. package/lib/index.d.ts +10 -0
  27. package/lib/index.d.ts.map +1 -0
  28. package/lib/index.js +10 -0
  29. package/lib/index.js.map +1 -0
  30. package/lib/retry.d.ts +14 -0
  31. package/lib/retry.d.ts.map +1 -0
  32. package/lib/retry.js +14 -0
  33. package/lib/retry.js.map +1 -0
  34. package/lib/schemas.d.ts +29 -0
  35. package/lib/schemas.d.ts.map +1 -0
  36. package/lib/schemas.js +34 -0
  37. package/lib/schemas.js.map +1 -0
  38. package/lib/sensitive.d.ts +5 -0
  39. package/lib/sensitive.d.ts.map +1 -0
  40. package/lib/sensitive.js +5 -0
  41. package/lib/sensitive.js.map +1 -0
  42. package/lib/services/abuse-reports.d.ts +296 -0
  43. package/lib/services/abuse-reports.d.ts.map +1 -0
  44. package/lib/services/abuse-reports.js +414 -0
  45. package/lib/services/abuse-reports.js.map +1 -0
  46. package/lib/services/accounts.d.ts +766 -0
  47. package/lib/services/accounts.d.ts.map +1 -0
  48. package/lib/services/accounts.js +860 -0
  49. package/lib/services/accounts.js.map +1 -0
  50. package/lib/services/acm.d.ts +73 -0
  51. package/lib/services/acm.d.ts.map +1 -0
  52. package/lib/services/acm.js +80 -0
  53. package/lib/services/acm.js.map +1 -0
  54. package/lib/services/addressing.d.ts +1321 -0
  55. package/lib/services/addressing.d.ts.map +1 -0
  56. package/lib/services/addressing.js +1863 -0
  57. package/lib/services/addressing.js.map +1 -0
  58. package/lib/services/ai-gateway.d.ts +1137 -0
  59. package/lib/services/ai-gateway.d.ts.map +1 -0
  60. package/lib/services/ai-gateway.js +1830 -0
  61. package/lib/services/ai-gateway.js.map +1 -0
  62. package/lib/services/ai.d.ts +297 -0
  63. package/lib/services/ai.d.ts.map +1 -0
  64. package/lib/services/ai.js +352 -0
  65. package/lib/services/ai.js.map +1 -0
  66. package/lib/services/aisearch.d.ts +1069 -0
  67. package/lib/services/aisearch.d.ts.map +1 -0
  68. package/lib/services/aisearch.js +2542 -0
  69. package/lib/services/aisearch.js.map +1 -0
  70. package/lib/services/alerting.d.ts +855 -0
  71. package/lib/services/alerting.d.ts.map +1 -0
  72. package/lib/services/alerting.js +1445 -0
  73. package/lib/services/alerting.js.map +1 -0
  74. package/lib/services/api-gateway.d.ts +1088 -0
  75. package/lib/services/api-gateway.d.ts.map +1 -0
  76. package/lib/services/api-gateway.js +1655 -0
  77. package/lib/services/api-gateway.js.map +1 -0
  78. package/lib/services/argo.d.ts +101 -0
  79. package/lib/services/argo.d.ts.map +1 -0
  80. package/lib/services/argo.js +113 -0
  81. package/lib/services/argo.js.map +1 -0
  82. package/lib/services/audit-logs.d.ts +46 -0
  83. package/lib/services/audit-logs.d.ts.map +1 -0
  84. package/lib/services/audit-logs.js +37 -0
  85. package/lib/services/audit-logs.js.map +1 -0
  86. package/lib/services/billing.d.ts +62 -0
  87. package/lib/services/billing.d.ts.map +1 -0
  88. package/lib/services/billing.js +102 -0
  89. package/lib/services/billing.js.map +1 -0
  90. package/lib/services/bot-management.d.ts +124 -0
  91. package/lib/services/bot-management.d.ts.map +1 -0
  92. package/lib/services/bot-management.js +262 -0
  93. package/lib/services/bot-management.js.map +1 -0
  94. package/lib/services/botnet-feed.d.ts +65 -0
  95. package/lib/services/botnet-feed.d.ts.map +1 -0
  96. package/lib/services/botnet-feed.js +88 -0
  97. package/lib/services/botnet-feed.js.map +1 -0
  98. package/lib/services/brand-protection.d.ts +194 -0
  99. package/lib/services/brand-protection.d.ts.map +1 -0
  100. package/lib/services/brand-protection.js +221 -0
  101. package/lib/services/brand-protection.js.map +1 -0
  102. package/lib/services/browser-rendering.d.ts +857 -0
  103. package/lib/services/browser-rendering.d.ts.map +1 -0
  104. package/lib/services/browser-rendering.js +1142 -0
  105. package/lib/services/browser-rendering.js.map +1 -0
  106. package/lib/services/cache.d.ts +287 -0
  107. package/lib/services/cache.d.ts.map +1 -0
  108. package/lib/services/cache.js +354 -0
  109. package/lib/services/cache.js.map +1 -0
  110. package/lib/services/calls.d.ts +223 -0
  111. package/lib/services/calls.d.ts.map +1 -0
  112. package/lib/services/calls.js +188 -0
  113. package/lib/services/calls.js.map +1 -0
  114. package/lib/services/certificate-authorities.d.ts +40 -0
  115. package/lib/services/certificate-authorities.d.ts.map +1 -0
  116. package/lib/services/certificate-authorities.js +49 -0
  117. package/lib/services/certificate-authorities.js.map +1 -0
  118. package/lib/services/client-certificates.d.ts +288 -0
  119. package/lib/services/client-certificates.d.ts.map +1 -0
  120. package/lib/services/client-certificates.js +379 -0
  121. package/lib/services/client-certificates.js.map +1 -0
  122. package/lib/services/cloud-connector.d.ts +88 -0
  123. package/lib/services/cloud-connector.d.ts.map +1 -0
  124. package/lib/services/cloud-connector.js +97 -0
  125. package/lib/services/cloud-connector.js.map +1 -0
  126. package/lib/services/cloudforce-one.d.ts +1387 -0
  127. package/lib/services/cloudforce-one.d.ts.map +1 -0
  128. package/lib/services/cloudforce-one.js +1741 -0
  129. package/lib/services/cloudforce-one.js.map +1 -0
  130. package/lib/services/connectivity.d.ts +291 -0
  131. package/lib/services/connectivity.d.ts.map +1 -0
  132. package/lib/services/connectivity.js +404 -0
  133. package/lib/services/connectivity.js.map +1 -0
  134. package/lib/services/content-scanning.d.ts +156 -0
  135. package/lib/services/content-scanning.d.ts.map +1 -0
  136. package/lib/services/content-scanning.js +175 -0
  137. package/lib/services/content-scanning.js.map +1 -0
  138. package/lib/services/custom-certificates.d.ts +240 -0
  139. package/lib/services/custom-certificates.d.ts.map +1 -0
  140. package/lib/services/custom-certificates.js +336 -0
  141. package/lib/services/custom-certificates.js.map +1 -0
  142. package/lib/services/custom-hostnames.d.ts +590 -0
  143. package/lib/services/custom-hostnames.d.ts.map +1 -0
  144. package/lib/services/custom-hostnames.js +1204 -0
  145. package/lib/services/custom-hostnames.js.map +1 -0
  146. package/lib/services/custom-nameservers.d.ts +87 -0
  147. package/lib/services/custom-nameservers.d.ts.map +1 -0
  148. package/lib/services/custom-nameservers.js +95 -0
  149. package/lib/services/custom-nameservers.js.map +1 -0
  150. package/lib/services/custom-pages.d.ts +89 -0
  151. package/lib/services/custom-pages.d.ts.map +1 -0
  152. package/lib/services/custom-pages.js +140 -0
  153. package/lib/services/custom-pages.js.map +1 -0
  154. package/lib/services/d1.d.ts +392 -0
  155. package/lib/services/d1.d.ts.map +1 -0
  156. package/lib/services/d1.js +487 -0
  157. package/lib/services/d1.js.map +1 -0
  158. package/lib/services/dcv-delegation.d.ts +24 -0
  159. package/lib/services/dcv-delegation.d.ts.map +1 -0
  160. package/lib/services/dcv-delegation.js +24 -0
  161. package/lib/services/dcv-delegation.js.map +1 -0
  162. package/lib/services/diagnostics.d.ts +208 -0
  163. package/lib/services/diagnostics.d.ts.map +1 -0
  164. package/lib/services/diagnostics.js +288 -0
  165. package/lib/services/diagnostics.js.map +1 -0
  166. package/lib/services/dns-firewall.d.ts +317 -0
  167. package/lib/services/dns-firewall.d.ts.map +1 -0
  168. package/lib/services/dns-firewall.js +400 -0
  169. package/lib/services/dns-firewall.js.map +1 -0
  170. package/lib/services/dns.d.ts +3065 -0
  171. package/lib/services/dns.d.ts.map +1 -0
  172. package/lib/services/dns.js +4627 -0
  173. package/lib/services/dns.js.map +1 -0
  174. package/lib/services/durable-objects.d.ts +92 -0
  175. package/lib/services/durable-objects.d.ts.map +1 -0
  176. package/lib/services/durable-objects.js +103 -0
  177. package/lib/services/durable-objects.js.map +1 -0
  178. package/lib/services/email-routing.d.ts +598 -0
  179. package/lib/services/email-routing.d.ts.map +1 -0
  180. package/lib/services/email-routing.js +715 -0
  181. package/lib/services/email-routing.js.map +1 -0
  182. package/lib/services/email-security.d.ts +1389 -0
  183. package/lib/services/email-security.d.ts.map +1 -0
  184. package/lib/services/email-security.js +2261 -0
  185. package/lib/services/email-security.js.map +1 -0
  186. package/lib/services/filters.d.ts +197 -0
  187. package/lib/services/filters.d.ts.map +1 -0
  188. package/lib/services/filters.js +168 -0
  189. package/lib/services/filters.js.map +1 -0
  190. package/lib/services/firewall.d.ts +1352 -0
  191. package/lib/services/firewall.d.ts.map +1 -0
  192. package/lib/services/firewall.js +2084 -0
  193. package/lib/services/firewall.js.map +1 -0
  194. package/lib/services/healthchecks.d.ts +507 -0
  195. package/lib/services/healthchecks.d.ts.map +1 -0
  196. package/lib/services/healthchecks.js +867 -0
  197. package/lib/services/healthchecks.js.map +1 -0
  198. package/lib/services/hostnames.d.ts +86 -0
  199. package/lib/services/hostnames.d.ts.map +1 -0
  200. package/lib/services/hostnames.js +111 -0
  201. package/lib/services/hostnames.js.map +1 -0
  202. package/lib/services/hyperdrive.d.ts +203 -0
  203. package/lib/services/hyperdrive.d.ts.map +1 -0
  204. package/lib/services/hyperdrive.js +300 -0
  205. package/lib/services/hyperdrive.js.map +1 -0
  206. package/lib/services/iam.d.ts +657 -0
  207. package/lib/services/iam.d.ts.map +1 -0
  208. package/lib/services/iam.js +843 -0
  209. package/lib/services/iam.js.map +1 -0
  210. package/lib/services/images.d.ts +427 -0
  211. package/lib/services/images.d.ts.map +1 -0
  212. package/lib/services/images.js +444 -0
  213. package/lib/services/images.js.map +1 -0
  214. package/lib/services/intel.d.ts +865 -0
  215. package/lib/services/intel.d.ts.map +1 -0
  216. package/lib/services/intel.js +1266 -0
  217. package/lib/services/intel.js.map +1 -0
  218. package/lib/services/ips.d.ts +28 -0
  219. package/lib/services/ips.d.ts.map +1 -0
  220. package/lib/services/ips.js +39 -0
  221. package/lib/services/ips.js.map +1 -0
  222. package/lib/services/keyless-certificates.d.ts +197 -0
  223. package/lib/services/keyless-certificates.d.ts.map +1 -0
  224. package/lib/services/keyless-certificates.js +229 -0
  225. package/lib/services/keyless-certificates.js.map +1 -0
  226. package/lib/services/kv.d.ts +369 -0
  227. package/lib/services/kv.d.ts.map +1 -0
  228. package/lib/services/kv.js +453 -0
  229. package/lib/services/kv.js.map +1 -0
  230. package/lib/services/leaked-credential-checks.d.ts +129 -0
  231. package/lib/services/leaked-credential-checks.d.ts.map +1 -0
  232. package/lib/services/leaked-credential-checks.js +138 -0
  233. package/lib/services/leaked-credential-checks.js.map +1 -0
  234. package/lib/services/load-balancers.d.ts +1973 -0
  235. package/lib/services/load-balancers.d.ts.map +1 -0
  236. package/lib/services/load-balancers.js +3181 -0
  237. package/lib/services/load-balancers.js.map +1 -0
  238. package/lib/services/logpush.d.ts +401 -0
  239. package/lib/services/logpush.d.ts.map +1 -0
  240. package/lib/services/logpush.js +732 -0
  241. package/lib/services/logpush.js.map +1 -0
  242. package/lib/services/logs.d.ts +125 -0
  243. package/lib/services/logs.d.ts.map +1 -0
  244. package/lib/services/logs.js +149 -0
  245. package/lib/services/logs.js.map +1 -0
  246. package/lib/services/magic-cloud-networking.d.ts +1892 -0
  247. package/lib/services/magic-cloud-networking.d.ts.map +1 -0
  248. package/lib/services/magic-cloud-networking.js +5291 -0
  249. package/lib/services/magic-cloud-networking.js.map +1 -0
  250. package/lib/services/magic-network-monitoring.d.ts +379 -0
  251. package/lib/services/magic-network-monitoring.d.ts.map +1 -0
  252. package/lib/services/magic-network-monitoring.js +557 -0
  253. package/lib/services/magic-network-monitoring.js.map +1 -0
  254. package/lib/services/magic-transit.d.ts +3886 -0
  255. package/lib/services/magic-transit.d.ts.map +1 -0
  256. package/lib/services/magic-transit.js +6284 -0
  257. package/lib/services/magic-transit.js.map +1 -0
  258. package/lib/services/managed-transforms.d.ts +79 -0
  259. package/lib/services/managed-transforms.d.ts.map +1 -0
  260. package/lib/services/managed-transforms.js +111 -0
  261. package/lib/services/managed-transforms.js.map +1 -0
  262. package/lib/services/memberships.d.ts +204 -0
  263. package/lib/services/memberships.d.ts.map +1 -0
  264. package/lib/services/memberships.js +308 -0
  265. package/lib/services/memberships.js.map +1 -0
  266. package/lib/services/mtls-certificates.d.ts +164 -0
  267. package/lib/services/mtls-certificates.d.ts.map +1 -0
  268. package/lib/services/mtls-certificates.js +192 -0
  269. package/lib/services/mtls-certificates.js.map +1 -0
  270. package/lib/services/network-interconnects.d.ts +410 -0
  271. package/lib/services/network-interconnects.d.ts.map +1 -0
  272. package/lib/services/network-interconnects.js +583 -0
  273. package/lib/services/network-interconnects.js.map +1 -0
  274. package/lib/services/organizations.d.ts +232 -0
  275. package/lib/services/organizations.d.ts.map +1 -0
  276. package/lib/services/organizations.js +370 -0
  277. package/lib/services/organizations.js.map +1 -0
  278. package/lib/services/origin-ca-certificates.d.ts +119 -0
  279. package/lib/services/origin-ca-certificates.d.ts.map +1 -0
  280. package/lib/services/origin-ca-certificates.js +183 -0
  281. package/lib/services/origin-ca-certificates.js.map +1 -0
  282. package/lib/services/origin-post-quantum-encryption.d.ts +50 -0
  283. package/lib/services/origin-post-quantum-encryption.d.ts.map +1 -0
  284. package/lib/services/origin-post-quantum-encryption.js +64 -0
  285. package/lib/services/origin-post-quantum-encryption.js.map +1 -0
  286. package/lib/services/origin-tls-client-auth.d.ts +308 -0
  287. package/lib/services/origin-tls-client-auth.d.ts.map +1 -0
  288. package/lib/services/origin-tls-client-auth.js +435 -0
  289. package/lib/services/origin-tls-client-auth.js.map +1 -0
  290. package/lib/services/page-rules.d.ts +773 -0
  291. package/lib/services/page-rules.d.ts.map +1 -0
  292. package/lib/services/page-rules.js +1373 -0
  293. package/lib/services/page-rules.js.map +1 -0
  294. package/lib/services/page-shield.d.ts +505 -0
  295. package/lib/services/page-shield.d.ts.map +1 -0
  296. package/lib/services/page-shield.js +520 -0
  297. package/lib/services/page-shield.js.map +1 -0
  298. package/lib/services/pages.d.ts +1949 -0
  299. package/lib/services/pages.d.ts.map +1 -0
  300. package/lib/services/pages.js +3030 -0
  301. package/lib/services/pages.js.map +1 -0
  302. package/lib/services/pipelines.d.ts +1716 -0
  303. package/lib/services/pipelines.d.ts.map +1 -0
  304. package/lib/services/pipelines.js +2991 -0
  305. package/lib/services/pipelines.js.map +1 -0
  306. package/lib/services/queues.d.ts +904 -0
  307. package/lib/services/queues.d.ts.map +1 -0
  308. package/lib/services/queues.js +1250 -0
  309. package/lib/services/queues.js.map +1 -0
  310. package/lib/services/r2-data-catalog.d.ts +341 -0
  311. package/lib/services/r2-data-catalog.d.ts.map +1 -0
  312. package/lib/services/r2-data-catalog.js +513 -0
  313. package/lib/services/r2-data-catalog.js.map +1 -0
  314. package/lib/services/r2.d.ts +1087 -0
  315. package/lib/services/r2.d.ts.map +1 -0
  316. package/lib/services/r2.js +1404 -0
  317. package/lib/services/r2.js.map +1 -0
  318. package/lib/services/radar.d.ts +9365 -0
  319. package/lib/services/radar.d.ts.map +1 -0
  320. package/lib/services/radar.js +20552 -0
  321. package/lib/services/radar.js.map +1 -0
  322. package/lib/services/rate-limits.d.ts +360 -0
  323. package/lib/services/rate-limits.d.ts.map +1 -0
  324. package/lib/services/rate-limits.js +545 -0
  325. package/lib/services/rate-limits.js.map +1 -0
  326. package/lib/services/realtime-kit.d.ts +2728 -0
  327. package/lib/services/realtime-kit.d.ts.map +1 -0
  328. package/lib/services/realtime-kit.js +5402 -0
  329. package/lib/services/realtime-kit.js.map +1 -0
  330. package/lib/services/registrar.d.ts +121 -0
  331. package/lib/services/registrar.d.ts.map +1 -0
  332. package/lib/services/registrar.js +167 -0
  333. package/lib/services/registrar.js.map +1 -0
  334. package/lib/services/request-tracers.d.ts +61 -0
  335. package/lib/services/request-tracers.d.ts.map +1 -0
  336. package/lib/services/request-tracers.js +85 -0
  337. package/lib/services/request-tracers.js.map +1 -0
  338. package/lib/services/resource-sharing.d.ts +622 -0
  339. package/lib/services/resource-sharing.d.ts.map +1 -0
  340. package/lib/services/resource-sharing.js +929 -0
  341. package/lib/services/resource-sharing.js.map +1 -0
  342. package/lib/services/rules.d.ts +346 -0
  343. package/lib/services/rules.d.ts.map +1 -0
  344. package/lib/services/rules.js +431 -0
  345. package/lib/services/rules.js.map +1 -0
  346. package/lib/services/rulesets.d.ts +3345 -0
  347. package/lib/services/rulesets.d.ts.map +1 -0
  348. package/lib/services/rulesets.js +7904 -0
  349. package/lib/services/rulesets.js.map +1 -0
  350. package/lib/services/rum.d.ts +314 -0
  351. package/lib/services/rum.d.ts.map +1 -0
  352. package/lib/services/rum.js +442 -0
  353. package/lib/services/rum.js.map +1 -0
  354. package/lib/services/schema-validation.d.ts +273 -0
  355. package/lib/services/schema-validation.d.ts.map +1 -0
  356. package/lib/services/schema-validation.js +365 -0
  357. package/lib/services/schema-validation.js.map +1 -0
  358. package/lib/services/secrets-store.d.ts +393 -0
  359. package/lib/services/secrets-store.d.ts.map +1 -0
  360. package/lib/services/secrets-store.js +452 -0
  361. package/lib/services/secrets-store.js.map +1 -0
  362. package/lib/services/security-center.d.ts +136 -0
  363. package/lib/services/security-center.d.ts.map +1 -0
  364. package/lib/services/security-center.js +196 -0
  365. package/lib/services/security-center.js.map +1 -0
  366. package/lib/services/security-txt.d.ts +105 -0
  367. package/lib/services/security-txt.d.ts.map +1 -0
  368. package/lib/services/security-txt.js +136 -0
  369. package/lib/services/security-txt.js.map +1 -0
  370. package/lib/services/snippets.d.ts +190 -0
  371. package/lib/services/snippets.d.ts.map +1 -0
  372. package/lib/services/snippets.js +221 -0
  373. package/lib/services/snippets.js.map +1 -0
  374. package/lib/services/spectrum.d.ts +350 -0
  375. package/lib/services/spectrum.d.ts.map +1 -0
  376. package/lib/services/spectrum.js +535 -0
  377. package/lib/services/spectrum.js.map +1 -0
  378. package/lib/services/speed.d.ts +257 -0
  379. package/lib/services/speed.d.ts.map +1 -0
  380. package/lib/services/speed.js +471 -0
  381. package/lib/services/speed.js.map +1 -0
  382. package/lib/services/ssl.d.ts +412 -0
  383. package/lib/services/ssl.d.ts.map +1 -0
  384. package/lib/services/ssl.js +755 -0
  385. package/lib/services/ssl.js.map +1 -0
  386. package/lib/services/stream.d.ts +1110 -0
  387. package/lib/services/stream.d.ts.map +1 -0
  388. package/lib/services/stream.js +1085 -0
  389. package/lib/services/stream.js.map +1 -0
  390. package/lib/services/token-validation.d.ts +662 -0
  391. package/lib/services/token-validation.d.ts.map +1 -0
  392. package/lib/services/token-validation.js +834 -0
  393. package/lib/services/token-validation.js.map +1 -0
  394. package/lib/services/turnstile.d.ts +272 -0
  395. package/lib/services/turnstile.d.ts.map +1 -0
  396. package/lib/services/turnstile.js +339 -0
  397. package/lib/services/turnstile.js.map +1 -0
  398. package/lib/services/url-normalization.d.ts +53 -0
  399. package/lib/services/url-normalization.d.ts.map +1 -0
  400. package/lib/services/url-normalization.js +52 -0
  401. package/lib/services/url-normalization.js.map +1 -0
  402. package/lib/services/url-scanner.d.ts +612 -0
  403. package/lib/services/url-scanner.d.ts.map +1 -0
  404. package/lib/services/url-scanner.js +915 -0
  405. package/lib/services/url-scanner.js.map +1 -0
  406. package/lib/services/user.d.ts +507 -0
  407. package/lib/services/user.d.ts.map +1 -0
  408. package/lib/services/user.js +634 -0
  409. package/lib/services/user.js.map +1 -0
  410. package/lib/services/vectorize.d.ts +297 -0
  411. package/lib/services/vectorize.d.ts.map +1 -0
  412. package/lib/services/vectorize.js +351 -0
  413. package/lib/services/vectorize.js.map +1 -0
  414. package/lib/services/waiting-rooms.d.ts +1149 -0
  415. package/lib/services/waiting-rooms.d.ts.map +1 -0
  416. package/lib/services/waiting-rooms.js +1859 -0
  417. package/lib/services/waiting-rooms.js.map +1 -0
  418. package/lib/services/web3.d.ts +289 -0
  419. package/lib/services/web3.d.ts.map +1 -0
  420. package/lib/services/web3.js +381 -0
  421. package/lib/services/web3.js.map +1 -0
  422. package/lib/services/workers-for-platforms.d.ts +1394 -0
  423. package/lib/services/workers-for-platforms.d.ts.map +1 -0
  424. package/lib/services/workers-for-platforms.js +2121 -0
  425. package/lib/services/workers-for-platforms.js.map +1 -0
  426. package/lib/services/workers.d.ts +3827 -0
  427. package/lib/services/workers.d.ts.map +1 -0
  428. package/lib/services/workers.js +6105 -0
  429. package/lib/services/workers.js.map +1 -0
  430. package/lib/services/workflows.d.ts +442 -0
  431. package/lib/services/workflows.d.ts.map +1 -0
  432. package/lib/services/workflows.js +599 -0
  433. package/lib/services/workflows.js.map +1 -0
  434. package/lib/services/zaraz.d.ts +312 -0
  435. package/lib/services/zaraz.d.ts.map +1 -0
  436. package/lib/services/zaraz.js +305 -0
  437. package/lib/services/zaraz.js.map +1 -0
  438. package/lib/services/zero-trust.d.ts +18235 -0
  439. package/lib/services/zero-trust.d.ts.map +1 -0
  440. package/lib/services/zero-trust.js +30268 -0
  441. package/lib/services/zero-trust.js.map +1 -0
  442. package/lib/services/zones.d.ts +1382 -0
  443. package/lib/services/zones.d.ts.map +1 -0
  444. package/lib/services/zones.js +2477 -0
  445. package/lib/services/zones.js.map +1 -0
  446. package/lib/traits.d.ts +28 -0
  447. package/lib/traits.d.ts.map +1 -0
  448. package/lib/traits.js +26 -0
  449. package/lib/traits.js.map +1 -0
  450. package/package.json +82 -0
  451. package/src/auth.ts +15 -0
  452. package/src/category.ts +1 -0
  453. package/src/client/api.ts +421 -0
  454. package/src/client/index.ts +7 -0
  455. package/src/credentials.ts +271 -0
  456. package/src/errors.ts +73 -0
  457. package/src/index.ts +9 -0
  458. package/src/retry.ts +35 -0
  459. package/src/schemas.ts +51 -0
  460. package/src/sensitive.ts +4 -0
  461. package/src/services/abuse-reports.ts +955 -0
  462. package/src/services/accounts.ts +2152 -0
  463. package/src/services/acm.ts +178 -0
  464. package/src/services/addressing.ts +4262 -0
  465. package/src/services/ai-gateway.ts +3773 -0
  466. package/src/services/ai.ts +901 -0
  467. package/src/services/aisearch.ts +5215 -0
  468. package/src/services/alerting.ts +3303 -0
  469. package/src/services/api-gateway.ts +3890 -0
  470. package/src/services/argo.ts +270 -0
  471. package/src/services/audit-logs.ts +90 -0
  472. package/src/services/billing.ts +176 -0
  473. package/src/services/bot-management.ts +545 -0
  474. package/src/services/botnet-feed.ts +205 -0
  475. package/src/services/brand-protection.ts +575 -0
  476. package/src/services/browser-rendering.ts +2720 -0
  477. package/src/services/cache.ts +877 -0
  478. package/src/services/calls.ts +548 -0
  479. package/src/services/certificate-authorities.ts +114 -0
  480. package/src/services/client-certificates.ts +815 -0
  481. package/src/services/cloud-connector.ts +248 -0
  482. package/src/services/cloudforce-one.ts +4104 -0
  483. package/src/services/connectivity.ts +706 -0
  484. package/src/services/content-scanning.ts +458 -0
  485. package/src/services/custom-certificates.ts +690 -0
  486. package/src/services/custom-hostnames.ts +2641 -0
  487. package/src/services/custom-nameservers.ts +235 -0
  488. package/src/services/custom-pages.ts +311 -0
  489. package/src/services/d1.ts +1208 -0
  490. package/src/services/dcv-delegation.ts +54 -0
  491. package/src/services/diagnostics.ts +677 -0
  492. package/src/services/dns-firewall.ts +904 -0
  493. package/src/services/dns.ts +9277 -0
  494. package/src/services/durable-objects.ts +237 -0
  495. package/src/services/email-routing.ts +1796 -0
  496. package/src/services/email-security.ts +5052 -0
  497. package/src/services/filters.ts +488 -0
  498. package/src/services/firewall.ts +4728 -0
  499. package/src/services/healthchecks.ts +1866 -0
  500. package/src/services/hostnames.ts +254 -0
  501. package/src/services/hyperdrive.ts +595 -0
  502. package/src/services/iam.ts +1969 -0
  503. package/src/services/images.ts +1180 -0
  504. package/src/services/intel.ts +3072 -0
  505. package/src/services/ips.ts +88 -0
  506. package/src/services/keyless-certificates.ts +509 -0
  507. package/src/services/kv.ts +1129 -0
  508. package/src/services/leaked-credential-checks.ts +364 -0
  509. package/src/services/load-balancers.ts +6993 -0
  510. package/src/services/logpush.ts +1695 -0
  511. package/src/services/logs.ts +389 -0
  512. package/src/services/magic-cloud-networking.ts +10747 -0
  513. package/src/services/magic-network-monitoring.ts +1200 -0
  514. package/src/services/magic-transit.ts +13673 -0
  515. package/src/services/managed-transforms.ts +245 -0
  516. package/src/services/memberships.ts +698 -0
  517. package/src/services/mtls-certificates.ts +444 -0
  518. package/src/services/network-interconnects.ts +1253 -0
  519. package/src/services/organizations.ts +738 -0
  520. package/src/services/origin-ca-certificates.ts +369 -0
  521. package/src/services/origin-post-quantum-encryption.ts +136 -0
  522. package/src/services/origin-tls-client-auth.ts +1002 -0
  523. package/src/services/page-rules.ts +2632 -0
  524. package/src/services/page-shield.ts +1371 -0
  525. package/src/services/pages.ts +6167 -0
  526. package/src/services/pipelines.ts +6455 -0
  527. package/src/services/queues.ts +2827 -0
  528. package/src/services/r2-data-catalog.ts +1151 -0
  529. package/src/services/r2.ts +3529 -0
  530. package/src/services/radar.ts +42836 -0
  531. package/src/services/rate-limits.ts +1252 -0
  532. package/src/services/realtime-kit.ts +11080 -0
  533. package/src/services/registrar.ts +390 -0
  534. package/src/services/request-tracers.ts +161 -0
  535. package/src/services/resource-sharing.ts +2082 -0
  536. package/src/services/rules.ts +953 -0
  537. package/src/services/rulesets.ts +15361 -0
  538. package/src/services/rum.ts +994 -0
  539. package/src/services/schema-validation.ts +869 -0
  540. package/src/services/secrets-store.ts +1050 -0
  541. package/src/services/security-center.ts +495 -0
  542. package/src/services/security-txt.ts +317 -0
  543. package/src/services/snippets.ts +562 -0
  544. package/src/services/spectrum.ts +1190 -0
  545. package/src/services/speed.ts +1154 -0
  546. package/src/services/ssl.ts +1714 -0
  547. package/src/services/stream.ts +3008 -0
  548. package/src/services/token-validation.ts +1825 -0
  549. package/src/services/turnstile.ts +725 -0
  550. package/src/services/url-normalization.ts +133 -0
  551. package/src/services/url-scanner.ts +1851 -0
  552. package/src/services/user.ts +1587 -0
  553. package/src/services/vectorize.ts +875 -0
  554. package/src/services/waiting-rooms.ts +4216 -0
  555. package/src/services/web3.ts +899 -0
  556. package/src/services/workers-for-platforms.ts +4134 -0
  557. package/src/services/workers.ts +12298 -0
  558. package/src/services/workflows.ts +1372 -0
  559. package/src/services/zaraz.ts +833 -0
  560. package/src/services/zero-trust.ts +64685 -0
  561. package/src/services/zones.ts +5106 -0
  562. package/src/traits.ts +47 -0
@@ -0,0 +1,2084 @@
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
+ import * as stream from "effect/Stream";
8
+ import * as Schema from "effect/Schema";
9
+ import * as API from "../client/api.js";
10
+ import * as T from "../traits.js";
11
+ import {} from "../errors.js";
12
+ export const GetAccessRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
13
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
14
+ }).pipe(T.Http({
15
+ method: "GET",
16
+ path: "/{accountOrZone}/{accountOrZoneId}/firewall/access_rules/rules/{ruleId}",
17
+ }));
18
+ export const GetAccessRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
19
+ id: Schema.String,
20
+ allowedModes: Schema.Array(Schema.Literals([
21
+ "block",
22
+ "challenge",
23
+ "whitelist",
24
+ "js_challenge",
25
+ "managed_challenge",
26
+ ])),
27
+ configuration: Schema.Union([
28
+ Schema.Struct({
29
+ target: Schema.optional(Schema.Union([Schema.Literal("ip"), Schema.Null])),
30
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
31
+ }),
32
+ Schema.Struct({
33
+ target: Schema.optional(Schema.Union([Schema.Literal("ip6"), Schema.Null])),
34
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
35
+ }),
36
+ Schema.Struct({
37
+ target: Schema.optional(Schema.Union([Schema.Literal("ip_range"), Schema.Null])),
38
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
39
+ }),
40
+ Schema.Struct({
41
+ target: Schema.optional(Schema.Union([Schema.Literal("asn"), Schema.Null])),
42
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
43
+ }),
44
+ Schema.Struct({
45
+ target: Schema.optional(Schema.Union([Schema.Literal("country"), Schema.Null])),
46
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
47
+ }),
48
+ ]),
49
+ mode: Schema.Literals([
50
+ "block",
51
+ "challenge",
52
+ "whitelist",
53
+ "js_challenge",
54
+ "managed_challenge",
55
+ ]),
56
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
57
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
58
+ notes: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
59
+ scope: Schema.optional(Schema.Union([
60
+ Schema.Struct({
61
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
62
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
63
+ type: Schema.optional(Schema.Union([
64
+ Schema.Literals(["user", "organization"]),
65
+ Schema.Null,
66
+ ])),
67
+ }),
68
+ Schema.Null,
69
+ ])),
70
+ })
71
+ .pipe(Schema.encodeKeys({
72
+ id: "id",
73
+ allowedModes: "allowed_modes",
74
+ configuration: "configuration",
75
+ mode: "mode",
76
+ createdOn: "created_on",
77
+ modifiedOn: "modified_on",
78
+ notes: "notes",
79
+ scope: "scope",
80
+ }))
81
+ .pipe(T.ResponsePath("result"));
82
+ export const getAccessRule = API.make(() => ({
83
+ input: GetAccessRuleRequest,
84
+ output: GetAccessRuleResponse,
85
+ errors: [],
86
+ }));
87
+ export const ListAccessRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(T.Http({
88
+ method: "GET",
89
+ path: "/{accountOrZone}/{accountOrZoneId}/firewall/access_rules/rules",
90
+ }));
91
+ export const ListAccessRulesResponse =
92
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
93
+ result: Schema.Array(Schema.Struct({
94
+ id: Schema.String,
95
+ allowedModes: Schema.Array(Schema.Literals([
96
+ "block",
97
+ "challenge",
98
+ "whitelist",
99
+ "js_challenge",
100
+ "managed_challenge",
101
+ ])),
102
+ configuration: Schema.Union([
103
+ Schema.Struct({
104
+ target: Schema.optional(Schema.Union([Schema.Literal("ip"), Schema.Null])),
105
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
106
+ }),
107
+ Schema.Struct({
108
+ target: Schema.optional(Schema.Union([Schema.Literal("ip6"), Schema.Null])),
109
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
110
+ }),
111
+ Schema.Struct({
112
+ target: Schema.optional(Schema.Union([Schema.Literal("ip_range"), Schema.Null])),
113
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
114
+ }),
115
+ Schema.Struct({
116
+ target: Schema.optional(Schema.Union([Schema.Literal("asn"), Schema.Null])),
117
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
118
+ }),
119
+ Schema.Struct({
120
+ target: Schema.optional(Schema.Union([Schema.Literal("country"), Schema.Null])),
121
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
122
+ }),
123
+ ]),
124
+ mode: Schema.Literals([
125
+ "block",
126
+ "challenge",
127
+ "whitelist",
128
+ "js_challenge",
129
+ "managed_challenge",
130
+ ]),
131
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
132
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
133
+ notes: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
134
+ scope: Schema.optional(Schema.Union([
135
+ Schema.Struct({
136
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
137
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
138
+ type: Schema.optional(Schema.Union([
139
+ Schema.Literals(["user", "organization"]),
140
+ Schema.Null,
141
+ ])),
142
+ }),
143
+ Schema.Null,
144
+ ])),
145
+ }).pipe(Schema.encodeKeys({
146
+ id: "id",
147
+ allowedModes: "allowed_modes",
148
+ configuration: "configuration",
149
+ mode: "mode",
150
+ createdOn: "created_on",
151
+ modifiedOn: "modified_on",
152
+ notes: "notes",
153
+ scope: "scope",
154
+ }))),
155
+ resultInfo: Schema.Struct({
156
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
157
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
158
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
159
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
160
+ }).pipe(Schema.encodeKeys({
161
+ count: "count",
162
+ page: "page",
163
+ perPage: "per_page",
164
+ totalCount: "total_count",
165
+ })),
166
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
167
+ export const listAccessRules = API.makePaginated(() => ({
168
+ input: ListAccessRulesRequest,
169
+ output: ListAccessRulesResponse,
170
+ errors: [],
171
+ pagination: {
172
+ mode: "page",
173
+ inputToken: "page",
174
+ outputToken: "resultInfo.page",
175
+ items: "result",
176
+ pageSize: "perPage",
177
+ },
178
+ }));
179
+ export const CreateAccessRuleRequest =
180
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
181
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
182
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
183
+ configuration: Schema.Union([
184
+ Schema.Struct({
185
+ target: Schema.optional(Schema.Literal("ip")),
186
+ value: Schema.optional(Schema.String),
187
+ }),
188
+ Schema.Struct({
189
+ target: Schema.optional(Schema.Literal("ip6")),
190
+ value: Schema.optional(Schema.String),
191
+ }),
192
+ Schema.Struct({
193
+ target: Schema.optional(Schema.Literal("ip_range")),
194
+ value: Schema.optional(Schema.String),
195
+ }),
196
+ Schema.Struct({
197
+ target: Schema.optional(Schema.Literal("asn")),
198
+ value: Schema.optional(Schema.String),
199
+ }),
200
+ Schema.Struct({
201
+ target: Schema.optional(Schema.Literal("country")),
202
+ value: Schema.optional(Schema.String),
203
+ }),
204
+ ]),
205
+ mode: Schema.Literals([
206
+ "block",
207
+ "challenge",
208
+ "whitelist",
209
+ "js_challenge",
210
+ "managed_challenge",
211
+ ]),
212
+ notes: Schema.optional(Schema.String),
213
+ }).pipe(T.Http({
214
+ method: "POST",
215
+ path: "/{accountOrZone}/{accountOrZoneId}/firewall/access_rules/rules",
216
+ }));
217
+ export const CreateAccessRuleResponse =
218
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
219
+ id: Schema.String,
220
+ allowedModes: Schema.Array(Schema.Literals([
221
+ "block",
222
+ "challenge",
223
+ "whitelist",
224
+ "js_challenge",
225
+ "managed_challenge",
226
+ ])),
227
+ configuration: Schema.Union([
228
+ Schema.Struct({
229
+ target: Schema.optional(Schema.Union([Schema.Literal("ip"), Schema.Null])),
230
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
231
+ }),
232
+ Schema.Struct({
233
+ target: Schema.optional(Schema.Union([Schema.Literal("ip6"), Schema.Null])),
234
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
235
+ }),
236
+ Schema.Struct({
237
+ target: Schema.optional(Schema.Union([Schema.Literal("ip_range"), Schema.Null])),
238
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
239
+ }),
240
+ Schema.Struct({
241
+ target: Schema.optional(Schema.Union([Schema.Literal("asn"), Schema.Null])),
242
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
243
+ }),
244
+ Schema.Struct({
245
+ target: Schema.optional(Schema.Union([Schema.Literal("country"), Schema.Null])),
246
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
247
+ }),
248
+ ]),
249
+ mode: Schema.Literals([
250
+ "block",
251
+ "challenge",
252
+ "whitelist",
253
+ "js_challenge",
254
+ "managed_challenge",
255
+ ]),
256
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
257
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
258
+ notes: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
259
+ scope: Schema.optional(Schema.Union([
260
+ Schema.Struct({
261
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
262
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
263
+ type: Schema.optional(Schema.Union([
264
+ Schema.Literals(["user", "organization"]),
265
+ Schema.Null,
266
+ ])),
267
+ }),
268
+ Schema.Null,
269
+ ])),
270
+ })
271
+ .pipe(Schema.encodeKeys({
272
+ id: "id",
273
+ allowedModes: "allowed_modes",
274
+ configuration: "configuration",
275
+ mode: "mode",
276
+ createdOn: "created_on",
277
+ modifiedOn: "modified_on",
278
+ notes: "notes",
279
+ scope: "scope",
280
+ }))
281
+ .pipe(T.ResponsePath("result"));
282
+ export const createAccessRule = API.make(() => ({
283
+ input: CreateAccessRuleRequest,
284
+ output: CreateAccessRuleResponse,
285
+ errors: [],
286
+ }));
287
+ export const PatchAccessRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
288
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
289
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
290
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
291
+ configuration: Schema.Union([
292
+ Schema.Struct({
293
+ target: Schema.optional(Schema.Literal("ip")),
294
+ value: Schema.optional(Schema.String),
295
+ }),
296
+ Schema.Struct({
297
+ target: Schema.optional(Schema.Literal("ip6")),
298
+ value: Schema.optional(Schema.String),
299
+ }),
300
+ Schema.Struct({
301
+ target: Schema.optional(Schema.Literal("ip_range")),
302
+ value: Schema.optional(Schema.String),
303
+ }),
304
+ Schema.Struct({
305
+ target: Schema.optional(Schema.Literal("asn")),
306
+ value: Schema.optional(Schema.String),
307
+ }),
308
+ Schema.Struct({
309
+ target: Schema.optional(Schema.Literal("country")),
310
+ value: Schema.optional(Schema.String),
311
+ }),
312
+ ]),
313
+ mode: Schema.Literals([
314
+ "block",
315
+ "challenge",
316
+ "whitelist",
317
+ "js_challenge",
318
+ "managed_challenge",
319
+ ]),
320
+ notes: Schema.optional(Schema.String),
321
+ }).pipe(T.Http({
322
+ method: "PATCH",
323
+ path: "/{accountOrZone}/{accountOrZoneId}/firewall/access_rules/rules/{ruleId}",
324
+ }));
325
+ export const PatchAccessRuleResponse =
326
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
327
+ id: Schema.String,
328
+ allowedModes: Schema.Array(Schema.Literals([
329
+ "block",
330
+ "challenge",
331
+ "whitelist",
332
+ "js_challenge",
333
+ "managed_challenge",
334
+ ])),
335
+ configuration: Schema.Union([
336
+ Schema.Struct({
337
+ target: Schema.optional(Schema.Union([Schema.Literal("ip"), Schema.Null])),
338
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
339
+ }),
340
+ Schema.Struct({
341
+ target: Schema.optional(Schema.Union([Schema.Literal("ip6"), Schema.Null])),
342
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
343
+ }),
344
+ Schema.Struct({
345
+ target: Schema.optional(Schema.Union([Schema.Literal("ip_range"), Schema.Null])),
346
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
347
+ }),
348
+ Schema.Struct({
349
+ target: Schema.optional(Schema.Union([Schema.Literal("asn"), Schema.Null])),
350
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
351
+ }),
352
+ Schema.Struct({
353
+ target: Schema.optional(Schema.Union([Schema.Literal("country"), Schema.Null])),
354
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
355
+ }),
356
+ ]),
357
+ mode: Schema.Literals([
358
+ "block",
359
+ "challenge",
360
+ "whitelist",
361
+ "js_challenge",
362
+ "managed_challenge",
363
+ ]),
364
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
365
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
366
+ notes: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
367
+ scope: Schema.optional(Schema.Union([
368
+ Schema.Struct({
369
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
370
+ email: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
371
+ type: Schema.optional(Schema.Union([
372
+ Schema.Literals(["user", "organization"]),
373
+ Schema.Null,
374
+ ])),
375
+ }),
376
+ Schema.Null,
377
+ ])),
378
+ })
379
+ .pipe(Schema.encodeKeys({
380
+ id: "id",
381
+ allowedModes: "allowed_modes",
382
+ configuration: "configuration",
383
+ mode: "mode",
384
+ createdOn: "created_on",
385
+ modifiedOn: "modified_on",
386
+ notes: "notes",
387
+ scope: "scope",
388
+ }))
389
+ .pipe(T.ResponsePath("result"));
390
+ export const patchAccessRule = API.make(() => ({
391
+ input: PatchAccessRuleRequest,
392
+ output: PatchAccessRuleResponse,
393
+ errors: [],
394
+ }));
395
+ export const DeleteAccessRuleRequest =
396
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
397
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
398
+ }).pipe(T.Http({
399
+ method: "DELETE",
400
+ path: "/{accountOrZone}/{accountOrZoneId}/firewall/access_rules/rules/{ruleId}",
401
+ }));
402
+ export const DeleteAccessRuleResponse =
403
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
404
+ id: Schema.String,
405
+ }).pipe(T.ResponsePath("result"));
406
+ export const deleteAccessRule = API.make(() => ({
407
+ input: DeleteAccessRuleRequest,
408
+ output: DeleteAccessRuleResponse,
409
+ errors: [],
410
+ }));
411
+ export const GetLockdownRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
412
+ lockDownsId: Schema.String.pipe(T.HttpPath("lockDownsId")),
413
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
414
+ }).pipe(T.Http({
415
+ method: "GET",
416
+ path: "/zones/{zone_id}/firewall/lockdowns/{lockDownsId}",
417
+ }));
418
+ export const GetLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
419
+ id: Schema.String,
420
+ configurations: Schema.Unknown,
421
+ createdOn: Schema.String,
422
+ description: Schema.String,
423
+ modifiedOn: Schema.String,
424
+ paused: Schema.Boolean,
425
+ urls: Schema.Array(Schema.String),
426
+ })
427
+ .pipe(Schema.encodeKeys({
428
+ id: "id",
429
+ configurations: "configurations",
430
+ createdOn: "created_on",
431
+ description: "description",
432
+ modifiedOn: "modified_on",
433
+ paused: "paused",
434
+ urls: "urls",
435
+ }))
436
+ .pipe(T.ResponsePath("result"));
437
+ export const getLockdown = API.make(() => ({
438
+ input: GetLockdownRequest,
439
+ output: GetLockdownResponse,
440
+ errors: [],
441
+ }));
442
+ export const ListLockdownsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
443
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
444
+ createdOn: Schema.optional(Schema.String).pipe(T.HttpQuery("created_on")),
445
+ description: Schema.optional(Schema.String).pipe(T.HttpQuery("description")),
446
+ descriptionSearch: Schema.optional(Schema.String).pipe(T.HttpQuery("description_search")),
447
+ ip: Schema.optional(Schema.String).pipe(T.HttpQuery("ip")),
448
+ ipRangeSearch: Schema.optional(Schema.String).pipe(T.HttpQuery("ip_range_search")),
449
+ ipSearch: Schema.optional(Schema.String).pipe(T.HttpQuery("ip_search")),
450
+ modifiedOn: Schema.optional(Schema.String).pipe(T.HttpQuery("modified_on")),
451
+ priority: Schema.optional(Schema.Number).pipe(T.HttpQuery("priority")),
452
+ uriSearch: Schema.optional(Schema.String).pipe(T.HttpQuery("uri_search")),
453
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/lockdowns" }));
454
+ export const ListLockdownsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
455
+ result: Schema.Array(Schema.Struct({
456
+ id: Schema.String,
457
+ configurations: Schema.Unknown,
458
+ createdOn: Schema.String,
459
+ description: Schema.String,
460
+ modifiedOn: Schema.String,
461
+ paused: Schema.Boolean,
462
+ urls: Schema.Array(Schema.String),
463
+ }).pipe(Schema.encodeKeys({
464
+ id: "id",
465
+ configurations: "configurations",
466
+ createdOn: "created_on",
467
+ description: "description",
468
+ modifiedOn: "modified_on",
469
+ paused: "paused",
470
+ urls: "urls",
471
+ }))),
472
+ resultInfo: Schema.Struct({
473
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
474
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
475
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
476
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
477
+ }).pipe(Schema.encodeKeys({
478
+ count: "count",
479
+ page: "page",
480
+ perPage: "per_page",
481
+ totalCount: "total_count",
482
+ })),
483
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
484
+ export const listLockdowns = API.makePaginated(() => ({
485
+ input: ListLockdownsRequest,
486
+ output: ListLockdownsResponse,
487
+ errors: [],
488
+ pagination: {
489
+ mode: "page",
490
+ inputToken: "page",
491
+ outputToken: "resultInfo.page",
492
+ items: "result",
493
+ pageSize: "perPage",
494
+ },
495
+ }));
496
+ export const CreateLockdownRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
497
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
498
+ configurations: Schema.Unknown,
499
+ urls: Schema.Array(Schema.String),
500
+ description: Schema.optional(Schema.String),
501
+ paused: Schema.optional(Schema.Boolean),
502
+ priority: Schema.optional(Schema.Number),
503
+ }).pipe(T.Http({ method: "POST", path: "/zones/{zone_id}/firewall/lockdowns" }));
504
+ export const CreateLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
505
+ id: Schema.String,
506
+ configurations: Schema.Unknown,
507
+ createdOn: Schema.String,
508
+ description: Schema.String,
509
+ modifiedOn: Schema.String,
510
+ paused: Schema.Boolean,
511
+ urls: Schema.Array(Schema.String),
512
+ })
513
+ .pipe(Schema.encodeKeys({
514
+ id: "id",
515
+ configurations: "configurations",
516
+ createdOn: "created_on",
517
+ description: "description",
518
+ modifiedOn: "modified_on",
519
+ paused: "paused",
520
+ urls: "urls",
521
+ }))
522
+ .pipe(T.ResponsePath("result"));
523
+ export const createLockdown = API.make(() => ({
524
+ input: CreateLockdownRequest,
525
+ output: CreateLockdownResponse,
526
+ errors: [],
527
+ }));
528
+ export const UpdateLockdownRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
529
+ lockDownsId: Schema.String.pipe(T.HttpPath("lockDownsId")),
530
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
531
+ configurations: Schema.Unknown,
532
+ urls: Schema.Array(Schema.String),
533
+ }).pipe(T.Http({
534
+ method: "PUT",
535
+ path: "/zones/{zone_id}/firewall/lockdowns/{lockDownsId}",
536
+ }));
537
+ export const UpdateLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
538
+ id: Schema.String,
539
+ configurations: Schema.Unknown,
540
+ createdOn: Schema.String,
541
+ description: Schema.String,
542
+ modifiedOn: Schema.String,
543
+ paused: Schema.Boolean,
544
+ urls: Schema.Array(Schema.String),
545
+ })
546
+ .pipe(Schema.encodeKeys({
547
+ id: "id",
548
+ configurations: "configurations",
549
+ createdOn: "created_on",
550
+ description: "description",
551
+ modifiedOn: "modified_on",
552
+ paused: "paused",
553
+ urls: "urls",
554
+ }))
555
+ .pipe(T.ResponsePath("result"));
556
+ export const updateLockdown = API.make(() => ({
557
+ input: UpdateLockdownRequest,
558
+ output: UpdateLockdownResponse,
559
+ errors: [],
560
+ }));
561
+ export const DeleteLockdownRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
562
+ lockDownsId: Schema.String.pipe(T.HttpPath("lockDownsId")),
563
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
564
+ }).pipe(T.Http({
565
+ method: "DELETE",
566
+ path: "/zones/{zone_id}/firewall/lockdowns/{lockDownsId}",
567
+ }));
568
+ export const DeleteLockdownResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
569
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
570
+ }).pipe(T.ResponsePath("result"));
571
+ export const deleteLockdown = API.make(() => ({
572
+ input: DeleteLockdownRequest,
573
+ output: DeleteLockdownResponse,
574
+ errors: [],
575
+ }));
576
+ export const BulkPutRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
577
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
578
+ body: Schema.Unknown.pipe(T.HttpBody()),
579
+ }).pipe(T.Http({ method: "PUT", path: "/zones/{zone_id}/firewall/rules" }));
580
+ export const BulkPutRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
581
+ result: Schema.Array(Schema.Struct({
582
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
583
+ action: Schema.optional(Schema.Union([
584
+ Schema.Literals([
585
+ "block",
586
+ "challenge",
587
+ "js_challenge",
588
+ "managed_challenge",
589
+ "allow",
590
+ "log",
591
+ "bypass",
592
+ ]),
593
+ Schema.Null,
594
+ ])),
595
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
596
+ filter: Schema.optional(Schema.Union([
597
+ Schema.Union([
598
+ Schema.Unknown,
599
+ Schema.Struct({
600
+ id: Schema.String,
601
+ deleted: Schema.Boolean,
602
+ }),
603
+ ]),
604
+ Schema.Null,
605
+ ])),
606
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
607
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
608
+ products: Schema.optional(Schema.Union([
609
+ Schema.Array(Schema.Literals([
610
+ "zoneLockdown",
611
+ "uaBlock",
612
+ "bic",
613
+ "hot",
614
+ "securityLevel",
615
+ "rateLimit",
616
+ "waf",
617
+ ])),
618
+ Schema.Null,
619
+ ])),
620
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
621
+ })),
622
+ });
623
+ export const bulkPutRules = API.makePaginated(() => ({
624
+ input: BulkPutRulesRequest,
625
+ output: BulkPutRulesResponse,
626
+ errors: [],
627
+ pagination: {
628
+ mode: "single",
629
+ items: "result",
630
+ },
631
+ }));
632
+ export const GetRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
633
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
634
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
635
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/rules/{ruleId}" }));
636
+ export const GetRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
637
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
638
+ action: Schema.optional(Schema.Union([
639
+ Schema.Literals([
640
+ "block",
641
+ "challenge",
642
+ "js_challenge",
643
+ "managed_challenge",
644
+ "allow",
645
+ "log",
646
+ "bypass",
647
+ ]),
648
+ Schema.Null,
649
+ ])),
650
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
651
+ filter: Schema.optional(Schema.Union([
652
+ Schema.Union([
653
+ Schema.Unknown,
654
+ Schema.Struct({
655
+ id: Schema.String,
656
+ deleted: Schema.Boolean,
657
+ }),
658
+ ]),
659
+ Schema.Null,
660
+ ])),
661
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
662
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
663
+ products: Schema.optional(Schema.Union([
664
+ Schema.Array(Schema.Literals([
665
+ "zoneLockdown",
666
+ "uaBlock",
667
+ "bic",
668
+ "hot",
669
+ "securityLevel",
670
+ "rateLimit",
671
+ "waf",
672
+ ])),
673
+ Schema.Null,
674
+ ])),
675
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
676
+ }).pipe(T.ResponsePath("result"));
677
+ export const getRule = API.make(() => ({
678
+ input: GetRuleRequest,
679
+ output: GetRuleResponse,
680
+ errors: [],
681
+ }));
682
+ export const ListRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
683
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
684
+ id: Schema.optional(Schema.String).pipe(T.HttpQuery("id")),
685
+ action: Schema.optional(Schema.String).pipe(T.HttpQuery("action")),
686
+ description: Schema.optional(Schema.String).pipe(T.HttpQuery("description")),
687
+ paused: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("paused")),
688
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/rules" }));
689
+ export const ListRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
690
+ result: Schema.Array(Schema.Struct({
691
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
692
+ action: Schema.optional(Schema.Union([
693
+ Schema.Literals([
694
+ "block",
695
+ "challenge",
696
+ "js_challenge",
697
+ "managed_challenge",
698
+ "allow",
699
+ "log",
700
+ "bypass",
701
+ ]),
702
+ Schema.Null,
703
+ ])),
704
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
705
+ filter: Schema.optional(Schema.Union([
706
+ Schema.Union([
707
+ Schema.Unknown,
708
+ Schema.Struct({
709
+ id: Schema.String,
710
+ deleted: Schema.Boolean,
711
+ }),
712
+ ]),
713
+ Schema.Null,
714
+ ])),
715
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
716
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
717
+ products: Schema.optional(Schema.Union([
718
+ Schema.Array(Schema.Literals([
719
+ "zoneLockdown",
720
+ "uaBlock",
721
+ "bic",
722
+ "hot",
723
+ "securityLevel",
724
+ "rateLimit",
725
+ "waf",
726
+ ])),
727
+ Schema.Null,
728
+ ])),
729
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
730
+ })),
731
+ resultInfo: Schema.Struct({
732
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
733
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
734
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
735
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
736
+ }).pipe(Schema.encodeKeys({
737
+ count: "count",
738
+ page: "page",
739
+ perPage: "per_page",
740
+ totalCount: "total_count",
741
+ })),
742
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
743
+ export const listRules = API.makePaginated(() => ({
744
+ input: ListRulesRequest,
745
+ output: ListRulesResponse,
746
+ errors: [],
747
+ pagination: {
748
+ mode: "page",
749
+ inputToken: "page",
750
+ outputToken: "resultInfo.page",
751
+ items: "result",
752
+ pageSize: "perPage",
753
+ },
754
+ }));
755
+ export const CreateRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
756
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
757
+ action: Schema.Struct({
758
+ mode: Schema.optional(Schema.Literals([
759
+ "simulate",
760
+ "ban",
761
+ "challenge",
762
+ "js_challenge",
763
+ "managed_challenge",
764
+ ])),
765
+ response: Schema.optional(Schema.Struct({
766
+ body: Schema.optional(Schema.String),
767
+ contentType: Schema.optional(Schema.String),
768
+ }).pipe(Schema.encodeKeys({ body: "body", contentType: "content_type" }))),
769
+ timeout: Schema.optional(Schema.Number),
770
+ }),
771
+ filter: Schema.Unknown,
772
+ }).pipe(T.Http({ method: "POST", path: "/zones/{zone_id}/firewall/rules" }));
773
+ export const CreateRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
774
+ result: Schema.Array(Schema.Struct({
775
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
776
+ action: Schema.optional(Schema.Union([
777
+ Schema.Literals([
778
+ "block",
779
+ "challenge",
780
+ "js_challenge",
781
+ "managed_challenge",
782
+ "allow",
783
+ "log",
784
+ "bypass",
785
+ ]),
786
+ Schema.Null,
787
+ ])),
788
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
789
+ filter: Schema.optional(Schema.Union([
790
+ Schema.Union([
791
+ Schema.Unknown,
792
+ Schema.Struct({
793
+ id: Schema.String,
794
+ deleted: Schema.Boolean,
795
+ }),
796
+ ]),
797
+ Schema.Null,
798
+ ])),
799
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
800
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
801
+ products: Schema.optional(Schema.Union([
802
+ Schema.Array(Schema.Literals([
803
+ "zoneLockdown",
804
+ "uaBlock",
805
+ "bic",
806
+ "hot",
807
+ "securityLevel",
808
+ "rateLimit",
809
+ "waf",
810
+ ])),
811
+ Schema.Null,
812
+ ])),
813
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
814
+ })),
815
+ });
816
+ export const createRule = API.makePaginated(() => ({
817
+ input: CreateRuleRequest,
818
+ output: CreateRuleResponse,
819
+ errors: [],
820
+ pagination: {
821
+ mode: "single",
822
+ items: "result",
823
+ },
824
+ }));
825
+ export const UpdateRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
826
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
827
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
828
+ action: Schema.Struct({
829
+ mode: Schema.optional(Schema.Literals([
830
+ "simulate",
831
+ "ban",
832
+ "challenge",
833
+ "js_challenge",
834
+ "managed_challenge",
835
+ ])),
836
+ response: Schema.optional(Schema.Struct({
837
+ body: Schema.optional(Schema.String),
838
+ contentType: Schema.optional(Schema.String),
839
+ }).pipe(Schema.encodeKeys({ body: "body", contentType: "content_type" }))),
840
+ timeout: Schema.optional(Schema.Number),
841
+ }),
842
+ filter: Schema.Unknown,
843
+ }).pipe(T.Http({ method: "PUT", path: "/zones/{zone_id}/firewall/rules/{ruleId}" }));
844
+ export const UpdateRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
845
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
846
+ action: Schema.optional(Schema.Union([
847
+ Schema.Literals([
848
+ "block",
849
+ "challenge",
850
+ "js_challenge",
851
+ "managed_challenge",
852
+ "allow",
853
+ "log",
854
+ "bypass",
855
+ ]),
856
+ Schema.Null,
857
+ ])),
858
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
859
+ filter: Schema.optional(Schema.Union([
860
+ Schema.Union([
861
+ Schema.Unknown,
862
+ Schema.Struct({
863
+ id: Schema.String,
864
+ deleted: Schema.Boolean,
865
+ }),
866
+ ]),
867
+ Schema.Null,
868
+ ])),
869
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
870
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
871
+ products: Schema.optional(Schema.Union([
872
+ Schema.Array(Schema.Literals([
873
+ "zoneLockdown",
874
+ "uaBlock",
875
+ "bic",
876
+ "hot",
877
+ "securityLevel",
878
+ "rateLimit",
879
+ "waf",
880
+ ])),
881
+ Schema.Null,
882
+ ])),
883
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
884
+ }).pipe(T.ResponsePath("result"));
885
+ export const updateRule = API.make(() => ({
886
+ input: UpdateRuleRequest,
887
+ output: UpdateRuleResponse,
888
+ errors: [],
889
+ }));
890
+ export const PatchRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
891
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
892
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
893
+ }).pipe(T.Http({ method: "PATCH", path: "/zones/{zone_id}/firewall/rules/{ruleId}" }));
894
+ export const PatchRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
895
+ result: Schema.Array(Schema.Struct({
896
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
897
+ action: Schema.optional(Schema.Union([
898
+ Schema.Literals([
899
+ "block",
900
+ "challenge",
901
+ "js_challenge",
902
+ "managed_challenge",
903
+ "allow",
904
+ "log",
905
+ "bypass",
906
+ ]),
907
+ Schema.Null,
908
+ ])),
909
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
910
+ filter: Schema.optional(Schema.Union([
911
+ Schema.Union([
912
+ Schema.Unknown,
913
+ Schema.Struct({
914
+ id: Schema.String,
915
+ deleted: Schema.Boolean,
916
+ }),
917
+ ]),
918
+ Schema.Null,
919
+ ])),
920
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
921
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
922
+ products: Schema.optional(Schema.Union([
923
+ Schema.Array(Schema.Literals([
924
+ "zoneLockdown",
925
+ "uaBlock",
926
+ "bic",
927
+ "hot",
928
+ "securityLevel",
929
+ "rateLimit",
930
+ "waf",
931
+ ])),
932
+ Schema.Null,
933
+ ])),
934
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
935
+ })),
936
+ });
937
+ export const patchRule = API.makePaginated(() => ({
938
+ input: PatchRuleRequest,
939
+ output: PatchRuleResponse,
940
+ errors: [],
941
+ pagination: {
942
+ mode: "single",
943
+ items: "result",
944
+ },
945
+ }));
946
+ export const DeleteRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
947
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
948
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
949
+ }).pipe(T.Http({
950
+ method: "DELETE",
951
+ path: "/zones/{zone_id}/firewall/rules/{ruleId}",
952
+ }));
953
+ export const DeleteRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
954
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
955
+ action: Schema.optional(Schema.Union([
956
+ Schema.Literals([
957
+ "block",
958
+ "challenge",
959
+ "js_challenge",
960
+ "managed_challenge",
961
+ "allow",
962
+ "log",
963
+ "bypass",
964
+ ]),
965
+ Schema.Null,
966
+ ])),
967
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
968
+ filter: Schema.optional(Schema.Union([
969
+ Schema.Union([
970
+ Schema.Unknown,
971
+ Schema.Struct({
972
+ id: Schema.String,
973
+ deleted: Schema.Boolean,
974
+ }),
975
+ ]),
976
+ Schema.Null,
977
+ ])),
978
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
979
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
980
+ products: Schema.optional(Schema.Union([
981
+ Schema.Array(Schema.Literals([
982
+ "zoneLockdown",
983
+ "uaBlock",
984
+ "bic",
985
+ "hot",
986
+ "securityLevel",
987
+ "rateLimit",
988
+ "waf",
989
+ ])),
990
+ Schema.Null,
991
+ ])),
992
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
993
+ }).pipe(T.ResponsePath("result"));
994
+ export const deleteRule = API.make(() => ({
995
+ input: DeleteRuleRequest,
996
+ output: DeleteRuleResponse,
997
+ errors: [],
998
+ }));
999
+ export const BulkPatchRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1000
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1001
+ body: Schema.Unknown.pipe(T.HttpBody()),
1002
+ }).pipe(T.Http({ method: "PATCH", path: "/zones/{zone_id}/firewall/rules" }));
1003
+ export const BulkPatchRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1004
+ result: Schema.Array(Schema.Struct({
1005
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1006
+ action: Schema.optional(Schema.Union([
1007
+ Schema.Literals([
1008
+ "block",
1009
+ "challenge",
1010
+ "js_challenge",
1011
+ "managed_challenge",
1012
+ "allow",
1013
+ "log",
1014
+ "bypass",
1015
+ ]),
1016
+ Schema.Null,
1017
+ ])),
1018
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1019
+ filter: Schema.optional(Schema.Union([
1020
+ Schema.Union([
1021
+ Schema.Unknown,
1022
+ Schema.Struct({
1023
+ id: Schema.String,
1024
+ deleted: Schema.Boolean,
1025
+ }),
1026
+ ]),
1027
+ Schema.Null,
1028
+ ])),
1029
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1030
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1031
+ products: Schema.optional(Schema.Union([
1032
+ Schema.Array(Schema.Literals([
1033
+ "zoneLockdown",
1034
+ "uaBlock",
1035
+ "bic",
1036
+ "hot",
1037
+ "securityLevel",
1038
+ "rateLimit",
1039
+ "waf",
1040
+ ])),
1041
+ Schema.Null,
1042
+ ])),
1043
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1044
+ })),
1045
+ });
1046
+ export const bulkPatchRules = API.makePaginated(() => ({
1047
+ input: BulkPatchRulesRequest,
1048
+ output: BulkPatchRulesResponse,
1049
+ errors: [],
1050
+ pagination: {
1051
+ mode: "single",
1052
+ items: "result",
1053
+ },
1054
+ }));
1055
+ export const BulkDeleteRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1056
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1057
+ }).pipe(T.Http({ method: "DELETE", path: "/zones/{zone_id}/firewall/rules" }));
1058
+ export const BulkDeleteRulesResponse =
1059
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1060
+ result: Schema.Array(Schema.Struct({
1061
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1062
+ action: Schema.optional(Schema.Union([
1063
+ Schema.Literals([
1064
+ "block",
1065
+ "challenge",
1066
+ "js_challenge",
1067
+ "managed_challenge",
1068
+ "allow",
1069
+ "log",
1070
+ "bypass",
1071
+ ]),
1072
+ Schema.Null,
1073
+ ])),
1074
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1075
+ filter: Schema.optional(Schema.Union([
1076
+ Schema.Union([
1077
+ Schema.Unknown,
1078
+ Schema.Struct({
1079
+ id: Schema.String,
1080
+ deleted: Schema.Boolean,
1081
+ }),
1082
+ ]),
1083
+ Schema.Null,
1084
+ ])),
1085
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1086
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1087
+ products: Schema.optional(Schema.Union([
1088
+ Schema.Array(Schema.Literals([
1089
+ "zoneLockdown",
1090
+ "uaBlock",
1091
+ "bic",
1092
+ "hot",
1093
+ "securityLevel",
1094
+ "rateLimit",
1095
+ "waf",
1096
+ ])),
1097
+ Schema.Null,
1098
+ ])),
1099
+ ref: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1100
+ })),
1101
+ });
1102
+ export const bulkDeleteRules = API.makePaginated(() => ({
1103
+ input: BulkDeleteRulesRequest,
1104
+ output: BulkDeleteRulesResponse,
1105
+ errors: [],
1106
+ pagination: {
1107
+ mode: "single",
1108
+ items: "result",
1109
+ },
1110
+ }));
1111
+ export const GetUaRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1112
+ uaRuleId: Schema.String.pipe(T.HttpPath("uaRuleId")),
1113
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1114
+ }).pipe(T.Http({
1115
+ method: "GET",
1116
+ path: "/zones/{zone_id}/firewall/ua_rules/{uaRuleId}",
1117
+ }));
1118
+ export const GetUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1119
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1120
+ configuration: Schema.optional(Schema.Union([
1121
+ Schema.Struct({
1122
+ target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1123
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1124
+ }),
1125
+ Schema.Null,
1126
+ ])),
1127
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1128
+ mode: Schema.optional(Schema.Union([
1129
+ Schema.Literals([
1130
+ "block",
1131
+ "challenge",
1132
+ "js_challenge",
1133
+ "managed_challenge",
1134
+ ]),
1135
+ Schema.Null,
1136
+ ])),
1137
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1138
+ }).pipe(T.ResponsePath("result"));
1139
+ export const getUaRule = API.make(() => ({
1140
+ input: GetUaRuleRequest,
1141
+ output: GetUaRuleResponse,
1142
+ errors: [],
1143
+ }));
1144
+ export const ListUaRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1145
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1146
+ description: Schema.optional(Schema.String).pipe(T.HttpQuery("description")),
1147
+ paused: Schema.optional(Schema.Boolean).pipe(T.HttpQuery("paused")),
1148
+ userAgent: Schema.optional(Schema.String).pipe(T.HttpQuery("user_agent")),
1149
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/ua_rules" }));
1150
+ export const ListUaRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1151
+ result: Schema.Array(Schema.Struct({
1152
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1153
+ configuration: Schema.optional(Schema.Union([
1154
+ Schema.Struct({
1155
+ target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1156
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1157
+ }),
1158
+ Schema.Null,
1159
+ ])),
1160
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1161
+ mode: Schema.optional(Schema.Union([
1162
+ Schema.Literals([
1163
+ "block",
1164
+ "challenge",
1165
+ "js_challenge",
1166
+ "managed_challenge",
1167
+ ]),
1168
+ Schema.Null,
1169
+ ])),
1170
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1171
+ })),
1172
+ resultInfo: Schema.Struct({
1173
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1174
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1175
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1176
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1177
+ }).pipe(Schema.encodeKeys({
1178
+ count: "count",
1179
+ page: "page",
1180
+ perPage: "per_page",
1181
+ totalCount: "total_count",
1182
+ })),
1183
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
1184
+ export const listUaRules = API.makePaginated(() => ({
1185
+ input: ListUaRulesRequest,
1186
+ output: ListUaRulesResponse,
1187
+ errors: [],
1188
+ pagination: {
1189
+ mode: "page",
1190
+ inputToken: "page",
1191
+ outputToken: "resultInfo.page",
1192
+ items: "result",
1193
+ pageSize: "perPage",
1194
+ },
1195
+ }));
1196
+ export const CreateUaRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1197
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1198
+ configuration: Schema.Struct({
1199
+ target: Schema.optional(Schema.Literal("ua")),
1200
+ value: Schema.optional(Schema.String),
1201
+ }),
1202
+ mode: Schema.Literals([
1203
+ "block",
1204
+ "challenge",
1205
+ "whitelist",
1206
+ "js_challenge",
1207
+ "managed_challenge",
1208
+ ]),
1209
+ description: Schema.optional(Schema.String),
1210
+ paused: Schema.optional(Schema.Boolean),
1211
+ }).pipe(T.Http({ method: "POST", path: "/zones/{zone_id}/firewall/ua_rules" }));
1212
+ export const CreateUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1213
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1214
+ configuration: Schema.optional(Schema.Union([
1215
+ Schema.Struct({
1216
+ target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1217
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1218
+ }),
1219
+ Schema.Null,
1220
+ ])),
1221
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1222
+ mode: Schema.optional(Schema.Union([
1223
+ Schema.Literals([
1224
+ "block",
1225
+ "challenge",
1226
+ "js_challenge",
1227
+ "managed_challenge",
1228
+ ]),
1229
+ Schema.Null,
1230
+ ])),
1231
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1232
+ }).pipe(T.ResponsePath("result"));
1233
+ export const createUaRule = API.make(() => ({
1234
+ input: CreateUaRuleRequest,
1235
+ output: CreateUaRuleResponse,
1236
+ errors: [],
1237
+ }));
1238
+ export const UpdateUaRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1239
+ uaRuleId: Schema.String.pipe(T.HttpPath("uaRuleId")),
1240
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1241
+ configuration: Schema.Unknown,
1242
+ mode: Schema.Literals([
1243
+ "block",
1244
+ "challenge",
1245
+ "whitelist",
1246
+ "js_challenge",
1247
+ "managed_challenge",
1248
+ ]),
1249
+ description: Schema.optional(Schema.String),
1250
+ paused: Schema.optional(Schema.Boolean),
1251
+ }).pipe(T.Http({
1252
+ method: "PUT",
1253
+ path: "/zones/{zone_id}/firewall/ua_rules/{uaRuleId}",
1254
+ }));
1255
+ export const UpdateUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1256
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1257
+ configuration: Schema.optional(Schema.Union([
1258
+ Schema.Struct({
1259
+ target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1260
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1261
+ }),
1262
+ Schema.Null,
1263
+ ])),
1264
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1265
+ mode: Schema.optional(Schema.Union([
1266
+ Schema.Literals([
1267
+ "block",
1268
+ "challenge",
1269
+ "js_challenge",
1270
+ "managed_challenge",
1271
+ ]),
1272
+ Schema.Null,
1273
+ ])),
1274
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1275
+ }).pipe(T.ResponsePath("result"));
1276
+ export const updateUaRule = API.make(() => ({
1277
+ input: UpdateUaRuleRequest,
1278
+ output: UpdateUaRuleResponse,
1279
+ errors: [],
1280
+ }));
1281
+ export const DeleteUaRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1282
+ uaRuleId: Schema.String.pipe(T.HttpPath("uaRuleId")),
1283
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1284
+ }).pipe(T.Http({
1285
+ method: "DELETE",
1286
+ path: "/zones/{zone_id}/firewall/ua_rules/{uaRuleId}",
1287
+ }));
1288
+ export const DeleteUaRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1289
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1290
+ configuration: Schema.optional(Schema.Union([
1291
+ Schema.Struct({
1292
+ target: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1293
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1294
+ }),
1295
+ Schema.Null,
1296
+ ])),
1297
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1298
+ mode: Schema.optional(Schema.Union([
1299
+ Schema.Literals([
1300
+ "block",
1301
+ "challenge",
1302
+ "js_challenge",
1303
+ "managed_challenge",
1304
+ ]),
1305
+ Schema.Null,
1306
+ ])),
1307
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1308
+ }).pipe(T.ResponsePath("result"));
1309
+ export const deleteUaRule = API.make(() => ({
1310
+ input: DeleteUaRuleRequest,
1311
+ output: DeleteUaRuleResponse,
1312
+ errors: [],
1313
+ }));
1314
+ export const GetWafOverrideRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1315
+ overridesId: Schema.String.pipe(T.HttpPath("overridesId")),
1316
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1317
+ }).pipe(T.Http({
1318
+ method: "GET",
1319
+ path: "/zones/{zone_id}/firewall/waf/overrides/{overridesId}",
1320
+ }));
1321
+ export const GetWafOverrideResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1322
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1323
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1324
+ groups: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
1325
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1326
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1327
+ rewriteAction: Schema.optional(Schema.Union([
1328
+ Schema.Struct({
1329
+ block: Schema.optional(Schema.Union([
1330
+ Schema.Literals([
1331
+ "challenge",
1332
+ "block",
1333
+ "simulate",
1334
+ "disable",
1335
+ "default",
1336
+ ]),
1337
+ Schema.Null,
1338
+ ])),
1339
+ challenge: Schema.optional(Schema.Union([
1340
+ Schema.Literals([
1341
+ "challenge",
1342
+ "block",
1343
+ "simulate",
1344
+ "disable",
1345
+ "default",
1346
+ ]),
1347
+ Schema.Null,
1348
+ ])),
1349
+ default: Schema.optional(Schema.Union([
1350
+ Schema.Literals([
1351
+ "challenge",
1352
+ "block",
1353
+ "simulate",
1354
+ "disable",
1355
+ "default",
1356
+ ]),
1357
+ Schema.Null,
1358
+ ])),
1359
+ disable: Schema.optional(Schema.Union([
1360
+ Schema.Literals([
1361
+ "challenge",
1362
+ "block",
1363
+ "simulate",
1364
+ "disable",
1365
+ "default",
1366
+ ]),
1367
+ Schema.Null,
1368
+ ])),
1369
+ simulate: Schema.optional(Schema.Union([
1370
+ Schema.Literals([
1371
+ "challenge",
1372
+ "block",
1373
+ "simulate",
1374
+ "disable",
1375
+ "default",
1376
+ ]),
1377
+ Schema.Null,
1378
+ ])),
1379
+ }),
1380
+ Schema.Null,
1381
+ ])),
1382
+ rules: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
1383
+ urls: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1384
+ })
1385
+ .pipe(Schema.encodeKeys({
1386
+ id: "id",
1387
+ description: "description",
1388
+ groups: "groups",
1389
+ paused: "paused",
1390
+ priority: "priority",
1391
+ rewriteAction: "rewrite_action",
1392
+ rules: "rules",
1393
+ urls: "urls",
1394
+ }))
1395
+ .pipe(T.ResponsePath("result"));
1396
+ export const getWafOverride = API.make(() => ({
1397
+ input: GetWafOverrideRequest,
1398
+ output: GetWafOverrideResponse,
1399
+ errors: [],
1400
+ }));
1401
+ export const ListWafOverridesRequest =
1402
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1403
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1404
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/waf/overrides" }));
1405
+ export const ListWafOverridesResponse =
1406
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1407
+ result: Schema.Array(Schema.Struct({
1408
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1409
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1410
+ groups: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
1411
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1412
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1413
+ rewriteAction: Schema.optional(Schema.Union([
1414
+ Schema.Struct({
1415
+ block: Schema.optional(Schema.Union([
1416
+ Schema.Literals([
1417
+ "challenge",
1418
+ "block",
1419
+ "simulate",
1420
+ "disable",
1421
+ "default",
1422
+ ]),
1423
+ Schema.Null,
1424
+ ])),
1425
+ challenge: Schema.optional(Schema.Union([
1426
+ Schema.Literals([
1427
+ "challenge",
1428
+ "block",
1429
+ "simulate",
1430
+ "disable",
1431
+ "default",
1432
+ ]),
1433
+ Schema.Null,
1434
+ ])),
1435
+ default: Schema.optional(Schema.Union([
1436
+ Schema.Literals([
1437
+ "challenge",
1438
+ "block",
1439
+ "simulate",
1440
+ "disable",
1441
+ "default",
1442
+ ]),
1443
+ Schema.Null,
1444
+ ])),
1445
+ disable: Schema.optional(Schema.Union([
1446
+ Schema.Literals([
1447
+ "challenge",
1448
+ "block",
1449
+ "simulate",
1450
+ "disable",
1451
+ "default",
1452
+ ]),
1453
+ Schema.Null,
1454
+ ])),
1455
+ simulate: Schema.optional(Schema.Union([
1456
+ Schema.Literals([
1457
+ "challenge",
1458
+ "block",
1459
+ "simulate",
1460
+ "disable",
1461
+ "default",
1462
+ ]),
1463
+ Schema.Null,
1464
+ ])),
1465
+ }),
1466
+ Schema.Null,
1467
+ ])),
1468
+ rules: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
1469
+ urls: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1470
+ }).pipe(Schema.encodeKeys({
1471
+ id: "id",
1472
+ description: "description",
1473
+ groups: "groups",
1474
+ paused: "paused",
1475
+ priority: "priority",
1476
+ rewriteAction: "rewrite_action",
1477
+ rules: "rules",
1478
+ urls: "urls",
1479
+ }))),
1480
+ resultInfo: Schema.Struct({
1481
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1482
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1483
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1484
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1485
+ }).pipe(Schema.encodeKeys({
1486
+ count: "count",
1487
+ page: "page",
1488
+ perPage: "per_page",
1489
+ totalCount: "total_count",
1490
+ })),
1491
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
1492
+ export const listWafOverrides = API.makePaginated(() => ({
1493
+ input: ListWafOverridesRequest,
1494
+ output: ListWafOverridesResponse,
1495
+ errors: [],
1496
+ pagination: {
1497
+ mode: "page",
1498
+ inputToken: "page",
1499
+ outputToken: "resultInfo.page",
1500
+ items: "result",
1501
+ pageSize: "perPage",
1502
+ },
1503
+ }));
1504
+ export const CreateWafOverrideRequest =
1505
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1506
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1507
+ urls: Schema.Array(Schema.String),
1508
+ }).pipe(T.Http({ method: "POST", path: "/zones/{zone_id}/firewall/waf/overrides" }));
1509
+ export const CreateWafOverrideResponse =
1510
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1511
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1512
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1513
+ groups: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
1514
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1515
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1516
+ rewriteAction: Schema.optional(Schema.Union([
1517
+ Schema.Struct({
1518
+ block: Schema.optional(Schema.Union([
1519
+ Schema.Literals([
1520
+ "challenge",
1521
+ "block",
1522
+ "simulate",
1523
+ "disable",
1524
+ "default",
1525
+ ]),
1526
+ Schema.Null,
1527
+ ])),
1528
+ challenge: Schema.optional(Schema.Union([
1529
+ Schema.Literals([
1530
+ "challenge",
1531
+ "block",
1532
+ "simulate",
1533
+ "disable",
1534
+ "default",
1535
+ ]),
1536
+ Schema.Null,
1537
+ ])),
1538
+ default: Schema.optional(Schema.Union([
1539
+ Schema.Literals([
1540
+ "challenge",
1541
+ "block",
1542
+ "simulate",
1543
+ "disable",
1544
+ "default",
1545
+ ]),
1546
+ Schema.Null,
1547
+ ])),
1548
+ disable: Schema.optional(Schema.Union([
1549
+ Schema.Literals([
1550
+ "challenge",
1551
+ "block",
1552
+ "simulate",
1553
+ "disable",
1554
+ "default",
1555
+ ]),
1556
+ Schema.Null,
1557
+ ])),
1558
+ simulate: Schema.optional(Schema.Union([
1559
+ Schema.Literals([
1560
+ "challenge",
1561
+ "block",
1562
+ "simulate",
1563
+ "disable",
1564
+ "default",
1565
+ ]),
1566
+ Schema.Null,
1567
+ ])),
1568
+ }),
1569
+ Schema.Null,
1570
+ ])),
1571
+ rules: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
1572
+ urls: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1573
+ })
1574
+ .pipe(Schema.encodeKeys({
1575
+ id: "id",
1576
+ description: "description",
1577
+ groups: "groups",
1578
+ paused: "paused",
1579
+ priority: "priority",
1580
+ rewriteAction: "rewrite_action",
1581
+ rules: "rules",
1582
+ urls: "urls",
1583
+ }))
1584
+ .pipe(T.ResponsePath("result"));
1585
+ export const createWafOverride = API.make(() => ({
1586
+ input: CreateWafOverrideRequest,
1587
+ output: CreateWafOverrideResponse,
1588
+ errors: [],
1589
+ }));
1590
+ export const UpdateWafOverrideRequest =
1591
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1592
+ overridesId: Schema.String.pipe(T.HttpPath("overridesId")),
1593
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1594
+ id: Schema.String,
1595
+ rewriteAction: Schema.Struct({
1596
+ block: Schema.optional(Schema.Literals([
1597
+ "challenge",
1598
+ "block",
1599
+ "simulate",
1600
+ "disable",
1601
+ "default",
1602
+ ])),
1603
+ challenge: Schema.optional(Schema.Literals([
1604
+ "challenge",
1605
+ "block",
1606
+ "simulate",
1607
+ "disable",
1608
+ "default",
1609
+ ])),
1610
+ default: Schema.optional(Schema.Literals([
1611
+ "challenge",
1612
+ "block",
1613
+ "simulate",
1614
+ "disable",
1615
+ "default",
1616
+ ])),
1617
+ disable: Schema.optional(Schema.Literals([
1618
+ "challenge",
1619
+ "block",
1620
+ "simulate",
1621
+ "disable",
1622
+ "default",
1623
+ ])),
1624
+ simulate: Schema.optional(Schema.Literals([
1625
+ "challenge",
1626
+ "block",
1627
+ "simulate",
1628
+ "disable",
1629
+ "default",
1630
+ ])),
1631
+ }),
1632
+ rules: Schema.Unknown,
1633
+ urls: Schema.Array(Schema.String),
1634
+ }).pipe(Schema.encodeKeys({
1635
+ id: "id",
1636
+ rewriteAction: "rewrite_action",
1637
+ rules: "rules",
1638
+ urls: "urls",
1639
+ }), T.Http({
1640
+ method: "PUT",
1641
+ path: "/zones/{zone_id}/firewall/waf/overrides/{overridesId}",
1642
+ }));
1643
+ export const UpdateWafOverrideResponse =
1644
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1645
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1646
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1647
+ groups: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
1648
+ paused: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1649
+ priority: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1650
+ rewriteAction: Schema.optional(Schema.Union([
1651
+ Schema.Struct({
1652
+ block: Schema.optional(Schema.Union([
1653
+ Schema.Literals([
1654
+ "challenge",
1655
+ "block",
1656
+ "simulate",
1657
+ "disable",
1658
+ "default",
1659
+ ]),
1660
+ Schema.Null,
1661
+ ])),
1662
+ challenge: Schema.optional(Schema.Union([
1663
+ Schema.Literals([
1664
+ "challenge",
1665
+ "block",
1666
+ "simulate",
1667
+ "disable",
1668
+ "default",
1669
+ ]),
1670
+ Schema.Null,
1671
+ ])),
1672
+ default: Schema.optional(Schema.Union([
1673
+ Schema.Literals([
1674
+ "challenge",
1675
+ "block",
1676
+ "simulate",
1677
+ "disable",
1678
+ "default",
1679
+ ]),
1680
+ Schema.Null,
1681
+ ])),
1682
+ disable: Schema.optional(Schema.Union([
1683
+ Schema.Literals([
1684
+ "challenge",
1685
+ "block",
1686
+ "simulate",
1687
+ "disable",
1688
+ "default",
1689
+ ]),
1690
+ Schema.Null,
1691
+ ])),
1692
+ simulate: Schema.optional(Schema.Union([
1693
+ Schema.Literals([
1694
+ "challenge",
1695
+ "block",
1696
+ "simulate",
1697
+ "disable",
1698
+ "default",
1699
+ ]),
1700
+ Schema.Null,
1701
+ ])),
1702
+ }),
1703
+ Schema.Null,
1704
+ ])),
1705
+ rules: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
1706
+ urls: Schema.optional(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1707
+ })
1708
+ .pipe(Schema.encodeKeys({
1709
+ id: "id",
1710
+ description: "description",
1711
+ groups: "groups",
1712
+ paused: "paused",
1713
+ priority: "priority",
1714
+ rewriteAction: "rewrite_action",
1715
+ rules: "rules",
1716
+ urls: "urls",
1717
+ }))
1718
+ .pipe(T.ResponsePath("result"));
1719
+ export const updateWafOverride = API.make(() => ({
1720
+ input: UpdateWafOverrideRequest,
1721
+ output: UpdateWafOverrideResponse,
1722
+ errors: [],
1723
+ }));
1724
+ export const DeleteWafOverrideRequest =
1725
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1726
+ overridesId: Schema.String.pipe(T.HttpPath("overridesId")),
1727
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1728
+ }).pipe(T.Http({
1729
+ method: "DELETE",
1730
+ path: "/zones/{zone_id}/firewall/waf/overrides/{overridesId}",
1731
+ }));
1732
+ export const DeleteWafOverrideResponse =
1733
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1734
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1735
+ }).pipe(T.ResponsePath("result"));
1736
+ export const deleteWafOverride = API.make(() => ({
1737
+ input: DeleteWafOverrideRequest,
1738
+ output: DeleteWafOverrideResponse,
1739
+ errors: [],
1740
+ }));
1741
+ export const GetWafPackageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1742
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
1743
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1744
+ }).pipe(T.Http({
1745
+ method: "GET",
1746
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}",
1747
+ }));
1748
+ export const GetWafPackageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
1749
+ Schema.Struct({
1750
+ errors: Schema.Array(Schema.Unknown),
1751
+ messages: Schema.Array(Schema.Unknown),
1752
+ result: Schema.Union([Schema.String, Schema.Null]),
1753
+ success: Schema.Literal(true),
1754
+ }),
1755
+ Schema.Struct({
1756
+ result: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
1757
+ }),
1758
+ ]);
1759
+ export const getWafPackage = API.make(() => ({
1760
+ input: GetWafPackageRequest,
1761
+ output: GetWafPackageResponse,
1762
+ errors: [],
1763
+ }));
1764
+ export const ListWafPackagesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1765
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1766
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(T.HttpQuery("direction")),
1767
+ match: Schema.optional(Schema.Literals(["any", "all"])).pipe(T.HttpQuery("match")),
1768
+ name: Schema.optional(Schema.String).pipe(T.HttpQuery("name")),
1769
+ order: Schema.optional(Schema.Literal("name")).pipe(T.HttpQuery("order")),
1770
+ }).pipe(T.Http({ method: "GET", path: "/zones/{zone_id}/firewall/waf/packages" }));
1771
+ export const ListWafPackagesResponse =
1772
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1773
+ result: Schema.Array(Schema.Unknown),
1774
+ resultInfo: Schema.Struct({
1775
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1776
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1777
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1778
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1779
+ }).pipe(Schema.encodeKeys({
1780
+ count: "count",
1781
+ page: "page",
1782
+ perPage: "per_page",
1783
+ totalCount: "total_count",
1784
+ })),
1785
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
1786
+ export const listWafPackages = API.makePaginated(() => ({
1787
+ input: ListWafPackagesRequest,
1788
+ output: ListWafPackagesResponse,
1789
+ errors: [],
1790
+ pagination: {
1791
+ mode: "page",
1792
+ inputToken: "page",
1793
+ outputToken: "resultInfo.page",
1794
+ items: "result",
1795
+ pageSize: "perPage",
1796
+ },
1797
+ }));
1798
+ export const GetWafPackageGroupRequest =
1799
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1800
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
1801
+ groupId: Schema.String.pipe(T.HttpPath("groupId")),
1802
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1803
+ }).pipe(T.Http({
1804
+ method: "GET",
1805
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/groups/{groupId}",
1806
+ }));
1807
+ export const GetWafPackageGroupResponse =
1808
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.String, Schema.Null]).pipe(T.ResponsePath("result"));
1809
+ export const getWafPackageGroup = API.make(() => ({
1810
+ input: GetWafPackageGroupRequest,
1811
+ output: GetWafPackageGroupResponse,
1812
+ errors: [],
1813
+ }));
1814
+ export const ListWafPackageGroupsRequest =
1815
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1816
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
1817
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1818
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(T.HttpQuery("direction")),
1819
+ match: Schema.optional(Schema.Literals(["any", "all"])).pipe(T.HttpQuery("match")),
1820
+ mode: Schema.optional(Schema.Literals(["on", "off"])).pipe(T.HttpQuery("mode")),
1821
+ name: Schema.optional(Schema.String).pipe(T.HttpQuery("name")),
1822
+ order: Schema.optional(Schema.Literals(["mode", "rules_count"])).pipe(T.HttpQuery("order")),
1823
+ rulesCount: Schema.optional(Schema.Number).pipe(T.HttpQuery("rules_count")),
1824
+ }).pipe(T.Http({
1825
+ method: "GET",
1826
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/groups",
1827
+ }));
1828
+ export const ListWafPackageGroupsResponse =
1829
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1830
+ result: Schema.Array(Schema.Struct({
1831
+ id: Schema.String,
1832
+ description: Schema.Union([Schema.String, Schema.Null]),
1833
+ mode: Schema.Literals(["on", "off"]),
1834
+ name: Schema.String,
1835
+ rulesCount: Schema.Number,
1836
+ allowedModes: Schema.optional(Schema.Union([
1837
+ Schema.Array(Schema.Literals(["on", "off"])),
1838
+ Schema.Null,
1839
+ ])),
1840
+ modifiedRulesCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1841
+ packageId: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1842
+ }).pipe(Schema.encodeKeys({
1843
+ id: "id",
1844
+ description: "description",
1845
+ mode: "mode",
1846
+ name: "name",
1847
+ rulesCount: "rules_count",
1848
+ allowedModes: "allowed_modes",
1849
+ modifiedRulesCount: "modified_rules_count",
1850
+ packageId: "package_id",
1851
+ }))),
1852
+ resultInfo: Schema.Struct({
1853
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1854
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1855
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1856
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1857
+ }).pipe(Schema.encodeKeys({
1858
+ count: "count",
1859
+ page: "page",
1860
+ perPage: "per_page",
1861
+ totalCount: "total_count",
1862
+ })),
1863
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
1864
+ export const listWafPackageGroups = API.makePaginated(() => ({
1865
+ input: ListWafPackageGroupsRequest,
1866
+ output: ListWafPackageGroupsResponse,
1867
+ errors: [],
1868
+ pagination: {
1869
+ mode: "page",
1870
+ inputToken: "page",
1871
+ outputToken: "resultInfo.page",
1872
+ items: "result",
1873
+ pageSize: "perPage",
1874
+ },
1875
+ }));
1876
+ export const PatchWafPackageGroupRequest =
1877
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1878
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
1879
+ groupId: Schema.String.pipe(T.HttpPath("groupId")),
1880
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1881
+ mode: Schema.optional(Schema.Literals(["on", "off"])),
1882
+ }).pipe(T.Http({
1883
+ method: "PATCH",
1884
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/groups/{groupId}",
1885
+ }));
1886
+ export const PatchWafPackageGroupResponse =
1887
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.String, Schema.Null]).pipe(T.ResponsePath("result"));
1888
+ export const patchWafPackageGroup = API.make(() => ({
1889
+ input: PatchWafPackageGroupRequest,
1890
+ output: PatchWafPackageGroupResponse,
1891
+ errors: [],
1892
+ }));
1893
+ export const GetWafPackageRuleRequest =
1894
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1895
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
1896
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
1897
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1898
+ }).pipe(T.Http({
1899
+ method: "GET",
1900
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/rules/{ruleId}",
1901
+ }));
1902
+ export const GetWafPackageRuleResponse =
1903
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([Schema.String, Schema.Null]).pipe(T.ResponsePath("result"));
1904
+ export const getWafPackageRule = API.make(() => ({
1905
+ input: GetWafPackageRuleRequest,
1906
+ output: GetWafPackageRuleResponse,
1907
+ errors: [],
1908
+ }));
1909
+ export const ListWafPackageRulesRequest =
1910
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1911
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
1912
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1913
+ description: Schema.optional(Schema.String).pipe(T.HttpQuery("description")),
1914
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(T.HttpQuery("direction")),
1915
+ groupId: Schema.optional(Schema.String).pipe(T.HttpQuery("group_id")),
1916
+ match: Schema.optional(Schema.Literals(["any", "all"])).pipe(T.HttpQuery("match")),
1917
+ mode: Schema.optional(Schema.Literals(["DIS", "CHL", "BLK", "SIM"])).pipe(T.HttpQuery("mode")),
1918
+ order: Schema.optional(Schema.Literals(["priority", "group_id", "description"])).pipe(T.HttpQuery("order")),
1919
+ priority: Schema.optional(Schema.String).pipe(T.HttpQuery("priority")),
1920
+ }).pipe(T.Http({
1921
+ method: "GET",
1922
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/rules",
1923
+ }));
1924
+ export const ListWafPackageRulesResponse =
1925
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1926
+ result: Schema.Array(Schema.Union([
1927
+ Schema.Struct({
1928
+ id: Schema.String,
1929
+ allowedModes: Schema.Array(Schema.Literals(["on", "off"])),
1930
+ description: Schema.String,
1931
+ group: Schema.Unknown,
1932
+ mode: Schema.Literals(["on", "off"]),
1933
+ packageId: Schema.String,
1934
+ priority: Schema.String,
1935
+ }).pipe(Schema.encodeKeys({
1936
+ id: "id",
1937
+ allowedModes: "allowed_modes",
1938
+ description: "description",
1939
+ group: "group",
1940
+ mode: "mode",
1941
+ packageId: "package_id",
1942
+ priority: "priority",
1943
+ })),
1944
+ Schema.Struct({
1945
+ id: Schema.String,
1946
+ allowedModes: Schema.Array(Schema.Literals([
1947
+ "default",
1948
+ "disable",
1949
+ "simulate",
1950
+ "block",
1951
+ "challenge",
1952
+ ])),
1953
+ defaultMode: Schema.Literals([
1954
+ "disable",
1955
+ "simulate",
1956
+ "block",
1957
+ "challenge",
1958
+ ]),
1959
+ description: Schema.String,
1960
+ group: Schema.Unknown,
1961
+ mode: Schema.Literals([
1962
+ "default",
1963
+ "disable",
1964
+ "simulate",
1965
+ "block",
1966
+ "challenge",
1967
+ ]),
1968
+ packageId: Schema.String,
1969
+ priority: Schema.String,
1970
+ }).pipe(Schema.encodeKeys({
1971
+ id: "id",
1972
+ allowedModes: "allowed_modes",
1973
+ defaultMode: "default_mode",
1974
+ description: "description",
1975
+ group: "group",
1976
+ mode: "mode",
1977
+ packageId: "package_id",
1978
+ priority: "priority",
1979
+ })),
1980
+ ])),
1981
+ resultInfo: Schema.Struct({
1982
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1983
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1984
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1985
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1986
+ }).pipe(Schema.encodeKeys({
1987
+ count: "count",
1988
+ page: "page",
1989
+ perPage: "per_page",
1990
+ totalCount: "total_count",
1991
+ })),
1992
+ }).pipe(Schema.encodeKeys({ result: "result", resultInfo: "result_info" }));
1993
+ export const listWafPackageRules = API.makePaginated(() => ({
1994
+ input: ListWafPackageRulesRequest,
1995
+ output: ListWafPackageRulesResponse,
1996
+ errors: [],
1997
+ pagination: {
1998
+ mode: "page",
1999
+ inputToken: "page",
2000
+ outputToken: "resultInfo.page",
2001
+ items: "result",
2002
+ pageSize: "perPage",
2003
+ },
2004
+ }));
2005
+ export const PatchWafPackageRuleRequest =
2006
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2007
+ packageId: Schema.String.pipe(T.HttpPath("packageId")),
2008
+ ruleId: Schema.String.pipe(T.HttpPath("ruleId")),
2009
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2010
+ mode: Schema.optional(Schema.Literals([
2011
+ "default",
2012
+ "disable",
2013
+ "simulate",
2014
+ "block",
2015
+ "challenge",
2016
+ "on",
2017
+ "off",
2018
+ ])),
2019
+ }).pipe(T.Http({
2020
+ method: "PATCH",
2021
+ path: "/zones/{zone_id}/firewall/waf/packages/{packageId}/rules/{ruleId}",
2022
+ }));
2023
+ export const PatchWafPackageRuleResponse =
2024
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Union([
2025
+ Schema.Struct({
2026
+ id: Schema.String,
2027
+ allowedModes: Schema.Array(Schema.Literals(["on", "off"])),
2028
+ description: Schema.String,
2029
+ group: Schema.Unknown,
2030
+ mode: Schema.Literals(["on", "off"]),
2031
+ packageId: Schema.String,
2032
+ priority: Schema.String,
2033
+ }).pipe(Schema.encodeKeys({
2034
+ id: "id",
2035
+ allowedModes: "allowed_modes",
2036
+ description: "description",
2037
+ group: "group",
2038
+ mode: "mode",
2039
+ packageId: "package_id",
2040
+ priority: "priority",
2041
+ })),
2042
+ Schema.Struct({
2043
+ id: Schema.String,
2044
+ allowedModes: Schema.Array(Schema.Literals([
2045
+ "default",
2046
+ "disable",
2047
+ "simulate",
2048
+ "block",
2049
+ "challenge",
2050
+ ])),
2051
+ defaultMode: Schema.Literals([
2052
+ "disable",
2053
+ "simulate",
2054
+ "block",
2055
+ "challenge",
2056
+ ]),
2057
+ description: Schema.String,
2058
+ group: Schema.Unknown,
2059
+ mode: Schema.Literals([
2060
+ "default",
2061
+ "disable",
2062
+ "simulate",
2063
+ "block",
2064
+ "challenge",
2065
+ ]),
2066
+ packageId: Schema.String,
2067
+ priority: Schema.String,
2068
+ }).pipe(Schema.encodeKeys({
2069
+ id: "id",
2070
+ allowedModes: "allowed_modes",
2071
+ defaultMode: "default_mode",
2072
+ description: "description",
2073
+ group: "group",
2074
+ mode: "mode",
2075
+ packageId: "package_id",
2076
+ priority: "priority",
2077
+ })),
2078
+ ]).pipe(T.ResponsePath("result"));
2079
+ export const patchWafPackageRule = API.make(() => ({
2080
+ input: PatchWafPackageRuleRequest,
2081
+ output: PatchWafPackageRuleResponse,
2082
+ errors: [],
2083
+ }));
2084
+ //# sourceMappingURL=firewall.js.map