@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,43 @@ import { type DefaultErrors } from "../errors.ts";
16
16
  // DatasetField
17
17
  // =============================================================================
18
18
 
19
- export interface GetDatasetFieldRequest {
19
+ const GetDatasetFieldBaseFields = {
20
+ datasetId: Schema.Union([
21
+ Schema.Literal("access_requests"),
22
+ Schema.Literal("audit_logs"),
23
+ Schema.Literal("audit_logs_v2"),
24
+ Schema.Literal("biso_user_actions"),
25
+ Schema.Literal("casb_findings"),
26
+ Schema.Literal("device_posture_results"),
27
+ Schema.Literal("dex_application_tests"),
28
+ Schema.Literal("dex_device_state_events"),
29
+ Schema.Literal("dlp_forensic_copies"),
30
+ Schema.Literal("dns_firewall_logs"),
31
+ Schema.Literal("dns_logs"),
32
+ Schema.Literal("email_security_alerts"),
33
+ Schema.Literal("firewall_events"),
34
+ Schema.Literal("gateway_dns"),
35
+ Schema.Literal("gateway_http"),
36
+ Schema.Literal("gateway_network"),
37
+ Schema.Literal("http_requests"),
38
+ Schema.Literal("ipsec_logs"),
39
+ Schema.Literal("magic_ids_detections"),
40
+ Schema.Literal("nel_reports"),
41
+ Schema.Literal("network_analytics_logs"),
42
+ Schema.Literal("page_shield_events"),
43
+ Schema.Literal("sinkhole_http_logs"),
44
+ Schema.Literal("spectrum_events"),
45
+ Schema.Literal("ssh_logs"),
46
+ Schema.Literal("warp_config_changes"),
47
+ Schema.Literal("warp_toggle_changes"),
48
+ Schema.Literal("workers_trace_events"),
49
+ Schema.Literal("zaraz_events"),
50
+ Schema.Literal("zero_trust_network_sessions"),
51
+ Schema.Null,
52
+ ]).pipe(T.HttpPath("datasetId")),
53
+ } as const;
54
+
55
+ interface GetDatasetFieldBaseRequest {
20
56
  datasetId:
21
57
  | "access_requests"
22
58
  | "audit_logs"
@@ -51,48 +87,37 @@ export interface GetDatasetFieldRequest {
51
87
  | null;
52
88
  }
53
89
 
54
- export const GetDatasetFieldRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
55
- {
56
- datasetId: Schema.Union([
57
- Schema.Literal("access_requests"),
58
- Schema.Literal("audit_logs"),
59
- Schema.Literal("audit_logs_v2"),
60
- Schema.Literal("biso_user_actions"),
61
- Schema.Literal("casb_findings"),
62
- Schema.Literal("device_posture_results"),
63
- Schema.Literal("dex_application_tests"),
64
- Schema.Literal("dex_device_state_events"),
65
- Schema.Literal("dlp_forensic_copies"),
66
- Schema.Literal("dns_firewall_logs"),
67
- Schema.Literal("dns_logs"),
68
- Schema.Literal("email_security_alerts"),
69
- Schema.Literal("firewall_events"),
70
- Schema.Literal("gateway_dns"),
71
- Schema.Literal("gateway_http"),
72
- Schema.Literal("gateway_network"),
73
- Schema.Literal("http_requests"),
74
- Schema.Literal("ipsec_logs"),
75
- Schema.Literal("magic_ids_detections"),
76
- Schema.Literal("nel_reports"),
77
- Schema.Literal("network_analytics_logs"),
78
- Schema.Literal("page_shield_events"),
79
- Schema.Literal("sinkhole_http_logs"),
80
- Schema.Literal("spectrum_events"),
81
- Schema.Literal("ssh_logs"),
82
- Schema.Literal("warp_config_changes"),
83
- Schema.Literal("warp_toggle_changes"),
84
- Schema.Literal("workers_trace_events"),
85
- Schema.Literal("zaraz_events"),
86
- Schema.Literal("zero_trust_network_sessions"),
87
- Schema.Null,
88
- ]).pipe(T.HttpPath("datasetId")),
89
- },
90
- ).pipe(
91
- T.Http({
92
- method: "GET",
93
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/datasets/{datasetId}/fields",
94
- }),
95
- ) as unknown as Schema.Schema<GetDatasetFieldRequest>;
90
+ export interface GetDatasetFieldForAccountRequest extends GetDatasetFieldBaseRequest {
91
+ /** Path param: The Account ID to use for this endpoint. */
92
+ accountId: string;
93
+ }
94
+
95
+ export interface GetDatasetFieldForZoneRequest extends GetDatasetFieldBaseRequest {
96
+ /** Path param: The Zone ID to use for this endpoint. */
97
+ zoneId: string;
98
+ }
99
+
100
+ export const GetDatasetFieldForAccountRequest =
101
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
102
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
103
+ ...GetDatasetFieldBaseFields,
104
+ }).pipe(
105
+ T.Http({
106
+ method: "GET",
107
+ path: "/accounts/{account_id}/logpush/datasets/{datasetId}/fields",
108
+ }),
109
+ ) as unknown as Schema.Schema<GetDatasetFieldForAccountRequest>;
110
+
111
+ export const GetDatasetFieldForZoneRequest =
112
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
113
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
114
+ ...GetDatasetFieldBaseFields,
115
+ }).pipe(
116
+ T.Http({
117
+ method: "GET",
118
+ path: "/zones/{zone_id}/logpush/datasets/{datasetId}/fields",
119
+ }),
120
+ ) as unknown as Schema.Schema<GetDatasetFieldForZoneRequest>;
96
121
 
97
122
  export type GetDatasetFieldResponse = unknown;
98
123
 
@@ -103,13 +128,24 @@ export const GetDatasetFieldResponse =
103
128
 
104
129
  export type GetDatasetFieldError = DefaultErrors;
105
130
 
106
- export const getDatasetField: API.OperationMethod<
107
- GetDatasetFieldRequest,
131
+ export const getDatasetFieldForAccount: API.OperationMethod<
132
+ GetDatasetFieldForAccountRequest,
133
+ GetDatasetFieldResponse,
134
+ GetDatasetFieldError,
135
+ Credentials | HttpClient.HttpClient
136
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
137
+ input: GetDatasetFieldForAccountRequest,
138
+ output: GetDatasetFieldResponse,
139
+ errors: [],
140
+ }));
141
+
142
+ export const getDatasetFieldForZone: API.OperationMethod<
143
+ GetDatasetFieldForZoneRequest,
108
144
  GetDatasetFieldResponse,
109
145
  GetDatasetFieldError,
110
146
  Credentials | HttpClient.HttpClient
111
147
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
112
- input: GetDatasetFieldRequest,
148
+ input: GetDatasetFieldForZoneRequest,
113
149
  output: GetDatasetFieldResponse,
114
150
  errors: [],
115
151
  }));
@@ -118,7 +154,43 @@ export const getDatasetField: API.OperationMethod<
118
154
  // DatasetJob
119
155
  // =============================================================================
120
156
 
121
- export interface GetDatasetJobRequest {
157
+ const GetDatasetJobBaseFields = {
158
+ datasetId: Schema.Union([
159
+ Schema.Literal("access_requests"),
160
+ Schema.Literal("audit_logs"),
161
+ Schema.Literal("audit_logs_v2"),
162
+ Schema.Literal("biso_user_actions"),
163
+ Schema.Literal("casb_findings"),
164
+ Schema.Literal("device_posture_results"),
165
+ Schema.Literal("dex_application_tests"),
166
+ Schema.Literal("dex_device_state_events"),
167
+ Schema.Literal("dlp_forensic_copies"),
168
+ Schema.Literal("dns_firewall_logs"),
169
+ Schema.Literal("dns_logs"),
170
+ Schema.Literal("email_security_alerts"),
171
+ Schema.Literal("firewall_events"),
172
+ Schema.Literal("gateway_dns"),
173
+ Schema.Literal("gateway_http"),
174
+ Schema.Literal("gateway_network"),
175
+ Schema.Literal("http_requests"),
176
+ Schema.Literal("ipsec_logs"),
177
+ Schema.Literal("magic_ids_detections"),
178
+ Schema.Literal("nel_reports"),
179
+ Schema.Literal("network_analytics_logs"),
180
+ Schema.Literal("page_shield_events"),
181
+ Schema.Literal("sinkhole_http_logs"),
182
+ Schema.Literal("spectrum_events"),
183
+ Schema.Literal("ssh_logs"),
184
+ Schema.Literal("warp_config_changes"),
185
+ Schema.Literal("warp_toggle_changes"),
186
+ Schema.Literal("workers_trace_events"),
187
+ Schema.Literal("zaraz_events"),
188
+ Schema.Literal("zero_trust_network_sessions"),
189
+ Schema.Null,
190
+ ]).pipe(T.HttpPath("datasetId")),
191
+ } as const;
192
+
193
+ interface GetDatasetJobBaseRequest {
122
194
  datasetId:
123
195
  | "access_requests"
124
196
  | "audit_logs"
@@ -153,46 +225,37 @@ export interface GetDatasetJobRequest {
153
225
  | null;
154
226
  }
155
227
 
156
- export const GetDatasetJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
157
- datasetId: Schema.Union([
158
- Schema.Literal("access_requests"),
159
- Schema.Literal("audit_logs"),
160
- Schema.Literal("audit_logs_v2"),
161
- Schema.Literal("biso_user_actions"),
162
- Schema.Literal("casb_findings"),
163
- Schema.Literal("device_posture_results"),
164
- Schema.Literal("dex_application_tests"),
165
- Schema.Literal("dex_device_state_events"),
166
- Schema.Literal("dlp_forensic_copies"),
167
- Schema.Literal("dns_firewall_logs"),
168
- Schema.Literal("dns_logs"),
169
- Schema.Literal("email_security_alerts"),
170
- Schema.Literal("firewall_events"),
171
- Schema.Literal("gateway_dns"),
172
- Schema.Literal("gateway_http"),
173
- Schema.Literal("gateway_network"),
174
- Schema.Literal("http_requests"),
175
- Schema.Literal("ipsec_logs"),
176
- Schema.Literal("magic_ids_detections"),
177
- Schema.Literal("nel_reports"),
178
- Schema.Literal("network_analytics_logs"),
179
- Schema.Literal("page_shield_events"),
180
- Schema.Literal("sinkhole_http_logs"),
181
- Schema.Literal("spectrum_events"),
182
- Schema.Literal("ssh_logs"),
183
- Schema.Literal("warp_config_changes"),
184
- Schema.Literal("warp_toggle_changes"),
185
- Schema.Literal("workers_trace_events"),
186
- Schema.Literal("zaraz_events"),
187
- Schema.Literal("zero_trust_network_sessions"),
188
- Schema.Null,
189
- ]).pipe(T.HttpPath("datasetId")),
190
- }).pipe(
191
- T.Http({
192
- method: "GET",
193
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/datasets/{datasetId}/jobs",
194
- }),
195
- ) as unknown as Schema.Schema<GetDatasetJobRequest>;
228
+ export interface GetDatasetJobForAccountRequest extends GetDatasetJobBaseRequest {
229
+ /** Path param: The Account ID to use for this endpoint. */
230
+ accountId: string;
231
+ }
232
+
233
+ export interface GetDatasetJobForZoneRequest extends GetDatasetJobBaseRequest {
234
+ /** Path param: The Zone ID to use for this endpoint. */
235
+ zoneId: string;
236
+ }
237
+
238
+ export const GetDatasetJobForAccountRequest =
239
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
240
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
241
+ ...GetDatasetJobBaseFields,
242
+ }).pipe(
243
+ T.Http({
244
+ method: "GET",
245
+ path: "/accounts/{account_id}/logpush/datasets/{datasetId}/jobs",
246
+ }),
247
+ ) as unknown as Schema.Schema<GetDatasetJobForAccountRequest>;
248
+
249
+ export const GetDatasetJobForZoneRequest =
250
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
251
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
252
+ ...GetDatasetJobBaseFields,
253
+ }).pipe(
254
+ T.Http({
255
+ method: "GET",
256
+ path: "/zones/{zone_id}/logpush/datasets/{datasetId}/jobs",
257
+ }),
258
+ ) as unknown as Schema.Schema<GetDatasetJobForZoneRequest>;
196
259
 
197
260
  export interface GetDatasetJobResponse {
198
261
  result: ({
@@ -419,13 +482,28 @@ export const GetDatasetJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
419
482
 
420
483
  export type GetDatasetJobError = DefaultErrors;
421
484
 
422
- export const getDatasetJob: API.PaginatedOperationMethod<
423
- GetDatasetJobRequest,
485
+ export const getDatasetJobForAccount: API.PaginatedOperationMethod<
486
+ GetDatasetJobForAccountRequest,
424
487
  GetDatasetJobResponse,
425
488
  GetDatasetJobError,
426
489
  Credentials | HttpClient.HttpClient
427
490
  > = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
428
- input: GetDatasetJobRequest,
491
+ input: GetDatasetJobForAccountRequest,
492
+ output: GetDatasetJobResponse,
493
+ errors: [],
494
+ pagination: {
495
+ mode: "single",
496
+ items: "result",
497
+ } as const,
498
+ }));
499
+
500
+ export const getDatasetJobForZone: API.PaginatedOperationMethod<
501
+ GetDatasetJobForZoneRequest,
502
+ GetDatasetJobResponse,
503
+ GetDatasetJobError,
504
+ Credentials | HttpClient.HttpClient
505
+ > = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
506
+ input: GetDatasetJobForZoneRequest,
429
507
  output: GetDatasetJobResponse,
430
508
  errors: [],
431
509
  pagination: {
@@ -571,27 +649,48 @@ export const createEdge: API.OperationMethod<
571
649
  // ExistsValidate
572
650
  // =============================================================================
573
651
 
574
- export interface DestinationExistsValidateRequest {
575
- /** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
576
- accountId?: string;
577
- /** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
578
- zoneId?: string;
652
+ const DestinationExistsValidateBaseFields = {
653
+ destinationConf: Schema.String,
654
+ } as const;
655
+
656
+ interface DestinationExistsValidateBaseRequest {
579
657
  /** Body param: Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included. */
580
658
  destinationConf: string;
581
659
  }
582
660
 
583
- export const DestinationExistsValidateRequest =
661
+ export interface DestinationExistsValidateForAccountRequest extends DestinationExistsValidateBaseRequest {
662
+ /** Path param: The Account ID to use for this endpoint. */
663
+ accountId: string;
664
+ }
665
+
666
+ export interface DestinationExistsValidateForZoneRequest extends DestinationExistsValidateBaseRequest {
667
+ /** Path param: The Zone ID to use for this endpoint. */
668
+ zoneId: string;
669
+ }
670
+
671
+ export const DestinationExistsValidateForAccountRequest =
584
672
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
585
673
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
674
+ ...DestinationExistsValidateBaseFields,
675
+ }).pipe(
676
+ Schema.encodeKeys({ destinationConf: "destination_conf" }),
677
+ T.Http({
678
+ method: "POST",
679
+ path: "/accounts/{account_id}/logpush/validate/destination/exists",
680
+ }),
681
+ ) as unknown as Schema.Schema<DestinationExistsValidateForAccountRequest>;
682
+
683
+ export const DestinationExistsValidateForZoneRequest =
684
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
586
685
  zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
587
- destinationConf: Schema.String,
686
+ ...DestinationExistsValidateBaseFields,
588
687
  }).pipe(
589
688
  Schema.encodeKeys({ destinationConf: "destination_conf" }),
590
689
  T.Http({
591
690
  method: "POST",
592
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/validate/destination/exists",
691
+ path: "/zones/{zone_id}/logpush/validate/destination/exists",
593
692
  }),
594
- ) as unknown as Schema.Schema<DestinationExistsValidateRequest>;
693
+ ) as unknown as Schema.Schema<DestinationExistsValidateForZoneRequest>;
595
694
 
596
695
  export interface DestinationExistsValidateResponse {
597
696
  exists?: boolean | null;
@@ -606,13 +705,24 @@ export const DestinationExistsValidateResponse =
606
705
 
607
706
  export type DestinationExistsValidateError = DefaultErrors;
608
707
 
609
- export const destinationExistsValidate: API.OperationMethod<
610
- DestinationExistsValidateRequest,
708
+ export const destinationExistsValidateForAccount: API.OperationMethod<
709
+ DestinationExistsValidateForAccountRequest,
710
+ DestinationExistsValidateResponse,
711
+ DestinationExistsValidateError,
712
+ Credentials | HttpClient.HttpClient
713
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
714
+ input: DestinationExistsValidateForAccountRequest,
715
+ output: DestinationExistsValidateResponse,
716
+ errors: [],
717
+ }));
718
+
719
+ export const destinationExistsValidateForZone: API.OperationMethod<
720
+ DestinationExistsValidateForZoneRequest,
611
721
  DestinationExistsValidateResponse,
612
722
  DestinationExistsValidateError,
613
723
  Credentials | HttpClient.HttpClient
614
724
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
615
- input: DestinationExistsValidateRequest,
725
+ input: DestinationExistsValidateForZoneRequest,
616
726
  output: DestinationExistsValidateResponse,
617
727
  errors: [],
618
728
  }));
@@ -621,18 +731,41 @@ export const destinationExistsValidate: API.OperationMethod<
621
731
  // Job
622
732
  // =============================================================================
623
733
 
624
- export interface GetJobRequest {
734
+ const GetJobBaseFields = {
735
+ jobId: Schema.Number.pipe(T.HttpPath("jobId")),
736
+ } as const;
737
+
738
+ interface GetJobBaseRequest {
625
739
  jobId: number;
626
740
  }
627
741
 
628
- export const GetJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
629
- jobId: Schema.Number.pipe(T.HttpPath("jobId")),
742
+ export interface GetJobForAccountRequest extends GetJobBaseRequest {
743
+ /** Path param: The Account ID to use for this endpoint. */
744
+ accountId: string;
745
+ }
746
+
747
+ export interface GetJobForZoneRequest extends GetJobBaseRequest {
748
+ /** Path param: The Zone ID to use for this endpoint. */
749
+ zoneId: string;
750
+ }
751
+
752
+ export const GetJobForAccountRequest =
753
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
754
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
755
+ ...GetJobBaseFields,
756
+ }).pipe(
757
+ T.Http({
758
+ method: "GET",
759
+ path: "/accounts/{account_id}/logpush/jobs/{jobId}",
760
+ }),
761
+ ) as unknown as Schema.Schema<GetJobForAccountRequest>;
762
+
763
+ export const GetJobForZoneRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
764
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
765
+ ...GetJobBaseFields,
630
766
  }).pipe(
631
- T.Http({
632
- method: "GET",
633
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/jobs/{jobId}",
634
- }),
635
- ) as unknown as Schema.Schema<GetJobRequest>;
767
+ T.Http({ method: "GET", path: "/zones/{zone_id}/logpush/jobs/{jobId}" }),
768
+ ) as unknown as Schema.Schema<GetJobForZoneRequest>;
636
769
 
637
770
  export interface GetJobResponse {
638
771
  /** Unique id of the job. */
@@ -853,27 +986,58 @@ export const GetJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
853
986
 
854
987
  export type GetJobError = DefaultErrors;
855
988
 
856
- export const getJob: API.OperationMethod<
857
- GetJobRequest,
989
+ export const getJobForAccount: API.OperationMethod<
990
+ GetJobForAccountRequest,
991
+ GetJobResponse,
992
+ GetJobError,
993
+ Credentials | HttpClient.HttpClient
994
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
995
+ input: GetJobForAccountRequest,
996
+ output: GetJobResponse,
997
+ errors: [],
998
+ }));
999
+
1000
+ export const getJobForZone: API.OperationMethod<
1001
+ GetJobForZoneRequest,
858
1002
  GetJobResponse,
859
1003
  GetJobError,
860
1004
  Credentials | HttpClient.HttpClient
861
1005
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
862
- input: GetJobRequest,
1006
+ input: GetJobForZoneRequest,
863
1007
  output: GetJobResponse,
864
1008
  errors: [],
865
1009
  }));
866
1010
 
867
- export interface ListJobsRequest {}
1011
+ const ListJobsBaseFields = {} as const;
1012
+
1013
+ interface ListJobsBaseRequest {}
1014
+
1015
+ export interface ListJobsForAccountRequest extends ListJobsBaseRequest {
1016
+ /** Path param: The Account ID to use for this endpoint. */
1017
+ accountId: string;
1018
+ }
1019
+
1020
+ export interface ListJobsForZoneRequest extends ListJobsBaseRequest {
1021
+ /** Path param: The Zone ID to use for this endpoint. */
1022
+ zoneId: string;
1023
+ }
1024
+
1025
+ export const ListJobsForAccountRequest =
1026
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1027
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1028
+ ...ListJobsBaseFields,
1029
+ }).pipe(
1030
+ T.Http({ method: "GET", path: "/accounts/{account_id}/logpush/jobs" }),
1031
+ ) as unknown as Schema.Schema<ListJobsForAccountRequest>;
868
1032
 
869
- export const ListJobsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
870
- {},
1033
+ export const ListJobsForZoneRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1034
+ {
1035
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1036
+ ...ListJobsBaseFields,
1037
+ },
871
1038
  ).pipe(
872
- T.Http({
873
- method: "GET",
874
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/jobs",
875
- }),
876
- ) as unknown as Schema.Schema<ListJobsRequest>;
1039
+ T.Http({ method: "GET", path: "/zones/{zone_id}/logpush/jobs" }),
1040
+ ) as unknown as Schema.Schema<ListJobsForZoneRequest>;
877
1041
 
878
1042
  export interface ListJobsResponse {
879
1043
  result: ({
@@ -1100,13 +1264,13 @@ export const ListJobsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1100
1264
 
1101
1265
  export type ListJobsError = DefaultErrors;
1102
1266
 
1103
- export const listJobs: API.PaginatedOperationMethod<
1104
- ListJobsRequest,
1267
+ export const listJobsForAccount: API.PaginatedOperationMethod<
1268
+ ListJobsForAccountRequest,
1105
1269
  ListJobsResponse,
1106
1270
  ListJobsError,
1107
1271
  Credentials | HttpClient.HttpClient
1108
1272
  > = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
1109
- input: ListJobsRequest,
1273
+ input: ListJobsForAccountRequest,
1110
1274
  output: ListJobsResponse,
1111
1275
  errors: [],
1112
1276
  pagination: {
@@ -1115,86 +1279,22 @@ export const listJobs: API.PaginatedOperationMethod<
1115
1279
  } as const,
1116
1280
  }));
1117
1281
 
1118
- export interface CreateJobRequest {
1119
- /** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
1120
- accountId?: string;
1121
- /** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
1122
- zoneId?: string;
1123
- /** Body param: Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included. */
1124
- destinationConf: string;
1125
- /** Body param: Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). */
1126
- dataset?:
1127
- | "access_requests"
1128
- | "audit_logs"
1129
- | "audit_logs_v2"
1130
- | "biso_user_actions"
1131
- | "casb_findings"
1132
- | "device_posture_results"
1133
- | "dex_application_tests"
1134
- | "dex_device_state_events"
1135
- | "dlp_forensic_copies"
1136
- | "dns_firewall_logs"
1137
- | "dns_logs"
1138
- | "email_security_alerts"
1139
- | "firewall_events"
1140
- | "gateway_dns"
1141
- | "gateway_http"
1142
- | "gateway_network"
1143
- | "http_requests"
1144
- | "ipsec_logs"
1145
- | "magic_ids_detections"
1146
- | "nel_reports"
1147
- | "network_analytics_logs"
1148
- | "page_shield_events"
1149
- | "sinkhole_http_logs"
1150
- | "spectrum_events"
1151
- | "ssh_logs"
1152
- | "warp_config_changes"
1153
- | "warp_toggle_changes"
1154
- | "workers_trace_events"
1155
- | "zaraz_events"
1156
- | "zero_trust_network_sessions"
1157
- | null;
1158
- /** Body param: Flag that indicates if the job is enabled. */
1159
- enabled?: boolean;
1160
- /** Body param: The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/). */
1161
- filter?: string | null;
1162
- /** @deprecated Body param: This field is deprecated. Please use `max_upload_ ` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high */
1163
- frequency?: "high" | "low" | null;
1164
- /** Body param: The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset). */
1165
- kind?: "" | "edge";
1166
- /** @deprecated Body param: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api */
1167
- logpullOptions?: string | null;
1168
- /** Body param: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means */
1169
- maxUploadBytes?: "0" | number | null;
1170
- /** Body param: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log */
1171
- maxUploadIntervalSeconds?: "0" | number | null;
1172
- /** Body param: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch */
1173
- maxUploadRecords?: "0" | number | null;
1174
- /** Body param: Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job. */
1175
- name?: string | null;
1176
- /** Body param: The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored. */
1177
- outputOptions?: {
1178
- batchPrefix?: string | null;
1179
- batchSuffix?: string | null;
1180
- "cve-2021-44228"?: boolean | null;
1181
- fieldDelimiter?: string | null;
1182
- fieldNames?: string[];
1183
- outputType?: "ndjson" | "csv";
1184
- recordDelimiter?: string | null;
1185
- recordPrefix?: string | null;
1186
- recordSuffix?: string | null;
1187
- recordTemplate?: string | null;
1188
- sampleRate?: number | null;
1189
- timestampFormat?: "unixnano" | "unix" | "rfc3339";
1190
- } | null;
1191
- /** Body param: Ownership challenge token to prove destination ownership. */
1192
- ownershipChallenge?: string;
1193
- }
1282
+ export const listJobsForZone: API.PaginatedOperationMethod<
1283
+ ListJobsForZoneRequest,
1284
+ ListJobsResponse,
1285
+ ListJobsError,
1286
+ Credentials | HttpClient.HttpClient
1287
+ > = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
1288
+ input: ListJobsForZoneRequest,
1289
+ output: ListJobsResponse,
1290
+ errors: [],
1291
+ pagination: {
1292
+ mode: "single",
1293
+ items: "result",
1294
+ } as const,
1295
+ }));
1194
1296
 
1195
- export const CreateJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1196
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
1197
- zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1297
+ const CreateJobBaseFields = {
1198
1298
  destinationConf: Schema.String,
1199
1299
  dataset: Schema.optional(
1200
1300
  Schema.Union([
@@ -1301,27 +1401,136 @@ export const CreateJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1301
1401
  ]),
1302
1402
  ),
1303
1403
  ownershipChallenge: Schema.optional(Schema.String),
1304
- }).pipe(
1305
- Schema.encodeKeys({
1306
- destinationConf: "destination_conf",
1307
- dataset: "dataset",
1308
- enabled: "enabled",
1309
- filter: "filter",
1310
- frequency: "frequency",
1311
- kind: "kind",
1312
- logpullOptions: "logpull_options",
1313
- maxUploadBytes: "max_upload_bytes",
1314
- maxUploadIntervalSeconds: "max_upload_interval_seconds",
1315
- maxUploadRecords: "max_upload_records",
1316
- name: "name",
1317
- outputOptions: "output_options",
1318
- ownershipChallenge: "ownership_challenge",
1319
- }),
1320
- T.Http({
1321
- method: "POST",
1322
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/jobs",
1323
- }),
1324
- ) as unknown as Schema.Schema<CreateJobRequest>;
1404
+ } as const;
1405
+
1406
+ interface CreateJobBaseRequest {
1407
+ /** Body param: Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included. */
1408
+ destinationConf: string;
1409
+ /** Body param: Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/). */
1410
+ dataset?:
1411
+ | "access_requests"
1412
+ | "audit_logs"
1413
+ | "audit_logs_v2"
1414
+ | "biso_user_actions"
1415
+ | "casb_findings"
1416
+ | "device_posture_results"
1417
+ | "dex_application_tests"
1418
+ | "dex_device_state_events"
1419
+ | "dlp_forensic_copies"
1420
+ | "dns_firewall_logs"
1421
+ | "dns_logs"
1422
+ | "email_security_alerts"
1423
+ | "firewall_events"
1424
+ | "gateway_dns"
1425
+ | "gateway_http"
1426
+ | "gateway_network"
1427
+ | "http_requests"
1428
+ | "ipsec_logs"
1429
+ | "magic_ids_detections"
1430
+ | "nel_reports"
1431
+ | "network_analytics_logs"
1432
+ | "page_shield_events"
1433
+ | "sinkhole_http_logs"
1434
+ | "spectrum_events"
1435
+ | "ssh_logs"
1436
+ | "warp_config_changes"
1437
+ | "warp_toggle_changes"
1438
+ | "workers_trace_events"
1439
+ | "zaraz_events"
1440
+ | "zero_trust_network_sessions"
1441
+ | null;
1442
+ /** Body param: Flag that indicates if the job is enabled. */
1443
+ enabled?: boolean;
1444
+ /** Body param: The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/). */
1445
+ filter?: string | null;
1446
+ /** @deprecated Body param: This field is deprecated. Please use `max_upload_ ` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high */
1447
+ frequency?: "high" | "low" | null;
1448
+ /** Body param: The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset). */
1449
+ kind?: "" | "edge";
1450
+ /** @deprecated Body param: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api */
1451
+ logpullOptions?: string | null;
1452
+ /** Body param: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means */
1453
+ maxUploadBytes?: "0" | number | null;
1454
+ /** Body param: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log */
1455
+ maxUploadIntervalSeconds?: "0" | number | null;
1456
+ /** Body param: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch */
1457
+ maxUploadRecords?: "0" | number | null;
1458
+ /** Body param: Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job. */
1459
+ name?: string | null;
1460
+ /** Body param: The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored. */
1461
+ outputOptions?: {
1462
+ batchPrefix?: string | null;
1463
+ batchSuffix?: string | null;
1464
+ "cve-2021-44228"?: boolean | null;
1465
+ fieldDelimiter?: string | null;
1466
+ fieldNames?: string[];
1467
+ outputType?: "ndjson" | "csv";
1468
+ recordDelimiter?: string | null;
1469
+ recordPrefix?: string | null;
1470
+ recordSuffix?: string | null;
1471
+ recordTemplate?: string | null;
1472
+ sampleRate?: number | null;
1473
+ timestampFormat?: "unixnano" | "unix" | "rfc3339";
1474
+ } | null;
1475
+ /** Body param: Ownership challenge token to prove destination ownership. */
1476
+ ownershipChallenge?: string;
1477
+ }
1478
+
1479
+ export interface CreateJobForAccountRequest extends CreateJobBaseRequest {
1480
+ /** Path param: The Account ID to use for this endpoint. */
1481
+ accountId: string;
1482
+ }
1483
+
1484
+ export interface CreateJobForZoneRequest extends CreateJobBaseRequest {
1485
+ /** Path param: The Zone ID to use for this endpoint. */
1486
+ zoneId: string;
1487
+ }
1488
+
1489
+ export const CreateJobForAccountRequest =
1490
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1491
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1492
+ ...CreateJobBaseFields,
1493
+ }).pipe(
1494
+ Schema.encodeKeys({
1495
+ destinationConf: "destination_conf",
1496
+ dataset: "dataset",
1497
+ enabled: "enabled",
1498
+ filter: "filter",
1499
+ frequency: "frequency",
1500
+ kind: "kind",
1501
+ logpullOptions: "logpull_options",
1502
+ maxUploadBytes: "max_upload_bytes",
1503
+ maxUploadIntervalSeconds: "max_upload_interval_seconds",
1504
+ maxUploadRecords: "max_upload_records",
1505
+ name: "name",
1506
+ outputOptions: "output_options",
1507
+ ownershipChallenge: "ownership_challenge",
1508
+ }),
1509
+ T.Http({ method: "POST", path: "/accounts/{account_id}/logpush/jobs" }),
1510
+ ) as unknown as Schema.Schema<CreateJobForAccountRequest>;
1511
+
1512
+ export const CreateJobForZoneRequest =
1513
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1514
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1515
+ ...CreateJobBaseFields,
1516
+ }).pipe(
1517
+ Schema.encodeKeys({
1518
+ destinationConf: "destination_conf",
1519
+ dataset: "dataset",
1520
+ enabled: "enabled",
1521
+ filter: "filter",
1522
+ frequency: "frequency",
1523
+ kind: "kind",
1524
+ logpullOptions: "logpull_options",
1525
+ maxUploadBytes: "max_upload_bytes",
1526
+ maxUploadIntervalSeconds: "max_upload_interval_seconds",
1527
+ maxUploadRecords: "max_upload_records",
1528
+ name: "name",
1529
+ outputOptions: "output_options",
1530
+ ownershipChallenge: "ownership_challenge",
1531
+ }),
1532
+ T.Http({ method: "POST", path: "/zones/{zone_id}/logpush/jobs" }),
1533
+ ) as unknown as Schema.Schema<CreateJobForZoneRequest>;
1325
1534
 
1326
1535
  export interface CreateJobResponse {
1327
1536
  /** Unique id of the job. */
@@ -1544,66 +1753,30 @@ export const CreateJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1544
1753
 
1545
1754
  export type CreateJobError = DefaultErrors;
1546
1755
 
1547
- export const createJob: API.OperationMethod<
1548
- CreateJobRequest,
1756
+ export const createJobForAccount: API.OperationMethod<
1757
+ CreateJobForAccountRequest,
1549
1758
  CreateJobResponse,
1550
1759
  CreateJobError,
1551
1760
  Credentials | HttpClient.HttpClient
1552
1761
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1553
- input: CreateJobRequest,
1762
+ input: CreateJobForAccountRequest,
1554
1763
  output: CreateJobResponse,
1555
1764
  errors: [],
1556
1765
  }));
1557
1766
 
1558
- export interface UpdateJobRequest {
1559
- jobId: number;
1560
- /** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
1561
- accountId?: string;
1562
- /** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
1563
- zoneId?: string;
1564
- /** Body param: Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included. */
1565
- destinationConf?: string;
1566
- /** Body param: Flag that indicates if the job is enabled. */
1567
- enabled?: boolean;
1568
- /** Body param: The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/). */
1569
- filter?: string | null;
1570
- /** @deprecated Body param: This field is deprecated. Please use `max_upload_ ` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high */
1571
- frequency?: "high" | "low" | null;
1572
- /** Body param: The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset). */
1573
- kind?: "" | "edge";
1574
- /** @deprecated Body param: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api */
1575
- logpullOptions?: string | null;
1576
- /** Body param: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means */
1577
- maxUploadBytes?: "0" | number | null;
1578
- /** Body param: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log */
1579
- maxUploadIntervalSeconds?: "0" | number | null;
1580
- /** Body param: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch */
1581
- maxUploadRecords?: "0" | number | null;
1582
- /** Body param: Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job. */
1583
- name?: string | null;
1584
- /** Body param: The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored. */
1585
- outputOptions?: {
1586
- batchPrefix?: string | null;
1587
- batchSuffix?: string | null;
1588
- "cve-2021-44228"?: boolean | null;
1589
- fieldDelimiter?: string | null;
1590
- fieldNames?: string[];
1591
- outputType?: "ndjson" | "csv";
1592
- recordDelimiter?: string | null;
1593
- recordPrefix?: string | null;
1594
- recordSuffix?: string | null;
1595
- recordTemplate?: string | null;
1596
- sampleRate?: number | null;
1597
- timestampFormat?: "unixnano" | "unix" | "rfc3339";
1598
- } | null;
1599
- /** Body param: Ownership challenge token to prove destination ownership. */
1600
- ownershipChallenge?: string;
1601
- }
1767
+ export const createJobForZone: API.OperationMethod<
1768
+ CreateJobForZoneRequest,
1769
+ CreateJobResponse,
1770
+ CreateJobError,
1771
+ Credentials | HttpClient.HttpClient
1772
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1773
+ input: CreateJobForZoneRequest,
1774
+ output: CreateJobResponse,
1775
+ errors: [],
1776
+ }));
1602
1777
 
1603
- export const UpdateJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1778
+ const UpdateJobBaseFields = {
1604
1779
  jobId: Schema.Number.pipe(T.HttpPath("jobId")),
1605
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
1606
- zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1607
1780
  destinationConf: Schema.optional(Schema.String),
1608
1781
  enabled: Schema.optional(Schema.Boolean),
1609
1782
  filter: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
@@ -1675,26 +1848,105 @@ export const UpdateJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1675
1848
  ]),
1676
1849
  ),
1677
1850
  ownershipChallenge: Schema.optional(Schema.String),
1678
- }).pipe(
1679
- Schema.encodeKeys({
1680
- destinationConf: "destination_conf",
1681
- enabled: "enabled",
1682
- filter: "filter",
1683
- frequency: "frequency",
1684
- kind: "kind",
1685
- logpullOptions: "logpull_options",
1686
- maxUploadBytes: "max_upload_bytes",
1687
- maxUploadIntervalSeconds: "max_upload_interval_seconds",
1688
- maxUploadRecords: "max_upload_records",
1689
- name: "name",
1690
- outputOptions: "output_options",
1691
- ownershipChallenge: "ownership_challenge",
1692
- }),
1693
- T.Http({
1694
- method: "PUT",
1695
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/jobs/{jobId}",
1696
- }),
1697
- ) as unknown as Schema.Schema<UpdateJobRequest>;
1851
+ } as const;
1852
+
1853
+ interface UpdateJobBaseRequest {
1854
+ jobId: number;
1855
+ /** Body param: Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included. */
1856
+ destinationConf?: string;
1857
+ /** Body param: Flag that indicates if the job is enabled. */
1858
+ enabled?: boolean;
1859
+ /** Body param: The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/). */
1860
+ filter?: string | null;
1861
+ /** @deprecated Body param: This field is deprecated. Please use `max_upload_ ` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high */
1862
+ frequency?: "high" | "low" | null;
1863
+ /** Body param: The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset). */
1864
+ kind?: "" | "edge";
1865
+ /** @deprecated Body param: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api */
1866
+ logpullOptions?: string | null;
1867
+ /** Body param: The maximum uncompressed file size of a batch of logs. This setting value must be between `5 MB` and `1 GB`, or `0` to disable it. Note that you cannot set a minimum file size; this means */
1868
+ maxUploadBytes?: "0" | number | null;
1869
+ /** Body param: The maximum interval in seconds for log batches. This setting must be between 30 and 300 seconds (5 minutes), or `0` to disable it. Note that you cannot specify a minimum interval for log */
1870
+ maxUploadIntervalSeconds?: "0" | number | null;
1871
+ /** Body param: The maximum number of log lines per batch. This setting must be between 1000 and 1,000,000 lines, or `0` to disable it. Note that you cannot specify a minimum number of log lines per batch */
1872
+ maxUploadRecords?: "0" | number | null;
1873
+ /** Body param: Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job. */
1874
+ name?: string | null;
1875
+ /** Body param: The structured replacement for `logpull_options`. When including this field, the `logpull_option` field will be ignored. */
1876
+ outputOptions?: {
1877
+ batchPrefix?: string | null;
1878
+ batchSuffix?: string | null;
1879
+ "cve-2021-44228"?: boolean | null;
1880
+ fieldDelimiter?: string | null;
1881
+ fieldNames?: string[];
1882
+ outputType?: "ndjson" | "csv";
1883
+ recordDelimiter?: string | null;
1884
+ recordPrefix?: string | null;
1885
+ recordSuffix?: string | null;
1886
+ recordTemplate?: string | null;
1887
+ sampleRate?: number | null;
1888
+ timestampFormat?: "unixnano" | "unix" | "rfc3339";
1889
+ } | null;
1890
+ /** Body param: Ownership challenge token to prove destination ownership. */
1891
+ ownershipChallenge?: string;
1892
+ }
1893
+
1894
+ export interface UpdateJobForAccountRequest extends UpdateJobBaseRequest {
1895
+ /** Path param: The Account ID to use for this endpoint. */
1896
+ accountId: string;
1897
+ }
1898
+
1899
+ export interface UpdateJobForZoneRequest extends UpdateJobBaseRequest {
1900
+ /** Path param: The Zone ID to use for this endpoint. */
1901
+ zoneId: string;
1902
+ }
1903
+
1904
+ export const UpdateJobForAccountRequest =
1905
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1906
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
1907
+ ...UpdateJobBaseFields,
1908
+ }).pipe(
1909
+ Schema.encodeKeys({
1910
+ destinationConf: "destination_conf",
1911
+ enabled: "enabled",
1912
+ filter: "filter",
1913
+ frequency: "frequency",
1914
+ kind: "kind",
1915
+ logpullOptions: "logpull_options",
1916
+ maxUploadBytes: "max_upload_bytes",
1917
+ maxUploadIntervalSeconds: "max_upload_interval_seconds",
1918
+ maxUploadRecords: "max_upload_records",
1919
+ name: "name",
1920
+ outputOptions: "output_options",
1921
+ ownershipChallenge: "ownership_challenge",
1922
+ }),
1923
+ T.Http({
1924
+ method: "PUT",
1925
+ path: "/accounts/{account_id}/logpush/jobs/{jobId}",
1926
+ }),
1927
+ ) as unknown as Schema.Schema<UpdateJobForAccountRequest>;
1928
+
1929
+ export const UpdateJobForZoneRequest =
1930
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1931
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1932
+ ...UpdateJobBaseFields,
1933
+ }).pipe(
1934
+ Schema.encodeKeys({
1935
+ destinationConf: "destination_conf",
1936
+ enabled: "enabled",
1937
+ filter: "filter",
1938
+ frequency: "frequency",
1939
+ kind: "kind",
1940
+ logpullOptions: "logpull_options",
1941
+ maxUploadBytes: "max_upload_bytes",
1942
+ maxUploadIntervalSeconds: "max_upload_interval_seconds",
1943
+ maxUploadRecords: "max_upload_records",
1944
+ name: "name",
1945
+ outputOptions: "output_options",
1946
+ ownershipChallenge: "ownership_challenge",
1947
+ }),
1948
+ T.Http({ method: "PUT", path: "/zones/{zone_id}/logpush/jobs/{jobId}" }),
1949
+ ) as unknown as Schema.Schema<UpdateJobForZoneRequest>;
1698
1950
 
1699
1951
  export interface UpdateJobResponse {
1700
1952
  /** Unique id of the job. */
@@ -1917,29 +2169,64 @@ export const UpdateJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1917
2169
 
1918
2170
  export type UpdateJobError = DefaultErrors;
1919
2171
 
1920
- export const updateJob: API.OperationMethod<
1921
- UpdateJobRequest,
2172
+ export const updateJobForAccount: API.OperationMethod<
2173
+ UpdateJobForAccountRequest,
2174
+ UpdateJobResponse,
2175
+ UpdateJobError,
2176
+ Credentials | HttpClient.HttpClient
2177
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2178
+ input: UpdateJobForAccountRequest,
2179
+ output: UpdateJobResponse,
2180
+ errors: [],
2181
+ }));
2182
+
2183
+ export const updateJobForZone: API.OperationMethod<
2184
+ UpdateJobForZoneRequest,
1922
2185
  UpdateJobResponse,
1923
2186
  UpdateJobError,
1924
2187
  Credentials | HttpClient.HttpClient
1925
2188
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1926
- input: UpdateJobRequest,
2189
+ input: UpdateJobForZoneRequest,
1927
2190
  output: UpdateJobResponse,
1928
2191
  errors: [],
1929
2192
  }));
1930
2193
 
1931
- export interface DeleteJobRequest {
2194
+ const DeleteJobBaseFields = {
2195
+ jobId: Schema.Number.pipe(T.HttpPath("jobId")),
2196
+ } as const;
2197
+
2198
+ interface DeleteJobBaseRequest {
1932
2199
  jobId: number;
1933
2200
  }
1934
2201
 
1935
- export const DeleteJobRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1936
- jobId: Schema.Number.pipe(T.HttpPath("jobId")),
1937
- }).pipe(
1938
- T.Http({
1939
- method: "DELETE",
1940
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/jobs/{jobId}",
1941
- }),
1942
- ) as unknown as Schema.Schema<DeleteJobRequest>;
2202
+ export interface DeleteJobForAccountRequest extends DeleteJobBaseRequest {
2203
+ /** Path param: The Account ID to use for this endpoint. */
2204
+ accountId: string;
2205
+ }
2206
+
2207
+ export interface DeleteJobForZoneRequest extends DeleteJobBaseRequest {
2208
+ /** Path param: The Zone ID to use for this endpoint. */
2209
+ zoneId: string;
2210
+ }
2211
+
2212
+ export const DeleteJobForAccountRequest =
2213
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2214
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2215
+ ...DeleteJobBaseFields,
2216
+ }).pipe(
2217
+ T.Http({
2218
+ method: "DELETE",
2219
+ path: "/accounts/{account_id}/logpush/jobs/{jobId}",
2220
+ }),
2221
+ ) as unknown as Schema.Schema<DeleteJobForAccountRequest>;
2222
+
2223
+ export const DeleteJobForZoneRequest =
2224
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2225
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2226
+ ...DeleteJobBaseFields,
2227
+ }).pipe(
2228
+ T.Http({ method: "DELETE", path: "/zones/{zone_id}/logpush/jobs/{jobId}" }),
2229
+ ) as unknown as Schema.Schema<DeleteJobForZoneRequest>;
1943
2230
 
1944
2231
  export interface DeleteJobResponse {
1945
2232
  /** Unique id of the job. */
@@ -1954,13 +2241,24 @@ export const DeleteJobResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1954
2241
 
1955
2242
  export type DeleteJobError = DefaultErrors;
1956
2243
 
1957
- export const deleteJob: API.OperationMethod<
1958
- DeleteJobRequest,
2244
+ export const deleteJobForAccount: API.OperationMethod<
2245
+ DeleteJobForAccountRequest,
1959
2246
  DeleteJobResponse,
1960
2247
  DeleteJobError,
1961
2248
  Credentials | HttpClient.HttpClient
1962
2249
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1963
- input: DeleteJobRequest,
2250
+ input: DeleteJobForAccountRequest,
2251
+ output: DeleteJobResponse,
2252
+ errors: [],
2253
+ }));
2254
+
2255
+ export const deleteJobForZone: API.OperationMethod<
2256
+ DeleteJobForZoneRequest,
2257
+ DeleteJobResponse,
2258
+ DeleteJobError,
2259
+ Credentials | HttpClient.HttpClient
2260
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2261
+ input: DeleteJobForZoneRequest,
1964
2262
  output: DeleteJobResponse,
1965
2263
  errors: [],
1966
2264
  }));
@@ -1969,28 +2267,45 @@ export const deleteJob: API.OperationMethod<
1969
2267
  // Ownership
1970
2268
  // =============================================================================
1971
2269
 
1972
- export interface CreateOwnershipRequest {
1973
- /** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
1974
- accountId?: string;
1975
- /** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
1976
- zoneId?: string;
2270
+ const CreateOwnershipBaseFields = {
2271
+ destinationConf: Schema.String,
2272
+ } as const;
2273
+
2274
+ interface CreateOwnershipBaseRequest {
1977
2275
  /** Body param: Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included. */
1978
2276
  destinationConf: string;
1979
2277
  }
1980
2278
 
1981
- export const CreateOwnershipRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
1982
- {
2279
+ export interface CreateOwnershipForAccountRequest extends CreateOwnershipBaseRequest {
2280
+ /** Path param: The Account ID to use for this endpoint. */
2281
+ accountId: string;
2282
+ }
2283
+
2284
+ export interface CreateOwnershipForZoneRequest extends CreateOwnershipBaseRequest {
2285
+ /** Path param: The Zone ID to use for this endpoint. */
2286
+ zoneId: string;
2287
+ }
2288
+
2289
+ export const CreateOwnershipForAccountRequest =
2290
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1983
2291
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
2292
+ ...CreateOwnershipBaseFields,
2293
+ }).pipe(
2294
+ Schema.encodeKeys({ destinationConf: "destination_conf" }),
2295
+ T.Http({
2296
+ method: "POST",
2297
+ path: "/accounts/{account_id}/logpush/ownership",
2298
+ }),
2299
+ ) as unknown as Schema.Schema<CreateOwnershipForAccountRequest>;
2300
+
2301
+ export const CreateOwnershipForZoneRequest =
2302
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1984
2303
  zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
1985
- destinationConf: Schema.String,
1986
- },
1987
- ).pipe(
1988
- Schema.encodeKeys({ destinationConf: "destination_conf" }),
1989
- T.Http({
1990
- method: "POST",
1991
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/ownership",
1992
- }),
1993
- ) as unknown as Schema.Schema<CreateOwnershipRequest>;
2304
+ ...CreateOwnershipBaseFields,
2305
+ }).pipe(
2306
+ Schema.encodeKeys({ destinationConf: "destination_conf" }),
2307
+ T.Http({ method: "POST", path: "/zones/{zone_id}/logpush/ownership" }),
2308
+ ) as unknown as Schema.Schema<CreateOwnershipForZoneRequest>;
1994
2309
 
1995
2310
  export interface CreateOwnershipResponse {
1996
2311
  filename?: string | null;
@@ -2009,34 +2324,69 @@ export const CreateOwnershipResponse =
2009
2324
 
2010
2325
  export type CreateOwnershipError = DefaultErrors;
2011
2326
 
2012
- export const createOwnership: API.OperationMethod<
2013
- CreateOwnershipRequest,
2327
+ export const createOwnershipForAccount: API.OperationMethod<
2328
+ CreateOwnershipForAccountRequest,
2014
2329
  CreateOwnershipResponse,
2015
2330
  CreateOwnershipError,
2016
2331
  Credentials | HttpClient.HttpClient
2017
2332
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2018
- input: CreateOwnershipRequest,
2333
+ input: CreateOwnershipForAccountRequest,
2019
2334
  output: CreateOwnershipResponse,
2020
2335
  errors: [],
2021
2336
  }));
2022
2337
 
2023
- export interface ValidateOwnershipRequest {
2024
- /** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
2025
- accountId?: string;
2026
- /** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
2027
- zoneId?: string;
2338
+ export const createOwnershipForZone: API.OperationMethod<
2339
+ CreateOwnershipForZoneRequest,
2340
+ CreateOwnershipResponse,
2341
+ CreateOwnershipError,
2342
+ Credentials | HttpClient.HttpClient
2343
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2344
+ input: CreateOwnershipForZoneRequest,
2345
+ output: CreateOwnershipResponse,
2346
+ errors: [],
2347
+ }));
2348
+
2349
+ const ValidateOwnershipBaseFields = {
2350
+ destinationConf: Schema.String,
2351
+ ownershipChallenge: Schema.String,
2352
+ } as const;
2353
+
2354
+ interface ValidateOwnershipBaseRequest {
2028
2355
  /** Body param: Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included. */
2029
2356
  destinationConf: string;
2030
2357
  /** Body param: Ownership challenge token to prove destination ownership. */
2031
2358
  ownershipChallenge: string;
2032
2359
  }
2033
2360
 
2034
- export const ValidateOwnershipRequest =
2361
+ export interface ValidateOwnershipForAccountRequest extends ValidateOwnershipBaseRequest {
2362
+ /** Path param: The Account ID to use for this endpoint. */
2363
+ accountId: string;
2364
+ }
2365
+
2366
+ export interface ValidateOwnershipForZoneRequest extends ValidateOwnershipBaseRequest {
2367
+ /** Path param: The Zone ID to use for this endpoint. */
2368
+ zoneId: string;
2369
+ }
2370
+
2371
+ export const ValidateOwnershipForAccountRequest =
2035
2372
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2036
2373
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
2374
+ ...ValidateOwnershipBaseFields,
2375
+ }).pipe(
2376
+ Schema.encodeKeys({
2377
+ destinationConf: "destination_conf",
2378
+ ownershipChallenge: "ownership_challenge",
2379
+ }),
2380
+ T.Http({
2381
+ method: "POST",
2382
+ path: "/accounts/{account_id}/logpush/ownership/validate",
2383
+ }),
2384
+ ) as unknown as Schema.Schema<ValidateOwnershipForAccountRequest>;
2385
+
2386
+ export const ValidateOwnershipForZoneRequest =
2387
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2037
2388
  zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2038
- destinationConf: Schema.String,
2039
- ownershipChallenge: Schema.String,
2389
+ ...ValidateOwnershipBaseFields,
2040
2390
  }).pipe(
2041
2391
  Schema.encodeKeys({
2042
2392
  destinationConf: "destination_conf",
@@ -2044,9 +2394,9 @@ export const ValidateOwnershipRequest =
2044
2394
  }),
2045
2395
  T.Http({
2046
2396
  method: "POST",
2047
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/ownership/validate",
2397
+ path: "/zones/{zone_id}/logpush/ownership/validate",
2048
2398
  }),
2049
- ) as unknown as Schema.Schema<ValidateOwnershipRequest>;
2399
+ ) as unknown as Schema.Schema<ValidateOwnershipForZoneRequest>;
2050
2400
 
2051
2401
  export interface ValidateOwnershipResponse {
2052
2402
  valid?: boolean | null;
@@ -2061,13 +2411,24 @@ export const ValidateOwnershipResponse =
2061
2411
 
2062
2412
  export type ValidateOwnershipError = DefaultErrors;
2063
2413
 
2064
- export const validateOwnership: API.OperationMethod<
2065
- ValidateOwnershipRequest,
2414
+ export const validateOwnershipForAccount: API.OperationMethod<
2415
+ ValidateOwnershipForAccountRequest,
2066
2416
  ValidateOwnershipResponse,
2067
2417
  ValidateOwnershipError,
2068
2418
  Credentials | HttpClient.HttpClient
2069
2419
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2070
- input: ValidateOwnershipRequest,
2420
+ input: ValidateOwnershipForAccountRequest,
2421
+ output: ValidateOwnershipResponse,
2422
+ errors: [],
2423
+ }));
2424
+
2425
+ export const validateOwnershipForZone: API.OperationMethod<
2426
+ ValidateOwnershipForZoneRequest,
2427
+ ValidateOwnershipResponse,
2428
+ ValidateOwnershipError,
2429
+ Credentials | HttpClient.HttpClient
2430
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2431
+ input: ValidateOwnershipForZoneRequest,
2071
2432
  output: ValidateOwnershipResponse,
2072
2433
  errors: [],
2073
2434
  }));
@@ -2076,27 +2437,48 @@ export const validateOwnership: API.OperationMethod<
2076
2437
  // Validate
2077
2438
  // =============================================================================
2078
2439
 
2079
- export interface DestinationValidateRequest {
2080
- /** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
2081
- accountId?: string;
2082
- /** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
2083
- zoneId?: string;
2440
+ const DestinationValidateBaseFields = {
2441
+ destinationConf: Schema.String,
2442
+ } as const;
2443
+
2444
+ interface DestinationValidateBaseRequest {
2084
2445
  /** Body param: Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included. */
2085
2446
  destinationConf: string;
2086
2447
  }
2087
2448
 
2088
- export const DestinationValidateRequest =
2449
+ export interface DestinationValidateForAccountRequest extends DestinationValidateBaseRequest {
2450
+ /** Path param: The Account ID to use for this endpoint. */
2451
+ accountId: string;
2452
+ }
2453
+
2454
+ export interface DestinationValidateForZoneRequest extends DestinationValidateBaseRequest {
2455
+ /** Path param: The Zone ID to use for this endpoint. */
2456
+ zoneId: string;
2457
+ }
2458
+
2459
+ export const DestinationValidateForAccountRequest =
2089
2460
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2090
2461
  accountId: Schema.String.pipe(T.HttpPath("account_id")),
2462
+ ...DestinationValidateBaseFields,
2463
+ }).pipe(
2464
+ Schema.encodeKeys({ destinationConf: "destination_conf" }),
2465
+ T.Http({
2466
+ method: "POST",
2467
+ path: "/accounts/{account_id}/logpush/validate/destination",
2468
+ }),
2469
+ ) as unknown as Schema.Schema<DestinationValidateForAccountRequest>;
2470
+
2471
+ export const DestinationValidateForZoneRequest =
2472
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2091
2473
  zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2092
- destinationConf: Schema.String,
2474
+ ...DestinationValidateBaseFields,
2093
2475
  }).pipe(
2094
2476
  Schema.encodeKeys({ destinationConf: "destination_conf" }),
2095
2477
  T.Http({
2096
2478
  method: "POST",
2097
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/validate/destination",
2479
+ path: "/zones/{zone_id}/logpush/validate/destination",
2098
2480
  }),
2099
- ) as unknown as Schema.Schema<DestinationValidateRequest>;
2481
+ ) as unknown as Schema.Schema<DestinationValidateForZoneRequest>;
2100
2482
 
2101
2483
  export interface DestinationValidateResponse {
2102
2484
  message?: string | null;
@@ -2113,37 +2495,70 @@ export const DestinationValidateResponse =
2113
2495
 
2114
2496
  export type DestinationValidateError = DefaultErrors;
2115
2497
 
2116
- export const destinationValidate: API.OperationMethod<
2117
- DestinationValidateRequest,
2498
+ export const destinationValidateForAccount: API.OperationMethod<
2499
+ DestinationValidateForAccountRequest,
2500
+ DestinationValidateResponse,
2501
+ DestinationValidateError,
2502
+ Credentials | HttpClient.HttpClient
2503
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2504
+ input: DestinationValidateForAccountRequest,
2505
+ output: DestinationValidateResponse,
2506
+ errors: [],
2507
+ }));
2508
+
2509
+ export const destinationValidateForZone: API.OperationMethod<
2510
+ DestinationValidateForZoneRequest,
2118
2511
  DestinationValidateResponse,
2119
2512
  DestinationValidateError,
2120
2513
  Credentials | HttpClient.HttpClient
2121
2514
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2122
- input: DestinationValidateRequest,
2515
+ input: DestinationValidateForZoneRequest,
2123
2516
  output: DestinationValidateResponse,
2124
2517
  errors: [],
2125
2518
  }));
2126
2519
 
2127
- export interface OriginValidateRequest {
2128
- /** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
2129
- accountId?: string;
2130
- /** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
2131
- zoneId?: string;
2520
+ const OriginValidateBaseFields = {
2521
+ logpullOptions: Schema.Union([Schema.String, Schema.Null]),
2522
+ } as const;
2523
+
2524
+ interface OriginValidateBaseRequest {
2132
2525
  /** @deprecated Body param: This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api */
2133
2526
  logpullOptions: string | null;
2134
2527
  }
2135
2528
 
2136
- export const OriginValidateRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2137
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
2138
- zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2139
- logpullOptions: Schema.Union([Schema.String, Schema.Null]),
2140
- }).pipe(
2141
- Schema.encodeKeys({ logpullOptions: "logpull_options" }),
2142
- T.Http({
2143
- method: "POST",
2144
- path: "/{accountOrZone}/{accountOrZoneId}/logpush/validate/origin",
2145
- }),
2146
- ) as unknown as Schema.Schema<OriginValidateRequest>;
2529
+ export interface OriginValidateForAccountRequest extends OriginValidateBaseRequest {
2530
+ /** Path param: The Account ID to use for this endpoint. */
2531
+ accountId: string;
2532
+ }
2533
+
2534
+ export interface OriginValidateForZoneRequest extends OriginValidateBaseRequest {
2535
+ /** Path param: The Zone ID to use for this endpoint. */
2536
+ zoneId: string;
2537
+ }
2538
+
2539
+ export const OriginValidateForAccountRequest =
2540
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2541
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
2542
+ ...OriginValidateBaseFields,
2543
+ }).pipe(
2544
+ Schema.encodeKeys({ logpullOptions: "logpull_options" }),
2545
+ T.Http({
2546
+ method: "POST",
2547
+ path: "/accounts/{account_id}/logpush/validate/origin",
2548
+ }),
2549
+ ) as unknown as Schema.Schema<OriginValidateForAccountRequest>;
2550
+
2551
+ export const OriginValidateForZoneRequest =
2552
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2553
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
2554
+ ...OriginValidateBaseFields,
2555
+ }).pipe(
2556
+ Schema.encodeKeys({ logpullOptions: "logpull_options" }),
2557
+ T.Http({
2558
+ method: "POST",
2559
+ path: "/zones/{zone_id}/logpush/validate/origin",
2560
+ }),
2561
+ ) as unknown as Schema.Schema<OriginValidateForZoneRequest>;
2147
2562
 
2148
2563
  export interface OriginValidateResponse {
2149
2564
  message?: string | null;
@@ -2161,13 +2576,24 @@ export const OriginValidateResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
2161
2576
 
2162
2577
  export type OriginValidateError = DefaultErrors;
2163
2578
 
2164
- export const originValidate: API.OperationMethod<
2165
- OriginValidateRequest,
2579
+ export const originValidateForAccount: API.OperationMethod<
2580
+ OriginValidateForAccountRequest,
2581
+ OriginValidateResponse,
2582
+ OriginValidateError,
2583
+ Credentials | HttpClient.HttpClient
2584
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2585
+ input: OriginValidateForAccountRequest,
2586
+ output: OriginValidateResponse,
2587
+ errors: [],
2588
+ }));
2589
+
2590
+ export const originValidateForZone: API.OperationMethod<
2591
+ OriginValidateForZoneRequest,
2166
2592
  OriginValidateResponse,
2167
2593
  OriginValidateError,
2168
2594
  Credentials | HttpClient.HttpClient
2169
2595
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2170
- input: OriginValidateRequest,
2596
+ input: OriginValidateForZoneRequest,
2171
2597
  output: OriginValidateResponse,
2172
2598
  errors: [],
2173
2599
  }));