@vigilbase/cli 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/CLOUDFLARE.md +2 -0
  2. package/COMMANDS.md +43 -6
  3. package/LOCAL.md +731 -0
  4. package/README.md +58 -6
  5. package/dist/auth/device-auth.d.ts.map +1 -1
  6. package/dist/auth/device-auth.js +7 -3
  7. package/dist/auth/device-auth.js.map +1 -1
  8. package/dist/auth/index.d.ts +3 -0
  9. package/dist/auth/index.d.ts.map +1 -1
  10. package/dist/auth/index.js +2 -0
  11. package/dist/auth/index.js.map +1 -1
  12. package/dist/auth/provider.d.ts +18 -0
  13. package/dist/auth/provider.d.ts.map +1 -0
  14. package/dist/auth/provider.js +62 -0
  15. package/dist/auth/provider.js.map +1 -0
  16. package/dist/auth/refresh.d.ts +10 -0
  17. package/dist/auth/refresh.d.ts.map +1 -0
  18. package/dist/auth/refresh.js +143 -0
  19. package/dist/auth/refresh.js.map +1 -0
  20. package/dist/auth/store.d.ts +27 -2
  21. package/dist/auth/store.d.ts.map +1 -1
  22. package/dist/auth/store.js +23 -8
  23. package/dist/auth/store.js.map +1 -1
  24. package/dist/auth/token-metadata.d.ts +10 -0
  25. package/dist/auth/token-metadata.d.ts.map +1 -0
  26. package/dist/auth/token-metadata.js +22 -0
  27. package/dist/auth/token-metadata.js.map +1 -0
  28. package/dist/auth/types.d.ts +8 -1
  29. package/dist/auth/types.d.ts.map +1 -1
  30. package/dist/cli.d.ts.map +1 -1
  31. package/dist/cli.js +40 -9
  32. package/dist/cli.js.map +1 -1
  33. package/dist/commands/auth.d.ts.map +1 -1
  34. package/dist/commands/auth.js +20 -8
  35. package/dist/commands/auth.js.map +1 -1
  36. package/dist/commands/helpers.d.ts +15 -0
  37. package/dist/commands/helpers.d.ts.map +1 -1
  38. package/dist/commands/helpers.js +2 -2
  39. package/dist/commands/helpers.js.map +1 -1
  40. package/dist/commands/index.d.ts +3 -1
  41. package/dist/commands/index.d.ts.map +1 -1
  42. package/dist/commands/index.js +6 -1
  43. package/dist/commands/index.js.map +1 -1
  44. package/dist/commands/local.d.ts +30 -0
  45. package/dist/commands/local.d.ts.map +1 -0
  46. package/dist/commands/local.js +1520 -0
  47. package/dist/commands/local.js.map +1 -0
  48. package/dist/commands/public-tools.d.ts.map +1 -1
  49. package/dist/commands/public-tools.js +8 -4
  50. package/dist/commands/public-tools.js.map +1 -1
  51. package/dist/index.d.ts +2 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +1 -1
  54. package/dist/index.js.map +1 -1
  55. package/dist/lib/config.d.ts +16 -1
  56. package/dist/lib/config.d.ts.map +1 -1
  57. package/dist/lib/config.js +36 -4
  58. package/dist/lib/config.js.map +1 -1
  59. package/dist/lib/format.d.ts.map +1 -1
  60. package/dist/lib/format.js +9 -0
  61. package/dist/lib/format.js.map +1 -1
  62. package/dist/lib/help.d.ts +1 -1
  63. package/dist/lib/help.d.ts.map +1 -1
  64. package/dist/lib/help.js +9 -0
  65. package/dist/lib/help.js.map +1 -1
  66. package/dist/lib/network.d.ts.map +1 -1
  67. package/dist/lib/network.js +2 -1
  68. package/dist/lib/network.js.map +1 -1
  69. package/dist/lib/one-client.d.ts +3 -2
  70. package/dist/lib/one-client.d.ts.map +1 -1
  71. package/dist/lib/one-client.js +46 -2
  72. package/dist/lib/one-client.js.map +1 -1
  73. package/dist/lib/security-client.d.ts +1 -1
  74. package/dist/lib/tui.d.ts +309 -0
  75. package/dist/lib/tui.d.ts.map +1 -0
  76. package/dist/lib/tui.js +847 -0
  77. package/dist/lib/tui.js.map +1 -0
  78. package/dist/local/cloudflare-checkup/cf/allowlist.d.ts +95 -0
  79. package/dist/local/cloudflare-checkup/cf/allowlist.d.ts.map +1 -0
  80. package/dist/local/cloudflare-checkup/cf/allowlist.js +184 -0
  81. package/dist/local/cloudflare-checkup/cf/allowlist.js.map +1 -0
  82. package/dist/local/cloudflare-checkup/cf/auth-lifecycle.d.ts +113 -0
  83. package/dist/local/cloudflare-checkup/cf/auth-lifecycle.d.ts.map +1 -0
  84. package/dist/local/cloudflare-checkup/cf/auth-lifecycle.js +313 -0
  85. package/dist/local/cloudflare-checkup/cf/auth-lifecycle.js.map +1 -0
  86. package/dist/local/cloudflare-checkup/cf/child-env.d.ts +32 -0
  87. package/dist/local/cloudflare-checkup/cf/child-env.d.ts.map +1 -0
  88. package/dist/local/cloudflare-checkup/cf/child-env.js +81 -0
  89. package/dist/local/cloudflare-checkup/cf/child-env.js.map +1 -0
  90. package/dist/local/cloudflare-checkup/cf/install.d.ts +106 -0
  91. package/dist/local/cloudflare-checkup/cf/install.d.ts.map +1 -0
  92. package/dist/local/cloudflare-checkup/cf/install.js +309 -0
  93. package/dist/local/cloudflare-checkup/cf/install.js.map +1 -0
  94. package/dist/local/cloudflare-checkup/cf/locate.d.ts +44 -0
  95. package/dist/local/cloudflare-checkup/cf/locate.d.ts.map +1 -0
  96. package/dist/local/cloudflare-checkup/cf/locate.js +228 -0
  97. package/dist/local/cloudflare-checkup/cf/locate.js.map +1 -0
  98. package/dist/local/cloudflare-checkup/cf/run-cf.d.ts +89 -0
  99. package/dist/local/cloudflare-checkup/cf/run-cf.d.ts.map +1 -0
  100. package/dist/local/cloudflare-checkup/cf/run-cf.js +275 -0
  101. package/dist/local/cloudflare-checkup/cf/run-cf.js.map +1 -0
  102. package/dist/local/cloudflare-checkup/collector.d.ts +48 -0
  103. package/dist/local/cloudflare-checkup/collector.d.ts.map +1 -0
  104. package/dist/local/cloudflare-checkup/collector.js +296 -0
  105. package/dist/local/cloudflare-checkup/collector.js.map +1 -0
  106. package/dist/local/cloudflare-checkup/contract.d.ts +2793 -0
  107. package/dist/local/cloudflare-checkup/contract.d.ts.map +1 -0
  108. package/dist/local/cloudflare-checkup/contract.js +1614 -0
  109. package/dist/local/cloudflare-checkup/contract.js.map +1 -0
  110. package/dist/local/cloudflare-checkup/email-verification.d.ts +125 -0
  111. package/dist/local/cloudflare-checkup/email-verification.d.ts.map +1 -0
  112. package/dist/local/cloudflare-checkup/email-verification.js +212 -0
  113. package/dist/local/cloudflare-checkup/email-verification.js.map +1 -0
  114. package/dist/local/cloudflare-checkup/errors.d.ts +28 -0
  115. package/dist/local/cloudflare-checkup/errors.d.ts.map +1 -0
  116. package/dist/local/cloudflare-checkup/errors.js +99 -0
  117. package/dist/local/cloudflare-checkup/errors.js.map +1 -0
  118. package/dist/local/cloudflare-checkup/output.d.ts +24 -0
  119. package/dist/local/cloudflare-checkup/output.d.ts.map +1 -0
  120. package/dist/local/cloudflare-checkup/output.js +89 -0
  121. package/dist/local/cloudflare-checkup/output.js.map +1 -0
  122. package/dist/local/cloudflare-checkup/prompts.d.ts +41 -0
  123. package/dist/local/cloudflare-checkup/prompts.d.ts.map +1 -0
  124. package/dist/local/cloudflare-checkup/prompts.js +140 -0
  125. package/dist/local/cloudflare-checkup/prompts.js.map +1 -0
  126. package/dist/local/cloudflare-checkup/rate-budget.d.ts +42 -0
  127. package/dist/local/cloudflare-checkup/rate-budget.d.ts.map +1 -0
  128. package/dist/local/cloudflare-checkup/rate-budget.js +80 -0
  129. package/dist/local/cloudflare-checkup/rate-budget.js.map +1 -0
  130. package/dist/local/cloudflare-checkup/snapshot-file.d.ts +53 -0
  131. package/dist/local/cloudflare-checkup/snapshot-file.d.ts.map +1 -0
  132. package/dist/local/cloudflare-checkup/snapshot-file.js +186 -0
  133. package/dist/local/cloudflare-checkup/snapshot-file.js.map +1 -0
  134. package/dist/local/cloudflare-checkup/submit-client.d.ts +98 -0
  135. package/dist/local/cloudflare-checkup/submit-client.d.ts.map +1 -0
  136. package/dist/local/cloudflare-checkup/submit-client.js +349 -0
  137. package/dist/local/cloudflare-checkup/submit-client.js.map +1 -0
  138. package/dist/local/cloudflare-checkup/terminal-ui.d.ts +171 -0
  139. package/dist/local/cloudflare-checkup/terminal-ui.d.ts.map +1 -0
  140. package/dist/local/cloudflare-checkup/terminal-ui.js +404 -0
  141. package/dist/local/cloudflare-checkup/terminal-ui.js.map +1 -0
  142. package/package.json +8 -4
@@ -0,0 +1,2793 @@
1
+ /**
2
+ * Local Cloudflare Checkup snapshot contract (`vigilbase.cloudflare-checkup.snapshot/1`).
3
+ *
4
+ * Single source of truth for the snapshot the Vigilbase CLI collects with
5
+ * Cloudflare's `cf` CLI and vigilbase.com evaluates with the existing scanner:
6
+ * schemas, limits, request keys, projectors, the IP pseudonymiser, the rule-run
7
+ * encoder and expander, the credential tripwire, the snapshot serialiser and
8
+ * the local-session HTTP contract.
9
+ *
10
+ * Portability rules (the file is vendored byte-for-byte into packages/cli):
11
+ * - imports only `zod`, never a relative module;
12
+ * - ES2022 built-ins only, so it compiles under the tools config
13
+ * (ES2017 target, bundler resolution) and the CLI config (ES2022, NodeNext);
14
+ * - no raw line terminators inside regex literals (TS1161); use `\p{…}` escapes.
15
+ *
16
+ * Projection principle (spec §D3). A value the scanner prints is kept verbatim,
17
+ * or the whole entry becomes `collection_failed/invalid_output`. A value the
18
+ * scanner only compares against fixed literals may be mapped to a sentinel that
19
+ * cannot equal any of those literals. A value the scanner tests for truthiness
20
+ * keeps its truthiness. Projection never truncates; caps fail the entry.
21
+ * Line references below are to `packages/tools/src/cloudflare-checkup/scanner.ts`
22
+ * before the read-client refactor; the function names are the stable anchor.
23
+ *
24
+ * Any change to a field read or a projection rule is a new schema version
25
+ * (`/2`), and the server then accepts both for at least one CLI minor release.
26
+ */
27
+ import { z } from 'zod';
28
+ export declare const SNAPSHOT_SCHEMA_VERSION: "vigilbase.cloudflare-checkup.snapshot/1";
29
+ export declare const SNAPSHOT_PROJECTION_VERSION: 1;
30
+ export declare const IP_PSEUDONYMIZATION: "per_prefix_sequential/1";
31
+ export declare const SNAPSHOT_COLLECTOR_NAME: "@vigilbase/cli";
32
+ export declare const SESSION_CODE_REGEX: RegExp;
33
+ export declare const PRODUCTION_ORIGIN: "https://vigilbase.com";
34
+ export declare const LOCAL_SESSION_PATH: "/api/v1/tools/cloudflare-checkup/local-session";
35
+ export declare const LOCAL_SNAPSHOT_PATH: "/api/v1/tools/cloudflare-checkup/local-session/snapshot";
36
+ /** The CLI asks vigilbase.com to email a verification code (no browser, no Turnstile). */
37
+ export declare const LOCAL_REQUEST_PATH: "/api/v1/tools/cloudflare-checkup/local-session/request";
38
+ /** The CLI trades the verification token and the emailed code for a session code. */
39
+ export declare const LOCAL_VERIFY_PATH: "/api/v1/tools/cloudflare-checkup/local-session/verify";
40
+ /** `vbcv1_` + base64url_nopad(iv[12] ‖ AES-256-GCM(runId[16] ‖ iat[4]) ‖ tag[16]): names a run awaiting its emailed code. */
41
+ export declare const VERIFICATION_TOKEN_REGEX: RegExp;
42
+ /** The six-digit code One emails for a tool run. */
43
+ export declare const EMAIL_CODE_REGEX: RegExp;
44
+ /** Verification email languages; the CLI picks one from LC_ALL, LC_MESSAGES or LANG. */
45
+ export declare const LOCAL_EMAIL_LOCALES: readonly ["en", "pt-PT", "ar"];
46
+ export type LocalEmailLocale = (typeof LOCAL_EMAIL_LOCALES)[number];
47
+ export declare const SNAPSHOT_SHA256_HEADER: "X-Vigilbase-Snapshot-Sha256";
48
+ export declare const CLI_VERSION_HEADER: "X-Vigilbase-CLI-Version";
49
+ export declare const CF_SUPPORTED: Readonly<{
50
+ min: "1.0.0-beta.13";
51
+ maxExclusive: "2.0.0";
52
+ tested: readonly string[];
53
+ }>;
54
+ export declare const SNAPSHOT_LIMITS: Readonly<{
55
+ maxBytes: 8388608;
56
+ defaultServerMaxBytes: 4194304;
57
+ maxZones: 100;
58
+ maxEntries: 12000;
59
+ maxListItems: 5000;
60
+ maxRuleBodies: 2000;
61
+ maxRunsPerBody: 5000;
62
+ maxRulesPerBody: 20000;
63
+ maxRulesExpandedTotal: 400000;
64
+ maxIssueRulesExpandedTotal: 20000;
65
+ maxIssueTextExpandedBytes: 2097152;
66
+ maxCollectionHours: 6;
67
+ maxAgeHours: 24;
68
+ maxFutureSkewSeconds: 300;
69
+ rulesetListTruncationAt: 100;
70
+ }>;
71
+ export declare const ZONE_SETTING_IDS: readonly ["ssl", "always_use_https", "min_tls_version", "tls_1_3", "security_level", "email_obfuscation", "hotlink_protection", "browser_check", "origin_pulls", "challenge_ttl", "browser_cache_ttl", "minify", "early_hints", "rocket_loader", "waf", "automatic_https_rewrites", "security_header", "opportunistic_encryption", "always_online"];
72
+ export declare const MANAGED_RULESET_IDS: readonly string[];
73
+ export declare const MANAGED_NAME_NEEDLES: readonly ["cloudflare managed ruleset", "owasp core ruleset", "exposed credentials check", "sensitive data detection"];
74
+ export declare const LEGACY_PAGE_RULE_ACTIONS: readonly ["disable_security", "disable_performance", "waf", "security_level", "browser_check"];
75
+ export declare const ACCOUNT_KINDS: readonly ["account", "zones", "account_members", "account_rulesets", "account_access_rules", "access_apps", "access_identity_providers", "access_service_tokens", "gateway_rules", "gateway_locations", "cfd_tunnels"];
76
+ export declare const ZONE_SINGLE_KINDS: readonly ["zone_dnssec", "zone_dns_records", "zone_universal_ssl", "zone_total_tls", "zone_rulesets", "zone_access_rules", "zone_page_rules", "zone_bot_management", "zone_page_shield", "zone_schema_validation_settings", "zone_schema_validation_schemas"];
77
+ export declare const NOT_COLLECTABLE_ZONE_KINDS: readonly ["zone_legacy_firewall_rules", "zone_legacy_filters", "zone_legacy_waf_packages", "zone_legacy_rate_limits", "zone_waf_analytics"];
78
+ export declare const SNAPSHOT_KINDS: readonly ["account", "zones", "account_members", "account_rulesets", "account_access_rules", "access_apps", "access_identity_providers", "access_service_tokens", "gateway_rules", "gateway_locations", "cfd_tunnels", "zone_setting", "zone_dnssec", "zone_dns_records", "zone_universal_ssl", "zone_total_tls", "zone_rulesets", "zone_access_rules", "zone_page_rules", "zone_bot_management", "zone_page_shield", "zone_schema_validation_settings", "zone_schema_validation_schemas", "zone_ruleset", "zone_legacy_firewall_rules", "zone_legacy_filters", "zone_legacy_waf_packages", "zone_legacy_rate_limits", "zone_waf_analytics"];
79
+ export declare const COLLECTION_FAILURE_DETAILS: readonly ["cf_error", "invalid_output", "timeout", "output_too_large", "possibly_truncated", "page_limit", "command_unavailable"];
80
+ export declare const RECOMMENDED_CF_SCOPES: readonly ["account:read", "account-settings.read", "memberships.read", "user:read", "user-details.read", "zone:read", "zone.read", "zone-settings.read", "dns.read", "dns_records:read", "ssl-and-certificates.read", "zone-waf.read", "account-waf.read", "account-rulesets.read", "http-ddos-managed-ruleset.read", "firewall-services.read", "account-firewall-access-rules.read", "page-rules.read", "bot-management.read", "page-shield.read", "domain-page-shield.read", "api-gateway.read", "access.read", "access:read", "access-app.read", "access-idp.read", "access-service-token.read", "teams.read", "teams:read", "argotunnel.read", "teams-connector-cloudflared.read"];
81
+ export type AccountKind = (typeof ACCOUNT_KINDS)[number];
82
+ export type ZoneSingleKind = (typeof ZONE_SINGLE_KINDS)[number];
83
+ export type NotCollectableZoneKind = (typeof NOT_COLLECTABLE_ZONE_KINDS)[number];
84
+ export type SnapshotKind = (typeof SNAPSHOT_KINDS)[number];
85
+ export type CollectableKind = Exclude<SnapshotKind, NotCollectableZoneKind>;
86
+ export type ZoneSettingId = (typeof ZONE_SETTING_IDS)[number];
87
+ export type CollectionFailureDetail = (typeof COLLECTION_FAILURE_DETAILS)[number];
88
+ /**
89
+ * SemVer 2 precedence. Returns a negative number, zero or a positive number,
90
+ * or `NaN` when either side is not `MAJOR.MINOR.PATCH[-PRERELEASE]`.
91
+ */
92
+ export declare function compareSemver(a: string, b: string): number;
93
+ /**
94
+ * True when `version` lies in `[CF_SUPPORTED.min, CF_SUPPORTED.maxExclusive)`.
95
+ * The upper bound compares release cores only, so a `2.0.0-beta.1` preview of
96
+ * the next major is unsupported too.
97
+ */
98
+ export declare function isSupportedCfVersion(version: string): boolean;
99
+ export declare const HEX32_REGEX: RegExp;
100
+ declare const httpError: z.ZodObject<{
101
+ ok: z.ZodLiteral<false>;
102
+ reason: z.ZodLiteral<"http_error">;
103
+ status: z.ZodNumber;
104
+ }, z.core.$strict>;
105
+ declare const notCollected: z.ZodObject<{
106
+ ok: z.ZodLiteral<false>;
107
+ reason: z.ZodLiteral<"not_collected">;
108
+ }, z.core.$strict>;
109
+ declare const collectionFailed: z.ZodObject<{
110
+ ok: z.ZodLiteral<false>;
111
+ reason: z.ZodLiteral<"collection_failed">;
112
+ detail: z.ZodEnum<{
113
+ timeout: "timeout";
114
+ cf_error: "cf_error";
115
+ invalid_output: "invalid_output";
116
+ output_too_large: "output_too_large";
117
+ possibly_truncated: "possibly_truncated";
118
+ page_limit: "page_limit";
119
+ command_unavailable: "command_unavailable";
120
+ }>;
121
+ }, z.core.$strict>;
122
+ export type HttpErrorResult = z.infer<typeof httpError>;
123
+ export type NotCollectedResult = z.infer<typeof notCollected>;
124
+ export type CollectionFailedResult = z.infer<typeof collectionFailed>;
125
+ export declare const AccountData: z.ZodObject<{
126
+ id: z.ZodString;
127
+ name: z.ZodString;
128
+ type: z.ZodOptional<z.ZodString>;
129
+ settings: z.ZodOptional<z.ZodObject<{
130
+ enforce_twofactor: z.ZodOptional<z.ZodBoolean>;
131
+ }, z.core.$strict>>;
132
+ }, z.core.$strict>;
133
+ export declare const ZoneData: z.ZodObject<{
134
+ id: z.ZodString;
135
+ name: z.ZodString;
136
+ status: z.ZodOptional<z.ZodString>;
137
+ paused: z.ZodOptional<z.ZodBoolean>;
138
+ type: z.ZodOptional<z.ZodString>;
139
+ development_mode: z.ZodOptional<z.ZodNumber>;
140
+ plan: z.ZodOptional<z.ZodObject<{
141
+ name: z.ZodString;
142
+ }, z.core.$strict>>;
143
+ account: z.ZodObject<{
144
+ id: z.ZodString;
145
+ name: z.ZodString;
146
+ }, z.core.$strict>;
147
+ }, z.core.$strict>;
148
+ export declare const MemberData: z.ZodObject<{
149
+ status: z.ZodOptional<z.ZodLiteral<"pending">>;
150
+ email: z.ZodOptional<z.ZodString>;
151
+ user: z.ZodOptional<z.ZodObject<{
152
+ two_factor_authentication_enabled: z.ZodLiteral<false>;
153
+ }, z.core.$strict>>;
154
+ }, z.core.$strict>;
155
+ export declare const AccessRuleData: z.ZodObject<{
156
+ mode: z.ZodOptional<z.ZodString>;
157
+ configuration: z.ZodOptional<z.ZodObject<{
158
+ target: z.ZodOptional<z.ZodString>;
159
+ value: z.ZodOptional<z.ZodString>;
160
+ }, z.core.$strict>>;
161
+ }, z.core.$strict>;
162
+ export declare const IdentityProviderData: z.ZodObject<{
163
+ type: z.ZodOptional<z.ZodString>;
164
+ }, z.core.$strict>;
165
+ export declare const ServiceTokenData: z.ZodObject<{
166
+ expires_at: z.ZodOptional<z.ZodISODateTime>;
167
+ }, z.core.$strict>;
168
+ export declare const GatewayRuleData: z.ZodObject<{
169
+ enabled: z.ZodOptional<z.ZodLiteral<false>>;
170
+ filters: z.ZodOptional<z.ZodArray<z.ZodString>>;
171
+ }, z.core.$strict>;
172
+ export declare const TunnelData: z.ZodObject<{
173
+ status: z.ZodOptional<z.ZodString>;
174
+ is_deleted: z.ZodOptional<z.ZodLiteral<true>>;
175
+ }, z.core.$strict>;
176
+ export declare const SettingData: z.ZodObject<{
177
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>]>>;
178
+ }, z.core.$strict>;
179
+ export declare const DnssecData: z.ZodObject<{
180
+ status: z.ZodOptional<z.ZodString>;
181
+ algorithm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
182
+ }, z.core.$strict>;
183
+ export declare const DnsRecordData: z.ZodObject<{
184
+ type: z.ZodEnum<{
185
+ A: "A";
186
+ AAAA: "AAAA";
187
+ }>;
188
+ name: z.ZodOptional<z.ZodString>;
189
+ content: z.ZodString;
190
+ proxied: z.ZodOptional<z.ZodLiteral<true>>;
191
+ }, z.core.$strict>;
192
+ export declare const RulesetHeadData: z.ZodObject<{
193
+ id: z.ZodString;
194
+ phase: z.ZodOptional<z.ZodString>;
195
+ name: z.ZodOptional<z.ZodLiteral<"ddos">>;
196
+ }, z.core.$strict>;
197
+ export declare const RulesetDetailData: z.ZodObject<{
198
+ id: z.ZodString;
199
+ phase: z.ZodOptional<z.ZodString>;
200
+ name: z.ZodOptional<z.ZodLiteral<"ddos">>;
201
+ rulesBody: z.ZodOptional<z.ZodString>;
202
+ }, z.core.$strict>;
203
+ export declare const PageRuleData: z.ZodObject<{
204
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
205
+ id: z.ZodEnum<{
206
+ waf: "waf";
207
+ security_level: "security_level";
208
+ browser_check: "browser_check";
209
+ disable_security: "disable_security";
210
+ disable_performance: "disable_performance";
211
+ }>;
212
+ }, z.core.$strict>>>;
213
+ }, z.core.$strict>;
214
+ export declare const BotManagementData: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodString>]>>;
215
+ export declare const SchemaValidationSettingsData: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
216
+ export declare const CountedData: z.ZodObject<{
217
+ count: z.ZodNumber;
218
+ }, z.core.$strict>;
219
+ export declare const EnabledOnlyData: z.ZodObject<{
220
+ enabled: z.ZodOptional<z.ZodBoolean>;
221
+ }, z.core.$strict>;
222
+ export declare const ProjectedRuleData: z.ZodObject<{
223
+ action: z.ZodOptional<z.ZodString>;
224
+ enabled: z.ZodOptional<z.ZodLiteral<false>>;
225
+ expression: z.ZodOptional<z.ZodEnum<{
226
+ true: "true";
227
+ "ip.geoip.country in": "ip.geoip.country in";
228
+ }>>;
229
+ action_parameters: z.ZodOptional<z.ZodObject<{
230
+ id: z.ZodOptional<z.ZodString>;
231
+ name: z.ZodOptional<z.ZodString>;
232
+ }, z.core.$strict>>;
233
+ id: z.ZodOptional<z.ZodString>;
234
+ ref: z.ZodOptional<z.ZodString>;
235
+ description: z.ZodOptional<z.ZodString>;
236
+ }, z.core.$strict>;
237
+ export declare const RuleRunData: z.ZodObject<{
238
+ action: z.ZodOptional<z.ZodString>;
239
+ enabled: z.ZodOptional<z.ZodLiteral<false>>;
240
+ expression: z.ZodOptional<z.ZodEnum<{
241
+ true: "true";
242
+ "ip.geoip.country in": "ip.geoip.country in";
243
+ }>>;
244
+ action_parameters: z.ZodOptional<z.ZodObject<{
245
+ id: z.ZodOptional<z.ZodString>;
246
+ name: z.ZodOptional<z.ZodString>;
247
+ }, z.core.$strict>>;
248
+ id: z.ZodOptional<z.ZodString>;
249
+ ref: z.ZodOptional<z.ZodString>;
250
+ description: z.ZodOptional<z.ZodString>;
251
+ n: z.ZodOptional<z.ZodNumber>;
252
+ }, z.core.$strict>;
253
+ export declare const ProjectedRulesetDetailData: z.ZodObject<{
254
+ id: z.ZodString;
255
+ phase: z.ZodOptional<z.ZodString>;
256
+ name: z.ZodOptional<z.ZodLiteral<"ddos">>;
257
+ rules: z.ZodArray<z.ZodObject<{
258
+ action: z.ZodOptional<z.ZodString>;
259
+ enabled: z.ZodOptional<z.ZodLiteral<false>>;
260
+ expression: z.ZodOptional<z.ZodEnum<{
261
+ true: "true";
262
+ "ip.geoip.country in": "ip.geoip.country in";
263
+ }>>;
264
+ action_parameters: z.ZodOptional<z.ZodObject<{
265
+ id: z.ZodOptional<z.ZodString>;
266
+ name: z.ZodOptional<z.ZodString>;
267
+ }, z.core.$strict>>;
268
+ id: z.ZodOptional<z.ZodString>;
269
+ ref: z.ZodOptional<z.ZodString>;
270
+ description: z.ZodOptional<z.ZodString>;
271
+ }, z.core.$strict>>;
272
+ }, z.core.$strict>;
273
+ export type AccountData = z.infer<typeof AccountData>;
274
+ export type ZoneData = z.infer<typeof ZoneData>;
275
+ export type MemberData = z.infer<typeof MemberData>;
276
+ export type AccessRuleData = z.infer<typeof AccessRuleData>;
277
+ export type IdentityProviderData = z.infer<typeof IdentityProviderData>;
278
+ export type ServiceTokenData = z.infer<typeof ServiceTokenData>;
279
+ export type GatewayRuleData = z.infer<typeof GatewayRuleData>;
280
+ export type TunnelData = z.infer<typeof TunnelData>;
281
+ export type SettingData = z.infer<typeof SettingData>;
282
+ export type DnssecData = z.infer<typeof DnssecData>;
283
+ export type DnsRecordData = z.infer<typeof DnsRecordData>;
284
+ export type RulesetHeadData = z.infer<typeof RulesetHeadData>;
285
+ export type RulesetDetailData = z.infer<typeof RulesetDetailData>;
286
+ export type PageRuleData = z.infer<typeof PageRuleData>;
287
+ export type BotManagementData = z.infer<typeof BotManagementData>;
288
+ export type SchemaValidationSettingsData = z.infer<typeof SchemaValidationSettingsData>;
289
+ export type CountedData = z.infer<typeof CountedData>;
290
+ export type EnabledOnlyData = z.infer<typeof EnabledOnlyData>;
291
+ export type ProjectedRule = z.infer<typeof ProjectedRuleData>;
292
+ export type RuleRun = z.infer<typeof RuleRunData>;
293
+ export type ProjectedRulesetDetail = z.infer<typeof ProjectedRulesetDetailData>;
294
+ export declare const SnapshotEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
295
+ kind: z.ZodLiteral<"account">;
296
+ result: z.ZodUnion<readonly [z.ZodObject<{
297
+ ok: z.ZodLiteral<true>;
298
+ data: z.ZodObject<{
299
+ id: z.ZodString;
300
+ name: z.ZodString;
301
+ type: z.ZodOptional<z.ZodString>;
302
+ settings: z.ZodOptional<z.ZodObject<{
303
+ enforce_twofactor: z.ZodOptional<z.ZodBoolean>;
304
+ }, z.core.$strict>>;
305
+ }, z.core.$strict>;
306
+ }, z.core.$strict>, z.ZodObject<{
307
+ ok: z.ZodLiteral<false>;
308
+ reason: z.ZodLiteral<"http_error">;
309
+ status: z.ZodNumber;
310
+ }, z.core.$strict>]>;
311
+ }, z.core.$strict>, z.ZodObject<{
312
+ kind: z.ZodLiteral<"zones">;
313
+ result: z.ZodObject<{
314
+ ok: z.ZodLiteral<true>;
315
+ data: z.ZodArray<z.ZodObject<{
316
+ id: z.ZodString;
317
+ name: z.ZodString;
318
+ status: z.ZodOptional<z.ZodString>;
319
+ paused: z.ZodOptional<z.ZodBoolean>;
320
+ type: z.ZodOptional<z.ZodString>;
321
+ development_mode: z.ZodOptional<z.ZodNumber>;
322
+ plan: z.ZodOptional<z.ZodObject<{
323
+ name: z.ZodString;
324
+ }, z.core.$strict>>;
325
+ account: z.ZodObject<{
326
+ id: z.ZodString;
327
+ name: z.ZodString;
328
+ }, z.core.$strict>;
329
+ }, z.core.$strict>>;
330
+ }, z.core.$strict>;
331
+ }, z.core.$strict>, z.ZodObject<{
332
+ kind: z.ZodLiteral<"account_members">;
333
+ result: z.ZodUnion<readonly [z.ZodObject<{
334
+ ok: z.ZodLiteral<true>;
335
+ data: z.ZodArray<z.ZodObject<{
336
+ status: z.ZodOptional<z.ZodLiteral<"pending">>;
337
+ email: z.ZodOptional<z.ZodString>;
338
+ user: z.ZodOptional<z.ZodObject<{
339
+ two_factor_authentication_enabled: z.ZodLiteral<false>;
340
+ }, z.core.$strict>>;
341
+ }, z.core.$strict>>;
342
+ }, z.core.$strict>, z.ZodObject<{
343
+ ok: z.ZodLiteral<false>;
344
+ reason: z.ZodLiteral<"http_error">;
345
+ status: z.ZodNumber;
346
+ }, z.core.$strict>, z.ZodObject<{
347
+ ok: z.ZodLiteral<false>;
348
+ reason: z.ZodLiteral<"collection_failed">;
349
+ detail: z.ZodEnum<{
350
+ timeout: "timeout";
351
+ cf_error: "cf_error";
352
+ invalid_output: "invalid_output";
353
+ output_too_large: "output_too_large";
354
+ possibly_truncated: "possibly_truncated";
355
+ page_limit: "page_limit";
356
+ command_unavailable: "command_unavailable";
357
+ }>;
358
+ }, z.core.$strict>]>;
359
+ }, z.core.$strict>, z.ZodObject<{
360
+ kind: z.ZodLiteral<"account_rulesets">;
361
+ result: z.ZodUnion<readonly [z.ZodObject<{
362
+ ok: z.ZodLiteral<true>;
363
+ data: z.ZodObject<{
364
+ count: z.ZodNumber;
365
+ }, z.core.$strict>;
366
+ }, z.core.$strict>, z.ZodObject<{
367
+ ok: z.ZodLiteral<false>;
368
+ reason: z.ZodLiteral<"http_error">;
369
+ status: z.ZodNumber;
370
+ }, z.core.$strict>, z.ZodObject<{
371
+ ok: z.ZodLiteral<false>;
372
+ reason: z.ZodLiteral<"collection_failed">;
373
+ detail: z.ZodEnum<{
374
+ timeout: "timeout";
375
+ cf_error: "cf_error";
376
+ invalid_output: "invalid_output";
377
+ output_too_large: "output_too_large";
378
+ possibly_truncated: "possibly_truncated";
379
+ page_limit: "page_limit";
380
+ command_unavailable: "command_unavailable";
381
+ }>;
382
+ }, z.core.$strict>]>;
383
+ }, z.core.$strict>, z.ZodObject<{
384
+ kind: z.ZodLiteral<"account_access_rules">;
385
+ result: z.ZodUnion<readonly [z.ZodObject<{
386
+ ok: z.ZodLiteral<true>;
387
+ data: z.ZodArray<z.ZodObject<{
388
+ mode: z.ZodOptional<z.ZodString>;
389
+ configuration: z.ZodOptional<z.ZodObject<{
390
+ target: z.ZodOptional<z.ZodString>;
391
+ value: z.ZodOptional<z.ZodString>;
392
+ }, z.core.$strict>>;
393
+ }, z.core.$strict>>;
394
+ }, z.core.$strict>, z.ZodObject<{
395
+ ok: z.ZodLiteral<false>;
396
+ reason: z.ZodLiteral<"http_error">;
397
+ status: z.ZodNumber;
398
+ }, z.core.$strict>, z.ZodObject<{
399
+ ok: z.ZodLiteral<false>;
400
+ reason: z.ZodLiteral<"collection_failed">;
401
+ detail: z.ZodEnum<{
402
+ timeout: "timeout";
403
+ cf_error: "cf_error";
404
+ invalid_output: "invalid_output";
405
+ output_too_large: "output_too_large";
406
+ possibly_truncated: "possibly_truncated";
407
+ page_limit: "page_limit";
408
+ command_unavailable: "command_unavailable";
409
+ }>;
410
+ }, z.core.$strict>]>;
411
+ }, z.core.$strict>, z.ZodObject<{
412
+ kind: z.ZodLiteral<"access_apps">;
413
+ result: z.ZodUnion<readonly [z.ZodObject<{
414
+ ok: z.ZodLiteral<true>;
415
+ data: z.ZodObject<{
416
+ count: z.ZodNumber;
417
+ }, z.core.$strict>;
418
+ }, z.core.$strict>, z.ZodObject<{
419
+ ok: z.ZodLiteral<false>;
420
+ reason: z.ZodLiteral<"http_error">;
421
+ status: z.ZodNumber;
422
+ }, z.core.$strict>, z.ZodObject<{
423
+ ok: z.ZodLiteral<false>;
424
+ reason: z.ZodLiteral<"collection_failed">;
425
+ detail: z.ZodEnum<{
426
+ timeout: "timeout";
427
+ cf_error: "cf_error";
428
+ invalid_output: "invalid_output";
429
+ output_too_large: "output_too_large";
430
+ possibly_truncated: "possibly_truncated";
431
+ page_limit: "page_limit";
432
+ command_unavailable: "command_unavailable";
433
+ }>;
434
+ }, z.core.$strict>]>;
435
+ }, z.core.$strict>, z.ZodObject<{
436
+ kind: z.ZodLiteral<"access_identity_providers">;
437
+ result: z.ZodUnion<readonly [z.ZodObject<{
438
+ ok: z.ZodLiteral<true>;
439
+ data: z.ZodArray<z.ZodObject<{
440
+ type: z.ZodOptional<z.ZodString>;
441
+ }, z.core.$strict>>;
442
+ }, z.core.$strict>, z.ZodObject<{
443
+ ok: z.ZodLiteral<false>;
444
+ reason: z.ZodLiteral<"http_error">;
445
+ status: z.ZodNumber;
446
+ }, z.core.$strict>, z.ZodObject<{
447
+ ok: z.ZodLiteral<false>;
448
+ reason: z.ZodLiteral<"collection_failed">;
449
+ detail: z.ZodEnum<{
450
+ timeout: "timeout";
451
+ cf_error: "cf_error";
452
+ invalid_output: "invalid_output";
453
+ output_too_large: "output_too_large";
454
+ possibly_truncated: "possibly_truncated";
455
+ page_limit: "page_limit";
456
+ command_unavailable: "command_unavailable";
457
+ }>;
458
+ }, z.core.$strict>]>;
459
+ }, z.core.$strict>, z.ZodObject<{
460
+ kind: z.ZodLiteral<"access_service_tokens">;
461
+ result: z.ZodUnion<readonly [z.ZodObject<{
462
+ ok: z.ZodLiteral<true>;
463
+ data: z.ZodArray<z.ZodObject<{
464
+ expires_at: z.ZodOptional<z.ZodISODateTime>;
465
+ }, z.core.$strict>>;
466
+ }, z.core.$strict>, z.ZodObject<{
467
+ ok: z.ZodLiteral<false>;
468
+ reason: z.ZodLiteral<"http_error">;
469
+ status: z.ZodNumber;
470
+ }, z.core.$strict>, z.ZodObject<{
471
+ ok: z.ZodLiteral<false>;
472
+ reason: z.ZodLiteral<"collection_failed">;
473
+ detail: z.ZodEnum<{
474
+ timeout: "timeout";
475
+ cf_error: "cf_error";
476
+ invalid_output: "invalid_output";
477
+ output_too_large: "output_too_large";
478
+ possibly_truncated: "possibly_truncated";
479
+ page_limit: "page_limit";
480
+ command_unavailable: "command_unavailable";
481
+ }>;
482
+ }, z.core.$strict>]>;
483
+ }, z.core.$strict>, z.ZodObject<{
484
+ kind: z.ZodLiteral<"gateway_rules">;
485
+ result: z.ZodUnion<readonly [z.ZodObject<{
486
+ ok: z.ZodLiteral<true>;
487
+ data: z.ZodArray<z.ZodObject<{
488
+ enabled: z.ZodOptional<z.ZodLiteral<false>>;
489
+ filters: z.ZodOptional<z.ZodArray<z.ZodString>>;
490
+ }, z.core.$strict>>;
491
+ }, z.core.$strict>, z.ZodObject<{
492
+ ok: z.ZodLiteral<false>;
493
+ reason: z.ZodLiteral<"http_error">;
494
+ status: z.ZodNumber;
495
+ }, z.core.$strict>, z.ZodObject<{
496
+ ok: z.ZodLiteral<false>;
497
+ reason: z.ZodLiteral<"collection_failed">;
498
+ detail: z.ZodEnum<{
499
+ timeout: "timeout";
500
+ cf_error: "cf_error";
501
+ invalid_output: "invalid_output";
502
+ output_too_large: "output_too_large";
503
+ possibly_truncated: "possibly_truncated";
504
+ page_limit: "page_limit";
505
+ command_unavailable: "command_unavailable";
506
+ }>;
507
+ }, z.core.$strict>]>;
508
+ }, z.core.$strict>, z.ZodObject<{
509
+ kind: z.ZodLiteral<"gateway_locations">;
510
+ result: z.ZodUnion<readonly [z.ZodObject<{
511
+ ok: z.ZodLiteral<true>;
512
+ data: z.ZodObject<{
513
+ count: z.ZodNumber;
514
+ }, z.core.$strict>;
515
+ }, z.core.$strict>, z.ZodObject<{
516
+ ok: z.ZodLiteral<false>;
517
+ reason: z.ZodLiteral<"http_error">;
518
+ status: z.ZodNumber;
519
+ }, z.core.$strict>, z.ZodObject<{
520
+ ok: z.ZodLiteral<false>;
521
+ reason: z.ZodLiteral<"collection_failed">;
522
+ detail: z.ZodEnum<{
523
+ timeout: "timeout";
524
+ cf_error: "cf_error";
525
+ invalid_output: "invalid_output";
526
+ output_too_large: "output_too_large";
527
+ possibly_truncated: "possibly_truncated";
528
+ page_limit: "page_limit";
529
+ command_unavailable: "command_unavailable";
530
+ }>;
531
+ }, z.core.$strict>]>;
532
+ }, z.core.$strict>, z.ZodObject<{
533
+ kind: z.ZodLiteral<"cfd_tunnels">;
534
+ result: z.ZodUnion<readonly [z.ZodObject<{
535
+ ok: z.ZodLiteral<true>;
536
+ data: z.ZodArray<z.ZodObject<{
537
+ status: z.ZodOptional<z.ZodString>;
538
+ is_deleted: z.ZodOptional<z.ZodLiteral<true>>;
539
+ }, z.core.$strict>>;
540
+ }, z.core.$strict>, z.ZodObject<{
541
+ ok: z.ZodLiteral<false>;
542
+ reason: z.ZodLiteral<"http_error">;
543
+ status: z.ZodNumber;
544
+ }, z.core.$strict>, z.ZodObject<{
545
+ ok: z.ZodLiteral<false>;
546
+ reason: z.ZodLiteral<"collection_failed">;
547
+ detail: z.ZodEnum<{
548
+ timeout: "timeout";
549
+ cf_error: "cf_error";
550
+ invalid_output: "invalid_output";
551
+ output_too_large: "output_too_large";
552
+ possibly_truncated: "possibly_truncated";
553
+ page_limit: "page_limit";
554
+ command_unavailable: "command_unavailable";
555
+ }>;
556
+ }, z.core.$strict>]>;
557
+ }, z.core.$strict>, z.ZodObject<{
558
+ kind: z.ZodLiteral<"zone_setting">;
559
+ zoneId: z.ZodString;
560
+ settingId: z.ZodEnum<{
561
+ waf: "waf";
562
+ ssl: "ssl";
563
+ always_use_https: "always_use_https";
564
+ min_tls_version: "min_tls_version";
565
+ tls_1_3: "tls_1_3";
566
+ security_level: "security_level";
567
+ email_obfuscation: "email_obfuscation";
568
+ hotlink_protection: "hotlink_protection";
569
+ browser_check: "browser_check";
570
+ origin_pulls: "origin_pulls";
571
+ challenge_ttl: "challenge_ttl";
572
+ browser_cache_ttl: "browser_cache_ttl";
573
+ minify: "minify";
574
+ early_hints: "early_hints";
575
+ rocket_loader: "rocket_loader";
576
+ automatic_https_rewrites: "automatic_https_rewrites";
577
+ security_header: "security_header";
578
+ opportunistic_encryption: "opportunistic_encryption";
579
+ always_online: "always_online";
580
+ }>;
581
+ result: z.ZodUnion<readonly [z.ZodObject<{
582
+ ok: z.ZodLiteral<true>;
583
+ data: z.ZodObject<{
584
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>]>>;
585
+ }, z.core.$strict>;
586
+ }, z.core.$strict>, z.ZodObject<{
587
+ ok: z.ZodLiteral<false>;
588
+ reason: z.ZodLiteral<"http_error">;
589
+ status: z.ZodNumber;
590
+ }, z.core.$strict>, z.ZodObject<{
591
+ ok: z.ZodLiteral<false>;
592
+ reason: z.ZodLiteral<"collection_failed">;
593
+ detail: z.ZodEnum<{
594
+ timeout: "timeout";
595
+ cf_error: "cf_error";
596
+ invalid_output: "invalid_output";
597
+ output_too_large: "output_too_large";
598
+ possibly_truncated: "possibly_truncated";
599
+ page_limit: "page_limit";
600
+ command_unavailable: "command_unavailable";
601
+ }>;
602
+ }, z.core.$strict>]>;
603
+ }, z.core.$strict>, z.ZodObject<{
604
+ kind: z.ZodLiteral<"zone_dnssec">;
605
+ zoneId: z.ZodString;
606
+ result: z.ZodUnion<readonly [z.ZodObject<{
607
+ ok: z.ZodLiteral<true>;
608
+ data: z.ZodObject<{
609
+ status: z.ZodOptional<z.ZodString>;
610
+ algorithm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
611
+ }, z.core.$strict>;
612
+ }, z.core.$strict>, z.ZodObject<{
613
+ ok: z.ZodLiteral<false>;
614
+ reason: z.ZodLiteral<"http_error">;
615
+ status: z.ZodNumber;
616
+ }, z.core.$strict>, z.ZodObject<{
617
+ ok: z.ZodLiteral<false>;
618
+ reason: z.ZodLiteral<"collection_failed">;
619
+ detail: z.ZodEnum<{
620
+ timeout: "timeout";
621
+ cf_error: "cf_error";
622
+ invalid_output: "invalid_output";
623
+ output_too_large: "output_too_large";
624
+ possibly_truncated: "possibly_truncated";
625
+ page_limit: "page_limit";
626
+ command_unavailable: "command_unavailable";
627
+ }>;
628
+ }, z.core.$strict>]>;
629
+ }, z.core.$strict>, z.ZodObject<{
630
+ kind: z.ZodLiteral<"zone_dns_records">;
631
+ zoneId: z.ZodString;
632
+ result: z.ZodUnion<readonly [z.ZodObject<{
633
+ ok: z.ZodLiteral<true>;
634
+ data: z.ZodArray<z.ZodObject<{
635
+ type: z.ZodEnum<{
636
+ A: "A";
637
+ AAAA: "AAAA";
638
+ }>;
639
+ name: z.ZodOptional<z.ZodString>;
640
+ content: z.ZodString;
641
+ proxied: z.ZodOptional<z.ZodLiteral<true>>;
642
+ }, z.core.$strict>>;
643
+ }, z.core.$strict>, z.ZodObject<{
644
+ ok: z.ZodLiteral<false>;
645
+ reason: z.ZodLiteral<"http_error">;
646
+ status: z.ZodNumber;
647
+ }, z.core.$strict>, z.ZodObject<{
648
+ ok: z.ZodLiteral<false>;
649
+ reason: z.ZodLiteral<"collection_failed">;
650
+ detail: z.ZodEnum<{
651
+ timeout: "timeout";
652
+ cf_error: "cf_error";
653
+ invalid_output: "invalid_output";
654
+ output_too_large: "output_too_large";
655
+ possibly_truncated: "possibly_truncated";
656
+ page_limit: "page_limit";
657
+ command_unavailable: "command_unavailable";
658
+ }>;
659
+ }, z.core.$strict>]>;
660
+ }, z.core.$strict>, z.ZodObject<{
661
+ kind: z.ZodLiteral<"zone_universal_ssl">;
662
+ zoneId: z.ZodString;
663
+ result: z.ZodUnion<readonly [z.ZodObject<{
664
+ ok: z.ZodLiteral<true>;
665
+ data: z.ZodObject<{
666
+ enabled: z.ZodOptional<z.ZodBoolean>;
667
+ }, z.core.$strict>;
668
+ }, z.core.$strict>, z.ZodObject<{
669
+ ok: z.ZodLiteral<false>;
670
+ reason: z.ZodLiteral<"http_error">;
671
+ status: z.ZodNumber;
672
+ }, z.core.$strict>, z.ZodObject<{
673
+ ok: z.ZodLiteral<false>;
674
+ reason: z.ZodLiteral<"collection_failed">;
675
+ detail: z.ZodEnum<{
676
+ timeout: "timeout";
677
+ cf_error: "cf_error";
678
+ invalid_output: "invalid_output";
679
+ output_too_large: "output_too_large";
680
+ possibly_truncated: "possibly_truncated";
681
+ page_limit: "page_limit";
682
+ command_unavailable: "command_unavailable";
683
+ }>;
684
+ }, z.core.$strict>]>;
685
+ }, z.core.$strict>, z.ZodObject<{
686
+ kind: z.ZodLiteral<"zone_total_tls">;
687
+ zoneId: z.ZodString;
688
+ result: z.ZodUnion<readonly [z.ZodObject<{
689
+ ok: z.ZodLiteral<true>;
690
+ data: z.ZodObject<{
691
+ enabled: z.ZodOptional<z.ZodBoolean>;
692
+ }, z.core.$strict>;
693
+ }, z.core.$strict>, z.ZodObject<{
694
+ ok: z.ZodLiteral<false>;
695
+ reason: z.ZodLiteral<"http_error">;
696
+ status: z.ZodNumber;
697
+ }, z.core.$strict>, z.ZodObject<{
698
+ ok: z.ZodLiteral<false>;
699
+ reason: z.ZodLiteral<"collection_failed">;
700
+ detail: z.ZodEnum<{
701
+ timeout: "timeout";
702
+ cf_error: "cf_error";
703
+ invalid_output: "invalid_output";
704
+ output_too_large: "output_too_large";
705
+ possibly_truncated: "possibly_truncated";
706
+ page_limit: "page_limit";
707
+ command_unavailable: "command_unavailable";
708
+ }>;
709
+ }, z.core.$strict>]>;
710
+ }, z.core.$strict>, z.ZodObject<{
711
+ kind: z.ZodLiteral<"zone_rulesets">;
712
+ zoneId: z.ZodString;
713
+ result: z.ZodUnion<readonly [z.ZodObject<{
714
+ ok: z.ZodLiteral<true>;
715
+ data: z.ZodArray<z.ZodObject<{
716
+ id: z.ZodString;
717
+ phase: z.ZodOptional<z.ZodString>;
718
+ name: z.ZodOptional<z.ZodLiteral<"ddos">>;
719
+ }, z.core.$strict>>;
720
+ }, z.core.$strict>, z.ZodObject<{
721
+ ok: z.ZodLiteral<false>;
722
+ reason: z.ZodLiteral<"http_error">;
723
+ status: z.ZodNumber;
724
+ }, z.core.$strict>, z.ZodObject<{
725
+ ok: z.ZodLiteral<false>;
726
+ reason: z.ZodLiteral<"collection_failed">;
727
+ detail: z.ZodEnum<{
728
+ timeout: "timeout";
729
+ cf_error: "cf_error";
730
+ invalid_output: "invalid_output";
731
+ output_too_large: "output_too_large";
732
+ possibly_truncated: "possibly_truncated";
733
+ page_limit: "page_limit";
734
+ command_unavailable: "command_unavailable";
735
+ }>;
736
+ }, z.core.$strict>]>;
737
+ }, z.core.$strict>, z.ZodObject<{
738
+ kind: z.ZodLiteral<"zone_ruleset">;
739
+ zoneId: z.ZodString;
740
+ rulesetId: z.ZodString;
741
+ result: z.ZodUnion<readonly [z.ZodObject<{
742
+ ok: z.ZodLiteral<true>;
743
+ data: z.ZodObject<{
744
+ id: z.ZodString;
745
+ phase: z.ZodOptional<z.ZodString>;
746
+ name: z.ZodOptional<z.ZodLiteral<"ddos">>;
747
+ rulesBody: z.ZodOptional<z.ZodString>;
748
+ }, z.core.$strict>;
749
+ }, z.core.$strict>, z.ZodObject<{
750
+ ok: z.ZodLiteral<false>;
751
+ reason: z.ZodLiteral<"http_error">;
752
+ status: z.ZodNumber;
753
+ }, z.core.$strict>]>;
754
+ }, z.core.$strict>, z.ZodObject<{
755
+ kind: z.ZodLiteral<"zone_access_rules">;
756
+ zoneId: z.ZodString;
757
+ result: z.ZodUnion<readonly [z.ZodObject<{
758
+ ok: z.ZodLiteral<true>;
759
+ data: z.ZodArray<z.ZodObject<{
760
+ mode: z.ZodOptional<z.ZodString>;
761
+ configuration: z.ZodOptional<z.ZodObject<{
762
+ target: z.ZodOptional<z.ZodString>;
763
+ value: z.ZodOptional<z.ZodString>;
764
+ }, z.core.$strict>>;
765
+ }, z.core.$strict>>;
766
+ }, z.core.$strict>, z.ZodObject<{
767
+ ok: z.ZodLiteral<false>;
768
+ reason: z.ZodLiteral<"http_error">;
769
+ status: z.ZodNumber;
770
+ }, z.core.$strict>, z.ZodObject<{
771
+ ok: z.ZodLiteral<false>;
772
+ reason: z.ZodLiteral<"collection_failed">;
773
+ detail: z.ZodEnum<{
774
+ timeout: "timeout";
775
+ cf_error: "cf_error";
776
+ invalid_output: "invalid_output";
777
+ output_too_large: "output_too_large";
778
+ possibly_truncated: "possibly_truncated";
779
+ page_limit: "page_limit";
780
+ command_unavailable: "command_unavailable";
781
+ }>;
782
+ }, z.core.$strict>]>;
783
+ }, z.core.$strict>, z.ZodObject<{
784
+ kind: z.ZodLiteral<"zone_page_rules">;
785
+ zoneId: z.ZodString;
786
+ result: z.ZodUnion<readonly [z.ZodObject<{
787
+ ok: z.ZodLiteral<true>;
788
+ data: z.ZodArray<z.ZodObject<{
789
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
790
+ id: z.ZodEnum<{
791
+ waf: "waf";
792
+ security_level: "security_level";
793
+ browser_check: "browser_check";
794
+ disable_security: "disable_security";
795
+ disable_performance: "disable_performance";
796
+ }>;
797
+ }, z.core.$strict>>>;
798
+ }, z.core.$strict>>;
799
+ }, z.core.$strict>, z.ZodObject<{
800
+ ok: z.ZodLiteral<false>;
801
+ reason: z.ZodLiteral<"http_error">;
802
+ status: z.ZodNumber;
803
+ }, z.core.$strict>, z.ZodObject<{
804
+ ok: z.ZodLiteral<false>;
805
+ reason: z.ZodLiteral<"collection_failed">;
806
+ detail: z.ZodEnum<{
807
+ timeout: "timeout";
808
+ cf_error: "cf_error";
809
+ invalid_output: "invalid_output";
810
+ output_too_large: "output_too_large";
811
+ possibly_truncated: "possibly_truncated";
812
+ page_limit: "page_limit";
813
+ command_unavailable: "command_unavailable";
814
+ }>;
815
+ }, z.core.$strict>]>;
816
+ }, z.core.$strict>, z.ZodObject<{
817
+ kind: z.ZodLiteral<"zone_bot_management">;
818
+ zoneId: z.ZodString;
819
+ result: z.ZodUnion<readonly [z.ZodObject<{
820
+ ok: z.ZodLiteral<true>;
821
+ data: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodString>]>>;
822
+ }, z.core.$strict>, z.ZodObject<{
823
+ ok: z.ZodLiteral<false>;
824
+ reason: z.ZodLiteral<"http_error">;
825
+ status: z.ZodNumber;
826
+ }, z.core.$strict>, z.ZodObject<{
827
+ ok: z.ZodLiteral<false>;
828
+ reason: z.ZodLiteral<"collection_failed">;
829
+ detail: z.ZodEnum<{
830
+ timeout: "timeout";
831
+ cf_error: "cf_error";
832
+ invalid_output: "invalid_output";
833
+ output_too_large: "output_too_large";
834
+ possibly_truncated: "possibly_truncated";
835
+ page_limit: "page_limit";
836
+ command_unavailable: "command_unavailable";
837
+ }>;
838
+ }, z.core.$strict>]>;
839
+ }, z.core.$strict>, z.ZodObject<{
840
+ kind: z.ZodLiteral<"zone_page_shield">;
841
+ zoneId: z.ZodString;
842
+ result: z.ZodUnion<readonly [z.ZodObject<{
843
+ ok: z.ZodLiteral<true>;
844
+ data: z.ZodObject<{
845
+ enabled: z.ZodOptional<z.ZodBoolean>;
846
+ }, z.core.$strict>;
847
+ }, z.core.$strict>, z.ZodObject<{
848
+ ok: z.ZodLiteral<false>;
849
+ reason: z.ZodLiteral<"http_error">;
850
+ status: z.ZodNumber;
851
+ }, z.core.$strict>, z.ZodObject<{
852
+ ok: z.ZodLiteral<false>;
853
+ reason: z.ZodLiteral<"collection_failed">;
854
+ detail: z.ZodEnum<{
855
+ timeout: "timeout";
856
+ cf_error: "cf_error";
857
+ invalid_output: "invalid_output";
858
+ output_too_large: "output_too_large";
859
+ possibly_truncated: "possibly_truncated";
860
+ page_limit: "page_limit";
861
+ command_unavailable: "command_unavailable";
862
+ }>;
863
+ }, z.core.$strict>]>;
864
+ }, z.core.$strict>, z.ZodObject<{
865
+ kind: z.ZodLiteral<"zone_schema_validation_settings">;
866
+ zoneId: z.ZodString;
867
+ result: z.ZodUnion<readonly [z.ZodObject<{
868
+ ok: z.ZodLiteral<true>;
869
+ data: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
870
+ }, z.core.$strict>, z.ZodObject<{
871
+ ok: z.ZodLiteral<false>;
872
+ reason: z.ZodLiteral<"http_error">;
873
+ status: z.ZodNumber;
874
+ }, z.core.$strict>, z.ZodObject<{
875
+ ok: z.ZodLiteral<false>;
876
+ reason: z.ZodLiteral<"collection_failed">;
877
+ detail: z.ZodEnum<{
878
+ timeout: "timeout";
879
+ cf_error: "cf_error";
880
+ invalid_output: "invalid_output";
881
+ output_too_large: "output_too_large";
882
+ possibly_truncated: "possibly_truncated";
883
+ page_limit: "page_limit";
884
+ command_unavailable: "command_unavailable";
885
+ }>;
886
+ }, z.core.$strict>]>;
887
+ }, z.core.$strict>, z.ZodObject<{
888
+ kind: z.ZodLiteral<"zone_schema_validation_schemas">;
889
+ zoneId: z.ZodString;
890
+ result: z.ZodUnion<readonly [z.ZodObject<{
891
+ ok: z.ZodLiteral<true>;
892
+ data: z.ZodObject<{
893
+ count: z.ZodNumber;
894
+ }, z.core.$strict>;
895
+ }, z.core.$strict>, z.ZodObject<{
896
+ ok: z.ZodLiteral<false>;
897
+ reason: z.ZodLiteral<"http_error">;
898
+ status: z.ZodNumber;
899
+ }, z.core.$strict>, z.ZodObject<{
900
+ ok: z.ZodLiteral<false>;
901
+ reason: z.ZodLiteral<"collection_failed">;
902
+ detail: z.ZodEnum<{
903
+ timeout: "timeout";
904
+ cf_error: "cf_error";
905
+ invalid_output: "invalid_output";
906
+ output_too_large: "output_too_large";
907
+ possibly_truncated: "possibly_truncated";
908
+ page_limit: "page_limit";
909
+ command_unavailable: "command_unavailable";
910
+ }>;
911
+ }, z.core.$strict>]>;
912
+ }, z.core.$strict>, z.ZodObject<{
913
+ kind: z.ZodLiteral<"zone_legacy_firewall_rules">;
914
+ zoneId: z.ZodString;
915
+ result: z.ZodObject<{
916
+ ok: z.ZodLiteral<false>;
917
+ reason: z.ZodLiteral<"not_collected">;
918
+ }, z.core.$strict>;
919
+ }, z.core.$strict>, z.ZodObject<{
920
+ kind: z.ZodLiteral<"zone_legacy_filters">;
921
+ zoneId: z.ZodString;
922
+ result: z.ZodObject<{
923
+ ok: z.ZodLiteral<false>;
924
+ reason: z.ZodLiteral<"not_collected">;
925
+ }, z.core.$strict>;
926
+ }, z.core.$strict>, z.ZodObject<{
927
+ kind: z.ZodLiteral<"zone_legacy_waf_packages">;
928
+ zoneId: z.ZodString;
929
+ result: z.ZodObject<{
930
+ ok: z.ZodLiteral<false>;
931
+ reason: z.ZodLiteral<"not_collected">;
932
+ }, z.core.$strict>;
933
+ }, z.core.$strict>, z.ZodObject<{
934
+ kind: z.ZodLiteral<"zone_legacy_rate_limits">;
935
+ zoneId: z.ZodString;
936
+ result: z.ZodObject<{
937
+ ok: z.ZodLiteral<false>;
938
+ reason: z.ZodLiteral<"not_collected">;
939
+ }, z.core.$strict>;
940
+ }, z.core.$strict>, z.ZodObject<{
941
+ kind: z.ZodLiteral<"zone_waf_analytics">;
942
+ zoneId: z.ZodString;
943
+ result: z.ZodObject<{
944
+ ok: z.ZodLiteral<false>;
945
+ reason: z.ZodLiteral<"not_collected">;
946
+ }, z.core.$strict>;
947
+ }, z.core.$strict>], "kind">;
948
+ export type SnapshotEntry = z.infer<typeof SnapshotEntrySchema>;
949
+ export declare const SnapshotCollectorSchema: z.ZodObject<{
950
+ name: z.ZodLiteral<"@vigilbase/cli">;
951
+ version: z.ZodString;
952
+ cf: z.ZodObject<{
953
+ version: z.ZodString;
954
+ }, z.core.$strict>;
955
+ authSource: z.ZodEnum<{
956
+ cf_profile: "cf_profile";
957
+ cf_env_token: "cf_env_token";
958
+ cf_default_profile: "cf_default_profile";
959
+ }>;
960
+ platform: z.ZodEnum<{
961
+ darwin: "darwin";
962
+ linux: "linux";
963
+ win32: "win32";
964
+ }>;
965
+ startedAt: z.ZodISODateTime;
966
+ finishedAt: z.ZodISODateTime;
967
+ cfInvocations: z.ZodNumber;
968
+ }, z.core.$strict>;
969
+ export type SnapshotCollector = z.infer<typeof SnapshotCollectorSchema>;
970
+ declare const SnapshotObjectSchema: z.ZodObject<{
971
+ schemaVersion: z.ZodLiteral<"vigilbase.cloudflare-checkup.snapshot/1">;
972
+ projection: z.ZodObject<{
973
+ version: z.ZodLiteral<1>;
974
+ ipPseudonymization: z.ZodLiteral<"per_prefix_sequential/1">;
975
+ }, z.core.$strict>;
976
+ accountId: z.ZodString;
977
+ collector: z.ZodObject<{
978
+ name: z.ZodLiteral<"@vigilbase/cli">;
979
+ version: z.ZodString;
980
+ cf: z.ZodObject<{
981
+ version: z.ZodString;
982
+ }, z.core.$strict>;
983
+ authSource: z.ZodEnum<{
984
+ cf_profile: "cf_profile";
985
+ cf_env_token: "cf_env_token";
986
+ cf_default_profile: "cf_default_profile";
987
+ }>;
988
+ platform: z.ZodEnum<{
989
+ darwin: "darwin";
990
+ linux: "linux";
991
+ win32: "win32";
992
+ }>;
993
+ startedAt: z.ZodISODateTime;
994
+ finishedAt: z.ZodISODateTime;
995
+ cfInvocations: z.ZodNumber;
996
+ }, z.core.$strict>;
997
+ entries: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
998
+ kind: z.ZodLiteral<"account">;
999
+ result: z.ZodUnion<readonly [z.ZodObject<{
1000
+ ok: z.ZodLiteral<true>;
1001
+ data: z.ZodObject<{
1002
+ id: z.ZodString;
1003
+ name: z.ZodString;
1004
+ type: z.ZodOptional<z.ZodString>;
1005
+ settings: z.ZodOptional<z.ZodObject<{
1006
+ enforce_twofactor: z.ZodOptional<z.ZodBoolean>;
1007
+ }, z.core.$strict>>;
1008
+ }, z.core.$strict>;
1009
+ }, z.core.$strict>, z.ZodObject<{
1010
+ ok: z.ZodLiteral<false>;
1011
+ reason: z.ZodLiteral<"http_error">;
1012
+ status: z.ZodNumber;
1013
+ }, z.core.$strict>]>;
1014
+ }, z.core.$strict>, z.ZodObject<{
1015
+ kind: z.ZodLiteral<"zones">;
1016
+ result: z.ZodObject<{
1017
+ ok: z.ZodLiteral<true>;
1018
+ data: z.ZodArray<z.ZodObject<{
1019
+ id: z.ZodString;
1020
+ name: z.ZodString;
1021
+ status: z.ZodOptional<z.ZodString>;
1022
+ paused: z.ZodOptional<z.ZodBoolean>;
1023
+ type: z.ZodOptional<z.ZodString>;
1024
+ development_mode: z.ZodOptional<z.ZodNumber>;
1025
+ plan: z.ZodOptional<z.ZodObject<{
1026
+ name: z.ZodString;
1027
+ }, z.core.$strict>>;
1028
+ account: z.ZodObject<{
1029
+ id: z.ZodString;
1030
+ name: z.ZodString;
1031
+ }, z.core.$strict>;
1032
+ }, z.core.$strict>>;
1033
+ }, z.core.$strict>;
1034
+ }, z.core.$strict>, z.ZodObject<{
1035
+ kind: z.ZodLiteral<"account_members">;
1036
+ result: z.ZodUnion<readonly [z.ZodObject<{
1037
+ ok: z.ZodLiteral<true>;
1038
+ data: z.ZodArray<z.ZodObject<{
1039
+ status: z.ZodOptional<z.ZodLiteral<"pending">>;
1040
+ email: z.ZodOptional<z.ZodString>;
1041
+ user: z.ZodOptional<z.ZodObject<{
1042
+ two_factor_authentication_enabled: z.ZodLiteral<false>;
1043
+ }, z.core.$strict>>;
1044
+ }, z.core.$strict>>;
1045
+ }, z.core.$strict>, z.ZodObject<{
1046
+ ok: z.ZodLiteral<false>;
1047
+ reason: z.ZodLiteral<"http_error">;
1048
+ status: z.ZodNumber;
1049
+ }, z.core.$strict>, z.ZodObject<{
1050
+ ok: z.ZodLiteral<false>;
1051
+ reason: z.ZodLiteral<"collection_failed">;
1052
+ detail: z.ZodEnum<{
1053
+ timeout: "timeout";
1054
+ cf_error: "cf_error";
1055
+ invalid_output: "invalid_output";
1056
+ output_too_large: "output_too_large";
1057
+ possibly_truncated: "possibly_truncated";
1058
+ page_limit: "page_limit";
1059
+ command_unavailable: "command_unavailable";
1060
+ }>;
1061
+ }, z.core.$strict>]>;
1062
+ }, z.core.$strict>, z.ZodObject<{
1063
+ kind: z.ZodLiteral<"account_rulesets">;
1064
+ result: z.ZodUnion<readonly [z.ZodObject<{
1065
+ ok: z.ZodLiteral<true>;
1066
+ data: z.ZodObject<{
1067
+ count: z.ZodNumber;
1068
+ }, z.core.$strict>;
1069
+ }, z.core.$strict>, z.ZodObject<{
1070
+ ok: z.ZodLiteral<false>;
1071
+ reason: z.ZodLiteral<"http_error">;
1072
+ status: z.ZodNumber;
1073
+ }, z.core.$strict>, z.ZodObject<{
1074
+ ok: z.ZodLiteral<false>;
1075
+ reason: z.ZodLiteral<"collection_failed">;
1076
+ detail: z.ZodEnum<{
1077
+ timeout: "timeout";
1078
+ cf_error: "cf_error";
1079
+ invalid_output: "invalid_output";
1080
+ output_too_large: "output_too_large";
1081
+ possibly_truncated: "possibly_truncated";
1082
+ page_limit: "page_limit";
1083
+ command_unavailable: "command_unavailable";
1084
+ }>;
1085
+ }, z.core.$strict>]>;
1086
+ }, z.core.$strict>, z.ZodObject<{
1087
+ kind: z.ZodLiteral<"account_access_rules">;
1088
+ result: z.ZodUnion<readonly [z.ZodObject<{
1089
+ ok: z.ZodLiteral<true>;
1090
+ data: z.ZodArray<z.ZodObject<{
1091
+ mode: z.ZodOptional<z.ZodString>;
1092
+ configuration: z.ZodOptional<z.ZodObject<{
1093
+ target: z.ZodOptional<z.ZodString>;
1094
+ value: z.ZodOptional<z.ZodString>;
1095
+ }, z.core.$strict>>;
1096
+ }, z.core.$strict>>;
1097
+ }, z.core.$strict>, z.ZodObject<{
1098
+ ok: z.ZodLiteral<false>;
1099
+ reason: z.ZodLiteral<"http_error">;
1100
+ status: z.ZodNumber;
1101
+ }, z.core.$strict>, z.ZodObject<{
1102
+ ok: z.ZodLiteral<false>;
1103
+ reason: z.ZodLiteral<"collection_failed">;
1104
+ detail: z.ZodEnum<{
1105
+ timeout: "timeout";
1106
+ cf_error: "cf_error";
1107
+ invalid_output: "invalid_output";
1108
+ output_too_large: "output_too_large";
1109
+ possibly_truncated: "possibly_truncated";
1110
+ page_limit: "page_limit";
1111
+ command_unavailable: "command_unavailable";
1112
+ }>;
1113
+ }, z.core.$strict>]>;
1114
+ }, z.core.$strict>, z.ZodObject<{
1115
+ kind: z.ZodLiteral<"access_apps">;
1116
+ result: z.ZodUnion<readonly [z.ZodObject<{
1117
+ ok: z.ZodLiteral<true>;
1118
+ data: z.ZodObject<{
1119
+ count: z.ZodNumber;
1120
+ }, z.core.$strict>;
1121
+ }, z.core.$strict>, z.ZodObject<{
1122
+ ok: z.ZodLiteral<false>;
1123
+ reason: z.ZodLiteral<"http_error">;
1124
+ status: z.ZodNumber;
1125
+ }, z.core.$strict>, z.ZodObject<{
1126
+ ok: z.ZodLiteral<false>;
1127
+ reason: z.ZodLiteral<"collection_failed">;
1128
+ detail: z.ZodEnum<{
1129
+ timeout: "timeout";
1130
+ cf_error: "cf_error";
1131
+ invalid_output: "invalid_output";
1132
+ output_too_large: "output_too_large";
1133
+ possibly_truncated: "possibly_truncated";
1134
+ page_limit: "page_limit";
1135
+ command_unavailable: "command_unavailable";
1136
+ }>;
1137
+ }, z.core.$strict>]>;
1138
+ }, z.core.$strict>, z.ZodObject<{
1139
+ kind: z.ZodLiteral<"access_identity_providers">;
1140
+ result: z.ZodUnion<readonly [z.ZodObject<{
1141
+ ok: z.ZodLiteral<true>;
1142
+ data: z.ZodArray<z.ZodObject<{
1143
+ type: z.ZodOptional<z.ZodString>;
1144
+ }, z.core.$strict>>;
1145
+ }, z.core.$strict>, z.ZodObject<{
1146
+ ok: z.ZodLiteral<false>;
1147
+ reason: z.ZodLiteral<"http_error">;
1148
+ status: z.ZodNumber;
1149
+ }, z.core.$strict>, z.ZodObject<{
1150
+ ok: z.ZodLiteral<false>;
1151
+ reason: z.ZodLiteral<"collection_failed">;
1152
+ detail: z.ZodEnum<{
1153
+ timeout: "timeout";
1154
+ cf_error: "cf_error";
1155
+ invalid_output: "invalid_output";
1156
+ output_too_large: "output_too_large";
1157
+ possibly_truncated: "possibly_truncated";
1158
+ page_limit: "page_limit";
1159
+ command_unavailable: "command_unavailable";
1160
+ }>;
1161
+ }, z.core.$strict>]>;
1162
+ }, z.core.$strict>, z.ZodObject<{
1163
+ kind: z.ZodLiteral<"access_service_tokens">;
1164
+ result: z.ZodUnion<readonly [z.ZodObject<{
1165
+ ok: z.ZodLiteral<true>;
1166
+ data: z.ZodArray<z.ZodObject<{
1167
+ expires_at: z.ZodOptional<z.ZodISODateTime>;
1168
+ }, z.core.$strict>>;
1169
+ }, z.core.$strict>, z.ZodObject<{
1170
+ ok: z.ZodLiteral<false>;
1171
+ reason: z.ZodLiteral<"http_error">;
1172
+ status: z.ZodNumber;
1173
+ }, z.core.$strict>, z.ZodObject<{
1174
+ ok: z.ZodLiteral<false>;
1175
+ reason: z.ZodLiteral<"collection_failed">;
1176
+ detail: z.ZodEnum<{
1177
+ timeout: "timeout";
1178
+ cf_error: "cf_error";
1179
+ invalid_output: "invalid_output";
1180
+ output_too_large: "output_too_large";
1181
+ possibly_truncated: "possibly_truncated";
1182
+ page_limit: "page_limit";
1183
+ command_unavailable: "command_unavailable";
1184
+ }>;
1185
+ }, z.core.$strict>]>;
1186
+ }, z.core.$strict>, z.ZodObject<{
1187
+ kind: z.ZodLiteral<"gateway_rules">;
1188
+ result: z.ZodUnion<readonly [z.ZodObject<{
1189
+ ok: z.ZodLiteral<true>;
1190
+ data: z.ZodArray<z.ZodObject<{
1191
+ enabled: z.ZodOptional<z.ZodLiteral<false>>;
1192
+ filters: z.ZodOptional<z.ZodArray<z.ZodString>>;
1193
+ }, z.core.$strict>>;
1194
+ }, z.core.$strict>, z.ZodObject<{
1195
+ ok: z.ZodLiteral<false>;
1196
+ reason: z.ZodLiteral<"http_error">;
1197
+ status: z.ZodNumber;
1198
+ }, z.core.$strict>, z.ZodObject<{
1199
+ ok: z.ZodLiteral<false>;
1200
+ reason: z.ZodLiteral<"collection_failed">;
1201
+ detail: z.ZodEnum<{
1202
+ timeout: "timeout";
1203
+ cf_error: "cf_error";
1204
+ invalid_output: "invalid_output";
1205
+ output_too_large: "output_too_large";
1206
+ possibly_truncated: "possibly_truncated";
1207
+ page_limit: "page_limit";
1208
+ command_unavailable: "command_unavailable";
1209
+ }>;
1210
+ }, z.core.$strict>]>;
1211
+ }, z.core.$strict>, z.ZodObject<{
1212
+ kind: z.ZodLiteral<"gateway_locations">;
1213
+ result: z.ZodUnion<readonly [z.ZodObject<{
1214
+ ok: z.ZodLiteral<true>;
1215
+ data: z.ZodObject<{
1216
+ count: z.ZodNumber;
1217
+ }, z.core.$strict>;
1218
+ }, z.core.$strict>, z.ZodObject<{
1219
+ ok: z.ZodLiteral<false>;
1220
+ reason: z.ZodLiteral<"http_error">;
1221
+ status: z.ZodNumber;
1222
+ }, z.core.$strict>, z.ZodObject<{
1223
+ ok: z.ZodLiteral<false>;
1224
+ reason: z.ZodLiteral<"collection_failed">;
1225
+ detail: z.ZodEnum<{
1226
+ timeout: "timeout";
1227
+ cf_error: "cf_error";
1228
+ invalid_output: "invalid_output";
1229
+ output_too_large: "output_too_large";
1230
+ possibly_truncated: "possibly_truncated";
1231
+ page_limit: "page_limit";
1232
+ command_unavailable: "command_unavailable";
1233
+ }>;
1234
+ }, z.core.$strict>]>;
1235
+ }, z.core.$strict>, z.ZodObject<{
1236
+ kind: z.ZodLiteral<"cfd_tunnels">;
1237
+ result: z.ZodUnion<readonly [z.ZodObject<{
1238
+ ok: z.ZodLiteral<true>;
1239
+ data: z.ZodArray<z.ZodObject<{
1240
+ status: z.ZodOptional<z.ZodString>;
1241
+ is_deleted: z.ZodOptional<z.ZodLiteral<true>>;
1242
+ }, z.core.$strict>>;
1243
+ }, z.core.$strict>, z.ZodObject<{
1244
+ ok: z.ZodLiteral<false>;
1245
+ reason: z.ZodLiteral<"http_error">;
1246
+ status: z.ZodNumber;
1247
+ }, z.core.$strict>, z.ZodObject<{
1248
+ ok: z.ZodLiteral<false>;
1249
+ reason: z.ZodLiteral<"collection_failed">;
1250
+ detail: z.ZodEnum<{
1251
+ timeout: "timeout";
1252
+ cf_error: "cf_error";
1253
+ invalid_output: "invalid_output";
1254
+ output_too_large: "output_too_large";
1255
+ possibly_truncated: "possibly_truncated";
1256
+ page_limit: "page_limit";
1257
+ command_unavailable: "command_unavailable";
1258
+ }>;
1259
+ }, z.core.$strict>]>;
1260
+ }, z.core.$strict>, z.ZodObject<{
1261
+ kind: z.ZodLiteral<"zone_setting">;
1262
+ zoneId: z.ZodString;
1263
+ settingId: z.ZodEnum<{
1264
+ waf: "waf";
1265
+ ssl: "ssl";
1266
+ always_use_https: "always_use_https";
1267
+ min_tls_version: "min_tls_version";
1268
+ tls_1_3: "tls_1_3";
1269
+ security_level: "security_level";
1270
+ email_obfuscation: "email_obfuscation";
1271
+ hotlink_protection: "hotlink_protection";
1272
+ browser_check: "browser_check";
1273
+ origin_pulls: "origin_pulls";
1274
+ challenge_ttl: "challenge_ttl";
1275
+ browser_cache_ttl: "browser_cache_ttl";
1276
+ minify: "minify";
1277
+ early_hints: "early_hints";
1278
+ rocket_loader: "rocket_loader";
1279
+ automatic_https_rewrites: "automatic_https_rewrites";
1280
+ security_header: "security_header";
1281
+ opportunistic_encryption: "opportunistic_encryption";
1282
+ always_online: "always_online";
1283
+ }>;
1284
+ result: z.ZodUnion<readonly [z.ZodObject<{
1285
+ ok: z.ZodLiteral<true>;
1286
+ data: z.ZodObject<{
1287
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>]>>;
1288
+ }, z.core.$strict>;
1289
+ }, z.core.$strict>, z.ZodObject<{
1290
+ ok: z.ZodLiteral<false>;
1291
+ reason: z.ZodLiteral<"http_error">;
1292
+ status: z.ZodNumber;
1293
+ }, z.core.$strict>, z.ZodObject<{
1294
+ ok: z.ZodLiteral<false>;
1295
+ reason: z.ZodLiteral<"collection_failed">;
1296
+ detail: z.ZodEnum<{
1297
+ timeout: "timeout";
1298
+ cf_error: "cf_error";
1299
+ invalid_output: "invalid_output";
1300
+ output_too_large: "output_too_large";
1301
+ possibly_truncated: "possibly_truncated";
1302
+ page_limit: "page_limit";
1303
+ command_unavailable: "command_unavailable";
1304
+ }>;
1305
+ }, z.core.$strict>]>;
1306
+ }, z.core.$strict>, z.ZodObject<{
1307
+ kind: z.ZodLiteral<"zone_dnssec">;
1308
+ zoneId: z.ZodString;
1309
+ result: z.ZodUnion<readonly [z.ZodObject<{
1310
+ ok: z.ZodLiteral<true>;
1311
+ data: z.ZodObject<{
1312
+ status: z.ZodOptional<z.ZodString>;
1313
+ algorithm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
1314
+ }, z.core.$strict>;
1315
+ }, z.core.$strict>, z.ZodObject<{
1316
+ ok: z.ZodLiteral<false>;
1317
+ reason: z.ZodLiteral<"http_error">;
1318
+ status: z.ZodNumber;
1319
+ }, z.core.$strict>, z.ZodObject<{
1320
+ ok: z.ZodLiteral<false>;
1321
+ reason: z.ZodLiteral<"collection_failed">;
1322
+ detail: z.ZodEnum<{
1323
+ timeout: "timeout";
1324
+ cf_error: "cf_error";
1325
+ invalid_output: "invalid_output";
1326
+ output_too_large: "output_too_large";
1327
+ possibly_truncated: "possibly_truncated";
1328
+ page_limit: "page_limit";
1329
+ command_unavailable: "command_unavailable";
1330
+ }>;
1331
+ }, z.core.$strict>]>;
1332
+ }, z.core.$strict>, z.ZodObject<{
1333
+ kind: z.ZodLiteral<"zone_dns_records">;
1334
+ zoneId: z.ZodString;
1335
+ result: z.ZodUnion<readonly [z.ZodObject<{
1336
+ ok: z.ZodLiteral<true>;
1337
+ data: z.ZodArray<z.ZodObject<{
1338
+ type: z.ZodEnum<{
1339
+ A: "A";
1340
+ AAAA: "AAAA";
1341
+ }>;
1342
+ name: z.ZodOptional<z.ZodString>;
1343
+ content: z.ZodString;
1344
+ proxied: z.ZodOptional<z.ZodLiteral<true>>;
1345
+ }, z.core.$strict>>;
1346
+ }, z.core.$strict>, z.ZodObject<{
1347
+ ok: z.ZodLiteral<false>;
1348
+ reason: z.ZodLiteral<"http_error">;
1349
+ status: z.ZodNumber;
1350
+ }, z.core.$strict>, z.ZodObject<{
1351
+ ok: z.ZodLiteral<false>;
1352
+ reason: z.ZodLiteral<"collection_failed">;
1353
+ detail: z.ZodEnum<{
1354
+ timeout: "timeout";
1355
+ cf_error: "cf_error";
1356
+ invalid_output: "invalid_output";
1357
+ output_too_large: "output_too_large";
1358
+ possibly_truncated: "possibly_truncated";
1359
+ page_limit: "page_limit";
1360
+ command_unavailable: "command_unavailable";
1361
+ }>;
1362
+ }, z.core.$strict>]>;
1363
+ }, z.core.$strict>, z.ZodObject<{
1364
+ kind: z.ZodLiteral<"zone_universal_ssl">;
1365
+ zoneId: z.ZodString;
1366
+ result: z.ZodUnion<readonly [z.ZodObject<{
1367
+ ok: z.ZodLiteral<true>;
1368
+ data: z.ZodObject<{
1369
+ enabled: z.ZodOptional<z.ZodBoolean>;
1370
+ }, z.core.$strict>;
1371
+ }, z.core.$strict>, z.ZodObject<{
1372
+ ok: z.ZodLiteral<false>;
1373
+ reason: z.ZodLiteral<"http_error">;
1374
+ status: z.ZodNumber;
1375
+ }, z.core.$strict>, z.ZodObject<{
1376
+ ok: z.ZodLiteral<false>;
1377
+ reason: z.ZodLiteral<"collection_failed">;
1378
+ detail: z.ZodEnum<{
1379
+ timeout: "timeout";
1380
+ cf_error: "cf_error";
1381
+ invalid_output: "invalid_output";
1382
+ output_too_large: "output_too_large";
1383
+ possibly_truncated: "possibly_truncated";
1384
+ page_limit: "page_limit";
1385
+ command_unavailable: "command_unavailable";
1386
+ }>;
1387
+ }, z.core.$strict>]>;
1388
+ }, z.core.$strict>, z.ZodObject<{
1389
+ kind: z.ZodLiteral<"zone_total_tls">;
1390
+ zoneId: z.ZodString;
1391
+ result: z.ZodUnion<readonly [z.ZodObject<{
1392
+ ok: z.ZodLiteral<true>;
1393
+ data: z.ZodObject<{
1394
+ enabled: z.ZodOptional<z.ZodBoolean>;
1395
+ }, z.core.$strict>;
1396
+ }, z.core.$strict>, z.ZodObject<{
1397
+ ok: z.ZodLiteral<false>;
1398
+ reason: z.ZodLiteral<"http_error">;
1399
+ status: z.ZodNumber;
1400
+ }, z.core.$strict>, z.ZodObject<{
1401
+ ok: z.ZodLiteral<false>;
1402
+ reason: z.ZodLiteral<"collection_failed">;
1403
+ detail: z.ZodEnum<{
1404
+ timeout: "timeout";
1405
+ cf_error: "cf_error";
1406
+ invalid_output: "invalid_output";
1407
+ output_too_large: "output_too_large";
1408
+ possibly_truncated: "possibly_truncated";
1409
+ page_limit: "page_limit";
1410
+ command_unavailable: "command_unavailable";
1411
+ }>;
1412
+ }, z.core.$strict>]>;
1413
+ }, z.core.$strict>, z.ZodObject<{
1414
+ kind: z.ZodLiteral<"zone_rulesets">;
1415
+ zoneId: z.ZodString;
1416
+ result: z.ZodUnion<readonly [z.ZodObject<{
1417
+ ok: z.ZodLiteral<true>;
1418
+ data: z.ZodArray<z.ZodObject<{
1419
+ id: z.ZodString;
1420
+ phase: z.ZodOptional<z.ZodString>;
1421
+ name: z.ZodOptional<z.ZodLiteral<"ddos">>;
1422
+ }, z.core.$strict>>;
1423
+ }, z.core.$strict>, z.ZodObject<{
1424
+ ok: z.ZodLiteral<false>;
1425
+ reason: z.ZodLiteral<"http_error">;
1426
+ status: z.ZodNumber;
1427
+ }, z.core.$strict>, z.ZodObject<{
1428
+ ok: z.ZodLiteral<false>;
1429
+ reason: z.ZodLiteral<"collection_failed">;
1430
+ detail: z.ZodEnum<{
1431
+ timeout: "timeout";
1432
+ cf_error: "cf_error";
1433
+ invalid_output: "invalid_output";
1434
+ output_too_large: "output_too_large";
1435
+ possibly_truncated: "possibly_truncated";
1436
+ page_limit: "page_limit";
1437
+ command_unavailable: "command_unavailable";
1438
+ }>;
1439
+ }, z.core.$strict>]>;
1440
+ }, z.core.$strict>, z.ZodObject<{
1441
+ kind: z.ZodLiteral<"zone_ruleset">;
1442
+ zoneId: z.ZodString;
1443
+ rulesetId: z.ZodString;
1444
+ result: z.ZodUnion<readonly [z.ZodObject<{
1445
+ ok: z.ZodLiteral<true>;
1446
+ data: z.ZodObject<{
1447
+ id: z.ZodString;
1448
+ phase: z.ZodOptional<z.ZodString>;
1449
+ name: z.ZodOptional<z.ZodLiteral<"ddos">>;
1450
+ rulesBody: z.ZodOptional<z.ZodString>;
1451
+ }, z.core.$strict>;
1452
+ }, z.core.$strict>, z.ZodObject<{
1453
+ ok: z.ZodLiteral<false>;
1454
+ reason: z.ZodLiteral<"http_error">;
1455
+ status: z.ZodNumber;
1456
+ }, z.core.$strict>]>;
1457
+ }, z.core.$strict>, z.ZodObject<{
1458
+ kind: z.ZodLiteral<"zone_access_rules">;
1459
+ zoneId: z.ZodString;
1460
+ result: z.ZodUnion<readonly [z.ZodObject<{
1461
+ ok: z.ZodLiteral<true>;
1462
+ data: z.ZodArray<z.ZodObject<{
1463
+ mode: z.ZodOptional<z.ZodString>;
1464
+ configuration: z.ZodOptional<z.ZodObject<{
1465
+ target: z.ZodOptional<z.ZodString>;
1466
+ value: z.ZodOptional<z.ZodString>;
1467
+ }, z.core.$strict>>;
1468
+ }, z.core.$strict>>;
1469
+ }, z.core.$strict>, z.ZodObject<{
1470
+ ok: z.ZodLiteral<false>;
1471
+ reason: z.ZodLiteral<"http_error">;
1472
+ status: z.ZodNumber;
1473
+ }, z.core.$strict>, z.ZodObject<{
1474
+ ok: z.ZodLiteral<false>;
1475
+ reason: z.ZodLiteral<"collection_failed">;
1476
+ detail: z.ZodEnum<{
1477
+ timeout: "timeout";
1478
+ cf_error: "cf_error";
1479
+ invalid_output: "invalid_output";
1480
+ output_too_large: "output_too_large";
1481
+ possibly_truncated: "possibly_truncated";
1482
+ page_limit: "page_limit";
1483
+ command_unavailable: "command_unavailable";
1484
+ }>;
1485
+ }, z.core.$strict>]>;
1486
+ }, z.core.$strict>, z.ZodObject<{
1487
+ kind: z.ZodLiteral<"zone_page_rules">;
1488
+ zoneId: z.ZodString;
1489
+ result: z.ZodUnion<readonly [z.ZodObject<{
1490
+ ok: z.ZodLiteral<true>;
1491
+ data: z.ZodArray<z.ZodObject<{
1492
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1493
+ id: z.ZodEnum<{
1494
+ waf: "waf";
1495
+ security_level: "security_level";
1496
+ browser_check: "browser_check";
1497
+ disable_security: "disable_security";
1498
+ disable_performance: "disable_performance";
1499
+ }>;
1500
+ }, z.core.$strict>>>;
1501
+ }, z.core.$strict>>;
1502
+ }, z.core.$strict>, z.ZodObject<{
1503
+ ok: z.ZodLiteral<false>;
1504
+ reason: z.ZodLiteral<"http_error">;
1505
+ status: z.ZodNumber;
1506
+ }, z.core.$strict>, z.ZodObject<{
1507
+ ok: z.ZodLiteral<false>;
1508
+ reason: z.ZodLiteral<"collection_failed">;
1509
+ detail: z.ZodEnum<{
1510
+ timeout: "timeout";
1511
+ cf_error: "cf_error";
1512
+ invalid_output: "invalid_output";
1513
+ output_too_large: "output_too_large";
1514
+ possibly_truncated: "possibly_truncated";
1515
+ page_limit: "page_limit";
1516
+ command_unavailable: "command_unavailable";
1517
+ }>;
1518
+ }, z.core.$strict>]>;
1519
+ }, z.core.$strict>, z.ZodObject<{
1520
+ kind: z.ZodLiteral<"zone_bot_management">;
1521
+ zoneId: z.ZodString;
1522
+ result: z.ZodUnion<readonly [z.ZodObject<{
1523
+ ok: z.ZodLiteral<true>;
1524
+ data: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodString>]>>;
1525
+ }, z.core.$strict>, z.ZodObject<{
1526
+ ok: z.ZodLiteral<false>;
1527
+ reason: z.ZodLiteral<"http_error">;
1528
+ status: z.ZodNumber;
1529
+ }, z.core.$strict>, z.ZodObject<{
1530
+ ok: z.ZodLiteral<false>;
1531
+ reason: z.ZodLiteral<"collection_failed">;
1532
+ detail: z.ZodEnum<{
1533
+ timeout: "timeout";
1534
+ cf_error: "cf_error";
1535
+ invalid_output: "invalid_output";
1536
+ output_too_large: "output_too_large";
1537
+ possibly_truncated: "possibly_truncated";
1538
+ page_limit: "page_limit";
1539
+ command_unavailable: "command_unavailable";
1540
+ }>;
1541
+ }, z.core.$strict>]>;
1542
+ }, z.core.$strict>, z.ZodObject<{
1543
+ kind: z.ZodLiteral<"zone_page_shield">;
1544
+ zoneId: z.ZodString;
1545
+ result: z.ZodUnion<readonly [z.ZodObject<{
1546
+ ok: z.ZodLiteral<true>;
1547
+ data: z.ZodObject<{
1548
+ enabled: z.ZodOptional<z.ZodBoolean>;
1549
+ }, z.core.$strict>;
1550
+ }, z.core.$strict>, z.ZodObject<{
1551
+ ok: z.ZodLiteral<false>;
1552
+ reason: z.ZodLiteral<"http_error">;
1553
+ status: z.ZodNumber;
1554
+ }, z.core.$strict>, z.ZodObject<{
1555
+ ok: z.ZodLiteral<false>;
1556
+ reason: z.ZodLiteral<"collection_failed">;
1557
+ detail: z.ZodEnum<{
1558
+ timeout: "timeout";
1559
+ cf_error: "cf_error";
1560
+ invalid_output: "invalid_output";
1561
+ output_too_large: "output_too_large";
1562
+ possibly_truncated: "possibly_truncated";
1563
+ page_limit: "page_limit";
1564
+ command_unavailable: "command_unavailable";
1565
+ }>;
1566
+ }, z.core.$strict>]>;
1567
+ }, z.core.$strict>, z.ZodObject<{
1568
+ kind: z.ZodLiteral<"zone_schema_validation_settings">;
1569
+ zoneId: z.ZodString;
1570
+ result: z.ZodUnion<readonly [z.ZodObject<{
1571
+ ok: z.ZodLiteral<true>;
1572
+ data: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
1573
+ }, z.core.$strict>, z.ZodObject<{
1574
+ ok: z.ZodLiteral<false>;
1575
+ reason: z.ZodLiteral<"http_error">;
1576
+ status: z.ZodNumber;
1577
+ }, z.core.$strict>, z.ZodObject<{
1578
+ ok: z.ZodLiteral<false>;
1579
+ reason: z.ZodLiteral<"collection_failed">;
1580
+ detail: z.ZodEnum<{
1581
+ timeout: "timeout";
1582
+ cf_error: "cf_error";
1583
+ invalid_output: "invalid_output";
1584
+ output_too_large: "output_too_large";
1585
+ possibly_truncated: "possibly_truncated";
1586
+ page_limit: "page_limit";
1587
+ command_unavailable: "command_unavailable";
1588
+ }>;
1589
+ }, z.core.$strict>]>;
1590
+ }, z.core.$strict>, z.ZodObject<{
1591
+ kind: z.ZodLiteral<"zone_schema_validation_schemas">;
1592
+ zoneId: z.ZodString;
1593
+ result: z.ZodUnion<readonly [z.ZodObject<{
1594
+ ok: z.ZodLiteral<true>;
1595
+ data: z.ZodObject<{
1596
+ count: z.ZodNumber;
1597
+ }, z.core.$strict>;
1598
+ }, z.core.$strict>, z.ZodObject<{
1599
+ ok: z.ZodLiteral<false>;
1600
+ reason: z.ZodLiteral<"http_error">;
1601
+ status: z.ZodNumber;
1602
+ }, z.core.$strict>, z.ZodObject<{
1603
+ ok: z.ZodLiteral<false>;
1604
+ reason: z.ZodLiteral<"collection_failed">;
1605
+ detail: z.ZodEnum<{
1606
+ timeout: "timeout";
1607
+ cf_error: "cf_error";
1608
+ invalid_output: "invalid_output";
1609
+ output_too_large: "output_too_large";
1610
+ possibly_truncated: "possibly_truncated";
1611
+ page_limit: "page_limit";
1612
+ command_unavailable: "command_unavailable";
1613
+ }>;
1614
+ }, z.core.$strict>]>;
1615
+ }, z.core.$strict>, z.ZodObject<{
1616
+ kind: z.ZodLiteral<"zone_legacy_firewall_rules">;
1617
+ zoneId: z.ZodString;
1618
+ result: z.ZodObject<{
1619
+ ok: z.ZodLiteral<false>;
1620
+ reason: z.ZodLiteral<"not_collected">;
1621
+ }, z.core.$strict>;
1622
+ }, z.core.$strict>, z.ZodObject<{
1623
+ kind: z.ZodLiteral<"zone_legacy_filters">;
1624
+ zoneId: z.ZodString;
1625
+ result: z.ZodObject<{
1626
+ ok: z.ZodLiteral<false>;
1627
+ reason: z.ZodLiteral<"not_collected">;
1628
+ }, z.core.$strict>;
1629
+ }, z.core.$strict>, z.ZodObject<{
1630
+ kind: z.ZodLiteral<"zone_legacy_waf_packages">;
1631
+ zoneId: z.ZodString;
1632
+ result: z.ZodObject<{
1633
+ ok: z.ZodLiteral<false>;
1634
+ reason: z.ZodLiteral<"not_collected">;
1635
+ }, z.core.$strict>;
1636
+ }, z.core.$strict>, z.ZodObject<{
1637
+ kind: z.ZodLiteral<"zone_legacy_rate_limits">;
1638
+ zoneId: z.ZodString;
1639
+ result: z.ZodObject<{
1640
+ ok: z.ZodLiteral<false>;
1641
+ reason: z.ZodLiteral<"not_collected">;
1642
+ }, z.core.$strict>;
1643
+ }, z.core.$strict>, z.ZodObject<{
1644
+ kind: z.ZodLiteral<"zone_waf_analytics">;
1645
+ zoneId: z.ZodString;
1646
+ result: z.ZodObject<{
1647
+ ok: z.ZodLiteral<false>;
1648
+ reason: z.ZodLiteral<"not_collected">;
1649
+ }, z.core.$strict>;
1650
+ }, z.core.$strict>], "kind">>;
1651
+ ruleBodies: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1652
+ action: z.ZodOptional<z.ZodString>;
1653
+ enabled: z.ZodOptional<z.ZodLiteral<false>>;
1654
+ expression: z.ZodOptional<z.ZodEnum<{
1655
+ true: "true";
1656
+ "ip.geoip.country in": "ip.geoip.country in";
1657
+ }>>;
1658
+ action_parameters: z.ZodOptional<z.ZodObject<{
1659
+ id: z.ZodOptional<z.ZodString>;
1660
+ name: z.ZodOptional<z.ZodString>;
1661
+ }, z.core.$strict>>;
1662
+ id: z.ZodOptional<z.ZodString>;
1663
+ ref: z.ZodOptional<z.ZodString>;
1664
+ description: z.ZodOptional<z.ZodString>;
1665
+ n: z.ZodOptional<z.ZodNumber>;
1666
+ }, z.core.$strict>>>;
1667
+ }, z.core.$strict>;
1668
+ type SnapshotShape = z.infer<typeof SnapshotObjectSchema>;
1669
+ export declare const CloudflareCheckupSnapshotV1Schema: z.ZodObject<{
1670
+ schemaVersion: z.ZodLiteral<"vigilbase.cloudflare-checkup.snapshot/1">;
1671
+ projection: z.ZodObject<{
1672
+ version: z.ZodLiteral<1>;
1673
+ ipPseudonymization: z.ZodLiteral<"per_prefix_sequential/1">;
1674
+ }, z.core.$strict>;
1675
+ accountId: z.ZodString;
1676
+ collector: z.ZodObject<{
1677
+ name: z.ZodLiteral<"@vigilbase/cli">;
1678
+ version: z.ZodString;
1679
+ cf: z.ZodObject<{
1680
+ version: z.ZodString;
1681
+ }, z.core.$strict>;
1682
+ authSource: z.ZodEnum<{
1683
+ cf_profile: "cf_profile";
1684
+ cf_env_token: "cf_env_token";
1685
+ cf_default_profile: "cf_default_profile";
1686
+ }>;
1687
+ platform: z.ZodEnum<{
1688
+ darwin: "darwin";
1689
+ linux: "linux";
1690
+ win32: "win32";
1691
+ }>;
1692
+ startedAt: z.ZodISODateTime;
1693
+ finishedAt: z.ZodISODateTime;
1694
+ cfInvocations: z.ZodNumber;
1695
+ }, z.core.$strict>;
1696
+ entries: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1697
+ kind: z.ZodLiteral<"account">;
1698
+ result: z.ZodUnion<readonly [z.ZodObject<{
1699
+ ok: z.ZodLiteral<true>;
1700
+ data: z.ZodObject<{
1701
+ id: z.ZodString;
1702
+ name: z.ZodString;
1703
+ type: z.ZodOptional<z.ZodString>;
1704
+ settings: z.ZodOptional<z.ZodObject<{
1705
+ enforce_twofactor: z.ZodOptional<z.ZodBoolean>;
1706
+ }, z.core.$strict>>;
1707
+ }, z.core.$strict>;
1708
+ }, z.core.$strict>, z.ZodObject<{
1709
+ ok: z.ZodLiteral<false>;
1710
+ reason: z.ZodLiteral<"http_error">;
1711
+ status: z.ZodNumber;
1712
+ }, z.core.$strict>]>;
1713
+ }, z.core.$strict>, z.ZodObject<{
1714
+ kind: z.ZodLiteral<"zones">;
1715
+ result: z.ZodObject<{
1716
+ ok: z.ZodLiteral<true>;
1717
+ data: z.ZodArray<z.ZodObject<{
1718
+ id: z.ZodString;
1719
+ name: z.ZodString;
1720
+ status: z.ZodOptional<z.ZodString>;
1721
+ paused: z.ZodOptional<z.ZodBoolean>;
1722
+ type: z.ZodOptional<z.ZodString>;
1723
+ development_mode: z.ZodOptional<z.ZodNumber>;
1724
+ plan: z.ZodOptional<z.ZodObject<{
1725
+ name: z.ZodString;
1726
+ }, z.core.$strict>>;
1727
+ account: z.ZodObject<{
1728
+ id: z.ZodString;
1729
+ name: z.ZodString;
1730
+ }, z.core.$strict>;
1731
+ }, z.core.$strict>>;
1732
+ }, z.core.$strict>;
1733
+ }, z.core.$strict>, z.ZodObject<{
1734
+ kind: z.ZodLiteral<"account_members">;
1735
+ result: z.ZodUnion<readonly [z.ZodObject<{
1736
+ ok: z.ZodLiteral<true>;
1737
+ data: z.ZodArray<z.ZodObject<{
1738
+ status: z.ZodOptional<z.ZodLiteral<"pending">>;
1739
+ email: z.ZodOptional<z.ZodString>;
1740
+ user: z.ZodOptional<z.ZodObject<{
1741
+ two_factor_authentication_enabled: z.ZodLiteral<false>;
1742
+ }, z.core.$strict>>;
1743
+ }, z.core.$strict>>;
1744
+ }, z.core.$strict>, z.ZodObject<{
1745
+ ok: z.ZodLiteral<false>;
1746
+ reason: z.ZodLiteral<"http_error">;
1747
+ status: z.ZodNumber;
1748
+ }, z.core.$strict>, z.ZodObject<{
1749
+ ok: z.ZodLiteral<false>;
1750
+ reason: z.ZodLiteral<"collection_failed">;
1751
+ detail: z.ZodEnum<{
1752
+ timeout: "timeout";
1753
+ cf_error: "cf_error";
1754
+ invalid_output: "invalid_output";
1755
+ output_too_large: "output_too_large";
1756
+ possibly_truncated: "possibly_truncated";
1757
+ page_limit: "page_limit";
1758
+ command_unavailable: "command_unavailable";
1759
+ }>;
1760
+ }, z.core.$strict>]>;
1761
+ }, z.core.$strict>, z.ZodObject<{
1762
+ kind: z.ZodLiteral<"account_rulesets">;
1763
+ result: z.ZodUnion<readonly [z.ZodObject<{
1764
+ ok: z.ZodLiteral<true>;
1765
+ data: z.ZodObject<{
1766
+ count: z.ZodNumber;
1767
+ }, z.core.$strict>;
1768
+ }, z.core.$strict>, z.ZodObject<{
1769
+ ok: z.ZodLiteral<false>;
1770
+ reason: z.ZodLiteral<"http_error">;
1771
+ status: z.ZodNumber;
1772
+ }, z.core.$strict>, z.ZodObject<{
1773
+ ok: z.ZodLiteral<false>;
1774
+ reason: z.ZodLiteral<"collection_failed">;
1775
+ detail: z.ZodEnum<{
1776
+ timeout: "timeout";
1777
+ cf_error: "cf_error";
1778
+ invalid_output: "invalid_output";
1779
+ output_too_large: "output_too_large";
1780
+ possibly_truncated: "possibly_truncated";
1781
+ page_limit: "page_limit";
1782
+ command_unavailable: "command_unavailable";
1783
+ }>;
1784
+ }, z.core.$strict>]>;
1785
+ }, z.core.$strict>, z.ZodObject<{
1786
+ kind: z.ZodLiteral<"account_access_rules">;
1787
+ result: z.ZodUnion<readonly [z.ZodObject<{
1788
+ ok: z.ZodLiteral<true>;
1789
+ data: z.ZodArray<z.ZodObject<{
1790
+ mode: z.ZodOptional<z.ZodString>;
1791
+ configuration: z.ZodOptional<z.ZodObject<{
1792
+ target: z.ZodOptional<z.ZodString>;
1793
+ value: z.ZodOptional<z.ZodString>;
1794
+ }, z.core.$strict>>;
1795
+ }, z.core.$strict>>;
1796
+ }, z.core.$strict>, z.ZodObject<{
1797
+ ok: z.ZodLiteral<false>;
1798
+ reason: z.ZodLiteral<"http_error">;
1799
+ status: z.ZodNumber;
1800
+ }, z.core.$strict>, z.ZodObject<{
1801
+ ok: z.ZodLiteral<false>;
1802
+ reason: z.ZodLiteral<"collection_failed">;
1803
+ detail: z.ZodEnum<{
1804
+ timeout: "timeout";
1805
+ cf_error: "cf_error";
1806
+ invalid_output: "invalid_output";
1807
+ output_too_large: "output_too_large";
1808
+ possibly_truncated: "possibly_truncated";
1809
+ page_limit: "page_limit";
1810
+ command_unavailable: "command_unavailable";
1811
+ }>;
1812
+ }, z.core.$strict>]>;
1813
+ }, z.core.$strict>, z.ZodObject<{
1814
+ kind: z.ZodLiteral<"access_apps">;
1815
+ result: z.ZodUnion<readonly [z.ZodObject<{
1816
+ ok: z.ZodLiteral<true>;
1817
+ data: z.ZodObject<{
1818
+ count: z.ZodNumber;
1819
+ }, z.core.$strict>;
1820
+ }, z.core.$strict>, z.ZodObject<{
1821
+ ok: z.ZodLiteral<false>;
1822
+ reason: z.ZodLiteral<"http_error">;
1823
+ status: z.ZodNumber;
1824
+ }, z.core.$strict>, z.ZodObject<{
1825
+ ok: z.ZodLiteral<false>;
1826
+ reason: z.ZodLiteral<"collection_failed">;
1827
+ detail: z.ZodEnum<{
1828
+ timeout: "timeout";
1829
+ cf_error: "cf_error";
1830
+ invalid_output: "invalid_output";
1831
+ output_too_large: "output_too_large";
1832
+ possibly_truncated: "possibly_truncated";
1833
+ page_limit: "page_limit";
1834
+ command_unavailable: "command_unavailable";
1835
+ }>;
1836
+ }, z.core.$strict>]>;
1837
+ }, z.core.$strict>, z.ZodObject<{
1838
+ kind: z.ZodLiteral<"access_identity_providers">;
1839
+ result: z.ZodUnion<readonly [z.ZodObject<{
1840
+ ok: z.ZodLiteral<true>;
1841
+ data: z.ZodArray<z.ZodObject<{
1842
+ type: z.ZodOptional<z.ZodString>;
1843
+ }, z.core.$strict>>;
1844
+ }, z.core.$strict>, z.ZodObject<{
1845
+ ok: z.ZodLiteral<false>;
1846
+ reason: z.ZodLiteral<"http_error">;
1847
+ status: z.ZodNumber;
1848
+ }, z.core.$strict>, z.ZodObject<{
1849
+ ok: z.ZodLiteral<false>;
1850
+ reason: z.ZodLiteral<"collection_failed">;
1851
+ detail: z.ZodEnum<{
1852
+ timeout: "timeout";
1853
+ cf_error: "cf_error";
1854
+ invalid_output: "invalid_output";
1855
+ output_too_large: "output_too_large";
1856
+ possibly_truncated: "possibly_truncated";
1857
+ page_limit: "page_limit";
1858
+ command_unavailable: "command_unavailable";
1859
+ }>;
1860
+ }, z.core.$strict>]>;
1861
+ }, z.core.$strict>, z.ZodObject<{
1862
+ kind: z.ZodLiteral<"access_service_tokens">;
1863
+ result: z.ZodUnion<readonly [z.ZodObject<{
1864
+ ok: z.ZodLiteral<true>;
1865
+ data: z.ZodArray<z.ZodObject<{
1866
+ expires_at: z.ZodOptional<z.ZodISODateTime>;
1867
+ }, z.core.$strict>>;
1868
+ }, z.core.$strict>, z.ZodObject<{
1869
+ ok: z.ZodLiteral<false>;
1870
+ reason: z.ZodLiteral<"http_error">;
1871
+ status: z.ZodNumber;
1872
+ }, z.core.$strict>, z.ZodObject<{
1873
+ ok: z.ZodLiteral<false>;
1874
+ reason: z.ZodLiteral<"collection_failed">;
1875
+ detail: z.ZodEnum<{
1876
+ timeout: "timeout";
1877
+ cf_error: "cf_error";
1878
+ invalid_output: "invalid_output";
1879
+ output_too_large: "output_too_large";
1880
+ possibly_truncated: "possibly_truncated";
1881
+ page_limit: "page_limit";
1882
+ command_unavailable: "command_unavailable";
1883
+ }>;
1884
+ }, z.core.$strict>]>;
1885
+ }, z.core.$strict>, z.ZodObject<{
1886
+ kind: z.ZodLiteral<"gateway_rules">;
1887
+ result: z.ZodUnion<readonly [z.ZodObject<{
1888
+ ok: z.ZodLiteral<true>;
1889
+ data: z.ZodArray<z.ZodObject<{
1890
+ enabled: z.ZodOptional<z.ZodLiteral<false>>;
1891
+ filters: z.ZodOptional<z.ZodArray<z.ZodString>>;
1892
+ }, z.core.$strict>>;
1893
+ }, z.core.$strict>, z.ZodObject<{
1894
+ ok: z.ZodLiteral<false>;
1895
+ reason: z.ZodLiteral<"http_error">;
1896
+ status: z.ZodNumber;
1897
+ }, z.core.$strict>, z.ZodObject<{
1898
+ ok: z.ZodLiteral<false>;
1899
+ reason: z.ZodLiteral<"collection_failed">;
1900
+ detail: z.ZodEnum<{
1901
+ timeout: "timeout";
1902
+ cf_error: "cf_error";
1903
+ invalid_output: "invalid_output";
1904
+ output_too_large: "output_too_large";
1905
+ possibly_truncated: "possibly_truncated";
1906
+ page_limit: "page_limit";
1907
+ command_unavailable: "command_unavailable";
1908
+ }>;
1909
+ }, z.core.$strict>]>;
1910
+ }, z.core.$strict>, z.ZodObject<{
1911
+ kind: z.ZodLiteral<"gateway_locations">;
1912
+ result: z.ZodUnion<readonly [z.ZodObject<{
1913
+ ok: z.ZodLiteral<true>;
1914
+ data: z.ZodObject<{
1915
+ count: z.ZodNumber;
1916
+ }, z.core.$strict>;
1917
+ }, z.core.$strict>, z.ZodObject<{
1918
+ ok: z.ZodLiteral<false>;
1919
+ reason: z.ZodLiteral<"http_error">;
1920
+ status: z.ZodNumber;
1921
+ }, z.core.$strict>, z.ZodObject<{
1922
+ ok: z.ZodLiteral<false>;
1923
+ reason: z.ZodLiteral<"collection_failed">;
1924
+ detail: z.ZodEnum<{
1925
+ timeout: "timeout";
1926
+ cf_error: "cf_error";
1927
+ invalid_output: "invalid_output";
1928
+ output_too_large: "output_too_large";
1929
+ possibly_truncated: "possibly_truncated";
1930
+ page_limit: "page_limit";
1931
+ command_unavailable: "command_unavailable";
1932
+ }>;
1933
+ }, z.core.$strict>]>;
1934
+ }, z.core.$strict>, z.ZodObject<{
1935
+ kind: z.ZodLiteral<"cfd_tunnels">;
1936
+ result: z.ZodUnion<readonly [z.ZodObject<{
1937
+ ok: z.ZodLiteral<true>;
1938
+ data: z.ZodArray<z.ZodObject<{
1939
+ status: z.ZodOptional<z.ZodString>;
1940
+ is_deleted: z.ZodOptional<z.ZodLiteral<true>>;
1941
+ }, z.core.$strict>>;
1942
+ }, z.core.$strict>, z.ZodObject<{
1943
+ ok: z.ZodLiteral<false>;
1944
+ reason: z.ZodLiteral<"http_error">;
1945
+ status: z.ZodNumber;
1946
+ }, z.core.$strict>, z.ZodObject<{
1947
+ ok: z.ZodLiteral<false>;
1948
+ reason: z.ZodLiteral<"collection_failed">;
1949
+ detail: z.ZodEnum<{
1950
+ timeout: "timeout";
1951
+ cf_error: "cf_error";
1952
+ invalid_output: "invalid_output";
1953
+ output_too_large: "output_too_large";
1954
+ possibly_truncated: "possibly_truncated";
1955
+ page_limit: "page_limit";
1956
+ command_unavailable: "command_unavailable";
1957
+ }>;
1958
+ }, z.core.$strict>]>;
1959
+ }, z.core.$strict>, z.ZodObject<{
1960
+ kind: z.ZodLiteral<"zone_setting">;
1961
+ zoneId: z.ZodString;
1962
+ settingId: z.ZodEnum<{
1963
+ waf: "waf";
1964
+ ssl: "ssl";
1965
+ always_use_https: "always_use_https";
1966
+ min_tls_version: "min_tls_version";
1967
+ tls_1_3: "tls_1_3";
1968
+ security_level: "security_level";
1969
+ email_obfuscation: "email_obfuscation";
1970
+ hotlink_protection: "hotlink_protection";
1971
+ browser_check: "browser_check";
1972
+ origin_pulls: "origin_pulls";
1973
+ challenge_ttl: "challenge_ttl";
1974
+ browser_cache_ttl: "browser_cache_ttl";
1975
+ minify: "minify";
1976
+ early_hints: "early_hints";
1977
+ rocket_loader: "rocket_loader";
1978
+ automatic_https_rewrites: "automatic_https_rewrites";
1979
+ security_header: "security_header";
1980
+ opportunistic_encryption: "opportunistic_encryption";
1981
+ always_online: "always_online";
1982
+ }>;
1983
+ result: z.ZodUnion<readonly [z.ZodObject<{
1984
+ ok: z.ZodLiteral<true>;
1985
+ data: z.ZodObject<{
1986
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>>]>>;
1987
+ }, z.core.$strict>;
1988
+ }, z.core.$strict>, z.ZodObject<{
1989
+ ok: z.ZodLiteral<false>;
1990
+ reason: z.ZodLiteral<"http_error">;
1991
+ status: z.ZodNumber;
1992
+ }, z.core.$strict>, z.ZodObject<{
1993
+ ok: z.ZodLiteral<false>;
1994
+ reason: z.ZodLiteral<"collection_failed">;
1995
+ detail: z.ZodEnum<{
1996
+ timeout: "timeout";
1997
+ cf_error: "cf_error";
1998
+ invalid_output: "invalid_output";
1999
+ output_too_large: "output_too_large";
2000
+ possibly_truncated: "possibly_truncated";
2001
+ page_limit: "page_limit";
2002
+ command_unavailable: "command_unavailable";
2003
+ }>;
2004
+ }, z.core.$strict>]>;
2005
+ }, z.core.$strict>, z.ZodObject<{
2006
+ kind: z.ZodLiteral<"zone_dnssec">;
2007
+ zoneId: z.ZodString;
2008
+ result: z.ZodUnion<readonly [z.ZodObject<{
2009
+ ok: z.ZodLiteral<true>;
2010
+ data: z.ZodObject<{
2011
+ status: z.ZodOptional<z.ZodString>;
2012
+ algorithm: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
2013
+ }, z.core.$strict>;
2014
+ }, z.core.$strict>, z.ZodObject<{
2015
+ ok: z.ZodLiteral<false>;
2016
+ reason: z.ZodLiteral<"http_error">;
2017
+ status: z.ZodNumber;
2018
+ }, z.core.$strict>, z.ZodObject<{
2019
+ ok: z.ZodLiteral<false>;
2020
+ reason: z.ZodLiteral<"collection_failed">;
2021
+ detail: z.ZodEnum<{
2022
+ timeout: "timeout";
2023
+ cf_error: "cf_error";
2024
+ invalid_output: "invalid_output";
2025
+ output_too_large: "output_too_large";
2026
+ possibly_truncated: "possibly_truncated";
2027
+ page_limit: "page_limit";
2028
+ command_unavailable: "command_unavailable";
2029
+ }>;
2030
+ }, z.core.$strict>]>;
2031
+ }, z.core.$strict>, z.ZodObject<{
2032
+ kind: z.ZodLiteral<"zone_dns_records">;
2033
+ zoneId: z.ZodString;
2034
+ result: z.ZodUnion<readonly [z.ZodObject<{
2035
+ ok: z.ZodLiteral<true>;
2036
+ data: z.ZodArray<z.ZodObject<{
2037
+ type: z.ZodEnum<{
2038
+ A: "A";
2039
+ AAAA: "AAAA";
2040
+ }>;
2041
+ name: z.ZodOptional<z.ZodString>;
2042
+ content: z.ZodString;
2043
+ proxied: z.ZodOptional<z.ZodLiteral<true>>;
2044
+ }, z.core.$strict>>;
2045
+ }, z.core.$strict>, z.ZodObject<{
2046
+ ok: z.ZodLiteral<false>;
2047
+ reason: z.ZodLiteral<"http_error">;
2048
+ status: z.ZodNumber;
2049
+ }, z.core.$strict>, z.ZodObject<{
2050
+ ok: z.ZodLiteral<false>;
2051
+ reason: z.ZodLiteral<"collection_failed">;
2052
+ detail: z.ZodEnum<{
2053
+ timeout: "timeout";
2054
+ cf_error: "cf_error";
2055
+ invalid_output: "invalid_output";
2056
+ output_too_large: "output_too_large";
2057
+ possibly_truncated: "possibly_truncated";
2058
+ page_limit: "page_limit";
2059
+ command_unavailable: "command_unavailable";
2060
+ }>;
2061
+ }, z.core.$strict>]>;
2062
+ }, z.core.$strict>, z.ZodObject<{
2063
+ kind: z.ZodLiteral<"zone_universal_ssl">;
2064
+ zoneId: z.ZodString;
2065
+ result: z.ZodUnion<readonly [z.ZodObject<{
2066
+ ok: z.ZodLiteral<true>;
2067
+ data: z.ZodObject<{
2068
+ enabled: z.ZodOptional<z.ZodBoolean>;
2069
+ }, z.core.$strict>;
2070
+ }, z.core.$strict>, z.ZodObject<{
2071
+ ok: z.ZodLiteral<false>;
2072
+ reason: z.ZodLiteral<"http_error">;
2073
+ status: z.ZodNumber;
2074
+ }, z.core.$strict>, z.ZodObject<{
2075
+ ok: z.ZodLiteral<false>;
2076
+ reason: z.ZodLiteral<"collection_failed">;
2077
+ detail: z.ZodEnum<{
2078
+ timeout: "timeout";
2079
+ cf_error: "cf_error";
2080
+ invalid_output: "invalid_output";
2081
+ output_too_large: "output_too_large";
2082
+ possibly_truncated: "possibly_truncated";
2083
+ page_limit: "page_limit";
2084
+ command_unavailable: "command_unavailable";
2085
+ }>;
2086
+ }, z.core.$strict>]>;
2087
+ }, z.core.$strict>, z.ZodObject<{
2088
+ kind: z.ZodLiteral<"zone_total_tls">;
2089
+ zoneId: z.ZodString;
2090
+ result: z.ZodUnion<readonly [z.ZodObject<{
2091
+ ok: z.ZodLiteral<true>;
2092
+ data: z.ZodObject<{
2093
+ enabled: z.ZodOptional<z.ZodBoolean>;
2094
+ }, z.core.$strict>;
2095
+ }, z.core.$strict>, z.ZodObject<{
2096
+ ok: z.ZodLiteral<false>;
2097
+ reason: z.ZodLiteral<"http_error">;
2098
+ status: z.ZodNumber;
2099
+ }, z.core.$strict>, z.ZodObject<{
2100
+ ok: z.ZodLiteral<false>;
2101
+ reason: z.ZodLiteral<"collection_failed">;
2102
+ detail: z.ZodEnum<{
2103
+ timeout: "timeout";
2104
+ cf_error: "cf_error";
2105
+ invalid_output: "invalid_output";
2106
+ output_too_large: "output_too_large";
2107
+ possibly_truncated: "possibly_truncated";
2108
+ page_limit: "page_limit";
2109
+ command_unavailable: "command_unavailable";
2110
+ }>;
2111
+ }, z.core.$strict>]>;
2112
+ }, z.core.$strict>, z.ZodObject<{
2113
+ kind: z.ZodLiteral<"zone_rulesets">;
2114
+ zoneId: z.ZodString;
2115
+ result: z.ZodUnion<readonly [z.ZodObject<{
2116
+ ok: z.ZodLiteral<true>;
2117
+ data: z.ZodArray<z.ZodObject<{
2118
+ id: z.ZodString;
2119
+ phase: z.ZodOptional<z.ZodString>;
2120
+ name: z.ZodOptional<z.ZodLiteral<"ddos">>;
2121
+ }, z.core.$strict>>;
2122
+ }, z.core.$strict>, z.ZodObject<{
2123
+ ok: z.ZodLiteral<false>;
2124
+ reason: z.ZodLiteral<"http_error">;
2125
+ status: z.ZodNumber;
2126
+ }, z.core.$strict>, z.ZodObject<{
2127
+ ok: z.ZodLiteral<false>;
2128
+ reason: z.ZodLiteral<"collection_failed">;
2129
+ detail: z.ZodEnum<{
2130
+ timeout: "timeout";
2131
+ cf_error: "cf_error";
2132
+ invalid_output: "invalid_output";
2133
+ output_too_large: "output_too_large";
2134
+ possibly_truncated: "possibly_truncated";
2135
+ page_limit: "page_limit";
2136
+ command_unavailable: "command_unavailable";
2137
+ }>;
2138
+ }, z.core.$strict>]>;
2139
+ }, z.core.$strict>, z.ZodObject<{
2140
+ kind: z.ZodLiteral<"zone_ruleset">;
2141
+ zoneId: z.ZodString;
2142
+ rulesetId: z.ZodString;
2143
+ result: z.ZodUnion<readonly [z.ZodObject<{
2144
+ ok: z.ZodLiteral<true>;
2145
+ data: z.ZodObject<{
2146
+ id: z.ZodString;
2147
+ phase: z.ZodOptional<z.ZodString>;
2148
+ name: z.ZodOptional<z.ZodLiteral<"ddos">>;
2149
+ rulesBody: z.ZodOptional<z.ZodString>;
2150
+ }, z.core.$strict>;
2151
+ }, z.core.$strict>, z.ZodObject<{
2152
+ ok: z.ZodLiteral<false>;
2153
+ reason: z.ZodLiteral<"http_error">;
2154
+ status: z.ZodNumber;
2155
+ }, z.core.$strict>]>;
2156
+ }, z.core.$strict>, z.ZodObject<{
2157
+ kind: z.ZodLiteral<"zone_access_rules">;
2158
+ zoneId: z.ZodString;
2159
+ result: z.ZodUnion<readonly [z.ZodObject<{
2160
+ ok: z.ZodLiteral<true>;
2161
+ data: z.ZodArray<z.ZodObject<{
2162
+ mode: z.ZodOptional<z.ZodString>;
2163
+ configuration: z.ZodOptional<z.ZodObject<{
2164
+ target: z.ZodOptional<z.ZodString>;
2165
+ value: z.ZodOptional<z.ZodString>;
2166
+ }, z.core.$strict>>;
2167
+ }, z.core.$strict>>;
2168
+ }, z.core.$strict>, z.ZodObject<{
2169
+ ok: z.ZodLiteral<false>;
2170
+ reason: z.ZodLiteral<"http_error">;
2171
+ status: z.ZodNumber;
2172
+ }, z.core.$strict>, z.ZodObject<{
2173
+ ok: z.ZodLiteral<false>;
2174
+ reason: z.ZodLiteral<"collection_failed">;
2175
+ detail: z.ZodEnum<{
2176
+ timeout: "timeout";
2177
+ cf_error: "cf_error";
2178
+ invalid_output: "invalid_output";
2179
+ output_too_large: "output_too_large";
2180
+ possibly_truncated: "possibly_truncated";
2181
+ page_limit: "page_limit";
2182
+ command_unavailable: "command_unavailable";
2183
+ }>;
2184
+ }, z.core.$strict>]>;
2185
+ }, z.core.$strict>, z.ZodObject<{
2186
+ kind: z.ZodLiteral<"zone_page_rules">;
2187
+ zoneId: z.ZodString;
2188
+ result: z.ZodUnion<readonly [z.ZodObject<{
2189
+ ok: z.ZodLiteral<true>;
2190
+ data: z.ZodArray<z.ZodObject<{
2191
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2192
+ id: z.ZodEnum<{
2193
+ waf: "waf";
2194
+ security_level: "security_level";
2195
+ browser_check: "browser_check";
2196
+ disable_security: "disable_security";
2197
+ disable_performance: "disable_performance";
2198
+ }>;
2199
+ }, z.core.$strict>>>;
2200
+ }, z.core.$strict>>;
2201
+ }, z.core.$strict>, z.ZodObject<{
2202
+ ok: z.ZodLiteral<false>;
2203
+ reason: z.ZodLiteral<"http_error">;
2204
+ status: z.ZodNumber;
2205
+ }, z.core.$strict>, z.ZodObject<{
2206
+ ok: z.ZodLiteral<false>;
2207
+ reason: z.ZodLiteral<"collection_failed">;
2208
+ detail: z.ZodEnum<{
2209
+ timeout: "timeout";
2210
+ cf_error: "cf_error";
2211
+ invalid_output: "invalid_output";
2212
+ output_too_large: "output_too_large";
2213
+ possibly_truncated: "possibly_truncated";
2214
+ page_limit: "page_limit";
2215
+ command_unavailable: "command_unavailable";
2216
+ }>;
2217
+ }, z.core.$strict>]>;
2218
+ }, z.core.$strict>, z.ZodObject<{
2219
+ kind: z.ZodLiteral<"zone_bot_management">;
2220
+ zoneId: z.ZodString;
2221
+ result: z.ZodUnion<readonly [z.ZodObject<{
2222
+ ok: z.ZodLiteral<true>;
2223
+ data: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodString>]>>;
2224
+ }, z.core.$strict>, z.ZodObject<{
2225
+ ok: z.ZodLiteral<false>;
2226
+ reason: z.ZodLiteral<"http_error">;
2227
+ status: z.ZodNumber;
2228
+ }, z.core.$strict>, z.ZodObject<{
2229
+ ok: z.ZodLiteral<false>;
2230
+ reason: z.ZodLiteral<"collection_failed">;
2231
+ detail: z.ZodEnum<{
2232
+ timeout: "timeout";
2233
+ cf_error: "cf_error";
2234
+ invalid_output: "invalid_output";
2235
+ output_too_large: "output_too_large";
2236
+ possibly_truncated: "possibly_truncated";
2237
+ page_limit: "page_limit";
2238
+ command_unavailable: "command_unavailable";
2239
+ }>;
2240
+ }, z.core.$strict>]>;
2241
+ }, z.core.$strict>, z.ZodObject<{
2242
+ kind: z.ZodLiteral<"zone_page_shield">;
2243
+ zoneId: z.ZodString;
2244
+ result: z.ZodUnion<readonly [z.ZodObject<{
2245
+ ok: z.ZodLiteral<true>;
2246
+ data: z.ZodObject<{
2247
+ enabled: z.ZodOptional<z.ZodBoolean>;
2248
+ }, z.core.$strict>;
2249
+ }, z.core.$strict>, z.ZodObject<{
2250
+ ok: z.ZodLiteral<false>;
2251
+ reason: z.ZodLiteral<"http_error">;
2252
+ status: z.ZodNumber;
2253
+ }, z.core.$strict>, z.ZodObject<{
2254
+ ok: z.ZodLiteral<false>;
2255
+ reason: z.ZodLiteral<"collection_failed">;
2256
+ detail: z.ZodEnum<{
2257
+ timeout: "timeout";
2258
+ cf_error: "cf_error";
2259
+ invalid_output: "invalid_output";
2260
+ output_too_large: "output_too_large";
2261
+ possibly_truncated: "possibly_truncated";
2262
+ page_limit: "page_limit";
2263
+ command_unavailable: "command_unavailable";
2264
+ }>;
2265
+ }, z.core.$strict>]>;
2266
+ }, z.core.$strict>, z.ZodObject<{
2267
+ kind: z.ZodLiteral<"zone_schema_validation_settings">;
2268
+ zoneId: z.ZodString;
2269
+ result: z.ZodUnion<readonly [z.ZodObject<{
2270
+ ok: z.ZodLiteral<true>;
2271
+ data: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
2272
+ }, z.core.$strict>, z.ZodObject<{
2273
+ ok: z.ZodLiteral<false>;
2274
+ reason: z.ZodLiteral<"http_error">;
2275
+ status: z.ZodNumber;
2276
+ }, z.core.$strict>, z.ZodObject<{
2277
+ ok: z.ZodLiteral<false>;
2278
+ reason: z.ZodLiteral<"collection_failed">;
2279
+ detail: z.ZodEnum<{
2280
+ timeout: "timeout";
2281
+ cf_error: "cf_error";
2282
+ invalid_output: "invalid_output";
2283
+ output_too_large: "output_too_large";
2284
+ possibly_truncated: "possibly_truncated";
2285
+ page_limit: "page_limit";
2286
+ command_unavailable: "command_unavailable";
2287
+ }>;
2288
+ }, z.core.$strict>]>;
2289
+ }, z.core.$strict>, z.ZodObject<{
2290
+ kind: z.ZodLiteral<"zone_schema_validation_schemas">;
2291
+ zoneId: z.ZodString;
2292
+ result: z.ZodUnion<readonly [z.ZodObject<{
2293
+ ok: z.ZodLiteral<true>;
2294
+ data: z.ZodObject<{
2295
+ count: z.ZodNumber;
2296
+ }, z.core.$strict>;
2297
+ }, z.core.$strict>, z.ZodObject<{
2298
+ ok: z.ZodLiteral<false>;
2299
+ reason: z.ZodLiteral<"http_error">;
2300
+ status: z.ZodNumber;
2301
+ }, z.core.$strict>, z.ZodObject<{
2302
+ ok: z.ZodLiteral<false>;
2303
+ reason: z.ZodLiteral<"collection_failed">;
2304
+ detail: z.ZodEnum<{
2305
+ timeout: "timeout";
2306
+ cf_error: "cf_error";
2307
+ invalid_output: "invalid_output";
2308
+ output_too_large: "output_too_large";
2309
+ possibly_truncated: "possibly_truncated";
2310
+ page_limit: "page_limit";
2311
+ command_unavailable: "command_unavailable";
2312
+ }>;
2313
+ }, z.core.$strict>]>;
2314
+ }, z.core.$strict>, z.ZodObject<{
2315
+ kind: z.ZodLiteral<"zone_legacy_firewall_rules">;
2316
+ zoneId: z.ZodString;
2317
+ result: z.ZodObject<{
2318
+ ok: z.ZodLiteral<false>;
2319
+ reason: z.ZodLiteral<"not_collected">;
2320
+ }, z.core.$strict>;
2321
+ }, z.core.$strict>, z.ZodObject<{
2322
+ kind: z.ZodLiteral<"zone_legacy_filters">;
2323
+ zoneId: z.ZodString;
2324
+ result: z.ZodObject<{
2325
+ ok: z.ZodLiteral<false>;
2326
+ reason: z.ZodLiteral<"not_collected">;
2327
+ }, z.core.$strict>;
2328
+ }, z.core.$strict>, z.ZodObject<{
2329
+ kind: z.ZodLiteral<"zone_legacy_waf_packages">;
2330
+ zoneId: z.ZodString;
2331
+ result: z.ZodObject<{
2332
+ ok: z.ZodLiteral<false>;
2333
+ reason: z.ZodLiteral<"not_collected">;
2334
+ }, z.core.$strict>;
2335
+ }, z.core.$strict>, z.ZodObject<{
2336
+ kind: z.ZodLiteral<"zone_legacy_rate_limits">;
2337
+ zoneId: z.ZodString;
2338
+ result: z.ZodObject<{
2339
+ ok: z.ZodLiteral<false>;
2340
+ reason: z.ZodLiteral<"not_collected">;
2341
+ }, z.core.$strict>;
2342
+ }, z.core.$strict>, z.ZodObject<{
2343
+ kind: z.ZodLiteral<"zone_waf_analytics">;
2344
+ zoneId: z.ZodString;
2345
+ result: z.ZodObject<{
2346
+ ok: z.ZodLiteral<false>;
2347
+ reason: z.ZodLiteral<"not_collected">;
2348
+ }, z.core.$strict>;
2349
+ }, z.core.$strict>], "kind">>;
2350
+ ruleBodies: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
2351
+ action: z.ZodOptional<z.ZodString>;
2352
+ enabled: z.ZodOptional<z.ZodLiteral<false>>;
2353
+ expression: z.ZodOptional<z.ZodEnum<{
2354
+ true: "true";
2355
+ "ip.geoip.country in": "ip.geoip.country in";
2356
+ }>>;
2357
+ action_parameters: z.ZodOptional<z.ZodObject<{
2358
+ id: z.ZodOptional<z.ZodString>;
2359
+ name: z.ZodOptional<z.ZodString>;
2360
+ }, z.core.$strict>>;
2361
+ id: z.ZodOptional<z.ZodString>;
2362
+ ref: z.ZodOptional<z.ZodString>;
2363
+ description: z.ZodOptional<z.ZodString>;
2364
+ n: z.ZodOptional<z.ZodNumber>;
2365
+ }, z.core.$strict>>>;
2366
+ }, z.core.$strict>;
2367
+ export type CloudflareCheckupSnapshotV1 = z.infer<typeof CloudflareCheckupSnapshotV1Schema>;
2368
+ /** The `reason` a rejected snapshot maps to (§C4). */
2369
+ export type SnapshotRejectReason = 'snapshot_invalid' | 'snapshot_incomplete' | 'secret_like_value';
2370
+ export type SnapshotSemanticIssue = {
2371
+ code: 'custom';
2372
+ /** A stable issue code such as `missing_entry`; never a value from the snapshot. */
2373
+ message: string;
2374
+ path: PropertyKey[];
2375
+ params: {
2376
+ reason: SnapshotRejectReason;
2377
+ };
2378
+ };
2379
+ export interface SnapshotIssueSink {
2380
+ addIssue(issue: SnapshotSemanticIssue): void;
2381
+ }
2382
+ /**
2383
+ * Cross-entry rules the per-entry schema cannot express. Runs as the
2384
+ * snapshot schema's `superRefine`; every issue carries `params.reason`, which
2385
+ * `snapshotRejectReason` maps to the HTTP reason. The time window relative to
2386
+ * the server clock is checked in com, not here.
2387
+ */
2388
+ export declare function validateSnapshotSemantics(snapshot: SnapshotShape, ctx: SnapshotIssueSink): void;
2389
+ /**
2390
+ * Credential tripwire (§D1.6): a Vigilbase session code or verification token, a 40-character
2391
+ * `[A-Za-z0-9_-]` window with upper case, lower case and a digit (the
2392
+ * Cloudflare API token shape), a JWT, a PEM header or a bearer header.
2393
+ */
2394
+ export declare function containsSecretLikeValue(value: string): boolean;
2395
+ /**
2396
+ * Map the issues of a failed `CloudflareCheckupSnapshotV1Schema.safeParse` to
2397
+ * the HTTP reason: the tripwire wins, then key-set errors, then everything else.
2398
+ */
2399
+ export declare function snapshotRejectReason(issues: ReadonlyArray<{
2400
+ code?: unknown;
2401
+ params?: unknown;
2402
+ }>): SnapshotRejectReason;
2403
+ /**
2404
+ * The `issues` array of a local-session error response: at most 20
2405
+ * `{path, code}` pairs and never a value from the snapshot.
2406
+ */
2407
+ export declare function snapshotIssueList(issues: ReadonlyArray<{
2408
+ code?: string;
2409
+ message?: string;
2410
+ path?: ReadonlyArray<PropertyKey>;
2411
+ }>): {
2412
+ path: string;
2413
+ code: string;
2414
+ }[];
2415
+ export interface SnapshotKeyIds {
2416
+ accountId: string;
2417
+ zoneId?: string;
2418
+ settingId?: string;
2419
+ rulesetId?: string;
2420
+ }
2421
+ /** The scanner REST call a snapshot entry answers. The replay client derives the same key per call. */
2422
+ export declare function snapshotRequestKey(kind: SnapshotKind, ids: SnapshotKeyIds): string;
2423
+ type KeyedEntry = {
2424
+ kind: SnapshotKind;
2425
+ zoneId?: string;
2426
+ settingId?: string;
2427
+ rulesetId?: string;
2428
+ };
2429
+ export declare function snapshotEntryKey(entry: KeyedEntry, accountId: string): string;
2430
+ /**
2431
+ * Every key a complete snapshot holds, in canonical entry order: account kinds,
2432
+ * then per zone (in list order) the 19 settings, the single kinds with each
2433
+ * listed ruleset detail right after `zone_rulesets`, then the not-collectable
2434
+ * kinds. `rulesetIdsByZone` holds only zones whose `zone_rulesets` is ok.
2435
+ */
2436
+ export declare function expectedEntryKeys(accountId: string, zones: ReadonlyArray<string | {
2437
+ id: string;
2438
+ }>, rulesetIdsByZone: Readonly<Record<string, readonly string[]>>): string[];
2439
+ /** A projector's outcome: the snapshot data, or the `collection_failed` detail. */
2440
+ export type ProjectionResult<T> = {
2441
+ ok: true;
2442
+ data: T;
2443
+ } | {
2444
+ ok: false;
2445
+ detail: CollectionFailureDetail;
2446
+ };
2447
+ /**
2448
+ * `account`: `id, name, type, settings.enforce_twofactor`. createAccountMfaCheck
2449
+ * (1110) compares `enforce_twofactor === true`; runInitPhase (4369-4381) and
2450
+ * assembleCheckupResult (5127-5136) print `name`, `type` and `enforce_twofactor`.
2451
+ */
2452
+ export declare function projectAccount(raw: unknown): ProjectionResult<AccountData>;
2453
+ /**
2454
+ * `zones` (all pages merged, API order): `id, name, status, paused, type,
2455
+ * development_mode, plan.name, account.{id,name}`. zoneCtxFor (4338) prints the
2456
+ * account; createZoneStatusCheck (1960-1990), createDevModeCheck (2165-2197),
2457
+ * createDNSModeCheck (3218-3234) and assembleCheckupResult (5099-5102) read the rest.
2458
+ * `paused` is only tested for truthiness.
2459
+ */
2460
+ export declare function projectZones(raw: unknown): ProjectionResult<ZoneData[]>;
2461
+ /**
2462
+ * `account_members`: one item per member, in order. createMemberMfaCheck and
2463
+ * createPendingMembersCheck (1162-1198, 1224-1252) read only `status ===
2464
+ * 'pending'`, `two_factor_authentication_enabled === false`, `.length`, and the
2465
+ * first 8 truthy `m.email || m.user.email` of each selection.
2466
+ */
2467
+ export declare function projectAccountMembers(raw: unknown): ProjectionResult<MemberData[]>;
2468
+ /**
2469
+ * `account_rulesets`, `access_apps`, `gateway_locations`,
2470
+ * `zone_schema_validation_schemas`: only `.length` is read (1259-1297, 1421,
2471
+ * 1744, 3872), so only the count leaves the machine.
2472
+ */
2473
+ export declare function projectCounted(raw: unknown): ProjectionResult<CountedData>;
2474
+ /**
2475
+ * `account_access_rules`. createAccountAccessRulesCheck (1318-1354): broad =
2476
+ * `mode === 'whitelist' || target === 'country' || target === 'asn'`; prints
2477
+ * `broad.length`, `accessRules.length` and the first 5 broad rules. Later broad
2478
+ * rules keep only the fields that make them broad; other rules are `{}`.
2479
+ */
2480
+ export declare function projectAccountAccessRules(raw: unknown): ProjectionResult<AccessRuleData[]>;
2481
+ /**
2482
+ * `zone_access_rules`. createZoneIpAccessRulesCheck (2613-2673): broad =
2483
+ * `target.toLowerCase() ∈ {ip, ip_range, country, asn} || value ∈ {0.0.0.0/0, ::/0}`.
2484
+ * Same first-5 rule as the account list.
2485
+ */
2486
+ export declare function projectZoneAccessRules(raw: unknown): ProjectionResult<AccessRuleData[]>;
2487
+ /**
2488
+ * `access_identity_providers`: `{type}`. createAccessIdentityProvidersCheck
2489
+ * (1515-1540) reads `.length` and compares `type.toLowerCase()` with fixed
2490
+ * literals; `type` is never printed, so non-token types become `'other'`.
2491
+ */
2492
+ export declare function projectIdentityProviders(raw: unknown): ProjectionResult<IdentityProviderData[]>;
2493
+ /**
2494
+ * `access_service_tokens`: `expires_at`. createAccessServiceTokensCheck
2495
+ * (1587-1593) only evaluates `Date.parse(expires_at || expiresAt) < now` for
2496
+ * string values, so a parseable value is normalised to ISO (extended years are
2497
+ * clamped to the 4-digit range, which keeps the comparison) and anything else
2498
+ * is dropped (both give "not expired").
2499
+ */
2500
+ export declare function projectServiceTokens(raw: unknown): ProjectionResult<ServiceTokenData[]>;
2501
+ /**
2502
+ * `gateway_rules`: `enabled:false` iff `=== false`, `filters` verbatim.
2503
+ * createGatewayRulesCheck (1655-1680) counts `enabled !== false` and prints
2504
+ * each filter with its count.
2505
+ */
2506
+ export declare function projectGatewayRules(raw: unknown): ProjectionResult<GatewayRuleData[]>;
2507
+ /**
2508
+ * `cfd_tunnels`: `status` and `is_deleted:true` iff `deleted_at || is_deleted
2509
+ * === true`. createCloudflareTunnelsCheck (1801-1814) only compares
2510
+ * `status.toLowerCase()` with fixed literals, so non-token statuses become `'other'`.
2511
+ */
2512
+ export declare function projectTunnels(raw: unknown): ProjectionResult<TunnelData[]>;
2513
+ /**
2514
+ * `zone_setting`: `value` only, verbatim. Every setting check reads
2515
+ * `statusValue(read)` (= `.value`, 1053-1056) or `wafSetting.data.value`
2516
+ * (2324, 3535); minify (2905-2953) and HSTS (3695-3727) print sub-keys at
2517
+ * depth ≤ 2. Values are printed, so a non-token string, an array or a deeper
2518
+ * object fails the entry rather than being altered.
2519
+ */
2520
+ export declare function projectZoneSetting(raw: unknown): ProjectionResult<SettingData>;
2521
+ /**
2522
+ * `zone_dnssec`: `status, algorithm`. createDNSSECCheck (2114-2160) compares
2523
+ * and prints `status.toLowerCase()` and prints a truthy `algorithm`.
2524
+ */
2525
+ export declare function projectDnssec(raw: unknown): ProjectionResult<DnssecData>;
2526
+ /**
2527
+ * `zone_dns_records` (all pages, API order): only `(A|AAAA) && content` records.
2528
+ * findOriginExposure and detectOriginIpReuseAcrossZones (3307-3373) read
2529
+ * `type`, `content` (as a Map key and through `maskIp`), `proxied` (truthiness)
2530
+ * and `name`, which is printed only for non-proxied records (3292-3297); proxied
2531
+ * names are only counted. `content` stays raw here and is pseudonymised by
2532
+ * `createIpPseudonymizer` (via `assembleSnapshot`) once every zone is collected.
2533
+ */
2534
+ export declare function projectDnsRecords(raw: unknown): ProjectionResult<DnsRecordData[]>;
2535
+ /**
2536
+ * `zone_universal_ssl`, `zone_total_tls`, `zone_page_shield`: `enabled`.
2537
+ * The checks read `enabled !== false` (3797) and `enabled === true` (2697,
2538
+ * 3832); a non-boolean `enabled` gives the same outcome as an absent one.
2539
+ */
2540
+ export declare function projectEnabledOnly(raw: unknown): ProjectionResult<EnabledOnlyData>;
2541
+ /**
2542
+ * `zone_rulesets` heads: `id, phase`, `name:'ddos'` iff the name contains
2543
+ * "ddos"; `kind` and `version` are dropped. `name` is read only by
2544
+ * createDDoSCheck (2511); `phase` at 2326, 2511, 2559-2564, 3446 and 4019.
2545
+ */
2546
+ export declare function projectRulesetHeads(raw: unknown): ProjectionResult<RulesetHeadData[]>;
2547
+ /**
2548
+ * `zone_ruleset` detail: the head fields plus projected rules (not yet
2549
+ * encoded). Rules feed analyzeRulesets (3425-3460), createWAFAnalysisFromRulesets
2550
+ * (3979-4047), hasExecutedRuleset (2412-2429) and the rate-limiting count (2559-2564):
2551
+ * - `action` raw if `^[A-Za-z_]{1,32}$`, else `'other'` (never equal to a compared action);
2552
+ * - `enabled:false` iff `=== false`;
2553
+ * - `expression` only on block rules: `'true'` or the geoip sentinel, else omitted;
2554
+ * - `action_parameters` only on `execute`: a managed `id` and the matched name needles;
2555
+ * - `id`, `description` (or `ref` when `description` is empty) only on issue rules.
2556
+ * More than `maxRulesPerBody` rules, or more than `maxRunsPerBody` runs, fails
2557
+ * with `output_too_large`.
2558
+ */
2559
+ export declare function projectRulesetDetail(raw: unknown): ProjectionResult<ProjectedRulesetDetail>;
2560
+ /**
2561
+ * `zone_page_rules`: one item per rule; `actions[].id` filtered to the five
2562
+ * legacy IDs (first occurrence order). createPageRulesCheck (3601-3650) reads
2563
+ * `.length` and detectDeprecatedPageRuleActions.
2564
+ */
2565
+ export declare function projectPageRules(raw: unknown): ProjectionResult<PageRuleData[]>;
2566
+ /**
2567
+ * `zone_bot_management`. createBotManagementCheck (2815-2850) prints
2568
+ * `Boolean(fight_mode)` and `Boolean(enable_js)` (kept as `!!value`), tests
2569
+ * `Object.values(...).some(v === 'block' || v === 'enabled')` (other strings
2570
+ * become `''` or `'other'`, preserving truthiness) and prints
2571
+ * `Object.keys(stale_zone_configuration).join(', ')`. That key list is kept as
2572
+ * an array in exactly the `Object.keys` order the live scanner sees (integer-like
2573
+ * keys first, then insertion order); the replay client turns it back into
2574
+ * `{key: true}`. An object would lose the order, because the serialiser sorts
2575
+ * object keys.
2576
+ */
2577
+ export declare function projectBotManagement(raw: unknown): ProjectionResult<BotManagementData>;
2578
+ /**
2579
+ * `zone_schema_validation_settings`: top-level primitives (same string rule as
2580
+ * bot management). createApiShieldCheck (3858-3883) compares values with
2581
+ * `'block'`, `'log'` and `true`.
2582
+ */
2583
+ export declare function projectSchemaValidationSettings(raw: unknown): ProjectionResult<SchemaValidationSettingsData>;
2584
+ /**
2585
+ * One projector per collectable kind. Each takes the raw `cf` JSON exactly as
2586
+ * printed (the bare result object, or for lists the bare arrays of every page
2587
+ * concatenated in API order) and returns the snapshot data or a
2588
+ * `collection_failed` detail.
2589
+ */
2590
+ export declare const PROJECTORS: {
2591
+ readonly account: typeof projectAccount;
2592
+ readonly zones: typeof projectZones;
2593
+ readonly account_members: typeof projectAccountMembers;
2594
+ readonly account_rulesets: typeof projectCounted;
2595
+ readonly account_access_rules: typeof projectAccountAccessRules;
2596
+ readonly access_apps: typeof projectCounted;
2597
+ readonly access_identity_providers: typeof projectIdentityProviders;
2598
+ readonly access_service_tokens: typeof projectServiceTokens;
2599
+ readonly gateway_rules: typeof projectGatewayRules;
2600
+ readonly gateway_locations: typeof projectCounted;
2601
+ readonly cfd_tunnels: typeof projectTunnels;
2602
+ readonly zone_setting: typeof projectZoneSetting;
2603
+ readonly zone_dnssec: typeof projectDnssec;
2604
+ readonly zone_dns_records: typeof projectDnsRecords;
2605
+ readonly zone_universal_ssl: typeof projectEnabledOnly;
2606
+ readonly zone_total_tls: typeof projectEnabledOnly;
2607
+ readonly zone_rulesets: typeof projectRulesetHeads;
2608
+ readonly zone_ruleset: typeof projectRulesetDetail;
2609
+ readonly zone_access_rules: typeof projectZoneAccessRules;
2610
+ readonly zone_page_rules: typeof projectPageRules;
2611
+ readonly zone_bot_management: typeof projectBotManagement;
2612
+ readonly zone_page_shield: typeof projectEnabledOnly;
2613
+ readonly zone_schema_validation_settings: typeof projectSchemaValidationSettings;
2614
+ readonly zone_schema_validation_schemas: typeof projectCounted;
2615
+ };
2616
+ export declare const NOT_COLLECTED_RESULT: NotCollectedResult;
2617
+ export declare function httpErrorResult(status: number): HttpErrorResult;
2618
+ export declare function collectionFailedResult(detail: CollectionFailureDetail): CollectionFailedResult;
2619
+ /** Turn a projector outcome into an entry `result`. */
2620
+ export declare function projectionToResult<T>(projection: ProjectionResult<T>): {
2621
+ ok: true;
2622
+ data: T;
2623
+ } | CollectionFailedResult;
2624
+ /** Run-length encode consecutive identical projected rules into `{...rule, n}`. */
2625
+ export declare function encodeRuleRuns(rules: readonly ProjectedRule[]): RuleRun[];
2626
+ /** Restore the exact rule order and count of a body; every rule is a fresh object. */
2627
+ export declare function expandRuleRuns(runs: readonly RuleRun[]): ProjectedRule[];
2628
+ export interface RuleBodyEncoder {
2629
+ /** Encode a ruleset's rules; returns its body ref, or `undefined` when it has no rules. */
2630
+ add(rules: readonly ProjectedRule[]): string | undefined;
2631
+ /** Bodies named `r0`, `r1`, … in first-occurrence order; identical content shares a body. */
2632
+ bodies(): Record<string, RuleRun[]>;
2633
+ }
2634
+ export declare function createRuleBodyEncoder(): RuleBodyEncoder;
2635
+ export interface IpPseudonymizer {
2636
+ /** Pseudonymise one A/AAAA content string; memoised by the exact string. */
2637
+ pseudonymize(content: string): ProjectionResult<string>;
2638
+ }
2639
+ /**
2640
+ * Per-prefix sequential pseudonyms, applied in zone list order and record API
2641
+ * order. IPv6 (any `:`) keeps its first three `:`-groups and becomes
2642
+ * `${prefix}:ffff:${n.toString(16)}`; IPv4 (4 dot parts) keeps `a.b` and
2643
+ * becomes `a.b.${n >> 8}.${n & 255}`; `n` counts from 1 per prefix. The mapping
2644
+ * is a bijection on the snapshot, keeps Map insertion order, distinct prefixes
2645
+ * never collide, and scanner `maskIp` (4234-4240) output is byte-identical.
2646
+ */
2647
+ export declare function createIpPseudonymizer(): IpPseudonymizer;
2648
+ export type CollectedRulesetEntry = {
2649
+ kind: 'zone_ruleset';
2650
+ zoneId: string;
2651
+ rulesetId: string;
2652
+ result: {
2653
+ ok: true;
2654
+ data: ProjectedRulesetDetail;
2655
+ } | HttpErrorResult | CollectionFailedResult;
2656
+ };
2657
+ /** An entry as the collector holds it: final, except ruleset details keep their projected rules. */
2658
+ export type CollectedEntry = Exclude<SnapshotEntry, {
2659
+ kind: 'zone_ruleset';
2660
+ }> | CollectedRulesetEntry;
2661
+ export interface AssembleSnapshotInput {
2662
+ accountId: string;
2663
+ collector: SnapshotCollector;
2664
+ entries: readonly CollectedEntry[];
2665
+ }
2666
+ /**
2667
+ * Build the snapshot from collected entries. In order:
2668
+ * 1. Collector rule: a zone with any `collection_failed` ruleset detail gets its
2669
+ * `zone_rulesets` rewritten to `collection_failed` with that detail (first
2670
+ * failure in list order) and keeps no `zone_ruleset` entries, so the scanner
2671
+ * never falls back to rule-less heads (874-891).
2672
+ * 2. IP pseudonymisation over `zone_dns_records` in zone list order and record
2673
+ * order; a list with unrepresentable content becomes `collection_failed`.
2674
+ * 3. Canonical entry order (`expectedEntryKeys`); unexpected entries go last.
2675
+ * 4. Rule bodies encoded and deduplicated in that order.
2676
+ * The result is not validated: parse it with `CloudflareCheckupSnapshotV1Schema`.
2677
+ */
2678
+ export declare function assembleSnapshot(input: AssembleSnapshotInput): CloudflareCheckupSnapshotV1;
2679
+ /**
2680
+ * Stable snapshot formatting (§F7): top-level keys in a fixed order, one
2681
+ * compact entry and one compact rule body per line, trailing newline. Entry
2682
+ * keys keep a fixed order and data keys are sorted, so the output depends only
2683
+ * on content (`serializeSnapshot(parse(text)) === text`). The output is the
2684
+ * exact byte sequence the CLI writes, hashes and uploads.
2685
+ */
2686
+ export declare function serializeSnapshot(snapshot: CloudflareCheckupSnapshotV1): string;
2687
+ export declare const LOCAL_ERROR_REASONS: readonly ["session_invalid", "session_expired", "session_used", "session_busy", "session_not_ready", "run_closed", "browser_origin", "malformed_json", "digest_mismatch", "unsupported_media_type", "length_required", "snapshot_too_large", "snapshot_invalid", "snapshot_incomplete", "account_mismatch", "snapshot_stale", "collector_unsupported", "secret_like_value", "evaluation_failed", "rate_limited", "local_mode_disabled", "storage_unavailable", "request_invalid", "email_invalid", "code_invalid", "verification_invalid", "verification_expired"];
2688
+ export type LocalErrorReason = (typeof LOCAL_ERROR_REASONS)[number];
2689
+ export declare const LOCAL_SESSION_STATES: readonly ["awaiting_upload", "processing", "completed"];
2690
+ export type LocalSessionState = (typeof LOCAL_SESSION_STATES)[number];
2691
+ export declare const LocalSessionResponseSchema: z.ZodObject<{
2692
+ success: z.ZodLiteral<true>;
2693
+ session: z.ZodObject<{
2694
+ accountId: z.ZodNullable<z.ZodString>;
2695
+ requester: z.ZodString;
2696
+ expiresAt: z.ZodISODateTime;
2697
+ state: z.ZodEnum<{
2698
+ completed: "completed";
2699
+ awaiting_upload: "awaiting_upload";
2700
+ processing: "processing";
2701
+ }>;
2702
+ accepts: z.ZodObject<{
2703
+ schemaVersions: z.ZodArray<z.ZodString>;
2704
+ maxBytes: z.ZodNumber;
2705
+ maxZones: z.ZodNumber;
2706
+ }, z.core.$strip>;
2707
+ minCliVersion: z.ZodString;
2708
+ }, z.core.$strip>;
2709
+ }, z.core.$strip>;
2710
+ export declare const LocalSnapshotResponseSchema: z.ZodObject<{
2711
+ success: z.ZodLiteral<true>;
2712
+ replayed: z.ZodBoolean;
2713
+ snapshotSha256: z.ZodString;
2714
+ provenance: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2715
+ report: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2716
+ resultsUrl: z.ZodOptional<z.ZodURL>;
2717
+ }, z.core.$strip>;
2718
+ export declare const LocalRequestBodySchema: z.ZodObject<{
2719
+ email: z.ZodString;
2720
+ locale: z.ZodEnum<{
2721
+ en: "en";
2722
+ "pt-PT": "pt-PT";
2723
+ ar: "ar";
2724
+ }>;
2725
+ }, z.core.$strict>;
2726
+ export declare const LocalVerifyBodySchema: z.ZodObject<{
2727
+ verification: z.ZodString;
2728
+ code: z.ZodString;
2729
+ }, z.core.$strict>;
2730
+ export declare const LocalRequestResponseSchema: z.ZodObject<{
2731
+ success: z.ZodLiteral<true>;
2732
+ verification: z.ZodObject<{
2733
+ token: z.ZodString;
2734
+ requester: z.ZodString;
2735
+ expiresAt: z.ZodISODateTime;
2736
+ }, z.core.$strip>;
2737
+ }, z.core.$strip>;
2738
+ export declare const LocalVerifyResponseSchema: z.ZodObject<{
2739
+ success: z.ZodLiteral<true>;
2740
+ session: z.ZodObject<{
2741
+ code: z.ZodString;
2742
+ requester: z.ZodString;
2743
+ expiresAt: z.ZodISODateTime;
2744
+ }, z.core.$strip>;
2745
+ }, z.core.$strip>;
2746
+ export declare const LocalErrorResponseSchema: z.ZodObject<{
2747
+ success: z.ZodLiteral<false>;
2748
+ status: z.ZodNumber;
2749
+ code: z.ZodString;
2750
+ reason: z.ZodOptional<z.ZodEnum<{
2751
+ rate_limited: "rate_limited";
2752
+ snapshot_invalid: "snapshot_invalid";
2753
+ snapshot_incomplete: "snapshot_incomplete";
2754
+ secret_like_value: "secret_like_value";
2755
+ session_invalid: "session_invalid";
2756
+ session_expired: "session_expired";
2757
+ session_used: "session_used";
2758
+ session_busy: "session_busy";
2759
+ session_not_ready: "session_not_ready";
2760
+ run_closed: "run_closed";
2761
+ browser_origin: "browser_origin";
2762
+ malformed_json: "malformed_json";
2763
+ digest_mismatch: "digest_mismatch";
2764
+ unsupported_media_type: "unsupported_media_type";
2765
+ length_required: "length_required";
2766
+ snapshot_too_large: "snapshot_too_large";
2767
+ account_mismatch: "account_mismatch";
2768
+ snapshot_stale: "snapshot_stale";
2769
+ collector_unsupported: "collector_unsupported";
2770
+ evaluation_failed: "evaluation_failed";
2771
+ local_mode_disabled: "local_mode_disabled";
2772
+ storage_unavailable: "storage_unavailable";
2773
+ request_invalid: "request_invalid";
2774
+ email_invalid: "email_invalid";
2775
+ code_invalid: "code_invalid";
2776
+ verification_invalid: "verification_invalid";
2777
+ verification_expired: "verification_expired";
2778
+ }>>;
2779
+ retryAfterSec: z.ZodOptional<z.ZodNumber>;
2780
+ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{
2781
+ path: z.ZodString;
2782
+ code: z.ZodString;
2783
+ }, z.core.$strip>>>;
2784
+ }, z.core.$strip>;
2785
+ export type LocalSessionResponse = z.infer<typeof LocalSessionResponseSchema>;
2786
+ export type LocalSnapshotResponse = z.infer<typeof LocalSnapshotResponseSchema>;
2787
+ export type LocalErrorResponse = z.infer<typeof LocalErrorResponseSchema>;
2788
+ export type LocalRequestBody = z.infer<typeof LocalRequestBodySchema>;
2789
+ export type LocalVerifyBody = z.infer<typeof LocalVerifyBodySchema>;
2790
+ export type LocalRequestResponse = z.infer<typeof LocalRequestResponseSchema>;
2791
+ export type LocalVerifyResponse = z.infer<typeof LocalVerifyResponseSchema>;
2792
+ export {};
2793
+ //# sourceMappingURL=contract.d.ts.map