import * as yup from 'yup'; declare module "yup" { interface StringSchema { nonEmpty(message?: string): StringSchema; empty(): StringSchema; } interface Schema { getNested>(path: K): yup.Schema[K], TContext, TDefault, TFlags>; concat(schema: U): yup.Schema, keyof yup.InferType> & yup.InferType | (TType & (null | undefined)), TContext, TDefault, TFlags>; } } declare function yupValidate>(schema: S, obj: unknown, options?: yup.ValidateOptions & { currentUserId?: string | null; }): Promise>; declare const StackAdaptSentinel: unique symbol; type StackAdaptSentinel = typeof StackAdaptSentinel; declare function yupString = yup.AnyObject>(...args: Parameters>): yup.StringSchema; declare function yupNumber = yup.AnyObject>(...args: Parameters>): yup.NumberSchema; declare function yupBoolean = yup.AnyObject>(...args: Parameters>): yup.BooleanSchema; /** * @deprecated, use number of milliseconds since epoch instead */ declare function yupDate = yup.AnyObject>(...args: Parameters>): yup.DateSchema; declare function yupMixed(...args: Parameters>): yup.MixedSchema; declare function yupArray = yup.AnyObject, B = any>(...args: Parameters>): yup.ArraySchema; declare function yupTuple(...args: Parameters>): yup.TupleSchema; declare function yupObject, B extends yup.ObjectShape>(...args: Parameters>): yup.ObjectSchema extends infer T ? T extends yup.TypeFromShape ? T extends {} ? { [k in keyof T]: T[k]; } : T : never : never, yup.AnyObject, yup.DefaultFromShape extends infer T_1 ? T_1 extends yup.DefaultFromShape ? T_1 extends {} ? { [k_1 in keyof T_1]: T_1[k_1]; } : T_1 : never : never, "">; declare function yupNever(): yup.MixedSchema; declare function yupUnion[]>(...args: T): yup.MixedSchema>; declare function yupRecord(keySchema: K, valueSchema: T): yup.MixedSchema>>; declare function ensureObjectSchema(schema: yup.Schema): yup.ObjectSchema & typeof schema; declare const adaptSchema: yup.MixedSchema; /** * Yup's URL schema does not recognize some URLs (including `http://localhost`) as a valid URL. This schema is a workaround for that. */ declare const urlSchema: yup.StringSchema; declare const jsonSchema: yup.MixedSchema<{} | null, yup.AnyObject, undefined, "">; declare const jsonStringSchema: yup.StringSchema; declare const jsonStringOrEmptySchema: yup.StringSchema; declare const base64Schema: yup.StringSchema; declare const passwordSchema: yup.StringSchema; /** * A stricter email schema that does some additional checks for UX input. (Some emails are allowed by the spec, for * example `test@localhost` or `abc@gmail`, but almost certainly a user input error.) * * Note that some users in the DB have an email that doesn't match this regex, so most of the time you should use * `emailSchema` instead until we do the DB migration. */ declare const strictEmailSchema: (message: string | undefined) => yup.StringSchema; declare const emailSchema: yup.StringSchema; declare const clientOrHigherAuthTypeSchema: yup.StringSchema<"client" | "server" | "admin", yup.AnyObject, undefined, "">; declare const serverOrHigherAuthTypeSchema: yup.StringSchema<"server" | "admin", yup.AnyObject, undefined, "">; declare const adminAuthTypeSchema: yup.StringSchema<"admin", yup.AnyObject, undefined, "">; declare const projectIdSchema: yup.StringSchema; declare const projectBranchIdSchema: yup.StringSchema; declare const projectDisplayNameSchema: yup.StringSchema; declare const projectDescriptionSchema: yup.StringSchema; declare const projectCreatedAtMillisSchema: yup.NumberSchema; declare const projectUserCountSchema: yup.NumberSchema; declare const projectIsProductionModeSchema: yup.BooleanSchema; declare const projectConfigIdSchema: yup.StringSchema; declare const projectAllowLocalhostSchema: yup.BooleanSchema; declare const projectCreateTeamOnSignUpSchema: yup.BooleanSchema; declare const projectMagicLinkEnabledSchema: yup.BooleanSchema; declare const projectPasskeyEnabledSchema: yup.BooleanSchema; declare const projectClientTeamCreationEnabledSchema: yup.BooleanSchema; declare const projectClientUserDeletionEnabledSchema: yup.BooleanSchema; declare const projectSignUpEnabledSchema: yup.BooleanSchema; declare const projectCredentialEnabledSchema: yup.BooleanSchema; declare const oauthIdSchema: yup.StringSchema<"apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined, yup.AnyObject, undefined, "">; declare const oauthEnabledSchema: yup.BooleanSchema; declare const oauthTypeSchema: yup.StringSchema<"shared" | "standard" | undefined, yup.AnyObject, undefined, "">; declare const oauthClientIdSchema: yup.StringSchema; declare const oauthClientSecretSchema: yup.StringSchema; declare const oauthFacebookConfigIdSchema: yup.StringSchema; declare const oauthMicrosoftTenantIdSchema: yup.StringSchema; declare const oauthAccountMergeStrategySchema: yup.StringSchema<"link_method" | "raise_error" | "allow_duplicates" | undefined, yup.AnyObject, undefined, "">; declare const emailTypeSchema: yup.StringSchema<"shared" | "standard" | undefined, yup.AnyObject, undefined, "">; declare const emailSenderNameSchema: yup.StringSchema; declare const emailHostSchema: yup.StringSchema; declare const emailPortSchema: yup.NumberSchema; declare const emailUsernameSchema: yup.StringSchema; declare const emailSenderEmailSchema: yup.StringSchema; declare const emailPasswordSchema: yup.StringSchema; declare const handlerPathSchema: yup.StringSchema; declare class ReplaceFieldWithOwnUserId extends Error { readonly path: string; constructor(path: string); } declare const userIdOrMeSchema: yup.StringSchema; declare const userIdSchema: yup.StringSchema; declare const primaryEmailSchema: yup.StringSchema; declare const primaryEmailAuthEnabledSchema: yup.BooleanSchema; declare const primaryEmailVerifiedSchema: yup.BooleanSchema; declare const userDisplayNameSchema: yup.StringSchema; declare const selectedTeamIdSchema: yup.StringSchema; declare const profileImageUrlSchema: yup.StringSchema; declare const signedUpAtMillisSchema: yup.NumberSchema; declare const userClientMetadataSchema: yup.MixedSchema<{} | null, yup.AnyObject, undefined, "">; declare const userClientReadOnlyMetadataSchema: yup.MixedSchema<{} | null, yup.AnyObject, undefined, "">; declare const userServerMetadataSchema: yup.MixedSchema<{} | null, yup.AnyObject, undefined, "">; declare const userOAuthProviderSchema: yup.ObjectSchema<{ id: string; type: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin"; provider_user_id: string; }, yup.AnyObject, { id: undefined; type: undefined; provider_user_id: undefined; }, "">; declare const userLastActiveAtMillisSchema: yup.NumberSchema; declare const userPasskeyAuthEnabledSchema: yup.BooleanSchema; declare const userOtpAuthEnabledSchema: yup.BooleanSchema; declare const userOtpAuthEnabledMutationSchema: yup.BooleanSchema; declare const userHasPasswordSchema: yup.BooleanSchema; declare const userPasswordMutationSchema: yup.StringSchema; declare const userPasswordHashMutationSchema: yup.StringSchema; declare const userTotpSecretMutationSchema: yup.StringSchema; declare const signInEmailSchema: yup.StringSchema; declare const emailOtpSignInCallbackUrlSchema: yup.StringSchema; declare const emailVerificationCallbackUrlSchema: yup.StringSchema; declare const accessTokenResponseSchema: yup.StringSchema; declare const refreshTokenResponseSchema: yup.StringSchema; declare const signInResponseSchema: yup.ObjectSchema<{ refresh_token: string; access_token: string; is_new_user: boolean; user_id: string; }, yup.AnyObject, { refresh_token: undefined; access_token: undefined; is_new_user: undefined; user_id: undefined; }, "">; declare const teamSystemPermissions: readonly ["$update_team", "$delete_team", "$read_members", "$remove_members", "$invite_members", "$manage_api_keys"]; declare const permissionDefinitionIdSchema: yup.StringSchema; declare const customPermissionDefinitionIdSchema: yup.StringSchema; declare const teamPermissionDescriptionSchema: yup.StringSchema; declare const containedPermissionIdsSchema: yup.ArraySchema; declare const teamIdSchema: yup.StringSchema; declare const teamDisplayNameSchema: yup.StringSchema; declare const teamProfileImageUrlSchema: yup.StringSchema; declare const teamClientMetadataSchema: yup.MixedSchema<{} | null, yup.AnyObject, undefined, "">; declare const teamClientReadOnlyMetadataSchema: yup.MixedSchema<{} | null, yup.AnyObject, undefined, "">; declare const teamServerMetadataSchema: yup.MixedSchema<{} | null, yup.AnyObject, undefined, "">; declare const teamCreatedAtMillisSchema: yup.NumberSchema; declare const teamInvitationEmailSchema: yup.StringSchema; declare const teamInvitationCallbackUrlSchema: yup.StringSchema; declare const teamCreatorUserIdSchema: yup.StringSchema; declare const teamMemberDisplayNameSchema: yup.StringSchema; declare const teamMemberProfileImageUrlSchema: yup.StringSchema; declare const contactChannelIdSchema: yup.StringSchema; declare const contactChannelTypeSchema: yup.StringSchema<"email" | undefined, yup.AnyObject, undefined, "">; declare const contactChannelValueSchema: yup.StringSchema; declare const contactChannelUsedForAuthSchema: yup.BooleanSchema; declare const contactChannelIsVerifiedSchema: yup.BooleanSchema; declare const contactChannelIsPrimarySchema: yup.BooleanSchema; declare const basicAuthorizationHeaderSchema: yup.StringSchema; declare const neonAuthorizationHeaderSchema: yup.StringSchema; declare function yupDefinedWhen(schema: S, triggers: Record): S; declare function yupDefinedAndNonEmptyWhen(schema: S, triggers: Record): S; export { ReplaceFieldWithOwnUserId, StackAdaptSentinel, accessTokenResponseSchema, adaptSchema, adminAuthTypeSchema, base64Schema, basicAuthorizationHeaderSchema, clientOrHigherAuthTypeSchema, contactChannelIdSchema, contactChannelIsPrimarySchema, contactChannelIsVerifiedSchema, contactChannelTypeSchema, contactChannelUsedForAuthSchema, contactChannelValueSchema, containedPermissionIdsSchema, customPermissionDefinitionIdSchema, emailHostSchema, emailOtpSignInCallbackUrlSchema, emailPasswordSchema, emailPortSchema, emailSchema, emailSenderEmailSchema, emailSenderNameSchema, emailTypeSchema, emailUsernameSchema, emailVerificationCallbackUrlSchema, ensureObjectSchema, handlerPathSchema, jsonSchema, jsonStringOrEmptySchema, jsonStringSchema, neonAuthorizationHeaderSchema, oauthAccountMergeStrategySchema, oauthClientIdSchema, oauthClientSecretSchema, oauthEnabledSchema, oauthFacebookConfigIdSchema, oauthIdSchema, oauthMicrosoftTenantIdSchema, oauthTypeSchema, passwordSchema, permissionDefinitionIdSchema, primaryEmailAuthEnabledSchema, primaryEmailSchema, primaryEmailVerifiedSchema, profileImageUrlSchema, projectAllowLocalhostSchema, projectBranchIdSchema, projectClientTeamCreationEnabledSchema, projectClientUserDeletionEnabledSchema, projectConfigIdSchema, projectCreateTeamOnSignUpSchema, projectCreatedAtMillisSchema, projectCredentialEnabledSchema, projectDescriptionSchema, projectDisplayNameSchema, projectIdSchema, projectIsProductionModeSchema, projectMagicLinkEnabledSchema, projectPasskeyEnabledSchema, projectSignUpEnabledSchema, projectUserCountSchema, refreshTokenResponseSchema, selectedTeamIdSchema, serverOrHigherAuthTypeSchema, signInEmailSchema, signInResponseSchema, signedUpAtMillisSchema, strictEmailSchema, teamClientMetadataSchema, teamClientReadOnlyMetadataSchema, teamCreatedAtMillisSchema, teamCreatorUserIdSchema, teamDisplayNameSchema, teamIdSchema, teamInvitationCallbackUrlSchema, teamInvitationEmailSchema, teamMemberDisplayNameSchema, teamMemberProfileImageUrlSchema, teamPermissionDescriptionSchema, teamProfileImageUrlSchema, teamServerMetadataSchema, teamSystemPermissions, urlSchema, userClientMetadataSchema, userClientReadOnlyMetadataSchema, userDisplayNameSchema, userHasPasswordSchema, userIdOrMeSchema, userIdSchema, userLastActiveAtMillisSchema, userOAuthProviderSchema, userOtpAuthEnabledMutationSchema, userOtpAuthEnabledSchema, userPasskeyAuthEnabledSchema, userPasswordHashMutationSchema, userPasswordMutationSchema, userServerMetadataSchema, userTotpSecretMutationSchema, yupArray, yupBoolean, yupDate, yupDefinedAndNonEmptyWhen, yupDefinedWhen, yupMixed, yupNever, yupNumber, yupObject, yupRecord, yupString, yupTuple, yupUnion, yupValidate };