@distilled.cloud/cloudflare 0.6.1 → 0.7.1

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 (261) hide show
  1. package/lib/services/accounts.d.ts +901 -36
  2. package/lib/services/accounts.d.ts.map +1 -1
  3. package/lib/services/accounts.js +1386 -32
  4. package/lib/services/accounts.js.map +1 -1
  5. package/lib/services/addressing.d.ts +8 -2
  6. package/lib/services/addressing.d.ts.map +1 -1
  7. package/lib/services/addressing.js +14 -2
  8. package/lib/services/addressing.js.map +1 -1
  9. package/lib/services/ai-gateway.d.ts.map +1 -1
  10. package/lib/services/ai-gateway.js +7 -7
  11. package/lib/services/ai-gateway.js.map +1 -1
  12. package/lib/services/aisearch.d.ts.map +1 -1
  13. package/lib/services/aisearch.js +24 -9
  14. package/lib/services/aisearch.js.map +1 -1
  15. package/lib/services/alerting.js +2 -2
  16. package/lib/services/alerting.js.map +1 -1
  17. package/lib/services/api-gateway.d.ts +114 -16
  18. package/lib/services/api-gateway.d.ts.map +1 -1
  19. package/lib/services/api-gateway.js +187 -15
  20. package/lib/services/api-gateway.js.map +1 -1
  21. package/lib/services/audit-logs.d.ts +63 -3
  22. package/lib/services/audit-logs.d.ts.map +1 -1
  23. package/lib/services/audit-logs.js +62 -3
  24. package/lib/services/audit-logs.js.map +1 -1
  25. package/lib/services/bot-management.d.ts +54 -8
  26. package/lib/services/bot-management.d.ts.map +1 -1
  27. package/lib/services/bot-management.js +128 -16
  28. package/lib/services/bot-management.js.map +1 -1
  29. package/lib/services/brand-protection.d.ts.map +1 -1
  30. package/lib/services/brand-protection.js +26 -8
  31. package/lib/services/brand-protection.js.map +1 -1
  32. package/lib/services/browser-rendering.d.ts.map +1 -1
  33. package/lib/services/browser-rendering.js +13 -10
  34. package/lib/services/browser-rendering.js.map +1 -1
  35. package/lib/services/cloudforce-one.d.ts +61 -6
  36. package/lib/services/cloudforce-one.d.ts.map +1 -1
  37. package/lib/services/cloudforce-one.js +107 -6
  38. package/lib/services/cloudforce-one.js.map +1 -1
  39. package/lib/services/custom-certificates.d.ts +145 -8
  40. package/lib/services/custom-certificates.d.ts.map +1 -1
  41. package/lib/services/custom-certificates.js +226 -7
  42. package/lib/services/custom-certificates.js.map +1 -1
  43. package/lib/services/custom-hostnames.d.ts +8 -8
  44. package/lib/services/custom-hostnames.d.ts.map +1 -1
  45. package/lib/services/custom-hostnames.js +17 -14
  46. package/lib/services/custom-hostnames.js.map +1 -1
  47. package/lib/services/d1.d.ts +68 -8
  48. package/lib/services/d1.d.ts.map +1 -1
  49. package/lib/services/d1.js +96 -8
  50. package/lib/services/d1.js.map +1 -1
  51. package/lib/services/dns-firewall.d.ts +57 -4
  52. package/lib/services/dns-firewall.d.ts.map +1 -1
  53. package/lib/services/dns-firewall.js +86 -5
  54. package/lib/services/dns-firewall.js.map +1 -1
  55. package/lib/services/dns.d.ts +85 -745
  56. package/lib/services/dns.d.ts.map +1 -1
  57. package/lib/services/dns.js +118 -1424
  58. package/lib/services/dns.js.map +1 -1
  59. package/lib/services/email-routing.d.ts +59 -7
  60. package/lib/services/email-routing.d.ts.map +1 -1
  61. package/lib/services/email-routing.js +165 -7
  62. package/lib/services/email-routing.js.map +1 -1
  63. package/lib/services/firewall.d.ts +228 -39
  64. package/lib/services/firewall.d.ts.map +1 -1
  65. package/lib/services/firewall.js +220 -33
  66. package/lib/services/firewall.js.map +1 -1
  67. package/lib/services/healthchecks.d.ts +112 -6
  68. package/lib/services/healthchecks.d.ts.map +1 -1
  69. package/lib/services/healthchecks.js +248 -14
  70. package/lib/services/healthchecks.js.map +1 -1
  71. package/lib/services/hostnames.d.ts +5 -5
  72. package/lib/services/hostnames.d.ts.map +1 -1
  73. package/lib/services/hostnames.js +16 -4
  74. package/lib/services/hostnames.js.map +1 -1
  75. package/lib/services/hyperdrive.d.ts +223 -11
  76. package/lib/services/hyperdrive.d.ts.map +1 -1
  77. package/lib/services/hyperdrive.js +351 -11
  78. package/lib/services/hyperdrive.js.map +1 -1
  79. package/lib/services/iam.d.ts +62 -2
  80. package/lib/services/iam.d.ts.map +1 -1
  81. package/lib/services/iam.js +82 -11
  82. package/lib/services/iam.js.map +1 -1
  83. package/lib/services/images.d.ts +9 -1
  84. package/lib/services/images.d.ts.map +1 -1
  85. package/lib/services/images.js +12 -1
  86. package/lib/services/images.js.map +1 -1
  87. package/lib/services/intel.d.ts +4 -4
  88. package/lib/services/intel.d.ts.map +1 -1
  89. package/lib/services/intel.js +2 -3
  90. package/lib/services/intel.js.map +1 -1
  91. package/lib/services/kv.d.ts.map +1 -1
  92. package/lib/services/kv.js +2 -2
  93. package/lib/services/kv.js.map +1 -1
  94. package/lib/services/load-balancers.d.ts +537 -108
  95. package/lib/services/load-balancers.d.ts.map +1 -1
  96. package/lib/services/load-balancers.js +1266 -161
  97. package/lib/services/load-balancers.js.map +1 -1
  98. package/lib/services/logpush.d.ts +153 -9
  99. package/lib/services/logpush.d.ts.map +1 -1
  100. package/lib/services/logpush.js +246 -9
  101. package/lib/services/logpush.js.map +1 -1
  102. package/lib/services/magic-cloud-networking.d.ts.map +1 -1
  103. package/lib/services/magic-cloud-networking.js +54 -30
  104. package/lib/services/magic-cloud-networking.js.map +1 -1
  105. package/lib/services/magic-network-monitoring.d.ts +46 -5
  106. package/lib/services/magic-network-monitoring.d.ts.map +1 -1
  107. package/lib/services/magic-network-monitoring.js +79 -5
  108. package/lib/services/magic-network-monitoring.js.map +1 -1
  109. package/lib/services/magic-transit.d.ts +127 -21
  110. package/lib/services/magic-transit.d.ts.map +1 -1
  111. package/lib/services/magic-transit.js +291 -29
  112. package/lib/services/magic-transit.js.map +1 -1
  113. package/lib/services/memberships.d.ts +248 -52
  114. package/lib/services/memberships.d.ts.map +1 -1
  115. package/lib/services/memberships.js +360 -39
  116. package/lib/services/memberships.js.map +1 -1
  117. package/lib/services/page-rules.d.ts +432 -8
  118. package/lib/services/page-rules.d.ts.map +1 -1
  119. package/lib/services/page-rules.js +877 -33
  120. package/lib/services/page-rules.js.map +1 -1
  121. package/lib/services/pages.d.ts +457 -297
  122. package/lib/services/pages.d.ts.map +1 -1
  123. package/lib/services/pages.js +1366 -491
  124. package/lib/services/pages.js.map +1 -1
  125. package/lib/services/pipelines.d.ts +96 -76
  126. package/lib/services/pipelines.d.ts.map +1 -1
  127. package/lib/services/pipelines.js +145 -197
  128. package/lib/services/pipelines.js.map +1 -1
  129. package/lib/services/queues.d.ts +228 -12
  130. package/lib/services/queues.d.ts.map +1 -1
  131. package/lib/services/queues.js +487 -11
  132. package/lib/services/queues.js.map +1 -1
  133. package/lib/services/radar.d.ts +82 -18
  134. package/lib/services/radar.d.ts.map +1 -1
  135. package/lib/services/radar.js +111 -47
  136. package/lib/services/radar.js.map +1 -1
  137. package/lib/services/realtime-kit.d.ts +650 -334
  138. package/lib/services/realtime-kit.d.ts.map +1 -1
  139. package/lib/services/realtime-kit.js +1472 -693
  140. package/lib/services/realtime-kit.js.map +1 -1
  141. package/lib/services/request-tracers.d.ts +12 -1
  142. package/lib/services/request-tracers.d.ts.map +1 -1
  143. package/lib/services/request-tracers.js +28 -3
  144. package/lib/services/request-tracers.js.map +1 -1
  145. package/lib/services/rules.d.ts +65 -10
  146. package/lib/services/rules.d.ts.map +1 -1
  147. package/lib/services/rules.js +102 -8
  148. package/lib/services/rules.js.map +1 -1
  149. package/lib/services/rulesets.d.ts +7892 -1806
  150. package/lib/services/rulesets.d.ts.map +1 -1
  151. package/lib/services/rulesets.js +18720 -4149
  152. package/lib/services/rulesets.js.map +1 -1
  153. package/lib/services/rum.d.ts +45 -5
  154. package/lib/services/rum.d.ts.map +1 -1
  155. package/lib/services/rum.js +80 -4
  156. package/lib/services/rum.js.map +1 -1
  157. package/lib/services/schema-validation.js +2 -2
  158. package/lib/services/schema-validation.js.map +1 -1
  159. package/lib/services/spectrum.d.ts +139 -33
  160. package/lib/services/spectrum.d.ts.map +1 -1
  161. package/lib/services/spectrum.js +190 -34
  162. package/lib/services/spectrum.js.map +1 -1
  163. package/lib/services/speed.d.ts +345 -24
  164. package/lib/services/speed.d.ts.map +1 -1
  165. package/lib/services/speed.js +785 -19
  166. package/lib/services/speed.js.map +1 -1
  167. package/lib/services/ssl.d.ts +6 -6
  168. package/lib/services/ssl.d.ts.map +1 -1
  169. package/lib/services/ssl.js +5 -5
  170. package/lib/services/ssl.js.map +1 -1
  171. package/lib/services/stream.d.ts +171 -17
  172. package/lib/services/stream.d.ts.map +1 -1
  173. package/lib/services/stream.js +164 -11
  174. package/lib/services/stream.js.map +1 -1
  175. package/lib/services/token-validation.d.ts +16 -2
  176. package/lib/services/token-validation.d.ts.map +1 -1
  177. package/lib/services/token-validation.js +32 -2
  178. package/lib/services/token-validation.js.map +1 -1
  179. package/lib/services/url-scanner.d.ts +43 -11
  180. package/lib/services/url-scanner.d.ts.map +1 -1
  181. package/lib/services/url-scanner.js +46 -11
  182. package/lib/services/url-scanner.js.map +1 -1
  183. package/lib/services/user.d.ts +312 -21
  184. package/lib/services/user.d.ts.map +1 -1
  185. package/lib/services/user.js +442 -19
  186. package/lib/services/user.js.map +1 -1
  187. package/lib/services/workers-for-platforms.d.ts +223 -13
  188. package/lib/services/workers-for-platforms.d.ts.map +1 -1
  189. package/lib/services/workers-for-platforms.js +481 -13
  190. package/lib/services/workers-for-platforms.js.map +1 -1
  191. package/lib/services/workers.d.ts +345 -31
  192. package/lib/services/workers.d.ts.map +1 -1
  193. package/lib/services/workers.js +649 -34
  194. package/lib/services/workers.js.map +1 -1
  195. package/lib/services/zaraz.d.ts +212 -11
  196. package/lib/services/zaraz.d.ts.map +1 -1
  197. package/lib/services/zaraz.js +311 -30
  198. package/lib/services/zaraz.js.map +1 -1
  199. package/lib/services/zero-trust.d.ts +19333 -1905
  200. package/lib/services/zero-trust.d.ts.map +1 -1
  201. package/lib/services/zero-trust.js +30269 -5710
  202. package/lib/services/zero-trust.js.map +1 -1
  203. package/lib/services/zones.d.ts +61 -7
  204. package/lib/services/zones.d.ts.map +1 -1
  205. package/lib/services/zones.js +188 -7
  206. package/lib/services/zones.js.map +1 -1
  207. package/package.json +2 -2
  208. package/src/services/accounts.ts +2897 -63
  209. package/src/services/addressing.ts +28 -4
  210. package/src/services/ai-gateway.ts +9 -7
  211. package/src/services/aisearch.ts +28 -9
  212. package/src/services/alerting.ts +2 -2
  213. package/src/services/api-gateway.ts +410 -27
  214. package/src/services/audit-logs.ts +135 -5
  215. package/src/services/bot-management.ts +282 -24
  216. package/src/services/brand-protection.ts +28 -8
  217. package/src/services/browser-rendering.ts +31 -11
  218. package/src/services/cloudforce-one.ts +201 -9
  219. package/src/services/custom-certificates.ts +405 -14
  220. package/src/services/custom-hostnames.ts +29 -22
  221. package/src/services/d1.ts +180 -12
  222. package/src/services/dns-firewall.ts +163 -7
  223. package/src/services/dns.ts +213 -2389
  224. package/src/services/email-routing.ts +346 -12
  225. package/src/services/firewall.ts +556 -72
  226. package/src/services/healthchecks.ts +463 -18
  227. package/src/services/hostnames.ts +21 -9
  228. package/src/services/hyperdrive.ts +730 -17
  229. package/src/services/iam.ts +228 -24
  230. package/src/services/images.ts +29 -2
  231. package/src/services/intel.ts +6 -5
  232. package/src/services/kv.ts +6 -2
  233. package/src/services/load-balancers.ts +2387 -294
  234. package/src/services/logpush.ts +659 -15
  235. package/src/services/magic-cloud-networking.ts +74 -30
  236. package/src/services/magic-network-monitoring.ts +170 -8
  237. package/src/services/magic-transit.ts +631 -62
  238. package/src/services/memberships.ts +710 -91
  239. package/src/services/page-rules.ts +1592 -88
  240. package/src/services/pages.ts +2011 -1098
  241. package/src/services/pipelines.ts +285 -331
  242. package/src/services/queues.ts +1110 -22
  243. package/src/services/radar.ts +128 -64
  244. package/src/services/realtime-kit.ts +2829 -1603
  245. package/src/services/request-tracers.ts +54 -4
  246. package/src/services/rules.ts +214 -18
  247. package/src/services/rulesets.ts +34524 -6913
  248. package/src/services/rum.ts +187 -9
  249. package/src/services/schema-validation.ts +2 -2
  250. package/src/services/spectrum.ts +357 -67
  251. package/src/services/speed.ts +1845 -42
  252. package/src/services/ssl.ts +11 -11
  253. package/src/services/stream.ts +397 -22
  254. package/src/services/token-validation.ts +64 -4
  255. package/src/services/url-scanner.ts +92 -20
  256. package/src/services/user.ts +973 -34
  257. package/src/services/workers-for-platforms.ts +1012 -39
  258. package/src/services/workers.ts +1472 -120
  259. package/src/services/zaraz.ts +640 -37
  260. package/src/services/zero-trust.ts +55498 -12667
  261. package/src/services/zones.ts +360 -14
@@ -151,7 +151,10 @@ export const GetHealthcheckResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
151
151
  Schema.Union([Schema.Boolean, Schema.Null]),
152
152
  ),
153
153
  header: Schema.optional(
154
- Schema.Union([Schema.Struct({}), Schema.Null]),
154
+ Schema.Union([
155
+ Schema.Record(Schema.String, Schema.Unknown),
156
+ Schema.Null,
157
+ ]),
155
158
  ),
156
159
  method: Schema.optional(
157
160
  Schema.Union([Schema.Literals(["GET", "HEAD"]), Schema.Null]),
@@ -369,7 +372,10 @@ export const ListHealthchecksResponse =
369
372
  Schema.Union([Schema.Boolean, Schema.Null]),
370
373
  ),
371
374
  header: Schema.optional(
372
- Schema.Union([Schema.Struct({}), Schema.Null]),
375
+ Schema.Union([
376
+ Schema.Record(Schema.String, Schema.Unknown),
377
+ Schema.Null,
378
+ ]),
373
379
  ),
374
380
  method: Schema.optional(
375
381
  Schema.Union([Schema.Literals(["GET", "HEAD"]), Schema.Null]),
@@ -637,7 +643,10 @@ export const CreateHealthcheckRequest =
637
643
  ),
638
644
  followRedirects: Schema.optional(Schema.Boolean),
639
645
  header: Schema.optional(
640
- Schema.Union([Schema.Struct({}), Schema.Null]),
646
+ Schema.Union([
647
+ Schema.Record(Schema.String, Schema.Unknown),
648
+ Schema.Null,
649
+ ]),
641
650
  ),
642
651
  method: Schema.optional(Schema.Literals(["GET", "HEAD"])),
643
652
  path: Schema.optional(Schema.String),
@@ -808,7 +817,10 @@ export const CreateHealthcheckResponse =
808
817
  Schema.Union([Schema.Boolean, Schema.Null]),
809
818
  ),
810
819
  header: Schema.optional(
811
- Schema.Union([Schema.Struct({}), Schema.Null]),
820
+ Schema.Union([
821
+ Schema.Record(Schema.String, Schema.Unknown),
822
+ Schema.Null,
823
+ ]),
812
824
  ),
813
825
  method: Schema.optional(
814
826
  Schema.Union([Schema.Literals(["GET", "HEAD"]), Schema.Null]),
@@ -997,7 +1009,10 @@ export const UpdateHealthcheckRequest =
997
1009
  ),
998
1010
  followRedirects: Schema.optional(Schema.Boolean),
999
1011
  header: Schema.optional(
1000
- Schema.Union([Schema.Struct({}), Schema.Null]),
1012
+ Schema.Union([
1013
+ Schema.Record(Schema.String, Schema.Unknown),
1014
+ Schema.Null,
1015
+ ]),
1001
1016
  ),
1002
1017
  method: Schema.optional(Schema.Literals(["GET", "HEAD"])),
1003
1018
  path: Schema.optional(Schema.String),
@@ -1171,7 +1186,10 @@ export const UpdateHealthcheckResponse =
1171
1186
  Schema.Union([Schema.Boolean, Schema.Null]),
1172
1187
  ),
1173
1188
  header: Schema.optional(
1174
- Schema.Union([Schema.Struct({}), Schema.Null]),
1189
+ Schema.Union([
1190
+ Schema.Record(Schema.String, Schema.Unknown),
1191
+ Schema.Null,
1192
+ ]),
1175
1193
  ),
1176
1194
  method: Schema.optional(
1177
1195
  Schema.Union([Schema.Literals(["GET", "HEAD"]), Schema.Null]),
@@ -1360,7 +1378,10 @@ export const PatchHealthcheckRequest =
1360
1378
  ),
1361
1379
  followRedirects: Schema.optional(Schema.Boolean),
1362
1380
  header: Schema.optional(
1363
- Schema.Union([Schema.Struct({}), Schema.Null]),
1381
+ Schema.Union([
1382
+ Schema.Record(Schema.String, Schema.Unknown),
1383
+ Schema.Null,
1384
+ ]),
1364
1385
  ),
1365
1386
  method: Schema.optional(Schema.Literals(["GET", "HEAD"])),
1366
1387
  path: Schema.optional(Schema.String),
@@ -1534,7 +1555,10 @@ export const PatchHealthcheckResponse =
1534
1555
  Schema.Union([Schema.Boolean, Schema.Null]),
1535
1556
  ),
1536
1557
  header: Schema.optional(
1537
- Schema.Union([Schema.Struct({}), Schema.Null]),
1558
+ Schema.Union([
1559
+ Schema.Record(Schema.String, Schema.Unknown),
1560
+ Schema.Null,
1561
+ ]),
1538
1562
  ),
1539
1563
  method: Schema.optional(
1540
1564
  Schema.Union([Schema.Literals(["GET", "HEAD"]), Schema.Null]),
@@ -1685,10 +1709,196 @@ export const GetPreviewRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1685
1709
  }),
1686
1710
  ) as unknown as Schema.Schema<GetPreviewRequest>;
1687
1711
 
1688
- export type GetPreviewResponse = unknown;
1712
+ export interface GetPreviewResponse {
1713
+ /** Identifier */
1714
+ id?: string | null;
1715
+ /** The hostname or IP address of the origin server to run health checks on. */
1716
+ address?: string | null;
1717
+ /** A list of regions from which to run health checks. Null means Cloudflare will pick a default region. */
1718
+ checkRegions?:
1719
+ | (
1720
+ | "WNAM"
1721
+ | "ENAM"
1722
+ | "WEU"
1723
+ | "EEU"
1724
+ | "NSAM"
1725
+ | "SSAM"
1726
+ | "OC"
1727
+ | "ME"
1728
+ | "NAF"
1729
+ | "SAF"
1730
+ | "IN"
1731
+ | "SEAS"
1732
+ | "NEAS"
1733
+ | "ALL_REGIONS"
1734
+ )[]
1735
+ | null;
1736
+ /** The number of consecutive fails required from a health check before changing the health to unhealthy. */
1737
+ consecutiveFails?: number | null;
1738
+ /** The number of consecutive successes required from a health check before changing the health to healthy. */
1739
+ consecutiveSuccesses?: number | null;
1740
+ createdOn?: string | null;
1741
+ /** A human-readable description of the health check. */
1742
+ description?: string | null;
1743
+ /** The current failure reason if status is unhealthy. */
1744
+ failureReason?: string | null;
1745
+ /** Parameters specific to an HTTP or HTTPS health check. */
1746
+ httpConfig?: {
1747
+ allowInsecure?: boolean | null;
1748
+ expectedBody?: string | null;
1749
+ expectedCodes?: string[] | null;
1750
+ followRedirects?: boolean | null;
1751
+ header?: Record<string, unknown> | null;
1752
+ method?: "GET" | "HEAD" | null;
1753
+ path?: string | null;
1754
+ port?: number | null;
1755
+ } | null;
1756
+ /** 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. */
1757
+ interval?: number | null;
1758
+ modifiedOn?: string | null;
1759
+ /** A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed. */
1760
+ name?: string | null;
1761
+ /** The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. */
1762
+ retries?: number | null;
1763
+ /** The current status of the origin server according to the health check. */
1764
+ status?: "unknown" | "healthy" | "unhealthy" | "suspended" | null;
1765
+ /** If suspended, no health checks are sent to the origin. */
1766
+ suspended?: boolean | null;
1767
+ /** Parameters specific to TCP health check. */
1768
+ tcpConfig?: {
1769
+ method?: "connection_established" | null;
1770
+ port?: number | null;
1771
+ } | null;
1772
+ /** The timeout (in seconds) before marking the health check as failed. */
1773
+ timeout?: number | null;
1774
+ /** The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. */
1775
+ type?: string | null;
1776
+ }
1689
1777
 
1690
- export const GetPreviewResponse =
1691
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetPreviewResponse>;
1778
+ export const GetPreviewResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1779
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1780
+ address: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1781
+ checkRegions: Schema.optional(
1782
+ Schema.Union([
1783
+ Schema.Array(
1784
+ Schema.Literals([
1785
+ "WNAM",
1786
+ "ENAM",
1787
+ "WEU",
1788
+ "EEU",
1789
+ "NSAM",
1790
+ "SSAM",
1791
+ "OC",
1792
+ "ME",
1793
+ "NAF",
1794
+ "SAF",
1795
+ "IN",
1796
+ "SEAS",
1797
+ "NEAS",
1798
+ "ALL_REGIONS",
1799
+ ]),
1800
+ ),
1801
+ Schema.Null,
1802
+ ]),
1803
+ ),
1804
+ consecutiveFails: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1805
+ consecutiveSuccesses: Schema.optional(
1806
+ Schema.Union([Schema.Number, Schema.Null]),
1807
+ ),
1808
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1809
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1810
+ failureReason: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1811
+ httpConfig: Schema.optional(
1812
+ Schema.Union([
1813
+ Schema.Struct({
1814
+ allowInsecure: Schema.optional(
1815
+ Schema.Union([Schema.Boolean, Schema.Null]),
1816
+ ),
1817
+ expectedBody: Schema.optional(
1818
+ Schema.Union([Schema.String, Schema.Null]),
1819
+ ),
1820
+ expectedCodes: Schema.optional(
1821
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
1822
+ ),
1823
+ followRedirects: Schema.optional(
1824
+ Schema.Union([Schema.Boolean, Schema.Null]),
1825
+ ),
1826
+ header: Schema.optional(
1827
+ Schema.Union([
1828
+ Schema.Record(Schema.String, Schema.Unknown),
1829
+ Schema.Null,
1830
+ ]),
1831
+ ),
1832
+ method: Schema.optional(
1833
+ Schema.Union([Schema.Literals(["GET", "HEAD"]), Schema.Null]),
1834
+ ),
1835
+ path: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1836
+ port: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1837
+ }).pipe(
1838
+ Schema.encodeKeys({
1839
+ allowInsecure: "allow_insecure",
1840
+ expectedBody: "expected_body",
1841
+ expectedCodes: "expected_codes",
1842
+ followRedirects: "follow_redirects",
1843
+ header: "header",
1844
+ method: "method",
1845
+ path: "path",
1846
+ port: "port",
1847
+ }),
1848
+ ),
1849
+ Schema.Null,
1850
+ ]),
1851
+ ),
1852
+ interval: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1853
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1854
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1855
+ retries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1856
+ status: Schema.optional(
1857
+ Schema.Union([
1858
+ Schema.Literals(["unknown", "healthy", "unhealthy", "suspended"]),
1859
+ Schema.Null,
1860
+ ]),
1861
+ ),
1862
+ suspended: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
1863
+ tcpConfig: Schema.optional(
1864
+ Schema.Union([
1865
+ Schema.Struct({
1866
+ method: Schema.optional(
1867
+ Schema.Union([Schema.Literal("connection_established"), Schema.Null]),
1868
+ ),
1869
+ port: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1870
+ }),
1871
+ Schema.Null,
1872
+ ]),
1873
+ ),
1874
+ timeout: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1875
+ type: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1876
+ })
1877
+ .pipe(
1878
+ Schema.encodeKeys({
1879
+ id: "id",
1880
+ address: "address",
1881
+ checkRegions: "check_regions",
1882
+ consecutiveFails: "consecutive_fails",
1883
+ consecutiveSuccesses: "consecutive_successes",
1884
+ createdOn: "created_on",
1885
+ description: "description",
1886
+ failureReason: "failure_reason",
1887
+ httpConfig: "http_config",
1888
+ interval: "interval",
1889
+ modifiedOn: "modified_on",
1890
+ name: "name",
1891
+ retries: "retries",
1892
+ status: "status",
1893
+ suspended: "suspended",
1894
+ tcpConfig: "tcp_config",
1895
+ timeout: "timeout",
1896
+ type: "type",
1897
+ }),
1898
+ )
1899
+ .pipe(
1900
+ T.ResponsePath("result"),
1901
+ ) as unknown as Schema.Schema<GetPreviewResponse>;
1692
1902
 
1693
1903
  export type GetPreviewError = DefaultErrors;
1694
1904
 
@@ -1736,7 +1946,16 @@ export interface CreatePreviewRequest {
1736
1946
  /** Body param: A human-readable description of the health check. */
1737
1947
  description?: string;
1738
1948
  /** Body param: Parameters specific to an HTTP or HTTPS health check. */
1739
- httpConfig?: unknown | null;
1949
+ httpConfig?: {
1950
+ allowInsecure?: boolean;
1951
+ expectedBody?: string;
1952
+ expectedCodes?: string[] | null;
1953
+ followRedirects?: boolean;
1954
+ header?: Record<string, unknown> | null;
1955
+ method?: "GET" | "HEAD";
1956
+ path?: string;
1957
+ port?: number;
1958
+ } | null;
1740
1959
  /** 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
1960
  interval?: number;
1742
1961
  /** Body param: The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. */
@@ -1744,7 +1963,7 @@ export interface CreatePreviewRequest {
1744
1963
  /** Body param: If suspended, no health checks are sent to the origin. */
1745
1964
  suspended?: boolean;
1746
1965
  /** Body param: Parameters specific to TCP health check. */
1747
- tcpConfig?: unknown | null;
1966
+ tcpConfig?: { method?: "connection_established"; port?: number } | null;
1748
1967
  /** Body param: The timeout (in seconds) before marking the health check as failed. */
1749
1968
  timeout?: number;
1750
1969
  /** Body param: The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. */
@@ -1781,11 +2000,51 @@ export const CreatePreviewRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1781
2000
  consecutiveFails: Schema.optional(Schema.Number),
1782
2001
  consecutiveSuccesses: Schema.optional(Schema.Number),
1783
2002
  description: Schema.optional(Schema.String),
1784
- httpConfig: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
2003
+ httpConfig: Schema.optional(
2004
+ Schema.Union([
2005
+ Schema.Struct({
2006
+ allowInsecure: Schema.optional(Schema.Boolean),
2007
+ expectedBody: Schema.optional(Schema.String),
2008
+ expectedCodes: Schema.optional(
2009
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2010
+ ),
2011
+ followRedirects: Schema.optional(Schema.Boolean),
2012
+ header: Schema.optional(
2013
+ Schema.Union([
2014
+ Schema.Record(Schema.String, Schema.Unknown),
2015
+ Schema.Null,
2016
+ ]),
2017
+ ),
2018
+ method: Schema.optional(Schema.Literals(["GET", "HEAD"])),
2019
+ path: Schema.optional(Schema.String),
2020
+ port: Schema.optional(Schema.Number),
2021
+ }).pipe(
2022
+ Schema.encodeKeys({
2023
+ allowInsecure: "allow_insecure",
2024
+ expectedBody: "expected_body",
2025
+ expectedCodes: "expected_codes",
2026
+ followRedirects: "follow_redirects",
2027
+ header: "header",
2028
+ method: "method",
2029
+ path: "path",
2030
+ port: "port",
2031
+ }),
2032
+ ),
2033
+ Schema.Null,
2034
+ ]),
2035
+ ),
1785
2036
  interval: Schema.optional(Schema.Number),
1786
2037
  retries: Schema.optional(Schema.Number),
1787
2038
  suspended: Schema.optional(Schema.Boolean),
1788
- tcpConfig: Schema.optional(Schema.Union([Schema.Unknown, Schema.Null])),
2039
+ tcpConfig: Schema.optional(
2040
+ Schema.Union([
2041
+ Schema.Struct({
2042
+ method: Schema.optional(Schema.Literal("connection_established")),
2043
+ port: Schema.optional(Schema.Number),
2044
+ }),
2045
+ Schema.Null,
2046
+ ]),
2047
+ ),
1789
2048
  timeout: Schema.optional(Schema.Number),
1790
2049
  type: Schema.optional(Schema.String),
1791
2050
  }).pipe(
@@ -1807,10 +2066,196 @@ export const CreatePreviewRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1807
2066
  T.Http({ method: "POST", path: "/zones/{zone_id}/healthchecks/preview" }),
1808
2067
  ) as unknown as Schema.Schema<CreatePreviewRequest>;
1809
2068
 
1810
- export type CreatePreviewResponse = unknown;
2069
+ export interface CreatePreviewResponse {
2070
+ /** Identifier */
2071
+ id?: string | null;
2072
+ /** The hostname or IP address of the origin server to run health checks on. */
2073
+ address?: string | null;
2074
+ /** A list of regions from which to run health checks. Null means Cloudflare will pick a default region. */
2075
+ checkRegions?:
2076
+ | (
2077
+ | "WNAM"
2078
+ | "ENAM"
2079
+ | "WEU"
2080
+ | "EEU"
2081
+ | "NSAM"
2082
+ | "SSAM"
2083
+ | "OC"
2084
+ | "ME"
2085
+ | "NAF"
2086
+ | "SAF"
2087
+ | "IN"
2088
+ | "SEAS"
2089
+ | "NEAS"
2090
+ | "ALL_REGIONS"
2091
+ )[]
2092
+ | null;
2093
+ /** The number of consecutive fails required from a health check before changing the health to unhealthy. */
2094
+ consecutiveFails?: number | null;
2095
+ /** The number of consecutive successes required from a health check before changing the health to healthy. */
2096
+ consecutiveSuccesses?: number | null;
2097
+ createdOn?: string | null;
2098
+ /** A human-readable description of the health check. */
2099
+ description?: string | null;
2100
+ /** The current failure reason if status is unhealthy. */
2101
+ failureReason?: string | null;
2102
+ /** Parameters specific to an HTTP or HTTPS health check. */
2103
+ httpConfig?: {
2104
+ allowInsecure?: boolean | null;
2105
+ expectedBody?: string | null;
2106
+ expectedCodes?: string[] | null;
2107
+ followRedirects?: boolean | null;
2108
+ header?: Record<string, unknown> | null;
2109
+ method?: "GET" | "HEAD" | null;
2110
+ path?: string | null;
2111
+ port?: number | null;
2112
+ } | null;
2113
+ /** 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. */
2114
+ interval?: number | null;
2115
+ modifiedOn?: string | null;
2116
+ /** A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed. */
2117
+ name?: string | null;
2118
+ /** The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately. */
2119
+ retries?: number | null;
2120
+ /** The current status of the origin server according to the health check. */
2121
+ status?: "unknown" | "healthy" | "unhealthy" | "suspended" | null;
2122
+ /** If suspended, no health checks are sent to the origin. */
2123
+ suspended?: boolean | null;
2124
+ /** Parameters specific to TCP health check. */
2125
+ tcpConfig?: {
2126
+ method?: "connection_established" | null;
2127
+ port?: number | null;
2128
+ } | null;
2129
+ /** The timeout (in seconds) before marking the health check as failed. */
2130
+ timeout?: number | null;
2131
+ /** The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'. */
2132
+ type?: string | null;
2133
+ }
1811
2134
 
1812
- export const CreatePreviewResponse =
1813
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<CreatePreviewResponse>;
2135
+ export const CreatePreviewResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2136
+ id: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2137
+ address: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2138
+ checkRegions: Schema.optional(
2139
+ Schema.Union([
2140
+ Schema.Array(
2141
+ Schema.Literals([
2142
+ "WNAM",
2143
+ "ENAM",
2144
+ "WEU",
2145
+ "EEU",
2146
+ "NSAM",
2147
+ "SSAM",
2148
+ "OC",
2149
+ "ME",
2150
+ "NAF",
2151
+ "SAF",
2152
+ "IN",
2153
+ "SEAS",
2154
+ "NEAS",
2155
+ "ALL_REGIONS",
2156
+ ]),
2157
+ ),
2158
+ Schema.Null,
2159
+ ]),
2160
+ ),
2161
+ consecutiveFails: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2162
+ consecutiveSuccesses: Schema.optional(
2163
+ Schema.Union([Schema.Number, Schema.Null]),
2164
+ ),
2165
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2166
+ description: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2167
+ failureReason: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2168
+ httpConfig: Schema.optional(
2169
+ Schema.Union([
2170
+ Schema.Struct({
2171
+ allowInsecure: Schema.optional(
2172
+ Schema.Union([Schema.Boolean, Schema.Null]),
2173
+ ),
2174
+ expectedBody: Schema.optional(
2175
+ Schema.Union([Schema.String, Schema.Null]),
2176
+ ),
2177
+ expectedCodes: Schema.optional(
2178
+ Schema.Union([Schema.Array(Schema.String), Schema.Null]),
2179
+ ),
2180
+ followRedirects: Schema.optional(
2181
+ Schema.Union([Schema.Boolean, Schema.Null]),
2182
+ ),
2183
+ header: Schema.optional(
2184
+ Schema.Union([
2185
+ Schema.Record(Schema.String, Schema.Unknown),
2186
+ Schema.Null,
2187
+ ]),
2188
+ ),
2189
+ method: Schema.optional(
2190
+ Schema.Union([Schema.Literals(["GET", "HEAD"]), Schema.Null]),
2191
+ ),
2192
+ path: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2193
+ port: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2194
+ }).pipe(
2195
+ Schema.encodeKeys({
2196
+ allowInsecure: "allow_insecure",
2197
+ expectedBody: "expected_body",
2198
+ expectedCodes: "expected_codes",
2199
+ followRedirects: "follow_redirects",
2200
+ header: "header",
2201
+ method: "method",
2202
+ path: "path",
2203
+ port: "port",
2204
+ }),
2205
+ ),
2206
+ Schema.Null,
2207
+ ]),
2208
+ ),
2209
+ interval: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2210
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2211
+ name: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2212
+ retries: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2213
+ status: Schema.optional(
2214
+ Schema.Union([
2215
+ Schema.Literals(["unknown", "healthy", "unhealthy", "suspended"]),
2216
+ Schema.Null,
2217
+ ]),
2218
+ ),
2219
+ suspended: Schema.optional(Schema.Union([Schema.Boolean, Schema.Null])),
2220
+ tcpConfig: Schema.optional(
2221
+ Schema.Union([
2222
+ Schema.Struct({
2223
+ method: Schema.optional(
2224
+ Schema.Union([Schema.Literal("connection_established"), Schema.Null]),
2225
+ ),
2226
+ port: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2227
+ }),
2228
+ Schema.Null,
2229
+ ]),
2230
+ ),
2231
+ timeout: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
2232
+ type: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
2233
+ })
2234
+ .pipe(
2235
+ Schema.encodeKeys({
2236
+ id: "id",
2237
+ address: "address",
2238
+ checkRegions: "check_regions",
2239
+ consecutiveFails: "consecutive_fails",
2240
+ consecutiveSuccesses: "consecutive_successes",
2241
+ createdOn: "created_on",
2242
+ description: "description",
2243
+ failureReason: "failure_reason",
2244
+ httpConfig: "http_config",
2245
+ interval: "interval",
2246
+ modifiedOn: "modified_on",
2247
+ name: "name",
2248
+ retries: "retries",
2249
+ status: "status",
2250
+ suspended: "suspended",
2251
+ tcpConfig: "tcp_config",
2252
+ timeout: "timeout",
2253
+ type: "type",
2254
+ }),
2255
+ )
2256
+ .pipe(
2257
+ T.ResponsePath("result"),
2258
+ ) as unknown as Schema.Schema<CreatePreviewResponse>;
1814
2259
 
1815
2260
  export type CreatePreviewError = DefaultErrors;
1816
2261
 
@@ -41,7 +41,7 @@ export interface GetSettingTlsResponse {
41
41
  hostname?: string | null;
42
42
  status?: string | null;
43
43
  updatedAt?: string | null;
44
- value?: string | number | unknown | null;
44
+ value?: number | string | string[] | null;
45
45
  }[];
46
46
  }
47
47
 
@@ -54,7 +54,11 @@ export const GetSettingTlsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
54
54
  updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
55
55
  value: Schema.optional(
56
56
  Schema.Union([
57
- Schema.Union([Schema.String, Schema.Number, Schema.Unknown]),
57
+ Schema.Union([
58
+ Schema.Number,
59
+ Schema.String,
60
+ Schema.Array(Schema.String),
61
+ ]),
58
62
  Schema.Null,
59
63
  ]),
60
64
  ),
@@ -91,7 +95,7 @@ export const getSettingTls: API.PaginatedOperationMethod<
91
95
  hostname?: string | null;
92
96
  status?: string | null;
93
97
  updatedAt?: string | null;
94
- value?: string | number | unknown | null;
98
+ value?: number | string | string[] | null;
95
99
  },
96
100
  GetSettingTlsError,
97
101
  Credentials | HttpClient.HttpClient
@@ -112,7 +116,7 @@ export interface PutSettingTlsRequest {
112
116
  /** Path param: Identifier. */
113
117
  zoneId: string;
114
118
  /** Body param: The tls setting value. */
115
- value: string | number | unknown;
119
+ value: number | string | string[];
116
120
  }
117
121
 
118
122
  export const PutSettingTlsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
@@ -121,7 +125,11 @@ export const PutSettingTlsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
121
125
  ),
122
126
  hostname: Schema.String.pipe(T.HttpPath("hostname")),
123
127
  zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
124
- value: Schema.Union([Schema.String, Schema.Number, Schema.Unknown]),
128
+ value: Schema.Union([
129
+ Schema.Number,
130
+ Schema.String,
131
+ Schema.Array(Schema.String),
132
+ ]),
125
133
  }).pipe(
126
134
  T.Http({
127
135
  method: "PUT",
@@ -139,7 +147,7 @@ export interface PutSettingTlsResponse {
139
147
  /** This is the time the tls setting was updated. */
140
148
  updatedAt?: string | null;
141
149
  /** The tls setting value. */
142
- value?: string | number | unknown | null;
150
+ value?: number | string | string[] | null;
143
151
  }
144
152
 
145
153
  export const PutSettingTlsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
@@ -149,7 +157,7 @@ export const PutSettingTlsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
149
157
  updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
150
158
  value: Schema.optional(
151
159
  Schema.Union([
152
- Schema.Union([Schema.String, Schema.Number, Schema.Unknown]),
160
+ Schema.Union([Schema.Number, Schema.String, Schema.Array(Schema.String)]),
153
161
  Schema.Null,
154
162
  ]),
155
163
  ),
@@ -211,7 +219,7 @@ export interface DeleteSettingTlsResponse {
211
219
  /** This is the time the tls setting was updated. */
212
220
  updatedAt?: string | null;
213
221
  /** The tls setting value. */
214
- value?: string | number | unknown | null;
222
+ value?: number | string | string[] | null;
215
223
  }
216
224
 
217
225
  export const DeleteSettingTlsResponse =
@@ -222,7 +230,11 @@ export const DeleteSettingTlsResponse =
222
230
  updatedAt: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
223
231
  value: Schema.optional(
224
232
  Schema.Union([
225
- Schema.Union([Schema.String, Schema.Number, Schema.Unknown]),
233
+ Schema.Union([
234
+ Schema.Number,
235
+ Schema.String,
236
+ Schema.Array(Schema.String),
237
+ ]),
226
238
  Schema.Null,
227
239
  ]),
228
240
  ),