@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,2632 @@
1
+ /**
2
+ * Cloudflare PAGE-RULES API
3
+ *
4
+ * Generated from Cloudflare TypeScript SDK.
5
+ * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service page-rules
6
+ */
7
+
8
+ import * as Schema from "effect/Schema";
9
+ import type * as HttpClient from "effect/unstable/http/HttpClient";
10
+ import * as API from "../client/api.ts";
11
+ import * as T from "../traits.ts";
12
+ import type { Credentials } from "../credentials.ts";
13
+ import { type DefaultErrors } from "../errors.ts";
14
+
15
+ // =============================================================================
16
+ // PageRule
17
+ // =============================================================================
18
+
19
+ export interface GetPageRuleRequest {
20
+ pageruleId: string;
21
+ /** Identifier. */
22
+ zoneId: string;
23
+ }
24
+
25
+ export const GetPageRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
26
+ pageruleId: Schema.String.pipe(T.HttpPath("pageruleId")),
27
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
28
+ }).pipe(
29
+ T.Http({ method: "GET", path: "/zones/{zone_id}/pagerules/{pageruleId}" }),
30
+ ) as unknown as Schema.Schema<GetPageRuleRequest>;
31
+
32
+ export interface GetPageRuleResponse {
33
+ /** Identifier. */
34
+ id: string;
35
+ /** The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both. */
36
+ actions: (
37
+ | unknown
38
+ | { id?: "bypass_cache_on_cookie" | null; value?: string | null }
39
+ | { id?: "cache_by_device_type" | null; value?: "on" | "off" | null }
40
+ | { id?: "cache_deception_armor" | null; value?: "on" | "off" | null }
41
+ | {
42
+ id?: "cache_key_fields" | null;
43
+ value?: {
44
+ cookie?: {
45
+ checkPresence?: string[] | null;
46
+ include?: string[] | null;
47
+ } | null;
48
+ header?: {
49
+ checkPresence?: string[] | null;
50
+ exclude?: string[] | null;
51
+ include?: string[] | null;
52
+ } | null;
53
+ host?: { resolved?: boolean | null } | null;
54
+ queryString?: {
55
+ exclude?: "*" | string[] | null;
56
+ include?: "*" | string[] | null;
57
+ } | null;
58
+ user?: {
59
+ deviceType?: boolean | null;
60
+ geo?: boolean | null;
61
+ lang?: boolean | null;
62
+ } | null;
63
+ } | null;
64
+ }
65
+ | { id?: "cache_on_cookie" | null; value?: string | null }
66
+ | {
67
+ id?: "cache_ttl_by_status" | null;
68
+ value?: Record<string, unknown> | null;
69
+ }
70
+ | { id?: "disable_apps" | null }
71
+ | { id?: "disable_performance" | null }
72
+ | { id?: "disable_security" | null }
73
+ | { id?: "disable_zaraz" | null }
74
+ | { id?: "edge_cache_ttl" | null; value?: number | null }
75
+ | { id?: "explicit_cache_control" | null; value?: "on" | "off" | null }
76
+ | {
77
+ id?: "forwarding_url" | null;
78
+ value?: {
79
+ statusCode?: "301" | "302" | null;
80
+ url?: string | null;
81
+ } | null;
82
+ }
83
+ | { id?: "host_header_override" | null; value?: string | null }
84
+ | { id?: "resolve_override" | null; value?: string | null }
85
+ | { id?: "respect_strong_etag" | null; value?: "on" | "off" | null }
86
+ )[];
87
+ /** The timestamp of when the Page Rule was created. */
88
+ createdOn: string;
89
+ /** The timestamp of when the Page Rule was last modified. */
90
+ modifiedOn: string;
91
+ /** The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: `/images/ `) bu */
92
+ priority: number;
93
+ /** The status of the Page Rule. */
94
+ status: "active" | "disabled";
95
+ /** The rule targets to evaluate on each request. */
96
+ targets: {
97
+ constraint?: {
98
+ operator: "matches" | "contains" | "equals" | "not_equal" | "not_contain";
99
+ value: string;
100
+ } | null;
101
+ target?: "url" | null;
102
+ }[];
103
+ }
104
+
105
+ export const GetPageRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
106
+ id: Schema.String,
107
+ actions: Schema.Array(
108
+ Schema.Union([
109
+ Schema.Unknown,
110
+ Schema.Struct({
111
+ id: Schema.optional(
112
+ Schema.Union([Schema.Literal("bypass_cache_on_cookie"), Schema.Null]),
113
+ ),
114
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
115
+ }),
116
+ Schema.Struct({
117
+ id: Schema.optional(
118
+ Schema.Union([Schema.Literal("cache_by_device_type"), Schema.Null]),
119
+ ),
120
+ value: Schema.optional(
121
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
122
+ ),
123
+ }),
124
+ Schema.Struct({
125
+ id: Schema.optional(
126
+ Schema.Union([Schema.Literal("cache_deception_armor"), Schema.Null]),
127
+ ),
128
+ value: Schema.optional(
129
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
130
+ ),
131
+ }),
132
+ Schema.Struct({
133
+ id: Schema.optional(
134
+ Schema.Union([Schema.Literal("cache_key_fields"), Schema.Null]),
135
+ ),
136
+ value: Schema.optional(
137
+ Schema.Union([
138
+ Schema.Struct({
139
+ cookie: Schema.optional(
140
+ Schema.Union([
141
+ Schema.Struct({
142
+ checkPresence: Schema.optional(
143
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
144
+ ),
145
+ include: Schema.optional(
146
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
147
+ ),
148
+ }).pipe(
149
+ Schema.encodeKeys({
150
+ checkPresence: "check_presence",
151
+ include: "include",
152
+ }),
153
+ ),
154
+ Schema.Null,
155
+ ]),
156
+ ),
157
+ header: Schema.optional(
158
+ Schema.Union([
159
+ Schema.Struct({
160
+ checkPresence: Schema.optional(
161
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
162
+ ),
163
+ exclude: Schema.optional(
164
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
165
+ ),
166
+ include: Schema.optional(
167
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
168
+ ),
169
+ }).pipe(
170
+ Schema.encodeKeys({
171
+ checkPresence: "check_presence",
172
+ exclude: "exclude",
173
+ include: "include",
174
+ }),
175
+ ),
176
+ Schema.Null,
177
+ ]),
178
+ ),
179
+ host: Schema.optional(
180
+ Schema.Union([
181
+ Schema.Struct({
182
+ resolved: Schema.optional(
183
+ Schema.Union([Schema.Boolean, Schema.Null]),
184
+ ),
185
+ }),
186
+ Schema.Null,
187
+ ]),
188
+ ),
189
+ queryString: Schema.optional(
190
+ Schema.Union([
191
+ Schema.Struct({
192
+ exclude: Schema.optional(
193
+ Schema.Union([
194
+ Schema.Union([
195
+ Schema.Literal("*"),
196
+ Schema.Array(Schema.String),
197
+ ]),
198
+ Schema.Null,
199
+ ]),
200
+ ),
201
+ include: Schema.optional(
202
+ Schema.Union([
203
+ Schema.Union([
204
+ Schema.Literal("*"),
205
+ Schema.Array(Schema.String),
206
+ ]),
207
+ Schema.Null,
208
+ ]),
209
+ ),
210
+ }),
211
+ Schema.Null,
212
+ ]),
213
+ ),
214
+ user: Schema.optional(
215
+ Schema.Union([
216
+ Schema.Struct({
217
+ deviceType: Schema.optional(
218
+ Schema.Union([Schema.Boolean, Schema.Null]),
219
+ ),
220
+ geo: Schema.optional(
221
+ Schema.Union([Schema.Boolean, Schema.Null]),
222
+ ),
223
+ lang: Schema.optional(
224
+ Schema.Union([Schema.Boolean, Schema.Null]),
225
+ ),
226
+ }).pipe(
227
+ Schema.encodeKeys({
228
+ deviceType: "device_type",
229
+ geo: "geo",
230
+ lang: "lang",
231
+ }),
232
+ ),
233
+ Schema.Null,
234
+ ]),
235
+ ),
236
+ }).pipe(
237
+ Schema.encodeKeys({
238
+ cookie: "cookie",
239
+ header: "header",
240
+ host: "host",
241
+ queryString: "query_string",
242
+ user: "user",
243
+ }),
244
+ ),
245
+ Schema.Null,
246
+ ]),
247
+ ),
248
+ }),
249
+ Schema.Struct({
250
+ id: Schema.optional(
251
+ Schema.Union([Schema.Literal("cache_on_cookie"), Schema.Null]),
252
+ ),
253
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
254
+ }),
255
+ Schema.Struct({
256
+ id: Schema.optional(
257
+ Schema.Union([Schema.Literal("cache_ttl_by_status"), Schema.Null]),
258
+ ),
259
+ value: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
260
+ }),
261
+ Schema.Struct({
262
+ id: Schema.optional(
263
+ Schema.Union([Schema.Literal("disable_apps"), Schema.Null]),
264
+ ),
265
+ }),
266
+ Schema.Struct({
267
+ id: Schema.optional(
268
+ Schema.Union([Schema.Literal("disable_performance"), Schema.Null]),
269
+ ),
270
+ }),
271
+ Schema.Struct({
272
+ id: Schema.optional(
273
+ Schema.Union([Schema.Literal("disable_security"), Schema.Null]),
274
+ ),
275
+ }),
276
+ Schema.Struct({
277
+ id: Schema.optional(
278
+ Schema.Union([Schema.Literal("disable_zaraz"), Schema.Null]),
279
+ ),
280
+ }),
281
+ Schema.Struct({
282
+ id: Schema.optional(
283
+ Schema.Union([Schema.Literal("edge_cache_ttl"), Schema.Null]),
284
+ ),
285
+ value: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
286
+ }),
287
+ Schema.Struct({
288
+ id: Schema.optional(
289
+ Schema.Union([Schema.Literal("explicit_cache_control"), Schema.Null]),
290
+ ),
291
+ value: Schema.optional(
292
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
293
+ ),
294
+ }),
295
+ Schema.Struct({
296
+ id: Schema.optional(
297
+ Schema.Union([Schema.Literal("forwarding_url"), Schema.Null]),
298
+ ),
299
+ value: Schema.optional(
300
+ Schema.Union([
301
+ Schema.Struct({
302
+ statusCode: Schema.optional(
303
+ Schema.Union([Schema.Literals(["301", "302"]), Schema.Null]),
304
+ ),
305
+ url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
306
+ }).pipe(
307
+ Schema.encodeKeys({ statusCode: "status_code", url: "url" }),
308
+ ),
309
+ Schema.Null,
310
+ ]),
311
+ ),
312
+ }),
313
+ Schema.Struct({
314
+ id: Schema.optional(
315
+ Schema.Union([Schema.Literal("host_header_override"), Schema.Null]),
316
+ ),
317
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
318
+ }),
319
+ Schema.Struct({
320
+ id: Schema.optional(
321
+ Schema.Union([Schema.Literal("resolve_override"), Schema.Null]),
322
+ ),
323
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
324
+ }),
325
+ Schema.Struct({
326
+ id: Schema.optional(
327
+ Schema.Union([Schema.Literal("respect_strong_etag"), Schema.Null]),
328
+ ),
329
+ value: Schema.optional(
330
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
331
+ ),
332
+ }),
333
+ ]),
334
+ ),
335
+ createdOn: Schema.String,
336
+ modifiedOn: Schema.String,
337
+ priority: Schema.Number,
338
+ status: Schema.Literals(["active", "disabled"]),
339
+ targets: Schema.Array(
340
+ Schema.Struct({
341
+ constraint: Schema.optional(
342
+ Schema.Union([
343
+ Schema.Struct({
344
+ operator: Schema.Literals([
345
+ "matches",
346
+ "contains",
347
+ "equals",
348
+ "not_equal",
349
+ "not_contain",
350
+ ]),
351
+ value: Schema.String,
352
+ }),
353
+ Schema.Null,
354
+ ]),
355
+ ),
356
+ target: Schema.optional(
357
+ Schema.Union([Schema.Literal("url"), Schema.Null]),
358
+ ),
359
+ }),
360
+ ),
361
+ })
362
+ .pipe(
363
+ Schema.encodeKeys({
364
+ id: "id",
365
+ actions: "actions",
366
+ createdOn: "created_on",
367
+ modifiedOn: "modified_on",
368
+ priority: "priority",
369
+ status: "status",
370
+ targets: "targets",
371
+ }),
372
+ )
373
+ .pipe(
374
+ T.ResponsePath("result"),
375
+ ) as unknown as Schema.Schema<GetPageRuleResponse>;
376
+
377
+ export type GetPageRuleError = DefaultErrors;
378
+
379
+ export const getPageRule: API.OperationMethod<
380
+ GetPageRuleRequest,
381
+ GetPageRuleResponse,
382
+ GetPageRuleError,
383
+ Credentials | HttpClient.HttpClient
384
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
385
+ input: GetPageRuleRequest,
386
+ output: GetPageRuleResponse,
387
+ errors: [],
388
+ }));
389
+
390
+ export interface ListPageRulesRequest {
391
+ /** Path param: Identifier. */
392
+ zoneId: string;
393
+ /** Query param: The direction used to sort returned Page Rules. */
394
+ direction?: "asc" | "desc";
395
+ /** Query param: When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match. */
396
+ match?: "any" | "all";
397
+ /** Query param: The field used to sort returned Page Rules. */
398
+ order?: "status" | "priority";
399
+ /** Query param: The status of the Page Rule. */
400
+ status?: "active" | "disabled";
401
+ }
402
+
403
+ export const ListPageRulesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
404
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
405
+ direction: Schema.optional(Schema.Literals(["asc", "desc"])).pipe(
406
+ T.HttpQuery("direction"),
407
+ ),
408
+ match: Schema.optional(Schema.Literals(["any", "all"])).pipe(
409
+ T.HttpQuery("match"),
410
+ ),
411
+ order: Schema.optional(Schema.Literals(["status", "priority"])).pipe(
412
+ T.HttpQuery("order"),
413
+ ),
414
+ status: Schema.optional(Schema.Literals(["active", "disabled"])).pipe(
415
+ T.HttpQuery("status"),
416
+ ),
417
+ }).pipe(
418
+ T.Http({ method: "GET", path: "/zones/{zone_id}/pagerules" }),
419
+ ) as unknown as Schema.Schema<ListPageRulesRequest>;
420
+
421
+ export type ListPageRulesResponse = {
422
+ id: string;
423
+ actions: (
424
+ | unknown
425
+ | { id?: "bypass_cache_on_cookie" | null; value?: string | null }
426
+ | { id?: "cache_by_device_type" | null; value?: "on" | "off" | null }
427
+ | { id?: "cache_deception_armor" | null; value?: "on" | "off" | null }
428
+ | {
429
+ id?: "cache_key_fields" | null;
430
+ value?: {
431
+ cookie?: {
432
+ checkPresence?: string[] | null;
433
+ include?: string[] | null;
434
+ } | null;
435
+ header?: {
436
+ checkPresence?: string[] | null;
437
+ exclude?: string[] | null;
438
+ include?: string[] | null;
439
+ } | null;
440
+ host?: { resolved?: boolean | null } | null;
441
+ queryString?: {
442
+ exclude?: "*" | string[] | null;
443
+ include?: "*" | string[] | null;
444
+ } | null;
445
+ user?: {
446
+ deviceType?: boolean | null;
447
+ geo?: boolean | null;
448
+ lang?: boolean | null;
449
+ } | null;
450
+ } | null;
451
+ }
452
+ | { id?: "cache_on_cookie" | null; value?: string | null }
453
+ | {
454
+ id?: "cache_ttl_by_status" | null;
455
+ value?: Record<string, unknown> | null;
456
+ }
457
+ | { id?: "disable_apps" | null }
458
+ | { id?: "disable_performance" | null }
459
+ | { id?: "disable_security" | null }
460
+ | { id?: "disable_zaraz" | null }
461
+ | { id?: "edge_cache_ttl" | null; value?: number | null }
462
+ | { id?: "explicit_cache_control" | null; value?: "on" | "off" | null }
463
+ | {
464
+ id?: "forwarding_url" | null;
465
+ value?: {
466
+ statusCode?: "301" | "302" | null;
467
+ url?: string | null;
468
+ } | null;
469
+ }
470
+ | { id?: "host_header_override" | null; value?: string | null }
471
+ | { id?: "resolve_override" | null; value?: string | null }
472
+ | { id?: "respect_strong_etag" | null; value?: "on" | "off" | null }
473
+ )[];
474
+ createdOn: string;
475
+ modifiedOn: string;
476
+ priority: number;
477
+ status: "active" | "disabled";
478
+ targets: {
479
+ constraint?: {
480
+ operator: "matches" | "contains" | "equals" | "not_equal" | "not_contain";
481
+ value: string;
482
+ } | null;
483
+ target?: "url" | null;
484
+ }[];
485
+ }[];
486
+
487
+ export const ListPageRulesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
488
+ Schema.Struct({
489
+ id: Schema.String,
490
+ actions: Schema.Array(
491
+ Schema.Union([
492
+ Schema.Unknown,
493
+ Schema.Struct({
494
+ id: Schema.optional(
495
+ Schema.Union([
496
+ Schema.Literal("bypass_cache_on_cookie"),
497
+ Schema.Null,
498
+ ]),
499
+ ),
500
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
501
+ }),
502
+ Schema.Struct({
503
+ id: Schema.optional(
504
+ Schema.Union([Schema.Literal("cache_by_device_type"), Schema.Null]),
505
+ ),
506
+ value: Schema.optional(
507
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
508
+ ),
509
+ }),
510
+ Schema.Struct({
511
+ id: Schema.optional(
512
+ Schema.Union([
513
+ Schema.Literal("cache_deception_armor"),
514
+ Schema.Null,
515
+ ]),
516
+ ),
517
+ value: Schema.optional(
518
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
519
+ ),
520
+ }),
521
+ Schema.Struct({
522
+ id: Schema.optional(
523
+ Schema.Union([Schema.Literal("cache_key_fields"), Schema.Null]),
524
+ ),
525
+ value: Schema.optional(
526
+ Schema.Union([
527
+ Schema.Struct({
528
+ cookie: Schema.optional(
529
+ Schema.Union([
530
+ Schema.Struct({
531
+ checkPresence: Schema.optional(
532
+ Schema.Union([
533
+ Schema.Array(Schema.String),
534
+ Schema.Null,
535
+ ]),
536
+ ),
537
+ include: Schema.optional(
538
+ Schema.Union([
539
+ Schema.Array(Schema.String),
540
+ Schema.Null,
541
+ ]),
542
+ ),
543
+ }).pipe(
544
+ Schema.encodeKeys({
545
+ checkPresence: "check_presence",
546
+ include: "include",
547
+ }),
548
+ ),
549
+ Schema.Null,
550
+ ]),
551
+ ),
552
+ header: Schema.optional(
553
+ Schema.Union([
554
+ Schema.Struct({
555
+ checkPresence: Schema.optional(
556
+ Schema.Union([
557
+ Schema.Array(Schema.String),
558
+ Schema.Null,
559
+ ]),
560
+ ),
561
+ exclude: Schema.optional(
562
+ Schema.Union([
563
+ Schema.Array(Schema.String),
564
+ Schema.Null,
565
+ ]),
566
+ ),
567
+ include: Schema.optional(
568
+ Schema.Union([
569
+ Schema.Array(Schema.String),
570
+ Schema.Null,
571
+ ]),
572
+ ),
573
+ }).pipe(
574
+ Schema.encodeKeys({
575
+ checkPresence: "check_presence",
576
+ exclude: "exclude",
577
+ include: "include",
578
+ }),
579
+ ),
580
+ Schema.Null,
581
+ ]),
582
+ ),
583
+ host: Schema.optional(
584
+ Schema.Union([
585
+ Schema.Struct({
586
+ resolved: Schema.optional(
587
+ Schema.Union([Schema.Boolean, Schema.Null]),
588
+ ),
589
+ }),
590
+ Schema.Null,
591
+ ]),
592
+ ),
593
+ queryString: Schema.optional(
594
+ Schema.Union([
595
+ Schema.Struct({
596
+ exclude: Schema.optional(
597
+ Schema.Union([
598
+ Schema.Union([
599
+ Schema.Literal("*"),
600
+ Schema.Array(Schema.String),
601
+ ]),
602
+ Schema.Null,
603
+ ]),
604
+ ),
605
+ include: Schema.optional(
606
+ Schema.Union([
607
+ Schema.Union([
608
+ Schema.Literal("*"),
609
+ Schema.Array(Schema.String),
610
+ ]),
611
+ Schema.Null,
612
+ ]),
613
+ ),
614
+ }),
615
+ Schema.Null,
616
+ ]),
617
+ ),
618
+ user: Schema.optional(
619
+ Schema.Union([
620
+ Schema.Struct({
621
+ deviceType: Schema.optional(
622
+ Schema.Union([Schema.Boolean, Schema.Null]),
623
+ ),
624
+ geo: Schema.optional(
625
+ Schema.Union([Schema.Boolean, Schema.Null]),
626
+ ),
627
+ lang: Schema.optional(
628
+ Schema.Union([Schema.Boolean, Schema.Null]),
629
+ ),
630
+ }).pipe(
631
+ Schema.encodeKeys({
632
+ deviceType: "device_type",
633
+ geo: "geo",
634
+ lang: "lang",
635
+ }),
636
+ ),
637
+ Schema.Null,
638
+ ]),
639
+ ),
640
+ }).pipe(
641
+ Schema.encodeKeys({
642
+ cookie: "cookie",
643
+ header: "header",
644
+ host: "host",
645
+ queryString: "query_string",
646
+ user: "user",
647
+ }),
648
+ ),
649
+ Schema.Null,
650
+ ]),
651
+ ),
652
+ }),
653
+ Schema.Struct({
654
+ id: Schema.optional(
655
+ Schema.Union([Schema.Literal("cache_on_cookie"), Schema.Null]),
656
+ ),
657
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
658
+ }),
659
+ Schema.Struct({
660
+ id: Schema.optional(
661
+ Schema.Union([Schema.Literal("cache_ttl_by_status"), Schema.Null]),
662
+ ),
663
+ value: Schema.optional(
664
+ Schema.Union([Schema.Struct({}), Schema.Null]),
665
+ ),
666
+ }),
667
+ Schema.Struct({
668
+ id: Schema.optional(
669
+ Schema.Union([Schema.Literal("disable_apps"), Schema.Null]),
670
+ ),
671
+ }),
672
+ Schema.Struct({
673
+ id: Schema.optional(
674
+ Schema.Union([Schema.Literal("disable_performance"), Schema.Null]),
675
+ ),
676
+ }),
677
+ Schema.Struct({
678
+ id: Schema.optional(
679
+ Schema.Union([Schema.Literal("disable_security"), Schema.Null]),
680
+ ),
681
+ }),
682
+ Schema.Struct({
683
+ id: Schema.optional(
684
+ Schema.Union([Schema.Literal("disable_zaraz"), Schema.Null]),
685
+ ),
686
+ }),
687
+ Schema.Struct({
688
+ id: Schema.optional(
689
+ Schema.Union([Schema.Literal("edge_cache_ttl"), Schema.Null]),
690
+ ),
691
+ value: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
692
+ }),
693
+ Schema.Struct({
694
+ id: Schema.optional(
695
+ Schema.Union([
696
+ Schema.Literal("explicit_cache_control"),
697
+ Schema.Null,
698
+ ]),
699
+ ),
700
+ value: Schema.optional(
701
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
702
+ ),
703
+ }),
704
+ Schema.Struct({
705
+ id: Schema.optional(
706
+ Schema.Union([Schema.Literal("forwarding_url"), Schema.Null]),
707
+ ),
708
+ value: Schema.optional(
709
+ Schema.Union([
710
+ Schema.Struct({
711
+ statusCode: Schema.optional(
712
+ Schema.Union([Schema.Literals(["301", "302"]), Schema.Null]),
713
+ ),
714
+ url: Schema.optional(
715
+ Schema.Union([Schema.String, Schema.Null]),
716
+ ),
717
+ }).pipe(
718
+ Schema.encodeKeys({ statusCode: "status_code", url: "url" }),
719
+ ),
720
+ Schema.Null,
721
+ ]),
722
+ ),
723
+ }),
724
+ Schema.Struct({
725
+ id: Schema.optional(
726
+ Schema.Union([Schema.Literal("host_header_override"), Schema.Null]),
727
+ ),
728
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
729
+ }),
730
+ Schema.Struct({
731
+ id: Schema.optional(
732
+ Schema.Union([Schema.Literal("resolve_override"), Schema.Null]),
733
+ ),
734
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
735
+ }),
736
+ Schema.Struct({
737
+ id: Schema.optional(
738
+ Schema.Union([Schema.Literal("respect_strong_etag"), Schema.Null]),
739
+ ),
740
+ value: Schema.optional(
741
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
742
+ ),
743
+ }),
744
+ ]),
745
+ ),
746
+ createdOn: Schema.String,
747
+ modifiedOn: Schema.String,
748
+ priority: Schema.Number,
749
+ status: Schema.Literals(["active", "disabled"]),
750
+ targets: Schema.Array(
751
+ Schema.Struct({
752
+ constraint: Schema.optional(
753
+ Schema.Union([
754
+ Schema.Struct({
755
+ operator: Schema.Literals([
756
+ "matches",
757
+ "contains",
758
+ "equals",
759
+ "not_equal",
760
+ "not_contain",
761
+ ]),
762
+ value: Schema.String,
763
+ }),
764
+ Schema.Null,
765
+ ]),
766
+ ),
767
+ target: Schema.optional(
768
+ Schema.Union([Schema.Literal("url"), Schema.Null]),
769
+ ),
770
+ }),
771
+ ),
772
+ }).pipe(
773
+ Schema.encodeKeys({
774
+ id: "id",
775
+ actions: "actions",
776
+ createdOn: "created_on",
777
+ modifiedOn: "modified_on",
778
+ priority: "priority",
779
+ status: "status",
780
+ targets: "targets",
781
+ }),
782
+ ),
783
+ ).pipe(
784
+ T.ResponsePath("result"),
785
+ ) as unknown as Schema.Schema<ListPageRulesResponse>;
786
+
787
+ export type ListPageRulesError = DefaultErrors;
788
+
789
+ export const listPageRules: API.OperationMethod<
790
+ ListPageRulesRequest,
791
+ ListPageRulesResponse,
792
+ ListPageRulesError,
793
+ Credentials | HttpClient.HttpClient
794
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
795
+ input: ListPageRulesRequest,
796
+ output: ListPageRulesResponse,
797
+ errors: [],
798
+ }));
799
+
800
+ export interface CreatePageRuleRequest {
801
+ /** Path param: Identifier. */
802
+ zoneId: string;
803
+ /** Body param: The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both. */
804
+ actions: (
805
+ | unknown
806
+ | { id?: "bypass_cache_on_cookie"; value?: string }
807
+ | { id?: "cache_by_device_type"; value?: "on" | "off" }
808
+ | { id?: "cache_deception_armor"; value?: "on" | "off" }
809
+ | {
810
+ id?: "cache_key_fields";
811
+ value?: {
812
+ cookie?: { checkPresence?: string[]; include?: string[] };
813
+ header?: {
814
+ checkPresence?: string[];
815
+ exclude?: string[];
816
+ include?: string[];
817
+ };
818
+ host?: { resolved?: boolean };
819
+ queryString?: { exclude?: "*" | string[]; include?: "*" | string[] };
820
+ user?: { deviceType?: boolean; geo?: boolean; lang?: boolean };
821
+ };
822
+ }
823
+ | { id?: "cache_on_cookie"; value?: string }
824
+ | { id?: "cache_ttl_by_status"; value?: Record<string, unknown> }
825
+ | { id?: "disable_apps" }
826
+ | { id?: "disable_performance" }
827
+ | { id?: "disable_security" }
828
+ | { id?: "disable_zaraz" }
829
+ | { id?: "edge_cache_ttl"; value?: number }
830
+ | { id?: "explicit_cache_control"; value?: "on" | "off" }
831
+ | {
832
+ id?: "forwarding_url";
833
+ value?: { statusCode?: "301" | "302"; url?: string };
834
+ }
835
+ | { id?: "host_header_override"; value?: string }
836
+ | { id?: "resolve_override"; value?: string }
837
+ | { id?: "respect_strong_etag"; value?: "on" | "off" }
838
+ )[];
839
+ /** Body param: The rule targets to evaluate on each request. */
840
+ targets: {
841
+ constraint?: {
842
+ operator: "matches" | "contains" | "equals" | "not_equal" | "not_contain";
843
+ value: string;
844
+ };
845
+ target?: "url";
846
+ }[];
847
+ /** Body param: The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: `/i */
848
+ priority?: number;
849
+ /** Body param: The status of the Page Rule. */
850
+ status?: "active" | "disabled";
851
+ }
852
+
853
+ export const CreatePageRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
854
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
855
+ actions: Schema.Array(
856
+ Schema.Union([
857
+ Schema.Unknown,
858
+ Schema.Struct({
859
+ id: Schema.optional(Schema.Literal("bypass_cache_on_cookie")),
860
+ value: Schema.optional(Schema.String),
861
+ }),
862
+ Schema.Struct({
863
+ id: Schema.optional(Schema.Literal("cache_by_device_type")),
864
+ value: Schema.optional(Schema.Literals(["on", "off"])),
865
+ }),
866
+ Schema.Struct({
867
+ id: Schema.optional(Schema.Literal("cache_deception_armor")),
868
+ value: Schema.optional(Schema.Literals(["on", "off"])),
869
+ }),
870
+ Schema.Struct({
871
+ id: Schema.optional(Schema.Literal("cache_key_fields")),
872
+ value: Schema.optional(
873
+ Schema.Struct({
874
+ cookie: Schema.optional(
875
+ Schema.Struct({
876
+ checkPresence: Schema.optional(Schema.Array(Schema.String)),
877
+ include: Schema.optional(Schema.Array(Schema.String)),
878
+ }).pipe(
879
+ Schema.encodeKeys({
880
+ checkPresence: "check_presence",
881
+ include: "include",
882
+ }),
883
+ ),
884
+ ),
885
+ header: Schema.optional(
886
+ Schema.Struct({
887
+ checkPresence: Schema.optional(Schema.Array(Schema.String)),
888
+ exclude: Schema.optional(Schema.Array(Schema.String)),
889
+ include: Schema.optional(Schema.Array(Schema.String)),
890
+ }).pipe(
891
+ Schema.encodeKeys({
892
+ checkPresence: "check_presence",
893
+ exclude: "exclude",
894
+ include: "include",
895
+ }),
896
+ ),
897
+ ),
898
+ host: Schema.optional(
899
+ Schema.Struct({
900
+ resolved: Schema.optional(Schema.Boolean),
901
+ }),
902
+ ),
903
+ queryString: Schema.optional(
904
+ Schema.Struct({
905
+ exclude: Schema.optional(
906
+ Schema.Union([
907
+ Schema.Literal("*"),
908
+ Schema.Array(Schema.String),
909
+ ]),
910
+ ),
911
+ include: Schema.optional(
912
+ Schema.Union([
913
+ Schema.Literal("*"),
914
+ Schema.Array(Schema.String),
915
+ ]),
916
+ ),
917
+ }),
918
+ ),
919
+ user: Schema.optional(
920
+ Schema.Struct({
921
+ deviceType: Schema.optional(Schema.Boolean),
922
+ geo: Schema.optional(Schema.Boolean),
923
+ lang: Schema.optional(Schema.Boolean),
924
+ }).pipe(
925
+ Schema.encodeKeys({
926
+ deviceType: "device_type",
927
+ geo: "geo",
928
+ lang: "lang",
929
+ }),
930
+ ),
931
+ ),
932
+ }).pipe(
933
+ Schema.encodeKeys({
934
+ cookie: "cookie",
935
+ header: "header",
936
+ host: "host",
937
+ queryString: "query_string",
938
+ user: "user",
939
+ }),
940
+ ),
941
+ ),
942
+ }),
943
+ Schema.Struct({
944
+ id: Schema.optional(Schema.Literal("cache_on_cookie")),
945
+ value: Schema.optional(Schema.String),
946
+ }),
947
+ Schema.Struct({
948
+ id: Schema.optional(Schema.Literal("cache_ttl_by_status")),
949
+ value: Schema.optional(Schema.Struct({})),
950
+ }),
951
+ Schema.Struct({
952
+ id: Schema.optional(Schema.Literal("disable_apps")),
953
+ }),
954
+ Schema.Struct({
955
+ id: Schema.optional(Schema.Literal("disable_performance")),
956
+ }),
957
+ Schema.Struct({
958
+ id: Schema.optional(Schema.Literal("disable_security")),
959
+ }),
960
+ Schema.Struct({
961
+ id: Schema.optional(Schema.Literal("disable_zaraz")),
962
+ }),
963
+ Schema.Struct({
964
+ id: Schema.optional(Schema.Literal("edge_cache_ttl")),
965
+ value: Schema.optional(Schema.Number),
966
+ }),
967
+ Schema.Struct({
968
+ id: Schema.optional(Schema.Literal("explicit_cache_control")),
969
+ value: Schema.optional(Schema.Literals(["on", "off"])),
970
+ }),
971
+ Schema.Struct({
972
+ id: Schema.optional(Schema.Literal("forwarding_url")),
973
+ value: Schema.optional(
974
+ Schema.Struct({
975
+ statusCode: Schema.optional(Schema.Literals(["301", "302"])),
976
+ url: Schema.optional(Schema.String),
977
+ }).pipe(Schema.encodeKeys({ statusCode: "status_code", url: "url" })),
978
+ ),
979
+ }),
980
+ Schema.Struct({
981
+ id: Schema.optional(Schema.Literal("host_header_override")),
982
+ value: Schema.optional(Schema.String),
983
+ }),
984
+ Schema.Struct({
985
+ id: Schema.optional(Schema.Literal("resolve_override")),
986
+ value: Schema.optional(Schema.String),
987
+ }),
988
+ Schema.Struct({
989
+ id: Schema.optional(Schema.Literal("respect_strong_etag")),
990
+ value: Schema.optional(Schema.Literals(["on", "off"])),
991
+ }),
992
+ ]),
993
+ ),
994
+ targets: Schema.Array(
995
+ Schema.Struct({
996
+ constraint: Schema.optional(
997
+ Schema.Struct({
998
+ operator: Schema.Literals([
999
+ "matches",
1000
+ "contains",
1001
+ "equals",
1002
+ "not_equal",
1003
+ "not_contain",
1004
+ ]),
1005
+ value: Schema.String,
1006
+ }),
1007
+ ),
1008
+ target: Schema.optional(Schema.Literal("url")),
1009
+ }),
1010
+ ),
1011
+ priority: Schema.optional(Schema.Number),
1012
+ status: Schema.optional(Schema.Literals(["active", "disabled"])),
1013
+ }).pipe(
1014
+ T.Http({ method: "POST", path: "/zones/{zone_id}/pagerules" }),
1015
+ ) as unknown as Schema.Schema<CreatePageRuleRequest>;
1016
+
1017
+ export interface CreatePageRuleResponse {
1018
+ /** Identifier. */
1019
+ id: string;
1020
+ /** The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both. */
1021
+ actions: (
1022
+ | unknown
1023
+ | { id?: "bypass_cache_on_cookie" | null; value?: string | null }
1024
+ | { id?: "cache_by_device_type" | null; value?: "on" | "off" | null }
1025
+ | { id?: "cache_deception_armor" | null; value?: "on" | "off" | null }
1026
+ | {
1027
+ id?: "cache_key_fields" | null;
1028
+ value?: {
1029
+ cookie?: {
1030
+ checkPresence?: string[] | null;
1031
+ include?: string[] | null;
1032
+ } | null;
1033
+ header?: {
1034
+ checkPresence?: string[] | null;
1035
+ exclude?: string[] | null;
1036
+ include?: string[] | null;
1037
+ } | null;
1038
+ host?: { resolved?: boolean | null } | null;
1039
+ queryString?: {
1040
+ exclude?: "*" | string[] | null;
1041
+ include?: "*" | string[] | null;
1042
+ } | null;
1043
+ user?: {
1044
+ deviceType?: boolean | null;
1045
+ geo?: boolean | null;
1046
+ lang?: boolean | null;
1047
+ } | null;
1048
+ } | null;
1049
+ }
1050
+ | { id?: "cache_on_cookie" | null; value?: string | null }
1051
+ | {
1052
+ id?: "cache_ttl_by_status" | null;
1053
+ value?: Record<string, unknown> | null;
1054
+ }
1055
+ | { id?: "disable_apps" | null }
1056
+ | { id?: "disable_performance" | null }
1057
+ | { id?: "disable_security" | null }
1058
+ | { id?: "disable_zaraz" | null }
1059
+ | { id?: "edge_cache_ttl" | null; value?: number | null }
1060
+ | { id?: "explicit_cache_control" | null; value?: "on" | "off" | null }
1061
+ | {
1062
+ id?: "forwarding_url" | null;
1063
+ value?: {
1064
+ statusCode?: "301" | "302" | null;
1065
+ url?: string | null;
1066
+ } | null;
1067
+ }
1068
+ | { id?: "host_header_override" | null; value?: string | null }
1069
+ | { id?: "resolve_override" | null; value?: string | null }
1070
+ | { id?: "respect_strong_etag" | null; value?: "on" | "off" | null }
1071
+ )[];
1072
+ /** The timestamp of when the Page Rule was created. */
1073
+ createdOn: string;
1074
+ /** The timestamp of when the Page Rule was last modified. */
1075
+ modifiedOn: string;
1076
+ /** The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: `/images/ `) bu */
1077
+ priority: number;
1078
+ /** The status of the Page Rule. */
1079
+ status: "active" | "disabled";
1080
+ /** The rule targets to evaluate on each request. */
1081
+ targets: {
1082
+ constraint?: {
1083
+ operator: "matches" | "contains" | "equals" | "not_equal" | "not_contain";
1084
+ value: string;
1085
+ } | null;
1086
+ target?: "url" | null;
1087
+ }[];
1088
+ }
1089
+
1090
+ export const CreatePageRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1091
+ {
1092
+ id: Schema.String,
1093
+ actions: Schema.Array(
1094
+ Schema.Union([
1095
+ Schema.Unknown,
1096
+ Schema.Struct({
1097
+ id: Schema.optional(
1098
+ Schema.Union([
1099
+ Schema.Literal("bypass_cache_on_cookie"),
1100
+ Schema.Null,
1101
+ ]),
1102
+ ),
1103
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1104
+ }),
1105
+ Schema.Struct({
1106
+ id: Schema.optional(
1107
+ Schema.Union([Schema.Literal("cache_by_device_type"), Schema.Null]),
1108
+ ),
1109
+ value: Schema.optional(
1110
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
1111
+ ),
1112
+ }),
1113
+ Schema.Struct({
1114
+ id: Schema.optional(
1115
+ Schema.Union([
1116
+ Schema.Literal("cache_deception_armor"),
1117
+ Schema.Null,
1118
+ ]),
1119
+ ),
1120
+ value: Schema.optional(
1121
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
1122
+ ),
1123
+ }),
1124
+ Schema.Struct({
1125
+ id: Schema.optional(
1126
+ Schema.Union([Schema.Literal("cache_key_fields"), Schema.Null]),
1127
+ ),
1128
+ value: Schema.optional(
1129
+ Schema.Union([
1130
+ Schema.Struct({
1131
+ cookie: Schema.optional(
1132
+ Schema.Union([
1133
+ Schema.Struct({
1134
+ checkPresence: Schema.optional(
1135
+ Schema.Union([
1136
+ Schema.Array(Schema.String),
1137
+ Schema.Null,
1138
+ ]),
1139
+ ),
1140
+ include: Schema.optional(
1141
+ Schema.Union([
1142
+ Schema.Array(Schema.String),
1143
+ Schema.Null,
1144
+ ]),
1145
+ ),
1146
+ }).pipe(
1147
+ Schema.encodeKeys({
1148
+ checkPresence: "check_presence",
1149
+ include: "include",
1150
+ }),
1151
+ ),
1152
+ Schema.Null,
1153
+ ]),
1154
+ ),
1155
+ header: Schema.optional(
1156
+ Schema.Union([
1157
+ Schema.Struct({
1158
+ checkPresence: Schema.optional(
1159
+ Schema.Union([
1160
+ Schema.Array(Schema.String),
1161
+ Schema.Null,
1162
+ ]),
1163
+ ),
1164
+ exclude: Schema.optional(
1165
+ Schema.Union([
1166
+ Schema.Array(Schema.String),
1167
+ Schema.Null,
1168
+ ]),
1169
+ ),
1170
+ include: Schema.optional(
1171
+ Schema.Union([
1172
+ Schema.Array(Schema.String),
1173
+ Schema.Null,
1174
+ ]),
1175
+ ),
1176
+ }).pipe(
1177
+ Schema.encodeKeys({
1178
+ checkPresence: "check_presence",
1179
+ exclude: "exclude",
1180
+ include: "include",
1181
+ }),
1182
+ ),
1183
+ Schema.Null,
1184
+ ]),
1185
+ ),
1186
+ host: Schema.optional(
1187
+ Schema.Union([
1188
+ Schema.Struct({
1189
+ resolved: Schema.optional(
1190
+ Schema.Union([Schema.Boolean, Schema.Null]),
1191
+ ),
1192
+ }),
1193
+ Schema.Null,
1194
+ ]),
1195
+ ),
1196
+ queryString: Schema.optional(
1197
+ Schema.Union([
1198
+ Schema.Struct({
1199
+ exclude: Schema.optional(
1200
+ Schema.Union([
1201
+ Schema.Union([
1202
+ Schema.Literal("*"),
1203
+ Schema.Array(Schema.String),
1204
+ ]),
1205
+ Schema.Null,
1206
+ ]),
1207
+ ),
1208
+ include: Schema.optional(
1209
+ Schema.Union([
1210
+ Schema.Union([
1211
+ Schema.Literal("*"),
1212
+ Schema.Array(Schema.String),
1213
+ ]),
1214
+ Schema.Null,
1215
+ ]),
1216
+ ),
1217
+ }),
1218
+ Schema.Null,
1219
+ ]),
1220
+ ),
1221
+ user: Schema.optional(
1222
+ Schema.Union([
1223
+ Schema.Struct({
1224
+ deviceType: Schema.optional(
1225
+ Schema.Union([Schema.Boolean, Schema.Null]),
1226
+ ),
1227
+ geo: Schema.optional(
1228
+ Schema.Union([Schema.Boolean, Schema.Null]),
1229
+ ),
1230
+ lang: Schema.optional(
1231
+ Schema.Union([Schema.Boolean, Schema.Null]),
1232
+ ),
1233
+ }).pipe(
1234
+ Schema.encodeKeys({
1235
+ deviceType: "device_type",
1236
+ geo: "geo",
1237
+ lang: "lang",
1238
+ }),
1239
+ ),
1240
+ Schema.Null,
1241
+ ]),
1242
+ ),
1243
+ }).pipe(
1244
+ Schema.encodeKeys({
1245
+ cookie: "cookie",
1246
+ header: "header",
1247
+ host: "host",
1248
+ queryString: "query_string",
1249
+ user: "user",
1250
+ }),
1251
+ ),
1252
+ Schema.Null,
1253
+ ]),
1254
+ ),
1255
+ }),
1256
+ Schema.Struct({
1257
+ id: Schema.optional(
1258
+ Schema.Union([Schema.Literal("cache_on_cookie"), Schema.Null]),
1259
+ ),
1260
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1261
+ }),
1262
+ Schema.Struct({
1263
+ id: Schema.optional(
1264
+ Schema.Union([Schema.Literal("cache_ttl_by_status"), Schema.Null]),
1265
+ ),
1266
+ value: Schema.optional(
1267
+ Schema.Union([Schema.Struct({}), Schema.Null]),
1268
+ ),
1269
+ }),
1270
+ Schema.Struct({
1271
+ id: Schema.optional(
1272
+ Schema.Union([Schema.Literal("disable_apps"), Schema.Null]),
1273
+ ),
1274
+ }),
1275
+ Schema.Struct({
1276
+ id: Schema.optional(
1277
+ Schema.Union([Schema.Literal("disable_performance"), Schema.Null]),
1278
+ ),
1279
+ }),
1280
+ Schema.Struct({
1281
+ id: Schema.optional(
1282
+ Schema.Union([Schema.Literal("disable_security"), Schema.Null]),
1283
+ ),
1284
+ }),
1285
+ Schema.Struct({
1286
+ id: Schema.optional(
1287
+ Schema.Union([Schema.Literal("disable_zaraz"), Schema.Null]),
1288
+ ),
1289
+ }),
1290
+ Schema.Struct({
1291
+ id: Schema.optional(
1292
+ Schema.Union([Schema.Literal("edge_cache_ttl"), Schema.Null]),
1293
+ ),
1294
+ value: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1295
+ }),
1296
+ Schema.Struct({
1297
+ id: Schema.optional(
1298
+ Schema.Union([
1299
+ Schema.Literal("explicit_cache_control"),
1300
+ Schema.Null,
1301
+ ]),
1302
+ ),
1303
+ value: Schema.optional(
1304
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
1305
+ ),
1306
+ }),
1307
+ Schema.Struct({
1308
+ id: Schema.optional(
1309
+ Schema.Union([Schema.Literal("forwarding_url"), Schema.Null]),
1310
+ ),
1311
+ value: Schema.optional(
1312
+ Schema.Union([
1313
+ Schema.Struct({
1314
+ statusCode: Schema.optional(
1315
+ Schema.Union([Schema.Literals(["301", "302"]), Schema.Null]),
1316
+ ),
1317
+ url: Schema.optional(
1318
+ Schema.Union([Schema.String, Schema.Null]),
1319
+ ),
1320
+ }).pipe(
1321
+ Schema.encodeKeys({ statusCode: "status_code", url: "url" }),
1322
+ ),
1323
+ Schema.Null,
1324
+ ]),
1325
+ ),
1326
+ }),
1327
+ Schema.Struct({
1328
+ id: Schema.optional(
1329
+ Schema.Union([Schema.Literal("host_header_override"), Schema.Null]),
1330
+ ),
1331
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1332
+ }),
1333
+ Schema.Struct({
1334
+ id: Schema.optional(
1335
+ Schema.Union([Schema.Literal("resolve_override"), Schema.Null]),
1336
+ ),
1337
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1338
+ }),
1339
+ Schema.Struct({
1340
+ id: Schema.optional(
1341
+ Schema.Union([Schema.Literal("respect_strong_etag"), Schema.Null]),
1342
+ ),
1343
+ value: Schema.optional(
1344
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
1345
+ ),
1346
+ }),
1347
+ ]),
1348
+ ),
1349
+ createdOn: Schema.String,
1350
+ modifiedOn: Schema.String,
1351
+ priority: Schema.Number,
1352
+ status: Schema.Literals(["active", "disabled"]),
1353
+ targets: Schema.Array(
1354
+ Schema.Struct({
1355
+ constraint: Schema.optional(
1356
+ Schema.Union([
1357
+ Schema.Struct({
1358
+ operator: Schema.Literals([
1359
+ "matches",
1360
+ "contains",
1361
+ "equals",
1362
+ "not_equal",
1363
+ "not_contain",
1364
+ ]),
1365
+ value: Schema.String,
1366
+ }),
1367
+ Schema.Null,
1368
+ ]),
1369
+ ),
1370
+ target: Schema.optional(
1371
+ Schema.Union([Schema.Literal("url"), Schema.Null]),
1372
+ ),
1373
+ }),
1374
+ ),
1375
+ },
1376
+ )
1377
+ .pipe(
1378
+ Schema.encodeKeys({
1379
+ id: "id",
1380
+ actions: "actions",
1381
+ createdOn: "created_on",
1382
+ modifiedOn: "modified_on",
1383
+ priority: "priority",
1384
+ status: "status",
1385
+ targets: "targets",
1386
+ }),
1387
+ )
1388
+ .pipe(
1389
+ T.ResponsePath("result"),
1390
+ ) as unknown as Schema.Schema<CreatePageRuleResponse>;
1391
+
1392
+ export type CreatePageRuleError = DefaultErrors;
1393
+
1394
+ export const createPageRule: API.OperationMethod<
1395
+ CreatePageRuleRequest,
1396
+ CreatePageRuleResponse,
1397
+ CreatePageRuleError,
1398
+ Credentials | HttpClient.HttpClient
1399
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1400
+ input: CreatePageRuleRequest,
1401
+ output: CreatePageRuleResponse,
1402
+ errors: [],
1403
+ }));
1404
+
1405
+ export interface UpdatePageRuleRequest {
1406
+ pageruleId: string;
1407
+ /** Path param: Identifier. */
1408
+ zoneId: string;
1409
+ /** Body param: The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both. */
1410
+ actions: (
1411
+ | unknown
1412
+ | { id?: "bypass_cache_on_cookie"; value?: string }
1413
+ | { id?: "cache_by_device_type"; value?: "on" | "off" }
1414
+ | { id?: "cache_deception_armor"; value?: "on" | "off" }
1415
+ | {
1416
+ id?: "cache_key_fields";
1417
+ value?: {
1418
+ cookie?: { checkPresence?: string[]; include?: string[] };
1419
+ header?: {
1420
+ checkPresence?: string[];
1421
+ exclude?: string[];
1422
+ include?: string[];
1423
+ };
1424
+ host?: { resolved?: boolean };
1425
+ queryString?: { exclude?: "*" | string[]; include?: "*" | string[] };
1426
+ user?: { deviceType?: boolean; geo?: boolean; lang?: boolean };
1427
+ };
1428
+ }
1429
+ | { id?: "cache_on_cookie"; value?: string }
1430
+ | { id?: "cache_ttl_by_status"; value?: Record<string, unknown> }
1431
+ | { id?: "disable_apps" }
1432
+ | { id?: "disable_performance" }
1433
+ | { id?: "disable_security" }
1434
+ | { id?: "disable_zaraz" }
1435
+ | { id?: "edge_cache_ttl"; value?: number }
1436
+ | { id?: "explicit_cache_control"; value?: "on" | "off" }
1437
+ | {
1438
+ id?: "forwarding_url";
1439
+ value?: { statusCode?: "301" | "302"; url?: string };
1440
+ }
1441
+ | { id?: "host_header_override"; value?: string }
1442
+ | { id?: "resolve_override"; value?: string }
1443
+ | { id?: "respect_strong_etag"; value?: "on" | "off" }
1444
+ )[];
1445
+ /** Body param: The rule targets to evaluate on each request. */
1446
+ targets: {
1447
+ constraint?: {
1448
+ operator: "matches" | "contains" | "equals" | "not_equal" | "not_contain";
1449
+ value: string;
1450
+ };
1451
+ target?: "url";
1452
+ }[];
1453
+ /** Body param: The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: `/i */
1454
+ priority?: number;
1455
+ /** Body param: The status of the Page Rule. */
1456
+ status?: "active" | "disabled";
1457
+ }
1458
+
1459
+ export const UpdatePageRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1460
+ pageruleId: Schema.String.pipe(T.HttpPath("pageruleId")),
1461
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1462
+ actions: Schema.Array(
1463
+ Schema.Union([
1464
+ Schema.Unknown,
1465
+ Schema.Struct({
1466
+ id: Schema.optional(Schema.Literal("bypass_cache_on_cookie")),
1467
+ value: Schema.optional(Schema.String),
1468
+ }),
1469
+ Schema.Struct({
1470
+ id: Schema.optional(Schema.Literal("cache_by_device_type")),
1471
+ value: Schema.optional(Schema.Literals(["on", "off"])),
1472
+ }),
1473
+ Schema.Struct({
1474
+ id: Schema.optional(Schema.Literal("cache_deception_armor")),
1475
+ value: Schema.optional(Schema.Literals(["on", "off"])),
1476
+ }),
1477
+ Schema.Struct({
1478
+ id: Schema.optional(Schema.Literal("cache_key_fields")),
1479
+ value: Schema.optional(
1480
+ Schema.Struct({
1481
+ cookie: Schema.optional(
1482
+ Schema.Struct({
1483
+ checkPresence: Schema.optional(Schema.Array(Schema.String)),
1484
+ include: Schema.optional(Schema.Array(Schema.String)),
1485
+ }).pipe(
1486
+ Schema.encodeKeys({
1487
+ checkPresence: "check_presence",
1488
+ include: "include",
1489
+ }),
1490
+ ),
1491
+ ),
1492
+ header: Schema.optional(
1493
+ Schema.Struct({
1494
+ checkPresence: Schema.optional(Schema.Array(Schema.String)),
1495
+ exclude: Schema.optional(Schema.Array(Schema.String)),
1496
+ include: Schema.optional(Schema.Array(Schema.String)),
1497
+ }).pipe(
1498
+ Schema.encodeKeys({
1499
+ checkPresence: "check_presence",
1500
+ exclude: "exclude",
1501
+ include: "include",
1502
+ }),
1503
+ ),
1504
+ ),
1505
+ host: Schema.optional(
1506
+ Schema.Struct({
1507
+ resolved: Schema.optional(Schema.Boolean),
1508
+ }),
1509
+ ),
1510
+ queryString: Schema.optional(
1511
+ Schema.Struct({
1512
+ exclude: Schema.optional(
1513
+ Schema.Union([
1514
+ Schema.Literal("*"),
1515
+ Schema.Array(Schema.String),
1516
+ ]),
1517
+ ),
1518
+ include: Schema.optional(
1519
+ Schema.Union([
1520
+ Schema.Literal("*"),
1521
+ Schema.Array(Schema.String),
1522
+ ]),
1523
+ ),
1524
+ }),
1525
+ ),
1526
+ user: Schema.optional(
1527
+ Schema.Struct({
1528
+ deviceType: Schema.optional(Schema.Boolean),
1529
+ geo: Schema.optional(Schema.Boolean),
1530
+ lang: Schema.optional(Schema.Boolean),
1531
+ }).pipe(
1532
+ Schema.encodeKeys({
1533
+ deviceType: "device_type",
1534
+ geo: "geo",
1535
+ lang: "lang",
1536
+ }),
1537
+ ),
1538
+ ),
1539
+ }).pipe(
1540
+ Schema.encodeKeys({
1541
+ cookie: "cookie",
1542
+ header: "header",
1543
+ host: "host",
1544
+ queryString: "query_string",
1545
+ user: "user",
1546
+ }),
1547
+ ),
1548
+ ),
1549
+ }),
1550
+ Schema.Struct({
1551
+ id: Schema.optional(Schema.Literal("cache_on_cookie")),
1552
+ value: Schema.optional(Schema.String),
1553
+ }),
1554
+ Schema.Struct({
1555
+ id: Schema.optional(Schema.Literal("cache_ttl_by_status")),
1556
+ value: Schema.optional(Schema.Struct({})),
1557
+ }),
1558
+ Schema.Struct({
1559
+ id: Schema.optional(Schema.Literal("disable_apps")),
1560
+ }),
1561
+ Schema.Struct({
1562
+ id: Schema.optional(Schema.Literal("disable_performance")),
1563
+ }),
1564
+ Schema.Struct({
1565
+ id: Schema.optional(Schema.Literal("disable_security")),
1566
+ }),
1567
+ Schema.Struct({
1568
+ id: Schema.optional(Schema.Literal("disable_zaraz")),
1569
+ }),
1570
+ Schema.Struct({
1571
+ id: Schema.optional(Schema.Literal("edge_cache_ttl")),
1572
+ value: Schema.optional(Schema.Number),
1573
+ }),
1574
+ Schema.Struct({
1575
+ id: Schema.optional(Schema.Literal("explicit_cache_control")),
1576
+ value: Schema.optional(Schema.Literals(["on", "off"])),
1577
+ }),
1578
+ Schema.Struct({
1579
+ id: Schema.optional(Schema.Literal("forwarding_url")),
1580
+ value: Schema.optional(
1581
+ Schema.Struct({
1582
+ statusCode: Schema.optional(Schema.Literals(["301", "302"])),
1583
+ url: Schema.optional(Schema.String),
1584
+ }).pipe(Schema.encodeKeys({ statusCode: "status_code", url: "url" })),
1585
+ ),
1586
+ }),
1587
+ Schema.Struct({
1588
+ id: Schema.optional(Schema.Literal("host_header_override")),
1589
+ value: Schema.optional(Schema.String),
1590
+ }),
1591
+ Schema.Struct({
1592
+ id: Schema.optional(Schema.Literal("resolve_override")),
1593
+ value: Schema.optional(Schema.String),
1594
+ }),
1595
+ Schema.Struct({
1596
+ id: Schema.optional(Schema.Literal("respect_strong_etag")),
1597
+ value: Schema.optional(Schema.Literals(["on", "off"])),
1598
+ }),
1599
+ ]),
1600
+ ),
1601
+ targets: Schema.Array(
1602
+ Schema.Struct({
1603
+ constraint: Schema.optional(
1604
+ Schema.Struct({
1605
+ operator: Schema.Literals([
1606
+ "matches",
1607
+ "contains",
1608
+ "equals",
1609
+ "not_equal",
1610
+ "not_contain",
1611
+ ]),
1612
+ value: Schema.String,
1613
+ }),
1614
+ ),
1615
+ target: Schema.optional(Schema.Literal("url")),
1616
+ }),
1617
+ ),
1618
+ priority: Schema.optional(Schema.Number),
1619
+ status: Schema.optional(Schema.Literals(["active", "disabled"])),
1620
+ }).pipe(
1621
+ T.Http({ method: "PUT", path: "/zones/{zone_id}/pagerules/{pageruleId}" }),
1622
+ ) as unknown as Schema.Schema<UpdatePageRuleRequest>;
1623
+
1624
+ export interface UpdatePageRuleResponse {
1625
+ /** Identifier. */
1626
+ id: string;
1627
+ /** The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both. */
1628
+ actions: (
1629
+ | unknown
1630
+ | { id?: "bypass_cache_on_cookie" | null; value?: string | null }
1631
+ | { id?: "cache_by_device_type" | null; value?: "on" | "off" | null }
1632
+ | { id?: "cache_deception_armor" | null; value?: "on" | "off" | null }
1633
+ | {
1634
+ id?: "cache_key_fields" | null;
1635
+ value?: {
1636
+ cookie?: {
1637
+ checkPresence?: string[] | null;
1638
+ include?: string[] | null;
1639
+ } | null;
1640
+ header?: {
1641
+ checkPresence?: string[] | null;
1642
+ exclude?: string[] | null;
1643
+ include?: string[] | null;
1644
+ } | null;
1645
+ host?: { resolved?: boolean | null } | null;
1646
+ queryString?: {
1647
+ exclude?: "*" | string[] | null;
1648
+ include?: "*" | string[] | null;
1649
+ } | null;
1650
+ user?: {
1651
+ deviceType?: boolean | null;
1652
+ geo?: boolean | null;
1653
+ lang?: boolean | null;
1654
+ } | null;
1655
+ } | null;
1656
+ }
1657
+ | { id?: "cache_on_cookie" | null; value?: string | null }
1658
+ | {
1659
+ id?: "cache_ttl_by_status" | null;
1660
+ value?: Record<string, unknown> | null;
1661
+ }
1662
+ | { id?: "disable_apps" | null }
1663
+ | { id?: "disable_performance" | null }
1664
+ | { id?: "disable_security" | null }
1665
+ | { id?: "disable_zaraz" | null }
1666
+ | { id?: "edge_cache_ttl" | null; value?: number | null }
1667
+ | { id?: "explicit_cache_control" | null; value?: "on" | "off" | null }
1668
+ | {
1669
+ id?: "forwarding_url" | null;
1670
+ value?: {
1671
+ statusCode?: "301" | "302" | null;
1672
+ url?: string | null;
1673
+ } | null;
1674
+ }
1675
+ | { id?: "host_header_override" | null; value?: string | null }
1676
+ | { id?: "resolve_override" | null; value?: string | null }
1677
+ | { id?: "respect_strong_etag" | null; value?: "on" | "off" | null }
1678
+ )[];
1679
+ /** The timestamp of when the Page Rule was created. */
1680
+ createdOn: string;
1681
+ /** The timestamp of when the Page Rule was last modified. */
1682
+ modifiedOn: string;
1683
+ /** The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: `/images/ `) bu */
1684
+ priority: number;
1685
+ /** The status of the Page Rule. */
1686
+ status: "active" | "disabled";
1687
+ /** The rule targets to evaluate on each request. */
1688
+ targets: {
1689
+ constraint?: {
1690
+ operator: "matches" | "contains" | "equals" | "not_equal" | "not_contain";
1691
+ value: string;
1692
+ } | null;
1693
+ target?: "url" | null;
1694
+ }[];
1695
+ }
1696
+
1697
+ export const UpdatePageRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1698
+ {
1699
+ id: Schema.String,
1700
+ actions: Schema.Array(
1701
+ Schema.Union([
1702
+ Schema.Unknown,
1703
+ Schema.Struct({
1704
+ id: Schema.optional(
1705
+ Schema.Union([
1706
+ Schema.Literal("bypass_cache_on_cookie"),
1707
+ Schema.Null,
1708
+ ]),
1709
+ ),
1710
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1711
+ }),
1712
+ Schema.Struct({
1713
+ id: Schema.optional(
1714
+ Schema.Union([Schema.Literal("cache_by_device_type"), Schema.Null]),
1715
+ ),
1716
+ value: Schema.optional(
1717
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
1718
+ ),
1719
+ }),
1720
+ Schema.Struct({
1721
+ id: Schema.optional(
1722
+ Schema.Union([
1723
+ Schema.Literal("cache_deception_armor"),
1724
+ Schema.Null,
1725
+ ]),
1726
+ ),
1727
+ value: Schema.optional(
1728
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
1729
+ ),
1730
+ }),
1731
+ Schema.Struct({
1732
+ id: Schema.optional(
1733
+ Schema.Union([Schema.Literal("cache_key_fields"), Schema.Null]),
1734
+ ),
1735
+ value: Schema.optional(
1736
+ Schema.Union([
1737
+ Schema.Struct({
1738
+ cookie: Schema.optional(
1739
+ Schema.Union([
1740
+ Schema.Struct({
1741
+ checkPresence: Schema.optional(
1742
+ Schema.Union([
1743
+ Schema.Array(Schema.String),
1744
+ Schema.Null,
1745
+ ]),
1746
+ ),
1747
+ include: Schema.optional(
1748
+ Schema.Union([
1749
+ Schema.Array(Schema.String),
1750
+ Schema.Null,
1751
+ ]),
1752
+ ),
1753
+ }).pipe(
1754
+ Schema.encodeKeys({
1755
+ checkPresence: "check_presence",
1756
+ include: "include",
1757
+ }),
1758
+ ),
1759
+ Schema.Null,
1760
+ ]),
1761
+ ),
1762
+ header: Schema.optional(
1763
+ Schema.Union([
1764
+ Schema.Struct({
1765
+ checkPresence: Schema.optional(
1766
+ Schema.Union([
1767
+ Schema.Array(Schema.String),
1768
+ Schema.Null,
1769
+ ]),
1770
+ ),
1771
+ exclude: Schema.optional(
1772
+ Schema.Union([
1773
+ Schema.Array(Schema.String),
1774
+ Schema.Null,
1775
+ ]),
1776
+ ),
1777
+ include: Schema.optional(
1778
+ Schema.Union([
1779
+ Schema.Array(Schema.String),
1780
+ Schema.Null,
1781
+ ]),
1782
+ ),
1783
+ }).pipe(
1784
+ Schema.encodeKeys({
1785
+ checkPresence: "check_presence",
1786
+ exclude: "exclude",
1787
+ include: "include",
1788
+ }),
1789
+ ),
1790
+ Schema.Null,
1791
+ ]),
1792
+ ),
1793
+ host: Schema.optional(
1794
+ Schema.Union([
1795
+ Schema.Struct({
1796
+ resolved: Schema.optional(
1797
+ Schema.Union([Schema.Boolean, Schema.Null]),
1798
+ ),
1799
+ }),
1800
+ Schema.Null,
1801
+ ]),
1802
+ ),
1803
+ queryString: Schema.optional(
1804
+ Schema.Union([
1805
+ Schema.Struct({
1806
+ exclude: Schema.optional(
1807
+ Schema.Union([
1808
+ Schema.Union([
1809
+ Schema.Literal("*"),
1810
+ Schema.Array(Schema.String),
1811
+ ]),
1812
+ Schema.Null,
1813
+ ]),
1814
+ ),
1815
+ include: Schema.optional(
1816
+ Schema.Union([
1817
+ Schema.Union([
1818
+ Schema.Literal("*"),
1819
+ Schema.Array(Schema.String),
1820
+ ]),
1821
+ Schema.Null,
1822
+ ]),
1823
+ ),
1824
+ }),
1825
+ Schema.Null,
1826
+ ]),
1827
+ ),
1828
+ user: Schema.optional(
1829
+ Schema.Union([
1830
+ Schema.Struct({
1831
+ deviceType: Schema.optional(
1832
+ Schema.Union([Schema.Boolean, Schema.Null]),
1833
+ ),
1834
+ geo: Schema.optional(
1835
+ Schema.Union([Schema.Boolean, Schema.Null]),
1836
+ ),
1837
+ lang: Schema.optional(
1838
+ Schema.Union([Schema.Boolean, Schema.Null]),
1839
+ ),
1840
+ }).pipe(
1841
+ Schema.encodeKeys({
1842
+ deviceType: "device_type",
1843
+ geo: "geo",
1844
+ lang: "lang",
1845
+ }),
1846
+ ),
1847
+ Schema.Null,
1848
+ ]),
1849
+ ),
1850
+ }).pipe(
1851
+ Schema.encodeKeys({
1852
+ cookie: "cookie",
1853
+ header: "header",
1854
+ host: "host",
1855
+ queryString: "query_string",
1856
+ user: "user",
1857
+ }),
1858
+ ),
1859
+ Schema.Null,
1860
+ ]),
1861
+ ),
1862
+ }),
1863
+ Schema.Struct({
1864
+ id: Schema.optional(
1865
+ Schema.Union([Schema.Literal("cache_on_cookie"), Schema.Null]),
1866
+ ),
1867
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1868
+ }),
1869
+ Schema.Struct({
1870
+ id: Schema.optional(
1871
+ Schema.Union([Schema.Literal("cache_ttl_by_status"), Schema.Null]),
1872
+ ),
1873
+ value: Schema.optional(
1874
+ Schema.Union([Schema.Struct({}), Schema.Null]),
1875
+ ),
1876
+ }),
1877
+ Schema.Struct({
1878
+ id: Schema.optional(
1879
+ Schema.Union([Schema.Literal("disable_apps"), Schema.Null]),
1880
+ ),
1881
+ }),
1882
+ Schema.Struct({
1883
+ id: Schema.optional(
1884
+ Schema.Union([Schema.Literal("disable_performance"), Schema.Null]),
1885
+ ),
1886
+ }),
1887
+ Schema.Struct({
1888
+ id: Schema.optional(
1889
+ Schema.Union([Schema.Literal("disable_security"), Schema.Null]),
1890
+ ),
1891
+ }),
1892
+ Schema.Struct({
1893
+ id: Schema.optional(
1894
+ Schema.Union([Schema.Literal("disable_zaraz"), Schema.Null]),
1895
+ ),
1896
+ }),
1897
+ Schema.Struct({
1898
+ id: Schema.optional(
1899
+ Schema.Union([Schema.Literal("edge_cache_ttl"), Schema.Null]),
1900
+ ),
1901
+ value: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1902
+ }),
1903
+ Schema.Struct({
1904
+ id: Schema.optional(
1905
+ Schema.Union([
1906
+ Schema.Literal("explicit_cache_control"),
1907
+ Schema.Null,
1908
+ ]),
1909
+ ),
1910
+ value: Schema.optional(
1911
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
1912
+ ),
1913
+ }),
1914
+ Schema.Struct({
1915
+ id: Schema.optional(
1916
+ Schema.Union([Schema.Literal("forwarding_url"), Schema.Null]),
1917
+ ),
1918
+ value: Schema.optional(
1919
+ Schema.Union([
1920
+ Schema.Struct({
1921
+ statusCode: Schema.optional(
1922
+ Schema.Union([Schema.Literals(["301", "302"]), Schema.Null]),
1923
+ ),
1924
+ url: Schema.optional(
1925
+ Schema.Union([Schema.String, Schema.Null]),
1926
+ ),
1927
+ }).pipe(
1928
+ Schema.encodeKeys({ statusCode: "status_code", url: "url" }),
1929
+ ),
1930
+ Schema.Null,
1931
+ ]),
1932
+ ),
1933
+ }),
1934
+ Schema.Struct({
1935
+ id: Schema.optional(
1936
+ Schema.Union([Schema.Literal("host_header_override"), Schema.Null]),
1937
+ ),
1938
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1939
+ }),
1940
+ Schema.Struct({
1941
+ id: Schema.optional(
1942
+ Schema.Union([Schema.Literal("resolve_override"), Schema.Null]),
1943
+ ),
1944
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1945
+ }),
1946
+ Schema.Struct({
1947
+ id: Schema.optional(
1948
+ Schema.Union([Schema.Literal("respect_strong_etag"), Schema.Null]),
1949
+ ),
1950
+ value: Schema.optional(
1951
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
1952
+ ),
1953
+ }),
1954
+ ]),
1955
+ ),
1956
+ createdOn: Schema.String,
1957
+ modifiedOn: Schema.String,
1958
+ priority: Schema.Number,
1959
+ status: Schema.Literals(["active", "disabled"]),
1960
+ targets: Schema.Array(
1961
+ Schema.Struct({
1962
+ constraint: Schema.optional(
1963
+ Schema.Union([
1964
+ Schema.Struct({
1965
+ operator: Schema.Literals([
1966
+ "matches",
1967
+ "contains",
1968
+ "equals",
1969
+ "not_equal",
1970
+ "not_contain",
1971
+ ]),
1972
+ value: Schema.String,
1973
+ }),
1974
+ Schema.Null,
1975
+ ]),
1976
+ ),
1977
+ target: Schema.optional(
1978
+ Schema.Union([Schema.Literal("url"), Schema.Null]),
1979
+ ),
1980
+ }),
1981
+ ),
1982
+ },
1983
+ )
1984
+ .pipe(
1985
+ Schema.encodeKeys({
1986
+ id: "id",
1987
+ actions: "actions",
1988
+ createdOn: "created_on",
1989
+ modifiedOn: "modified_on",
1990
+ priority: "priority",
1991
+ status: "status",
1992
+ targets: "targets",
1993
+ }),
1994
+ )
1995
+ .pipe(
1996
+ T.ResponsePath("result"),
1997
+ ) as unknown as Schema.Schema<UpdatePageRuleResponse>;
1998
+
1999
+ export type UpdatePageRuleError = DefaultErrors;
2000
+
2001
+ export const updatePageRule: API.OperationMethod<
2002
+ UpdatePageRuleRequest,
2003
+ UpdatePageRuleResponse,
2004
+ UpdatePageRuleError,
2005
+ Credentials | HttpClient.HttpClient
2006
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2007
+ input: UpdatePageRuleRequest,
2008
+ output: UpdatePageRuleResponse,
2009
+ errors: [],
2010
+ }));
2011
+
2012
+ export interface PatchPageRuleRequest {
2013
+ pageruleId: string;
2014
+ /** Path param: Identifier. */
2015
+ zoneId: string;
2016
+ /** Body param: The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both. */
2017
+ actions?: (
2018
+ | unknown
2019
+ | { id?: "bypass_cache_on_cookie"; value?: string }
2020
+ | { id?: "cache_by_device_type"; value?: "on" | "off" }
2021
+ | { id?: "cache_deception_armor"; value?: "on" | "off" }
2022
+ | {
2023
+ id?: "cache_key_fields";
2024
+ value?: {
2025
+ cookie?: { checkPresence?: string[]; include?: string[] };
2026
+ header?: {
2027
+ checkPresence?: string[];
2028
+ exclude?: string[];
2029
+ include?: string[];
2030
+ };
2031
+ host?: { resolved?: boolean };
2032
+ queryString?: { exclude?: "*" | string[]; include?: "*" | string[] };
2033
+ user?: { deviceType?: boolean; geo?: boolean; lang?: boolean };
2034
+ };
2035
+ }
2036
+ | { id?: "cache_on_cookie"; value?: string }
2037
+ | { id?: "cache_ttl_by_status"; value?: Record<string, unknown> }
2038
+ | { id?: "disable_apps" }
2039
+ | { id?: "disable_performance" }
2040
+ | { id?: "disable_security" }
2041
+ | { id?: "disable_zaraz" }
2042
+ | { id?: "edge_cache_ttl"; value?: number }
2043
+ | { id?: "explicit_cache_control"; value?: "on" | "off" }
2044
+ | {
2045
+ id?: "forwarding_url";
2046
+ value?: { statusCode?: "301" | "302"; url?: string };
2047
+ }
2048
+ | { id?: "host_header_override"; value?: string }
2049
+ | { id?: "resolve_override"; value?: string }
2050
+ | { id?: "respect_strong_etag"; value?: "on" | "off" }
2051
+ )[];
2052
+ /** Body param: The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: `/i */
2053
+ priority?: number;
2054
+ /** Body param: The status of the Page Rule. */
2055
+ status?: "active" | "disabled";
2056
+ /** Body param: The rule targets to evaluate on each request. */
2057
+ targets?: {
2058
+ constraint?: {
2059
+ operator: "matches" | "contains" | "equals" | "not_equal" | "not_contain";
2060
+ value: string;
2061
+ };
2062
+ target?: "url";
2063
+ }[];
2064
+ }
2065
+
2066
+ export const PatchPageRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2067
+ pageruleId: Schema.String.pipe(T.HttpPath("pageruleId")),
2068
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2069
+ actions: Schema.optional(
2070
+ Schema.Array(
2071
+ Schema.Union([
2072
+ Schema.Unknown,
2073
+ Schema.Struct({
2074
+ id: Schema.optional(Schema.Literal("bypass_cache_on_cookie")),
2075
+ value: Schema.optional(Schema.String),
2076
+ }),
2077
+ Schema.Struct({
2078
+ id: Schema.optional(Schema.Literal("cache_by_device_type")),
2079
+ value: Schema.optional(Schema.Literals(["on", "off"])),
2080
+ }),
2081
+ Schema.Struct({
2082
+ id: Schema.optional(Schema.Literal("cache_deception_armor")),
2083
+ value: Schema.optional(Schema.Literals(["on", "off"])),
2084
+ }),
2085
+ Schema.Struct({
2086
+ id: Schema.optional(Schema.Literal("cache_key_fields")),
2087
+ value: Schema.optional(
2088
+ Schema.Struct({
2089
+ cookie: Schema.optional(
2090
+ Schema.Struct({
2091
+ checkPresence: Schema.optional(Schema.Array(Schema.String)),
2092
+ include: Schema.optional(Schema.Array(Schema.String)),
2093
+ }).pipe(
2094
+ Schema.encodeKeys({
2095
+ checkPresence: "check_presence",
2096
+ include: "include",
2097
+ }),
2098
+ ),
2099
+ ),
2100
+ header: Schema.optional(
2101
+ Schema.Struct({
2102
+ checkPresence: Schema.optional(Schema.Array(Schema.String)),
2103
+ exclude: Schema.optional(Schema.Array(Schema.String)),
2104
+ include: Schema.optional(Schema.Array(Schema.String)),
2105
+ }).pipe(
2106
+ Schema.encodeKeys({
2107
+ checkPresence: "check_presence",
2108
+ exclude: "exclude",
2109
+ include: "include",
2110
+ }),
2111
+ ),
2112
+ ),
2113
+ host: Schema.optional(
2114
+ Schema.Struct({
2115
+ resolved: Schema.optional(Schema.Boolean),
2116
+ }),
2117
+ ),
2118
+ queryString: Schema.optional(
2119
+ Schema.Struct({
2120
+ exclude: Schema.optional(
2121
+ Schema.Union([
2122
+ Schema.Literal("*"),
2123
+ Schema.Array(Schema.String),
2124
+ ]),
2125
+ ),
2126
+ include: Schema.optional(
2127
+ Schema.Union([
2128
+ Schema.Literal("*"),
2129
+ Schema.Array(Schema.String),
2130
+ ]),
2131
+ ),
2132
+ }),
2133
+ ),
2134
+ user: Schema.optional(
2135
+ Schema.Struct({
2136
+ deviceType: Schema.optional(Schema.Boolean),
2137
+ geo: Schema.optional(Schema.Boolean),
2138
+ lang: Schema.optional(Schema.Boolean),
2139
+ }).pipe(
2140
+ Schema.encodeKeys({
2141
+ deviceType: "device_type",
2142
+ geo: "geo",
2143
+ lang: "lang",
2144
+ }),
2145
+ ),
2146
+ ),
2147
+ }).pipe(
2148
+ Schema.encodeKeys({
2149
+ cookie: "cookie",
2150
+ header: "header",
2151
+ host: "host",
2152
+ queryString: "query_string",
2153
+ user: "user",
2154
+ }),
2155
+ ),
2156
+ ),
2157
+ }),
2158
+ Schema.Struct({
2159
+ id: Schema.optional(Schema.Literal("cache_on_cookie")),
2160
+ value: Schema.optional(Schema.String),
2161
+ }),
2162
+ Schema.Struct({
2163
+ id: Schema.optional(Schema.Literal("cache_ttl_by_status")),
2164
+ value: Schema.optional(Schema.Struct({})),
2165
+ }),
2166
+ Schema.Struct({
2167
+ id: Schema.optional(Schema.Literal("disable_apps")),
2168
+ }),
2169
+ Schema.Struct({
2170
+ id: Schema.optional(Schema.Literal("disable_performance")),
2171
+ }),
2172
+ Schema.Struct({
2173
+ id: Schema.optional(Schema.Literal("disable_security")),
2174
+ }),
2175
+ Schema.Struct({
2176
+ id: Schema.optional(Schema.Literal("disable_zaraz")),
2177
+ }),
2178
+ Schema.Struct({
2179
+ id: Schema.optional(Schema.Literal("edge_cache_ttl")),
2180
+ value: Schema.optional(Schema.Number),
2181
+ }),
2182
+ Schema.Struct({
2183
+ id: Schema.optional(Schema.Literal("explicit_cache_control")),
2184
+ value: Schema.optional(Schema.Literals(["on", "off"])),
2185
+ }),
2186
+ Schema.Struct({
2187
+ id: Schema.optional(Schema.Literal("forwarding_url")),
2188
+ value: Schema.optional(
2189
+ Schema.Struct({
2190
+ statusCode: Schema.optional(Schema.Literals(["301", "302"])),
2191
+ url: Schema.optional(Schema.String),
2192
+ }).pipe(
2193
+ Schema.encodeKeys({ statusCode: "status_code", url: "url" }),
2194
+ ),
2195
+ ),
2196
+ }),
2197
+ Schema.Struct({
2198
+ id: Schema.optional(Schema.Literal("host_header_override")),
2199
+ value: Schema.optional(Schema.String),
2200
+ }),
2201
+ Schema.Struct({
2202
+ id: Schema.optional(Schema.Literal("resolve_override")),
2203
+ value: Schema.optional(Schema.String),
2204
+ }),
2205
+ Schema.Struct({
2206
+ id: Schema.optional(Schema.Literal("respect_strong_etag")),
2207
+ value: Schema.optional(Schema.Literals(["on", "off"])),
2208
+ }),
2209
+ ]),
2210
+ ),
2211
+ ),
2212
+ priority: Schema.optional(Schema.Number),
2213
+ status: Schema.optional(Schema.Literals(["active", "disabled"])),
2214
+ targets: Schema.optional(
2215
+ Schema.Array(
2216
+ Schema.Struct({
2217
+ constraint: Schema.optional(
2218
+ Schema.Struct({
2219
+ operator: Schema.Literals([
2220
+ "matches",
2221
+ "contains",
2222
+ "equals",
2223
+ "not_equal",
2224
+ "not_contain",
2225
+ ]),
2226
+ value: Schema.String,
2227
+ }),
2228
+ ),
2229
+ target: Schema.optional(Schema.Literal("url")),
2230
+ }),
2231
+ ),
2232
+ ),
2233
+ }).pipe(
2234
+ T.Http({ method: "PATCH", path: "/zones/{zone_id}/pagerules/{pageruleId}" }),
2235
+ ) as unknown as Schema.Schema<PatchPageRuleRequest>;
2236
+
2237
+ export interface PatchPageRuleResponse {
2238
+ /** Identifier. */
2239
+ id: string;
2240
+ /** The set of actions to perform if the targets of this rule match the request. Actions can redirect to another URL or override settings, but not both. */
2241
+ actions: (
2242
+ | unknown
2243
+ | { id?: "bypass_cache_on_cookie" | null; value?: string | null }
2244
+ | { id?: "cache_by_device_type" | null; value?: "on" | "off" | null }
2245
+ | { id?: "cache_deception_armor" | null; value?: "on" | "off" | null }
2246
+ | {
2247
+ id?: "cache_key_fields" | null;
2248
+ value?: {
2249
+ cookie?: {
2250
+ checkPresence?: string[] | null;
2251
+ include?: string[] | null;
2252
+ } | null;
2253
+ header?: {
2254
+ checkPresence?: string[] | null;
2255
+ exclude?: string[] | null;
2256
+ include?: string[] | null;
2257
+ } | null;
2258
+ host?: { resolved?: boolean | null } | null;
2259
+ queryString?: {
2260
+ exclude?: "*" | string[] | null;
2261
+ include?: "*" | string[] | null;
2262
+ } | null;
2263
+ user?: {
2264
+ deviceType?: boolean | null;
2265
+ geo?: boolean | null;
2266
+ lang?: boolean | null;
2267
+ } | null;
2268
+ } | null;
2269
+ }
2270
+ | { id?: "cache_on_cookie" | null; value?: string | null }
2271
+ | {
2272
+ id?: "cache_ttl_by_status" | null;
2273
+ value?: Record<string, unknown> | null;
2274
+ }
2275
+ | { id?: "disable_apps" | null }
2276
+ | { id?: "disable_performance" | null }
2277
+ | { id?: "disable_security" | null }
2278
+ | { id?: "disable_zaraz" | null }
2279
+ | { id?: "edge_cache_ttl" | null; value?: number | null }
2280
+ | { id?: "explicit_cache_control" | null; value?: "on" | "off" | null }
2281
+ | {
2282
+ id?: "forwarding_url" | null;
2283
+ value?: {
2284
+ statusCode?: "301" | "302" | null;
2285
+ url?: string | null;
2286
+ } | null;
2287
+ }
2288
+ | { id?: "host_header_override" | null; value?: string | null }
2289
+ | { id?: "resolve_override" | null; value?: string | null }
2290
+ | { id?: "respect_strong_etag" | null; value?: "on" | "off" | null }
2291
+ )[];
2292
+ /** The timestamp of when the Page Rule was created. */
2293
+ createdOn: string;
2294
+ /** The timestamp of when the Page Rule was last modified. */
2295
+ modifiedOn: string;
2296
+ /** The priority of the rule, used to define which Page Rule is processed over another. A higher number indicates a higher priority. For example, if you have a catch-all Page Rule (rule A: `/images/ `) bu */
2297
+ priority: number;
2298
+ /** The status of the Page Rule. */
2299
+ status: "active" | "disabled";
2300
+ /** The rule targets to evaluate on each request. */
2301
+ targets: {
2302
+ constraint?: {
2303
+ operator: "matches" | "contains" | "equals" | "not_equal" | "not_contain";
2304
+ value: string;
2305
+ } | null;
2306
+ target?: "url" | null;
2307
+ }[];
2308
+ }
2309
+
2310
+ export const PatchPageRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2311
+ id: Schema.String,
2312
+ actions: Schema.Array(
2313
+ Schema.Union([
2314
+ Schema.Unknown,
2315
+ Schema.Struct({
2316
+ id: Schema.optional(
2317
+ Schema.Union([Schema.Literal("bypass_cache_on_cookie"), Schema.Null]),
2318
+ ),
2319
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2320
+ }),
2321
+ Schema.Struct({
2322
+ id: Schema.optional(
2323
+ Schema.Union([Schema.Literal("cache_by_device_type"), Schema.Null]),
2324
+ ),
2325
+ value: Schema.optional(
2326
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
2327
+ ),
2328
+ }),
2329
+ Schema.Struct({
2330
+ id: Schema.optional(
2331
+ Schema.Union([Schema.Literal("cache_deception_armor"), Schema.Null]),
2332
+ ),
2333
+ value: Schema.optional(
2334
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
2335
+ ),
2336
+ }),
2337
+ Schema.Struct({
2338
+ id: Schema.optional(
2339
+ Schema.Union([Schema.Literal("cache_key_fields"), Schema.Null]),
2340
+ ),
2341
+ value: Schema.optional(
2342
+ Schema.Union([
2343
+ Schema.Struct({
2344
+ cookie: Schema.optional(
2345
+ Schema.Union([
2346
+ Schema.Struct({
2347
+ checkPresence: Schema.optional(
2348
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2349
+ ),
2350
+ include: Schema.optional(
2351
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2352
+ ),
2353
+ }).pipe(
2354
+ Schema.encodeKeys({
2355
+ checkPresence: "check_presence",
2356
+ include: "include",
2357
+ }),
2358
+ ),
2359
+ Schema.Null,
2360
+ ]),
2361
+ ),
2362
+ header: Schema.optional(
2363
+ Schema.Union([
2364
+ Schema.Struct({
2365
+ checkPresence: Schema.optional(
2366
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2367
+ ),
2368
+ exclude: Schema.optional(
2369
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2370
+ ),
2371
+ include: Schema.optional(
2372
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2373
+ ),
2374
+ }).pipe(
2375
+ Schema.encodeKeys({
2376
+ checkPresence: "check_presence",
2377
+ exclude: "exclude",
2378
+ include: "include",
2379
+ }),
2380
+ ),
2381
+ Schema.Null,
2382
+ ]),
2383
+ ),
2384
+ host: Schema.optional(
2385
+ Schema.Union([
2386
+ Schema.Struct({
2387
+ resolved: Schema.optional(
2388
+ Schema.Union([Schema.Boolean, Schema.Null]),
2389
+ ),
2390
+ }),
2391
+ Schema.Null,
2392
+ ]),
2393
+ ),
2394
+ queryString: Schema.optional(
2395
+ Schema.Union([
2396
+ Schema.Struct({
2397
+ exclude: Schema.optional(
2398
+ Schema.Union([
2399
+ Schema.Union([
2400
+ Schema.Literal("*"),
2401
+ Schema.Array(Schema.String),
2402
+ ]),
2403
+ Schema.Null,
2404
+ ]),
2405
+ ),
2406
+ include: Schema.optional(
2407
+ Schema.Union([
2408
+ Schema.Union([
2409
+ Schema.Literal("*"),
2410
+ Schema.Array(Schema.String),
2411
+ ]),
2412
+ Schema.Null,
2413
+ ]),
2414
+ ),
2415
+ }),
2416
+ Schema.Null,
2417
+ ]),
2418
+ ),
2419
+ user: Schema.optional(
2420
+ Schema.Union([
2421
+ Schema.Struct({
2422
+ deviceType: Schema.optional(
2423
+ Schema.Union([Schema.Boolean, Schema.Null]),
2424
+ ),
2425
+ geo: Schema.optional(
2426
+ Schema.Union([Schema.Boolean, Schema.Null]),
2427
+ ),
2428
+ lang: Schema.optional(
2429
+ Schema.Union([Schema.Boolean, Schema.Null]),
2430
+ ),
2431
+ }).pipe(
2432
+ Schema.encodeKeys({
2433
+ deviceType: "device_type",
2434
+ geo: "geo",
2435
+ lang: "lang",
2436
+ }),
2437
+ ),
2438
+ Schema.Null,
2439
+ ]),
2440
+ ),
2441
+ }).pipe(
2442
+ Schema.encodeKeys({
2443
+ cookie: "cookie",
2444
+ header: "header",
2445
+ host: "host",
2446
+ queryString: "query_string",
2447
+ user: "user",
2448
+ }),
2449
+ ),
2450
+ Schema.Null,
2451
+ ]),
2452
+ ),
2453
+ }),
2454
+ Schema.Struct({
2455
+ id: Schema.optional(
2456
+ Schema.Union([Schema.Literal("cache_on_cookie"), Schema.Null]),
2457
+ ),
2458
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2459
+ }),
2460
+ Schema.Struct({
2461
+ id: Schema.optional(
2462
+ Schema.Union([Schema.Literal("cache_ttl_by_status"), Schema.Null]),
2463
+ ),
2464
+ value: Schema.optional(Schema.Union([Schema.Struct({}), Schema.Null])),
2465
+ }),
2466
+ Schema.Struct({
2467
+ id: Schema.optional(
2468
+ Schema.Union([Schema.Literal("disable_apps"), Schema.Null]),
2469
+ ),
2470
+ }),
2471
+ Schema.Struct({
2472
+ id: Schema.optional(
2473
+ Schema.Union([Schema.Literal("disable_performance"), Schema.Null]),
2474
+ ),
2475
+ }),
2476
+ Schema.Struct({
2477
+ id: Schema.optional(
2478
+ Schema.Union([Schema.Literal("disable_security"), Schema.Null]),
2479
+ ),
2480
+ }),
2481
+ Schema.Struct({
2482
+ id: Schema.optional(
2483
+ Schema.Union([Schema.Literal("disable_zaraz"), Schema.Null]),
2484
+ ),
2485
+ }),
2486
+ Schema.Struct({
2487
+ id: Schema.optional(
2488
+ Schema.Union([Schema.Literal("edge_cache_ttl"), Schema.Null]),
2489
+ ),
2490
+ value: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2491
+ }),
2492
+ Schema.Struct({
2493
+ id: Schema.optional(
2494
+ Schema.Union([Schema.Literal("explicit_cache_control"), Schema.Null]),
2495
+ ),
2496
+ value: Schema.optional(
2497
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
2498
+ ),
2499
+ }),
2500
+ Schema.Struct({
2501
+ id: Schema.optional(
2502
+ Schema.Union([Schema.Literal("forwarding_url"), Schema.Null]),
2503
+ ),
2504
+ value: Schema.optional(
2505
+ Schema.Union([
2506
+ Schema.Struct({
2507
+ statusCode: Schema.optional(
2508
+ Schema.Union([Schema.Literals(["301", "302"]), Schema.Null]),
2509
+ ),
2510
+ url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2511
+ }).pipe(
2512
+ Schema.encodeKeys({ statusCode: "status_code", url: "url" }),
2513
+ ),
2514
+ Schema.Null,
2515
+ ]),
2516
+ ),
2517
+ }),
2518
+ Schema.Struct({
2519
+ id: Schema.optional(
2520
+ Schema.Union([Schema.Literal("host_header_override"), Schema.Null]),
2521
+ ),
2522
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2523
+ }),
2524
+ Schema.Struct({
2525
+ id: Schema.optional(
2526
+ Schema.Union([Schema.Literal("resolve_override"), Schema.Null]),
2527
+ ),
2528
+ value: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2529
+ }),
2530
+ Schema.Struct({
2531
+ id: Schema.optional(
2532
+ Schema.Union([Schema.Literal("respect_strong_etag"), Schema.Null]),
2533
+ ),
2534
+ value: Schema.optional(
2535
+ Schema.Union([Schema.Literals(["on", "off"]), Schema.Null]),
2536
+ ),
2537
+ }),
2538
+ ]),
2539
+ ),
2540
+ createdOn: Schema.String,
2541
+ modifiedOn: Schema.String,
2542
+ priority: Schema.Number,
2543
+ status: Schema.Literals(["active", "disabled"]),
2544
+ targets: Schema.Array(
2545
+ Schema.Struct({
2546
+ constraint: Schema.optional(
2547
+ Schema.Union([
2548
+ Schema.Struct({
2549
+ operator: Schema.Literals([
2550
+ "matches",
2551
+ "contains",
2552
+ "equals",
2553
+ "not_equal",
2554
+ "not_contain",
2555
+ ]),
2556
+ value: Schema.String,
2557
+ }),
2558
+ Schema.Null,
2559
+ ]),
2560
+ ),
2561
+ target: Schema.optional(
2562
+ Schema.Union([Schema.Literal("url"), Schema.Null]),
2563
+ ),
2564
+ }),
2565
+ ),
2566
+ })
2567
+ .pipe(
2568
+ Schema.encodeKeys({
2569
+ id: "id",
2570
+ actions: "actions",
2571
+ createdOn: "created_on",
2572
+ modifiedOn: "modified_on",
2573
+ priority: "priority",
2574
+ status: "status",
2575
+ targets: "targets",
2576
+ }),
2577
+ )
2578
+ .pipe(
2579
+ T.ResponsePath("result"),
2580
+ ) as unknown as Schema.Schema<PatchPageRuleResponse>;
2581
+
2582
+ export type PatchPageRuleError = DefaultErrors;
2583
+
2584
+ export const patchPageRule: API.OperationMethod<
2585
+ PatchPageRuleRequest,
2586
+ PatchPageRuleResponse,
2587
+ PatchPageRuleError,
2588
+ Credentials | HttpClient.HttpClient
2589
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2590
+ input: PatchPageRuleRequest,
2591
+ output: PatchPageRuleResponse,
2592
+ errors: [],
2593
+ }));
2594
+
2595
+ export interface DeletePageRuleRequest {
2596
+ pageruleId: string;
2597
+ /** Identifier. */
2598
+ zoneId: string;
2599
+ }
2600
+
2601
+ export const DeletePageRuleRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2602
+ pageruleId: Schema.String.pipe(T.HttpPath("pageruleId")),
2603
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2604
+ }).pipe(
2605
+ T.Http({ method: "DELETE", path: "/zones/{zone_id}/pagerules/{pageruleId}" }),
2606
+ ) as unknown as Schema.Schema<DeletePageRuleRequest>;
2607
+
2608
+ export interface DeletePageRuleResponse {
2609
+ /** Identifier. */
2610
+ id: string;
2611
+ }
2612
+
2613
+ export const DeletePageRuleResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
2614
+ {
2615
+ id: Schema.String,
2616
+ },
2617
+ ).pipe(
2618
+ T.ResponsePath("result"),
2619
+ ) as unknown as Schema.Schema<DeletePageRuleResponse>;
2620
+
2621
+ export type DeletePageRuleError = DefaultErrors;
2622
+
2623
+ export const deletePageRule: API.OperationMethod<
2624
+ DeletePageRuleRequest,
2625
+ DeletePageRuleResponse,
2626
+ DeletePageRuleError,
2627
+ Credentials | HttpClient.HttpClient
2628
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2629
+ input: DeletePageRuleRequest,
2630
+ output: DeletePageRuleResponse,
2631
+ errors: [],
2632
+ }));