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