import * as yup$1 from "yup"; import { DeepMerge } from "../utils/objects.js"; import { Config, NormalizesTo } from "./format.js"; import { Result } from "../utils/results.js"; import { CollapseObjectUnion, Expand, IsUnion } from "../utils/types.js"; //#region src/config/schema.d.ts declare const configLevels: readonly ["project", "branch", "environment", "organization"]; type ConfigLevel = typeof configLevels[number]; declare module "yup" { interface CustomSchemaMetadata { hexclaveConfigCanNoLongerBeOverridden?: true; } } /** * All fields that can be overridden at this level. */ declare const projectConfigSchema: yup$1.ObjectSchema<{ sourceOfTruth: { type: "hosted"; }; project: { requirePublishableClientKey?: boolean | undefined; }; }, yup$1.AnyObject, { sourceOfTruth: undefined; project: { requirePublishableClientKey: undefined; }; }, "">; declare const branchPaymentsSchema: yup$1.ObjectSchema<{ blockNewPurchases: boolean | undefined; autoPay: { interval?: import("../utils/dates").DayInterval | undefined; } | undefined; productLines: Record; products: Record | undefined; prices: Record; customerType: "user" | "team" | "custom"; includedItems: Record; }>; items: Record; } | undefined, yup$1.AnyObject, { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }, "">; declare const branchConfigSchema: yup$1.Schema, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { payments?: { blockNewPurchases?: boolean | undefined; autoPay?: { interval?: import("../utils/dates").DayInterval | undefined; } | undefined; items: Record; productLines: Record; products: Record | undefined; prices: Record; customerType: "user" | "team" | "custom"; includedItems: Record; }>; } | undefined; teams: { createPersonalTeamOnSignUp?: boolean | undefined; allowClientTeamCreation?: boolean | undefined; }; auth: { allowSignUp?: boolean | undefined; signUpRulesDefaultAction?: string | undefined; password: { allowSignIn?: boolean | undefined; }; otp: { allowSignIn?: boolean | undefined; }; oauth: { accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined; providers: Record; }; passkey: { allowSignIn?: boolean | undefined; }; signUpRules: Record; }; emails: { selectedThemeId?: string | undefined; themes: Record; templates: Record; }; onboarding: { requireEmailVerification?: boolean | undefined; }; rbac: { permissions: Record | undefined; } | undefined>; defaultPermissions: { teamCreator: Record; teamMember: Record; signUp: Record; }; }; domains: {}; apiKeys: { enabled: { user?: boolean | undefined; team?: boolean | undefined; }; }; apps: { installed: Record; }; users: { allowClientUserDeletion?: boolean | undefined; }; dataVault: { stores: Record; }; }, yup$1.AnyObject, Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }, "">; declare const environmentConfigSchema: yup$1.Schema, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { payments?: { blockNewPurchases?: boolean | undefined; autoPay?: { interval?: import("../utils/dates").DayInterval | undefined; } | undefined; items: Record; productLines: Record; products: Record | undefined; prices: Record; customerType: "user" | "team" | "custom"; includedItems: Record; }>; } | undefined; teams: { createPersonalTeamOnSignUp?: boolean | undefined; allowClientTeamCreation?: boolean | undefined; }; auth: { allowSignUp?: boolean | undefined; signUpRulesDefaultAction?: string | undefined; password: { allowSignIn?: boolean | undefined; }; otp: { allowSignIn?: boolean | undefined; }; oauth: { accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined; providers: Record; }; passkey: { allowSignIn?: boolean | undefined; }; signUpRules: Record; }; emails: { selectedThemeId?: string | undefined; themes: Record; templates: Record; }; onboarding: { requireEmailVerification?: boolean | undefined; }; rbac: { permissions: Record | undefined; } | undefined>; defaultPermissions: { teamCreator: Record; teamMember: Record; signUp: Record; }; }; domains: {}; apiKeys: { enabled: { user?: boolean | undefined; team?: boolean | undefined; }; }; apps: { installed: Record; }; users: { allowClientUserDeletion?: boolean | undefined; }; dataVault: { stores: Record; }; }>, "analytics" | "auth" | "emails" | "payments" | "domains" | "customDashboards" | "dbSync"> & { payments?: (Omit<{ blockNewPurchases?: boolean | undefined; autoPay?: { interval?: import("../utils/dates").DayInterval | undefined; } | undefined; items: Record; productLines: Record; products: Record | undefined; prices: Record; customerType: "user" | "team" | "custom"; includedItems: Record; }>; }, "testMode"> & { testMode?: boolean | undefined; }) | undefined; analytics: { queryFolders: Record; }>; }; auth: Omit<{ allowSignUp?: boolean | undefined; signUpRulesDefaultAction?: string | undefined; password: { allowSignIn?: boolean | undefined; }; otp: { allowSignIn?: boolean | undefined; }; oauth: { accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined; providers: Record; }; passkey: { allowSignIn?: boolean | undefined; }; signUpRules: Record; }, "oauth"> & { oauth: Omit<{ accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined; providers: Record; }, "providers"> & { providers: Record | undefined; issuerUrl?: string | undefined; }>; }; }; emails: Omit<{ selectedThemeId?: string | undefined; themes: Record; templates: Record; }, "server"> & { server: { provider?: "resend" | "smtp" | "managed" | undefined; password?: string | undefined; host?: string | undefined; port?: number | undefined; username?: string | undefined; isShared?: boolean | undefined; senderName?: string | undefined; senderEmail?: string | undefined; managedSubdomain?: string | undefined; managedSenderLocalPart?: string | undefined; }; }; domains: Omit<{}, "allowLocalhost" | "trustedDomains"> & { allowLocalhost?: boolean | undefined; trustedDomains: Record; }; customDashboards: Record; dbSync: { externalDatabases: Record; }; }, yup$1.AnyObject, Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "analytics" | "auth" | "emails" | "payments" | "domains" | "customDashboards" | "dbSync"> & { auth: Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "oauth"> & { oauth: Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "providers"> & { providers: undefined; }; }; emails: Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "server"> & { server: { isShared: undefined; provider: undefined; host: undefined; port: undefined; username: undefined; password: undefined; senderName: undefined; senderEmail: undefined; managedSubdomain: undefined; managedSenderLocalPart: undefined; }; }; domains: Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "allowLocalhost" | "trustedDomains"> & { allowLocalhost: undefined; trustedDomains: undefined; }; payments: Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "testMode"> & { testMode: undefined; }; dbSync: { externalDatabases: undefined; }; analytics: { queryFolders: undefined; }; customDashboards: undefined; }, "">; declare const organizationConfigSchema: yup$1.Schema, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { payments?: { blockNewPurchases?: boolean | undefined; autoPay?: { interval?: import("../utils/dates").DayInterval | undefined; } | undefined; items: Record; productLines: Record; products: Record | undefined; prices: Record; customerType: "user" | "team" | "custom"; includedItems: Record; }>; } | undefined; teams: { createPersonalTeamOnSignUp?: boolean | undefined; allowClientTeamCreation?: boolean | undefined; }; auth: { allowSignUp?: boolean | undefined; signUpRulesDefaultAction?: string | undefined; password: { allowSignIn?: boolean | undefined; }; otp: { allowSignIn?: boolean | undefined; }; oauth: { accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined; providers: Record; }; passkey: { allowSignIn?: boolean | undefined; }; signUpRules: Record; }; emails: { selectedThemeId?: string | undefined; themes: Record; templates: Record; }; onboarding: { requireEmailVerification?: boolean | undefined; }; rbac: { permissions: Record | undefined; } | undefined>; defaultPermissions: { teamCreator: Record; teamMember: Record; signUp: Record; }; }; domains: {}; apiKeys: { enabled: { user?: boolean | undefined; team?: boolean | undefined; }; }; apps: { installed: Record; }; users: { allowClientUserDeletion?: boolean | undefined; }; dataVault: { stores: Record; }; }>, "analytics" | "auth" | "emails" | "payments" | "domains" | "customDashboards" | "dbSync"> & { payments?: (Omit<{ blockNewPurchases?: boolean | undefined; autoPay?: { interval?: import("../utils/dates").DayInterval | undefined; } | undefined; items: Record; productLines: Record; products: Record | undefined; prices: Record; customerType: "user" | "team" | "custom"; includedItems: Record; }>; }, "testMode"> & { testMode?: boolean | undefined; }) | undefined; analytics: { queryFolders: Record; }>; }; auth: Omit<{ allowSignUp?: boolean | undefined; signUpRulesDefaultAction?: string | undefined; password: { allowSignIn?: boolean | undefined; }; otp: { allowSignIn?: boolean | undefined; }; oauth: { accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined; providers: Record; }; passkey: { allowSignIn?: boolean | undefined; }; signUpRules: Record; }, "oauth"> & { oauth: Omit<{ accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined; providers: Record; }, "providers"> & { providers: Record | undefined; issuerUrl?: string | undefined; }>; }; }; emails: Omit<{ selectedThemeId?: string | undefined; themes: Record; templates: Record; }, "server"> & { server: { provider?: "resend" | "smtp" | "managed" | undefined; password?: string | undefined; host?: string | undefined; port?: number | undefined; username?: string | undefined; isShared?: boolean | undefined; senderName?: string | undefined; senderEmail?: string | undefined; managedSubdomain?: string | undefined; managedSenderLocalPart?: string | undefined; }; }; domains: Omit<{}, "allowLocalhost" | "trustedDomains"> & { allowLocalhost?: boolean | undefined; trustedDomains: Record; }; customDashboards: Record; dbSync: { externalDatabases: Record; }; }>, never> & {}, yup$1.AnyObject, Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "analytics" | "auth" | "emails" | "payments" | "domains" | "customDashboards" | "dbSync"> & { auth: Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "oauth"> & { oauth: Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "providers"> & { providers: undefined; }; }; emails: Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "server"> & { server: { isShared: undefined; provider: undefined; host: undefined; port: undefined; username: undefined; password: undefined; senderName: undefined; senderEmail: undefined; managedSubdomain: undefined; managedSenderLocalPart: undefined; }; }; domains: Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "allowLocalhost" | "trustedDomains"> & { allowLocalhost: undefined; trustedDomains: undefined; }; payments: Omit, "teams" | "auth" | "emails" | "onboarding" | "rbac" | "payments" | "domains" | "apiKeys" | "apps" | "users" | "dataVault"> & { rbac: { permissions: undefined; defaultPermissions: { teamCreator: undefined; teamMember: undefined; signUp: undefined; }; }; teams: { createPersonalTeamOnSignUp: undefined; allowClientTeamCreation: undefined; }; users: { allowClientUserDeletion: undefined; }; onboarding: { requireEmailVerification: undefined; }; apiKeys: { enabled: { team: undefined; user: undefined; }; }; apps: { installed: undefined; }; domains: {}; auth: { allowSignUp: undefined; password: { allowSignIn: undefined; }; otp: { allowSignIn: undefined; }; passkey: { allowSignIn: undefined; }; oauth: { accountMergeStrategy: undefined; providers: undefined; }; signUpRules: undefined; signUpRulesDefaultAction: undefined; }; emails: { selectedThemeId: undefined; themes: undefined; templates: undefined; }; payments: { blockNewPurchases: undefined; autoPay: { interval: undefined; }; productLines: undefined; products: undefined; items: undefined; }; dataVault: { stores: undefined; }; }>, "testMode"> & { testMode: undefined; }; dbSync: { externalDatabases: undefined; }; analytics: { queryFolders: undefined; }; customDashboards: undefined; }>, never> & {}, "">; declare function migrateConfigOverride(type: "project" | "branch" | "environment" | "organization", oldUnmigratedConfigOverride: any): any; declare const projectConfigDefaults: { readonly sourceOfTruth: { readonly type: "hosted"; }; readonly project: { readonly requirePublishableClientKey: false; }; }; declare const branchConfigDefaults: {}; declare const environmentConfigDefaults: {}; declare const organizationConfigDefaults: { readonly rbac: { readonly permissions: (key: string) => { containedPermissionIds: (key: string) => undefined; description: undefined; scope: undefined; }; readonly defaultPermissions: { readonly teamCreator: (key: string) => undefined; readonly teamMember: (key: string) => undefined; readonly signUp: (key: string) => undefined; }; }; readonly apiKeys: { readonly enabled: { readonly team: false; readonly user: false; }; }; readonly apps: { readonly installed: ((appId: string) => { enabled: boolean; } | undefined) & Record<"analytics" | "teams" | "authentication" | "emails" | "fraud-protection" | "onboarding" | "rbac" | "api-keys" | "payments" | "support" | "email-api" | "data-vault" | "webhooks" | "tv-mode" | "launch-checklist" | "catalyst" | "neon" | "convex" | "vercel" | "tanstack-start" | "clickmaps" | "session-replays" | "cli-auth" | "compliance" | "deploy" | "workflows-alpha", { enabled: boolean; }>; }; readonly teams: { readonly createPersonalTeamOnSignUp: false; readonly allowClientTeamCreation: false; }; readonly users: { readonly allowClientUserDeletion: false; }; readonly onboarding: { readonly requireEmailVerification: false; }; readonly domains: { readonly allowLocalhost: false; readonly trustedDomains: (key: string) => { readonly baseUrl: undefined; readonly handlerPath: "/handler"; }; }; readonly auth: { readonly allowSignUp: true; readonly password: { readonly allowSignIn: false; }; readonly otp: { readonly allowSignIn: false; }; readonly passkey: { readonly allowSignIn: false; }; readonly oauth: { readonly accountMergeStrategy: "link_method"; readonly providers: (key: string) => { type: undefined; isShared: true; allowSignIn: false; allowConnectedAccounts: false; clientId: undefined; clientSecret: undefined; appleTeamId: undefined; appleKeyId: undefined; applePrivateKey: undefined; customCallbackUrl: undefined; facebookConfigId: undefined; microsoftTenantId: undefined; appleBundles: undefined; }; }; readonly signUpRules: (key: string) => { enabled: false; displayName: undefined; priority: number; condition: undefined; action: { type: "allow"; message: undefined; }; }; readonly signUpRulesDefaultAction: "allow"; }; readonly emails: { readonly server: { readonly isShared: true; readonly provider: "smtp"; readonly host: undefined; readonly port: undefined; readonly username: undefined; readonly password: undefined; readonly senderName: undefined; readonly senderEmail: undefined; readonly managedSubdomain: undefined; readonly managedSenderLocalPart: undefined; }; readonly selectedThemeId: "1df07ae6-abf3-4a40-83a5-a1a2cbe336ac"; readonly themes: ((key: string) => { displayName: string; tsxSource: string; }) & { "1df07ae6-abf3-4a40-83a5-a1a2cbe336ac": { displayName: string; tsxSource: string; }; "a0172b5d-cff0-463b-83bb-85124697373a": { displayName: string; tsxSource: string; }; "c7e2d94f-8a1b-4e6d-b3f5-9d0a2e7c1b8f": { displayName: string; tsxSource: string; }; }; readonly templates: ((key: string) => { displayName: string; tsxSource: string; themeId: undefined; }) & { "e7d009ce-8d47-4528-b245-5bf119f2ffa3": { displayName: string; tsxSource: string; themeId: undefined; }; "a70fb3a4-56c1-4e42-af25-49d25603abd0": { displayName: string; tsxSource: string; themeId: undefined; }; "822687fe-8d0a-4467-a0d1-416b6e639478": { displayName: string; tsxSource: string; themeId: undefined; }; "e84de395-2076-4831-9c19-8e9a96a868e4": { displayName: string; tsxSource: string; themeId: undefined; }; "066dd73c-36da-4fd0-b6d6-ebf87683f8bc": { displayName: string; tsxSource: string; themeId: undefined; }; "70372aee-0441-4d80-974c-2e858e40123a": { displayName: string; tsxSource: string; themeId: undefined; }; "f64b1afe-27ec-4a28-a277-7178f3261f9a": { displayName: string; tsxSource: string; themeId: undefined; }; "c3f8a1d2-7e4b-4a91-b2c5-9e8f1a0d3b6c": { displayName: string; tsxSource: string; themeId: undefined; }; }; }; readonly payments: { readonly blockNewPurchases: false; readonly testMode: true; readonly autoPay: undefined; readonly productLines: (key: string) => { displayName: undefined; customerType: undefined; }; readonly products: (key: string) => { readonly displayName: string; readonly productLineId: undefined; readonly customerType: "user"; readonly freeTrial: undefined; readonly serverOnly: false; readonly stackable: undefined; readonly isAddOnTo: false; readonly prices: (key: string) => { interval: undefined; serverOnly: false; freeTrial: undefined; USD: undefined; EUR: undefined; GBP: undefined; JPY: undefined; INR: undefined; AUD: undefined; CAD: undefined; }; readonly includedItems: (key: string) => { quantity: number; repeat: "never"; expires: "when-repeated"; }; }; readonly items: (key: string) => { readonly displayName: string; readonly customerType: "user"; }; }; readonly dbSync: { readonly externalDatabases: (key: string) => { type: undefined; connectionString: undefined; }; }; readonly dataVault: { readonly stores: (key: string) => { displayName: string; }; }; readonly analytics: { readonly queryFolders: (key: string) => { displayName: string; sortOrder: number; queries: (queryKey: string) => { displayName: string; sqlQuery: string; description: undefined; }; }; }; readonly customDashboards: (key: string) => { displayName: string; tsxSource: string; }; }; type ReplaceFunctionsWithObjects = T & (T extends ((arg: infer K extends string) => infer R) ? Record & object : unknown); type DeepReplaceFunctionsWithObjects = T extends object ? { [K in keyof ReplaceFunctionsWithObjects]: DeepReplaceFunctionsWithObjects[K]> } : T; type ApplyDefaults unknown), C extends object> = {} extends D ? C : DeepMerge, C>; declare function applyProjectDefaults(config: T): DeepMerge<{ readonly sourceOfTruth: { readonly type: "hosted"; }; readonly project: { readonly requirePublishableClientKey: false; }; }, T>; declare function applyBranchDefaults(config: T): DeepMerge<{ readonly sourceOfTruth: { readonly type: "hosted"; }; readonly project: { readonly requirePublishableClientKey: false; }; }, T>; declare function applyEnvironmentDefaults(config: T): ApplyDefaults>>; declare function applyOrganizationDefaults(config: OrganizationRenderedConfigBeforeDefaults): ApplyDefaults>>>; declare function sanitizeProjectConfig(config: T): Promise; declare function sanitizeBranchConfig(config: T): Promise; declare function sanitizeEnvironmentConfig(config: T): Promise; declare function sanitizeOrganizationConfig(config: OrganizationRenderedConfigBeforeSanitization): Promise<{ auth: { oauth: { providers: Record; accountMergeStrategy: "link_method" | "raise_error" | "allow_duplicates"; }; signUpRules: Record; password: { allowSignIn: boolean; }; otp: { allowSignIn: boolean; }; passkey: { allowSignIn: boolean; }; allowSignUp: boolean; signUpRulesDefaultAction: string; }; emails: { selectedThemeId: string; themes: { [x: string]: { displayName: string; tsxSource: string; }; }; templates: { [x: string]: { displayName: string; tsxSource: string; themeId: string | false | undefined; }; }; server: { provider: "resend" | "smtp" | "managed"; password: string | undefined; host: string | undefined; port: number | undefined; username: string | undefined; isShared: boolean; senderName: string | undefined; senderEmail: string | undefined; managedSubdomain: string | undefined; managedSenderLocalPart: string | undefined; }; }; payments: { products: Record; prices: Record & { serverOnly: boolean; }>; stackable: boolean | undefined; displayName: string; serverOnly: boolean; freeTrial: [number, "day" | "week" | "month" | "year"] | undefined; productLineId: string | undefined; customerType: "user" | "team" | "custom"; includedItems: { [x: string]: { quantity: number; repeat: "never" | [number, "day" | "week" | "month" | "year"]; expires: "never" | "when-purchase-expires" | "when-repeated"; }; }; }>; items: { [x: string]: { displayName: string; customerType: "user" | "team" | "custom"; }; }; blockNewPurchases: boolean; autoPay: { interval?: [number, "day" | "week" | "month" | "year"] | undefined; } | undefined; productLines: { [x: string]: { displayName: string | undefined; customerType: "user" | "team" | "custom" | undefined; }; }; testMode: boolean; }; apps: { installed: Record; }; project: { requirePublishableClientKey: boolean; }; sourceOfTruth: { type: "hosted"; } & { readonly type: "hosted"; }; analytics: { queryFolders: { [x: string]: { displayName: string; sortOrder: number; queries: { [x: string]: { description: string | undefined; displayName: string; sqlQuery: string; }; }; }; }; }; teams: { createPersonalTeamOnSignUp: boolean; allowClientTeamCreation: boolean; }; onboarding: { requireEmailVerification: boolean; }; rbac: { permissions: { [x: string]: { description: string | undefined; scope: "team" | "project" | undefined; containedPermissionIds: { [x: string]: true | undefined; }; }; }; defaultPermissions: { teamCreator: { [x: string]: true | undefined; }; teamMember: { [x: string]: true | undefined; }; signUp: { [x: string]: true | undefined; }; }; }; domains: { allowLocalhost: boolean; trustedDomains: { [x: string]: { baseUrl: string | undefined; handlerPath: string; }; }; }; apiKeys: { enabled: { user: boolean; team: boolean; }; }; users: { allowClientUserDeletion: boolean; }; dataVault: { stores: { [x: string]: { displayName: string; }; }; }; customDashboards: { [x: string]: { displayName: string; tsxSource: string; }; }; dbSync: { externalDatabases: { [x: string]: { type: "postgres" | undefined; connectionString: string | undefined; }; }; }; }>; /** * Does not require a base config, and hence solely relies on the override itself to validate the config. If it returns * no error, you know that the * * It's crucial that our DB never contains any configs that are not valid according to this function, as this would mean * that the config object does not satisfy the ValidatedToHaveNoConfigOverrideErrors type (which is used as an assumption * in a whole bunch of places in the code). */ declare function getConfigOverrideErrors(schema: T, configOverride: unknown, options?: { allowPropertiesThatCanNoLongerBeOverridden?: boolean; }): Promise>; declare function assertNoConfigOverrideErrors(schema: T, config: unknown, options?: { allowPropertiesThatCanNoLongerBeOverridden?: boolean; extraInfo?: any; }): Promise; type _ValidatedToHaveNoConfigOverrideErrorsImpl = IsUnion extends true ? _ValidatedToHaveNoConfigOverrideErrorsImpl | Exclude> : T extends object ? (T extends any[] ? T : { [K in keyof T]+?: _ValidatedToHaveNoConfigOverrideErrorsImpl }) : T; type ValidatedToHaveNoConfigOverrideErrors = _ValidatedToHaveNoConfigOverrideErrorsImpl>; /** * Checks whether there are any warnings in the incomplete config. A warning doesn't stop the config from being valid, * but may require action regardless. * * The DB can contain configs that are not valid according to this function, as long as they are valid according to * the getConfigOverrideErrors function. (This is necessary, because a changing base config may make an override invalid * that was previously valid.) */ declare function getIncompleteConfigWarnings(schema: T, incompleteConfig: Config): Promise>; type ValidatedToHaveNoIncompleteConfigWarnings = yup$1.InferType; type ProjectConfigNormalizedOverride = Expand>; type BranchConfigNormalizedOverride = Expand>; type EnvironmentConfigNormalizedOverride = Expand>; type OrganizationConfigNormalizedOverride = Expand>; type ProjectConfigOverride = NormalizesTo; type BranchConfigOverride = NormalizesTo; type EnvironmentConfigOverride = NormalizesTo; type OrganizationConfigOverride = NormalizesTo; type ProjectConfigOverrideOverride = ProjectConfigOverride; type BranchConfigOverrideOverride = BranchConfigOverride; type EnvironmentConfigOverrideOverride = EnvironmentConfigOverride; type OrganizationConfigOverrideOverride = OrganizationConfigOverride; type ProjectIncompleteConfig = Expand; type BranchIncompleteConfig = Expand; type EnvironmentIncompleteConfig = Expand; type OrganizationIncompleteConfig = Expand; type ProjectRenderedConfigBeforeDefaults = Omit; type BranchRenderedConfigBeforeDefaults = Omit; type EnvironmentRenderedConfigBeforeDefaults = Omit; type OrganizationRenderedConfigBeforeDefaults = OrganizationIncompleteConfig; type ProjectRenderedConfigBeforeSanitization = Expand>>>; type BranchRenderedConfigBeforeSanitization = Expand>>>; type EnvironmentRenderedConfigBeforeSanitization = Expand>>>; type OrganizationRenderedConfigBeforeSanitization = Expand>>; type ProjectRenderedConfig = Expand>>>; type BranchRenderedConfig = Expand>>>; type EnvironmentRenderedConfig = Expand>>>; type OrganizationRenderedConfig = Expand>>; type CompleteConfig = OrganizationRenderedConfig; //#endregion export { BranchConfigNormalizedOverride, BranchConfigOverride, BranchConfigOverrideOverride, BranchIncompleteConfig, BranchRenderedConfig, CompleteConfig, ConfigLevel, EnvironmentConfigNormalizedOverride, EnvironmentConfigOverride, EnvironmentConfigOverrideOverride, EnvironmentIncompleteConfig, EnvironmentRenderedConfig, OrganizationConfigNormalizedOverride, OrganizationConfigOverride, OrganizationConfigOverrideOverride, OrganizationIncompleteConfig, OrganizationRenderedConfig, ProjectConfigNormalizedOverride, ProjectConfigOverride, ProjectConfigOverrideOverride, ProjectIncompleteConfig, ProjectRenderedConfig, ValidatedToHaveNoConfigOverrideErrors, ValidatedToHaveNoIncompleteConfigWarnings, applyBranchDefaults, applyEnvironmentDefaults, applyOrganizationDefaults, applyProjectDefaults, assertNoConfigOverrideErrors, branchConfigSchema, branchPaymentsSchema, configLevels, environmentConfigSchema, getConfigOverrideErrors, getIncompleteConfigWarnings, migrateConfigOverride, organizationConfigSchema, projectConfigSchema, sanitizeBranchConfig, sanitizeEnvironmentConfig, sanitizeOrganizationConfig, sanitizeProjectConfig }; //# sourceMappingURL=schema.d.ts.map