import { z } from "zod"; //#region src/lib/schema.d.ts /** * Zod schema for {@link import("./types.js").ComputeSettings}. * * - CU values must be one of: 0.25, 0.5, 1, 2, 4, 8 * - `suspendTimeout` can be: * - `false` (never suspend) * - duration string like "5m", "1h" (must be 60s-604800s when parsed) * - number in seconds (60-604800, or -1/0 for special values) * - `undefined` (use platform default) * * Cross-field invariants (min <= max) are enforced via `superRefine`. */ declare const computeSettingsSchema: z.ZodObject<{ autoscalingLimitMinCu: z.ZodOptional, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>>; autoscalingLimitMaxCu: z.ZodOptional, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>>; suspendTimeout: z.ZodOptional, z.ZodString, z.ZodNumber]>>; }, z.core.$strict>; /** Object form of a service toggle (`{ enabled?: boolean }`). */ declare const serviceToggleSchema: z.ZodObject<{ enabled: z.ZodOptional; }, z.core.$strict>; /** A service toggle as written in a policy: `boolean` or `{ enabled?: boolean }`. */ declare const serviceToggleInputSchema: z.ZodUnion; }, z.core.$strict>]>; /** * Reusable Data API runtime settings (camelCase mirror of the Neon API `DataAPISettings`). * `strictObject` so a typo / snake_case key fails loudly instead of being silently dropped. */ declare const dataApiSettingsSchema: z.ZodObject<{ dbAggregatesEnabled: z.ZodOptional; dbAnonRole: z.ZodOptional; dbExtraSearchPath: z.ZodOptional; dbMaxRows: z.ZodOptional; dbSchemas: z.ZodOptional>; jwtRoleClaimKey: z.ZodOptional; jwtCacheMaxLifetime: z.ZodOptional; openapiMode: z.ZodOptional, z.ZodLiteral<"disabled">]>>; serverCorsAllowedOrigins: z.ZodOptional; serverTimingEnabled: z.ZodOptional; }, z.core.$strict>; /** * Object form of the `dataApi` toggle. A single `strictObject` plus a `superRefine` (rather * than a discriminated union) so the `"neon"` default works without the discriminator being * present, and so the "external-only field with authProvider neon" error points at the exact * offending key — mirroring the `?: never` type-level guard at runtime. */ declare const dataApiConfigSchema: z.ZodObject<{ enabled: z.ZodOptional; authProvider: z.ZodOptional, z.ZodLiteral<"external">]>>; jwksUrl: z.ZodOptional; providerName: z.ZodOptional; jwtAudience: z.ZodOptional; settings: z.ZodOptional; dbAnonRole: z.ZodOptional; dbExtraSearchPath: z.ZodOptional; dbMaxRows: z.ZodOptional; dbSchemas: z.ZodOptional>; jwtRoleClaimKey: z.ZodOptional; jwtCacheMaxLifetime: z.ZodOptional; openapiMode: z.ZodOptional, z.ZodLiteral<"disabled">]>>; serverCorsAllowedOrigins: z.ZodOptional; serverTimingEnabled: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>; /** A `dataApi` toggle as written in a policy: `boolean` or {@link dataApiConfigSchema}. */ declare const dataApiInputSchema: z.ZodUnion; authProvider: z.ZodOptional, z.ZodLiteral<"external">]>>; jwksUrl: z.ZodOptional; providerName: z.ZodOptional; jwtAudience: z.ZodOptional; settings: z.ZodOptional; dbAnonRole: z.ZodOptional; dbExtraSearchPath: z.ZodOptional; dbMaxRows: z.ZodOptional; dbSchemas: z.ZodOptional>; jwtRoleClaimKey: z.ZodOptional; jwtCacheMaxLifetime: z.ZodOptional; openapiMode: z.ZodOptional, z.ZodLiteral<"disabled">]>>; serverCorsAllowedOrigins: z.ZodOptional; serverTimingEnabled: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>]>; declare const postgresConfigSchema: z.ZodObject<{ computeSettings: z.ZodOptional, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>>; autoscalingLimitMaxCu: z.ZodOptional, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>>; suspendTimeout: z.ZodOptional, z.ZodString, z.ZodNumber]>>; }, z.core.$strict>>; }, z.core.$strict>; /** * Static definition of a function (existence). The slug is the record key (validated by * {@link functionSlugSchema}), so it is not a field here. Deploy tuning (`runtime`) lives * in the `branch` closure, not here. * * `externalPackages` entries are checked for contradictions: the same package named twice, * or named once bare and once through a subpath with a different `includeFiles`. Both state * two intents for one package, and files are staged per package rather than per subpath, so * neither can be honoured as written. */ declare const functionDefSchema: z.ZodObject<{ name: z.ZodString; source: z.ZodString; env: z.ZodOptional>; externalPackages: z.ZodOptional; }, z.core.$strict>]>>>; dev: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>; /** Static definition of a bucket (existence). Name is the record key. */ declare const bucketDefSchema: z.ZodObject<{ access: z.ZodOptional, z.ZodLiteral<"public_read">]>>; }, z.core.$strict>; /** Static, beta Preview feature set: AI Gateway toggle + functions/buckets records. */ declare const previewInputSchema: z.ZodObject<{ aiGateway: z.ZodOptional; }, z.core.$strict>]>>; functions: z.ZodOptional>; externalPackages: z.ZodOptional; }, z.core.$strict>]>>>; dev: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>>>; buckets: z.ZodOptional, z.ZodLiteral<"public_read">]>>; }, z.core.$strict>>>; }, z.core.$strict>; /** Per-function deploy tuning returned by the `branch` closure. */ declare const functionTuningSchema: z.ZodObject<{ runtime: z.ZodOptional>; }, z.core.$strict>; /** * The object returned by the `branch` closure. Validated on every `resolveConfig` call so * tuning errors point at the concrete branch target that triggered them. */ declare const branchTuningSchema: z.ZodObject<{ parent: z.ZodOptional; protected: z.ZodOptional; ttl: z.ZodOptional>; postgres: z.ZodOptional, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>>; autoscalingLimitMaxCu: z.ZodOptional, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>>; suspendTimeout: z.ZodOptional, z.ZodString, z.ZodNumber]>>; }, z.core.$strict>>; }, z.core.$strict>>; preview: z.ZodOptional>; }, z.core.$strict>>>; }, z.core.$strict>>; }, z.core.$strict>; /** * The top-level object accepted by `defineConfig`. The `branch` closure is validated * structurally as a function here; its returned tuning is validated per-evaluation by * {@link branchTuningSchema} inside `resolveConfig`. */ declare const configInputSchema: z.ZodObject<{ auth: z.ZodOptional; }, z.core.$strict>]>>; dataApi: z.ZodOptional; authProvider: z.ZodOptional, z.ZodLiteral<"external">]>>; jwksUrl: z.ZodOptional; providerName: z.ZodOptional; jwtAudience: z.ZodOptional; settings: z.ZodOptional; dbAnonRole: z.ZodOptional; dbExtraSearchPath: z.ZodOptional; dbMaxRows: z.ZodOptional; dbSchemas: z.ZodOptional>; jwtRoleClaimKey: z.ZodOptional; jwtCacheMaxLifetime: z.ZodOptional; openapiMode: z.ZodOptional, z.ZodLiteral<"disabled">]>>; serverCorsAllowedOrigins: z.ZodOptional; serverTimingEnabled: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>]>>; preview: z.ZodOptional; }, z.core.$strict>]>>; functions: z.ZodOptional>; externalPackages: z.ZodOptional; }, z.core.$strict>]>>>; dev: z.ZodOptional; }, z.core.$strict>>; }, z.core.$strict>>>; buckets: z.ZodOptional, z.ZodLiteral<"public_read">]>>; }, z.core.$strict>>>; }, z.core.$strict>>; branch: z.ZodOptional unknown, (...args: unknown[]) => unknown>>; }, z.core.$strict>; /** * Convert the structured {@link z.ZodError} produced by `configSchema.safeParse` into the * `string[]` shape used by {@link import("./errors.js").ConfigValidationError}. * * Issue paths are rendered as dot-separated property accesses (`postgres.computeSettings`) * and unknown-key issues from `strictObject` are normalised so the message contains the * substring "unknown key" — keeping pre-zod assertions in test suites and downstream tools * stable. */ declare function formatZodIssues(error: z.ZodError): string[]; //#endregion export { branchTuningSchema, bucketDefSchema, computeSettingsSchema, configInputSchema, dataApiConfigSchema, dataApiInputSchema, dataApiSettingsSchema, formatZodIssues, functionDefSchema, functionTuningSchema, postgresConfigSchema, previewInputSchema, serviceToggleInputSchema, serviceToggleSchema }; //# sourceMappingURL=schema.d.ts.map