@distilled.cloud/cloudflare 0.6.0 → 0.7.0

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
@@ -5,6 +5,7 @@
5
5
  * DO NOT EDIT - regenerate with: bun scripts/generate.ts --service hyperdrive
6
6
  */
7
7
 
8
+ import * as stream from "effect/Stream";
8
9
  import * as Schema from "effect/Schema";
9
10
  import type * as HttpClient from "effect/unstable/http/HttpClient";
10
11
  import * as API from "../client/api.ts";
@@ -70,10 +71,142 @@ export const GetConfigRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
70
71
  }),
71
72
  ) as unknown as Schema.Schema<GetConfigRequest>;
72
73
 
73
- export type GetConfigResponse = unknown;
74
+ export interface GetConfigResponse {
75
+ /** Define configurations using a unique string identifier. */
76
+ id: string;
77
+ /** The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. */
78
+ name: string;
79
+ origin:
80
+ | {
81
+ database: string;
82
+ host: string;
83
+ port: number;
84
+ scheme: "postgres" | "postgresql" | "mysql";
85
+ user: string;
86
+ }
87
+ | {
88
+ accessClientId: string;
89
+ database: string;
90
+ host: string;
91
+ scheme: "postgres" | "postgresql" | "mysql";
92
+ user: string;
93
+ };
94
+ caching?:
95
+ | { disabled?: boolean | null }
96
+ | {
97
+ disabled?: boolean | null;
98
+ maxAge?: number | null;
99
+ staleWhileRevalidate?: number | null;
100
+ }
101
+ | null;
102
+ /** Defines the creation time of the Hyperdrive configuration. */
103
+ createdOn?: string | null;
104
+ /** Defines the last modified time of the Hyperdrive configuration. */
105
+ modifiedOn?: string | null;
106
+ mtls?: {
107
+ caCertificateId?: string | null;
108
+ mtlsCertificateId?: string | null;
109
+ sslmode?: string | null;
110
+ } | null;
111
+ /** The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. */
112
+ originConnectionLimit?: number | null;
113
+ }
74
114
 
75
- export const GetConfigResponse =
76
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<GetConfigResponse>;
115
+ export const GetConfigResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
116
+ id: Schema.String,
117
+ name: Schema.String,
118
+ origin: Schema.Union([
119
+ Schema.Struct({
120
+ database: Schema.String,
121
+ host: Schema.String,
122
+ port: Schema.Number,
123
+ scheme: Schema.Literals(["postgres", "postgresql", "mysql"]),
124
+ user: Schema.String,
125
+ }),
126
+ Schema.Struct({
127
+ accessClientId: Schema.String,
128
+ database: Schema.String,
129
+ host: Schema.String,
130
+ scheme: Schema.Literals(["postgres", "postgresql", "mysql"]),
131
+ user: Schema.String,
132
+ }).pipe(
133
+ Schema.encodeKeys({
134
+ accessClientId: "access_client_id",
135
+ database: "database",
136
+ host: "host",
137
+ scheme: "scheme",
138
+ user: "user",
139
+ }),
140
+ ),
141
+ ]),
142
+ caching: Schema.optional(
143
+ Schema.Union([
144
+ Schema.Union([
145
+ Schema.Struct({
146
+ disabled: Schema.optional(
147
+ Schema.Union([Schema.Boolean, Schema.Null]),
148
+ ),
149
+ }),
150
+ Schema.Struct({
151
+ disabled: Schema.optional(
152
+ Schema.Union([Schema.Boolean, Schema.Null]),
153
+ ),
154
+ maxAge: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
155
+ staleWhileRevalidate: Schema.optional(
156
+ Schema.Union([Schema.Number, Schema.Null]),
157
+ ),
158
+ }).pipe(
159
+ Schema.encodeKeys({
160
+ disabled: "disabled",
161
+ maxAge: "max_age",
162
+ staleWhileRevalidate: "stale_while_revalidate",
163
+ }),
164
+ ),
165
+ ]),
166
+ Schema.Null,
167
+ ]),
168
+ ),
169
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
170
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
171
+ mtls: Schema.optional(
172
+ Schema.Union([
173
+ Schema.Struct({
174
+ caCertificateId: Schema.optional(
175
+ Schema.Union([Schema.String, Schema.Null]),
176
+ ),
177
+ mtlsCertificateId: Schema.optional(
178
+ Schema.Union([Schema.String, Schema.Null]),
179
+ ),
180
+ sslmode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
181
+ }).pipe(
182
+ Schema.encodeKeys({
183
+ caCertificateId: "ca_certificate_id",
184
+ mtlsCertificateId: "mtls_certificate_id",
185
+ sslmode: "sslmode",
186
+ }),
187
+ ),
188
+ Schema.Null,
189
+ ]),
190
+ ),
191
+ originConnectionLimit: Schema.optional(
192
+ Schema.Union([Schema.Number, Schema.Null]),
193
+ ),
194
+ })
195
+ .pipe(
196
+ Schema.encodeKeys({
197
+ id: "id",
198
+ name: "name",
199
+ origin: "origin",
200
+ caching: "caching",
201
+ createdOn: "created_on",
202
+ modifiedOn: "modified_on",
203
+ mtls: "mtls",
204
+ originConnectionLimit: "origin_connection_limit",
205
+ }),
206
+ )
207
+ .pipe(
208
+ T.ResponsePath("result"),
209
+ ) as unknown as Schema.Schema<GetConfigResponse>;
77
210
 
78
211
  export type GetConfigError =
79
212
  | DefaultErrors
@@ -107,25 +240,209 @@ export const ListConfigsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
107
240
  T.Http({ method: "GET", path: "/accounts/{account_id}/hyperdrive/configs" }),
108
241
  ) as unknown as Schema.Schema<ListConfigsRequest>;
109
242
 
110
- export type ListConfigsResponse = unknown;
243
+ export interface ListConfigsResponse {
244
+ result: {
245
+ id: string;
246
+ name: string;
247
+ origin:
248
+ | {
249
+ database: string;
250
+ host: string;
251
+ port: number;
252
+ scheme: "postgres" | "postgresql" | "mysql";
253
+ user: string;
254
+ }
255
+ | {
256
+ accessClientId: string;
257
+ database: string;
258
+ host: string;
259
+ scheme: "postgres" | "postgresql" | "mysql";
260
+ user: string;
261
+ };
262
+ caching?:
263
+ | { disabled?: boolean | null }
264
+ | {
265
+ disabled?: boolean | null;
266
+ maxAge?: number | null;
267
+ staleWhileRevalidate?: number | null;
268
+ }
269
+ | null;
270
+ createdOn?: string | null;
271
+ modifiedOn?: string | null;
272
+ mtls?: {
273
+ caCertificateId?: string | null;
274
+ mtlsCertificateId?: string | null;
275
+ sslmode?: string | null;
276
+ } | null;
277
+ originConnectionLimit?: number | null;
278
+ }[];
279
+ }
111
280
 
112
- export const ListConfigsResponse =
113
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<ListConfigsResponse>;
281
+ export const ListConfigsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
282
+ result: Schema.Array(
283
+ Schema.Struct({
284
+ id: Schema.String,
285
+ name: Schema.String,
286
+ origin: Schema.Union([
287
+ Schema.Struct({
288
+ database: Schema.String,
289
+ host: Schema.String,
290
+ port: Schema.Number,
291
+ scheme: Schema.Literals(["postgres", "postgresql", "mysql"]),
292
+ user: Schema.String,
293
+ }),
294
+ Schema.Struct({
295
+ accessClientId: Schema.String,
296
+ database: Schema.String,
297
+ host: Schema.String,
298
+ scheme: Schema.Literals(["postgres", "postgresql", "mysql"]),
299
+ user: Schema.String,
300
+ }).pipe(
301
+ Schema.encodeKeys({
302
+ accessClientId: "access_client_id",
303
+ database: "database",
304
+ host: "host",
305
+ scheme: "scheme",
306
+ user: "user",
307
+ }),
308
+ ),
309
+ ]),
310
+ caching: Schema.optional(
311
+ Schema.Union([
312
+ Schema.Union([
313
+ Schema.Struct({
314
+ disabled: Schema.optional(
315
+ Schema.Union([Schema.Boolean, Schema.Null]),
316
+ ),
317
+ }),
318
+ Schema.Struct({
319
+ disabled: Schema.optional(
320
+ Schema.Union([Schema.Boolean, Schema.Null]),
321
+ ),
322
+ maxAge: Schema.optional(
323
+ Schema.Union([Schema.Number, Schema.Null]),
324
+ ),
325
+ staleWhileRevalidate: Schema.optional(
326
+ Schema.Union([Schema.Number, Schema.Null]),
327
+ ),
328
+ }).pipe(
329
+ Schema.encodeKeys({
330
+ disabled: "disabled",
331
+ maxAge: "max_age",
332
+ staleWhileRevalidate: "stale_while_revalidate",
333
+ }),
334
+ ),
335
+ ]),
336
+ Schema.Null,
337
+ ]),
338
+ ),
339
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
340
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
341
+ mtls: Schema.optional(
342
+ Schema.Union([
343
+ Schema.Struct({
344
+ caCertificateId: Schema.optional(
345
+ Schema.Union([Schema.String, Schema.Null]),
346
+ ),
347
+ mtlsCertificateId: Schema.optional(
348
+ Schema.Union([Schema.String, Schema.Null]),
349
+ ),
350
+ sslmode: Schema.optional(
351
+ Schema.Union([Schema.String, Schema.Null]),
352
+ ),
353
+ }).pipe(
354
+ Schema.encodeKeys({
355
+ caCertificateId: "ca_certificate_id",
356
+ mtlsCertificateId: "mtls_certificate_id",
357
+ sslmode: "sslmode",
358
+ }),
359
+ ),
360
+ Schema.Null,
361
+ ]),
362
+ ),
363
+ originConnectionLimit: Schema.optional(
364
+ Schema.Union([Schema.Number, Schema.Null]),
365
+ ),
366
+ }).pipe(
367
+ Schema.encodeKeys({
368
+ id: "id",
369
+ name: "name",
370
+ origin: "origin",
371
+ caching: "caching",
372
+ createdOn: "created_on",
373
+ modifiedOn: "modified_on",
374
+ mtls: "mtls",
375
+ originConnectionLimit: "origin_connection_limit",
376
+ }),
377
+ ),
378
+ ),
379
+ }) as unknown as Schema.Schema<ListConfigsResponse>;
114
380
 
115
381
  export type ListConfigsError =
116
382
  | DefaultErrors
117
383
  | PrivateHostNotAllowed
118
384
  | InvalidObjectIdentifier;
119
385
 
120
- export const listConfigs: API.OperationMethod<
386
+ export const listConfigs: API.PaginatedOperationMethod<
121
387
  ListConfigsRequest,
122
388
  ListConfigsResponse,
123
389
  ListConfigsError,
124
390
  Credentials | HttpClient.HttpClient
125
- > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
391
+ > & {
392
+ pages: (
393
+ input: ListConfigsRequest,
394
+ ) => stream.Stream<
395
+ ListConfigsResponse,
396
+ ListConfigsError,
397
+ Credentials | HttpClient.HttpClient
398
+ >;
399
+ items: (input: ListConfigsRequest) => stream.Stream<
400
+ {
401
+ id: string;
402
+ name: string;
403
+ origin:
404
+ | {
405
+ database: string;
406
+ host: string;
407
+ port: number;
408
+ scheme: "postgres" | "postgresql" | "mysql";
409
+ user: string;
410
+ }
411
+ | {
412
+ accessClientId: string;
413
+ database: string;
414
+ host: string;
415
+ scheme: "postgres" | "postgresql" | "mysql";
416
+ user: string;
417
+ };
418
+ caching?:
419
+ | { disabled?: boolean | null }
420
+ | {
421
+ disabled?: boolean | null;
422
+ maxAge?: number | null;
423
+ staleWhileRevalidate?: number | null;
424
+ }
425
+ | null;
426
+ createdOn?: string | null;
427
+ modifiedOn?: string | null;
428
+ mtls?: {
429
+ caCertificateId?: string | null;
430
+ mtlsCertificateId?: string | null;
431
+ sslmode?: string | null;
432
+ } | null;
433
+ originConnectionLimit?: number | null;
434
+ },
435
+ ListConfigsError,
436
+ Credentials | HttpClient.HttpClient
437
+ >;
438
+ } = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
126
439
  input: ListConfigsRequest,
127
440
  output: ListConfigsResponse,
128
441
  errors: [PrivateHostNotAllowed, InvalidObjectIdentifier],
442
+ pagination: {
443
+ mode: "single",
444
+ items: "result",
445
+ } as const,
129
446
  }));
130
447
 
131
448
  export interface CreateConfigRequest {
@@ -241,10 +558,142 @@ export const CreateConfigRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
241
558
  T.Http({ method: "POST", path: "/accounts/{account_id}/hyperdrive/configs" }),
242
559
  ) as unknown as Schema.Schema<CreateConfigRequest>;
243
560
 
244
- export type CreateConfigResponse = unknown;
561
+ export interface CreateConfigResponse {
562
+ /** Define configurations using a unique string identifier. */
563
+ id: string;
564
+ /** The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. */
565
+ name: string;
566
+ origin:
567
+ | {
568
+ database: string;
569
+ host: string;
570
+ port: number;
571
+ scheme: "postgres" | "postgresql" | "mysql";
572
+ user: string;
573
+ }
574
+ | {
575
+ accessClientId: string;
576
+ database: string;
577
+ host: string;
578
+ scheme: "postgres" | "postgresql" | "mysql";
579
+ user: string;
580
+ };
581
+ caching?:
582
+ | { disabled?: boolean | null }
583
+ | {
584
+ disabled?: boolean | null;
585
+ maxAge?: number | null;
586
+ staleWhileRevalidate?: number | null;
587
+ }
588
+ | null;
589
+ /** Defines the creation time of the Hyperdrive configuration. */
590
+ createdOn?: string | null;
591
+ /** Defines the last modified time of the Hyperdrive configuration. */
592
+ modifiedOn?: string | null;
593
+ mtls?: {
594
+ caCertificateId?: string | null;
595
+ mtlsCertificateId?: string | null;
596
+ sslmode?: string | null;
597
+ } | null;
598
+ /** The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. */
599
+ originConnectionLimit?: number | null;
600
+ }
245
601
 
246
- export const CreateConfigResponse =
247
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<CreateConfigResponse>;
602
+ export const CreateConfigResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
603
+ id: Schema.String,
604
+ name: Schema.String,
605
+ origin: Schema.Union([
606
+ Schema.Struct({
607
+ database: Schema.String,
608
+ host: Schema.String,
609
+ port: Schema.Number,
610
+ scheme: Schema.Literals(["postgres", "postgresql", "mysql"]),
611
+ user: Schema.String,
612
+ }),
613
+ Schema.Struct({
614
+ accessClientId: Schema.String,
615
+ database: Schema.String,
616
+ host: Schema.String,
617
+ scheme: Schema.Literals(["postgres", "postgresql", "mysql"]),
618
+ user: Schema.String,
619
+ }).pipe(
620
+ Schema.encodeKeys({
621
+ accessClientId: "access_client_id",
622
+ database: "database",
623
+ host: "host",
624
+ scheme: "scheme",
625
+ user: "user",
626
+ }),
627
+ ),
628
+ ]),
629
+ caching: Schema.optional(
630
+ Schema.Union([
631
+ Schema.Union([
632
+ Schema.Struct({
633
+ disabled: Schema.optional(
634
+ Schema.Union([Schema.Boolean, Schema.Null]),
635
+ ),
636
+ }),
637
+ Schema.Struct({
638
+ disabled: Schema.optional(
639
+ Schema.Union([Schema.Boolean, Schema.Null]),
640
+ ),
641
+ maxAge: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
642
+ staleWhileRevalidate: Schema.optional(
643
+ Schema.Union([Schema.Number, Schema.Null]),
644
+ ),
645
+ }).pipe(
646
+ Schema.encodeKeys({
647
+ disabled: "disabled",
648
+ maxAge: "max_age",
649
+ staleWhileRevalidate: "stale_while_revalidate",
650
+ }),
651
+ ),
652
+ ]),
653
+ Schema.Null,
654
+ ]),
655
+ ),
656
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
657
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
658
+ mtls: Schema.optional(
659
+ Schema.Union([
660
+ Schema.Struct({
661
+ caCertificateId: Schema.optional(
662
+ Schema.Union([Schema.String, Schema.Null]),
663
+ ),
664
+ mtlsCertificateId: Schema.optional(
665
+ Schema.Union([Schema.String, Schema.Null]),
666
+ ),
667
+ sslmode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
668
+ }).pipe(
669
+ Schema.encodeKeys({
670
+ caCertificateId: "ca_certificate_id",
671
+ mtlsCertificateId: "mtls_certificate_id",
672
+ sslmode: "sslmode",
673
+ }),
674
+ ),
675
+ Schema.Null,
676
+ ]),
677
+ ),
678
+ originConnectionLimit: Schema.optional(
679
+ Schema.Union([Schema.Number, Schema.Null]),
680
+ ),
681
+ })
682
+ .pipe(
683
+ Schema.encodeKeys({
684
+ id: "id",
685
+ name: "name",
686
+ origin: "origin",
687
+ caching: "caching",
688
+ createdOn: "created_on",
689
+ modifiedOn: "modified_on",
690
+ mtls: "mtls",
691
+ originConnectionLimit: "origin_connection_limit",
692
+ }),
693
+ )
694
+ .pipe(
695
+ T.ResponsePath("result"),
696
+ ) as unknown as Schema.Schema<CreateConfigResponse>;
248
697
 
249
698
  export type CreateConfigError =
250
699
  | DefaultErrors
@@ -385,10 +834,142 @@ export const UpdateConfigRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
385
834
  }),
386
835
  ) as unknown as Schema.Schema<UpdateConfigRequest>;
387
836
 
388
- export type UpdateConfigResponse = unknown;
837
+ export interface UpdateConfigResponse {
838
+ /** Define configurations using a unique string identifier. */
839
+ id: string;
840
+ /** The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. */
841
+ name: string;
842
+ origin:
843
+ | {
844
+ database: string;
845
+ host: string;
846
+ port: number;
847
+ scheme: "postgres" | "postgresql" | "mysql";
848
+ user: string;
849
+ }
850
+ | {
851
+ accessClientId: string;
852
+ database: string;
853
+ host: string;
854
+ scheme: "postgres" | "postgresql" | "mysql";
855
+ user: string;
856
+ };
857
+ caching?:
858
+ | { disabled?: boolean | null }
859
+ | {
860
+ disabled?: boolean | null;
861
+ maxAge?: number | null;
862
+ staleWhileRevalidate?: number | null;
863
+ }
864
+ | null;
865
+ /** Defines the creation time of the Hyperdrive configuration. */
866
+ createdOn?: string | null;
867
+ /** Defines the last modified time of the Hyperdrive configuration. */
868
+ modifiedOn?: string | null;
869
+ mtls?: {
870
+ caCertificateId?: string | null;
871
+ mtlsCertificateId?: string | null;
872
+ sslmode?: string | null;
873
+ } | null;
874
+ /** The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. */
875
+ originConnectionLimit?: number | null;
876
+ }
389
877
 
390
- export const UpdateConfigResponse =
391
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<UpdateConfigResponse>;
878
+ export const UpdateConfigResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
879
+ id: Schema.String,
880
+ name: Schema.String,
881
+ origin: Schema.Union([
882
+ Schema.Struct({
883
+ database: Schema.String,
884
+ host: Schema.String,
885
+ port: Schema.Number,
886
+ scheme: Schema.Literals(["postgres", "postgresql", "mysql"]),
887
+ user: Schema.String,
888
+ }),
889
+ Schema.Struct({
890
+ accessClientId: Schema.String,
891
+ database: Schema.String,
892
+ host: Schema.String,
893
+ scheme: Schema.Literals(["postgres", "postgresql", "mysql"]),
894
+ user: Schema.String,
895
+ }).pipe(
896
+ Schema.encodeKeys({
897
+ accessClientId: "access_client_id",
898
+ database: "database",
899
+ host: "host",
900
+ scheme: "scheme",
901
+ user: "user",
902
+ }),
903
+ ),
904
+ ]),
905
+ caching: Schema.optional(
906
+ Schema.Union([
907
+ Schema.Union([
908
+ Schema.Struct({
909
+ disabled: Schema.optional(
910
+ Schema.Union([Schema.Boolean, Schema.Null]),
911
+ ),
912
+ }),
913
+ Schema.Struct({
914
+ disabled: Schema.optional(
915
+ Schema.Union([Schema.Boolean, Schema.Null]),
916
+ ),
917
+ maxAge: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
918
+ staleWhileRevalidate: Schema.optional(
919
+ Schema.Union([Schema.Number, Schema.Null]),
920
+ ),
921
+ }).pipe(
922
+ Schema.encodeKeys({
923
+ disabled: "disabled",
924
+ maxAge: "max_age",
925
+ staleWhileRevalidate: "stale_while_revalidate",
926
+ }),
927
+ ),
928
+ ]),
929
+ Schema.Null,
930
+ ]),
931
+ ),
932
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
933
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
934
+ mtls: Schema.optional(
935
+ Schema.Union([
936
+ Schema.Struct({
937
+ caCertificateId: Schema.optional(
938
+ Schema.Union([Schema.String, Schema.Null]),
939
+ ),
940
+ mtlsCertificateId: Schema.optional(
941
+ Schema.Union([Schema.String, Schema.Null]),
942
+ ),
943
+ sslmode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
944
+ }).pipe(
945
+ Schema.encodeKeys({
946
+ caCertificateId: "ca_certificate_id",
947
+ mtlsCertificateId: "mtls_certificate_id",
948
+ sslmode: "sslmode",
949
+ }),
950
+ ),
951
+ Schema.Null,
952
+ ]),
953
+ ),
954
+ originConnectionLimit: Schema.optional(
955
+ Schema.Union([Schema.Number, Schema.Null]),
956
+ ),
957
+ })
958
+ .pipe(
959
+ Schema.encodeKeys({
960
+ id: "id",
961
+ name: "name",
962
+ origin: "origin",
963
+ caching: "caching",
964
+ createdOn: "created_on",
965
+ modifiedOn: "modified_on",
966
+ mtls: "mtls",
967
+ originConnectionLimit: "origin_connection_limit",
968
+ }),
969
+ )
970
+ .pipe(
971
+ T.ResponsePath("result"),
972
+ ) as unknown as Schema.Schema<UpdateConfigResponse>;
392
973
 
393
974
  export type UpdateConfigError =
394
975
  | DefaultErrors
@@ -520,10 +1101,142 @@ export const PatchConfigRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
520
1101
  }),
521
1102
  ) as unknown as Schema.Schema<PatchConfigRequest>;
522
1103
 
523
- export type PatchConfigResponse = unknown;
1104
+ export interface PatchConfigResponse {
1105
+ /** Define configurations using a unique string identifier. */
1106
+ id: string;
1107
+ /** The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API. */
1108
+ name: string;
1109
+ origin:
1110
+ | {
1111
+ database: string;
1112
+ host: string;
1113
+ port: number;
1114
+ scheme: "postgres" | "postgresql" | "mysql";
1115
+ user: string;
1116
+ }
1117
+ | {
1118
+ accessClientId: string;
1119
+ database: string;
1120
+ host: string;
1121
+ scheme: "postgres" | "postgresql" | "mysql";
1122
+ user: string;
1123
+ };
1124
+ caching?:
1125
+ | { disabled?: boolean | null }
1126
+ | {
1127
+ disabled?: boolean | null;
1128
+ maxAge?: number | null;
1129
+ staleWhileRevalidate?: number | null;
1130
+ }
1131
+ | null;
1132
+ /** Defines the creation time of the Hyperdrive configuration. */
1133
+ createdOn?: string | null;
1134
+ /** Defines the last modified time of the Hyperdrive configuration. */
1135
+ modifiedOn?: string | null;
1136
+ mtls?: {
1137
+ caCertificateId?: string | null;
1138
+ mtlsCertificateId?: string | null;
1139
+ sslmode?: string | null;
1140
+ } | null;
1141
+ /** The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database. */
1142
+ originConnectionLimit?: number | null;
1143
+ }
524
1144
 
525
- export const PatchConfigResponse =
526
- /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown as unknown as Schema.Schema<PatchConfigResponse>;
1145
+ export const PatchConfigResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1146
+ id: Schema.String,
1147
+ name: Schema.String,
1148
+ origin: Schema.Union([
1149
+ Schema.Struct({
1150
+ database: Schema.String,
1151
+ host: Schema.String,
1152
+ port: Schema.Number,
1153
+ scheme: Schema.Literals(["postgres", "postgresql", "mysql"]),
1154
+ user: Schema.String,
1155
+ }),
1156
+ Schema.Struct({
1157
+ accessClientId: Schema.String,
1158
+ database: Schema.String,
1159
+ host: Schema.String,
1160
+ scheme: Schema.Literals(["postgres", "postgresql", "mysql"]),
1161
+ user: Schema.String,
1162
+ }).pipe(
1163
+ Schema.encodeKeys({
1164
+ accessClientId: "access_client_id",
1165
+ database: "database",
1166
+ host: "host",
1167
+ scheme: "scheme",
1168
+ user: "user",
1169
+ }),
1170
+ ),
1171
+ ]),
1172
+ caching: Schema.optional(
1173
+ Schema.Union([
1174
+ Schema.Union([
1175
+ Schema.Struct({
1176
+ disabled: Schema.optional(
1177
+ Schema.Union([Schema.Boolean, Schema.Null]),
1178
+ ),
1179
+ }),
1180
+ Schema.Struct({
1181
+ disabled: Schema.optional(
1182
+ Schema.Union([Schema.Boolean, Schema.Null]),
1183
+ ),
1184
+ maxAge: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1185
+ staleWhileRevalidate: Schema.optional(
1186
+ Schema.Union([Schema.Number, Schema.Null]),
1187
+ ),
1188
+ }).pipe(
1189
+ Schema.encodeKeys({
1190
+ disabled: "disabled",
1191
+ maxAge: "max_age",
1192
+ staleWhileRevalidate: "stale_while_revalidate",
1193
+ }),
1194
+ ),
1195
+ ]),
1196
+ Schema.Null,
1197
+ ]),
1198
+ ),
1199
+ createdOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1200
+ modifiedOn: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1201
+ mtls: Schema.optional(
1202
+ Schema.Union([
1203
+ Schema.Struct({
1204
+ caCertificateId: Schema.optional(
1205
+ Schema.Union([Schema.String, Schema.Null]),
1206
+ ),
1207
+ mtlsCertificateId: Schema.optional(
1208
+ Schema.Union([Schema.String, Schema.Null]),
1209
+ ),
1210
+ sslmode: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1211
+ }).pipe(
1212
+ Schema.encodeKeys({
1213
+ caCertificateId: "ca_certificate_id",
1214
+ mtlsCertificateId: "mtls_certificate_id",
1215
+ sslmode: "sslmode",
1216
+ }),
1217
+ ),
1218
+ Schema.Null,
1219
+ ]),
1220
+ ),
1221
+ originConnectionLimit: Schema.optional(
1222
+ Schema.Union([Schema.Number, Schema.Null]),
1223
+ ),
1224
+ })
1225
+ .pipe(
1226
+ Schema.encodeKeys({
1227
+ id: "id",
1228
+ name: "name",
1229
+ origin: "origin",
1230
+ caching: "caching",
1231
+ createdOn: "created_on",
1232
+ modifiedOn: "modified_on",
1233
+ mtls: "mtls",
1234
+ originConnectionLimit: "origin_connection_limit",
1235
+ }),
1236
+ )
1237
+ .pipe(
1238
+ T.ResponsePath("result"),
1239
+ ) as unknown as Schema.Schema<PatchConfigResponse>;
527
1240
 
528
1241
  export type PatchConfigError =
529
1242
  | DefaultErrors