import { LazyArg } from "@effect-ts-app/core/Function"; import { Opt } from "@effect-ts-app/core/Option"; import { ROSet, Ord, Equal } from "@effect-ts-app/core/Prelude"; import * as NonEmptySet from "@effect-ts-app/core/NonEmptySet"; import type { ComputeFlat } from "@effect-ts/core/Utils"; import type { None, Some } from "@fp-ts/data/Option"; import type { FromProperty } from "./_api.js"; import * as MO from "./_schema.js"; import type { Property, UUID } from "./_schema.js"; import * as Eq from "@effect-ts/core/Equal"; export declare function partialConstructor(model: { new (inp: ConstructorInput): ParsedShape; }): >(partConstructor: PartialConstructorInput) => (restConstructor: ComputeFlat>) => ParsedShape; export declare function partialConstructor_>(model: { new (inp: ConstructorInput): ParsedShape; }, partConstructor: PartialConstructorInput): (restConstructor: ComputeFlat>) => ParsedShape; export declare function partialConstructorF(constr: (inp: ConstructorInput) => ParsedShape): >(partConstructor: PartialConstructorInput) => (restConstructor: ComputeFlat>) => ParsedShape; export declare function partialConstructorF_>(constr: (inp: ConstructorInput) => ParsedShape, partConstructor: PartialConstructorInput): (restConstructor: ComputeFlat>) => ParsedShape; export declare function derivePartialConstructor(model: { [MO.schemaField]: MO.Schema; new (inp: ConstructorInput): ParsedShape; }): >(partConstructor: PartialConstructorInput) => (restConstructor: ComputeFlat>) => ParsedShape; export declare function derivePartialConstructor_>(model: { [MO.schemaField]: MO.Schema; new (inp: ConstructorInput): ParsedShape; }, partConstructor: PartialConstructorInput): (restConstructor: ComputeFlat>) => ParsedShape; export type GetPartialConstructor any> = Parameters>[0]; export declare function makeUuid(): MO.UUID; type LazyPartial = { [P in keyof T]?: LazyArg; }; export declare function withDefaultConstructorFields(self: MO.Schema): >(kvs: Changes) => MO.Schema & Partial>, Encoded, Api>; export declare function makeCurrentDate(): Date; export declare function defaultConstructor, Def extends Opt<["parser" | "constructor" | "both", () => MO.ParsedShapeOf]>>(p: MO.Property): (makeDefault: () => MO.ParsedShapeOf) => MO.Property MO.ParsedShapeOf]>>; type SupportedDefaults = ROSet | ReadonlyArray | Some | None | Date | boolean | UUID; export declare function findAnnotation(schema: MO.SchemaAny, id: MO.Annotation): A | undefined; export type SupportedDefaultsSchema = MO.Schema; export type DefaultProperty = FromProperty; export type DefaultPropertyRecord = Record; export type WithDefault> = MO.Property, "required", As, Some<["constructor", () => ParsedShape]>>; export type WithInputDefault> = MO.Property, "required", As, Some<["both", () => ParsedShape]>>; export declare function withDefault, Def extends Opt<[ "parser" | "constructor" | "both", () => MO.ParsedShapeOf> ]>>(p: MO.Property, "required", As, Def>): WithDefault; export declare function withInputDefault, Def extends Opt<[ "parser" | "constructor" | "both", () => MO.ParsedShapeOf> ]>>(p: MO.Property, "required", As, Def>): WithInputDefault; export declare function optProp(schema: Self): Property; export declare function defaultProp(schema: MO.SchemaDefaultSchema, makeDefault: () => ParsedShape): MO.Property, "required", None, Some<["constructor", () => ParsedShape]>>; export declare function defaultProp(schema: MO.SchemaDefaultSchema): FromProperty, "required", None, Some<["constructor", () => ParsedShape]>>; export declare function defaultProp(schema: MO.SchemaDefaultSchema): null extends ParsedShape ? FromProperty, "required", None, Some<["constructor", () => ParsedShape]>> : ["Not a supported type, see SupportedTypes", never]; export declare function defaultProp(schema: MO.Schema, makeDefault: () => ParsedShape): MO.Property, "required", None, Some<["constructor", () => ParsedShape]>>; export declare function defaultProp(schema: MO.Schema): FromProperty, "required", None, Some<["constructor", () => ParsedShape]>>; export declare function defaultProp(schema: MO.Schema): null extends ParsedShape ? FromProperty, "required", None, Some<["constructor", () => ParsedShape]>> : ["Not a supported type, see SupportedTypes", never]; export declare function defaultInputProp(schema: MO.SchemaDefaultSchema, makeDefault: () => ParsedShape): MO.Property, "required", None, Some<["both", () => ParsedShape]>>; export declare function defaultInputProp(schema: MO.SchemaDefaultSchema): FromProperty, "required", None, Some<["both", () => ParsedShape]>>; export declare function defaultInputProp(schema: MO.SchemaDefaultSchema): null extends ParsedShape ? FromProperty, "required", None, Some<["both", () => ParsedShape]>> : ["Not a supported type, see SupportedTypes", never]; export declare function defaultInputProp(schema: MO.Schema, makeDefault: () => ParsedShape): MO.Property, "required", None, Some<["both", () => ParsedShape]>>; export declare function defaultInputProp(schema: MO.Schema): FromProperty, "required", None, Some<["both", () => ParsedShape]>>; export declare function defaultInputProp(schema: MO.Schema): null extends ParsedShape ? FromProperty, "required", None, Some<["both", () => ParsedShape]>> : ["Not a supported type, see SupportedTypes", never]; export declare function makeOptional>(t: NER): { [K in keyof NER]: MO.Property; }; export declare function makeRequired>(t: NER): { [K in keyof NER]: MO.Property; }; export declare function createUnorder(): Ord; export declare function makeSet(type: MO.Schema, ord: Ord, eq?: Equal): MO.SchemaDefaultSchema, NonEmptySet.Set, readonly Encoded[], { self: Api; eq: import("@effect-ts-app/core/Prelude").Equal; ord: import("@effect-ts-app/core/Prelude").Ord; }> & import("@effect-ts-app/core/Set").SetSchemaExtensions; export declare function makeUnorderedStringSet(type: MO.Schema): MO.SchemaDefaultSchema, NonEmptySet.Set, readonly any[], { self: any; eq: import("@effect-ts-app/core/Prelude").Equal; ord: import("@effect-ts-app/core/Prelude").Ord; }> & import("@effect-ts-app/core/Set").SetSchemaExtensions; export declare function makeUnorderedSet(type: MO.Schema, eq: Eq.Equal): MO.SchemaDefaultSchema, NonEmptySet.Set, readonly Encoded[], { self: Api; eq: import("@effect-ts-app/core/Prelude").Equal; ord: import("@effect-ts-app/core/Prelude").Ord; }> & import("@effect-ts-app/core/Set").SetSchemaExtensions; export declare function makeNonEmptySet(type: MO.Schema, ord: Ord, eq?: Equal): MO.SchemaDefaultSchema & NonEmptySet.NonEmptyBrand, NonEmptySet.Set, readonly Encoded[], { self: Api; eq: import("@effect-ts-app/core/Prelude").Equal; ord: import("@effect-ts-app/core/Prelude").Ord; }> & NonEmptySet.NonEmptySetSchemaExtensions; export declare function makeUnorderedStringNonEmptySet(type: MO.Schema): MO.SchemaDefaultSchema & NonEmptySet.NonEmptyBrand, NonEmptySet.Set, readonly any[], { self: any; eq: import("@effect-ts-app/core/Prelude").Equal; ord: import("@effect-ts-app/core/Prelude").Ord; }> & NonEmptySet.NonEmptySetSchemaExtensions; export declare function makeUnorderedNonEmptySet(type: MO.Schema, eq: Eq.Equal): MO.SchemaDefaultSchema & NonEmptySet.NonEmptyBrand, NonEmptySet.Set, readonly Encoded[], { self: Api; eq: import("@effect-ts-app/core/Prelude").Equal; ord: import("@effect-ts-app/core/Prelude").Ord; }> & NonEmptySet.NonEmptySetSchemaExtensions; export declare const constArray: import("@fp-ts/data/Function").LazyArg<(() => A[])>; export type ParserInputFromSchemaProperties = T extends { Api: { props: infer Props; }; } ? Props extends MO.PropertyRecord ? MO.ParserInputFromProperties : never : never; /** * We know that the Parser will work from `unknown`, but we also want to expose the knowledge that we can parse from a ParserInput of type X * as such we can use fromProps, fromProp, fromArray etc, but still embed this Schema into one that parses from unknown. */ export type AsUPI = MO.Schema; /** * @see AsUPI */ export declare const asUpi: (s: MO.Schema) => AsUPI; export {}; //# sourceMappingURL=ext.d.ts.map