import type { Context } from "hono"; import { type Schema } from "zod"; export declare function isJson(str: unknown): boolean; /** * Hacky helper in case you want to try parsing a message as json, but want to fall back to its og value */ export declare function tryParseJsonObjectMessage(str: unknown): any; /** * Quick and dirty uuid utility */ export declare function generateUUID(): string; export declare function errorToJson(error: Error): { name: string; message: string; stack: string; }; export declare function shouldIgnoreFile(filename: string | null, ignoredPaths: string[]): boolean; export declare function getIgnoredPaths(): string[]; export declare function safeParseJson(str: string | null | undefined): any; export declare function fallback, U>(schema: T, valueOrFn: U | (() => U)): T | Schema; export declare function safeReadTextBody(response: Response): Promise; export type SerializedFile = { name: string; type: string; size: number; }; /** * Helper that serializes the request body into a format that can be stored in the database * * This will *not* store binary data, for example, like File objects */ export declare function serializeRequestBodyForFpxDb(ctx: Context): Promise; export declare function resolveUrlQueryParams(url: string, queryParams?: Record | null): string; /** * Simple utility function to resolve the Webhonc service URL with default values * * Note: it will always return just the host, a string without the protocol, path * or port, e.g. webhonc.mies.workers.dev */ export declare function resolveWebhoncUrl(): string;