import * as _supabase_supabase_js from '@supabase/supabase-js'; import { SupabaseClientOptions } from '@supabase/supabase-js'; import { D as DefaultSchema, S as Schema } from './index-xv_pDjEt.js'; import { Connection } from 'lite-supa'; import * as hono_hono_base from 'hono/hono-base'; import { b as PolicyCommand, c as PolicyRole, P as Policy } from './Connection-BsiQMo4A.js'; export { d as AST, e as ASTType, f as AggregateFunction, A as AnyAST, B as BaseAST, g as BodyResult, h as CheckConstraintInfo, i as ColumnDef, j as ColumnDiff, k as ColumnInfo, l as ColumnRef, m as CommentInfo, C as Connection, n as ConnectionContextOptions, o as ConnectionMigrator, p as CustomTypesInfo, D as DataLossError, q as DataLossWarning, r as DeleteAST, s as Dialect, t as DiffResult, E as EmbedDef, u as EmbedTransform, v as ExplainOptions, F as FiltersResult, w as ForeignKeyDiff, x as ForeignKeyInfo, H as HeadersResult, a as IConnectionConfig, y as IndexDiff, z as IndexInfo, G as InsertAST, J as IntrospectOptions, I as IntrospectResult, K as JoinDef, L as JoinMap, M as Meta, N as MigrationError, O as OrderEntry, Q as PlanResult, R as PlanStep, S as PlanStepType, U as PreferToken, W as PrimaryKeyInfo, X as Qb, Y as QbDelete, Z as QbInsert, _ as QbSelect, $ as QbUpdate, a0 as QueryAST, a1 as QueryParamsResult, a2 as RelationNotFoundError, a3 as RouteResult, a4 as RpcAST, a5 as RpcResult, a6 as SchemaDiffResult, a7 as SelectEntry, a8 as SelectResult, a9 as TableDiff, aa as TableInfo, ab as TextSearchValue, T as TransactionOptions, ac as TransformsResult, ad as TranslatorConfig, ae as TriggerInfo, af as UniqueConstraintInfo, ag as UpdateAST, ah as UpsertAST, ai as UpsertResult, V as VarsContext, aj as ViewInfo, ak as Where, al as WhereValue, am as isRef } from './Connection-BsiQMo4A.js'; import * as hono_utils_http_status from 'hono/utils/http-status'; import * as hono_utils_types from 'hono/utils/types'; import * as hono_types from 'hono/types'; import * as hono from 'hono'; import { MiddlewareHandler, Context } from 'hono'; import { Kysely } from 'kysely'; import { ReadableStream as ReadableStream$1 } from 'node:stream/web'; import 'jsonv-ts'; interface UsersTable { id: string; aud: string; role: string; email: string | null; encrypted_password: string | null; phone: string | null; email_confirmed_at: string | null; confirmed_at: string | null; invited_at: string | null; confirmation_token: string | null; confirmation_sent_at: string | null; recovery_token: string | null; recovery_sent_at: string | null; email_change: string | null; email_change_token_new: string | null; email_change_token_current: string | null; email_change_sent_at: string | null; email_change_confirm_status: number; phone_confirmed_at: string | null; phone_change: string | null; phone_change_token: string | null; phone_change_sent_at: string | null; reauthentication_token: string | null; reauthentication_sent_at: string | null; raw_app_meta_data: string | Record; raw_user_meta_data: string | Record; banned_until: string | null; deleted_at: string | null; is_sso_user: boolean; is_anonymous: boolean; last_sign_in_at: string | null; created_at: string; updated_at: string; } interface SessionsTable { id: string; user_id: string; not_after: string | null; refreshed_at: string | null; user_agent: string | null; ip: string | null; tag: string | null; refresh_token_hmac_key: string | null; refresh_token_counter: number | null; scopes: string | null; created_at: string; updated_at: string; aal: string | null; factor_id: string | null; } interface RefreshTokensTable { id: string; token: string; user_id: string; session_id: string | null; revoked: boolean; parent: string | null; created_at: string; updated_at: string; } interface IdentitiesTable { id: string; provider: string; provider_id: string; user_id: string; identity_data: string | Record; email?: string; last_sign_in_at: string | null; created_at: string; updated_at: string; } interface UserResponse { id: string; aud: string; role: string; email: string; phone: string; confirmed_at?: string | null; email_confirmed_at?: string | null; last_sign_in_at?: string | null; app_metadata: Record; user_metadata: Record; identities: IdentityResponse[]; created_at: string; updated_at: string; is_anonymous: boolean; new_email?: string; confirmation_sent_at?: string | null; email_change_sent_at?: string | null; recovery_sent_at?: string | null; } interface SessionResponse { access_token: string; refresh_token: string; token_type: "bearer"; expires_in: number; expires_at: number; user: UserResponse; weak_password?: null; } interface IdentityResponse { identity_id: string; id: string; user_id: string; identity_data: Record; provider: string; last_sign_in_at: string | null; created_at: string; updated_at: string; email?: string; } interface AuthConfig { jwt_secret: string; jwt_expiry?: number; enable_refresh_token_rotation?: boolean; refresh_token_reuse_interval?: number; minimum_password_length?: number; password_required_characters?: string[]; password_requirements?: string; enable_signup?: boolean; sessions?: { timebox?: string; inactivity_timeout?: string; single_per_user?: boolean; }; email?: { enable_signup?: boolean; enable_confirmations?: boolean; double_confirm_changes?: boolean; }; enable_confirmations?: boolean; site_url?: string; } type Dialect$1 = "postgres" | "sqlite"; declare class AuthRepository { private db; private dialect; private schema; constructor(db: Kysely, dialect: Dialect$1); private bool; private table; private insertInto; private update; private deleteFrom; findUserByEmail(email: string): Promise; findUserById(id: string): Promise; findUserByToken(column: string, token: string): Promise; createUser(user: Partial & { id: string; email: string; }): Promise; updateUser(id: string, updates: Partial): Promise; createSession(session: { id: string; user_id: string; aal?: string; }): Promise; findSessionById(id: string): Promise; updateSessionRefreshedAt(id: string, refreshedAt: string): Promise; deleteSession(id: string): Promise; deleteUserSessions(userId: string, exceptSessionId?: string): Promise; deleteRefreshTokensForSession(sessionId: string): Promise; deleteRefreshTokensForUser(userId: string, exceptSessionId?: string): Promise; createRefreshToken(rt: { token: string; user_id: string; session_id: string; parent?: string | null; }): Promise; findRefreshToken(token: string): Promise; findRefreshTokensBySession(sessionId: string): Promise; revokeRefreshToken(id: string): Promise; revokeSessionRefreshTokens(sessionId: string): Promise; revokeRefreshTokensByIds(ids: string[]): Promise; revokeUserRefreshTokens(userId: string): Promise; createIdentity(identity: { id: string; provider: string; provider_id: string; user_id: string; identity_data: Record; last_sign_in_at?: string | null; }): Promise; findIdentitiesByUserId(userId: string): Promise; updateIdentity(id: string, updates: Partial): Promise; createAuditLogEntry(entry: { id: string; payload?: Record; ip_address?: string; }): Promise; parseUserJson(user: UsersTable): UsersTable; } interface Mailer { sendConfirmation(email: string, token: string, otp: string, meta?: MailMeta): Promise; sendRecovery(email: string, token: string, otp: string, meta?: MailMeta): Promise; sendMagicLink(email: string, token: string, otp: string, meta?: MailMeta): Promise; sendEmailChange(email: string, token: string, otp: string, meta?: MailMeta): Promise; sendReauthentication(email: string, otp: string, meta?: MailMeta): Promise; } interface MailMeta { userId?: string; emailActionType?: string; tokenHash?: string; tokenNew?: string; tokenHashNew?: string; redirectTo?: string; } declare class AuthService { repo: AuthRepository; private config; private mailer; private jwtExpiry; private minPasswordLength; private passwordRequiredCharacters; private sessionTimeboxSeconds?; private sessionInactivitySeconds?; constructor(repo: AuthRepository, config: AuthConfig, mailer: Mailer); signUp(email: string | undefined, password: string | undefined, data?: Record): Promise<{ user: UserResponse; session?: SessionResponse; }>; signInWithPassword(email: string | undefined, password: string | undefined): Promise; refreshSession(refreshToken: string | undefined): Promise; private refreshWithRevokedToken; private createRefreshResponse; private assertSessionRefreshable; getUser(userId: string): Promise; updateUser(userId: string, updates: { data?: Record; password?: string; email?: string; }): Promise; signOut(sessionId: string | undefined, scope: string | undefined, userId: string): Promise; signInWithOtp(email: string | undefined, options?: { shouldCreateUser?: boolean; }): Promise; requestMagicLink(email: string | undefined, _security?: Record): Promise; verifyOtp(params: { email?: string; token?: string; token_hash?: string; type: string; }): Promise; recover(email: string | undefined): Promise; resend(type: string, email: string | undefined): Promise; reauthenticate(userId: string): Promise; private createSessionForUser; private assertPasswordStrong; private mapUserToResponse; private mapIdentityToResponse; private findUserByTokenAndType; private otpMatchesStoredTokenHash; private getTokenColumnsForType; private createAuditLog; } type CrossReadableStream = ReadableStream | ReadableStream$1; interface ObjectMetadata { cacheControl: string; contentLength: number; size: number; mimetype: string; lastModified?: Date; eTag: string; contentRange?: string; httpStatusCode?: number; } interface BrowserCacheHeaders { ifModifiedSince?: string; ifNoneMatch?: string; range?: string; } interface ObjectResponse { metadata: ObjectMetadata; httpStatusCode: number; body?: CrossReadableStream | Blob | Buffer; } type StorageAdapterOptions = {}; interface StorageAdapter { driver: Driver; getObject(bucketName: string, key: string, version: string | undefined, headers?: BrowserCacheHeaders): Promise; uploadObject(bucketName: string, key: string, version: string | undefined, body: CrossReadableStream | Buffer | Uint8Array, contentType: string, cacheControl: string): Promise; deleteObject(bucket: string, key: string, version: string | undefined): Promise; deleteObjects(bucket: string, prefixes: string[]): Promise; copyObject(bucket: string, source: string, version: string | undefined, destination: string, destinationVersion: string | undefined): Promise>; headObject(bucket: string, key: string, version: string | undefined): Promise; privateAssetUrl(bucket: string, key: string, version: string | undefined): Promise; } interface TransformOptions { width?: number; height?: number; resize?: "cover" | "contain" | "fill"; format?: "webp" | "png" | "jpeg" | "avif"; quality?: number; } interface TransformResult { body: ReadableStream | Uint8Array; contentType: string; /** Only set when body is a Uint8Array */ contentLength?: number; } interface TransformationAdapterOptions { } interface TransformationAdapter { driver: Driver; /** * Whether this adapter requires the full image buffer upfront. * If false, the service will pass the stream/url through without buffering. * - sharp: true (needs buffer) * - cloudflare: false (transforms via URL subrequest) */ requiresBuffer: boolean; /** * Transform from a buffer. Used when requiresBuffer is true. */ transform(input: Uint8Array, options: TransformOptions): Promise; /** * Transform from a URL or Response. Used when requiresBuffer is false. * Adapters that don't support this should set requiresBuffer=true. */ transformFromUrl?(url: string, options: TransformOptions): Promise; } type Dialect = "postgres" | "sqlite"; interface Bucket { id: string; name: string; owner: string | null; owner_id: string | null; public: boolean; file_size_limit: number | null; allowed_mime_types: string[] | null; created_at: string; updated_at: string; } interface StorageObject { id: string; bucket_id: string; name: string; owner: string | null; owner_id: string | null; metadata: Record; user_metadata: Record; path_tokens: string[]; version: string | null; created_at: string; updated_at: string; last_accessed_at: string; } interface ListObjectsOptions { limit?: number; offset?: number; sortBy?: { column: string; order: "asc" | "desc"; }; search?: string; } declare class StorageRepository { private db; private dialect; private schema; constructor(db: Kysely, dialect: Dialect); private table; private insertInto; private update; private deleteFrom; createBucket(bucket: { id: string; name: string; owner?: string | null; owner_id?: string | null; public?: boolean; file_size_limit?: number | null; allowed_mime_types?: string[]; }): Promise; findBucketById(id: string): Promise; findBucketByName(name: string): Promise; listBuckets(): Promise; updateBucket(id: string, updates: Partial<{ public: boolean; file_size_limit: number | null; allowed_mime_types: string[]; }>): Promise; deleteBucket(id: string): Promise; isBucketEmpty(id: string): Promise; createObject(obj: { id: string; bucket_id: string; name: string; owner?: string | null; owner_id?: string | null; metadata?: Record; user_metadata?: Record; version?: string | null; }): Promise; findObjectById(id: string): Promise; findObjectByPath(bucketId: string, name: string): Promise; listObjects(bucketId: string, prefix?: string, options?: ListObjectsOptions): Promise; updateObject(id: string, updates: Partial<{ name: string; metadata: Record; user_metadata: Record; version: string | null; owner: string | null; owner_id: string | null; }>): Promise; deleteObject(id: string): Promise; deleteObjectsByBucket(bucketId: string): Promise; objectExists(bucketId: string, name: string): Promise; touchObject(id: string): Promise; private parseBucketRow; private parseObjectRow; } interface StorageServiceConfig { jwtSecret: string; fileSizeLimit?: number; buckets?: Record; } interface StorageServiceOptions { autoCreateBuckets?: boolean; } declare class StorageService { private repo; private adapter; private config; private options; private transformationAdapter?; private initialized; constructor(repo: StorageRepository, adapter: StorageAdapter, config: StorageServiceConfig, options?: StorageServiceOptions, transformationAdapter?: TransformationAdapter | undefined); init(): Promise; createBucket(params: { id: string; name: string; public?: boolean; file_size_limit?: number | null; allowed_mime_types?: string[]; owner?: string | null; }): Promise; getBucket(id: string): Promise; listBuckets(): Promise; updateBucket(id: string, updates: { public?: boolean; file_size_limit?: number | null; allowed_mime_types?: string[]; }): Promise; deleteBucket(id: string): Promise; emptyBucket(id: string): Promise; upload(bucketId: string, path: string, body: ReadableStream | Buffer | Uint8Array, options?: { contentType?: string; cacheControl?: string; contentLength?: number; upsert?: boolean; metadata?: Record; owner?: string | null; }): Promise; download(bucketId: string, path: string, options?: { transform?: TransformOptions; }): Promise<{ body: CrossReadableStream | Blob | Buffer | Uint8Array; metadata: ObjectMetadata; }>; update(bucketId: string, path: string, body: ReadableStream | Buffer | Uint8Array, options?: { contentType?: string; cacheControl?: string; contentLength?: number; metadata?: Record; upsert?: boolean; owner?: string | null; }): Promise; remove(bucketId: string, paths: string[]): Promise; list(bucketId: string, prefix?: string, options?: ListObjectsOptions): Promise; move(bucketId: string, fromPath: string, toPath: string): Promise; copy(bucketId: string, fromPath: string, toPath: string): Promise<{ key: string; }>; info(bucketId: string, path: string): Promise; exists(bucketId: string, path: string): Promise; createSignedUrl(bucketId: string, path: string, expiresIn: number): Promise<{ signedUrl: string; }>; createSignedUrls(bucketId: string, paths: string[], expiresIn: number): Promise<{ path: string; signedUrl: string; error: string | null; }[]>; createSignedUploadUrl(bucketId: string, path: string): Promise<{ signedUrl: string; token: string; path: string; }>; verifySignedUrl(token: string): Promise<{ bucket: string; path: string; intent: "download" | "upload"; }>; private signStorageToken; } type HonoContext = { Variables: { app: App; authService: AuthService; storageService: StorageService; userId?: string; sessionId?: string; jwt?: Record; }; }; type MaybePromise = T | Promise; type ServerOptions = { middlewares?: MiddlewareHandler[]; disableStudio?: boolean; disableFallback?: boolean; /** * Test-only PostgREST mode: execute each request in a transaction and roll it back. */ forceRollback?: boolean; }; declare function createServer(app: App, options?: ServerOptions): hono_hono_base.HonoBase; }; }, hono_types.BlankSchema | hono_types.MergeSchemaPath<{ "*": { $options: { input: {}; output: null; outputFormat: "body"; status: 204; }; }; } & { "/signup": { $post: { input: {}; output: { access_token: string; refresh_token: string; token_type: "bearer"; expires_in: number; expires_at: number; user: { id: string; aud: string; role: string; email: string; phone: string; confirmed_at?: string | null | undefined; email_confirmed_at?: string | null | undefined; last_sign_in_at?: string | null | undefined; app_metadata: { [x: string]: hono_utils_types.JSONValue; }; user_metadata: { [x: string]: hono_utils_types.JSONValue; }; identities: { identity_id: string; id: string; user_id: string; identity_data: { [x: string]: hono_utils_types.JSONValue; }; provider: string; last_sign_in_at: string | null; created_at: string; updated_at: string; email?: string | undefined; }[]; created_at: string; updated_at: string; is_anonymous: boolean; new_email?: string | undefined; confirmation_sent_at?: string | null | undefined; email_change_sent_at?: string | null | undefined; recovery_sent_at?: string | null | undefined; }; weak_password?: null | undefined; }; outputFormat: "json"; status: 200; } | { input: {}; output: { id: string; aud: string; role: string; email: string; phone: string; confirmed_at?: string | null | undefined; email_confirmed_at?: string | null | undefined; last_sign_in_at?: string | null | undefined; app_metadata: { [x: string]: hono_utils_types.JSONValue; }; user_metadata: { [x: string]: hono_utils_types.JSONValue; }; identities: { identity_id: string; id: string; user_id: string; identity_data: { [x: string]: hono_utils_types.JSONValue; }; provider: string; last_sign_in_at: string | null; created_at: string; updated_at: string; email?: string | undefined; }[]; created_at: string; updated_at: string; is_anonymous: boolean; new_email?: string | undefined; confirmation_sent_at?: string | null | undefined; email_change_sent_at?: string | null | undefined; recovery_sent_at?: string | null | undefined; }; outputFormat: "json"; status: 200; }; }; } & { "/signup": { $all: { input: {}; output: {}; outputFormat: string; status: hono_utils_http_status.StatusCode; }; }; } & { "/token": { $post: { input: {}; output: { access_token: string; refresh_token: string; token_type: "bearer"; expires_in: number; expires_at: number; user: { id: string; aud: string; role: string; email: string; phone: string; confirmed_at?: string | null | undefined; email_confirmed_at?: string | null | undefined; last_sign_in_at?: string | null | undefined; app_metadata: { [x: string]: hono_utils_types.JSONValue; }; user_metadata: { [x: string]: hono_utils_types.JSONValue; }; identities: { identity_id: string; id: string; user_id: string; identity_data: { [x: string]: hono_utils_types.JSONValue; }; provider: string; last_sign_in_at: string | null; created_at: string; updated_at: string; email?: string | undefined; }[]; created_at: string; updated_at: string; is_anonymous: boolean; new_email?: string | undefined; confirmation_sent_at?: string | null | undefined; email_change_sent_at?: string | null | undefined; recovery_sent_at?: string | null | undefined; }; weak_password?: null | undefined; }; outputFormat: "json"; status: 200; }; }; } & { "/token": { $all: { input: {}; output: {}; outputFormat: string; status: hono_utils_http_status.StatusCode; }; }; } & { "/otp": { $post: { input: {}; output: {}; outputFormat: "json"; status: 200; }; }; } & { "/magiclink": { $post: { input: {}; output: {}; outputFormat: "json"; status: 200; }; }; } & { "/magiclink": { $all: { input: {}; output: {}; outputFormat: string; status: hono_utils_http_status.StatusCode; }; }; } & { "/verify": { $post: { input: {}; output: { access_token: string; refresh_token: string; token_type: "bearer"; expires_in: number; expires_at: number; user: { id: string; aud: string; role: string; email: string; phone: string; confirmed_at?: string | null | undefined; email_confirmed_at?: string | null | undefined; last_sign_in_at?: string | null | undefined; app_metadata: { [x: string]: hono_utils_types.JSONValue; }; user_metadata: { [x: string]: hono_utils_types.JSONValue; }; identities: { identity_id: string; id: string; user_id: string; identity_data: { [x: string]: hono_utils_types.JSONValue; }; provider: string; last_sign_in_at: string | null; created_at: string; updated_at: string; email?: string | undefined; }[]; created_at: string; updated_at: string; is_anonymous: boolean; new_email?: string | undefined; confirmation_sent_at?: string | null | undefined; email_change_sent_at?: string | null | undefined; recovery_sent_at?: string | null | undefined; }; weak_password?: null | undefined; }; outputFormat: "json"; status: 200; }; }; } & { "/recover": { $post: { input: {}; output: {}; outputFormat: "json"; status: 200; }; }; } & { "/resend": { $post: { input: {}; output: {}; outputFormat: "json"; status: 200; }; }; } & { "/health": { $get: { input: {}; output: { version: string; name: string; description: string; }; outputFormat: "json"; status: 200; }; }; } & { "/health": { $all: { input: {}; output: {}; outputFormat: string; status: hono_utils_http_status.StatusCode; }; }; } & { "/settings": { $get: { input: {}; output: { external: { anonymous_users: boolean; apple: boolean; azure: boolean; bitbucket: boolean; discord: boolean; facebook: boolean; snapchat: boolean; figma: boolean; fly: boolean; github: boolean; gitlab: boolean; google: boolean; keycloak: boolean; kakao: boolean; linkedin: boolean; linkedin_oidc: boolean; notion: boolean; spotify: boolean; slack: boolean; slack_oidc: boolean; workos: boolean; twitch: boolean; twitter: boolean; email: boolean; phone: boolean; zoom: boolean; }; disable_signup: boolean; mailer_autoconfirm: boolean; phone_autoconfirm: boolean; sms_provider: string; saml_enabled: boolean; }; outputFormat: "json"; status: 200; }; }; } & { "/settings": { $all: { input: {}; output: {}; outputFormat: string; status: hono_utils_http_status.StatusCode; }; }; } & { "/.well-known/jwks.json": { $get: { input: {}; output: never; outputFormat: "json"; status: 200; }; }; } & { "/.well-known/openid-configuration": { $get: { input: {}; output: { issuer: string; jwks_uri: string; }; outputFormat: "json"; status: 200; }; }; } & { "/nonexistent": { $all: { input: {}; output: {}; outputFormat: string; status: hono_utils_http_status.StatusCode; }; }; } & { "/logout": { $post: { input: {}; output: null; outputFormat: "body"; status: 204; }; }; } & { "/user": { $get: { input: {}; output: { id: string; aud: string; role: string; email: string; phone: string; confirmed_at?: string | null | undefined; email_confirmed_at?: string | null | undefined; last_sign_in_at?: string | null | undefined; app_metadata: { [x: string]: hono_utils_types.JSONValue; }; user_metadata: { [x: string]: hono_utils_types.JSONValue; }; identities: { identity_id: string; id: string; user_id: string; identity_data: { [x: string]: hono_utils_types.JSONValue; }; provider: string; last_sign_in_at: string | null; created_at: string; updated_at: string; email?: string | undefined; }[]; created_at: string; updated_at: string; is_anonymous: boolean; new_email?: string | undefined; confirmation_sent_at?: string | null | undefined; email_change_sent_at?: string | null | undefined; recovery_sent_at?: string | null | undefined; }; outputFormat: "json"; status: 200; }; }; } & { "/user": { $put: { input: {}; output: { id: string; aud: string; role: string; email: string; phone: string; confirmed_at?: string | null | undefined; email_confirmed_at?: string | null | undefined; last_sign_in_at?: string | null | undefined; app_metadata: { [x: string]: hono_utils_types.JSONValue; }; user_metadata: { [x: string]: hono_utils_types.JSONValue; }; identities: { identity_id: string; id: string; user_id: string; identity_data: { [x: string]: hono_utils_types.JSONValue; }; provider: string; last_sign_in_at: string | null; created_at: string; updated_at: string; email?: string | undefined; }[]; created_at: string; updated_at: string; is_anonymous: boolean; new_email?: string | undefined; confirmation_sent_at?: string | null | undefined; email_change_sent_at?: string | null | undefined; recovery_sent_at?: string | null | undefined; }; outputFormat: "json"; status: 200; }; }; } & { "/user": { $all: { input: {}; output: {}; outputFormat: string; status: hono_utils_http_status.StatusCode; }; }; } & { "/reauthenticate": { $get: { input: {}; output: {}; outputFormat: "json"; status: 200; }; }; } & { "/reauthenticate": { $all: { input: {}; output: {}; outputFormat: string; status: hono_utils_http_status.StatusCode; }; }; }, "/auth/v1"> | hono_types.MergeSchemaPath<{ "/:relation": { $all: { input: { param: { relation: string; }; }; output: {}; outputFormat: string; status: hono_utils_http_status.StatusCode; }; }; } & { "*": { $all: { input: {}; output: {}; outputFormat: string; status: hono_utils_http_status.StatusCode; }; }; }, "/rest/v1"> | hono_types.MergeSchemaPath | hono_types.MergeSchemaPath<{ "/bucket": { $post: { input: { json: { [x: string]: unknown; public?: boolean | undefined; file_size_limit?: number | undefined; allowed_mime_types?: string[] | undefined; id: string; name: string; }; }; output: { name: string; }; outputFormat: "json"; status: 200; }; }; } & { "/bucket": { $get: { input: {}; output: { id: string; name: string; owner: string | null; owner_id: string | null; public: boolean; file_size_limit: number | null; allowed_mime_types: string[] | null; created_at: string; updated_at: string; }[]; outputFormat: "json"; status: 200; }; }; } & { "/bucket/:id": { $get: { input: { param: { id: string; }; }; output: { id: string; name: string; owner: string | null; owner_id: string | null; public: boolean; file_size_limit: number | null; allowed_mime_types: string[] | null; created_at: string; updated_at: string; }; outputFormat: "json"; status: 200; }; }; } & { "/bucket/:id": { $put: { input: { json: { [x: string]: unknown; public?: boolean | undefined; file_size_limit?: number | undefined; allowed_mime_types?: string[] | undefined; }; } & { param: { id: string; }; }; output: { message: string; }; outputFormat: "json"; status: 200; }; }; } & { "/bucket/:id": { $delete: { input: { param: { id: string; }; }; output: { message: string; }; outputFormat: "json"; status: 200; }; }; } & { "/bucket/:id/empty": { $post: { input: { param: { id: string; }; }; output: { message: string; }; outputFormat: "json"; status: 200; }; }; } & { "/object/list/:bucketId": { $post: { input: { json: { [x: string]: unknown; search?: string | undefined; sortBy?: { [x: string]: unknown; column: string; order: string; } | undefined; limit?: number | undefined; offset?: number | undefined; prefix?: string | undefined; }; } & { param: { bucketId: string; }; }; output: { id: string; bucket_id: string; name: string; owner: string | null; owner_id: string | null; metadata: { [x: string]: hono_utils_types.JSONValue; }; user_metadata: { [x: string]: hono_utils_types.JSONValue; }; path_tokens: string[]; version: string | null; created_at: string; updated_at: string; last_accessed_at: string; }[]; outputFormat: "json"; status: 200; }; }; } & { "/object/move": { $post: { input: { json: { [x: string]: unknown; bucketId: string; sourceKey: string; destinationKey: string; }; }; output: { message: string; }; outputFormat: "json"; status: 200; }; }; } & { "/object/copy": { $post: { input: { json: { [x: string]: unknown; bucketId: string; sourceKey: string; destinationKey: string; }; }; output: { key: string; }; outputFormat: "json"; status: 200; }; }; } & { "/object/info/:bucketId/*": { $get: { input: { param: { bucketId: string; }; }; output: { id: string; bucket_id: string; name: string; owner: string | null; owner_id: string | null; metadata: { [x: string]: hono_utils_types.JSONValue; }; user_metadata: { [x: string]: hono_utils_types.JSONValue; }; path_tokens: string[]; version: string | null; created_at: string; updated_at: string; last_accessed_at: string; httpMetadata: { cacheControl: string; contentLength: number; size: number; mimetype: string; lastModified?: string | undefined; eTag: string; contentRange?: string | undefined; httpStatusCode?: number | undefined; }; }; outputFormat: "json"; status: 200; }; }; } & { "/object/sign/:bucketId/*": { $post: { input: { json: { [x: string]: unknown; expiresIn: number; }; } & { param: { bucketId: string; }; }; output: { signedUrl: string; }; outputFormat: "json"; status: 200; }; }; } & { "/object/sign/:bucketId": { $post: { input: { json: { [x: string]: unknown; expiresIn: number; paths: string[]; }; } & { param: { bucketId: string; }; }; output: { path: string; signedUrl: string; error: string | null; }[]; outputFormat: "json"; status: 200; }; }; } & { "/object/upload/sign/:bucketId/*": { $post: { input: { param: { bucketId: string; }; }; output: { signedUrl: string; token: string; path: string; }; outputFormat: "json"; status: 200; }; }; } & { "/object/:bucketId": { $delete: { input: { json: { [x: string]: unknown; prefixes: string[]; }; } & { param: { bucketId: string; }; }; output: { id: string; bucket_id: string; name: string; owner: string | null; owner_id: string | null; metadata: { [x: string]: hono_utils_types.JSONValue; }; user_metadata: { [x: string]: hono_utils_types.JSONValue; }; path_tokens: string[]; version: string | null; created_at: string; updated_at: string; last_accessed_at: string; }[]; outputFormat: "json"; status: 200; }; }; } & { "/object/:bucketId/*": { $post: { input: { param: { bucketId: string; }; }; output: { Key: string; Id: string; }; outputFormat: "json"; status: 200; }; }; } & { "/object/:bucketId/*": { $put: { input: { param: { bucketId: string; }; }; output: { Key: string; Id: string; }; outputFormat: "json"; status: 200; }; }; } & { "/object/:bucketId/*": { $get: { input: { param: { bucketId: string; }; }; output: {}; outputFormat: string; status: hono_utils_http_status.StatusCode; }; }; } & { "/object/:bucketId/*": { $head: { input: { param: { bucketId: string; }; }; output: null; outputFormat: "body"; status: 200; } | { input: { param: { bucketId: string; }; }; output: null; outputFormat: "body"; status: 404; }; }; }, "/">, "/storage/v1"> | hono_types.MergeSchemaPath<{ "/ping": { $get: { input: {}; output: { message: string; }; outputFormat: "json"; status: hono_utils_http_status.ContentfulStatusCode; }; }; } & { "/config": { $get: { input: {}; output: { analytics?: { enabled?: boolean | undefined; port?: number | undefined; vector_port?: number | undefined; backend?: "postgres" | "bigquery" | undefined; } | undefined; api?: { enabled?: boolean | undefined; port?: number | undefined; schemas?: string[] | undefined; extra_search_path?: string[] | undefined; max_rows?: number | undefined; pg_safe_update?: boolean | undefined; plan_enabled?: boolean | undefined; aggregates_enabled?: boolean | undefined; limited_mutations_enabled?: boolean | undefined; anonymous_enabled?: boolean | undefined; external_url?: string | undefined; tls?: { enabled?: boolean | undefined; } | undefined; } | undefined; storage?: { enabled?: boolean | undefined; file_size_limit?: string | undefined; buckets?: { [x: string]: { public?: boolean | undefined; file_size_limit?: string | undefined; allowed_mime_types?: string[] | undefined; objects_path?: string | undefined; }; } | undefined; image_transformation?: { enabled?: boolean | undefined; } | undefined; } | undefined; auth?: { enabled?: boolean | undefined; enable_signup?: boolean | undefined; jwt_secret?: string | undefined; site_url?: string | undefined; additional_redirect_urls?: string[] | undefined; jwt_expiry?: number | undefined; enable_refresh_token_rotation?: boolean | undefined; refresh_token_reuse_interval?: number | undefined; enable_manual_linking?: boolean | undefined; enable_anonymous_sign_ins?: boolean | undefined; minimum_password_length?: number | undefined; password_requirements?: string | undefined; hook?: { mfa_verification_attempt?: { enabled?: boolean | undefined; uri?: string | undefined; secrets?: string[] | undefined; } | undefined; password_verification_attempt?: { enabled?: boolean | undefined; uri?: string | undefined; secrets?: string[] | undefined; } | undefined; custom_access_token?: { enabled?: boolean | undefined; uri?: string | undefined; secrets?: string[] | undefined; } | undefined; send_sms?: { enabled?: boolean | undefined; uri?: string | undefined; secrets?: string[] | undefined; } | undefined; send_email?: { enabled?: boolean | undefined; uri?: string | undefined; secrets?: string[] | undefined; } | undefined; } | undefined; mfa?: { max_enrolled_factors?: number | undefined; totp?: { enroll_enabled?: boolean | undefined; verify_enabled?: boolean | undefined; } | undefined; phone?: { template?: string | undefined; max_frequency?: string | undefined; otp_length?: number | undefined; enroll_enabled?: boolean | undefined; verify_enabled?: boolean | undefined; } | undefined; } | undefined; sessions?: { timebox?: string | undefined; inactivity_timeout?: string | undefined; single_per_user?: boolean | undefined; } | undefined; email?: { template?: { invite?: { subject?: string | undefined; content_path?: string | undefined; } | undefined; confirmation?: { subject?: string | undefined; content_path?: string | undefined; } | undefined; recovery?: { subject?: string | undefined; content_path?: string | undefined; } | undefined; magic_link?: { subject?: string | undefined; content_path?: string | undefined; } | undefined; email_change?: { subject?: string | undefined; content_path?: string | undefined; } | undefined; } | undefined; enable_signup?: boolean | undefined; double_confirm_changes?: boolean | undefined; enable_confirmations?: boolean | undefined; secure_password_change?: boolean | undefined; max_frequency?: string | undefined; otp_length?: number | undefined; otp_expiry?: number | undefined; smtp?: { port?: number | undefined; host?: string | undefined; user?: string | undefined; pass?: string | undefined; admin_email?: string | undefined; sender_name?: string | undefined; } | undefined; } | undefined; sms?: { template?: string | undefined; enable_signup?: boolean | undefined; enable_confirmations?: boolean | undefined; max_frequency?: string | undefined; test_otp?: { [x: string]: string; } | undefined; twilio?: { enabled?: boolean | undefined; account_sid?: string | undefined; message_service_sid?: string | undefined; auth_token?: string | undefined; } | undefined; twilio_verify?: { enabled?: boolean | undefined; account_sid?: string | undefined; message_service_sid?: string | undefined; auth_token?: string | undefined; } | undefined; messagebird?: { enabled?: boolean | undefined; originator?: string | undefined; api_key?: string | undefined; } | undefined; textlocal?: { enabled?: boolean | undefined; api_key?: string | undefined; sender?: string | undefined; } | undefined; vonage?: { enabled?: boolean | undefined; api_key?: string | undefined; from?: string | undefined; api_secret?: string | undefined; } | undefined; } | undefined; external?: { apple?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; azure?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; bitbucket?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; discord?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; facebook?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; github?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; gitlab?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; google?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; kakao?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; keycloak?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; linkedin?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; notion?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; twitch?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; twitter?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; slack?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; spotify?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; workos?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; zoom?: { enabled?: boolean | undefined; client_id?: string | undefined; secret?: string | undefined; url?: string | undefined; redirect_uri?: string | undefined; skip_nonce_check?: boolean | undefined; } | undefined; } | undefined; } | undefined; inbucket?: { enabled?: boolean | undefined; port?: number | undefined; smtp_port?: number | undefined; pop3_port?: number | undefined; } | undefined; experimental?: { orioledb_version?: string | undefined; s3_host?: string | undefined; s3_region?: string | undefined; s3_access_key?: string | undefined; s3_secret_key?: string | undefined; } | undefined; functions?: { [x: string]: { enabled?: boolean | undefined; verify_jwt?: boolean | undefined; import_map?: string | undefined; entrypoint?: string | undefined; }; } | undefined; realtime?: { enabled?: boolean | undefined; ip_version?: string | undefined; max_header_length?: number | undefined; } | undefined; studio?: { enabled?: boolean | undefined; port?: number | undefined; api_url?: string | undefined; openai_api_key?: string | undefined; } | undefined; project_id?: string | undefined; db?: { [x: string]: hono_utils_types.JSONValue; port?: number | undefined; url?: string | undefined; driver?: "postgres" | "sqlite" | "sqlite-postgres" | "pglite" | undefined; shadow_port?: number | undefined; major_version?: number | undefined; pooler?: { [x: string]: hono_utils_types.JSONValue; enabled?: boolean | undefined; port?: number | undefined; pool_mode?: string | undefined; default_pool_size?: number | undefined; max_client_conn?: number | undefined; } | undefined; seed?: { enabled?: boolean | undefined; sql_paths?: string[] | undefined; } | undefined; migrations?: { enabled?: boolean | undefined; schema_paths?: string[] | undefined; } | undefined; } | undefined; edge_runtime?: { enabled?: boolean | undefined; policy?: "oneshot" | "per_worker" | undefined; inspector_port?: number | undefined; } | undefined; options?: { defaults?: true | undefined; server?: { middlewares?: never[] | undefined; disableStudio?: boolean | undefined; disableFallback?: boolean | undefined; forceRollback?: boolean | undefined; } | undefined; } | undefined; rls?: { tables: string[]; policies: { name: string; table: string; schema?: string | undefined; command: PolicyCommand; permissive: boolean; roles: PolicyRole[]; using?: { [x: string]: hono_utils_types.JSONValue; } | undefined; withCheck?: { [x: string]: hono_utils_types.JSONValue; } | undefined; }[]; } | undefined; }; outputFormat: "json"; status: hono_utils_http_status.ContentfulStatusCode; }; }; } & { "/info": { $get: { input: {}; output: {}; outputFormat: "json"; status: hono_utils_http_status.ContentfulStatusCode; }; }; } & { "/introspect": { $get: { input: {}; output: { tables: { name: string; sql: string; schema: string; type: "table" | "view"; rows: number; engine: string; collation: string; }[]; columns: { table: string; name: string; type: string; nullable: boolean; default_value: string | null; is_primary_key: boolean; schema: string; ordinal_position: number; collation: string; character_maximum_length: string | null; precision: { precision: number | null; scale: number | null; } | null; is_identity: boolean; pg_type?: string | undefined; is_generated?: boolean | undefined; }[]; indexes: { table: string; name: string; unique: boolean; columns: string[]; schema: string; }[]; foreign_keys: { table: string; column: string; ref_table: string; ref_column: string; on_update: string; on_delete: string; schema: string; ref_schema?: string | undefined; foreign_key_name: string; fk_def: string; is_visible?: boolean | undefined; }[]; primary_keys: { table: string; columns: string[]; schema: string; field_count: number; }[]; views: { name: string; sql: string; schema: string; }[]; check_constraints: { schema: string; table: string; expression: string; name?: string | undefined; column?: string | undefined; }[]; unique_constraints: { schema: string; table: string; name: string; columns: string[]; }[]; comments: { schema: string; table: string; column?: string | undefined; text: string; }[]; custom_types: { schema: string; type: string; kind: "enum" | "composite"; values?: string[] | undefined; fields?: { name: string; type: string; }[] | undefined; }[]; triggers: { table: string; name: string; sql: string; schema: string; }[]; database_name: string; version: string; ddl_dialect?: "postgres" | "sqlite" | undefined; schema_separator?: string | undefined; }; outputFormat: "json"; status: hono_utils_http_status.ContentfulStatusCode; }; }; }, "/_system">, "/", "*">; interface IAppConfig extends DefaultSchema { connection: Connection | Promise; rls?: { tables: string[]; policies: Policy[]; }; options?: { /** * Disable default config values from being applied. */ defaults?: boolean; server?: ServerOptions; }; } interface DefaultAppConfig extends IAppConfig { connection: Connection; options?: { defaults?: true; server?: ServerOptions; }; } declare class App ? Awaited : Connection : never> { #private; private readonly _connection; private readonly _rls; readonly config: DefaultSchema & Omit; readonly server: ReturnType; _mailer?: Mailer; _storageAdapter?: StorageAdapter; _transformationAdapter?: TransformationAdapter; constructor({ connection, options, rls, ...config }: Config); get connection(): Conn; /** * Initialize the app. This is called automatically on first request. */ init(): Promise; isValidConfig(config: Schema | DefaultSchema | IAppConfig): boolean; getClient(options?: SupabaseClientOptions): _supabase_supabase_js.SupabaseClient[SchemaName] extends { Tables: Record; Insert: Record; Update: Record; Relationships: { foreignKeyName: string; columns: string[]; isOneToOne?: boolean; referencedRelation: string; referencedColumns: string[]; }[]; }>; Views: Record; Insert: Record; Update: Record; Relationships: { foreignKeyName: string; columns: string[]; isOneToOne?: boolean; referencedRelation: string; referencedColumns: string[]; }[]; } | { Row: Record; Relationships: { foreignKeyName: string; columns: string[]; isOneToOne?: boolean; referencedRelation: string; referencedColumns: string[]; }[]; }>; Functions: Record | never; Returns: unknown; SetofOptions?: { isSetofReturn?: boolean | undefined; isOneToOne?: boolean | undefined; isNotNullable?: boolean | undefined; to: string; from: string; }; }>; } ? Omit[SchemaName] : never, any>; isLocalRequest(request: Request): boolean; fetch: (request: Request) => Promise; getInfoJson(): { connection: object; config: Config; }; } declare class UnableToCreateRuntimeConnection extends Error { name: string; constructor(message: string); } declare class InvalidPostgresToSQLiteTranslation extends Error { readonly pgSql: string; readonly sqliteDdl: string; readonly cause: Error | unknown; name: string; constructor(pgSql: string, sqliteDdl: string, cause: Error | unknown); } type Primitive = string | number | boolean; declare function isPrimitive(value: any): value is Primitive; type BooleanLike = boolean | 0 | 1; declare function isBooleanLike(value: any): value is boolean; declare function isString(value: any): value is string; declare function pipe(...fns: ((a: Arg) => Arg)[]): (arg: Arg) => Arg; declare function pipeEach(...fns: ((a: Arg) => Arg)[]): (args: Arg[]) => Arg[]; declare function isPlainObject(value: unknown): value is Record; declare function isObject(value: unknown): value is Record; declare function objectDiff(obj1: Record, obj2: Record): Record; declare function getPath(object: object, _path: string | (string | number)[], defaultValue?: any): any; declare function setPath(object: object, _path: string | (string | number)[], value: any): object; declare function pick(obj: T, keys: K[]): Pick; declare function omit(obj: T, keys_: readonly K[] | K[] | string[]): Omit>; /** * Lodash's merge implementation caused issues in Next.js environments * From: https://thescottyjam.github.io/snap.js/#!/nolodash/merge * NOTE: This mutates `object`. It also may mutate anything that gets attached to `object` during the merge. * @param object * @param sources */ declare function mergeObject(object: object, ...sources: object[]): object; /** * Lodash's mergeWith implementation caused issues in Next.js environments * From: https://thescottyjam.github.io/snap.js/#!/nolodash/mergeWith * NOTE: This mutates `object`. It also may mutate anything that gets attached to `object` during the merge. * @param object * @param sources * @param customizer */ declare function mergeObjectWith(object: object, source: object, customizer: any): object; declare function isEqual(value1: any, value2: any): boolean; declare function jsonStringify(...args: Parameters): string; declare function params(reqOrSearchParams: Request | URLSearchParams): Record; declare function filterSearchParams(reqOrSearchParams: Request | URLSearchParams, predicate: (key: string, value: string) => boolean): Record; declare function isNode(): boolean; declare function isBun(): boolean; declare function invariant(condition: boolean | any, message: string): void; declare function threw(fn: () => any, instance?: new (...args: any[]) => Error): boolean; declare function threwAsync(fn: Promise, instance?: new (...args: any[]) => Error): Promise; declare function trySync(fn: () => A, fallback?: F): A | F; declare function measureTime(fn: () => MaybePromise, callback: (time: number) => void): Promise; declare const ensureVar: { Map: (value: unknown) => Map; Set: (value: unknown) => Set; Array: (value: unknown) => any[]; }; declare function cleanSql(sql: string, opts?: { comments?: string; }): string; declare function getStatementsArray(sql: string, clean?: boolean): string[]; declare function splitSqlStatements(sql: string): string[]; declare function normalizeType(t: string): string; declare function normalizeSql(sql: string): string; declare function normalizeDefault(d: string | null): string | null; declare function randomString(length?: number, opts?: { uppercase?: boolean; numbers?: boolean; special?: boolean; }): string; declare function isEmail(email: unknown, opts?: { domains?: string[]; panic?: boolean; }): boolean; declare function checkPasswordStrength(password: unknown, { panic, length, numbers, special, }?: { panic?: boolean; length?: number; numbers?: number; special?: number; }): boolean; declare function ucFirst(str: string): string; declare function ucFirstAll(str: string, split?: string): string; /** * Convert a string from snake_case to PascalCase with spaces * Example: `snake_to_pascal` -> `Snake To Pascal` * * @param str */ declare function snakeToPascalWithSpaces(str: string): string; declare function normalizeString(str: string): string; declare function slugify(str: string): string; declare function truncate(str: string, length?: number, end?: string): string; declare function quote(str: string, quoteChar?: string): string; type MatchPattern = RegExp | string; /** * Match a string against a pattern: * - string: uses `String.includes` * - SQL like string: replaces `%` with `.*` and `_` with `.` and uses `new RegExp(pattern)` * - regex string: uses `new RegExp(pattern)` * - regex object: uses `pattern.test` */ declare function patternMatch(target: string, pattern: MatchPattern): boolean; declare function patternMatch(target: string, pattern: MatchPattern, stringHint: "regex" | "sql" | "wildcard"): boolean; /** * Replace placeholders in a string. Mustache `{{var}}` by default * * @param str * @param vars * @param pattern */ declare function replacePlaceholders(str: string, vars: Record, pattern?: RegExp): string; /** * Fuzzy match using cosine similarity on character bigram vectors, * re-scored with normalized Levenshtein distance (matching PostgREST's fuzzyset approach). * Returns the best match above `minScore`, or null. */ declare function fuzzyMatch(input: string, candidates: string[], minScore?: number): string | null; declare function parseBigInt(value: BigInt | number): number; declare function uuid(): string; declare function getAuthSchemaSql(clean?: boolean): string; type HonoContextWithAuth = HonoContext & { Variables: { userId: string; sessionId: string; jwt: Record; }; }; declare const resolveAuth: ({ onError, }?: { onError?: (error: unknown, c: Context) => Response | Promise; }) => hono.MiddlewareHandler; declare const requireAuth: () => hono.MiddlewareHandler; declare function studioRouteHandler(request: Request): Promise; type ExperimentalFeature = "storage" | "cloud"; declare function isExperimentalEnabled(name: ExperimentalFeature): boolean; declare function setExperimental(name: ExperimentalFeature, enabled: boolean): void; declare function listEnabledExperimentals(): ExperimentalFeature[]; export { App, type BooleanLike, type DefaultAppConfig, type ExperimentalFeature, type HonoContext, type IAppConfig, InvalidPostgresToSQLiteTranslation, type MatchPattern, type MaybePromise, type Primitive, Schema, type ServerOptions, UnableToCreateRuntimeConnection, checkPasswordStrength, cleanSql, ensureVar, filterSearchParams, fuzzyMatch, getAuthSchemaSql, getPath, getStatementsArray, invariant, isBooleanLike, isBun, isEmail, isEqual, isExperimentalEnabled, isNode, isObject, isPlainObject, isPrimitive, isString, jsonStringify, listEnabledExperimentals, measureTime, mergeObject, mergeObjectWith, normalizeDefault, normalizeSql, normalizeString, normalizeType, objectDiff, omit, params, parseBigInt, patternMatch, pick, pipe, pipeEach, quote, randomString, replacePlaceholders, requireAuth, resolveAuth, setExperimental, setPath, slugify, snakeToPascalWithSpaces, splitSqlStatements, studioRouteHandler, threw, threwAsync, truncate, trySync, ucFirst, ucFirstAll, uuid };