declare const typeIdBrand: unique symbol; /** A branded TypeID string. `TypeId<'post'>` is incompatible with `TypeId<'user'>`. */ export type TypeId
= string & { readonly [typeIdBrand]?: P; }; /** Encode a 16-byte UUID into the 26-character base32 suffix. */ export declare function encode(bytes: Uint8Array): string; /** Decode a 26-character base32 suffix back into the original 16 UUID bytes. */ export declare function decode(suffix: string): Uint8Array; /** Whether a string is a valid, non-empty TypeID prefix. */ export declare function isValidPrefix(prefix: string): boolean; /** Generate a new, branded TypeID for the given prefix. */ export declare function generate
(prefix: P): TypeId
; /** * Parse a TypeID into its parts and the decoded UUID. Throws if the id is * malformed or — when `expectedPrefix` is given — if the prefix does not match. */ export declare function parse
(id: string, expectedPrefix?: P): { prefix: string; suffix: string; uuid: string; }; /** * Escape hatch: validate a raw string against a prefix and brand it as a TypeID. * Use at trust boundaries (e.g. a raw URL param) where the string isn't yet typed. */ export declare function asTypeId
(prefix: P, raw: string): TypeId
; /** * Drizzle column builder for a branded TypeID text value. Stores a plain `text` * column so drizzle-kit migrations and `$inferSelect` work unchanged. * * Use Drizzle's `$defaultFn` when a column should generate IDs on insert: * * id: typeid('post').primaryKey().$defaultFn(() => generate('post')) */ export declare function typeid
(prefix: P): import("drizzle-orm/sqlite-core").SQLiteCustomColumnBuilder<{ name: ""; dataType: "custom"; columnType: "SQLiteCustomColumn"; data: TypeId
; driverParam: string; enumValues: undefined; }>; export {}; //# sourceMappingURL=typeid.d.ts.map