import { i as jsonSchemaValidator, n as JsonSchemaValidator, t as JsonSchemaType } from "./types-R2RTIcjk.mjs"; //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/code.d.ts declare abstract class _CodeOrName { abstract readonly str: string; abstract readonly names: UsedNames; abstract toString(): string; abstract emptyStr(): boolean; } declare class Name extends _CodeOrName { readonly str: string; constructor(s: string); toString(): string; emptyStr(): boolean; get names(): UsedNames; } declare class _Code extends _CodeOrName { readonly _items: readonly CodeItem[]; private _str?; private _names?; constructor(code: string | readonly CodeItem[]); toString(): string; emptyStr(): boolean; get str(): string; get names(): UsedNames; } type CodeItem = Name | string | number | boolean | null; type UsedNames = Record; type Code = _Code | Name; //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/scope.d.ts interface NameGroup { prefix: string; index: number; } interface NameValue { ref: ValueReference; key?: unknown; code?: Code; } type ValueReference = unknown; interface ScopeOptions { prefixes?: Set; parent?: Scope; } interface ValueScopeOptions extends ScopeOptions { scope: ScopeStore; es5?: boolean; lines?: boolean; } type ScopeStore = Record; type ScopeValues = { [Prefix in string]?: Map }; type ScopeValueSets = { [Prefix in string]?: Set }; declare enum UsedValueState { Started = 0, Completed = 1, } type UsedScopeValues = { [Prefix in string]?: Map }; declare class Scope { protected readonly _names: { [Prefix in string]?: NameGroup }; protected readonly _prefixes?: Set; protected readonly _parent?: Scope; constructor({ prefixes, parent }?: ScopeOptions); toName(nameOrPrefix: Name | string): Name; name(prefix: string): Name; protected _newName(prefix: string): string; private _nameGroup; } interface ScopePath { property: string; itemIndex: number; } declare class ValueScopeName extends Name { readonly prefix: string; value?: NameValue; scopePath?: Code; constructor(prefix: string, nameStr: string); setValue(value: NameValue, { property, itemIndex }: ScopePath): void; } interface VSOptions extends ValueScopeOptions { _n: Code; } declare class ValueScope extends Scope { protected readonly _values: ScopeValues; protected readonly _scope: ScopeStore; readonly opts: VSOptions; constructor(opts: ValueScopeOptions); get(): ScopeStore; name(prefix: string): ValueScopeName; value(nameOrPrefix: ValueScopeName | string, value: NameValue): ValueScopeName; getValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined; scopeRefs(scopeName: Name, values?: ScopeValues | ScopeValueSets): Code; scopeCode(values?: ScopeValues | ScopeValueSets, usedValues?: UsedScopeValues, getCode?: (n: ValueScopeName) => Code | undefined): Code; private _reduceValues; } //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/codegen/index.d.ts type SafeExpr = Code | number | boolean | null; type Block = Code | (() => void); interface CodeGenOptions { es5?: boolean; lines?: boolean; ownProperties?: boolean; } declare class CodeGen { readonly _scope: Scope; readonly _extScope: ValueScope; readonly _values: ScopeValueSets; private readonly _nodes; private readonly _blockStarts; private readonly _constants; private readonly opts; constructor(extScope: ValueScope, opts?: CodeGenOptions); toString(): string; name(prefix: string): Name; scopeName(prefix: string): ValueScopeName; scopeValue(prefixOrName: ValueScopeName | string, value: NameValue): Name; getScopeValue(prefix: string, keyOrRef: unknown): ValueScopeName | undefined; scopeRefs(scopeName: Name): Code; scopeCode(): Code; private _def; const(nameOrPrefix: Name | string, rhs: SafeExpr, _constant?: boolean): Name; let(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name; var(nameOrPrefix: Name | string, rhs?: SafeExpr, _constant?: boolean): Name; assign(lhs: Code, rhs: SafeExpr, sideEffects?: boolean): CodeGen; add(lhs: Code, rhs: SafeExpr): CodeGen; code(c: Block | SafeExpr): CodeGen; object(...keyValues: [Name | string, SafeExpr | string][]): _Code; if(condition: Code | boolean, thenBody?: Block, elseBody?: Block): CodeGen; elseIf(condition: Code | boolean): CodeGen; else(): CodeGen; endIf(): CodeGen; private _for; for(iteration: Code, forBody?: Block): CodeGen; forRange(nameOrPrefix: Name | string, from: SafeExpr, to: SafeExpr, forBody: (index: Name) => void, varKind?: Code): CodeGen; forOf(nameOrPrefix: Name | string, iterable: Code, forBody: (item: Name) => void, varKind?: Code): CodeGen; forIn(nameOrPrefix: Name | string, obj: Code, forBody: (item: Name) => void, varKind?: Code): CodeGen; endFor(): CodeGen; label(label: Name): CodeGen; break(label?: Code): CodeGen; return(value: Block | SafeExpr): CodeGen; try(tryBody: Block, catchCode?: (e: Name) => void, finallyCode?: Block): CodeGen; throw(error: Code): CodeGen; block(body?: Block, nodeCount?: number): CodeGen; endBlock(nodeCount?: number): CodeGen; func(name: Name, args?: Code, async?: boolean, funcBody?: Block): CodeGen; endFunc(): CodeGen; optimize(n?: number): void; private _leafNode; private _blockNode; private _endBlockNode; private _elseNode; private get _root(); private get _currNode(); private set _currNode(value); } //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/rules.d.ts declare const _jsonTypes: readonly ["string", "number", "integer", "boolean", "null", "object", "array"]; type JSONType$1 = (typeof _jsonTypes)[number]; type ValidationTypes = { [K in JSONType$1]: boolean | RuleGroup | undefined }; interface ValidationRules { rules: RuleGroup[]; post: RuleGroup; all: { [Key in string]?: boolean | Rule }; keywords: { [Key in string]?: boolean }; types: ValidationTypes; } interface RuleGroup { type?: JSONType$1; rules: Rule[]; } interface Rule { keyword: string; definition: AddedKeywordDefinition; } //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/util.d.ts declare enum Type { Num = 0, Str = 1, } //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/subschema.d.ts type SubschemaArgs = Partial<{ keyword: string; schemaProp: string | number; schema: AnySchema; schemaPath: Code; errSchemaPath: string; topSchemaRef: Code; data: Name | Code; dataProp: Code | string | number; dataTypes: JSONType$1[]; definedProperties: Set; propertyName: Name; dataPropType: Type; jtdDiscriminator: string; jtdMetadata: boolean; compositeRule: true; createErrors: boolean; allErrors: boolean; }>; //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/errors.d.ts interface ErrorPaths { instancePath?: Code; schemaPath?: string; parentSchema?: boolean; } //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/validate/index.d.ts declare class KeywordCxt implements KeywordErrorCxt { readonly gen: CodeGen; readonly allErrors?: boolean; readonly keyword: string; readonly data: Name; readonly $data?: string | false; schema: any; readonly schemaValue: Code | number | boolean; readonly schemaCode: Code | number | boolean; readonly schemaType: JSONType$1[]; readonly parentSchema: AnySchemaObject; readonly errsCount?: Name; params: KeywordCxtParams; readonly it: SchemaObjCxt; readonly def: AddedKeywordDefinition; constructor(it: SchemaObjCxt, def: AddedKeywordDefinition, keyword: string); result(condition: Code, successAction?: () => void, failAction?: () => void): void; failResult(condition: Code, successAction?: () => void, failAction?: () => void): void; pass(condition: Code, failAction?: () => void): void; fail(condition?: Code): void; fail$data(condition: Code): void; error(append?: boolean, errorParams?: KeywordCxtParams, errorPaths?: ErrorPaths): void; private _error; $dataError(): void; reset(): void; ok(cond: Code | boolean): void; setParams(obj: KeywordCxtParams, assign?: true): void; block$data(valid: Name, codeBlock: () => void, $dataValid?: Code): void; check$data(valid?: Name, $dataValid?: Code): void; invalid$data(): Code; subschema(appl: SubschemaArgs, valid: Name): SchemaCxt; mergeEvaluated(schemaCxt: SchemaCxt, toName?: typeof Name): void; mergeValidEvaluated(schemaCxt: SchemaCxt, valid: Name): boolean | void; } //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/types/json-schema.d.ts type StrictNullChecksWrapper = undefined extends null ? `strictNullChecks must be true in tsconfig to use ${Name$1}` : Type$1; type UnionToIntersection = (U extends any ? (_: U) => void : never) extends ((_: infer I) => void) ? I : never; type UncheckedPartialSchema = Partial>; type JSONType = IsPartial extends true ? T | undefined : T; interface NumberKeywords { minimum?: number; maximum?: number; exclusiveMinimum?: number; exclusiveMaximum?: number; multipleOf?: number; format?: string; } interface StringKeywords { minLength?: number; maxLength?: number; pattern?: string; format?: string; } type UncheckedJSONSchemaType = ( // these two unions allow arbitrary unions of types { anyOf: readonly UncheckedJSONSchemaType[]; } | { oneOf: readonly UncheckedJSONSchemaType[]; } | ({ type: readonly (T extends number ? JSONType<"number" | "integer", IsPartial> : T extends string ? JSONType<"string", IsPartial> : T extends boolean ? JSONType<"boolean", IsPartial> : never)[]; } & UnionToIntersection) | ((T extends number ? { type: JSONType<"number" | "integer", IsPartial>; } & NumberKeywords : T extends string ? { type: JSONType<"string", IsPartial>; } & StringKeywords : T extends boolean ? { type: JSONType<"boolean", IsPartial>; } : T extends readonly [any, ...any[]] ? { type: JSONType<"array", IsPartial>; items: { readonly [K in keyof T]-?: UncheckedJSONSchemaType & Nullable } & { length: T["length"]; }; minItems: T["length"]; } & ({ maxItems: T["length"]; } | { additionalItems: false; }) : T extends readonly any[] ? { type: JSONType<"array", IsPartial>; items: UncheckedJSONSchemaType; contains?: UncheckedPartialSchema; minItems?: number; maxItems?: number; minContains?: number; maxContains?: number; uniqueItems?: true; additionalItems?: never; } : T extends Record ? { type: JSONType<"object", IsPartial>; additionalProperties?: boolean | UncheckedJSONSchemaType; unevaluatedProperties?: boolean | UncheckedJSONSchemaType; properties?: IsPartial extends true ? Partial> : UncheckedPropertiesSchema; patternProperties?: Record>; propertyNames?: Omit, "type"> & { type?: "string"; }; dependencies?: { [K in keyof T]?: readonly (keyof T)[] | UncheckedPartialSchema }; dependentRequired?: { [K in keyof T]?: readonly (keyof T)[] }; dependentSchemas?: { [K in keyof T]?: UncheckedPartialSchema }; minProperties?: number; maxProperties?: number; } & (IsPartial extends true ? { required: readonly (keyof T)[]; } : [UncheckedRequiredMembers] extends [never] ? { required?: readonly UncheckedRequiredMembers[]; } : { required: readonly UncheckedRequiredMembers[]; }) : T extends null ? { type: JSONType<"null", IsPartial>; nullable: true; } : never) & { allOf?: readonly UncheckedPartialSchema[]; anyOf?: readonly UncheckedPartialSchema[]; oneOf?: readonly UncheckedPartialSchema[]; if?: UncheckedPartialSchema; then?: UncheckedPartialSchema; else?: UncheckedPartialSchema; not?: UncheckedPartialSchema; })) & { [keyword: string]: any; $id?: string; $ref?: string; $defs?: Record>; definitions?: Record>; }; type JSONSchemaType = StrictNullChecksWrapper<"JSONSchemaType", UncheckedJSONSchemaType>; type Known = { [key: string]: Known; } | [Known, ...Known[]] | Known[] | number | string | boolean | null; type UncheckedPropertiesSchema = { [K in keyof T]-?: (UncheckedJSONSchemaType & Nullable) | { $ref: string; } }; type UncheckedRequiredMembers = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T]; type Nullable = undefined extends T ? { nullable: true; const?: null; enum?: readonly (T | null)[]; default?: T | null; } : { nullable?: false; const?: T; enum?: readonly T[]; default?: T; }; //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/types/jtd-schema.d.ts /** numeric strings */ type NumberType = "float32" | "float64" | "int8" | "uint8" | "int16" | "uint16" | "int32" | "uint32"; /** string strings */ type StringType = "string" | "timestamp"; /** Generic JTD Schema without inference of the represented type */ type SomeJTDSchemaType = ( // ref { ref: string; } | { type: NumberType | StringType | "boolean"; } | { enum: string[]; } | { elements: SomeJTDSchemaType; } | { values: SomeJTDSchemaType; } | { properties: Record; optionalProperties?: Record; additionalProperties?: boolean; } | { properties?: Record; optionalProperties: Record; additionalProperties?: boolean; } | { discriminator: string; mapping: Record; } | {}) & { nullable?: boolean; metadata?: Record; definitions?: Record; }; /** required keys of an object, not undefined */ type RequiredKeys = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T]; /** optional or undifined-able keys of an object */ type OptionalKeys = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T]; /** type is true if T is a union type */ type IsUnion_ = false extends (T extends unknown ? ([U] extends [T] ? false : true) : never) ? false : true; type IsUnion = IsUnion_; /** type is true if T is identically E */ type TypeEquality = [T] extends [E$1] ? ([E$1] extends [T] ? true : false) : false; /** type is true if T or null is identically E or null*/ type NullTypeEquality = TypeEquality; /** gets only the string literals of a type or null if a type isn't a string literal */ type EnumString = [T] extends [never] ? null : T extends string ? string extends T ? null : T : null; /** true if type is a union of string literals */ type IsEnum = null extends EnumString ? false : true; /** true only if all types are array types (not tuples) */ type IsElements = false extends IsUnion ? [T] extends [readonly unknown[]] ? undefined extends T[0.5] ? false : true : false : false; /** true if the the type is a values type */ type IsValues = false extends IsUnion ? TypeEquality : false; /** true if type is a properties type and Union is false, or type is a discriminator type and Union is true */ type IsRecord = Union extends IsUnion ? null extends EnumString ? false : true : false; /** true if type represents an empty record */ type IsEmptyRecord = [T] extends [Record] ? [T] extends [never] ? false : true : false; /** actual schema */ type JTDSchemaType = Record> = ( // refs - where null wasn't specified, must match exactly (null extends EnumString ? never : ({ [K in keyof D]: [T] extends [D[K]] ? { ref: K; } : never }[keyof D] & { nullable?: false; }) | (null extends T ? { [K in keyof D]: [Exclude] extends [Exclude] ? { ref: K; } : never }[keyof D] & { nullable: true; } : never)) | (unknown extends T ? { nullable?: boolean; } : never) | ((true extends NullTypeEquality ? { type: NumberType; } : true extends NullTypeEquality ? { type: "boolean"; } : true extends NullTypeEquality ? { type: StringType; } : true extends NullTypeEquality ? { type: "timestamp"; } : true extends IsEnum> ? { enum: EnumString>[]; } : true extends IsElements> ? T extends readonly (infer E)[] ? { elements: JTDSchemaType; } : never : true extends IsEmptyRecord> ? { properties: Record; optionalProperties?: Record; } | { optionalProperties: Record; } : true extends IsValues> ? T extends Record ? { values: JTDSchemaType; } : never : true extends IsRecord, false> ? ([RequiredKeys>] extends [never] ? { properties?: Record; } : { properties: { [K in RequiredKeys]: JTDSchemaType }; }) & ([OptionalKeys>] extends [never] ? { optionalProperties?: Record; } : { optionalProperties: { [K in OptionalKeys]: JTDSchemaType, D> }; }) & { additionalProperties?: boolean; } : true extends IsRecord, true> ? { [K in keyof Exclude]-?: Exclude[K] extends string ? { discriminator: K; mapping: { [M in Exclude[K]]: JTDSchemaType ? T : never, K>, D> }; } : never }[keyof Exclude] : never) & (null extends T ? { nullable: true; } : { nullable?: false; }))) & { metadata?: Record; definitions?: { [K in keyof D]: JTDSchemaType }; }; type JTDDataDef> = // ref (S extends { ref: string; } ? D extends { [K in S["ref"]]: infer V } ? JTDDataDef : never : S extends { type: NumberType; } ? number : S extends { type: "boolean"; } ? boolean : S extends { type: "string"; } ? string : S extends { type: "timestamp"; } ? string | Date : S extends { enum: readonly (infer E)[]; } ? string extends E ? never : [E] extends [string] ? E : never : S extends { elements: infer E; } ? JTDDataDef[] : S extends { properties: Record; optionalProperties?: Record; additionalProperties?: boolean; } ? { -readonly [K in keyof S["properties"]]-?: JTDDataDef } & { -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef } & ([S["additionalProperties"]] extends [true] ? Record : unknown) : S extends { properties?: Record; optionalProperties: Record; additionalProperties?: boolean; } ? { -readonly [K in keyof S["properties"]]-?: JTDDataDef } & { -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef } & ([S["additionalProperties"]] extends [true] ? Record : unknown) : S extends { values: infer V; } ? Record> : S extends { discriminator: infer M; mapping: Record; } ? [M] extends [string] ? { [K in keyof S["mapping"]]: JTDDataDef & { [KM in M]: K } }[keyof S["mapping"]] : never : unknown) | (S extends { nullable: true; } ? null : never); type JTDDataType = S extends { definitions: Record; } ? JTDDataDef : JTDDataDef>; //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/runtime/validation_error.d.ts declare class ValidationError extends Error { readonly errors: Partial[]; readonly ajv: true; readonly validation: true; constructor(errors: Partial[]); } //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/ref_error.d.ts declare class MissingRefError extends Error { readonly missingRef: string; readonly missingSchema: string; constructor(resolver: UriResolver, baseId: string, ref: string, msg?: string); } //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/core.d.ts interface Plugin { (ajv: Ajv$1, options?: Opts): Ajv$1; [prop: string]: any; } type Options = CurrentOptions & DeprecatedOptions; interface CurrentOptions { strict?: boolean | "log"; strictSchema?: boolean | "log"; strictNumbers?: boolean | "log"; strictTypes?: boolean | "log"; strictTuples?: boolean | "log"; strictRequired?: boolean | "log"; allowMatchingProperties?: boolean; allowUnionTypes?: boolean; validateFormats?: boolean; $data?: boolean; allErrors?: boolean; verbose?: boolean; discriminator?: boolean; unicodeRegExp?: boolean; timestamp?: "string" | "date"; parseDate?: boolean; allowDate?: boolean; specialNumbers?: "fast" | "null"; $comment?: true | ((comment: string, schemaPath?: string, rootSchema?: AnySchemaObject) => unknown); formats?: { [Name in string]?: Format }; keywords?: Vocabulary; schemas?: AnySchema[] | { [Key in string]?: AnySchema }; logger?: Logger | false; loadSchema?: (uri: string) => Promise; removeAdditional?: boolean | "all" | "failing"; useDefaults?: boolean | "empty"; coerceTypes?: boolean | "array"; next?: boolean; unevaluated?: boolean; dynamicRef?: boolean; schemaId?: "id" | "$id"; jtd?: boolean; meta?: SchemaObject | boolean; defaultMeta?: string | AnySchemaObject; validateSchema?: boolean | "log"; addUsedSchema?: boolean; inlineRefs?: boolean | number; passContext?: boolean; loopRequired?: number; loopEnum?: number; ownProperties?: boolean; multipleOfPrecision?: number; int32range?: boolean; messages?: boolean; code?: CodeOptions; uriResolver?: UriResolver; } interface CodeOptions { es5?: boolean; esm?: boolean; lines?: boolean; optimize?: boolean | number; formats?: Code; source?: boolean; process?: (code: string, schema?: SchemaEnv) => string; regExp?: RegExpEngine; } interface InstanceCodeOptions extends CodeOptions { regExp: RegExpEngine; optimize: number; } interface DeprecatedOptions { /** @deprecated */ ignoreKeywordsWithRef?: boolean; /** @deprecated */ jsPropertySyntax?: boolean; /** @deprecated */ unicode?: boolean; } type RequiredInstanceOptions = { [K in "strictSchema" | "strictNumbers" | "strictTypes" | "strictTuples" | "strictRequired" | "inlineRefs" | "loopRequired" | "loopEnum" | "meta" | "messages" | "schemaId" | "addUsedSchema" | "validateSchema" | "validateFormats" | "int32range" | "unicodeRegExp" | "uriResolver"]: NonNullable } & { code: InstanceCodeOptions; }; type InstanceOptions = Options & RequiredInstanceOptions; interface Logger { log(...args: unknown[]): unknown; warn(...args: unknown[]): unknown; error(...args: unknown[]): unknown; } declare class Ajv$1 { opts: InstanceOptions; errors?: ErrorObject[] | null; logger: Logger; readonly scope: ValueScope; readonly schemas: { [Key in string]?: SchemaEnv }; readonly refs: { [Ref in string]?: SchemaEnv | string }; readonly formats: { [Name in string]?: AddedFormat }; readonly RULES: ValidationRules; readonly _compilations: Set; private readonly _loading; private readonly _cache; private readonly _metaOpts; static ValidationError: typeof ValidationError; static MissingRefError: typeof MissingRefError; constructor(opts?: Options); _addVocabularies(): void; _addDefaultMetaSchema(): void; defaultMeta(): string | AnySchemaObject | undefined; validate(schema: Schema | string, data: unknown): boolean; validate(schemaKeyRef: AnySchema | string, data: unknown): boolean | Promise; validate(schema: Schema | JSONSchemaType | string, data: unknown): data is T; validate(schema: JTDSchemaType, data: unknown): data is T; validate(schema: T, data: unknown): data is JTDDataType; validate(schema: AsyncSchema, data: unknown | T): Promise; validate(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise; compile(schema: Schema | JSONSchemaType, _meta?: boolean): ValidateFunction; compile(schema: JTDSchemaType, _meta?: boolean): ValidateFunction; compile(schema: T, _meta?: boolean): ValidateFunction>; compile(schema: AsyncSchema, _meta?: boolean): AsyncValidateFunction; compile(schema: AnySchema, _meta?: boolean): AnyValidateFunction; compileAsync(schema: SchemaObject | JSONSchemaType, _meta?: boolean): Promise>; compileAsync(schema: JTDSchemaType, _meta?: boolean): Promise>; compileAsync(schema: AsyncSchema, meta?: boolean): Promise>; compileAsync(schema: AnySchemaObject, meta?: boolean): Promise>; addSchema(schema: AnySchema | AnySchema[], // If array is passed, `key` will be ignored key?: string, // Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. _meta?: boolean, // true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. _validateSchema?: boolean | "log"): Ajv$1; addMetaSchema(schema: AnySchemaObject, key?: string, // schema key _validateSchema?: boolean | "log"): Ajv$1; validateSchema(schema: AnySchema, throwOrLogError?: boolean): boolean | Promise; getSchema(keyRef: string): AnyValidateFunction | undefined; removeSchema(schemaKeyRef?: AnySchema | string | RegExp): Ajv$1; addVocabulary(definitions: Vocabulary): Ajv$1; addKeyword(kwdOrDef: string | KeywordDefinition, def?: KeywordDefinition): Ajv$1; getKeyword(keyword: string): AddedKeywordDefinition | boolean; removeKeyword(keyword: string): Ajv$1; addFormat(name: string, format: Format): Ajv$1; errorsText(errors?: ErrorObject[] | null | undefined, // optional array of validation errors { separator, dataVar }?: ErrorsTextOptions): string; $dataMetaSchema(metaSchema: AnySchemaObject, keywordsJsonPointers: string[]): AnySchemaObject; private _removeAllSchemas; _addSchema(schema: AnySchema, meta?: boolean, baseId?: string, validateSchema?: boolean | "log", addSchema?: boolean): SchemaEnv; private _checkUnique; private _compileSchemaEnv; private _compileMetaSchema; } interface ErrorsTextOptions { separator?: string; dataVar?: string; } //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/resolve.d.ts type LocalRefs = { [Ref in string]?: AnySchemaObject }; //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/compile/index.d.ts type SchemaRefs = { [Ref in string]?: SchemaEnv | AnySchema }; interface SchemaCxt { readonly gen: CodeGen; readonly allErrors?: boolean; readonly data: Name; readonly parentData: Name; readonly parentDataProperty: Code | number; readonly dataNames: Name[]; readonly dataPathArr: (Code | number)[]; readonly dataLevel: number; dataTypes: JSONType$1[]; definedProperties: Set; readonly topSchemaRef: Code; readonly validateName: Name; evaluated?: Name; readonly ValidationError?: Name; readonly schema: AnySchema; readonly schemaEnv: SchemaEnv; readonly rootId: string; baseId: string; readonly schemaPath: Code; readonly errSchemaPath: string; readonly errorPath: Code; readonly propertyName?: Name; readonly compositeRule?: boolean; props?: EvaluatedProperties | Name; items?: EvaluatedItems | Name; jtdDiscriminator?: string; jtdMetadata?: boolean; readonly createErrors?: boolean; readonly opts: InstanceOptions; readonly self: Ajv$1; } interface SchemaObjCxt extends SchemaCxt { readonly schema: AnySchemaObject; } interface SchemaEnvArgs { readonly schema: AnySchema; readonly schemaId?: "$id" | "id"; readonly root?: SchemaEnv; readonly baseId?: string; readonly schemaPath?: string; readonly localRefs?: LocalRefs; readonly meta?: boolean; } declare class SchemaEnv implements SchemaEnvArgs { readonly schema: AnySchema; readonly schemaId?: "$id" | "id"; readonly root: SchemaEnv; baseId: string; schemaPath?: string; localRefs?: LocalRefs; readonly meta?: boolean; readonly $async?: boolean; readonly refs: SchemaRefs; readonly dynamicAnchors: { [Ref in string]?: true }; validate?: AnyValidateFunction; validateName?: ValueScopeName; serialize?: (data: unknown) => string; serializeName?: ValueScopeName; parse?: (data: string) => unknown; parseName?: ValueScopeName; constructor(env: SchemaEnvArgs); } //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/types/index.d.ts interface _SchemaObject { id?: string; $id?: string; $schema?: string; [x: string]: any; } interface SchemaObject extends _SchemaObject { id?: string; $id?: string; $schema?: string; $async?: false; [x: string]: any; } interface AsyncSchema extends _SchemaObject { $async: true; } type AnySchemaObject = SchemaObject | AsyncSchema; type Schema = SchemaObject | boolean; type AnySchema = Schema | AsyncSchema; interface SourceCode { validateName: ValueScopeName; validateCode: string; scopeValues: ScopeValueSets; evaluated?: Code; } interface DataValidationCxt { instancePath: string; parentData: { [K in T]: any }; parentDataProperty: T; rootData: Record | any[]; dynamicAnchors: { [Ref in string]?: ValidateFunction }; } interface ValidateFunction { (this: Ajv$1 | any, data: any, dataCxt?: DataValidationCxt): data is T; errors?: null | ErrorObject[]; evaluated?: Evaluated; schema: AnySchema; schemaEnv: SchemaEnv; source?: SourceCode; } type EvaluatedProperties = { [K in string]?: true } | true; type EvaluatedItems = number | true; interface Evaluated { props?: EvaluatedProperties; items?: EvaluatedItems; dynamicProps: boolean; dynamicItems: boolean; } interface AsyncValidateFunction extends ValidateFunction { (...args: Parameters>): Promise; $async: true; } type AnyValidateFunction = ValidateFunction | AsyncValidateFunction; interface ErrorObject, S = unknown> { keyword: K$1; instancePath: string; schemaPath: string; params: P; propertyName?: string; message?: string; schema?: S; parentSchema?: AnySchemaObject; data?: unknown; } interface _KeywordDef { keyword: string | string[]; type?: JSONType$1 | JSONType$1[]; schemaType?: JSONType$1 | JSONType$1[]; allowUndefined?: boolean; $data?: boolean; implements?: string[]; before?: string; post?: boolean; metaSchema?: AnySchemaObject; validateSchema?: AnyValidateFunction; dependencies?: string[]; error?: KeywordErrorDefinition; $dataError?: KeywordErrorDefinition; } interface CodeKeywordDefinition extends _KeywordDef { code: (cxt: KeywordCxt, ruleType?: string) => void; trackErrors?: boolean; } type MacroKeywordFunc = (schema: any, parentSchema: AnySchemaObject, it: SchemaCxt) => AnySchema; type CompileKeywordFunc = (schema: any, parentSchema: AnySchemaObject, it: SchemaObjCxt) => DataValidateFunction; interface DataValidateFunction { (...args: Parameters): boolean | Promise; errors?: Partial[]; } interface SchemaValidateFunction { (schema: any, data: any, parentSchema?: AnySchemaObject, dataCxt?: DataValidationCxt): boolean | Promise; errors?: Partial[]; } interface FuncKeywordDefinition extends _KeywordDef { validate?: SchemaValidateFunction | DataValidateFunction; compile?: CompileKeywordFunc; schema?: boolean; modifying?: boolean; async?: boolean; valid?: boolean; errors?: boolean | "full"; } interface MacroKeywordDefinition extends FuncKeywordDefinition { macro: MacroKeywordFunc; } type KeywordDefinition = CodeKeywordDefinition | FuncKeywordDefinition | MacroKeywordDefinition; type AddedKeywordDefinition = KeywordDefinition & { type: JSONType$1[]; schemaType: JSONType$1[]; }; interface KeywordErrorDefinition { message: string | Code | ((cxt: KeywordErrorCxt) => string | Code); params?: Code | ((cxt: KeywordErrorCxt) => Code); } type Vocabulary = (KeywordDefinition | string)[]; interface KeywordErrorCxt { gen: CodeGen; keyword: string; data: Name; $data?: string | false; schema: any; parentSchema?: AnySchemaObject; schemaCode: Code | number | boolean; schemaValue: Code | number | boolean; schemaType?: JSONType$1[]; errsCount?: Name; params: KeywordCxtParams; it: SchemaCxt; } type KeywordCxtParams = { [P in string]?: Code | string | number }; type FormatValidator = (data: T) => boolean; type FormatCompare = (data1: T, data2: T) => number | undefined; type AsyncFormatValidator = (data: T) => Promise; interface FormatDefinition { type?: T extends string ? "string" | undefined : "number"; validate: FormatValidator | (T extends string ? string | RegExp : never); async?: false | undefined; compare?: FormatCompare; } interface AsyncFormatDefinition { type?: T extends string ? "string" | undefined : "number"; validate: AsyncFormatValidator; async: true; compare?: FormatCompare; } type AddedFormat = true | RegExp | FormatValidator | FormatDefinition | FormatDefinition | AsyncFormatDefinition | AsyncFormatDefinition; type Format = AddedFormat | string; interface RegExpEngine { (pattern: string, u: string): RegExpLike; code: string; } interface RegExpLike { test: (s: string) => boolean; } interface UriResolver { parse(uri: string): URIComponent; resolve(base: string, path: string): string; serialize(component: URIComponent): string; } //#endregion //#region ../../node_modules/.pnpm/ajv@8.18.0/node_modules/ajv/dist/ajv.d.ts declare class Ajv extends Ajv$1 { _addVocabularies(): void; _addDefaultMetaSchema(): void; defaultMeta(): string | AnySchemaObject | undefined; } //#endregion //#region ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/formats.d.ts type FormatMode = "fast" | "full"; type FormatName = "date" | "time" | "date-time" | "iso-time" | "iso-date-time" | "duration" | "uri" | "uri-reference" | "uri-template" | "url" | "email" | "hostname" | "ipv4" | "ipv6" | "regex" | "uuid" | "json-pointer" | "json-pointer-uri-fragment" | "relative-json-pointer" | "byte" | "int32" | "int64" | "float" | "double" | "password" | "binary"; //#endregion //#region ../../node_modules/.pnpm/ajv-formats@3.0.1_ajv@8.18.0/node_modules/ajv-formats/dist/index.d.ts interface FormatOptions { mode?: FormatMode; formats?: FormatName[]; keywords?: boolean; } type FormatsPluginOptions = FormatName[] | FormatOptions; interface FormatsPlugin extends Plugin { get: (format: FormatName, mode?: FormatMode) => Format; } declare const formatsPlugin: FormatsPlugin; //#endregion //#region ../core-internal/src/validators/ajvProvider.d.ts /** Structural subset of the AJV interface used by {@link AjvJsonSchemaValidator}. */ interface AjvLike { compile: (schema: unknown) => AjvValidateFunction; getSchema: (keyRef: string) => AjvValidateFunction | undefined; errorsText: (errors?: any) => string; } interface AjvValidateFunction { (input: unknown): boolean; errors?: any; } /** * AJV-backed JSON Schema validator. See `@modelcontextprotocol/{client,server}/validators/ajv` * for the customisation entry point (re-exports `Ajv` and `addFormats` from the bundled copy). * * @example Use with default configuration * ```ts source="./ajvProvider.examples.ts#AjvJsonSchemaValidator_default" * const validator = new AjvJsonSchemaValidator(); * ``` * * @example Use with a custom AJV instance * ```ts source="./ajvProvider.examples.ts#AjvJsonSchemaValidator_customInstance" * const ajv = new Ajv({ strict: true, allErrors: true }); * const validator = new AjvJsonSchemaValidator(ajv); * ``` * * @example Register ajv-formats * ```ts source="./ajvProvider.examples.ts#AjvJsonSchemaValidator_withFormats" * const ajv = new Ajv({ strict: true, allErrors: true }); * addFormats(ajv); * const validator = new AjvJsonSchemaValidator(ajv); * ``` */ declare class AjvJsonSchemaValidator implements jsonSchemaValidator { private _ajv; /** * @param ajv - Optional pre-configured AJV-compatible instance. If omitted, a default instance is * created with `strict: false`, `validateFormats: true`, `validateSchema: false`, `allErrors: true`, * and `ajv-formats` registered. The parameter is typed structurally so consumers who don't pass * an instance need not have `ajv` installed. */ constructor(ajv?: AjvLike); getValidator(schema: JsonSchemaType): JsonSchemaValidator; } /** `ajv-formats` default export, normalised through the CJS/ESM interop wrapper. */ declare const addFormats: typeof formatsPlugin.default; //#endregion export { addFormats as n, Ajv as r, AjvJsonSchemaValidator as t }; //# sourceMappingURL=ajvProvider-DZ_siXcF.d.mts.map