@distilled.cloud/cloudflare 0.18.2 → 0.19.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/schemas.d.ts +7 -8
  2. package/lib/schemas.d.ts.map +1 -1
  3. package/lib/schemas.js +9 -12
  4. package/lib/schemas.js.map +1 -1
  5. package/lib/services/abuse-reports.d.ts +4 -4
  6. package/lib/services/abuse-reports.d.ts.map +1 -1
  7. package/lib/services/abuse-reports.js +28 -22
  8. package/lib/services/abuse-reports.js.map +1 -1
  9. package/lib/services/accounts.d.ts +10 -10
  10. package/lib/services/accounts.d.ts.map +1 -1
  11. package/lib/services/accounts.js +67 -52
  12. package/lib/services/accounts.js.map +1 -1
  13. package/lib/services/ai-gateway.d.ts +10 -10
  14. package/lib/services/ai-gateway.d.ts.map +1 -1
  15. package/lib/services/ai-gateway.js +70 -55
  16. package/lib/services/ai-gateway.js.map +1 -1
  17. package/lib/services/ai.d.ts +2 -2
  18. package/lib/services/ai.d.ts.map +1 -1
  19. package/lib/services/ai.js +14 -11
  20. package/lib/services/ai.js.map +1 -1
  21. package/lib/services/alerting.d.ts +2 -2
  22. package/lib/services/alerting.d.ts.map +1 -1
  23. package/lib/services/alerting.js +14 -11
  24. package/lib/services/alerting.js.map +1 -1
  25. package/lib/services/api-gateway.d.ts +10 -10
  26. package/lib/services/api-gateway.d.ts.map +1 -1
  27. package/lib/services/api-gateway.js +70 -55
  28. package/lib/services/api-gateway.js.map +1 -1
  29. package/lib/services/audit-logs.d.ts +2 -2
  30. package/lib/services/audit-logs.d.ts.map +1 -1
  31. package/lib/services/audit-logs.js +14 -11
  32. package/lib/services/audit-logs.js.map +1 -1
  33. package/lib/services/client-certificates.d.ts +2 -2
  34. package/lib/services/client-certificates.d.ts.map +1 -1
  35. package/lib/services/client-certificates.js +14 -11
  36. package/lib/services/client-certificates.js.map +1 -1
  37. package/lib/services/custom-certificates.d.ts +2 -2
  38. package/lib/services/custom-certificates.d.ts.map +1 -1
  39. package/lib/services/custom-certificates.js +14 -11
  40. package/lib/services/custom-certificates.js.map +1 -1
  41. package/lib/services/custom-hostnames.d.ts +2 -2
  42. package/lib/services/custom-hostnames.d.ts.map +1 -1
  43. package/lib/services/custom-hostnames.js +14 -11
  44. package/lib/services/custom-hostnames.js.map +1 -1
  45. package/lib/services/custom-pages.d.ts +40 -13
  46. package/lib/services/custom-pages.d.ts.map +1 -1
  47. package/lib/services/custom-pages.js +68 -15
  48. package/lib/services/custom-pages.js.map +1 -1
  49. package/lib/services/d1.d.ts +2 -2
  50. package/lib/services/d1.d.ts.map +1 -1
  51. package/lib/services/d1.js +14 -11
  52. package/lib/services/d1.js.map +1 -1
  53. package/lib/services/dns-firewall.d.ts +2 -2
  54. package/lib/services/dns-firewall.d.ts.map +1 -1
  55. package/lib/services/dns-firewall.js +14 -11
  56. package/lib/services/dns-firewall.js.map +1 -1
  57. package/lib/services/dns.d.ts +4 -4
  58. package/lib/services/dns.d.ts.map +1 -1
  59. package/lib/services/dns.js +28 -22
  60. package/lib/services/dns.js.map +1 -1
  61. package/lib/services/durable-objects.d.ts +4 -4
  62. package/lib/services/durable-objects.d.ts.map +1 -1
  63. package/lib/services/durable-objects.js +25 -19
  64. package/lib/services/durable-objects.js.map +1 -1
  65. package/lib/services/email-routing.d.ts +4 -4
  66. package/lib/services/email-routing.d.ts.map +1 -1
  67. package/lib/services/email-routing.js +28 -22
  68. package/lib/services/email-routing.js.map +1 -1
  69. package/lib/services/email-security.d.ts +14 -14
  70. package/lib/services/email-security.d.ts.map +1 -1
  71. package/lib/services/email-security.js +98 -77
  72. package/lib/services/email-security.js.map +1 -1
  73. package/lib/services/filters.d.ts +2 -2
  74. package/lib/services/filters.d.ts.map +1 -1
  75. package/lib/services/filters.js +14 -11
  76. package/lib/services/filters.js.map +1 -1
  77. package/lib/services/firewall.d.ts +82 -39
  78. package/lib/services/firewall.d.ts.map +1 -1
  79. package/lib/services/firewall.js +232 -114
  80. package/lib/services/firewall.js.map +1 -1
  81. package/lib/services/healthchecks.d.ts +2 -2
  82. package/lib/services/healthchecks.d.ts.map +1 -1
  83. package/lib/services/healthchecks.js +14 -11
  84. package/lib/services/healthchecks.js.map +1 -1
  85. package/lib/services/images.d.ts +2 -2
  86. package/lib/services/images.d.ts.map +1 -1
  87. package/lib/services/images.js +14 -11
  88. package/lib/services/images.js.map +1 -1
  89. package/lib/services/intel.d.ts +6 -4
  90. package/lib/services/intel.d.ts.map +1 -1
  91. package/lib/services/intel.js +30 -22
  92. package/lib/services/intel.js.map +1 -1
  93. package/lib/services/kv.d.ts +4 -4
  94. package/lib/services/kv.d.ts.map +1 -1
  95. package/lib/services/kv.js +25 -19
  96. package/lib/services/kv.js.map +1 -1
  97. package/lib/services/load-balancers.d.ts +2 -2
  98. package/lib/services/load-balancers.d.ts.map +1 -1
  99. package/lib/services/load-balancers.js +14 -11
  100. package/lib/services/load-balancers.js.map +1 -1
  101. package/lib/services/logpush.d.ts +157 -64
  102. package/lib/services/logpush.d.ts.map +1 -1
  103. package/lib/services/logpush.js +292 -63
  104. package/lib/services/logpush.js.map +1 -1
  105. package/lib/services/magic-cloud-networking.d.ts +2 -2
  106. package/lib/services/magic-cloud-networking.d.ts.map +1 -1
  107. package/lib/services/magic-cloud-networking.js +14 -11
  108. package/lib/services/magic-cloud-networking.js.map +1 -1
  109. package/lib/services/memberships.d.ts +2 -2
  110. package/lib/services/memberships.d.ts.map +1 -1
  111. package/lib/services/memberships.js +14 -11
  112. package/lib/services/memberships.js.map +1 -1
  113. package/lib/services/origin-ca-certificates.d.ts +2 -2
  114. package/lib/services/origin-ca-certificates.d.ts.map +1 -1
  115. package/lib/services/origin-ca-certificates.js +14 -11
  116. package/lib/services/origin-ca-certificates.js.map +1 -1
  117. package/lib/services/pages.d.ts +4 -4
  118. package/lib/services/pages.d.ts.map +1 -1
  119. package/lib/services/pages.js +28 -22
  120. package/lib/services/pages.js.map +1 -1
  121. package/lib/services/queues.d.ts +2 -2
  122. package/lib/services/queues.d.ts.map +1 -1
  123. package/lib/services/queues.js +14 -11
  124. package/lib/services/queues.js.map +1 -1
  125. package/lib/services/r2.d.ts +97 -2
  126. package/lib/services/r2.d.ts.map +1 -1
  127. package/lib/services/r2.js +125 -6
  128. package/lib/services/r2.js.map +1 -1
  129. package/lib/services/radar.d.ts +4 -4
  130. package/lib/services/radar.d.ts.map +1 -1
  131. package/lib/services/radar.js +28 -22
  132. package/lib/services/radar.js.map +1 -1
  133. package/lib/services/rate-limits.d.ts +2 -2
  134. package/lib/services/rate-limits.d.ts.map +1 -1
  135. package/lib/services/rate-limits.js +14 -11
  136. package/lib/services/rate-limits.js.map +1 -1
  137. package/lib/services/resource-sharing.d.ts +6 -6
  138. package/lib/services/resource-sharing.d.ts.map +1 -1
  139. package/lib/services/resource-sharing.js +42 -33
  140. package/lib/services/resource-sharing.js.map +1 -1
  141. package/lib/services/rules.d.ts +2 -2
  142. package/lib/services/rules.d.ts.map +1 -1
  143. package/lib/services/rules.js +11 -8
  144. package/lib/services/rules.js.map +1 -1
  145. package/lib/services/rulesets.d.ts +202 -67
  146. package/lib/services/rulesets.d.ts.map +1 -1
  147. package/lib/services/rulesets.js +383 -84
  148. package/lib/services/rulesets.js.map +1 -1
  149. package/lib/services/rum.d.ts +2 -2
  150. package/lib/services/rum.d.ts.map +1 -1
  151. package/lib/services/rum.js +14 -11
  152. package/lib/services/rum.js.map +1 -1
  153. package/lib/services/schema-validation.d.ts +4 -4
  154. package/lib/services/schema-validation.d.ts.map +1 -1
  155. package/lib/services/schema-validation.js +28 -22
  156. package/lib/services/schema-validation.js.map +1 -1
  157. package/lib/services/secrets-store.d.ts +4 -4
  158. package/lib/services/secrets-store.d.ts.map +1 -1
  159. package/lib/services/secrets-store.js +28 -22
  160. package/lib/services/secrets-store.js.map +1 -1
  161. package/lib/services/security-center.d.ts +68 -21
  162. package/lib/services/security-center.d.ts.map +1 -1
  163. package/lib/services/security-center.js +142 -33
  164. package/lib/services/security-center.js.map +1 -1
  165. package/lib/services/snippets.d.ts +2 -2
  166. package/lib/services/snippets.d.ts.map +1 -1
  167. package/lib/services/snippets.js +14 -11
  168. package/lib/services/snippets.js.map +1 -1
  169. package/lib/services/spectrum.d.ts +2 -2
  170. package/lib/services/spectrum.d.ts.map +1 -1
  171. package/lib/services/spectrum.js +14 -11
  172. package/lib/services/spectrum.js.map +1 -1
  173. package/lib/services/speed.d.ts +2 -2
  174. package/lib/services/speed.d.ts.map +1 -1
  175. package/lib/services/speed.js +14 -11
  176. package/lib/services/speed.js.map +1 -1
  177. package/lib/services/token-validation.d.ts +4 -4
  178. package/lib/services/token-validation.d.ts.map +1 -1
  179. package/lib/services/token-validation.js +28 -22
  180. package/lib/services/token-validation.js.map +1 -1
  181. package/lib/services/turnstile.d.ts +2 -2
  182. package/lib/services/turnstile.d.ts.map +1 -1
  183. package/lib/services/turnstile.js +14 -11
  184. package/lib/services/turnstile.js.map +1 -1
  185. package/lib/services/user.d.ts +8 -8
  186. package/lib/services/user.d.ts.map +1 -1
  187. package/lib/services/user.js +56 -44
  188. package/lib/services/user.js.map +1 -1
  189. package/lib/services/waiting-rooms.d.ts +18 -7
  190. package/lib/services/waiting-rooms.d.ts.map +1 -1
  191. package/lib/services/waiting-rooms.js +53 -29
  192. package/lib/services/waiting-rooms.js.map +1 -1
  193. package/lib/services/workers.d.ts +17 -17
  194. package/lib/services/workers.d.ts.map +1 -1
  195. package/lib/services/workers.js +53 -44
  196. package/lib/services/workers.js.map +1 -1
  197. package/lib/services/workflows.d.ts +6 -6
  198. package/lib/services/workflows.d.ts.map +1 -1
  199. package/lib/services/workflows.js +42 -33
  200. package/lib/services/workflows.js.map +1 -1
  201. package/lib/services/zero-trust.d.ts +639 -264
  202. package/lib/services/zero-trust.d.ts.map +1 -1
  203. package/lib/services/zero-trust.js +1575 -594
  204. package/lib/services/zero-trust.js.map +1 -1
  205. package/lib/services/zones.d.ts +2 -2
  206. package/lib/services/zones.d.ts.map +1 -1
  207. package/lib/services/zones.js +14 -11
  208. package/lib/services/zones.js.map +1 -1
  209. package/package.json +2 -2
  210. package/src/schemas.ts +19 -17
  211. package/src/services/abuse-reports.ts +42 -28
  212. package/src/services/accounts.ts +94 -67
  213. package/src/services/ai-gateway.ts +101 -70
  214. package/src/services/ai.ts +19 -14
  215. package/src/services/alerting.ts +19 -14
  216. package/src/services/api-gateway.ts +105 -70
  217. package/src/services/audit-logs.ts +19 -14
  218. package/src/services/client-certificates.ts +21 -14
  219. package/src/services/custom-certificates.ts +21 -14
  220. package/src/services/custom-hostnames.ts +21 -14
  221. package/src/services/custom-pages.ts +170 -66
  222. package/src/services/d1.ts +19 -14
  223. package/src/services/dns-firewall.ts +21 -14
  224. package/src/services/dns.ts +40 -28
  225. package/src/services/durable-objects.ts +39 -25
  226. package/src/services/email-routing.ts +38 -28
  227. package/src/services/email-security.ts +147 -98
  228. package/src/services/filters.ts +19 -14
  229. package/src/services/firewall.ts +462 -233
  230. package/src/services/healthchecks.ts +21 -14
  231. package/src/services/images.ts +19 -14
  232. package/src/services/intel.ts +44 -28
  233. package/src/services/kv.ts +39 -25
  234. package/src/services/load-balancers.ts +19 -14
  235. package/src/services/logpush.ts +798 -372
  236. package/src/services/magic-cloud-networking.ts +19 -14
  237. package/src/services/memberships.ts +21 -14
  238. package/src/services/origin-ca-certificates.ts +21 -14
  239. package/src/services/pages.ts +40 -28
  240. package/src/services/queues.ts +21 -14
  241. package/src/services/r2.ts +307 -9
  242. package/src/services/radar.ts +42 -28
  243. package/src/services/rate-limits.ts +21 -14
  244. package/src/services/resource-sharing.ts +61 -42
  245. package/src/services/rules.ts +18 -11
  246. package/src/services/rulesets.ts +3990 -3420
  247. package/src/services/rum.ts +19 -14
  248. package/src/services/schema-validation.ts +40 -28
  249. package/src/services/secrets-store.ts +40 -28
  250. package/src/services/security-center.ts +266 -77
  251. package/src/services/snippets.ts +19 -14
  252. package/src/services/spectrum.ts +19 -14
  253. package/src/services/speed.ts +19 -14
  254. package/src/services/token-validation.ts +40 -28
  255. package/src/services/turnstile.ts +19 -14
  256. package/src/services/user.ts +80 -56
  257. package/src/services/waiting-rooms.ts +89 -39
  258. package/src/services/workers.ts +85 -64
  259. package/src/services/workflows.ts +57 -42
  260. package/src/services/zero-trust.ts +4536 -2654
  261. package/src/services/zones.ts +19 -14
@@ -16,7 +16,22 @@ import { type DefaultErrors } from "../errors.ts";
16
16
  // CustomPage
17
17
  // =============================================================================
18
18
 
19
- export interface GetCustomPageRequest {
19
+ const GetCustomPageBaseFields = {
20
+ identifier: Schema.Literals([
21
+ "1000_errors",
22
+ "500_errors",
23
+ "basic_challenge",
24
+ "country_challenge",
25
+ "ip_block",
26
+ "managed_challenge",
27
+ "ratelimit_block",
28
+ "under_attack",
29
+ "waf_block",
30
+ "waf_challenge",
31
+ ]).pipe(T.HttpPath("identifier")),
32
+ } as const;
33
+
34
+ interface GetCustomPageBaseRequest {
20
35
  identifier:
21
36
  | "1000_errors"
22
37
  | "500_errors"
@@ -30,25 +45,37 @@ export interface GetCustomPageRequest {
30
45
  | "waf_challenge";
31
46
  }
32
47
 
33
- export const GetCustomPageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
34
- identifier: Schema.Literals([
35
- "1000_errors",
36
- "500_errors",
37
- "basic_challenge",
38
- "country_challenge",
39
- "ip_block",
40
- "managed_challenge",
41
- "ratelimit_block",
42
- "under_attack",
43
- "waf_block",
44
- "waf_challenge",
45
- ]).pipe(T.HttpPath("identifier")),
46
- }).pipe(
47
- T.Http({
48
- method: "GET",
49
- path: "/{accountOrZone}/{accountOrZoneId}/custom_pages/{identifier}",
50
- }),
51
- ) as unknown as Schema.Schema<GetCustomPageRequest>;
48
+ export interface GetCustomPageForAccountRequest extends GetCustomPageBaseRequest {
49
+ /** Path param: The Account ID to use for this endpoint. */
50
+ accountId: string;
51
+ }
52
+
53
+ export interface GetCustomPageForZoneRequest extends GetCustomPageBaseRequest {
54
+ /** Path param: The Zone ID to use for this endpoint. */
55
+ zoneId: string;
56
+ }
57
+
58
+ export const GetCustomPageForAccountRequest =
59
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
60
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
61
+ ...GetCustomPageBaseFields,
62
+ }).pipe(
63
+ T.Http({
64
+ method: "GET",
65
+ path: "/accounts/{account_id}/custom_pages/{identifier}",
66
+ }),
67
+ ) as unknown as Schema.Schema<GetCustomPageForAccountRequest>;
68
+
69
+ export const GetCustomPageForZoneRequest =
70
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
71
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
72
+ ...GetCustomPageBaseFields,
73
+ }).pipe(
74
+ T.Http({
75
+ method: "GET",
76
+ path: "/zones/{zone_id}/custom_pages/{identifier}",
77
+ }),
78
+ ) as unknown as Schema.Schema<GetCustomPageForZoneRequest>;
52
79
 
53
80
  export interface GetCustomPageResponse {
54
81
  id?: string | null;
@@ -95,27 +122,57 @@ export const GetCustomPageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
95
122
 
96
123
  export type GetCustomPageError = DefaultErrors;
97
124
 
98
- export const getCustomPage: API.OperationMethod<
99
- GetCustomPageRequest,
125
+ export const getCustomPageForAccount: API.OperationMethod<
126
+ GetCustomPageForAccountRequest,
100
127
  GetCustomPageResponse,
101
128
  GetCustomPageError,
102
129
  Credentials | HttpClient.HttpClient
103
130
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
104
- input: GetCustomPageRequest,
131
+ input: GetCustomPageForAccountRequest,
105
132
  output: GetCustomPageResponse,
106
133
  errors: [],
107
134
  }));
108
135
 
109
- export interface ListCustomPagesRequest {}
136
+ export const getCustomPageForZone: API.OperationMethod<
137
+ GetCustomPageForZoneRequest,
138
+ GetCustomPageResponse,
139
+ GetCustomPageError,
140
+ Credentials | HttpClient.HttpClient
141
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
142
+ input: GetCustomPageForZoneRequest,
143
+ output: GetCustomPageResponse,
144
+ errors: [],
145
+ }));
110
146
 
111
- export const ListCustomPagesRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
112
- {},
113
- ).pipe(
114
- T.Http({
115
- method: "GET",
116
- path: "/{accountOrZone}/{accountOrZoneId}/custom_pages",
117
- }),
118
- ) as unknown as Schema.Schema<ListCustomPagesRequest>;
147
+ const ListCustomPagesBaseFields = {} as const;
148
+
149
+ interface ListCustomPagesBaseRequest {}
150
+
151
+ export interface ListCustomPagesForAccountRequest extends ListCustomPagesBaseRequest {
152
+ /** Path param: The Account ID to use for this endpoint. */
153
+ accountId: string;
154
+ }
155
+
156
+ export interface ListCustomPagesForZoneRequest extends ListCustomPagesBaseRequest {
157
+ /** Path param: The Zone ID to use for this endpoint. */
158
+ zoneId: string;
159
+ }
160
+
161
+ export const ListCustomPagesForAccountRequest =
162
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
163
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
164
+ ...ListCustomPagesBaseFields,
165
+ }).pipe(
166
+ T.Http({ method: "GET", path: "/accounts/{account_id}/custom_pages" }),
167
+ ) as unknown as Schema.Schema<ListCustomPagesForAccountRequest>;
168
+
169
+ export const ListCustomPagesForZoneRequest =
170
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
171
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
172
+ ...ListCustomPagesBaseFields,
173
+ }).pipe(
174
+ T.Http({ method: "GET", path: "/zones/{zone_id}/custom_pages" }),
175
+ ) as unknown as Schema.Schema<ListCustomPagesForZoneRequest>;
119
176
 
120
177
  export interface ListCustomPagesResponse {
121
178
  result: {
@@ -170,13 +227,28 @@ export const ListCustomPagesResponse =
170
227
 
171
228
  export type ListCustomPagesError = DefaultErrors;
172
229
 
173
- export const listCustomPages: API.PaginatedOperationMethod<
174
- ListCustomPagesRequest,
230
+ export const listCustomPagesForAccount: API.PaginatedOperationMethod<
231
+ ListCustomPagesForAccountRequest,
232
+ ListCustomPagesResponse,
233
+ ListCustomPagesError,
234
+ Credentials | HttpClient.HttpClient
235
+ > = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
236
+ input: ListCustomPagesForAccountRequest,
237
+ output: ListCustomPagesResponse,
238
+ errors: [],
239
+ pagination: {
240
+ mode: "single",
241
+ items: "result",
242
+ } as const,
243
+ }));
244
+
245
+ export const listCustomPagesForZone: API.PaginatedOperationMethod<
246
+ ListCustomPagesForZoneRequest,
175
247
  ListCustomPagesResponse,
176
248
  ListCustomPagesError,
177
249
  Credentials | HttpClient.HttpClient
178
250
  > = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
179
- input: ListCustomPagesRequest,
251
+ input: ListCustomPagesForZoneRequest,
180
252
  output: ListCustomPagesResponse,
181
253
  errors: [],
182
254
  pagination: {
@@ -185,7 +257,24 @@ export const listCustomPages: API.PaginatedOperationMethod<
185
257
  } as const,
186
258
  }));
187
259
 
188
- export interface PutCustomPageRequest {
260
+ const PutCustomPageBaseFields = {
261
+ identifier: Schema.Literals([
262
+ "1000_errors",
263
+ "500_errors",
264
+ "basic_challenge",
265
+ "country_challenge",
266
+ "ip_block",
267
+ "managed_challenge",
268
+ "ratelimit_block",
269
+ "under_attack",
270
+ "waf_block",
271
+ "waf_challenge",
272
+ ]).pipe(T.HttpPath("identifier")),
273
+ state: Schema.Literals(["default", "customized"]),
274
+ url: Schema.String,
275
+ } as const;
276
+
277
+ interface PutCustomPageBaseRequest {
189
278
  identifier:
190
279
  | "1000_errors"
191
280
  | "500_errors"
@@ -197,39 +286,43 @@ export interface PutCustomPageRequest {
197
286
  | "under_attack"
198
287
  | "waf_block"
199
288
  | "waf_challenge";
200
- /** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
201
- accountId?: string;
202
- /** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
203
- zoneId?: string;
204
289
  /** Body param: The custom page state. */
205
290
  state: "default" | "customized";
206
291
  /** Body param: The URL associated with the custom page. */
207
292
  url: string;
208
293
  }
209
294
 
210
- export const PutCustomPageRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
211
- identifier: Schema.Literals([
212
- "1000_errors",
213
- "500_errors",
214
- "basic_challenge",
215
- "country_challenge",
216
- "ip_block",
217
- "managed_challenge",
218
- "ratelimit_block",
219
- "under_attack",
220
- "waf_block",
221
- "waf_challenge",
222
- ]).pipe(T.HttpPath("identifier")),
223
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
224
- zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
225
- state: Schema.Literals(["default", "customized"]),
226
- url: Schema.String,
227
- }).pipe(
228
- T.Http({
229
- method: "PUT",
230
- path: "/{accountOrZone}/{accountOrZoneId}/custom_pages/{identifier}",
231
- }),
232
- ) as unknown as Schema.Schema<PutCustomPageRequest>;
295
+ export interface PutCustomPageForAccountRequest extends PutCustomPageBaseRequest {
296
+ /** Path param: The Account ID to use for this endpoint. */
297
+ accountId: string;
298
+ }
299
+
300
+ export interface PutCustomPageForZoneRequest extends PutCustomPageBaseRequest {
301
+ /** Path param: The Zone ID to use for this endpoint. */
302
+ zoneId: string;
303
+ }
304
+
305
+ export const PutCustomPageForAccountRequest =
306
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
307
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
308
+ ...PutCustomPageBaseFields,
309
+ }).pipe(
310
+ T.Http({
311
+ method: "PUT",
312
+ path: "/accounts/{account_id}/custom_pages/{identifier}",
313
+ }),
314
+ ) as unknown as Schema.Schema<PutCustomPageForAccountRequest>;
315
+
316
+ export const PutCustomPageForZoneRequest =
317
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
318
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
319
+ ...PutCustomPageBaseFields,
320
+ }).pipe(
321
+ T.Http({
322
+ method: "PUT",
323
+ path: "/zones/{zone_id}/custom_pages/{identifier}",
324
+ }),
325
+ ) as unknown as Schema.Schema<PutCustomPageForZoneRequest>;
233
326
 
234
327
  export interface PutCustomPageResponse {
235
328
  id?: string | null;
@@ -276,13 +369,24 @@ export const PutCustomPageResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
276
369
 
277
370
  export type PutCustomPageError = DefaultErrors;
278
371
 
279
- export const putCustomPage: API.OperationMethod<
280
- PutCustomPageRequest,
372
+ export const putCustomPageForAccount: API.OperationMethod<
373
+ PutCustomPageForAccountRequest,
374
+ PutCustomPageResponse,
375
+ PutCustomPageError,
376
+ Credentials | HttpClient.HttpClient
377
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
378
+ input: PutCustomPageForAccountRequest,
379
+ output: PutCustomPageResponse,
380
+ errors: [],
381
+ }));
382
+
383
+ export const putCustomPageForZone: API.OperationMethod<
384
+ PutCustomPageForZoneRequest,
281
385
  PutCustomPageResponse,
282
386
  PutCustomPageError,
283
387
  Credentials | HttpClient.HttpClient
284
388
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
285
- input: PutCustomPageRequest,
389
+ input: PutCustomPageForZoneRequest,
286
390
  output: PutCustomPageResponse,
287
391
  errors: [],
288
392
  }));
@@ -158,12 +158,12 @@ export interface ListDatabasesResponse {
158
158
  uuid?: string | null;
159
159
  version?: string | null;
160
160
  }[];
161
- resultInfo: {
161
+ resultInfo?: {
162
162
  count?: number | null;
163
163
  page?: number | null;
164
164
  perPage?: number | null;
165
165
  totalCount?: number | null;
166
- };
166
+ } | null;
167
167
  }
168
168
 
169
169
  export const ListDatabasesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
@@ -182,18 +182,23 @@ export const ListDatabasesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
182
182
  }),
183
183
  ),
184
184
  ),
185
- resultInfo: Schema.Struct({
186
- count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
187
- page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
188
- perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
189
- totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
190
- }).pipe(
191
- Schema.encodeKeys({
192
- count: "count",
193
- page: "page",
194
- perPage: "per_page",
195
- totalCount: "total_count",
196
- }),
185
+ resultInfo: Schema.optional(
186
+ Schema.Union([
187
+ Schema.Struct({
188
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
189
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
190
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
191
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
192
+ }).pipe(
193
+ Schema.encodeKeys({
194
+ count: "count",
195
+ page: "page",
196
+ perPage: "per_page",
197
+ totalCount: "total_count",
198
+ }),
199
+ ),
200
+ Schema.Null,
201
+ ]),
197
202
  ),
198
203
  }).pipe(
199
204
  Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
@@ -465,12 +465,12 @@ export interface ListDnsFirewallsResponse {
465
465
  onlyWhenUpstreamUnhealthy?: boolean | null;
466
466
  } | null;
467
467
  }[];
468
- resultInfo: {
468
+ resultInfo?: {
469
469
  count?: number | null;
470
470
  page?: number | null;
471
471
  perPage?: number | null;
472
472
  totalCount?: number | null;
473
- };
473
+ } | null;
474
474
  }
475
475
 
476
476
  export const ListDnsFirewallsResponse =
@@ -525,18 +525,25 @@ export const ListDnsFirewallsResponse =
525
525
  }),
526
526
  ),
527
527
  ),
528
- resultInfo: Schema.Struct({
529
- count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
530
- page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
531
- perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
532
- totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
533
- }).pipe(
534
- Schema.encodeKeys({
535
- count: "count",
536
- page: "page",
537
- perPage: "per_page",
538
- totalCount: "total_count",
539
- }),
528
+ resultInfo: Schema.optional(
529
+ Schema.Union([
530
+ Schema.Struct({
531
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
532
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
533
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
534
+ totalCount: Schema.optional(
535
+ Schema.Union([Schema.Number, Schema.Null]),
536
+ ),
537
+ }).pipe(
538
+ Schema.encodeKeys({
539
+ count: "count",
540
+ page: "page",
541
+ perPage: "per_page",
542
+ totalCount: "total_count",
543
+ }),
544
+ ),
545
+ Schema.Null,
546
+ ]),
540
547
  ),
541
548
  }).pipe(
542
549
  Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
@@ -5276,12 +5276,12 @@ export interface ListRecordsResponse {
5276
5276
  tagsModifiedOn?: string | null;
5277
5277
  }
5278
5278
  )[];
5279
- resultInfo: {
5279
+ resultInfo?: {
5280
5280
  count?: number | null;
5281
5281
  page?: number | null;
5282
5282
  perPage?: number | null;
5283
5283
  totalCount?: number | null;
5284
- };
5284
+ } | null;
5285
5285
  }
5286
5286
 
5287
5287
  export const ListRecordsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
@@ -6817,18 +6817,23 @@ export const ListRecordsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
6817
6817
  ),
6818
6818
  ]),
6819
6819
  ),
6820
- resultInfo: Schema.Struct({
6821
- count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
6822
- page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
6823
- perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
6824
- totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
6825
- }).pipe(
6826
- Schema.encodeKeys({
6827
- count: "count",
6828
- page: "page",
6829
- perPage: "per_page",
6830
- totalCount: "total_count",
6831
- }),
6820
+ resultInfo: Schema.optional(
6821
+ Schema.Union([
6822
+ Schema.Struct({
6823
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
6824
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
6825
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
6826
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
6827
+ }).pipe(
6828
+ Schema.encodeKeys({
6829
+ count: "count",
6830
+ page: "page",
6831
+ perPage: "per_page",
6832
+ totalCount: "total_count",
6833
+ }),
6834
+ ),
6835
+ Schema.Null,
6836
+ ]),
6832
6837
  ),
6833
6838
  }).pipe(
6834
6839
  Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
@@ -27723,12 +27728,12 @@ export interface ListSettingAccountViewsResponse {
27723
27728
  name: string;
27724
27729
  zones: string[];
27725
27730
  }[];
27726
- resultInfo: {
27731
+ resultInfo?: {
27727
27732
  count?: number | null;
27728
27733
  page?: number | null;
27729
27734
  perPage?: number | null;
27730
27735
  totalCount?: number | null;
27731
- };
27736
+ } | null;
27732
27737
  }
27733
27738
 
27734
27739
  export const ListSettingAccountViewsResponse =
@@ -27750,18 +27755,25 @@ export const ListSettingAccountViewsResponse =
27750
27755
  }),
27751
27756
  ),
27752
27757
  ),
27753
- resultInfo: Schema.Struct({
27754
- count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
27755
- page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
27756
- perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
27757
- totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
27758
- }).pipe(
27759
- Schema.encodeKeys({
27760
- count: "count",
27761
- page: "page",
27762
- perPage: "per_page",
27763
- totalCount: "total_count",
27764
- }),
27758
+ resultInfo: Schema.optional(
27759
+ Schema.Union([
27760
+ Schema.Struct({
27761
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
27762
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
27763
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
27764
+ totalCount: Schema.optional(
27765
+ Schema.Union([Schema.Number, Schema.Null]),
27766
+ ),
27767
+ }).pipe(
27768
+ Schema.encodeKeys({
27769
+ count: "count",
27770
+ page: "page",
27771
+ perPage: "per_page",
27772
+ totalCount: "total_count",
27773
+ }),
27774
+ ),
27775
+ Schema.Null,
27776
+ ]),
27765
27777
  ),
27766
27778
  }).pipe(
27767
27779
  Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
@@ -64,12 +64,12 @@ export interface ListNamespacesResponse {
64
64
  script?: string | null;
65
65
  useSqlite?: boolean | null;
66
66
  }[];
67
- resultInfo: {
67
+ resultInfo?: {
68
68
  count?: number | null;
69
69
  page?: number | null;
70
70
  perPage?: number | null;
71
71
  totalCount?: number | null;
72
- };
72
+ } | null;
73
73
  }
74
74
 
75
75
  export const ListNamespacesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
@@ -91,18 +91,25 @@ export const ListNamespacesResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
91
91
  }),
92
92
  ),
93
93
  ),
94
- resultInfo: Schema.Struct({
95
- count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
96
- page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
97
- perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
98
- totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
99
- }).pipe(
100
- Schema.encodeKeys({
101
- count: "count",
102
- page: "page",
103
- perPage: "per_page",
104
- totalCount: "total_count",
105
- }),
94
+ resultInfo: Schema.optional(
95
+ Schema.Union([
96
+ Schema.Struct({
97
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
98
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
99
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
100
+ totalCount: Schema.optional(
101
+ Schema.Union([Schema.Number, Schema.Null]),
102
+ ),
103
+ }).pipe(
104
+ Schema.encodeKeys({
105
+ count: "count",
106
+ page: "page",
107
+ perPage: "per_page",
108
+ totalCount: "total_count",
109
+ }),
110
+ ),
111
+ Schema.Null,
112
+ ]),
106
113
  ),
107
114
  },
108
115
  ).pipe(
@@ -157,7 +164,7 @@ export const ListNamespaceObjectsRequest =
157
164
 
158
165
  export interface ListNamespaceObjectsResponse {
159
166
  result: { id?: string | null; hasStoredData?: boolean | null }[];
160
- resultInfo: { cursors?: { after?: string | null } | null };
167
+ resultInfo?: { cursors?: { after?: string | null } | null } | null;
161
168
  }
162
169
 
163
170
  export const ListNamespaceObjectsResponse =
@@ -170,16 +177,23 @@ export const ListNamespaceObjectsResponse =
170
177
  ),
171
178
  }),
172
179
  ),
173
- resultInfo: Schema.Struct({
174
- cursors: Schema.optional(
175
- Schema.Union([
176
- Schema.Struct({
177
- after: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
178
- }),
179
- Schema.Null,
180
- ]),
181
- ),
182
- }),
180
+ resultInfo: Schema.optional(
181
+ Schema.Union([
182
+ Schema.Struct({
183
+ cursors: Schema.optional(
184
+ Schema.Union([
185
+ Schema.Struct({
186
+ after: Schema.optional(
187
+ Schema.Union([Schema.String, Schema.Null]),
188
+ ),
189
+ }),
190
+ Schema.Null,
191
+ ]),
192
+ ),
193
+ }),
194
+ Schema.Null,
195
+ ]),
196
+ ),
183
197
  }).pipe(
184
198
  Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
185
199
  ) as unknown as Schema.Schema<ListNamespaceObjectsResponse>;