import * as S from "effect/Schema"; import type { Simplify } from "effect/Types"; import { type WithDefaults } from "./ext.js"; import { type B } from "./schema.js"; import type { NonEmptyString255Brand, NonEmptyStringBrand } from "./strings.js"; /** * A string that is at least 1 character long and a maximum of 50. */ export interface NonEmptyString50Brand extends Simplify & NonEmptyString64Brand> { } /** * A string that is at least 1 character long and a maximum of 50. */ export type NonEmptyString50 = string & NonEmptyString50Brand; /** * A string that is at least 1 character long and a maximum of 50. */ export declare const NonEmptyString50: WithDefaults> & import("./brand.js").BrandedSchema; /** * A string that is at least 1 character long and a maximum of 64. */ export interface NonEmptyString64Brand extends Simplify & NonEmptyString80Brand> { } /** * A string that is at least 1 character long and a maximum of 64. */ export type NonEmptyString64 = string & NonEmptyString64Brand; /** * A string that is at least 1 character long and a maximum of 64. */ export declare const NonEmptyString64: WithDefaults> & import("./brand.js").BrandedSchema; /** * A string that is at least 1 character long and a maximum of 80. */ export interface NonEmptyString80Brand extends Simplify & NonEmptyString100Brand> { } /** * A string that is at least 1 character long and a maximum of 80. */ export type NonEmptyString80 = string & NonEmptyString80Brand; /** * A string that is at least 1 character long and a maximum of 80. */ export declare const NonEmptyString80: WithDefaults> & import("./brand.js").BrandedSchema; /** * A string that is at least 1 character long and a maximum of 100. */ export interface NonEmptyString100Brand extends Simplify & NonEmptyString255Brand> { } /** * A string that is at least 1 character long and a maximum of 100. */ export type NonEmptyString100 = string & NonEmptyString100Brand; /** * A string that is at least 1 character long and a maximum of 100. */ export declare const NonEmptyString100: WithDefaults> & import("./brand.js").BrandedSchema; /** * A string that is at least 3 character long and a maximum of 255. */ export interface Min3String255Brand extends Simplify & NonEmptyString255Brand> { } /** * A string that is at least 3 character long and a maximum of 255. */ export type Min3String255 = string & Min3String255Brand; /** * A string that is at least 3 character long and a maximum of 255. */ export declare const Min3String255: WithDefaults> & import("./brand.js").BrandedSchema; /** * A string that is at least 6 characters long and a maximum of 50. */ export interface StringIdBrand extends Simplify & NonEmptyString50Brand> { } /** * A string that is at least 6 characters long and a maximum of 50. */ export type StringId = string & StringIdBrand; /** * A string that is at least 6 characters long and a maximum of 50. * * `.withConstructorDefault` => fresh `nanoid()` (construction-only; not * applied during decode — see file-level note). */ export declare const StringId: WithDefaults & { make: (s?: string) => StringId; /** * Construction-only default: fresh `nanoid()`-shaped `StringId`. Applied * only when the field is omitted from `.make(...)` input. NOT applied * during decode — cannot be used to JIT-migrate database fields. See * file-level note. */ withConstructorDefault: S.withConstructorDefault>; }> & import("./brand.js").BrandedSchema & { make: (s?: string) => StringId; /** * Construction-only default: fresh `nanoid()`-shaped `StringId`. Applied * only when the field is omitted from `.make(...)` input. NOT applied * during decode — cannot be used to JIT-migrate database fields. See * file-level note. */ withConstructorDefault: S.withConstructorDefault>; }; /** * Build a `StringId` schema whose values are required to start with a fixed * `prefix` (joined with `separator`, default `-`). * * The returned schema exposes `.withConstructorDefault` that mints a fresh * prefixed id. Construction-only — not applied during decode; see file-level * note. */ export declare function prefixedStringId(): (prefix: Prefix, name: string, separator?: Separator) => WithDefaults & { make: (s?: string) => StringId; /** * Construction-only default: fresh `nanoid()`-shaped `StringId`. Applied * only when the field is omitted from `.make(...)` input. NOT applied * during decode — cannot be used to JIT-migrate database fields. See * file-level note. */ withConstructorDefault: S.withConstructorDefault>; }> & import("./brand.js").BrandedSchema & { make: (s?: string) => StringId; /** * Construction-only default: fresh `nanoid()`-shaped `StringId`. Applied * only when the field is omitted from `.make(...)` input. NOT applied * during decode — cannot be used to JIT-migrate database fields. See * file-level note. */ withConstructorDefault: S.withConstructorDefault>; }>> & S.refine & { make: (s?: string) => StringId; /** * Construction-only default: fresh `nanoid()`-shaped `StringId`. Applied * only when the field is omitted from `.make(...)` input. NOT applied * during decode — cannot be used to JIT-migrate database fields. See * file-level note. */ withConstructorDefault: S.withConstructorDefault>; }> & import("./brand.js").BrandedSchema & { make: (s?: string) => StringId; /** * Construction-only default: fresh `nanoid()`-shaped `StringId`. Applied * only when the field is omitted from `.make(...)` input. NOT applied * during decode — cannot be used to JIT-migrate database fields. See * file-level note. */ withConstructorDefault: S.withConstructorDefault>; }> & PrefixedStringUtils; /** * Build a branded `StringId` schema for the given branded `Id` type. * * Exposes `.withConstructorDefault` that mints a fresh `nanoid()`-shaped id. * Construction-only — not applied during decode; see file-level note. */ export declare const brandedStringId: () => WithDefaults & { /** * Construction-only default: fresh `nanoid()`-shaped id. Applied only * when the field is omitted from `.make(...)` input. NOT applied * during decode — cannot be used to JIT-migrate database fields. See * file-level note. */ withConstructorDefault: S.withConstructorDefault & S.WithoutConstructorDefault>; make: () => Id; } & WithDefaults>> & S.Codec & { /** * Construction-only default: fresh `nanoid()`-shaped id. Applied only * when the field is omitted from `.make(...)` input. NOT applied * during decode — cannot be used to JIT-migrate database fields. See * file-level note. */ withConstructorDefault: S.withConstructorDefault & S.WithoutConstructorDefault>; make: () => Id; } & WithDefaults>; export interface PrefixedStringUtils { readonly make: () => Type; readonly unsafeFrom: (str: string) => Type; prefixSafe: (str: `${Prefix}${Separator}${REST}`) => Type; readonly prefix: Prefix; /** * Construction-only default: fresh prefixed id. Applied only when the * field is omitted from `.make(...)` input. NOT applied during decode — * cannot be used to JIT-migrate database fields. See file-level note. */ readonly withConstructorDefault: S.withConstructorDefault & S.WithoutConstructorDefault>; } export interface UrlBrand extends Simplify & NonEmptyStringBrand> { } export type Url = string & UrlBrand; export declare const Url: WithDefaults> & S.refine; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9yZVN0cmluZ3MuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9TY2hlbWEvbW9yZVN0cmluZ3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBY0EsT0FBTyxLQUFLLENBQUMsTUFBTSxlQUFlLENBQUE7QUFDbEMsT0FBTyxLQUFLLEVBQUUsUUFBUSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBSTVDLE9BQU8sRUFBbUIsS0FBSyxZ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