@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,16 +16,41 @@ import { type DefaultErrors } from "../errors.ts";
16
16
  // Insight
17
17
  // =============================================================================
18
18
 
19
- export interface ListInsightsRequest {}
19
+ const ListInsightsBaseFields = {} as const;
20
20
 
21
- export const ListInsightsRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
22
- {},
23
- ).pipe(
24
- T.Http({
25
- method: "GET",
26
- path: "/{accountOrZone}/{accountOrZoneId}/security-center/insights",
27
- }),
28
- ) as unknown as Schema.Schema<ListInsightsRequest>;
21
+ interface ListInsightsBaseRequest {}
22
+
23
+ export interface ListInsightsForAccountRequest extends ListInsightsBaseRequest {
24
+ /** Path param: The Account ID to use for this endpoint. */
25
+ accountId: string;
26
+ }
27
+
28
+ export interface ListInsightsForZoneRequest extends ListInsightsBaseRequest {
29
+ /** Path param: The Zone ID to use for this endpoint. */
30
+ zoneId: string;
31
+ }
32
+
33
+ export const ListInsightsForAccountRequest =
34
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
35
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
36
+ ...ListInsightsBaseFields,
37
+ }).pipe(
38
+ T.Http({
39
+ method: "GET",
40
+ path: "/accounts/{account_id}/security-center/insights",
41
+ }),
42
+ ) as unknown as Schema.Schema<ListInsightsForAccountRequest>;
43
+
44
+ export const ListInsightsForZoneRequest =
45
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
46
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
47
+ ...ListInsightsBaseFields,
48
+ }).pipe(
49
+ T.Http({
50
+ method: "GET",
51
+ path: "/zones/{zone_id}/security-center/insights",
52
+ }),
53
+ ) as unknown as Schema.Schema<ListInsightsForZoneRequest>;
29
54
 
30
55
  export interface ListInsightsResponse {
31
56
  result: {
@@ -62,12 +87,12 @@ export interface ListInsightsResponse {
62
87
  }[]
63
88
  | null;
64
89
  };
65
- resultInfo: {
90
+ resultInfo?: {
66
91
  count?: number | null;
67
92
  page?: number | null;
68
93
  perPage?: number | null;
69
94
  totalCount?: number | null;
70
- };
95
+ } | null;
71
96
  }
72
97
 
73
98
  export const ListInsightsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
@@ -178,18 +203,23 @@ export const ListInsightsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
178
203
  ]),
179
204
  ),
180
205
  }),
181
- resultInfo: Schema.Struct({
182
- count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
183
- page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
184
- perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
185
- totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
186
- }).pipe(
187
- Schema.encodeKeys({
188
- count: "count",
189
- page: "page",
190
- perPage: "per_page",
191
- totalCount: "total_count",
192
- }),
206
+ resultInfo: Schema.optional(
207
+ Schema.Union([
208
+ Schema.Struct({
209
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
210
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
211
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
212
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
213
+ }).pipe(
214
+ Schema.encodeKeys({
215
+ count: "count",
216
+ page: "page",
217
+ perPage: "per_page",
218
+ totalCount: "total_count",
219
+ }),
220
+ ),
221
+ Schema.Null,
222
+ ]),
193
223
  ),
194
224
  }).pipe(
195
225
  Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
@@ -197,13 +227,13 @@ export const ListInsightsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
197
227
 
198
228
  export type ListInsightsError = DefaultErrors;
199
229
 
200
- export const listInsights: API.PaginatedOperationMethod<
201
- ListInsightsRequest,
230
+ export const listInsightsForAccount: API.PaginatedOperationMethod<
231
+ ListInsightsForAccountRequest,
202
232
  ListInsightsResponse,
203
233
  ListInsightsError,
204
234
  Credentials | HttpClient.HttpClient
205
235
  > = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
206
- input: ListInsightsRequest,
236
+ input: ListInsightsForAccountRequest,
207
237
  output: ListInsightsResponse,
208
238
  errors: [],
209
239
  pagination: {
@@ -215,27 +245,66 @@ export const listInsights: API.PaginatedOperationMethod<
215
245
  } as const,
216
246
  }));
217
247
 
218
- export interface DismissInsightRequest {
248
+ export const listInsightsForZone: API.PaginatedOperationMethod<
249
+ ListInsightsForZoneRequest,
250
+ ListInsightsResponse,
251
+ ListInsightsError,
252
+ Credentials | HttpClient.HttpClient
253
+ > = /*@__PURE__*/ /*#__PURE__*/ API.makePaginated(() => ({
254
+ input: ListInsightsForZoneRequest,
255
+ output: ListInsightsResponse,
256
+ errors: [],
257
+ pagination: {
258
+ mode: "page",
259
+ inputToken: "page",
260
+ outputToken: "resultInfo.page",
261
+ items: "result.items",
262
+ pageSize: "perPage",
263
+ } as const,
264
+ }));
265
+
266
+ const DismissInsightBaseFields = {
267
+ issueId: Schema.String.pipe(T.HttpPath("issueId")),
268
+ dismiss: Schema.optional(Schema.Boolean),
269
+ } as const;
270
+
271
+ interface DismissInsightBaseRequest {
219
272
  issueId: string;
220
- /** Path param: The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. */
221
- accountId?: string;
222
- /** Path param: The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. */
223
- zoneId?: string;
224
273
  /** Body param: */
225
274
  dismiss?: boolean;
226
275
  }
227
276
 
228
- export const DismissInsightRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
229
- issueId: Schema.String.pipe(T.HttpPath("issueId")),
230
- accountId: Schema.String.pipe(T.HttpPath("account_id")),
231
- zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
232
- dismiss: Schema.optional(Schema.Boolean),
233
- }).pipe(
234
- T.Http({
235
- method: "PUT",
236
- path: "/{accountOrZone}/{accountOrZoneId}/security-center/insights/{issueId}/dismiss",
237
- }),
238
- ) as unknown as Schema.Schema<DismissInsightRequest>;
277
+ export interface DismissInsightForAccountRequest extends DismissInsightBaseRequest {
278
+ /** Path param: The Account ID to use for this endpoint. */
279
+ accountId: string;
280
+ }
281
+
282
+ export interface DismissInsightForZoneRequest extends DismissInsightBaseRequest {
283
+ /** Path param: The Zone ID to use for this endpoint. */
284
+ zoneId: string;
285
+ }
286
+
287
+ export const DismissInsightForAccountRequest =
288
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
289
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
290
+ ...DismissInsightBaseFields,
291
+ }).pipe(
292
+ T.Http({
293
+ method: "PUT",
294
+ path: "/accounts/{account_id}/security-center/insights/{issueId}/dismiss",
295
+ }),
296
+ ) as unknown as Schema.Schema<DismissInsightForAccountRequest>;
297
+
298
+ export const DismissInsightForZoneRequest =
299
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
300
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
301
+ ...DismissInsightBaseFields,
302
+ }).pipe(
303
+ T.Http({
304
+ method: "PUT",
305
+ path: "/zones/{zone_id}/security-center/insights/{issueId}/dismiss",
306
+ }),
307
+ ) as unknown as Schema.Schema<DismissInsightForZoneRequest>;
239
308
 
240
309
  export interface DismissInsightResponse {
241
310
  errors: {
@@ -314,13 +383,24 @@ export const DismissInsightResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
314
383
 
315
384
  export type DismissInsightError = DefaultErrors;
316
385
 
317
- export const dismissInsight: API.OperationMethod<
318
- DismissInsightRequest,
386
+ export const dismissInsightForAccount: API.OperationMethod<
387
+ DismissInsightForAccountRequest,
388
+ DismissInsightResponse,
389
+ DismissInsightError,
390
+ Credentials | HttpClient.HttpClient
391
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
392
+ input: DismissInsightForAccountRequest,
393
+ output: DismissInsightResponse,
394
+ errors: [],
395
+ }));
396
+
397
+ export const dismissInsightForZone: API.OperationMethod<
398
+ DismissInsightForZoneRequest,
319
399
  DismissInsightResponse,
320
400
  DismissInsightError,
321
401
  Credentials | HttpClient.HttpClient
322
402
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
323
- input: DismissInsightRequest,
403
+ input: DismissInsightForZoneRequest,
324
404
  output: DismissInsightResponse,
325
405
  errors: [],
326
406
  }));
@@ -329,16 +409,41 @@ export const dismissInsight: API.OperationMethod<
329
409
  // InsightClass
330
410
  // =============================================================================
331
411
 
332
- export interface GetInsightClassRequest {}
412
+ const GetInsightClassBaseFields = {} as const;
333
413
 
334
- export const GetInsightClassRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
335
- {},
336
- ).pipe(
337
- T.Http({
338
- method: "GET",
339
- path: "/{accountOrZone}/{accountOrZoneId}/security-center/insights/class",
340
- }),
341
- ) as unknown as Schema.Schema<GetInsightClassRequest>;
414
+ interface GetInsightClassBaseRequest {}
415
+
416
+ export interface GetInsightClassForAccountRequest extends GetInsightClassBaseRequest {
417
+ /** Path param: The Account ID to use for this endpoint. */
418
+ accountId: string;
419
+ }
420
+
421
+ export interface GetInsightClassForZoneRequest extends GetInsightClassBaseRequest {
422
+ /** Path param: The Zone ID to use for this endpoint. */
423
+ zoneId: string;
424
+ }
425
+
426
+ export const GetInsightClassForAccountRequest =
427
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
428
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
429
+ ...GetInsightClassBaseFields,
430
+ }).pipe(
431
+ T.Http({
432
+ method: "GET",
433
+ path: "/accounts/{account_id}/security-center/insights/class",
434
+ }),
435
+ ) as unknown as Schema.Schema<GetInsightClassForAccountRequest>;
436
+
437
+ export const GetInsightClassForZoneRequest =
438
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
439
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
440
+ ...GetInsightClassBaseFields,
441
+ }).pipe(
442
+ T.Http({
443
+ method: "GET",
444
+ path: "/zones/{zone_id}/security-center/insights/class",
445
+ }),
446
+ ) as unknown as Schema.Schema<GetInsightClassForZoneRequest>;
342
447
 
343
448
  export type GetInsightClassResponse = {
344
449
  count?: number | null;
@@ -356,13 +461,24 @@ export const GetInsightClassResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
356
461
 
357
462
  export type GetInsightClassError = DefaultErrors;
358
463
 
359
- export const getInsightClass: API.OperationMethod<
360
- GetInsightClassRequest,
464
+ export const getInsightClassForAccount: API.OperationMethod<
465
+ GetInsightClassForAccountRequest,
361
466
  GetInsightClassResponse,
362
467
  GetInsightClassError,
363
468
  Credentials | HttpClient.HttpClient
364
469
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
365
- input: GetInsightClassRequest,
470
+ input: GetInsightClassForAccountRequest,
471
+ output: GetInsightClassResponse,
472
+ errors: [],
473
+ }));
474
+
475
+ export const getInsightClassForZone: API.OperationMethod<
476
+ GetInsightClassForZoneRequest,
477
+ GetInsightClassResponse,
478
+ GetInsightClassError,
479
+ Credentials | HttpClient.HttpClient
480
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
481
+ input: GetInsightClassForZoneRequest,
366
482
  output: GetInsightClassResponse,
367
483
  errors: [],
368
484
  }));
@@ -371,15 +487,41 @@ export const getInsightClass: API.OperationMethod<
371
487
  // InsightSeverity
372
488
  // =============================================================================
373
489
 
374
- export interface GetInsightSeverityRequest {}
490
+ const GetInsightSeverityBaseFields = {} as const;
491
+
492
+ interface GetInsightSeverityBaseRequest {}
493
+
494
+ export interface GetInsightSeverityForAccountRequest extends GetInsightSeverityBaseRequest {
495
+ /** Path param: The Account ID to use for this endpoint. */
496
+ accountId: string;
497
+ }
498
+
499
+ export interface GetInsightSeverityForZoneRequest extends GetInsightSeverityBaseRequest {
500
+ /** Path param: The Zone ID to use for this endpoint. */
501
+ zoneId: string;
502
+ }
503
+
504
+ export const GetInsightSeverityForAccountRequest =
505
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
506
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
507
+ ...GetInsightSeverityBaseFields,
508
+ }).pipe(
509
+ T.Http({
510
+ method: "GET",
511
+ path: "/accounts/{account_id}/security-center/insights/severity",
512
+ }),
513
+ ) as unknown as Schema.Schema<GetInsightSeverityForAccountRequest>;
375
514
 
376
- export const GetInsightSeverityRequest =
377
- /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
515
+ export const GetInsightSeverityForZoneRequest =
516
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
517
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
518
+ ...GetInsightSeverityBaseFields,
519
+ }).pipe(
378
520
  T.Http({
379
521
  method: "GET",
380
- path: "/{accountOrZone}/{accountOrZoneId}/security-center/insights/severity",
522
+ path: "/zones/{zone_id}/security-center/insights/severity",
381
523
  }),
382
- ) as unknown as Schema.Schema<GetInsightSeverityRequest>;
524
+ ) as unknown as Schema.Schema<GetInsightSeverityForZoneRequest>;
383
525
 
384
526
  export type GetInsightSeverityResponse = {
385
527
  count?: number | null;
@@ -398,13 +540,24 @@ export const GetInsightSeverityResponse =
398
540
 
399
541
  export type GetInsightSeverityError = DefaultErrors;
400
542
 
401
- export const getInsightSeverity: API.OperationMethod<
402
- GetInsightSeverityRequest,
543
+ export const getInsightSeverityForAccount: API.OperationMethod<
544
+ GetInsightSeverityForAccountRequest,
545
+ GetInsightSeverityResponse,
546
+ GetInsightSeverityError,
547
+ Credentials | HttpClient.HttpClient
548
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
549
+ input: GetInsightSeverityForAccountRequest,
550
+ output: GetInsightSeverityResponse,
551
+ errors: [],
552
+ }));
553
+
554
+ export const getInsightSeverityForZone: API.OperationMethod<
555
+ GetInsightSeverityForZoneRequest,
403
556
  GetInsightSeverityResponse,
404
557
  GetInsightSeverityError,
405
558
  Credentials | HttpClient.HttpClient
406
559
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
407
- input: GetInsightSeverityRequest,
560
+ input: GetInsightSeverityForZoneRequest,
408
561
  output: GetInsightSeverityResponse,
409
562
  errors: [],
410
563
  }));
@@ -413,16 +566,41 @@ export const getInsightSeverity: API.OperationMethod<
413
566
  // InsightType
414
567
  // =============================================================================
415
568
 
416
- export interface GetInsightTypeRequest {}
569
+ const GetInsightTypeBaseFields = {} as const;
417
570
 
418
- export const GetInsightTypeRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
419
- {},
420
- ).pipe(
421
- T.Http({
422
- method: "GET",
423
- path: "/{accountOrZone}/{accountOrZoneId}/security-center/insights/type",
424
- }),
425
- ) as unknown as Schema.Schema<GetInsightTypeRequest>;
571
+ interface GetInsightTypeBaseRequest {}
572
+
573
+ export interface GetInsightTypeForAccountRequest extends GetInsightTypeBaseRequest {
574
+ /** Path param: The Account ID to use for this endpoint. */
575
+ accountId: string;
576
+ }
577
+
578
+ export interface GetInsightTypeForZoneRequest extends GetInsightTypeBaseRequest {
579
+ /** Path param: The Zone ID to use for this endpoint. */
580
+ zoneId: string;
581
+ }
582
+
583
+ export const GetInsightTypeForAccountRequest =
584
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
585
+ accountId: Schema.String.pipe(T.HttpPath("account_id")),
586
+ ...GetInsightTypeBaseFields,
587
+ }).pipe(
588
+ T.Http({
589
+ method: "GET",
590
+ path: "/accounts/{account_id}/security-center/insights/type",
591
+ }),
592
+ ) as unknown as Schema.Schema<GetInsightTypeForAccountRequest>;
593
+
594
+ export const GetInsightTypeForZoneRequest =
595
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
596
+ zoneId: Schema.String.pipe(T.HttpPath("zone_id")),
597
+ ...GetInsightTypeBaseFields,
598
+ }).pipe(
599
+ T.Http({
600
+ method: "GET",
601
+ path: "/zones/{zone_id}/security-center/insights/type",
602
+ }),
603
+ ) as unknown as Schema.Schema<GetInsightTypeForZoneRequest>;
426
604
 
427
605
  export type GetInsightTypeResponse = {
428
606
  count?: number | null;
@@ -440,13 +618,24 @@ export const GetInsightTypeResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Array(
440
618
 
441
619
  export type GetInsightTypeError = DefaultErrors;
442
620
 
443
- export const getInsightType: API.OperationMethod<
444
- GetInsightTypeRequest,
621
+ export const getInsightTypeForAccount: API.OperationMethod<
622
+ GetInsightTypeForAccountRequest,
623
+ GetInsightTypeResponse,
624
+ GetInsightTypeError,
625
+ Credentials | HttpClient.HttpClient
626
+ > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
627
+ input: GetInsightTypeForAccountRequest,
628
+ output: GetInsightTypeResponse,
629
+ errors: [],
630
+ }));
631
+
632
+ export const getInsightTypeForZone: API.OperationMethod<
633
+ GetInsightTypeForZoneRequest,
445
634
  GetInsightTypeResponse,
446
635
  GetInsightTypeError,
447
636
  Credentials | HttpClient.HttpClient
448
637
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
449
- input: GetInsightTypeRequest,
638
+ input: GetInsightTypeForZoneRequest,
450
639
  output: GetInsightTypeResponse,
451
640
  errors: [],
452
641
  }));
@@ -335,12 +335,12 @@ export interface ListSnippetsResponse {
335
335
  snippetName: string;
336
336
  modifiedOn?: string | null;
337
337
  }[];
338
- resultInfo: {
338
+ resultInfo?: {
339
339
  count?: number | null;
340
340
  page?: number | null;
341
341
  perPage?: number | null;
342
342
  totalCount?: number | null;
343
- };
343
+ } | null;
344
344
  }
345
345
 
346
346
  export const ListSnippetsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
@@ -357,18 +357,23 @@ export const ListSnippetsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
357
357
  }),
358
358
  ),
359
359
  ),
360
- resultInfo: Schema.Struct({
361
- count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
362
- page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
363
- perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
364
- totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
365
- }).pipe(
366
- Schema.encodeKeys({
367
- count: "count",
368
- page: "page",
369
- perPage: "per_page",
370
- totalCount: "total_count",
371
- }),
360
+ resultInfo: Schema.optional(
361
+ Schema.Union([
362
+ Schema.Struct({
363
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
364
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
365
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
366
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
367
+ }).pipe(
368
+ Schema.encodeKeys({
369
+ count: "count",
370
+ page: "page",
371
+ perPage: "per_page",
372
+ totalCount: "total_count",
373
+ }),
374
+ ),
375
+ Schema.Null,
376
+ ]),
372
377
  ),
373
378
  }).pipe(
374
379
  Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
@@ -721,12 +721,12 @@ export interface ListAppsResponse {
721
721
  originDirect?: string[] | null;
722
722
  }
723
723
  )[];
724
- resultInfo: {
724
+ resultInfo?: {
725
725
  count?: number | null;
726
726
  page?: number | null;
727
727
  perPage?: number | null;
728
728
  totalCount?: number | null;
729
- };
729
+ } | null;
730
730
  }
731
731
 
732
732
  export const ListAppsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
@@ -856,18 +856,23 @@ export const ListAppsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
856
856
  ),
857
857
  ]),
858
858
  ),
859
- resultInfo: Schema.Struct({
860
- count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
861
- page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
862
- perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
863
- totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
864
- }).pipe(
865
- Schema.encodeKeys({
866
- count: "count",
867
- page: "page",
868
- perPage: "per_page",
869
- totalCount: "total_count",
870
- }),
859
+ resultInfo: Schema.optional(
860
+ Schema.Union([
861
+ Schema.Struct({
862
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
863
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
864
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
865
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
866
+ }).pipe(
867
+ Schema.encodeKeys({
868
+ count: "count",
869
+ page: "page",
870
+ perPage: "per_page",
871
+ totalCount: "total_count",
872
+ }),
873
+ ),
874
+ Schema.Null,
875
+ ]),
871
876
  ),
872
877
  }).pipe(
873
878
  Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),
@@ -1470,12 +1470,12 @@ export interface ListPageTestsResponse {
1470
1470
  scheduleFrequency?: "DAILY" | "WEEKLY" | null;
1471
1471
  url?: string | null;
1472
1472
  }[];
1473
- resultInfo: {
1473
+ resultInfo?: {
1474
1474
  count?: number | null;
1475
1475
  page?: number | null;
1476
1476
  perPage?: number | null;
1477
1477
  totalCount?: number | null;
1478
- };
1478
+ } | null;
1479
1479
  }
1480
1480
 
1481
1481
  export const ListPageTestsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
@@ -1639,18 +1639,23 @@ export const ListPageTestsResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
1639
1639
  url: Schema.optional(Schema.Union([Schema.String, Schema.Null])),
1640
1640
  }),
1641
1641
  ),
1642
- resultInfo: Schema.Struct({
1643
- count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1644
- page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1645
- perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1646
- totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1647
- }).pipe(
1648
- Schema.encodeKeys({
1649
- count: "count",
1650
- page: "page",
1651
- perPage: "per_page",
1652
- totalCount: "total_count",
1653
- }),
1642
+ resultInfo: Schema.optional(
1643
+ Schema.Union([
1644
+ Schema.Struct({
1645
+ count: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1646
+ page: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1647
+ perPage: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1648
+ totalCount: Schema.optional(Schema.Union([Schema.Number, Schema.Null])),
1649
+ }).pipe(
1650
+ Schema.encodeKeys({
1651
+ count: "count",
1652
+ page: "page",
1653
+ perPage: "per_page",
1654
+ totalCount: "total_count",
1655
+ }),
1656
+ ),
1657
+ Schema.Null,
1658
+ ]),
1654
1659
  ),
1655
1660
  }).pipe(
1656
1661
  Schema.encodeKeys({ result: "result", resultInfo: "result_info" }),