@distilled.cloud/cloudflare 0.0.0 → 0.2.3

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