@modelcontextprotocol/server
Advanced tools
| import { i as jsonSchemaValidator, n as JsonSchemaValidator, t as JsonSchemaType } from "./types-DsbMXNFL.cjs"; | ||
| //#region ../core-internal/src/validators/fastUriShim.d.ts | ||
| /** | ||
| * dts-bundling shim for `fast-uri`. | ||
| * | ||
| * ajv@8.18.0's published .d.ts does `import { URIComponent } from "fast-uri"`, | ||
| * but fast-uri ships its types as `export = namespace`, which rolldown's dts | ||
| * bundler can't destructure into a named import — it drops the import and | ||
| * leaves a dangling `URIComponent` reference in the bundled .d.mts (TS2304 for | ||
| * downstream consumers with `skipLibCheck: false`). | ||
| * | ||
| * The server/client tsdown configs map `fast-uri` to this file via | ||
| * `dts.compilerOptions.paths` so the type is inlined as a plain named export. | ||
| * Runtime code is unaffected (this is a `.d.ts`; the path mapping is dts-only). | ||
| */ | ||
| // Field-for-field copy of fast-uri@3.1.0's URIComponent (types/index.d.ts). | ||
| // Keep in sync when bumping fast-uri/ajv. | ||
| interface URIComponent { | ||
| scheme?: string; | ||
| userinfo?: string; | ||
| host?: string; | ||
| port?: number | string; | ||
| path?: string; | ||
| query?: string; | ||
| fragment?: string; | ||
| reference?: string; | ||
| nid?: string; | ||
| nss?: string; | ||
| resourceName?: string; | ||
| secure?: boolean; | ||
| uuid?: string; | ||
| error?: string; | ||
| } | ||
| //#endregion | ||
| //#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<string, number | undefined>; | ||
| 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<string>; | ||
| parent?: Scope; | ||
| } | ||
| interface ValueScopeOptions extends ScopeOptions { | ||
| scope: ScopeStore; | ||
| es5?: boolean; | ||
| lines?: boolean; | ||
| } | ||
| type ScopeStore = Record<string, ValueReference[] | undefined>; | ||
| type ScopeValues = { [Prefix in string]?: Map<unknown, ValueScopeName> }; | ||
| type ScopeValueSets = { [Prefix in string]?: Set<ValueScopeName> }; | ||
| declare enum UsedValueState { | ||
| Started = 0, | ||
| Completed = 1, | ||
| } | ||
| type UsedScopeValues = { [Prefix in string]?: Map<ValueScopeName, UsedValueState | undefined> }; | ||
| declare class Scope { | ||
| protected readonly _names: { [Prefix in string]?: NameGroup }; | ||
| protected readonly _prefixes?: Set<string>; | ||
| 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<string>; | ||
| 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<Name$1 extends string, Type$1> = undefined extends null ? `strictNullChecks must be true in tsconfig to use ${Name$1}` : Type$1; | ||
| type UnionToIntersection<U> = (U extends any ? (_: U) => void : never) extends ((_: infer I) => void) ? I : never; | ||
| type UncheckedPartialSchema<T> = Partial<UncheckedJSONSchemaType<T, true>>; | ||
| type JSONType<T extends string, IsPartial extends boolean> = 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<T, IsPartial extends boolean> = ( | ||
| // these two unions allow arbitrary unions of types | ||
| { | ||
| anyOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]; | ||
| } | { | ||
| oneOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]; | ||
| } | ({ | ||
| 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 ? NumberKeywords : T extends string ? StringKeywords : T extends boolean ? {} : never>) | ((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<T[K], false> & Nullable<T[K]> } & { | ||
| length: T["length"]; | ||
| }; | ||
| minItems: T["length"]; | ||
| } & ({ | ||
| maxItems: T["length"]; | ||
| } | { | ||
| additionalItems: false; | ||
| }) : T extends readonly any[] ? { | ||
| type: JSONType<"array", IsPartial>; | ||
| items: UncheckedJSONSchemaType<T[0], false>; | ||
| contains?: UncheckedPartialSchema<T[0]>; | ||
| minItems?: number; | ||
| maxItems?: number; | ||
| minContains?: number; | ||
| maxContains?: number; | ||
| uniqueItems?: true; | ||
| additionalItems?: never; | ||
| } : T extends Record<string, any> ? { | ||
| type: JSONType<"object", IsPartial>; | ||
| additionalProperties?: boolean | UncheckedJSONSchemaType<T[string], false>; | ||
| unevaluatedProperties?: boolean | UncheckedJSONSchemaType<T[string], false>; | ||
| properties?: IsPartial extends true ? Partial<UncheckedPropertiesSchema<T>> : UncheckedPropertiesSchema<T>; | ||
| patternProperties?: Record<string, UncheckedJSONSchemaType<T[string], false>>; | ||
| propertyNames?: Omit<UncheckedJSONSchemaType<string, false>, "type"> & { | ||
| type?: "string"; | ||
| }; | ||
| dependencies?: { [K in keyof T]?: readonly (keyof T)[] | UncheckedPartialSchema<T> }; | ||
| dependentRequired?: { [K in keyof T]?: readonly (keyof T)[] }; | ||
| dependentSchemas?: { [K in keyof T]?: UncheckedPartialSchema<T> }; | ||
| minProperties?: number; | ||
| maxProperties?: number; | ||
| } & (IsPartial extends true ? { | ||
| required: readonly (keyof T)[]; | ||
| } : [UncheckedRequiredMembers<T>] extends [never] ? { | ||
| required?: readonly UncheckedRequiredMembers<T>[]; | ||
| } : { | ||
| required: readonly UncheckedRequiredMembers<T>[]; | ||
| }) : T extends null ? { | ||
| type: JSONType<"null", IsPartial>; | ||
| nullable: true; | ||
| } : never) & { | ||
| allOf?: readonly UncheckedPartialSchema<T>[]; | ||
| anyOf?: readonly UncheckedPartialSchema<T>[]; | ||
| oneOf?: readonly UncheckedPartialSchema<T>[]; | ||
| if?: UncheckedPartialSchema<T>; | ||
| then?: UncheckedPartialSchema<T>; | ||
| else?: UncheckedPartialSchema<T>; | ||
| not?: UncheckedPartialSchema<T>; | ||
| })) & { | ||
| [keyword: string]: any; | ||
| $id?: string; | ||
| $ref?: string; | ||
| $defs?: Record<string, UncheckedJSONSchemaType<Known, true>>; | ||
| definitions?: Record<string, UncheckedJSONSchemaType<Known, true>>; | ||
| }; | ||
| type JSONSchemaType<T> = StrictNullChecksWrapper<"JSONSchemaType", UncheckedJSONSchemaType<T, false>>; | ||
| type Known = { | ||
| [key: string]: Known; | ||
| } | [Known, ...Known[]] | Known[] | number | string | boolean | null; | ||
| type UncheckedPropertiesSchema<T> = { [K in keyof T]-?: (UncheckedJSONSchemaType<T[K], false> & Nullable<T[K]>) | { | ||
| $ref: string; | ||
| } }; | ||
| type UncheckedRequiredMembers<T> = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T]; | ||
| type Nullable<T> = 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<string, SomeJTDSchemaType>; | ||
| optionalProperties?: Record<string, SomeJTDSchemaType>; | ||
| additionalProperties?: boolean; | ||
| } | { | ||
| properties?: Record<string, SomeJTDSchemaType>; | ||
| optionalProperties: Record<string, SomeJTDSchemaType>; | ||
| additionalProperties?: boolean; | ||
| } | { | ||
| discriminator: string; | ||
| mapping: Record<string, SomeJTDSchemaType>; | ||
| } | {}) & { | ||
| nullable?: boolean; | ||
| metadata?: Record<string, unknown>; | ||
| definitions?: Record<string, SomeJTDSchemaType>; | ||
| }; | ||
| /** required keys of an object, not undefined */ | ||
| type RequiredKeys<T> = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T]; | ||
| /** optional or undifined-able keys of an object */ | ||
| type OptionalKeys<T> = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T]; | ||
| /** type is true if T is a union type */ | ||
| type IsUnion_<T, U extends T = T> = false extends (T extends unknown ? ([U] extends [T] ? false : true) : never) ? false : true; | ||
| type IsUnion<T> = IsUnion_<T>; | ||
| /** type is true if T is identically E */ | ||
| type TypeEquality<T, E$1> = [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<T, E$1> = TypeEquality<T | null, E$1 | null>; | ||
| /** gets only the string literals of a type or null if a type isn't a string literal */ | ||
| type EnumString<T> = [T] extends [never] ? null : T extends string ? string extends T ? null : T : null; | ||
| /** true if type is a union of string literals */ | ||
| type IsEnum<T> = null extends EnumString<T> ? false : true; | ||
| /** true only if all types are array types (not tuples) */ | ||
| type IsElements<T> = false extends IsUnion<T> ? [T] extends [readonly unknown[]] ? undefined extends T[0.5] ? false : true : false : false; | ||
| /** true if the the type is a values type */ | ||
| type IsValues<T> = false extends IsUnion<T> ? TypeEquality<keyof T, string> : false; | ||
| /** true if type is a properties type and Union is false, or type is a discriminator type and Union is true */ | ||
| type IsRecord<T, Union extends boolean> = Union extends IsUnion<T> ? null extends EnumString<keyof T> ? false : true : false; | ||
| /** true if type represents an empty record */ | ||
| type IsEmptyRecord<T> = [T] extends [Record<string, never>] ? [T] extends [never] ? false : true : false; | ||
| /** actual schema */ | ||
| type JTDSchemaType<T, D extends Record<string, unknown> = Record<string, never>> = ( | ||
| // refs - where null wasn't specified, must match exactly | ||
| (null extends EnumString<keyof D> ? never : ({ [K in keyof D]: [T] extends [D[K]] ? { | ||
| ref: K; | ||
| } : never }[keyof D] & { | ||
| nullable?: false; | ||
| }) | (null extends T ? { [K in keyof D]: [Exclude<T, null>] extends [Exclude<D[K], null>] ? { | ||
| ref: K; | ||
| } : never }[keyof D] & { | ||
| nullable: true; | ||
| } : never)) | (unknown extends T ? { | ||
| nullable?: boolean; | ||
| } : never) | ((true extends NullTypeEquality<T, number> ? { | ||
| type: NumberType; | ||
| } : true extends NullTypeEquality<T, boolean> ? { | ||
| type: "boolean"; | ||
| } : true extends NullTypeEquality<T, string> ? { | ||
| type: StringType; | ||
| } : true extends NullTypeEquality<T, Date> ? { | ||
| type: "timestamp"; | ||
| } : true extends IsEnum<Exclude<T, null>> ? { | ||
| enum: EnumString<Exclude<T, null>>[]; | ||
| } : true extends IsElements<Exclude<T, null>> ? T extends readonly (infer E)[] ? { | ||
| elements: JTDSchemaType<E, D>; | ||
| } : never : true extends IsEmptyRecord<Exclude<T, null>> ? { | ||
| properties: Record<string, never>; | ||
| optionalProperties?: Record<string, never>; | ||
| } | { | ||
| optionalProperties: Record<string, never>; | ||
| } : true extends IsValues<Exclude<T, null>> ? T extends Record<string, infer V> ? { | ||
| values: JTDSchemaType<V, D>; | ||
| } : never : true extends IsRecord<Exclude<T, null>, false> ? ([RequiredKeys<Exclude<T, null>>] extends [never] ? { | ||
| properties?: Record<string, never>; | ||
| } : { | ||
| properties: { [K in RequiredKeys<T>]: JTDSchemaType<T[K], D> }; | ||
| }) & ([OptionalKeys<Exclude<T, null>>] extends [never] ? { | ||
| optionalProperties?: Record<string, never>; | ||
| } : { | ||
| optionalProperties: { [K in OptionalKeys<T>]: JTDSchemaType<Exclude<T[K], undefined>, D> }; | ||
| }) & { | ||
| additionalProperties?: boolean; | ||
| } : true extends IsRecord<Exclude<T, null>, true> ? { [K in keyof Exclude<T, null>]-?: Exclude<T, null>[K] extends string ? { | ||
| discriminator: K; | ||
| mapping: { [M in Exclude<T, null>[K]]: JTDSchemaType<Omit<T extends Record<K, M> ? T : never, K>, D> }; | ||
| } : never }[keyof Exclude<T, null>] : never) & (null extends T ? { | ||
| nullable: true; | ||
| } : { | ||
| nullable?: false; | ||
| }))) & { | ||
| metadata?: Record<string, unknown>; | ||
| definitions?: { [K in keyof D]: JTDSchemaType<D[K], D> }; | ||
| }; | ||
| type JTDDataDef<S, D extends Record<string, unknown>> = | ||
| // ref | ||
| (S extends { | ||
| ref: string; | ||
| } ? D extends { [K in S["ref"]]: infer V } ? JTDDataDef<V, D> : 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<E, D>[] : S extends { | ||
| properties: Record<string, unknown>; | ||
| optionalProperties?: Record<string, unknown>; | ||
| additionalProperties?: boolean; | ||
| } ? { -readonly [K in keyof S["properties"]]-?: JTDDataDef<S["properties"][K], D> } & { -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef<S["optionalProperties"][K], D> } & ([S["additionalProperties"]] extends [true] ? Record<string, unknown> : unknown) : S extends { | ||
| properties?: Record<string, unknown>; | ||
| optionalProperties: Record<string, unknown>; | ||
| additionalProperties?: boolean; | ||
| } ? { -readonly [K in keyof S["properties"]]-?: JTDDataDef<S["properties"][K], D> } & { -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef<S["optionalProperties"][K], D> } & ([S["additionalProperties"]] extends [true] ? Record<string, unknown> : unknown) : S extends { | ||
| values: infer V; | ||
| } ? Record<string, JTDDataDef<V, D>> : S extends { | ||
| discriminator: infer M; | ||
| mapping: Record<string, unknown>; | ||
| } ? [M] extends [string] ? { [K in keyof S["mapping"]]: JTDDataDef<S["mapping"][K], D> & { [KM in M]: K } }[keyof S["mapping"]] : never : unknown) | (S extends { | ||
| nullable: true; | ||
| } ? null : never); | ||
| type JTDDataType<S> = S extends { | ||
| definitions: Record<string, unknown>; | ||
| } ? JTDDataDef<S, S["definitions"]> : JTDDataDef<S, Record<string, never>>; | ||
| //#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<ErrorObject>[]; | ||
| readonly ajv: true; | ||
| readonly validation: true; | ||
| constructor(errors: Partial<ErrorObject>[]); | ||
| } | ||
| //#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<Opts> { | ||
| (ajv: Ajv$2, options?: Opts): Ajv$2; | ||
| [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<AnySchemaObject>; | ||
| 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<Options[K]> } & { | ||
| code: InstanceCodeOptions; | ||
| }; | ||
| type InstanceOptions = Options & RequiredInstanceOptions; | ||
| interface Logger { | ||
| log(...args: unknown[]): unknown; | ||
| warn(...args: unknown[]): unknown; | ||
| error(...args: unknown[]): unknown; | ||
| } | ||
| declare class Ajv$2 { | ||
| 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<SchemaEnv>; | ||
| 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<unknown>; | ||
| validate<T>(schema: Schema | JSONSchemaType<T> | string, data: unknown): data is T; | ||
| validate<T>(schema: JTDSchemaType<T>, data: unknown): data is T; | ||
| validate<N extends never, T extends SomeJTDSchemaType>(schema: T, data: unknown): data is JTDDataType<T>; | ||
| validate<T>(schema: AsyncSchema, data: unknown | T): Promise<T>; | ||
| validate<T>(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise<T>; | ||
| compile<T = unknown>(schema: Schema | JSONSchemaType<T>, _meta?: boolean): ValidateFunction<T>; | ||
| compile<T = unknown>(schema: JTDSchemaType<T>, _meta?: boolean): ValidateFunction<T>; | ||
| compile<N extends never, T extends SomeJTDSchemaType>(schema: T, _meta?: boolean): ValidateFunction<JTDDataType<T>>; | ||
| compile<T = unknown>(schema: AsyncSchema, _meta?: boolean): AsyncValidateFunction<T>; | ||
| compile<T = unknown>(schema: AnySchema, _meta?: boolean): AnyValidateFunction<T>; | ||
| compileAsync<T = unknown>(schema: SchemaObject | JSONSchemaType<T>, _meta?: boolean): Promise<ValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: JTDSchemaType<T>, _meta?: boolean): Promise<ValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: AsyncSchema, meta?: boolean): Promise<AsyncValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: AnySchemaObject, meta?: boolean): Promise<AnyValidateFunction<T>>; | ||
| 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$2; | ||
| addMetaSchema(schema: AnySchemaObject, key?: string, | ||
| // schema key | ||
| _validateSchema?: boolean | "log"): Ajv$2; | ||
| validateSchema(schema: AnySchema, throwOrLogError?: boolean): boolean | Promise<unknown>; | ||
| getSchema<T = unknown>(keyRef: string): AnyValidateFunction<T> | undefined; | ||
| removeSchema(schemaKeyRef?: AnySchema | string | RegExp): Ajv$2; | ||
| addVocabulary(definitions: Vocabulary): Ajv$2; | ||
| addKeyword(kwdOrDef: string | KeywordDefinition, def?: KeywordDefinition): Ajv$2; | ||
| getKeyword(keyword: string): AddedKeywordDefinition | boolean; | ||
| removeKeyword(keyword: string): Ajv$2; | ||
| addFormat(name: string, format: Format): Ajv$2; | ||
| 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<string>; | ||
| 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$2; | ||
| } | ||
| 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<T extends string | number = string | number> { | ||
| instancePath: string; | ||
| parentData: { [K in T]: any }; | ||
| parentDataProperty: T; | ||
| rootData: Record<string, any> | any[]; | ||
| dynamicAnchors: { [Ref in string]?: ValidateFunction }; | ||
| } | ||
| interface ValidateFunction<T = unknown> { | ||
| (this: Ajv$2 | 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<T = unknown> extends ValidateFunction<T> { | ||
| (...args: Parameters<ValidateFunction<T>>): Promise<T>; | ||
| $async: true; | ||
| } | ||
| type AnyValidateFunction<T = any> = ValidateFunction<T> | AsyncValidateFunction<T>; | ||
| interface ErrorObject<K$1 extends string = string, P = Record<string, any>, 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<ValidateFunction>): boolean | Promise<any>; | ||
| errors?: Partial<ErrorObject>[]; | ||
| } | ||
| interface SchemaValidateFunction { | ||
| (schema: any, data: any, parentSchema?: AnySchemaObject, dataCxt?: DataValidationCxt): boolean | Promise<any>; | ||
| errors?: Partial<ErrorObject>[]; | ||
| } | ||
| 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<T extends string | number> = (data: T) => boolean; | ||
| type FormatCompare<T extends string | number> = (data1: T, data2: T) => number | undefined; | ||
| type AsyncFormatValidator<T extends string | number> = (data: T) => Promise<boolean>; | ||
| interface FormatDefinition<T extends string | number> { | ||
| type?: T extends string ? "string" | undefined : "number"; | ||
| validate: FormatValidator<T> | (T extends string ? string | RegExp : never); | ||
| async?: false | undefined; | ||
| compare?: FormatCompare<T>; | ||
| } | ||
| interface AsyncFormatDefinition<T extends string | number> { | ||
| type?: T extends string ? "string" | undefined : "number"; | ||
| validate: AsyncFormatValidator<T>; | ||
| async: true; | ||
| compare?: FormatCompare<T>; | ||
| } | ||
| type AddedFormat = true | RegExp | FormatValidator<string> | FormatDefinition<string> | FormatDefinition<number> | AsyncFormatDefinition<string> | AsyncFormatDefinition<number>; | ||
| 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$1 extends Ajv$2 { | ||
| _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<FormatsPluginOptions> { | ||
| 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-formats` default export, normalised through the CJS/ESM interop wrapper. */ | ||
| declare const addFormats: typeof formatsPlugin.default; | ||
| /** | ||
| * 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). | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`; pass a pre-configured Ajv instance to validate | ||
| * other dialects. The SDK bundles ajv internally but does not re-export `Ajv2020` (its type | ||
| * graph tips downstream declaration bundling — see #2339). To construct a custom 2020-12 | ||
| * instance, add `ajv` to your own dependencies (matching the SDK's pinned version) and | ||
| * `import { Ajv2020 } from 'ajv/dist/2020.js'` — `new Ajv(...)` is the draft-07 class and would | ||
| * silently downgrade dialect. | ||
| * | ||
| * @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" | ||
| * // import { Ajv2020 } from 'ajv/dist/2020.js'; | ||
| * const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true }); | ||
| * const validator = new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| * | ||
| * @example Register ajv-formats | ||
| * ```ts source="./ajvProvider.examples.ts#AjvJsonSchemaValidator_withFormats" | ||
| * // import { Ajv2020 } from 'ajv/dist/2020.js'; | ||
| * const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true }); | ||
| * addFormats(ajv); | ||
| * const validator = new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| */ | ||
| declare class AjvJsonSchemaValidator implements jsonSchemaValidator { | ||
| private _ajv; | ||
| /** True iff the constructor received a caller-supplied engine; the `$schema` check is skipped. */ | ||
| private readonly _userAjv; | ||
| /** | ||
| * @param ajv - Optional pre-configured AJV-compatible instance. When supplied, this instance is | ||
| * used for **every** schema regardless of its declared `$schema` (the caller owns dialect | ||
| * choice). When omitted, the provider constructs a single `Ajv2020` instance with | ||
| * `strict: false`, `validateFormats: true`, `validateSchema: false`, `allErrors: true`, and | ||
| * `ajv-formats` registered — **lazily, on the first {@linkcode getValidator} call**, so | ||
| * constructing the provider (e.g. as the default validator of a `Client`/`Server` that never | ||
| * validates a JSON Schema) does not pay the ajv + ajv-formats instantiation cost. The parameter | ||
| * is typed structurally so consumers who don't pass an instance need not have `ajv` installed. | ||
| */ | ||
| constructor(ajv?: AjvLike); | ||
| /** The underlying engine — the default instance is created on first use. */ | ||
| private get ajv(); | ||
| getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| /** | ||
| * Draft-07 AJV class, re-exported for consumers who need to opt back to the pre-SEP-1613 default. | ||
| * The full v1-equivalent construction is: | ||
| * | ||
| * ```ts | ||
| * const ajv = new Ajv({ strict: false, validateFormats: true, validateSchema: false, allErrors: true }); | ||
| * addFormats(ajv); | ||
| * new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| * | ||
| * (omitting `validateSchema: false` makes a 2020-12-stamped `$schema` fail with an opaque | ||
| * "no schema with key or ref …" engine error; omitting `addFormats` silently drops `format` | ||
| * validation that the v1 default had). | ||
| * | ||
| * The SDK bundles ajv internally but does not re-export `Ajv2020` (its type graph tips downstream | ||
| * declaration bundling — see #2339). To construct a custom 2020-12 instance, add `ajv` to your own | ||
| * dependencies (matching the SDK's pinned version) and `import { Ajv2020 } from 'ajv/dist/2020.js'`. | ||
| */ | ||
| declare const Ajv: typeof Ajv$1; | ||
| //#endregion | ||
| export { AjvJsonSchemaValidator as n, addFormats as r, Ajv as t }; | ||
| //# sourceMappingURL=ajvProvider-B_4czhCS.d.cts.map |
Sorry, the diff of this file is too big to display
| import { i as jsonSchemaValidator, n as JsonSchemaValidator, t as JsonSchemaType } from "./types-mS0yxCL0.mjs"; | ||
| //#region ../core-internal/src/validators/fastUriShim.d.ts | ||
| /** | ||
| * dts-bundling shim for `fast-uri`. | ||
| * | ||
| * ajv@8.18.0's published .d.ts does `import { URIComponent } from "fast-uri"`, | ||
| * but fast-uri ships its types as `export = namespace`, which rolldown's dts | ||
| * bundler can't destructure into a named import — it drops the import and | ||
| * leaves a dangling `URIComponent` reference in the bundled .d.mts (TS2304 for | ||
| * downstream consumers with `skipLibCheck: false`). | ||
| * | ||
| * The server/client tsdown configs map `fast-uri` to this file via | ||
| * `dts.compilerOptions.paths` so the type is inlined as a plain named export. | ||
| * Runtime code is unaffected (this is a `.d.ts`; the path mapping is dts-only). | ||
| */ | ||
| // Field-for-field copy of fast-uri@3.1.0's URIComponent (types/index.d.ts). | ||
| // Keep in sync when bumping fast-uri/ajv. | ||
| interface URIComponent { | ||
| scheme?: string; | ||
| userinfo?: string; | ||
| host?: string; | ||
| port?: number | string; | ||
| path?: string; | ||
| query?: string; | ||
| fragment?: string; | ||
| reference?: string; | ||
| nid?: string; | ||
| nss?: string; | ||
| resourceName?: string; | ||
| secure?: boolean; | ||
| uuid?: string; | ||
| error?: string; | ||
| } | ||
| //#endregion | ||
| //#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<string, number | undefined>; | ||
| 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<string>; | ||
| parent?: Scope; | ||
| } | ||
| interface ValueScopeOptions extends ScopeOptions { | ||
| scope: ScopeStore; | ||
| es5?: boolean; | ||
| lines?: boolean; | ||
| } | ||
| type ScopeStore = Record<string, ValueReference[] | undefined>; | ||
| type ScopeValues = { [Prefix in string]?: Map<unknown, ValueScopeName> }; | ||
| type ScopeValueSets = { [Prefix in string]?: Set<ValueScopeName> }; | ||
| declare enum UsedValueState { | ||
| Started = 0, | ||
| Completed = 1, | ||
| } | ||
| type UsedScopeValues = { [Prefix in string]?: Map<ValueScopeName, UsedValueState | undefined> }; | ||
| declare class Scope { | ||
| protected readonly _names: { [Prefix in string]?: NameGroup }; | ||
| protected readonly _prefixes?: Set<string>; | ||
| 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<string>; | ||
| 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<Name$1 extends string, Type$1> = undefined extends null ? `strictNullChecks must be true in tsconfig to use ${Name$1}` : Type$1; | ||
| type UnionToIntersection<U> = (U extends any ? (_: U) => void : never) extends ((_: infer I) => void) ? I : never; | ||
| type UncheckedPartialSchema<T> = Partial<UncheckedJSONSchemaType<T, true>>; | ||
| type JSONType<T extends string, IsPartial extends boolean> = 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<T, IsPartial extends boolean> = ( | ||
| // these two unions allow arbitrary unions of types | ||
| { | ||
| anyOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]; | ||
| } | { | ||
| oneOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]; | ||
| } | ({ | ||
| 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 ? NumberKeywords : T extends string ? StringKeywords : T extends boolean ? {} : never>) | ((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<T[K], false> & Nullable<T[K]> } & { | ||
| length: T["length"]; | ||
| }; | ||
| minItems: T["length"]; | ||
| } & ({ | ||
| maxItems: T["length"]; | ||
| } | { | ||
| additionalItems: false; | ||
| }) : T extends readonly any[] ? { | ||
| type: JSONType<"array", IsPartial>; | ||
| items: UncheckedJSONSchemaType<T[0], false>; | ||
| contains?: UncheckedPartialSchema<T[0]>; | ||
| minItems?: number; | ||
| maxItems?: number; | ||
| minContains?: number; | ||
| maxContains?: number; | ||
| uniqueItems?: true; | ||
| additionalItems?: never; | ||
| } : T extends Record<string, any> ? { | ||
| type: JSONType<"object", IsPartial>; | ||
| additionalProperties?: boolean | UncheckedJSONSchemaType<T[string], false>; | ||
| unevaluatedProperties?: boolean | UncheckedJSONSchemaType<T[string], false>; | ||
| properties?: IsPartial extends true ? Partial<UncheckedPropertiesSchema<T>> : UncheckedPropertiesSchema<T>; | ||
| patternProperties?: Record<string, UncheckedJSONSchemaType<T[string], false>>; | ||
| propertyNames?: Omit<UncheckedJSONSchemaType<string, false>, "type"> & { | ||
| type?: "string"; | ||
| }; | ||
| dependencies?: { [K in keyof T]?: readonly (keyof T)[] | UncheckedPartialSchema<T> }; | ||
| dependentRequired?: { [K in keyof T]?: readonly (keyof T)[] }; | ||
| dependentSchemas?: { [K in keyof T]?: UncheckedPartialSchema<T> }; | ||
| minProperties?: number; | ||
| maxProperties?: number; | ||
| } & (IsPartial extends true ? { | ||
| required: readonly (keyof T)[]; | ||
| } : [UncheckedRequiredMembers<T>] extends [never] ? { | ||
| required?: readonly UncheckedRequiredMembers<T>[]; | ||
| } : { | ||
| required: readonly UncheckedRequiredMembers<T>[]; | ||
| }) : T extends null ? { | ||
| type: JSONType<"null", IsPartial>; | ||
| nullable: true; | ||
| } : never) & { | ||
| allOf?: readonly UncheckedPartialSchema<T>[]; | ||
| anyOf?: readonly UncheckedPartialSchema<T>[]; | ||
| oneOf?: readonly UncheckedPartialSchema<T>[]; | ||
| if?: UncheckedPartialSchema<T>; | ||
| then?: UncheckedPartialSchema<T>; | ||
| else?: UncheckedPartialSchema<T>; | ||
| not?: UncheckedPartialSchema<T>; | ||
| })) & { | ||
| [keyword: string]: any; | ||
| $id?: string; | ||
| $ref?: string; | ||
| $defs?: Record<string, UncheckedJSONSchemaType<Known, true>>; | ||
| definitions?: Record<string, UncheckedJSONSchemaType<Known, true>>; | ||
| }; | ||
| type JSONSchemaType<T> = StrictNullChecksWrapper<"JSONSchemaType", UncheckedJSONSchemaType<T, false>>; | ||
| type Known = { | ||
| [key: string]: Known; | ||
| } | [Known, ...Known[]] | Known[] | number | string | boolean | null; | ||
| type UncheckedPropertiesSchema<T> = { [K in keyof T]-?: (UncheckedJSONSchemaType<T[K], false> & Nullable<T[K]>) | { | ||
| $ref: string; | ||
| } }; | ||
| type UncheckedRequiredMembers<T> = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T]; | ||
| type Nullable<T> = 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<string, SomeJTDSchemaType>; | ||
| optionalProperties?: Record<string, SomeJTDSchemaType>; | ||
| additionalProperties?: boolean; | ||
| } | { | ||
| properties?: Record<string, SomeJTDSchemaType>; | ||
| optionalProperties: Record<string, SomeJTDSchemaType>; | ||
| additionalProperties?: boolean; | ||
| } | { | ||
| discriminator: string; | ||
| mapping: Record<string, SomeJTDSchemaType>; | ||
| } | {}) & { | ||
| nullable?: boolean; | ||
| metadata?: Record<string, unknown>; | ||
| definitions?: Record<string, SomeJTDSchemaType>; | ||
| }; | ||
| /** required keys of an object, not undefined */ | ||
| type RequiredKeys<T> = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T]; | ||
| /** optional or undifined-able keys of an object */ | ||
| type OptionalKeys<T> = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T]; | ||
| /** type is true if T is a union type */ | ||
| type IsUnion_<T, U extends T = T> = false extends (T extends unknown ? ([U] extends [T] ? false : true) : never) ? false : true; | ||
| type IsUnion<T> = IsUnion_<T>; | ||
| /** type is true if T is identically E */ | ||
| type TypeEquality<T, E$1> = [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<T, E$1> = TypeEquality<T | null, E$1 | null>; | ||
| /** gets only the string literals of a type or null if a type isn't a string literal */ | ||
| type EnumString<T> = [T] extends [never] ? null : T extends string ? string extends T ? null : T : null; | ||
| /** true if type is a union of string literals */ | ||
| type IsEnum<T> = null extends EnumString<T> ? false : true; | ||
| /** true only if all types are array types (not tuples) */ | ||
| type IsElements<T> = false extends IsUnion<T> ? [T] extends [readonly unknown[]] ? undefined extends T[0.5] ? false : true : false : false; | ||
| /** true if the the type is a values type */ | ||
| type IsValues<T> = false extends IsUnion<T> ? TypeEquality<keyof T, string> : false; | ||
| /** true if type is a properties type and Union is false, or type is a discriminator type and Union is true */ | ||
| type IsRecord<T, Union extends boolean> = Union extends IsUnion<T> ? null extends EnumString<keyof T> ? false : true : false; | ||
| /** true if type represents an empty record */ | ||
| type IsEmptyRecord<T> = [T] extends [Record<string, never>] ? [T] extends [never] ? false : true : false; | ||
| /** actual schema */ | ||
| type JTDSchemaType<T, D extends Record<string, unknown> = Record<string, never>> = ( | ||
| // refs - where null wasn't specified, must match exactly | ||
| (null extends EnumString<keyof D> ? never : ({ [K in keyof D]: [T] extends [D[K]] ? { | ||
| ref: K; | ||
| } : never }[keyof D] & { | ||
| nullable?: false; | ||
| }) | (null extends T ? { [K in keyof D]: [Exclude<T, null>] extends [Exclude<D[K], null>] ? { | ||
| ref: K; | ||
| } : never }[keyof D] & { | ||
| nullable: true; | ||
| } : never)) | (unknown extends T ? { | ||
| nullable?: boolean; | ||
| } : never) | ((true extends NullTypeEquality<T, number> ? { | ||
| type: NumberType; | ||
| } : true extends NullTypeEquality<T, boolean> ? { | ||
| type: "boolean"; | ||
| } : true extends NullTypeEquality<T, string> ? { | ||
| type: StringType; | ||
| } : true extends NullTypeEquality<T, Date> ? { | ||
| type: "timestamp"; | ||
| } : true extends IsEnum<Exclude<T, null>> ? { | ||
| enum: EnumString<Exclude<T, null>>[]; | ||
| } : true extends IsElements<Exclude<T, null>> ? T extends readonly (infer E)[] ? { | ||
| elements: JTDSchemaType<E, D>; | ||
| } : never : true extends IsEmptyRecord<Exclude<T, null>> ? { | ||
| properties: Record<string, never>; | ||
| optionalProperties?: Record<string, never>; | ||
| } | { | ||
| optionalProperties: Record<string, never>; | ||
| } : true extends IsValues<Exclude<T, null>> ? T extends Record<string, infer V> ? { | ||
| values: JTDSchemaType<V, D>; | ||
| } : never : true extends IsRecord<Exclude<T, null>, false> ? ([RequiredKeys<Exclude<T, null>>] extends [never] ? { | ||
| properties?: Record<string, never>; | ||
| } : { | ||
| properties: { [K in RequiredKeys<T>]: JTDSchemaType<T[K], D> }; | ||
| }) & ([OptionalKeys<Exclude<T, null>>] extends [never] ? { | ||
| optionalProperties?: Record<string, never>; | ||
| } : { | ||
| optionalProperties: { [K in OptionalKeys<T>]: JTDSchemaType<Exclude<T[K], undefined>, D> }; | ||
| }) & { | ||
| additionalProperties?: boolean; | ||
| } : true extends IsRecord<Exclude<T, null>, true> ? { [K in keyof Exclude<T, null>]-?: Exclude<T, null>[K] extends string ? { | ||
| discriminator: K; | ||
| mapping: { [M in Exclude<T, null>[K]]: JTDSchemaType<Omit<T extends Record<K, M> ? T : never, K>, D> }; | ||
| } : never }[keyof Exclude<T, null>] : never) & (null extends T ? { | ||
| nullable: true; | ||
| } : { | ||
| nullable?: false; | ||
| }))) & { | ||
| metadata?: Record<string, unknown>; | ||
| definitions?: { [K in keyof D]: JTDSchemaType<D[K], D> }; | ||
| }; | ||
| type JTDDataDef<S, D extends Record<string, unknown>> = | ||
| // ref | ||
| (S extends { | ||
| ref: string; | ||
| } ? D extends { [K in S["ref"]]: infer V } ? JTDDataDef<V, D> : 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<E, D>[] : S extends { | ||
| properties: Record<string, unknown>; | ||
| optionalProperties?: Record<string, unknown>; | ||
| additionalProperties?: boolean; | ||
| } ? { -readonly [K in keyof S["properties"]]-?: JTDDataDef<S["properties"][K], D> } & { -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef<S["optionalProperties"][K], D> } & ([S["additionalProperties"]] extends [true] ? Record<string, unknown> : unknown) : S extends { | ||
| properties?: Record<string, unknown>; | ||
| optionalProperties: Record<string, unknown>; | ||
| additionalProperties?: boolean; | ||
| } ? { -readonly [K in keyof S["properties"]]-?: JTDDataDef<S["properties"][K], D> } & { -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef<S["optionalProperties"][K], D> } & ([S["additionalProperties"]] extends [true] ? Record<string, unknown> : unknown) : S extends { | ||
| values: infer V; | ||
| } ? Record<string, JTDDataDef<V, D>> : S extends { | ||
| discriminator: infer M; | ||
| mapping: Record<string, unknown>; | ||
| } ? [M] extends [string] ? { [K in keyof S["mapping"]]: JTDDataDef<S["mapping"][K], D> & { [KM in M]: K } }[keyof S["mapping"]] : never : unknown) | (S extends { | ||
| nullable: true; | ||
| } ? null : never); | ||
| type JTDDataType<S> = S extends { | ||
| definitions: Record<string, unknown>; | ||
| } ? JTDDataDef<S, S["definitions"]> : JTDDataDef<S, Record<string, never>>; | ||
| //#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<ErrorObject>[]; | ||
| readonly ajv: true; | ||
| readonly validation: true; | ||
| constructor(errors: Partial<ErrorObject>[]); | ||
| } | ||
| //#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<Opts> { | ||
| (ajv: Ajv$2, options?: Opts): Ajv$2; | ||
| [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<AnySchemaObject>; | ||
| 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<Options[K]> } & { | ||
| code: InstanceCodeOptions; | ||
| }; | ||
| type InstanceOptions = Options & RequiredInstanceOptions; | ||
| interface Logger { | ||
| log(...args: unknown[]): unknown; | ||
| warn(...args: unknown[]): unknown; | ||
| error(...args: unknown[]): unknown; | ||
| } | ||
| declare class Ajv$2 { | ||
| 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<SchemaEnv>; | ||
| 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<unknown>; | ||
| validate<T>(schema: Schema | JSONSchemaType<T> | string, data: unknown): data is T; | ||
| validate<T>(schema: JTDSchemaType<T>, data: unknown): data is T; | ||
| validate<N extends never, T extends SomeJTDSchemaType>(schema: T, data: unknown): data is JTDDataType<T>; | ||
| validate<T>(schema: AsyncSchema, data: unknown | T): Promise<T>; | ||
| validate<T>(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise<T>; | ||
| compile<T = unknown>(schema: Schema | JSONSchemaType<T>, _meta?: boolean): ValidateFunction<T>; | ||
| compile<T = unknown>(schema: JTDSchemaType<T>, _meta?: boolean): ValidateFunction<T>; | ||
| compile<N extends never, T extends SomeJTDSchemaType>(schema: T, _meta?: boolean): ValidateFunction<JTDDataType<T>>; | ||
| compile<T = unknown>(schema: AsyncSchema, _meta?: boolean): AsyncValidateFunction<T>; | ||
| compile<T = unknown>(schema: AnySchema, _meta?: boolean): AnyValidateFunction<T>; | ||
| compileAsync<T = unknown>(schema: SchemaObject | JSONSchemaType<T>, _meta?: boolean): Promise<ValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: JTDSchemaType<T>, _meta?: boolean): Promise<ValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: AsyncSchema, meta?: boolean): Promise<AsyncValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: AnySchemaObject, meta?: boolean): Promise<AnyValidateFunction<T>>; | ||
| 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$2; | ||
| addMetaSchema(schema: AnySchemaObject, key?: string, | ||
| // schema key | ||
| _validateSchema?: boolean | "log"): Ajv$2; | ||
| validateSchema(schema: AnySchema, throwOrLogError?: boolean): boolean | Promise<unknown>; | ||
| getSchema<T = unknown>(keyRef: string): AnyValidateFunction<T> | undefined; | ||
| removeSchema(schemaKeyRef?: AnySchema | string | RegExp): Ajv$2; | ||
| addVocabulary(definitions: Vocabulary): Ajv$2; | ||
| addKeyword(kwdOrDef: string | KeywordDefinition, def?: KeywordDefinition): Ajv$2; | ||
| getKeyword(keyword: string): AddedKeywordDefinition | boolean; | ||
| removeKeyword(keyword: string): Ajv$2; | ||
| addFormat(name: string, format: Format): Ajv$2; | ||
| 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<string>; | ||
| 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$2; | ||
| } | ||
| 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<T extends string | number = string | number> { | ||
| instancePath: string; | ||
| parentData: { [K in T]: any }; | ||
| parentDataProperty: T; | ||
| rootData: Record<string, any> | any[]; | ||
| dynamicAnchors: { [Ref in string]?: ValidateFunction }; | ||
| } | ||
| interface ValidateFunction<T = unknown> { | ||
| (this: Ajv$2 | 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<T = unknown> extends ValidateFunction<T> { | ||
| (...args: Parameters<ValidateFunction<T>>): Promise<T>; | ||
| $async: true; | ||
| } | ||
| type AnyValidateFunction<T = any> = ValidateFunction<T> | AsyncValidateFunction<T>; | ||
| interface ErrorObject<K$1 extends string = string, P = Record<string, any>, 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<ValidateFunction>): boolean | Promise<any>; | ||
| errors?: Partial<ErrorObject>[]; | ||
| } | ||
| interface SchemaValidateFunction { | ||
| (schema: any, data: any, parentSchema?: AnySchemaObject, dataCxt?: DataValidationCxt): boolean | Promise<any>; | ||
| errors?: Partial<ErrorObject>[]; | ||
| } | ||
| 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<T extends string | number> = (data: T) => boolean; | ||
| type FormatCompare<T extends string | number> = (data1: T, data2: T) => number | undefined; | ||
| type AsyncFormatValidator<T extends string | number> = (data: T) => Promise<boolean>; | ||
| interface FormatDefinition<T extends string | number> { | ||
| type?: T extends string ? "string" | undefined : "number"; | ||
| validate: FormatValidator<T> | (T extends string ? string | RegExp : never); | ||
| async?: false | undefined; | ||
| compare?: FormatCompare<T>; | ||
| } | ||
| interface AsyncFormatDefinition<T extends string | number> { | ||
| type?: T extends string ? "string" | undefined : "number"; | ||
| validate: AsyncFormatValidator<T>; | ||
| async: true; | ||
| compare?: FormatCompare<T>; | ||
| } | ||
| type AddedFormat = true | RegExp | FormatValidator<string> | FormatDefinition<string> | FormatDefinition<number> | AsyncFormatDefinition<string> | AsyncFormatDefinition<number>; | ||
| 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$1 extends Ajv$2 { | ||
| _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<FormatsPluginOptions> { | ||
| 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-formats` default export, normalised through the CJS/ESM interop wrapper. */ | ||
| declare const addFormats: typeof formatsPlugin.default; | ||
| /** | ||
| * 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). | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`; pass a pre-configured Ajv instance to validate | ||
| * other dialects. The SDK bundles ajv internally but does not re-export `Ajv2020` (its type | ||
| * graph tips downstream declaration bundling — see #2339). To construct a custom 2020-12 | ||
| * instance, add `ajv` to your own dependencies (matching the SDK's pinned version) and | ||
| * `import { Ajv2020 } from 'ajv/dist/2020.js'` — `new Ajv(...)` is the draft-07 class and would | ||
| * silently downgrade dialect. | ||
| * | ||
| * @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" | ||
| * // import { Ajv2020 } from 'ajv/dist/2020.js'; | ||
| * const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true }); | ||
| * const validator = new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| * | ||
| * @example Register ajv-formats | ||
| * ```ts source="./ajvProvider.examples.ts#AjvJsonSchemaValidator_withFormats" | ||
| * // import { Ajv2020 } from 'ajv/dist/2020.js'; | ||
| * const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true }); | ||
| * addFormats(ajv); | ||
| * const validator = new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| */ | ||
| declare class AjvJsonSchemaValidator implements jsonSchemaValidator { | ||
| private _ajv; | ||
| /** True iff the constructor received a caller-supplied engine; the `$schema` check is skipped. */ | ||
| private readonly _userAjv; | ||
| /** | ||
| * @param ajv - Optional pre-configured AJV-compatible instance. When supplied, this instance is | ||
| * used for **every** schema regardless of its declared `$schema` (the caller owns dialect | ||
| * choice). When omitted, the provider constructs a single `Ajv2020` instance with | ||
| * `strict: false`, `validateFormats: true`, `validateSchema: false`, `allErrors: true`, and | ||
| * `ajv-formats` registered — **lazily, on the first {@linkcode getValidator} call**, so | ||
| * constructing the provider (e.g. as the default validator of a `Client`/`Server` that never | ||
| * validates a JSON Schema) does not pay the ajv + ajv-formats instantiation cost. The parameter | ||
| * is typed structurally so consumers who don't pass an instance need not have `ajv` installed. | ||
| */ | ||
| constructor(ajv?: AjvLike); | ||
| /** The underlying engine — the default instance is created on first use. */ | ||
| private get ajv(); | ||
| getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| /** | ||
| * Draft-07 AJV class, re-exported for consumers who need to opt back to the pre-SEP-1613 default. | ||
| * The full v1-equivalent construction is: | ||
| * | ||
| * ```ts | ||
| * const ajv = new Ajv({ strict: false, validateFormats: true, validateSchema: false, allErrors: true }); | ||
| * addFormats(ajv); | ||
| * new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| * | ||
| * (omitting `validateSchema: false` makes a 2020-12-stamped `$schema` fail with an opaque | ||
| * "no schema with key or ref …" engine error; omitting `addFormats` silently drops `format` | ||
| * validation that the v1 default had). | ||
| * | ||
| * The SDK bundles ajv internally but does not re-export `Ajv2020` (its type graph tips downstream | ||
| * declaration bundling — see #2339). To construct a custom 2020-12 instance, add `ajv` to your own | ||
| * dependencies (matching the SDK's pinned version) and `import { Ajv2020 } from 'ajv/dist/2020.js'`. | ||
| */ | ||
| declare const Ajv: typeof Ajv$1; | ||
| //#endregion | ||
| export { AjvJsonSchemaValidator as n, addFormats as r, Ajv as t }; | ||
| //# sourceMappingURL=ajvProvider-BdSo9BII.d.mts.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js | ||
| function deepCompareStrict(a, b) { | ||
| const typeofa = typeof a; | ||
| if (typeofa !== typeof b) return false; | ||
| if (Array.isArray(a)) { | ||
| if (!Array.isArray(b)) return false; | ||
| const length = a.length; | ||
| if (length !== b.length) return false; | ||
| for (let i = 0; i < length; i++) if (!deepCompareStrict(a[i], b[i])) return false; | ||
| return true; | ||
| } | ||
| if (typeofa === "object") { | ||
| if (!a || !b) return a === b; | ||
| const aKeys = Object.keys(a); | ||
| const bKeys = Object.keys(b); | ||
| if (aKeys.length !== bKeys.length) return false; | ||
| for (const k of aKeys) if (!deepCompareStrict(a[k], b[k])) return false; | ||
| return true; | ||
| } | ||
| return a === b; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/pointer.js | ||
| function encodePointer(p) { | ||
| return encodeURI(escapePointer(p)); | ||
| } | ||
| function escapePointer(p) { | ||
| return p.replace(/~/g, "~0").replace(/\//g, "~1"); | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/dereference.js | ||
| const schemaArrayKeyword = { | ||
| prefixItems: true, | ||
| items: true, | ||
| allOf: true, | ||
| anyOf: true, | ||
| oneOf: true | ||
| }; | ||
| const schemaMapKeyword = { | ||
| $defs: true, | ||
| definitions: true, | ||
| properties: true, | ||
| patternProperties: true, | ||
| dependentSchemas: true | ||
| }; | ||
| const ignoredKeyword = { | ||
| id: true, | ||
| $id: true, | ||
| $ref: true, | ||
| $schema: true, | ||
| $anchor: true, | ||
| $vocabulary: true, | ||
| $comment: true, | ||
| default: true, | ||
| enum: true, | ||
| const: true, | ||
| required: true, | ||
| type: true, | ||
| maximum: true, | ||
| minimum: true, | ||
| exclusiveMaximum: true, | ||
| exclusiveMinimum: true, | ||
| multipleOf: true, | ||
| maxLength: true, | ||
| minLength: true, | ||
| pattern: true, | ||
| format: true, | ||
| maxItems: true, | ||
| minItems: true, | ||
| uniqueItems: true, | ||
| maxProperties: true, | ||
| minProperties: true | ||
| }; | ||
| let initialBaseURI = typeof self !== "undefined" && self.location && self.location.origin !== "null" ? new URL(self.location.origin + self.location.pathname + location.search) : new URL("https://github.com/cfworker"); | ||
| function dereference(schema, lookup = Object.create(null), baseURI = initialBaseURI, basePointer = "") { | ||
| if (schema && typeof schema === "object" && !Array.isArray(schema)) { | ||
| const id = schema.$id || schema.id; | ||
| if (id) { | ||
| const url = new URL(id, baseURI.href); | ||
| if (url.hash.length > 1) lookup[url.href] = schema; | ||
| else { | ||
| url.hash = ""; | ||
| if (basePointer === "") baseURI = url; | ||
| else dereference(schema, lookup, baseURI); | ||
| } | ||
| } | ||
| } else if (schema !== true && schema !== false) return lookup; | ||
| const schemaURI = baseURI.href + (basePointer ? "#" + basePointer : ""); | ||
| if (lookup[schemaURI] !== void 0) throw new Error(`Duplicate schema URI "${schemaURI}".`); | ||
| lookup[schemaURI] = schema; | ||
| if (schema === true || schema === false) return lookup; | ||
| if (schema.__absolute_uri__ === void 0) Object.defineProperty(schema, "__absolute_uri__", { | ||
| enumerable: false, | ||
| value: schemaURI | ||
| }); | ||
| if (schema.$ref && schema.__absolute_ref__ === void 0) { | ||
| const url = new URL(schema.$ref, baseURI.href); | ||
| url.hash = url.hash; | ||
| Object.defineProperty(schema, "__absolute_ref__", { | ||
| enumerable: false, | ||
| value: url.href | ||
| }); | ||
| } | ||
| if (schema.$recursiveRef && schema.__absolute_recursive_ref__ === void 0) { | ||
| const url = new URL(schema.$recursiveRef, baseURI.href); | ||
| url.hash = url.hash; | ||
| Object.defineProperty(schema, "__absolute_recursive_ref__", { | ||
| enumerable: false, | ||
| value: url.href | ||
| }); | ||
| } | ||
| if (schema.$anchor) { | ||
| const url = new URL("#" + schema.$anchor, baseURI.href); | ||
| lookup[url.href] = schema; | ||
| } | ||
| for (let key in schema) { | ||
| if (ignoredKeyword[key]) continue; | ||
| const keyBase = `${basePointer}/${encodePointer(key)}`; | ||
| const subSchema = schema[key]; | ||
| if (Array.isArray(subSchema)) { | ||
| if (schemaArrayKeyword[key]) { | ||
| const length = subSchema.length; | ||
| for (let i = 0; i < length; i++) dereference(subSchema[i], lookup, baseURI, `${keyBase}/${i}`); | ||
| } | ||
| } else if (schemaMapKeyword[key]) for (let subKey in subSchema) dereference(subSchema[subKey], lookup, baseURI, `${keyBase}/${encodePointer(subKey)}`); | ||
| else dereference(subSchema, lookup, baseURI, keyBase); | ||
| } | ||
| return lookup; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/format.js | ||
| const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; | ||
| const DAYS = [ | ||
| 0, | ||
| 31, | ||
| 28, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 30, | ||
| 31 | ||
| ]; | ||
| const TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; | ||
| const HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i; | ||
| const URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; | ||
| const URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; | ||
| const URL_ = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; | ||
| const UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; | ||
| const JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; | ||
| const JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; | ||
| const RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; | ||
| const EMAIL = (input) => { | ||
| if (input[0] === "\"") return false; | ||
| const [name, host, ...rest] = input.split("@"); | ||
| if (!name || !host || rest.length !== 0 || name.length > 64 || host.length > 253) return false; | ||
| if (name[0] === "." || name.endsWith(".") || name.includes("..")) return false; | ||
| if (!/^[a-z0-9.-]+$/i.test(host) || !/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(name)) return false; | ||
| return host.split(".").every((part) => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(part)); | ||
| }; | ||
| const IPV4 = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/; | ||
| const IPV6 = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i; | ||
| const DURATION = (input) => input.length > 1 && input.length < 80 && (/^P\d+([.,]\d+)?W$/.test(input) || /^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(input) && /^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(input)); | ||
| function bind(r) { | ||
| return r.test.bind(r); | ||
| } | ||
| const format = { | ||
| date, | ||
| time: time.bind(void 0, false), | ||
| "date-time": date_time, | ||
| duration: DURATION, | ||
| uri, | ||
| "uri-reference": bind(URIREF), | ||
| "uri-template": bind(URITEMPLATE), | ||
| url: bind(URL_), | ||
| email: EMAIL, | ||
| hostname: bind(HOSTNAME), | ||
| ipv4: bind(IPV4), | ||
| ipv6: bind(IPV6), | ||
| regex, | ||
| uuid: bind(UUID), | ||
| "json-pointer": bind(JSON_POINTER), | ||
| "json-pointer-uri-fragment": bind(JSON_POINTER_URI_FRAGMENT), | ||
| "relative-json-pointer": bind(RELATIVE_JSON_POINTER) | ||
| }; | ||
| function isLeapYear(year) { | ||
| return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); | ||
| } | ||
| function date(str) { | ||
| const matches = str.match(DATE); | ||
| if (!matches) return false; | ||
| const year = +matches[1]; | ||
| const month = +matches[2]; | ||
| const day = +matches[3]; | ||
| return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); | ||
| } | ||
| function time(full, str) { | ||
| const matches = str.match(TIME); | ||
| if (!matches) return false; | ||
| const hour = +matches[1]; | ||
| const minute = +matches[2]; | ||
| const second = +matches[3]; | ||
| const timeZone = !!matches[5]; | ||
| return (hour <= 23 && minute <= 59 && second <= 59 || hour == 23 && minute == 59 && second == 60) && (!full || timeZone); | ||
| } | ||
| const DATE_TIME_SEPARATOR = /t|\s/i; | ||
| function date_time(str) { | ||
| const dateTime = str.split(DATE_TIME_SEPARATOR); | ||
| return dateTime.length == 2 && date(dateTime[0]) && time(true, dateTime[1]); | ||
| } | ||
| const NOT_URI_FRAGMENT = /\/|:/; | ||
| const URI_PATTERN = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; | ||
| function uri(str) { | ||
| return NOT_URI_FRAGMENT.test(str) && URI_PATTERN.test(str); | ||
| } | ||
| const Z_ANCHOR = /[^\\]\\Z/; | ||
| function regex(str) { | ||
| if (Z_ANCHOR.test(str)) return false; | ||
| try { | ||
| new RegExp(str, "u"); | ||
| return true; | ||
| } catch (e) { | ||
| return false; | ||
| } | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js | ||
| function ucs2length(s) { | ||
| let result = 0; | ||
| let length = s.length; | ||
| let index = 0; | ||
| let charCode; | ||
| while (index < length) { | ||
| result++; | ||
| charCode = s.charCodeAt(index++); | ||
| if (charCode >= 55296 && charCode <= 56319 && index < length) { | ||
| charCode = s.charCodeAt(index); | ||
| if ((charCode & 64512) == 56320) index++; | ||
| } | ||
| } | ||
| return result; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validate.js | ||
| function validate(instance, schema, draft = "2019-09", lookup = dereference(schema), shortCircuit = true, recursiveAnchor = null, instanceLocation = "#", schemaLocation = "#", evaluated = Object.create(null)) { | ||
| if (schema === true) return { | ||
| valid: true, | ||
| errors: [] | ||
| }; | ||
| if (schema === false) return { | ||
| valid: false, | ||
| errors: [{ | ||
| instanceLocation, | ||
| keyword: "false", | ||
| keywordLocation: instanceLocation, | ||
| error: "False boolean schema." | ||
| }] | ||
| }; | ||
| const rawInstanceType = typeof instance; | ||
| let instanceType; | ||
| switch (rawInstanceType) { | ||
| case "boolean": | ||
| case "number": | ||
| case "string": | ||
| instanceType = rawInstanceType; | ||
| break; | ||
| case "object": | ||
| if (instance === null) instanceType = "null"; | ||
| else if (Array.isArray(instance)) instanceType = "array"; | ||
| else instanceType = "object"; | ||
| break; | ||
| default: throw new Error(`Instances of "${rawInstanceType}" type are not supported.`); | ||
| } | ||
| const { $ref, $recursiveRef, $recursiveAnchor, type: $type, const: $const, enum: $enum, required: $required, not: $not, anyOf: $anyOf, allOf: $allOf, oneOf: $oneOf, if: $if, then: $then, else: $else, format: $format, properties: $properties, patternProperties: $patternProperties, additionalProperties: $additionalProperties, unevaluatedProperties: $unevaluatedProperties, minProperties: $minProperties, maxProperties: $maxProperties, propertyNames: $propertyNames, dependentRequired: $dependentRequired, dependentSchemas: $dependentSchemas, dependencies: $dependencies, prefixItems: $prefixItems, items: $items, additionalItems: $additionalItems, unevaluatedItems: $unevaluatedItems, contains: $contains, minContains: $minContains, maxContains: $maxContains, minItems: $minItems, maxItems: $maxItems, uniqueItems: $uniqueItems, minimum: $minimum, maximum: $maximum, exclusiveMinimum: $exclusiveMinimum, exclusiveMaximum: $exclusiveMaximum, multipleOf: $multipleOf, minLength: $minLength, maxLength: $maxLength, pattern: $pattern, __absolute_ref__, __absolute_recursive_ref__ } = schema; | ||
| const errors = []; | ||
| if ($recursiveAnchor === true && recursiveAnchor === null) recursiveAnchor = schema; | ||
| if ($recursiveRef === "#") { | ||
| const refSchema = recursiveAnchor === null ? lookup[__absolute_recursive_ref__] : recursiveAnchor; | ||
| const keywordLocation = `${schemaLocation}/$recursiveRef`; | ||
| const result = validate(instance, recursiveAnchor === null ? schema : recursiveAnchor, draft, lookup, shortCircuit, refSchema, instanceLocation, keywordLocation, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "$recursiveRef", | ||
| keywordLocation, | ||
| error: "A subschema had errors." | ||
| }, ...result.errors); | ||
| } | ||
| if ($ref !== void 0) { | ||
| const refSchema = lookup[__absolute_ref__ || $ref]; | ||
| if (refSchema === void 0) { | ||
| let message = `Unresolved $ref "${$ref}".`; | ||
| if (__absolute_ref__ && __absolute_ref__ !== $ref) message += ` Absolute URI "${__absolute_ref__}".`; | ||
| message += `\nKnown schemas:\n- ${Object.keys(lookup).join("\n- ")}`; | ||
| throw new Error(message); | ||
| } | ||
| const keywordLocation = `${schemaLocation}/$ref`; | ||
| const result = validate(instance, refSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "$ref", | ||
| keywordLocation, | ||
| error: "A subschema had errors." | ||
| }, ...result.errors); | ||
| if (draft === "4" || draft === "7") return { | ||
| valid: errors.length === 0, | ||
| errors | ||
| }; | ||
| } | ||
| if (Array.isArray($type)) { | ||
| let length = $type.length; | ||
| let valid = false; | ||
| for (let i = 0; i < length; i++) if (instanceType === $type[i] || $type[i] === "integer" && instanceType === "number" && instance % 1 === 0 && instance === instance) { | ||
| valid = true; | ||
| break; | ||
| } | ||
| if (!valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type.join("\", \"")}".` | ||
| }); | ||
| } else if ($type === "integer") { | ||
| if (instanceType !== "number" || instance % 1 || instance !== instance) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type}".` | ||
| }); | ||
| } else if ($type !== void 0 && instanceType !== $type) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type}".` | ||
| }); | ||
| if ($const !== void 0) { | ||
| if (instanceType === "object" || instanceType === "array") { | ||
| if (!deepCompareStrict(instance, $const)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "const", | ||
| keywordLocation: `${schemaLocation}/const`, | ||
| error: `Instance does not match ${JSON.stringify($const)}.` | ||
| }); | ||
| } else if (instance !== $const) errors.push({ | ||
| instanceLocation, | ||
| keyword: "const", | ||
| keywordLocation: `${schemaLocation}/const`, | ||
| error: `Instance does not match ${JSON.stringify($const)}.` | ||
| }); | ||
| } | ||
| if ($enum !== void 0) { | ||
| if (instanceType === "object" || instanceType === "array") { | ||
| if (!$enum.some((value) => deepCompareStrict(instance, value))) errors.push({ | ||
| instanceLocation, | ||
| keyword: "enum", | ||
| keywordLocation: `${schemaLocation}/enum`, | ||
| error: `Instance does not match any of ${JSON.stringify($enum)}.` | ||
| }); | ||
| } else if (!$enum.some((value) => instance === value)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "enum", | ||
| keywordLocation: `${schemaLocation}/enum`, | ||
| error: `Instance does not match any of ${JSON.stringify($enum)}.` | ||
| }); | ||
| } | ||
| if ($not !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/not`; | ||
| if (validate(instance, $not, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation).valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "not", | ||
| keywordLocation, | ||
| error: "Instance matched \"not\" schema." | ||
| }); | ||
| } | ||
| let subEvaluateds = []; | ||
| if ($anyOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/anyOf`; | ||
| const errorsLength = errors.length; | ||
| let anyValid = false; | ||
| for (let i = 0; i < $anyOf.length; i++) { | ||
| const subSchema = $anyOf[i]; | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| anyValid = anyValid || result.valid; | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| } | ||
| if (anyValid) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "anyOf", | ||
| keywordLocation, | ||
| error: "Instance does not match any subschemas." | ||
| }); | ||
| } | ||
| if ($allOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/allOf`; | ||
| const errorsLength = errors.length; | ||
| let allValid = true; | ||
| for (let i = 0; i < $allOf.length; i++) { | ||
| const subSchema = $allOf[i]; | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| allValid = allValid && result.valid; | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| } | ||
| if (allValid) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "allOf", | ||
| keywordLocation, | ||
| error: `Instance does not match every subschema.` | ||
| }); | ||
| } | ||
| if ($oneOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/oneOf`; | ||
| const errorsLength = errors.length; | ||
| const matches = $oneOf.filter((subSchema, i) => { | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| return result.valid; | ||
| }).length; | ||
| if (matches === 1) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "oneOf", | ||
| keywordLocation, | ||
| error: `Instance does not match exactly one subschema (${matches} matches).` | ||
| }); | ||
| } | ||
| if (instanceType === "object" || instanceType === "array") Object.assign(evaluated, ...subEvaluateds); | ||
| if ($if !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/if`; | ||
| if (validate(instance, $if, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated).valid) { | ||
| if ($then !== void 0) { | ||
| const thenResult = validate(instance, $then, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/then`, evaluated); | ||
| if (!thenResult.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "if", | ||
| keywordLocation, | ||
| error: `Instance does not match "then" schema.` | ||
| }, ...thenResult.errors); | ||
| } | ||
| } else if ($else !== void 0) { | ||
| const elseResult = validate(instance, $else, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/else`, evaluated); | ||
| if (!elseResult.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "if", | ||
| keywordLocation, | ||
| error: `Instance does not match "else" schema.` | ||
| }, ...elseResult.errors); | ||
| } | ||
| } | ||
| if (instanceType === "object") { | ||
| if ($required !== void 0) { | ||
| for (const key of $required) if (!(key in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "required", | ||
| keywordLocation: `${schemaLocation}/required`, | ||
| error: `Instance does not have required property "${key}".` | ||
| }); | ||
| } | ||
| const keys = Object.keys(instance); | ||
| if ($minProperties !== void 0 && keys.length < $minProperties) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minProperties", | ||
| keywordLocation: `${schemaLocation}/minProperties`, | ||
| error: `Instance does not have at least ${$minProperties} properties.` | ||
| }); | ||
| if ($maxProperties !== void 0 && keys.length > $maxProperties) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxProperties", | ||
| keywordLocation: `${schemaLocation}/maxProperties`, | ||
| error: `Instance does not have at least ${$maxProperties} properties.` | ||
| }); | ||
| if ($propertyNames !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/propertyNames`; | ||
| for (const key in instance) { | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(key, $propertyNames, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "propertyNames", | ||
| keywordLocation, | ||
| error: `Property name "${key}" does not match schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($dependentRequired !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/dependantRequired`; | ||
| for (const key in $dependentRequired) if (key in instance) { | ||
| const required = $dependentRequired[key]; | ||
| for (const dependantKey of required) if (!(dependantKey in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependentRequired", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not have "${dependantKey}".` | ||
| }); | ||
| } | ||
| } | ||
| if ($dependentSchemas !== void 0) for (const key in $dependentSchemas) { | ||
| const keywordLocation = `${schemaLocation}/dependentSchemas`; | ||
| if (key in instance) { | ||
| const result = validate(instance, $dependentSchemas[key], draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependentSchemas", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not match dependant schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($dependencies !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/dependencies`; | ||
| for (const key in $dependencies) if (key in instance) { | ||
| const propsOrSchema = $dependencies[key]; | ||
| if (Array.isArray(propsOrSchema)) { | ||
| for (const dependantKey of propsOrSchema) if (!(dependantKey in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependencies", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not have "${dependantKey}".` | ||
| }); | ||
| } else { | ||
| const result = validate(instance, propsOrSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependencies", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not match dependant schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| const thisEvaluated = Object.create(null); | ||
| let stop = false; | ||
| if ($properties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/properties`; | ||
| for (const key in $properties) { | ||
| if (!(key in instance)) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $properties[key], draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(key)}`); | ||
| if (result.valid) evaluated[key] = thisEvaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "properties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } | ||
| if (!stop && $patternProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/patternProperties`; | ||
| for (const pattern in $patternProperties) { | ||
| const regex$1 = new RegExp(pattern, "u"); | ||
| const subSchema = $patternProperties[pattern]; | ||
| for (const key in instance) { | ||
| if (!regex$1.test(key)) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], subSchema, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(pattern)}`); | ||
| if (result.valid) evaluated[key] = thisEvaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "patternProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" matches pattern "${pattern}" but does not match associated schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| if (!stop && $additionalProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/additionalProperties`; | ||
| for (const key in instance) { | ||
| if (thisEvaluated[key]) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $additionalProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (result.valid) evaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "additionalProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match additional properties schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } else if (!stop && $unevaluatedProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/unevaluatedProperties`; | ||
| for (const key in instance) if (!evaluated[key]) { | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $unevaluatedProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (result.valid) evaluated[key] = true; | ||
| else errors.push({ | ||
| instanceLocation, | ||
| keyword: "unevaluatedProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match unevaluated properties schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } else if (instanceType === "array") { | ||
| if ($maxItems !== void 0 && instance.length > $maxItems) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxItems", | ||
| keywordLocation: `${schemaLocation}/maxItems`, | ||
| error: `Array has too many items (${instance.length} > ${$maxItems}).` | ||
| }); | ||
| if ($minItems !== void 0 && instance.length < $minItems) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minItems", | ||
| keywordLocation: `${schemaLocation}/minItems`, | ||
| error: `Array has too few items (${instance.length} < ${$minItems}).` | ||
| }); | ||
| const length = instance.length; | ||
| let i = 0; | ||
| let stop = false; | ||
| if ($prefixItems !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/prefixItems`; | ||
| const length2 = Math.min($prefixItems.length, length); | ||
| for (; i < length2; i++) { | ||
| const result = validate(instance[i], $prefixItems[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "prefixItems", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } | ||
| if ($items !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/items`; | ||
| if (Array.isArray($items)) { | ||
| const length2 = Math.min($items.length, length); | ||
| for (; i < length2; i++) { | ||
| const result = validate(instance[i], $items[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "items", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } else for (; i < length; i++) { | ||
| const result = validate(instance[i], $items, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "items", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| if (!stop && $additionalItems !== void 0) { | ||
| const keywordLocation$1 = `${schemaLocation}/additionalItems`; | ||
| for (; i < length; i++) { | ||
| const result = validate(instance[i], $additionalItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation$1); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "additionalItems", | ||
| keywordLocation: keywordLocation$1, | ||
| error: `Items did not match additional items schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| if ($contains !== void 0) if (length === 0 && $minContains === void 0) errors.push({ | ||
| instanceLocation, | ||
| keyword: "contains", | ||
| keywordLocation: `${schemaLocation}/contains`, | ||
| error: `Array is empty. It must contain at least one item matching the schema.` | ||
| }); | ||
| else if ($minContains !== void 0 && length < $minContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minContains", | ||
| keywordLocation: `${schemaLocation}/minContains`, | ||
| error: `Array has less items (${length}) than minContains (${$minContains}).` | ||
| }); | ||
| else { | ||
| const keywordLocation = `${schemaLocation}/contains`; | ||
| const errorsLength = errors.length; | ||
| let contained = 0; | ||
| for (let j = 0; j < length; j++) { | ||
| const result = validate(instance[j], $contains, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${j}`, keywordLocation); | ||
| if (result.valid) { | ||
| evaluated[j] = true; | ||
| contained++; | ||
| } else errors.push(...result.errors); | ||
| } | ||
| if (contained >= ($minContains || 0)) errors.length = errorsLength; | ||
| if ($minContains === void 0 && $maxContains === void 0 && contained === 0) errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "contains", | ||
| keywordLocation, | ||
| error: `Array does not contain item matching schema.` | ||
| }); | ||
| else if ($minContains !== void 0 && contained < $minContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minContains", | ||
| keywordLocation: `${schemaLocation}/minContains`, | ||
| error: `Array must contain at least ${$minContains} items matching schema. Only ${contained} items were found.` | ||
| }); | ||
| else if ($maxContains !== void 0 && contained > $maxContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxContains", | ||
| keywordLocation: `${schemaLocation}/maxContains`, | ||
| error: `Array may contain at most ${$maxContains} items matching schema. ${contained} items were found.` | ||
| }); | ||
| } | ||
| if (!stop && $unevaluatedItems !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/unevaluatedItems`; | ||
| for (; i < length; i++) { | ||
| if (evaluated[i]) continue; | ||
| const result = validate(instance[i], $unevaluatedItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation); | ||
| evaluated[i] = true; | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "unevaluatedItems", | ||
| keywordLocation, | ||
| error: `Items did not match unevaluated items schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($uniqueItems) for (let j = 0; j < length; j++) { | ||
| const a = instance[j]; | ||
| const ao = typeof a === "object" && a !== null; | ||
| for (let k = 0; k < length; k++) { | ||
| if (j === k) continue; | ||
| const b = instance[k]; | ||
| if (a === b || ao && typeof b === "object" && b !== null && deepCompareStrict(a, b)) { | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "uniqueItems", | ||
| keywordLocation: `${schemaLocation}/uniqueItems`, | ||
| error: `Duplicate items at indexes ${j} and ${k}.` | ||
| }); | ||
| j = Number.MAX_SAFE_INTEGER; | ||
| k = Number.MAX_SAFE_INTEGER; | ||
| } | ||
| } | ||
| } | ||
| } else if (instanceType === "number") { | ||
| if (draft === "4") { | ||
| if ($minimum !== void 0 && ($exclusiveMinimum === true && instance <= $minimum || instance < $minimum)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minimum", | ||
| keywordLocation: `${schemaLocation}/minimum`, | ||
| error: `${instance} is less than ${$exclusiveMinimum ? "or equal to " : ""} ${$minimum}.` | ||
| }); | ||
| if ($maximum !== void 0 && ($exclusiveMaximum === true && instance >= $maximum || instance > $maximum)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maximum", | ||
| keywordLocation: `${schemaLocation}/maximum`, | ||
| error: `${instance} is greater than ${$exclusiveMaximum ? "or equal to " : ""} ${$maximum}.` | ||
| }); | ||
| } else { | ||
| if ($minimum !== void 0 && instance < $minimum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minimum", | ||
| keywordLocation: `${schemaLocation}/minimum`, | ||
| error: `${instance} is less than ${$minimum}.` | ||
| }); | ||
| if ($maximum !== void 0 && instance > $maximum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maximum", | ||
| keywordLocation: `${schemaLocation}/maximum`, | ||
| error: `${instance} is greater than ${$maximum}.` | ||
| }); | ||
| if ($exclusiveMinimum !== void 0 && instance <= $exclusiveMinimum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "exclusiveMinimum", | ||
| keywordLocation: `${schemaLocation}/exclusiveMinimum`, | ||
| error: `${instance} is less than ${$exclusiveMinimum}.` | ||
| }); | ||
| if ($exclusiveMaximum !== void 0 && instance >= $exclusiveMaximum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "exclusiveMaximum", | ||
| keywordLocation: `${schemaLocation}/exclusiveMaximum`, | ||
| error: `${instance} is greater than or equal to ${$exclusiveMaximum}.` | ||
| }); | ||
| } | ||
| if ($multipleOf !== void 0) { | ||
| const remainder = instance % $multipleOf; | ||
| if (Math.abs(0 - remainder) >= 1.1920929e-7 && Math.abs($multipleOf - remainder) >= 1.1920929e-7) errors.push({ | ||
| instanceLocation, | ||
| keyword: "multipleOf", | ||
| keywordLocation: `${schemaLocation}/multipleOf`, | ||
| error: `${instance} is not a multiple of ${$multipleOf}.` | ||
| }); | ||
| } | ||
| } else if (instanceType === "string") { | ||
| const length = $minLength === void 0 && $maxLength === void 0 ? 0 : ucs2length(instance); | ||
| if ($minLength !== void 0 && length < $minLength) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minLength", | ||
| keywordLocation: `${schemaLocation}/minLength`, | ||
| error: `String is too short (${length} < ${$minLength}).` | ||
| }); | ||
| if ($maxLength !== void 0 && length > $maxLength) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxLength", | ||
| keywordLocation: `${schemaLocation}/maxLength`, | ||
| error: `String is too long (${length} > ${$maxLength}).` | ||
| }); | ||
| if ($pattern !== void 0 && !new RegExp($pattern, "u").test(instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "pattern", | ||
| keywordLocation: `${schemaLocation}/pattern`, | ||
| error: `String does not match pattern.` | ||
| }); | ||
| if ($format !== void 0 && format[$format] && !format[$format](instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "format", | ||
| keywordLocation: `${schemaLocation}/format`, | ||
| error: `String does not match format "${$format}".` | ||
| }); | ||
| } | ||
| return { | ||
| valid: errors.length === 0, | ||
| errors | ||
| }; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validator.js | ||
| var Validator = class { | ||
| schema; | ||
| draft; | ||
| shortCircuit; | ||
| lookup; | ||
| constructor(schema, draft = "2019-09", shortCircuit = true) { | ||
| this.schema = schema; | ||
| this.draft = draft; | ||
| this.shortCircuit = shortCircuit; | ||
| this.lookup = dereference(schema); | ||
| } | ||
| validate(instance) { | ||
| return validate(instance, this.schema, this.draft, this.lookup, this.shortCircuit); | ||
| } | ||
| addSchema(schema, id) { | ||
| if (id) schema = { | ||
| ...schema, | ||
| $id: id | ||
| }; | ||
| dereference(schema, this.lookup); | ||
| } | ||
| }; | ||
| //#endregion | ||
| //#region ../core-internal/src/validators/cfWorkerProvider.ts | ||
| /** | ||
| * Cloudflare Worker-compatible JSON Schema validator provider | ||
| * | ||
| * This provider uses @cfworker/json-schema for validation without code generation, | ||
| * making it compatible with edge runtimes like Cloudflare Workers that restrict | ||
| * eval and new Function. | ||
| * | ||
| * @see {@linkcode AjvJsonSchemaValidator} for the Node.js alternative | ||
| */ | ||
| /** | ||
| * Canonical 2020-12 `$schema` URIs (http + https variants, trailing-`#` stripped). When a schema | ||
| * declares anything else and no `{draft}` is forced, the provider throws a plain `Error`. | ||
| */ | ||
| const DRAFT_2020_12_URIS = new Set(["https://json-schema.org/draft/2020-12/schema", "http://json-schema.org/draft/2020-12/schema"]); | ||
| /** | ||
| * `@cfworker/json-schema`-backed JSON Schema validator. See | ||
| * `@modelcontextprotocol/{client,server}/validators/cf-worker` for the customisation entry point. | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`. Passing an explicit `draft` to the constructor | ||
| * overrides this — that draft is used for every schema regardless of `$schema`. | ||
| * | ||
| * @example Use with default configuration (2020-12, shortcircuit on) | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_default" | ||
| * const validator = new CfWorkerJsonSchemaValidator(); | ||
| * ``` | ||
| * | ||
| * @example Use with custom configuration | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_customConfig" | ||
| * const validator = new CfWorkerJsonSchemaValidator({ | ||
| * draft: '2020-12', | ||
| * shortcircuit: false // Report all errors | ||
| * }); | ||
| * ``` | ||
| */ | ||
| var CfWorkerJsonSchemaValidator = class { | ||
| shortcircuit; | ||
| /** Caller-supplied draft; when set, the `$schema` check is skipped (caller owns dialect). */ | ||
| draft; | ||
| /** | ||
| * Create a validator | ||
| * | ||
| * @param options - Configuration options | ||
| * @param options.shortcircuit - If `true`, stop validation after first error (default: `true`) | ||
| * @param options.draft - JSON Schema draft version to force for every schema. When set, the | ||
| * `$schema` check is skipped. When omitted, the provider validates as 2020-12 and rejects | ||
| * schemas declaring a different `$schema`. | ||
| */ | ||
| constructor(options) { | ||
| this.shortcircuit = options?.shortcircuit ?? true; | ||
| this.draft = options?.draft; | ||
| } | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * Unlike AJV, this validator is not cached internally | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that validates input data | ||
| */ | ||
| getValidator(schema) { | ||
| if (this.draft === void 0 && "$schema" in schema && typeof schema.$schema === "string" && !DRAFT_2020_12_URIS.has(schema.$schema.replace(/#$/, ""))) { | ||
| const declared = schema.$schema.slice(0, 200); | ||
| throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${declared}"). The default validator supports JSON Schema 2020-12 only; pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`); | ||
| } | ||
| const validator = new Validator(schema, this.draft ?? "2020-12", this.shortcircuit); | ||
| return (input) => { | ||
| const result = validator.validate(input); | ||
| return result.valid ? { | ||
| valid: true, | ||
| data: input, | ||
| errorMessage: void 0 | ||
| } : { | ||
| valid: false, | ||
| data: void 0, | ||
| errorMessage: result.errors.map((err) => `${err.instanceLocation}: ${err.error}`).join("; ") | ||
| }; | ||
| }; | ||
| } | ||
| }; | ||
| //#endregion | ||
| export { CfWorkerJsonSchemaValidator as t }; | ||
| //# sourceMappingURL=cfWorkerProvider-Bd-iTHAF.mjs.map |
Sorry, the diff of this file is too big to display
| import { i as jsonSchemaValidator, n as JsonSchemaValidator, t as JsonSchemaType } from "./types-mS0yxCL0.mjs"; | ||
| //#region ../core-internal/src/validators/cfWorkerProvider.d.ts | ||
| /** | ||
| * JSON Schema draft version supported by `@cfworker/json-schema`. | ||
| */ | ||
| type CfWorkerSchemaDraft = '4' | '7' | '2019-09' | '2020-12'; | ||
| /** | ||
| * `@cfworker/json-schema`-backed JSON Schema validator. See | ||
| * `@modelcontextprotocol/{client,server}/validators/cf-worker` for the customisation entry point. | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`. Passing an explicit `draft` to the constructor | ||
| * overrides this — that draft is used for every schema regardless of `$schema`. | ||
| * | ||
| * @example Use with default configuration (2020-12, shortcircuit on) | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_default" | ||
| * const validator = new CfWorkerJsonSchemaValidator(); | ||
| * ``` | ||
| * | ||
| * @example Use with custom configuration | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_customConfig" | ||
| * const validator = new CfWorkerJsonSchemaValidator({ | ||
| * draft: '2020-12', | ||
| * shortcircuit: false // Report all errors | ||
| * }); | ||
| * ``` | ||
| */ | ||
| declare class CfWorkerJsonSchemaValidator implements jsonSchemaValidator { | ||
| private readonly shortcircuit; | ||
| /** Caller-supplied draft; when set, the `$schema` check is skipped (caller owns dialect). */ | ||
| private readonly draft?; | ||
| /** | ||
| * Create a validator | ||
| * | ||
| * @param options - Configuration options | ||
| * @param options.shortcircuit - If `true`, stop validation after first error (default: `true`) | ||
| * @param options.draft - JSON Schema draft version to force for every schema. When set, the | ||
| * `$schema` check is skipped. When omitted, the provider validates as 2020-12 and rejects | ||
| * schemas declaring a different `$schema`. | ||
| */ | ||
| constructor(options?: { | ||
| shortcircuit?: boolean; | ||
| draft?: CfWorkerSchemaDraft; | ||
| }); | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * Unlike AJV, this validator is not cached internally | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that validates input data | ||
| */ | ||
| getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| //#endregion | ||
| export { CfWorkerSchemaDraft as n, CfWorkerJsonSchemaValidator as t }; | ||
| //# sourceMappingURL=cfWorkerProvider-BYRW5af5.d.mts.map |
| {"version":3,"file":"cfWorkerProvider-BYRW5af5.d.mts","names":[],"sources":["../../core-internal/src/validators/cfWorkerProvider.ts"],"sourcesContent":[],"mappings":";;;;;;;KAiBY,mBAAA;;;;;;;;;;;;;;;;;;;;;;cAgCC,2BAAA,YAAuC;;;;;;;;;;;;;;;YAcQ;;;;;;;;;;0BAahC,iBAAiB,oBAAoB"} |
| import { i as jsonSchemaValidator, n as JsonSchemaValidator, t as JsonSchemaType } from "./types-DsbMXNFL.cjs"; | ||
| //#region ../core-internal/src/validators/cfWorkerProvider.d.ts | ||
| /** | ||
| * JSON Schema draft version supported by `@cfworker/json-schema`. | ||
| */ | ||
| type CfWorkerSchemaDraft = '4' | '7' | '2019-09' | '2020-12'; | ||
| /** | ||
| * `@cfworker/json-schema`-backed JSON Schema validator. See | ||
| * `@modelcontextprotocol/{client,server}/validators/cf-worker` for the customisation entry point. | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`. Passing an explicit `draft` to the constructor | ||
| * overrides this — that draft is used for every schema regardless of `$schema`. | ||
| * | ||
| * @example Use with default configuration (2020-12, shortcircuit on) | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_default" | ||
| * const validator = new CfWorkerJsonSchemaValidator(); | ||
| * ``` | ||
| * | ||
| * @example Use with custom configuration | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_customConfig" | ||
| * const validator = new CfWorkerJsonSchemaValidator({ | ||
| * draft: '2020-12', | ||
| * shortcircuit: false // Report all errors | ||
| * }); | ||
| * ``` | ||
| */ | ||
| declare class CfWorkerJsonSchemaValidator implements jsonSchemaValidator { | ||
| private readonly shortcircuit; | ||
| /** Caller-supplied draft; when set, the `$schema` check is skipped (caller owns dialect). */ | ||
| private readonly draft?; | ||
| /** | ||
| * Create a validator | ||
| * | ||
| * @param options - Configuration options | ||
| * @param options.shortcircuit - If `true`, stop validation after first error (default: `true`) | ||
| * @param options.draft - JSON Schema draft version to force for every schema. When set, the | ||
| * `$schema` check is skipped. When omitted, the provider validates as 2020-12 and rejects | ||
| * schemas declaring a different `$schema`. | ||
| */ | ||
| constructor(options?: { | ||
| shortcircuit?: boolean; | ||
| draft?: CfWorkerSchemaDraft; | ||
| }); | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * Unlike AJV, this validator is not cached internally | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that validates input data | ||
| */ | ||
| getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| //#endregion | ||
| export { CfWorkerSchemaDraft as n, CfWorkerJsonSchemaValidator as t }; | ||
| //# sourceMappingURL=cfWorkerProvider-D9GAttn8.d.cts.map |
| {"version":3,"file":"cfWorkerProvider-D9GAttn8.d.cts","names":[],"sources":["../../core-internal/src/validators/cfWorkerProvider.ts"],"sourcesContent":[],"mappings":";;;;;;;KAiBY,mBAAA;;;;;;;;;;;;;;;;;;;;;;cAgCC,2BAAA,YAAuC;;;;;;;;;;;;;;;YAcQ;;;;;;;;;;0BAahC,iBAAiB,oBAAoB"} |
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js | ||
| function deepCompareStrict(a, b) { | ||
| const typeofa = typeof a; | ||
| if (typeofa !== typeof b) return false; | ||
| if (Array.isArray(a)) { | ||
| if (!Array.isArray(b)) return false; | ||
| const length = a.length; | ||
| if (length !== b.length) return false; | ||
| for (let i = 0; i < length; i++) if (!deepCompareStrict(a[i], b[i])) return false; | ||
| return true; | ||
| } | ||
| if (typeofa === "object") { | ||
| if (!a || !b) return a === b; | ||
| const aKeys = Object.keys(a); | ||
| const bKeys = Object.keys(b); | ||
| if (aKeys.length !== bKeys.length) return false; | ||
| for (const k of aKeys) if (!deepCompareStrict(a[k], b[k])) return false; | ||
| return true; | ||
| } | ||
| return a === b; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/pointer.js | ||
| function encodePointer(p) { | ||
| return encodeURI(escapePointer(p)); | ||
| } | ||
| function escapePointer(p) { | ||
| return p.replace(/~/g, "~0").replace(/\//g, "~1"); | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/dereference.js | ||
| const schemaArrayKeyword = { | ||
| prefixItems: true, | ||
| items: true, | ||
| allOf: true, | ||
| anyOf: true, | ||
| oneOf: true | ||
| }; | ||
| const schemaMapKeyword = { | ||
| $defs: true, | ||
| definitions: true, | ||
| properties: true, | ||
| patternProperties: true, | ||
| dependentSchemas: true | ||
| }; | ||
| const ignoredKeyword = { | ||
| id: true, | ||
| $id: true, | ||
| $ref: true, | ||
| $schema: true, | ||
| $anchor: true, | ||
| $vocabulary: true, | ||
| $comment: true, | ||
| default: true, | ||
| enum: true, | ||
| const: true, | ||
| required: true, | ||
| type: true, | ||
| maximum: true, | ||
| minimum: true, | ||
| exclusiveMaximum: true, | ||
| exclusiveMinimum: true, | ||
| multipleOf: true, | ||
| maxLength: true, | ||
| minLength: true, | ||
| pattern: true, | ||
| format: true, | ||
| maxItems: true, | ||
| minItems: true, | ||
| uniqueItems: true, | ||
| maxProperties: true, | ||
| minProperties: true | ||
| }; | ||
| let initialBaseURI = typeof self !== "undefined" && self.location && self.location.origin !== "null" ? new URL(self.location.origin + self.location.pathname + location.search) : new URL("https://github.com/cfworker"); | ||
| function dereference(schema, lookup = Object.create(null), baseURI = initialBaseURI, basePointer = "") { | ||
| if (schema && typeof schema === "object" && !Array.isArray(schema)) { | ||
| const id = schema.$id || schema.id; | ||
| if (id) { | ||
| const url = new URL(id, baseURI.href); | ||
| if (url.hash.length > 1) lookup[url.href] = schema; | ||
| else { | ||
| url.hash = ""; | ||
| if (basePointer === "") baseURI = url; | ||
| else dereference(schema, lookup, baseURI); | ||
| } | ||
| } | ||
| } else if (schema !== true && schema !== false) return lookup; | ||
| const schemaURI = baseURI.href + (basePointer ? "#" + basePointer : ""); | ||
| if (lookup[schemaURI] !== void 0) throw new Error(`Duplicate schema URI "${schemaURI}".`); | ||
| lookup[schemaURI] = schema; | ||
| if (schema === true || schema === false) return lookup; | ||
| if (schema.__absolute_uri__ === void 0) Object.defineProperty(schema, "__absolute_uri__", { | ||
| enumerable: false, | ||
| value: schemaURI | ||
| }); | ||
| if (schema.$ref && schema.__absolute_ref__ === void 0) { | ||
| const url = new URL(schema.$ref, baseURI.href); | ||
| url.hash = url.hash; | ||
| Object.defineProperty(schema, "__absolute_ref__", { | ||
| enumerable: false, | ||
| value: url.href | ||
| }); | ||
| } | ||
| if (schema.$recursiveRef && schema.__absolute_recursive_ref__ === void 0) { | ||
| const url = new URL(schema.$recursiveRef, baseURI.href); | ||
| url.hash = url.hash; | ||
| Object.defineProperty(schema, "__absolute_recursive_ref__", { | ||
| enumerable: false, | ||
| value: url.href | ||
| }); | ||
| } | ||
| if (schema.$anchor) { | ||
| const url = new URL("#" + schema.$anchor, baseURI.href); | ||
| lookup[url.href] = schema; | ||
| } | ||
| for (let key in schema) { | ||
| if (ignoredKeyword[key]) continue; | ||
| const keyBase = `${basePointer}/${encodePointer(key)}`; | ||
| const subSchema = schema[key]; | ||
| if (Array.isArray(subSchema)) { | ||
| if (schemaArrayKeyword[key]) { | ||
| const length = subSchema.length; | ||
| for (let i = 0; i < length; i++) dereference(subSchema[i], lookup, baseURI, `${keyBase}/${i}`); | ||
| } | ||
| } else if (schemaMapKeyword[key]) for (let subKey in subSchema) dereference(subSchema[subKey], lookup, baseURI, `${keyBase}/${encodePointer(subKey)}`); | ||
| else dereference(subSchema, lookup, baseURI, keyBase); | ||
| } | ||
| return lookup; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/format.js | ||
| const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; | ||
| const DAYS = [ | ||
| 0, | ||
| 31, | ||
| 28, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 30, | ||
| 31 | ||
| ]; | ||
| const TIME = /^(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[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; | ||
| const URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; | ||
| const URL_ = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; | ||
| const UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; | ||
| const JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; | ||
| const JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; | ||
| const RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; | ||
| const EMAIL = (input) => { | ||
| if (input[0] === "\"") return false; | ||
| const [name, host, ...rest] = input.split("@"); | ||
| if (!name || !host || rest.length !== 0 || name.length > 64 || host.length > 253) return false; | ||
| if (name[0] === "." || name.endsWith(".") || name.includes("..")) return false; | ||
| if (!/^[a-z0-9.-]+$/i.test(host) || !/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(name)) return false; | ||
| return host.split(".").every((part) => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(part)); | ||
| }; | ||
| const IPV4 = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/; | ||
| const IPV6 = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i; | ||
| const DURATION = (input) => input.length > 1 && input.length < 80 && (/^P\d+([.,]\d+)?W$/.test(input) || /^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(input) && /^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(input)); | ||
| function bind(r) { | ||
| return r.test.bind(r); | ||
| } | ||
| const format = { | ||
| date, | ||
| time: time.bind(void 0, false), | ||
| "date-time": date_time, | ||
| duration: DURATION, | ||
| uri, | ||
| "uri-reference": bind(URIREF), | ||
| "uri-template": bind(URITEMPLATE), | ||
| url: bind(URL_), | ||
| email: EMAIL, | ||
| hostname: bind(HOSTNAME), | ||
| ipv4: bind(IPV4), | ||
| ipv6: bind(IPV6), | ||
| regex, | ||
| uuid: bind(UUID), | ||
| "json-pointer": bind(JSON_POINTER), | ||
| "json-pointer-uri-fragment": bind(JSON_POINTER_URI_FRAGMENT), | ||
| "relative-json-pointer": bind(RELATIVE_JSON_POINTER) | ||
| }; | ||
| function isLeapYear(year) { | ||
| return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); | ||
| } | ||
| function date(str) { | ||
| const matches = str.match(DATE); | ||
| if (!matches) return false; | ||
| const year = +matches[1]; | ||
| const month = +matches[2]; | ||
| const day = +matches[3]; | ||
| return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); | ||
| } | ||
| function time(full, str) { | ||
| const matches = str.match(TIME); | ||
| if (!matches) return false; | ||
| const hour = +matches[1]; | ||
| const minute = +matches[2]; | ||
| const second = +matches[3]; | ||
| const timeZone = !!matches[5]; | ||
| return (hour <= 23 && minute <= 59 && second <= 59 || hour == 23 && minute == 59 && second == 60) && (!full || timeZone); | ||
| } | ||
| const DATE_TIME_SEPARATOR = /t|\s/i; | ||
| function date_time(str) { | ||
| const dateTime = str.split(DATE_TIME_SEPARATOR); | ||
| return dateTime.length == 2 && date(dateTime[0]) && time(true, dateTime[1]); | ||
| } | ||
| const NOT_URI_FRAGMENT = /\/|:/; | ||
| const URI_PATTERN = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; | ||
| function uri(str) { | ||
| return NOT_URI_FRAGMENT.test(str) && URI_PATTERN.test(str); | ||
| } | ||
| const Z_ANCHOR = /[^\\]\\Z/; | ||
| function regex(str) { | ||
| if (Z_ANCHOR.test(str)) return false; | ||
| try { | ||
| new RegExp(str, "u"); | ||
| return true; | ||
| } catch (e) { | ||
| return false; | ||
| } | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js | ||
| function ucs2length(s) { | ||
| let result = 0; | ||
| let length = s.length; | ||
| let index = 0; | ||
| let charCode; | ||
| while (index < length) { | ||
| result++; | ||
| charCode = s.charCodeAt(index++); | ||
| if (charCode >= 55296 && charCode <= 56319 && index < length) { | ||
| charCode = s.charCodeAt(index); | ||
| if ((charCode & 64512) == 56320) index++; | ||
| } | ||
| } | ||
| return result; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validate.js | ||
| function validate(instance, schema, draft = "2019-09", lookup = dereference(schema), shortCircuit = true, recursiveAnchor = null, instanceLocation = "#", schemaLocation = "#", evaluated = Object.create(null)) { | ||
| if (schema === true) return { | ||
| valid: true, | ||
| errors: [] | ||
| }; | ||
| if (schema === false) return { | ||
| valid: false, | ||
| errors: [{ | ||
| instanceLocation, | ||
| keyword: "false", | ||
| keywordLocation: instanceLocation, | ||
| error: "False boolean schema." | ||
| }] | ||
| }; | ||
| const rawInstanceType = typeof instance; | ||
| let instanceType; | ||
| switch (rawInstanceType) { | ||
| case "boolean": | ||
| case "number": | ||
| case "string": | ||
| instanceType = rawInstanceType; | ||
| break; | ||
| case "object": | ||
| if (instance === null) instanceType = "null"; | ||
| else if (Array.isArray(instance)) instanceType = "array"; | ||
| else instanceType = "object"; | ||
| break; | ||
| default: throw new Error(`Instances of "${rawInstanceType}" type are not supported.`); | ||
| } | ||
| const { $ref, $recursiveRef, $recursiveAnchor, type: $type, const: $const, enum: $enum, required: $required, not: $not, anyOf: $anyOf, allOf: $allOf, oneOf: $oneOf, if: $if, then: $then, else: $else, format: $format, properties: $properties, patternProperties: $patternProperties, additionalProperties: $additionalProperties, unevaluatedProperties: $unevaluatedProperties, minProperties: $minProperties, maxProperties: $maxProperties, propertyNames: $propertyNames, dependentRequired: $dependentRequired, dependentSchemas: $dependentSchemas, dependencies: $dependencies, prefixItems: $prefixItems, items: $items, additionalItems: $additionalItems, unevaluatedItems: $unevaluatedItems, contains: $contains, minContains: $minContains, maxContains: $maxContains, minItems: $minItems, maxItems: $maxItems, uniqueItems: $uniqueItems, minimum: $minimum, maximum: $maximum, exclusiveMinimum: $exclusiveMinimum, exclusiveMaximum: $exclusiveMaximum, multipleOf: $multipleOf, minLength: $minLength, maxLength: $maxLength, pattern: $pattern, __absolute_ref__, __absolute_recursive_ref__ } = schema; | ||
| const errors = []; | ||
| if ($recursiveAnchor === true && recursiveAnchor === null) recursiveAnchor = schema; | ||
| if ($recursiveRef === "#") { | ||
| const refSchema = recursiveAnchor === null ? lookup[__absolute_recursive_ref__] : recursiveAnchor; | ||
| const keywordLocation = `${schemaLocation}/$recursiveRef`; | ||
| const result = validate(instance, recursiveAnchor === null ? schema : recursiveAnchor, draft, lookup, shortCircuit, refSchema, instanceLocation, keywordLocation, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "$recursiveRef", | ||
| keywordLocation, | ||
| error: "A subschema had errors." | ||
| }, ...result.errors); | ||
| } | ||
| if ($ref !== void 0) { | ||
| const refSchema = lookup[__absolute_ref__ || $ref]; | ||
| if (refSchema === void 0) { | ||
| let message = `Unresolved $ref "${$ref}".`; | ||
| if (__absolute_ref__ && __absolute_ref__ !== $ref) message += ` Absolute URI "${__absolute_ref__}".`; | ||
| message += `\nKnown schemas:\n- ${Object.keys(lookup).join("\n- ")}`; | ||
| throw new Error(message); | ||
| } | ||
| const keywordLocation = `${schemaLocation}/$ref`; | ||
| const result = validate(instance, refSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "$ref", | ||
| keywordLocation, | ||
| error: "A subschema had errors." | ||
| }, ...result.errors); | ||
| if (draft === "4" || draft === "7") return { | ||
| valid: errors.length === 0, | ||
| errors | ||
| }; | ||
| } | ||
| if (Array.isArray($type)) { | ||
| let length = $type.length; | ||
| let valid = false; | ||
| for (let i = 0; i < length; i++) if (instanceType === $type[i] || $type[i] === "integer" && instanceType === "number" && instance % 1 === 0 && instance === instance) { | ||
| valid = true; | ||
| break; | ||
| } | ||
| if (!valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type.join("\", \"")}".` | ||
| }); | ||
| } else if ($type === "integer") { | ||
| if (instanceType !== "number" || instance % 1 || instance !== instance) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type}".` | ||
| }); | ||
| } else if ($type !== void 0 && instanceType !== $type) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type}".` | ||
| }); | ||
| if ($const !== void 0) { | ||
| if (instanceType === "object" || instanceType === "array") { | ||
| if (!deepCompareStrict(instance, $const)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "const", | ||
| keywordLocation: `${schemaLocation}/const`, | ||
| error: `Instance does not match ${JSON.stringify($const)}.` | ||
| }); | ||
| } else if (instance !== $const) errors.push({ | ||
| instanceLocation, | ||
| keyword: "const", | ||
| keywordLocation: `${schemaLocation}/const`, | ||
| error: `Instance does not match ${JSON.stringify($const)}.` | ||
| }); | ||
| } | ||
| if ($enum !== void 0) { | ||
| if (instanceType === "object" || instanceType === "array") { | ||
| if (!$enum.some((value) => deepCompareStrict(instance, value))) errors.push({ | ||
| instanceLocation, | ||
| keyword: "enum", | ||
| keywordLocation: `${schemaLocation}/enum`, | ||
| error: `Instance does not match any of ${JSON.stringify($enum)}.` | ||
| }); | ||
| } else if (!$enum.some((value) => instance === value)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "enum", | ||
| keywordLocation: `${schemaLocation}/enum`, | ||
| error: `Instance does not match any of ${JSON.stringify($enum)}.` | ||
| }); | ||
| } | ||
| if ($not !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/not`; | ||
| if (validate(instance, $not, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation).valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "not", | ||
| keywordLocation, | ||
| error: "Instance matched \"not\" schema." | ||
| }); | ||
| } | ||
| let subEvaluateds = []; | ||
| if ($anyOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/anyOf`; | ||
| const errorsLength = errors.length; | ||
| let anyValid = false; | ||
| for (let i = 0; i < $anyOf.length; i++) { | ||
| const subSchema = $anyOf[i]; | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| anyValid = anyValid || result.valid; | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| } | ||
| if (anyValid) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "anyOf", | ||
| keywordLocation, | ||
| error: "Instance does not match any subschemas." | ||
| }); | ||
| } | ||
| if ($allOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/allOf`; | ||
| const errorsLength = errors.length; | ||
| let allValid = true; | ||
| for (let i = 0; i < $allOf.length; i++) { | ||
| const subSchema = $allOf[i]; | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| allValid = allValid && result.valid; | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| } | ||
| if (allValid) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "allOf", | ||
| keywordLocation, | ||
| error: `Instance does not match every subschema.` | ||
| }); | ||
| } | ||
| if ($oneOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/oneOf`; | ||
| const errorsLength = errors.length; | ||
| const matches = $oneOf.filter((subSchema, i) => { | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| return result.valid; | ||
| }).length; | ||
| if (matches === 1) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "oneOf", | ||
| keywordLocation, | ||
| error: `Instance does not match exactly one subschema (${matches} matches).` | ||
| }); | ||
| } | ||
| if (instanceType === "object" || instanceType === "array") Object.assign(evaluated, ...subEvaluateds); | ||
| if ($if !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/if`; | ||
| if (validate(instance, $if, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated).valid) { | ||
| if ($then !== void 0) { | ||
| const thenResult = validate(instance, $then, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/then`, evaluated); | ||
| if (!thenResult.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "if", | ||
| keywordLocation, | ||
| error: `Instance does not match "then" schema.` | ||
| }, ...thenResult.errors); | ||
| } | ||
| } else if ($else !== void 0) { | ||
| const elseResult = validate(instance, $else, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/else`, evaluated); | ||
| if (!elseResult.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "if", | ||
| keywordLocation, | ||
| error: `Instance does not match "else" schema.` | ||
| }, ...elseResult.errors); | ||
| } | ||
| } | ||
| if (instanceType === "object") { | ||
| if ($required !== void 0) { | ||
| for (const key of $required) if (!(key in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "required", | ||
| keywordLocation: `${schemaLocation}/required`, | ||
| error: `Instance does not have required property "${key}".` | ||
| }); | ||
| } | ||
| const keys = Object.keys(instance); | ||
| if ($minProperties !== void 0 && keys.length < $minProperties) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minProperties", | ||
| keywordLocation: `${schemaLocation}/minProperties`, | ||
| error: `Instance does not have at least ${$minProperties} properties.` | ||
| }); | ||
| if ($maxProperties !== void 0 && keys.length > $maxProperties) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxProperties", | ||
| keywordLocation: `${schemaLocation}/maxProperties`, | ||
| error: `Instance does not have at least ${$maxProperties} properties.` | ||
| }); | ||
| if ($propertyNames !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/propertyNames`; | ||
| for (const key in instance) { | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(key, $propertyNames, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "propertyNames", | ||
| keywordLocation, | ||
| error: `Property name "${key}" does not match schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($dependentRequired !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/dependantRequired`; | ||
| for (const key in $dependentRequired) if (key in instance) { | ||
| const required = $dependentRequired[key]; | ||
| for (const dependantKey of required) if (!(dependantKey in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependentRequired", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not have "${dependantKey}".` | ||
| }); | ||
| } | ||
| } | ||
| if ($dependentSchemas !== void 0) for (const key in $dependentSchemas) { | ||
| const keywordLocation = `${schemaLocation}/dependentSchemas`; | ||
| if (key in instance) { | ||
| const result = validate(instance, $dependentSchemas[key], draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependentSchemas", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not match dependant schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($dependencies !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/dependencies`; | ||
| for (const key in $dependencies) if (key in instance) { | ||
| const propsOrSchema = $dependencies[key]; | ||
| if (Array.isArray(propsOrSchema)) { | ||
| for (const dependantKey of propsOrSchema) if (!(dependantKey in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependencies", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not have "${dependantKey}".` | ||
| }); | ||
| } else { | ||
| const result = validate(instance, propsOrSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependencies", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not match dependant schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| const thisEvaluated = Object.create(null); | ||
| let stop = false; | ||
| if ($properties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/properties`; | ||
| for (const key in $properties) { | ||
| if (!(key in instance)) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $properties[key], draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(key)}`); | ||
| if (result.valid) evaluated[key] = thisEvaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "properties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } | ||
| if (!stop && $patternProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/patternProperties`; | ||
| for (const pattern in $patternProperties) { | ||
| const regex$1 = new RegExp(pattern, "u"); | ||
| const subSchema = $patternProperties[pattern]; | ||
| for (const key in instance) { | ||
| if (!regex$1.test(key)) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], subSchema, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(pattern)}`); | ||
| if (result.valid) evaluated[key] = thisEvaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "patternProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" matches pattern "${pattern}" but does not match associated schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| if (!stop && $additionalProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/additionalProperties`; | ||
| for (const key in instance) { | ||
| if (thisEvaluated[key]) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $additionalProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (result.valid) evaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "additionalProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match additional properties schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } else if (!stop && $unevaluatedProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/unevaluatedProperties`; | ||
| for (const key in instance) if (!evaluated[key]) { | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $unevaluatedProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (result.valid) evaluated[key] = true; | ||
| else errors.push({ | ||
| instanceLocation, | ||
| keyword: "unevaluatedProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match unevaluated properties schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } else if (instanceType === "array") { | ||
| if ($maxItems !== void 0 && instance.length > $maxItems) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxItems", | ||
| keywordLocation: `${schemaLocation}/maxItems`, | ||
| error: `Array has too many items (${instance.length} > ${$maxItems}).` | ||
| }); | ||
| if ($minItems !== void 0 && instance.length < $minItems) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minItems", | ||
| keywordLocation: `${schemaLocation}/minItems`, | ||
| error: `Array has too few items (${instance.length} < ${$minItems}).` | ||
| }); | ||
| const length = instance.length; | ||
| let i = 0; | ||
| let stop = false; | ||
| if ($prefixItems !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/prefixItems`; | ||
| const length2 = Math.min($prefixItems.length, length); | ||
| for (; i < length2; i++) { | ||
| const result = validate(instance[i], $prefixItems[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "prefixItems", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } | ||
| if ($items !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/items`; | ||
| if (Array.isArray($items)) { | ||
| const length2 = Math.min($items.length, length); | ||
| for (; i < length2; i++) { | ||
| const result = validate(instance[i], $items[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "items", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } else for (; i < length; i++) { | ||
| const result = validate(instance[i], $items, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "items", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| if (!stop && $additionalItems !== void 0) { | ||
| const keywordLocation$1 = `${schemaLocation}/additionalItems`; | ||
| for (; i < length; i++) { | ||
| const result = validate(instance[i], $additionalItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation$1); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "additionalItems", | ||
| keywordLocation: keywordLocation$1, | ||
| error: `Items did not match additional items schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| if ($contains !== void 0) if (length === 0 && $minContains === void 0) errors.push({ | ||
| instanceLocation, | ||
| keyword: "contains", | ||
| keywordLocation: `${schemaLocation}/contains`, | ||
| error: `Array is empty. It must contain at least one item matching the schema.` | ||
| }); | ||
| else if ($minContains !== void 0 && length < $minContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minContains", | ||
| keywordLocation: `${schemaLocation}/minContains`, | ||
| error: `Array has less items (${length}) than minContains (${$minContains}).` | ||
| }); | ||
| else { | ||
| const keywordLocation = `${schemaLocation}/contains`; | ||
| const errorsLength = errors.length; | ||
| let contained = 0; | ||
| for (let j = 0; j < length; j++) { | ||
| const result = validate(instance[j], $contains, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${j}`, keywordLocation); | ||
| if (result.valid) { | ||
| evaluated[j] = true; | ||
| contained++; | ||
| } else errors.push(...result.errors); | ||
| } | ||
| if (contained >= ($minContains || 0)) errors.length = errorsLength; | ||
| if ($minContains === void 0 && $maxContains === void 0 && contained === 0) errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "contains", | ||
| keywordLocation, | ||
| error: `Array does not contain item matching schema.` | ||
| }); | ||
| else if ($minContains !== void 0 && contained < $minContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minContains", | ||
| keywordLocation: `${schemaLocation}/minContains`, | ||
| error: `Array must contain at least ${$minContains} items matching schema. Only ${contained} items were found.` | ||
| }); | ||
| else if ($maxContains !== void 0 && contained > $maxContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxContains", | ||
| keywordLocation: `${schemaLocation}/maxContains`, | ||
| error: `Array may contain at most ${$maxContains} items matching schema. ${contained} items were found.` | ||
| }); | ||
| } | ||
| if (!stop && $unevaluatedItems !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/unevaluatedItems`; | ||
| for (; i < length; i++) { | ||
| if (evaluated[i]) continue; | ||
| const result = validate(instance[i], $unevaluatedItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation); | ||
| evaluated[i] = true; | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "unevaluatedItems", | ||
| keywordLocation, | ||
| error: `Items did not match unevaluated items schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($uniqueItems) for (let j = 0; j < length; j++) { | ||
| const a = instance[j]; | ||
| const ao = typeof a === "object" && a !== null; | ||
| for (let k = 0; k < length; k++) { | ||
| if (j === k) continue; | ||
| const b = instance[k]; | ||
| if (a === b || ao && typeof b === "object" && b !== null && deepCompareStrict(a, b)) { | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "uniqueItems", | ||
| keywordLocation: `${schemaLocation}/uniqueItems`, | ||
| error: `Duplicate items at indexes ${j} and ${k}.` | ||
| }); | ||
| j = Number.MAX_SAFE_INTEGER; | ||
| k = Number.MAX_SAFE_INTEGER; | ||
| } | ||
| } | ||
| } | ||
| } else if (instanceType === "number") { | ||
| if (draft === "4") { | ||
| if ($minimum !== void 0 && ($exclusiveMinimum === true && instance <= $minimum || instance < $minimum)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minimum", | ||
| keywordLocation: `${schemaLocation}/minimum`, | ||
| error: `${instance} is less than ${$exclusiveMinimum ? "or equal to " : ""} ${$minimum}.` | ||
| }); | ||
| if ($maximum !== void 0 && ($exclusiveMaximum === true && instance >= $maximum || instance > $maximum)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maximum", | ||
| keywordLocation: `${schemaLocation}/maximum`, | ||
| error: `${instance} is greater than ${$exclusiveMaximum ? "or equal to " : ""} ${$maximum}.` | ||
| }); | ||
| } else { | ||
| if ($minimum !== void 0 && instance < $minimum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minimum", | ||
| keywordLocation: `${schemaLocation}/minimum`, | ||
| error: `${instance} is less than ${$minimum}.` | ||
| }); | ||
| if ($maximum !== void 0 && instance > $maximum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maximum", | ||
| keywordLocation: `${schemaLocation}/maximum`, | ||
| error: `${instance} is greater than ${$maximum}.` | ||
| }); | ||
| if ($exclusiveMinimum !== void 0 && instance <= $exclusiveMinimum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "exclusiveMinimum", | ||
| keywordLocation: `${schemaLocation}/exclusiveMinimum`, | ||
| error: `${instance} is less than ${$exclusiveMinimum}.` | ||
| }); | ||
| if ($exclusiveMaximum !== void 0 && instance >= $exclusiveMaximum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "exclusiveMaximum", | ||
| keywordLocation: `${schemaLocation}/exclusiveMaximum`, | ||
| error: `${instance} is greater than or equal to ${$exclusiveMaximum}.` | ||
| }); | ||
| } | ||
| if ($multipleOf !== void 0) { | ||
| const remainder = instance % $multipleOf; | ||
| if (Math.abs(0 - remainder) >= 1.1920929e-7 && Math.abs($multipleOf - remainder) >= 1.1920929e-7) errors.push({ | ||
| instanceLocation, | ||
| keyword: "multipleOf", | ||
| keywordLocation: `${schemaLocation}/multipleOf`, | ||
| error: `${instance} is not a multiple of ${$multipleOf}.` | ||
| }); | ||
| } | ||
| } else if (instanceType === "string") { | ||
| const length = $minLength === void 0 && $maxLength === void 0 ? 0 : ucs2length(instance); | ||
| if ($minLength !== void 0 && length < $minLength) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minLength", | ||
| keywordLocation: `${schemaLocation}/minLength`, | ||
| error: `String is too short (${length} < ${$minLength}).` | ||
| }); | ||
| if ($maxLength !== void 0 && length > $maxLength) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxLength", | ||
| keywordLocation: `${schemaLocation}/maxLength`, | ||
| error: `String is too long (${length} > ${$maxLength}).` | ||
| }); | ||
| if ($pattern !== void 0 && !new RegExp($pattern, "u").test(instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "pattern", | ||
| keywordLocation: `${schemaLocation}/pattern`, | ||
| error: `String does not match pattern.` | ||
| }); | ||
| if ($format !== void 0 && format[$format] && !format[$format](instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "format", | ||
| keywordLocation: `${schemaLocation}/format`, | ||
| error: `String does not match format "${$format}".` | ||
| }); | ||
| } | ||
| return { | ||
| valid: errors.length === 0, | ||
| errors | ||
| }; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validator.js | ||
| var Validator = class { | ||
| schema; | ||
| draft; | ||
| shortCircuit; | ||
| lookup; | ||
| constructor(schema, draft = "2019-09", shortCircuit = true) { | ||
| this.schema = schema; | ||
| this.draft = draft; | ||
| this.shortCircuit = shortCircuit; | ||
| this.lookup = dereference(schema); | ||
| } | ||
| validate(instance) { | ||
| return validate(instance, this.schema, this.draft, this.lookup, this.shortCircuit); | ||
| } | ||
| addSchema(schema, id) { | ||
| if (id) schema = { | ||
| ...schema, | ||
| $id: id | ||
| }; | ||
| dereference(schema, this.lookup); | ||
| } | ||
| }; | ||
| //#endregion | ||
| //#region ../core-internal/src/validators/cfWorkerProvider.ts | ||
| /** | ||
| * Cloudflare Worker-compatible JSON Schema validator provider | ||
| * | ||
| * This provider uses @cfworker/json-schema for validation without code generation, | ||
| * making it compatible with edge runtimes like Cloudflare Workers that restrict | ||
| * eval and new Function. | ||
| * | ||
| * @see {@linkcode AjvJsonSchemaValidator} for the Node.js alternative | ||
| */ | ||
| /** | ||
| * Canonical 2020-12 `$schema` URIs (http + https variants, trailing-`#` stripped). When a schema | ||
| * declares anything else and no `{draft}` is forced, the provider throws a plain `Error`. | ||
| */ | ||
| const DRAFT_2020_12_URIS = new Set(["https://json-schema.org/draft/2020-12/schema", "http://json-schema.org/draft/2020-12/schema"]); | ||
| /** | ||
| * `@cfworker/json-schema`-backed JSON Schema validator. See | ||
| * `@modelcontextprotocol/{client,server}/validators/cf-worker` for the customisation entry point. | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`. Passing an explicit `draft` to the constructor | ||
| * overrides this — that draft is used for every schema regardless of `$schema`. | ||
| * | ||
| * @example Use with default configuration (2020-12, shortcircuit on) | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_default" | ||
| * const validator = new CfWorkerJsonSchemaValidator(); | ||
| * ``` | ||
| * | ||
| * @example Use with custom configuration | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_customConfig" | ||
| * const validator = new CfWorkerJsonSchemaValidator({ | ||
| * draft: '2020-12', | ||
| * shortcircuit: false // Report all errors | ||
| * }); | ||
| * ``` | ||
| */ | ||
| var CfWorkerJsonSchemaValidator = class { | ||
| shortcircuit; | ||
| /** Caller-supplied draft; when set, the `$schema` check is skipped (caller owns dialect). */ | ||
| draft; | ||
| /** | ||
| * Create a validator | ||
| * | ||
| * @param options - Configuration options | ||
| * @param options.shortcircuit - If `true`, stop validation after first error (default: `true`) | ||
| * @param options.draft - JSON Schema draft version to force for every schema. When set, the | ||
| * `$schema` check is skipped. When omitted, the provider validates as 2020-12 and rejects | ||
| * schemas declaring a different `$schema`. | ||
| */ | ||
| constructor(options) { | ||
| this.shortcircuit = options?.shortcircuit ?? true; | ||
| this.draft = options?.draft; | ||
| } | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * Unlike AJV, this validator is not cached internally | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that validates input data | ||
| */ | ||
| getValidator(schema) { | ||
| if (this.draft === void 0 && "$schema" in schema && typeof schema.$schema === "string" && !DRAFT_2020_12_URIS.has(schema.$schema.replace(/#$/, ""))) { | ||
| const declared = schema.$schema.slice(0, 200); | ||
| throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${declared}"). The default validator supports JSON Schema 2020-12 only; pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`); | ||
| } | ||
| const validator = new Validator(schema, this.draft ?? "2020-12", this.shortcircuit); | ||
| return (input) => { | ||
| const result = validator.validate(input); | ||
| return result.valid ? { | ||
| valid: true, | ||
| data: input, | ||
| errorMessage: void 0 | ||
| } : { | ||
| valid: false, | ||
| data: void 0, | ||
| errorMessage: result.errors.map((err) => `${err.instanceLocation}: ${err.error}`).join("; ") | ||
| }; | ||
| }; | ||
| } | ||
| }; | ||
| //#endregion | ||
| Object.defineProperty(exports, 'CfWorkerJsonSchemaValidator', { | ||
| enumerable: true, | ||
| get: function () { | ||
| return CfWorkerJsonSchemaValidator; | ||
| } | ||
| }); | ||
| //# sourceMappingURL=cfWorkerProvider-ojcZaap3.cjs.map |
Sorry, the diff of this file is too big to display
| //#region rolldown:runtime | ||
| var __create = Object.create; | ||
| var __defProp = Object.defineProperty; | ||
| var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
| var __getOwnPropNames = Object.getOwnPropertyNames; | ||
| var __getProtoOf = Object.getPrototypeOf; | ||
| var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
| var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); | ||
| var __exportAll = (all, symbols) => { | ||
| let target = {}; | ||
| for (var name in all) { | ||
| __defProp(target, name, { | ||
| get: all[name], | ||
| enumerable: true | ||
| }); | ||
| } | ||
| if (symbols) { | ||
| __defProp(target, Symbol.toStringTag, { value: "Module" }); | ||
| } | ||
| return target; | ||
| }; | ||
| var __copyProps = (to, from, except, desc) => { | ||
| if (from && typeof from === "object" || typeof from === "function") { | ||
| for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | ||
| key = keys[i]; | ||
| if (!__hasOwnProp.call(to, key) && key !== except) { | ||
| __defProp(to, key, { | ||
| get: ((k) => from[k]).bind(null, key), | ||
| enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | ||
| }); | ||
| } | ||
| } | ||
| } | ||
| return to; | ||
| }; | ||
| var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | ||
| value: mod, | ||
| enumerable: true | ||
| }) : target, mod)); | ||
| //#endregion | ||
| export { __exportAll as n, __toESM as r, __commonJSMin as t }; |
Sorry, the diff of this file is too big to display
| {"version":3,"file":"createMcpHandler-BRM5MGf9.d.cts","names":[],"sources":["../../core-internal/src/auth/errors.ts","../../core-internal/src/errors/sdkErrors.ts","../../core-internal/src/shared/authUtils.ts","../../core-internal/src/types/schemas.ts","../../core-internal/src/types/types.ts","../../core-internal/src/wire/codec.ts","../../core-internal/src/shared/inboundClassification.ts","../../core-internal/src/util/standardSchema.ts","../../core-internal/src/shared/elicitation.ts","../../core-internal/src/shared/inputRequired.ts","../../core-internal/src/types/enums.ts","../../core-internal/src/types/errors.ts","../../core-internal/src/types/guards.ts","../../core-internal/src/types/specTypeSchema.ts","../../core-internal/src/shared/transport.ts","../../core-internal/src/shared/protocol.ts","../../core-internal/src/shared/mediaType.ts","../../core-internal/src/shared/metadataUtils.ts","../../core-internal/src/shared/protocolEras.ts","../../core-internal/src/shared/resultCacheHints.ts","../../core-internal/src/shared/stdio.ts","../../core-internal/src/shared/uriTemplate.ts","../../core-internal/src/util/inMemory.ts","../../core-internal/src/wire/preload.ts","../src/server/server.ts","../src/server/mcp.ts","../src/server/perRequestTransport.ts","../src/server/serverEventBus.ts","../src/server/createMcpHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;aAOY,cAAA;;;;;;;;;;;;;;;;;AAAZ;AAkGA;EA4B8B,kBAAA,GAAA,qBAAA;EAvBT;;;EAa0F,oBAAA,GAAA,wBAAA;EA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;;;;UAqBf,cAAA;;;;;;;;;;;;;;;;;A1BrFjB;AA2FA;;;;;;;;AAAmC,U2BblB,iBAAA,C3BakB;EAyClB;AAsBjB;;;;;;;;;EC1JgB;AAgBhB;;;EAIuB,QAAA,CAAA,E0ByER,Q1BzEQ;EACC;EAAG,WAAA,CAAA,E0B0ET,O1B1ES;;;;;;;;;;K0BqFf,gBAAA,SAAyB,sBAAsB,YAAY,SAAS,QAAQ,YAAY;;UAGnF,wBAAA;;;;;;aAMF;;;;;;;;;;;KAYH,iBAAA,aAA8B,mBAAmB,6BAA6B,QAAQ;;UAGjF,uBAAA;;;;;;;;;;;;;;;;;;;;;;;;;oBAyBK;;;;;;;;;;;;;iBAaH;;;;;;;;;QAST;;;;;;;;;;;;;;;;;;;;;;;;;UA0BO,cAAA;;mBAEI,mBAAmB,6BAA6B,QAAQ;;;;;;;eAO5D;;;;;;;;UAQL;;;;;;OAMH;;;;;;;;;;;;;;;;;;;;;iBAwEO,uBAAA,UAAiC,oCAAoC,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;AxBlIV;;;;;;;;;AAKgC;AAE9G;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWC;;;;AAE2B,iBwB+UpB,eAAA,CxB/UoB,OAAA,EwB+UK,OxB/UL,EAAA,UAAA,CAAA,EAAA,OAAA,CAAA,EwB+UqC,OxB/UrC,CAAA,OAAA,CAAA;;AAAO;AAU3B;;;;;;;;;AAUtB;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;AACA;AACA;AACA;AACA;AAGA;;;;;;AACA;AACA;;;;;;AACA;AACA;AAUA;AAQA;;AAAwC,iBwBiVxB,gBAAA,CxBjVwB,OAAA,EwBiVE,gBxBjVF,EAAA,OAAA,CAAA,EwBiV6B,uBxBjV7B,CAAA,EwBiV4D,cxBjV5D"} |
Sorry, the diff of this file is too big to display
| {"version":3,"file":"createMcpHandler-D93NefGZ.d.mts","names":[],"sources":["../../core-internal/src/auth/errors.ts","../../core-internal/src/errors/sdkErrors.ts","../../core-internal/src/shared/authUtils.ts","../../core-internal/src/types/schemas.ts","../../core-internal/src/types/types.ts","../../core-internal/src/wire/codec.ts","../../core-internal/src/shared/inboundClassification.ts","../../core-internal/src/util/standardSchema.ts","../../core-internal/src/shared/elicitation.ts","../../core-internal/src/shared/inputRequired.ts","../../core-internal/src/types/enums.ts","../../core-internal/src/types/errors.ts","../../core-internal/src/types/guards.ts","../../core-internal/src/types/specTypeSchema.ts","../../core-internal/src/shared/transport.ts","../../core-internal/src/shared/protocol.ts","../../core-internal/src/shared/mediaType.ts","../../core-internal/src/shared/metadataUtils.ts","../../core-internal/src/shared/protocolEras.ts","../../core-internal/src/shared/resultCacheHints.ts","../../core-internal/src/shared/stdio.ts","../../core-internal/src/shared/uriTemplate.ts","../../core-internal/src/util/inMemory.ts","../../core-internal/src/wire/preload.ts","../src/server/server.ts","../src/server/mcp.ts","../src/server/perRequestTransport.ts","../src/server/serverEventBus.ts","../src/server/createMcpHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;;;aAOY,cAAA;EAAA;AAkGZ;;;EAkBkF,cAAA,GAAA,iBAAA;EAA0C;;;;EAsC1F,aAAA,GAAA,gBAAA;EAAqB;;;;;;ACvJvD;AA2FA;EA4B8B,kBAAA,GAAA,qBAAA;EAvBT;;;EAa0F,oBAAA,GAAA,wBAAA;EAUjF;;;EAab,YAAA,GAAA,eAAgB;EAsBpB;;;EAO8C,YAAA,GAAA,eAAA;EAPzB;;;;;AC1JlC;AAgBA;EACI,sBAAA,GAAA,yBAAA;EACA;;;EAGuB,uBAAA,GAAA,2BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cF0Ed,UAAA,SAAmB,KAAA;iBA4BF;;UAvBT,MAAA,CAAO,WAAA;;;;;;;;;;kFAasD,+BAA6B,aAAa;oBAU9F;;;;sBAYN;;;;gCAgBU,qBAAqB;;;;;;;;;;AA1JvD;AAkGA;AA4B8B,aC3HlB,YAAA;EDoGS;EAa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A,aAA8B,mBAAmB,6BAA6B,QAAQ;;UAGjF,uBAAA;;;;;;;;;;;;;;;;;;;;;;;;;oBAyBK;;;;;;;;;;;;;iBAaH;;;;;;;;;QAST;;;;;;;;;;;;;;;;;;;;;;;;;UA0BO,cAAA;;mBAEI,mBAAmB,6BAA6B,QAAQ;;;;;;;eAO5D;;;;;;;;UAQL;;;;;;OAMH;;;;;;;;;;;;;;;;;;;;;iBAwEO,uBAAA,UAAiC,oCAAoC,iBAAiB;;;;;;;;;;;AxBlIV;;;;;;;;;AAKgC;AAE9G;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWC;;;;;;AAEkC;AAU3B;;;;;;;;;AAUtB;AACA;AACA;AAEA;AACY,iBwBsTU,eAAA,CxBtTiB,OAAA,EwBsTQ,OxBtThB,EAAA,UAAA,CAAA,EAAA,OAAA,CAAA,EwBsTgD,OxBtThD,CAAA,OAAA,CAAA;AAC/B;AACA;;;;;AACA;AACA;AACA;AACA;AAGA;;;;;;AACA;AACA;;;;;;AACA;AACA;AAUA;AAQA;;;;;AAGA;AACA;AAGA;AACA;AACA;AACA;AACA;AAGA;AAQA;AACA;AACA;AAQA;AACA;AAA0D,iBwBgT1C,gBAAA,CxBhT0C,OAAA,EwBgThB,gBxBhTgB,EAAA,OAAA,CAAA,EwBgTW,uBxBhTX,CAAA,EwBgT0C,cxBhT1C"} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| const require_cfWorkerProvider = require('./cfWorkerProvider-ojcZaap3.cjs'); | ||
| //#region src/shimsBrowser.ts | ||
| /** | ||
| * Stub process object for non-Node.js environments. | ||
| * StdioServerTransport is not supported in Cloudflare Workers/browser environments. | ||
| */ | ||
| function notSupported() { | ||
| throw new Error("StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead."); | ||
| } | ||
| const process = { | ||
| get stdin() { | ||
| return notSupported(); | ||
| }, | ||
| get stdout() { | ||
| return notSupported(); | ||
| } | ||
| }; | ||
| //#endregion | ||
| exports.DefaultJsonSchemaValidator = require_cfWorkerProvider.CfWorkerJsonSchemaValidator; | ||
| exports.process = process; | ||
| //# sourceMappingURL=shimsBrowser.cjs.map |
| {"version":3,"file":"shimsBrowser.cjs","names":[],"sources":["../src/shimsBrowser.ts"],"sourcesContent":["/**\n * Browser runtime shims for server package\n *\n * This file is selected via package.json export conditions when bundling for\n * browsers. It binds the same platform choices as the workerd shim (the\n * cfWorker validator, the process stub) WITHOUT the module-scope\n * `preloadSchemas()` call: in a browser, module evaluation is page load —\n * boot latency — so schema construction stays lazy, exactly like Node.\n */\nexport { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator } from '@modelcontextprotocol/core-internal/validators/cfWorker';\n\n/**\n * Stub process object for non-Node.js environments.\n * StdioServerTransport is not supported in Cloudflare Workers/browser environments.\n */\nfunction notSupported(): never {\n throw new Error('StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.');\n}\n\nexport const process = {\n get stdin(): never {\n return notSupported();\n },\n get stdout(): never {\n return notSupported();\n }\n};\n"],"mappings":";;;;;;;AAeA,SAAS,eAAsB;AAC3B,OAAM,IAAI,MAAM,wGAAwG;;AAG5H,MAAa,UAAU;CACnB,IAAI,QAAe;AACf,SAAO,cAAc;;CAEzB,IAAI,SAAgB;AAChB,SAAO,cAAc;;CAE5B"} |
| import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-D9GAttn8.cjs"; | ||
| //#region src/shimsBrowser.d.ts | ||
| declare const process: { | ||
| readonly stdin: never; | ||
| readonly stdout: never; | ||
| }; | ||
| //#endregion | ||
| export { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator, process }; | ||
| //# sourceMappingURL=shimsBrowser.d.cts.map |
| {"version":3,"file":"shimsBrowser.d.cts","names":[],"sources":["../src/shimsBrowser.ts"],"sourcesContent":[],"mappings":";;;;cAmBa"} |
| import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-BYRW5af5.mjs"; | ||
| //#region src/shimsBrowser.d.ts | ||
| declare const process: { | ||
| readonly stdin: never; | ||
| readonly stdout: never; | ||
| }; | ||
| //#endregion | ||
| export { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator, process }; | ||
| //# sourceMappingURL=shimsBrowser.d.mts.map |
| {"version":3,"file":"shimsBrowser.d.mts","names":[],"sources":["../src/shimsBrowser.ts"],"sourcesContent":[],"mappings":";;;;cAmBa"} |
| import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-Bd-iTHAF.mjs"; | ||
| //#region src/shimsBrowser.ts | ||
| /** | ||
| * Stub process object for non-Node.js environments. | ||
| * StdioServerTransport is not supported in Cloudflare Workers/browser environments. | ||
| */ | ||
| function notSupported() { | ||
| throw new Error("StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead."); | ||
| } | ||
| const process = { | ||
| get stdin() { | ||
| return notSupported(); | ||
| }, | ||
| get stdout() { | ||
| return notSupported(); | ||
| } | ||
| }; | ||
| //#endregion | ||
| export { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator, process }; | ||
| //# sourceMappingURL=shimsBrowser.mjs.map |
| {"version":3,"file":"shimsBrowser.mjs","names":[],"sources":["../src/shimsBrowser.ts"],"sourcesContent":["/**\n * Browser runtime shims for server package\n *\n * This file is selected via package.json export conditions when bundling for\n * browsers. It binds the same platform choices as the workerd shim (the\n * cfWorker validator, the process stub) WITHOUT the module-scope\n * `preloadSchemas()` call: in a browser, module evaluation is page load —\n * boot latency — so schema construction stays lazy, exactly like Node.\n */\nexport { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator } from '@modelcontextprotocol/core-internal/validators/cfWorker';\n\n/**\n * Stub process object for non-Node.js environments.\n * StdioServerTransport is not supported in Cloudflare Workers/browser environments.\n */\nfunction notSupported(): never {\n throw new Error('StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.');\n}\n\nexport const process = {\n get stdin(): never {\n return notSupported();\n },\n get stdout(): never {\n return notSupported();\n }\n};\n"],"mappings":";;;;;;;AAeA,SAAS,eAAsB;AAC3B,OAAM,IAAI,MAAM,wGAAwG;;AAG5H,MAAa,UAAU;CACnB,IAAI,QAAe;AACf,SAAO,cAAc;;CAEzB,IAAI,SAAgB;AAChB,SAAO,cAAc;;CAE5B"} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| //#region ../../node_modules/.pnpm/json-schema-typed@8.0.2/node_modules/json-schema-typed/draft_2020_12.d.ts | ||
| type MaybeReadonlyArray<T> = Array<T> | ReadonlyArray<T>; | ||
| type ValueOf<T> = T[keyof T]; | ||
| /** | ||
| * JSON Schema [Draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-validation.html) | ||
| */ | ||
| type JSONSchema<Value = any, SchemaType = (Value extends boolean ? "boolean" : Value extends null ? "null" : Value extends number ? "number" | "integer" : Value extends string ? "string" : Value extends unknown[] ? "array" : Value extends Record<string | number, unknown> ? "object" : JSONSchema.TypeValue)> = boolean | { | ||
| /** | ||
| * Using JSON Pointer fragments requires knowledge of the structure of the | ||
| * schema. When writing schema documents with the intention to provide | ||
| * re-usable schemas, it may be preferable to use a plain name fragment | ||
| * that is not tied to any particular structural location. This allows a | ||
| * subschema to be relocated without requiring JSON Pointer references to | ||
| * be updated. | ||
| * | ||
| * The `$anchor` keyword is used to specify such a fragment. It is an | ||
| * identifier keyword that can only be used to create plain name fragments. | ||
| * | ||
| * If present, the value of this keyword MUST be a string, which MUST start | ||
| * with a letter `[A-Za-z]`, followed by any number of letters, digits | ||
| * `[0-9]`, hyphens `-`, underscores `_`, colons `:`, | ||
| * or periods `.`. | ||
| * | ||
| * Note that the anchor string does not include the `#` character, | ||
| * as it is not a URI-reference. An `{"$anchor": "foo"}` becomes the | ||
| * fragment `#foo` when used in a URI. | ||
| * | ||
| * The base URI to which the resulting fragment is appended is determined | ||
| * by the `$id` keyword as explained in the previous section. | ||
| * Two `$anchor` keywords in the same schema document MAY have the same | ||
| * value if they apply to different base URIs, as the resulting full URIs | ||
| * will be distinct. However, the effect of two `$anchor` keywords | ||
| * with the same value and the same base URI is undefined. Implementations | ||
| * MAY raise an error if such usage is detected. | ||
| */ | ||
| $anchor?: string; | ||
| /** | ||
| * This keyword reserves a location for comments from schema authors to | ||
| * readers or maintainers of the schema. | ||
| * | ||
| * The value of this keyword MUST be a string. Implementations MUST NOT | ||
| * present this string to end users. Tools for editing schemas SHOULD | ||
| * support displaying and editing this keyword. The value of this keyword | ||
| * MAY be used in debug or error output which is intended for developers | ||
| * making use of schemas. | ||
| * | ||
| * Schema vocabularies SHOULD allow `$comment` within any object | ||
| * containing vocabulary keywords. Implementations MAY assume `$comment` | ||
| * is allowed unless the vocabulary specifically forbids it. Vocabularies | ||
| * MUST NOT specify any effect of `$comment` beyond what is described in | ||
| * this specification. | ||
| * | ||
| * Tools that translate other media types or programming languages | ||
| * to and from `application/schema+json` MAY choose to convert that media | ||
| * type or programming language's native comments to or from `$comment` | ||
| * values. The behavior of such translation when both native comments and | ||
| * `$comment` properties are present is implementation-dependent. | ||
| * | ||
| * Implementations MAY strip `$comment` values at any point during | ||
| * processing. In particular, this allows for shortening schemas when the | ||
| * size of deployed schemas is a concern. | ||
| * | ||
| * Implementations MUST NOT take any other action based on the presence, | ||
| * absence, or contents of `$comment` properties. In particular, the | ||
| * value of `$comment` MUST NOT be collected as an annotation result. | ||
| */ | ||
| $comment?: string; | ||
| /** | ||
| * The `$defs` keyword reserves a location for schema authors to inline | ||
| * re-usable JSON Schemas into a more general schema. The keyword does not | ||
| * directly affect the validation result. | ||
| * | ||
| * This keyword's value MUST be an object. Each member value of this object | ||
| * MUST be a valid JSON Schema. | ||
| */ | ||
| $defs?: Record<string, JSONSchema>; | ||
| /** | ||
| * "The `$dynamicAnchor` indicates that the fragment is an extension | ||
| * point when used with the `$dynamicRef` keyword. This low-level, | ||
| * advanced feature makes it easier to extend recursive schemas such as the | ||
| * meta-schemas, without imposing any particular semantics on that | ||
| * extension. See `$dynamicRef` for more details. | ||
| */ | ||
| $dynamicAnchor?: string; | ||
| /** | ||
| * The `$dynamicRef` keyword is an applicator that allows for deferring | ||
| * the full resolution until runtime, at which point it is resolved each | ||
| * time it is encountered while evaluating an instance. | ||
| * | ||
| * Together with `$dynamicAnchor`, `$dynamicRef` implements a | ||
| * cooperative extension mechanism that is primarily useful with recursive | ||
| * schemas (schemas that reference themselves). Both the extension point | ||
| * and the runtime-determined extension target are defined with | ||
| * `$dynamicAnchor`, and only exhibit runtime dynamic behavior when | ||
| * referenced with `$dynamicRef`. | ||
| * | ||
| * The value of the `$dynamicRef` property MUST be a string which is | ||
| * a URI-Reference. Resolved against the current URI base, it produces | ||
| * the URI used as the starting point for runtime resolution. This initial | ||
| * resolution is safe to perform on schema load. | ||
| * | ||
| * If the initially resolved starting point URI includes a fragment that | ||
| * was created by the `$dynamicAnchor` keyword, the initial URI MUST be | ||
| * replaced by the URI (including the fragment) for the outermost schema | ||
| * resource in the [dynamic scope][scopes] that defines | ||
| * an identically named fragment with `$dynamicAnchor`. | ||
| * | ||
| * Otherwise, its behavior is identical to `$ref`, and no runtime | ||
| * resolution is needed. | ||
| * | ||
| * [scopes]: https://json-schema.org/draft/2020-12/json-schema-core.html#scopes | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $dynamicRef?: string; | ||
| /** | ||
| * The `$id` keyword identifies a schema resource with its | ||
| * [canonical][[RFC6596]] URI. | ||
| * | ||
| * Note that this URI is an identifier and not necessarily a network | ||
| * locator. In the case of a network-addressable URL, a schema need not be | ||
| * downloadable from its canonical URI. | ||
| * | ||
| * If present, the value for this keyword MUST be a string, and MUST | ||
| * represent a valid [URI-reference][RFC3986]. This URI-reference SHOULD | ||
| * be normalized, and MUST resolve to an [absolute-URI][RFC3986] (without a | ||
| * fragment). Therefore, `$id` MUST NOT contain a non-empty fragment, | ||
| * and SHOULD NOT contain an empty fragment. | ||
| * | ||
| * Since an empty fragment in the context of the | ||
| * `application/schema+json` media type refers to the same resource as | ||
| * the base URI without a fragment, an implementation MAY normalize a URI | ||
| * ending with an empty fragment by removing the fragment. However, schema | ||
| * authors SHOULD NOT rely on this behavior across implementations. | ||
| * | ||
| * This URI also serves as the base URI for relative URI-references in | ||
| * keywords within the schema resource, in accordance with | ||
| * [RFC 3986][RFC3986] section 5.1.1 regarding base URIs embedded in | ||
| * content. | ||
| * | ||
| * The presence of `$id` in a subschema indicates that the subschema | ||
| * constitutes a distinct schema resource within a single schema document. | ||
| * Furthermore, in accordance with [RFC 3986][RFC3986] section 5.1.2 | ||
| * regarding encapsulating entities, if an `$id` in a subschema is a | ||
| * relative URI-reference, the base URI for resolving that reference is the | ||
| * URI of the parent schema resource. | ||
| * | ||
| * If no parent schema object explicitly identifies itself as a resource | ||
| * with `$id`, the base URI is that of the entire document. | ||
| * | ||
| * The root schema of a JSON Schema document SHOULD contain an `$id` | ||
| * keyword with an [absolute-URI][RFC3986] (containing a scheme, but no | ||
| * fragment). | ||
| * | ||
| * [RFC6596]: https://datatracker.ietf.org/doc/html/rfc6596 | ||
| * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986 | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $id?: string; | ||
| /** | ||
| * The `$ref` keyword is an applicator that is used to reference a | ||
| * statically identified schema. Its results are the results of the | ||
| * referenced schema. Other keywords can appear alongside of `$ref` in | ||
| * the same schema object. | ||
| * | ||
| * The value of the `$ref` property MUST be a string which is a | ||
| * URI-Reference. Resolved against the current URI base, it produces the | ||
| * URI of the schema to apply. | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $ref?: string; | ||
| /** | ||
| * The `$schema` keyword is both used as a JSON Schema dialect identifier | ||
| * and as the identifier of a resource which is itself a JSON Schema, which | ||
| * describes the set of valid schemas written for this particular dialect. | ||
| * | ||
| * The value of this keyword MUST be a [URI][RFC3986] (containing a scheme) | ||
| * and this URI MUST be normalized. The current schema MUST be valid | ||
| * against the meta-schema identified by this URI. | ||
| * | ||
| * If this URI identifies a retrievable resource, that resource SHOULD be | ||
| * of media type `application/schema+json`. | ||
| * | ||
| * The `$schema` keyword SHOULD be used in the document root schema | ||
| * object, and MAY be used in the root schema objects of embedded schema | ||
| * resources. It MUST NOT appear in non-resource root schema objects. If | ||
| * absent from the document root schema, the resulting behavior is | ||
| * implementation-defined. | ||
| * | ||
| * Values for this property are defined elsewhere in this and other | ||
| * documents, and by other parties. | ||
| * | ||
| * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986 | ||
| * | ||
| * @format "uri" | ||
| */ | ||
| $schema?: string; | ||
| /** | ||
| * The `$vocabulary` keyword is used in meta-schemas to identify the | ||
| * vocabularies available for use in schemas described by that meta-schema. | ||
| * It is also used to indicate whether each vocabulary is required or | ||
| * optional, in the sense that an implementation MUST understand the | ||
| * required vocabularies in order to successfully process the schema. | ||
| * Together, this information forms a dialect. Any vocabulary that is | ||
| * understood by the implementation MUST be processed in a manner | ||
| * consistent with the semantic definitions contained within the | ||
| * vocabulary. | ||
| * | ||
| * The value of this keyword MUST be an object. The property names in the | ||
| * object MUST be URIs (containing a scheme) and this URI MUST be | ||
| * normalized. Each URI that appears as a property name identifies a | ||
| * specific set of keywords and their semantics. | ||
| * | ||
| * The URI MAY be a URL, but the nature of the retrievable resource is | ||
| * currently undefined, and reserved for future use. Vocabulary authors | ||
| * MAY use the URL of the vocabulary specification, in a human-readable | ||
| * media type such as `text/html` or `text/plain`, as the vocabulary | ||
| * URI. | ||
| * | ||
| * The values of the object properties MUST be booleans. If the value is | ||
| * `true`, then implementations that do not recognize the vocabulary MUST | ||
| * refuse to process any schemas that declare this meta-schema with | ||
| * `$schema`. If the value is `false`, implementations that do not | ||
| * recognize the vocabulary SHOULD proceed with processing such schemas. | ||
| * The value has no impact if the implementation understands the | ||
| * vocabulary. | ||
| * | ||
| * Unrecognized keywords SHOULD be ignored. This remains the case for | ||
| * keywords defined by unrecognized vocabularies. It is not currently | ||
| * possible to distinguish between unrecognized keywords that are defined | ||
| * in vocabularies from those that are not part of any vocabulary. | ||
| * | ||
| * The `$vocabulary` keyword SHOULD be used in the root schema of any | ||
| * schema document intended for use as a meta-schema. It MUST NOT appear | ||
| * in subschemas. | ||
| * | ||
| * The `$vocabulary` keyword MUST be ignored in schema documents that are | ||
| * not being processed as a meta-schema. | ||
| */ | ||
| $vocabulary?: Record<string, string>; | ||
| /** | ||
| * @deprecated `additionalItems` has been deprecated in favor of `prefixItems` | ||
| * paired with `items`. | ||
| */ | ||
| additionalItems?: JSONSchema; | ||
| /** | ||
| * The value of `additionalProperties` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the presence and annotation | ||
| * results of `properties` and `patternProperties` within the same | ||
| * schema object. Validation with `additionalProperties` applies only to | ||
| * the child values of instance names that do not appear in the annotation | ||
| * results of either `properties` or `patternProperties`. | ||
| * | ||
| * For all such properties, validation succeeds if the child instance | ||
| * validates against the `additionalProperties` schema. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names validated by this keyword's subschema. Annotation results for | ||
| * `additionalProperties` keywords from multiple schemas applied to the | ||
| * same instance location are combined by taking the union of the sets. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * Implementations MAY choose to implement or optimize this keyword in | ||
| * another way that produces the same effect, such as by directly checking | ||
| * the names in `properties` and the patterns in `patternProperties` | ||
| * against the instance property set. | ||
| */ | ||
| additionalProperties?: JSONSchema; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against all schemas defined by this keyword's value. | ||
| */ | ||
| allOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against at least one schema defined by this keyword's | ||
| * value. | ||
| */ | ||
| anyOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * An instance validates successfully against this keyword if its value is | ||
| * equal to the value of the keyword. | ||
| * | ||
| * Use of this keyword is functionally equivalent to the `enum` keyword | ||
| * with a single value. | ||
| */ | ||
| const?: Value; | ||
| /** | ||
| * The value of this keyword MUST be a valid JSON Schema. | ||
| * | ||
| * An array instance is valid against `contains` if at least one of its | ||
| * elements is valid against the given schema. The subschema MUST be | ||
| * applied to every array element even after the first match has been | ||
| * found, in order to collect annotations for use by other keywords. | ||
| * This is to ensure that all possible annotations are collected. | ||
| * | ||
| * Logically, the validation result of applying the value subschema to each | ||
| * item in the array MUST be OR'ed with `false`, resulting in an overall | ||
| * validation result. | ||
| * | ||
| * This keyword produces an annotation value which is an array of the | ||
| * indexes to which this keyword validates successfully when applying its | ||
| * subschema, in ascending order. The value MAY be a boolean `true` if | ||
| * the subschema validates successfully when applied to every index of the | ||
| * instance. The annotation MUST be present if the instance array to which | ||
| * this keyword's schema applies is empty. | ||
| */ | ||
| contains?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * If the instance value is a string, this property defines that the | ||
| * string SHOULD be interpreted as binary data and decoded using the | ||
| * encoding named by this property. [RFC 2045, Sec 6.1][RFC2045] lists the | ||
| * possible values for this property. | ||
| * | ||
| * The value of this property SHOULD be ignored if the instance described | ||
| * is not a string. | ||
| * | ||
| * If this keyword is absent, but `contentMediaType` is present, this | ||
| * indicates that the media type could be encoded into `UTF-8` like any | ||
| * other JSON string value, and does not require additional decoding. | ||
| * | ||
| * The value of this property MUST be a string. | ||
| * | ||
| * [RFC2045]: https://datatracker.ietf.org/doc/html/rfc2045#section-6.1 | ||
| */ | ||
| contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token"; | ||
| /** | ||
| * If the instance is a string, this property indicates the media type | ||
| * of the contents of the string. If `contentEncoding` is present, | ||
| * this property describes the decoded string. | ||
| * | ||
| * The value of this property must be a media type, as defined by | ||
| * [RFC 2046][RFC2046]. This property defines the media type of instances | ||
| * which this schema defines. | ||
| * | ||
| * The value of this property SHOULD be ignored if the instance described | ||
| * is not a string. | ||
| * | ||
| * If the `contentEncoding` property is not present, but the instance | ||
| * value is a string, then the value of this property SHOULD specify a text | ||
| * document type, and the character set SHOULD be the character set into | ||
| * which the JSON string value was decoded (for which the default is | ||
| * Unicode). | ||
| * | ||
| * [RFC2046]: https://datatracker.ietf.org/doc/html/rfc2046 | ||
| */ | ||
| contentMediaType?: string; | ||
| /** | ||
| * If the instance is a string, and if `contentMediaType` is present, | ||
| * this property contains a schema which describes the structure of the | ||
| * string. | ||
| * | ||
| * This keyword MAY be used with any media type that can be mapped into | ||
| * JSON Schema's data model. | ||
| * | ||
| * The value of this property MUST be a valid JSON schema. It SHOULD be | ||
| * ignored if `contentMediaType` is not present. | ||
| */ | ||
| contentSchema?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * This keyword can be used to supply a default JSON value associated with | ||
| * a particular schema. It is RECOMMENDED that a `default` value be valid | ||
| * against the associated schema. | ||
| */ | ||
| default?: Value; | ||
| /** | ||
| * @deprecated `definitions` has been renamed to `$defs`. | ||
| */ | ||
| definitions?: Record<string, JSONSchema>; | ||
| /** | ||
| * @deprecated `dependencies` has been split into two keywords: | ||
| * `dependentSchemas` and `dependentRequired`. | ||
| */ | ||
| dependencies?: Record<string, MaybeReadonlyArray<string> | JSONSchema>; | ||
| /** | ||
| * The value of this keyword MUST be an object. Properties in | ||
| * this object, if any, MUST be arrays. Elements in each array, | ||
| * if any, MUST be strings, and MUST be unique. | ||
| * | ||
| * This keyword specifies properties that are required if a specific | ||
| * other property is present. Their requirement is dependent on the | ||
| * presence of the other property. | ||
| * | ||
| * Validation succeeds if, for each name that appears in both | ||
| * the instance and as a name within this keyword's value, every | ||
| * item in the corresponding array is also the name of a property | ||
| * in the instance. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty object. | ||
| */ | ||
| dependentRequired?: Record<string, MaybeReadonlyArray<string>>; | ||
| /** | ||
| * This keyword specifies subschemas that are evaluated if the instance is | ||
| * an object and contains a certain property. | ||
| * | ||
| * This keyword's value MUST be an object. Each value in the object MUST be | ||
| * a valid JSON Schema. | ||
| * | ||
| * If the object key is a property in the instance, the entire instance | ||
| * must validate against the subschema. Its use is dependent on the | ||
| * presence of the property. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty object. | ||
| */ | ||
| dependentSchemas?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword are applicable to a single sub-instance, applications | ||
| * SHOULD consider the instance location to be deprecated if any occurrence | ||
| * specifies a `true` value. | ||
| * | ||
| * If `deprecated` has a value of boolean `true`, it indicates that | ||
| * applications SHOULD refrain from usage of the declared property. It MAY | ||
| * mean the property is going to be removed in the future. | ||
| * | ||
| * A root schema containing `deprecated` with a value of `true` | ||
| * indicates that the entire resource being described MAY be removed in the | ||
| * future. | ||
| * | ||
| * The `deprecated` keyword applies to each instance location to which | ||
| * the schema object containing the keyword successfully applies. This can | ||
| * result in scenarios where every array item or object property is | ||
| * deprecated even though the containing array or object is not. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `false`. | ||
| */ | ||
| deprecated?: boolean; | ||
| /** | ||
| * Can be used to decorate a user interface with explanation or information | ||
| * about the data produced. | ||
| */ | ||
| description?: string; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * When `if` is present, and the instance fails to validate against its | ||
| * subschema, then validation succeeds against this keyword if the instance | ||
| * successfully validates against this keyword's subschema. | ||
| * | ||
| * This keyword has no effect when `if` is absent, or when the instance | ||
| * successfully validates against its subschema. Implementations MUST NOT | ||
| * evaluate the instance against this keyword, for either validation or | ||
| * annotation collection purposes, in such cases. | ||
| */ | ||
| else?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * The value of this keyword MUST be an array. This array SHOULD have at | ||
| * least one element. Elements in the array SHOULD be unique. | ||
| * | ||
| * An instance validates successfully against this keyword if its value is | ||
| * equal to one of the elements in this keyword's array value. | ||
| * | ||
| * Elements in the array might be of any type, including `null`. | ||
| */ | ||
| enum?: MaybeReadonlyArray<Value>; | ||
| /** | ||
| * The value of this keyword MUST be an array. When multiple occurrences of | ||
| * this keyword are applicable to a single sub-instance, implementations | ||
| * MUST provide a flat array of all values rather than an array of arrays. | ||
| * | ||
| * This keyword can be used to provide sample JSON values associated with a | ||
| * particular schema, for the purpose of illustrating usage. It is | ||
| * RECOMMENDED that these values be valid against the associated schema. | ||
| * | ||
| * Implementations MAY use the value(s) of `default`, if present, as an | ||
| * additional example. If `examples` is absent, `default` MAY still be | ||
| * used in this manner. | ||
| */ | ||
| examples?: MaybeReadonlyArray<Value>; | ||
| /** | ||
| * The value of `exclusiveMaximum` MUST be a number, representing an | ||
| * exclusive upper limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then the instance is valid only if it has a | ||
| * value strictly less than (not equal to) `exclusiveMaximum`. | ||
| */ | ||
| exclusiveMaximum?: number; | ||
| /** | ||
| * The value of `exclusiveMinimum` MUST be a number, representing an | ||
| * exclusive lower limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then the instance is valid only if it has a | ||
| * value strictly greater than (not equal to) `exclusiveMinimum`. | ||
| */ | ||
| exclusiveMinimum?: number; | ||
| /** | ||
| * Implementations MAY treat `format` as an assertion in addition to an | ||
| * annotation, and attempt to validate the value's conformance to the | ||
| * specified semantics. | ||
| * | ||
| * The value of this keyword is called a format attribute. It MUST be a | ||
| * string. A format attribute can generally only validate a given set | ||
| * of instance types. If the type of the instance to validate is not in | ||
| * this set, validation for this format attribute and instance SHOULD | ||
| * succeed. Format attributes are most often applied to strings, but can | ||
| * be specified to apply to any type. | ||
| * | ||
| * Implementations MAY support custom format attributes. Save for agreement | ||
| * between parties, schema authors SHALL NOT expect a peer implementation | ||
| * to support such custom format attributes. An implementation MUST NOT | ||
| * fail validation or cease processing due to an unknown format attribute. | ||
| * When treating `format` as an annotation, implementations SHOULD | ||
| * collect both known and unknown format attribute values. | ||
| */ | ||
| format?: string; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * This validation outcome of this keyword's subschema has no direct effect | ||
| * on the overall validation result. Rather, it controls which of the | ||
| * `then` or `else` keywords are evaluated. | ||
| * | ||
| * Instances that successfully validate against this keyword's subschema | ||
| * MUST also be valid against the subschema value of the `then` keyword, | ||
| * if present. | ||
| * | ||
| * Instances that fail to validate against this keyword's subschema MUST | ||
| * also be valid against the subschema value of the `else` keyword, if | ||
| * present. | ||
| * | ||
| * If annotations are being collected, they are collected | ||
| * from this keyword's subschema in the usual way, including when the | ||
| * keyword is present without either `then` or `else`. | ||
| */ | ||
| if?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * The value of `items` MUST be a valid JSON Schema. | ||
| * | ||
| * This keyword applies its subschema to all instance elements at indexes | ||
| * greater than the length of the `prefixItems` array in the same schema | ||
| * object, as reported by the annotation result of that `prefixItems` | ||
| * keyword. If no such annotation result exists, `items` applies its | ||
| * subschema to all instance array elements. | ||
| * | ||
| * Note that the behavior of `items` without `prefixItems` is identical | ||
| * to that of the schema form of `items` in prior drafts. | ||
| * | ||
| * When `prefixItems` is present, the behavior of `items` is identical | ||
| * to the former `additionalItems` keyword. | ||
| * | ||
| * If the `items` subschema is applied to any positions within the | ||
| * instance array, it produces an annotation result of boolean `true`, | ||
| * indicating that all remaining array elements have been evaluated against | ||
| * this keyword's subschema. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * Implementations MAY choose to implement or optimize this keyword | ||
| * in another way that produces the same effect, such as by directly | ||
| * checking for the presence and size of a `prefixItems` array. | ||
| */ | ||
| items?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * If `contains` is not present within the same schema object, then this | ||
| * keyword has no effect. | ||
| * | ||
| * An instance array is valid against `maxContains` in two ways, | ||
| * depending on the form of the annotation result of an adjacent | ||
| * `contains` keyword. The first way is if the annotation result is an | ||
| * array and the length of that array is less than or equal to the | ||
| * `maxContains` value. The second way is if the annotation result is a | ||
| * boolean `true` and the instance array length is less than or equal to | ||
| * the `maxContains` value. | ||
| */ | ||
| maxContains?: number; | ||
| /** | ||
| * The value of `maximum` MUST be a number, representing an inclusive | ||
| * upper limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then this keyword validates only if the | ||
| * instance is less than or exactly equal to `maximum`. | ||
| */ | ||
| maximum?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An array instance is valid against `maxItems` if its size is less | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxItems?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * A string instance is valid against this keyword if its length is less | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * The length of a string instance is defined as the number of its | ||
| * characters as defined by [RFC 8259][RFC8259]. | ||
| * | ||
| * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259 | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxLength?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An object instance is valid against `maxProperties` if its number of | ||
| * `properties` is less than, or equal to, the value of this keyword. | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxProperties?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * If `contains` is not present within the same schema object, then this | ||
| * keyword has no effect. | ||
| * | ||
| * An instance array is valid against `minContains` in two ways, | ||
| * depending on the form of the annotation result of an adjacent | ||
| * `contains` keyword. The first way is if the annotation result is an | ||
| * array and the length of that array is greater than or equal to the | ||
| * `minContains` value. The second way is if the annotation result is a | ||
| * boolean `true` and the instance array length is greater than or equal | ||
| * to the `minContains` value. | ||
| * | ||
| * A value of `0` is allowed, but is only useful for setting a range | ||
| * of occurrences from `0` to the value of `maxContains`. A value of | ||
| * `0` with no `maxContains` causes `contains` to always pass | ||
| * validation. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `1`. | ||
| * | ||
| * @default 1 | ||
| */ | ||
| minContains?: number; | ||
| /** | ||
| * The value of `minimum` MUST be a number, representing an inclusive | ||
| * lower limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then this keyword validates only if the | ||
| * instance is greater than or exactly equal to `minimum`. | ||
| */ | ||
| minimum?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An array instance is valid against `minItems` if its size is greater | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minItems?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * A string instance is valid against this keyword if its length is greater | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * The length of a string instance is defined as the number of its | ||
| * characters as defined by [RFC 8259][RFC8259]. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259 | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minLength?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An object instance is valid against `minProperties` if its number of | ||
| * `properties` is greater than, or equal to, the value of this keyword. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minProperties?: number; | ||
| /** | ||
| * The value of `multipleOf` MUST be a number, strictly greater than | ||
| * `0`. | ||
| * | ||
| * A numeric instance is valid only if division by this keyword's value | ||
| * results in an integer. | ||
| * | ||
| * @exclusiveMinimum 0 | ||
| */ | ||
| multipleOf?: number; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * An instance is valid against this keyword if it fails to validate | ||
| * successfully against the schema defined by this keyword. | ||
| */ | ||
| not?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against exactly one schema defined by this keyword's value. | ||
| */ | ||
| oneOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * The value of this keyword MUST be a string. This string SHOULD be a | ||
| * valid regular expression, according to the [ECMA-262][ecma262] regular | ||
| * expression dialect. | ||
| * | ||
| * A string instance is considered valid if the regular expression matches | ||
| * the instance successfully. Recall: regular expressions are not | ||
| * implicitly anchored. | ||
| * | ||
| * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/ | ||
| * | ||
| * @format "regex" | ||
| */ | ||
| pattern?: string; | ||
| /** | ||
| * The value of `patternProperties` MUST be an object. Each property name | ||
| * of this object SHOULD be a valid regular expression, according to the | ||
| * [ECMA-262][ecma262] regular expression dialect. Each property value of | ||
| * this object MUST be a valid JSON Schema. | ||
| * | ||
| * Validation succeeds if, for each instance name that matches any regular | ||
| * expressions that appear as a property name in this keyword's value, | ||
| * the child instance for that name successfully validates against each | ||
| * schema that corresponds to a matching regular expression. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names matched by this keyword. Omitting this keyword has the same | ||
| * assertion behavior as an empty object. | ||
| * | ||
| * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/ | ||
| */ | ||
| patternProperties?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of `prefixItems` MUST be a non-empty array of valid JSON | ||
| * Schemas. | ||
| * | ||
| * Validation succeeds if each element of the instance validates against | ||
| * the schema at the same position, if any. This keyword does not | ||
| * constrain the length of the array. If the array is longer than this | ||
| * keyword's value, this keyword validates only the prefix of matching | ||
| * length. | ||
| * | ||
| * This keyword produces an annotation value which is the largest index to | ||
| * which this keyword applied a subschema. The value MAY be a boolean | ||
| * `true` if a subschema was applied to every index of the instance, such | ||
| * as is produced by the `items` keyword. | ||
| * This annotation affects the behavior of `items` and | ||
| * `unevaluatedItems`. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty array. | ||
| */ | ||
| prefixItems?: MaybeReadonlyArray<JSONSchema> | JSONSchema; | ||
| /** | ||
| * The value of `properties` MUST be an object. Each value of this object | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * Validation succeeds if, for each name that appears in both the instance | ||
| * and as a name within this keyword's value, the child instance for that | ||
| * name successfully validates against the corresponding schema. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names matched by this keyword. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * object. | ||
| */ | ||
| properties?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of `propertyNames` MUST be a valid JSON Schema. | ||
| * | ||
| * If the instance is an object, this keyword validates if every property | ||
| * name in the instance validates against the provided schema. | ||
| * Note the property name that the schema is testing will always be a | ||
| * string. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty schema. | ||
| */ | ||
| propertyNames?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword are applicable to a single sub-instance, the resulting | ||
| * value MUST be `true` if any occurrence specifies a `true` value, and | ||
| * MUST be `false` otherwise. | ||
| * | ||
| * If `readOnly` has a value of boolean `true`, it indicates that the | ||
| * value of the instance is managed exclusively by the owning authority, | ||
| * and attempts by an application to modify the value of this property are | ||
| * expected to be ignored or rejected by that owning authority. | ||
| * | ||
| * An instance document that is marked as `readOnly` for the entire | ||
| * document MAY be ignored if sent to the owning authority, or MAY result | ||
| * in an error, at the authority's discretion. | ||
| * | ||
| * For example, `readOnly` would be used to mark a database-generated | ||
| * serial number as read-only. | ||
| * | ||
| * This keyword can be used to assist in user interface instance | ||
| * generation. | ||
| * | ||
| * @default false | ||
| */ | ||
| readOnly?: boolean; | ||
| /** | ||
| * The value of this keyword MUST be an array. Elements of this array, if | ||
| * any, MUST be strings, and MUST be unique. | ||
| * | ||
| * An object instance is valid against this keyword if every item in the | ||
| * array is the name of a property in the instance. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty array. | ||
| */ | ||
| required?: MaybeReadonlyArray<string>; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * When `if` is present, and the instance successfully validates against | ||
| * its subschema, then validation succeeds against this keyword if the | ||
| * instance also successfully validates against this keyword's subschema. | ||
| * | ||
| * This keyword has no effect when `if` is absent, or when the instance | ||
| * fails to validate against its subschema. Implementations MUST NOT | ||
| * evaluate the instance against this keyword, for either validation or | ||
| * annotation collection purposes, in such cases. | ||
| */ | ||
| then?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * Can be used to decorate a user interface with a short label about the | ||
| * data produced. | ||
| */ | ||
| title?: string; | ||
| /** | ||
| * The value of this keyword MUST be either a string or an array. If it is | ||
| * an array, elements of the array MUST be strings and MUST be unique. | ||
| * | ||
| * String values MUST be one of the six primitive types (`"null"`, | ||
| * `"boolean"`, `"object"`, `"array"`, `"number"`, or | ||
| * `"string"`), or `"integer"` which matches any number with a zero | ||
| * fractional part. | ||
| * | ||
| * An instance validates if and only if the instance is in any of the sets | ||
| * listed for this keyword. | ||
| */ | ||
| type?: SchemaType; | ||
| /** | ||
| * The value of `unevaluatedItems` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the annotation results of | ||
| * adjacent keywords that apply to the instance location being validated. | ||
| * Specifically, the annotations from `prefixItems`, `items`, and | ||
| * `contains`, which can come from those keywords when they are adjacent | ||
| * to the `unevaluatedItems` keyword. Those three annotations, as well as | ||
| * `unevaluatedItems`, can also result from any and all adjacent | ||
| * [in-place applicator][in-place-applicator] keywords. | ||
| * | ||
| * If no relevant annotations are present, the `unevaluatedItems` | ||
| * subschema MUST be applied to all locations in the array. | ||
| * If a boolean `true` value is present from any of the relevant | ||
| * annotations, `unevaluatedItems` MUST be ignored. Otherwise, the | ||
| * subschema MUST be applied to any index greater than the largest | ||
| * annotation value for `prefixItems`, which does not appear in any | ||
| * annotation value for `contains`. | ||
| * | ||
| * This means that `prefixItems`, `items`, `contains`, and all | ||
| * in-place applicators MUST be evaluated before this keyword can be | ||
| * evaluated. Authors of extension keywords MUST NOT define an in-place | ||
| * applicator that would need to be evaluated after this keyword. | ||
| * | ||
| * If the `unevaluatedItems` subschema is applied to any positions within | ||
| * the instance array, it produces an annotation result of boolean | ||
| * `true`, analogous to the behavior of `items`. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place | ||
| */ | ||
| unevaluatedItems?: JSONSchema; | ||
| /** | ||
| * The value of `unevaluatedProperties` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the annotation results of | ||
| * adjacent keywords that apply to the instance location being validated. | ||
| * Specifically, the annotations from `properties`, | ||
| * `patternProperties`, and `additionalProperties`, which can come from | ||
| * those keywords when they are adjacent to the `unevaluatedProperties` | ||
| * keyword. Those three annotations, as well as `unevaluatedProperties`, | ||
| * can also result from any and all adjacent | ||
| * [in-place applicator][in-place-applicator] keywords. | ||
| * | ||
| * Validation with `unevaluatedProperties` applies only to the child | ||
| * values of instance names that do not appear in the `properties`, | ||
| * `patternProperties`, `additionalProperties`, or | ||
| * `unevaluatedProperties` annotation results that apply to the | ||
| * instance location being validated. | ||
| * | ||
| * For all such properties, validation succeeds if the child instance | ||
| * validates against the "unevaluatedProperties" schema. | ||
| * | ||
| * This means that `properties`, `patternProperties`, | ||
| * `additionalProperties`, and all in-place applicators MUST be evaluated | ||
| * before this keyword can be evaluated. Authors of extension keywords | ||
| * MUST NOT define an in-place applicator that would need to be evaluated | ||
| * after this keyword. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names validated by this keyword's subschema. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place | ||
| */ | ||
| unevaluatedProperties?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. | ||
| * | ||
| * If this keyword has boolean value `false`, the instance validates | ||
| * successfully. If it has boolean value `true`, the instance validates | ||
| * successfully if all of its elements are unique. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `false`. | ||
| * | ||
| * @default false | ||
| */ | ||
| uniqueItems?: boolean; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword is applicable to a single sub-instance, the resulting | ||
| * value MUST be `true` if any occurrence specifies a `true` value, and | ||
| * MUST be `false` otherwise. | ||
| * | ||
| * If `writeOnly` has a value of boolean `true`, it indicates that the | ||
| * value is never present when the instance is retrieved from the owning | ||
| * authority. It can be present when sent to the owning authority to update | ||
| * or create the document (or the resource it represents), but it will not | ||
| * be included in any updated or newly created version of the instance. | ||
| * | ||
| * An instance document that is marked as `writeOnly` for the entire | ||
| * document MAY be returned as a blank document of some sort, or MAY | ||
| * produce an error upon retrieval, or have the retrieval request ignored, | ||
| * at the authority's discretion. | ||
| * | ||
| * For example, `writeOnly` would be used to mark a password input field. | ||
| * | ||
| * These keywords can be used to assist in user interface instance | ||
| * generation. In particular, an application MAY choose to use a widget | ||
| * that hides input values as they are typed for write-only fields. | ||
| * | ||
| * @default false | ||
| */ | ||
| writeOnly?: boolean; | ||
| }; | ||
| declare namespace JSONSchema { | ||
| type TypeValue = ValueOf<TypeName> | TypeName | Array<ValueOf<TypeName> | TypeName> | ReadonlyArray<ValueOf<TypeName> | TypeName>; | ||
| /** | ||
| * JSON Schema interface | ||
| */ | ||
| type Interface<Value = any, SchemaType extends TypeValue = TypeValue> = Exclude<JSONSchema<Value, SchemaType>, boolean>; | ||
| type Array<T = any> = Pick<Interface<T, "array">, KeywordByType.Any | KeywordByType.Array>; | ||
| type Boolean = Pick<Interface<boolean, "boolean">, KeywordByType.Any>; | ||
| type Integer = Pick<Interface<number, "integer">, KeywordByType.Any | KeywordByType.Number>; | ||
| type Number = Pick<Interface<number, "number">, KeywordByType.Any | KeywordByType.Number>; | ||
| type Null = Pick<Interface<null, "null">, KeywordByType.Any>; | ||
| type Object<T = any> = Pick<Interface<T, "object">, KeywordByType.Any | KeywordByType.Object>; | ||
| type String = Pick<Interface<string, "string">, KeywordByType.Any | KeywordByType.String>; | ||
| } | ||
| declare namespace KeywordByType { | ||
| type Any = "$anchor" | "$comment" | "$defs" | "$dynamicAnchor" | "$dynamicRef" | "$id" | "$ref" | "$schema" | "$vocabulary" | "allOf" | "anyOf" | "const" | "default" | "definitions" | "deprecated" | "description" | "else" | "enum" | "examples" | "format" | "if" | "not" | "oneOf" | "readOnly" | "then" | "title" | "type" | "writeOnly"; | ||
| type Array = "additionalItems" | "contains" | "items" | "maxContains" | "maxItems" | "minContains" | "minItems" | "prefixItems" | "unevaluatedItems" | "uniqueItems"; | ||
| type Number = "exclusiveMaximum" | "exclusiveMinimum" | "maximum" | "minimum" | "multipleOf"; | ||
| type Object = "additionalProperties" | "dependencies" | "dependentRequired" | "dependentSchemas" | "maxProperties" | "minProperties" | "patternProperties" | "properties" | "propertyNames" | "required" | "unevaluatedProperties"; | ||
| type String = "contentEncoding" | "contentMediaType" | "contentSchema" | "maxLength" | "minLength" | "pattern"; | ||
| } | ||
| /** | ||
| * Content encoding strategy enum. | ||
| * | ||
| * - [Content-Transfer-Encoding Syntax](https://datatracker.ietf.org/doc/html/rfc2045#section-6.1) | ||
| * - [7bit vs 8bit encoding](https://stackoverflow.com/questions/25710599/content-transfer-encoding-7bit-or-8-bit/28531705#28531705) | ||
| */ | ||
| /** | ||
| * Enum consisting of simple type names for the `type` keyword | ||
| */ | ||
| declare enum TypeName { | ||
| /** | ||
| * Value MUST be an array. | ||
| */ | ||
| Array = "array", | ||
| /** | ||
| * Value MUST be a boolean. | ||
| */ | ||
| Boolean = "boolean", | ||
| /** | ||
| * Value MUST be an integer, no floating point numbers are allowed. This is a | ||
| * subset of the number type. | ||
| */ | ||
| Integer = "integer", | ||
| /** | ||
| * Value MUST be null. Note this is mainly for purpose of being able use union | ||
| * types to define nullability. If this type is not included in a union, null | ||
| * values are not allowed (the primitives listed above do not allow nulls on | ||
| * their own). | ||
| */ | ||
| Null = "null", | ||
| /** | ||
| * Value MUST be a number, floating point numbers are allowed. | ||
| */ | ||
| Number = "number", | ||
| /** | ||
| * Value MUST be an object. | ||
| */ | ||
| Object = "object", | ||
| /** | ||
| * Value MUST be a string. | ||
| */ | ||
| String = "string", | ||
| } | ||
| //#endregion | ||
| //#region ../core-internal/src/validators/types.d.ts | ||
| /** | ||
| * JSON Schema type definition (JSON Schema Draft 2020-12) | ||
| * | ||
| * This uses the object form of JSON Schema (excluding boolean schemas). | ||
| * While `true` and `false` are valid JSON Schemas, this SDK uses the | ||
| * object form for practical type safety. | ||
| * | ||
| * Re-exported from json-schema-typed for convenience. | ||
| * @see https://json-schema.org/draft/2020-12/json-schema-core.html | ||
| */ | ||
| type JsonSchemaType = JSONSchema.Interface; | ||
| /** | ||
| * Result of a JSON Schema validation operation | ||
| */ | ||
| type JsonSchemaValidatorResult<T> = { | ||
| valid: true; | ||
| data: T; | ||
| errorMessage: undefined; | ||
| } | { | ||
| valid: false; | ||
| data: undefined; | ||
| errorMessage: string; | ||
| }; | ||
| /** | ||
| * A validator function that validates data against a JSON Schema | ||
| */ | ||
| type JsonSchemaValidator<T> = (input: unknown) => JsonSchemaValidatorResult<T>; | ||
| /** | ||
| * Provider interface for creating validators from JSON Schemas | ||
| * | ||
| * This is the main extension point for custom validator implementations. | ||
| * Implementations should: | ||
| * - Support JSON Schema Draft 2020-12 (or be compatible with it) | ||
| * - Return validator functions that can be called multiple times | ||
| * - Handle schema compilation/caching internally | ||
| * - Provide clear error messages on validation failure | ||
| * | ||
| * @example | ||
| * ```ts source="./types.examples.ts#jsonSchemaValidator_implementation" | ||
| * class MyValidatorProvider implements jsonSchemaValidator { | ||
| * getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T> { | ||
| * // Compile/cache validator from schema | ||
| * return (input: unknown) => | ||
| * isValid(schema, input) | ||
| * ? { valid: true, data: input as T, errorMessage: undefined } | ||
| * : { valid: false, data: undefined, errorMessage: 'Error details' }; | ||
| * } | ||
| * } | ||
| * ``` | ||
| */ | ||
| interface jsonSchemaValidator { | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that can be called multiple times | ||
| */ | ||
| getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| //#endregion | ||
| export { jsonSchemaValidator as i, JsonSchemaValidator as n, JsonSchemaValidatorResult as r, JsonSchemaType as t }; | ||
| //# sourceMappingURL=types-DsbMXNFL.d.cts.map |
| {"version":3,"file":"types-DsbMXNFL.d.cts","names":["draft","$schema","MaybeReadonlyArray","T","Array","ReadonlyArray","ValueOf","JSONSchema","Value","SchemaType","Record","TypeValue","TypeName","Exclude","Interface","KeywordByType","Any","Pick","Number","Object","String","ContentEncoding","Format","keywords"],"sources":["../../../node_modules/.pnpm/json-schema-typed@8.0.2/node_modules/json-schema-typed/draft_2020_12.d.ts","../../core-internal/src/validators/types.ts"],"sourcesContent":["export declare const draft: \"2020-12\";\r\nexport declare const $schema: \"https://json-schema.org/draft/2020-12/schema\";\r\ntype MaybeReadonlyArray<T> = Array<T> | ReadonlyArray<T>;\r\ntype ValueOf<T> = T[keyof T];\r\n/**\r\n * JSON Schema [Draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-validation.html)\r\n */\r\nexport type JSONSchema<Value = any, SchemaType = Value extends boolean ? \"boolean\" : Value extends null ? \"null\" : Value extends number ? \"number\" | \"integer\" : Value extends string ? \"string\" : Value extends unknown[] ? \"array\" : Value extends Record<string | number, unknown> ? \"object\" : JSONSchema.TypeValue> = boolean | {\r\n /**\r\n * Using JSON Pointer fragments requires knowledge of the structure of the\r\n * schema. When writing schema documents with the intention to provide\r\n * re-usable schemas, it may be preferable to use a plain name fragment\r\n * that is not tied to any particular structural location. This allows a\r\n * subschema to be relocated without requiring JSON Pointer references to\r\n * be updated.\r\n *\r\n * The `$anchor` keyword is used to specify such a fragment. It is an\r\n * identifier keyword that can only be used to create plain name fragments.\r\n *\r\n * If present, the value of this keyword MUST be a string, which MUST start\r\n * with a letter `[A-Za-z]`, followed by any number of letters, digits\r\n * `[0-9]`, hyphens `-`, underscores `_`, colons `:`,\r\n * or periods `.`.\r\n *\r\n * Note that the anchor string does not include the `#` character,\r\n * as it is not a URI-reference. An `{\"$anchor\": \"foo\"}` becomes the\r\n * fragment `#foo` when used in a URI.\r\n *\r\n * The base URI to which the resulting fragment is appended is determined\r\n * by the `$id` keyword as explained in the previous section.\r\n * Two `$anchor` keywords in the same schema document MAY have the same\r\n * value if they apply to different base URIs, as the resulting full URIs\r\n * will be distinct. However, the effect of two `$anchor` keywords\r\n * with the same value and the same base URI is undefined. Implementations\r\n * MAY raise an error if such usage is detected.\r\n */\r\n $anchor?: string;\r\n /**\r\n * This keyword reserves a location for comments from schema authors to\r\n * readers or maintainers of the schema.\r\n *\r\n * The value of this keyword MUST be a string. Implementations MUST NOT\r\n * present this string to end users. Tools for editing schemas SHOULD\r\n * support displaying and editing this keyword. The value of this keyword\r\n * MAY be used in debug or error output which is intended for developers\r\n * making use of schemas.\r\n *\r\n * Schema vocabularies SHOULD allow `$comment` within any object\r\n * containing vocabulary keywords. Implementations MAY assume `$comment`\r\n * is allowed unless the vocabulary specifically forbids it. Vocabularies\r\n * MUST NOT specify any effect of `$comment` beyond what is described in\r\n * this specification.\r\n *\r\n * Tools that translate other media types or programming languages\r\n * to and from `application/schema+json` MAY choose to convert that media\r\n * type or programming language's native comments to or from `$comment`\r\n * values. The behavior of such translation when both native comments and\r\n * `$comment` properties are present is implementation-dependent.\r\n *\r\n * Implementations MAY strip `$comment` values at any point during\r\n * processing. In particular, this allows for shortening schemas when the\r\n * size of deployed schemas is a concern.\r\n *\r\n * Implementations MUST NOT take any other action based on the presence,\r\n * absence, or contents of `$comment` properties. In particular, the\r\n * value of `$comment` MUST NOT be collected as an annotation result.\r\n */\r\n $comment?: string;\r\n /**\r\n * The `$defs` keyword reserves a location for schema authors to inline\r\n * re-usable JSON Schemas into a more general schema. The keyword does not\r\n * directly affect the validation result.\r\n *\r\n * This keyword's value MUST be an object. Each member value of this object\r\n * MUST be a valid JSON Schema.\r\n */\r\n $defs?: Record<string, JSONSchema>;\r\n /**\r\n * \"The `$dynamicAnchor` indicates that the fragment is an extension\r\n * point when used with the `$dynamicRef` keyword. This low-level,\r\n * advanced feature makes it easier to extend recursive schemas such as the\r\n * meta-schemas, without imposing any particular semantics on that\r\n * extension. See `$dynamicRef` for more details.\r\n */\r\n $dynamicAnchor?: string;\r\n /**\r\n * The `$dynamicRef` keyword is an applicator that allows for deferring\r\n * the full resolution until runtime, at which point it is resolved each\r\n * time it is encountered while evaluating an instance.\r\n *\r\n * Together with `$dynamicAnchor`, `$dynamicRef` implements a\r\n * cooperative extension mechanism that is primarily useful with recursive\r\n * schemas (schemas that reference themselves). Both the extension point\r\n * and the runtime-determined extension target are defined with\r\n * `$dynamicAnchor`, and only exhibit runtime dynamic behavior when\r\n * referenced with `$dynamicRef`.\r\n *\r\n * The value of the `$dynamicRef` property MUST be a string which is\r\n * a URI-Reference. Resolved against the current URI base, it produces\r\n * the URI used as the starting point for runtime resolution. This initial\r\n * resolution is safe to perform on schema load.\r\n *\r\n * If the initially resolved starting point URI includes a fragment that\r\n * was created by the `$dynamicAnchor` keyword, the initial URI MUST be\r\n * replaced by the URI (including the fragment) for the outermost schema\r\n * resource in the [dynamic scope][scopes] that defines\r\n * an identically named fragment with `$dynamicAnchor`.\r\n *\r\n * Otherwise, its behavior is identical to `$ref`, and no runtime\r\n * resolution is needed.\r\n *\r\n * [scopes]: https://json-schema.org/draft/2020-12/json-schema-core.html#scopes\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $dynamicRef?: string;\r\n /**\r\n * The `$id` keyword identifies a schema resource with its\r\n * [canonical][[RFC6596]] URI.\r\n *\r\n * Note that this URI is an identifier and not necessarily a network\r\n * locator. In the case of a network-addressable URL, a schema need not be\r\n * downloadable from its canonical URI.\r\n *\r\n * If present, the value for this keyword MUST be a string, and MUST\r\n * represent a valid [URI-reference][RFC3986]. This URI-reference SHOULD\r\n * be normalized, and MUST resolve to an [absolute-URI][RFC3986] (without a\r\n * fragment). Therefore, `$id` MUST NOT contain a non-empty fragment,\r\n * and SHOULD NOT contain an empty fragment.\r\n *\r\n * Since an empty fragment in the context of the\r\n * `application/schema+json` media type refers to the same resource as\r\n * the base URI without a fragment, an implementation MAY normalize a URI\r\n * ending with an empty fragment by removing the fragment. However, schema\r\n * authors SHOULD NOT rely on this behavior across implementations.\r\n *\r\n * This URI also serves as the base URI for relative URI-references in\r\n * keywords within the schema resource, in accordance with\r\n * [RFC 3986][RFC3986] section 5.1.1 regarding base URIs embedded in\r\n * content.\r\n *\r\n * The presence of `$id` in a subschema indicates that the subschema\r\n * constitutes a distinct schema resource within a single schema document.\r\n * Furthermore, in accordance with [RFC 3986][RFC3986] section 5.1.2\r\n * regarding encapsulating entities, if an `$id` in a subschema is a\r\n * relative URI-reference, the base URI for resolving that reference is the\r\n * URI of the parent schema resource.\r\n *\r\n * If no parent schema object explicitly identifies itself as a resource\r\n * with `$id`, the base URI is that of the entire document.\r\n *\r\n * The root schema of a JSON Schema document SHOULD contain an `$id`\r\n * keyword with an [absolute-URI][RFC3986] (containing a scheme, but no\r\n * fragment).\r\n *\r\n * [RFC6596]: https://datatracker.ietf.org/doc/html/rfc6596\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $id?: string;\r\n /**\r\n * The `$ref` keyword is an applicator that is used to reference a\r\n * statically identified schema. Its results are the results of the\r\n * referenced schema. Other keywords can appear alongside of `$ref` in\r\n * the same schema object.\r\n *\r\n * The value of the `$ref` property MUST be a string which is a\r\n * URI-Reference. Resolved against the current URI base, it produces the\r\n * URI of the schema to apply.\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $ref?: string;\r\n /**\r\n * The `$schema` keyword is both used as a JSON Schema dialect identifier\r\n * and as the identifier of a resource which is itself a JSON Schema, which\r\n * describes the set of valid schemas written for this particular dialect.\r\n *\r\n * The value of this keyword MUST be a [URI][RFC3986] (containing a scheme)\r\n * and this URI MUST be normalized. The current schema MUST be valid\r\n * against the meta-schema identified by this URI.\r\n *\r\n * If this URI identifies a retrievable resource, that resource SHOULD be\r\n * of media type `application/schema+json`.\r\n *\r\n * The `$schema` keyword SHOULD be used in the document root schema\r\n * object, and MAY be used in the root schema objects of embedded schema\r\n * resources. It MUST NOT appear in non-resource root schema objects. If\r\n * absent from the document root schema, the resulting behavior is\r\n * implementation-defined.\r\n *\r\n * Values for this property are defined elsewhere in this and other\r\n * documents, and by other parties.\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n *\r\n * @format \"uri\"\r\n */\r\n $schema?: string;\r\n /**\r\n * The `$vocabulary` keyword is used in meta-schemas to identify the\r\n * vocabularies available for use in schemas described by that meta-schema.\r\n * It is also used to indicate whether each vocabulary is required or\r\n * optional, in the sense that an implementation MUST understand the\r\n * required vocabularies in order to successfully process the schema.\r\n * Together, this information forms a dialect. Any vocabulary that is\r\n * understood by the implementation MUST be processed in a manner\r\n * consistent with the semantic definitions contained within the\r\n * vocabulary.\r\n *\r\n * The value of this keyword MUST be an object. The property names in the\r\n * object MUST be URIs (containing a scheme) and this URI MUST be\r\n * normalized. Each URI that appears as a property name identifies a\r\n * specific set of keywords and their semantics.\r\n *\r\n * The URI MAY be a URL, but the nature of the retrievable resource is\r\n * currently undefined, and reserved for future use. Vocabulary authors\r\n * MAY use the URL of the vocabulary specification, in a human-readable\r\n * media type such as `text/html` or `text/plain`, as the vocabulary\r\n * URI.\r\n *\r\n * The values of the object properties MUST be booleans. If the value is\r\n * `true`, then implementations that do not recognize the vocabulary MUST\r\n * refuse to process any schemas that declare this meta-schema with\r\n * `$schema`. If the value is `false`, implementations that do not\r\n * recognize the vocabulary SHOULD proceed with processing such schemas.\r\n * The value has no impact if the implementation understands the\r\n * vocabulary.\r\n *\r\n * Unrecognized keywords SHOULD be ignored. This remains the case for\r\n * keywords defined by unrecognized vocabularies. It is not currently\r\n * possible to distinguish between unrecognized keywords that are defined\r\n * in vocabularies from those that are not part of any vocabulary.\r\n *\r\n * The `$vocabulary` keyword SHOULD be used in the root schema of any\r\n * schema document intended for use as a meta-schema. It MUST NOT appear\r\n * in subschemas.\r\n *\r\n * The `$vocabulary` keyword MUST be ignored in schema documents that are\r\n * not being processed as a meta-schema.\r\n */\r\n $vocabulary?: Record<string, string>;\r\n /**\r\n * @deprecated `additionalItems` has been deprecated in favor of `prefixItems`\r\n * paired with `items`.\r\n */\r\n additionalItems?: JSONSchema;\r\n /**\r\n * The value of `additionalProperties` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the presence and annotation\r\n * results of `properties` and `patternProperties` within the same\r\n * schema object. Validation with `additionalProperties` applies only to\r\n * the child values of instance names that do not appear in the annotation\r\n * results of either `properties` or `patternProperties`.\r\n *\r\n * For all such properties, validation succeeds if the child instance\r\n * validates against the `additionalProperties` schema.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names validated by this keyword's subschema. Annotation results for\r\n * `additionalProperties` keywords from multiple schemas applied to the\r\n * same instance location are combined by taking the union of the sets.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * Implementations MAY choose to implement or optimize this keyword in\r\n * another way that produces the same effect, such as by directly checking\r\n * the names in `properties` and the patterns in `patternProperties`\r\n * against the instance property set.\r\n */\r\n additionalProperties?: JSONSchema;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against all schemas defined by this keyword's value.\r\n */\r\n allOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against at least one schema defined by this keyword's\r\n * value.\r\n */\r\n anyOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * An instance validates successfully against this keyword if its value is\r\n * equal to the value of the keyword.\r\n *\r\n * Use of this keyword is functionally equivalent to the `enum` keyword\r\n * with a single value.\r\n */\r\n const?: Value;\r\n /**\r\n * The value of this keyword MUST be a valid JSON Schema.\r\n *\r\n * An array instance is valid against `contains` if at least one of its\r\n * elements is valid against the given schema. The subschema MUST be\r\n * applied to every array element even after the first match has been\r\n * found, in order to collect annotations for use by other keywords.\r\n * This is to ensure that all possible annotations are collected.\r\n *\r\n * Logically, the validation result of applying the value subschema to each\r\n * item in the array MUST be OR'ed with `false`, resulting in an overall\r\n * validation result.\r\n *\r\n * This keyword produces an annotation value which is an array of the\r\n * indexes to which this keyword validates successfully when applying its\r\n * subschema, in ascending order. The value MAY be a boolean `true` if\r\n * the subschema validates successfully when applied to every index of the\r\n * instance. The annotation MUST be present if the instance array to which\r\n * this keyword's schema applies is empty.\r\n */\r\n contains?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * If the instance value is a string, this property defines that the\r\n * string SHOULD be interpreted as binary data and decoded using the\r\n * encoding named by this property. [RFC 2045, Sec 6.1][RFC2045] lists the\r\n * possible values for this property.\r\n *\r\n * The value of this property SHOULD be ignored if the instance described\r\n * is not a string.\r\n *\r\n * If this keyword is absent, but `contentMediaType` is present, this\r\n * indicates that the media type could be encoded into `UTF-8` like any\r\n * other JSON string value, and does not require additional decoding.\r\n *\r\n * The value of this property MUST be a string.\r\n *\r\n * [RFC2045]: https://datatracker.ietf.org/doc/html/rfc2045#section-6.1\r\n */\r\n contentEncoding?: \"7bit\" | \"8bit\" | \"base64\" | \"binary\" | \"ietf-token\" | \"quoted-printable\" | \"x-token\";\r\n /**\r\n * If the instance is a string, this property indicates the media type\r\n * of the contents of the string. If `contentEncoding` is present,\r\n * this property describes the decoded string.\r\n *\r\n * The value of this property must be a media type, as defined by\r\n * [RFC 2046][RFC2046]. This property defines the media type of instances\r\n * which this schema defines.\r\n *\r\n * The value of this property SHOULD be ignored if the instance described\r\n * is not a string.\r\n *\r\n * If the `contentEncoding` property is not present, but the instance\r\n * value is a string, then the value of this property SHOULD specify a text\r\n * document type, and the character set SHOULD be the character set into\r\n * which the JSON string value was decoded (for which the default is\r\n * Unicode).\r\n *\r\n * [RFC2046]: https://datatracker.ietf.org/doc/html/rfc2046\r\n */\r\n contentMediaType?: string;\r\n /**\r\n * If the instance is a string, and if `contentMediaType` is present,\r\n * this property contains a schema which describes the structure of the\r\n * string.\r\n *\r\n * This keyword MAY be used with any media type that can be mapped into\r\n * JSON Schema's data model.\r\n *\r\n * The value of this property MUST be a valid JSON schema. It SHOULD be\r\n * ignored if `contentMediaType` is not present.\r\n */\r\n contentSchema?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * This keyword can be used to supply a default JSON value associated with\r\n * a particular schema. It is RECOMMENDED that a `default` value be valid\r\n * against the associated schema.\r\n */\r\n default?: Value;\r\n /**\r\n * @deprecated `definitions` has been renamed to `$defs`.\r\n */\r\n definitions?: Record<string, JSONSchema>;\r\n /**\r\n * @deprecated `dependencies` has been split into two keywords:\r\n * `dependentSchemas` and `dependentRequired`.\r\n */\r\n dependencies?: Record<string, MaybeReadonlyArray<string> | JSONSchema>;\r\n /**\r\n * The value of this keyword MUST be an object. Properties in\r\n * this object, if any, MUST be arrays. Elements in each array,\r\n * if any, MUST be strings, and MUST be unique.\r\n *\r\n * This keyword specifies properties that are required if a specific\r\n * other property is present. Their requirement is dependent on the\r\n * presence of the other property.\r\n *\r\n * Validation succeeds if, for each name that appears in both\r\n * the instance and as a name within this keyword's value, every\r\n * item in the corresponding array is also the name of a property\r\n * in the instance.\r\n *\r\n * Omitting this keyword has the same behavior as an empty object.\r\n */\r\n dependentRequired?: Record<string, MaybeReadonlyArray<string>>;\r\n /**\r\n * This keyword specifies subschemas that are evaluated if the instance is\r\n * an object and contains a certain property.\r\n *\r\n * This keyword's value MUST be an object. Each value in the object MUST be\r\n * a valid JSON Schema.\r\n *\r\n * If the object key is a property in the instance, the entire instance\r\n * must validate against the subschema. Its use is dependent on the\r\n * presence of the property.\r\n *\r\n * Omitting this keyword has the same behavior as an empty object.\r\n */\r\n dependentSchemas?: Record<string, JSONSchema>;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword are applicable to a single sub-instance, applications\r\n * SHOULD consider the instance location to be deprecated if any occurrence\r\n * specifies a `true` value.\r\n *\r\n * If `deprecated` has a value of boolean `true`, it indicates that\r\n * applications SHOULD refrain from usage of the declared property. It MAY\r\n * mean the property is going to be removed in the future.\r\n *\r\n * A root schema containing `deprecated` with a value of `true`\r\n * indicates that the entire resource being described MAY be removed in the\r\n * future.\r\n *\r\n * The `deprecated` keyword applies to each instance location to which\r\n * the schema object containing the keyword successfully applies. This can\r\n * result in scenarios where every array item or object property is\r\n * deprecated even though the containing array or object is not.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `false`.\r\n */\r\n deprecated?: boolean;\r\n /**\r\n * Can be used to decorate a user interface with explanation or information\r\n * about the data produced.\r\n */\r\n description?: string;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * When `if` is present, and the instance fails to validate against its\r\n * subschema, then validation succeeds against this keyword if the instance\r\n * successfully validates against this keyword's subschema.\r\n *\r\n * This keyword has no effect when `if` is absent, or when the instance\r\n * successfully validates against its subschema. Implementations MUST NOT\r\n * evaluate the instance against this keyword, for either validation or\r\n * annotation collection purposes, in such cases.\r\n */\r\n else?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * The value of this keyword MUST be an array. This array SHOULD have at\r\n * least one element. Elements in the array SHOULD be unique.\r\n *\r\n * An instance validates successfully against this keyword if its value is\r\n * equal to one of the elements in this keyword's array value.\r\n *\r\n * Elements in the array might be of any type, including `null`.\r\n */\r\n enum?: MaybeReadonlyArray<Value>;\r\n /**\r\n * The value of this keyword MUST be an array. When multiple occurrences of\r\n * this keyword are applicable to a single sub-instance, implementations\r\n * MUST provide a flat array of all values rather than an array of arrays.\r\n *\r\n * This keyword can be used to provide sample JSON values associated with a\r\n * particular schema, for the purpose of illustrating usage. It is\r\n * RECOMMENDED that these values be valid against the associated schema.\r\n *\r\n * Implementations MAY use the value(s) of `default`, if present, as an\r\n * additional example. If `examples` is absent, `default` MAY still be\r\n * used in this manner.\r\n */\r\n examples?: MaybeReadonlyArray<Value>;\r\n /**\r\n * The value of `exclusiveMaximum` MUST be a number, representing an\r\n * exclusive upper limit for a numeric instance.\r\n *\r\n * If the instance is a number, then the instance is valid only if it has a\r\n * value strictly less than (not equal to) `exclusiveMaximum`.\r\n */\r\n exclusiveMaximum?: number;\r\n /**\r\n * The value of `exclusiveMinimum` MUST be a number, representing an\r\n * exclusive lower limit for a numeric instance.\r\n *\r\n * If the instance is a number, then the instance is valid only if it has a\r\n * value strictly greater than (not equal to) `exclusiveMinimum`.\r\n */\r\n exclusiveMinimum?: number;\r\n /**\r\n * Implementations MAY treat `format` as an assertion in addition to an\r\n * annotation, and attempt to validate the value's conformance to the\r\n * specified semantics.\r\n *\r\n * The value of this keyword is called a format attribute. It MUST be a\r\n * string. A format attribute can generally only validate a given set\r\n * of instance types. If the type of the instance to validate is not in\r\n * this set, validation for this format attribute and instance SHOULD\r\n * succeed. Format attributes are most often applied to strings, but can\r\n * be specified to apply to any type.\r\n *\r\n * Implementations MAY support custom format attributes. Save for agreement\r\n * between parties, schema authors SHALL NOT expect a peer implementation\r\n * to support such custom format attributes. An implementation MUST NOT\r\n * fail validation or cease processing due to an unknown format attribute.\r\n * When treating `format` as an annotation, implementations SHOULD\r\n * collect both known and unknown format attribute values.\r\n */\r\n format?: string;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * This validation outcome of this keyword's subschema has no direct effect\r\n * on the overall validation result. Rather, it controls which of the\r\n * `then` or `else` keywords are evaluated.\r\n *\r\n * Instances that successfully validate against this keyword's subschema\r\n * MUST also be valid against the subschema value of the `then` keyword,\r\n * if present.\r\n *\r\n * Instances that fail to validate against this keyword's subschema MUST\r\n * also be valid against the subschema value of the `else` keyword, if\r\n * present.\r\n *\r\n * If annotations are being collected, they are collected\r\n * from this keyword's subschema in the usual way, including when the\r\n * keyword is present without either `then` or `else`.\r\n */\r\n if?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * The value of `items` MUST be a valid JSON Schema.\r\n *\r\n * This keyword applies its subschema to all instance elements at indexes\r\n * greater than the length of the `prefixItems` array in the same schema\r\n * object, as reported by the annotation result of that `prefixItems`\r\n * keyword. If no such annotation result exists, `items` applies its\r\n * subschema to all instance array elements.\r\n *\r\n * Note that the behavior of `items` without `prefixItems` is identical\r\n * to that of the schema form of `items` in prior drafts.\r\n *\r\n * When `prefixItems` is present, the behavior of `items` is identical\r\n * to the former `additionalItems` keyword.\r\n *\r\n * If the `items` subschema is applied to any positions within the\r\n * instance array, it produces an annotation result of boolean `true`,\r\n * indicating that all remaining array elements have been evaluated against\r\n * this keyword's subschema.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * Implementations MAY choose to implement or optimize this keyword\r\n * in another way that produces the same effect, such as by directly\r\n * checking for the presence and size of a `prefixItems` array.\r\n */\r\n items?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * If `contains` is not present within the same schema object, then this\r\n * keyword has no effect.\r\n *\r\n * An instance array is valid against `maxContains` in two ways,\r\n * depending on the form of the annotation result of an adjacent\r\n * `contains` keyword. The first way is if the annotation result is an\r\n * array and the length of that array is less than or equal to the\r\n * `maxContains` value. The second way is if the annotation result is a\r\n * boolean `true` and the instance array length is less than or equal to\r\n * the `maxContains` value.\r\n */\r\n maxContains?: number;\r\n /**\r\n * The value of `maximum` MUST be a number, representing an inclusive\r\n * upper limit for a numeric instance.\r\n *\r\n * If the instance is a number, then this keyword validates only if the\r\n * instance is less than or exactly equal to `maximum`.\r\n */\r\n maximum?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An array instance is valid against `maxItems` if its size is less\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * @minimum 0\r\n */\r\n maxItems?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * A string instance is valid against this keyword if its length is less\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * The length of a string instance is defined as the number of its\r\n * characters as defined by [RFC 8259][RFC8259].\r\n *\r\n * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259\r\n *\r\n * @minimum 0\r\n */\r\n maxLength?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An object instance is valid against `maxProperties` if its number of\r\n * `properties` is less than, or equal to, the value of this keyword.\r\n *\r\n * @minimum 0\r\n */\r\n maxProperties?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * If `contains` is not present within the same schema object, then this\r\n * keyword has no effect.\r\n *\r\n * An instance array is valid against `minContains` in two ways,\r\n * depending on the form of the annotation result of an adjacent\r\n * `contains` keyword. The first way is if the annotation result is an\r\n * array and the length of that array is greater than or equal to the\r\n * `minContains` value. The second way is if the annotation result is a\r\n * boolean `true` and the instance array length is greater than or equal\r\n * to the `minContains` value.\r\n *\r\n * A value of `0` is allowed, but is only useful for setting a range\r\n * of occurrences from `0` to the value of `maxContains`. A value of\r\n * `0` with no `maxContains` causes `contains` to always pass\r\n * validation.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `1`.\r\n *\r\n * @default 1\r\n */\r\n minContains?: number;\r\n /**\r\n * The value of `minimum` MUST be a number, representing an inclusive\r\n * lower limit for a numeric instance.\r\n *\r\n * If the instance is a number, then this keyword validates only if the\r\n * instance is greater than or exactly equal to `minimum`.\r\n */\r\n minimum?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An array instance is valid against `minItems` if its size is greater\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minItems?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * A string instance is valid against this keyword if its length is greater\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * The length of a string instance is defined as the number of its\r\n * characters as defined by [RFC 8259][RFC8259].\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minLength?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An object instance is valid against `minProperties` if its number of\r\n * `properties` is greater than, or equal to, the value of this keyword.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minProperties?: number;\r\n /**\r\n * The value of `multipleOf` MUST be a number, strictly greater than\r\n * `0`.\r\n *\r\n * A numeric instance is valid only if division by this keyword's value\r\n * results in an integer.\r\n *\r\n * @exclusiveMinimum 0\r\n */\r\n multipleOf?: number;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * An instance is valid against this keyword if it fails to validate\r\n * successfully against the schema defined by this keyword.\r\n */\r\n not?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against exactly one schema defined by this keyword's value.\r\n */\r\n oneOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * The value of this keyword MUST be a string. This string SHOULD be a\r\n * valid regular expression, according to the [ECMA-262][ecma262] regular\r\n * expression dialect.\r\n *\r\n * A string instance is considered valid if the regular expression matches\r\n * the instance successfully. Recall: regular expressions are not\r\n * implicitly anchored.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n *\r\n * @format \"regex\"\r\n */\r\n pattern?: string;\r\n /**\r\n * The value of `patternProperties` MUST be an object. Each property name\r\n * of this object SHOULD be a valid regular expression, according to the\r\n * [ECMA-262][ecma262] regular expression dialect. Each property value of\r\n * this object MUST be a valid JSON Schema.\r\n *\r\n * Validation succeeds if, for each instance name that matches any regular\r\n * expressions that appear as a property name in this keyword's value,\r\n * the child instance for that name successfully validates against each\r\n * schema that corresponds to a matching regular expression.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names matched by this keyword. Omitting this keyword has the same\r\n * assertion behavior as an empty object.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n */\r\n patternProperties?: Record<string, JSONSchema>;\r\n /**\r\n * The value of `prefixItems` MUST be a non-empty array of valid JSON\r\n * Schemas.\r\n *\r\n * Validation succeeds if each element of the instance validates against\r\n * the schema at the same position, if any. This keyword does not\r\n * constrain the length of the array. If the array is longer than this\r\n * keyword's value, this keyword validates only the prefix of matching\r\n * length.\r\n *\r\n * This keyword produces an annotation value which is the largest index to\r\n * which this keyword applied a subschema. The value MAY be a boolean\r\n * `true` if a subschema was applied to every index of the instance, such\r\n * as is produced by the `items` keyword.\r\n * This annotation affects the behavior of `items` and\r\n * `unevaluatedItems`.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty array.\r\n */\r\n prefixItems?: MaybeReadonlyArray<JSONSchema> | JSONSchema;\r\n /**\r\n * The value of `properties` MUST be an object. Each value of this object\r\n * MUST be a valid JSON Schema.\r\n *\r\n * Validation succeeds if, for each name that appears in both the instance\r\n * and as a name within this keyword's value, the child instance for that\r\n * name successfully validates against the corresponding schema.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names matched by this keyword.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * object.\r\n */\r\n properties?: Record<string, JSONSchema>;\r\n /**\r\n * The value of `propertyNames` MUST be a valid JSON Schema.\r\n *\r\n * If the instance is an object, this keyword validates if every property\r\n * name in the instance validates against the provided schema.\r\n * Note the property name that the schema is testing will always be a\r\n * string.\r\n *\r\n * Omitting this keyword has the same behavior as an empty schema.\r\n */\r\n propertyNames?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword are applicable to a single sub-instance, the resulting\r\n * value MUST be `true` if any occurrence specifies a `true` value, and\r\n * MUST be `false` otherwise.\r\n *\r\n * If `readOnly` has a value of boolean `true`, it indicates that the\r\n * value of the instance is managed exclusively by the owning authority,\r\n * and attempts by an application to modify the value of this property are\r\n * expected to be ignored or rejected by that owning authority.\r\n *\r\n * An instance document that is marked as `readOnly` for the entire\r\n * document MAY be ignored if sent to the owning authority, or MAY result\r\n * in an error, at the authority's discretion.\r\n *\r\n * For example, `readOnly` would be used to mark a database-generated\r\n * serial number as read-only.\r\n *\r\n * This keyword can be used to assist in user interface instance\r\n * generation.\r\n *\r\n * @default false\r\n */\r\n readOnly?: boolean;\r\n /**\r\n * The value of this keyword MUST be an array. Elements of this array, if\r\n * any, MUST be strings, and MUST be unique.\r\n *\r\n * An object instance is valid against this keyword if every item in the\r\n * array is the name of a property in the instance.\r\n *\r\n * Omitting this keyword has the same behavior as an empty array.\r\n */\r\n required?: MaybeReadonlyArray<string>;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * When `if` is present, and the instance successfully validates against\r\n * its subschema, then validation succeeds against this keyword if the\r\n * instance also successfully validates against this keyword's subschema.\r\n *\r\n * This keyword has no effect when `if` is absent, or when the instance\r\n * fails to validate against its subschema. Implementations MUST NOT\r\n * evaluate the instance against this keyword, for either validation or\r\n * annotation collection purposes, in such cases.\r\n */\r\n then?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * Can be used to decorate a user interface with a short label about the\r\n * data produced.\r\n */\r\n title?: string;\r\n /**\r\n * The value of this keyword MUST be either a string or an array. If it is\r\n * an array, elements of the array MUST be strings and MUST be unique.\r\n *\r\n * String values MUST be one of the six primitive types (`\"null\"`,\r\n * `\"boolean\"`, `\"object\"`, `\"array\"`, `\"number\"`, or\r\n * `\"string\"`), or `\"integer\"` which matches any number with a zero\r\n * fractional part.\r\n *\r\n * An instance validates if and only if the instance is in any of the sets\r\n * listed for this keyword.\r\n */\r\n type?: SchemaType;\r\n /**\r\n * The value of `unevaluatedItems` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the annotation results of\r\n * adjacent keywords that apply to the instance location being validated.\r\n * Specifically, the annotations from `prefixItems`, `items`, and\r\n * `contains`, which can come from those keywords when they are adjacent\r\n * to the `unevaluatedItems` keyword. Those three annotations, as well as\r\n * `unevaluatedItems`, can also result from any and all adjacent\r\n * [in-place applicator][in-place-applicator] keywords.\r\n *\r\n * If no relevant annotations are present, the `unevaluatedItems`\r\n * subschema MUST be applied to all locations in the array.\r\n * If a boolean `true` value is present from any of the relevant\r\n * annotations, `unevaluatedItems` MUST be ignored. Otherwise, the\r\n * subschema MUST be applied to any index greater than the largest\r\n * annotation value for `prefixItems`, which does not appear in any\r\n * annotation value for `contains`.\r\n *\r\n * This means that `prefixItems`, `items`, `contains`, and all\r\n * in-place applicators MUST be evaluated before this keyword can be\r\n * evaluated. Authors of extension keywords MUST NOT define an in-place\r\n * applicator that would need to be evaluated after this keyword.\r\n *\r\n * If the `unevaluatedItems` subschema is applied to any positions within\r\n * the instance array, it produces an annotation result of boolean\r\n * `true`, analogous to the behavior of `items`.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place\r\n */\r\n unevaluatedItems?: JSONSchema;\r\n /**\r\n * The value of `unevaluatedProperties` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the annotation results of\r\n * adjacent keywords that apply to the instance location being validated.\r\n * Specifically, the annotations from `properties`,\r\n * `patternProperties`, and `additionalProperties`, which can come from\r\n * those keywords when they are adjacent to the `unevaluatedProperties`\r\n * keyword. Those three annotations, as well as `unevaluatedProperties`,\r\n * can also result from any and all adjacent\r\n * [in-place applicator][in-place-applicator] keywords.\r\n *\r\n * Validation with `unevaluatedProperties` applies only to the child\r\n * values of instance names that do not appear in the `properties`,\r\n * `patternProperties`, `additionalProperties`, or\r\n * `unevaluatedProperties` annotation results that apply to the\r\n * instance location being validated.\r\n *\r\n * For all such properties, validation succeeds if the child instance\r\n * validates against the \"unevaluatedProperties\" schema.\r\n *\r\n * This means that `properties`, `patternProperties`,\r\n * `additionalProperties`, and all in-place applicators MUST be evaluated\r\n * before this keyword can be evaluated. Authors of extension keywords\r\n * MUST NOT define an in-place applicator that would need to be evaluated\r\n * after this keyword.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names validated by this keyword's subschema.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place\r\n */\r\n unevaluatedProperties?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a boolean.\r\n *\r\n * If this keyword has boolean value `false`, the instance validates\r\n * successfully. If it has boolean value `true`, the instance validates\r\n * successfully if all of its elements are unique.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `false`.\r\n *\r\n * @default false\r\n */\r\n uniqueItems?: boolean;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword is applicable to a single sub-instance, the resulting\r\n * value MUST be `true` if any occurrence specifies a `true` value, and\r\n * MUST be `false` otherwise.\r\n *\r\n * If `writeOnly` has a value of boolean `true`, it indicates that the\r\n * value is never present when the instance is retrieved from the owning\r\n * authority. It can be present when sent to the owning authority to update\r\n * or create the document (or the resource it represents), but it will not\r\n * be included in any updated or newly created version of the instance.\r\n *\r\n * An instance document that is marked as `writeOnly` for the entire\r\n * document MAY be returned as a blank document of some sort, or MAY\r\n * produce an error upon retrieval, or have the retrieval request ignored,\r\n * at the authority's discretion.\r\n *\r\n * For example, `writeOnly` would be used to mark a password input field.\r\n *\r\n * These keywords can be used to assist in user interface instance\r\n * generation. In particular, an application MAY choose to use a widget\r\n * that hides input values as they are typed for write-only fields.\r\n *\r\n * @default false\r\n */\r\n writeOnly?: boolean;\r\n};\r\nexport declare namespace JSONSchema {\r\n type TypeValue = ValueOf<TypeName> | TypeName | Array<ValueOf<TypeName> | TypeName> | ReadonlyArray<ValueOf<TypeName> | TypeName>;\r\n /**\r\n * JSON Schema interface\r\n */\r\n type Interface<Value = any, SchemaType extends TypeValue = TypeValue> = Exclude<JSONSchema<Value, SchemaType>, boolean>;\r\n type Array<T = any> = Pick<Interface<T, \"array\">, KeywordByType.Any | KeywordByType.Array>;\r\n type Boolean = Pick<Interface<boolean, \"boolean\">, KeywordByType.Any>;\r\n type Integer = Pick<Interface<number, \"integer\">, KeywordByType.Any | KeywordByType.Number>;\r\n type Number = Pick<Interface<number, \"number\">, KeywordByType.Any | KeywordByType.Number>;\r\n type Null = Pick<Interface<null, \"null\">, KeywordByType.Any>;\r\n type Object<T = any> = Pick<Interface<T, \"object\">, KeywordByType.Any | KeywordByType.Object>;\r\n type String = Pick<Interface<string, \"string\">, KeywordByType.Any | KeywordByType.String>;\r\n}\r\ndeclare namespace KeywordByType {\r\n type Any = \"$anchor\" | \"$comment\" | \"$defs\" | \"$dynamicAnchor\" | \"$dynamicRef\" | \"$id\" | \"$ref\" | \"$schema\" | \"$vocabulary\" | \"allOf\" | \"anyOf\" | \"const\" | \"default\" | \"definitions\" | \"deprecated\" | \"description\" | \"else\" | \"enum\" | \"examples\" | \"format\" | \"if\" | \"not\" | \"oneOf\" | \"readOnly\" | \"then\" | \"title\" | \"type\" | \"writeOnly\";\r\n type Array = \"additionalItems\" | \"contains\" | \"items\" | \"maxContains\" | \"maxItems\" | \"minContains\" | \"minItems\" | \"prefixItems\" | \"unevaluatedItems\" | \"uniqueItems\";\r\n type Number = \"exclusiveMaximum\" | \"exclusiveMinimum\" | \"maximum\" | \"minimum\" | \"multipleOf\";\r\n type Object = \"additionalProperties\" | \"dependencies\" | \"dependentRequired\" | \"dependentSchemas\" | \"maxProperties\" | \"minProperties\" | \"patternProperties\" | \"properties\" | \"propertyNames\" | \"required\" | \"unevaluatedProperties\";\r\n type String = \"contentEncoding\" | \"contentMediaType\" | \"contentSchema\" | \"maxLength\" | \"minLength\" | \"pattern\";\r\n}\r\n/**\r\n * Content encoding strategy enum.\r\n *\r\n * - [Content-Transfer-Encoding Syntax](https://datatracker.ietf.org/doc/html/rfc2045#section-6.1)\r\n * - [7bit vs 8bit encoding](https://stackoverflow.com/questions/25710599/content-transfer-encoding-7bit-or-8-bit/28531705#28531705)\r\n */\r\nexport declare enum ContentEncoding {\r\n /**\r\n * Only US-ASCII characters, which use the lower 7 bits for each character.\r\n *\r\n * Each line must be less than 1,000 characters.\r\n */\r\n \"7bit\" = \"7bit\",\r\n /**\r\n * Allow extended ASCII characters which can use the 8th (highest) bit to\r\n * indicate special characters not available in 7bit.\r\n *\r\n * Each line must be less than 1,000 characters.\r\n */\r\n \"8bit\" = \"8bit\",\r\n /**\r\n * Useful for data that is mostly non-text.\r\n */\r\n Base64 = \"base64\",\r\n /**\r\n * Same character set as 8bit, with no line length restriction.\r\n */\r\n Binary = \"binary\",\r\n /**\r\n * An extension token defined by a standards-track RFC and registered with\r\n * IANA.\r\n */\r\n IETFToken = \"ietf-token\",\r\n /**\r\n * Lines are limited to 76 characters, and line breaks are represented using\r\n * special characters that are escaped.\r\n */\r\n QuotedPrintable = \"quoted-printable\",\r\n /**\r\n * The two characters \"X-\" or \"x-\" followed, with no intervening white space,\r\n * by any token.\r\n */\r\n XToken = \"x-token\"\r\n}\r\n/**\r\n * This enum provides well-known formats that apply to strings.\r\n */\r\nexport declare enum Format {\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"full-date\" production in\r\n * [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n Date = \"date\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"date-time\" production in\r\n * [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n DateTime = \"date-time\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"duration\" production.\r\n */\r\n Duration = \"duration\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid Internet\r\n * email address as defined by by the \"Mailbox\" ABNF rule in [RFC\r\n * 5321][RFC5322], section 4.1.2.\r\n *\r\n * [RFC5321]: https://datatracker.ietf.org/doc/html/rfc5321\r\n */\r\n Email = \"email\",\r\n /**\r\n * As defined by [RFC 1123, section 2.1][RFC1123], including host names\r\n * produced using the Punycode algorithm specified in\r\n * [RFC 5891, section 4.4][RFC5891].\r\n *\r\n * [RFC1123]: https://datatracker.ietf.org/doc/html/rfc1123\r\n * [RFC5891]: https://datatracker.ietf.org/doc/html/rfc5891\r\n */\r\n Hostname = \"hostname\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid Internet\r\n * email address as defined by the extended \"Mailbox\" ABNF rule in\r\n * [RFC 6531][RFC6531], section 3.3.\r\n *\r\n * [RFC6531]: https://datatracker.ietf.org/doc/html/rfc6531\r\n */\r\n IDNEmail = \"idn-email\",\r\n /**\r\n * As defined by either [RFC 1123, section 2.1][RFC1123] as for hostname, or\r\n * an internationalized hostname as defined by\r\n * [RFC 5890, section 2.3.2.3][RFC5890].\r\n *\r\n * [RFC1123]: https://datatracker.ietf.org/doc/html/rfc1123\r\n * [RFC5890]: https://datatracker.ietf.org/doc/html/rfc5890\r\n */\r\n IDNHostname = \"idn-hostname\",\r\n /**\r\n * An IPv4 address according to the \"dotted-quad\" ABNF syntax as defined in\r\n * [RFC 2673, section 3.2][RFC2673].\r\n *\r\n * [RFC2673]: https://datatracker.ietf.org/doc/html/rfc2673\r\n */\r\n IPv4 = \"ipv4\",\r\n /**\r\n * An IPv6 address as defined in [RFC 4291, section 2.2][RFC4291].\r\n *\r\n * [RFC4291]: https://datatracker.ietf.org/doc/html/rfc4291\r\n */\r\n IPv6 = \"ipv6\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid IRI,\r\n * according to [RFC 3987][RFC3987].\r\n *\r\n * [RFC3987]: https://datatracker.ietf.org/doc/html/rfc3987\r\n */\r\n IRI = \"iri\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid IRI\r\n * Reference (either an IRI or a relative-reference), according to\r\n * [RFC 3987][RFC3987].\r\n *\r\n * [RFC3987]: https://datatracker.ietf.org/doc/html/rfc3987\r\n */\r\n IRIReference = \"iri-reference\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid JSON\r\n * string representation of a JSON Pointer, according to\r\n * [RFC 6901, section 5][RFC6901].\r\n *\r\n * [RFC6901]: https://datatracker.ietf.org/doc/html/rfc6901\r\n */\r\n JSONPointer = \"json-pointer\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid JSON\r\n * string representation of a JSON Pointer fragment, according to\r\n * [RFC 6901, section 5][RFC6901].\r\n *\r\n * [RFC6901]: https://datatracker.ietf.org/doc/html/rfc6901\r\n */\r\n JSONPointerURIFragment = \"json-pointer-uri-fragment\",\r\n /**\r\n * This attribute applies to string instances.\r\n *\r\n * A regular expression, which SHOULD be valid according to the\r\n * [ECMA-262][ecma262] regular expression dialect.\r\n *\r\n * Implementations that validate formats MUST accept at least the subset of\r\n * [ECMA-262][ecma262] defined in the [Regular Expressions][regexInterop]\r\n * section of this specification, and SHOULD accept all valid\r\n * [ECMA-262][ecma262] expressions.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n * [regexInterop]: https://json-schema.org/draft/2020-12/json-schema-validation.html#regexInterop\r\n */\r\n RegEx = \"regex\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * [Relative JSON Pointer][relative-json-pointer].\r\n *\r\n * [relative-json-pointer]: https://datatracker.ietf.org/doc/html/draft-handrews-relative-json-pointer-01\r\n */\r\n RelativeJSONPointer = \"relative-json-pointer\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"time\" production in [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n Time = \"time\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI,\r\n * according to [RFC3986][RFC3986].\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n */\r\n URI = \"uri\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI\r\n * Reference (either a URI or a relative-reference), according to\r\n * [RFC3986][RFC3986].\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n */\r\n URIReference = \"uri-reference\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI\r\n * Template (of any level), according to [RFC 6570][RFC6570].\r\n *\r\n * Note that URI Templates may be used for IRIs; there is no separate IRI\r\n * Template specification.\r\n *\r\n * [RFC6570]: https://datatracker.ietf.org/doc/html/rfc6570\r\n */\r\n URITemplate = \"uri-template\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid string\r\n * representation of a UUID, according to [RFC 4122][RFC4122].\r\n *\r\n * [RFC4122]: https://datatracker.ietf.org/doc/html/rfc4122\r\n */\r\n UUID = \"uuid\"\r\n}\r\n/**\r\n * Enum consisting of simple type names for the `type` keyword\r\n */\r\nexport declare enum TypeName {\r\n /**\r\n * Value MUST be an array.\r\n */\r\n Array = \"array\",\r\n /**\r\n * Value MUST be a boolean.\r\n */\r\n Boolean = \"boolean\",\r\n /**\r\n * Value MUST be an integer, no floating point numbers are allowed. This is a\r\n * subset of the number type.\r\n */\r\n Integer = \"integer\",\r\n /**\r\n * Value MUST be null. Note this is mainly for purpose of being able use union\r\n * types to define nullability. If this type is not included in a union, null\r\n * values are not allowed (the primitives listed above do not allow nulls on\r\n * their own).\r\n */\r\n Null = \"null\",\r\n /**\r\n * Value MUST be a number, floating point numbers are allowed.\r\n */\r\n Number = \"number\",\r\n /**\r\n * Value MUST be an object.\r\n */\r\n Object = \"object\",\r\n /**\r\n * Value MUST be a string.\r\n */\r\n String = \"string\"\r\n}\r\nexport declare const keywords: readonly [\"$anchor\", \"$comment\", \"$defs\", \"$dynamicAnchor\", \"$dynamicRef\", \"$id\", \"$ref\", \"$schema\", \"$vocabulary\", \"additionalItems\", \"additionalProperties\", \"allOf\", \"anyOf\", \"const\", \"contains\", \"contentEncoding\", \"contentMediaType\", \"contentSchema\", \"default\", \"definitions\", \"dependencies\", \"dependentRequired\", \"dependentSchemas\", \"deprecated\", \"description\", \"else\", \"enum\", \"examples\", \"exclusiveMaximum\", \"exclusiveMinimum\", \"format\", \"if\", \"items\", \"maxContains\", \"maximum\", \"maxItems\", \"maxLength\", \"maxProperties\", \"minContains\", \"minimum\", \"minItems\", \"minLength\", \"minProperties\", \"multipleOf\", \"not\", \"oneOf\", \"pattern\", \"patternProperties\", \"prefixItems\", \"properties\", \"propertyNames\", \"readOnly\", \"required\", \"then\", \"title\", \"type\", \"unevaluatedItems\", \"unevaluatedProperties\", \"uniqueItems\", \"writeOnly\"];\r\nexport {};\r\n"],"x_google_ignoreList":[0],"mappings":";;KAEKE,kBAA8BC,CAAAA,CAAAA,CAAAA,GAANC,KAAMD,CAAAA,CAAAA,CAAAA,GAAKE,aAALF,CAAmBA,CAAnBA,CAAAA;KAC9BG,OADwBF,CAAAA,CAAAA,CAAAA,GACXD,CADWC,CAAAA,MACHD,CADGC,CA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schema-typed@8.0.2/node_modules/json-schema-typed/draft_2020_12.d.ts | ||
| type MaybeReadonlyArray<T> = Array<T> | ReadonlyArray<T>; | ||
| type ValueOf<T> = T[keyof T]; | ||
| /** | ||
| * JSON Schema [Draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-validation.html) | ||
| */ | ||
| type JSONSchema<Value = any, SchemaType = (Value extends boolean ? "boolean" : Value extends null ? "null" : Value extends number ? "number" | "integer" : Value extends string ? "string" : Value extends unknown[] ? "array" : Value extends Record<string | number, unknown> ? "object" : JSONSchema.TypeValue)> = boolean | { | ||
| /** | ||
| * Using JSON Pointer fragments requires knowledge of the structure of the | ||
| * schema. When writing schema documents with the intention to provide | ||
| * re-usable schemas, it may be preferable to use a plain name fragment | ||
| * that is not tied to any particular structural location. This allows a | ||
| * subschema to be relocated without requiring JSON Pointer references to | ||
| * be updated. | ||
| * | ||
| * The `$anchor` keyword is used to specify such a fragment. It is an | ||
| * identifier keyword that can only be used to create plain name fragments. | ||
| * | ||
| * If present, the value of this keyword MUST be a string, which MUST start | ||
| * with a letter `[A-Za-z]`, followed by any number of letters, digits | ||
| * `[0-9]`, hyphens `-`, underscores `_`, colons `:`, | ||
| * or periods `.`. | ||
| * | ||
| * Note that the anchor string does not include the `#` character, | ||
| * as it is not a URI-reference. An `{"$anchor": "foo"}` becomes the | ||
| * fragment `#foo` when used in a URI. | ||
| * | ||
| * The base URI to which the resulting fragment is appended is determined | ||
| * by the `$id` keyword as explained in the previous section. | ||
| * Two `$anchor` keywords in the same schema document MAY have the same | ||
| * value if they apply to different base URIs, as the resulting full URIs | ||
| * will be distinct. However, the effect of two `$anchor` keywords | ||
| * with the same value and the same base URI is undefined. Implementations | ||
| * MAY raise an error if such usage is detected. | ||
| */ | ||
| $anchor?: string; | ||
| /** | ||
| * This keyword reserves a location for comments from schema authors to | ||
| * readers or maintainers of the schema. | ||
| * | ||
| * The value of this keyword MUST be a string. Implementations MUST NOT | ||
| * present this string to end users. Tools for editing schemas SHOULD | ||
| * support displaying and editing this keyword. The value of this keyword | ||
| * MAY be used in debug or error output which is intended for developers | ||
| * making use of schemas. | ||
| * | ||
| * Schema vocabularies SHOULD allow `$comment` within any object | ||
| * containing vocabulary keywords. Implementations MAY assume `$comment` | ||
| * is allowed unless the vocabulary specifically forbids it. Vocabularies | ||
| * MUST NOT specify any effect of `$comment` beyond what is described in | ||
| * this specification. | ||
| * | ||
| * Tools that translate other media types or programming languages | ||
| * to and from `application/schema+json` MAY choose to convert that media | ||
| * type or programming language's native comments to or from `$comment` | ||
| * values. The behavior of such translation when both native comments and | ||
| * `$comment` properties are present is implementation-dependent. | ||
| * | ||
| * Implementations MAY strip `$comment` values at any point during | ||
| * processing. In particular, this allows for shortening schemas when the | ||
| * size of deployed schemas is a concern. | ||
| * | ||
| * Implementations MUST NOT take any other action based on the presence, | ||
| * absence, or contents of `$comment` properties. In particular, the | ||
| * value of `$comment` MUST NOT be collected as an annotation result. | ||
| */ | ||
| $comment?: string; | ||
| /** | ||
| * The `$defs` keyword reserves a location for schema authors to inline | ||
| * re-usable JSON Schemas into a more general schema. The keyword does not | ||
| * directly affect the validation result. | ||
| * | ||
| * This keyword's value MUST be an object. Each member value of this object | ||
| * MUST be a valid JSON Schema. | ||
| */ | ||
| $defs?: Record<string, JSONSchema>; | ||
| /** | ||
| * "The `$dynamicAnchor` indicates that the fragment is an extension | ||
| * point when used with the `$dynamicRef` keyword. This low-level, | ||
| * advanced feature makes it easier to extend recursive schemas such as the | ||
| * meta-schemas, without imposing any particular semantics on that | ||
| * extension. See `$dynamicRef` for more details. | ||
| */ | ||
| $dynamicAnchor?: string; | ||
| /** | ||
| * The `$dynamicRef` keyword is an applicator that allows for deferring | ||
| * the full resolution until runtime, at which point it is resolved each | ||
| * time it is encountered while evaluating an instance. | ||
| * | ||
| * Together with `$dynamicAnchor`, `$dynamicRef` implements a | ||
| * cooperative extension mechanism that is primarily useful with recursive | ||
| * schemas (schemas that reference themselves). Both the extension point | ||
| * and the runtime-determined extension target are defined with | ||
| * `$dynamicAnchor`, and only exhibit runtime dynamic behavior when | ||
| * referenced with `$dynamicRef`. | ||
| * | ||
| * The value of the `$dynamicRef` property MUST be a string which is | ||
| * a URI-Reference. Resolved against the current URI base, it produces | ||
| * the URI used as the starting point for runtime resolution. This initial | ||
| * resolution is safe to perform on schema load. | ||
| * | ||
| * If the initially resolved starting point URI includes a fragment that | ||
| * was created by the `$dynamicAnchor` keyword, the initial URI MUST be | ||
| * replaced by the URI (including the fragment) for the outermost schema | ||
| * resource in the [dynamic scope][scopes] that defines | ||
| * an identically named fragment with `$dynamicAnchor`. | ||
| * | ||
| * Otherwise, its behavior is identical to `$ref`, and no runtime | ||
| * resolution is needed. | ||
| * | ||
| * [scopes]: https://json-schema.org/draft/2020-12/json-schema-core.html#scopes | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $dynamicRef?: string; | ||
| /** | ||
| * The `$id` keyword identifies a schema resource with its | ||
| * [canonical][[RFC6596]] URI. | ||
| * | ||
| * Note that this URI is an identifier and not necessarily a network | ||
| * locator. In the case of a network-addressable URL, a schema need not be | ||
| * downloadable from its canonical URI. | ||
| * | ||
| * If present, the value for this keyword MUST be a string, and MUST | ||
| * represent a valid [URI-reference][RFC3986]. This URI-reference SHOULD | ||
| * be normalized, and MUST resolve to an [absolute-URI][RFC3986] (without a | ||
| * fragment). Therefore, `$id` MUST NOT contain a non-empty fragment, | ||
| * and SHOULD NOT contain an empty fragment. | ||
| * | ||
| * Since an empty fragment in the context of the | ||
| * `application/schema+json` media type refers to the same resource as | ||
| * the base URI without a fragment, an implementation MAY normalize a URI | ||
| * ending with an empty fragment by removing the fragment. However, schema | ||
| * authors SHOULD NOT rely on this behavior across implementations. | ||
| * | ||
| * This URI also serves as the base URI for relative URI-references in | ||
| * keywords within the schema resource, in accordance with | ||
| * [RFC 3986][RFC3986] section 5.1.1 regarding base URIs embedded in | ||
| * content. | ||
| * | ||
| * The presence of `$id` in a subschema indicates that the subschema | ||
| * constitutes a distinct schema resource within a single schema document. | ||
| * Furthermore, in accordance with [RFC 3986][RFC3986] section 5.1.2 | ||
| * regarding encapsulating entities, if an `$id` in a subschema is a | ||
| * relative URI-reference, the base URI for resolving that reference is the | ||
| * URI of the parent schema resource. | ||
| * | ||
| * If no parent schema object explicitly identifies itself as a resource | ||
| * with `$id`, the base URI is that of the entire document. | ||
| * | ||
| * The root schema of a JSON Schema document SHOULD contain an `$id` | ||
| * keyword with an [absolute-URI][RFC3986] (containing a scheme, but no | ||
| * fragment). | ||
| * | ||
| * [RFC6596]: https://datatracker.ietf.org/doc/html/rfc6596 | ||
| * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986 | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $id?: string; | ||
| /** | ||
| * The `$ref` keyword is an applicator that is used to reference a | ||
| * statically identified schema. Its results are the results of the | ||
| * referenced schema. Other keywords can appear alongside of `$ref` in | ||
| * the same schema object. | ||
| * | ||
| * The value of the `$ref` property MUST be a string which is a | ||
| * URI-Reference. Resolved against the current URI base, it produces the | ||
| * URI of the schema to apply. | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $ref?: string; | ||
| /** | ||
| * The `$schema` keyword is both used as a JSON Schema dialect identifier | ||
| * and as the identifier of a resource which is itself a JSON Schema, which | ||
| * describes the set of valid schemas written for this particular dialect. | ||
| * | ||
| * The value of this keyword MUST be a [URI][RFC3986] (containing a scheme) | ||
| * and this URI MUST be normalized. The current schema MUST be valid | ||
| * against the meta-schema identified by this URI. | ||
| * | ||
| * If this URI identifies a retrievable resource, that resource SHOULD be | ||
| * of media type `application/schema+json`. | ||
| * | ||
| * The `$schema` keyword SHOULD be used in the document root schema | ||
| * object, and MAY be used in the root schema objects of embedded schema | ||
| * resources. It MUST NOT appear in non-resource root schema objects. If | ||
| * absent from the document root schema, the resulting behavior is | ||
| * implementation-defined. | ||
| * | ||
| * Values for this property are defined elsewhere in this and other | ||
| * documents, and by other parties. | ||
| * | ||
| * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986 | ||
| * | ||
| * @format "uri" | ||
| */ | ||
| $schema?: string; | ||
| /** | ||
| * The `$vocabulary` keyword is used in meta-schemas to identify the | ||
| * vocabularies available for use in schemas described by that meta-schema. | ||
| * It is also used to indicate whether each vocabulary is required or | ||
| * optional, in the sense that an implementation MUST understand the | ||
| * required vocabularies in order to successfully process the schema. | ||
| * Together, this information forms a dialect. Any vocabulary that is | ||
| * understood by the implementation MUST be processed in a manner | ||
| * consistent with the semantic definitions contained within the | ||
| * vocabulary. | ||
| * | ||
| * The value of this keyword MUST be an object. The property names in the | ||
| * object MUST be URIs (containing a scheme) and this URI MUST be | ||
| * normalized. Each URI that appears as a property name identifies a | ||
| * specific set of keywords and their semantics. | ||
| * | ||
| * The URI MAY be a URL, but the nature of the retrievable resource is | ||
| * currently undefined, and reserved for future use. Vocabulary authors | ||
| * MAY use the URL of the vocabulary specification, in a human-readable | ||
| * media type such as `text/html` or `text/plain`, as the vocabulary | ||
| * URI. | ||
| * | ||
| * The values of the object properties MUST be booleans. If the value is | ||
| * `true`, then implementations that do not recognize the vocabulary MUST | ||
| * refuse to process any schemas that declare this meta-schema with | ||
| * `$schema`. If the value is `false`, implementations that do not | ||
| * recognize the vocabulary SHOULD proceed with processing such schemas. | ||
| * The value has no impact if the implementation understands the | ||
| * vocabulary. | ||
| * | ||
| * Unrecognized keywords SHOULD be ignored. This remains the case for | ||
| * keywords defined by unrecognized vocabularies. It is not currently | ||
| * possible to distinguish between unrecognized keywords that are defined | ||
| * in vocabularies from those that are not part of any vocabulary. | ||
| * | ||
| * The `$vocabulary` keyword SHOULD be used in the root schema of any | ||
| * schema document intended for use as a meta-schema. It MUST NOT appear | ||
| * in subschemas. | ||
| * | ||
| * The `$vocabulary` keyword MUST be ignored in schema documents that are | ||
| * not being processed as a meta-schema. | ||
| */ | ||
| $vocabulary?: Record<string, string>; | ||
| /** | ||
| * @deprecated `additionalItems` has been deprecated in favor of `prefixItems` | ||
| * paired with `items`. | ||
| */ | ||
| additionalItems?: JSONSchema; | ||
| /** | ||
| * The value of `additionalProperties` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the presence and annotation | ||
| * results of `properties` and `patternProperties` within the same | ||
| * schema object. Validation with `additionalProperties` applies only to | ||
| * the child values of instance names that do not appear in the annotation | ||
| * results of either `properties` or `patternProperties`. | ||
| * | ||
| * For all such properties, validation succeeds if the child instance | ||
| * validates against the `additionalProperties` schema. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names validated by this keyword's subschema. Annotation results for | ||
| * `additionalProperties` keywords from multiple schemas applied to the | ||
| * same instance location are combined by taking the union of the sets. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * Implementations MAY choose to implement or optimize this keyword in | ||
| * another way that produces the same effect, such as by directly checking | ||
| * the names in `properties` and the patterns in `patternProperties` | ||
| * against the instance property set. | ||
| */ | ||
| additionalProperties?: JSONSchema; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against all schemas defined by this keyword's value. | ||
| */ | ||
| allOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against at least one schema defined by this keyword's | ||
| * value. | ||
| */ | ||
| anyOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * An instance validates successfully against this keyword if its value is | ||
| * equal to the value of the keyword. | ||
| * | ||
| * Use of this keyword is functionally equivalent to the `enum` keyword | ||
| * with a single value. | ||
| */ | ||
| const?: Value; | ||
| /** | ||
| * The value of this keyword MUST be a valid JSON Schema. | ||
| * | ||
| * An array instance is valid against `contains` if at least one of its | ||
| * elements is valid against the given schema. The subschema MUST be | ||
| * applied to every array element even after the first match has been | ||
| * found, in order to collect annotations for use by other keywords. | ||
| * This is to ensure that all possible annotations are collected. | ||
| * | ||
| * Logically, the validation result of applying the value subschema to each | ||
| * item in the array MUST be OR'ed with `false`, resulting in an overall | ||
| * validation result. | ||
| * | ||
| * This keyword produces an annotation value which is an array of the | ||
| * indexes to which this keyword validates successfully when applying its | ||
| * subschema, in ascending order. The value MAY be a boolean `true` if | ||
| * the subschema validates successfully when applied to every index of the | ||
| * instance. The annotation MUST be present if the instance array to which | ||
| * this keyword's schema applies is empty. | ||
| */ | ||
| contains?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * If the instance value is a string, this property defines that the | ||
| * string SHOULD be interpreted as binary data and decoded using the | ||
| * encoding named by this property. [RFC 2045, Sec 6.1][RFC2045] lists the | ||
| * possible values for this property. | ||
| * | ||
| * The value of this property SHOULD be ignored if the instance described | ||
| * is not a string. | ||
| * | ||
| * If this keyword is absent, but `contentMediaType` is present, this | ||
| * indicates that the media type could be encoded into `UTF-8` like any | ||
| * other JSON string value, and does not require additional decoding. | ||
| * | ||
| * The value of this property MUST be a string. | ||
| * | ||
| * [RFC2045]: https://datatracker.ietf.org/doc/html/rfc2045#section-6.1 | ||
| */ | ||
| contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token"; | ||
| /** | ||
| * If the instance is a string, this property indicates the media type | ||
| * of the contents of the string. If `contentEncoding` is present, | ||
| * this property describes the decoded string. | ||
| * | ||
| * The value of this property must be a media type, as defined by | ||
| * [RFC 2046][RFC2046]. This property defines the media type of instances | ||
| * which this schema defines. | ||
| * | ||
| * The value of this property SHOULD be ignored if the instance described | ||
| * is not a string. | ||
| * | ||
| * If the `contentEncoding` property is not present, but the instance | ||
| * value is a string, then the value of this property SHOULD specify a text | ||
| * document type, and the character set SHOULD be the character set into | ||
| * which the JSON string value was decoded (for which the default is | ||
| * Unicode). | ||
| * | ||
| * [RFC2046]: https://datatracker.ietf.org/doc/html/rfc2046 | ||
| */ | ||
| contentMediaType?: string; | ||
| /** | ||
| * If the instance is a string, and if `contentMediaType` is present, | ||
| * this property contains a schema which describes the structure of the | ||
| * string. | ||
| * | ||
| * This keyword MAY be used with any media type that can be mapped into | ||
| * JSON Schema's data model. | ||
| * | ||
| * The value of this property MUST be a valid JSON schema. It SHOULD be | ||
| * ignored if `contentMediaType` is not present. | ||
| */ | ||
| contentSchema?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * This keyword can be used to supply a default JSON value associated with | ||
| * a particular schema. It is RECOMMENDED that a `default` value be valid | ||
| * against the associated schema. | ||
| */ | ||
| default?: Value; | ||
| /** | ||
| * @deprecated `definitions` has been renamed to `$defs`. | ||
| */ | ||
| definitions?: Record<string, JSONSchema>; | ||
| /** | ||
| * @deprecated `dependencies` has been split into two keywords: | ||
| * `dependentSchemas` and `dependentRequired`. | ||
| */ | ||
| dependencies?: Record<string, MaybeReadonlyArray<string> | JSONSchema>; | ||
| /** | ||
| * The value of this keyword MUST be an object. Properties in | ||
| * this object, if any, MUST be arrays. Elements in each array, | ||
| * if any, MUST be strings, and MUST be unique. | ||
| * | ||
| * This keyword specifies properties that are required if a specific | ||
| * other property is present. Their requirement is dependent on the | ||
| * presence of the other property. | ||
| * | ||
| * Validation succeeds if, for each name that appears in both | ||
| * the instance and as a name within this keyword's value, every | ||
| * item in the corresponding array is also the name of a property | ||
| * in the instance. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty object. | ||
| */ | ||
| dependentRequired?: Record<string, MaybeReadonlyArray<string>>; | ||
| /** | ||
| * This keyword specifies subschemas that are evaluated if the instance is | ||
| * an object and contains a certain property. | ||
| * | ||
| * This keyword's value MUST be an object. Each value in the object MUST be | ||
| * a valid JSON Schema. | ||
| * | ||
| * If the object key is a property in the instance, the entire instance | ||
| * must validate against the subschema. Its use is dependent on the | ||
| * presence of the property. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty object. | ||
| */ | ||
| dependentSchemas?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword are applicable to a single sub-instance, applications | ||
| * SHOULD consider the instance location to be deprecated if any occurrence | ||
| * specifies a `true` value. | ||
| * | ||
| * If `deprecated` has a value of boolean `true`, it indicates that | ||
| * applications SHOULD refrain from usage of the declared property. It MAY | ||
| * mean the property is going to be removed in the future. | ||
| * | ||
| * A root schema containing `deprecated` with a value of `true` | ||
| * indicates that the entire resource being described MAY be removed in the | ||
| * future. | ||
| * | ||
| * The `deprecated` keyword applies to each instance location to which | ||
| * the schema object containing the keyword successfully applies. This can | ||
| * result in scenarios where every array item or object property is | ||
| * deprecated even though the containing array or object is not. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `false`. | ||
| */ | ||
| deprecated?: boolean; | ||
| /** | ||
| * Can be used to decorate a user interface with explanation or information | ||
| * about the data produced. | ||
| */ | ||
| description?: string; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * When `if` is present, and the instance fails to validate against its | ||
| * subschema, then validation succeeds against this keyword if the instance | ||
| * successfully validates against this keyword's subschema. | ||
| * | ||
| * This keyword has no effect when `if` is absent, or when the instance | ||
| * successfully validates against its subschema. Implementations MUST NOT | ||
| * evaluate the instance against this keyword, for either validation or | ||
| * annotation collection purposes, in such cases. | ||
| */ | ||
| else?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * The value of this keyword MUST be an array. This array SHOULD have at | ||
| * least one element. Elements in the array SHOULD be unique. | ||
| * | ||
| * An instance validates successfully against this keyword if its value is | ||
| * equal to one of the elements in this keyword's array value. | ||
| * | ||
| * Elements in the array might be of any type, including `null`. | ||
| */ | ||
| enum?: MaybeReadonlyArray<Value>; | ||
| /** | ||
| * The value of this keyword MUST be an array. When multiple occurrences of | ||
| * this keyword are applicable to a single sub-instance, implementations | ||
| * MUST provide a flat array of all values rather than an array of arrays. | ||
| * | ||
| * This keyword can be used to provide sample JSON values associated with a | ||
| * particular schema, for the purpose of illustrating usage. It is | ||
| * RECOMMENDED that these values be valid against the associated schema. | ||
| * | ||
| * Implementations MAY use the value(s) of `default`, if present, as an | ||
| * additional example. If `examples` is absent, `default` MAY still be | ||
| * used in this manner. | ||
| */ | ||
| examples?: MaybeReadonlyArray<Value>; | ||
| /** | ||
| * The value of `exclusiveMaximum` MUST be a number, representing an | ||
| * exclusive upper limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then the instance is valid only if it has a | ||
| * value strictly less than (not equal to) `exclusiveMaximum`. | ||
| */ | ||
| exclusiveMaximum?: number; | ||
| /** | ||
| * The value of `exclusiveMinimum` MUST be a number, representing an | ||
| * exclusive lower limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then the instance is valid only if it has a | ||
| * value strictly greater than (not equal to) `exclusiveMinimum`. | ||
| */ | ||
| exclusiveMinimum?: number; | ||
| /** | ||
| * Implementations MAY treat `format` as an assertion in addition to an | ||
| * annotation, and attempt to validate the value's conformance to the | ||
| * specified semantics. | ||
| * | ||
| * The value of this keyword is called a format attribute. It MUST be a | ||
| * string. A format attribute can generally only validate a given set | ||
| * of instance types. If the type of the instance to validate is not in | ||
| * this set, validation for this format attribute and instance SHOULD | ||
| * succeed. Format attributes are most often applied to strings, but can | ||
| * be specified to apply to any type. | ||
| * | ||
| * Implementations MAY support custom format attributes. Save for agreement | ||
| * between parties, schema authors SHALL NOT expect a peer implementation | ||
| * to support such custom format attributes. An implementation MUST NOT | ||
| * fail validation or cease processing due to an unknown format attribute. | ||
| * When treating `format` as an annotation, implementations SHOULD | ||
| * collect both known and unknown format attribute values. | ||
| */ | ||
| format?: string; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * This validation outcome of this keyword's subschema has no direct effect | ||
| * on the overall validation result. Rather, it controls which of the | ||
| * `then` or `else` keywords are evaluated. | ||
| * | ||
| * Instances that successfully validate against this keyword's subschema | ||
| * MUST also be valid against the subschema value of the `then` keyword, | ||
| * if present. | ||
| * | ||
| * Instances that fail to validate against this keyword's subschema MUST | ||
| * also be valid against the subschema value of the `else` keyword, if | ||
| * present. | ||
| * | ||
| * If annotations are being collected, they are collected | ||
| * from this keyword's subschema in the usual way, including when the | ||
| * keyword is present without either `then` or `else`. | ||
| */ | ||
| if?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * The value of `items` MUST be a valid JSON Schema. | ||
| * | ||
| * This keyword applies its subschema to all instance elements at indexes | ||
| * greater than the length of the `prefixItems` array in the same schema | ||
| * object, as reported by the annotation result of that `prefixItems` | ||
| * keyword. If no such annotation result exists, `items` applies its | ||
| * subschema to all instance array elements. | ||
| * | ||
| * Note that the behavior of `items` without `prefixItems` is identical | ||
| * to that of the schema form of `items` in prior drafts. | ||
| * | ||
| * When `prefixItems` is present, the behavior of `items` is identical | ||
| * to the former `additionalItems` keyword. | ||
| * | ||
| * If the `items` subschema is applied to any positions within the | ||
| * instance array, it produces an annotation result of boolean `true`, | ||
| * indicating that all remaining array elements have been evaluated against | ||
| * this keyword's subschema. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * Implementations MAY choose to implement or optimize this keyword | ||
| * in another way that produces the same effect, such as by directly | ||
| * checking for the presence and size of a `prefixItems` array. | ||
| */ | ||
| items?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * If `contains` is not present within the same schema object, then this | ||
| * keyword has no effect. | ||
| * | ||
| * An instance array is valid against `maxContains` in two ways, | ||
| * depending on the form of the annotation result of an adjacent | ||
| * `contains` keyword. The first way is if the annotation result is an | ||
| * array and the length of that array is less than or equal to the | ||
| * `maxContains` value. The second way is if the annotation result is a | ||
| * boolean `true` and the instance array length is less than or equal to | ||
| * the `maxContains` value. | ||
| */ | ||
| maxContains?: number; | ||
| /** | ||
| * The value of `maximum` MUST be a number, representing an inclusive | ||
| * upper limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then this keyword validates only if the | ||
| * instance is less than or exactly equal to `maximum`. | ||
| */ | ||
| maximum?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An array instance is valid against `maxItems` if its size is less | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxItems?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * A string instance is valid against this keyword if its length is less | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * The length of a string instance is defined as the number of its | ||
| * characters as defined by [RFC 8259][RFC8259]. | ||
| * | ||
| * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259 | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxLength?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An object instance is valid against `maxProperties` if its number of | ||
| * `properties` is less than, or equal to, the value of this keyword. | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxProperties?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * If `contains` is not present within the same schema object, then this | ||
| * keyword has no effect. | ||
| * | ||
| * An instance array is valid against `minContains` in two ways, | ||
| * depending on the form of the annotation result of an adjacent | ||
| * `contains` keyword. The first way is if the annotation result is an | ||
| * array and the length of that array is greater than or equal to the | ||
| * `minContains` value. The second way is if the annotation result is a | ||
| * boolean `true` and the instance array length is greater than or equal | ||
| * to the `minContains` value. | ||
| * | ||
| * A value of `0` is allowed, but is only useful for setting a range | ||
| * of occurrences from `0` to the value of `maxContains`. A value of | ||
| * `0` with no `maxContains` causes `contains` to always pass | ||
| * validation. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `1`. | ||
| * | ||
| * @default 1 | ||
| */ | ||
| minContains?: number; | ||
| /** | ||
| * The value of `minimum` MUST be a number, representing an inclusive | ||
| * lower limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then this keyword validates only if the | ||
| * instance is greater than or exactly equal to `minimum`. | ||
| */ | ||
| minimum?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An array instance is valid against `minItems` if its size is greater | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minItems?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * A string instance is valid against this keyword if its length is greater | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * The length of a string instance is defined as the number of its | ||
| * characters as defined by [RFC 8259][RFC8259]. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259 | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minLength?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An object instance is valid against `minProperties` if its number of | ||
| * `properties` is greater than, or equal to, the value of this keyword. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minProperties?: number; | ||
| /** | ||
| * The value of `multipleOf` MUST be a number, strictly greater than | ||
| * `0`. | ||
| * | ||
| * A numeric instance is valid only if division by this keyword's value | ||
| * results in an integer. | ||
| * | ||
| * @exclusiveMinimum 0 | ||
| */ | ||
| multipleOf?: number; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * An instance is valid against this keyword if it fails to validate | ||
| * successfully against the schema defined by this keyword. | ||
| */ | ||
| not?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against exactly one schema defined by this keyword's value. | ||
| */ | ||
| oneOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * The value of this keyword MUST be a string. This string SHOULD be a | ||
| * valid regular expression, according to the [ECMA-262][ecma262] regular | ||
| * expression dialect. | ||
| * | ||
| * A string instance is considered valid if the regular expression matches | ||
| * the instance successfully. Recall: regular expressions are not | ||
| * implicitly anchored. | ||
| * | ||
| * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/ | ||
| * | ||
| * @format "regex" | ||
| */ | ||
| pattern?: string; | ||
| /** | ||
| * The value of `patternProperties` MUST be an object. Each property name | ||
| * of this object SHOULD be a valid regular expression, according to the | ||
| * [ECMA-262][ecma262] regular expression dialect. Each property value of | ||
| * this object MUST be a valid JSON Schema. | ||
| * | ||
| * Validation succeeds if, for each instance name that matches any regular | ||
| * expressions that appear as a property name in this keyword's value, | ||
| * the child instance for that name successfully validates against each | ||
| * schema that corresponds to a matching regular expression. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names matched by this keyword. Omitting this keyword has the same | ||
| * assertion behavior as an empty object. | ||
| * | ||
| * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/ | ||
| */ | ||
| patternProperties?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of `prefixItems` MUST be a non-empty array of valid JSON | ||
| * Schemas. | ||
| * | ||
| * Validation succeeds if each element of the instance validates against | ||
| * the schema at the same position, if any. This keyword does not | ||
| * constrain the length of the array. If the array is longer than this | ||
| * keyword's value, this keyword validates only the prefix of matching | ||
| * length. | ||
| * | ||
| * This keyword produces an annotation value which is the largest index to | ||
| * which this keyword applied a subschema. The value MAY be a boolean | ||
| * `true` if a subschema was applied to every index of the instance, such | ||
| * as is produced by the `items` keyword. | ||
| * This annotation affects the behavior of `items` and | ||
| * `unevaluatedItems`. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty array. | ||
| */ | ||
| prefixItems?: MaybeReadonlyArray<JSONSchema> | JSONSchema; | ||
| /** | ||
| * The value of `properties` MUST be an object. Each value of this object | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * Validation succeeds if, for each name that appears in both the instance | ||
| * and as a name within this keyword's value, the child instance for that | ||
| * name successfully validates against the corresponding schema. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names matched by this keyword. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * object. | ||
| */ | ||
| properties?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of `propertyNames` MUST be a valid JSON Schema. | ||
| * | ||
| * If the instance is an object, this keyword validates if every property | ||
| * name in the instance validates against the provided schema. | ||
| * Note the property name that the schema is testing will always be a | ||
| * string. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty schema. | ||
| */ | ||
| propertyNames?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword are applicable to a single sub-instance, the resulting | ||
| * value MUST be `true` if any occurrence specifies a `true` value, and | ||
| * MUST be `false` otherwise. | ||
| * | ||
| * If `readOnly` has a value of boolean `true`, it indicates that the | ||
| * value of the instance is managed exclusively by the owning authority, | ||
| * and attempts by an application to modify the value of this property are | ||
| * expected to be ignored or rejected by that owning authority. | ||
| * | ||
| * An instance document that is marked as `readOnly` for the entire | ||
| * document MAY be ignored if sent to the owning authority, or MAY result | ||
| * in an error, at the authority's discretion. | ||
| * | ||
| * For example, `readOnly` would be used to mark a database-generated | ||
| * serial number as read-only. | ||
| * | ||
| * This keyword can be used to assist in user interface instance | ||
| * generation. | ||
| * | ||
| * @default false | ||
| */ | ||
| readOnly?: boolean; | ||
| /** | ||
| * The value of this keyword MUST be an array. Elements of this array, if | ||
| * any, MUST be strings, and MUST be unique. | ||
| * | ||
| * An object instance is valid against this keyword if every item in the | ||
| * array is the name of a property in the instance. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty array. | ||
| */ | ||
| required?: MaybeReadonlyArray<string>; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * When `if` is present, and the instance successfully validates against | ||
| * its subschema, then validation succeeds against this keyword if the | ||
| * instance also successfully validates against this keyword's subschema. | ||
| * | ||
| * This keyword has no effect when `if` is absent, or when the instance | ||
| * fails to validate against its subschema. Implementations MUST NOT | ||
| * evaluate the instance against this keyword, for either validation or | ||
| * annotation collection purposes, in such cases. | ||
| */ | ||
| then?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * Can be used to decorate a user interface with a short label about the | ||
| * data produced. | ||
| */ | ||
| title?: string; | ||
| /** | ||
| * The value of this keyword MUST be either a string or an array. If it is | ||
| * an array, elements of the array MUST be strings and MUST be unique. | ||
| * | ||
| * String values MUST be one of the six primitive types (`"null"`, | ||
| * `"boolean"`, `"object"`, `"array"`, `"number"`, or | ||
| * `"string"`), or `"integer"` which matches any number with a zero | ||
| * fractional part. | ||
| * | ||
| * An instance validates if and only if the instance is in any of the sets | ||
| * listed for this keyword. | ||
| */ | ||
| type?: SchemaType; | ||
| /** | ||
| * The value of `unevaluatedItems` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the annotation results of | ||
| * adjacent keywords that apply to the instance location being validated. | ||
| * Specifically, the annotations from `prefixItems`, `items`, and | ||
| * `contains`, which can come from those keywords when they are adjacent | ||
| * to the `unevaluatedItems` keyword. Those three annotations, as well as | ||
| * `unevaluatedItems`, can also result from any and all adjacent | ||
| * [in-place applicator][in-place-applicator] keywords. | ||
| * | ||
| * If no relevant annotations are present, the `unevaluatedItems` | ||
| * subschema MUST be applied to all locations in the array. | ||
| * If a boolean `true` value is present from any of the relevant | ||
| * annotations, `unevaluatedItems` MUST be ignored. Otherwise, the | ||
| * subschema MUST be applied to any index greater than the largest | ||
| * annotation value for `prefixItems`, which does not appear in any | ||
| * annotation value for `contains`. | ||
| * | ||
| * This means that `prefixItems`, `items`, `contains`, and all | ||
| * in-place applicators MUST be evaluated before this keyword can be | ||
| * evaluated. Authors of extension keywords MUST NOT define an in-place | ||
| * applicator that would need to be evaluated after this keyword. | ||
| * | ||
| * If the `unevaluatedItems` subschema is applied to any positions within | ||
| * the instance array, it produces an annotation result of boolean | ||
| * `true`, analogous to the behavior of `items`. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place | ||
| */ | ||
| unevaluatedItems?: JSONSchema; | ||
| /** | ||
| * The value of `unevaluatedProperties` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the annotation results of | ||
| * adjacent keywords that apply to the instance location being validated. | ||
| * Specifically, the annotations from `properties`, | ||
| * `patternProperties`, and `additionalProperties`, which can come from | ||
| * those keywords when they are adjacent to the `unevaluatedProperties` | ||
| * keyword. Those three annotations, as well as `unevaluatedProperties`, | ||
| * can also result from any and all adjacent | ||
| * [in-place applicator][in-place-applicator] keywords. | ||
| * | ||
| * Validation with `unevaluatedProperties` applies only to the child | ||
| * values of instance names that do not appear in the `properties`, | ||
| * `patternProperties`, `additionalProperties`, or | ||
| * `unevaluatedProperties` annotation results that apply to the | ||
| * instance location being validated. | ||
| * | ||
| * For all such properties, validation succeeds if the child instance | ||
| * validates against the "unevaluatedProperties" schema. | ||
| * | ||
| * This means that `properties`, `patternProperties`, | ||
| * `additionalProperties`, and all in-place applicators MUST be evaluated | ||
| * before this keyword can be evaluated. Authors of extension keywords | ||
| * MUST NOT define an in-place applicator that would need to be evaluated | ||
| * after this keyword. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names validated by this keyword's subschema. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place | ||
| */ | ||
| unevaluatedProperties?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. | ||
| * | ||
| * If this keyword has boolean value `false`, the instance validates | ||
| * successfully. If it has boolean value `true`, the instance validates | ||
| * successfully if all of its elements are unique. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `false`. | ||
| * | ||
| * @default false | ||
| */ | ||
| uniqueItems?: boolean; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword is applicable to a single sub-instance, the resulting | ||
| * value MUST be `true` if any occurrence specifies a `true` value, and | ||
| * MUST be `false` otherwise. | ||
| * | ||
| * If `writeOnly` has a value of boolean `true`, it indicates that the | ||
| * value is never present when the instance is retrieved from the owning | ||
| * authority. It can be present when sent to the owning authority to update | ||
| * or create the document (or the resource it represents), but it will not | ||
| * be included in any updated or newly created version of the instance. | ||
| * | ||
| * An instance document that is marked as `writeOnly` for the entire | ||
| * document MAY be returned as a blank document of some sort, or MAY | ||
| * produce an error upon retrieval, or have the retrieval request ignored, | ||
| * at the authority's discretion. | ||
| * | ||
| * For example, `writeOnly` would be used to mark a password input field. | ||
| * | ||
| * These keywords can be used to assist in user interface instance | ||
| * generation. In particular, an application MAY choose to use a widget | ||
| * that hides input values as they are typed for write-only fields. | ||
| * | ||
| * @default false | ||
| */ | ||
| writeOnly?: boolean; | ||
| }; | ||
| declare namespace JSONSchema { | ||
| type TypeValue = ValueOf<TypeName> | TypeName | Array<ValueOf<TypeName> | TypeName> | ReadonlyArray<ValueOf<TypeName> | TypeName>; | ||
| /** | ||
| * JSON Schema interface | ||
| */ | ||
| type Interface<Value = any, SchemaType extends TypeValue = TypeValue> = Exclude<JSONSchema<Value, SchemaType>, boolean>; | ||
| type Array<T = any> = Pick<Interface<T, "array">, KeywordByType.Any | KeywordByType.Array>; | ||
| type Boolean = Pick<Interface<boolean, "boolean">, KeywordByType.Any>; | ||
| type Integer = Pick<Interface<number, "integer">, KeywordByType.Any | KeywordByType.Number>; | ||
| type Number = Pick<Interface<number, "number">, KeywordByType.Any | KeywordByType.Number>; | ||
| type Null = Pick<Interface<null, "null">, KeywordByType.Any>; | ||
| type Object<T = any> = Pick<Interface<T, "object">, KeywordByType.Any | KeywordByType.Object>; | ||
| type String = Pick<Interface<string, "string">, KeywordByType.Any | KeywordByType.String>; | ||
| } | ||
| declare namespace KeywordByType { | ||
| type Any = "$anchor" | "$comment" | "$defs" | "$dynamicAnchor" | "$dynamicRef" | "$id" | "$ref" | "$schema" | "$vocabulary" | "allOf" | "anyOf" | "const" | "default" | "definitions" | "deprecated" | "description" | "else" | "enum" | "examples" | "format" | "if" | "not" | "oneOf" | "readOnly" | "then" | "title" | "type" | "writeOnly"; | ||
| type Array = "additionalItems" | "contains" | "items" | "maxContains" | "maxItems" | "minContains" | "minItems" | "prefixItems" | "unevaluatedItems" | "uniqueItems"; | ||
| type Number = "exclusiveMaximum" | "exclusiveMinimum" | "maximum" | "minimum" | "multipleOf"; | ||
| type Object = "additionalProperties" | "dependencies" | "dependentRequired" | "dependentSchemas" | "maxProperties" | "minProperties" | "patternProperties" | "properties" | "propertyNames" | "required" | "unevaluatedProperties"; | ||
| type String = "contentEncoding" | "contentMediaType" | "contentSchema" | "maxLength" | "minLength" | "pattern"; | ||
| } | ||
| /** | ||
| * Content encoding strategy enum. | ||
| * | ||
| * - [Content-Transfer-Encoding Syntax](https://datatracker.ietf.org/doc/html/rfc2045#section-6.1) | ||
| * - [7bit vs 8bit encoding](https://stackoverflow.com/questions/25710599/content-transfer-encoding-7bit-or-8-bit/28531705#28531705) | ||
| */ | ||
| /** | ||
| * Enum consisting of simple type names for the `type` keyword | ||
| */ | ||
| declare enum TypeName { | ||
| /** | ||
| * Value MUST be an array. | ||
| */ | ||
| Array = "array", | ||
| /** | ||
| * Value MUST be a boolean. | ||
| */ | ||
| Boolean = "boolean", | ||
| /** | ||
| * Value MUST be an integer, no floating point numbers are allowed. This is a | ||
| * subset of the number type. | ||
| */ | ||
| Integer = "integer", | ||
| /** | ||
| * Value MUST be null. Note this is mainly for purpose of being able use union | ||
| * types to define nullability. If this type is not included in a union, null | ||
| * values are not allowed (the primitives listed above do not allow nulls on | ||
| * their own). | ||
| */ | ||
| Null = "null", | ||
| /** | ||
| * Value MUST be a number, floating point numbers are allowed. | ||
| */ | ||
| Number = "number", | ||
| /** | ||
| * Value MUST be an object. | ||
| */ | ||
| Object = "object", | ||
| /** | ||
| * Value MUST be a string. | ||
| */ | ||
| String = "string", | ||
| } | ||
| //#endregion | ||
| //#region ../core-internal/src/validators/types.d.ts | ||
| /** | ||
| * JSON Schema type definition (JSON Schema Draft 2020-12) | ||
| * | ||
| * This uses the object form of JSON Schema (excluding boolean schemas). | ||
| * While `true` and `false` are valid JSON Schemas, this SDK uses the | ||
| * object form for practical type safety. | ||
| * | ||
| * Re-exported from json-schema-typed for convenience. | ||
| * @see https://json-schema.org/draft/2020-12/json-schema-core.html | ||
| */ | ||
| type JsonSchemaType = JSONSchema.Interface; | ||
| /** | ||
| * Result of a JSON Schema validation operation | ||
| */ | ||
| type JsonSchemaValidatorResult<T> = { | ||
| valid: true; | ||
| data: T; | ||
| errorMessage: undefined; | ||
| } | { | ||
| valid: false; | ||
| data: undefined; | ||
| errorMessage: string; | ||
| }; | ||
| /** | ||
| * A validator function that validates data against a JSON Schema | ||
| */ | ||
| type JsonSchemaValidator<T> = (input: unknown) => JsonSchemaValidatorResult<T>; | ||
| /** | ||
| * Provider interface for creating validators from JSON Schemas | ||
| * | ||
| * This is the main extension point for custom validator implementations. | ||
| * Implementations should: | ||
| * - Support JSON Schema Draft 2020-12 (or be compatible with it) | ||
| * - Return validator functions that can be called multiple times | ||
| * - Handle schema compilation/caching internally | ||
| * - Provide clear error messages on validation failure | ||
| * | ||
| * @example | ||
| * ```ts source="./types.examples.ts#jsonSchemaValidator_implementation" | ||
| * class MyValidatorProvider implements jsonSchemaValidator { | ||
| * getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T> { | ||
| * // Compile/cache validator from schema | ||
| * return (input: unknown) => | ||
| * isValid(schema, input) | ||
| * ? { valid: true, data: input as T, errorMessage: undefined } | ||
| * : { valid: false, data: undefined, errorMessage: 'Error details' }; | ||
| * } | ||
| * } | ||
| * ``` | ||
| */ | ||
| interface jsonSchemaValidator { | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that can be called multiple times | ||
| */ | ||
| getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| //#endregion | ||
| export { jsonSchemaValidator as i, JsonSchemaValidator as n, JsonSchemaValidatorResult as r, JsonSchemaType as t }; | ||
| //# sourceMappingURL=types-mS0yxCL0.d.mts.map |
| {"version":3,"file":"types-mS0yxCL0.d.mts","names":["draft","$schema","MaybeReadonlyArray","T","Array","ReadonlyArray","ValueOf","JSONSchema","Value","SchemaType","Record","TypeValue","TypeName","Exclude","Interface","KeywordByType","Any","Pick","Number","Object","String","ContentEncoding","Format","keywords"],"sources":["../../../node_modules/.pnpm/json-schema-typed@8.0.2/node_modules/json-schema-typed/draft_2020_12.d.ts","../../core-internal/src/validators/types.ts"],"sourcesContent":["export declare const draft: \"2020-12\";\r\nexport declare const $schema: \"https://json-schema.org/draft/2020-12/schema\";\r\ntype MaybeReadonlyArray<T> = Array<T> | ReadonlyArray<T>;\r\ntype ValueOf<T> = T[keyof T];\r\n/**\r\n * JSON Schema [Draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-validation.html)\r\n */\r\nexport type JSONSchema<Value = any, SchemaType = Value extends boolean ? \"boolean\" : Value extends null ? \"null\" : Value extends number ? \"number\" | \"integer\" : Value extends string ? \"string\" : Value extends unknown[] ? \"array\" : Value extends Record<string | number, unknown> ? \"object\" : JSONSchema.TypeValue> = boolean | {\r\n /**\r\n * Using JSON Pointer fragments requires knowledge of the structure of the\r\n * schema. When writing schema documents with the intention to provide\r\n * re-usable schemas, it may be preferable to use a plain name fragment\r\n * that is not tied to any particular structural location. This allows a\r\n * subschema to be relocated without requiring JSON Pointer references to\r\n * be updated.\r\n *\r\n * The `$anchor` keyword is used to specify such a fragment. It is an\r\n * identifier keyword that can only be used to create plain name fragments.\r\n *\r\n * If present, the value of this keyword MUST be a string, which MUST start\r\n * with a letter `[A-Za-z]`, followed by any number of letters, digits\r\n * `[0-9]`, hyphens `-`, underscores `_`, colons `:`,\r\n * or periods `.`.\r\n *\r\n * Note that the anchor string does not include the `#` character,\r\n * as it is not a URI-reference. An `{\"$anchor\": \"foo\"}` becomes the\r\n * fragment `#foo` when used in a URI.\r\n *\r\n * The base URI to which the resulting fragment is appended is determined\r\n * by the `$id` keyword as explained in the previous section.\r\n * Two `$anchor` keywords in the same schema document MAY have the same\r\n * value if they apply to different base URIs, as the resulting full URIs\r\n * will be distinct. However, the effect of two `$anchor` keywords\r\n * with the same value and the same base URI is undefined. Implementations\r\n * MAY raise an error if such usage is detected.\r\n */\r\n $anchor?: string;\r\n /**\r\n * This keyword reserves a location for comments from schema authors to\r\n * readers or maintainers of the schema.\r\n *\r\n * The value of this keyword MUST be a string. Implementations MUST NOT\r\n * present this string to end users. Tools for editing schemas SHOULD\r\n * support displaying and editing this keyword. The value of this keyword\r\n * MAY be used in debug or error output which is intended for developers\r\n * making use of schemas.\r\n *\r\n * Schema vocabularies SHOULD allow `$comment` within any object\r\n * containing vocabulary keywords. Implementations MAY assume `$comment`\r\n * is allowed unless the vocabulary specifically forbids it. Vocabularies\r\n * MUST NOT specify any effect of `$comment` beyond what is described in\r\n * this specification.\r\n *\r\n * Tools that translate other media types or programming languages\r\n * to and from `application/schema+json` MAY choose to convert that media\r\n * type or programming language's native comments to or from `$comment`\r\n * values. The behavior of such translation when both native comments and\r\n * `$comment` properties are present is implementation-dependent.\r\n *\r\n * Implementations MAY strip `$comment` values at any point during\r\n * processing. In particular, this allows for shortening schemas when the\r\n * size of deployed schemas is a concern.\r\n *\r\n * Implementations MUST NOT take any other action based on the presence,\r\n * absence, or contents of `$comment` properties. In particular, the\r\n * value of `$comment` MUST NOT be collected as an annotation result.\r\n */\r\n $comment?: string;\r\n /**\r\n * The `$defs` keyword reserves a location for schema authors to inline\r\n * re-usable JSON Schemas into a more general schema. The keyword does not\r\n * directly affect the validation result.\r\n *\r\n * This keyword's value MUST be an object. Each member value of this object\r\n * MUST be a valid JSON Schema.\r\n */\r\n $defs?: Record<string, JSONSchema>;\r\n /**\r\n * \"The `$dynamicAnchor` indicates that the fragment is an extension\r\n * point when used with the `$dynamicRef` keyword. This low-level,\r\n * advanced feature makes it easier to extend recursive schemas such as the\r\n * meta-schemas, without imposing any particular semantics on that\r\n * extension. See `$dynamicRef` for more details.\r\n */\r\n $dynamicAnchor?: string;\r\n /**\r\n * The `$dynamicRef` keyword is an applicator that allows for deferring\r\n * the full resolution until runtime, at which point it is resolved each\r\n * time it is encountered while evaluating an instance.\r\n *\r\n * Together with `$dynamicAnchor`, `$dynamicRef` implements a\r\n * cooperative extension mechanism that is primarily useful with recursive\r\n * schemas (schemas that reference themselves). Both the extension point\r\n * and the runtime-determined extension target are defined with\r\n * `$dynamicAnchor`, and only exhibit runtime dynamic behavior when\r\n * referenced with `$dynamicRef`.\r\n *\r\n * The value of the `$dynamicRef` property MUST be a string which is\r\n * a URI-Reference. Resolved against the current URI base, it produces\r\n * the URI used as the starting point for runtime resolution. This initial\r\n * resolution is safe to perform on schema load.\r\n *\r\n * If the initially resolved starting point URI includes a fragment that\r\n * was created by the `$dynamicAnchor` keyword, the initial URI MUST be\r\n * replaced by the URI (including the fragment) for the outermost schema\r\n * resource in the [dynamic scope][scopes] that defines\r\n * an identically named fragment with `$dynamicAnchor`.\r\n *\r\n * Otherwise, its behavior is identical to `$ref`, and no runtime\r\n * resolution is needed.\r\n *\r\n * [scopes]: https://json-schema.org/draft/2020-12/json-schema-core.html#scopes\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $dynamicRef?: string;\r\n /**\r\n * The `$id` keyword identifies a schema resource with its\r\n * [canonical][[RFC6596]] URI.\r\n *\r\n * Note that this URI is an identifier and not necessarily a network\r\n * locator. In the case of a network-addressable URL, a schema need not be\r\n * downloadable from its canonical URI.\r\n *\r\n * If present, the value for this keyword MUST be a string, and MUST\r\n * represent a valid [URI-reference][RFC3986]. This URI-reference SHOULD\r\n * be normalized, and MUST resolve to an [absolute-URI][RFC3986] (without a\r\n * fragment). Therefore, `$id` MUST NOT contain a non-empty fragment,\r\n * and SHOULD NOT contain an empty fragment.\r\n *\r\n * Since an empty fragment in the context of the\r\n * `application/schema+json` media type refers to the same resource as\r\n * the base URI without a fragment, an implementation MAY normalize a URI\r\n * ending with an empty fragment by removing the fragment. However, schema\r\n * authors SHOULD NOT rely on this behavior across implementations.\r\n *\r\n * This URI also serves as the base URI for relative URI-references in\r\n * keywords within the schema resource, in accordance with\r\n * [RFC 3986][RFC3986] section 5.1.1 regarding base URIs embedded in\r\n * content.\r\n *\r\n * The presence of `$id` in a subschema indicates that the subschema\r\n * constitutes a distinct schema resource within a single schema document.\r\n * Furthermore, in accordance with [RFC 3986][RFC3986] section 5.1.2\r\n * regarding encapsulating entities, if an `$id` in a subschema is a\r\n * relative URI-reference, the base URI for resolving that reference is the\r\n * URI of the parent schema resource.\r\n *\r\n * If no parent schema object explicitly identifies itself as a resource\r\n * with `$id`, the base URI is that of the entire document.\r\n *\r\n * The root schema of a JSON Schema document SHOULD contain an `$id`\r\n * keyword with an [absolute-URI][RFC3986] (containing a scheme, but no\r\n * fragment).\r\n *\r\n * [RFC6596]: https://datatracker.ietf.org/doc/html/rfc6596\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $id?: string;\r\n /**\r\n * The `$ref` keyword is an applicator that is used to reference a\r\n * statically identified schema. Its results are the results of the\r\n * referenced schema. Other keywords can appear alongside of `$ref` in\r\n * the same schema object.\r\n *\r\n * The value of the `$ref` property MUST be a string which is a\r\n * URI-Reference. Resolved against the current URI base, it produces the\r\n * URI of the schema to apply.\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $ref?: string;\r\n /**\r\n * The `$schema` keyword is both used as a JSON Schema dialect identifier\r\n * and as the identifier of a resource which is itself a JSON Schema, which\r\n * describes the set of valid schemas written for this particular dialect.\r\n *\r\n * The value of this keyword MUST be a [URI][RFC3986] (containing a scheme)\r\n * and this URI MUST be normalized. The current schema MUST be valid\r\n * against the meta-schema identified by this URI.\r\n *\r\n * If this URI identifies a retrievable resource, that resource SHOULD be\r\n * of media type `application/schema+json`.\r\n *\r\n * The `$schema` keyword SHOULD be used in the document root schema\r\n * object, and MAY be used in the root schema objects of embedded schema\r\n * resources. It MUST NOT appear in non-resource root schema objects. If\r\n * absent from the document root schema, the resulting behavior is\r\n * implementation-defined.\r\n *\r\n * Values for this property are defined elsewhere in this and other\r\n * documents, and by other parties.\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n *\r\n * @format \"uri\"\r\n */\r\n $schema?: string;\r\n /**\r\n * The `$vocabulary` keyword is used in meta-schemas to identify the\r\n * vocabularies available for use in schemas described by that meta-schema.\r\n * It is also used to indicate whether each vocabulary is required or\r\n * optional, in the sense that an implementation MUST understand the\r\n * required vocabularies in order to successfully process the schema.\r\n * Together, this information forms a dialect. Any vocabulary that is\r\n * understood by the implementation MUST be processed in a manner\r\n * consistent with the semantic definitions contained within the\r\n * vocabulary.\r\n *\r\n * The value of this keyword MUST be an object. The property names in the\r\n * object MUST be URIs (containing a scheme) and this URI MUST be\r\n * normalized. Each URI that appears as a property name identifies a\r\n * specific set of keywords and their semantics.\r\n *\r\n * The URI MAY be a URL, but the nature of the retrievable resource is\r\n * currently undefined, and reserved for future use. Vocabulary authors\r\n * MAY use the URL of the vocabulary specification, in a human-readable\r\n * media type such as `text/html` or `text/plain`, as the vocabulary\r\n * URI.\r\n *\r\n * The values of the object properties MUST be booleans. If the value is\r\n * `true`, then implementations that do not recognize the vocabulary MUST\r\n * refuse to process any schemas that declare this meta-schema with\r\n * `$schema`. If the value is `false`, implementations that do not\r\n * recognize the vocabulary SHOULD proceed with processing such schemas.\r\n * The value has no impact if the implementation understands the\r\n * vocabulary.\r\n *\r\n * Unrecognized keywords SHOULD be ignored. This remains the case for\r\n * keywords defined by unrecognized vocabularies. It is not currently\r\n * possible to distinguish between unrecognized keywords that are defined\r\n * in vocabularies from those that are not part of any vocabulary.\r\n *\r\n * The `$vocabulary` keyword SHOULD be used in the root schema of any\r\n * schema document intended for use as a meta-schema. It MUST NOT appear\r\n * in subschemas.\r\n *\r\n * The `$vocabulary` keyword MUST be ignored in schema documents that are\r\n * not being processed as a meta-schema.\r\n */\r\n $vocabulary?: Record<string, string>;\r\n /**\r\n * @deprecated `additionalItems` has been deprecated in favor of `prefixItems`\r\n * paired with `items`.\r\n */\r\n additionalItems?: JSONSchema;\r\n /**\r\n * The value of `additionalProperties` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the presence and annotation\r\n * results of `properties` and `patternProperties` within the same\r\n * schema object. Validation with `additionalProperties` applies only to\r\n * the child values of instance names that do not appear in the annotation\r\n * results of either `properties` or `patternProperties`.\r\n *\r\n * For all such properties, validation succeeds if the child instance\r\n * validates against the `additionalProperties` schema.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names validated by this keyword's subschema. Annotation results for\r\n * `additionalProperties` keywords from multiple schemas applied to the\r\n * same instance location are combined by taking the union of the sets.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * Implementations MAY choose to implement or optimize this keyword in\r\n * another way that produces the same effect, such as by directly checking\r\n * the names in `properties` and the patterns in `patternProperties`\r\n * against the instance property set.\r\n */\r\n additionalProperties?: JSONSchema;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against all schemas defined by this keyword's value.\r\n */\r\n allOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against at least one schema defined by this keyword's\r\n * value.\r\n */\r\n anyOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * An instance validates successfully against this keyword if its value is\r\n * equal to the value of the keyword.\r\n *\r\n * Use of this keyword is functionally equivalent to the `enum` keyword\r\n * with a single value.\r\n */\r\n const?: Value;\r\n /**\r\n * The value of this keyword MUST be a valid JSON Schema.\r\n *\r\n * An array instance is valid against `contains` if at least one of its\r\n * elements is valid against the given schema. The subschema MUST be\r\n * applied to every array element even after the first match has been\r\n * found, in order to collect annotations for use by other keywords.\r\n * This is to ensure that all possible annotations are collected.\r\n *\r\n * Logically, the validation result of applying the value subschema to each\r\n * item in the array MUST be OR'ed with `false`, resulting in an overall\r\n * validation result.\r\n *\r\n * This keyword produces an annotation value which is an array of the\r\n * indexes to which this keyword validates successfully when applying its\r\n * subschema, in ascending order. The value MAY be a boolean `true` if\r\n * the subschema validates successfully when applied to every index of the\r\n * instance. The annotation MUST be present if the instance array to which\r\n * this keyword's schema applies is empty.\r\n */\r\n contains?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * If the instance value is a string, this property defines that the\r\n * string SHOULD be interpreted as binary data and decoded using the\r\n * encoding named by this property. [RFC 2045, Sec 6.1][RFC2045] lists the\r\n * possible values for this property.\r\n *\r\n * The value of this property SHOULD be ignored if the instance described\r\n * is not a string.\r\n *\r\n * If this keyword is absent, but `contentMediaType` is present, this\r\n * indicates that the media type could be encoded into `UTF-8` like any\r\n * other JSON string value, and does not require additional decoding.\r\n *\r\n * The value of this property MUST be a string.\r\n *\r\n * [RFC2045]: https://datatracker.ietf.org/doc/html/rfc2045#section-6.1\r\n */\r\n contentEncoding?: \"7bit\" | \"8bit\" | \"base64\" | \"binary\" | \"ietf-token\" | \"quoted-printable\" | \"x-token\";\r\n /**\r\n * If the instance is a string, this property indicates the media type\r\n * of the contents of the string. If `contentEncoding` is present,\r\n * this property describes the decoded string.\r\n *\r\n * The value of this property must be a media type, as defined by\r\n * [RFC 2046][RFC2046]. This property defines the media type of instances\r\n * which this schema defines.\r\n *\r\n * The value of this property SHOULD be ignored if the instance described\r\n * is not a string.\r\n *\r\n * If the `contentEncoding` property is not present, but the instance\r\n * value is a string, then the value of this property SHOULD specify a text\r\n * document type, and the character set SHOULD be the character set into\r\n * which the JSON string value was decoded (for which the default is\r\n * Unicode).\r\n *\r\n * [RFC2046]: https://datatracker.ietf.org/doc/html/rfc2046\r\n */\r\n contentMediaType?: string;\r\n /**\r\n * If the instance is a string, and if `contentMediaType` is present,\r\n * this property contains a schema which describes the structure of the\r\n * string.\r\n *\r\n * This keyword MAY be used with any media type that can be mapped into\r\n * JSON Schema's data model.\r\n *\r\n * The value of this property MUST be a valid JSON schema. It SHOULD be\r\n * ignored if `contentMediaType` is not present.\r\n */\r\n contentSchema?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * This keyword can be used to supply a default JSON value associated with\r\n * a particular schema. It is RECOMMENDED that a `default` value be valid\r\n * against the associated schema.\r\n */\r\n default?: Value;\r\n /**\r\n * @deprecated `definitions` has been renamed to `$defs`.\r\n */\r\n definitions?: Record<string, JSONSchema>;\r\n /**\r\n * @deprecated `dependencies` has been split into two keywords:\r\n * `dependentSchemas` and `dependentRequired`.\r\n */\r\n dependencies?: Record<string, MaybeReadonlyArray<string> | JSONSchema>;\r\n /**\r\n * The value of this keyword MUST be an object. Properties in\r\n * this object, if any, MUST be arrays. Elements in each array,\r\n * if any, MUST be strings, and MUST be unique.\r\n *\r\n * This keyword specifies properties that are required if a specific\r\n * other property is present. Their requirement is dependent on the\r\n * presence of the other property.\r\n *\r\n * Validation succeeds if, for each name that appears in both\r\n * the instance and as a name within this keyword's value, every\r\n * item in the corresponding array is also the name of a property\r\n * in the instance.\r\n *\r\n * Omitting this keyword has the same behavior as an empty object.\r\n */\r\n dependentRequired?: Record<string, MaybeReadonlyArray<string>>;\r\n /**\r\n * This keyword specifies subschemas that are evaluated if the instance is\r\n * an object and contains a certain property.\r\n *\r\n * This keyword's value MUST be an object. Each value in the object MUST be\r\n * a valid JSON Schema.\r\n *\r\n * If the object key is a property in the instance, the entire instance\r\n * must validate against the subschema. Its use is dependent on the\r\n * presence of the property.\r\n *\r\n * Omitting this keyword has the same behavior as an empty object.\r\n */\r\n dependentSchemas?: Record<string, JSONSchema>;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword are applicable to a single sub-instance, applications\r\n * SHOULD consider the instance location to be deprecated if any occurrence\r\n * specifies a `true` value.\r\n *\r\n * If `deprecated` has a value of boolean `true`, it indicates that\r\n * applications SHOULD refrain from usage of the declared property. It MAY\r\n * mean the property is going to be removed in the future.\r\n *\r\n * A root schema containing `deprecated` with a value of `true`\r\n * indicates that the entire resource being described MAY be removed in the\r\n * future.\r\n *\r\n * The `deprecated` keyword applies to each instance location to which\r\n * the schema object containing the keyword successfully applies. This can\r\n * result in scenarios where every array item or object property is\r\n * deprecated even though the containing array or object is not.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `false`.\r\n */\r\n deprecated?: boolean;\r\n /**\r\n * Can be used to decorate a user interface with explanation or information\r\n * about the data produced.\r\n */\r\n description?: string;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * When `if` is present, and the instance fails to validate against its\r\n * subschema, then validation succeeds against this keyword if the instance\r\n * successfully validates against this keyword's subschema.\r\n *\r\n * This keyword has no effect when `if` is absent, or when the instance\r\n * successfully validates against its subschema. Implementations MUST NOT\r\n * evaluate the instance against this keyword, for either validation or\r\n * annotation collection purposes, in such cases.\r\n */\r\n else?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * The value of this keyword MUST be an array. This array SHOULD have at\r\n * least one element. Elements in the array SHOULD be unique.\r\n *\r\n * An instance validates successfully against this keyword if its value is\r\n * equal to one of the elements in this keyword's array value.\r\n *\r\n * Elements in the array might be of any type, including `null`.\r\n */\r\n enum?: MaybeReadonlyArray<Value>;\r\n /**\r\n * The value of this keyword MUST be an array. When multiple occurrences of\r\n * this keyword are applicable to a single sub-instance, implementations\r\n * MUST provide a flat array of all values rather than an array of arrays.\r\n *\r\n * This keyword can be used to provide sample JSON values associated with a\r\n * particular schema, for the purpose of illustrating usage. It is\r\n * RECOMMENDED that these values be valid against the associated schema.\r\n *\r\n * Implementations MAY use the value(s) of `default`, if present, as an\r\n * additional example. If `examples` is absent, `default` MAY still be\r\n * used in this manner.\r\n */\r\n examples?: MaybeReadonlyArray<Value>;\r\n /**\r\n * The value of `exclusiveMaximum` MUST be a number, representing an\r\n * exclusive upper limit for a numeric instance.\r\n *\r\n * If the instance is a number, then the instance is valid only if it has a\r\n * value strictly less than (not equal to) `exclusiveMaximum`.\r\n */\r\n exclusiveMaximum?: number;\r\n /**\r\n * The value of `exclusiveMinimum` MUST be a number, representing an\r\n * exclusive lower limit for a numeric instance.\r\n *\r\n * If the instance is a number, then the instance is valid only if it has a\r\n * value strictly greater than (not equal to) `exclusiveMinimum`.\r\n */\r\n exclusiveMinimum?: number;\r\n /**\r\n * Implementations MAY treat `format` as an assertion in addition to an\r\n * annotation, and attempt to validate the value's conformance to the\r\n * specified semantics.\r\n *\r\n * The value of this keyword is called a format attribute. It MUST be a\r\n * string. A format attribute can generally only validate a given set\r\n * of instance types. If the type of the instance to validate is not in\r\n * this set, validation for this format attribute and instance SHOULD\r\n * succeed. Format attributes are most often applied to strings, but can\r\n * be specified to apply to any type.\r\n *\r\n * Implementations MAY support custom format attributes. Save for agreement\r\n * between parties, schema authors SHALL NOT expect a peer implementation\r\n * to support such custom format attributes. An implementation MUST NOT\r\n * fail validation or cease processing due to an unknown format attribute.\r\n * When treating `format` as an annotation, implementations SHOULD\r\n * collect both known and unknown format attribute values.\r\n */\r\n format?: string;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * This validation outcome of this keyword's subschema has no direct effect\r\n * on the overall validation result. Rather, it controls which of the\r\n * `then` or `else` keywords are evaluated.\r\n *\r\n * Instances that successfully validate against this keyword's subschema\r\n * MUST also be valid against the subschema value of the `then` keyword,\r\n * if present.\r\n *\r\n * Instances that fail to validate against this keyword's subschema MUST\r\n * also be valid against the subschema value of the `else` keyword, if\r\n * present.\r\n *\r\n * If annotations are being collected, they are collected\r\n * from this keyword's subschema in the usual way, including when the\r\n * keyword is present without either `then` or `else`.\r\n */\r\n if?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * The value of `items` MUST be a valid JSON Schema.\r\n *\r\n * This keyword applies its subschema to all instance elements at indexes\r\n * greater than the length of the `prefixItems` array in the same schema\r\n * object, as reported by the annotation result of that `prefixItems`\r\n * keyword. If no such annotation result exists, `items` applies its\r\n * subschema to all instance array elements.\r\n *\r\n * Note that the behavior of `items` without `prefixItems` is identical\r\n * to that of the schema form of `items` in prior drafts.\r\n *\r\n * When `prefixItems` is present, the behavior of `items` is identical\r\n * to the former `additionalItems` keyword.\r\n *\r\n * If the `items` subschema is applied to any positions within the\r\n * instance array, it produces an annotation result of boolean `true`,\r\n * indicating that all remaining array elements have been evaluated against\r\n * this keyword's subschema.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * Implementations MAY choose to implement or optimize this keyword\r\n * in another way that produces the same effect, such as by directly\r\n * checking for the presence and size of a `prefixItems` array.\r\n */\r\n items?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * If `contains` is not present within the same schema object, then this\r\n * keyword has no effect.\r\n *\r\n * An instance array is valid against `maxContains` in two ways,\r\n * depending on the form of the annotation result of an adjacent\r\n * `contains` keyword. The first way is if the annotation result is an\r\n * array and the length of that array is less than or equal to the\r\n * `maxContains` value. The second way is if the annotation result is a\r\n * boolean `true` and the instance array length is less than or equal to\r\n * the `maxContains` value.\r\n */\r\n maxContains?: number;\r\n /**\r\n * The value of `maximum` MUST be a number, representing an inclusive\r\n * upper limit for a numeric instance.\r\n *\r\n * If the instance is a number, then this keyword validates only if the\r\n * instance is less than or exactly equal to `maximum`.\r\n */\r\n maximum?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An array instance is valid against `maxItems` if its size is less\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * @minimum 0\r\n */\r\n maxItems?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * A string instance is valid against this keyword if its length is less\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * The length of a string instance is defined as the number of its\r\n * characters as defined by [RFC 8259][RFC8259].\r\n *\r\n * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259\r\n *\r\n * @minimum 0\r\n */\r\n maxLength?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An object instance is valid against `maxProperties` if its number of\r\n * `properties` is less than, or equal to, the value of this keyword.\r\n *\r\n * @minimum 0\r\n */\r\n maxProperties?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * If `contains` is not present within the same schema object, then this\r\n * keyword has no effect.\r\n *\r\n * An instance array is valid against `minContains` in two ways,\r\n * depending on the form of the annotation result of an adjacent\r\n * `contains` keyword. The first way is if the annotation result is an\r\n * array and the length of that array is greater than or equal to the\r\n * `minContains` value. The second way is if the annotation result is a\r\n * boolean `true` and the instance array length is greater than or equal\r\n * to the `minContains` value.\r\n *\r\n * A value of `0` is allowed, but is only useful for setting a range\r\n * of occurrences from `0` to the value of `maxContains`. A value of\r\n * `0` with no `maxContains` causes `contains` to always pass\r\n * validation.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `1`.\r\n *\r\n * @default 1\r\n */\r\n minContains?: number;\r\n /**\r\n * The value of `minimum` MUST be a number, representing an inclusive\r\n * lower limit for a numeric instance.\r\n *\r\n * If the instance is a number, then this keyword validates only if the\r\n * instance is greater than or exactly equal to `minimum`.\r\n */\r\n minimum?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An array instance is valid against `minItems` if its size is greater\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minItems?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * A string instance is valid against this keyword if its length is greater\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * The length of a string instance is defined as the number of its\r\n * characters as defined by [RFC 8259][RFC8259].\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minLength?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An object instance is valid against `minProperties` if its number of\r\n * `properties` is greater than, or equal to, the value of this keyword.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minProperties?: number;\r\n /**\r\n * The value of `multipleOf` MUST be a number, strictly greater than\r\n * `0`.\r\n *\r\n * A numeric instance is valid only if division by this keyword's value\r\n * results in an integer.\r\n *\r\n * @exclusiveMinimum 0\r\n */\r\n multipleOf?: number;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * An instance is valid against this keyword if it fails to validate\r\n * successfully against the schema defined by this keyword.\r\n */\r\n not?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against exactly one schema defined by this keyword's value.\r\n */\r\n oneOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * The value of this keyword MUST be a string. This string SHOULD be a\r\n * valid regular expression, according to the [ECMA-262][ecma262] regular\r\n * expression dialect.\r\n *\r\n * A string instance is considered valid if the regular expression matches\r\n * the instance successfully. Recall: regular expressions are not\r\n * implicitly anchored.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n *\r\n * @format \"regex\"\r\n */\r\n pattern?: string;\r\n /**\r\n * The value of `patternProperties` MUST be an object. Each property name\r\n * of this object SHOULD be a valid regular expression, according to the\r\n * [ECMA-262][ecma262] regular expression dialect. Each property value of\r\n * this object MUST be a valid JSON Schema.\r\n *\r\n * Validation succeeds if, for each instance name that matches any regular\r\n * expressions that appear as a property name in this keyword's value,\r\n * the child instance for that name successfully validates against each\r\n * schema that corresponds to a matching regular expression.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names matched by this keyword. Omitting this keyword has the same\r\n * assertion behavior as an empty object.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n */\r\n patternProperties?: Record<string, JSONSchema>;\r\n /**\r\n * The value of `prefixItems` MUST be a non-empty array of valid JSON\r\n * Schemas.\r\n *\r\n * Validation succeeds if each element of the instance validates against\r\n * the schema at the same position, if any. This keyword does not\r\n * constrain the length of the array. If the array is longer than this\r\n * keyword's value, this keyword validates only the prefix of matching\r\n * length.\r\n *\r\n * This keyword produces an annotation value which is the largest index to\r\n * which this keyword applied a subschema. The value MAY be a boolean\r\n * `true` if a subschema was applied to every index of the instance, such\r\n * as is produced by the `items` keyword.\r\n * This annotation affects the behavior of `items` and\r\n * `unevaluatedItems`.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty array.\r\n */\r\n prefixItems?: MaybeReadonlyArray<JSONSchema> | JSONSchema;\r\n /**\r\n * The value of `properties` MUST be an object. Each value of this object\r\n * MUST be a valid JSON Schema.\r\n *\r\n * Validation succeeds if, for each name that appears in both the instance\r\n * and as a name within this keyword's value, the child instance for that\r\n * name successfully validates against the corresponding schema.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names matched by this keyword.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * object.\r\n */\r\n properties?: Record<string, JSONSchema>;\r\n /**\r\n * The value of `propertyNames` MUST be a valid JSON Schema.\r\n *\r\n * If the instance is an object, this keyword validates if every property\r\n * name in the instance validates against the provided schema.\r\n * Note the property name that the schema is testing will always be a\r\n * string.\r\n *\r\n * Omitting this keyword has the same behavior as an empty schema.\r\n */\r\n propertyNames?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword are applicable to a single sub-instance, the resulting\r\n * value MUST be `true` if any occurrence specifies a `true` value, and\r\n * MUST be `false` otherwise.\r\n *\r\n * If `readOnly` has a value of boolean `true`, it indicates that the\r\n * value of the instance is managed exclusively by the owning authority,\r\n * and attempts by an application to modify the value of this property are\r\n * expected to be ignored or rejected by that owning authority.\r\n *\r\n * An instance document that is marked as `readOnly` for the entire\r\n * document MAY be ignored if sent to the owning authority, or MAY result\r\n * in an error, at the authority's discretion.\r\n *\r\n * For example, `readOnly` would be used to mark a database-generated\r\n * serial number as read-only.\r\n *\r\n * This keyword can be used to assist in user interface instance\r\n * generation.\r\n *\r\n * @default false\r\n */\r\n readOnly?: boolean;\r\n /**\r\n * The value of this keyword MUST be an array. Elements of this array, if\r\n * any, MUST be strings, and MUST be unique.\r\n *\r\n * An object instance is valid against this keyword if every item in the\r\n * array is the name of a property in the instance.\r\n *\r\n * Omitting this keyword has the same behavior as an empty array.\r\n */\r\n required?: MaybeReadonlyArray<string>;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * When `if` is present, and the instance successfully validates against\r\n * its subschema, then validation succeeds against this keyword if the\r\n * instance also successfully validates against this keyword's subschema.\r\n *\r\n * This keyword has no effect when `if` is absent, or when the instance\r\n * fails to validate against its subschema. Implementations MUST NOT\r\n * evaluate the instance against this keyword, for either validation or\r\n * annotation collection purposes, in such cases.\r\n */\r\n then?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * Can be used to decorate a user interface with a short label about the\r\n * data produced.\r\n */\r\n title?: string;\r\n /**\r\n * The value of this keyword MUST be either a string or an array. If it is\r\n * an array, elements of the array MUST be strings and MUST be unique.\r\n *\r\n * String values MUST be one of the six primitive types (`\"null\"`,\r\n * `\"boolean\"`, `\"object\"`, `\"array\"`, `\"number\"`, or\r\n * `\"string\"`), or `\"integer\"` which matches any number with a zero\r\n * fractional part.\r\n *\r\n * An instance validates if and only if the instance is in any of the sets\r\n * listed for this keyword.\r\n */\r\n type?: SchemaType;\r\n /**\r\n * The value of `unevaluatedItems` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the annotation results of\r\n * adjacent keywords that apply to the instance location being validated.\r\n * Specifically, the annotations from `prefixItems`, `items`, and\r\n * `contains`, which can come from those keywords when they are adjacent\r\n * to the `unevaluatedItems` keyword. Those three annotations, as well as\r\n * `unevaluatedItems`, can also result from any and all adjacent\r\n * [in-place applicator][in-place-applicator] keywords.\r\n *\r\n * If no relevant annotations are present, the `unevaluatedItems`\r\n * subschema MUST be applied to all locations in the array.\r\n * If a boolean `true` value is present from any of the relevant\r\n * annotations, `unevaluatedItems` MUST be ignored. Otherwise, the\r\n * subschema MUST be applied to any index greater than the largest\r\n * annotation value for `prefixItems`, which does not appear in any\r\n * annotation value for `contains`.\r\n *\r\n * This means that `prefixItems`, `items`, `contains`, and all\r\n * in-place applicators MUST be evaluated before this keyword can be\r\n * evaluated. Authors of extension keywords MUST NOT define an in-place\r\n * applicator that would need to be evaluated after this keyword.\r\n *\r\n * If the `unevaluatedItems` subschema is applied to any positions within\r\n * the instance array, it produces an annotation result of boolean\r\n * `true`, analogous to the behavior of `items`.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place\r\n */\r\n unevaluatedItems?: JSONSchema;\r\n /**\r\n * The value of `unevaluatedProperties` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the annotation results of\r\n * adjacent keywords that apply to the instance location being validated.\r\n * Specifically, the annotations from `properties`,\r\n * `patternProperties`, and `additionalProperties`, which can come from\r\n * those keywords when they are adjacent to the `unevaluatedProperties`\r\n * keyword. Those three annotations, as well as `unevaluatedProperties`,\r\n * can also result from any and all adjacent\r\n * [in-place applicator][in-place-applicator] keywords.\r\n *\r\n * Validation with `unevaluatedProperties` applies only to the child\r\n * values of instance names that do not appear in the `properties`,\r\n * `patternProperties`, `additionalProperties`, or\r\n * `unevaluatedProperties` annotation results that apply to the\r\n * instance location being validated.\r\n *\r\n * For all such properties, validation succeeds if the child instance\r\n * validates against the \"unevaluatedProperties\" schema.\r\n *\r\n * This means that `properties`, `patternProperties`,\r\n * `additionalProperties`, and all in-place applicators MUST be evaluated\r\n * before this keyword can be evaluated. Authors of extension keywords\r\n * MUST NOT define an in-place applicator that would need to be evaluated\r\n * after this keyword.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names validated by this keyword's subschema.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place\r\n */\r\n unevaluatedProperties?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a boolean.\r\n *\r\n * If this keyword has boolean value `false`, the instance validates\r\n * successfully. If it has boolean value `true`, the instance validates\r\n * successfully if all of its elements are unique.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `false`.\r\n *\r\n * @default false\r\n */\r\n uniqueItems?: boolean;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword is applicable to a single sub-instance, the resulting\r\n * value MUST be `true` if any occurrence specifies a `true` value, and\r\n * MUST be `false` otherwise.\r\n *\r\n * If `writeOnly` has a value of boolean `true`, it indicates that the\r\n * value is never present when the instance is retrieved from the owning\r\n * authority. It can be present when sent to the owning authority to update\r\n * or create the document (or the resource it represents), but it will not\r\n * be included in any updated or newly created version of the instance.\r\n *\r\n * An instance document that is marked as `writeOnly` for the entire\r\n * document MAY be returned as a blank document of some sort, or MAY\r\n * produce an error upon retrieval, or have the retrieval request ignored,\r\n * at the authority's discretion.\r\n *\r\n * For example, `writeOnly` would be used to mark a password input field.\r\n *\r\n * These keywords can be used to assist in user interface instance\r\n * generation. In particular, an application MAY choose to use a widget\r\n * that hides input values as they are typed for write-only fields.\r\n *\r\n * @default false\r\n */\r\n writeOnly?: boolean;\r\n};\r\nexport declare namespace JSONSchema {\r\n type TypeValue = ValueOf<TypeName> | TypeName | Array<ValueOf<TypeName> | TypeName> | ReadonlyArray<ValueOf<TypeName> | TypeName>;\r\n /**\r\n * JSON Schema interface\r\n */\r\n type Interface<Value = any, SchemaType extends TypeValue = TypeValue> = Exclude<JSONSchema<Value, SchemaType>, boolean>;\r\n type Array<T = any> = Pick<Interface<T, \"array\">, KeywordByType.Any | KeywordByType.Array>;\r\n type Boolean = Pick<Interface<boolean, \"boolean\">, KeywordByType.Any>;\r\n type Integer = Pick<Interface<number, \"integer\">, KeywordByType.Any | KeywordByType.Number>;\r\n type Number = Pick<Interface<number, \"number\">, KeywordByType.Any | KeywordByType.Number>;\r\n type Null = Pick<Interface<null, \"null\">, KeywordByType.Any>;\r\n type Object<T = any> = Pick<Interface<T, \"object\">, KeywordByType.Any | KeywordByType.Object>;\r\n type String = Pick<Interface<string, \"string\">, KeywordByType.Any | KeywordByType.String>;\r\n}\r\ndeclare namespace KeywordByType {\r\n type Any = \"$anchor\" | \"$comment\" | \"$defs\" | \"$dynamicAnchor\" | \"$dynamicRef\" | \"$id\" | \"$ref\" | \"$schema\" | \"$vocabulary\" | \"allOf\" | \"anyOf\" | \"const\" | \"default\" | \"definitions\" | \"deprecated\" | \"description\" | \"else\" | \"enum\" | \"examples\" | \"format\" | \"if\" | \"not\" | \"oneOf\" | \"readOnly\" | \"then\" | \"title\" | \"type\" | \"writeOnly\";\r\n type Array = \"additionalItems\" | \"contains\" | \"items\" | \"maxContains\" | \"maxItems\" | \"minContains\" | \"minItems\" | \"prefixItems\" | \"unevaluatedItems\" | \"uniqueItems\";\r\n type Number = \"exclusiveMaximum\" | \"exclusiveMinimum\" | \"maximum\" | \"minimum\" | \"multipleOf\";\r\n type Object = \"additionalProperties\" | \"dependencies\" | \"dependentRequired\" | \"dependentSchemas\" | \"maxProperties\" | \"minProperties\" | \"patternProperties\" | \"properties\" | \"propertyNames\" | \"required\" | \"unevaluatedProperties\";\r\n type String = \"contentEncoding\" | \"contentMediaType\" | \"contentSchema\" | \"maxLength\" | \"minLength\" | \"pattern\";\r\n}\r\n/**\r\n * Content encoding strategy enum.\r\n *\r\n * - [Content-Transfer-Encoding Syntax](https://datatracker.ietf.org/doc/html/rfc2045#section-6.1)\r\n * - [7bit vs 8bit encoding](https://stackoverflow.com/questions/25710599/content-transfer-encoding-7bit-or-8-bit/28531705#28531705)\r\n */\r\nexport declare enum ContentEncoding {\r\n /**\r\n * Only US-ASCII characters, which use the lower 7 bits for each character.\r\n *\r\n * Each line must be less than 1,000 characters.\r\n */\r\n \"7bit\" = \"7bit\",\r\n /**\r\n * Allow extended ASCII characters which can use the 8th (highest) bit to\r\n * indicate special characters not available in 7bit.\r\n *\r\n * Each line must be less than 1,000 characters.\r\n */\r\n \"8bit\" = \"8bit\",\r\n /**\r\n * Useful for data that is mostly non-text.\r\n */\r\n Base64 = \"base64\",\r\n /**\r\n * Same character set as 8bit, with no line length restriction.\r\n */\r\n Binary = \"binary\",\r\n /**\r\n * An extension token defined by a standards-track RFC and registered with\r\n * IANA.\r\n */\r\n IETFToken = \"ietf-token\",\r\n /**\r\n * Lines are limited to 76 characters, and line breaks are represented using\r\n * special characters that are escaped.\r\n */\r\n QuotedPrintable = \"quoted-printable\",\r\n /**\r\n * The two characters \"X-\" or \"x-\" followed, with no intervening white space,\r\n * by any token.\r\n */\r\n XToken = \"x-token\"\r\n}\r\n/**\r\n * This enum provides well-known formats that apply to strings.\r\n */\r\nexport declare enum Format {\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"full-date\" production in\r\n * [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n Date = \"date\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"date-time\" production in\r\n * [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n DateTime = \"date-time\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"duration\" production.\r\n */\r\n Duration = \"duration\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid Internet\r\n * email address as defined by by the \"Mailbox\" ABNF rule in [RFC\r\n * 5321][RFC5322], section 4.1.2.\r\n *\r\n * [RFC5321]: https://datatracker.ietf.org/doc/html/rfc5321\r\n */\r\n Email = \"email\",\r\n /**\r\n * As defined by [RFC 1123, section 2.1][RFC1123], including host names\r\n * produced using the Punycode algorithm specified in\r\n * [RFC 5891, section 4.4][RFC5891].\r\n *\r\n * [RFC1123]: https://datatracker.ietf.org/doc/html/rfc1123\r\n * [RFC5891]: https://datatracker.ietf.org/doc/html/rfc5891\r\n */\r\n Hostname = \"hostname\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid Internet\r\n * email address as defined by the extended \"Mailbox\" ABNF rule in\r\n * [RFC 6531][RFC6531], section 3.3.\r\n *\r\n * [RFC6531]: https://datatracker.ietf.org/doc/html/rfc6531\r\n */\r\n IDNEmail = \"idn-email\",\r\n /**\r\n * As defined by either [RFC 1123, section 2.1][RFC1123] as for hostname, or\r\n * an internationalized hostname as defined by\r\n * [RFC 5890, section 2.3.2.3][RFC5890].\r\n *\r\n * [RFC1123]: https://datatracker.ietf.org/doc/html/rfc1123\r\n * [RFC5890]: https://datatracker.ietf.org/doc/html/rfc5890\r\n */\r\n IDNHostname = \"idn-hostname\",\r\n /**\r\n * An IPv4 address according to the \"dotted-quad\" ABNF syntax as defined in\r\n * [RFC 2673, section 3.2][RFC2673].\r\n *\r\n * [RFC2673]: https://datatracker.ietf.org/doc/html/rfc2673\r\n */\r\n IPv4 = \"ipv4\",\r\n /**\r\n * An IPv6 address as defined in [RFC 4291, section 2.2][RFC4291].\r\n *\r\n * [RFC4291]: https://datatracker.ietf.org/doc/html/rfc4291\r\n */\r\n IPv6 = \"ipv6\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid IRI,\r\n * according to [RFC 3987][RFC3987].\r\n *\r\n * [RFC3987]: https://datatracker.ietf.org/doc/html/rfc3987\r\n */\r\n IRI = \"iri\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid IRI\r\n * Reference (either an IRI or a relative-reference), according to\r\n * [RFC 3987][RFC3987].\r\n *\r\n * [RFC3987]: https://datatracker.ietf.org/doc/html/rfc3987\r\n */\r\n IRIReference = \"iri-reference\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid JSON\r\n * string representation of a JSON Pointer, according to\r\n * [RFC 6901, section 5][RFC6901].\r\n *\r\n * [RFC6901]: https://datatracker.ietf.org/doc/html/rfc6901\r\n */\r\n JSONPointer = \"json-pointer\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid JSON\r\n * string representation of a JSON Pointer fragment, according to\r\n * [RFC 6901, section 5][RFC6901].\r\n *\r\n * [RFC6901]: https://datatracker.ietf.org/doc/html/rfc6901\r\n */\r\n JSONPointerURIFragment = \"json-pointer-uri-fragment\",\r\n /**\r\n * This attribute applies to string instances.\r\n *\r\n * A regular expression, which SHOULD be valid according to the\r\n * [ECMA-262][ecma262] regular expression dialect.\r\n *\r\n * Implementations that validate formats MUST accept at least the subset of\r\n * [ECMA-262][ecma262] defined in the [Regular Expressions][regexInterop]\r\n * section of this specification, and SHOULD accept all valid\r\n * [ECMA-262][ecma262] expressions.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n * [regexInterop]: https://json-schema.org/draft/2020-12/json-schema-validation.html#regexInterop\r\n */\r\n RegEx = \"regex\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * [Relative JSON Pointer][relative-json-pointer].\r\n *\r\n * [relative-json-pointer]: https://datatracker.ietf.org/doc/html/draft-handrews-relative-json-pointer-01\r\n */\r\n RelativeJSONPointer = \"relative-json-pointer\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"time\" production in [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n Time = \"time\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI,\r\n * according to [RFC3986][RFC3986].\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n */\r\n URI = \"uri\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI\r\n * Reference (either a URI or a relative-reference), according to\r\n * [RFC3986][RFC3986].\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n */\r\n URIReference = \"uri-reference\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI\r\n * Template (of any level), according to [RFC 6570][RFC6570].\r\n *\r\n * Note that URI Templates may be used for IRIs; there is no separate IRI\r\n * Template specification.\r\n *\r\n * [RFC6570]: https://datatracker.ietf.org/doc/html/rfc6570\r\n */\r\n URITemplate = \"uri-template\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid string\r\n * representation of a UUID, according to [RFC 4122][RFC4122].\r\n *\r\n * [RFC4122]: https://datatracker.ietf.org/doc/html/rfc4122\r\n */\r\n UUID = \"uuid\"\r\n}\r\n/**\r\n * Enum consisting of simple type names for the `type` keyword\r\n */\r\nexport declare enum TypeName {\r\n /**\r\n * Value MUST be an array.\r\n */\r\n Array = \"array\",\r\n /**\r\n * Value MUST be a boolean.\r\n */\r\n Boolean = \"boolean\",\r\n /**\r\n * Value MUST be an integer, no floating point numbers are allowed. This is a\r\n * subset of the number type.\r\n */\r\n Integer = \"integer\",\r\n /**\r\n * Value MUST be null. Note this is mainly for purpose of being able use union\r\n * types to define nullability. If this type is not included in a union, null\r\n * values are not allowed (the primitives listed above do not allow nulls on\r\n * their own).\r\n */\r\n Null = \"null\",\r\n /**\r\n * Value MUST be a number, floating point numbers are allowed.\r\n */\r\n Number = \"number\",\r\n /**\r\n * Value MUST be an object.\r\n */\r\n Object = \"object\",\r\n /**\r\n * Value MUST be a string.\r\n */\r\n String = \"string\"\r\n}\r\nexport declare const keywords: readonly [\"$anchor\", \"$comment\", \"$defs\", \"$dynamicAnchor\", \"$dynamicRef\", \"$id\", \"$ref\", \"$schema\", \"$vocabulary\", \"additionalItems\", \"additionalProperties\", \"allOf\", \"anyOf\", \"const\", \"contains\", \"contentEncoding\", \"contentMediaType\", \"contentSchema\", \"default\", \"definitions\", \"dependencies\", \"dependentRequired\", \"dependentSchemas\", \"deprecated\", \"description\", \"else\", \"enum\", \"examples\", \"exclusiveMaximum\", \"exclusiveMinimum\", \"format\", \"if\", \"items\", \"maxContains\", \"maximum\", \"maxItems\", \"maxLength\", \"maxProperties\", \"minContains\", \"minimum\", \"minItems\", \"minLength\", \"minProperties\", \"multipleOf\", \"not\", \"oneOf\", \"pattern\", \"patternProperties\", \"prefixItems\", \"properties\", \"propertyNames\", \"readOnly\", \"required\", \"then\", \"title\", \"type\", \"unevaluatedItems\", \"unevaluatedProperties\", \"uniqueItems\", \"writeOnly\"];\r\nexport {};\r\n"],"x_google_ignoreList":[0],"mappings":";;KAEKE,kBAA8BC,CAAAA,CAAAA,CAAAA,GAANC,KAAMD,CAAAA,CAAAA,CAAAA,GAAKE,aAALF,CAAmBA,CAAnBA,CAAAA;KAC9BG,OADwBF,CAAAA,CAAAA,CAAAA,GACXD,CADWC,CAAAA,MACHD,CADGC,CAAAA;;;;AACxBE,KAIOC,UAJAJ,CAAAA,QAAcA,GAAC,EAAA,cAIsBK,KAJtB,SAAA,OAAA,GAAA,SAAA,GAI0DA,KAJ1D,SAAA,IAAA,GAAA,MAAA,GAIwFA,KAJxF,SAAA,MAAA,GAAA,QAAA,GAAA,SAAA,GAIsIA,KAJtI,SAAA,MAAA,GAAA,QAAA,GAIwKA,KAJxK,SAAA,OAAA,EAAA,GAAA,OAAA,GAI4MA,KAJ5M,SAI0NE,MAJ1N,CAAA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AKH,UAAUX,cAAcY,aAAAA,CAAcC,MAAMD,aAAAA,CAAcI;gBACxEF,KAAKH,6BAA6BC,aAAAA,CAAcC,MAAMD,aAAAA,CAAcK;;kBAEpEL,aAAAA;;;;;;;;;;;;;;;;;aA2NEH,QAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlrCyD;;;;;;AACxB;AAKrD;;;AAAmHJ,KCMvG,cAAA,GAAiB,UAAA,CAAW,SDN2EA;;;;AAAkIE,KCWzO,yBDXyOA,CAAAA,CAAAA,CAAAA,GAAAA;EAA8CH,KAAAA,EAAAA,IAAWI;EAqEnRJ,IAAAA,ECzDA,CDyDAA;EAAfG,YAAAA,EAAAA,SAAAA;CAsKMA,GAAAA;EAKIH,KAAAA,EAAAA,KAAAA;EA0BKA,IAAAA,EAAAA,SAAAA;EAQeC,YAAAA,EAAAA,MAAAA;CAAOC;;;;AASAA,KCzQrC,mBDyQqCA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,KAAAA,EAAAA,OAAAA,EAAAA,GCzQQ,yBDyQRA,CCzQkC,CDyQlCA,CAAAA;;;;;;;;;;;;;;;;;;;;;;;;AAgLtCP,UChaM,mBAAA,CDgaNA;EAcuBM;;;;;;EAqObA,YAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,EC5oBO,cD4oBPA,CAAAA,EC5oBwB,mBD4oBxBA,CC5oB4C,CD4oB5CA,CAAAA"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.cts","names":[],"sources":["../../core-internal/src/shared/auth.ts","../../core-internal/src/auth/errors.ts","../../core-internal/src/shared/authUtils.ts","../../core-internal/src/shared/inboundClassification.ts","../../core-internal/src/shared/elicitation.ts","../../core-internal/src/shared/inputRequired.ts","../../core-internal/src/types/enums.ts","../../core-internal/src/types/errors.ts","../../core-internal/src/types/guards.ts","../../core-internal/src/types/specTypeSchema.ts","../../core-internal/src/shared/mediaType.ts","../../core-internal/src/shared/metadataUtils.ts","../../core-internal/src/shared/protocolEras.ts","../../core-internal/src/shared/stdio.ts","../../core-internal/src/util/inMemory.ts","../src/server/completable.ts","../src/server/middleware/bearerAuth.ts","../src/server/middleware/hostHeaderValidation.ts","../src/server/middleware/oauthMetadata.ts","../src/server/middleware/originValidation.ts","../src/server/requestStateCodec.ts","../src/server/streamableHttp.ts","../src/fromJsonSchema.ts"],"sourcesContent":[],"mappings":";;;;;;AA6BA;;;cAAa,sCAAoC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;cAoBpC,qBAAmB,CAAA,CAAA;;;;;;;;;;;;;EApBiB,0CAAA,eAAA,WAAA,YAAA,CAAA,CAAA;EAAA,qDAAA,eAAA,WAAA,YAAA,CAAA,CAAA;EAoBpC,sBAsBX,eAAA,YAAA,CAAA;;;;;;;;;;;;cAOW,8BAA4B,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA7BT,eAAA,CAAA;;AA6BhC;;;;cA8Ca,uCAAqC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAUrC,mBAAiB,CAAA,CAAA;;;;;;;;;;;;;;;cAkBjB,kCAAgC,CAAA,CAAA;;;;;;;KAUjC,0BAAA,GAA6B,CAAA,CAAE,aAAa;;;;cAK3C,0BAAwB,CAAA,CAAA;;;;;;;;cAexB,2BAAyB,CAAA,CAAA;;;;;;;EAxGG,UAAA,eAAA,SAAA,CAAA;EAAA,QAAA,YAAA,CAAA,cAAA,SAAA,CAAA,WAAA,aAAA,CAAA,EAAA,CAAA,gBAAA,CAAA,SAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;EA8C5B,KAAA,eAAA,YAAA,CAAA;;;;;;;;;;;;;cA2FA,8BAA4B,CAAA,CAAA;;;;;;;;;cAY5B,kCAAgC,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAKhC,oCAAkC,CAAA,CAAA;;;;;;;cAUlC,mCAAiC,CAAA,C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0BE,+CAAA;;;;ArB9BjB;;;;;;;;;;;wDqB8C0D;;;;;;;;;;;mDAYL;;;;;;;;;;;eAapC;;;;;;;;;;;;;;;;;;ErBvEe,4BAAA,CAAA,EAAA,OAAA;EA6BnB;;;;;;;;;;;;;;;;;;;;;UqBwFI,oBAAA;;;;;;;;;aAUF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsDF,wCAAA,YAAoD;;;;;;;;;ErBxJxB,QAAA,sBAAA;EAAA,QAAA,WAAA;EA8C5B,QAAA,qBAAA;;;;;;;;;oBqBgIS;wBACI,wBAAwB;wBAEzB;;;;;WAiBN;;;;;;;;;;;;;;;;;;;qBAiFU,mBAAmB,uBAAuB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ArB3N/E;;;WqB00BmB;;;;;;4BAsBW;;;;;ErB90BjB,wBAAA,CAAA,CAAA,EAAA,IAAA;gBqBm2BW;uBAA+C;MAAc;;;;iBCr/BrE,oCAAoC,4BAA4B,sBAAsB,uBAAuB,GAAG"} | ||
| {"version":3,"file":"index.d.cts","names":[],"sources":["../src/server/completable.ts","../src/server/middleware/bearerAuth.ts","../src/server/middleware/hostHeaderValidation.ts","../src/server/middleware/oauthMetadata.ts","../src/server/middleware/originValidation.ts","../src/server/requestStateCodec.ts","../src/server/streamableHttp.ts","../src/fromJsonSchema.ts"],"sourcesContent":[],"mappings":";;;;cAEa;KAED,2BAA2B,mBAAmB,4BAC/C,gBAAA,CAAiB,WAAW,WAHvC;cAKoB;AALpB,CAAA,EAAA,GAOK,gBAAA,CAAiB,UAPwD,CAO7C,CAP6C,CAAA,EAAA,GAOtC,OAPsC,CAO9B,gBAAA,CAAiB,UAPa,CAOF,CAPE,CAAA,EAAA,CAAA;AAElE,KAOA,eAPgB,CAAA,UAOU,gBAPV,GAO6B,gBAP7B,CAAA,GAAA;EAAW,QAAA,EAQzB,gBAR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AAWA;;;;EC3CiB;;;;EAkBgB,UAAA,CAAA,EG+FhB,UH/FgB;EA4CjB;AAqBhB;AA0EA;;;EAAuF,YAAA,CAAA,EAAA,MAAA,EAAA;EAAQ;;;;ACnJ/F;EAoBgB,cAAA,CAAA,EAAA,MAAoB,EAAA;EA4BpB;AAchB;;;;EC1EiB,4BAAwB,CAAA,EAAA,OAAA;EAiDxB;;;;;EAoBsC,aAAA,CAAA,EAAA,MAAA;EAAR;;AAsE/C;;;;;;;;EC3HY,yBAAQ,CAAA,EAAA,MAAA,EAAA;AACpB;AAKA;;;AAOqE,UAoIpD,oBAAA,CApIoD;EAAR;;;;EAaxC,UAAA,CAAA,EAAA,OAAA;EAET;;;EAEqD,QAAA,CAAA,EA6HlD,QA7HkD;;;;AA4BjE;;;;;AAuFA;AAgEA;;;;;;;;;;;;;;;;;;;;AChOA;;;;;;;;;;;;;;;;;;;;;;;cDgOa,wCAAA,YAAoD;;;;;;;;;;;;;;;;;;;;oBAsB3C;wBACI,wBAAwB;wBAEzB;;;;;WAiBN;;;;;;;;;;;;;;;;;;;qBAiFU,mBAAmB,uBAAuB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+mB5D;;;;;;4BAsBW;;;;;;gBAqBN;uBAA+C;MAAc;;;;iBCr/BrE,oCAAoC,4BAA4B,sBAAsB,uBAAuB,GAAG"} |
+3
-3
@@ -1,3 +0,3 @@ | ||
| import { $ as RequestHandlerSchemas, $a as OAuthClientInformationFull, $i as SubscriptionsListenResult, $n as InputRequest, $r as PrimitiveSchemaDefinition, $t as CallToolRequest, A as ResourceMetadata, Aa as INVALID_REQUEST, Ai as Result, An as ElicitRequestURLParams, Ar as ListToolsRequest, At as InputRequiredSpec, B as deserializeMessage, Ba as TRACEPARENT_META_KEY, Bi as ServerRequest, Bn as GetTaskPayloadRequest, Br as ModelHint, Bt as InboundHttpRequest, C as PromptCallback, Ca as UntitledSingleSelectEnumSchema, Ci as ResourceLink, Cn as CreateTaskResult, Cr as ListResourceTemplatesResult, Ct as parseJSONRPCMessage, D as RegisteredResource, Da as DEFAULT_NEGOTIATED_PROTOCOL_VERSION, Di as ResourceTemplateType, Dn as ElicitRequest, Dr as ListRootsResult, Dt as UnsupportedProtocolVersionError, E as RegisteredPrompt, Ea as CLIENT_INFO_META_KEY, Ei as ResourceTemplateReference, En as DiscoverResult, Er as ListRootsRequest, Et as ResourceNotFoundError, F as InMemoryTransport, Fa as PARSE_ERROR, Fi as SamplingContent, Fn as EmptyResult, Fr as MessageClassification, Ft as ElicitInputParams, G as getDisplayName, Ga as SdkErrorCode, Gi as StringSchema, Gn as Icon, Gr as NotificationParams, Gt as InboundValidationRung, H as CacheHint, Ha as checkResourceAllowed, Hi as SetLevelRequest, Hn as GetTaskRequest, Hr as MultiSelectEnumSchema, Ht as InboundLegacyRoute, I as UriTemplate, Ia as PROTOCOL_VERSION_META_KEY, Ii as SamplingMessage, In as EnumSchema, Ir as MessageExtraInfo, It as StandardSchemaV1, J as ClientContext, Ja as OAuthError, Ji as SubscriptionFilter, Jn as Implementation, Jr as PaginatedRequest, Jt as AudioContent, K as isJsonContentType, Ka as SdkHttpError, Ki as SubscribeRequest, Kn as Icons, Kr as NotificationTypeMap, Kt as classifyInboundRequest, L as Variables, La as RELATED_TASK_META_KEY, Li as SamplingMessageContentBlock, Ln as GetPromptRequest, Lr as MetaObject, Lt as StandardSchemaV1Sync, M as ToolCallback, Ma as LATEST_PROTOCOL_VERSION, Mi as Role, Mn as ElicitationCompleteNotification, Mr as LoggingLevel, Mt as acceptedContent, N as Server, Na as LOG_LEVEL_META_KEY, Ni as Root, Nn as ElicitationCompleteNotificationParams, Nr as LoggingMessageNotification, Nt as inputRequired, O as RegisteredResourceTemplate, Oa as INTERNAL_ERROR, Oi as ResourceUpdatedNotification, On as ElicitRequestFormParams, Or as ListTasksRequest, Ot as UrlElicitationRequiredError, P as ServerOptions, Pa as METHOD_NOT_FOUND, Pi as RootsListChangedNotification, Pn as EmbeddedResource, Pr as LoggingMessageNotificationParams, Pt as inputResponse, Q as ProtocolOptions, Qa as OAuthClientInformation, Qi as SubscriptionsListenRequestParams, Qn as InitializedNotification, Qr as PingRequest, Qt as BooleanSchema, R as ReadBuffer, Ra as SUBSCRIPTION_ID_META_KEY, Ri as ServerCapabilities, Rn as GetPromptRequestParams, Rr as MethodNotFoundError, Rt as StandardSchemaWithJSON, S as McpServer, Sa as UntitledMultiSelectEnumSchema, Si as ResourceContents, Sn as CreateMessageResultWithTools, Sr as ListResourceTemplatesRequest, St as isTaskAugmentedRequestParams, T as ReadResourceTemplateCallback, Ta as CLIENT_CAPABILITIES_META_KEY, Ti as ResourceRequestParams, Tn as DiscoverRequest, Tr as ListResourcesResult, Tt as ProtocolError, U as CacheScope, Ua as resourceUrlFromServerUrl, Ui as SetLevelRequestParams, Un as GetTaskResult, Ur as Notification, Ut as InboundLegacyRouteReason, V as serializeMessage, Va as TRACESTATE_META_KEY, Vi as ServerResult, Vn as GetTaskPayloadResult, Vr as ModelPreferences, Vt as InboundLadderRejection, W as ProtocolEra, Wa as SdkError, Wi as SingleSelectEnumSchema, Wn as HandlerResultTypeMap, Wr as NotificationMethod, Wt as InboundModernRoute, X as NotificationOptions, Xa as AuthorizationServerMetadata, Xi as SubscriptionsAcknowledgedNotificationParams, Xn as InitializeRequestParams, Xr as PaginatedResult, Xt as BaseMetadata, Y as DEFAULT_REQUEST_TIMEOUT_MSEC, Ya as OAuthErrorCode, Yi as SubscriptionsAcknowledgedNotification, Yn as InitializeRequest, Yr as PaginatedRequestParams, Yt as AuthInfo, Z as ProgressCallback, Za as IdJagTokenExchangeResponse, Zi as SubscriptionsListenRequest, Zn as InitializeResult, Zr as ParseError, Zt as BlobResourceContents, _ as PerRequestResponseMode, _a as ToolResultContent, _i as RequestMetaObject, _n as CreateMessageRequest, _r as ListChangedCallback, _t as isJSONRPCErrorResponse, a as McpRequestContext, aa as TaskStatus, ai as PromptArgument, an as CancelledNotificationParams, ao as OAuthProtectedResourceMetadata, ar as InvalidParamsError, at as TransportSendOptions, b as CompleteResourceTemplateCallback, ba as UnsubscribeRequestParams, bi as RequestTypeMap, bn as CreateMessageRequestParamsWithTools, br as ListPromptsRequest, bt as isJSONRPCResponse, c as isLegacyRequest, ca as TextContent, ci as PromptReference, cn as ClientRequest, co as OpenIdProviderDiscoveryMetadata, cr as JSONObject, ct as SpecTypes, d as ServerEvent, da as TitledSingleSelectEnumSchema, di as ReadResourceResult, dn as CompleteRequest, do as StoredOAuthTokens, dr as JSONRPCNotification, dt as assertCompleteRequestPrompt, ea as SubscriptionsListenResultMeta, ei as Progress, en as CallToolRequestParams, eo as OAuthClientInformationMixed, er as InputRequests, et as RequestOptions, f as ServerEventBus, fa as Tool, fi as RelatedTaskMetadata, fn as CompleteRequestParams, fr as JSONRPCRequest, ft as assertCompleteRequestResourceTemplate, g as PerRequestMessageExtra, ga as ToolListChangedNotification, gi as RequestMetaEnvelope, gn as ContentBlock, gr as LegacyTitledEnumSchema, gt as isInputRequiredResult, h as PerRequestHTTPServerTransportOptions, ha as ToolExecution, hi as RequestMeta, hn as CompleteResult, hr as JSONValue, ht as isInitializedNotification, i as McpHttpHandler, ia as TaskMetadata, ii as Prompt, in as CancelledNotification, io as OAuthMetadata, ir as InternalError, it as Transport, j as ResourceTemplate, ja as JSONRPC_VERSION, ji as ResultTypeMap, jn as ElicitResult, jr as ListToolsResult, jt as InputResponseView, k as RegisteredTool, ka as INVALID_PARAMS, ki as ResourceUpdatedNotificationParams, kn as ElicitRequestParams, kr as ListTasksResult, kt as ProtocolErrorCode, l as legacyStatelessFallback, la as TextResourceContents, li as ReadResourceRequest, ln as ClientResult, lo as OpenIdProviderMetadata, lr as JSONRPCErrorResponse, lt as isSpecType, m as PerRequestHTTPServerTransport, ma as ToolChoice, mi as RequestId, mn as CompleteRequestResourceTemplate, mr as JSONRPCResultResponse, mt as isInitializeRequest, n as LegacyHttpHandler, na as TaskAugmentedRequestParams, ni as ProgressNotificationParams, nn as CancelTaskRequest, no as OAuthClientRegistrationError, nr as InputResponse, nt as ServerContext, o as McpServerFactory, oa as TaskStatusNotification, oi as PromptListChangedNotification, on as ClientCapabilities, oo as OAuthTokenRevocationRequest, or as InvalidRequestError, ot as createFetchWithInit, p as ServerNotifier, pa as ToolAnnotations, pi as Request$1, pn as CompleteRequestPrompt, pr as JSONRPCResponse, pt as isCallToolResult, q as BaseContext, qa as SdkHttpErrorData, qi as SubscribeRequestParams, qn as ImageContent, qr as NumberSchema, qt as Annotations, r as McpHandlerRequestOptions, ra as TaskCreationParams, ri as ProgressToken, rn as CancelTaskResult, ro as OAuthErrorResponse, rr as InputResponses, rt as FetchLike, s as createMcpHandler, sa as TaskStatusNotificationParams, si as PromptMessage, sn as ClientNotification, so as OAuthTokens, sr as JSONArray, st as SpecTypeName, t as CreateMcpHandlerOptions, ta as Task, ti as ProgressNotification, tn as CallToolResult, to as OAuthClientMetadata, tr as InputRequiredResult, tt as RequestStateAccessor, u as InMemoryServerEventBus, ua as TitledMultiSelectEnumSchema, ui as ReadResourceRequestParams, un as CompatibilityCallToolResult, uo as StoredOAuthClientInformation, ur as JSONRPCMessage, ut as specTypeSchemas, v as AnyToolHandler, va as ToolUseContent, vi as RequestMethod, vn as CreateMessageRequestParams, vr as ListChangedHandlers, vt as isJSONRPCNotification, w as ReadResourceCallback, wa as BAGGAGE_META_KEY, wi as ResourceListChangedNotification, wn as Cursor, wr as ListResourcesRequest, wt as MissingRequiredClientCapabilityError, x as ListResourcesCallback, xa as UnsupportedProtocolVersionErrorData, xi as Resource, xn as CreateMessageResult, xr as ListPromptsResult, xt as isJSONRPCResultResponse, y as BaseToolCallback, ya as UnsubscribeRequest, yi as RequestParams, yn as CreateMessageRequestParamsBase, yr as ListChangedOptions, yt as isJSONRPCRequest, z as STDIO_DEFAULT_MAX_BUFFER_SIZE, za as SUPPORTED_PROTOCOL_VERSIONS, zi as ServerNotification, zn as GetPromptResult, zr as MissingRequiredClientCapabilityErrorData, zt as InboundClassificationOutcome } from "./createMcpHandler-D1q2h_Yl.mjs"; | ||
| import { i as jsonSchemaValidator, n as JsonSchemaValidator, r as JsonSchemaValidatorResult, t as JsonSchemaType } from "./types-BV_484UZ.mjs"; | ||
| import { $ as ProtocolOptions, $a as OAuthClientInformation, $i as SubscriptionsListenRequestParams, $n as InitializedNotification, $r as PingRequest, $t as BooleanSchema, A as ResourceMetadata, Aa as INVALID_PARAMS, Ai as ResourceUpdatedNotificationParams, An as ElicitRequestParams, Ar as ListTasksResult, At as ProtocolErrorCode, B as STDIO_DEFAULT_MAX_BUFFER_SIZE, Ba as SUPPORTED_PROTOCOL_VERSIONS, Bi as ServerNotification, Bn as GetPromptResult, Br as MissingRequiredClientCapabilityErrorData, Bt as InboundClassificationOutcome, C as PromptCallback, Ca as UntitledMultiSelectEnumSchema, Ci as ResourceContents, Cn as CreateMessageResultWithTools, Cr as ListResourceTemplatesRequest, Ct as isTaskAugmentedRequestParams, D as RegisteredResource, Da as CLIENT_INFO_META_KEY, Di as ResourceTemplateReference, Dn as DiscoverResult, Dr as ListRootsRequest, Dt as ResourceNotFoundError, E as RegisteredPrompt, Ea as CLIENT_CAPABILITIES_META_KEY, Ei as ResourceRequestParams, En as DiscoverRequest, Er as ListResourcesResult, Et as ProtocolError, F as preloadSchemas, Fa as METHOD_NOT_FOUND, Fi as RootsListChangedNotification, Fn as EmbeddedResource, Fr as LoggingMessageNotificationParams, Ft as inputResponse, G as ProtocolEra, Ga as SdkError, Gi as SingleSelectEnumSchema, Gn as HandlerResultTypeMap, Gr as NotificationMethod, Gt as InboundModernRoute, H as serializeMessage, Ha as TRACESTATE_META_KEY, Hi as ServerResult, Hn as GetTaskPayloadResult, Hr as ModelPreferences, Ht as InboundLadderRejection, I as InMemoryTransport, Ia as PARSE_ERROR, Ii as SamplingContent, In as EmptyResult, Ir as MessageClassification, It as ElicitInputParams, J as BaseContext, Ja as SdkHttpErrorData, Ji as SubscribeRequestParams, Jn as ImageContent, Jr as NumberSchema, Jt as Annotations, K as getDisplayName, Ka as SdkErrorCode, Ki as StringSchema, Kn as Icon, Kr as NotificationParams, Kt as InboundValidationRung, L as UriTemplate, La as PROTOCOL_VERSION_META_KEY, Li as SamplingMessage, Ln as EnumSchema, Lr as MessageExtraInfo, Lt as StandardSchemaV1, M as ToolCallback, Ma as JSONRPC_VERSION, Mi as ResultTypeMap, Mn as ElicitResult, Mr as ListToolsResult, Mt as InputResponseView, N as Server, Na as LATEST_PROTOCOL_VERSION, Ni as Role, Nn as ElicitationCompleteNotification, Nr as LoggingLevel, Nt as acceptedContent, O as RegisteredResourceTemplate, Oa as DEFAULT_NEGOTIATED_PROTOCOL_VERSION, Oi as ResourceTemplateType, On as ElicitRequest, Or as ListRootsResult, Ot as UnsupportedProtocolVersionError, P as ServerOptions, Pa as LOG_LEVEL_META_KEY, Pi as Root, Pn as ElicitationCompleteNotificationParams, Pr as LoggingMessageNotification, Pt as inputRequired, Q as ProgressCallback, Qa as IdJagTokenExchangeResponse, Qi as SubscriptionsListenRequest, Qn as InitializeResult, Qr as ParseError, Qt as BlobResourceContents, R as Variables, Ra as RELATED_TASK_META_KEY, Ri as SamplingMessageContentBlock, Rn as GetPromptRequest, Rr as MetaObject, Rt as StandardSchemaV1Sync, S as McpServer, Sa as UnsupportedProtocolVersionErrorData, Si as Resource, Sn as CreateMessageResult, Sr as ListPromptsResult, St as isJSONRPCResultResponse, T as ReadResourceTemplateCallback, Ta as BAGGAGE_META_KEY, Ti as ResourceListChangedNotification, Tn as Cursor, Tr as ListResourcesRequest, Tt as MissingRequiredClientCapabilityError, U as CacheHint, Ua as checkResourceAllowed, Ui as SetLevelRequest, Un as GetTaskRequest, Ur as MultiSelectEnumSchema, Ut as InboundLegacyRoute, V as deserializeMessage, Va as TRACEPARENT_META_KEY, Vi as ServerRequest, Vn as GetTaskPayloadRequest, Vr as ModelHint, Vt as InboundHttpRequest, W as CacheScope, Wa as resourceUrlFromServerUrl, Wi as SetLevelRequestParams, Wn as GetTaskResult, Wr as Notification, Wt as InboundLegacyRouteReason, X as DEFAULT_REQUEST_TIMEOUT_MSEC, Xa as OAuthErrorCode, Xi as SubscriptionsAcknowledgedNotification, Xn as InitializeRequest, Xr as PaginatedRequestParams, Xt as AuthInfo, Y as ClientContext, Ya as OAuthError, Yi as SubscriptionFilter, Yn as Implementation, Yr as PaginatedRequest, Yt as AudioContent, Z as NotificationOptions, Za as AuthorizationServerMetadata, Zi as SubscriptionsAcknowledgedNotificationParams, Zn as InitializeRequestParams, Zr as PaginatedResult, Zt as BaseMetadata, _ as PerRequestResponseMode, _a as ToolListChangedNotification, _i as RequestMetaEnvelope, _n as ContentBlock, _r as LegacyTitledEnumSchema, _t as isInputRequiredResult, a as McpRequestContext, aa as TaskMetadata, ai as Prompt, an as CancelledNotification, ao as OAuthMetadata, ar as InternalError, at as Transport, b as CompleteResourceTemplateCallback, ba as UnsubscribeRequest, bi as RequestParams, bn as CreateMessageRequestParamsBase, br as ListChangedOptions, bt as isJSONRPCRequest, c as isLegacyRequest, ca as TaskStatusNotificationParams, ci as PromptMessage, cn as ClientNotification, co as OAuthTokens, cr as JSONArray, ct as SpecTypeName, d as ServerEvent, da as TitledMultiSelectEnumSchema, di as ReadResourceRequestParams, dn as CompatibilityCallToolResult, do as StoredOAuthClientInformation, dr as JSONRPCMessage, dt as specTypeSchemas, ea as SubscriptionsListenResult, ei as PrimitiveSchemaDefinition, en as CallToolRequest, eo as OAuthClientInformationFull, er as InputRequest, et as RequestHandlerSchemas, f as ServerEventBus, fa as TitledSingleSelectEnumSchema, fi as ReadResourceResult, fn as CompleteRequest, fo as StoredOAuthTokens, fr as JSONRPCNotification, ft as assertCompleteRequestPrompt, g as PerRequestMessageExtra, ga as ToolExecution, gi as RequestMeta, gn as CompleteResult, gr as JSONValue, gt as isInitializedNotification, h as PerRequestHTTPServerTransportOptions, ha as ToolChoice, hi as RequestId, hn as CompleteRequestResourceTemplate, hr as JSONRPCResultResponse, ht as isInitializeRequest, i as McpHttpHandler, ia as TaskCreationParams, ii as ProgressToken, in as CancelTaskResult, io as OAuthErrorResponse, ir as InputResponses, it as FetchLike, j as ResourceTemplate, ja as INVALID_REQUEST, ji as Result, jn as ElicitRequestURLParams, jr as ListToolsRequest, jt as InputRequiredSpec, k as RegisteredTool, ka as INTERNAL_ERROR, ki as ResourceUpdatedNotification, kn as ElicitRequestFormParams, kr as ListTasksRequest, kt as UrlElicitationRequiredError, l as legacyStatelessFallback, la as TextContent, li as PromptReference, ln as ClientRequest, lo as OpenIdProviderDiscoveryMetadata, lr as JSONObject, lt as SpecTypes, m as PerRequestHTTPServerTransport, ma as ToolAnnotations, mi as Request$1, mn as CompleteRequestPrompt, mr as JSONRPCResponse, mt as isCallToolResult, n as LegacyHttpHandler, na as Task, ni as ProgressNotification, nn as CallToolResult, no as OAuthClientMetadata, nr as InputRequiredResult, nt as RequestStateAccessor, o as McpServerFactory, oa as TaskStatus, oi as PromptArgument, on as CancelledNotificationParams, oo as OAuthProtectedResourceMetadata, or as InvalidParamsError, ot as TransportSendOptions, p as ServerNotifier, pa as Tool, pi as RelatedTaskMetadata, pn as CompleteRequestParams, pr as JSONRPCRequest, pt as assertCompleteRequestResourceTemplate, q as isJsonContentType, qa as SdkHttpError, qi as SubscribeRequest, qn as Icons, qr as NotificationTypeMap, qt as classifyInboundRequest, r as McpHandlerRequestOptions, ra as TaskAugmentedRequestParams, ri as ProgressNotificationParams, rn as CancelTaskRequest, ro as OAuthClientRegistrationError, rr as InputResponse, rt as ServerContext, s as createMcpHandler, sa as TaskStatusNotification, si as PromptListChangedNotification, sn as ClientCapabilities, so as OAuthTokenRevocationRequest, sr as InvalidRequestError, st as createFetchWithInit, t as CreateMcpHandlerOptions, ta as SubscriptionsListenResultMeta, ti as Progress, tn as CallToolRequestParams, to as OAuthClientInformationMixed, tr as InputRequests, tt as RequestOptions, u as InMemoryServerEventBus, ua as TextResourceContents, ui as ReadResourceRequest, un as ClientResult, uo as OpenIdProviderMetadata, ur as JSONRPCErrorResponse, ut as isSpecType, v as AnyToolHandler, va as ToolResultContent, vi as RequestMetaObject, vn as CreateMessageRequest, vr as ListChangedCallback, vt as isJSONRPCErrorResponse, w as ReadResourceCallback, wa as UntitledSingleSelectEnumSchema, wi as ResourceLink, wn as CreateTaskResult, wr as ListResourceTemplatesResult, wt as parseJSONRPCMessage, x as ListResourcesCallback, xa as UnsubscribeRequestParams, xi as RequestTypeMap, xn as CreateMessageRequestParamsWithTools, xr as ListPromptsRequest, xt as isJSONRPCResponse, y as BaseToolCallback, ya as ToolUseContent, yi as RequestMethod, yn as CreateMessageRequestParams, yr as ListChangedHandlers, yt as isJSONRPCNotification, z as ReadBuffer, za as SUBSCRIPTION_ID_META_KEY, zi as ServerCapabilities, zn as GetPromptRequestParams, zr as MethodNotFoundError, zt as StandardSchemaWithJSON } from "./createMcpHandler-D93NefGZ.mjs"; | ||
| import { i as jsonSchemaValidator, n as JsonSchemaValidator, r as JsonSchemaValidatorResult, t as JsonSchemaType } from "./types-mS0yxCL0.mjs"; | ||
@@ -731,3 +731,3 @@ //#region src/server/completable.d.ts | ||
| //#endregion | ||
| export { Annotations, type AnyToolHandler, AudioContent, AuthInfo, type AuthMetadataOptions, type AuthorizationServerMetadata, BAGGAGE_META_KEY, type BaseContext, BaseMetadata, type BaseToolCallback, type BearerAuthOptions, BlobResourceContents, BooleanSchema, CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, type CacheHint, type CacheScope, CallToolRequest, CallToolRequestParams, CallToolResult, CancelTaskRequest, CancelTaskResult, CancelledNotification, CancelledNotificationParams, ClientCapabilities, type ClientContext, ClientNotification, ClientRequest, ClientResult, CompatibilityCallToolResult, type CompletableSchema, type CompleteCallback, CompleteRequest, CompleteRequestParams, CompleteRequestPrompt, CompleteRequestResourceTemplate, type CompleteResourceTemplateCallback, CompleteResult, ContentBlock, type CreateMcpHandlerOptions, CreateMessageRequest, CreateMessageRequestParams, CreateMessageRequestParamsBase, CreateMessageRequestParamsWithTools, CreateMessageResult, CreateMessageResultWithTools, CreateTaskResult, Cursor, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, DEFAULT_REQUEST_TIMEOUT_MSEC, DiscoverRequest, DiscoverResult, type ElicitInputParams, ElicitRequest, ElicitRequestFormParams, ElicitRequestParams, ElicitRequestURLParams, ElicitResult, ElicitationCompleteNotification, ElicitationCompleteNotificationParams, EmbeddedResource, EmptyResult, EnumSchema, type EventId, type EventStore, type FetchLike, GetPromptRequest, GetPromptRequestParams, GetPromptResult, GetTaskPayloadRequest, GetTaskPayloadResult, GetTaskRequest, GetTaskResult, type HandleRequestOptions, HandlerResultTypeMap, type HostHeaderValidationResult, INTERNAL_ERROR, INVALID_PARAMS, INVALID_REQUEST, Icon, Icons, type IdJagTokenExchangeResponse, ImageContent, Implementation, InMemoryServerEventBus, InMemoryTransport, type InboundClassificationOutcome, type InboundHttpRequest, type InboundLadderRejection, type InboundLegacyRoute, type InboundLegacyRouteReason, type InboundModernRoute, type InboundValidationRung, InitializeRequest, InitializeRequestParams, InitializeResult, InitializedNotification, InputRequest, InputRequests, InputRequiredResult, type InputRequiredSpec, InputResponse, type InputResponseView, InputResponses, InternalError, InvalidParamsError, InvalidRequestError, JSONArray, JSONObject, JSONRPCErrorResponse, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONRPCResultResponse, JSONRPC_VERSION, JSONValue, type JsonSchemaType, type JsonSchemaValidator, type JsonSchemaValidatorResult, LATEST_PROTOCOL_VERSION, LOG_LEVEL_META_KEY, type LegacyHttpHandler, LegacyTitledEnumSchema, ListChangedCallback, ListChangedHandlers, ListChangedOptions, ListPromptsRequest, ListPromptsResult, ListResourceTemplatesRequest, ListResourceTemplatesResult, type ListResourcesCallback, ListResourcesRequest, ListResourcesResult, ListRootsRequest, ListRootsResult, ListTasksRequest, ListTasksResult, ListToolsRequest, ListToolsResult, LoggingLevel, LoggingMessageNotification, LoggingMessageNotificationParams, METHOD_NOT_FOUND, type McpHandlerRequestOptions, type McpHttpHandler, type McpRequestContext, McpServer, type McpServerFactory, MessageClassification, MessageExtraInfo, MetaObject, MethodNotFoundError, MissingRequiredClientCapabilityError, MissingRequiredClientCapabilityErrorData, ModelHint, ModelPreferences, MultiSelectEnumSchema, Notification, NotificationMethod, type NotificationOptions, NotificationParams, NotificationTypeMap, NumberSchema, type OAuthClientInformation, type OAuthClientInformationFull, type OAuthClientInformationMixed, type OAuthClientMetadata, type OAuthClientRegistrationError, OAuthError, OAuthErrorCode, type OAuthErrorResponse, type OAuthMetadata, type OAuthProtectedResourceMetadata, type OAuthTokenRevocationRequest, type OAuthTokenVerifier, type OAuthTokens, type OpenIdProviderDiscoveryMetadata, type OpenIdProviderMetadata, type OriginValidationResult, PARSE_ERROR, PROTOCOL_VERSION_META_KEY, PaginatedRequest, PaginatedRequestParams, PaginatedResult, ParseError, PerRequestHTTPServerTransport, type PerRequestHTTPServerTransportOptions, type PerRequestMessageExtra, type PerRequestResponseMode, PingRequest, PrimitiveSchemaDefinition, Progress, type ProgressCallback, ProgressNotification, ProgressNotificationParams, ProgressToken, Prompt, PromptArgument, type PromptCallback, PromptListChangedNotification, PromptMessage, PromptReference, type ProtocolEra, ProtocolError, ProtocolErrorCode, type ProtocolOptions, RELATED_TASK_META_KEY, ReadBuffer, type ReadResourceCallback, ReadResourceRequest, ReadResourceRequestParams, ReadResourceResult, type ReadResourceTemplateCallback, type RegisteredPrompt, type RegisteredResource, type RegisteredResourceTemplate, type RegisteredTool, RelatedTaskMetadata, Request$1 as Request, type RequestHandlerSchemas, RequestId, RequestMeta, RequestMetaEnvelope, RequestMetaObject, RequestMethod, type RequestOptions, RequestParams, type RequestStateAccessor, type RequestStateCodec, type RequestStateCodecOptions, RequestTypeMap, Resource, ResourceContents, ResourceLink, ResourceListChangedNotification, type ResourceMetadata, ResourceNotFoundError, ResourceRequestParams, ResourceTemplate, ResourceTemplateReference, ResourceTemplateType, ResourceUpdatedNotification, ResourceUpdatedNotificationParams, Result, ResultTypeMap, Role, Root, RootsListChangedNotification, STDIO_DEFAULT_MAX_BUFFER_SIZE, SUBSCRIPTION_ID_META_KEY, SUPPORTED_PROTOCOL_VERSIONS, SamplingContent, SamplingMessage, SamplingMessageContentBlock, SdkError, SdkErrorCode, SdkHttpError, type SdkHttpErrorData, Server, ServerCapabilities, type ServerContext, type ServerEvent, type ServerEventBus, ServerNotification, type ServerNotifier, type ServerOptions, ServerRequest, ServerResult, SetLevelRequest, SetLevelRequestParams, SingleSelectEnumSchema, type SpecTypeName, type SpecTypes, type StandardSchemaV1, type StandardSchemaV1Sync, type StandardSchemaWithJSON, type StoredOAuthClientInformation, type StoredOAuthTokens, type StreamId, StringSchema, SubscribeRequest, SubscribeRequestParams, SubscriptionFilter, SubscriptionsAcknowledgedNotification, SubscriptionsAcknowledgedNotificationParams, SubscriptionsListenRequest, SubscriptionsListenRequestParams, SubscriptionsListenResult, SubscriptionsListenResultMeta, TRACEPARENT_META_KEY, TRACESTATE_META_KEY, Task, TaskAugmentedRequestParams, TaskCreationParams, TaskMetadata, TaskStatus, TaskStatusNotification, TaskStatusNotificationParams, TextContent, TextResourceContents, TitledMultiSelectEnumSchema, TitledSingleSelectEnumSchema, Tool, ToolAnnotations, type ToolCallback, ToolChoice, ToolExecution, ToolListChangedNotification, ToolResultContent, ToolUseContent, type Transport, type TransportSendOptions, UnsubscribeRequest, UnsubscribeRequestParams, UnsupportedProtocolVersionError, UnsupportedProtocolVersionErrorData, UntitledMultiSelectEnumSchema, UntitledSingleSelectEnumSchema, UriTemplate, UrlElicitationRequiredError, type Variables, WebStandardStreamableHTTPServerTransport, type WebStandardStreamableHTTPServerTransportOptions, acceptedContent, assertCompleteRequestPrompt, assertCompleteRequestResourceTemplate, bearerAuthChallengeResponse, buildOAuthProtectedResourceMetadata, checkResourceAllowed, classifyInboundRequest, completable, createFetchWithInit, createMcpHandler, createRequestStateCodec, deserializeMessage, fromJsonSchema, getDisplayName, getOAuthProtectedResourceMetadataUrl, hostHeaderValidationResponse, inputRequired, inputResponse, isCallToolResult, isCompletable, isInitializeRequest, isInitializedNotification, isInputRequiredResult, isJSONRPCErrorResponse, isJSONRPCNotification, isJSONRPCRequest, isJSONRPCResponse, isJSONRPCResultResponse, isJsonContentType, isLegacyRequest, isSpecType, isTaskAugmentedRequestParams, type jsonSchemaValidator, legacyStatelessFallback, localhostAllowedHostnames, localhostAllowedOrigins, oauthMetadataResponse, originValidationResponse, parseJSONRPCMessage, requireBearerAuth, resourceUrlFromServerUrl, serializeMessage, specTypeSchemas, validateHostHeader, validateOriginHeader, verifyBearerToken }; | ||
| export { Annotations, type AnyToolHandler, AudioContent, AuthInfo, type AuthMetadataOptions, type AuthorizationServerMetadata, BAGGAGE_META_KEY, type BaseContext, BaseMetadata, type BaseToolCallback, type BearerAuthOptions, BlobResourceContents, BooleanSchema, CLIENT_CAPABILITIES_META_KEY, CLIENT_INFO_META_KEY, type CacheHint, type CacheScope, CallToolRequest, CallToolRequestParams, CallToolResult, CancelTaskRequest, CancelTaskResult, CancelledNotification, CancelledNotificationParams, ClientCapabilities, type ClientContext, ClientNotification, ClientRequest, ClientResult, CompatibilityCallToolResult, type CompletableSchema, type CompleteCallback, CompleteRequest, CompleteRequestParams, CompleteRequestPrompt, CompleteRequestResourceTemplate, type CompleteResourceTemplateCallback, CompleteResult, ContentBlock, type CreateMcpHandlerOptions, CreateMessageRequest, CreateMessageRequestParams, CreateMessageRequestParamsBase, CreateMessageRequestParamsWithTools, CreateMessageResult, CreateMessageResultWithTools, CreateTaskResult, Cursor, DEFAULT_NEGOTIATED_PROTOCOL_VERSION, DEFAULT_REQUEST_TIMEOUT_MSEC, DiscoverRequest, DiscoverResult, type ElicitInputParams, ElicitRequest, ElicitRequestFormParams, ElicitRequestParams, ElicitRequestURLParams, ElicitResult, ElicitationCompleteNotification, ElicitationCompleteNotificationParams, EmbeddedResource, EmptyResult, EnumSchema, type EventId, type EventStore, type FetchLike, GetPromptRequest, GetPromptRequestParams, GetPromptResult, GetTaskPayloadRequest, GetTaskPayloadResult, GetTaskRequest, GetTaskResult, type HandleRequestOptions, HandlerResultTypeMap, type HostHeaderValidationResult, INTERNAL_ERROR, INVALID_PARAMS, INVALID_REQUEST, Icon, Icons, type IdJagTokenExchangeResponse, ImageContent, Implementation, InMemoryServerEventBus, InMemoryTransport, type InboundClassificationOutcome, type InboundHttpRequest, type InboundLadderRejection, type InboundLegacyRoute, type InboundLegacyRouteReason, type InboundModernRoute, type InboundValidationRung, InitializeRequest, InitializeRequestParams, InitializeResult, InitializedNotification, InputRequest, InputRequests, InputRequiredResult, type InputRequiredSpec, InputResponse, type InputResponseView, InputResponses, InternalError, InvalidParamsError, InvalidRequestError, JSONArray, JSONObject, JSONRPCErrorResponse, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONRPCResultResponse, JSONRPC_VERSION, JSONValue, type JsonSchemaType, type JsonSchemaValidator, type JsonSchemaValidatorResult, LATEST_PROTOCOL_VERSION, LOG_LEVEL_META_KEY, type LegacyHttpHandler, LegacyTitledEnumSchema, ListChangedCallback, ListChangedHandlers, ListChangedOptions, ListPromptsRequest, ListPromptsResult, ListResourceTemplatesRequest, ListResourceTemplatesResult, type ListResourcesCallback, ListResourcesRequest, ListResourcesResult, ListRootsRequest, ListRootsResult, ListTasksRequest, ListTasksResult, ListToolsRequest, ListToolsResult, LoggingLevel, LoggingMessageNotification, LoggingMessageNotificationParams, METHOD_NOT_FOUND, type McpHandlerRequestOptions, type McpHttpHandler, type McpRequestContext, McpServer, type McpServerFactory, MessageClassification, MessageExtraInfo, MetaObject, MethodNotFoundError, MissingRequiredClientCapabilityError, MissingRequiredClientCapabilityErrorData, ModelHint, ModelPreferences, MultiSelectEnumSchema, Notification, NotificationMethod, type NotificationOptions, NotificationParams, NotificationTypeMap, NumberSchema, type OAuthClientInformation, type OAuthClientInformationFull, type OAuthClientInformationMixed, type OAuthClientMetadata, type OAuthClientRegistrationError, OAuthError, OAuthErrorCode, type OAuthErrorResponse, type OAuthMetadata, type OAuthProtectedResourceMetadata, type OAuthTokenRevocationRequest, type OAuthTokenVerifier, type OAuthTokens, type OpenIdProviderDiscoveryMetadata, type OpenIdProviderMetadata, type OriginValidationResult, PARSE_ERROR, PROTOCOL_VERSION_META_KEY, PaginatedRequest, PaginatedRequestParams, PaginatedResult, ParseError, PerRequestHTTPServerTransport, type PerRequestHTTPServerTransportOptions, type PerRequestMessageExtra, type PerRequestResponseMode, PingRequest, PrimitiveSchemaDefinition, Progress, type ProgressCallback, ProgressNotification, ProgressNotificationParams, ProgressToken, Prompt, PromptArgument, type PromptCallback, PromptListChangedNotification, PromptMessage, PromptReference, type ProtocolEra, ProtocolError, ProtocolErrorCode, type ProtocolOptions, RELATED_TASK_META_KEY, ReadBuffer, type ReadResourceCallback, ReadResourceRequest, ReadResourceRequestParams, ReadResourceResult, type ReadResourceTemplateCallback, type RegisteredPrompt, type RegisteredResource, type RegisteredResourceTemplate, type RegisteredTool, RelatedTaskMetadata, Request$1 as Request, type RequestHandlerSchemas, RequestId, RequestMeta, RequestMetaEnvelope, RequestMetaObject, RequestMethod, type RequestOptions, RequestParams, type RequestStateAccessor, type RequestStateCodec, type RequestStateCodecOptions, RequestTypeMap, Resource, ResourceContents, ResourceLink, ResourceListChangedNotification, type ResourceMetadata, ResourceNotFoundError, ResourceRequestParams, ResourceTemplate, ResourceTemplateReference, ResourceTemplateType, ResourceUpdatedNotification, ResourceUpdatedNotificationParams, Result, ResultTypeMap, Role, Root, RootsListChangedNotification, STDIO_DEFAULT_MAX_BUFFER_SIZE, SUBSCRIPTION_ID_META_KEY, SUPPORTED_PROTOCOL_VERSIONS, SamplingContent, SamplingMessage, SamplingMessageContentBlock, SdkError, SdkErrorCode, SdkHttpError, type SdkHttpErrorData, Server, ServerCapabilities, type ServerContext, type ServerEvent, type ServerEventBus, ServerNotification, type ServerNotifier, type ServerOptions, ServerRequest, ServerResult, SetLevelRequest, SetLevelRequestParams, SingleSelectEnumSchema, type SpecTypeName, type SpecTypes, type StandardSchemaV1, type StandardSchemaV1Sync, type StandardSchemaWithJSON, type StoredOAuthClientInformation, type StoredOAuthTokens, type StreamId, StringSchema, SubscribeRequest, SubscribeRequestParams, SubscriptionFilter, SubscriptionsAcknowledgedNotification, SubscriptionsAcknowledgedNotificationParams, SubscriptionsListenRequest, SubscriptionsListenRequestParams, SubscriptionsListenResult, SubscriptionsListenResultMeta, TRACEPARENT_META_KEY, TRACESTATE_META_KEY, Task, TaskAugmentedRequestParams, TaskCreationParams, TaskMetadata, TaskStatus, TaskStatusNotification, TaskStatusNotificationParams, TextContent, TextResourceContents, TitledMultiSelectEnumSchema, TitledSingleSelectEnumSchema, Tool, ToolAnnotations, type ToolCallback, ToolChoice, ToolExecution, ToolListChangedNotification, ToolResultContent, ToolUseContent, type Transport, type TransportSendOptions, UnsubscribeRequest, UnsubscribeRequestParams, UnsupportedProtocolVersionError, UnsupportedProtocolVersionErrorData, UntitledMultiSelectEnumSchema, UntitledSingleSelectEnumSchema, UriTemplate, UrlElicitationRequiredError, type Variables, WebStandardStreamableHTTPServerTransport, type WebStandardStreamableHTTPServerTransportOptions, acceptedContent, assertCompleteRequestPrompt, assertCompleteRequestResourceTemplate, bearerAuthChallengeResponse, buildOAuthProtectedResourceMetadata, checkResourceAllowed, classifyInboundRequest, completable, createFetchWithInit, createMcpHandler, createRequestStateCodec, deserializeMessage, fromJsonSchema, getDisplayName, getOAuthProtectedResourceMetadataUrl, hostHeaderValidationResponse, inputRequired, inputResponse, isCallToolResult, isCompletable, isInitializeRequest, isInitializedNotification, isInputRequiredResult, isJSONRPCErrorResponse, isJSONRPCNotification, isJSONRPCRequest, isJSONRPCResponse, isJSONRPCResultResponse, isJsonContentType, isLegacyRequest, isSpecType, isTaskAugmentedRequestParams, type jsonSchemaValidator, legacyStatelessFallback, localhostAllowedHostnames, localhostAllowedOrigins, oauthMetadataResponse, originValidationResponse, parseJSONRPCMessage, preloadSchemas, requireBearerAuth, resourceUrlFromServerUrl, serializeMessage, specTypeSchemas, validateHostHeader, validateOriginHeader, verifyBearerToken }; | ||
| //# sourceMappingURL=index.d.mts.map |
| const require_chunk = require('./chunk-Bnu9O96Y.cjs'); | ||
| const require_ajvProvider = require('./ajvProvider-7Wy3krRF.cjs'); | ||
| const require_ajvProvider = require('./ajvProvider-Brn-Q2J_.cjs'); | ||
| let node_process = require("node:process"); | ||
@@ -4,0 +4,0 @@ node_process = require_chunk.__toESM(node_process); |
@@ -1,3 +0,3 @@ | ||
| import { n as AjvJsonSchemaValidator } from "./ajvProvider-BAeyH14y.cjs"; | ||
| import { n as AjvJsonSchemaValidator } from "./ajvProvider-B_4czhCS.cjs"; | ||
| import process from "node:process"; | ||
| export { AjvJsonSchemaValidator as DefaultJsonSchemaValidator, process }; |
@@ -1,3 +0,3 @@ | ||
| import { n as AjvJsonSchemaValidator } from "./ajvProvider-Bk0uZgeB.mjs"; | ||
| import { n as AjvJsonSchemaValidator } from "./ajvProvider-BdSo9BII.mjs"; | ||
| import process from "node:process"; | ||
| export { AjvJsonSchemaValidator as DefaultJsonSchemaValidator, process }; |
@@ -1,4 +0,4 @@ | ||
| import { n as AjvJsonSchemaValidator } from "./ajvProvider-Cpjfhu7O.mjs"; | ||
| import { n as AjvJsonSchemaValidator } from "./ajvProvider-CplOkyLC.mjs"; | ||
| import process from "node:process"; | ||
| export { AjvJsonSchemaValidator as DefaultJsonSchemaValidator, process }; |
@@ -1,5 +0,12 @@ | ||
| const require_cfWorkerProvider = require('./cfWorkerProvider-Djgwc46-.cjs'); | ||
| const require_src = require('./src-D9A7ArDn.cjs'); | ||
| const require_cfWorkerProvider = require('./cfWorkerProvider-ojcZaap3.cjs'); | ||
| //#region src/shimsWorkerd.ts | ||
| /** | ||
| * Cloudflare Workers runtime shims for server package | ||
| * | ||
| * This file is selected via package.json export conditions when running in workerd. | ||
| */ | ||
| require_src.preloadSchemas(); | ||
| /** | ||
| * Stub process object for non-Node.js environments. | ||
@@ -6,0 +13,0 @@ * StdioServerTransport is not supported in Cloudflare Workers/browser environments. |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"shimsWorkerd.cjs","names":[],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":["/**\n * Cloudflare Workers runtime shims for server package\n *\n * This file is selected via package.json export conditions when running in workerd.\n */\nexport { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator } from '@modelcontextprotocol/core-internal/validators/cfWorker';\n\n/**\n * Stub process object for non-Node.js environments.\n * StdioServerTransport is not supported in Cloudflare Workers/browser environments.\n */\nfunction notSupported(): never {\n throw new Error('StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.');\n}\n\nexport const process = {\n get stdin(): never {\n return notSupported();\n },\n get stdout(): never {\n return notSupported();\n }\n};\n"],"mappings":";;;;;;;AAWA,SAAS,eAAsB;AAC3B,OAAM,IAAI,MAAM,wGAAwG;;AAG5H,MAAa,UAAU;CACnB,IAAI,QAAe;AACf,SAAO,cAAc;;CAEzB,IAAI,SAAgB;AAChB,SAAO,cAAc;;CAE5B"} | ||
| {"version":3,"file":"shimsWorkerd.cjs","names":["preloadSchemas"],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":["/**\n * Cloudflare Workers runtime shims for server package\n *\n * This file is selected via package.json export conditions when running in workerd.\n */\nimport { preloadSchemas } from '@modelcontextprotocol/core-internal';\n\nexport { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator } from '@modelcontextprotocol/core-internal/validators/cfWorker';\n\n// Platform asymmetry: isolate platforms like workerd evaluate module scope\n// during deployment/isolate warm-up, outside any request's billed CPU, while\n// lazy construction would land inside the first request each fresh isolate\n// serves. The Node and browser shims stay lazy — there, module evaluation is\n// process/page startup and boot latency is the cost that matters.\npreloadSchemas();\n\n/**\n * Stub process object for non-Node.js environments.\n * StdioServerTransport is not supported in Cloudflare Workers/browser environments.\n */\nfunction notSupported(): never {\n throw new Error('StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.');\n}\n\nexport const process = {\n get stdin(): never {\n return notSupported();\n },\n get stdout(): never {\n return notSupported();\n }\n};\n"],"mappings":";;;;;;;;;AAcAA,4BAAgB;;;;;AAMhB,SAAS,eAAsB;AAC3B,OAAM,IAAI,MAAM,wGAAwG;;AAG5H,MAAa,UAAU;CACnB,IAAI,QAAe;AACf,SAAO,cAAc;;CAEzB,IAAI,SAAgB;AAChB,SAAO,cAAc;;CAE5B"} |
@@ -1,5 +0,4 @@ | ||
| import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-B7lHA3P9.cjs"; | ||
| import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-D9GAttn8.cjs"; | ||
| //#region src/shimsWorkerd.d.ts | ||
| declare const process: { | ||
@@ -6,0 +5,0 @@ readonly stdin: never; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"shimsWorkerd.d.cts","names":[],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":[],"mappings":";;;;cAea"} | ||
| {"version":3,"file":"shimsWorkerd.d.cts","names":[],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":[],"mappings":";;;cAwBa;;EAAA,SAAA,MAOZ,EAAA,KAAA"} |
@@ -1,5 +0,4 @@ | ||
| import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-Cj-YchTJ.mjs"; | ||
| import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-BYRW5af5.mjs"; | ||
| //#region src/shimsWorkerd.d.ts | ||
| declare const process: { | ||
@@ -6,0 +5,0 @@ readonly stdin: never; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"shimsWorkerd.d.mts","names":[],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":[],"mappings":";;;;cAea"} | ||
| {"version":3,"file":"shimsWorkerd.d.mts","names":[],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":[],"mappings":";;;cAwBa;;EAAA,SAAA,MAOZ,EAAA,KAAA"} |
@@ -1,5 +0,12 @@ | ||
| import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-BDC2rVl3.mjs"; | ||
| import { n as preloadSchemas } from "./src-D5Nfqtoz.mjs"; | ||
| import { t as CfWorkerJsonSchemaValidator } from "./cfWorkerProvider-Bd-iTHAF.mjs"; | ||
| //#region src/shimsWorkerd.ts | ||
| /** | ||
| * Cloudflare Workers runtime shims for server package | ||
| * | ||
| * This file is selected via package.json export conditions when running in workerd. | ||
| */ | ||
| preloadSchemas(); | ||
| /** | ||
| * Stub process object for non-Node.js environments. | ||
@@ -6,0 +13,0 @@ * StdioServerTransport is not supported in Cloudflare Workers/browser environments. |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"shimsWorkerd.mjs","names":[],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":["/**\n * Cloudflare Workers runtime shims for server package\n *\n * This file is selected via package.json export conditions when running in workerd.\n */\nexport { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator } from '@modelcontextprotocol/core-internal/validators/cfWorker';\n\n/**\n * Stub process object for non-Node.js environments.\n * StdioServerTransport is not supported in Cloudflare Workers/browser environments.\n */\nfunction notSupported(): never {\n throw new Error('StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.');\n}\n\nexport const process = {\n get stdin(): never {\n return notSupported();\n },\n get stdout(): never {\n return notSupported();\n }\n};\n"],"mappings":";;;;;;;AAWA,SAAS,eAAsB;AAC3B,OAAM,IAAI,MAAM,wGAAwG;;AAG5H,MAAa,UAAU;CACnB,IAAI,QAAe;AACf,SAAO,cAAc;;CAEzB,IAAI,SAAgB;AAChB,SAAO,cAAc;;CAE5B"} | ||
| {"version":3,"file":"shimsWorkerd.mjs","names":[],"sources":["../src/shimsWorkerd.ts"],"sourcesContent":["/**\n * Cloudflare Workers runtime shims for server package\n *\n * This file is selected via package.json export conditions when running in workerd.\n */\nimport { preloadSchemas } from '@modelcontextprotocol/core-internal';\n\nexport { CfWorkerJsonSchemaValidator as DefaultJsonSchemaValidator } from '@modelcontextprotocol/core-internal/validators/cfWorker';\n\n// Platform asymmetry: isolate platforms like workerd evaluate module scope\n// during deployment/isolate warm-up, outside any request's billed CPU, while\n// lazy construction would land inside the first request each fresh isolate\n// serves. The Node and browser shims stay lazy — there, module evaluation is\n// process/page startup and boot latency is the cost that matters.\npreloadSchemas();\n\n/**\n * Stub process object for non-Node.js environments.\n * StdioServerTransport is not supported in Cloudflare Workers/browser environments.\n */\nfunction notSupported(): never {\n throw new Error('StdioServerTransport is not supported in this environment. Use StreamableHTTPServerTransport instead.');\n}\n\nexport const process = {\n get stdin(): never {\n return notSupported();\n },\n get stdout(): never {\n return notSupported();\n }\n};\n"],"mappings":";;;;;;;;;AAcA,gBAAgB;;;;;AAMhB,SAAS,eAAsB;AAC3B,OAAM,IAAI,MAAM,wGAAwG;;AAG5H,MAAa,UAAU;CACnB,IAAI,QAAe;AACf,SAAO,cAAc;;CAEzB,IAAI,SAAgB;AAChB,SAAO,cAAc;;CAE5B"} |
+36
-35
| const require_chunk = require('./chunk-Bnu9O96Y.cjs'); | ||
| const require_mcp = require('./mcp-VMtm_ePi.cjs'); | ||
| const require_mcp = require('./mcp-CzU40gwu.cjs'); | ||
| const require_src = require('./src-D9A7ArDn.cjs'); | ||
| let _modelcontextprotocol_server__shims = require("@modelcontextprotocol/server/_shims"); | ||
@@ -25,3 +26,3 @@ | ||
| this._stdout = _stdout; | ||
| this._readBuffer = new require_mcp.ReadBuffer({ maxBufferSize: options?.maxBufferSize }); | ||
| this._readBuffer = new require_src.ReadBuffer({ maxBufferSize: options?.maxBufferSize }); | ||
| } | ||
@@ -79,3 +80,3 @@ onclose; | ||
| return new Promise((resolve, reject) => { | ||
| const json = require_mcp.serializeMessage(message); | ||
| const json = require_src.serializeMessage(message); | ||
| let settled = false; | ||
@@ -140,3 +141,3 @@ const onError = (error) => { | ||
| async send(message, options) { | ||
| if (require_mcp.isJSONRPCResultResponse(message) || require_mcp.isJSONRPCErrorResponse(message)) { | ||
| if (require_src.isJSONRPCResultResponse(message) || require_src.isJSONRPCErrorResponse(message)) { | ||
| const { id } = message; | ||
@@ -155,4 +156,4 @@ if (id !== void 0) this._settle(id); | ||
| if (this._closed) return; | ||
| if (require_mcp.isJSONRPCRequest(message)) this._pendingRequests.add(message.id); | ||
| else if (require_mcp.isJSONRPCNotification(message) && message.method === "notifications/cancelled") { | ||
| if (require_src.isJSONRPCRequest(message)) this._pendingRequests.add(message.id); | ||
| else if (require_src.isJSONRPCNotification(message) && message.method === "notifications/cancelled") { | ||
| const cancelledId = message.params?.requestId; | ||
@@ -216,3 +217,3 @@ if (cancelledId !== void 0) this._settle(cancelledId); | ||
| const params = message.params; | ||
| if (message.method === "initialize" && !require_mcp.carriesValidModernEnvelopeClaim(params)) { | ||
| if (message.method === "initialize" && !require_src.carriesValidModernEnvelopeClaim(params)) { | ||
| const requestedVersion = params !== null && typeof params === "object" && typeof params.protocolVersion === "string" ? params.protocolVersion : void 0; | ||
@@ -225,8 +226,8 @@ return { | ||
| } | ||
| if (!require_mcp.hasEnvelopeClaim(params)) return { | ||
| if (!require_src.hasEnvelopeClaim(params)) return { | ||
| kind: "legacy", | ||
| reason: "no-claim" | ||
| }; | ||
| const meta = require_mcp.requestMetaOf(params); | ||
| const firstIssue = (meta === void 0 ? [] : require_mcp.validateEnvelopeMeta(meta))[0]; | ||
| const meta = require_src.requestMetaOf(params); | ||
| const firstIssue = (meta === void 0 ? [] : require_src.validateEnvelopeMeta(meta))[0]; | ||
| if (firstIssue !== void 0) return { | ||
@@ -236,4 +237,4 @@ kind: "invalid-envelope", | ||
| }; | ||
| const claimedVersion = require_mcp.envelopeClaimVersion(params); | ||
| if (claimedVersion === void 0 || !require_mcp.SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) return { | ||
| const claimedVersion = require_src.envelopeClaimVersion(params); | ||
| if (claimedVersion === void 0 || !require_src.SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) return { | ||
| kind: "unsupported-revision", | ||
@@ -307,3 +308,3 @@ requested: claimedVersion ?? "unknown" | ||
| const modernOutboundIntercept = (message) => { | ||
| if (!require_mcp.isJSONRPCNotification(message)) return void 0; | ||
| if (!require_src.isJSONRPCNotification(message)) return void 0; | ||
| const routed = listenRouter.routeOutbound(message); | ||
@@ -323,9 +324,9 @@ if (routed === "passthrough") return void 0; | ||
| const tryServeListen = async (message) => { | ||
| if (require_mcp.isJSONRPCRequest(message) && message.method === "subscriptions/listen") { | ||
| const meta = require_mcp.requestMetaOf(message.params); | ||
| const issue = require_mcp.hasEnvelopeClaim(message.params) ? (meta === void 0 ? [] : require_mcp.validateEnvelopeMeta(meta))[0] : { | ||
| if (require_src.isJSONRPCRequest(message) && message.method === "subscriptions/listen") { | ||
| const meta = require_src.requestMetaOf(message.params); | ||
| const issue = require_src.hasEnvelopeClaim(message.params) ? (meta === void 0 ? [] : require_src.validateEnvelopeMeta(meta))[0] : { | ||
| key: "_meta", | ||
| problem: "the per-request envelope is required on protocol revision 2026-07-28" | ||
| }; | ||
| const claimedVersion = require_mcp.envelopeClaimVersion(message.params); | ||
| const claimedVersion = require_src.envelopeClaimVersion(message.params); | ||
| let reply; | ||
@@ -340,5 +341,5 @@ if (issue !== void 0) reply = { | ||
| }; | ||
| else if (claimedVersion === void 0 || !require_mcp.SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) { | ||
| const error = new require_mcp.UnsupportedProtocolVersionError({ | ||
| supported: [...require_mcp.SUPPORTED_MODERN_PROTOCOL_VERSIONS], | ||
| else if (claimedVersion === void 0 || !require_src.SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) { | ||
| const error = new require_src.UnsupportedProtocolVersionError({ | ||
| supported: [...require_src.SUPPORTED_MODERN_PROTOCOL_VERSIONS], | ||
| requested: claimedVersion ?? "unknown" | ||
@@ -363,3 +364,3 @@ }); | ||
| } | ||
| if (require_mcp.isJSONRPCNotification(message) && message.method === "notifications/cancelled") { | ||
| if (require_src.isJSONRPCNotification(message) && message.method === "notifications/cancelled") { | ||
| const cancelledId = message.params?.requestId; | ||
@@ -372,7 +373,7 @@ if (cancelledId !== void 0 && listenRouter.cancel(cancelledId)) return true; | ||
| const answerLegacyRejection = (request, reason, requestedVersion) => { | ||
| const rejection = require_mcp.modernOnlyStrictRejection({ | ||
| const rejection = require_src.modernOnlyStrictRejection({ | ||
| kind: "legacy", | ||
| reason, | ||
| ...requestedVersion !== void 0 && { requestedVersion } | ||
| }, require_mcp.SUPPORTED_MODERN_PROTOCOL_VERSIONS); | ||
| }, require_src.SUPPORTED_MODERN_PROTOCOL_VERSIONS); | ||
| if (rejection === void 0) return Promise.resolve(); | ||
@@ -390,4 +391,4 @@ reportError(/* @__PURE__ */ new Error(`Rejected 2025-era request on a modern-only stdio connection (${rejection.cell}): ${rejection.message}`)); | ||
| if (era === "modern") { | ||
| require_mcp.setNegotiatedProtocolVersion(server, revision); | ||
| require_mcp.installModernOnlyHandlers(server, require_mcp.SUPPORTED_MODERN_PROTOCOL_VERSIONS); | ||
| require_src.setNegotiatedProtocolVersion(server, revision); | ||
| require_mcp.installModernOnlyHandlers(server, require_src.SUPPORTED_MODERN_PROTOCOL_VERSIONS); | ||
| listenRouter.setServerCapabilities(server.getCapabilities()); | ||
@@ -418,3 +419,3 @@ } | ||
| if (state.phase === "pinned") { | ||
| if (state.era === "modern" && require_mcp.isJSONRPCRequest(message) && message.method === "initialize" && !require_mcp.carriesValidModernEnvelopeClaim(message.params)) { | ||
| if (state.era === "modern" && require_src.isJSONRPCRequest(message) && message.method === "initialize" && !require_src.carriesValidModernEnvelopeClaim(message.params)) { | ||
| await answerLegacyRejection(message, "initialize", message.params !== null && typeof message.params === "object" && typeof message.params.protocolVersion === "string" ? message.params.protocolVersion : void 0); | ||
@@ -427,3 +428,3 @@ return; | ||
| } | ||
| if (!require_mcp.isJSONRPCRequest(message) && !require_mcp.isJSONRPCNotification(message)) { | ||
| if (!require_src.isJSONRPCRequest(message) && !require_src.isJSONRPCNotification(message)) { | ||
| reportError(/* @__PURE__ */ new Error("Discarded a JSON-RPC response received before the connection negotiated an era")); | ||
@@ -436,3 +437,3 @@ return; | ||
| const detail = `Invalid _meta envelope for protocol revision 2026-07-28: ${opening.issue.key}: ${opening.issue.problem}`; | ||
| if (require_mcp.isJSONRPCRequest(message)) await writeErrorResponse(message.id, require_mcp.ProtocolErrorCode.InvalidParams, detail, { envelope: opening.issue }); | ||
| if (require_src.isJSONRPCRequest(message)) await writeErrorResponse(message.id, require_src.ProtocolErrorCode.InvalidParams, detail, { envelope: opening.issue }); | ||
| else reportError(/* @__PURE__ */ new Error(`Discarded a notification with a malformed envelope: ${detail}`)); | ||
@@ -442,5 +443,5 @@ return; | ||
| case "unsupported-revision": | ||
| if (require_mcp.isJSONRPCRequest(message)) { | ||
| const error = new require_mcp.UnsupportedProtocolVersionError({ | ||
| supported: [...require_mcp.SUPPORTED_MODERN_PROTOCOL_VERSIONS], | ||
| if (require_src.isJSONRPCRequest(message)) { | ||
| const error = new require_src.UnsupportedProtocolVersionError({ | ||
| supported: [...require_src.SUPPORTED_MODERN_PROTOCOL_VERSIONS], | ||
| requested: opening.requested | ||
@@ -453,3 +454,3 @@ }); | ||
| case "modern": | ||
| if (require_mcp.isJSONRPCRequest(message) && message.method === "server/discover") { | ||
| if (require_src.isJSONRPCRequest(message) && message.method === "server/discover") { | ||
| if (state.phase === "probe") { | ||
@@ -472,3 +473,3 @@ state.instance.channel.deliver(message, { classification: opening.classification }); | ||
| if (state.phase === "probe") { | ||
| if (require_mcp.isJSONRPCNotification(message)) { | ||
| if (require_src.isJSONRPCNotification(message)) { | ||
| state.instance.channel.deliver(message, { classification: opening.classification }); | ||
@@ -499,3 +500,3 @@ return; | ||
| if (legacyMode === "reject") { | ||
| if (require_mcp.isJSONRPCRequest(message)) await answerLegacyRejection(message, opening.reason, opening.requestedVersion); | ||
| if (require_src.isJSONRPCRequest(message)) await answerLegacyRejection(message, opening.reason, opening.requestedVersion); | ||
| return; | ||
@@ -534,3 +535,3 @@ } | ||
| } catch (error) { | ||
| if (require_mcp.isJSONRPCRequest(message)) await writeErrorResponse(message.id, require_mcp.ProtocolErrorCode.InternalError, "Internal server error"); | ||
| if (require_src.isJSONRPCRequest(message)) await writeErrorResponse(message.id, require_src.ProtocolErrorCode.InternalError, "Internal server error"); | ||
| reportError(toError(error)); | ||
@@ -537,0 +538,0 @@ } |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"stdio.cjs","names":["_stdin: Readable","process","_stdout: Writable","ReadBuffer","serializeMessage","_wire: Transport","_onInstanceClose: () => void","_outboundIntercept?: (message: JSONRPCMessage) => 'handled' | undefined","isJSONRPCResultResponse","isJSONRPCErrorResponse","isJSONRPCRequest","isJSONRPCNotification","carriesValidModernEnvelopeClaim","hasEnvelopeClaim","requestMetaOf","validateEnvelopeMeta","envelopeClaimVersion","SUPPORTED_MODERN_PROTOCOL_VERSIONS","state: EntryState","discarding: StdioConnectionChannel | undefined","StdioListenRouter","DEFAULT_MAX_SUBSCRIPTIONS","UnsupportedProtocolVersionError","modernOnlyStrictRejection","McpServer","channel: StdioConnectionChannel","ProtocolErrorCode","queue: JSONRPCMessage[]"],"sources":["../src/server/stdio.ts","../src/server/serveStdio.ts"],"sourcesContent":["import type { Readable, Writable } from 'node:stream';\n\nimport type { JSONRPCMessage, Transport } from '@modelcontextprotocol/core-internal';\nimport { ReadBuffer, serializeMessage } from '@modelcontextprotocol/core-internal';\nimport { process } from '@modelcontextprotocol/server/_shims';\n\n/**\n * Server transport for stdio: this communicates with an MCP client by reading from the current process' `stdin` and writing to `stdout`.\n *\n * This transport is only available in Node.js environments.\n *\n * @example\n * ```ts source=\"./stdio.examples.ts#StdioServerTransport_basicUsage\"\n * const server = new McpServer({ name: 'my-server', version: '1.0.0' });\n * const transport = new StdioServerTransport();\n * await server.connect(transport);\n * ```\n */\nexport class StdioServerTransport implements Transport {\n private _readBuffer: ReadBuffer;\n private _started = false;\n private _closed = false;\n\n constructor(\n private _stdin: Readable = process.stdin,\n private _stdout: Writable = process.stdout,\n options?: {\n /**\n * Maximum size of the read buffer in bytes. If a single message exceeds\n * this size the transport will emit an error and close.\n *\n * Defaults to 10 MB.\n */\n maxBufferSize?: number;\n }\n ) {\n this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });\n }\n\n onclose?: () => void;\n onerror?: (error: Error) => void;\n onmessage?: (message: JSONRPCMessage) => void;\n\n // Arrow functions to bind `this` properly, while maintaining function identity.\n _ondata = (chunk: Buffer) => {\n try {\n this._readBuffer.append(chunk);\n this.processReadBuffer();\n } catch (error) {\n this.onerror?.(error as Error);\n this.close().catch(() => {});\n }\n };\n _onerror = (error: Error) => {\n this.onerror?.(error);\n };\n _onstdouterror = (error: Error) => {\n this.onerror?.(error);\n this.close().catch(() => {\n // Ignore errors during close — we're already in an error path\n });\n };\n\n /**\n * Starts listening for messages on `stdin`.\n */\n async start(): Promise<void> {\n if (this._started) {\n throw new Error(\n 'StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.'\n );\n }\n\n this._started = true;\n this._stdin.on('data', this._ondata);\n this._stdin.on('error', this._onerror);\n this._stdout.on('error', this._onstdouterror);\n }\n\n private processReadBuffer() {\n while (true) {\n try {\n const message = this._readBuffer.readMessage();\n if (message === null) {\n break;\n }\n\n this.onmessage?.(message);\n } catch (error) {\n this.onerror?.(error as Error);\n }\n }\n }\n\n async close(): Promise<void> {\n if (this._closed) {\n return;\n }\n this._closed = true;\n\n // Remove our event listeners first\n this._stdin.off('data', this._ondata);\n this._stdin.off('error', this._onerror);\n this._stdout.off('error', this._onstdouterror);\n\n // Check if we were the only data listener\n const remainingDataListeners = this._stdin.listenerCount('data');\n if (remainingDataListeners === 0) {\n // Only pause stdin if we were the only listener\n // This prevents interfering with other parts of the application that might be using stdin\n this._stdin.pause();\n }\n\n // Clear the buffer and notify closure\n this._readBuffer.clear();\n this.onclose?.();\n }\n\n send(message: JSONRPCMessage): Promise<void> {\n if (this._closed) {\n return Promise.reject(new Error('StdioServerTransport is closed'));\n }\n return new Promise((resolve, reject) => {\n const json = serializeMessage(message);\n\n let settled = false;\n const onError = (error: Error) => {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n this._stdout.off('drain', onDrain);\n reject(error);\n };\n const onDrain = () => {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n this._stdout.off('drain', onDrain);\n resolve();\n };\n\n this._stdout.once('error', onError);\n\n if (this._stdout.write(json)) {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n resolve();\n } else if (!settled) {\n this._stdout.once('drain', onDrain);\n }\n });\n }\n}\n","/**\n * `serveStdio` — the stdio entry point for serving the 2026-07-28 protocol\n * revision on a long-lived connection, with 2025-era serving as the default\n * for clients that open with the `initialize` handshake.\n *\n * The entry owns the stdio transport and the era decision for the connection.\n * It classifies the connection's opening exchange exactly once (using the\n * same body-primary rules as the HTTP entry), constructs ONE server instance\n * from the consumer's factory for the era the client opened with, pins that\n * instance for the lifetime of the connection, and passes every later message\n * straight through to it. No per-message era classification ever runs after\n * the connection is pinned — exactly mirroring how `createMcpHandler`\n * classifies an HTTP request before any instance exists.\n *\n * The opening exchange:\n *\n * - An `initialize` request (or any claim-less message) opens a 2025-era\n * session: the factory builds a legacy instance and the connection is\n * pinned to it (`legacy: 'serve'`, the default). With `legacy: 'reject'`\n * the opening is answered with the unsupported-protocol-version error\n * naming the supported modern revisions instead.\n * - A request carrying a valid per-request `_meta` envelope naming a\n * supported modern revision pins the connection to a modern instance\n * (era-marked and given the modern-only handlers, exactly like the HTTP\n * entry's modern path).\n * - A `server/discover` probe is answered by an optimistically built modern\n * instance but does NOT pin the connection yet: the spec's stdio\n * backward-compatibility flow lets a client probe first and then either\n * continue with modern requests (which pins the connection modern) or fall\n * back to the `initialize` handshake when no mutually supported modern\n * revision exists — in which case the probe instance is discarded and a\n * fresh legacy instance serves the handshake.\n * - Once the modern era is pinned, a later claim-less `initialize` is\n * rejected with the unsupported-protocol-version error naming the supported\n * revisions (the spec recommends naming them in any error returned to\n * `initialize`, and forbids falling back once the modern era is confirmed).\n *\n * Every instance the factory produces serves exactly one era; the ambiguity\n * of the opening exchange lives entirely in this entry. In the probe-fallback\n * case the factory is called twice (once for the discarded probe instance,\n * once for the legacy instance), so factories should be cheap and\n * side-effect-free to construct — the same expectation `createMcpHandler`\n * already sets for per-request construction.\n *\n * Hand-constructed servers connected directly to a `StdioServerTransport`\n * are unaffected by this entry: they keep serving the 2025-era protocol they\n * were written for.\n */\nimport type {\n CancelledNotificationParams,\n JSONRPCMessage,\n JSONRPCNotification,\n JSONRPCRequest,\n MessageClassification,\n MessageExtraInfo,\n RequestId,\n Transport,\n TransportSendOptions\n} from '@modelcontextprotocol/core-internal';\nimport {\n carriesValidModernEnvelopeClaim,\n envelopeClaimVersion,\n hasEnvelopeClaim,\n isJSONRPCErrorResponse,\n isJSONRPCNotification,\n isJSONRPCRequest,\n isJSONRPCResultResponse,\n modernOnlyStrictRejection,\n ProtocolErrorCode,\n requestMetaOf,\n setNegotiatedProtocolVersion,\n SUPPORTED_MODERN_PROTOCOL_VERSIONS,\n UnsupportedProtocolVersionError,\n validateEnvelopeMeta\n} from '@modelcontextprotocol/core-internal';\n\nimport type { McpServerFactory } from './createMcpHandler';\nimport { DEFAULT_MAX_SUBSCRIPTIONS, StdioListenRouter } from './listenRouter';\nimport { McpServer } from './mcp';\nimport type { Server } from './server';\nimport { installModernOnlyHandlers } from './server';\nimport { StdioServerTransport } from './stdio';\n\n/** Options for {@linkcode serveStdio}. */\nexport interface ServeStdioOptions {\n /**\n * How a 2025-era opening (an `initialize` request, or any claim-less\n * message) is handled:\n *\n * - `'serve'` (default) — the connection is pinned to a 2025-era instance\n * from the same factory and served exactly as a hand-wired stdio server\n * serves it today.\n * - `'reject'` — the opening request is answered with the\n * unsupported-protocol-version error naming the supported modern\n * revisions (claim-less notifications are dropped); the connection\n * stays open for a modern opening.\n */\n legacy?: 'serve' | 'reject';\n /**\n * Bring your own transport (for example a `StdioServerTransport`\n * constructed over a Unix domain socket or TCP stream, per the stdio\n * binding's custom-transport guidance). Defaults to a\n * {@linkcode StdioServerTransport} over the current process's stdio. The\n * entry owns the transport: it starts it, receives every inbound message,\n * and closes it when the connection ends.\n */\n transport?: Transport;\n /** Callback for out-of-band errors (reporting only; it never alters what is written to the wire). */\n onerror?: (error: Error) => void;\n /**\n * Reject a new `subscriptions/listen` with `-32603` 'Subscription limit\n * reached' (in-band, before the ack) when this many subscriptions are\n * already open on this connection.\n * @default 1024\n */\n maxSubscriptions?: number;\n}\n\n/** The handle returned by {@linkcode serveStdio}. */\nexport interface StdioServerHandle {\n /** Tears the connection down: closes the pinned instance (if any) and the underlying transport. */\n close(): Promise<void>;\n}\n\n/* ------------------------------------------------------------------------ *\n * Per-instance channel\n * ------------------------------------------------------------------------ */\n\n/**\n * How long the probe-discard path waits for the probe instance to answer the\n * requests it was delivered before closing it. The wait normally settles as\n * soon as the DiscoverResult is handed to the wire (or immediately, when a\n * delivered cancellation already settled the probe); the bound is a backstop\n * so no edge can ever hold the connection's inbound pump indefinitely behind\n * the discard.\n */\nconst DISCARD_ANSWER_TIMEOUT_MS = 3000;\n\n/**\n * The transport a pinned instance is connected to: a thin channel that writes\n * through to the entry-owned wire transport and receives the messages the\n * entry forwards. The wire transport itself is never handed to an instance —\n * that is what lets the entry discard an optimistic probe instance (close the\n * channel) without tearing down the connection.\n */\nclass StdioConnectionChannel implements Transport {\n onclose?: () => void;\n onerror?: (error: Error) => void;\n onmessage?: <T extends JSONRPCMessage>(message: T, extra?: MessageExtraInfo) => void;\n\n private _closed = false;\n /** Request ids the entry delivered to the instance that the instance has not yet answered. */\n private readonly _pendingRequests = new Set<RequestId>();\n private _drainWaiters: Array<() => void> = [];\n\n constructor(\n private readonly _wire: Transport,\n private readonly _onInstanceClose: () => void,\n /**\n * Optional first-look on outbound messages. When set and returning\n * `'handled'`, the channel does not write the message to the wire\n * (the entry already wrote whatever was appropriate). Used by the\n * modern-era listen router to fan a change notification out onto the\n * active subscriptions instead of broadcasting it unsolicited.\n */\n private readonly _outboundIntercept?: (message: JSONRPCMessage) => 'handled' | undefined\n ) {}\n\n async start(): Promise<void> {\n // The entry already started the wire transport; connecting an\n // instance to its channel must not start anything again.\n }\n\n async send(message: JSONRPCMessage, options?: TransportSendOptions): Promise<void> {\n if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {\n // The instance answered a delivered request: settle it whether or\n // not the wire write below succeeds (write failures surface\n // through the wire's own error reporting).\n const { id } = message;\n if (id !== undefined) {\n this._settle(id);\n }\n }\n if (this._closed) {\n // A discarded or torn-down instance has nowhere to write; late\n // sends are dropped.\n return;\n }\n if (this._outboundIntercept?.(message) === 'handled') {\n return;\n }\n return this._wire.send(message, options);\n }\n\n setProtocolVersion = (version: string): void => {\n this._wire.setProtocolVersion?.(version);\n };\n\n /** Forwards one inbound message to the connected instance. */\n deliver(message: JSONRPCMessage, extra?: MessageExtraInfo): void {\n if (this._closed) {\n return;\n }\n if (isJSONRPCRequest(message)) {\n this._pendingRequests.add(message.id);\n } else if (isJSONRPCNotification(message) && message.method === 'notifications/cancelled') {\n // By protocol contract a cancelled request may legitimately go\n // unanswered (the instance aborts the in-flight handler and writes\n // nothing for it), so a delivered cancellation settles the request\n // it names: nothing should keep waiting for an answer that may\n // never come. Non-cancelled requests still settle only when their\n // answer is handed to the wire.\n const cancelledId = (message.params as CancelledNotificationParams | undefined)?.requestId;\n if (cancelledId !== undefined) {\n this._settle(cancelledId);\n }\n }\n this.onmessage?.(message, extra);\n }\n\n /**\n * Resolves once every request delivered to the instance has been answered\n * through {@linkcode send}, settled by a delivered cancellation, or the\n * channel has been closed and nothing further can be answered. The wait is\n * bounded by `timeoutMs` as a backstop so no edge can hold the caller\n * indefinitely; resolves `false` only when the bound elapsed with requests\n * still unanswered. Used by the probe-discard path so a probe request the\n * entry accepted is never silently dropped.\n */\n async whenRequestsAnswered(timeoutMs: number): Promise<boolean> {\n if (this._closed || this._pendingRequests.size === 0) {\n return true;\n }\n return await new Promise<boolean>(resolve => {\n const waiter = (): void => {\n clearTimeout(timer);\n resolve(true);\n };\n const timer = setTimeout(() => {\n this._drainWaiters = this._drainWaiters.filter(pending => pending !== waiter);\n resolve(false);\n }, timeoutMs);\n this._drainWaiters.push(waiter);\n });\n }\n\n async close(): Promise<void> {\n if (this._closed) {\n return;\n }\n this._closed = true;\n // Nothing further can be answered through a closed channel; release\n // anyone waiting on in-flight answers.\n this._pendingRequests.clear();\n this._releaseDrainWaiters();\n try {\n this._onInstanceClose();\n } finally {\n this.onclose?.();\n }\n }\n\n private _settle(id: RequestId): void {\n this._pendingRequests.delete(id);\n if (this._pendingRequests.size === 0) {\n this._releaseDrainWaiters();\n }\n }\n\n private _releaseDrainWaiters(): void {\n const waiters = this._drainWaiters;\n this._drainWaiters = [];\n for (const waiter of waiters) {\n waiter();\n }\n }\n}\n\n/* ------------------------------------------------------------------------ *\n * Opening-exchange classification\n * ------------------------------------------------------------------------ */\n\ninterface EnvelopeIssue {\n key: string;\n problem: string;\n}\n\ntype OpeningClassification =\n /** A 2025-era opening: `initialize`, or any message without an envelope claim. */\n | { kind: 'legacy'; reason: 'initialize' | 'no-claim'; requestedVersion?: string }\n /** A valid envelope claim naming a modern revision this entry serves. */\n | { kind: 'modern'; revision: string; classification: MessageClassification }\n /** A present envelope claim whose envelope is malformed. */\n | { kind: 'invalid-envelope'; issue: EnvelopeIssue }\n /** A valid envelope claim naming a revision this entry does not serve (unknown future or 2025-era). */\n | { kind: 'unsupported-revision'; requested: string };\n\n/**\n * Classifies one message of the opening exchange with the same body-primary\n * rules the HTTP entry applies per request: `initialize` is the legacy\n * handshake unless it carries a valid modern envelope claim; a present claim\n * is validated (never silently ignored); a claim-less message is 2025-era\n * traffic. There is no header layer on stdio, so the body is the only signal.\n */\nfunction classifyOpeningMessage(message: JSONRPCRequest | JSONRPCNotification): OpeningClassification {\n const params = message.params;\n\n if (message.method === 'initialize' && !carriesValidModernEnvelopeClaim(params)) {\n const requestedVersion =\n params !== null && typeof params === 'object' && typeof (params as { protocolVersion?: unknown }).protocolVersion === 'string'\n ? ((params as { protocolVersion: string }).protocolVersion as string)\n : undefined;\n return { kind: 'legacy', reason: 'initialize', ...(requestedVersion !== undefined && { requestedVersion }) };\n }\n\n if (!hasEnvelopeClaim(params)) {\n return { kind: 'legacy', reason: 'no-claim' };\n }\n\n // A present claim is validated, never silently ignored — a malformed\n // envelope behind the claim is an invalid-params answer, not a fall back\n // to legacy serving (mirrors the HTTP entry's envelope rung).\n const meta = requestMetaOf(params);\n const issues = meta === undefined ? [] : validateEnvelopeMeta(meta);\n const firstIssue = issues[0];\n if (firstIssue !== undefined) {\n return { kind: 'invalid-envelope', issue: firstIssue };\n }\n\n const claimedVersion = envelopeClaimVersion(params);\n if (claimedVersion === undefined || !SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) {\n // The claim names a revision this entry does not serve (an unknown\n // future revision, or a 2025-era revision delivered via the envelope\n // mechanism) — answered like the HTTP entry's modern path.\n return { kind: 'unsupported-revision', requested: claimedVersion ?? 'unknown' };\n }\n\n return { kind: 'modern', revision: claimedVersion, classification: { era: 'modern', revision: claimedVersion } };\n}\n\n/* ------------------------------------------------------------------------ *\n * The entry\n * ------------------------------------------------------------------------ */\n\ninterface ConnectedInstance {\n product: McpServer | Server;\n channel: StdioConnectionChannel;\n}\n\ntype EntryState =\n /** Waiting for the connection's opening message. */\n | { phase: 'opening' }\n /** A `server/discover` probe was answered; the era is not pinned yet. */\n | { phase: 'probe'; instance: ConnectedInstance }\n /** The connection is pinned to one instance serving one era. */\n | { phase: 'pinned'; era: 'legacy' | 'modern'; instance: ConnectedInstance }\n | { phase: 'closed' };\n\n/**\n * Serves MCP over stdio from a server factory, owning the era decision for\n * the connection: the opening exchange selects the era, ONE instance from the\n * factory is pinned for the connection lifetime, and everything after passes\n * straight through to it. See the module documentation for the opening rules.\n *\n * ```ts\n * import { serveStdio } from '@modelcontextprotocol/server/stdio';\n *\n * serveStdio(() => {\n * const server = new McpServer({ name: 'my-server', version: '1.0.0' }, { capabilities: { tools: {} } });\n * // register tools/resources/prompts once — the same factory serves both eras\n * return server;\n * });\n * ```\n */\nexport function serveStdio(factory: McpServerFactory, options: ServeStdioOptions = {}): StdioServerHandle {\n const legacyMode = options.legacy ?? 'serve';\n const wire = options.transport ?? new StdioServerTransport();\n\n let state: EntryState = { phase: 'opening' };\n /** Channel currently being discarded (its close must not tear the connection down). */\n let discarding: StdioConnectionChannel | undefined;\n let closing = false;\n\n /**\n * Whether the connection has been torn down (`handle.close()` or the wire\n * closing). The opening arms re-check this after every await: a close can\n * race factory construction, and the continuation must neither resurrect\n * the connection state nor keep a late-resolved instance around.\n */\n const isTornDown = (): boolean => closing || state.phase === 'closed';\n\n const reportError = (error: Error) => {\n try {\n options.onerror?.(error);\n } catch {\n // Reporting must never affect the wire.\n }\n };\n\n const writeErrorResponse = (id: RequestId, code: number, message: string, data?: unknown): Promise<void> =>\n wire\n .send({ jsonrpc: '2.0', id, error: { code, message, ...(data !== undefined && { data }) } })\n .catch(error => reportError(toError(error)));\n\n /**\n * Entry-handled `subscriptions/listen` for this connection: holds the\n * active subscriptions, serves inbound listen / cancelled-of-listen\n * before the pinned instance is consulted, and rewrites the instance's\n * outbound change notifications onto the active subscriptions. Only\n * consulted on a modern-pinned connection — on a legacy connection\n * change notifications pass straight through (the 2025 unsolicited\n * delivery model is unchanged).\n */\n const listenRouter = new StdioListenRouter(options.maxSubscriptions ?? DEFAULT_MAX_SUBSCRIPTIONS);\n\n /** Outbound intercept installed on a modern instance's channel. */\n const modernOutboundIntercept = (message: JSONRPCMessage): 'handled' | undefined => {\n if (!isJSONRPCNotification(message)) return undefined;\n const routed = listenRouter.routeOutbound(message);\n if (routed === 'passthrough') return undefined;\n // A subscription-gated change notification on the modern era: one\n // stamped copy per subscription that opted in (an empty array means\n // it is dropped — the modern era never delivers an un-requested\n // change type unsolicited). Nothing else from the instance is\n // affected.\n for (const stamped of routed) {\n void wire.send({ jsonrpc: '2.0', ...stamped }).catch(error => reportError(toError(error)));\n }\n return 'handled';\n };\n\n /**\n * Entry-handled inbound listen routing for a modern-pinned connection.\n * Returns `true` when the message was served at the entry and must NOT\n * be delivered to the pinned instance.\n */\n const tryServeListen = async (message: JSONRPCMessage): Promise<boolean> => {\n if (isJSONRPCRequest(message) && message.method === 'subscriptions/listen') {\n // Entry-handled listen is its own request-handling subsystem; it\n // applies the same per-request envelope rung the instance's\n // `_onrequest` would (method-existence is N/A here — the entry\n // recognized the method — so envelope validation is the first\n // applicable rung) and the same supported-revision check the\n // opening classifier and the HTTP entry apply per request. Reuses\n // the same validators the opening classifier uses.\n const meta = requestMetaOf(message.params);\n const issue = hasEnvelopeClaim(message.params)\n ? (meta === undefined ? [] : validateEnvelopeMeta(meta))[0]\n : { key: '_meta', problem: 'the per-request envelope is required on protocol revision 2026-07-28' };\n const claimedVersion = envelopeClaimVersion(message.params);\n let reply;\n if (issue !== undefined) {\n reply = {\n jsonrpc: '2.0' as const,\n id: message.id,\n error: { code: -32_602, message: `Invalid _meta envelope: ${issue.key}: ${issue.problem}` }\n };\n } else if (claimedVersion === undefined || !SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) {\n const error = new UnsupportedProtocolVersionError({\n supported: [...SUPPORTED_MODERN_PROTOCOL_VERSIONS],\n requested: claimedVersion ?? 'unknown'\n });\n reply = { jsonrpc: '2.0' as const, id: message.id, error: { code: error.code, message: error.message, data: error.data } };\n } else {\n reply = listenRouter.serve(message);\n }\n await wire\n .send('error' in reply ? reply : { jsonrpc: '2.0', method: reply.method, params: reply.params })\n .catch(error => reportError(toError(error)));\n return true;\n }\n if (isJSONRPCNotification(message) && message.method === 'notifications/cancelled') {\n const cancelledId = (message.params as CancelledNotificationParams | undefined)?.requestId;\n // Inbound cancel of a parked listen: tear the subscription down\n // and DO NOT deliver to the instance (it never saw the listen\n // request). After this point nothing further is delivered for\n // that subscription id (post-cancel hardening).\n if (cancelledId !== undefined && listenRouter.cancel(cancelledId)) {\n return true;\n }\n }\n return false;\n };\n\n /** Answers a 2025-era request the entry will not serve (the modern-only rejection cells). */\n const answerLegacyRejection = (\n request: JSONRPCRequest,\n reason: 'initialize' | 'no-claim',\n requestedVersion?: string\n ): Promise<void> => {\n const rejection = modernOnlyStrictRejection(\n { kind: 'legacy', reason, ...(requestedVersion !== undefined && { requestedVersion }) },\n SUPPORTED_MODERN_PROTOCOL_VERSIONS\n );\n if (rejection === undefined) {\n return Promise.resolve();\n }\n reportError(new Error(`Rejected 2025-era request on a modern-only stdio connection (${rejection.cell}): ${rejection.message}`));\n return writeErrorResponse(request.id, rejection.code, rejection.message, rejection.data);\n };\n\n const onInstanceClosed = (channel: StdioConnectionChannel) => {\n if (closing || channel === discarding) {\n return;\n }\n // The pinned (or probe) instance was closed from the instance side:\n // the connection is over.\n void closeAll();\n };\n\n const connectInstance = async (era: 'legacy' | 'modern', revision?: string): Promise<ConnectedInstance> => {\n const product = await factory({ era });\n const server = product instanceof McpServer ? product.server : product;\n if (era === 'modern') {\n // Era-write at instance binding, then modern-only handler\n // installation — the same helpers the HTTP entry's modern path\n // uses, before the instance is connected.\n setNegotiatedProtocolVersion(server, revision);\n installModernOnlyHandlers(server, SUPPORTED_MODERN_PROTOCOL_VERSIONS);\n // The listen router was created before this instance existed; now\n // that capabilities are known, hand them over so the acknowledged\n // filter is narrowed against what the server actually advertises.\n listenRouter.setServerCapabilities(server.getCapabilities());\n }\n const channel: StdioConnectionChannel = new StdioConnectionChannel(\n wire,\n () => onInstanceClosed(channel),\n era === 'modern' ? modernOutboundIntercept : undefined\n );\n await product.connect(channel);\n return { product, channel };\n };\n\n /** Closes an instance whose factory resolved only after the connection was torn down. */\n const disposeLateInstance = (instance: ConnectedInstance): Promise<void> =>\n instance.product.close().catch(error => reportError(toError(error)));\n\n const discardProbeInstance = async (instance: ConnectedInstance): Promise<void> => {\n // The probe instance served only the discover exchange; closing its\n // channel must not tear down the connection the fallback is about to\n // continue on.\n discarding = instance.channel;\n try {\n // A probe request the entry accepted must never go silently\n // unanswered: a client may pipeline its fallback `initialize`\n // straight behind `server/discover` without waiting, and closing\n // the instance aborts whatever it still has in flight. Let the\n // in-flight DiscoverResult reach the wire before the instance is\n // closed; the probe instance only ever receives `server/discover`,\n // whose entry-installed handler always answers promptly. A probe\n // the client cancelled is already settled by the delivered\n // cancellation (a cancelled request may go unanswered), and the\n // wait is bounded as a backstop so nothing can wedge the\n // connection's pump behind the discard.\n const answered = await instance.channel.whenRequestsAnswered(DISCARD_ANSWER_TIMEOUT_MS);\n if (!answered) {\n reportError(\n new Error(\n `Discarded the probe instance with requests still unanswered after ${DISCARD_ANSWER_TIMEOUT_MS}ms; continuing with the fallback`\n )\n );\n }\n await instance.product.close();\n } catch (error) {\n reportError(toError(error));\n } finally {\n discarding = undefined;\n }\n };\n\n const processMessage = async (message: JSONRPCMessage): Promise<void> => {\n if (state.phase === 'closed') {\n return;\n }\n\n if (state.phase === 'pinned') {\n if (\n state.era === 'modern' &&\n isJSONRPCRequest(message) &&\n message.method === 'initialize' &&\n !carriesValidModernEnvelopeClaim(message.params)\n ) {\n // The modern era is confirmed for this connection; a late\n // legacy handshake is answered with the version error naming\n // the supported revisions (the specification recommends\n // naming them in any error returned to `initialize`, and\n // rules out falling back once the modern era is confirmed).\n const requestedVersion =\n message.params !== null &&\n typeof message.params === 'object' &&\n typeof (message.params as { protocolVersion?: unknown }).protocolVersion === 'string'\n ? ((message.params as { protocolVersion: string }).protocolVersion as string)\n : undefined;\n await answerLegacyRejection(message, 'initialize', requestedVersion);\n return;\n }\n if (state.era === 'modern' && (await tryServeListen(message))) {\n return;\n }\n state.instance.channel.deliver(message);\n return;\n }\n\n // Negotiation window ('opening' | 'probe').\n if (!isJSONRPCRequest(message) && !isJSONRPCNotification(message)) {\n // A JSON-RPC response before any era is pinned: nothing has been\n // asked of the client yet, so there is nothing it can answer.\n reportError(new Error('Discarded a JSON-RPC response received before the connection negotiated an era'));\n return;\n }\n\n const opening = classifyOpeningMessage(message);\n switch (opening.kind) {\n case 'invalid-envelope': {\n const detail = `Invalid _meta envelope for protocol revision 2026-07-28: ${opening.issue.key}: ${opening.issue.problem}`;\n if (isJSONRPCRequest(message)) {\n await writeErrorResponse(message.id, ProtocolErrorCode.InvalidParams, detail, { envelope: opening.issue });\n } else {\n reportError(new Error(`Discarded a notification with a malformed envelope: ${detail}`));\n }\n return;\n }\n case 'unsupported-revision': {\n if (isJSONRPCRequest(message)) {\n const error = new UnsupportedProtocolVersionError({\n supported: [...SUPPORTED_MODERN_PROTOCOL_VERSIONS],\n requested: opening.requested\n });\n reportError(error);\n await writeErrorResponse(message.id, error.code, error.message, error.data);\n } else {\n reportError(new Error(`Discarded a notification claiming unsupported protocol revision ${opening.requested}`));\n }\n return;\n }\n case 'modern': {\n if (isJSONRPCRequest(message) && message.method === 'server/discover') {\n if (state.phase === 'probe') {\n // A repeated probe is answered by the same optimistic\n // instance and the negotiation window stays open: only\n // a non-discover enveloped request commits the\n // connection to the modern era, so a later fallback\n // `initialize` is still served by a fresh legacy\n // instance.\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n // Probe: answer from an optimistically built modern\n // instance so the advertisement reflects the real server\n // definition, but do not pin the connection yet — the\n // client may still fall back to `initialize` when it\n // shares no modern revision with the advertisement.\n const instance = await connectInstance('modern', opening.revision);\n if (isTornDown()) {\n // The connection was torn down while the factory was\n // building the probe instance: dispose of it and stay\n // closed instead of resurrecting the negotiation\n // window; nothing is delivered or answered.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'probe', instance };\n instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n if (state.phase === 'probe') {\n if (isJSONRPCNotification(message)) {\n // An enveloped notification during the negotiation\n // window (for example a notifications/cancelled for\n // the probe itself) is delivered to the probe instance\n // without committing the era: only a non-discover\n // enveloped request pins the connection, so a later\n // fallback `initialize` is still served by a fresh\n // legacy instance.\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n // The probe was followed by a modern request: the client\n // committed to the modern era — pin the probe instance.\n state = { phase: 'pinned', era: 'modern', instance: state.instance };\n } else {\n const instance = await connectInstance('modern', opening.revision);\n if (isTornDown()) {\n // Closed while the factory was building the modern\n // instance: dispose of it and stay closed.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'pinned', era: 'modern', instance };\n }\n if (await tryServeListen(message)) {\n return;\n }\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n case 'legacy': {\n if (legacyMode === 'reject') {\n if (isJSONRPCRequest(message)) {\n await answerLegacyRejection(message, opening.reason, opening.requestedVersion);\n }\n // Claim-less notifications are accepted and dropped (the\n // stdio analog of the HTTP entry's 202-and-drop); the\n // connection stays open for a modern opening.\n return;\n }\n if (state.phase === 'probe') {\n // Probe-then-fallback: the client probed, found no\n // mutually supported modern revision, and fell back to\n // the 2025 handshake on the same connection. The probe\n // instance is discarded; a fresh legacy instance serves\n // the handshake.\n await discardProbeInstance(state.instance);\n if (isTornDown()) {\n // Closed while the probe was being discarded: stay closed.\n return;\n }\n state = { phase: 'opening' };\n }\n const instance = await connectInstance('legacy');\n if (isTornDown()) {\n // Closed while the factory was building the legacy\n // instance: dispose of it and stay closed.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'pinned', era: 'legacy', instance };\n state.instance.channel.deliver(message);\n return;\n }\n }\n };\n\n // Inbound messages are processed strictly in arrival order: the queue\n // absorbs anything that arrives while the opening exchange is still being\n // decided (factory construction and instance connection are async).\n const queue: JSONRPCMessage[] = [];\n let pumping = false;\n const pump = async (): Promise<void> => {\n if (pumping) {\n return;\n }\n pumping = true;\n try {\n while (queue.length > 0) {\n const message = queue.shift()!;\n try {\n await processMessage(message);\n } catch (error) {\n // Every arm of processMessage that answers a request does\n // so through writeErrorResponse (which never throws — wire\n // failures are routed to onerror) and returns right after,\n // so an error escaping to here means the request was never\n // answered. Answer it now: a throwing factory or a failed\n // connect during the opening exchange must not leave the\n // client's request hanging (the stdio analog of the HTTP\n // entry's internal-server-error response). Notifications\n // carry no id to answer and are only reported.\n if (isJSONRPCRequest(message)) {\n await writeErrorResponse(message.id, ProtocolErrorCode.InternalError, 'Internal server error');\n }\n reportError(toError(error));\n }\n }\n } finally {\n pumping = false;\n }\n };\n\n const closeAll = async (): Promise<void> => {\n if (closing || state.phase === 'closed') {\n return;\n }\n closing = true;\n const current = state;\n state = { phase: 'closed' };\n // Stdio server-side graceful teardown: emit the empty\n // `subscriptions/listen` JSON-RPC result for every active subscription\n // (the spec's graceful-close signal — `SubscriptionsListenResult`)\n // before the wire is closed, so the client distinguishes graceful end\n // from a transport drop.\n for (const result of listenRouter.teardownAll()) {\n await wire.send(result).catch(error => reportError(toError(error)));\n }\n if (current.phase === 'probe' || current.phase === 'pinned') {\n await current.instance.product.close().catch(error => reportError(toError(error)));\n }\n await wire.close().catch(error => reportError(toError(error)));\n };\n\n wire.onmessage = (message: JSONRPCMessage) => {\n queue.push(message);\n void pump();\n };\n wire.onerror = error => {\n reportError(error);\n if (state.phase === 'probe' || state.phase === 'pinned') {\n state.instance.channel.onerror?.(error);\n }\n };\n wire.onclose = () => {\n if (closing || state.phase === 'closed') {\n return;\n }\n closing = true;\n const current = state;\n state = { phase: 'closed' };\n if (current.phase === 'probe' || current.phase === 'pinned') {\n void current.instance.product.close().catch(error => reportError(toError(error)));\n }\n };\n\n const started = wire.start().catch(error => {\n reportError(toError(error));\n throw error;\n });\n // Surface a failed start through onerror (above); close() still resolves.\n started.catch(() => {});\n\n return {\n close: async () => {\n await started.catch(() => {});\n await closeAll();\n }\n };\n}\n\nfunction toError(value: unknown): Error {\n return value instanceof Error ? value : new Error(String(value));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,IAAa,uBAAb,MAAuD;CACnD,AAAQ;CACR,AAAQ,WAAW;CACnB,AAAQ,UAAU;CAElB,YACI,AAAQA,SAAmBC,4CAAQ,OACnC,AAAQC,UAAoBD,4CAAQ,QACpC,SASF;EAXU;EACA;AAW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Q,UAAU,WAAW,QAAQ,UAAU,SAC/C,CAAK,QAAQ,SAAS,QAAQ,OAAO,CAAC,OAAM,UAAS,YAAY,QAAQ,MAAM,CAAC,CAAC;;CAIzF,MAAM,UAAU,KAAK,OAAO,CAAC,OAAM,UAAS;AACxC,cAAY,QAAQ,MAAM,CAAC;AAC3B,QAAM;GACR;AAEF,SAAQ,YAAY,GAAG;AAEvB,QAAO,EACH,OAAO,YAAY;AACf,QAAM,QAAQ,YAAY,GAAG;AAC7B,QAAM,UAAU;IAEvB;;AAGL,SAAS,QAAQ,OAAuB;AACpC,QAAO,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,MAAM,CAAC"} | ||
| {"version":3,"file":"stdio.cjs","names":["_stdin: Readable","process","_stdout: Writable","ReadBuffer","serializeMessage","_wire: Transport","_onInstanceClose: () => void","_outboundIntercept?: (message: JSONRPCMessage) => 'handled' | undefined","isJSONRPCResultResponse","isJSONRPCErrorResponse","isJSONRPCRequest","isJSONRPCNotification","carriesValidModernEnvelopeClaim","hasEnvelopeClaim","requestMetaOf","validateEnvelopeMeta","envelopeClaimVersion","SUPPORTED_MODERN_PROTOCOL_VERSIONS","state: EntryState","discarding: StdioConnectionChannel | undefined","StdioListenRouter","DEFAULT_MAX_SUBSCRIPTIONS","UnsupportedProtocolVersionError","modernOnlyStrictRejection","McpServer","channel: StdioConnectionChannel","ProtocolErrorCode","queue: JSONRPCMessage[]"],"sources":["../src/server/stdio.ts","../src/server/serveStdio.ts"],"sourcesContent":["import type { Readable, Writable } from 'node:stream';\n\nimport type { JSONRPCMessage, Transport } from '@modelcontextprotocol/core-internal';\nimport { ReadBuffer, serializeMessage } from '@modelcontextprotocol/core-internal';\nimport { process } from '@modelcontextprotocol/server/_shims';\n\n/**\n * Server transport for stdio: this communicates with an MCP client by reading from the current process' `stdin` and writing to `stdout`.\n *\n * This transport is only available in Node.js environments.\n *\n * @example\n * ```ts source=\"./stdio.examples.ts#StdioServerTransport_basicUsage\"\n * const server = new McpServer({ name: 'my-server', version: '1.0.0' });\n * const transport = new StdioServerTransport();\n * await server.connect(transport);\n * ```\n */\nexport class StdioServerTransport implements Transport {\n private _readBuffer: ReadBuffer;\n private _started = false;\n private _closed = false;\n\n constructor(\n private _stdin: Readable = process.stdin,\n private _stdout: Writable = process.stdout,\n options?: {\n /**\n * Maximum size of the read buffer in bytes. If a single message exceeds\n * this size the transport will emit an error and close.\n *\n * Defaults to 10 MB.\n */\n maxBufferSize?: number;\n }\n ) {\n this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });\n }\n\n onclose?: () => void;\n onerror?: (error: Error) => void;\n onmessage?: (message: JSONRPCMessage) => void;\n\n // Arrow functions to bind `this` properly, while maintaining function identity.\n _ondata = (chunk: Buffer) => {\n try {\n this._readBuffer.append(chunk);\n this.processReadBuffer();\n } catch (error) {\n this.onerror?.(error as Error);\n this.close().catch(() => {});\n }\n };\n _onerror = (error: Error) => {\n this.onerror?.(error);\n };\n _onstdouterror = (error: Error) => {\n this.onerror?.(error);\n this.close().catch(() => {\n // Ignore errors during close — we're already in an error path\n });\n };\n\n /**\n * Starts listening for messages on `stdin`.\n */\n async start(): Promise<void> {\n if (this._started) {\n throw new Error(\n 'StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.'\n );\n }\n\n this._started = true;\n this._stdin.on('data', this._ondata);\n this._stdin.on('error', this._onerror);\n this._stdout.on('error', this._onstdouterror);\n }\n\n private processReadBuffer() {\n while (true) {\n try {\n const message = this._readBuffer.readMessage();\n if (message === null) {\n break;\n }\n\n this.onmessage?.(message);\n } catch (error) {\n this.onerror?.(error as Error);\n }\n }\n }\n\n async close(): Promise<void> {\n if (this._closed) {\n return;\n }\n this._closed = true;\n\n // Remove our event listeners first\n this._stdin.off('data', this._ondata);\n this._stdin.off('error', this._onerror);\n this._stdout.off('error', this._onstdouterror);\n\n // Check if we were the only data listener\n const remainingDataListeners = this._stdin.listenerCount('data');\n if (remainingDataListeners === 0) {\n // Only pause stdin if we were the only listener\n // This prevents interfering with other parts of the application that might be using stdin\n this._stdin.pause();\n }\n\n // Clear the buffer and notify closure\n this._readBuffer.clear();\n this.onclose?.();\n }\n\n send(message: JSONRPCMessage): Promise<void> {\n if (this._closed) {\n return Promise.reject(new Error('StdioServerTransport is closed'));\n }\n return new Promise((resolve, reject) => {\n const json = serializeMessage(message);\n\n let settled = false;\n const onError = (error: Error) => {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n this._stdout.off('drain', onDrain);\n reject(error);\n };\n const onDrain = () => {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n this._stdout.off('drain', onDrain);\n resolve();\n };\n\n this._stdout.once('error', onError);\n\n if (this._stdout.write(json)) {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n resolve();\n } else if (!settled) {\n this._stdout.once('drain', onDrain);\n }\n });\n }\n}\n","/**\n * `serveStdio` — the stdio entry point for serving the 2026-07-28 protocol\n * revision on a long-lived connection, with 2025-era serving as the default\n * for clients that open with the `initialize` handshake.\n *\n * The entry owns the stdio transport and the era decision for the connection.\n * It classifies the connection's opening exchange exactly once (using the\n * same body-primary rules as the HTTP entry), constructs ONE server instance\n * from the consumer's factory for the era the client opened with, pins that\n * instance for the lifetime of the connection, and passes every later message\n * straight through to it. No per-message era classification ever runs after\n * the connection is pinned — exactly mirroring how `createMcpHandler`\n * classifies an HTTP request before any instance exists.\n *\n * The opening exchange:\n *\n * - An `initialize` request (or any claim-less message) opens a 2025-era\n * session: the factory builds a legacy instance and the connection is\n * pinned to it (`legacy: 'serve'`, the default). With `legacy: 'reject'`\n * the opening is answered with the unsupported-protocol-version error\n * naming the supported modern revisions instead.\n * - A request carrying a valid per-request `_meta` envelope naming a\n * supported modern revision pins the connection to a modern instance\n * (era-marked and given the modern-only handlers, exactly like the HTTP\n * entry's modern path).\n * - A `server/discover` probe is answered by an optimistically built modern\n * instance but does NOT pin the connection yet: the spec's stdio\n * backward-compatibility flow lets a client probe first and then either\n * continue with modern requests (which pins the connection modern) or fall\n * back to the `initialize` handshake when no mutually supported modern\n * revision exists — in which case the probe instance is discarded and a\n * fresh legacy instance serves the handshake.\n * - Once the modern era is pinned, a later claim-less `initialize` is\n * rejected with the unsupported-protocol-version error naming the supported\n * revisions (the spec recommends naming them in any error returned to\n * `initialize`, and forbids falling back once the modern era is confirmed).\n *\n * Every instance the factory produces serves exactly one era; the ambiguity\n * of the opening exchange lives entirely in this entry. In the probe-fallback\n * case the factory is called twice (once for the discarded probe instance,\n * once for the legacy instance), so factories should be cheap and\n * side-effect-free to construct — the same expectation `createMcpHandler`\n * already sets for per-request construction.\n *\n * Hand-constructed servers connected directly to a `StdioServerTransport`\n * are unaffected by this entry: they keep serving the 2025-era protocol they\n * were written for.\n */\nimport type {\n CancelledNotificationParams,\n JSONRPCMessage,\n JSONRPCNotification,\n JSONRPCRequest,\n MessageClassification,\n MessageExtraInfo,\n RequestId,\n Transport,\n TransportSendOptions\n} from '@modelcontextprotocol/core-internal';\nimport {\n carriesValidModernEnvelopeClaim,\n envelopeClaimVersion,\n hasEnvelopeClaim,\n isJSONRPCErrorResponse,\n isJSONRPCNotification,\n isJSONRPCRequest,\n isJSONRPCResultResponse,\n modernOnlyStrictRejection,\n ProtocolErrorCode,\n requestMetaOf,\n setNegotiatedProtocolVersion,\n SUPPORTED_MODERN_PROTOCOL_VERSIONS,\n UnsupportedProtocolVersionError,\n validateEnvelopeMeta\n} from '@modelcontextprotocol/core-internal';\n\nimport type { McpServerFactory } from './createMcpHandler';\nimport { DEFAULT_MAX_SUBSCRIPTIONS, StdioListenRouter } from './listenRouter';\nimport { McpServer } from './mcp';\nimport type { Server } from './server';\nimport { installModernOnlyHandlers } from './server';\nimport { StdioServerTransport } from './stdio';\n\n/** Options for {@linkcode serveStdio}. */\nexport interface ServeStdioOptions {\n /**\n * How a 2025-era opening (an `initialize` request, or any claim-less\n * message) is handled:\n *\n * - `'serve'` (default) — the connection is pinned to a 2025-era instance\n * from the same factory and served exactly as a hand-wired stdio server\n * serves it today.\n * - `'reject'` — the opening request is answered with the\n * unsupported-protocol-version error naming the supported modern\n * revisions (claim-less notifications are dropped); the connection\n * stays open for a modern opening.\n */\n legacy?: 'serve' | 'reject';\n /**\n * Bring your own transport (for example a `StdioServerTransport`\n * constructed over a Unix domain socket or TCP stream, per the stdio\n * binding's custom-transport guidance). Defaults to a\n * {@linkcode StdioServerTransport} over the current process's stdio. The\n * entry owns the transport: it starts it, receives every inbound message,\n * and closes it when the connection ends.\n */\n transport?: Transport;\n /** Callback for out-of-band errors (reporting only; it never alters what is written to the wire). */\n onerror?: (error: Error) => void;\n /**\n * Reject a new `subscriptions/listen` with `-32603` 'Subscription limit\n * reached' (in-band, before the ack) when this many subscriptions are\n * already open on this connection.\n * @default 1024\n */\n maxSubscriptions?: number;\n}\n\n/** The handle returned by {@linkcode serveStdio}. */\nexport interface StdioServerHandle {\n /** Tears the connection down: closes the pinned instance (if any) and the underlying transport. */\n close(): Promise<void>;\n}\n\n/* ------------------------------------------------------------------------ *\n * Per-instance channel\n * ------------------------------------------------------------------------ */\n\n/**\n * How long the probe-discard path waits for the probe instance to answer the\n * requests it was delivered before closing it. The wait normally settles as\n * soon as the DiscoverResult is handed to the wire (or immediately, when a\n * delivered cancellation already settled the probe); the bound is a backstop\n * so no edge can ever hold the connection's inbound pump indefinitely behind\n * the discard.\n */\nconst DISCARD_ANSWER_TIMEOUT_MS = 3000;\n\n/**\n * The transport a pinned instance is connected to: a thin channel that writes\n * through to the entry-owned wire transport and receives the messages the\n * entry forwards. The wire transport itself is never handed to an instance —\n * that is what lets the entry discard an optimistic probe instance (close the\n * channel) without tearing down the connection.\n */\nclass StdioConnectionChannel implements Transport {\n onclose?: () => void;\n onerror?: (error: Error) => void;\n onmessage?: <T extends JSONRPCMessage>(message: T, extra?: MessageExtraInfo) => void;\n\n private _closed = false;\n /** Request ids the entry delivered to the instance that the instance has not yet answered. */\n private readonly _pendingRequests = new Set<RequestId>();\n private _drainWaiters: Array<() => void> = [];\n\n constructor(\n private readonly _wire: Transport,\n private readonly _onInstanceClose: () => void,\n /**\n * Optional first-look on outbound messages. When set and returning\n * `'handled'`, the channel does not write the message to the wire\n * (the entry already wrote whatever was appropriate). Used by the\n * modern-era listen router to fan a change notification out onto the\n * active subscriptions instead of broadcasting it unsolicited.\n */\n private readonly _outboundIntercept?: (message: JSONRPCMessage) => 'handled' | undefined\n ) {}\n\n async start(): Promise<void> {\n // The entry already started the wire transport; connecting an\n // instance to its channel must not start anything again.\n }\n\n async send(message: JSONRPCMessage, options?: TransportSendOptions): Promise<void> {\n if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {\n // The instance answered a delivered request: settle it whether or\n // not the wire write below succeeds (write failures surface\n // through the wire's own error reporting).\n const { id } = message;\n if (id !== undefined) {\n this._settle(id);\n }\n }\n if (this._closed) {\n // A discarded or torn-down instance has nowhere to write; late\n // sends are dropped.\n return;\n }\n if (this._outboundIntercept?.(message) === 'handled') {\n return;\n }\n return this._wire.send(message, options);\n }\n\n setProtocolVersion = (version: string): void => {\n this._wire.setProtocolVersion?.(version);\n };\n\n /** Forwards one inbound message to the connected instance. */\n deliver(message: JSONRPCMessage, extra?: MessageExtraInfo): void {\n if (this._closed) {\n return;\n }\n if (isJSONRPCRequest(message)) {\n this._pendingRequests.add(message.id);\n } else if (isJSONRPCNotification(message) && message.method === 'notifications/cancelled') {\n // By protocol contract a cancelled request may legitimately go\n // unanswered (the instance aborts the in-flight handler and writes\n // nothing for it), so a delivered cancellation settles the request\n // it names: nothing should keep waiting for an answer that may\n // never come. Non-cancelled requests still settle only when their\n // answer is handed to the wire.\n const cancelledId = (message.params as CancelledNotificationParams | undefined)?.requestId;\n if (cancelledId !== undefined) {\n this._settle(cancelledId);\n }\n }\n this.onmessage?.(message, extra);\n }\n\n /**\n * Resolves once every request delivered to the instance has been answered\n * through {@linkcode send}, settled by a delivered cancellation, or the\n * channel has been closed and nothing further can be answered. The wait is\n * bounded by `timeoutMs` as a backstop so no edge can hold the caller\n * indefinitely; resolves `false` only when the bound elapsed with requests\n * still unanswered. Used by the probe-discard path so a probe request the\n * entry accepted is never silently dropped.\n */\n async whenRequestsAnswered(timeoutMs: number): Promise<boolean> {\n if (this._closed || this._pendingRequests.size === 0) {\n return true;\n }\n return await new Promise<boolean>(resolve => {\n const waiter = (): void => {\n clearTimeout(timer);\n resolve(true);\n };\n const timer = setTimeout(() => {\n this._drainWaiters = this._drainWaiters.filter(pending => pending !== waiter);\n resolve(false);\n }, timeoutMs);\n this._drainWaiters.push(waiter);\n });\n }\n\n async close(): Promise<void> {\n if (this._closed) {\n return;\n }\n this._closed = true;\n // Nothing further can be answered through a closed channel; release\n // anyone waiting on in-flight answers.\n this._pendingRequests.clear();\n this._releaseDrainWaiters();\n try {\n this._onInstanceClose();\n } finally {\n this.onclose?.();\n }\n }\n\n private _settle(id: RequestId): void {\n this._pendingRequests.delete(id);\n if (this._pendingRequests.size === 0) {\n this._releaseDrainWaiters();\n }\n }\n\n private _releaseDrainWaiters(): void {\n const waiters = this._drainWaiters;\n this._drainWaiters = [];\n for (const waiter of waiters) {\n waiter();\n }\n }\n}\n\n/* ------------------------------------------------------------------------ *\n * Opening-exchange classification\n * ------------------------------------------------------------------------ */\n\ninterface EnvelopeIssue {\n key: string;\n problem: string;\n}\n\ntype OpeningClassification =\n /** A 2025-era opening: `initialize`, or any message without an envelope claim. */\n | { kind: 'legacy'; reason: 'initialize' | 'no-claim'; requestedVersion?: string }\n /** A valid envelope claim naming a modern revision this entry serves. */\n | { kind: 'modern'; revision: string; classification: MessageClassification }\n /** A present envelope claim whose envelope is malformed. */\n | { kind: 'invalid-envelope'; issue: EnvelopeIssue }\n /** A valid envelope claim naming a revision this entry does not serve (unknown future or 2025-era). */\n | { kind: 'unsupported-revision'; requested: string };\n\n/**\n * Classifies one message of the opening exchange with the same body-primary\n * rules the HTTP entry applies per request: `initialize` is the legacy\n * handshake unless it carries a valid modern envelope claim; a present claim\n * is validated (never silently ignored); a claim-less message is 2025-era\n * traffic. There is no header layer on stdio, so the body is the only signal.\n */\nfunction classifyOpeningMessage(message: JSONRPCRequest | JSONRPCNotification): OpeningClassification {\n const params = message.params;\n\n if (message.method === 'initialize' && !carriesValidModernEnvelopeClaim(params)) {\n const requestedVersion =\n params !== null && typeof params === 'object' && typeof (params as { protocolVersion?: unknown }).protocolVersion === 'string'\n ? ((params as { protocolVersion: string }).protocolVersion as string)\n : undefined;\n return { kind: 'legacy', reason: 'initialize', ...(requestedVersion !== undefined && { requestedVersion }) };\n }\n\n if (!hasEnvelopeClaim(params)) {\n return { kind: 'legacy', reason: 'no-claim' };\n }\n\n // A present claim is validated, never silently ignored — a malformed\n // envelope behind the claim is an invalid-params answer, not a fall back\n // to legacy serving (mirrors the HTTP entry's envelope rung).\n const meta = requestMetaOf(params);\n const issues = meta === undefined ? [] : validateEnvelopeMeta(meta);\n const firstIssue = issues[0];\n if (firstIssue !== undefined) {\n return { kind: 'invalid-envelope', issue: firstIssue };\n }\n\n const claimedVersion = envelopeClaimVersion(params);\n if (claimedVersion === undefined || !SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) {\n // The claim names a revision this entry does not serve (an unknown\n // future revision, or a 2025-era revision delivered via the envelope\n // mechanism) — answered like the HTTP entry's modern path.\n return { kind: 'unsupported-revision', requested: claimedVersion ?? 'unknown' };\n }\n\n return { kind: 'modern', revision: claimedVersion, classification: { era: 'modern', revision: claimedVersion } };\n}\n\n/* ------------------------------------------------------------------------ *\n * The entry\n * ------------------------------------------------------------------------ */\n\ninterface ConnectedInstance {\n product: McpServer | Server;\n channel: StdioConnectionChannel;\n}\n\ntype EntryState =\n /** Waiting for the connection's opening message. */\n | { phase: 'opening' }\n /** A `server/discover` probe was answered; the era is not pinned yet. */\n | { phase: 'probe'; instance: ConnectedInstance }\n /** The connection is pinned to one instance serving one era. */\n | { phase: 'pinned'; era: 'legacy' | 'modern'; instance: ConnectedInstance }\n | { phase: 'closed' };\n\n/**\n * Serves MCP over stdio from a server factory, owning the era decision for\n * the connection: the opening exchange selects the era, ONE instance from the\n * factory is pinned for the connection lifetime, and everything after passes\n * straight through to it. See the module documentation for the opening rules.\n *\n * ```ts\n * import { serveStdio } from '@modelcontextprotocol/server/stdio';\n *\n * serveStdio(() => {\n * const server = new McpServer({ name: 'my-server', version: '1.0.0' }, { capabilities: { tools: {} } });\n * // register tools/resources/prompts once — the same factory serves both eras\n * return server;\n * });\n * ```\n */\nexport function serveStdio(factory: McpServerFactory, options: ServeStdioOptions = {}): StdioServerHandle {\n const legacyMode = options.legacy ?? 'serve';\n const wire = options.transport ?? new StdioServerTransport();\n\n let state: EntryState = { phase: 'opening' };\n /** Channel currently being discarded (its close must not tear the connection down). */\n let discarding: StdioConnectionChannel | undefined;\n let closing = false;\n\n /**\n * Whether the connection has been torn down (`handle.close()` or the wire\n * closing). The opening arms re-check this after every await: a close can\n * race factory construction, and the continuation must neither resurrect\n * the connection state nor keep a late-resolved instance around.\n */\n const isTornDown = (): boolean => closing || state.phase === 'closed';\n\n const reportError = (error: Error) => {\n try {\n options.onerror?.(error);\n } catch {\n // Reporting must never affect the wire.\n }\n };\n\n const writeErrorResponse = (id: RequestId, code: number, message: string, data?: unknown): Promise<void> =>\n wire\n .send({ jsonrpc: '2.0', id, error: { code, message, ...(data !== undefined && { data }) } })\n .catch(error => reportError(toError(error)));\n\n /**\n * Entry-handled `subscriptions/listen` for this connection: holds the\n * active subscriptions, serves inbound listen / cancelled-of-listen\n * before the pinned instance is consulted, and rewrites the instance's\n * outbound change notifications onto the active subscriptions. Only\n * consulted on a modern-pinned connection — on a legacy connection\n * change notifications pass straight through (the 2025 unsolicited\n * delivery model is unchanged).\n */\n const listenRouter = new StdioListenRouter(options.maxSubscriptions ?? DEFAULT_MAX_SUBSCRIPTIONS);\n\n /** Outbound intercept installed on a modern instance's channel. */\n const modernOutboundIntercept = (message: JSONRPCMessage): 'handled' | undefined => {\n if (!isJSONRPCNotification(message)) return undefined;\n const routed = listenRouter.routeOutbound(message);\n if (routed === 'passthrough') return undefined;\n // A subscription-gated change notification on the modern era: one\n // stamped copy per subscription that opted in (an empty array means\n // it is dropped — the modern era never delivers an un-requested\n // change type unsolicited). Nothing else from the instance is\n // affected.\n for (const stamped of routed) {\n void wire.send({ jsonrpc: '2.0', ...stamped }).catch(error => reportError(toError(error)));\n }\n return 'handled';\n };\n\n /**\n * Entry-handled inbound listen routing for a modern-pinned connection.\n * Returns `true` when the message was served at the entry and must NOT\n * be delivered to the pinned instance.\n */\n const tryServeListen = async (message: JSONRPCMessage): Promise<boolean> => {\n if (isJSONRPCRequest(message) && message.method === 'subscriptions/listen') {\n // Entry-handled listen is its own request-handling subsystem; it\n // applies the same per-request envelope rung the instance's\n // `_onrequest` would (method-existence is N/A here — the entry\n // recognized the method — so envelope validation is the first\n // applicable rung) and the same supported-revision check the\n // opening classifier and the HTTP entry apply per request. Reuses\n // the same validators the opening classifier uses.\n const meta = requestMetaOf(message.params);\n const issue = hasEnvelopeClaim(message.params)\n ? (meta === undefined ? [] : validateEnvelopeMeta(meta))[0]\n : { key: '_meta', problem: 'the per-request envelope is required on protocol revision 2026-07-28' };\n const claimedVersion = envelopeClaimVersion(message.params);\n let reply;\n if (issue !== undefined) {\n reply = {\n jsonrpc: '2.0' as const,\n id: message.id,\n error: { code: -32_602, message: `Invalid _meta envelope: ${issue.key}: ${issue.problem}` }\n };\n } else if (claimedVersion === undefined || !SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) {\n const error = new UnsupportedProtocolVersionError({\n supported: [...SUPPORTED_MODERN_PROTOCOL_VERSIONS],\n requested: claimedVersion ?? 'unknown'\n });\n reply = { jsonrpc: '2.0' as const, id: message.id, error: { code: error.code, message: error.message, data: error.data } };\n } else {\n reply = listenRouter.serve(message);\n }\n await wire\n .send('error' in reply ? reply : { jsonrpc: '2.0', method: reply.method, params: reply.params })\n .catch(error => reportError(toError(error)));\n return true;\n }\n if (isJSONRPCNotification(message) && message.method === 'notifications/cancelled') {\n const cancelledId = (message.params as CancelledNotificationParams | undefined)?.requestId;\n // Inbound cancel of a parked listen: tear the subscription down\n // and DO NOT deliver to the instance (it never saw the listen\n // request). After this point nothing further is delivered for\n // that subscription id (post-cancel hardening).\n if (cancelledId !== undefined && listenRouter.cancel(cancelledId)) {\n return true;\n }\n }\n return false;\n };\n\n /** Answers a 2025-era request the entry will not serve (the modern-only rejection cells). */\n const answerLegacyRejection = (\n request: JSONRPCRequest,\n reason: 'initialize' | 'no-claim',\n requestedVersion?: string\n ): Promise<void> => {\n const rejection = modernOnlyStrictRejection(\n { kind: 'legacy', reason, ...(requestedVersion !== undefined && { requestedVersion }) },\n SUPPORTED_MODERN_PROTOCOL_VERSIONS\n );\n if (rejection === undefined) {\n return Promise.resolve();\n }\n reportError(new Error(`Rejected 2025-era request on a modern-only stdio connection (${rejection.cell}): ${rejection.message}`));\n return writeErrorResponse(request.id, rejection.code, rejection.message, rejection.data);\n };\n\n const onInstanceClosed = (channel: StdioConnectionChannel) => {\n if (closing || channel === discarding) {\n return;\n }\n // The pinned (or probe) instance was closed from the instance side:\n // the connection is over.\n void closeAll();\n };\n\n const connectInstance = async (era: 'legacy' | 'modern', revision?: string): Promise<ConnectedInstance> => {\n const product = await factory({ era });\n const server = product instanceof McpServer ? product.server : product;\n if (era === 'modern') {\n // Era-write at instance binding, then modern-only handler\n // installation — the same helpers the HTTP entry's modern path\n // uses, before the instance is connected.\n setNegotiatedProtocolVersion(server, revision);\n installModernOnlyHandlers(server, SUPPORTED_MODERN_PROTOCOL_VERSIONS);\n // The listen router was created before this instance existed; now\n // that capabilities are known, hand them over so the acknowledged\n // filter is narrowed against what the server actually advertises.\n listenRouter.setServerCapabilities(server.getCapabilities());\n }\n const channel: StdioConnectionChannel = new StdioConnectionChannel(\n wire,\n () => onInstanceClosed(channel),\n era === 'modern' ? modernOutboundIntercept : undefined\n );\n await product.connect(channel);\n return { product, channel };\n };\n\n /** Closes an instance whose factory resolved only after the connection was torn down. */\n const disposeLateInstance = (instance: ConnectedInstance): Promise<void> =>\n instance.product.close().catch(error => reportError(toError(error)));\n\n const discardProbeInstance = async (instance: ConnectedInstance): Promise<void> => {\n // The probe instance served only the discover exchange; closing its\n // channel must not tear down the connection the fallback is about to\n // continue on.\n discarding = instance.channel;\n try {\n // A probe request the entry accepted must never go silently\n // unanswered: a client may pipeline its fallback `initialize`\n // straight behind `server/discover` without waiting, and closing\n // the instance aborts whatever it still has in flight. Let the\n // in-flight DiscoverResult reach the wire before the instance is\n // closed; the probe instance only ever receives `server/discover`,\n // whose entry-installed handler always answers promptly. A probe\n // the client cancelled is already settled by the delivered\n // cancellation (a cancelled request may go unanswered), and the\n // wait is bounded as a backstop so nothing can wedge the\n // connection's pump behind the discard.\n const answered = await instance.channel.whenRequestsAnswered(DISCARD_ANSWER_TIMEOUT_MS);\n if (!answered) {\n reportError(\n new Error(\n `Discarded the probe instance with requests still unanswered after ${DISCARD_ANSWER_TIMEOUT_MS}ms; continuing with the fallback`\n )\n );\n }\n await instance.product.close();\n } catch (error) {\n reportError(toError(error));\n } finally {\n discarding = undefined;\n }\n };\n\n const processMessage = async (message: JSONRPCMessage): Promise<void> => {\n if (state.phase === 'closed') {\n return;\n }\n\n if (state.phase === 'pinned') {\n if (\n state.era === 'modern' &&\n isJSONRPCRequest(message) &&\n message.method === 'initialize' &&\n !carriesValidModernEnvelopeClaim(message.params)\n ) {\n // The modern era is confirmed for this connection; a late\n // legacy handshake is answered with the version error naming\n // the supported revisions (the specification recommends\n // naming them in any error returned to `initialize`, and\n // rules out falling back once the modern era is confirmed).\n const requestedVersion =\n message.params !== null &&\n typeof message.params === 'object' &&\n typeof (message.params as { protocolVersion?: unknown }).protocolVersion === 'string'\n ? ((message.params as { protocolVersion: string }).protocolVersion as string)\n : undefined;\n await answerLegacyRejection(message, 'initialize', requestedVersion);\n return;\n }\n if (state.era === 'modern' && (await tryServeListen(message))) {\n return;\n }\n state.instance.channel.deliver(message);\n return;\n }\n\n // Negotiation window ('opening' | 'probe').\n if (!isJSONRPCRequest(message) && !isJSONRPCNotification(message)) {\n // A JSON-RPC response before any era is pinned: nothing has been\n // asked of the client yet, so there is nothing it can answer.\n reportError(new Error('Discarded a JSON-RPC response received before the connection negotiated an era'));\n return;\n }\n\n const opening = classifyOpeningMessage(message);\n switch (opening.kind) {\n case 'invalid-envelope': {\n const detail = `Invalid _meta envelope for protocol revision 2026-07-28: ${opening.issue.key}: ${opening.issue.problem}`;\n if (isJSONRPCRequest(message)) {\n await writeErrorResponse(message.id, ProtocolErrorCode.InvalidParams, detail, { envelope: opening.issue });\n } else {\n reportError(new Error(`Discarded a notification with a malformed envelope: ${detail}`));\n }\n return;\n }\n case 'unsupported-revision': {\n if (isJSONRPCRequest(message)) {\n const error = new UnsupportedProtocolVersionError({\n supported: [...SUPPORTED_MODERN_PROTOCOL_VERSIONS],\n requested: opening.requested\n });\n reportError(error);\n await writeErrorResponse(message.id, error.code, error.message, error.data);\n } else {\n reportError(new Error(`Discarded a notification claiming unsupported protocol revision ${opening.requested}`));\n }\n return;\n }\n case 'modern': {\n if (isJSONRPCRequest(message) && message.method === 'server/discover') {\n if (state.phase === 'probe') {\n // A repeated probe is answered by the same optimistic\n // instance and the negotiation window stays open: only\n // a non-discover enveloped request commits the\n // connection to the modern era, so a later fallback\n // `initialize` is still served by a fresh legacy\n // instance.\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n // Probe: answer from an optimistically built modern\n // instance so the advertisement reflects the real server\n // definition, but do not pin the connection yet — the\n // client may still fall back to `initialize` when it\n // shares no modern revision with the advertisement.\n const instance = await connectInstance('modern', opening.revision);\n if (isTornDown()) {\n // The connection was torn down while the factory was\n // building the probe instance: dispose of it and stay\n // closed instead of resurrecting the negotiation\n // window; nothing is delivered or answered.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'probe', instance };\n instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n if (state.phase === 'probe') {\n if (isJSONRPCNotification(message)) {\n // An enveloped notification during the negotiation\n // window (for example a notifications/cancelled for\n // the probe itself) is delivered to the probe instance\n // without committing the era: only a non-discover\n // enveloped request pins the connection, so a later\n // fallback `initialize` is still served by a fresh\n // legacy instance.\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n // The probe was followed by a modern request: the client\n // committed to the modern era — pin the probe instance.\n state = { phase: 'pinned', era: 'modern', instance: state.instance };\n } else {\n const instance = await connectInstance('modern', opening.revision);\n if (isTornDown()) {\n // Closed while the factory was building the modern\n // instance: dispose of it and stay closed.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'pinned', era: 'modern', instance };\n }\n if (await tryServeListen(message)) {\n return;\n }\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n case 'legacy': {\n if (legacyMode === 'reject') {\n if (isJSONRPCRequest(message)) {\n await answerLegacyRejection(message, opening.reason, opening.requestedVersion);\n }\n // Claim-less notifications are accepted and dropped (the\n // stdio analog of the HTTP entry's 202-and-drop); the\n // connection stays open for a modern opening.\n return;\n }\n if (state.phase === 'probe') {\n // Probe-then-fallback: the client probed, found no\n // mutually supported modern revision, and fell back to\n // the 2025 handshake on the same connection. The probe\n // instance is discarded; a fresh legacy instance serves\n // the handshake.\n await discardProbeInstance(state.instance);\n if (isTornDown()) {\n // Closed while the probe was being discarded: stay closed.\n return;\n }\n state = { phase: 'opening' };\n }\n const instance = await connectInstance('legacy');\n if (isTornDown()) {\n // Closed while the factory was building the legacy\n // instance: dispose of it and stay closed.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'pinned', era: 'legacy', instance };\n state.instance.channel.deliver(message);\n return;\n }\n }\n };\n\n // Inbound messages are processed strictly in arrival order: the queue\n // absorbs anything that arrives while the opening exchange is still being\n // decided (factory construction and instance connection are async).\n const queue: JSONRPCMessage[] = [];\n let pumping = false;\n const pump = async (): Promise<void> => {\n if (pumping) {\n return;\n }\n pumping = true;\n try {\n while (queue.length > 0) {\n const message = queue.shift()!;\n try {\n await processMessage(message);\n } catch (error) {\n // Every arm of processMessage that answers a request does\n // so through writeErrorResponse (which never throws — wire\n // failures are routed to onerror) and returns right after,\n // so an error escaping to here means the request was never\n // answered. Answer it now: a throwing factory or a failed\n // connect during the opening exchange must not leave the\n // client's request hanging (the stdio analog of the HTTP\n // entry's internal-server-error response). Notifications\n // carry no id to answer and are only reported.\n if (isJSONRPCRequest(message)) {\n await writeErrorResponse(message.id, ProtocolErrorCode.InternalError, 'Internal server error');\n }\n reportError(toError(error));\n }\n }\n } finally {\n pumping = false;\n }\n };\n\n const closeAll = async (): Promise<void> => {\n if (closing || state.phase === 'closed') {\n return;\n }\n closing = true;\n const current = state;\n state = { phase: 'closed' };\n // Stdio server-side graceful teardown: emit the empty\n // `subscriptions/listen` JSON-RPC result for every active subscription\n // (the spec's graceful-close signal — `SubscriptionsListenResult`)\n // before the wire is closed, so the client distinguishes graceful end\n // from a transport drop.\n for (const result of listenRouter.teardownAll()) {\n await wire.send(result).catch(error => reportError(toError(error)));\n }\n if (current.phase === 'probe' || current.phase === 'pinned') {\n await current.instance.product.close().catch(error => reportError(toError(error)));\n }\n await wire.close().catch(error => reportError(toError(error)));\n };\n\n wire.onmessage = (message: JSONRPCMessage) => {\n queue.push(message);\n void pump();\n };\n wire.onerror = error => {\n reportError(error);\n if (state.phase === 'probe' || state.phase === 'pinned') {\n state.instance.channel.onerror?.(error);\n }\n };\n wire.onclose = () => {\n if (closing || state.phase === 'closed') {\n return;\n }\n closing = true;\n const current = state;\n state = { phase: 'closed' };\n if (current.phase === 'probe' || current.phase === 'pinned') {\n void current.instance.product.close().catch(error => reportError(toError(error)));\n }\n };\n\n const started = wire.start().catch(error => {\n reportError(toError(error));\n throw error;\n });\n // Surface a failed start through onerror (above); close() still resolves.\n started.catch(() => {});\n\n return {\n close: async () => {\n await started.catch(() => {});\n await closeAll();\n }\n };\n}\n\nfunction toError(value: unknown): Error {\n return value instanceof Error ? value : new Error(String(value));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;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AAM,SAAS,QAAQ,UAAU,MAAM;;AAG/C,MAAK,gBAAgB;AACjB,MAAI,WAAW,MAAM,UAAU,SAC3B;AAEJ,YAAU;EACV,MAAM,UAAU;AAChB,UAAQ,EAAE,OAAO,UAAU;AAC3B,MAAI,QAAQ,UAAU,WAAW,QAAQ,UAAU,SAC/C,CAAK,QAAQ,SAAS,QAAQ,OAAO,CAAC,OAAM,UAAS,YAAY,QAAQ,MAAM,CAAC,CAAC;;CAIzF,MAAM,UAAU,KAAK,OAAO,CAAC,OAAM,UAAS;AACxC,cAAY,QAAQ,MAAM,CAAC;AAC3B,QAAM;GACR;AAEF,SAAQ,YAAY,GAAG;AAEvB,QAAO,EACH,OAAO,YAAY;AACf,QAAM,QAAQ,YAAY,GAAG;AAC7B,QAAM,UAAU;IAEvB;;AAGL,SAAS,QAAQ,OAAuB;AACpC,QAAO,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,MAAM,CAAC"} |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { X as Transport, o as McpServerFactory, yn as JSONRPCMessage } from "./createMcpHandler-DncDnS1h.cjs"; | ||
| import { at as Transport, dr as JSONRPCMessage, o as McpServerFactory } from "./createMcpHandler-BRM5MGf9.cjs"; | ||
| import { Readable, Writable } from "node:stream"; | ||
@@ -3,0 +3,0 @@ |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import { it as Transport, o as McpServerFactory, ur as JSONRPCMessage } from "./createMcpHandler-D1q2h_Yl.mjs"; | ||
| import { at as Transport, dr as JSONRPCMessage, o as McpServerFactory } from "./createMcpHandler-D93NefGZ.mjs"; | ||
| import { Readable, Writable } from "node:stream"; | ||
@@ -3,0 +3,0 @@ |
+2
-1
@@ -1,2 +0,3 @@ | ||
| import { $ as hasEnvelopeClaim, G as isJSONRPCNotification, J as isJSONRPCResultResponse, K as isJSONRPCRequest, P as modernOnlyStrictRejection, Q as envelopeClaimVersion, W as isJSONRPCErrorResponse, at as UnsupportedProtocolVersionError, c as StdioListenRouter, ct as SUPPORTED_MODERN_PROTOCOL_VERSIONS, et as requestMetaOf, g as ReadBuffer, i as installModernOnlyHandlers, j as carriesValidModernEnvelopeClaim, s as DEFAULT_MAX_SUBSCRIPTIONS, st as ProtocolErrorCode, t as McpServer, tt as validateEnvelopeMeta, w as setNegotiatedProtocolVersion, y as serializeMessage } from "./mcp-CM8J1mhp.mjs"; | ||
| import { c as StdioListenRouter, i as installModernOnlyHandlers, s as DEFAULT_MAX_SUBSCRIPTIONS, t as McpServer } from "./mcp-Ctiu4nBa.mjs"; | ||
| import { F as carriesValidModernEnvelopeClaim, J as isJSONRPCErrorResponse, Q as isJSONRPCResultResponse, R as modernOnlyStrictRejection, X as isJSONRPCRequest, Y as isJSONRPCNotification, at as requestMetaOf, c as ReadBuffer, d as serializeMessage, ft as UnsupportedProtocolVersionError, it as hasEnvelopeClaim, mt as ProtocolErrorCode, ot as validateEnvelopeMeta, rt as envelopeClaimVersion, vt as SUPPORTED_MODERN_PROTOCOL_VERSIONS, y as setNegotiatedProtocolVersion } from "./src-D5Nfqtoz.mjs"; | ||
| import { process } from "@modelcontextprotocol/server/_shims"; | ||
@@ -3,0 +4,0 @@ |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"stdio.mjs","names":["_stdin: Readable","_stdout: Writable","_wire: Transport","_onInstanceClose: () => void","_outboundIntercept?: (message: JSONRPCMessage) => 'handled' | undefined","state: EntryState","discarding: StdioConnectionChannel | undefined","channel: StdioConnectionChannel","queue: JSONRPCMessage[]"],"sources":["../src/server/stdio.ts","../src/server/serveStdio.ts"],"sourcesContent":["import type { Readable, Writable } from 'node:stream';\n\nimport type { JSONRPCMessage, Transport } from '@modelcontextprotocol/core-internal';\nimport { ReadBuffer, serializeMessage } from '@modelcontextprotocol/core-internal';\nimport { process } from '@modelcontextprotocol/server/_shims';\n\n/**\n * Server transport for stdio: this communicates with an MCP client by reading from the current process' `stdin` and writing to `stdout`.\n *\n * This transport is only available in Node.js environments.\n *\n * @example\n * ```ts source=\"./stdio.examples.ts#StdioServerTransport_basicUsage\"\n * const server = new McpServer({ name: 'my-server', version: '1.0.0' });\n * const transport = new StdioServerTransport();\n * await server.connect(transport);\n * ```\n */\nexport class StdioServerTransport implements Transport {\n private _readBuffer: ReadBuffer;\n private _started = false;\n private _closed = false;\n\n constructor(\n private _stdin: Readable = process.stdin,\n private _stdout: Writable = process.stdout,\n options?: {\n /**\n * Maximum size of the read buffer in bytes. If a single message exceeds\n * this size the transport will emit an error and close.\n *\n * Defaults to 10 MB.\n */\n maxBufferSize?: number;\n }\n ) {\n this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });\n }\n\n onclose?: () => void;\n onerror?: (error: Error) => void;\n onmessage?: (message: JSONRPCMessage) => void;\n\n // Arrow functions to bind `this` properly, while maintaining function identity.\n _ondata = (chunk: Buffer) => {\n try {\n this._readBuffer.append(chunk);\n this.processReadBuffer();\n } catch (error) {\n this.onerror?.(error as Error);\n this.close().catch(() => {});\n }\n };\n _onerror = (error: Error) => {\n this.onerror?.(error);\n };\n _onstdouterror = (error: Error) => {\n this.onerror?.(error);\n this.close().catch(() => {\n // Ignore errors during close — we're already in an error path\n });\n };\n\n /**\n * Starts listening for messages on `stdin`.\n */\n async start(): Promise<void> {\n if (this._started) {\n throw new Error(\n 'StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.'\n );\n }\n\n this._started = true;\n this._stdin.on('data', this._ondata);\n this._stdin.on('error', this._onerror);\n this._stdout.on('error', this._onstdouterror);\n }\n\n private processReadBuffer() {\n while (true) {\n try {\n const message = this._readBuffer.readMessage();\n if (message === null) {\n break;\n }\n\n this.onmessage?.(message);\n } catch (error) {\n this.onerror?.(error as Error);\n }\n }\n }\n\n async close(): Promise<void> {\n if (this._closed) {\n return;\n }\n this._closed = true;\n\n // Remove our event listeners first\n this._stdin.off('data', this._ondata);\n this._stdin.off('error', this._onerror);\n this._stdout.off('error', this._onstdouterror);\n\n // Check if we were the only data listener\n const remainingDataListeners = this._stdin.listenerCount('data');\n if (remainingDataListeners === 0) {\n // Only pause stdin if we were the only listener\n // This prevents interfering with other parts of the application that might be using stdin\n this._stdin.pause();\n }\n\n // Clear the buffer and notify closure\n this._readBuffer.clear();\n this.onclose?.();\n }\n\n send(message: JSONRPCMessage): Promise<void> {\n if (this._closed) {\n return Promise.reject(new Error('StdioServerTransport is closed'));\n }\n return new Promise((resolve, reject) => {\n const json = serializeMessage(message);\n\n let settled = false;\n const onError = (error: Error) => {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n this._stdout.off('drain', onDrain);\n reject(error);\n };\n const onDrain = () => {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n this._stdout.off('drain', onDrain);\n resolve();\n };\n\n this._stdout.once('error', onError);\n\n if (this._stdout.write(json)) {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n resolve();\n } else if (!settled) {\n this._stdout.once('drain', onDrain);\n }\n });\n }\n}\n","/**\n * `serveStdio` — the stdio entry point for serving the 2026-07-28 protocol\n * revision on a long-lived connection, with 2025-era serving as the default\n * for clients that open with the `initialize` handshake.\n *\n * The entry owns the stdio transport and the era decision for the connection.\n * It classifies the connection's opening exchange exactly once (using the\n * same body-primary rules as the HTTP entry), constructs ONE server instance\n * from the consumer's factory for the era the client opened with, pins that\n * instance for the lifetime of the connection, and passes every later message\n * straight through to it. No per-message era classification ever runs after\n * the connection is pinned — exactly mirroring how `createMcpHandler`\n * classifies an HTTP request before any instance exists.\n *\n * The opening exchange:\n *\n * - An `initialize` request (or any claim-less message) opens a 2025-era\n * session: the factory builds a legacy instance and the connection is\n * pinned to it (`legacy: 'serve'`, the default). With `legacy: 'reject'`\n * the opening is answered with the unsupported-protocol-version error\n * naming the supported modern revisions instead.\n * - A request carrying a valid per-request `_meta` envelope naming a\n * supported modern revision pins the connection to a modern instance\n * (era-marked and given the modern-only handlers, exactly like the HTTP\n * entry's modern path).\n * - A `server/discover` probe is answered by an optimistically built modern\n * instance but does NOT pin the connection yet: the spec's stdio\n * backward-compatibility flow lets a client probe first and then either\n * continue with modern requests (which pins the connection modern) or fall\n * back to the `initialize` handshake when no mutually supported modern\n * revision exists — in which case the probe instance is discarded and a\n * fresh legacy instance serves the handshake.\n * - Once the modern era is pinned, a later claim-less `initialize` is\n * rejected with the unsupported-protocol-version error naming the supported\n * revisions (the spec recommends naming them in any error returned to\n * `initialize`, and forbids falling back once the modern era is confirmed).\n *\n * Every instance the factory produces serves exactly one era; the ambiguity\n * of the opening exchange lives entirely in this entry. In the probe-fallback\n * case the factory is called twice (once for the discarded probe instance,\n * once for the legacy instance), so factories should be cheap and\n * side-effect-free to construct — the same expectation `createMcpHandler`\n * already sets for per-request construction.\n *\n * Hand-constructed servers connected directly to a `StdioServerTransport`\n * are unaffected by this entry: they keep serving the 2025-era protocol they\n * were written for.\n */\nimport type {\n CancelledNotificationParams,\n JSONRPCMessage,\n JSONRPCNotification,\n JSONRPCRequest,\n MessageClassification,\n MessageExtraInfo,\n RequestId,\n Transport,\n TransportSendOptions\n} from '@modelcontextprotocol/core-internal';\nimport {\n carriesValidModernEnvelopeClaim,\n envelopeClaimVersion,\n hasEnvelopeClaim,\n isJSONRPCErrorResponse,\n isJSONRPCNotification,\n isJSONRPCRequest,\n isJSONRPCResultResponse,\n modernOnlyStrictRejection,\n ProtocolErrorCode,\n requestMetaOf,\n setNegotiatedProtocolVersion,\n SUPPORTED_MODERN_PROTOCOL_VERSIONS,\n UnsupportedProtocolVersionError,\n validateEnvelopeMeta\n} from '@modelcontextprotocol/core-internal';\n\nimport type { McpServerFactory } from './createMcpHandler';\nimport { DEFAULT_MAX_SUBSCRIPTIONS, StdioListenRouter } from './listenRouter';\nimport { McpServer } from './mcp';\nimport type { Server } from './server';\nimport { installModernOnlyHandlers } from './server';\nimport { StdioServerTransport } from './stdio';\n\n/** Options for {@linkcode serveStdio}. */\nexport interface ServeStdioOptions {\n /**\n * How a 2025-era opening (an `initialize` request, or any claim-less\n * message) is handled:\n *\n * - `'serve'` (default) — the connection is pinned to a 2025-era instance\n * from the same factory and served exactly as a hand-wired stdio server\n * serves it today.\n * - `'reject'` — the opening request is answered with the\n * unsupported-protocol-version error naming the supported modern\n * revisions (claim-less notifications are dropped); the connection\n * stays open for a modern opening.\n */\n legacy?: 'serve' | 'reject';\n /**\n * Bring your own transport (for example a `StdioServerTransport`\n * constructed over a Unix domain socket or TCP stream, per the stdio\n * binding's custom-transport guidance). Defaults to a\n * {@linkcode StdioServerTransport} over the current process's stdio. The\n * entry owns the transport: it starts it, receives every inbound message,\n * and closes it when the connection ends.\n */\n transport?: Transport;\n /** Callback for out-of-band errors (reporting only; it never alters what is written to the wire). */\n onerror?: (error: Error) => void;\n /**\n * Reject a new `subscriptions/listen` with `-32603` 'Subscription limit\n * reached' (in-band, before the ack) when this many subscriptions are\n * already open on this connection.\n * @default 1024\n */\n maxSubscriptions?: number;\n}\n\n/** The handle returned by {@linkcode serveStdio}. */\nexport interface StdioServerHandle {\n /** Tears the connection down: closes the pinned instance (if any) and the underlying transport. */\n close(): Promise<void>;\n}\n\n/* ------------------------------------------------------------------------ *\n * Per-instance channel\n * ------------------------------------------------------------------------ */\n\n/**\n * How long the probe-discard path waits for the probe instance to answer the\n * requests it was delivered before closing it. The wait normally settles as\n * soon as the DiscoverResult is handed to the wire (or immediately, when a\n * delivered cancellation already settled the probe); the bound is a backstop\n * so no edge can ever hold the connection's inbound pump indefinitely behind\n * the discard.\n */\nconst DISCARD_ANSWER_TIMEOUT_MS = 3000;\n\n/**\n * The transport a pinned instance is connected to: a thin channel that writes\n * through to the entry-owned wire transport and receives the messages the\n * entry forwards. The wire transport itself is never handed to an instance —\n * that is what lets the entry discard an optimistic probe instance (close the\n * channel) without tearing down the connection.\n */\nclass StdioConnectionChannel implements Transport {\n onclose?: () => void;\n onerror?: (error: Error) => void;\n onmessage?: <T extends JSONRPCMessage>(message: T, extra?: MessageExtraInfo) => void;\n\n private _closed = false;\n /** Request ids the entry delivered to the instance that the instance has not yet answered. */\n private readonly _pendingRequests = new Set<RequestId>();\n private _drainWaiters: Array<() => void> = [];\n\n constructor(\n private readonly _wire: Transport,\n private readonly _onInstanceClose: () => void,\n /**\n * Optional first-look on outbound messages. When set and returning\n * `'handled'`, the channel does not write the message to the wire\n * (the entry already wrote whatever was appropriate). Used by the\n * modern-era listen router to fan a change notification out onto the\n * active subscriptions instead of broadcasting it unsolicited.\n */\n private readonly _outboundIntercept?: (message: JSONRPCMessage) => 'handled' | undefined\n ) {}\n\n async start(): Promise<void> {\n // The entry already started the wire transport; connecting an\n // instance to its channel must not start anything again.\n }\n\n async send(message: JSONRPCMessage, options?: TransportSendOptions): Promise<void> {\n if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {\n // The instance answered a delivered request: settle it whether or\n // not the wire write below succeeds (write failures surface\n // through the wire's own error reporting).\n const { id } = message;\n if (id !== undefined) {\n this._settle(id);\n }\n }\n if (this._closed) {\n // A discarded or torn-down instance has nowhere to write; late\n // sends are dropped.\n return;\n }\n if (this._outboundIntercept?.(message) === 'handled') {\n return;\n }\n return this._wire.send(message, options);\n }\n\n setProtocolVersion = (version: string): void => {\n this._wire.setProtocolVersion?.(version);\n };\n\n /** Forwards one inbound message to the connected instance. */\n deliver(message: JSONRPCMessage, extra?: MessageExtraInfo): void {\n if (this._closed) {\n return;\n }\n if (isJSONRPCRequest(message)) {\n this._pendingRequests.add(message.id);\n } else if (isJSONRPCNotification(message) && message.method === 'notifications/cancelled') {\n // By protocol contract a cancelled request may legitimately go\n // unanswered (the instance aborts the in-flight handler and writes\n // nothing for it), so a delivered cancellation settles the request\n // it names: nothing should keep waiting for an answer that may\n // never come. Non-cancelled requests still settle only when their\n // answer is handed to the wire.\n const cancelledId = (message.params as CancelledNotificationParams | undefined)?.requestId;\n if (cancelledId !== undefined) {\n this._settle(cancelledId);\n }\n }\n this.onmessage?.(message, extra);\n }\n\n /**\n * Resolves once every request delivered to the instance has been answered\n * through {@linkcode send}, settled by a delivered cancellation, or the\n * channel has been closed and nothing further can be answered. The wait is\n * bounded by `timeoutMs` as a backstop so no edge can hold the caller\n * indefinitely; resolves `false` only when the bound elapsed with requests\n * still unanswered. Used by the probe-discard path so a probe request the\n * entry accepted is never silently dropped.\n */\n async whenRequestsAnswered(timeoutMs: number): Promise<boolean> {\n if (this._closed || this._pendingRequests.size === 0) {\n return true;\n }\n return await new Promise<boolean>(resolve => {\n const waiter = (): void => {\n clearTimeout(timer);\n resolve(true);\n };\n const timer = setTimeout(() => {\n this._drainWaiters = this._drainWaiters.filter(pending => pending !== waiter);\n resolve(false);\n }, timeoutMs);\n this._drainWaiters.push(waiter);\n });\n }\n\n async close(): Promise<void> {\n if (this._closed) {\n return;\n }\n this._closed = true;\n // Nothing further can be answered through a closed channel; release\n // anyone waiting on in-flight answers.\n this._pendingRequests.clear();\n this._releaseDrainWaiters();\n try {\n this._onInstanceClose();\n } finally {\n this.onclose?.();\n }\n }\n\n private _settle(id: RequestId): void {\n this._pendingRequests.delete(id);\n if (this._pendingRequests.size === 0) {\n this._releaseDrainWaiters();\n }\n }\n\n private _releaseDrainWaiters(): void {\n const waiters = this._drainWaiters;\n this._drainWaiters = [];\n for (const waiter of waiters) {\n waiter();\n }\n }\n}\n\n/* ------------------------------------------------------------------------ *\n * Opening-exchange classification\n * ------------------------------------------------------------------------ */\n\ninterface EnvelopeIssue {\n key: string;\n problem: string;\n}\n\ntype OpeningClassification =\n /** A 2025-era opening: `initialize`, or any message without an envelope claim. */\n | { kind: 'legacy'; reason: 'initialize' | 'no-claim'; requestedVersion?: string }\n /** A valid envelope claim naming a modern revision this entry serves. */\n | { kind: 'modern'; revision: string; classification: MessageClassification }\n /** A present envelope claim whose envelope is malformed. */\n | { kind: 'invalid-envelope'; issue: EnvelopeIssue }\n /** A valid envelope claim naming a revision this entry does not serve (unknown future or 2025-era). */\n | { kind: 'unsupported-revision'; requested: string };\n\n/**\n * Classifies one message of the opening exchange with the same body-primary\n * rules the HTTP entry applies per request: `initialize` is the legacy\n * handshake unless it carries a valid modern envelope claim; a present claim\n * is validated (never silently ignored); a claim-less message is 2025-era\n * traffic. There is no header layer on stdio, so the body is the only signal.\n */\nfunction classifyOpeningMessage(message: JSONRPCRequest | JSONRPCNotification): OpeningClassification {\n const params = message.params;\n\n if (message.method === 'initialize' && !carriesValidModernEnvelopeClaim(params)) {\n const requestedVersion =\n params !== null && typeof params === 'object' && typeof (params as { protocolVersion?: unknown }).protocolVersion === 'string'\n ? ((params as { protocolVersion: string }).protocolVersion as string)\n : undefined;\n return { kind: 'legacy', reason: 'initialize', ...(requestedVersion !== undefined && { requestedVersion }) };\n }\n\n if (!hasEnvelopeClaim(params)) {\n return { kind: 'legacy', reason: 'no-claim' };\n }\n\n // A present claim is validated, never silently ignored — a malformed\n // envelope behind the claim is an invalid-params answer, not a fall back\n // to legacy serving (mirrors the HTTP entry's envelope rung).\n const meta = requestMetaOf(params);\n const issues = meta === undefined ? [] : validateEnvelopeMeta(meta);\n const firstIssue = issues[0];\n if (firstIssue !== undefined) {\n return { kind: 'invalid-envelope', issue: firstIssue };\n }\n\n const claimedVersion = envelopeClaimVersion(params);\n if (claimedVersion === undefined || !SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) {\n // The claim names a revision this entry does not serve (an unknown\n // future revision, or a 2025-era revision delivered via the envelope\n // mechanism) — answered like the HTTP entry's modern path.\n return { kind: 'unsupported-revision', requested: claimedVersion ?? 'unknown' };\n }\n\n return { kind: 'modern', revision: claimedVersion, classification: { era: 'modern', revision: claimedVersion } };\n}\n\n/* ------------------------------------------------------------------------ *\n * The entry\n * ------------------------------------------------------------------------ */\n\ninterface ConnectedInstance {\n product: McpServer | Server;\n channel: StdioConnectionChannel;\n}\n\ntype EntryState =\n /** Waiting for the connection's opening message. */\n | { phase: 'opening' }\n /** A `server/discover` probe was answered; the era is not pinned yet. */\n | { phase: 'probe'; instance: ConnectedInstance }\n /** The connection is pinned to one instance serving one era. */\n | { phase: 'pinned'; era: 'legacy' | 'modern'; instance: ConnectedInstance }\n | { phase: 'closed' };\n\n/**\n * Serves MCP over stdio from a server factory, owning the era decision for\n * the connection: the opening exchange selects the era, ONE instance from the\n * factory is pinned for the connection lifetime, and everything after passes\n * straight through to it. See the module documentation for the opening rules.\n *\n * ```ts\n * import { serveStdio } from '@modelcontextprotocol/server/stdio';\n *\n * serveStdio(() => {\n * const server = new McpServer({ name: 'my-server', version: '1.0.0' }, { capabilities: { tools: {} } });\n * // register tools/resources/prompts once — the same factory serves both eras\n * return server;\n * });\n * ```\n */\nexport function serveStdio(factory: McpServerFactory, options: ServeStdioOptions = {}): StdioServerHandle {\n const legacyMode = options.legacy ?? 'serve';\n const wire = options.transport ?? new StdioServerTransport();\n\n let state: EntryState = { phase: 'opening' };\n /** Channel currently being discarded (its close must not tear the connection down). */\n let discarding: StdioConnectionChannel | undefined;\n let closing = false;\n\n /**\n * Whether the connection has been torn down (`handle.close()` or the wire\n * closing). The opening arms re-check this after every await: a close can\n * race factory construction, and the continuation must neither resurrect\n * the connection state nor keep a late-resolved instance around.\n */\n const isTornDown = (): boolean => closing || state.phase === 'closed';\n\n const reportError = (error: Error) => {\n try {\n options.onerror?.(error);\n } catch {\n // Reporting must never affect the wire.\n }\n };\n\n const writeErrorResponse = (id: RequestId, code: number, message: string, data?: unknown): Promise<void> =>\n wire\n .send({ jsonrpc: '2.0', id, error: { code, message, ...(data !== undefined && { data }) } })\n .catch(error => reportError(toError(error)));\n\n /**\n * Entry-handled `subscriptions/listen` for this connection: holds the\n * active subscriptions, serves inbound listen / cancelled-of-listen\n * before the pinned instance is consulted, and rewrites the instance's\n * outbound change notifications onto the active subscriptions. Only\n * consulted on a modern-pinned connection — on a legacy connection\n * change notifications pass straight through (the 2025 unsolicited\n * delivery model is unchanged).\n */\n const listenRouter = new StdioListenRouter(options.maxSubscriptions ?? DEFAULT_MAX_SUBSCRIPTIONS);\n\n /** Outbound intercept installed on a modern instance's channel. */\n const modernOutboundIntercept = (message: JSONRPCMessage): 'handled' | undefined => {\n if (!isJSONRPCNotification(message)) return undefined;\n const routed = listenRouter.routeOutbound(message);\n if (routed === 'passthrough') return undefined;\n // A subscription-gated change notification on the modern era: one\n // stamped copy per subscription that opted in (an empty array means\n // it is dropped — the modern era never delivers an un-requested\n // change type unsolicited). Nothing else from the instance is\n // affected.\n for (const stamped of routed) {\n void wire.send({ jsonrpc: '2.0', ...stamped }).catch(error => reportError(toError(error)));\n }\n return 'handled';\n };\n\n /**\n * Entry-handled inbound listen routing for a modern-pinned connection.\n * Returns `true` when the message was served at the entry and must NOT\n * be delivered to the pinned instance.\n */\n const tryServeListen = async (message: JSONRPCMessage): Promise<boolean> => {\n if (isJSONRPCRequest(message) && message.method === 'subscriptions/listen') {\n // Entry-handled listen is its own request-handling subsystem; it\n // applies the same per-request envelope rung the instance's\n // `_onrequest` would (method-existence is N/A here — the entry\n // recognized the method — so envelope validation is the first\n // applicable rung) and the same supported-revision check the\n // opening classifier and the HTTP entry apply per request. Reuses\n // the same validators the opening classifier uses.\n const meta = requestMetaOf(message.params);\n const issue = hasEnvelopeClaim(message.params)\n ? (meta === undefined ? [] : validateEnvelopeMeta(meta))[0]\n : { key: '_meta', problem: 'the per-request envelope is required on protocol revision 2026-07-28' };\n const claimedVersion = envelopeClaimVersion(message.params);\n let reply;\n if (issue !== undefined) {\n reply = {\n jsonrpc: '2.0' as const,\n id: message.id,\n error: { code: -32_602, message: `Invalid _meta envelope: ${issue.key}: ${issue.problem}` }\n };\n } else if (claimedVersion === undefined || !SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) {\n const error = new UnsupportedProtocolVersionError({\n supported: [...SUPPORTED_MODERN_PROTOCOL_VERSIONS],\n requested: claimedVersion ?? 'unknown'\n });\n reply = { jsonrpc: '2.0' as const, id: message.id, error: { code: error.code, message: error.message, data: error.data } };\n } else {\n reply = listenRouter.serve(message);\n }\n await wire\n .send('error' in reply ? reply : { jsonrpc: '2.0', method: reply.method, params: reply.params })\n .catch(error => reportError(toError(error)));\n return true;\n }\n if (isJSONRPCNotification(message) && message.method === 'notifications/cancelled') {\n const cancelledId = (message.params as CancelledNotificationParams | undefined)?.requestId;\n // Inbound cancel of a parked listen: tear the subscription down\n // and DO NOT deliver to the instance (it never saw the listen\n // request). After this point nothing further is delivered for\n // that subscription id (post-cancel hardening).\n if (cancelledId !== undefined && listenRouter.cancel(cancelledId)) {\n return true;\n }\n }\n return false;\n };\n\n /** Answers a 2025-era request the entry will not serve (the modern-only rejection cells). */\n const answerLegacyRejection = (\n request: JSONRPCRequest,\n reason: 'initialize' | 'no-claim',\n requestedVersion?: string\n ): Promise<void> => {\n const rejection = modernOnlyStrictRejection(\n { kind: 'legacy', reason, ...(requestedVersion !== undefined && { requestedVersion }) },\n SUPPORTED_MODERN_PROTOCOL_VERSIONS\n );\n if (rejection === undefined) {\n return Promise.resolve();\n }\n reportError(new Error(`Rejected 2025-era request on a modern-only stdio connection (${rejection.cell}): ${rejection.message}`));\n return writeErrorResponse(request.id, rejection.code, rejection.message, rejection.data);\n };\n\n const onInstanceClosed = (channel: StdioConnectionChannel) => {\n if (closing || channel === discarding) {\n return;\n }\n // The pinned (or probe) instance was closed from the instance side:\n // the connection is over.\n void closeAll();\n };\n\n const connectInstance = async (era: 'legacy' | 'modern', revision?: string): Promise<ConnectedInstance> => {\n const product = await factory({ era });\n const server = product instanceof McpServer ? product.server : product;\n if (era === 'modern') {\n // Era-write at instance binding, then modern-only handler\n // installation — the same helpers the HTTP entry's modern path\n // uses, before the instance is connected.\n setNegotiatedProtocolVersion(server, revision);\n installModernOnlyHandlers(server, SUPPORTED_MODERN_PROTOCOL_VERSIONS);\n // The listen router was created before this instance existed; now\n // that capabilities are known, hand them over so the acknowledged\n // filter is narrowed against what the server actually advertises.\n listenRouter.setServerCapabilities(server.getCapabilities());\n }\n const channel: StdioConnectionChannel = new StdioConnectionChannel(\n wire,\n () => onInstanceClosed(channel),\n era === 'modern' ? modernOutboundIntercept : undefined\n );\n await product.connect(channel);\n return { product, channel };\n };\n\n /** Closes an instance whose factory resolved only after the connection was torn down. */\n const disposeLateInstance = (instance: ConnectedInstance): Promise<void> =>\n instance.product.close().catch(error => reportError(toError(error)));\n\n const discardProbeInstance = async (instance: ConnectedInstance): Promise<void> => {\n // The probe instance served only the discover exchange; closing its\n // channel must not tear down the connection the fallback is about to\n // continue on.\n discarding = instance.channel;\n try {\n // A probe request the entry accepted must never go silently\n // unanswered: a client may pipeline its fallback `initialize`\n // straight behind `server/discover` without waiting, and closing\n // the instance aborts whatever it still has in flight. Let the\n // in-flight DiscoverResult reach the wire before the instance is\n // closed; the probe instance only ever receives `server/discover`,\n // whose entry-installed handler always answers promptly. A probe\n // the client cancelled is already settled by the delivered\n // cancellation (a cancelled request may go unanswered), and the\n // wait is bounded as a backstop so nothing can wedge the\n // connection's pump behind the discard.\n const answered = await instance.channel.whenRequestsAnswered(DISCARD_ANSWER_TIMEOUT_MS);\n if (!answered) {\n reportError(\n new Error(\n `Discarded the probe instance with requests still unanswered after ${DISCARD_ANSWER_TIMEOUT_MS}ms; continuing with the fallback`\n )\n );\n }\n await instance.product.close();\n } catch (error) {\n reportError(toError(error));\n } finally {\n discarding = undefined;\n }\n };\n\n const processMessage = async (message: JSONRPCMessage): Promise<void> => {\n if (state.phase === 'closed') {\n return;\n }\n\n if (state.phase === 'pinned') {\n if (\n state.era === 'modern' &&\n isJSONRPCRequest(message) &&\n message.method === 'initialize' &&\n !carriesValidModernEnvelopeClaim(message.params)\n ) {\n // The modern era is confirmed for this connection; a late\n // legacy handshake is answered with the version error naming\n // the supported revisions (the specification recommends\n // naming them in any error returned to `initialize`, and\n // rules out falling back once the modern era is confirmed).\n const requestedVersion =\n message.params !== null &&\n typeof message.params === 'object' &&\n typeof (message.params as { protocolVersion?: unknown }).protocolVersion === 'string'\n ? ((message.params as { protocolVersion: string }).protocolVersion as string)\n : undefined;\n await answerLegacyRejection(message, 'initialize', requestedVersion);\n return;\n }\n if (state.era === 'modern' && (await tryServeListen(message))) {\n return;\n }\n state.instance.channel.deliver(message);\n return;\n }\n\n // Negotiation window ('opening' | 'probe').\n if (!isJSONRPCRequest(message) && !isJSONRPCNotification(message)) {\n // A JSON-RPC response before any era is pinned: nothing has been\n // asked of the client yet, so there is nothing it can answer.\n reportError(new Error('Discarded a JSON-RPC response received before the connection negotiated an era'));\n return;\n }\n\n const opening = classifyOpeningMessage(message);\n switch (opening.kind) {\n case 'invalid-envelope': {\n const detail = `Invalid _meta envelope for protocol revision 2026-07-28: ${opening.issue.key}: ${opening.issue.problem}`;\n if (isJSONRPCRequest(message)) {\n await writeErrorResponse(message.id, ProtocolErrorCode.InvalidParams, detail, { envelope: opening.issue });\n } else {\n reportError(new Error(`Discarded a notification with a malformed envelope: ${detail}`));\n }\n return;\n }\n case 'unsupported-revision': {\n if (isJSONRPCRequest(message)) {\n const error = new UnsupportedProtocolVersionError({\n supported: [...SUPPORTED_MODERN_PROTOCOL_VERSIONS],\n requested: opening.requested\n });\n reportError(error);\n await writeErrorResponse(message.id, error.code, error.message, error.data);\n } else {\n reportError(new Error(`Discarded a notification claiming unsupported protocol revision ${opening.requested}`));\n }\n return;\n }\n case 'modern': {\n if (isJSONRPCRequest(message) && message.method === 'server/discover') {\n if (state.phase === 'probe') {\n // A repeated probe is answered by the same optimistic\n // instance and the negotiation window stays open: only\n // a non-discover enveloped request commits the\n // connection to the modern era, so a later fallback\n // `initialize` is still served by a fresh legacy\n // instance.\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n // Probe: answer from an optimistically built modern\n // instance so the advertisement reflects the real server\n // definition, but do not pin the connection yet — the\n // client may still fall back to `initialize` when it\n // shares no modern revision with the advertisement.\n const instance = await connectInstance('modern', opening.revision);\n if (isTornDown()) {\n // The connection was torn down while the factory was\n // building the probe instance: dispose of it and stay\n // closed instead of resurrecting the negotiation\n // window; nothing is delivered or answered.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'probe', instance };\n instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n if (state.phase === 'probe') {\n if (isJSONRPCNotification(message)) {\n // An enveloped notification during the negotiation\n // window (for example a notifications/cancelled for\n // the probe itself) is delivered to the probe instance\n // without committing the era: only a non-discover\n // enveloped request pins the connection, so a later\n // fallback `initialize` is still served by a fresh\n // legacy instance.\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n // The probe was followed by a modern request: the client\n // committed to the modern era — pin the probe instance.\n state = { phase: 'pinned', era: 'modern', instance: state.instance };\n } else {\n const instance = await connectInstance('modern', opening.revision);\n if (isTornDown()) {\n // Closed while the factory was building the modern\n // instance: dispose of it and stay closed.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'pinned', era: 'modern', instance };\n }\n if (await tryServeListen(message)) {\n return;\n }\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n case 'legacy': {\n if (legacyMode === 'reject') {\n if (isJSONRPCRequest(message)) {\n await answerLegacyRejection(message, opening.reason, opening.requestedVersion);\n }\n // Claim-less notifications are accepted and dropped (the\n // stdio analog of the HTTP entry's 202-and-drop); the\n // connection stays open for a modern opening.\n return;\n }\n if (state.phase === 'probe') {\n // Probe-then-fallback: the client probed, found no\n // mutually supported modern revision, and fell back to\n // the 2025 handshake on the same connection. The probe\n // instance is discarded; a fresh legacy instance serves\n // the handshake.\n await discardProbeInstance(state.instance);\n if (isTornDown()) {\n // Closed while the probe was being discarded: stay closed.\n return;\n }\n state = { phase: 'opening' };\n }\n const instance = await connectInstance('legacy');\n if (isTornDown()) {\n // Closed while the factory was building the legacy\n // instance: dispose of it and stay closed.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'pinned', era: 'legacy', instance };\n state.instance.channel.deliver(message);\n return;\n }\n }\n };\n\n // Inbound messages are processed strictly in arrival order: the queue\n // absorbs anything that arrives while the opening exchange is still being\n // decided (factory construction and instance connection are async).\n const queue: JSONRPCMessage[] = [];\n let pumping = false;\n const pump = async (): Promise<void> => {\n if (pumping) {\n return;\n }\n pumping = true;\n try {\n while (queue.length > 0) {\n const message = queue.shift()!;\n try {\n await processMessage(message);\n } catch (error) {\n // Every arm of processMessage that answers a request does\n // so through writeErrorResponse (which never throws — wire\n // failures are routed to onerror) and returns right after,\n // so an error escaping to here means the request was never\n // answered. Answer it now: a throwing factory or a failed\n // connect during the opening exchange must not leave the\n // client's request hanging (the stdio analog of the HTTP\n // entry's internal-server-error response). Notifications\n // carry no id to answer and are only reported.\n if (isJSONRPCRequest(message)) {\n await writeErrorResponse(message.id, ProtocolErrorCode.InternalError, 'Internal server error');\n }\n reportError(toError(error));\n }\n }\n } finally {\n pumping = false;\n }\n };\n\n const closeAll = async (): Promise<void> => {\n if (closing || state.phase === 'closed') {\n return;\n }\n closing = true;\n const current = state;\n state = { phase: 'closed' };\n // Stdio server-side graceful teardown: emit the empty\n // `subscriptions/listen` JSON-RPC result for every active subscription\n // (the spec's graceful-close signal — `SubscriptionsListenResult`)\n // before the wire is closed, so the client distinguishes graceful end\n // from a transport drop.\n for (const result of listenRouter.teardownAll()) {\n await wire.send(result).catch(error => reportError(toError(error)));\n }\n if (current.phase === 'probe' || current.phase === 'pinned') {\n await current.instance.product.close().catch(error => reportError(toError(error)));\n }\n await wire.close().catch(error => reportError(toError(error)));\n };\n\n wire.onmessage = (message: JSONRPCMessage) => {\n queue.push(message);\n void pump();\n };\n wire.onerror = error => {\n reportError(error);\n if (state.phase === 'probe' || state.phase === 'pinned') {\n state.instance.channel.onerror?.(error);\n }\n };\n wire.onclose = () => {\n if (closing || state.phase === 'closed') {\n return;\n }\n closing = true;\n const current = state;\n state = { phase: 'closed' };\n if (current.phase === 'probe' || current.phase === 'pinned') {\n void current.instance.product.close().catch(error => reportError(toError(error)));\n }\n };\n\n const started = wire.start().catch(error => {\n reportError(toError(error));\n throw error;\n });\n // Surface a failed start through onerror (above); close() still resolves.\n started.catch(() => {});\n\n return {\n close: async () => {\n await started.catch(() => {});\n await closeAll();\n }\n };\n}\n\nfunction toError(value: unknown): Error {\n return value instanceof Error ?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AAS,QAAQ,UAAU,MAAM;;AAG/C,MAAK,gBAAgB;AACjB,MAAI,WAAW,MAAM,UAAU,SAC3B;AAEJ,YAAU;EACV,MAAM,UAAU;AAChB,UAAQ,EAAE,OAAO,UAAU;AAC3B,MAAI,QAAQ,UAAU,WAAW,QAAQ,UAAU,SAC/C,CAAK,QAAQ,SAAS,QAAQ,OAAO,CAAC,OAAM,UAAS,YAAY,QAAQ,MAAM,CAAC,CAAC;;CAIzF,MAAM,UAAU,KAAK,OAAO,CAAC,OAAM,UAAS;AACxC,cAAY,QAAQ,MAAM,CAAC;AAC3B,QAAM;GACR;AAEF,SAAQ,YAAY,GAAG;AAEvB,QAAO,EACH,OAAO,YAAY;AACf,QAAM,QAAQ,YAAY,GAAG;AAC7B,QAAM,UAAU;IAEvB;;AAGL,SAAS,QAAQ,OAAuB;AACpC,QAAO,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,MAAM,CAAC"} | ||
| {"version":3,"file":"stdio.mjs","names":["_stdin: Readable","_stdout: Writable","_wire: Transport","_onInstanceClose: () => void","_outboundIntercept?: (message: JSONRPCMessage) => 'handled' | undefined","state: EntryState","discarding: StdioConnectionChannel | undefined","channel: StdioConnectionChannel","queue: JSONRPCMessage[]"],"sources":["../src/server/stdio.ts","../src/server/serveStdio.ts"],"sourcesContent":["import type { Readable, Writable } from 'node:stream';\n\nimport type { JSONRPCMessage, Transport } from '@modelcontextprotocol/core-internal';\nimport { ReadBuffer, serializeMessage } from '@modelcontextprotocol/core-internal';\nimport { process } from '@modelcontextprotocol/server/_shims';\n\n/**\n * Server transport for stdio: this communicates with an MCP client by reading from the current process' `stdin` and writing to `stdout`.\n *\n * This transport is only available in Node.js environments.\n *\n * @example\n * ```ts source=\"./stdio.examples.ts#StdioServerTransport_basicUsage\"\n * const server = new McpServer({ name: 'my-server', version: '1.0.0' });\n * const transport = new StdioServerTransport();\n * await server.connect(transport);\n * ```\n */\nexport class StdioServerTransport implements Transport {\n private _readBuffer: ReadBuffer;\n private _started = false;\n private _closed = false;\n\n constructor(\n private _stdin: Readable = process.stdin,\n private _stdout: Writable = process.stdout,\n options?: {\n /**\n * Maximum size of the read buffer in bytes. If a single message exceeds\n * this size the transport will emit an error and close.\n *\n * Defaults to 10 MB.\n */\n maxBufferSize?: number;\n }\n ) {\n this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });\n }\n\n onclose?: () => void;\n onerror?: (error: Error) => void;\n onmessage?: (message: JSONRPCMessage) => void;\n\n // Arrow functions to bind `this` properly, while maintaining function identity.\n _ondata = (chunk: Buffer) => {\n try {\n this._readBuffer.append(chunk);\n this.processReadBuffer();\n } catch (error) {\n this.onerror?.(error as Error);\n this.close().catch(() => {});\n }\n };\n _onerror = (error: Error) => {\n this.onerror?.(error);\n };\n _onstdouterror = (error: Error) => {\n this.onerror?.(error);\n this.close().catch(() => {\n // Ignore errors during close — we're already in an error path\n });\n };\n\n /**\n * Starts listening for messages on `stdin`.\n */\n async start(): Promise<void> {\n if (this._started) {\n throw new Error(\n 'StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.'\n );\n }\n\n this._started = true;\n this._stdin.on('data', this._ondata);\n this._stdin.on('error', this._onerror);\n this._stdout.on('error', this._onstdouterror);\n }\n\n private processReadBuffer() {\n while (true) {\n try {\n const message = this._readBuffer.readMessage();\n if (message === null) {\n break;\n }\n\n this.onmessage?.(message);\n } catch (error) {\n this.onerror?.(error as Error);\n }\n }\n }\n\n async close(): Promise<void> {\n if (this._closed) {\n return;\n }\n this._closed = true;\n\n // Remove our event listeners first\n this._stdin.off('data', this._ondata);\n this._stdin.off('error', this._onerror);\n this._stdout.off('error', this._onstdouterror);\n\n // Check if we were the only data listener\n const remainingDataListeners = this._stdin.listenerCount('data');\n if (remainingDataListeners === 0) {\n // Only pause stdin if we were the only listener\n // This prevents interfering with other parts of the application that might be using stdin\n this._stdin.pause();\n }\n\n // Clear the buffer and notify closure\n this._readBuffer.clear();\n this.onclose?.();\n }\n\n send(message: JSONRPCMessage): Promise<void> {\n if (this._closed) {\n return Promise.reject(new Error('StdioServerTransport is closed'));\n }\n return new Promise((resolve, reject) => {\n const json = serializeMessage(message);\n\n let settled = false;\n const onError = (error: Error) => {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n this._stdout.off('drain', onDrain);\n reject(error);\n };\n const onDrain = () => {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n this._stdout.off('drain', onDrain);\n resolve();\n };\n\n this._stdout.once('error', onError);\n\n if (this._stdout.write(json)) {\n if (settled) return;\n settled = true;\n this._stdout.off('error', onError);\n resolve();\n } else if (!settled) {\n this._stdout.once('drain', onDrain);\n }\n });\n }\n}\n","/**\n * `serveStdio` — the stdio entry point for serving the 2026-07-28 protocol\n * revision on a long-lived connection, with 2025-era serving as the default\n * for clients that open with the `initialize` handshake.\n *\n * The entry owns the stdio transport and the era decision for the connection.\n * It classifies the connection's opening exchange exactly once (using the\n * same body-primary rules as the HTTP entry), constructs ONE server instance\n * from the consumer's factory for the era the client opened with, pins that\n * instance for the lifetime of the connection, and passes every later message\n * straight through to it. No per-message era classification ever runs after\n * the connection is pinned — exactly mirroring how `createMcpHandler`\n * classifies an HTTP request before any instance exists.\n *\n * The opening exchange:\n *\n * - An `initialize` request (or any claim-less message) opens a 2025-era\n * session: the factory builds a legacy instance and the connection is\n * pinned to it (`legacy: 'serve'`, the default). With `legacy: 'reject'`\n * the opening is answered with the unsupported-protocol-version error\n * naming the supported modern revisions instead.\n * - A request carrying a valid per-request `_meta` envelope naming a\n * supported modern revision pins the connection to a modern instance\n * (era-marked and given the modern-only handlers, exactly like the HTTP\n * entry's modern path).\n * - A `server/discover` probe is answered by an optimistically built modern\n * instance but does NOT pin the connection yet: the spec's stdio\n * backward-compatibility flow lets a client probe first and then either\n * continue with modern requests (which pins the connection modern) or fall\n * back to the `initialize` handshake when no mutually supported modern\n * revision exists — in which case the probe instance is discarded and a\n * fresh legacy instance serves the handshake.\n * - Once the modern era is pinned, a later claim-less `initialize` is\n * rejected with the unsupported-protocol-version error naming the supported\n * revisions (the spec recommends naming them in any error returned to\n * `initialize`, and forbids falling back once the modern era is confirmed).\n *\n * Every instance the factory produces serves exactly one era; the ambiguity\n * of the opening exchange lives entirely in this entry. In the probe-fallback\n * case the factory is called twice (once for the discarded probe instance,\n * once for the legacy instance), so factories should be cheap and\n * side-effect-free to construct — the same expectation `createMcpHandler`\n * already sets for per-request construction.\n *\n * Hand-constructed servers connected directly to a `StdioServerTransport`\n * are unaffected by this entry: they keep serving the 2025-era protocol they\n * were written for.\n */\nimport type {\n CancelledNotificationParams,\n JSONRPCMessage,\n JSONRPCNotification,\n JSONRPCRequest,\n MessageClassification,\n MessageExtraInfo,\n RequestId,\n Transport,\n TransportSendOptions\n} from '@modelcontextprotocol/core-internal';\nimport {\n carriesValidModernEnvelopeClaim,\n envelopeClaimVersion,\n hasEnvelopeClaim,\n isJSONRPCErrorResponse,\n isJSONRPCNotification,\n isJSONRPCRequest,\n isJSONRPCResultResponse,\n modernOnlyStrictRejection,\n ProtocolErrorCode,\n requestMetaOf,\n setNegotiatedProtocolVersion,\n SUPPORTED_MODERN_PROTOCOL_VERSIONS,\n UnsupportedProtocolVersionError,\n validateEnvelopeMeta\n} from '@modelcontextprotocol/core-internal';\n\nimport type { McpServerFactory } from './createMcpHandler';\nimport { DEFAULT_MAX_SUBSCRIPTIONS, StdioListenRouter } from './listenRouter';\nimport { McpServer } from './mcp';\nimport type { Server } from './server';\nimport { installModernOnlyHandlers } from './server';\nimport { StdioServerTransport } from './stdio';\n\n/** Options for {@linkcode serveStdio}. */\nexport interface ServeStdioOptions {\n /**\n * How a 2025-era opening (an `initialize` request, or any claim-less\n * message) is handled:\n *\n * - `'serve'` (default) — the connection is pinned to a 2025-era instance\n * from the same factory and served exactly as a hand-wired stdio server\n * serves it today.\n * - `'reject'` — the opening request is answered with the\n * unsupported-protocol-version error naming the supported modern\n * revisions (claim-less notifications are dropped); the connection\n * stays open for a modern opening.\n */\n legacy?: 'serve' | 'reject';\n /**\n * Bring your own transport (for example a `StdioServerTransport`\n * constructed over a Unix domain socket or TCP stream, per the stdio\n * binding's custom-transport guidance). Defaults to a\n * {@linkcode StdioServerTransport} over the current process's stdio. The\n * entry owns the transport: it starts it, receives every inbound message,\n * and closes it when the connection ends.\n */\n transport?: Transport;\n /** Callback for out-of-band errors (reporting only; it never alters what is written to the wire). */\n onerror?: (error: Error) => void;\n /**\n * Reject a new `subscriptions/listen` with `-32603` 'Subscription limit\n * reached' (in-band, before the ack) when this many subscriptions are\n * already open on this connection.\n * @default 1024\n */\n maxSubscriptions?: number;\n}\n\n/** The handle returned by {@linkcode serveStdio}. */\nexport interface StdioServerHandle {\n /** Tears the connection down: closes the pinned instance (if any) and the underlying transport. */\n close(): Promise<void>;\n}\n\n/* ------------------------------------------------------------------------ *\n * Per-instance channel\n * ------------------------------------------------------------------------ */\n\n/**\n * How long the probe-discard path waits for the probe instance to answer the\n * requests it was delivered before closing it. The wait normally settles as\n * soon as the DiscoverResult is handed to the wire (or immediately, when a\n * delivered cancellation already settled the probe); the bound is a backstop\n * so no edge can ever hold the connection's inbound pump indefinitely behind\n * the discard.\n */\nconst DISCARD_ANSWER_TIMEOUT_MS = 3000;\n\n/**\n * The transport a pinned instance is connected to: a thin channel that writes\n * through to the entry-owned wire transport and receives the messages the\n * entry forwards. The wire transport itself is never handed to an instance —\n * that is what lets the entry discard an optimistic probe instance (close the\n * channel) without tearing down the connection.\n */\nclass StdioConnectionChannel implements Transport {\n onclose?: () => void;\n onerror?: (error: Error) => void;\n onmessage?: <T extends JSONRPCMessage>(message: T, extra?: MessageExtraInfo) => void;\n\n private _closed = false;\n /** Request ids the entry delivered to the instance that the instance has not yet answered. */\n private readonly _pendingRequests = new Set<RequestId>();\n private _drainWaiters: Array<() => void> = [];\n\n constructor(\n private readonly _wire: Transport,\n private readonly _onInstanceClose: () => void,\n /**\n * Optional first-look on outbound messages. When set and returning\n * `'handled'`, the channel does not write the message to the wire\n * (the entry already wrote whatever was appropriate). Used by the\n * modern-era listen router to fan a change notification out onto the\n * active subscriptions instead of broadcasting it unsolicited.\n */\n private readonly _outboundIntercept?: (message: JSONRPCMessage) => 'handled' | undefined\n ) {}\n\n async start(): Promise<void> {\n // The entry already started the wire transport; connecting an\n // instance to its channel must not start anything again.\n }\n\n async send(message: JSONRPCMessage, options?: TransportSendOptions): Promise<void> {\n if (isJSONRPCResultResponse(message) || isJSONRPCErrorResponse(message)) {\n // The instance answered a delivered request: settle it whether or\n // not the wire write below succeeds (write failures surface\n // through the wire's own error reporting).\n const { id } = message;\n if (id !== undefined) {\n this._settle(id);\n }\n }\n if (this._closed) {\n // A discarded or torn-down instance has nowhere to write; late\n // sends are dropped.\n return;\n }\n if (this._outboundIntercept?.(message) === 'handled') {\n return;\n }\n return this._wire.send(message, options);\n }\n\n setProtocolVersion = (version: string): void => {\n this._wire.setProtocolVersion?.(version);\n };\n\n /** Forwards one inbound message to the connected instance. */\n deliver(message: JSONRPCMessage, extra?: MessageExtraInfo): void {\n if (this._closed) {\n return;\n }\n if (isJSONRPCRequest(message)) {\n this._pendingRequests.add(message.id);\n } else if (isJSONRPCNotification(message) && message.method === 'notifications/cancelled') {\n // By protocol contract a cancelled request may legitimately go\n // unanswered (the instance aborts the in-flight handler and writes\n // nothing for it), so a delivered cancellation settles the request\n // it names: nothing should keep waiting for an answer that may\n // never come. Non-cancelled requests still settle only when their\n // answer is handed to the wire.\n const cancelledId = (message.params as CancelledNotificationParams | undefined)?.requestId;\n if (cancelledId !== undefined) {\n this._settle(cancelledId);\n }\n }\n this.onmessage?.(message, extra);\n }\n\n /**\n * Resolves once every request delivered to the instance has been answered\n * through {@linkcode send}, settled by a delivered cancellation, or the\n * channel has been closed and nothing further can be answered. The wait is\n * bounded by `timeoutMs` as a backstop so no edge can hold the caller\n * indefinitely; resolves `false` only when the bound elapsed with requests\n * still unanswered. Used by the probe-discard path so a probe request the\n * entry accepted is never silently dropped.\n */\n async whenRequestsAnswered(timeoutMs: number): Promise<boolean> {\n if (this._closed || this._pendingRequests.size === 0) {\n return true;\n }\n return await new Promise<boolean>(resolve => {\n const waiter = (): void => {\n clearTimeout(timer);\n resolve(true);\n };\n const timer = setTimeout(() => {\n this._drainWaiters = this._drainWaiters.filter(pending => pending !== waiter);\n resolve(false);\n }, timeoutMs);\n this._drainWaiters.push(waiter);\n });\n }\n\n async close(): Promise<void> {\n if (this._closed) {\n return;\n }\n this._closed = true;\n // Nothing further can be answered through a closed channel; release\n // anyone waiting on in-flight answers.\n this._pendingRequests.clear();\n this._releaseDrainWaiters();\n try {\n this._onInstanceClose();\n } finally {\n this.onclose?.();\n }\n }\n\n private _settle(id: RequestId): void {\n this._pendingRequests.delete(id);\n if (this._pendingRequests.size === 0) {\n this._releaseDrainWaiters();\n }\n }\n\n private _releaseDrainWaiters(): void {\n const waiters = this._drainWaiters;\n this._drainWaiters = [];\n for (const waiter of waiters) {\n waiter();\n }\n }\n}\n\n/* ------------------------------------------------------------------------ *\n * Opening-exchange classification\n * ------------------------------------------------------------------------ */\n\ninterface EnvelopeIssue {\n key: string;\n problem: string;\n}\n\ntype OpeningClassification =\n /** A 2025-era opening: `initialize`, or any message without an envelope claim. */\n | { kind: 'legacy'; reason: 'initialize' | 'no-claim'; requestedVersion?: string }\n /** A valid envelope claim naming a modern revision this entry serves. */\n | { kind: 'modern'; revision: string; classification: MessageClassification }\n /** A present envelope claim whose envelope is malformed. */\n | { kind: 'invalid-envelope'; issue: EnvelopeIssue }\n /** A valid envelope claim naming a revision this entry does not serve (unknown future or 2025-era). */\n | { kind: 'unsupported-revision'; requested: string };\n\n/**\n * Classifies one message of the opening exchange with the same body-primary\n * rules the HTTP entry applies per request: `initialize` is the legacy\n * handshake unless it carries a valid modern envelope claim; a present claim\n * is validated (never silently ignored); a claim-less message is 2025-era\n * traffic. There is no header layer on stdio, so the body is the only signal.\n */\nfunction classifyOpeningMessage(message: JSONRPCRequest | JSONRPCNotification): OpeningClassification {\n const params = message.params;\n\n if (message.method === 'initialize' && !carriesValidModernEnvelopeClaim(params)) {\n const requestedVersion =\n params !== null && typeof params === 'object' && typeof (params as { protocolVersion?: unknown }).protocolVersion === 'string'\n ? ((params as { protocolVersion: string }).protocolVersion as string)\n : undefined;\n return { kind: 'legacy', reason: 'initialize', ...(requestedVersion !== undefined && { requestedVersion }) };\n }\n\n if (!hasEnvelopeClaim(params)) {\n return { kind: 'legacy', reason: 'no-claim' };\n }\n\n // A present claim is validated, never silently ignored — a malformed\n // envelope behind the claim is an invalid-params answer, not a fall back\n // to legacy serving (mirrors the HTTP entry's envelope rung).\n const meta = requestMetaOf(params);\n const issues = meta === undefined ? [] : validateEnvelopeMeta(meta);\n const firstIssue = issues[0];\n if (firstIssue !== undefined) {\n return { kind: 'invalid-envelope', issue: firstIssue };\n }\n\n const claimedVersion = envelopeClaimVersion(params);\n if (claimedVersion === undefined || !SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) {\n // The claim names a revision this entry does not serve (an unknown\n // future revision, or a 2025-era revision delivered via the envelope\n // mechanism) — answered like the HTTP entry's modern path.\n return { kind: 'unsupported-revision', requested: claimedVersion ?? 'unknown' };\n }\n\n return { kind: 'modern', revision: claimedVersion, classification: { era: 'modern', revision: claimedVersion } };\n}\n\n/* ------------------------------------------------------------------------ *\n * The entry\n * ------------------------------------------------------------------------ */\n\ninterface ConnectedInstance {\n product: McpServer | Server;\n channel: StdioConnectionChannel;\n}\n\ntype EntryState =\n /** Waiting for the connection's opening message. */\n | { phase: 'opening' }\n /** A `server/discover` probe was answered; the era is not pinned yet. */\n | { phase: 'probe'; instance: ConnectedInstance }\n /** The connection is pinned to one instance serving one era. */\n | { phase: 'pinned'; era: 'legacy' | 'modern'; instance: ConnectedInstance }\n | { phase: 'closed' };\n\n/**\n * Serves MCP over stdio from a server factory, owning the era decision for\n * the connection: the opening exchange selects the era, ONE instance from the\n * factory is pinned for the connection lifetime, and everything after passes\n * straight through to it. See the module documentation for the opening rules.\n *\n * ```ts\n * import { serveStdio } from '@modelcontextprotocol/server/stdio';\n *\n * serveStdio(() => {\n * const server = new McpServer({ name: 'my-server', version: '1.0.0' }, { capabilities: { tools: {} } });\n * // register tools/resources/prompts once — the same factory serves both eras\n * return server;\n * });\n * ```\n */\nexport function serveStdio(factory: McpServerFactory, options: ServeStdioOptions = {}): StdioServerHandle {\n const legacyMode = options.legacy ?? 'serve';\n const wire = options.transport ?? new StdioServerTransport();\n\n let state: EntryState = { phase: 'opening' };\n /** Channel currently being discarded (its close must not tear the connection down). */\n let discarding: StdioConnectionChannel | undefined;\n let closing = false;\n\n /**\n * Whether the connection has been torn down (`handle.close()` or the wire\n * closing). The opening arms re-check this after every await: a close can\n * race factory construction, and the continuation must neither resurrect\n * the connection state nor keep a late-resolved instance around.\n */\n const isTornDown = (): boolean => closing || state.phase === 'closed';\n\n const reportError = (error: Error) => {\n try {\n options.onerror?.(error);\n } catch {\n // Reporting must never affect the wire.\n }\n };\n\n const writeErrorResponse = (id: RequestId, code: number, message: string, data?: unknown): Promise<void> =>\n wire\n .send({ jsonrpc: '2.0', id, error: { code, message, ...(data !== undefined && { data }) } })\n .catch(error => reportError(toError(error)));\n\n /**\n * Entry-handled `subscriptions/listen` for this connection: holds the\n * active subscriptions, serves inbound listen / cancelled-of-listen\n * before the pinned instance is consulted, and rewrites the instance's\n * outbound change notifications onto the active subscriptions. Only\n * consulted on a modern-pinned connection — on a legacy connection\n * change notifications pass straight through (the 2025 unsolicited\n * delivery model is unchanged).\n */\n const listenRouter = new StdioListenRouter(options.maxSubscriptions ?? DEFAULT_MAX_SUBSCRIPTIONS);\n\n /** Outbound intercept installed on a modern instance's channel. */\n const modernOutboundIntercept = (message: JSONRPCMessage): 'handled' | undefined => {\n if (!isJSONRPCNotification(message)) return undefined;\n const routed = listenRouter.routeOutbound(message);\n if (routed === 'passthrough') return undefined;\n // A subscription-gated change notification on the modern era: one\n // stamped copy per subscription that opted in (an empty array means\n // it is dropped — the modern era never delivers an un-requested\n // change type unsolicited). Nothing else from the instance is\n // affected.\n for (const stamped of routed) {\n void wire.send({ jsonrpc: '2.0', ...stamped }).catch(error => reportError(toError(error)));\n }\n return 'handled';\n };\n\n /**\n * Entry-handled inbound listen routing for a modern-pinned connection.\n * Returns `true` when the message was served at the entry and must NOT\n * be delivered to the pinned instance.\n */\n const tryServeListen = async (message: JSONRPCMessage): Promise<boolean> => {\n if (isJSONRPCRequest(message) && message.method === 'subscriptions/listen') {\n // Entry-handled listen is its own request-handling subsystem; it\n // applies the same per-request envelope rung the instance's\n // `_onrequest` would (method-existence is N/A here — the entry\n // recognized the method — so envelope validation is the first\n // applicable rung) and the same supported-revision check the\n // opening classifier and the HTTP entry apply per request. Reuses\n // the same validators the opening classifier uses.\n const meta = requestMetaOf(message.params);\n const issue = hasEnvelopeClaim(message.params)\n ? (meta === undefined ? [] : validateEnvelopeMeta(meta))[0]\n : { key: '_meta', problem: 'the per-request envelope is required on protocol revision 2026-07-28' };\n const claimedVersion = envelopeClaimVersion(message.params);\n let reply;\n if (issue !== undefined) {\n reply = {\n jsonrpc: '2.0' as const,\n id: message.id,\n error: { code: -32_602, message: `Invalid _meta envelope: ${issue.key}: ${issue.problem}` }\n };\n } else if (claimedVersion === undefined || !SUPPORTED_MODERN_PROTOCOL_VERSIONS.includes(claimedVersion)) {\n const error = new UnsupportedProtocolVersionError({\n supported: [...SUPPORTED_MODERN_PROTOCOL_VERSIONS],\n requested: claimedVersion ?? 'unknown'\n });\n reply = { jsonrpc: '2.0' as const, id: message.id, error: { code: error.code, message: error.message, data: error.data } };\n } else {\n reply = listenRouter.serve(message);\n }\n await wire\n .send('error' in reply ? reply : { jsonrpc: '2.0', method: reply.method, params: reply.params })\n .catch(error => reportError(toError(error)));\n return true;\n }\n if (isJSONRPCNotification(message) && message.method === 'notifications/cancelled') {\n const cancelledId = (message.params as CancelledNotificationParams | undefined)?.requestId;\n // Inbound cancel of a parked listen: tear the subscription down\n // and DO NOT deliver to the instance (it never saw the listen\n // request). After this point nothing further is delivered for\n // that subscription id (post-cancel hardening).\n if (cancelledId !== undefined && listenRouter.cancel(cancelledId)) {\n return true;\n }\n }\n return false;\n };\n\n /** Answers a 2025-era request the entry will not serve (the modern-only rejection cells). */\n const answerLegacyRejection = (\n request: JSONRPCRequest,\n reason: 'initialize' | 'no-claim',\n requestedVersion?: string\n ): Promise<void> => {\n const rejection = modernOnlyStrictRejection(\n { kind: 'legacy', reason, ...(requestedVersion !== undefined && { requestedVersion }) },\n SUPPORTED_MODERN_PROTOCOL_VERSIONS\n );\n if (rejection === undefined) {\n return Promise.resolve();\n }\n reportError(new Error(`Rejected 2025-era request on a modern-only stdio connection (${rejection.cell}): ${rejection.message}`));\n return writeErrorResponse(request.id, rejection.code, rejection.message, rejection.data);\n };\n\n const onInstanceClosed = (channel: StdioConnectionChannel) => {\n if (closing || channel === discarding) {\n return;\n }\n // The pinned (or probe) instance was closed from the instance side:\n // the connection is over.\n void closeAll();\n };\n\n const connectInstance = async (era: 'legacy' | 'modern', revision?: string): Promise<ConnectedInstance> => {\n const product = await factory({ era });\n const server = product instanceof McpServer ? product.server : product;\n if (era === 'modern') {\n // Era-write at instance binding, then modern-only handler\n // installation — the same helpers the HTTP entry's modern path\n // uses, before the instance is connected.\n setNegotiatedProtocolVersion(server, revision);\n installModernOnlyHandlers(server, SUPPORTED_MODERN_PROTOCOL_VERSIONS);\n // The listen router was created before this instance existed; now\n // that capabilities are known, hand them over so the acknowledged\n // filter is narrowed against what the server actually advertises.\n listenRouter.setServerCapabilities(server.getCapabilities());\n }\n const channel: StdioConnectionChannel = new StdioConnectionChannel(\n wire,\n () => onInstanceClosed(channel),\n era === 'modern' ? modernOutboundIntercept : undefined\n );\n await product.connect(channel);\n return { product, channel };\n };\n\n /** Closes an instance whose factory resolved only after the connection was torn down. */\n const disposeLateInstance = (instance: ConnectedInstance): Promise<void> =>\n instance.product.close().catch(error => reportError(toError(error)));\n\n const discardProbeInstance = async (instance: ConnectedInstance): Promise<void> => {\n // The probe instance served only the discover exchange; closing its\n // channel must not tear down the connection the fallback is about to\n // continue on.\n discarding = instance.channel;\n try {\n // A probe request the entry accepted must never go silently\n // unanswered: a client may pipeline its fallback `initialize`\n // straight behind `server/discover` without waiting, and closing\n // the instance aborts whatever it still has in flight. Let the\n // in-flight DiscoverResult reach the wire before the instance is\n // closed; the probe instance only ever receives `server/discover`,\n // whose entry-installed handler always answers promptly. A probe\n // the client cancelled is already settled by the delivered\n // cancellation (a cancelled request may go unanswered), and the\n // wait is bounded as a backstop so nothing can wedge the\n // connection's pump behind the discard.\n const answered = await instance.channel.whenRequestsAnswered(DISCARD_ANSWER_TIMEOUT_MS);\n if (!answered) {\n reportError(\n new Error(\n `Discarded the probe instance with requests still unanswered after ${DISCARD_ANSWER_TIMEOUT_MS}ms; continuing with the fallback`\n )\n );\n }\n await instance.product.close();\n } catch (error) {\n reportError(toError(error));\n } finally {\n discarding = undefined;\n }\n };\n\n const processMessage = async (message: JSONRPCMessage): Promise<void> => {\n if (state.phase === 'closed') {\n return;\n }\n\n if (state.phase === 'pinned') {\n if (\n state.era === 'modern' &&\n isJSONRPCRequest(message) &&\n message.method === 'initialize' &&\n !carriesValidModernEnvelopeClaim(message.params)\n ) {\n // The modern era is confirmed for this connection; a late\n // legacy handshake is answered with the version error naming\n // the supported revisions (the specification recommends\n // naming them in any error returned to `initialize`, and\n // rules out falling back once the modern era is confirmed).\n const requestedVersion =\n message.params !== null &&\n typeof message.params === 'object' &&\n typeof (message.params as { protocolVersion?: unknown }).protocolVersion === 'string'\n ? ((message.params as { protocolVersion: string }).protocolVersion as string)\n : undefined;\n await answerLegacyRejection(message, 'initialize', requestedVersion);\n return;\n }\n if (state.era === 'modern' && (await tryServeListen(message))) {\n return;\n }\n state.instance.channel.deliver(message);\n return;\n }\n\n // Negotiation window ('opening' | 'probe').\n if (!isJSONRPCRequest(message) && !isJSONRPCNotification(message)) {\n // A JSON-RPC response before any era is pinned: nothing has been\n // asked of the client yet, so there is nothing it can answer.\n reportError(new Error('Discarded a JSON-RPC response received before the connection negotiated an era'));\n return;\n }\n\n const opening = classifyOpeningMessage(message);\n switch (opening.kind) {\n case 'invalid-envelope': {\n const detail = `Invalid _meta envelope for protocol revision 2026-07-28: ${opening.issue.key}: ${opening.issue.problem}`;\n if (isJSONRPCRequest(message)) {\n await writeErrorResponse(message.id, ProtocolErrorCode.InvalidParams, detail, { envelope: opening.issue });\n } else {\n reportError(new Error(`Discarded a notification with a malformed envelope: ${detail}`));\n }\n return;\n }\n case 'unsupported-revision': {\n if (isJSONRPCRequest(message)) {\n const error = new UnsupportedProtocolVersionError({\n supported: [...SUPPORTED_MODERN_PROTOCOL_VERSIONS],\n requested: opening.requested\n });\n reportError(error);\n await writeErrorResponse(message.id, error.code, error.message, error.data);\n } else {\n reportError(new Error(`Discarded a notification claiming unsupported protocol revision ${opening.requested}`));\n }\n return;\n }\n case 'modern': {\n if (isJSONRPCRequest(message) && message.method === 'server/discover') {\n if (state.phase === 'probe') {\n // A repeated probe is answered by the same optimistic\n // instance and the negotiation window stays open: only\n // a non-discover enveloped request commits the\n // connection to the modern era, so a later fallback\n // `initialize` is still served by a fresh legacy\n // instance.\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n // Probe: answer from an optimistically built modern\n // instance so the advertisement reflects the real server\n // definition, but do not pin the connection yet — the\n // client may still fall back to `initialize` when it\n // shares no modern revision with the advertisement.\n const instance = await connectInstance('modern', opening.revision);\n if (isTornDown()) {\n // The connection was torn down while the factory was\n // building the probe instance: dispose of it and stay\n // closed instead of resurrecting the negotiation\n // window; nothing is delivered or answered.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'probe', instance };\n instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n if (state.phase === 'probe') {\n if (isJSONRPCNotification(message)) {\n // An enveloped notification during the negotiation\n // window (for example a notifications/cancelled for\n // the probe itself) is delivered to the probe instance\n // without committing the era: only a non-discover\n // enveloped request pins the connection, so a later\n // fallback `initialize` is still served by a fresh\n // legacy instance.\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n // The probe was followed by a modern request: the client\n // committed to the modern era — pin the probe instance.\n state = { phase: 'pinned', era: 'modern', instance: state.instance };\n } else {\n const instance = await connectInstance('modern', opening.revision);\n if (isTornDown()) {\n // Closed while the factory was building the modern\n // instance: dispose of it and stay closed.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'pinned', era: 'modern', instance };\n }\n if (await tryServeListen(message)) {\n return;\n }\n state.instance.channel.deliver(message, { classification: opening.classification });\n return;\n }\n case 'legacy': {\n if (legacyMode === 'reject') {\n if (isJSONRPCRequest(message)) {\n await answerLegacyRejection(message, opening.reason, opening.requestedVersion);\n }\n // Claim-less notifications are accepted and dropped (the\n // stdio analog of the HTTP entry's 202-and-drop); the\n // connection stays open for a modern opening.\n return;\n }\n if (state.phase === 'probe') {\n // Probe-then-fallback: the client probed, found no\n // mutually supported modern revision, and fell back to\n // the 2025 handshake on the same connection. The probe\n // instance is discarded; a fresh legacy instance serves\n // the handshake.\n await discardProbeInstance(state.instance);\n if (isTornDown()) {\n // Closed while the probe was being discarded: stay closed.\n return;\n }\n state = { phase: 'opening' };\n }\n const instance = await connectInstance('legacy');\n if (isTornDown()) {\n // Closed while the factory was building the legacy\n // instance: dispose of it and stay closed.\n await disposeLateInstance(instance);\n return;\n }\n state = { phase: 'pinned', era: 'legacy', instance };\n state.instance.channel.deliver(message);\n return;\n }\n }\n };\n\n // Inbound messages are processed strictly in arrival order: the queue\n // absorbs anything that arrives while the opening exchange is still being\n // decided (factory construction and instance connection are async).\n const queue: JSONRPCMessage[] = [];\n let pumping = false;\n const pump = async (): Promise<void> => {\n if (pumping) {\n return;\n }\n pumping = true;\n try {\n while (queue.length > 0) {\n const message = queue.shift()!;\n try {\n await processMessage(message);\n } catch (error) {\n // Every arm of processMessage that answers a request does\n // so through writeErrorResponse (which never throws — wire\n // failures are routed to onerror) and returns right after,\n // so an error escaping to here means the request was never\n // answered. Answer it now: a throwing factory or a failed\n // connect during the opening exchange must not leave the\n // client's request hanging (the stdio analog of the HTTP\n // entry's internal-server-error response). Notifications\n // carry no id to answer and are only reported.\n if (isJSONRPCRequest(message)) {\n await writeErrorResponse(message.id, ProtocolErrorCode.InternalError, 'Internal server error');\n }\n reportError(toError(error));\n }\n }\n } finally {\n pumping = false;\n }\n };\n\n const closeAll = async (): Promise<void> => {\n if (closing || state.phase === 'closed') {\n return;\n }\n closing = true;\n const current = state;\n state = { phase: 'closed' };\n // Stdio server-side graceful teardown: emit the empty\n // `subscriptions/listen` JSON-RPC result for every active subscription\n // (the spec's graceful-close signal — `SubscriptionsListenResult`)\n // before the wire is closed, so the client distinguishes graceful end\n // from a transport drop.\n for (const result of listenRouter.teardownAll()) {\n await wire.send(result).catch(error => reportError(toError(error)));\n }\n if (current.phase === 'probe' || current.phase === 'pinned') {\n await current.instance.product.close().catch(error => reportError(toError(error)));\n }\n await wire.close().catch(error => reportError(toError(error)));\n };\n\n wire.onmessage = (message: JSONRPCMessage) => {\n queue.push(message);\n void pump();\n };\n wire.onerror = error => {\n reportError(error);\n if (state.phase === 'probe' || state.phase === 'pinned') {\n state.instance.channel.onerror?.(error);\n }\n };\n wire.onclose = () => {\n if (closing || state.phase === 'closed') {\n return;\n }\n closing = true;\n const current = state;\n state = { phase: 'closed' };\n if (current.phase === 'probe' || current.phase === 'pinned') {\n void current.instance.product.close().catch(error => reportError(toError(error)));\n }\n };\n\n const started = wire.start().catch(error => {\n reportError(toError(error));\n throw error;\n });\n // Surface a failed start through onerror (above); close() still resolves.\n started.catch(() => {});\n\n return {\n close: async () => {\n await started.catch(() => {});\n await closeAll();\n }\n };\n}\n\nfunction toError(value: unknown): Error {\n return value instanceof Error ? value : new Error(String(value));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,IAAa,uBAAb,MAAuD;CACnD,AAAQ;CACR,AAAQ,WAAW;CACnB,AAAQ,UAAU;CAElB,YACI,AAAQA,SAAmB,QAAQ,OACnC,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Q,UAAU,WAAW,QAAQ,UAAU,SAC/C,CAAK,QAAQ,SAAS,QAAQ,OAAO,CAAC,OAAM,UAAS,YAAY,QAAQ,MAAM,CAAC,CAAC;;CAIzF,MAAM,UAAU,KAAK,OAAO,CAAC,OAAM,UAAS;AACxC,cAAY,QAAQ,MAAM,CAAC;AAC3B,QAAM;GACR;AAEF,SAAQ,YAAY,GAAG;AAEvB,QAAO,EACH,OAAO,YAAY;AACf,QAAM,QAAQ,YAAY,GAAG;AAC7B,QAAM,UAAU;IAEvB;;AAGL,SAAS,QAAQ,OAAuB;AACpC,QAAO,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,MAAM,CAAC"} |
@@ -1,2 +0,2 @@ | ||
| const require_ajvProvider = require('../ajvProvider-7Wy3krRF.cjs'); | ||
| const require_ajvProvider = require('../ajvProvider-Brn-Q2J_.cjs'); | ||
@@ -3,0 +3,0 @@ exports.Ajv = require_ajvProvider.Ajv; |
@@ -1,2 +0,2 @@ | ||
| import { n as AjvJsonSchemaValidator, r as addFormats, t as Ajv } from "../ajvProvider-BAeyH14y.cjs"; | ||
| import { n as AjvJsonSchemaValidator, r as addFormats, t as Ajv } from "../ajvProvider-B_4czhCS.cjs"; | ||
| export { Ajv, AjvJsonSchemaValidator, addFormats }; |
@@ -1,2 +0,2 @@ | ||
| import { n as AjvJsonSchemaValidator, r as addFormats, t as Ajv } from "../ajvProvider-Bk0uZgeB.mjs"; | ||
| import { n as AjvJsonSchemaValidator, r as addFormats, t as Ajv } from "../ajvProvider-BdSo9BII.mjs"; | ||
| export { Ajv, AjvJsonSchemaValidator, addFormats }; |
@@ -1,3 +0,3 @@ | ||
| import { n as AjvJsonSchemaValidator, r as addFormats, t as Ajv } from "../ajvProvider-Cpjfhu7O.mjs"; | ||
| import { n as AjvJsonSchemaValidator, r as addFormats, t as Ajv } from "../ajvProvider-CplOkyLC.mjs"; | ||
| export { Ajv, AjvJsonSchemaValidator, addFormats }; |
@@ -1,3 +0,3 @@ | ||
| const require_cfWorkerProvider = require('../cfWorkerProvider-Djgwc46-.cjs'); | ||
| const require_cfWorkerProvider = require('../cfWorkerProvider-ojcZaap3.cjs'); | ||
| exports.CfWorkerJsonSchemaValidator = require_cfWorkerProvider.CfWorkerJsonSchemaValidator; |
@@ -1,2 +0,2 @@ | ||
| import { n as CfWorkerSchemaDraft, t as CfWorkerJsonSchemaValidator } from "../cfWorkerProvider-B7lHA3P9.cjs"; | ||
| import { n as CfWorkerSchemaDraft, t as CfWorkerJsonSchemaValidator } from "../cfWorkerProvider-D9GAttn8.cjs"; | ||
| export { CfWorkerJsonSchemaValidator, type CfWorkerSchemaDraft }; |
@@ -1,2 +0,2 @@ | ||
| import { n as CfWorkerSchemaDraft, t as CfWorkerJsonSchemaValidator } from "../cfWorkerProvider-Cj-YchTJ.mjs"; | ||
| import { n as CfWorkerSchemaDraft, t as CfWorkerJsonSchemaValidator } from "../cfWorkerProvider-BYRW5af5.mjs"; | ||
| export { CfWorkerJsonSchemaValidator, type CfWorkerSchemaDraft }; |
@@ -1,3 +0,3 @@ | ||
| import { t as CfWorkerJsonSchemaValidator } from "../cfWorkerProvider-BDC2rVl3.mjs"; | ||
| import { t as CfWorkerJsonSchemaValidator } from "../cfWorkerProvider-Bd-iTHAF.mjs"; | ||
| export { CfWorkerJsonSchemaValidator }; |
+8
-7
| { | ||
| "name": "@modelcontextprotocol/server", | ||
| "version": "2.0.0-beta.3", | ||
| "version": "2.0.0-beta.4", | ||
| "description": "Model Context Protocol implementation for TypeScript - Server package", | ||
@@ -76,8 +76,8 @@ "license": "MIT", | ||
| "import": { | ||
| "types": "./dist/shimsWorkerd.d.mts", | ||
| "default": "./dist/shimsWorkerd.mjs" | ||
| "types": "./dist/shimsBrowser.d.mts", | ||
| "default": "./dist/shimsBrowser.mjs" | ||
| }, | ||
| "require": { | ||
| "types": "./dist/shimsWorkerd.d.cts", | ||
| "default": "./dist/shimsWorkerd.cjs" | ||
| "types": "./dist/shimsBrowser.d.cts", | ||
| "default": "./dist/shimsBrowser.cjs" | ||
| } | ||
@@ -126,3 +126,4 @@ }, | ||
| "dependencies": { | ||
| "zod": "^4.2.0" | ||
| "zod": "^4.2.0", | ||
| "@modelcontextprotocol/core": "2.0.0-beta.4" | ||
| }, | ||
@@ -145,5 +146,5 @@ "devDependencies": { | ||
| "vitest": "^4.0.15", | ||
| "@modelcontextprotocol/core-internal": "^2.0.0-beta.2", | ||
| "@modelcontextprotocol/eslint-config": "^2.0.0", | ||
| "@modelcontextprotocol/test-helpers": "^2.0.0-beta.0", | ||
| "@modelcontextprotocol/core-internal": "^2.0.0-beta.3", | ||
| "@modelcontextprotocol/tsconfig": "^2.0.0", | ||
@@ -150,0 +151,0 @@ "@modelcontextprotocol/vitest-config": "^2.0.0" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| import { i as jsonSchemaValidator, n as JsonSchemaValidator, t as JsonSchemaType } from "./types-ClyURo_K.cjs"; | ||
| //#region ../core-internal/src/validators/fastUriShim.d.ts | ||
| /** | ||
| * dts-bundling shim for `fast-uri`. | ||
| * | ||
| * ajv@8.18.0's published .d.ts does `import { URIComponent } from "fast-uri"`, | ||
| * but fast-uri ships its types as `export = namespace`, which rolldown's dts | ||
| * bundler can't destructure into a named import — it drops the import and | ||
| * leaves a dangling `URIComponent` reference in the bundled .d.mts (TS2304 for | ||
| * downstream consumers with `skipLibCheck: false`). | ||
| * | ||
| * The server/client tsdown configs map `fast-uri` to this file via | ||
| * `dts.compilerOptions.paths` so the type is inlined as a plain named export. | ||
| * Runtime code is unaffected (this is a `.d.ts`; the path mapping is dts-only). | ||
| */ | ||
| // Field-for-field copy of fast-uri@3.1.0's URIComponent (types/index.d.ts). | ||
| // Keep in sync when bumping fast-uri/ajv. | ||
| interface URIComponent { | ||
| scheme?: string; | ||
| userinfo?: string; | ||
| host?: string; | ||
| port?: number | string; | ||
| path?: string; | ||
| query?: string; | ||
| fragment?: string; | ||
| reference?: string; | ||
| nid?: string; | ||
| nss?: string; | ||
| resourceName?: string; | ||
| secure?: boolean; | ||
| uuid?: string; | ||
| error?: string; | ||
| } | ||
| //#endregion | ||
| //#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<string, number | undefined>; | ||
| 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<string>; | ||
| parent?: Scope; | ||
| } | ||
| interface ValueScopeOptions extends ScopeOptions { | ||
| scope: ScopeStore; | ||
| es5?: boolean; | ||
| lines?: boolean; | ||
| } | ||
| type ScopeStore = Record<string, ValueReference[] | undefined>; | ||
| type ScopeValues = { [Prefix in string]?: Map<unknown, ValueScopeName> }; | ||
| type ScopeValueSets = { [Prefix in string]?: Set<ValueScopeName> }; | ||
| declare enum UsedValueState { | ||
| Started = 0, | ||
| Completed = 1, | ||
| } | ||
| type UsedScopeValues = { [Prefix in string]?: Map<ValueScopeName, UsedValueState | undefined> }; | ||
| declare class Scope { | ||
| protected readonly _names: { [Prefix in string]?: NameGroup }; | ||
| protected readonly _prefixes?: Set<string>; | ||
| 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<string>; | ||
| 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<Name$1 extends string, Type$1> = undefined extends null ? `strictNullChecks must be true in tsconfig to use ${Name$1}` : Type$1; | ||
| type UnionToIntersection<U> = (U extends any ? (_: U) => void : never) extends ((_: infer I) => void) ? I : never; | ||
| type UncheckedPartialSchema<T> = Partial<UncheckedJSONSchemaType<T, true>>; | ||
| type JSONType<T extends string, IsPartial extends boolean> = 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<T, IsPartial extends boolean> = ( | ||
| // these two unions allow arbitrary unions of types | ||
| { | ||
| anyOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]; | ||
| } | { | ||
| oneOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]; | ||
| } | ({ | ||
| 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 ? NumberKeywords : T extends string ? StringKeywords : T extends boolean ? {} : never>) | ((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<T[K], false> & Nullable<T[K]> } & { | ||
| length: T["length"]; | ||
| }; | ||
| minItems: T["length"]; | ||
| } & ({ | ||
| maxItems: T["length"]; | ||
| } | { | ||
| additionalItems: false; | ||
| }) : T extends readonly any[] ? { | ||
| type: JSONType<"array", IsPartial>; | ||
| items: UncheckedJSONSchemaType<T[0], false>; | ||
| contains?: UncheckedPartialSchema<T[0]>; | ||
| minItems?: number; | ||
| maxItems?: number; | ||
| minContains?: number; | ||
| maxContains?: number; | ||
| uniqueItems?: true; | ||
| additionalItems?: never; | ||
| } : T extends Record<string, any> ? { | ||
| type: JSONType<"object", IsPartial>; | ||
| additionalProperties?: boolean | UncheckedJSONSchemaType<T[string], false>; | ||
| unevaluatedProperties?: boolean | UncheckedJSONSchemaType<T[string], false>; | ||
| properties?: IsPartial extends true ? Partial<UncheckedPropertiesSchema<T>> : UncheckedPropertiesSchema<T>; | ||
| patternProperties?: Record<string, UncheckedJSONSchemaType<T[string], false>>; | ||
| propertyNames?: Omit<UncheckedJSONSchemaType<string, false>, "type"> & { | ||
| type?: "string"; | ||
| }; | ||
| dependencies?: { [K in keyof T]?: readonly (keyof T)[] | UncheckedPartialSchema<T> }; | ||
| dependentRequired?: { [K in keyof T]?: readonly (keyof T)[] }; | ||
| dependentSchemas?: { [K in keyof T]?: UncheckedPartialSchema<T> }; | ||
| minProperties?: number; | ||
| maxProperties?: number; | ||
| } & (IsPartial extends true ? { | ||
| required: readonly (keyof T)[]; | ||
| } : [UncheckedRequiredMembers<T>] extends [never] ? { | ||
| required?: readonly UncheckedRequiredMembers<T>[]; | ||
| } : { | ||
| required: readonly UncheckedRequiredMembers<T>[]; | ||
| }) : T extends null ? { | ||
| type: JSONType<"null", IsPartial>; | ||
| nullable: true; | ||
| } : never) & { | ||
| allOf?: readonly UncheckedPartialSchema<T>[]; | ||
| anyOf?: readonly UncheckedPartialSchema<T>[]; | ||
| oneOf?: readonly UncheckedPartialSchema<T>[]; | ||
| if?: UncheckedPartialSchema<T>; | ||
| then?: UncheckedPartialSchema<T>; | ||
| else?: UncheckedPartialSchema<T>; | ||
| not?: UncheckedPartialSchema<T>; | ||
| })) & { | ||
| [keyword: string]: any; | ||
| $id?: string; | ||
| $ref?: string; | ||
| $defs?: Record<string, UncheckedJSONSchemaType<Known, true>>; | ||
| definitions?: Record<string, UncheckedJSONSchemaType<Known, true>>; | ||
| }; | ||
| type JSONSchemaType<T> = StrictNullChecksWrapper<"JSONSchemaType", UncheckedJSONSchemaType<T, false>>; | ||
| type Known = { | ||
| [key: string]: Known; | ||
| } | [Known, ...Known[]] | Known[] | number | string | boolean | null; | ||
| type UncheckedPropertiesSchema<T> = { [K in keyof T]-?: (UncheckedJSONSchemaType<T[K], false> & Nullable<T[K]>) | { | ||
| $ref: string; | ||
| } }; | ||
| type UncheckedRequiredMembers<T> = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T]; | ||
| type Nullable<T> = 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<string, SomeJTDSchemaType>; | ||
| optionalProperties?: Record<string, SomeJTDSchemaType>; | ||
| additionalProperties?: boolean; | ||
| } | { | ||
| properties?: Record<string, SomeJTDSchemaType>; | ||
| optionalProperties: Record<string, SomeJTDSchemaType>; | ||
| additionalProperties?: boolean; | ||
| } | { | ||
| discriminator: string; | ||
| mapping: Record<string, SomeJTDSchemaType>; | ||
| } | {}) & { | ||
| nullable?: boolean; | ||
| metadata?: Record<string, unknown>; | ||
| definitions?: Record<string, SomeJTDSchemaType>; | ||
| }; | ||
| /** required keys of an object, not undefined */ | ||
| type RequiredKeys<T> = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T]; | ||
| /** optional or undifined-able keys of an object */ | ||
| type OptionalKeys<T> = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T]; | ||
| /** type is true if T is a union type */ | ||
| type IsUnion_<T, U extends T = T> = false extends (T extends unknown ? ([U] extends [T] ? false : true) : never) ? false : true; | ||
| type IsUnion<T> = IsUnion_<T>; | ||
| /** type is true if T is identically E */ | ||
| type TypeEquality<T, E$1> = [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<T, E$1> = TypeEquality<T | null, E$1 | null>; | ||
| /** gets only the string literals of a type or null if a type isn't a string literal */ | ||
| type EnumString<T> = [T] extends [never] ? null : T extends string ? string extends T ? null : T : null; | ||
| /** true if type is a union of string literals */ | ||
| type IsEnum<T> = null extends EnumString<T> ? false : true; | ||
| /** true only if all types are array types (not tuples) */ | ||
| type IsElements<T> = false extends IsUnion<T> ? [T] extends [readonly unknown[]] ? undefined extends T[0.5] ? false : true : false : false; | ||
| /** true if the the type is a values type */ | ||
| type IsValues<T> = false extends IsUnion<T> ? TypeEquality<keyof T, string> : false; | ||
| /** true if type is a properties type and Union is false, or type is a discriminator type and Union is true */ | ||
| type IsRecord<T, Union extends boolean> = Union extends IsUnion<T> ? null extends EnumString<keyof T> ? false : true : false; | ||
| /** true if type represents an empty record */ | ||
| type IsEmptyRecord<T> = [T] extends [Record<string, never>] ? [T] extends [never] ? false : true : false; | ||
| /** actual schema */ | ||
| type JTDSchemaType<T, D extends Record<string, unknown> = Record<string, never>> = ( | ||
| // refs - where null wasn't specified, must match exactly | ||
| (null extends EnumString<keyof D> ? never : ({ [K in keyof D]: [T] extends [D[K]] ? { | ||
| ref: K; | ||
| } : never }[keyof D] & { | ||
| nullable?: false; | ||
| }) | (null extends T ? { [K in keyof D]: [Exclude<T, null>] extends [Exclude<D[K], null>] ? { | ||
| ref: K; | ||
| } : never }[keyof D] & { | ||
| nullable: true; | ||
| } : never)) | (unknown extends T ? { | ||
| nullable?: boolean; | ||
| } : never) | ((true extends NullTypeEquality<T, number> ? { | ||
| type: NumberType; | ||
| } : true extends NullTypeEquality<T, boolean> ? { | ||
| type: "boolean"; | ||
| } : true extends NullTypeEquality<T, string> ? { | ||
| type: StringType; | ||
| } : true extends NullTypeEquality<T, Date> ? { | ||
| type: "timestamp"; | ||
| } : true extends IsEnum<Exclude<T, null>> ? { | ||
| enum: EnumString<Exclude<T, null>>[]; | ||
| } : true extends IsElements<Exclude<T, null>> ? T extends readonly (infer E)[] ? { | ||
| elements: JTDSchemaType<E, D>; | ||
| } : never : true extends IsEmptyRecord<Exclude<T, null>> ? { | ||
| properties: Record<string, never>; | ||
| optionalProperties?: Record<string, never>; | ||
| } | { | ||
| optionalProperties: Record<string, never>; | ||
| } : true extends IsValues<Exclude<T, null>> ? T extends Record<string, infer V> ? { | ||
| values: JTDSchemaType<V, D>; | ||
| } : never : true extends IsRecord<Exclude<T, null>, false> ? ([RequiredKeys<Exclude<T, null>>] extends [never] ? { | ||
| properties?: Record<string, never>; | ||
| } : { | ||
| properties: { [K in RequiredKeys<T>]: JTDSchemaType<T[K], D> }; | ||
| }) & ([OptionalKeys<Exclude<T, null>>] extends [never] ? { | ||
| optionalProperties?: Record<string, never>; | ||
| } : { | ||
| optionalProperties: { [K in OptionalKeys<T>]: JTDSchemaType<Exclude<T[K], undefined>, D> }; | ||
| }) & { | ||
| additionalProperties?: boolean; | ||
| } : true extends IsRecord<Exclude<T, null>, true> ? { [K in keyof Exclude<T, null>]-?: Exclude<T, null>[K] extends string ? { | ||
| discriminator: K; | ||
| mapping: { [M in Exclude<T, null>[K]]: JTDSchemaType<Omit<T extends Record<K, M> ? T : never, K>, D> }; | ||
| } : never }[keyof Exclude<T, null>] : never) & (null extends T ? { | ||
| nullable: true; | ||
| } : { | ||
| nullable?: false; | ||
| }))) & { | ||
| metadata?: Record<string, unknown>; | ||
| definitions?: { [K in keyof D]: JTDSchemaType<D[K], D> }; | ||
| }; | ||
| type JTDDataDef<S, D extends Record<string, unknown>> = | ||
| // ref | ||
| (S extends { | ||
| ref: string; | ||
| } ? D extends { [K in S["ref"]]: infer V } ? JTDDataDef<V, D> : 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<E, D>[] : S extends { | ||
| properties: Record<string, unknown>; | ||
| optionalProperties?: Record<string, unknown>; | ||
| additionalProperties?: boolean; | ||
| } ? { -readonly [K in keyof S["properties"]]-?: JTDDataDef<S["properties"][K], D> } & { -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef<S["optionalProperties"][K], D> } & ([S["additionalProperties"]] extends [true] ? Record<string, unknown> : unknown) : S extends { | ||
| properties?: Record<string, unknown>; | ||
| optionalProperties: Record<string, unknown>; | ||
| additionalProperties?: boolean; | ||
| } ? { -readonly [K in keyof S["properties"]]-?: JTDDataDef<S["properties"][K], D> } & { -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef<S["optionalProperties"][K], D> } & ([S["additionalProperties"]] extends [true] ? Record<string, unknown> : unknown) : S extends { | ||
| values: infer V; | ||
| } ? Record<string, JTDDataDef<V, D>> : S extends { | ||
| discriminator: infer M; | ||
| mapping: Record<string, unknown>; | ||
| } ? [M] extends [string] ? { [K in keyof S["mapping"]]: JTDDataDef<S["mapping"][K], D> & { [KM in M]: K } }[keyof S["mapping"]] : never : unknown) | (S extends { | ||
| nullable: true; | ||
| } ? null : never); | ||
| type JTDDataType<S> = S extends { | ||
| definitions: Record<string, unknown>; | ||
| } ? JTDDataDef<S, S["definitions"]> : JTDDataDef<S, Record<string, never>>; | ||
| //#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<ErrorObject>[]; | ||
| readonly ajv: true; | ||
| readonly validation: true; | ||
| constructor(errors: Partial<ErrorObject>[]); | ||
| } | ||
| //#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<Opts> { | ||
| (ajv: Ajv$2, options?: Opts): Ajv$2; | ||
| [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<AnySchemaObject>; | ||
| 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<Options[K]> } & { | ||
| code: InstanceCodeOptions; | ||
| }; | ||
| type InstanceOptions = Options & RequiredInstanceOptions; | ||
| interface Logger { | ||
| log(...args: unknown[]): unknown; | ||
| warn(...args: unknown[]): unknown; | ||
| error(...args: unknown[]): unknown; | ||
| } | ||
| declare class Ajv$2 { | ||
| 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<SchemaEnv>; | ||
| 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<unknown>; | ||
| validate<T>(schema: Schema | JSONSchemaType<T> | string, data: unknown): data is T; | ||
| validate<T>(schema: JTDSchemaType<T>, data: unknown): data is T; | ||
| validate<N extends never, T extends SomeJTDSchemaType>(schema: T, data: unknown): data is JTDDataType<T>; | ||
| validate<T>(schema: AsyncSchema, data: unknown | T): Promise<T>; | ||
| validate<T>(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise<T>; | ||
| compile<T = unknown>(schema: Schema | JSONSchemaType<T>, _meta?: boolean): ValidateFunction<T>; | ||
| compile<T = unknown>(schema: JTDSchemaType<T>, _meta?: boolean): ValidateFunction<T>; | ||
| compile<N extends never, T extends SomeJTDSchemaType>(schema: T, _meta?: boolean): ValidateFunction<JTDDataType<T>>; | ||
| compile<T = unknown>(schema: AsyncSchema, _meta?: boolean): AsyncValidateFunction<T>; | ||
| compile<T = unknown>(schema: AnySchema, _meta?: boolean): AnyValidateFunction<T>; | ||
| compileAsync<T = unknown>(schema: SchemaObject | JSONSchemaType<T>, _meta?: boolean): Promise<ValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: JTDSchemaType<T>, _meta?: boolean): Promise<ValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: AsyncSchema, meta?: boolean): Promise<AsyncValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: AnySchemaObject, meta?: boolean): Promise<AnyValidateFunction<T>>; | ||
| 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$2; | ||
| addMetaSchema(schema: AnySchemaObject, key?: string, | ||
| // schema key | ||
| _validateSchema?: boolean | "log"): Ajv$2; | ||
| validateSchema(schema: AnySchema, throwOrLogError?: boolean): boolean | Promise<unknown>; | ||
| getSchema<T = unknown>(keyRef: string): AnyValidateFunction<T> | undefined; | ||
| removeSchema(schemaKeyRef?: AnySchema | string | RegExp): Ajv$2; | ||
| addVocabulary(definitions: Vocabulary): Ajv$2; | ||
| addKeyword(kwdOrDef: string | KeywordDefinition, def?: KeywordDefinition): Ajv$2; | ||
| getKeyword(keyword: string): AddedKeywordDefinition | boolean; | ||
| removeKeyword(keyword: string): Ajv$2; | ||
| addFormat(name: string, format: Format): Ajv$2; | ||
| 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<string>; | ||
| 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$2; | ||
| } | ||
| 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<T extends string | number = string | number> { | ||
| instancePath: string; | ||
| parentData: { [K in T]: any }; | ||
| parentDataProperty: T; | ||
| rootData: Record<string, any> | any[]; | ||
| dynamicAnchors: { [Ref in string]?: ValidateFunction }; | ||
| } | ||
| interface ValidateFunction<T = unknown> { | ||
| (this: Ajv$2 | 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<T = unknown> extends ValidateFunction<T> { | ||
| (...args: Parameters<ValidateFunction<T>>): Promise<T>; | ||
| $async: true; | ||
| } | ||
| type AnyValidateFunction<T = any> = ValidateFunction<T> | AsyncValidateFunction<T>; | ||
| interface ErrorObject<K$1 extends string = string, P = Record<string, any>, 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<ValidateFunction>): boolean | Promise<any>; | ||
| errors?: Partial<ErrorObject>[]; | ||
| } | ||
| interface SchemaValidateFunction { | ||
| (schema: any, data: any, parentSchema?: AnySchemaObject, dataCxt?: DataValidationCxt): boolean | Promise<any>; | ||
| errors?: Partial<ErrorObject>[]; | ||
| } | ||
| 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<T extends string | number> = (data: T) => boolean; | ||
| type FormatCompare<T extends string | number> = (data1: T, data2: T) => number | undefined; | ||
| type AsyncFormatValidator<T extends string | number> = (data: T) => Promise<boolean>; | ||
| interface FormatDefinition<T extends string | number> { | ||
| type?: T extends string ? "string" | undefined : "number"; | ||
| validate: FormatValidator<T> | (T extends string ? string | RegExp : never); | ||
| async?: false | undefined; | ||
| compare?: FormatCompare<T>; | ||
| } | ||
| interface AsyncFormatDefinition<T extends string | number> { | ||
| type?: T extends string ? "string" | undefined : "number"; | ||
| validate: AsyncFormatValidator<T>; | ||
| async: true; | ||
| compare?: FormatCompare<T>; | ||
| } | ||
| type AddedFormat = true | RegExp | FormatValidator<string> | FormatDefinition<string> | FormatDefinition<number> | AsyncFormatDefinition<string> | AsyncFormatDefinition<number>; | ||
| 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$1 extends Ajv$2 { | ||
| _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<FormatsPluginOptions> { | ||
| 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-formats` default export, normalised through the CJS/ESM interop wrapper. */ | ||
| declare const addFormats: typeof formatsPlugin.default; | ||
| /** | ||
| * 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). | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`; pass a pre-configured Ajv instance to validate | ||
| * other dialects. The SDK bundles ajv internally but does not re-export `Ajv2020` (its type | ||
| * graph tips downstream declaration bundling — see #2339). To construct a custom 2020-12 | ||
| * instance, add `ajv` to your own dependencies (matching the SDK's pinned version) and | ||
| * `import { Ajv2020 } from 'ajv/dist/2020.js'` — `new Ajv(...)` is the draft-07 class and would | ||
| * silently downgrade dialect. | ||
| * | ||
| * @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" | ||
| * // import { Ajv2020 } from 'ajv/dist/2020.js'; | ||
| * const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true }); | ||
| * const validator = new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| * | ||
| * @example Register ajv-formats | ||
| * ```ts source="./ajvProvider.examples.ts#AjvJsonSchemaValidator_withFormats" | ||
| * // import { Ajv2020 } from 'ajv/dist/2020.js'; | ||
| * const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true }); | ||
| * addFormats(ajv); | ||
| * const validator = new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| */ | ||
| declare class AjvJsonSchemaValidator implements jsonSchemaValidator { | ||
| private readonly _ajv; | ||
| /** True iff the constructor received a caller-supplied engine; the `$schema` check is skipped. */ | ||
| private readonly _userAjv; | ||
| /** | ||
| * @param ajv - Optional pre-configured AJV-compatible instance. When supplied, this instance is | ||
| * used for **every** schema regardless of its declared `$schema` (the caller owns dialect | ||
| * choice). When omitted, the provider constructs a single `Ajv2020` instance 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<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| /** | ||
| * Draft-07 AJV class, re-exported for consumers who need to opt back to the pre-SEP-1613 default. | ||
| * The full v1-equivalent construction is: | ||
| * | ||
| * ```ts | ||
| * const ajv = new Ajv({ strict: false, validateFormats: true, validateSchema: false, allErrors: true }); | ||
| * addFormats(ajv); | ||
| * new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| * | ||
| * (omitting `validateSchema: false` makes a 2020-12-stamped `$schema` fail with an opaque | ||
| * "no schema with key or ref …" engine error; omitting `addFormats` silently drops `format` | ||
| * validation that the v1 default had). | ||
| * | ||
| * The SDK bundles ajv internally but does not re-export `Ajv2020` (its type graph tips downstream | ||
| * declaration bundling — see #2339). To construct a custom 2020-12 instance, add `ajv` to your own | ||
| * dependencies (matching the SDK's pinned version) and `import { Ajv2020 } from 'ajv/dist/2020.js'`. | ||
| */ | ||
| declare const Ajv: typeof Ajv$1; | ||
| //#endregion | ||
| export { AjvJsonSchemaValidator as n, addFormats as r, Ajv as t }; | ||
| //# sourceMappingURL=ajvProvider-BAeyH14y.d.cts.map |
Sorry, the diff of this file is too big to display
| import { i as jsonSchemaValidator, n as JsonSchemaValidator, t as JsonSchemaType } from "./types-BV_484UZ.mjs"; | ||
| //#region ../core-internal/src/validators/fastUriShim.d.ts | ||
| /** | ||
| * dts-bundling shim for `fast-uri`. | ||
| * | ||
| * ajv@8.18.0's published .d.ts does `import { URIComponent } from "fast-uri"`, | ||
| * but fast-uri ships its types as `export = namespace`, which rolldown's dts | ||
| * bundler can't destructure into a named import — it drops the import and | ||
| * leaves a dangling `URIComponent` reference in the bundled .d.mts (TS2304 for | ||
| * downstream consumers with `skipLibCheck: false`). | ||
| * | ||
| * The server/client tsdown configs map `fast-uri` to this file via | ||
| * `dts.compilerOptions.paths` so the type is inlined as a plain named export. | ||
| * Runtime code is unaffected (this is a `.d.ts`; the path mapping is dts-only). | ||
| */ | ||
| // Field-for-field copy of fast-uri@3.1.0's URIComponent (types/index.d.ts). | ||
| // Keep in sync when bumping fast-uri/ajv. | ||
| interface URIComponent { | ||
| scheme?: string; | ||
| userinfo?: string; | ||
| host?: string; | ||
| port?: number | string; | ||
| path?: string; | ||
| query?: string; | ||
| fragment?: string; | ||
| reference?: string; | ||
| nid?: string; | ||
| nss?: string; | ||
| resourceName?: string; | ||
| secure?: boolean; | ||
| uuid?: string; | ||
| error?: string; | ||
| } | ||
| //#endregion | ||
| //#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<string, number | undefined>; | ||
| 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<string>; | ||
| parent?: Scope; | ||
| } | ||
| interface ValueScopeOptions extends ScopeOptions { | ||
| scope: ScopeStore; | ||
| es5?: boolean; | ||
| lines?: boolean; | ||
| } | ||
| type ScopeStore = Record<string, ValueReference[] | undefined>; | ||
| type ScopeValues = { [Prefix in string]?: Map<unknown, ValueScopeName> }; | ||
| type ScopeValueSets = { [Prefix in string]?: Set<ValueScopeName> }; | ||
| declare enum UsedValueState { | ||
| Started = 0, | ||
| Completed = 1, | ||
| } | ||
| type UsedScopeValues = { [Prefix in string]?: Map<ValueScopeName, UsedValueState | undefined> }; | ||
| declare class Scope { | ||
| protected readonly _names: { [Prefix in string]?: NameGroup }; | ||
| protected readonly _prefixes?: Set<string>; | ||
| 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<string>; | ||
| 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<Name$1 extends string, Type$1> = undefined extends null ? `strictNullChecks must be true in tsconfig to use ${Name$1}` : Type$1; | ||
| type UnionToIntersection<U> = (U extends any ? (_: U) => void : never) extends ((_: infer I) => void) ? I : never; | ||
| type UncheckedPartialSchema<T> = Partial<UncheckedJSONSchemaType<T, true>>; | ||
| type JSONType<T extends string, IsPartial extends boolean> = 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<T, IsPartial extends boolean> = ( | ||
| // these two unions allow arbitrary unions of types | ||
| { | ||
| anyOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]; | ||
| } | { | ||
| oneOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]; | ||
| } | ({ | ||
| 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 ? NumberKeywords : T extends string ? StringKeywords : T extends boolean ? {} : never>) | ((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<T[K], false> & Nullable<T[K]> } & { | ||
| length: T["length"]; | ||
| }; | ||
| minItems: T["length"]; | ||
| } & ({ | ||
| maxItems: T["length"]; | ||
| } | { | ||
| additionalItems: false; | ||
| }) : T extends readonly any[] ? { | ||
| type: JSONType<"array", IsPartial>; | ||
| items: UncheckedJSONSchemaType<T[0], false>; | ||
| contains?: UncheckedPartialSchema<T[0]>; | ||
| minItems?: number; | ||
| maxItems?: number; | ||
| minContains?: number; | ||
| maxContains?: number; | ||
| uniqueItems?: true; | ||
| additionalItems?: never; | ||
| } : T extends Record<string, any> ? { | ||
| type: JSONType<"object", IsPartial>; | ||
| additionalProperties?: boolean | UncheckedJSONSchemaType<T[string], false>; | ||
| unevaluatedProperties?: boolean | UncheckedJSONSchemaType<T[string], false>; | ||
| properties?: IsPartial extends true ? Partial<UncheckedPropertiesSchema<T>> : UncheckedPropertiesSchema<T>; | ||
| patternProperties?: Record<string, UncheckedJSONSchemaType<T[string], false>>; | ||
| propertyNames?: Omit<UncheckedJSONSchemaType<string, false>, "type"> & { | ||
| type?: "string"; | ||
| }; | ||
| dependencies?: { [K in keyof T]?: readonly (keyof T)[] | UncheckedPartialSchema<T> }; | ||
| dependentRequired?: { [K in keyof T]?: readonly (keyof T)[] }; | ||
| dependentSchemas?: { [K in keyof T]?: UncheckedPartialSchema<T> }; | ||
| minProperties?: number; | ||
| maxProperties?: number; | ||
| } & (IsPartial extends true ? { | ||
| required: readonly (keyof T)[]; | ||
| } : [UncheckedRequiredMembers<T>] extends [never] ? { | ||
| required?: readonly UncheckedRequiredMembers<T>[]; | ||
| } : { | ||
| required: readonly UncheckedRequiredMembers<T>[]; | ||
| }) : T extends null ? { | ||
| type: JSONType<"null", IsPartial>; | ||
| nullable: true; | ||
| } : never) & { | ||
| allOf?: readonly UncheckedPartialSchema<T>[]; | ||
| anyOf?: readonly UncheckedPartialSchema<T>[]; | ||
| oneOf?: readonly UncheckedPartialSchema<T>[]; | ||
| if?: UncheckedPartialSchema<T>; | ||
| then?: UncheckedPartialSchema<T>; | ||
| else?: UncheckedPartialSchema<T>; | ||
| not?: UncheckedPartialSchema<T>; | ||
| })) & { | ||
| [keyword: string]: any; | ||
| $id?: string; | ||
| $ref?: string; | ||
| $defs?: Record<string, UncheckedJSONSchemaType<Known, true>>; | ||
| definitions?: Record<string, UncheckedJSONSchemaType<Known, true>>; | ||
| }; | ||
| type JSONSchemaType<T> = StrictNullChecksWrapper<"JSONSchemaType", UncheckedJSONSchemaType<T, false>>; | ||
| type Known = { | ||
| [key: string]: Known; | ||
| } | [Known, ...Known[]] | Known[] | number | string | boolean | null; | ||
| type UncheckedPropertiesSchema<T> = { [K in keyof T]-?: (UncheckedJSONSchemaType<T[K], false> & Nullable<T[K]>) | { | ||
| $ref: string; | ||
| } }; | ||
| type UncheckedRequiredMembers<T> = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T]; | ||
| type Nullable<T> = 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<string, SomeJTDSchemaType>; | ||
| optionalProperties?: Record<string, SomeJTDSchemaType>; | ||
| additionalProperties?: boolean; | ||
| } | { | ||
| properties?: Record<string, SomeJTDSchemaType>; | ||
| optionalProperties: Record<string, SomeJTDSchemaType>; | ||
| additionalProperties?: boolean; | ||
| } | { | ||
| discriminator: string; | ||
| mapping: Record<string, SomeJTDSchemaType>; | ||
| } | {}) & { | ||
| nullable?: boolean; | ||
| metadata?: Record<string, unknown>; | ||
| definitions?: Record<string, SomeJTDSchemaType>; | ||
| }; | ||
| /** required keys of an object, not undefined */ | ||
| type RequiredKeys<T> = { [K in keyof T]-?: undefined extends T[K] ? never : K }[keyof T]; | ||
| /** optional or undifined-able keys of an object */ | ||
| type OptionalKeys<T> = { [K in keyof T]-?: undefined extends T[K] ? K : never }[keyof T]; | ||
| /** type is true if T is a union type */ | ||
| type IsUnion_<T, U extends T = T> = false extends (T extends unknown ? ([U] extends [T] ? false : true) : never) ? false : true; | ||
| type IsUnion<T> = IsUnion_<T>; | ||
| /** type is true if T is identically E */ | ||
| type TypeEquality<T, E$1> = [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<T, E$1> = TypeEquality<T | null, E$1 | null>; | ||
| /** gets only the string literals of a type or null if a type isn't a string literal */ | ||
| type EnumString<T> = [T] extends [never] ? null : T extends string ? string extends T ? null : T : null; | ||
| /** true if type is a union of string literals */ | ||
| type IsEnum<T> = null extends EnumString<T> ? false : true; | ||
| /** true only if all types are array types (not tuples) */ | ||
| type IsElements<T> = false extends IsUnion<T> ? [T] extends [readonly unknown[]] ? undefined extends T[0.5] ? false : true : false : false; | ||
| /** true if the the type is a values type */ | ||
| type IsValues<T> = false extends IsUnion<T> ? TypeEquality<keyof T, string> : false; | ||
| /** true if type is a properties type and Union is false, or type is a discriminator type and Union is true */ | ||
| type IsRecord<T, Union extends boolean> = Union extends IsUnion<T> ? null extends EnumString<keyof T> ? false : true : false; | ||
| /** true if type represents an empty record */ | ||
| type IsEmptyRecord<T> = [T] extends [Record<string, never>] ? [T] extends [never] ? false : true : false; | ||
| /** actual schema */ | ||
| type JTDSchemaType<T, D extends Record<string, unknown> = Record<string, never>> = ( | ||
| // refs - where null wasn't specified, must match exactly | ||
| (null extends EnumString<keyof D> ? never : ({ [K in keyof D]: [T] extends [D[K]] ? { | ||
| ref: K; | ||
| } : never }[keyof D] & { | ||
| nullable?: false; | ||
| }) | (null extends T ? { [K in keyof D]: [Exclude<T, null>] extends [Exclude<D[K], null>] ? { | ||
| ref: K; | ||
| } : never }[keyof D] & { | ||
| nullable: true; | ||
| } : never)) | (unknown extends T ? { | ||
| nullable?: boolean; | ||
| } : never) | ((true extends NullTypeEquality<T, number> ? { | ||
| type: NumberType; | ||
| } : true extends NullTypeEquality<T, boolean> ? { | ||
| type: "boolean"; | ||
| } : true extends NullTypeEquality<T, string> ? { | ||
| type: StringType; | ||
| } : true extends NullTypeEquality<T, Date> ? { | ||
| type: "timestamp"; | ||
| } : true extends IsEnum<Exclude<T, null>> ? { | ||
| enum: EnumString<Exclude<T, null>>[]; | ||
| } : true extends IsElements<Exclude<T, null>> ? T extends readonly (infer E)[] ? { | ||
| elements: JTDSchemaType<E, D>; | ||
| } : never : true extends IsEmptyRecord<Exclude<T, null>> ? { | ||
| properties: Record<string, never>; | ||
| optionalProperties?: Record<string, never>; | ||
| } | { | ||
| optionalProperties: Record<string, never>; | ||
| } : true extends IsValues<Exclude<T, null>> ? T extends Record<string, infer V> ? { | ||
| values: JTDSchemaType<V, D>; | ||
| } : never : true extends IsRecord<Exclude<T, null>, false> ? ([RequiredKeys<Exclude<T, null>>] extends [never] ? { | ||
| properties?: Record<string, never>; | ||
| } : { | ||
| properties: { [K in RequiredKeys<T>]: JTDSchemaType<T[K], D> }; | ||
| }) & ([OptionalKeys<Exclude<T, null>>] extends [never] ? { | ||
| optionalProperties?: Record<string, never>; | ||
| } : { | ||
| optionalProperties: { [K in OptionalKeys<T>]: JTDSchemaType<Exclude<T[K], undefined>, D> }; | ||
| }) & { | ||
| additionalProperties?: boolean; | ||
| } : true extends IsRecord<Exclude<T, null>, true> ? { [K in keyof Exclude<T, null>]-?: Exclude<T, null>[K] extends string ? { | ||
| discriminator: K; | ||
| mapping: { [M in Exclude<T, null>[K]]: JTDSchemaType<Omit<T extends Record<K, M> ? T : never, K>, D> }; | ||
| } : never }[keyof Exclude<T, null>] : never) & (null extends T ? { | ||
| nullable: true; | ||
| } : { | ||
| nullable?: false; | ||
| }))) & { | ||
| metadata?: Record<string, unknown>; | ||
| definitions?: { [K in keyof D]: JTDSchemaType<D[K], D> }; | ||
| }; | ||
| type JTDDataDef<S, D extends Record<string, unknown>> = | ||
| // ref | ||
| (S extends { | ||
| ref: string; | ||
| } ? D extends { [K in S["ref"]]: infer V } ? JTDDataDef<V, D> : 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<E, D>[] : S extends { | ||
| properties: Record<string, unknown>; | ||
| optionalProperties?: Record<string, unknown>; | ||
| additionalProperties?: boolean; | ||
| } ? { -readonly [K in keyof S["properties"]]-?: JTDDataDef<S["properties"][K], D> } & { -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef<S["optionalProperties"][K], D> } & ([S["additionalProperties"]] extends [true] ? Record<string, unknown> : unknown) : S extends { | ||
| properties?: Record<string, unknown>; | ||
| optionalProperties: Record<string, unknown>; | ||
| additionalProperties?: boolean; | ||
| } ? { -readonly [K in keyof S["properties"]]-?: JTDDataDef<S["properties"][K], D> } & { -readonly [K in keyof S["optionalProperties"]]+?: JTDDataDef<S["optionalProperties"][K], D> } & ([S["additionalProperties"]] extends [true] ? Record<string, unknown> : unknown) : S extends { | ||
| values: infer V; | ||
| } ? Record<string, JTDDataDef<V, D>> : S extends { | ||
| discriminator: infer M; | ||
| mapping: Record<string, unknown>; | ||
| } ? [M] extends [string] ? { [K in keyof S["mapping"]]: JTDDataDef<S["mapping"][K], D> & { [KM in M]: K } }[keyof S["mapping"]] : never : unknown) | (S extends { | ||
| nullable: true; | ||
| } ? null : never); | ||
| type JTDDataType<S> = S extends { | ||
| definitions: Record<string, unknown>; | ||
| } ? JTDDataDef<S, S["definitions"]> : JTDDataDef<S, Record<string, never>>; | ||
| //#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<ErrorObject>[]; | ||
| readonly ajv: true; | ||
| readonly validation: true; | ||
| constructor(errors: Partial<ErrorObject>[]); | ||
| } | ||
| //#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<Opts> { | ||
| (ajv: Ajv$2, options?: Opts): Ajv$2; | ||
| [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<AnySchemaObject>; | ||
| 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<Options[K]> } & { | ||
| code: InstanceCodeOptions; | ||
| }; | ||
| type InstanceOptions = Options & RequiredInstanceOptions; | ||
| interface Logger { | ||
| log(...args: unknown[]): unknown; | ||
| warn(...args: unknown[]): unknown; | ||
| error(...args: unknown[]): unknown; | ||
| } | ||
| declare class Ajv$2 { | ||
| 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<SchemaEnv>; | ||
| 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<unknown>; | ||
| validate<T>(schema: Schema | JSONSchemaType<T> | string, data: unknown): data is T; | ||
| validate<T>(schema: JTDSchemaType<T>, data: unknown): data is T; | ||
| validate<N extends never, T extends SomeJTDSchemaType>(schema: T, data: unknown): data is JTDDataType<T>; | ||
| validate<T>(schema: AsyncSchema, data: unknown | T): Promise<T>; | ||
| validate<T>(schemaKeyRef: AnySchema | string, data: unknown): data is T | Promise<T>; | ||
| compile<T = unknown>(schema: Schema | JSONSchemaType<T>, _meta?: boolean): ValidateFunction<T>; | ||
| compile<T = unknown>(schema: JTDSchemaType<T>, _meta?: boolean): ValidateFunction<T>; | ||
| compile<N extends never, T extends SomeJTDSchemaType>(schema: T, _meta?: boolean): ValidateFunction<JTDDataType<T>>; | ||
| compile<T = unknown>(schema: AsyncSchema, _meta?: boolean): AsyncValidateFunction<T>; | ||
| compile<T = unknown>(schema: AnySchema, _meta?: boolean): AnyValidateFunction<T>; | ||
| compileAsync<T = unknown>(schema: SchemaObject | JSONSchemaType<T>, _meta?: boolean): Promise<ValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: JTDSchemaType<T>, _meta?: boolean): Promise<ValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: AsyncSchema, meta?: boolean): Promise<AsyncValidateFunction<T>>; | ||
| compileAsync<T = unknown>(schema: AnySchemaObject, meta?: boolean): Promise<AnyValidateFunction<T>>; | ||
| 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$2; | ||
| addMetaSchema(schema: AnySchemaObject, key?: string, | ||
| // schema key | ||
| _validateSchema?: boolean | "log"): Ajv$2; | ||
| validateSchema(schema: AnySchema, throwOrLogError?: boolean): boolean | Promise<unknown>; | ||
| getSchema<T = unknown>(keyRef: string): AnyValidateFunction<T> | undefined; | ||
| removeSchema(schemaKeyRef?: AnySchema | string | RegExp): Ajv$2; | ||
| addVocabulary(definitions: Vocabulary): Ajv$2; | ||
| addKeyword(kwdOrDef: string | KeywordDefinition, def?: KeywordDefinition): Ajv$2; | ||
| getKeyword(keyword: string): AddedKeywordDefinition | boolean; | ||
| removeKeyword(keyword: string): Ajv$2; | ||
| addFormat(name: string, format: Format): Ajv$2; | ||
| 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<string>; | ||
| 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$2; | ||
| } | ||
| 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<T extends string | number = string | number> { | ||
| instancePath: string; | ||
| parentData: { [K in T]: any }; | ||
| parentDataProperty: T; | ||
| rootData: Record<string, any> | any[]; | ||
| dynamicAnchors: { [Ref in string]?: ValidateFunction }; | ||
| } | ||
| interface ValidateFunction<T = unknown> { | ||
| (this: Ajv$2 | 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<T = unknown> extends ValidateFunction<T> { | ||
| (...args: Parameters<ValidateFunction<T>>): Promise<T>; | ||
| $async: true; | ||
| } | ||
| type AnyValidateFunction<T = any> = ValidateFunction<T> | AsyncValidateFunction<T>; | ||
| interface ErrorObject<K$1 extends string = string, P = Record<string, any>, 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<ValidateFunction>): boolean | Promise<any>; | ||
| errors?: Partial<ErrorObject>[]; | ||
| } | ||
| interface SchemaValidateFunction { | ||
| (schema: any, data: any, parentSchema?: AnySchemaObject, dataCxt?: DataValidationCxt): boolean | Promise<any>; | ||
| errors?: Partial<ErrorObject>[]; | ||
| } | ||
| 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<T extends string | number> = (data: T) => boolean; | ||
| type FormatCompare<T extends string | number> = (data1: T, data2: T) => number | undefined; | ||
| type AsyncFormatValidator<T extends string | number> = (data: T) => Promise<boolean>; | ||
| interface FormatDefinition<T extends string | number> { | ||
| type?: T extends string ? "string" | undefined : "number"; | ||
| validate: FormatValidator<T> | (T extends string ? string | RegExp : never); | ||
| async?: false | undefined; | ||
| compare?: FormatCompare<T>; | ||
| } | ||
| interface AsyncFormatDefinition<T extends string | number> { | ||
| type?: T extends string ? "string" | undefined : "number"; | ||
| validate: AsyncFormatValidator<T>; | ||
| async: true; | ||
| compare?: FormatCompare<T>; | ||
| } | ||
| type AddedFormat = true | RegExp | FormatValidator<string> | FormatDefinition<string> | FormatDefinition<number> | AsyncFormatDefinition<string> | AsyncFormatDefinition<number>; | ||
| 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$1 extends Ajv$2 { | ||
| _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<FormatsPluginOptions> { | ||
| 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-formats` default export, normalised through the CJS/ESM interop wrapper. */ | ||
| declare const addFormats: typeof formatsPlugin.default; | ||
| /** | ||
| * 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). | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`; pass a pre-configured Ajv instance to validate | ||
| * other dialects. The SDK bundles ajv internally but does not re-export `Ajv2020` (its type | ||
| * graph tips downstream declaration bundling — see #2339). To construct a custom 2020-12 | ||
| * instance, add `ajv` to your own dependencies (matching the SDK's pinned version) and | ||
| * `import { Ajv2020 } from 'ajv/dist/2020.js'` — `new Ajv(...)` is the draft-07 class and would | ||
| * silently downgrade dialect. | ||
| * | ||
| * @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" | ||
| * // import { Ajv2020 } from 'ajv/dist/2020.js'; | ||
| * const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true }); | ||
| * const validator = new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| * | ||
| * @example Register ajv-formats | ||
| * ```ts source="./ajvProvider.examples.ts#AjvJsonSchemaValidator_withFormats" | ||
| * // import { Ajv2020 } from 'ajv/dist/2020.js'; | ||
| * const ajv = new Ajv2020({ strict: false, validateSchema: false, allErrors: true }); | ||
| * addFormats(ajv); | ||
| * const validator = new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| */ | ||
| declare class AjvJsonSchemaValidator implements jsonSchemaValidator { | ||
| private readonly _ajv; | ||
| /** True iff the constructor received a caller-supplied engine; the `$schema` check is skipped. */ | ||
| private readonly _userAjv; | ||
| /** | ||
| * @param ajv - Optional pre-configured AJV-compatible instance. When supplied, this instance is | ||
| * used for **every** schema regardless of its declared `$schema` (the caller owns dialect | ||
| * choice). When omitted, the provider constructs a single `Ajv2020` instance 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<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| /** | ||
| * Draft-07 AJV class, re-exported for consumers who need to opt back to the pre-SEP-1613 default. | ||
| * The full v1-equivalent construction is: | ||
| * | ||
| * ```ts | ||
| * const ajv = new Ajv({ strict: false, validateFormats: true, validateSchema: false, allErrors: true }); | ||
| * addFormats(ajv); | ||
| * new AjvJsonSchemaValidator(ajv); | ||
| * ``` | ||
| * | ||
| * (omitting `validateSchema: false` makes a 2020-12-stamped `$schema` fail with an opaque | ||
| * "no schema with key or ref …" engine error; omitting `addFormats` silently drops `format` | ||
| * validation that the v1 default had). | ||
| * | ||
| * The SDK bundles ajv internally but does not re-export `Ajv2020` (its type graph tips downstream | ||
| * declaration bundling — see #2339). To construct a custom 2020-12 instance, add `ajv` to your own | ||
| * dependencies (matching the SDK's pinned version) and `import { Ajv2020 } from 'ajv/dist/2020.js'`. | ||
| */ | ||
| declare const Ajv: typeof Ajv$1; | ||
| //#endregion | ||
| export { AjvJsonSchemaValidator as n, addFormats as r, Ajv as t }; | ||
| //# sourceMappingURL=ajvProvider-Bk0uZgeB.d.mts.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| import { i as jsonSchemaValidator, n as JsonSchemaValidator, t as JsonSchemaType } from "./types-ClyURo_K.cjs"; | ||
| //#region ../core-internal/src/validators/cfWorkerProvider.d.ts | ||
| /** | ||
| * JSON Schema draft version supported by `@cfworker/json-schema`. | ||
| */ | ||
| type CfWorkerSchemaDraft = '4' | '7' | '2019-09' | '2020-12'; | ||
| /** | ||
| * `@cfworker/json-schema`-backed JSON Schema validator. See | ||
| * `@modelcontextprotocol/{client,server}/validators/cf-worker` for the customisation entry point. | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`. Passing an explicit `draft` to the constructor | ||
| * overrides this — that draft is used for every schema regardless of `$schema`. | ||
| * | ||
| * @example Use with default configuration (2020-12, shortcircuit on) | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_default" | ||
| * const validator = new CfWorkerJsonSchemaValidator(); | ||
| * ``` | ||
| * | ||
| * @example Use with custom configuration | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_customConfig" | ||
| * const validator = new CfWorkerJsonSchemaValidator({ | ||
| * draft: '2020-12', | ||
| * shortcircuit: false // Report all errors | ||
| * }); | ||
| * ``` | ||
| */ | ||
| declare class CfWorkerJsonSchemaValidator implements jsonSchemaValidator { | ||
| private readonly shortcircuit; | ||
| /** Caller-supplied draft; when set, the `$schema` check is skipped (caller owns dialect). */ | ||
| private readonly draft?; | ||
| /** | ||
| * Create a validator | ||
| * | ||
| * @param options - Configuration options | ||
| * @param options.shortcircuit - If `true`, stop validation after first error (default: `true`) | ||
| * @param options.draft - JSON Schema draft version to force for every schema. When set, the | ||
| * `$schema` check is skipped. When omitted, the provider validates as 2020-12 and rejects | ||
| * schemas declaring a different `$schema`. | ||
| */ | ||
| constructor(options?: { | ||
| shortcircuit?: boolean; | ||
| draft?: CfWorkerSchemaDraft; | ||
| }); | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * Unlike AJV, this validator is not cached internally | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that validates input data | ||
| */ | ||
| getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| //#endregion | ||
| export { CfWorkerSchemaDraft as n, CfWorkerJsonSchemaValidator as t }; | ||
| //# sourceMappingURL=cfWorkerProvider-B7lHA3P9.d.cts.map |
| {"version":3,"file":"cfWorkerProvider-B7lHA3P9.d.cts","names":[],"sources":["../../core-internal/src/validators/cfWorkerProvider.ts"],"sourcesContent":[],"mappings":";;;;;;;KAiBY,mBAAA;;;;;;;;;;;;;;;;;;;;;;cAgCC,2BAAA,YAAuC;;;;;;;;;;;;;;;YAcQ;;;;;;;;;;0BAahC,iBAAiB,oBAAoB"} |
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js | ||
| function deepCompareStrict(a, b) { | ||
| const typeofa = typeof a; | ||
| if (typeofa !== typeof b) return false; | ||
| if (Array.isArray(a)) { | ||
| if (!Array.isArray(b)) return false; | ||
| const length = a.length; | ||
| if (length !== b.length) return false; | ||
| for (let i = 0; i < length; i++) if (!deepCompareStrict(a[i], b[i])) return false; | ||
| return true; | ||
| } | ||
| if (typeofa === "object") { | ||
| if (!a || !b) return a === b; | ||
| const aKeys = Object.keys(a); | ||
| const bKeys = Object.keys(b); | ||
| if (aKeys.length !== bKeys.length) return false; | ||
| for (const k of aKeys) if (!deepCompareStrict(a[k], b[k])) return false; | ||
| return true; | ||
| } | ||
| return a === b; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/pointer.js | ||
| function encodePointer(p) { | ||
| return encodeURI(escapePointer(p)); | ||
| } | ||
| function escapePointer(p) { | ||
| return p.replace(/~/g, "~0").replace(/\//g, "~1"); | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/dereference.js | ||
| const schemaArrayKeyword = { | ||
| prefixItems: true, | ||
| items: true, | ||
| allOf: true, | ||
| anyOf: true, | ||
| oneOf: true | ||
| }; | ||
| const schemaMapKeyword = { | ||
| $defs: true, | ||
| definitions: true, | ||
| properties: true, | ||
| patternProperties: true, | ||
| dependentSchemas: true | ||
| }; | ||
| const ignoredKeyword = { | ||
| id: true, | ||
| $id: true, | ||
| $ref: true, | ||
| $schema: true, | ||
| $anchor: true, | ||
| $vocabulary: true, | ||
| $comment: true, | ||
| default: true, | ||
| enum: true, | ||
| const: true, | ||
| required: true, | ||
| type: true, | ||
| maximum: true, | ||
| minimum: true, | ||
| exclusiveMaximum: true, | ||
| exclusiveMinimum: true, | ||
| multipleOf: true, | ||
| maxLength: true, | ||
| minLength: true, | ||
| pattern: true, | ||
| format: true, | ||
| maxItems: true, | ||
| minItems: true, | ||
| uniqueItems: true, | ||
| maxProperties: true, | ||
| minProperties: true | ||
| }; | ||
| let initialBaseURI = typeof self !== "undefined" && self.location && self.location.origin !== "null" ? new URL(self.location.origin + self.location.pathname + location.search) : new URL("https://github.com/cfworker"); | ||
| function dereference(schema, lookup = Object.create(null), baseURI = initialBaseURI, basePointer = "") { | ||
| if (schema && typeof schema === "object" && !Array.isArray(schema)) { | ||
| const id = schema.$id || schema.id; | ||
| if (id) { | ||
| const url = new URL(id, baseURI.href); | ||
| if (url.hash.length > 1) lookup[url.href] = schema; | ||
| else { | ||
| url.hash = ""; | ||
| if (basePointer === "") baseURI = url; | ||
| else dereference(schema, lookup, baseURI); | ||
| } | ||
| } | ||
| } else if (schema !== true && schema !== false) return lookup; | ||
| const schemaURI = baseURI.href + (basePointer ? "#" + basePointer : ""); | ||
| if (lookup[schemaURI] !== void 0) throw new Error(`Duplicate schema URI "${schemaURI}".`); | ||
| lookup[schemaURI] = schema; | ||
| if (schema === true || schema === false) return lookup; | ||
| if (schema.__absolute_uri__ === void 0) Object.defineProperty(schema, "__absolute_uri__", { | ||
| enumerable: false, | ||
| value: schemaURI | ||
| }); | ||
| if (schema.$ref && schema.__absolute_ref__ === void 0) { | ||
| const url = new URL(schema.$ref, baseURI.href); | ||
| url.hash = url.hash; | ||
| Object.defineProperty(schema, "__absolute_ref__", { | ||
| enumerable: false, | ||
| value: url.href | ||
| }); | ||
| } | ||
| if (schema.$recursiveRef && schema.__absolute_recursive_ref__ === void 0) { | ||
| const url = new URL(schema.$recursiveRef, baseURI.href); | ||
| url.hash = url.hash; | ||
| Object.defineProperty(schema, "__absolute_recursive_ref__", { | ||
| enumerable: false, | ||
| value: url.href | ||
| }); | ||
| } | ||
| if (schema.$anchor) { | ||
| const url = new URL("#" + schema.$anchor, baseURI.href); | ||
| lookup[url.href] = schema; | ||
| } | ||
| for (let key in schema) { | ||
| if (ignoredKeyword[key]) continue; | ||
| const keyBase = `${basePointer}/${encodePointer(key)}`; | ||
| const subSchema = schema[key]; | ||
| if (Array.isArray(subSchema)) { | ||
| if (schemaArrayKeyword[key]) { | ||
| const length = subSchema.length; | ||
| for (let i = 0; i < length; i++) dereference(subSchema[i], lookup, baseURI, `${keyBase}/${i}`); | ||
| } | ||
| } else if (schemaMapKeyword[key]) for (let subKey in subSchema) dereference(subSchema[subKey], lookup, baseURI, `${keyBase}/${encodePointer(subKey)}`); | ||
| else dereference(subSchema, lookup, baseURI, keyBase); | ||
| } | ||
| return lookup; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/format.js | ||
| const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; | ||
| const DAYS = [ | ||
| 0, | ||
| 31, | ||
| 28, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 30, | ||
| 31 | ||
| ]; | ||
| const TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; | ||
| const HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i; | ||
| const URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f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:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; | ||
| const URL_ = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; | ||
| const UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; | ||
| const JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; | ||
| const JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; | ||
| const RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; | ||
| const EMAIL = (input) => { | ||
| if (input[0] === "\"") return false; | ||
| const [name, host, ...rest] = input.split("@"); | ||
| if (!name || !host || rest.length !== 0 || name.length > 64 || host.length > 253) return false; | ||
| if (name[0] === "." || name.endsWith(".") || name.includes("..")) return false; | ||
| if (!/^[a-z0-9.-]+$/i.test(host) || !/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(name)) return false; | ||
| return host.split(".").every((part) => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(part)); | ||
| }; | ||
| const IPV4 = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/; | ||
| const IPV6 = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i; | ||
| const DURATION = (input) => input.length > 1 && input.length < 80 && (/^P\d+([.,]\d+)?W$/.test(input) || /^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(input) && /^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(input)); | ||
| function bind(r) { | ||
| return r.test.bind(r); | ||
| } | ||
| const format = { | ||
| date, | ||
| time: time.bind(void 0, false), | ||
| "date-time": date_time, | ||
| duration: DURATION, | ||
| uri, | ||
| "uri-reference": bind(URIREF), | ||
| "uri-template": bind(URITEMPLATE), | ||
| url: bind(URL_), | ||
| email: EMAIL, | ||
| hostname: bind(HOSTNAME), | ||
| ipv4: bind(IPV4), | ||
| ipv6: bind(IPV6), | ||
| regex, | ||
| uuid: bind(UUID), | ||
| "json-pointer": bind(JSON_POINTER), | ||
| "json-pointer-uri-fragment": bind(JSON_POINTER_URI_FRAGMENT), | ||
| "relative-json-pointer": bind(RELATIVE_JSON_POINTER) | ||
| }; | ||
| function isLeapYear(year) { | ||
| return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); | ||
| } | ||
| function date(str) { | ||
| const matches = str.match(DATE); | ||
| if (!matches) return false; | ||
| const year = +matches[1]; | ||
| const month = +matches[2]; | ||
| const day = +matches[3]; | ||
| return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); | ||
| } | ||
| function time(full, str) { | ||
| const matches = str.match(TIME); | ||
| if (!matches) return false; | ||
| const hour = +matches[1]; | ||
| const minute = +matches[2]; | ||
| const second = +matches[3]; | ||
| const timeZone = !!matches[5]; | ||
| return (hour <= 23 && minute <= 59 && second <= 59 || hour == 23 && minute == 59 && second == 60) && (!full || timeZone); | ||
| } | ||
| const DATE_TIME_SEPARATOR = /t|\s/i; | ||
| function date_time(str) { | ||
| const dateTime = str.split(DATE_TIME_SEPARATOR); | ||
| return dateTime.length == 2 && date(dateTime[0]) && time(true, dateTime[1]); | ||
| } | ||
| const NOT_URI_FRAGMENT = /\/|:/; | ||
| const URI_PATTERN = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; | ||
| function uri(str) { | ||
| return NOT_URI_FRAGMENT.test(str) && URI_PATTERN.test(str); | ||
| } | ||
| const Z_ANCHOR = /[^\\]\\Z/; | ||
| function regex(str) { | ||
| if (Z_ANCHOR.test(str)) return false; | ||
| try { | ||
| new RegExp(str, "u"); | ||
| return true; | ||
| } catch (e) { | ||
| return false; | ||
| } | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js | ||
| function ucs2length(s) { | ||
| let result = 0; | ||
| let length = s.length; | ||
| let index = 0; | ||
| let charCode; | ||
| while (index < length) { | ||
| result++; | ||
| charCode = s.charCodeAt(index++); | ||
| if (charCode >= 55296 && charCode <= 56319 && index < length) { | ||
| charCode = s.charCodeAt(index); | ||
| if ((charCode & 64512) == 56320) index++; | ||
| } | ||
| } | ||
| return result; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validate.js | ||
| function validate(instance, schema, draft = "2019-09", lookup = dereference(schema), shortCircuit = true, recursiveAnchor = null, instanceLocation = "#", schemaLocation = "#", evaluated = Object.create(null)) { | ||
| if (schema === true) return { | ||
| valid: true, | ||
| errors: [] | ||
| }; | ||
| if (schema === false) return { | ||
| valid: false, | ||
| errors: [{ | ||
| instanceLocation, | ||
| keyword: "false", | ||
| keywordLocation: instanceLocation, | ||
| error: "False boolean schema." | ||
| }] | ||
| }; | ||
| const rawInstanceType = typeof instance; | ||
| let instanceType; | ||
| switch (rawInstanceType) { | ||
| case "boolean": | ||
| case "number": | ||
| case "string": | ||
| instanceType = rawInstanceType; | ||
| break; | ||
| case "object": | ||
| if (instance === null) instanceType = "null"; | ||
| else if (Array.isArray(instance)) instanceType = "array"; | ||
| else instanceType = "object"; | ||
| break; | ||
| default: throw new Error(`Instances of "${rawInstanceType}" type are not supported.`); | ||
| } | ||
| const { $ref, $recursiveRef, $recursiveAnchor, type: $type, const: $const, enum: $enum, required: $required, not: $not, anyOf: $anyOf, allOf: $allOf, oneOf: $oneOf, if: $if, then: $then, else: $else, format: $format, properties: $properties, patternProperties: $patternProperties, additionalProperties: $additionalProperties, unevaluatedProperties: $unevaluatedProperties, minProperties: $minProperties, maxProperties: $maxProperties, propertyNames: $propertyNames, dependentRequired: $dependentRequired, dependentSchemas: $dependentSchemas, dependencies: $dependencies, prefixItems: $prefixItems, items: $items, additionalItems: $additionalItems, unevaluatedItems: $unevaluatedItems, contains: $contains, minContains: $minContains, maxContains: $maxContains, minItems: $minItems, maxItems: $maxItems, uniqueItems: $uniqueItems, minimum: $minimum, maximum: $maximum, exclusiveMinimum: $exclusiveMinimum, exclusiveMaximum: $exclusiveMaximum, multipleOf: $multipleOf, minLength: $minLength, maxLength: $maxLength, pattern: $pattern, __absolute_ref__, __absolute_recursive_ref__ } = schema; | ||
| const errors = []; | ||
| if ($recursiveAnchor === true && recursiveAnchor === null) recursiveAnchor = schema; | ||
| if ($recursiveRef === "#") { | ||
| const refSchema = recursiveAnchor === null ? lookup[__absolute_recursive_ref__] : recursiveAnchor; | ||
| const keywordLocation = `${schemaLocation}/$recursiveRef`; | ||
| const result = validate(instance, recursiveAnchor === null ? schema : recursiveAnchor, draft, lookup, shortCircuit, refSchema, instanceLocation, keywordLocation, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "$recursiveRef", | ||
| keywordLocation, | ||
| error: "A subschema had errors." | ||
| }, ...result.errors); | ||
| } | ||
| if ($ref !== void 0) { | ||
| const refSchema = lookup[__absolute_ref__ || $ref]; | ||
| if (refSchema === void 0) { | ||
| let message = `Unresolved $ref "${$ref}".`; | ||
| if (__absolute_ref__ && __absolute_ref__ !== $ref) message += ` Absolute URI "${__absolute_ref__}".`; | ||
| message += `\nKnown schemas:\n- ${Object.keys(lookup).join("\n- ")}`; | ||
| throw new Error(message); | ||
| } | ||
| const keywordLocation = `${schemaLocation}/$ref`; | ||
| const result = validate(instance, refSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "$ref", | ||
| keywordLocation, | ||
| error: "A subschema had errors." | ||
| }, ...result.errors); | ||
| if (draft === "4" || draft === "7") return { | ||
| valid: errors.length === 0, | ||
| errors | ||
| }; | ||
| } | ||
| if (Array.isArray($type)) { | ||
| let length = $type.length; | ||
| let valid = false; | ||
| for (let i = 0; i < length; i++) if (instanceType === $type[i] || $type[i] === "integer" && instanceType === "number" && instance % 1 === 0 && instance === instance) { | ||
| valid = true; | ||
| break; | ||
| } | ||
| if (!valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type.join("\", \"")}".` | ||
| }); | ||
| } else if ($type === "integer") { | ||
| if (instanceType !== "number" || instance % 1 || instance !== instance) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type}".` | ||
| }); | ||
| } else if ($type !== void 0 && instanceType !== $type) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type}".` | ||
| }); | ||
| if ($const !== void 0) { | ||
| if (instanceType === "object" || instanceType === "array") { | ||
| if (!deepCompareStrict(instance, $const)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "const", | ||
| keywordLocation: `${schemaLocation}/const`, | ||
| error: `Instance does not match ${JSON.stringify($const)}.` | ||
| }); | ||
| } else if (instance !== $const) errors.push({ | ||
| instanceLocation, | ||
| keyword: "const", | ||
| keywordLocation: `${schemaLocation}/const`, | ||
| error: `Instance does not match ${JSON.stringify($const)}.` | ||
| }); | ||
| } | ||
| if ($enum !== void 0) { | ||
| if (instanceType === "object" || instanceType === "array") { | ||
| if (!$enum.some((value) => deepCompareStrict(instance, value))) errors.push({ | ||
| instanceLocation, | ||
| keyword: "enum", | ||
| keywordLocation: `${schemaLocation}/enum`, | ||
| error: `Instance does not match any of ${JSON.stringify($enum)}.` | ||
| }); | ||
| } else if (!$enum.some((value) => instance === value)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "enum", | ||
| keywordLocation: `${schemaLocation}/enum`, | ||
| error: `Instance does not match any of ${JSON.stringify($enum)}.` | ||
| }); | ||
| } | ||
| if ($not !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/not`; | ||
| if (validate(instance, $not, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation).valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "not", | ||
| keywordLocation, | ||
| error: "Instance matched \"not\" schema." | ||
| }); | ||
| } | ||
| let subEvaluateds = []; | ||
| if ($anyOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/anyOf`; | ||
| const errorsLength = errors.length; | ||
| let anyValid = false; | ||
| for (let i = 0; i < $anyOf.length; i++) { | ||
| const subSchema = $anyOf[i]; | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| anyValid = anyValid || result.valid; | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| } | ||
| if (anyValid) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "anyOf", | ||
| keywordLocation, | ||
| error: "Instance does not match any subschemas." | ||
| }); | ||
| } | ||
| if ($allOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/allOf`; | ||
| const errorsLength = errors.length; | ||
| let allValid = true; | ||
| for (let i = 0; i < $allOf.length; i++) { | ||
| const subSchema = $allOf[i]; | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| allValid = allValid && result.valid; | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| } | ||
| if (allValid) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "allOf", | ||
| keywordLocation, | ||
| error: `Instance does not match every subschema.` | ||
| }); | ||
| } | ||
| if ($oneOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/oneOf`; | ||
| const errorsLength = errors.length; | ||
| const matches = $oneOf.filter((subSchema, i) => { | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| return result.valid; | ||
| }).length; | ||
| if (matches === 1) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "oneOf", | ||
| keywordLocation, | ||
| error: `Instance does not match exactly one subschema (${matches} matches).` | ||
| }); | ||
| } | ||
| if (instanceType === "object" || instanceType === "array") Object.assign(evaluated, ...subEvaluateds); | ||
| if ($if !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/if`; | ||
| if (validate(instance, $if, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated).valid) { | ||
| if ($then !== void 0) { | ||
| const thenResult = validate(instance, $then, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/then`, evaluated); | ||
| if (!thenResult.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "if", | ||
| keywordLocation, | ||
| error: `Instance does not match "then" schema.` | ||
| }, ...thenResult.errors); | ||
| } | ||
| } else if ($else !== void 0) { | ||
| const elseResult = validate(instance, $else, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/else`, evaluated); | ||
| if (!elseResult.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "if", | ||
| keywordLocation, | ||
| error: `Instance does not match "else" schema.` | ||
| }, ...elseResult.errors); | ||
| } | ||
| } | ||
| if (instanceType === "object") { | ||
| if ($required !== void 0) { | ||
| for (const key of $required) if (!(key in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "required", | ||
| keywordLocation: `${schemaLocation}/required`, | ||
| error: `Instance does not have required property "${key}".` | ||
| }); | ||
| } | ||
| const keys = Object.keys(instance); | ||
| if ($minProperties !== void 0 && keys.length < $minProperties) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minProperties", | ||
| keywordLocation: `${schemaLocation}/minProperties`, | ||
| error: `Instance does not have at least ${$minProperties} properties.` | ||
| }); | ||
| if ($maxProperties !== void 0 && keys.length > $maxProperties) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxProperties", | ||
| keywordLocation: `${schemaLocation}/maxProperties`, | ||
| error: `Instance does not have at least ${$maxProperties} properties.` | ||
| }); | ||
| if ($propertyNames !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/propertyNames`; | ||
| for (const key in instance) { | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(key, $propertyNames, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "propertyNames", | ||
| keywordLocation, | ||
| error: `Property name "${key}" does not match schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($dependentRequired !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/dependantRequired`; | ||
| for (const key in $dependentRequired) if (key in instance) { | ||
| const required = $dependentRequired[key]; | ||
| for (const dependantKey of required) if (!(dependantKey in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependentRequired", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not have "${dependantKey}".` | ||
| }); | ||
| } | ||
| } | ||
| if ($dependentSchemas !== void 0) for (const key in $dependentSchemas) { | ||
| const keywordLocation = `${schemaLocation}/dependentSchemas`; | ||
| if (key in instance) { | ||
| const result = validate(instance, $dependentSchemas[key], draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependentSchemas", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not match dependant schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($dependencies !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/dependencies`; | ||
| for (const key in $dependencies) if (key in instance) { | ||
| const propsOrSchema = $dependencies[key]; | ||
| if (Array.isArray(propsOrSchema)) { | ||
| for (const dependantKey of propsOrSchema) if (!(dependantKey in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependencies", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not have "${dependantKey}".` | ||
| }); | ||
| } else { | ||
| const result = validate(instance, propsOrSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependencies", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not match dependant schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| const thisEvaluated = Object.create(null); | ||
| let stop = false; | ||
| if ($properties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/properties`; | ||
| for (const key in $properties) { | ||
| if (!(key in instance)) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $properties[key], draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(key)}`); | ||
| if (result.valid) evaluated[key] = thisEvaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "properties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } | ||
| if (!stop && $patternProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/patternProperties`; | ||
| for (const pattern in $patternProperties) { | ||
| const regex$1 = new RegExp(pattern, "u"); | ||
| const subSchema = $patternProperties[pattern]; | ||
| for (const key in instance) { | ||
| if (!regex$1.test(key)) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], subSchema, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(pattern)}`); | ||
| if (result.valid) evaluated[key] = thisEvaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "patternProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" matches pattern "${pattern}" but does not match associated schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| if (!stop && $additionalProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/additionalProperties`; | ||
| for (const key in instance) { | ||
| if (thisEvaluated[key]) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $additionalProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (result.valid) evaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "additionalProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match additional properties schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } else if (!stop && $unevaluatedProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/unevaluatedProperties`; | ||
| for (const key in instance) if (!evaluated[key]) { | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $unevaluatedProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (result.valid) evaluated[key] = true; | ||
| else errors.push({ | ||
| instanceLocation, | ||
| keyword: "unevaluatedProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match unevaluated properties schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } else if (instanceType === "array") { | ||
| if ($maxItems !== void 0 && instance.length > $maxItems) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxItems", | ||
| keywordLocation: `${schemaLocation}/maxItems`, | ||
| error: `Array has too many items (${instance.length} > ${$maxItems}).` | ||
| }); | ||
| if ($minItems !== void 0 && instance.length < $minItems) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minItems", | ||
| keywordLocation: `${schemaLocation}/minItems`, | ||
| error: `Array has too few items (${instance.length} < ${$minItems}).` | ||
| }); | ||
| const length = instance.length; | ||
| let i = 0; | ||
| let stop = false; | ||
| if ($prefixItems !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/prefixItems`; | ||
| const length2 = Math.min($prefixItems.length, length); | ||
| for (; i < length2; i++) { | ||
| const result = validate(instance[i], $prefixItems[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "prefixItems", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } | ||
| if ($items !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/items`; | ||
| if (Array.isArray($items)) { | ||
| const length2 = Math.min($items.length, length); | ||
| for (; i < length2; i++) { | ||
| const result = validate(instance[i], $items[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "items", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } else for (; i < length; i++) { | ||
| const result = validate(instance[i], $items, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "items", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| if (!stop && $additionalItems !== void 0) { | ||
| const keywordLocation$1 = `${schemaLocation}/additionalItems`; | ||
| for (; i < length; i++) { | ||
| const result = validate(instance[i], $additionalItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation$1); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "additionalItems", | ||
| keywordLocation: keywordLocation$1, | ||
| error: `Items did not match additional items schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| if ($contains !== void 0) if (length === 0 && $minContains === void 0) errors.push({ | ||
| instanceLocation, | ||
| keyword: "contains", | ||
| keywordLocation: `${schemaLocation}/contains`, | ||
| error: `Array is empty. It must contain at least one item matching the schema.` | ||
| }); | ||
| else if ($minContains !== void 0 && length < $minContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minContains", | ||
| keywordLocation: `${schemaLocation}/minContains`, | ||
| error: `Array has less items (${length}) than minContains (${$minContains}).` | ||
| }); | ||
| else { | ||
| const keywordLocation = `${schemaLocation}/contains`; | ||
| const errorsLength = errors.length; | ||
| let contained = 0; | ||
| for (let j = 0; j < length; j++) { | ||
| const result = validate(instance[j], $contains, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${j}`, keywordLocation); | ||
| if (result.valid) { | ||
| evaluated[j] = true; | ||
| contained++; | ||
| } else errors.push(...result.errors); | ||
| } | ||
| if (contained >= ($minContains || 0)) errors.length = errorsLength; | ||
| if ($minContains === void 0 && $maxContains === void 0 && contained === 0) errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "contains", | ||
| keywordLocation, | ||
| error: `Array does not contain item matching schema.` | ||
| }); | ||
| else if ($minContains !== void 0 && contained < $minContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minContains", | ||
| keywordLocation: `${schemaLocation}/minContains`, | ||
| error: `Array must contain at least ${$minContains} items matching schema. Only ${contained} items were found.` | ||
| }); | ||
| else if ($maxContains !== void 0 && contained > $maxContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxContains", | ||
| keywordLocation: `${schemaLocation}/maxContains`, | ||
| error: `Array may contain at most ${$maxContains} items matching schema. ${contained} items were found.` | ||
| }); | ||
| } | ||
| if (!stop && $unevaluatedItems !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/unevaluatedItems`; | ||
| for (; i < length; i++) { | ||
| if (evaluated[i]) continue; | ||
| const result = validate(instance[i], $unevaluatedItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation); | ||
| evaluated[i] = true; | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "unevaluatedItems", | ||
| keywordLocation, | ||
| error: `Items did not match unevaluated items schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($uniqueItems) for (let j = 0; j < length; j++) { | ||
| const a = instance[j]; | ||
| const ao = typeof a === "object" && a !== null; | ||
| for (let k = 0; k < length; k++) { | ||
| if (j === k) continue; | ||
| const b = instance[k]; | ||
| if (a === b || ao && typeof b === "object" && b !== null && deepCompareStrict(a, b)) { | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "uniqueItems", | ||
| keywordLocation: `${schemaLocation}/uniqueItems`, | ||
| error: `Duplicate items at indexes ${j} and ${k}.` | ||
| }); | ||
| j = Number.MAX_SAFE_INTEGER; | ||
| k = Number.MAX_SAFE_INTEGER; | ||
| } | ||
| } | ||
| } | ||
| } else if (instanceType === "number") { | ||
| if (draft === "4") { | ||
| if ($minimum !== void 0 && ($exclusiveMinimum === true && instance <= $minimum || instance < $minimum)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minimum", | ||
| keywordLocation: `${schemaLocation}/minimum`, | ||
| error: `${instance} is less than ${$exclusiveMinimum ? "or equal to " : ""} ${$minimum}.` | ||
| }); | ||
| if ($maximum !== void 0 && ($exclusiveMaximum === true && instance >= $maximum || instance > $maximum)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maximum", | ||
| keywordLocation: `${schemaLocation}/maximum`, | ||
| error: `${instance} is greater than ${$exclusiveMaximum ? "or equal to " : ""} ${$maximum}.` | ||
| }); | ||
| } else { | ||
| if ($minimum !== void 0 && instance < $minimum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minimum", | ||
| keywordLocation: `${schemaLocation}/minimum`, | ||
| error: `${instance} is less than ${$minimum}.` | ||
| }); | ||
| if ($maximum !== void 0 && instance > $maximum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maximum", | ||
| keywordLocation: `${schemaLocation}/maximum`, | ||
| error: `${instance} is greater than ${$maximum}.` | ||
| }); | ||
| if ($exclusiveMinimum !== void 0 && instance <= $exclusiveMinimum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "exclusiveMinimum", | ||
| keywordLocation: `${schemaLocation}/exclusiveMinimum`, | ||
| error: `${instance} is less than ${$exclusiveMinimum}.` | ||
| }); | ||
| if ($exclusiveMaximum !== void 0 && instance >= $exclusiveMaximum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "exclusiveMaximum", | ||
| keywordLocation: `${schemaLocation}/exclusiveMaximum`, | ||
| error: `${instance} is greater than or equal to ${$exclusiveMaximum}.` | ||
| }); | ||
| } | ||
| if ($multipleOf !== void 0) { | ||
| const remainder = instance % $multipleOf; | ||
| if (Math.abs(0 - remainder) >= 1.1920929e-7 && Math.abs($multipleOf - remainder) >= 1.1920929e-7) errors.push({ | ||
| instanceLocation, | ||
| keyword: "multipleOf", | ||
| keywordLocation: `${schemaLocation}/multipleOf`, | ||
| error: `${instance} is not a multiple of ${$multipleOf}.` | ||
| }); | ||
| } | ||
| } else if (instanceType === "string") { | ||
| const length = $minLength === void 0 && $maxLength === void 0 ? 0 : ucs2length(instance); | ||
| if ($minLength !== void 0 && length < $minLength) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minLength", | ||
| keywordLocation: `${schemaLocation}/minLength`, | ||
| error: `String is too short (${length} < ${$minLength}).` | ||
| }); | ||
| if ($maxLength !== void 0 && length > $maxLength) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxLength", | ||
| keywordLocation: `${schemaLocation}/maxLength`, | ||
| error: `String is too long (${length} > ${$maxLength}).` | ||
| }); | ||
| if ($pattern !== void 0 && !new RegExp($pattern, "u").test(instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "pattern", | ||
| keywordLocation: `${schemaLocation}/pattern`, | ||
| error: `String does not match pattern.` | ||
| }); | ||
| if ($format !== void 0 && format[$format] && !format[$format](instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "format", | ||
| keywordLocation: `${schemaLocation}/format`, | ||
| error: `String does not match format "${$format}".` | ||
| }); | ||
| } | ||
| return { | ||
| valid: errors.length === 0, | ||
| errors | ||
| }; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validator.js | ||
| var Validator = class { | ||
| schema; | ||
| draft; | ||
| shortCircuit; | ||
| lookup; | ||
| constructor(schema, draft = "2019-09", shortCircuit = true) { | ||
| this.schema = schema; | ||
| this.draft = draft; | ||
| this.shortCircuit = shortCircuit; | ||
| this.lookup = dereference(schema); | ||
| } | ||
| validate(instance) { | ||
| return validate(instance, this.schema, this.draft, this.lookup, this.shortCircuit); | ||
| } | ||
| addSchema(schema, id) { | ||
| if (id) schema = { | ||
| ...schema, | ||
| $id: id | ||
| }; | ||
| dereference(schema, this.lookup); | ||
| } | ||
| }; | ||
| //#endregion | ||
| //#region ../core-internal/src/validators/cfWorkerProvider.ts | ||
| /** | ||
| * Cloudflare Worker-compatible JSON Schema validator provider | ||
| * | ||
| * This provider uses @cfworker/json-schema for validation without code generation, | ||
| * making it compatible with edge runtimes like Cloudflare Workers that restrict | ||
| * eval and new Function. | ||
| * | ||
| * @see {@linkcode AjvJsonSchemaValidator} for the Node.js alternative | ||
| */ | ||
| /** | ||
| * Canonical 2020-12 `$schema` URIs (http + https variants, trailing-`#` stripped). When a schema | ||
| * declares anything else and no `{draft}` is forced, the provider throws a plain `Error`. | ||
| */ | ||
| const DRAFT_2020_12_URIS = new Set(["https://json-schema.org/draft/2020-12/schema", "http://json-schema.org/draft/2020-12/schema"]); | ||
| /** | ||
| * `@cfworker/json-schema`-backed JSON Schema validator. See | ||
| * `@modelcontextprotocol/{client,server}/validators/cf-worker` for the customisation entry point. | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`. Passing an explicit `draft` to the constructor | ||
| * overrides this — that draft is used for every schema regardless of `$schema`. | ||
| * | ||
| * @example Use with default configuration (2020-12, shortcircuit on) | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_default" | ||
| * const validator = new CfWorkerJsonSchemaValidator(); | ||
| * ``` | ||
| * | ||
| * @example Use with custom configuration | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_customConfig" | ||
| * const validator = new CfWorkerJsonSchemaValidator({ | ||
| * draft: '2020-12', | ||
| * shortcircuit: false // Report all errors | ||
| * }); | ||
| * ``` | ||
| */ | ||
| var CfWorkerJsonSchemaValidator = class { | ||
| shortcircuit; | ||
| /** Caller-supplied draft; when set, the `$schema` check is skipped (caller owns dialect). */ | ||
| draft; | ||
| /** | ||
| * Create a validator | ||
| * | ||
| * @param options - Configuration options | ||
| * @param options.shortcircuit - If `true`, stop validation after first error (default: `true`) | ||
| * @param options.draft - JSON Schema draft version to force for every schema. When set, the | ||
| * `$schema` check is skipped. When omitted, the provider validates as 2020-12 and rejects | ||
| * schemas declaring a different `$schema`. | ||
| */ | ||
| constructor(options) { | ||
| this.shortcircuit = options?.shortcircuit ?? true; | ||
| this.draft = options?.draft; | ||
| } | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * Unlike AJV, this validator is not cached internally | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that validates input data | ||
| */ | ||
| getValidator(schema) { | ||
| if (this.draft === void 0 && "$schema" in schema && typeof schema.$schema === "string" && !DRAFT_2020_12_URIS.has(schema.$schema.replace(/#$/, ""))) { | ||
| const declared = schema.$schema.slice(0, 200); | ||
| throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${declared}"). The default validator supports JSON Schema 2020-12 only; pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`); | ||
| } | ||
| const validator = new Validator(schema, this.draft ?? "2020-12", this.shortcircuit); | ||
| return (input) => { | ||
| const result = validator.validate(input); | ||
| return result.valid ? { | ||
| valid: true, | ||
| data: input, | ||
| errorMessage: void 0 | ||
| } : { | ||
| valid: false, | ||
| data: void 0, | ||
| errorMessage: result.errors.map((err) => `${err.instanceLocation}: ${err.error}`).join("; ") | ||
| }; | ||
| }; | ||
| } | ||
| }; | ||
| //#endregion | ||
| export { CfWorkerJsonSchemaValidator as t }; | ||
| //# sourceMappingURL=cfWorkerProvider-BDC2rVl3.mjs.map |
Sorry, the diff of this file is too big to display
| import { i as jsonSchemaValidator, n as JsonSchemaValidator, t as JsonSchemaType } from "./types-BV_484UZ.mjs"; | ||
| //#region ../core-internal/src/validators/cfWorkerProvider.d.ts | ||
| /** | ||
| * JSON Schema draft version supported by `@cfworker/json-schema`. | ||
| */ | ||
| type CfWorkerSchemaDraft = '4' | '7' | '2019-09' | '2020-12'; | ||
| /** | ||
| * `@cfworker/json-schema`-backed JSON Schema validator. See | ||
| * `@modelcontextprotocol/{client,server}/validators/cf-worker` for the customisation entry point. | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`. Passing an explicit `draft` to the constructor | ||
| * overrides this — that draft is used for every schema regardless of `$schema`. | ||
| * | ||
| * @example Use with default configuration (2020-12, shortcircuit on) | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_default" | ||
| * const validator = new CfWorkerJsonSchemaValidator(); | ||
| * ``` | ||
| * | ||
| * @example Use with custom configuration | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_customConfig" | ||
| * const validator = new CfWorkerJsonSchemaValidator({ | ||
| * draft: '2020-12', | ||
| * shortcircuit: false // Report all errors | ||
| * }); | ||
| * ``` | ||
| */ | ||
| declare class CfWorkerJsonSchemaValidator implements jsonSchemaValidator { | ||
| private readonly shortcircuit; | ||
| /** Caller-supplied draft; when set, the `$schema` check is skipped (caller owns dialect). */ | ||
| private readonly draft?; | ||
| /** | ||
| * Create a validator | ||
| * | ||
| * @param options - Configuration options | ||
| * @param options.shortcircuit - If `true`, stop validation after first error (default: `true`) | ||
| * @param options.draft - JSON Schema draft version to force for every schema. When set, the | ||
| * `$schema` check is skipped. When omitted, the provider validates as 2020-12 and rejects | ||
| * schemas declaring a different `$schema`. | ||
| */ | ||
| constructor(options?: { | ||
| shortcircuit?: boolean; | ||
| draft?: CfWorkerSchemaDraft; | ||
| }); | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * Unlike AJV, this validator is not cached internally | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that validates input data | ||
| */ | ||
| getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| //#endregion | ||
| export { CfWorkerSchemaDraft as n, CfWorkerJsonSchemaValidator as t }; | ||
| //# sourceMappingURL=cfWorkerProvider-Cj-YchTJ.d.mts.map |
| {"version":3,"file":"cfWorkerProvider-Cj-YchTJ.d.mts","names":[],"sources":["../../core-internal/src/validators/cfWorkerProvider.ts"],"sourcesContent":[],"mappings":";;;;;;;KAiBY,mBAAA;;;;;;;;;;;;;;;;;;;;;;cAgCC,2BAAA,YAAuC;;;;;;;;;;;;;;;YAcQ;;;;;;;;;;0BAahC,iBAAiB,oBAAoB"} |
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js | ||
| function deepCompareStrict(a, b) { | ||
| const typeofa = typeof a; | ||
| if (typeofa !== typeof b) return false; | ||
| if (Array.isArray(a)) { | ||
| if (!Array.isArray(b)) return false; | ||
| const length = a.length; | ||
| if (length !== b.length) return false; | ||
| for (let i = 0; i < length; i++) if (!deepCompareStrict(a[i], b[i])) return false; | ||
| return true; | ||
| } | ||
| if (typeofa === "object") { | ||
| if (!a || !b) return a === b; | ||
| const aKeys = Object.keys(a); | ||
| const bKeys = Object.keys(b); | ||
| if (aKeys.length !== bKeys.length) return false; | ||
| for (const k of aKeys) if (!deepCompareStrict(a[k], b[k])) return false; | ||
| return true; | ||
| } | ||
| return a === b; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/pointer.js | ||
| function encodePointer(p) { | ||
| return encodeURI(escapePointer(p)); | ||
| } | ||
| function escapePointer(p) { | ||
| return p.replace(/~/g, "~0").replace(/\//g, "~1"); | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/dereference.js | ||
| const schemaArrayKeyword = { | ||
| prefixItems: true, | ||
| items: true, | ||
| allOf: true, | ||
| anyOf: true, | ||
| oneOf: true | ||
| }; | ||
| const schemaMapKeyword = { | ||
| $defs: true, | ||
| definitions: true, | ||
| properties: true, | ||
| patternProperties: true, | ||
| dependentSchemas: true | ||
| }; | ||
| const ignoredKeyword = { | ||
| id: true, | ||
| $id: true, | ||
| $ref: true, | ||
| $schema: true, | ||
| $anchor: true, | ||
| $vocabulary: true, | ||
| $comment: true, | ||
| default: true, | ||
| enum: true, | ||
| const: true, | ||
| required: true, | ||
| type: true, | ||
| maximum: true, | ||
| minimum: true, | ||
| exclusiveMaximum: true, | ||
| exclusiveMinimum: true, | ||
| multipleOf: true, | ||
| maxLength: true, | ||
| minLength: true, | ||
| pattern: true, | ||
| format: true, | ||
| maxItems: true, | ||
| minItems: true, | ||
| uniqueItems: true, | ||
| maxProperties: true, | ||
| minProperties: true | ||
| }; | ||
| let initialBaseURI = typeof self !== "undefined" && self.location && self.location.origin !== "null" ? new URL(self.location.origin + self.location.pathname + location.search) : new URL("https://github.com/cfworker"); | ||
| function dereference(schema, lookup = Object.create(null), baseURI = initialBaseURI, basePointer = "") { | ||
| if (schema && typeof schema === "object" && !Array.isArray(schema)) { | ||
| const id = schema.$id || schema.id; | ||
| if (id) { | ||
| const url = new URL(id, baseURI.href); | ||
| if (url.hash.length > 1) lookup[url.href] = schema; | ||
| else { | ||
| url.hash = ""; | ||
| if (basePointer === "") baseURI = url; | ||
| else dereference(schema, lookup, baseURI); | ||
| } | ||
| } | ||
| } else if (schema !== true && schema !== false) return lookup; | ||
| const schemaURI = baseURI.href + (basePointer ? "#" + basePointer : ""); | ||
| if (lookup[schemaURI] !== void 0) throw new Error(`Duplicate schema URI "${schemaURI}".`); | ||
| lookup[schemaURI] = schema; | ||
| if (schema === true || schema === false) return lookup; | ||
| if (schema.__absolute_uri__ === void 0) Object.defineProperty(schema, "__absolute_uri__", { | ||
| enumerable: false, | ||
| value: schemaURI | ||
| }); | ||
| if (schema.$ref && schema.__absolute_ref__ === void 0) { | ||
| const url = new URL(schema.$ref, baseURI.href); | ||
| url.hash = url.hash; | ||
| Object.defineProperty(schema, "__absolute_ref__", { | ||
| enumerable: false, | ||
| value: url.href | ||
| }); | ||
| } | ||
| if (schema.$recursiveRef && schema.__absolute_recursive_ref__ === void 0) { | ||
| const url = new URL(schema.$recursiveRef, baseURI.href); | ||
| url.hash = url.hash; | ||
| Object.defineProperty(schema, "__absolute_recursive_ref__", { | ||
| enumerable: false, | ||
| value: url.href | ||
| }); | ||
| } | ||
| if (schema.$anchor) { | ||
| const url = new URL("#" + schema.$anchor, baseURI.href); | ||
| lookup[url.href] = schema; | ||
| } | ||
| for (let key in schema) { | ||
| if (ignoredKeyword[key]) continue; | ||
| const keyBase = `${basePointer}/${encodePointer(key)}`; | ||
| const subSchema = schema[key]; | ||
| if (Array.isArray(subSchema)) { | ||
| if (schemaArrayKeyword[key]) { | ||
| const length = subSchema.length; | ||
| for (let i = 0; i < length; i++) dereference(subSchema[i], lookup, baseURI, `${keyBase}/${i}`); | ||
| } | ||
| } else if (schemaMapKeyword[key]) for (let subKey in subSchema) dereference(subSchema[subKey], lookup, baseURI, `${keyBase}/${encodePointer(subKey)}`); | ||
| else dereference(subSchema, lookup, baseURI, keyBase); | ||
| } | ||
| return lookup; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/format.js | ||
| const DATE = /^(\d\d\d\d)-(\d\d)-(\d\d)$/; | ||
| const DAYS = [ | ||
| 0, | ||
| 31, | ||
| 28, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 31, | ||
| 30, | ||
| 31, | ||
| 30, | ||
| 31 | ||
| ]; | ||
| const TIME = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i; | ||
| const HOSTNAME = /^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i; | ||
| const URIREF = /^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; | ||
| const URITEMPLATE = /^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; | ||
| const URL_ = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; | ||
| const UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; | ||
| const JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$/; | ||
| const JSON_POINTER_URI_FRAGMENT = /^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; | ||
| const RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; | ||
| const EMAIL = (input) => { | ||
| if (input[0] === "\"") return false; | ||
| const [name, host, ...rest] = input.split("@"); | ||
| if (!name || !host || rest.length !== 0 || name.length > 64 || host.length > 253) return false; | ||
| if (name[0] === "." || name.endsWith(".") || name.includes("..")) return false; | ||
| if (!/^[a-z0-9.-]+$/i.test(host) || !/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+$/i.test(name)) return false; | ||
| return host.split(".").every((part) => /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(part)); | ||
| }; | ||
| const IPV4 = /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/; | ||
| const IPV6 = /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i; | ||
| const DURATION = (input) => input.length > 1 && input.length < 80 && (/^P\d+([.,]\d+)?W$/.test(input) || /^P[\dYMDTHS]*(\d[.,]\d+)?[YMDHS]$/.test(input) && /^P([.,\d]+Y)?([.,\d]+M)?([.,\d]+D)?(T([.,\d]+H)?([.,\d]+M)?([.,\d]+S)?)?$/.test(input)); | ||
| function bind(r) { | ||
| return r.test.bind(r); | ||
| } | ||
| const format = { | ||
| date, | ||
| time: time.bind(void 0, false), | ||
| "date-time": date_time, | ||
| duration: DURATION, | ||
| uri, | ||
| "uri-reference": bind(URIREF), | ||
| "uri-template": bind(URITEMPLATE), | ||
| url: bind(URL_), | ||
| email: EMAIL, | ||
| hostname: bind(HOSTNAME), | ||
| ipv4: bind(IPV4), | ||
| ipv6: bind(IPV6), | ||
| regex, | ||
| uuid: bind(UUID), | ||
| "json-pointer": bind(JSON_POINTER), | ||
| "json-pointer-uri-fragment": bind(JSON_POINTER_URI_FRAGMENT), | ||
| "relative-json-pointer": bind(RELATIVE_JSON_POINTER) | ||
| }; | ||
| function isLeapYear(year) { | ||
| return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); | ||
| } | ||
| function date(str) { | ||
| const matches = str.match(DATE); | ||
| if (!matches) return false; | ||
| const year = +matches[1]; | ||
| const month = +matches[2]; | ||
| const day = +matches[3]; | ||
| return month >= 1 && month <= 12 && day >= 1 && day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]); | ||
| } | ||
| function time(full, str) { | ||
| const matches = str.match(TIME); | ||
| if (!matches) return false; | ||
| const hour = +matches[1]; | ||
| const minute = +matches[2]; | ||
| const second = +matches[3]; | ||
| const timeZone = !!matches[5]; | ||
| return (hour <= 23 && minute <= 59 && second <= 59 || hour == 23 && minute == 59 && second == 60) && (!full || timeZone); | ||
| } | ||
| const DATE_TIME_SEPARATOR = /t|\s/i; | ||
| function date_time(str) { | ||
| const dateTime = str.split(DATE_TIME_SEPARATOR); | ||
| return dateTime.length == 2 && date(dateTime[0]) && time(true, dateTime[1]); | ||
| } | ||
| const NOT_URI_FRAGMENT = /\/|:/; | ||
| const URI_PATTERN = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i; | ||
| function uri(str) { | ||
| return NOT_URI_FRAGMENT.test(str) && URI_PATTERN.test(str); | ||
| } | ||
| const Z_ANCHOR = /[^\\]\\Z/; | ||
| function regex(str) { | ||
| if (Z_ANCHOR.test(str)) return false; | ||
| try { | ||
| new RegExp(str, "u"); | ||
| return true; | ||
| } catch (e) { | ||
| return false; | ||
| } | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js | ||
| function ucs2length(s) { | ||
| let result = 0; | ||
| let length = s.length; | ||
| let index = 0; | ||
| let charCode; | ||
| while (index < length) { | ||
| result++; | ||
| charCode = s.charCodeAt(index++); | ||
| if (charCode >= 55296 && charCode <= 56319 && index < length) { | ||
| charCode = s.charCodeAt(index); | ||
| if ((charCode & 64512) == 56320) index++; | ||
| } | ||
| } | ||
| return result; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validate.js | ||
| function validate(instance, schema, draft = "2019-09", lookup = dereference(schema), shortCircuit = true, recursiveAnchor = null, instanceLocation = "#", schemaLocation = "#", evaluated = Object.create(null)) { | ||
| if (schema === true) return { | ||
| valid: true, | ||
| errors: [] | ||
| }; | ||
| if (schema === false) return { | ||
| valid: false, | ||
| errors: [{ | ||
| instanceLocation, | ||
| keyword: "false", | ||
| keywordLocation: instanceLocation, | ||
| error: "False boolean schema." | ||
| }] | ||
| }; | ||
| const rawInstanceType = typeof instance; | ||
| let instanceType; | ||
| switch (rawInstanceType) { | ||
| case "boolean": | ||
| case "number": | ||
| case "string": | ||
| instanceType = rawInstanceType; | ||
| break; | ||
| case "object": | ||
| if (instance === null) instanceType = "null"; | ||
| else if (Array.isArray(instance)) instanceType = "array"; | ||
| else instanceType = "object"; | ||
| break; | ||
| default: throw new Error(`Instances of "${rawInstanceType}" type are not supported.`); | ||
| } | ||
| const { $ref, $recursiveRef, $recursiveAnchor, type: $type, const: $const, enum: $enum, required: $required, not: $not, anyOf: $anyOf, allOf: $allOf, oneOf: $oneOf, if: $if, then: $then, else: $else, format: $format, properties: $properties, patternProperties: $patternProperties, additionalProperties: $additionalProperties, unevaluatedProperties: $unevaluatedProperties, minProperties: $minProperties, maxProperties: $maxProperties, propertyNames: $propertyNames, dependentRequired: $dependentRequired, dependentSchemas: $dependentSchemas, dependencies: $dependencies, prefixItems: $prefixItems, items: $items, additionalItems: $additionalItems, unevaluatedItems: $unevaluatedItems, contains: $contains, minContains: $minContains, maxContains: $maxContains, minItems: $minItems, maxItems: $maxItems, uniqueItems: $uniqueItems, minimum: $minimum, maximum: $maximum, exclusiveMinimum: $exclusiveMinimum, exclusiveMaximum: $exclusiveMaximum, multipleOf: $multipleOf, minLength: $minLength, maxLength: $maxLength, pattern: $pattern, __absolute_ref__, __absolute_recursive_ref__ } = schema; | ||
| const errors = []; | ||
| if ($recursiveAnchor === true && recursiveAnchor === null) recursiveAnchor = schema; | ||
| if ($recursiveRef === "#") { | ||
| const refSchema = recursiveAnchor === null ? lookup[__absolute_recursive_ref__] : recursiveAnchor; | ||
| const keywordLocation = `${schemaLocation}/$recursiveRef`; | ||
| const result = validate(instance, recursiveAnchor === null ? schema : recursiveAnchor, draft, lookup, shortCircuit, refSchema, instanceLocation, keywordLocation, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "$recursiveRef", | ||
| keywordLocation, | ||
| error: "A subschema had errors." | ||
| }, ...result.errors); | ||
| } | ||
| if ($ref !== void 0) { | ||
| const refSchema = lookup[__absolute_ref__ || $ref]; | ||
| if (refSchema === void 0) { | ||
| let message = `Unresolved $ref "${$ref}".`; | ||
| if (__absolute_ref__ && __absolute_ref__ !== $ref) message += ` Absolute URI "${__absolute_ref__}".`; | ||
| message += `\nKnown schemas:\n- ${Object.keys(lookup).join("\n- ")}`; | ||
| throw new Error(message); | ||
| } | ||
| const keywordLocation = `${schemaLocation}/$ref`; | ||
| const result = validate(instance, refSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "$ref", | ||
| keywordLocation, | ||
| error: "A subschema had errors." | ||
| }, ...result.errors); | ||
| if (draft === "4" || draft === "7") return { | ||
| valid: errors.length === 0, | ||
| errors | ||
| }; | ||
| } | ||
| if (Array.isArray($type)) { | ||
| let length = $type.length; | ||
| let valid = false; | ||
| for (let i = 0; i < length; i++) if (instanceType === $type[i] || $type[i] === "integer" && instanceType === "number" && instance % 1 === 0 && instance === instance) { | ||
| valid = true; | ||
| break; | ||
| } | ||
| if (!valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type.join("\", \"")}".` | ||
| }); | ||
| } else if ($type === "integer") { | ||
| if (instanceType !== "number" || instance % 1 || instance !== instance) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type}".` | ||
| }); | ||
| } else if ($type !== void 0 && instanceType !== $type) errors.push({ | ||
| instanceLocation, | ||
| keyword: "type", | ||
| keywordLocation: `${schemaLocation}/type`, | ||
| error: `Instance type "${instanceType}" is invalid. Expected "${$type}".` | ||
| }); | ||
| if ($const !== void 0) { | ||
| if (instanceType === "object" || instanceType === "array") { | ||
| if (!deepCompareStrict(instance, $const)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "const", | ||
| keywordLocation: `${schemaLocation}/const`, | ||
| error: `Instance does not match ${JSON.stringify($const)}.` | ||
| }); | ||
| } else if (instance !== $const) errors.push({ | ||
| instanceLocation, | ||
| keyword: "const", | ||
| keywordLocation: `${schemaLocation}/const`, | ||
| error: `Instance does not match ${JSON.stringify($const)}.` | ||
| }); | ||
| } | ||
| if ($enum !== void 0) { | ||
| if (instanceType === "object" || instanceType === "array") { | ||
| if (!$enum.some((value) => deepCompareStrict(instance, value))) errors.push({ | ||
| instanceLocation, | ||
| keyword: "enum", | ||
| keywordLocation: `${schemaLocation}/enum`, | ||
| error: `Instance does not match any of ${JSON.stringify($enum)}.` | ||
| }); | ||
| } else if (!$enum.some((value) => instance === value)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "enum", | ||
| keywordLocation: `${schemaLocation}/enum`, | ||
| error: `Instance does not match any of ${JSON.stringify($enum)}.` | ||
| }); | ||
| } | ||
| if ($not !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/not`; | ||
| if (validate(instance, $not, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation).valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "not", | ||
| keywordLocation, | ||
| error: "Instance matched \"not\" schema." | ||
| }); | ||
| } | ||
| let subEvaluateds = []; | ||
| if ($anyOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/anyOf`; | ||
| const errorsLength = errors.length; | ||
| let anyValid = false; | ||
| for (let i = 0; i < $anyOf.length; i++) { | ||
| const subSchema = $anyOf[i]; | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| anyValid = anyValid || result.valid; | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| } | ||
| if (anyValid) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "anyOf", | ||
| keywordLocation, | ||
| error: "Instance does not match any subschemas." | ||
| }); | ||
| } | ||
| if ($allOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/allOf`; | ||
| const errorsLength = errors.length; | ||
| let allValid = true; | ||
| for (let i = 0; i < $allOf.length; i++) { | ||
| const subSchema = $allOf[i]; | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| allValid = allValid && result.valid; | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| } | ||
| if (allValid) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "allOf", | ||
| keywordLocation, | ||
| error: `Instance does not match every subschema.` | ||
| }); | ||
| } | ||
| if ($oneOf !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/oneOf`; | ||
| const errorsLength = errors.length; | ||
| const matches = $oneOf.filter((subSchema, i) => { | ||
| const subEvaluated = Object.create(evaluated); | ||
| const result = validate(instance, subSchema, draft, lookup, shortCircuit, $recursiveAnchor === true ? recursiveAnchor : null, instanceLocation, `${keywordLocation}/${i}`, subEvaluated); | ||
| errors.push(...result.errors); | ||
| if (result.valid) subEvaluateds.push(subEvaluated); | ||
| return result.valid; | ||
| }).length; | ||
| if (matches === 1) errors.length = errorsLength; | ||
| else errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "oneOf", | ||
| keywordLocation, | ||
| error: `Instance does not match exactly one subschema (${matches} matches).` | ||
| }); | ||
| } | ||
| if (instanceType === "object" || instanceType === "array") Object.assign(evaluated, ...subEvaluateds); | ||
| if ($if !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/if`; | ||
| if (validate(instance, $if, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, keywordLocation, evaluated).valid) { | ||
| if ($then !== void 0) { | ||
| const thenResult = validate(instance, $then, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/then`, evaluated); | ||
| if (!thenResult.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "if", | ||
| keywordLocation, | ||
| error: `Instance does not match "then" schema.` | ||
| }, ...thenResult.errors); | ||
| } | ||
| } else if ($else !== void 0) { | ||
| const elseResult = validate(instance, $else, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${schemaLocation}/else`, evaluated); | ||
| if (!elseResult.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "if", | ||
| keywordLocation, | ||
| error: `Instance does not match "else" schema.` | ||
| }, ...elseResult.errors); | ||
| } | ||
| } | ||
| if (instanceType === "object") { | ||
| if ($required !== void 0) { | ||
| for (const key of $required) if (!(key in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "required", | ||
| keywordLocation: `${schemaLocation}/required`, | ||
| error: `Instance does not have required property "${key}".` | ||
| }); | ||
| } | ||
| const keys = Object.keys(instance); | ||
| if ($minProperties !== void 0 && keys.length < $minProperties) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minProperties", | ||
| keywordLocation: `${schemaLocation}/minProperties`, | ||
| error: `Instance does not have at least ${$minProperties} properties.` | ||
| }); | ||
| if ($maxProperties !== void 0 && keys.length > $maxProperties) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxProperties", | ||
| keywordLocation: `${schemaLocation}/maxProperties`, | ||
| error: `Instance does not have at least ${$maxProperties} properties.` | ||
| }); | ||
| if ($propertyNames !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/propertyNames`; | ||
| for (const key in instance) { | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(key, $propertyNames, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "propertyNames", | ||
| keywordLocation, | ||
| error: `Property name "${key}" does not match schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($dependentRequired !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/dependantRequired`; | ||
| for (const key in $dependentRequired) if (key in instance) { | ||
| const required = $dependentRequired[key]; | ||
| for (const dependantKey of required) if (!(dependantKey in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependentRequired", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not have "${dependantKey}".` | ||
| }); | ||
| } | ||
| } | ||
| if ($dependentSchemas !== void 0) for (const key in $dependentSchemas) { | ||
| const keywordLocation = `${schemaLocation}/dependentSchemas`; | ||
| if (key in instance) { | ||
| const result = validate(instance, $dependentSchemas[key], draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`, evaluated); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependentSchemas", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not match dependant schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($dependencies !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/dependencies`; | ||
| for (const key in $dependencies) if (key in instance) { | ||
| const propsOrSchema = $dependencies[key]; | ||
| if (Array.isArray(propsOrSchema)) { | ||
| for (const dependantKey of propsOrSchema) if (!(dependantKey in instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependencies", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not have "${dependantKey}".` | ||
| }); | ||
| } else { | ||
| const result = validate(instance, propsOrSchema, draft, lookup, shortCircuit, recursiveAnchor, instanceLocation, `${keywordLocation}/${encodePointer(key)}`); | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "dependencies", | ||
| keywordLocation, | ||
| error: `Instance has "${key}" but does not match dependant schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| const thisEvaluated = Object.create(null); | ||
| let stop = false; | ||
| if ($properties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/properties`; | ||
| for (const key in $properties) { | ||
| if (!(key in instance)) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $properties[key], draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(key)}`); | ||
| if (result.valid) evaluated[key] = thisEvaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "properties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } | ||
| if (!stop && $patternProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/patternProperties`; | ||
| for (const pattern in $patternProperties) { | ||
| const regex$1 = new RegExp(pattern, "u"); | ||
| const subSchema = $patternProperties[pattern]; | ||
| for (const key in instance) { | ||
| if (!regex$1.test(key)) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], subSchema, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, `${keywordLocation}/${encodePointer(pattern)}`); | ||
| if (result.valid) evaluated[key] = thisEvaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "patternProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" matches pattern "${pattern}" but does not match associated schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| if (!stop && $additionalProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/additionalProperties`; | ||
| for (const key in instance) { | ||
| if (thisEvaluated[key]) continue; | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $additionalProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (result.valid) evaluated[key] = true; | ||
| else { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "additionalProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match additional properties schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } else if (!stop && $unevaluatedProperties !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/unevaluatedProperties`; | ||
| for (const key in instance) if (!evaluated[key]) { | ||
| const subInstancePointer = `${instanceLocation}/${encodePointer(key)}`; | ||
| const result = validate(instance[key], $unevaluatedProperties, draft, lookup, shortCircuit, recursiveAnchor, subInstancePointer, keywordLocation); | ||
| if (result.valid) evaluated[key] = true; | ||
| else errors.push({ | ||
| instanceLocation, | ||
| keyword: "unevaluatedProperties", | ||
| keywordLocation, | ||
| error: `Property "${key}" does not match unevaluated properties schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } else if (instanceType === "array") { | ||
| if ($maxItems !== void 0 && instance.length > $maxItems) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxItems", | ||
| keywordLocation: `${schemaLocation}/maxItems`, | ||
| error: `Array has too many items (${instance.length} > ${$maxItems}).` | ||
| }); | ||
| if ($minItems !== void 0 && instance.length < $minItems) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minItems", | ||
| keywordLocation: `${schemaLocation}/minItems`, | ||
| error: `Array has too few items (${instance.length} < ${$minItems}).` | ||
| }); | ||
| const length = instance.length; | ||
| let i = 0; | ||
| let stop = false; | ||
| if ($prefixItems !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/prefixItems`; | ||
| const length2 = Math.min($prefixItems.length, length); | ||
| for (; i < length2; i++) { | ||
| const result = validate(instance[i], $prefixItems[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "prefixItems", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } | ||
| if ($items !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/items`; | ||
| if (Array.isArray($items)) { | ||
| const length2 = Math.min($items.length, length); | ||
| for (; i < length2; i++) { | ||
| const result = validate(instance[i], $items[i], draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, `${keywordLocation}/${i}`); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "items", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| } else for (; i < length; i++) { | ||
| const result = validate(instance[i], $items, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "items", | ||
| keywordLocation, | ||
| error: `Items did not match schema.` | ||
| }, ...result.errors); | ||
| if (stop) break; | ||
| } | ||
| } | ||
| if (!stop && $additionalItems !== void 0) { | ||
| const keywordLocation$1 = `${schemaLocation}/additionalItems`; | ||
| for (; i < length; i++) { | ||
| const result = validate(instance[i], $additionalItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation$1); | ||
| evaluated[i] = true; | ||
| if (!result.valid) { | ||
| stop = shortCircuit; | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "additionalItems", | ||
| keywordLocation: keywordLocation$1, | ||
| error: `Items did not match additional items schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| if ($contains !== void 0) if (length === 0 && $minContains === void 0) errors.push({ | ||
| instanceLocation, | ||
| keyword: "contains", | ||
| keywordLocation: `${schemaLocation}/contains`, | ||
| error: `Array is empty. It must contain at least one item matching the schema.` | ||
| }); | ||
| else if ($minContains !== void 0 && length < $minContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minContains", | ||
| keywordLocation: `${schemaLocation}/minContains`, | ||
| error: `Array has less items (${length}) than minContains (${$minContains}).` | ||
| }); | ||
| else { | ||
| const keywordLocation = `${schemaLocation}/contains`; | ||
| const errorsLength = errors.length; | ||
| let contained = 0; | ||
| for (let j = 0; j < length; j++) { | ||
| const result = validate(instance[j], $contains, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${j}`, keywordLocation); | ||
| if (result.valid) { | ||
| evaluated[j] = true; | ||
| contained++; | ||
| } else errors.push(...result.errors); | ||
| } | ||
| if (contained >= ($minContains || 0)) errors.length = errorsLength; | ||
| if ($minContains === void 0 && $maxContains === void 0 && contained === 0) errors.splice(errorsLength, 0, { | ||
| instanceLocation, | ||
| keyword: "contains", | ||
| keywordLocation, | ||
| error: `Array does not contain item matching schema.` | ||
| }); | ||
| else if ($minContains !== void 0 && contained < $minContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minContains", | ||
| keywordLocation: `${schemaLocation}/minContains`, | ||
| error: `Array must contain at least ${$minContains} items matching schema. Only ${contained} items were found.` | ||
| }); | ||
| else if ($maxContains !== void 0 && contained > $maxContains) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxContains", | ||
| keywordLocation: `${schemaLocation}/maxContains`, | ||
| error: `Array may contain at most ${$maxContains} items matching schema. ${contained} items were found.` | ||
| }); | ||
| } | ||
| if (!stop && $unevaluatedItems !== void 0) { | ||
| const keywordLocation = `${schemaLocation}/unevaluatedItems`; | ||
| for (; i < length; i++) { | ||
| if (evaluated[i]) continue; | ||
| const result = validate(instance[i], $unevaluatedItems, draft, lookup, shortCircuit, recursiveAnchor, `${instanceLocation}/${i}`, keywordLocation); | ||
| evaluated[i] = true; | ||
| if (!result.valid) errors.push({ | ||
| instanceLocation, | ||
| keyword: "unevaluatedItems", | ||
| keywordLocation, | ||
| error: `Items did not match unevaluated items schema.` | ||
| }, ...result.errors); | ||
| } | ||
| } | ||
| if ($uniqueItems) for (let j = 0; j < length; j++) { | ||
| const a = instance[j]; | ||
| const ao = typeof a === "object" && a !== null; | ||
| for (let k = 0; k < length; k++) { | ||
| if (j === k) continue; | ||
| const b = instance[k]; | ||
| if (a === b || ao && typeof b === "object" && b !== null && deepCompareStrict(a, b)) { | ||
| errors.push({ | ||
| instanceLocation, | ||
| keyword: "uniqueItems", | ||
| keywordLocation: `${schemaLocation}/uniqueItems`, | ||
| error: `Duplicate items at indexes ${j} and ${k}.` | ||
| }); | ||
| j = Number.MAX_SAFE_INTEGER; | ||
| k = Number.MAX_SAFE_INTEGER; | ||
| } | ||
| } | ||
| } | ||
| } else if (instanceType === "number") { | ||
| if (draft === "4") { | ||
| if ($minimum !== void 0 && ($exclusiveMinimum === true && instance <= $minimum || instance < $minimum)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minimum", | ||
| keywordLocation: `${schemaLocation}/minimum`, | ||
| error: `${instance} is less than ${$exclusiveMinimum ? "or equal to " : ""} ${$minimum}.` | ||
| }); | ||
| if ($maximum !== void 0 && ($exclusiveMaximum === true && instance >= $maximum || instance > $maximum)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maximum", | ||
| keywordLocation: `${schemaLocation}/maximum`, | ||
| error: `${instance} is greater than ${$exclusiveMaximum ? "or equal to " : ""} ${$maximum}.` | ||
| }); | ||
| } else { | ||
| if ($minimum !== void 0 && instance < $minimum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minimum", | ||
| keywordLocation: `${schemaLocation}/minimum`, | ||
| error: `${instance} is less than ${$minimum}.` | ||
| }); | ||
| if ($maximum !== void 0 && instance > $maximum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maximum", | ||
| keywordLocation: `${schemaLocation}/maximum`, | ||
| error: `${instance} is greater than ${$maximum}.` | ||
| }); | ||
| if ($exclusiveMinimum !== void 0 && instance <= $exclusiveMinimum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "exclusiveMinimum", | ||
| keywordLocation: `${schemaLocation}/exclusiveMinimum`, | ||
| error: `${instance} is less than ${$exclusiveMinimum}.` | ||
| }); | ||
| if ($exclusiveMaximum !== void 0 && instance >= $exclusiveMaximum) errors.push({ | ||
| instanceLocation, | ||
| keyword: "exclusiveMaximum", | ||
| keywordLocation: `${schemaLocation}/exclusiveMaximum`, | ||
| error: `${instance} is greater than or equal to ${$exclusiveMaximum}.` | ||
| }); | ||
| } | ||
| if ($multipleOf !== void 0) { | ||
| const remainder = instance % $multipleOf; | ||
| if (Math.abs(0 - remainder) >= 1.1920929e-7 && Math.abs($multipleOf - remainder) >= 1.1920929e-7) errors.push({ | ||
| instanceLocation, | ||
| keyword: "multipleOf", | ||
| keywordLocation: `${schemaLocation}/multipleOf`, | ||
| error: `${instance} is not a multiple of ${$multipleOf}.` | ||
| }); | ||
| } | ||
| } else if (instanceType === "string") { | ||
| const length = $minLength === void 0 && $maxLength === void 0 ? 0 : ucs2length(instance); | ||
| if ($minLength !== void 0 && length < $minLength) errors.push({ | ||
| instanceLocation, | ||
| keyword: "minLength", | ||
| keywordLocation: `${schemaLocation}/minLength`, | ||
| error: `String is too short (${length} < ${$minLength}).` | ||
| }); | ||
| if ($maxLength !== void 0 && length > $maxLength) errors.push({ | ||
| instanceLocation, | ||
| keyword: "maxLength", | ||
| keywordLocation: `${schemaLocation}/maxLength`, | ||
| error: `String is too long (${length} > ${$maxLength}).` | ||
| }); | ||
| if ($pattern !== void 0 && !new RegExp($pattern, "u").test(instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "pattern", | ||
| keywordLocation: `${schemaLocation}/pattern`, | ||
| error: `String does not match pattern.` | ||
| }); | ||
| if ($format !== void 0 && format[$format] && !format[$format](instance)) errors.push({ | ||
| instanceLocation, | ||
| keyword: "format", | ||
| keywordLocation: `${schemaLocation}/format`, | ||
| error: `String does not match format "${$format}".` | ||
| }); | ||
| } | ||
| return { | ||
| valid: errors.length === 0, | ||
| errors | ||
| }; | ||
| } | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validator.js | ||
| var Validator = class { | ||
| schema; | ||
| draft; | ||
| shortCircuit; | ||
| lookup; | ||
| constructor(schema, draft = "2019-09", shortCircuit = true) { | ||
| this.schema = schema; | ||
| this.draft = draft; | ||
| this.shortCircuit = shortCircuit; | ||
| this.lookup = dereference(schema); | ||
| } | ||
| validate(instance) { | ||
| return validate(instance, this.schema, this.draft, this.lookup, this.shortCircuit); | ||
| } | ||
| addSchema(schema, id) { | ||
| if (id) schema = { | ||
| ...schema, | ||
| $id: id | ||
| }; | ||
| dereference(schema, this.lookup); | ||
| } | ||
| }; | ||
| //#endregion | ||
| //#region ../core-internal/src/validators/cfWorkerProvider.ts | ||
| /** | ||
| * Cloudflare Worker-compatible JSON Schema validator provider | ||
| * | ||
| * This provider uses @cfworker/json-schema for validation without code generation, | ||
| * making it compatible with edge runtimes like Cloudflare Workers that restrict | ||
| * eval and new Function. | ||
| * | ||
| * @see {@linkcode AjvJsonSchemaValidator} for the Node.js alternative | ||
| */ | ||
| /** | ||
| * Canonical 2020-12 `$schema` URIs (http + https variants, trailing-`#` stripped). When a schema | ||
| * declares anything else and no `{draft}` is forced, the provider throws a plain `Error`. | ||
| */ | ||
| const DRAFT_2020_12_URIS = new Set(["https://json-schema.org/draft/2020-12/schema", "http://json-schema.org/draft/2020-12/schema"]); | ||
| /** | ||
| * `@cfworker/json-schema`-backed JSON Schema validator. See | ||
| * `@modelcontextprotocol/{client,server}/validators/cf-worker` for the customisation entry point. | ||
| * | ||
| * Default validates as **JSON Schema 2020-12** (SEP-1613). Schemas declaring a different | ||
| * `$schema` are rejected with a plain `Error`. Passing an explicit `draft` to the constructor | ||
| * overrides this — that draft is used for every schema regardless of `$schema`. | ||
| * | ||
| * @example Use with default configuration (2020-12, shortcircuit on) | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_default" | ||
| * const validator = new CfWorkerJsonSchemaValidator(); | ||
| * ``` | ||
| * | ||
| * @example Use with custom configuration | ||
| * ```ts source="./cfWorkerProvider.examples.ts#CfWorkerJsonSchemaValidator_customConfig" | ||
| * const validator = new CfWorkerJsonSchemaValidator({ | ||
| * draft: '2020-12', | ||
| * shortcircuit: false // Report all errors | ||
| * }); | ||
| * ``` | ||
| */ | ||
| var CfWorkerJsonSchemaValidator = class { | ||
| shortcircuit; | ||
| /** Caller-supplied draft; when set, the `$schema` check is skipped (caller owns dialect). */ | ||
| draft; | ||
| /** | ||
| * Create a validator | ||
| * | ||
| * @param options - Configuration options | ||
| * @param options.shortcircuit - If `true`, stop validation after first error (default: `true`) | ||
| * @param options.draft - JSON Schema draft version to force for every schema. When set, the | ||
| * `$schema` check is skipped. When omitted, the provider validates as 2020-12 and rejects | ||
| * schemas declaring a different `$schema`. | ||
| */ | ||
| constructor(options) { | ||
| this.shortcircuit = options?.shortcircuit ?? true; | ||
| this.draft = options?.draft; | ||
| } | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * Unlike AJV, this validator is not cached internally | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that validates input data | ||
| */ | ||
| getValidator(schema) { | ||
| if (this.draft === void 0 && "$schema" in schema && typeof schema.$schema === "string" && !DRAFT_2020_12_URIS.has(schema.$schema.replace(/#$/, ""))) { | ||
| const declared = schema.$schema.slice(0, 200); | ||
| throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${declared}"). The default validator supports JSON Schema 2020-12 only; pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`); | ||
| } | ||
| const validator = new Validator(schema, this.draft ?? "2020-12", this.shortcircuit); | ||
| return (input) => { | ||
| const result = validator.validate(input); | ||
| return result.valid ? { | ||
| valid: true, | ||
| data: input, | ||
| errorMessage: void 0 | ||
| } : { | ||
| valid: false, | ||
| data: void 0, | ||
| errorMessage: result.errors.map((err) => `${err.instanceLocation}: ${err.error}`).join("; ") | ||
| }; | ||
| }; | ||
| } | ||
| }; | ||
| //#endregion | ||
| Object.defineProperty(exports, 'CfWorkerJsonSchemaValidator', { | ||
| enumerable: true, | ||
| get: function () { | ||
| return CfWorkerJsonSchemaValidator; | ||
| } | ||
| }); | ||
| //# sourceMappingURL=cfWorkerProvider-Djgwc46-.cjs.map |
Sorry, the diff of this file is too big to display
| //#region rolldown:runtime | ||
| var __create = Object.create; | ||
| var __defProp = Object.defineProperty; | ||
| var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
| var __getOwnPropNames = Object.getOwnPropertyNames; | ||
| var __getProtoOf = Object.getPrototypeOf; | ||
| var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
| var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports); | ||
| var __exportAll = (all, symbols) => { | ||
| let target = {}; | ||
| for (var name in all) { | ||
| __defProp(target, name, { | ||
| get: all[name], | ||
| enumerable: true | ||
| }); | ||
| } | ||
| if (symbols) { | ||
| __defProp(target, Symbol.toStringTag, { value: "Module" }); | ||
| } | ||
| return target; | ||
| }; | ||
| var __copyProps = (to, from, except, desc) => { | ||
| if (from && typeof from === "object" || typeof from === "function") { | ||
| for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | ||
| key = keys[i]; | ||
| if (!__hasOwnProp.call(to, key) && key !== except) { | ||
| __defProp(to, key, { | ||
| get: ((k) => from[k]).bind(null, key), | ||
| enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | ||
| }); | ||
| } | ||
| } | ||
| } | ||
| return to; | ||
| }; | ||
| var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | ||
| value: mod, | ||
| enumerable: true | ||
| }) : target, mod)); | ||
| //#endregion | ||
| export { __exportAll as n, __toESM as r, __commonJSMin as t }; |
Sorry, the diff of this file is too big to display
| {"version":3,"file":"createMcpHandler-D1q2h_Yl.d.mts","names":[],"sources":["../../core-internal/src/shared/auth.ts","../../core-internal/src/auth/errors.ts","../../core-internal/src/errors/sdkErrors.ts","../../core-internal/src/shared/authUtils.ts","../../core-internal/src/types/constants.ts","../../core-internal/src/types/schemas.ts","../../core-internal/src/types/types.ts","../../core-internal/src/wire/codec.ts","../../core-internal/src/shared/inboundClassification.ts","../../core-internal/src/util/standardSchema.ts","../../core-internal/src/shared/elicitation.ts","../../core-internal/src/shared/inputRequired.ts","../../core-internal/src/types/enums.ts","../../core-internal/src/types/errors.ts","../../core-internal/src/types/guards.ts","../../core-internal/src/types/specTypeSchema.ts","../../core-internal/src/shared/transport.ts","../../core-internal/src/shared/protocol.ts","../../core-internal/src/shared/mediaType.ts","../../core-internal/src/shared/metadataUtils.ts","../../core-internal/src/shared/protocolEras.ts","../../core-internal/src/shared/resultCacheHints.ts","../../core-internal/src/shared/stdio.ts","../../core-internal/src/shared/uriTemplate.ts","../../core-internal/src/util/inMemory.ts","../src/server/server.ts","../src/server/mcp.ts","../src/server/perRequestTransport.ts","../src/server/serverEventBus.ts","../src/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MF;;;;;;;;;;;A7B5EiB,K6BwFpB,iBAAA,G7BxFoB,CAAA,OAAA,E6BwFU,O7BxFV,EAAA,OAAA,CAAA,E6BwF6B,wB7BxF7B,EAAA,G6BwF0D,O7BxF1D,C6BwFkE,Q7BxFlE,CAAA;AA6BhC;U6B8DiB,uBAAA;;;;;;;;;;;;;;;;;;;;;;;;;oBAyBK;;;;;;;;;;;;;iBAaH;;;;;;;;;QAST;;;;;;;;;;;;;;;;;;;;;;;;;UA0BO,cAAA;;mBAEI,mBAAmB,6BAA6B,QAAQ;;;;;;;eAO5D;;;;;;;;UAQL;;;;A7B1GZ;;O6BgHS;;;;;;;;;;;;;;;;;;;;;iBAwEO,uBAAA,UAAiC,oCAAoC,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiOhF,eAAA,UAAyB,gCAAgC;;;;;A7B/Y/E;;;;;;;;;;;;;;AAkBA;;;;;;;;;;;;AAUA;AAKA;;;;;;;;;AAeA;;;;iB6ByZgB,gBAAA,UAA0B,4BAA2B,0BAA+B"} |
Sorry, the diff of this file is too big to display
| {"version":3,"file":"createMcpHandler-DncDnS1h.d.cts","names":[],"sources":["../../core-internal/src/errors/sdkErrors.ts","../../core-internal/src/types/constants.ts","../../core-internal/src/types/schemas.ts","../../core-internal/src/types/types.ts","../../core-internal/src/wire/codec.ts","../../core-internal/src/util/standardSchema.ts","../../core-internal/src/shared/transport.ts","../../core-internal/src/shared/protocol.ts","../../core-internal/src/shared/resultCacheHints.ts","../../core-internal/src/shared/uriTemplate.ts","../src/server/server.ts","../src/server/mcp.ts","../src/server/perRequestTransport.ts","../src/server/serverEventBus.ts","../src/server/createMcpHandler.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;aAUY,YAAA;;;;;;;;;;;;;EAAA;EA2FC,UAAA,GAAS,aAAA;EA4BQ;EAvBT,aAAO,GAAA,gBAAA;EAasD;;;;;EAlB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diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| //#region ../../node_modules/.pnpm/json-schema-typed@8.0.2/node_modules/json-schema-typed/draft_2020_12.d.ts | ||
| type MaybeReadonlyArray<T> = Array<T> | ReadonlyArray<T>; | ||
| type ValueOf<T> = T[keyof T]; | ||
| /** | ||
| * JSON Schema [Draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-validation.html) | ||
| */ | ||
| type JSONSchema<Value = any, SchemaType = (Value extends boolean ? "boolean" : Value extends null ? "null" : Value extends number ? "number" | "integer" : Value extends string ? "string" : Value extends unknown[] ? "array" : Value extends Record<string | number, unknown> ? "object" : JSONSchema.TypeValue)> = boolean | { | ||
| /** | ||
| * Using JSON Pointer fragments requires knowledge of the structure of the | ||
| * schema. When writing schema documents with the intention to provide | ||
| * re-usable schemas, it may be preferable to use a plain name fragment | ||
| * that is not tied to any particular structural location. This allows a | ||
| * subschema to be relocated without requiring JSON Pointer references to | ||
| * be updated. | ||
| * | ||
| * The `$anchor` keyword is used to specify such a fragment. It is an | ||
| * identifier keyword that can only be used to create plain name fragments. | ||
| * | ||
| * If present, the value of this keyword MUST be a string, which MUST start | ||
| * with a letter `[A-Za-z]`, followed by any number of letters, digits | ||
| * `[0-9]`, hyphens `-`, underscores `_`, colons `:`, | ||
| * or periods `.`. | ||
| * | ||
| * Note that the anchor string does not include the `#` character, | ||
| * as it is not a URI-reference. An `{"$anchor": "foo"}` becomes the | ||
| * fragment `#foo` when used in a URI. | ||
| * | ||
| * The base URI to which the resulting fragment is appended is determined | ||
| * by the `$id` keyword as explained in the previous section. | ||
| * Two `$anchor` keywords in the same schema document MAY have the same | ||
| * value if they apply to different base URIs, as the resulting full URIs | ||
| * will be distinct. However, the effect of two `$anchor` keywords | ||
| * with the same value and the same base URI is undefined. Implementations | ||
| * MAY raise an error if such usage is detected. | ||
| */ | ||
| $anchor?: string; | ||
| /** | ||
| * This keyword reserves a location for comments from schema authors to | ||
| * readers or maintainers of the schema. | ||
| * | ||
| * The value of this keyword MUST be a string. Implementations MUST NOT | ||
| * present this string to end users. Tools for editing schemas SHOULD | ||
| * support displaying and editing this keyword. The value of this keyword | ||
| * MAY be used in debug or error output which is intended for developers | ||
| * making use of schemas. | ||
| * | ||
| * Schema vocabularies SHOULD allow `$comment` within any object | ||
| * containing vocabulary keywords. Implementations MAY assume `$comment` | ||
| * is allowed unless the vocabulary specifically forbids it. Vocabularies | ||
| * MUST NOT specify any effect of `$comment` beyond what is described in | ||
| * this specification. | ||
| * | ||
| * Tools that translate other media types or programming languages | ||
| * to and from `application/schema+json` MAY choose to convert that media | ||
| * type or programming language's native comments to or from `$comment` | ||
| * values. The behavior of such translation when both native comments and | ||
| * `$comment` properties are present is implementation-dependent. | ||
| * | ||
| * Implementations MAY strip `$comment` values at any point during | ||
| * processing. In particular, this allows for shortening schemas when the | ||
| * size of deployed schemas is a concern. | ||
| * | ||
| * Implementations MUST NOT take any other action based on the presence, | ||
| * absence, or contents of `$comment` properties. In particular, the | ||
| * value of `$comment` MUST NOT be collected as an annotation result. | ||
| */ | ||
| $comment?: string; | ||
| /** | ||
| * The `$defs` keyword reserves a location for schema authors to inline | ||
| * re-usable JSON Schemas into a more general schema. The keyword does not | ||
| * directly affect the validation result. | ||
| * | ||
| * This keyword's value MUST be an object. Each member value of this object | ||
| * MUST be a valid JSON Schema. | ||
| */ | ||
| $defs?: Record<string, JSONSchema>; | ||
| /** | ||
| * "The `$dynamicAnchor` indicates that the fragment is an extension | ||
| * point when used with the `$dynamicRef` keyword. This low-level, | ||
| * advanced feature makes it easier to extend recursive schemas such as the | ||
| * meta-schemas, without imposing any particular semantics on that | ||
| * extension. See `$dynamicRef` for more details. | ||
| */ | ||
| $dynamicAnchor?: string; | ||
| /** | ||
| * The `$dynamicRef` keyword is an applicator that allows for deferring | ||
| * the full resolution until runtime, at which point it is resolved each | ||
| * time it is encountered while evaluating an instance. | ||
| * | ||
| * Together with `$dynamicAnchor`, `$dynamicRef` implements a | ||
| * cooperative extension mechanism that is primarily useful with recursive | ||
| * schemas (schemas that reference themselves). Both the extension point | ||
| * and the runtime-determined extension target are defined with | ||
| * `$dynamicAnchor`, and only exhibit runtime dynamic behavior when | ||
| * referenced with `$dynamicRef`. | ||
| * | ||
| * The value of the `$dynamicRef` property MUST be a string which is | ||
| * a URI-Reference. Resolved against the current URI base, it produces | ||
| * the URI used as the starting point for runtime resolution. This initial | ||
| * resolution is safe to perform on schema load. | ||
| * | ||
| * If the initially resolved starting point URI includes a fragment that | ||
| * was created by the `$dynamicAnchor` keyword, the initial URI MUST be | ||
| * replaced by the URI (including the fragment) for the outermost schema | ||
| * resource in the [dynamic scope][scopes] that defines | ||
| * an identically named fragment with `$dynamicAnchor`. | ||
| * | ||
| * Otherwise, its behavior is identical to `$ref`, and no runtime | ||
| * resolution is needed. | ||
| * | ||
| * [scopes]: https://json-schema.org/draft/2020-12/json-schema-core.html#scopes | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $dynamicRef?: string; | ||
| /** | ||
| * The `$id` keyword identifies a schema resource with its | ||
| * [canonical][[RFC6596]] URI. | ||
| * | ||
| * Note that this URI is an identifier and not necessarily a network | ||
| * locator. In the case of a network-addressable URL, a schema need not be | ||
| * downloadable from its canonical URI. | ||
| * | ||
| * If present, the value for this keyword MUST be a string, and MUST | ||
| * represent a valid [URI-reference][RFC3986]. This URI-reference SHOULD | ||
| * be normalized, and MUST resolve to an [absolute-URI][RFC3986] (without a | ||
| * fragment). Therefore, `$id` MUST NOT contain a non-empty fragment, | ||
| * and SHOULD NOT contain an empty fragment. | ||
| * | ||
| * Since an empty fragment in the context of the | ||
| * `application/schema+json` media type refers to the same resource as | ||
| * the base URI without a fragment, an implementation MAY normalize a URI | ||
| * ending with an empty fragment by removing the fragment. However, schema | ||
| * authors SHOULD NOT rely on this behavior across implementations. | ||
| * | ||
| * This URI also serves as the base URI for relative URI-references in | ||
| * keywords within the schema resource, in accordance with | ||
| * [RFC 3986][RFC3986] section 5.1.1 regarding base URIs embedded in | ||
| * content. | ||
| * | ||
| * The presence of `$id` in a subschema indicates that the subschema | ||
| * constitutes a distinct schema resource within a single schema document. | ||
| * Furthermore, in accordance with [RFC 3986][RFC3986] section 5.1.2 | ||
| * regarding encapsulating entities, if an `$id` in a subschema is a | ||
| * relative URI-reference, the base URI for resolving that reference is the | ||
| * URI of the parent schema resource. | ||
| * | ||
| * If no parent schema object explicitly identifies itself as a resource | ||
| * with `$id`, the base URI is that of the entire document. | ||
| * | ||
| * The root schema of a JSON Schema document SHOULD contain an `$id` | ||
| * keyword with an [absolute-URI][RFC3986] (containing a scheme, but no | ||
| * fragment). | ||
| * | ||
| * [RFC6596]: https://datatracker.ietf.org/doc/html/rfc6596 | ||
| * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986 | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $id?: string; | ||
| /** | ||
| * The `$ref` keyword is an applicator that is used to reference a | ||
| * statically identified schema. Its results are the results of the | ||
| * referenced schema. Other keywords can appear alongside of `$ref` in | ||
| * the same schema object. | ||
| * | ||
| * The value of the `$ref` property MUST be a string which is a | ||
| * URI-Reference. Resolved against the current URI base, it produces the | ||
| * URI of the schema to apply. | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $ref?: string; | ||
| /** | ||
| * The `$schema` keyword is both used as a JSON Schema dialect identifier | ||
| * and as the identifier of a resource which is itself a JSON Schema, which | ||
| * describes the set of valid schemas written for this particular dialect. | ||
| * | ||
| * The value of this keyword MUST be a [URI][RFC3986] (containing a scheme) | ||
| * and this URI MUST be normalized. The current schema MUST be valid | ||
| * against the meta-schema identified by this URI. | ||
| * | ||
| * If this URI identifies a retrievable resource, that resource SHOULD be | ||
| * of media type `application/schema+json`. | ||
| * | ||
| * The `$schema` keyword SHOULD be used in the document root schema | ||
| * object, and MAY be used in the root schema objects of embedded schema | ||
| * resources. It MUST NOT appear in non-resource root schema objects. If | ||
| * absent from the document root schema, the resulting behavior is | ||
| * implementation-defined. | ||
| * | ||
| * Values for this property are defined elsewhere in this and other | ||
| * documents, and by other parties. | ||
| * | ||
| * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986 | ||
| * | ||
| * @format "uri" | ||
| */ | ||
| $schema?: string; | ||
| /** | ||
| * The `$vocabulary` keyword is used in meta-schemas to identify the | ||
| * vocabularies available for use in schemas described by that meta-schema. | ||
| * It is also used to indicate whether each vocabulary is required or | ||
| * optional, in the sense that an implementation MUST understand the | ||
| * required vocabularies in order to successfully process the schema. | ||
| * Together, this information forms a dialect. Any vocabulary that is | ||
| * understood by the implementation MUST be processed in a manner | ||
| * consistent with the semantic definitions contained within the | ||
| * vocabulary. | ||
| * | ||
| * The value of this keyword MUST be an object. The property names in the | ||
| * object MUST be URIs (containing a scheme) and this URI MUST be | ||
| * normalized. Each URI that appears as a property name identifies a | ||
| * specific set of keywords and their semantics. | ||
| * | ||
| * The URI MAY be a URL, but the nature of the retrievable resource is | ||
| * currently undefined, and reserved for future use. Vocabulary authors | ||
| * MAY use the URL of the vocabulary specification, in a human-readable | ||
| * media type such as `text/html` or `text/plain`, as the vocabulary | ||
| * URI. | ||
| * | ||
| * The values of the object properties MUST be booleans. If the value is | ||
| * `true`, then implementations that do not recognize the vocabulary MUST | ||
| * refuse to process any schemas that declare this meta-schema with | ||
| * `$schema`. If the value is `false`, implementations that do not | ||
| * recognize the vocabulary SHOULD proceed with processing such schemas. | ||
| * The value has no impact if the implementation understands the | ||
| * vocabulary. | ||
| * | ||
| * Unrecognized keywords SHOULD be ignored. This remains the case for | ||
| * keywords defined by unrecognized vocabularies. It is not currently | ||
| * possible to distinguish between unrecognized keywords that are defined | ||
| * in vocabularies from those that are not part of any vocabulary. | ||
| * | ||
| * The `$vocabulary` keyword SHOULD be used in the root schema of any | ||
| * schema document intended for use as a meta-schema. It MUST NOT appear | ||
| * in subschemas. | ||
| * | ||
| * The `$vocabulary` keyword MUST be ignored in schema documents that are | ||
| * not being processed as a meta-schema. | ||
| */ | ||
| $vocabulary?: Record<string, string>; | ||
| /** | ||
| * @deprecated `additionalItems` has been deprecated in favor of `prefixItems` | ||
| * paired with `items`. | ||
| */ | ||
| additionalItems?: JSONSchema; | ||
| /** | ||
| * The value of `additionalProperties` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the presence and annotation | ||
| * results of `properties` and `patternProperties` within the same | ||
| * schema object. Validation with `additionalProperties` applies only to | ||
| * the child values of instance names that do not appear in the annotation | ||
| * results of either `properties` or `patternProperties`. | ||
| * | ||
| * For all such properties, validation succeeds if the child instance | ||
| * validates against the `additionalProperties` schema. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names validated by this keyword's subschema. Annotation results for | ||
| * `additionalProperties` keywords from multiple schemas applied to the | ||
| * same instance location are combined by taking the union of the sets. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * Implementations MAY choose to implement or optimize this keyword in | ||
| * another way that produces the same effect, such as by directly checking | ||
| * the names in `properties` and the patterns in `patternProperties` | ||
| * against the instance property set. | ||
| */ | ||
| additionalProperties?: JSONSchema; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against all schemas defined by this keyword's value. | ||
| */ | ||
| allOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against at least one schema defined by this keyword's | ||
| * value. | ||
| */ | ||
| anyOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * An instance validates successfully against this keyword if its value is | ||
| * equal to the value of the keyword. | ||
| * | ||
| * Use of this keyword is functionally equivalent to the `enum` keyword | ||
| * with a single value. | ||
| */ | ||
| const?: Value; | ||
| /** | ||
| * The value of this keyword MUST be a valid JSON Schema. | ||
| * | ||
| * An array instance is valid against `contains` if at least one of its | ||
| * elements is valid against the given schema. The subschema MUST be | ||
| * applied to every array element even after the first match has been | ||
| * found, in order to collect annotations for use by other keywords. | ||
| * This is to ensure that all possible annotations are collected. | ||
| * | ||
| * Logically, the validation result of applying the value subschema to each | ||
| * item in the array MUST be OR'ed with `false`, resulting in an overall | ||
| * validation result. | ||
| * | ||
| * This keyword produces an annotation value which is an array of the | ||
| * indexes to which this keyword validates successfully when applying its | ||
| * subschema, in ascending order. The value MAY be a boolean `true` if | ||
| * the subschema validates successfully when applied to every index of the | ||
| * instance. The annotation MUST be present if the instance array to which | ||
| * this keyword's schema applies is empty. | ||
| */ | ||
| contains?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * If the instance value is a string, this property defines that the | ||
| * string SHOULD be interpreted as binary data and decoded using the | ||
| * encoding named by this property. [RFC 2045, Sec 6.1][RFC2045] lists the | ||
| * possible values for this property. | ||
| * | ||
| * The value of this property SHOULD be ignored if the instance described | ||
| * is not a string. | ||
| * | ||
| * If this keyword is absent, but `contentMediaType` is present, this | ||
| * indicates that the media type could be encoded into `UTF-8` like any | ||
| * other JSON string value, and does not require additional decoding. | ||
| * | ||
| * The value of this property MUST be a string. | ||
| * | ||
| * [RFC2045]: https://datatracker.ietf.org/doc/html/rfc2045#section-6.1 | ||
| */ | ||
| contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token"; | ||
| /** | ||
| * If the instance is a string, this property indicates the media type | ||
| * of the contents of the string. If `contentEncoding` is present, | ||
| * this property describes the decoded string. | ||
| * | ||
| * The value of this property must be a media type, as defined by | ||
| * [RFC 2046][RFC2046]. This property defines the media type of instances | ||
| * which this schema defines. | ||
| * | ||
| * The value of this property SHOULD be ignored if the instance described | ||
| * is not a string. | ||
| * | ||
| * If the `contentEncoding` property is not present, but the instance | ||
| * value is a string, then the value of this property SHOULD specify a text | ||
| * document type, and the character set SHOULD be the character set into | ||
| * which the JSON string value was decoded (for which the default is | ||
| * Unicode). | ||
| * | ||
| * [RFC2046]: https://datatracker.ietf.org/doc/html/rfc2046 | ||
| */ | ||
| contentMediaType?: string; | ||
| /** | ||
| * If the instance is a string, and if `contentMediaType` is present, | ||
| * this property contains a schema which describes the structure of the | ||
| * string. | ||
| * | ||
| * This keyword MAY be used with any media type that can be mapped into | ||
| * JSON Schema's data model. | ||
| * | ||
| * The value of this property MUST be a valid JSON schema. It SHOULD be | ||
| * ignored if `contentMediaType` is not present. | ||
| */ | ||
| contentSchema?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * This keyword can be used to supply a default JSON value associated with | ||
| * a particular schema. It is RECOMMENDED that a `default` value be valid | ||
| * against the associated schema. | ||
| */ | ||
| default?: Value; | ||
| /** | ||
| * @deprecated `definitions` has been renamed to `$defs`. | ||
| */ | ||
| definitions?: Record<string, JSONSchema>; | ||
| /** | ||
| * @deprecated `dependencies` has been split into two keywords: | ||
| * `dependentSchemas` and `dependentRequired`. | ||
| */ | ||
| dependencies?: Record<string, MaybeReadonlyArray<string> | JSONSchema>; | ||
| /** | ||
| * The value of this keyword MUST be an object. Properties in | ||
| * this object, if any, MUST be arrays. Elements in each array, | ||
| * if any, MUST be strings, and MUST be unique. | ||
| * | ||
| * This keyword specifies properties that are required if a specific | ||
| * other property is present. Their requirement is dependent on the | ||
| * presence of the other property. | ||
| * | ||
| * Validation succeeds if, for each name that appears in both | ||
| * the instance and as a name within this keyword's value, every | ||
| * item in the corresponding array is also the name of a property | ||
| * in the instance. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty object. | ||
| */ | ||
| dependentRequired?: Record<string, MaybeReadonlyArray<string>>; | ||
| /** | ||
| * This keyword specifies subschemas that are evaluated if the instance is | ||
| * an object and contains a certain property. | ||
| * | ||
| * This keyword's value MUST be an object. Each value in the object MUST be | ||
| * a valid JSON Schema. | ||
| * | ||
| * If the object key is a property in the instance, the entire instance | ||
| * must validate against the subschema. Its use is dependent on the | ||
| * presence of the property. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty object. | ||
| */ | ||
| dependentSchemas?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword are applicable to a single sub-instance, applications | ||
| * SHOULD consider the instance location to be deprecated if any occurrence | ||
| * specifies a `true` value. | ||
| * | ||
| * If `deprecated` has a value of boolean `true`, it indicates that | ||
| * applications SHOULD refrain from usage of the declared property. It MAY | ||
| * mean the property is going to be removed in the future. | ||
| * | ||
| * A root schema containing `deprecated` with a value of `true` | ||
| * indicates that the entire resource being described MAY be removed in the | ||
| * future. | ||
| * | ||
| * The `deprecated` keyword applies to each instance location to which | ||
| * the schema object containing the keyword successfully applies. This can | ||
| * result in scenarios where every array item or object property is | ||
| * deprecated even though the containing array or object is not. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `false`. | ||
| */ | ||
| deprecated?: boolean; | ||
| /** | ||
| * Can be used to decorate a user interface with explanation or information | ||
| * about the data produced. | ||
| */ | ||
| description?: string; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * When `if` is present, and the instance fails to validate against its | ||
| * subschema, then validation succeeds against this keyword if the instance | ||
| * successfully validates against this keyword's subschema. | ||
| * | ||
| * This keyword has no effect when `if` is absent, or when the instance | ||
| * successfully validates against its subschema. Implementations MUST NOT | ||
| * evaluate the instance against this keyword, for either validation or | ||
| * annotation collection purposes, in such cases. | ||
| */ | ||
| else?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * The value of this keyword MUST be an array. This array SHOULD have at | ||
| * least one element. Elements in the array SHOULD be unique. | ||
| * | ||
| * An instance validates successfully against this keyword if its value is | ||
| * equal to one of the elements in this keyword's array value. | ||
| * | ||
| * Elements in the array might be of any type, including `null`. | ||
| */ | ||
| enum?: MaybeReadonlyArray<Value>; | ||
| /** | ||
| * The value of this keyword MUST be an array. When multiple occurrences of | ||
| * this keyword are applicable to a single sub-instance, implementations | ||
| * MUST provide a flat array of all values rather than an array of arrays. | ||
| * | ||
| * This keyword can be used to provide sample JSON values associated with a | ||
| * particular schema, for the purpose of illustrating usage. It is | ||
| * RECOMMENDED that these values be valid against the associated schema. | ||
| * | ||
| * Implementations MAY use the value(s) of `default`, if present, as an | ||
| * additional example. If `examples` is absent, `default` MAY still be | ||
| * used in this manner. | ||
| */ | ||
| examples?: MaybeReadonlyArray<Value>; | ||
| /** | ||
| * The value of `exclusiveMaximum` MUST be a number, representing an | ||
| * exclusive upper limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then the instance is valid only if it has a | ||
| * value strictly less than (not equal to) `exclusiveMaximum`. | ||
| */ | ||
| exclusiveMaximum?: number; | ||
| /** | ||
| * The value of `exclusiveMinimum` MUST be a number, representing an | ||
| * exclusive lower limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then the instance is valid only if it has a | ||
| * value strictly greater than (not equal to) `exclusiveMinimum`. | ||
| */ | ||
| exclusiveMinimum?: number; | ||
| /** | ||
| * Implementations MAY treat `format` as an assertion in addition to an | ||
| * annotation, and attempt to validate the value's conformance to the | ||
| * specified semantics. | ||
| * | ||
| * The value of this keyword is called a format attribute. It MUST be a | ||
| * string. A format attribute can generally only validate a given set | ||
| * of instance types. If the type of the instance to validate is not in | ||
| * this set, validation for this format attribute and instance SHOULD | ||
| * succeed. Format attributes are most often applied to strings, but can | ||
| * be specified to apply to any type. | ||
| * | ||
| * Implementations MAY support custom format attributes. Save for agreement | ||
| * between parties, schema authors SHALL NOT expect a peer implementation | ||
| * to support such custom format attributes. An implementation MUST NOT | ||
| * fail validation or cease processing due to an unknown format attribute. | ||
| * When treating `format` as an annotation, implementations SHOULD | ||
| * collect both known and unknown format attribute values. | ||
| */ | ||
| format?: string; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * This validation outcome of this keyword's subschema has no direct effect | ||
| * on the overall validation result. Rather, it controls which of the | ||
| * `then` or `else` keywords are evaluated. | ||
| * | ||
| * Instances that successfully validate against this keyword's subschema | ||
| * MUST also be valid against the subschema value of the `then` keyword, | ||
| * if present. | ||
| * | ||
| * Instances that fail to validate against this keyword's subschema MUST | ||
| * also be valid against the subschema value of the `else` keyword, if | ||
| * present. | ||
| * | ||
| * If annotations are being collected, they are collected | ||
| * from this keyword's subschema in the usual way, including when the | ||
| * keyword is present without either `then` or `else`. | ||
| */ | ||
| if?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * The value of `items` MUST be a valid JSON Schema. | ||
| * | ||
| * This keyword applies its subschema to all instance elements at indexes | ||
| * greater than the length of the `prefixItems` array in the same schema | ||
| * object, as reported by the annotation result of that `prefixItems` | ||
| * keyword. If no such annotation result exists, `items` applies its | ||
| * subschema to all instance array elements. | ||
| * | ||
| * Note that the behavior of `items` without `prefixItems` is identical | ||
| * to that of the schema form of `items` in prior drafts. | ||
| * | ||
| * When `prefixItems` is present, the behavior of `items` is identical | ||
| * to the former `additionalItems` keyword. | ||
| * | ||
| * If the `items` subschema is applied to any positions within the | ||
| * instance array, it produces an annotation result of boolean `true`, | ||
| * indicating that all remaining array elements have been evaluated against | ||
| * this keyword's subschema. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * Implementations MAY choose to implement or optimize this keyword | ||
| * in another way that produces the same effect, such as by directly | ||
| * checking for the presence and size of a `prefixItems` array. | ||
| */ | ||
| items?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * If `contains` is not present within the same schema object, then this | ||
| * keyword has no effect. | ||
| * | ||
| * An instance array is valid against `maxContains` in two ways, | ||
| * depending on the form of the annotation result of an adjacent | ||
| * `contains` keyword. The first way is if the annotation result is an | ||
| * array and the length of that array is less than or equal to the | ||
| * `maxContains` value. The second way is if the annotation result is a | ||
| * boolean `true` and the instance array length is less than or equal to | ||
| * the `maxContains` value. | ||
| */ | ||
| maxContains?: number; | ||
| /** | ||
| * The value of `maximum` MUST be a number, representing an inclusive | ||
| * upper limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then this keyword validates only if the | ||
| * instance is less than or exactly equal to `maximum`. | ||
| */ | ||
| maximum?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An array instance is valid against `maxItems` if its size is less | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxItems?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * A string instance is valid against this keyword if its length is less | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * The length of a string instance is defined as the number of its | ||
| * characters as defined by [RFC 8259][RFC8259]. | ||
| * | ||
| * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259 | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxLength?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An object instance is valid against `maxProperties` if its number of | ||
| * `properties` is less than, or equal to, the value of this keyword. | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxProperties?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * If `contains` is not present within the same schema object, then this | ||
| * keyword has no effect. | ||
| * | ||
| * An instance array is valid against `minContains` in two ways, | ||
| * depending on the form of the annotation result of an adjacent | ||
| * `contains` keyword. The first way is if the annotation result is an | ||
| * array and the length of that array is greater than or equal to the | ||
| * `minContains` value. The second way is if the annotation result is a | ||
| * boolean `true` and the instance array length is greater than or equal | ||
| * to the `minContains` value. | ||
| * | ||
| * A value of `0` is allowed, but is only useful for setting a range | ||
| * of occurrences from `0` to the value of `maxContains`. A value of | ||
| * `0` with no `maxContains` causes `contains` to always pass | ||
| * validation. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `1`. | ||
| * | ||
| * @default 1 | ||
| */ | ||
| minContains?: number; | ||
| /** | ||
| * The value of `minimum` MUST be a number, representing an inclusive | ||
| * lower limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then this keyword validates only if the | ||
| * instance is greater than or exactly equal to `minimum`. | ||
| */ | ||
| minimum?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An array instance is valid against `minItems` if its size is greater | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minItems?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * A string instance is valid against this keyword if its length is greater | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * The length of a string instance is defined as the number of its | ||
| * characters as defined by [RFC 8259][RFC8259]. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259 | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minLength?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An object instance is valid against `minProperties` if its number of | ||
| * `properties` is greater than, or equal to, the value of this keyword. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minProperties?: number; | ||
| /** | ||
| * The value of `multipleOf` MUST be a number, strictly greater than | ||
| * `0`. | ||
| * | ||
| * A numeric instance is valid only if division by this keyword's value | ||
| * results in an integer. | ||
| * | ||
| * @exclusiveMinimum 0 | ||
| */ | ||
| multipleOf?: number; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * An instance is valid against this keyword if it fails to validate | ||
| * successfully against the schema defined by this keyword. | ||
| */ | ||
| not?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against exactly one schema defined by this keyword's value. | ||
| */ | ||
| oneOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * The value of this keyword MUST be a string. This string SHOULD be a | ||
| * valid regular expression, according to the [ECMA-262][ecma262] regular | ||
| * expression dialect. | ||
| * | ||
| * A string instance is considered valid if the regular expression matches | ||
| * the instance successfully. Recall: regular expressions are not | ||
| * implicitly anchored. | ||
| * | ||
| * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/ | ||
| * | ||
| * @format "regex" | ||
| */ | ||
| pattern?: string; | ||
| /** | ||
| * The value of `patternProperties` MUST be an object. Each property name | ||
| * of this object SHOULD be a valid regular expression, according to the | ||
| * [ECMA-262][ecma262] regular expression dialect. Each property value of | ||
| * this object MUST be a valid JSON Schema. | ||
| * | ||
| * Validation succeeds if, for each instance name that matches any regular | ||
| * expressions that appear as a property name in this keyword's value, | ||
| * the child instance for that name successfully validates against each | ||
| * schema that corresponds to a matching regular expression. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names matched by this keyword. Omitting this keyword has the same | ||
| * assertion behavior as an empty object. | ||
| * | ||
| * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/ | ||
| */ | ||
| patternProperties?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of `prefixItems` MUST be a non-empty array of valid JSON | ||
| * Schemas. | ||
| * | ||
| * Validation succeeds if each element of the instance validates against | ||
| * the schema at the same position, if any. This keyword does not | ||
| * constrain the length of the array. If the array is longer than this | ||
| * keyword's value, this keyword validates only the prefix of matching | ||
| * length. | ||
| * | ||
| * This keyword produces an annotation value which is the largest index to | ||
| * which this keyword applied a subschema. The value MAY be a boolean | ||
| * `true` if a subschema was applied to every index of the instance, such | ||
| * as is produced by the `items` keyword. | ||
| * This annotation affects the behavior of `items` and | ||
| * `unevaluatedItems`. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty array. | ||
| */ | ||
| prefixItems?: MaybeReadonlyArray<JSONSchema> | JSONSchema; | ||
| /** | ||
| * The value of `properties` MUST be an object. Each value of this object | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * Validation succeeds if, for each name that appears in both the instance | ||
| * and as a name within this keyword's value, the child instance for that | ||
| * name successfully validates against the corresponding schema. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names matched by this keyword. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * object. | ||
| */ | ||
| properties?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of `propertyNames` MUST be a valid JSON Schema. | ||
| * | ||
| * If the instance is an object, this keyword validates if every property | ||
| * name in the instance validates against the provided schema. | ||
| * Note the property name that the schema is testing will always be a | ||
| * string. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty schema. | ||
| */ | ||
| propertyNames?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword are applicable to a single sub-instance, the resulting | ||
| * value MUST be `true` if any occurrence specifies a `true` value, and | ||
| * MUST be `false` otherwise. | ||
| * | ||
| * If `readOnly` has a value of boolean `true`, it indicates that the | ||
| * value of the instance is managed exclusively by the owning authority, | ||
| * and attempts by an application to modify the value of this property are | ||
| * expected to be ignored or rejected by that owning authority. | ||
| * | ||
| * An instance document that is marked as `readOnly` for the entire | ||
| * document MAY be ignored if sent to the owning authority, or MAY result | ||
| * in an error, at the authority's discretion. | ||
| * | ||
| * For example, `readOnly` would be used to mark a database-generated | ||
| * serial number as read-only. | ||
| * | ||
| * This keyword can be used to assist in user interface instance | ||
| * generation. | ||
| * | ||
| * @default false | ||
| */ | ||
| readOnly?: boolean; | ||
| /** | ||
| * The value of this keyword MUST be an array. Elements of this array, if | ||
| * any, MUST be strings, and MUST be unique. | ||
| * | ||
| * An object instance is valid against this keyword if every item in the | ||
| * array is the name of a property in the instance. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty array. | ||
| */ | ||
| required?: MaybeReadonlyArray<string>; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * When `if` is present, and the instance successfully validates against | ||
| * its subschema, then validation succeeds against this keyword if the | ||
| * instance also successfully validates against this keyword's subschema. | ||
| * | ||
| * This keyword has no effect when `if` is absent, or when the instance | ||
| * fails to validate against its subschema. Implementations MUST NOT | ||
| * evaluate the instance against this keyword, for either validation or | ||
| * annotation collection purposes, in such cases. | ||
| */ | ||
| then?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * Can be used to decorate a user interface with a short label about the | ||
| * data produced. | ||
| */ | ||
| title?: string; | ||
| /** | ||
| * The value of this keyword MUST be either a string or an array. If it is | ||
| * an array, elements of the array MUST be strings and MUST be unique. | ||
| * | ||
| * String values MUST be one of the six primitive types (`"null"`, | ||
| * `"boolean"`, `"object"`, `"array"`, `"number"`, or | ||
| * `"string"`), or `"integer"` which matches any number with a zero | ||
| * fractional part. | ||
| * | ||
| * An instance validates if and only if the instance is in any of the sets | ||
| * listed for this keyword. | ||
| */ | ||
| type?: SchemaType; | ||
| /** | ||
| * The value of `unevaluatedItems` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the annotation results of | ||
| * adjacent keywords that apply to the instance location being validated. | ||
| * Specifically, the annotations from `prefixItems`, `items`, and | ||
| * `contains`, which can come from those keywords when they are adjacent | ||
| * to the `unevaluatedItems` keyword. Those three annotations, as well as | ||
| * `unevaluatedItems`, can also result from any and all adjacent | ||
| * [in-place applicator][in-place-applicator] keywords. | ||
| * | ||
| * If no relevant annotations are present, the `unevaluatedItems` | ||
| * subschema MUST be applied to all locations in the array. | ||
| * If a boolean `true` value is present from any of the relevant | ||
| * annotations, `unevaluatedItems` MUST be ignored. Otherwise, the | ||
| * subschema MUST be applied to any index greater than the largest | ||
| * annotation value for `prefixItems`, which does not appear in any | ||
| * annotation value for `contains`. | ||
| * | ||
| * This means that `prefixItems`, `items`, `contains`, and all | ||
| * in-place applicators MUST be evaluated before this keyword can be | ||
| * evaluated. Authors of extension keywords MUST NOT define an in-place | ||
| * applicator that would need to be evaluated after this keyword. | ||
| * | ||
| * If the `unevaluatedItems` subschema is applied to any positions within | ||
| * the instance array, it produces an annotation result of boolean | ||
| * `true`, analogous to the behavior of `items`. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place | ||
| */ | ||
| unevaluatedItems?: JSONSchema; | ||
| /** | ||
| * The value of `unevaluatedProperties` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the annotation results of | ||
| * adjacent keywords that apply to the instance location being validated. | ||
| * Specifically, the annotations from `properties`, | ||
| * `patternProperties`, and `additionalProperties`, which can come from | ||
| * those keywords when they are adjacent to the `unevaluatedProperties` | ||
| * keyword. Those three annotations, as well as `unevaluatedProperties`, | ||
| * can also result from any and all adjacent | ||
| * [in-place applicator][in-place-applicator] keywords. | ||
| * | ||
| * Validation with `unevaluatedProperties` applies only to the child | ||
| * values of instance names that do not appear in the `properties`, | ||
| * `patternProperties`, `additionalProperties`, or | ||
| * `unevaluatedProperties` annotation results that apply to the | ||
| * instance location being validated. | ||
| * | ||
| * For all such properties, validation succeeds if the child instance | ||
| * validates against the "unevaluatedProperties" schema. | ||
| * | ||
| * This means that `properties`, `patternProperties`, | ||
| * `additionalProperties`, and all in-place applicators MUST be evaluated | ||
| * before this keyword can be evaluated. Authors of extension keywords | ||
| * MUST NOT define an in-place applicator that would need to be evaluated | ||
| * after this keyword. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names validated by this keyword's subschema. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place | ||
| */ | ||
| unevaluatedProperties?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. | ||
| * | ||
| * If this keyword has boolean value `false`, the instance validates | ||
| * successfully. If it has boolean value `true`, the instance validates | ||
| * successfully if all of its elements are unique. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `false`. | ||
| * | ||
| * @default false | ||
| */ | ||
| uniqueItems?: boolean; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword is applicable to a single sub-instance, the resulting | ||
| * value MUST be `true` if any occurrence specifies a `true` value, and | ||
| * MUST be `false` otherwise. | ||
| * | ||
| * If `writeOnly` has a value of boolean `true`, it indicates that the | ||
| * value is never present when the instance is retrieved from the owning | ||
| * authority. It can be present when sent to the owning authority to update | ||
| * or create the document (or the resource it represents), but it will not | ||
| * be included in any updated or newly created version of the instance. | ||
| * | ||
| * An instance document that is marked as `writeOnly` for the entire | ||
| * document MAY be returned as a blank document of some sort, or MAY | ||
| * produce an error upon retrieval, or have the retrieval request ignored, | ||
| * at the authority's discretion. | ||
| * | ||
| * For example, `writeOnly` would be used to mark a password input field. | ||
| * | ||
| * These keywords can be used to assist in user interface instance | ||
| * generation. In particular, an application MAY choose to use a widget | ||
| * that hides input values as they are typed for write-only fields. | ||
| * | ||
| * @default false | ||
| */ | ||
| writeOnly?: boolean; | ||
| }; | ||
| declare namespace JSONSchema { | ||
| type TypeValue = ValueOf<TypeName> | TypeName | Array<ValueOf<TypeName> | TypeName> | ReadonlyArray<ValueOf<TypeName> | TypeName>; | ||
| /** | ||
| * JSON Schema interface | ||
| */ | ||
| type Interface<Value = any, SchemaType extends TypeValue = TypeValue> = Exclude<JSONSchema<Value, SchemaType>, boolean>; | ||
| type Array<T = any> = Pick<Interface<T, "array">, KeywordByType.Any | KeywordByType.Array>; | ||
| type Boolean = Pick<Interface<boolean, "boolean">, KeywordByType.Any>; | ||
| type Integer = Pick<Interface<number, "integer">, KeywordByType.Any | KeywordByType.Number>; | ||
| type Number = Pick<Interface<number, "number">, KeywordByType.Any | KeywordByType.Number>; | ||
| type Null = Pick<Interface<null, "null">, KeywordByType.Any>; | ||
| type Object<T = any> = Pick<Interface<T, "object">, KeywordByType.Any | KeywordByType.Object>; | ||
| type String = Pick<Interface<string, "string">, KeywordByType.Any | KeywordByType.String>; | ||
| } | ||
| declare namespace KeywordByType { | ||
| type Any = "$anchor" | "$comment" | "$defs" | "$dynamicAnchor" | "$dynamicRef" | "$id" | "$ref" | "$schema" | "$vocabulary" | "allOf" | "anyOf" | "const" | "default" | "definitions" | "deprecated" | "description" | "else" | "enum" | "examples" | "format" | "if" | "not" | "oneOf" | "readOnly" | "then" | "title" | "type" | "writeOnly"; | ||
| type Array = "additionalItems" | "contains" | "items" | "maxContains" | "maxItems" | "minContains" | "minItems" | "prefixItems" | "unevaluatedItems" | "uniqueItems"; | ||
| type Number = "exclusiveMaximum" | "exclusiveMinimum" | "maximum" | "minimum" | "multipleOf"; | ||
| type Object = "additionalProperties" | "dependencies" | "dependentRequired" | "dependentSchemas" | "maxProperties" | "minProperties" | "patternProperties" | "properties" | "propertyNames" | "required" | "unevaluatedProperties"; | ||
| type String = "contentEncoding" | "contentMediaType" | "contentSchema" | "maxLength" | "minLength" | "pattern"; | ||
| } | ||
| /** | ||
| * Content encoding strategy enum. | ||
| * | ||
| * - [Content-Transfer-Encoding Syntax](https://datatracker.ietf.org/doc/html/rfc2045#section-6.1) | ||
| * - [7bit vs 8bit encoding](https://stackoverflow.com/questions/25710599/content-transfer-encoding-7bit-or-8-bit/28531705#28531705) | ||
| */ | ||
| /** | ||
| * Enum consisting of simple type names for the `type` keyword | ||
| */ | ||
| declare enum TypeName { | ||
| /** | ||
| * Value MUST be an array. | ||
| */ | ||
| Array = "array", | ||
| /** | ||
| * Value MUST be a boolean. | ||
| */ | ||
| Boolean = "boolean", | ||
| /** | ||
| * Value MUST be an integer, no floating point numbers are allowed. This is a | ||
| * subset of the number type. | ||
| */ | ||
| Integer = "integer", | ||
| /** | ||
| * Value MUST be null. Note this is mainly for purpose of being able use union | ||
| * types to define nullability. If this type is not included in a union, null | ||
| * values are not allowed (the primitives listed above do not allow nulls on | ||
| * their own). | ||
| */ | ||
| Null = "null", | ||
| /** | ||
| * Value MUST be a number, floating point numbers are allowed. | ||
| */ | ||
| Number = "number", | ||
| /** | ||
| * Value MUST be an object. | ||
| */ | ||
| Object = "object", | ||
| /** | ||
| * Value MUST be a string. | ||
| */ | ||
| String = "string", | ||
| } | ||
| //#endregion | ||
| //#region ../core-internal/src/validators/types.d.ts | ||
| /** | ||
| * JSON Schema type definition (JSON Schema Draft 2020-12) | ||
| * | ||
| * This uses the object form of JSON Schema (excluding boolean schemas). | ||
| * While `true` and `false` are valid JSON Schemas, this SDK uses the | ||
| * object form for practical type safety. | ||
| * | ||
| * Re-exported from json-schema-typed for convenience. | ||
| * @see https://json-schema.org/draft/2020-12/json-schema-core.html | ||
| */ | ||
| type JsonSchemaType = JSONSchema.Interface; | ||
| /** | ||
| * Result of a JSON Schema validation operation | ||
| */ | ||
| type JsonSchemaValidatorResult<T> = { | ||
| valid: true; | ||
| data: T; | ||
| errorMessage: undefined; | ||
| } | { | ||
| valid: false; | ||
| data: undefined; | ||
| errorMessage: string; | ||
| }; | ||
| /** | ||
| * A validator function that validates data against a JSON Schema | ||
| */ | ||
| type JsonSchemaValidator<T> = (input: unknown) => JsonSchemaValidatorResult<T>; | ||
| /** | ||
| * Provider interface for creating validators from JSON Schemas | ||
| * | ||
| * This is the main extension point for custom validator implementations. | ||
| * Implementations should: | ||
| * - Support JSON Schema Draft 2020-12 (or be compatible with it) | ||
| * - Return validator functions that can be called multiple times | ||
| * - Handle schema compilation/caching internally | ||
| * - Provide clear error messages on validation failure | ||
| * | ||
| * @example | ||
| * ```ts source="./types.examples.ts#jsonSchemaValidator_implementation" | ||
| * class MyValidatorProvider implements jsonSchemaValidator { | ||
| * getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T> { | ||
| * // Compile/cache validator from schema | ||
| * return (input: unknown) => | ||
| * isValid(schema, input) | ||
| * ? { valid: true, data: input as T, errorMessage: undefined } | ||
| * : { valid: false, data: undefined, errorMessage: 'Error details' }; | ||
| * } | ||
| * } | ||
| * ``` | ||
| */ | ||
| interface jsonSchemaValidator { | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that can be called multiple times | ||
| */ | ||
| getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| //#endregion | ||
| export { jsonSchemaValidator as i, JsonSchemaValidator as n, JsonSchemaValidatorResult as r, JsonSchemaType as t }; | ||
| //# sourceMappingURL=types-BV_484UZ.d.mts.map |
| {"version":3,"file":"types-BV_484UZ.d.mts","names":["draft","$schema","MaybeReadonlyArray","T","Array","ReadonlyArray","ValueOf","JSONSchema","Value","SchemaType","Record","TypeValue","TypeName","Exclude","Interface","KeywordByType","Any","Pick","Number","Object","String","ContentEncoding","Format","keywords"],"sources":["../../../node_modules/.pnpm/json-schema-typed@8.0.2/node_modules/json-schema-typed/draft_2020_12.d.ts","../../core-internal/src/validators/types.ts"],"sourcesContent":["export declare const draft: \"2020-12\";\r\nexport declare const $schema: \"https://json-schema.org/draft/2020-12/schema\";\r\ntype MaybeReadonlyArray<T> = Array<T> | ReadonlyArray<T>;\r\ntype ValueOf<T> = T[keyof T];\r\n/**\r\n * JSON Schema [Draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-validation.html)\r\n */\r\nexport type JSONSchema<Value = any, SchemaType = Value extends boolean ? \"boolean\" : Value extends null ? \"null\" : Value extends number ? \"number\" | \"integer\" : Value extends string ? \"string\" : Value extends unknown[] ? \"array\" : Value extends Record<string | number, unknown> ? \"object\" : JSONSchema.TypeValue> = boolean | {\r\n /**\r\n * Using JSON Pointer fragments requires knowledge of the structure of the\r\n * schema. When writing schema documents with the intention to provide\r\n * re-usable schemas, it may be preferable to use a plain name fragment\r\n * that is not tied to any particular structural location. This allows a\r\n * subschema to be relocated without requiring JSON Pointer references to\r\n * be updated.\r\n *\r\n * The `$anchor` keyword is used to specify such a fragment. It is an\r\n * identifier keyword that can only be used to create plain name fragments.\r\n *\r\n * If present, the value of this keyword MUST be a string, which MUST start\r\n * with a letter `[A-Za-z]`, followed by any number of letters, digits\r\n * `[0-9]`, hyphens `-`, underscores `_`, colons `:`,\r\n * or periods `.`.\r\n *\r\n * Note that the anchor string does not include the `#` character,\r\n * as it is not a URI-reference. An `{\"$anchor\": \"foo\"}` becomes the\r\n * fragment `#foo` when used in a URI.\r\n *\r\n * The base URI to which the resulting fragment is appended is determined\r\n * by the `$id` keyword as explained in the previous section.\r\n * Two `$anchor` keywords in the same schema document MAY have the same\r\n * value if they apply to different base URIs, as the resulting full URIs\r\n * will be distinct. However, the effect of two `$anchor` keywords\r\n * with the same value and the same base URI is undefined. Implementations\r\n * MAY raise an error if such usage is detected.\r\n */\r\n $anchor?: string;\r\n /**\r\n * This keyword reserves a location for comments from schema authors to\r\n * readers or maintainers of the schema.\r\n *\r\n * The value of this keyword MUST be a string. Implementations MUST NOT\r\n * present this string to end users. Tools for editing schemas SHOULD\r\n * support displaying and editing this keyword. The value of this keyword\r\n * MAY be used in debug or error output which is intended for developers\r\n * making use of schemas.\r\n *\r\n * Schema vocabularies SHOULD allow `$comment` within any object\r\n * containing vocabulary keywords. Implementations MAY assume `$comment`\r\n * is allowed unless the vocabulary specifically forbids it. Vocabularies\r\n * MUST NOT specify any effect of `$comment` beyond what is described in\r\n * this specification.\r\n *\r\n * Tools that translate other media types or programming languages\r\n * to and from `application/schema+json` MAY choose to convert that media\r\n * type or programming language's native comments to or from `$comment`\r\n * values. The behavior of such translation when both native comments and\r\n * `$comment` properties are present is implementation-dependent.\r\n *\r\n * Implementations MAY strip `$comment` values at any point during\r\n * processing. In particular, this allows for shortening schemas when the\r\n * size of deployed schemas is a concern.\r\n *\r\n * Implementations MUST NOT take any other action based on the presence,\r\n * absence, or contents of `$comment` properties. In particular, the\r\n * value of `$comment` MUST NOT be collected as an annotation result.\r\n */\r\n $comment?: string;\r\n /**\r\n * The `$defs` keyword reserves a location for schema authors to inline\r\n * re-usable JSON Schemas into a more general schema. The keyword does not\r\n * directly affect the validation result.\r\n *\r\n * This keyword's value MUST be an object. Each member value of this object\r\n * MUST be a valid JSON Schema.\r\n */\r\n $defs?: Record<string, JSONSchema>;\r\n /**\r\n * \"The `$dynamicAnchor` indicates that the fragment is an extension\r\n * point when used with the `$dynamicRef` keyword. This low-level,\r\n * advanced feature makes it easier to extend recursive schemas such as the\r\n * meta-schemas, without imposing any particular semantics on that\r\n * extension. See `$dynamicRef` for more details.\r\n */\r\n $dynamicAnchor?: string;\r\n /**\r\n * The `$dynamicRef` keyword is an applicator that allows for deferring\r\n * the full resolution until runtime, at which point it is resolved each\r\n * time it is encountered while evaluating an instance.\r\n *\r\n * Together with `$dynamicAnchor`, `$dynamicRef` implements a\r\n * cooperative extension mechanism that is primarily useful with recursive\r\n * schemas (schemas that reference themselves). Both the extension point\r\n * and the runtime-determined extension target are defined with\r\n * `$dynamicAnchor`, and only exhibit runtime dynamic behavior when\r\n * referenced with `$dynamicRef`.\r\n *\r\n * The value of the `$dynamicRef` property MUST be a string which is\r\n * a URI-Reference. Resolved against the current URI base, it produces\r\n * the URI used as the starting point for runtime resolution. This initial\r\n * resolution is safe to perform on schema load.\r\n *\r\n * If the initially resolved starting point URI includes a fragment that\r\n * was created by the `$dynamicAnchor` keyword, the initial URI MUST be\r\n * replaced by the URI (including the fragment) for the outermost schema\r\n * resource in the [dynamic scope][scopes] that defines\r\n * an identically named fragment with `$dynamicAnchor`.\r\n *\r\n * Otherwise, its behavior is identical to `$ref`, and no runtime\r\n * resolution is needed.\r\n *\r\n * [scopes]: https://json-schema.org/draft/2020-12/json-schema-core.html#scopes\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $dynamicRef?: string;\r\n /**\r\n * The `$id` keyword identifies a schema resource with its\r\n * [canonical][[RFC6596]] URI.\r\n *\r\n * Note that this URI is an identifier and not necessarily a network\r\n * locator. In the case of a network-addressable URL, a schema need not be\r\n * downloadable from its canonical URI.\r\n *\r\n * If present, the value for this keyword MUST be a string, and MUST\r\n * represent a valid [URI-reference][RFC3986]. This URI-reference SHOULD\r\n * be normalized, and MUST resolve to an [absolute-URI][RFC3986] (without a\r\n * fragment). Therefore, `$id` MUST NOT contain a non-empty fragment,\r\n * and SHOULD NOT contain an empty fragment.\r\n *\r\n * Since an empty fragment in the context of the\r\n * `application/schema+json` media type refers to the same resource as\r\n * the base URI without a fragment, an implementation MAY normalize a URI\r\n * ending with an empty fragment by removing the fragment. However, schema\r\n * authors SHOULD NOT rely on this behavior across implementations.\r\n *\r\n * This URI also serves as the base URI for relative URI-references in\r\n * keywords within the schema resource, in accordance with\r\n * [RFC 3986][RFC3986] section 5.1.1 regarding base URIs embedded in\r\n * content.\r\n *\r\n * The presence of `$id` in a subschema indicates that the subschema\r\n * constitutes a distinct schema resource within a single schema document.\r\n * Furthermore, in accordance with [RFC 3986][RFC3986] section 5.1.2\r\n * regarding encapsulating entities, if an `$id` in a subschema is a\r\n * relative URI-reference, the base URI for resolving that reference is the\r\n * URI of the parent schema resource.\r\n *\r\n * If no parent schema object explicitly identifies itself as a resource\r\n * with `$id`, the base URI is that of the entire document.\r\n *\r\n * The root schema of a JSON Schema document SHOULD contain an `$id`\r\n * keyword with an [absolute-URI][RFC3986] (containing a scheme, but no\r\n * fragment).\r\n *\r\n * [RFC6596]: https://datatracker.ietf.org/doc/html/rfc6596\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $id?: string;\r\n /**\r\n * The `$ref` keyword is an applicator that is used to reference a\r\n * statically identified schema. Its results are the results of the\r\n * referenced schema. Other keywords can appear alongside of `$ref` in\r\n * the same schema object.\r\n *\r\n * The value of the `$ref` property MUST be a string which is a\r\n * URI-Reference. Resolved against the current URI base, it produces the\r\n * URI of the schema to apply.\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $ref?: string;\r\n /**\r\n * The `$schema` keyword is both used as a JSON Schema dialect identifier\r\n * and as the identifier of a resource which is itself a JSON Schema, which\r\n * describes the set of valid schemas written for this particular dialect.\r\n *\r\n * The value of this keyword MUST be a [URI][RFC3986] (containing a scheme)\r\n * and this URI MUST be normalized. The current schema MUST be valid\r\n * against the meta-schema identified by this URI.\r\n *\r\n * If this URI identifies a retrievable resource, that resource SHOULD be\r\n * of media type `application/schema+json`.\r\n *\r\n * The `$schema` keyword SHOULD be used in the document root schema\r\n * object, and MAY be used in the root schema objects of embedded schema\r\n * resources. It MUST NOT appear in non-resource root schema objects. If\r\n * absent from the document root schema, the resulting behavior is\r\n * implementation-defined.\r\n *\r\n * Values for this property are defined elsewhere in this and other\r\n * documents, and by other parties.\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n *\r\n * @format \"uri\"\r\n */\r\n $schema?: string;\r\n /**\r\n * The `$vocabulary` keyword is used in meta-schemas to identify the\r\n * vocabularies available for use in schemas described by that meta-schema.\r\n * It is also used to indicate whether each vocabulary is required or\r\n * optional, in the sense that an implementation MUST understand the\r\n * required vocabularies in order to successfully process the schema.\r\n * Together, this information forms a dialect. Any vocabulary that is\r\n * understood by the implementation MUST be processed in a manner\r\n * consistent with the semantic definitions contained within the\r\n * vocabulary.\r\n *\r\n * The value of this keyword MUST be an object. The property names in the\r\n * object MUST be URIs (containing a scheme) and this URI MUST be\r\n * normalized. Each URI that appears as a property name identifies a\r\n * specific set of keywords and their semantics.\r\n *\r\n * The URI MAY be a URL, but the nature of the retrievable resource is\r\n * currently undefined, and reserved for future use. Vocabulary authors\r\n * MAY use the URL of the vocabulary specification, in a human-readable\r\n * media type such as `text/html` or `text/plain`, as the vocabulary\r\n * URI.\r\n *\r\n * The values of the object properties MUST be booleans. If the value is\r\n * `true`, then implementations that do not recognize the vocabulary MUST\r\n * refuse to process any schemas that declare this meta-schema with\r\n * `$schema`. If the value is `false`, implementations that do not\r\n * recognize the vocabulary SHOULD proceed with processing such schemas.\r\n * The value has no impact if the implementation understands the\r\n * vocabulary.\r\n *\r\n * Unrecognized keywords SHOULD be ignored. This remains the case for\r\n * keywords defined by unrecognized vocabularies. It is not currently\r\n * possible to distinguish between unrecognized keywords that are defined\r\n * in vocabularies from those that are not part of any vocabulary.\r\n *\r\n * The `$vocabulary` keyword SHOULD be used in the root schema of any\r\n * schema document intended for use as a meta-schema. It MUST NOT appear\r\n * in subschemas.\r\n *\r\n * The `$vocabulary` keyword MUST be ignored in schema documents that are\r\n * not being processed as a meta-schema.\r\n */\r\n $vocabulary?: Record<string, string>;\r\n /**\r\n * @deprecated `additionalItems` has been deprecated in favor of `prefixItems`\r\n * paired with `items`.\r\n */\r\n additionalItems?: JSONSchema;\r\n /**\r\n * The value of `additionalProperties` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the presence and annotation\r\n * results of `properties` and `patternProperties` within the same\r\n * schema object. Validation with `additionalProperties` applies only to\r\n * the child values of instance names that do not appear in the annotation\r\n * results of either `properties` or `patternProperties`.\r\n *\r\n * For all such properties, validation succeeds if the child instance\r\n * validates against the `additionalProperties` schema.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names validated by this keyword's subschema. Annotation results for\r\n * `additionalProperties` keywords from multiple schemas applied to the\r\n * same instance location are combined by taking the union of the sets.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * Implementations MAY choose to implement or optimize this keyword in\r\n * another way that produces the same effect, such as by directly checking\r\n * the names in `properties` and the patterns in `patternProperties`\r\n * against the instance property set.\r\n */\r\n additionalProperties?: JSONSchema;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against all schemas defined by this keyword's value.\r\n */\r\n allOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against at least one schema defined by this keyword's\r\n * value.\r\n */\r\n anyOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * An instance validates successfully against this keyword if its value is\r\n * equal to the value of the keyword.\r\n *\r\n * Use of this keyword is functionally equivalent to the `enum` keyword\r\n * with a single value.\r\n */\r\n const?: Value;\r\n /**\r\n * The value of this keyword MUST be a valid JSON Schema.\r\n *\r\n * An array instance is valid against `contains` if at least one of its\r\n * elements is valid against the given schema. The subschema MUST be\r\n * applied to every array element even after the first match has been\r\n * found, in order to collect annotations for use by other keywords.\r\n * This is to ensure that all possible annotations are collected.\r\n *\r\n * Logically, the validation result of applying the value subschema to each\r\n * item in the array MUST be OR'ed with `false`, resulting in an overall\r\n * validation result.\r\n *\r\n * This keyword produces an annotation value which is an array of the\r\n * indexes to which this keyword validates successfully when applying its\r\n * subschema, in ascending order. The value MAY be a boolean `true` if\r\n * the subschema validates successfully when applied to every index of the\r\n * instance. The annotation MUST be present if the instance array to which\r\n * this keyword's schema applies is empty.\r\n */\r\n contains?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * If the instance value is a string, this property defines that the\r\n * string SHOULD be interpreted as binary data and decoded using the\r\n * encoding named by this property. [RFC 2045, Sec 6.1][RFC2045] lists the\r\n * possible values for this property.\r\n *\r\n * The value of this property SHOULD be ignored if the instance described\r\n * is not a string.\r\n *\r\n * If this keyword is absent, but `contentMediaType` is present, this\r\n * indicates that the media type could be encoded into `UTF-8` like any\r\n * other JSON string value, and does not require additional decoding.\r\n *\r\n * The value of this property MUST be a string.\r\n *\r\n * [RFC2045]: https://datatracker.ietf.org/doc/html/rfc2045#section-6.1\r\n */\r\n contentEncoding?: \"7bit\" | \"8bit\" | \"base64\" | \"binary\" | \"ietf-token\" | \"quoted-printable\" | \"x-token\";\r\n /**\r\n * If the instance is a string, this property indicates the media type\r\n * of the contents of the string. If `contentEncoding` is present,\r\n * this property describes the decoded string.\r\n *\r\n * The value of this property must be a media type, as defined by\r\n * [RFC 2046][RFC2046]. This property defines the media type of instances\r\n * which this schema defines.\r\n *\r\n * The value of this property SHOULD be ignored if the instance described\r\n * is not a string.\r\n *\r\n * If the `contentEncoding` property is not present, but the instance\r\n * value is a string, then the value of this property SHOULD specify a text\r\n * document type, and the character set SHOULD be the character set into\r\n * which the JSON string value was decoded (for which the default is\r\n * Unicode).\r\n *\r\n * [RFC2046]: https://datatracker.ietf.org/doc/html/rfc2046\r\n */\r\n contentMediaType?: string;\r\n /**\r\n * If the instance is a string, and if `contentMediaType` is present,\r\n * this property contains a schema which describes the structure of the\r\n * string.\r\n *\r\n * This keyword MAY be used with any media type that can be mapped into\r\n * JSON Schema's data model.\r\n *\r\n * The value of this property MUST be a valid JSON schema. It SHOULD be\r\n * ignored if `contentMediaType` is not present.\r\n */\r\n contentSchema?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * This keyword can be used to supply a default JSON value associated with\r\n * a particular schema. It is RECOMMENDED that a `default` value be valid\r\n * against the associated schema.\r\n */\r\n default?: Value;\r\n /**\r\n * @deprecated `definitions` has been renamed to `$defs`.\r\n */\r\n definitions?: Record<string, JSONSchema>;\r\n /**\r\n * @deprecated `dependencies` has been split into two keywords:\r\n * `dependentSchemas` and `dependentRequired`.\r\n */\r\n dependencies?: Record<string, MaybeReadonlyArray<string> | JSONSchema>;\r\n /**\r\n * The value of this keyword MUST be an object. Properties in\r\n * this object, if any, MUST be arrays. Elements in each array,\r\n * if any, MUST be strings, and MUST be unique.\r\n *\r\n * This keyword specifies properties that are required if a specific\r\n * other property is present. Their requirement is dependent on the\r\n * presence of the other property.\r\n *\r\n * Validation succeeds if, for each name that appears in both\r\n * the instance and as a name within this keyword's value, every\r\n * item in the corresponding array is also the name of a property\r\n * in the instance.\r\n *\r\n * Omitting this keyword has the same behavior as an empty object.\r\n */\r\n dependentRequired?: Record<string, MaybeReadonlyArray<string>>;\r\n /**\r\n * This keyword specifies subschemas that are evaluated if the instance is\r\n * an object and contains a certain property.\r\n *\r\n * This keyword's value MUST be an object. Each value in the object MUST be\r\n * a valid JSON Schema.\r\n *\r\n * If the object key is a property in the instance, the entire instance\r\n * must validate against the subschema. Its use is dependent on the\r\n * presence of the property.\r\n *\r\n * Omitting this keyword has the same behavior as an empty object.\r\n */\r\n dependentSchemas?: Record<string, JSONSchema>;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword are applicable to a single sub-instance, applications\r\n * SHOULD consider the instance location to be deprecated if any occurrence\r\n * specifies a `true` value.\r\n *\r\n * If `deprecated` has a value of boolean `true`, it indicates that\r\n * applications SHOULD refrain from usage of the declared property. It MAY\r\n * mean the property is going to be removed in the future.\r\n *\r\n * A root schema containing `deprecated` with a value of `true`\r\n * indicates that the entire resource being described MAY be removed in the\r\n * future.\r\n *\r\n * The `deprecated` keyword applies to each instance location to which\r\n * the schema object containing the keyword successfully applies. This can\r\n * result in scenarios where every array item or object property is\r\n * deprecated even though the containing array or object is not.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `false`.\r\n */\r\n deprecated?: boolean;\r\n /**\r\n * Can be used to decorate a user interface with explanation or information\r\n * about the data produced.\r\n */\r\n description?: string;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * When `if` is present, and the instance fails to validate against its\r\n * subschema, then validation succeeds against this keyword if the instance\r\n * successfully validates against this keyword's subschema.\r\n *\r\n * This keyword has no effect when `if` is absent, or when the instance\r\n * successfully validates against its subschema. Implementations MUST NOT\r\n * evaluate the instance against this keyword, for either validation or\r\n * annotation collection purposes, in such cases.\r\n */\r\n else?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * The value of this keyword MUST be an array. This array SHOULD have at\r\n * least one element. Elements in the array SHOULD be unique.\r\n *\r\n * An instance validates successfully against this keyword if its value is\r\n * equal to one of the elements in this keyword's array value.\r\n *\r\n * Elements in the array might be of any type, including `null`.\r\n */\r\n enum?: MaybeReadonlyArray<Value>;\r\n /**\r\n * The value of this keyword MUST be an array. When multiple occurrences of\r\n * this keyword are applicable to a single sub-instance, implementations\r\n * MUST provide a flat array of all values rather than an array of arrays.\r\n *\r\n * This keyword can be used to provide sample JSON values associated with a\r\n * particular schema, for the purpose of illustrating usage. It is\r\n * RECOMMENDED that these values be valid against the associated schema.\r\n *\r\n * Implementations MAY use the value(s) of `default`, if present, as an\r\n * additional example. If `examples` is absent, `default` MAY still be\r\n * used in this manner.\r\n */\r\n examples?: MaybeReadonlyArray<Value>;\r\n /**\r\n * The value of `exclusiveMaximum` MUST be a number, representing an\r\n * exclusive upper limit for a numeric instance.\r\n *\r\n * If the instance is a number, then the instance is valid only if it has a\r\n * value strictly less than (not equal to) `exclusiveMaximum`.\r\n */\r\n exclusiveMaximum?: number;\r\n /**\r\n * The value of `exclusiveMinimum` MUST be a number, representing an\r\n * exclusive lower limit for a numeric instance.\r\n *\r\n * If the instance is a number, then the instance is valid only if it has a\r\n * value strictly greater than (not equal to) `exclusiveMinimum`.\r\n */\r\n exclusiveMinimum?: number;\r\n /**\r\n * Implementations MAY treat `format` as an assertion in addition to an\r\n * annotation, and attempt to validate the value's conformance to the\r\n * specified semantics.\r\n *\r\n * The value of this keyword is called a format attribute. It MUST be a\r\n * string. A format attribute can generally only validate a given set\r\n * of instance types. If the type of the instance to validate is not in\r\n * this set, validation for this format attribute and instance SHOULD\r\n * succeed. Format attributes are most often applied to strings, but can\r\n * be specified to apply to any type.\r\n *\r\n * Implementations MAY support custom format attributes. Save for agreement\r\n * between parties, schema authors SHALL NOT expect a peer implementation\r\n * to support such custom format attributes. An implementation MUST NOT\r\n * fail validation or cease processing due to an unknown format attribute.\r\n * When treating `format` as an annotation, implementations SHOULD\r\n * collect both known and unknown format attribute values.\r\n */\r\n format?: string;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * This validation outcome of this keyword's subschema has no direct effect\r\n * on the overall validation result. Rather, it controls which of the\r\n * `then` or `else` keywords are evaluated.\r\n *\r\n * Instances that successfully validate against this keyword's subschema\r\n * MUST also be valid against the subschema value of the `then` keyword,\r\n * if present.\r\n *\r\n * Instances that fail to validate against this keyword's subschema MUST\r\n * also be valid against the subschema value of the `else` keyword, if\r\n * present.\r\n *\r\n * If annotations are being collected, they are collected\r\n * from this keyword's subschema in the usual way, including when the\r\n * keyword is present without either `then` or `else`.\r\n */\r\n if?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * The value of `items` MUST be a valid JSON Schema.\r\n *\r\n * This keyword applies its subschema to all instance elements at indexes\r\n * greater than the length of the `prefixItems` array in the same schema\r\n * object, as reported by the annotation result of that `prefixItems`\r\n * keyword. If no such annotation result exists, `items` applies its\r\n * subschema to all instance array elements.\r\n *\r\n * Note that the behavior of `items` without `prefixItems` is identical\r\n * to that of the schema form of `items` in prior drafts.\r\n *\r\n * When `prefixItems` is present, the behavior of `items` is identical\r\n * to the former `additionalItems` keyword.\r\n *\r\n * If the `items` subschema is applied to any positions within the\r\n * instance array, it produces an annotation result of boolean `true`,\r\n * indicating that all remaining array elements have been evaluated against\r\n * this keyword's subschema.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * Implementations MAY choose to implement or optimize this keyword\r\n * in another way that produces the same effect, such as by directly\r\n * checking for the presence and size of a `prefixItems` array.\r\n */\r\n items?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * If `contains` is not present within the same schema object, then this\r\n * keyword has no effect.\r\n *\r\n * An instance array is valid against `maxContains` in two ways,\r\n * depending on the form of the annotation result of an adjacent\r\n * `contains` keyword. The first way is if the annotation result is an\r\n * array and the length of that array is less than or equal to the\r\n * `maxContains` value. The second way is if the annotation result is a\r\n * boolean `true` and the instance array length is less than or equal to\r\n * the `maxContains` value.\r\n */\r\n maxContains?: number;\r\n /**\r\n * The value of `maximum` MUST be a number, representing an inclusive\r\n * upper limit for a numeric instance.\r\n *\r\n * If the instance is a number, then this keyword validates only if the\r\n * instance is less than or exactly equal to `maximum`.\r\n */\r\n maximum?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An array instance is valid against `maxItems` if its size is less\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * @minimum 0\r\n */\r\n maxItems?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * A string instance is valid against this keyword if its length is less\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * The length of a string instance is defined as the number of its\r\n * characters as defined by [RFC 8259][RFC8259].\r\n *\r\n * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259\r\n *\r\n * @minimum 0\r\n */\r\n maxLength?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An object instance is valid against `maxProperties` if its number of\r\n * `properties` is less than, or equal to, the value of this keyword.\r\n *\r\n * @minimum 0\r\n */\r\n maxProperties?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * If `contains` is not present within the same schema object, then this\r\n * keyword has no effect.\r\n *\r\n * An instance array is valid against `minContains` in two ways,\r\n * depending on the form of the annotation result of an adjacent\r\n * `contains` keyword. The first way is if the annotation result is an\r\n * array and the length of that array is greater than or equal to the\r\n * `minContains` value. The second way is if the annotation result is a\r\n * boolean `true` and the instance array length is greater than or equal\r\n * to the `minContains` value.\r\n *\r\n * A value of `0` is allowed, but is only useful for setting a range\r\n * of occurrences from `0` to the value of `maxContains`. A value of\r\n * `0` with no `maxContains` causes `contains` to always pass\r\n * validation.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `1`.\r\n *\r\n * @default 1\r\n */\r\n minContains?: number;\r\n /**\r\n * The value of `minimum` MUST be a number, representing an inclusive\r\n * lower limit for a numeric instance.\r\n *\r\n * If the instance is a number, then this keyword validates only if the\r\n * instance is greater than or exactly equal to `minimum`.\r\n */\r\n minimum?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An array instance is valid against `minItems` if its size is greater\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minItems?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * A string instance is valid against this keyword if its length is greater\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * The length of a string instance is defined as the number of its\r\n * characters as defined by [RFC 8259][RFC8259].\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minLength?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An object instance is valid against `minProperties` if its number of\r\n * `properties` is greater than, or equal to, the value of this keyword.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minProperties?: number;\r\n /**\r\n * The value of `multipleOf` MUST be a number, strictly greater than\r\n * `0`.\r\n *\r\n * A numeric instance is valid only if division by this keyword's value\r\n * results in an integer.\r\n *\r\n * @exclusiveMinimum 0\r\n */\r\n multipleOf?: number;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * An instance is valid against this keyword if it fails to validate\r\n * successfully against the schema defined by this keyword.\r\n */\r\n not?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against exactly one schema defined by this keyword's value.\r\n */\r\n oneOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * The value of this keyword MUST be a string. This string SHOULD be a\r\n * valid regular expression, according to the [ECMA-262][ecma262] regular\r\n * expression dialect.\r\n *\r\n * A string instance is considered valid if the regular expression matches\r\n * the instance successfully. Recall: regular expressions are not\r\n * implicitly anchored.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n *\r\n * @format \"regex\"\r\n */\r\n pattern?: string;\r\n /**\r\n * The value of `patternProperties` MUST be an object. Each property name\r\n * of this object SHOULD be a valid regular expression, according to the\r\n * [ECMA-262][ecma262] regular expression dialect. Each property value of\r\n * this object MUST be a valid JSON Schema.\r\n *\r\n * Validation succeeds if, for each instance name that matches any regular\r\n * expressions that appear as a property name in this keyword's value,\r\n * the child instance for that name successfully validates against each\r\n * schema that corresponds to a matching regular expression.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names matched by this keyword. Omitting this keyword has the same\r\n * assertion behavior as an empty object.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n */\r\n patternProperties?: Record<string, JSONSchema>;\r\n /**\r\n * The value of `prefixItems` MUST be a non-empty array of valid JSON\r\n * Schemas.\r\n *\r\n * Validation succeeds if each element of the instance validates against\r\n * the schema at the same position, if any. This keyword does not\r\n * constrain the length of the array. If the array is longer than this\r\n * keyword's value, this keyword validates only the prefix of matching\r\n * length.\r\n *\r\n * This keyword produces an annotation value which is the largest index to\r\n * which this keyword applied a subschema. The value MAY be a boolean\r\n * `true` if a subschema was applied to every index of the instance, such\r\n * as is produced by the `items` keyword.\r\n * This annotation affects the behavior of `items` and\r\n * `unevaluatedItems`.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty array.\r\n */\r\n prefixItems?: MaybeReadonlyArray<JSONSchema> | JSONSchema;\r\n /**\r\n * The value of `properties` MUST be an object. Each value of this object\r\n * MUST be a valid JSON Schema.\r\n *\r\n * Validation succeeds if, for each name that appears in both the instance\r\n * and as a name within this keyword's value, the child instance for that\r\n * name successfully validates against the corresponding schema.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names matched by this keyword.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * object.\r\n */\r\n properties?: Record<string, JSONSchema>;\r\n /**\r\n * The value of `propertyNames` MUST be a valid JSON Schema.\r\n *\r\n * If the instance is an object, this keyword validates if every property\r\n * name in the instance validates against the provided schema.\r\n * Note the property name that the schema is testing will always be a\r\n * string.\r\n *\r\n * Omitting this keyword has the same behavior as an empty schema.\r\n */\r\n propertyNames?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword are applicable to a single sub-instance, the resulting\r\n * value MUST be `true` if any occurrence specifies a `true` value, and\r\n * MUST be `false` otherwise.\r\n *\r\n * If `readOnly` has a value of boolean `true`, it indicates that the\r\n * value of the instance is managed exclusively by the owning authority,\r\n * and attempts by an application to modify the value of this property are\r\n * expected to be ignored or rejected by that owning authority.\r\n *\r\n * An instance document that is marked as `readOnly` for the entire\r\n * document MAY be ignored if sent to the owning authority, or MAY result\r\n * in an error, at the authority's discretion.\r\n *\r\n * For example, `readOnly` would be used to mark a database-generated\r\n * serial number as read-only.\r\n *\r\n * This keyword can be used to assist in user interface instance\r\n * generation.\r\n *\r\n * @default false\r\n */\r\n readOnly?: boolean;\r\n /**\r\n * The value of this keyword MUST be an array. Elements of this array, if\r\n * any, MUST be strings, and MUST be unique.\r\n *\r\n * An object instance is valid against this keyword if every item in the\r\n * array is the name of a property in the instance.\r\n *\r\n * Omitting this keyword has the same behavior as an empty array.\r\n */\r\n required?: MaybeReadonlyArray<string>;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * When `if` is present, and the instance successfully validates against\r\n * its subschema, then validation succeeds against this keyword if the\r\n * instance also successfully validates against this keyword's subschema.\r\n *\r\n * This keyword has no effect when `if` is absent, or when the instance\r\n * fails to validate against its subschema. Implementations MUST NOT\r\n * evaluate the instance against this keyword, for either validation or\r\n * annotation collection purposes, in such cases.\r\n */\r\n then?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * Can be used to decorate a user interface with a short label about the\r\n * data produced.\r\n */\r\n title?: string;\r\n /**\r\n * The value of this keyword MUST be either a string or an array. If it is\r\n * an array, elements of the array MUST be strings and MUST be unique.\r\n *\r\n * String values MUST be one of the six primitive types (`\"null\"`,\r\n * `\"boolean\"`, `\"object\"`, `\"array\"`, `\"number\"`, or\r\n * `\"string\"`), or `\"integer\"` which matches any number with a zero\r\n * fractional part.\r\n *\r\n * An instance validates if and only if the instance is in any of the sets\r\n * listed for this keyword.\r\n */\r\n type?: SchemaType;\r\n /**\r\n * The value of `unevaluatedItems` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the annotation results of\r\n * adjacent keywords that apply to the instance location being validated.\r\n * Specifically, the annotations from `prefixItems`, `items`, and\r\n * `contains`, which can come from those keywords when they are adjacent\r\n * to the `unevaluatedItems` keyword. Those three annotations, as well as\r\n * `unevaluatedItems`, can also result from any and all adjacent\r\n * [in-place applicator][in-place-applicator] keywords.\r\n *\r\n * If no relevant annotations are present, the `unevaluatedItems`\r\n * subschema MUST be applied to all locations in the array.\r\n * If a boolean `true` value is present from any of the relevant\r\n * annotations, `unevaluatedItems` MUST be ignored. Otherwise, the\r\n * subschema MUST be applied to any index greater than the largest\r\n * annotation value for `prefixItems`, which does not appear in any\r\n * annotation value for `contains`.\r\n *\r\n * This means that `prefixItems`, `items`, `contains`, and all\r\n * in-place applicators MUST be evaluated before this keyword can be\r\n * evaluated. Authors of extension keywords MUST NOT define an in-place\r\n * applicator that would need to be evaluated after this keyword.\r\n *\r\n * If the `unevaluatedItems` subschema is applied to any positions within\r\n * the instance array, it produces an annotation result of boolean\r\n * `true`, analogous to the behavior of `items`.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place\r\n */\r\n unevaluatedItems?: JSONSchema;\r\n /**\r\n * The value of `unevaluatedProperties` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the annotation results of\r\n * adjacent keywords that apply to the instance location being validated.\r\n * Specifically, the annotations from `properties`,\r\n * `patternProperties`, and `additionalProperties`, which can come from\r\n * those keywords when they are adjacent to the `unevaluatedProperties`\r\n * keyword. Those three annotations, as well as `unevaluatedProperties`,\r\n * can also result from any and all adjacent\r\n * [in-place applicator][in-place-applicator] keywords.\r\n *\r\n * Validation with `unevaluatedProperties` applies only to the child\r\n * values of instance names that do not appear in the `properties`,\r\n * `patternProperties`, `additionalProperties`, or\r\n * `unevaluatedProperties` annotation results that apply to the\r\n * instance location being validated.\r\n *\r\n * For all such properties, validation succeeds if the child instance\r\n * validates against the \"unevaluatedProperties\" schema.\r\n *\r\n * This means that `properties`, `patternProperties`,\r\n * `additionalProperties`, and all in-place applicators MUST be evaluated\r\n * before this keyword can be evaluated. Authors of extension keywords\r\n * MUST NOT define an in-place applicator that would need to be evaluated\r\n * after this keyword.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names validated by this keyword's subschema.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place\r\n */\r\n unevaluatedProperties?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a boolean.\r\n *\r\n * If this keyword has boolean value `false`, the instance validates\r\n * successfully. If it has boolean value `true`, the instance validates\r\n * successfully if all of its elements are unique.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `false`.\r\n *\r\n * @default false\r\n */\r\n uniqueItems?: boolean;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword is applicable to a single sub-instance, the resulting\r\n * value MUST be `true` if any occurrence specifies a `true` value, and\r\n * MUST be `false` otherwise.\r\n *\r\n * If `writeOnly` has a value of boolean `true`, it indicates that the\r\n * value is never present when the instance is retrieved from the owning\r\n * authority. It can be present when sent to the owning authority to update\r\n * or create the document (or the resource it represents), but it will not\r\n * be included in any updated or newly created version of the instance.\r\n *\r\n * An instance document that is marked as `writeOnly` for the entire\r\n * document MAY be returned as a blank document of some sort, or MAY\r\n * produce an error upon retrieval, or have the retrieval request ignored,\r\n * at the authority's discretion.\r\n *\r\n * For example, `writeOnly` would be used to mark a password input field.\r\n *\r\n * These keywords can be used to assist in user interface instance\r\n * generation. In particular, an application MAY choose to use a widget\r\n * that hides input values as they are typed for write-only fields.\r\n *\r\n * @default false\r\n */\r\n writeOnly?: boolean;\r\n};\r\nexport declare namespace JSONSchema {\r\n type TypeValue = ValueOf<TypeName> | TypeName | Array<ValueOf<TypeName> | TypeName> | ReadonlyArray<ValueOf<TypeName> | TypeName>;\r\n /**\r\n * JSON Schema interface\r\n */\r\n type Interface<Value = any, SchemaType extends TypeValue = TypeValue> = Exclude<JSONSchema<Value, SchemaType>, boolean>;\r\n type Array<T = any> = Pick<Interface<T, \"array\">, KeywordByType.Any | KeywordByType.Array>;\r\n type Boolean = Pick<Interface<boolean, \"boolean\">, KeywordByType.Any>;\r\n type Integer = Pick<Interface<number, \"integer\">, KeywordByType.Any | KeywordByType.Number>;\r\n type Number = Pick<Interface<number, \"number\">, KeywordByType.Any | KeywordByType.Number>;\r\n type Null = Pick<Interface<null, \"null\">, KeywordByType.Any>;\r\n type Object<T = any> = Pick<Interface<T, \"object\">, KeywordByType.Any | KeywordByType.Object>;\r\n type String = Pick<Interface<string, \"string\">, KeywordByType.Any | KeywordByType.String>;\r\n}\r\ndeclare namespace KeywordByType {\r\n type Any = \"$anchor\" | \"$comment\" | \"$defs\" | \"$dynamicAnchor\" | \"$dynamicRef\" | \"$id\" | \"$ref\" | \"$schema\" | \"$vocabulary\" | \"allOf\" | \"anyOf\" | \"const\" | \"default\" | \"definitions\" | \"deprecated\" | \"description\" | \"else\" | \"enum\" | \"examples\" | \"format\" | \"if\" | \"not\" | \"oneOf\" | \"readOnly\" | \"then\" | \"title\" | \"type\" | \"writeOnly\";\r\n type Array = \"additionalItems\" | \"contains\" | \"items\" | \"maxContains\" | \"maxItems\" | \"minContains\" | \"minItems\" | \"prefixItems\" | \"unevaluatedItems\" | \"uniqueItems\";\r\n type Number = \"exclusiveMaximum\" | \"exclusiveMinimum\" | \"maximum\" | \"minimum\" | \"multipleOf\";\r\n type Object = \"additionalProperties\" | \"dependencies\" | \"dependentRequired\" | \"dependentSchemas\" | \"maxProperties\" | \"minProperties\" | \"patternProperties\" | \"properties\" | \"propertyNames\" | \"required\" | \"unevaluatedProperties\";\r\n type String = \"contentEncoding\" | \"contentMediaType\" | \"contentSchema\" | \"maxLength\" | \"minLength\" | \"pattern\";\r\n}\r\n/**\r\n * Content encoding strategy enum.\r\n *\r\n * - [Content-Transfer-Encoding Syntax](https://datatracker.ietf.org/doc/html/rfc2045#section-6.1)\r\n * - [7bit vs 8bit encoding](https://stackoverflow.com/questions/25710599/content-transfer-encoding-7bit-or-8-bit/28531705#28531705)\r\n */\r\nexport declare enum ContentEncoding {\r\n /**\r\n * Only US-ASCII characters, which use the lower 7 bits for each character.\r\n *\r\n * Each line must be less than 1,000 characters.\r\n */\r\n \"7bit\" = \"7bit\",\r\n /**\r\n * Allow extended ASCII characters which can use the 8th (highest) bit to\r\n * indicate special characters not available in 7bit.\r\n *\r\n * Each line must be less than 1,000 characters.\r\n */\r\n \"8bit\" = \"8bit\",\r\n /**\r\n * Useful for data that is mostly non-text.\r\n */\r\n Base64 = \"base64\",\r\n /**\r\n * Same character set as 8bit, with no line length restriction.\r\n */\r\n Binary = \"binary\",\r\n /**\r\n * An extension token defined by a standards-track RFC and registered with\r\n * IANA.\r\n */\r\n IETFToken = \"ietf-token\",\r\n /**\r\n * Lines are limited to 76 characters, and line breaks are represented using\r\n * special characters that are escaped.\r\n */\r\n QuotedPrintable = \"quoted-printable\",\r\n /**\r\n * The two characters \"X-\" or \"x-\" followed, with no intervening white space,\r\n * by any token.\r\n */\r\n XToken = \"x-token\"\r\n}\r\n/**\r\n * This enum provides well-known formats that apply to strings.\r\n */\r\nexport declare enum Format {\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"full-date\" production in\r\n * [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n Date = \"date\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"date-time\" production in\r\n * [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n DateTime = \"date-time\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"duration\" production.\r\n */\r\n Duration = \"duration\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid Internet\r\n * email address as defined by by the \"Mailbox\" ABNF rule in [RFC\r\n * 5321][RFC5322], section 4.1.2.\r\n *\r\n * [RFC5321]: https://datatracker.ietf.org/doc/html/rfc5321\r\n */\r\n Email = \"email\",\r\n /**\r\n * As defined by [RFC 1123, section 2.1][RFC1123], including host names\r\n * produced using the Punycode algorithm specified in\r\n * [RFC 5891, section 4.4][RFC5891].\r\n *\r\n * [RFC1123]: https://datatracker.ietf.org/doc/html/rfc1123\r\n * [RFC5891]: https://datatracker.ietf.org/doc/html/rfc5891\r\n */\r\n Hostname = \"hostname\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid Internet\r\n * email address as defined by the extended \"Mailbox\" ABNF rule in\r\n * [RFC 6531][RFC6531], section 3.3.\r\n *\r\n * [RFC6531]: https://datatracker.ietf.org/doc/html/rfc6531\r\n */\r\n IDNEmail = \"idn-email\",\r\n /**\r\n * As defined by either [RFC 1123, section 2.1][RFC1123] as for hostname, or\r\n * an internationalized hostname as defined by\r\n * [RFC 5890, section 2.3.2.3][RFC5890].\r\n *\r\n * [RFC1123]: https://datatracker.ietf.org/doc/html/rfc1123\r\n * [RFC5890]: https://datatracker.ietf.org/doc/html/rfc5890\r\n */\r\n IDNHostname = \"idn-hostname\",\r\n /**\r\n * An IPv4 address according to the \"dotted-quad\" ABNF syntax as defined in\r\n * [RFC 2673, section 3.2][RFC2673].\r\n *\r\n * [RFC2673]: https://datatracker.ietf.org/doc/html/rfc2673\r\n */\r\n IPv4 = \"ipv4\",\r\n /**\r\n * An IPv6 address as defined in [RFC 4291, section 2.2][RFC4291].\r\n *\r\n * [RFC4291]: https://datatracker.ietf.org/doc/html/rfc4291\r\n */\r\n IPv6 = \"ipv6\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid IRI,\r\n * according to [RFC 3987][RFC3987].\r\n *\r\n * [RFC3987]: https://datatracker.ietf.org/doc/html/rfc3987\r\n */\r\n IRI = \"iri\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid IRI\r\n * Reference (either an IRI or a relative-reference), according to\r\n * [RFC 3987][RFC3987].\r\n *\r\n * [RFC3987]: https://datatracker.ietf.org/doc/html/rfc3987\r\n */\r\n IRIReference = \"iri-reference\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid JSON\r\n * string representation of a JSON Pointer, according to\r\n * [RFC 6901, section 5][RFC6901].\r\n *\r\n * [RFC6901]: https://datatracker.ietf.org/doc/html/rfc6901\r\n */\r\n JSONPointer = \"json-pointer\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid JSON\r\n * string representation of a JSON Pointer fragment, according to\r\n * [RFC 6901, section 5][RFC6901].\r\n *\r\n * [RFC6901]: https://datatracker.ietf.org/doc/html/rfc6901\r\n */\r\n JSONPointerURIFragment = \"json-pointer-uri-fragment\",\r\n /**\r\n * This attribute applies to string instances.\r\n *\r\n * A regular expression, which SHOULD be valid according to the\r\n * [ECMA-262][ecma262] regular expression dialect.\r\n *\r\n * Implementations that validate formats MUST accept at least the subset of\r\n * [ECMA-262][ecma262] defined in the [Regular Expressions][regexInterop]\r\n * section of this specification, and SHOULD accept all valid\r\n * [ECMA-262][ecma262] expressions.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n * [regexInterop]: https://json-schema.org/draft/2020-12/json-schema-validation.html#regexInterop\r\n */\r\n RegEx = \"regex\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * [Relative JSON Pointer][relative-json-pointer].\r\n *\r\n * [relative-json-pointer]: https://datatracker.ietf.org/doc/html/draft-handrews-relative-json-pointer-01\r\n */\r\n RelativeJSONPointer = \"relative-json-pointer\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"time\" production in [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n Time = \"time\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI,\r\n * according to [RFC3986][RFC3986].\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n */\r\n URI = \"uri\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI\r\n * Reference (either a URI or a relative-reference), according to\r\n * [RFC3986][RFC3986].\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n */\r\n URIReference = \"uri-reference\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI\r\n * Template (of any level), according to [RFC 6570][RFC6570].\r\n *\r\n * Note that URI Templates may be used for IRIs; there is no separate IRI\r\n * Template specification.\r\n *\r\n * [RFC6570]: https://datatracker.ietf.org/doc/html/rfc6570\r\n */\r\n URITemplate = \"uri-template\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid string\r\n * representation of a UUID, according to [RFC 4122][RFC4122].\r\n *\r\n * [RFC4122]: https://datatracker.ietf.org/doc/html/rfc4122\r\n */\r\n UUID = \"uuid\"\r\n}\r\n/**\r\n * Enum consisting of simple type names for the `type` keyword\r\n */\r\nexport declare enum TypeName {\r\n /**\r\n * Value MUST be an array.\r\n */\r\n Array = \"array\",\r\n /**\r\n * Value MUST be a boolean.\r\n */\r\n Boolean = \"boolean\",\r\n /**\r\n * Value MUST be an integer, no floating point numbers are allowed. This is a\r\n * subset of the number type.\r\n */\r\n Integer = \"integer\",\r\n /**\r\n * Value MUST be null. Note this is mainly for purpose of being able use union\r\n * types to define nullability. If this type is not included in a union, null\r\n * values are not allowed (the primitives listed above do not allow nulls on\r\n * their own).\r\n */\r\n Null = \"null\",\r\n /**\r\n * Value MUST be a number, floating point numbers are allowed.\r\n */\r\n Number = \"number\",\r\n /**\r\n * Value MUST be an object.\r\n */\r\n Object = \"object\",\r\n /**\r\n * Value MUST be a string.\r\n */\r\n String = \"string\"\r\n}\r\nexport declare const keywords: readonly [\"$anchor\", \"$comment\", \"$defs\", \"$dynamicAnchor\", \"$dynamicRef\", \"$id\", \"$ref\", \"$schema\", \"$vocabulary\", \"additionalItems\", \"additionalProperties\", \"allOf\", \"anyOf\", \"const\", \"contains\", \"contentEncoding\", \"contentMediaType\", \"contentSchema\", \"default\", \"definitions\", \"dependencies\", \"dependentRequired\", \"dependentSchemas\", \"deprecated\", \"description\", \"else\", \"enum\", \"examples\", \"exclusiveMaximum\", \"exclusiveMinimum\", \"format\", \"if\", \"items\", \"maxContains\", \"maximum\", \"maxItems\", \"maxLength\", \"maxProperties\", \"minContains\", \"minimum\", \"minItems\", \"minLength\", \"minProperties\", \"multipleOf\", \"not\", \"oneOf\", \"pattern\", \"patternProperties\", \"prefixItems\", \"properties\", \"propertyNames\", \"readOnly\", \"required\", \"then\", \"title\", \"type\", \"unevaluatedItems\", \"unevaluatedProperties\", \"uniqueItems\", \"writeOnly\"];\r\nexport {};\r\n"],"x_google_ignoreList":[0],"mappings":";;KAEKE,kBAA8BC,CAAAA,CAAAA,CAAAA,GAANC,KAAMD,CAAAA,CAAAA,CAAAA,GAAKE,aAALF,CAAmBA,CAAnBA,CAAAA;KAC9BG,OADwBF,CAAAA,CAAAA,CAAAA,GACXD,CADWC,CAAAA,MACHD,CADGC,CAAAA;;;;AACxBE,KAIOC,UAJAJ,CAAAA,QAAcA,GAAC,EAAA,cAIsBK,KAJtB,SAAA,OAAA,GAAA,SAAA,GAI0DA,KAJ1D,SAAA,IAAA,GAAA,MAAA,GAIwFA,KAJxF,SAAA,MAAA,GAAA,QAAA,GAAA,SAAA,GAIsIA,KAJtI,SAAA,MAAA,GAAA,QAAA,GAIwKA,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AAcC,MAAMD,aAAAA,CAAcG;cACtED,KAAKH,yBAAyBC,aAAAA,CAAcC;yBACjCC,KAAKH,UAAUX,cAAcY,aAAAA,CAAcC,MAAMD,aAAAA,CAAcI;gBACxEF,KAAKH,6BAA6BC,aAAAA,CAAcC,MAAMD,aAAAA,CAAcK;;kBAEpEL,aAAAA;;;;;;;;;;;;;;;;;aA2NEH,QAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAlrCyD;;;;;;AACxB;AAKrD;;;AAAmHJ,KCMvG,cAAA,GAAiB,UAAA,CAAW,SDN2EA;;;;AAAkIE,KCWzO,yBDXyOA,CAAAA,CAAAA,CAAAA,GAAAA;EAA8CH,KAAAA,EAAAA,IAAWI;EAqEnRJ,IAAAA,ECzDA,CDyDAA;EAAfG,YAAAA,EAAAA,SAAAA;CAsKMA,GAAAA;EAKIH,KAAAA,EAAAA,KAAAA;EA0BKA,IAAAA,EAAAA,SAAAA;EAQeC,YAAAA,EAAAA,MAAAA;CAAOC;;;;AASAA,KCzQrC,mBDyQqCA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,KAAAA,EAAAA,OAAAA,EAAAA,GCzQQ,yBDyQRA,CCzQkC,CDyQlCA,CAAAA;;;;;;;;;;;;;;;;;;;;;;;;AAgLtCP,UChaM,mBAAA,CDgaNA;EAcuBM;;;;;;EAqObA,YAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,EC5oBO,cD4oBPA,CAAAA,EC5oBwB,mBD4oBxBA,CC5oB4C,CD4oB5CA,CAAAA"} |
| //#region ../../node_modules/.pnpm/json-schema-typed@8.0.2/node_modules/json-schema-typed/draft_2020_12.d.ts | ||
| type MaybeReadonlyArray<T> = Array<T> | ReadonlyArray<T>; | ||
| type ValueOf<T> = T[keyof T]; | ||
| /** | ||
| * JSON Schema [Draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-validation.html) | ||
| */ | ||
| type JSONSchema<Value = any, SchemaType = (Value extends boolean ? "boolean" : Value extends null ? "null" : Value extends number ? "number" | "integer" : Value extends string ? "string" : Value extends unknown[] ? "array" : Value extends Record<string | number, unknown> ? "object" : JSONSchema.TypeValue)> = boolean | { | ||
| /** | ||
| * Using JSON Pointer fragments requires knowledge of the structure of the | ||
| * schema. When writing schema documents with the intention to provide | ||
| * re-usable schemas, it may be preferable to use a plain name fragment | ||
| * that is not tied to any particular structural location. This allows a | ||
| * subschema to be relocated without requiring JSON Pointer references to | ||
| * be updated. | ||
| * | ||
| * The `$anchor` keyword is used to specify such a fragment. It is an | ||
| * identifier keyword that can only be used to create plain name fragments. | ||
| * | ||
| * If present, the value of this keyword MUST be a string, which MUST start | ||
| * with a letter `[A-Za-z]`, followed by any number of letters, digits | ||
| * `[0-9]`, hyphens `-`, underscores `_`, colons `:`, | ||
| * or periods `.`. | ||
| * | ||
| * Note that the anchor string does not include the `#` character, | ||
| * as it is not a URI-reference. An `{"$anchor": "foo"}` becomes the | ||
| * fragment `#foo` when used in a URI. | ||
| * | ||
| * The base URI to which the resulting fragment is appended is determined | ||
| * by the `$id` keyword as explained in the previous section. | ||
| * Two `$anchor` keywords in the same schema document MAY have the same | ||
| * value if they apply to different base URIs, as the resulting full URIs | ||
| * will be distinct. However, the effect of two `$anchor` keywords | ||
| * with the same value and the same base URI is undefined. Implementations | ||
| * MAY raise an error if such usage is detected. | ||
| */ | ||
| $anchor?: string; | ||
| /** | ||
| * This keyword reserves a location for comments from schema authors to | ||
| * readers or maintainers of the schema. | ||
| * | ||
| * The value of this keyword MUST be a string. Implementations MUST NOT | ||
| * present this string to end users. Tools for editing schemas SHOULD | ||
| * support displaying and editing this keyword. The value of this keyword | ||
| * MAY be used in debug or error output which is intended for developers | ||
| * making use of schemas. | ||
| * | ||
| * Schema vocabularies SHOULD allow `$comment` within any object | ||
| * containing vocabulary keywords. Implementations MAY assume `$comment` | ||
| * is allowed unless the vocabulary specifically forbids it. Vocabularies | ||
| * MUST NOT specify any effect of `$comment` beyond what is described in | ||
| * this specification. | ||
| * | ||
| * Tools that translate other media types or programming languages | ||
| * to and from `application/schema+json` MAY choose to convert that media | ||
| * type or programming language's native comments to or from `$comment` | ||
| * values. The behavior of such translation when both native comments and | ||
| * `$comment` properties are present is implementation-dependent. | ||
| * | ||
| * Implementations MAY strip `$comment` values at any point during | ||
| * processing. In particular, this allows for shortening schemas when the | ||
| * size of deployed schemas is a concern. | ||
| * | ||
| * Implementations MUST NOT take any other action based on the presence, | ||
| * absence, or contents of `$comment` properties. In particular, the | ||
| * value of `$comment` MUST NOT be collected as an annotation result. | ||
| */ | ||
| $comment?: string; | ||
| /** | ||
| * The `$defs` keyword reserves a location for schema authors to inline | ||
| * re-usable JSON Schemas into a more general schema. The keyword does not | ||
| * directly affect the validation result. | ||
| * | ||
| * This keyword's value MUST be an object. Each member value of this object | ||
| * MUST be a valid JSON Schema. | ||
| */ | ||
| $defs?: Record<string, JSONSchema>; | ||
| /** | ||
| * "The `$dynamicAnchor` indicates that the fragment is an extension | ||
| * point when used with the `$dynamicRef` keyword. This low-level, | ||
| * advanced feature makes it easier to extend recursive schemas such as the | ||
| * meta-schemas, without imposing any particular semantics on that | ||
| * extension. See `$dynamicRef` for more details. | ||
| */ | ||
| $dynamicAnchor?: string; | ||
| /** | ||
| * The `$dynamicRef` keyword is an applicator that allows for deferring | ||
| * the full resolution until runtime, at which point it is resolved each | ||
| * time it is encountered while evaluating an instance. | ||
| * | ||
| * Together with `$dynamicAnchor`, `$dynamicRef` implements a | ||
| * cooperative extension mechanism that is primarily useful with recursive | ||
| * schemas (schemas that reference themselves). Both the extension point | ||
| * and the runtime-determined extension target are defined with | ||
| * `$dynamicAnchor`, and only exhibit runtime dynamic behavior when | ||
| * referenced with `$dynamicRef`. | ||
| * | ||
| * The value of the `$dynamicRef` property MUST be a string which is | ||
| * a URI-Reference. Resolved against the current URI base, it produces | ||
| * the URI used as the starting point for runtime resolution. This initial | ||
| * resolution is safe to perform on schema load. | ||
| * | ||
| * If the initially resolved starting point URI includes a fragment that | ||
| * was created by the `$dynamicAnchor` keyword, the initial URI MUST be | ||
| * replaced by the URI (including the fragment) for the outermost schema | ||
| * resource in the [dynamic scope][scopes] that defines | ||
| * an identically named fragment with `$dynamicAnchor`. | ||
| * | ||
| * Otherwise, its behavior is identical to `$ref`, and no runtime | ||
| * resolution is needed. | ||
| * | ||
| * [scopes]: https://json-schema.org/draft/2020-12/json-schema-core.html#scopes | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $dynamicRef?: string; | ||
| /** | ||
| * The `$id` keyword identifies a schema resource with its | ||
| * [canonical][[RFC6596]] URI. | ||
| * | ||
| * Note that this URI is an identifier and not necessarily a network | ||
| * locator. In the case of a network-addressable URL, a schema need not be | ||
| * downloadable from its canonical URI. | ||
| * | ||
| * If present, the value for this keyword MUST be a string, and MUST | ||
| * represent a valid [URI-reference][RFC3986]. This URI-reference SHOULD | ||
| * be normalized, and MUST resolve to an [absolute-URI][RFC3986] (without a | ||
| * fragment). Therefore, `$id` MUST NOT contain a non-empty fragment, | ||
| * and SHOULD NOT contain an empty fragment. | ||
| * | ||
| * Since an empty fragment in the context of the | ||
| * `application/schema+json` media type refers to the same resource as | ||
| * the base URI without a fragment, an implementation MAY normalize a URI | ||
| * ending with an empty fragment by removing the fragment. However, schema | ||
| * authors SHOULD NOT rely on this behavior across implementations. | ||
| * | ||
| * This URI also serves as the base URI for relative URI-references in | ||
| * keywords within the schema resource, in accordance with | ||
| * [RFC 3986][RFC3986] section 5.1.1 regarding base URIs embedded in | ||
| * content. | ||
| * | ||
| * The presence of `$id` in a subschema indicates that the subschema | ||
| * constitutes a distinct schema resource within a single schema document. | ||
| * Furthermore, in accordance with [RFC 3986][RFC3986] section 5.1.2 | ||
| * regarding encapsulating entities, if an `$id` in a subschema is a | ||
| * relative URI-reference, the base URI for resolving that reference is the | ||
| * URI of the parent schema resource. | ||
| * | ||
| * If no parent schema object explicitly identifies itself as a resource | ||
| * with `$id`, the base URI is that of the entire document. | ||
| * | ||
| * The root schema of a JSON Schema document SHOULD contain an `$id` | ||
| * keyword with an [absolute-URI][RFC3986] (containing a scheme, but no | ||
| * fragment). | ||
| * | ||
| * [RFC6596]: https://datatracker.ietf.org/doc/html/rfc6596 | ||
| * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986 | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $id?: string; | ||
| /** | ||
| * The `$ref` keyword is an applicator that is used to reference a | ||
| * statically identified schema. Its results are the results of the | ||
| * referenced schema. Other keywords can appear alongside of `$ref` in | ||
| * the same schema object. | ||
| * | ||
| * The value of the `$ref` property MUST be a string which is a | ||
| * URI-Reference. Resolved against the current URI base, it produces the | ||
| * URI of the schema to apply. | ||
| * | ||
| * @format "uri-reference" | ||
| */ | ||
| $ref?: string; | ||
| /** | ||
| * The `$schema` keyword is both used as a JSON Schema dialect identifier | ||
| * and as the identifier of a resource which is itself a JSON Schema, which | ||
| * describes the set of valid schemas written for this particular dialect. | ||
| * | ||
| * The value of this keyword MUST be a [URI][RFC3986] (containing a scheme) | ||
| * and this URI MUST be normalized. The current schema MUST be valid | ||
| * against the meta-schema identified by this URI. | ||
| * | ||
| * If this URI identifies a retrievable resource, that resource SHOULD be | ||
| * of media type `application/schema+json`. | ||
| * | ||
| * The `$schema` keyword SHOULD be used in the document root schema | ||
| * object, and MAY be used in the root schema objects of embedded schema | ||
| * resources. It MUST NOT appear in non-resource root schema objects. If | ||
| * absent from the document root schema, the resulting behavior is | ||
| * implementation-defined. | ||
| * | ||
| * Values for this property are defined elsewhere in this and other | ||
| * documents, and by other parties. | ||
| * | ||
| * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986 | ||
| * | ||
| * @format "uri" | ||
| */ | ||
| $schema?: string; | ||
| /** | ||
| * The `$vocabulary` keyword is used in meta-schemas to identify the | ||
| * vocabularies available for use in schemas described by that meta-schema. | ||
| * It is also used to indicate whether each vocabulary is required or | ||
| * optional, in the sense that an implementation MUST understand the | ||
| * required vocabularies in order to successfully process the schema. | ||
| * Together, this information forms a dialect. Any vocabulary that is | ||
| * understood by the implementation MUST be processed in a manner | ||
| * consistent with the semantic definitions contained within the | ||
| * vocabulary. | ||
| * | ||
| * The value of this keyword MUST be an object. The property names in the | ||
| * object MUST be URIs (containing a scheme) and this URI MUST be | ||
| * normalized. Each URI that appears as a property name identifies a | ||
| * specific set of keywords and their semantics. | ||
| * | ||
| * The URI MAY be a URL, but the nature of the retrievable resource is | ||
| * currently undefined, and reserved for future use. Vocabulary authors | ||
| * MAY use the URL of the vocabulary specification, in a human-readable | ||
| * media type such as `text/html` or `text/plain`, as the vocabulary | ||
| * URI. | ||
| * | ||
| * The values of the object properties MUST be booleans. If the value is | ||
| * `true`, then implementations that do not recognize the vocabulary MUST | ||
| * refuse to process any schemas that declare this meta-schema with | ||
| * `$schema`. If the value is `false`, implementations that do not | ||
| * recognize the vocabulary SHOULD proceed with processing such schemas. | ||
| * The value has no impact if the implementation understands the | ||
| * vocabulary. | ||
| * | ||
| * Unrecognized keywords SHOULD be ignored. This remains the case for | ||
| * keywords defined by unrecognized vocabularies. It is not currently | ||
| * possible to distinguish between unrecognized keywords that are defined | ||
| * in vocabularies from those that are not part of any vocabulary. | ||
| * | ||
| * The `$vocabulary` keyword SHOULD be used in the root schema of any | ||
| * schema document intended for use as a meta-schema. It MUST NOT appear | ||
| * in subschemas. | ||
| * | ||
| * The `$vocabulary` keyword MUST be ignored in schema documents that are | ||
| * not being processed as a meta-schema. | ||
| */ | ||
| $vocabulary?: Record<string, string>; | ||
| /** | ||
| * @deprecated `additionalItems` has been deprecated in favor of `prefixItems` | ||
| * paired with `items`. | ||
| */ | ||
| additionalItems?: JSONSchema; | ||
| /** | ||
| * The value of `additionalProperties` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the presence and annotation | ||
| * results of `properties` and `patternProperties` within the same | ||
| * schema object. Validation with `additionalProperties` applies only to | ||
| * the child values of instance names that do not appear in the annotation | ||
| * results of either `properties` or `patternProperties`. | ||
| * | ||
| * For all such properties, validation succeeds if the child instance | ||
| * validates against the `additionalProperties` schema. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names validated by this keyword's subschema. Annotation results for | ||
| * `additionalProperties` keywords from multiple schemas applied to the | ||
| * same instance location are combined by taking the union of the sets. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * Implementations MAY choose to implement or optimize this keyword in | ||
| * another way that produces the same effect, such as by directly checking | ||
| * the names in `properties` and the patterns in `patternProperties` | ||
| * against the instance property set. | ||
| */ | ||
| additionalProperties?: JSONSchema; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against all schemas defined by this keyword's value. | ||
| */ | ||
| allOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against at least one schema defined by this keyword's | ||
| * value. | ||
| */ | ||
| anyOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * An instance validates successfully against this keyword if its value is | ||
| * equal to the value of the keyword. | ||
| * | ||
| * Use of this keyword is functionally equivalent to the `enum` keyword | ||
| * with a single value. | ||
| */ | ||
| const?: Value; | ||
| /** | ||
| * The value of this keyword MUST be a valid JSON Schema. | ||
| * | ||
| * An array instance is valid against `contains` if at least one of its | ||
| * elements is valid against the given schema. The subschema MUST be | ||
| * applied to every array element even after the first match has been | ||
| * found, in order to collect annotations for use by other keywords. | ||
| * This is to ensure that all possible annotations are collected. | ||
| * | ||
| * Logically, the validation result of applying the value subschema to each | ||
| * item in the array MUST be OR'ed with `false`, resulting in an overall | ||
| * validation result. | ||
| * | ||
| * This keyword produces an annotation value which is an array of the | ||
| * indexes to which this keyword validates successfully when applying its | ||
| * subschema, in ascending order. The value MAY be a boolean `true` if | ||
| * the subschema validates successfully when applied to every index of the | ||
| * instance. The annotation MUST be present if the instance array to which | ||
| * this keyword's schema applies is empty. | ||
| */ | ||
| contains?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * If the instance value is a string, this property defines that the | ||
| * string SHOULD be interpreted as binary data and decoded using the | ||
| * encoding named by this property. [RFC 2045, Sec 6.1][RFC2045] lists the | ||
| * possible values for this property. | ||
| * | ||
| * The value of this property SHOULD be ignored if the instance described | ||
| * is not a string. | ||
| * | ||
| * If this keyword is absent, but `contentMediaType` is present, this | ||
| * indicates that the media type could be encoded into `UTF-8` like any | ||
| * other JSON string value, and does not require additional decoding. | ||
| * | ||
| * The value of this property MUST be a string. | ||
| * | ||
| * [RFC2045]: https://datatracker.ietf.org/doc/html/rfc2045#section-6.1 | ||
| */ | ||
| contentEncoding?: "7bit" | "8bit" | "base64" | "binary" | "ietf-token" | "quoted-printable" | "x-token"; | ||
| /** | ||
| * If the instance is a string, this property indicates the media type | ||
| * of the contents of the string. If `contentEncoding` is present, | ||
| * this property describes the decoded string. | ||
| * | ||
| * The value of this property must be a media type, as defined by | ||
| * [RFC 2046][RFC2046]. This property defines the media type of instances | ||
| * which this schema defines. | ||
| * | ||
| * The value of this property SHOULD be ignored if the instance described | ||
| * is not a string. | ||
| * | ||
| * If the `contentEncoding` property is not present, but the instance | ||
| * value is a string, then the value of this property SHOULD specify a text | ||
| * document type, and the character set SHOULD be the character set into | ||
| * which the JSON string value was decoded (for which the default is | ||
| * Unicode). | ||
| * | ||
| * [RFC2046]: https://datatracker.ietf.org/doc/html/rfc2046 | ||
| */ | ||
| contentMediaType?: string; | ||
| /** | ||
| * If the instance is a string, and if `contentMediaType` is present, | ||
| * this property contains a schema which describes the structure of the | ||
| * string. | ||
| * | ||
| * This keyword MAY be used with any media type that can be mapped into | ||
| * JSON Schema's data model. | ||
| * | ||
| * The value of this property MUST be a valid JSON schema. It SHOULD be | ||
| * ignored if `contentMediaType` is not present. | ||
| */ | ||
| contentSchema?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * This keyword can be used to supply a default JSON value associated with | ||
| * a particular schema. It is RECOMMENDED that a `default` value be valid | ||
| * against the associated schema. | ||
| */ | ||
| default?: Value; | ||
| /** | ||
| * @deprecated `definitions` has been renamed to `$defs`. | ||
| */ | ||
| definitions?: Record<string, JSONSchema>; | ||
| /** | ||
| * @deprecated `dependencies` has been split into two keywords: | ||
| * `dependentSchemas` and `dependentRequired`. | ||
| */ | ||
| dependencies?: Record<string, MaybeReadonlyArray<string> | JSONSchema>; | ||
| /** | ||
| * The value of this keyword MUST be an object. Properties in | ||
| * this object, if any, MUST be arrays. Elements in each array, | ||
| * if any, MUST be strings, and MUST be unique. | ||
| * | ||
| * This keyword specifies properties that are required if a specific | ||
| * other property is present. Their requirement is dependent on the | ||
| * presence of the other property. | ||
| * | ||
| * Validation succeeds if, for each name that appears in both | ||
| * the instance and as a name within this keyword's value, every | ||
| * item in the corresponding array is also the name of a property | ||
| * in the instance. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty object. | ||
| */ | ||
| dependentRequired?: Record<string, MaybeReadonlyArray<string>>; | ||
| /** | ||
| * This keyword specifies subschemas that are evaluated if the instance is | ||
| * an object and contains a certain property. | ||
| * | ||
| * This keyword's value MUST be an object. Each value in the object MUST be | ||
| * a valid JSON Schema. | ||
| * | ||
| * If the object key is a property in the instance, the entire instance | ||
| * must validate against the subschema. Its use is dependent on the | ||
| * presence of the property. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty object. | ||
| */ | ||
| dependentSchemas?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword are applicable to a single sub-instance, applications | ||
| * SHOULD consider the instance location to be deprecated if any occurrence | ||
| * specifies a `true` value. | ||
| * | ||
| * If `deprecated` has a value of boolean `true`, it indicates that | ||
| * applications SHOULD refrain from usage of the declared property. It MAY | ||
| * mean the property is going to be removed in the future. | ||
| * | ||
| * A root schema containing `deprecated` with a value of `true` | ||
| * indicates that the entire resource being described MAY be removed in the | ||
| * future. | ||
| * | ||
| * The `deprecated` keyword applies to each instance location to which | ||
| * the schema object containing the keyword successfully applies. This can | ||
| * result in scenarios where every array item or object property is | ||
| * deprecated even though the containing array or object is not. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `false`. | ||
| */ | ||
| deprecated?: boolean; | ||
| /** | ||
| * Can be used to decorate a user interface with explanation or information | ||
| * about the data produced. | ||
| */ | ||
| description?: string; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * When `if` is present, and the instance fails to validate against its | ||
| * subschema, then validation succeeds against this keyword if the instance | ||
| * successfully validates against this keyword's subschema. | ||
| * | ||
| * This keyword has no effect when `if` is absent, or when the instance | ||
| * successfully validates against its subschema. Implementations MUST NOT | ||
| * evaluate the instance against this keyword, for either validation or | ||
| * annotation collection purposes, in such cases. | ||
| */ | ||
| else?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * The value of this keyword MUST be an array. This array SHOULD have at | ||
| * least one element. Elements in the array SHOULD be unique. | ||
| * | ||
| * An instance validates successfully against this keyword if its value is | ||
| * equal to one of the elements in this keyword's array value. | ||
| * | ||
| * Elements in the array might be of any type, including `null`. | ||
| */ | ||
| enum?: MaybeReadonlyArray<Value>; | ||
| /** | ||
| * The value of this keyword MUST be an array. When multiple occurrences of | ||
| * this keyword are applicable to a single sub-instance, implementations | ||
| * MUST provide a flat array of all values rather than an array of arrays. | ||
| * | ||
| * This keyword can be used to provide sample JSON values associated with a | ||
| * particular schema, for the purpose of illustrating usage. It is | ||
| * RECOMMENDED that these values be valid against the associated schema. | ||
| * | ||
| * Implementations MAY use the value(s) of `default`, if present, as an | ||
| * additional example. If `examples` is absent, `default` MAY still be | ||
| * used in this manner. | ||
| */ | ||
| examples?: MaybeReadonlyArray<Value>; | ||
| /** | ||
| * The value of `exclusiveMaximum` MUST be a number, representing an | ||
| * exclusive upper limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then the instance is valid only if it has a | ||
| * value strictly less than (not equal to) `exclusiveMaximum`. | ||
| */ | ||
| exclusiveMaximum?: number; | ||
| /** | ||
| * The value of `exclusiveMinimum` MUST be a number, representing an | ||
| * exclusive lower limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then the instance is valid only if it has a | ||
| * value strictly greater than (not equal to) `exclusiveMinimum`. | ||
| */ | ||
| exclusiveMinimum?: number; | ||
| /** | ||
| * Implementations MAY treat `format` as an assertion in addition to an | ||
| * annotation, and attempt to validate the value's conformance to the | ||
| * specified semantics. | ||
| * | ||
| * The value of this keyword is called a format attribute. It MUST be a | ||
| * string. A format attribute can generally only validate a given set | ||
| * of instance types. If the type of the instance to validate is not in | ||
| * this set, validation for this format attribute and instance SHOULD | ||
| * succeed. Format attributes are most often applied to strings, but can | ||
| * be specified to apply to any type. | ||
| * | ||
| * Implementations MAY support custom format attributes. Save for agreement | ||
| * between parties, schema authors SHALL NOT expect a peer implementation | ||
| * to support such custom format attributes. An implementation MUST NOT | ||
| * fail validation or cease processing due to an unknown format attribute. | ||
| * When treating `format` as an annotation, implementations SHOULD | ||
| * collect both known and unknown format attribute values. | ||
| */ | ||
| format?: string; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * This validation outcome of this keyword's subschema has no direct effect | ||
| * on the overall validation result. Rather, it controls which of the | ||
| * `then` or `else` keywords are evaluated. | ||
| * | ||
| * Instances that successfully validate against this keyword's subschema | ||
| * MUST also be valid against the subschema value of the `then` keyword, | ||
| * if present. | ||
| * | ||
| * Instances that fail to validate against this keyword's subschema MUST | ||
| * also be valid against the subschema value of the `else` keyword, if | ||
| * present. | ||
| * | ||
| * If annotations are being collected, they are collected | ||
| * from this keyword's subschema in the usual way, including when the | ||
| * keyword is present without either `then` or `else`. | ||
| */ | ||
| if?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * The value of `items` MUST be a valid JSON Schema. | ||
| * | ||
| * This keyword applies its subschema to all instance elements at indexes | ||
| * greater than the length of the `prefixItems` array in the same schema | ||
| * object, as reported by the annotation result of that `prefixItems` | ||
| * keyword. If no such annotation result exists, `items` applies its | ||
| * subschema to all instance array elements. | ||
| * | ||
| * Note that the behavior of `items` without `prefixItems` is identical | ||
| * to that of the schema form of `items` in prior drafts. | ||
| * | ||
| * When `prefixItems` is present, the behavior of `items` is identical | ||
| * to the former `additionalItems` keyword. | ||
| * | ||
| * If the `items` subschema is applied to any positions within the | ||
| * instance array, it produces an annotation result of boolean `true`, | ||
| * indicating that all remaining array elements have been evaluated against | ||
| * this keyword's subschema. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * Implementations MAY choose to implement or optimize this keyword | ||
| * in another way that produces the same effect, such as by directly | ||
| * checking for the presence and size of a `prefixItems` array. | ||
| */ | ||
| items?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * If `contains` is not present within the same schema object, then this | ||
| * keyword has no effect. | ||
| * | ||
| * An instance array is valid against `maxContains` in two ways, | ||
| * depending on the form of the annotation result of an adjacent | ||
| * `contains` keyword. The first way is if the annotation result is an | ||
| * array and the length of that array is less than or equal to the | ||
| * `maxContains` value. The second way is if the annotation result is a | ||
| * boolean `true` and the instance array length is less than or equal to | ||
| * the `maxContains` value. | ||
| */ | ||
| maxContains?: number; | ||
| /** | ||
| * The value of `maximum` MUST be a number, representing an inclusive | ||
| * upper limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then this keyword validates only if the | ||
| * instance is less than or exactly equal to `maximum`. | ||
| */ | ||
| maximum?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An array instance is valid against `maxItems` if its size is less | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxItems?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * A string instance is valid against this keyword if its length is less | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * The length of a string instance is defined as the number of its | ||
| * characters as defined by [RFC 8259][RFC8259]. | ||
| * | ||
| * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259 | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxLength?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An object instance is valid against `maxProperties` if its number of | ||
| * `properties` is less than, or equal to, the value of this keyword. | ||
| * | ||
| * @minimum 0 | ||
| */ | ||
| maxProperties?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * If `contains` is not present within the same schema object, then this | ||
| * keyword has no effect. | ||
| * | ||
| * An instance array is valid against `minContains` in two ways, | ||
| * depending on the form of the annotation result of an adjacent | ||
| * `contains` keyword. The first way is if the annotation result is an | ||
| * array and the length of that array is greater than or equal to the | ||
| * `minContains` value. The second way is if the annotation result is a | ||
| * boolean `true` and the instance array length is greater than or equal | ||
| * to the `minContains` value. | ||
| * | ||
| * A value of `0` is allowed, but is only useful for setting a range | ||
| * of occurrences from `0` to the value of `maxContains`. A value of | ||
| * `0` with no `maxContains` causes `contains` to always pass | ||
| * validation. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `1`. | ||
| * | ||
| * @default 1 | ||
| */ | ||
| minContains?: number; | ||
| /** | ||
| * The value of `minimum` MUST be a number, representing an inclusive | ||
| * lower limit for a numeric instance. | ||
| * | ||
| * If the instance is a number, then this keyword validates only if the | ||
| * instance is greater than or exactly equal to `minimum`. | ||
| */ | ||
| minimum?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An array instance is valid against `minItems` if its size is greater | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minItems?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * A string instance is valid against this keyword if its length is greater | ||
| * than, or equal to, the value of this keyword. | ||
| * | ||
| * The length of a string instance is defined as the number of its | ||
| * characters as defined by [RFC 8259][RFC8259]. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259 | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minLength?: number; | ||
| /** | ||
| * The value of this keyword MUST be a non-negative integer. | ||
| * | ||
| * An object instance is valid against `minProperties` if its number of | ||
| * `properties` is greater than, or equal to, the value of this keyword. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `0`. | ||
| * | ||
| * @default 0 | ||
| * @minimum 0 | ||
| */ | ||
| minProperties?: number; | ||
| /** | ||
| * The value of `multipleOf` MUST be a number, strictly greater than | ||
| * `0`. | ||
| * | ||
| * A numeric instance is valid only if division by this keyword's value | ||
| * results in an integer. | ||
| * | ||
| * @exclusiveMinimum 0 | ||
| */ | ||
| multipleOf?: number; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * An instance is valid against this keyword if it fails to validate | ||
| * successfully against the schema defined by this keyword. | ||
| */ | ||
| not?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * This keyword's value MUST be a non-empty array. Each item of the array | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * An instance validates successfully against this keyword if it validates | ||
| * successfully against exactly one schema defined by this keyword's value. | ||
| */ | ||
| oneOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>; | ||
| /** | ||
| * The value of this keyword MUST be a string. This string SHOULD be a | ||
| * valid regular expression, according to the [ECMA-262][ecma262] regular | ||
| * expression dialect. | ||
| * | ||
| * A string instance is considered valid if the regular expression matches | ||
| * the instance successfully. Recall: regular expressions are not | ||
| * implicitly anchored. | ||
| * | ||
| * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/ | ||
| * | ||
| * @format "regex" | ||
| */ | ||
| pattern?: string; | ||
| /** | ||
| * The value of `patternProperties` MUST be an object. Each property name | ||
| * of this object SHOULD be a valid regular expression, according to the | ||
| * [ECMA-262][ecma262] regular expression dialect. Each property value of | ||
| * this object MUST be a valid JSON Schema. | ||
| * | ||
| * Validation succeeds if, for each instance name that matches any regular | ||
| * expressions that appear as a property name in this keyword's value, | ||
| * the child instance for that name successfully validates against each | ||
| * schema that corresponds to a matching regular expression. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names matched by this keyword. Omitting this keyword has the same | ||
| * assertion behavior as an empty object. | ||
| * | ||
| * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/ | ||
| */ | ||
| patternProperties?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of `prefixItems` MUST be a non-empty array of valid JSON | ||
| * Schemas. | ||
| * | ||
| * Validation succeeds if each element of the instance validates against | ||
| * the schema at the same position, if any. This keyword does not | ||
| * constrain the length of the array. If the array is longer than this | ||
| * keyword's value, this keyword validates only the prefix of matching | ||
| * length. | ||
| * | ||
| * This keyword produces an annotation value which is the largest index to | ||
| * which this keyword applied a subschema. The value MAY be a boolean | ||
| * `true` if a subschema was applied to every index of the instance, such | ||
| * as is produced by the `items` keyword. | ||
| * This annotation affects the behavior of `items` and | ||
| * `unevaluatedItems`. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty array. | ||
| */ | ||
| prefixItems?: MaybeReadonlyArray<JSONSchema> | JSONSchema; | ||
| /** | ||
| * The value of `properties` MUST be an object. Each value of this object | ||
| * MUST be a valid JSON Schema. | ||
| * | ||
| * Validation succeeds if, for each name that appears in both the instance | ||
| * and as a name within this keyword's value, the child instance for that | ||
| * name successfully validates against the corresponding schema. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names matched by this keyword. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * object. | ||
| */ | ||
| properties?: Record<string, JSONSchema>; | ||
| /** | ||
| * The value of `propertyNames` MUST be a valid JSON Schema. | ||
| * | ||
| * If the instance is an object, this keyword validates if every property | ||
| * name in the instance validates against the provided schema. | ||
| * Note the property name that the schema is testing will always be a | ||
| * string. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty schema. | ||
| */ | ||
| propertyNames?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword are applicable to a single sub-instance, the resulting | ||
| * value MUST be `true` if any occurrence specifies a `true` value, and | ||
| * MUST be `false` otherwise. | ||
| * | ||
| * If `readOnly` has a value of boolean `true`, it indicates that the | ||
| * value of the instance is managed exclusively by the owning authority, | ||
| * and attempts by an application to modify the value of this property are | ||
| * expected to be ignored or rejected by that owning authority. | ||
| * | ||
| * An instance document that is marked as `readOnly` for the entire | ||
| * document MAY be ignored if sent to the owning authority, or MAY result | ||
| * in an error, at the authority's discretion. | ||
| * | ||
| * For example, `readOnly` would be used to mark a database-generated | ||
| * serial number as read-only. | ||
| * | ||
| * This keyword can be used to assist in user interface instance | ||
| * generation. | ||
| * | ||
| * @default false | ||
| */ | ||
| readOnly?: boolean; | ||
| /** | ||
| * The value of this keyword MUST be an array. Elements of this array, if | ||
| * any, MUST be strings, and MUST be unique. | ||
| * | ||
| * An object instance is valid against this keyword if every item in the | ||
| * array is the name of a property in the instance. | ||
| * | ||
| * Omitting this keyword has the same behavior as an empty array. | ||
| */ | ||
| required?: MaybeReadonlyArray<string>; | ||
| /** | ||
| * This keyword's value MUST be a valid JSON Schema. | ||
| * | ||
| * When `if` is present, and the instance successfully validates against | ||
| * its subschema, then validation succeeds against this keyword if the | ||
| * instance also successfully validates against this keyword's subschema. | ||
| * | ||
| * This keyword has no effect when `if` is absent, or when the instance | ||
| * fails to validate against its subschema. Implementations MUST NOT | ||
| * evaluate the instance against this keyword, for either validation or | ||
| * annotation collection purposes, in such cases. | ||
| */ | ||
| then?: JSONSchema<Value, SchemaType>; | ||
| /** | ||
| * Can be used to decorate a user interface with a short label about the | ||
| * data produced. | ||
| */ | ||
| title?: string; | ||
| /** | ||
| * The value of this keyword MUST be either a string or an array. If it is | ||
| * an array, elements of the array MUST be strings and MUST be unique. | ||
| * | ||
| * String values MUST be one of the six primitive types (`"null"`, | ||
| * `"boolean"`, `"object"`, `"array"`, `"number"`, or | ||
| * `"string"`), or `"integer"` which matches any number with a zero | ||
| * fractional part. | ||
| * | ||
| * An instance validates if and only if the instance is in any of the sets | ||
| * listed for this keyword. | ||
| */ | ||
| type?: SchemaType; | ||
| /** | ||
| * The value of `unevaluatedItems` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the annotation results of | ||
| * adjacent keywords that apply to the instance location being validated. | ||
| * Specifically, the annotations from `prefixItems`, `items`, and | ||
| * `contains`, which can come from those keywords when they are adjacent | ||
| * to the `unevaluatedItems` keyword. Those three annotations, as well as | ||
| * `unevaluatedItems`, can also result from any and all adjacent | ||
| * [in-place applicator][in-place-applicator] keywords. | ||
| * | ||
| * If no relevant annotations are present, the `unevaluatedItems` | ||
| * subschema MUST be applied to all locations in the array. | ||
| * If a boolean `true` value is present from any of the relevant | ||
| * annotations, `unevaluatedItems` MUST be ignored. Otherwise, the | ||
| * subschema MUST be applied to any index greater than the largest | ||
| * annotation value for `prefixItems`, which does not appear in any | ||
| * annotation value for `contains`. | ||
| * | ||
| * This means that `prefixItems`, `items`, `contains`, and all | ||
| * in-place applicators MUST be evaluated before this keyword can be | ||
| * evaluated. Authors of extension keywords MUST NOT define an in-place | ||
| * applicator that would need to be evaluated after this keyword. | ||
| * | ||
| * If the `unevaluatedItems` subschema is applied to any positions within | ||
| * the instance array, it produces an annotation result of boolean | ||
| * `true`, analogous to the behavior of `items`. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place | ||
| */ | ||
| unevaluatedItems?: JSONSchema; | ||
| /** | ||
| * The value of `unevaluatedProperties` MUST be a valid JSON Schema. | ||
| * | ||
| * The behavior of this keyword depends on the annotation results of | ||
| * adjacent keywords that apply to the instance location being validated. | ||
| * Specifically, the annotations from `properties`, | ||
| * `patternProperties`, and `additionalProperties`, which can come from | ||
| * those keywords when they are adjacent to the `unevaluatedProperties` | ||
| * keyword. Those three annotations, as well as `unevaluatedProperties`, | ||
| * can also result from any and all adjacent | ||
| * [in-place applicator][in-place-applicator] keywords. | ||
| * | ||
| * Validation with `unevaluatedProperties` applies only to the child | ||
| * values of instance names that do not appear in the `properties`, | ||
| * `patternProperties`, `additionalProperties`, or | ||
| * `unevaluatedProperties` annotation results that apply to the | ||
| * instance location being validated. | ||
| * | ||
| * For all such properties, validation succeeds if the child instance | ||
| * validates against the "unevaluatedProperties" schema. | ||
| * | ||
| * This means that `properties`, `patternProperties`, | ||
| * `additionalProperties`, and all in-place applicators MUST be evaluated | ||
| * before this keyword can be evaluated. Authors of extension keywords | ||
| * MUST NOT define an in-place applicator that would need to be evaluated | ||
| * after this keyword. | ||
| * | ||
| * The annotation result of this keyword is the set of instance property | ||
| * names validated by this keyword's subschema. | ||
| * | ||
| * Omitting this keyword has the same assertion behavior as an empty | ||
| * schema. | ||
| * | ||
| * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place | ||
| */ | ||
| unevaluatedProperties?: JSONSchema; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. | ||
| * | ||
| * If this keyword has boolean value `false`, the instance validates | ||
| * successfully. If it has boolean value `true`, the instance validates | ||
| * successfully if all of its elements are unique. | ||
| * | ||
| * Omitting this keyword has the same behavior as a value of `false`. | ||
| * | ||
| * @default false | ||
| */ | ||
| uniqueItems?: boolean; | ||
| /** | ||
| * The value of this keyword MUST be a boolean. When multiple occurrences | ||
| * of this keyword is applicable to a single sub-instance, the resulting | ||
| * value MUST be `true` if any occurrence specifies a `true` value, and | ||
| * MUST be `false` otherwise. | ||
| * | ||
| * If `writeOnly` has a value of boolean `true`, it indicates that the | ||
| * value is never present when the instance is retrieved from the owning | ||
| * authority. It can be present when sent to the owning authority to update | ||
| * or create the document (or the resource it represents), but it will not | ||
| * be included in any updated or newly created version of the instance. | ||
| * | ||
| * An instance document that is marked as `writeOnly` for the entire | ||
| * document MAY be returned as a blank document of some sort, or MAY | ||
| * produce an error upon retrieval, or have the retrieval request ignored, | ||
| * at the authority's discretion. | ||
| * | ||
| * For example, `writeOnly` would be used to mark a password input field. | ||
| * | ||
| * These keywords can be used to assist in user interface instance | ||
| * generation. In particular, an application MAY choose to use a widget | ||
| * that hides input values as they are typed for write-only fields. | ||
| * | ||
| * @default false | ||
| */ | ||
| writeOnly?: boolean; | ||
| }; | ||
| declare namespace JSONSchema { | ||
| type TypeValue = ValueOf<TypeName> | TypeName | Array<ValueOf<TypeName> | TypeName> | ReadonlyArray<ValueOf<TypeName> | TypeName>; | ||
| /** | ||
| * JSON Schema interface | ||
| */ | ||
| type Interface<Value = any, SchemaType extends TypeValue = TypeValue> = Exclude<JSONSchema<Value, SchemaType>, boolean>; | ||
| type Array<T = any> = Pick<Interface<T, "array">, KeywordByType.Any | KeywordByType.Array>; | ||
| type Boolean = Pick<Interface<boolean, "boolean">, KeywordByType.Any>; | ||
| type Integer = Pick<Interface<number, "integer">, KeywordByType.Any | KeywordByType.Number>; | ||
| type Number = Pick<Interface<number, "number">, KeywordByType.Any | KeywordByType.Number>; | ||
| type Null = Pick<Interface<null, "null">, KeywordByType.Any>; | ||
| type Object<T = any> = Pick<Interface<T, "object">, KeywordByType.Any | KeywordByType.Object>; | ||
| type String = Pick<Interface<string, "string">, KeywordByType.Any | KeywordByType.String>; | ||
| } | ||
| declare namespace KeywordByType { | ||
| type Any = "$anchor" | "$comment" | "$defs" | "$dynamicAnchor" | "$dynamicRef" | "$id" | "$ref" | "$schema" | "$vocabulary" | "allOf" | "anyOf" | "const" | "default" | "definitions" | "deprecated" | "description" | "else" | "enum" | "examples" | "format" | "if" | "not" | "oneOf" | "readOnly" | "then" | "title" | "type" | "writeOnly"; | ||
| type Array = "additionalItems" | "contains" | "items" | "maxContains" | "maxItems" | "minContains" | "minItems" | "prefixItems" | "unevaluatedItems" | "uniqueItems"; | ||
| type Number = "exclusiveMaximum" | "exclusiveMinimum" | "maximum" | "minimum" | "multipleOf"; | ||
| type Object = "additionalProperties" | "dependencies" | "dependentRequired" | "dependentSchemas" | "maxProperties" | "minProperties" | "patternProperties" | "properties" | "propertyNames" | "required" | "unevaluatedProperties"; | ||
| type String = "contentEncoding" | "contentMediaType" | "contentSchema" | "maxLength" | "minLength" | "pattern"; | ||
| } | ||
| /** | ||
| * Content encoding strategy enum. | ||
| * | ||
| * - [Content-Transfer-Encoding Syntax](https://datatracker.ietf.org/doc/html/rfc2045#section-6.1) | ||
| * - [7bit vs 8bit encoding](https://stackoverflow.com/questions/25710599/content-transfer-encoding-7bit-or-8-bit/28531705#28531705) | ||
| */ | ||
| /** | ||
| * Enum consisting of simple type names for the `type` keyword | ||
| */ | ||
| declare enum TypeName { | ||
| /** | ||
| * Value MUST be an array. | ||
| */ | ||
| Array = "array", | ||
| /** | ||
| * Value MUST be a boolean. | ||
| */ | ||
| Boolean = "boolean", | ||
| /** | ||
| * Value MUST be an integer, no floating point numbers are allowed. This is a | ||
| * subset of the number type. | ||
| */ | ||
| Integer = "integer", | ||
| /** | ||
| * Value MUST be null. Note this is mainly for purpose of being able use union | ||
| * types to define nullability. If this type is not included in a union, null | ||
| * values are not allowed (the primitives listed above do not allow nulls on | ||
| * their own). | ||
| */ | ||
| Null = "null", | ||
| /** | ||
| * Value MUST be a number, floating point numbers are allowed. | ||
| */ | ||
| Number = "number", | ||
| /** | ||
| * Value MUST be an object. | ||
| */ | ||
| Object = "object", | ||
| /** | ||
| * Value MUST be a string. | ||
| */ | ||
| String = "string", | ||
| } | ||
| //#endregion | ||
| //#region ../core-internal/src/validators/types.d.ts | ||
| /** | ||
| * JSON Schema type definition (JSON Schema Draft 2020-12) | ||
| * | ||
| * This uses the object form of JSON Schema (excluding boolean schemas). | ||
| * While `true` and `false` are valid JSON Schemas, this SDK uses the | ||
| * object form for practical type safety. | ||
| * | ||
| * Re-exported from json-schema-typed for convenience. | ||
| * @see https://json-schema.org/draft/2020-12/json-schema-core.html | ||
| */ | ||
| type JsonSchemaType = JSONSchema.Interface; | ||
| /** | ||
| * Result of a JSON Schema validation operation | ||
| */ | ||
| type JsonSchemaValidatorResult<T> = { | ||
| valid: true; | ||
| data: T; | ||
| errorMessage: undefined; | ||
| } | { | ||
| valid: false; | ||
| data: undefined; | ||
| errorMessage: string; | ||
| }; | ||
| /** | ||
| * A validator function that validates data against a JSON Schema | ||
| */ | ||
| type JsonSchemaValidator<T> = (input: unknown) => JsonSchemaValidatorResult<T>; | ||
| /** | ||
| * Provider interface for creating validators from JSON Schemas | ||
| * | ||
| * This is the main extension point for custom validator implementations. | ||
| * Implementations should: | ||
| * - Support JSON Schema Draft 2020-12 (or be compatible with it) | ||
| * - Return validator functions that can be called multiple times | ||
| * - Handle schema compilation/caching internally | ||
| * - Provide clear error messages on validation failure | ||
| * | ||
| * @example | ||
| * ```ts source="./types.examples.ts#jsonSchemaValidator_implementation" | ||
| * class MyValidatorProvider implements jsonSchemaValidator { | ||
| * getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T> { | ||
| * // Compile/cache validator from schema | ||
| * return (input: unknown) => | ||
| * isValid(schema, input) | ||
| * ? { valid: true, data: input as T, errorMessage: undefined } | ||
| * : { valid: false, data: undefined, errorMessage: 'Error details' }; | ||
| * } | ||
| * } | ||
| * ``` | ||
| */ | ||
| interface jsonSchemaValidator { | ||
| /** | ||
| * Create a validator for the given JSON Schema | ||
| * | ||
| * @param schema - Standard JSON Schema object | ||
| * @returns A validator function that can be called multiple times | ||
| */ | ||
| getValidator<T>(schema: JsonSchemaType): JsonSchemaValidator<T>; | ||
| } | ||
| //#endregion | ||
| export { jsonSchemaValidator as i, JsonSchemaValidator as n, JsonSchemaValidatorResult as r, JsonSchemaType as t }; | ||
| //# sourceMappingURL=types-ClyURo_K.d.cts.map |
| {"version":3,"file":"types-ClyURo_K.d.cts","names":["draft","$schema","MaybeReadonlyArray","T","Array","ReadonlyArray","ValueOf","JSONSchema","Value","SchemaType","Record","TypeValue","TypeName","Exclude","Interface","KeywordByType","Any","Pick","Number","Object","String","ContentEncoding","Format","keywords"],"sources":["../../../node_modules/.pnpm/json-schema-typed@8.0.2/node_modules/json-schema-typed/draft_2020_12.d.ts","../../core-internal/src/validators/types.ts"],"sourcesContent":["export declare const draft: \"2020-12\";\r\nexport declare const $schema: \"https://json-schema.org/draft/2020-12/schema\";\r\ntype MaybeReadonlyArray<T> = Array<T> | ReadonlyArray<T>;\r\ntype ValueOf<T> = T[keyof T];\r\n/**\r\n * JSON Schema [Draft 2020-12](https://json-schema.org/draft/2020-12/json-schema-validation.html)\r\n */\r\nexport type JSONSchema<Value = any, SchemaType = Value extends boolean ? \"boolean\" : Value extends null ? \"null\" : Value extends number ? \"number\" | \"integer\" : Value extends string ? \"string\" : Value extends unknown[] ? \"array\" : Value extends Record<string | number, unknown> ? \"object\" : JSONSchema.TypeValue> = boolean | {\r\n /**\r\n * Using JSON Pointer fragments requires knowledge of the structure of the\r\n * schema. When writing schema documents with the intention to provide\r\n * re-usable schemas, it may be preferable to use a plain name fragment\r\n * that is not tied to any particular structural location. This allows a\r\n * subschema to be relocated without requiring JSON Pointer references to\r\n * be updated.\r\n *\r\n * The `$anchor` keyword is used to specify such a fragment. It is an\r\n * identifier keyword that can only be used to create plain name fragments.\r\n *\r\n * If present, the value of this keyword MUST be a string, which MUST start\r\n * with a letter `[A-Za-z]`, followed by any number of letters, digits\r\n * `[0-9]`, hyphens `-`, underscores `_`, colons `:`,\r\n * or periods `.`.\r\n *\r\n * Note that the anchor string does not include the `#` character,\r\n * as it is not a URI-reference. An `{\"$anchor\": \"foo\"}` becomes the\r\n * fragment `#foo` when used in a URI.\r\n *\r\n * The base URI to which the resulting fragment is appended is determined\r\n * by the `$id` keyword as explained in the previous section.\r\n * Two `$anchor` keywords in the same schema document MAY have the same\r\n * value if they apply to different base URIs, as the resulting full URIs\r\n * will be distinct. However, the effect of two `$anchor` keywords\r\n * with the same value and the same base URI is undefined. Implementations\r\n * MAY raise an error if such usage is detected.\r\n */\r\n $anchor?: string;\r\n /**\r\n * This keyword reserves a location for comments from schema authors to\r\n * readers or maintainers of the schema.\r\n *\r\n * The value of this keyword MUST be a string. Implementations MUST NOT\r\n * present this string to end users. Tools for editing schemas SHOULD\r\n * support displaying and editing this keyword. The value of this keyword\r\n * MAY be used in debug or error output which is intended for developers\r\n * making use of schemas.\r\n *\r\n * Schema vocabularies SHOULD allow `$comment` within any object\r\n * containing vocabulary keywords. Implementations MAY assume `$comment`\r\n * is allowed unless the vocabulary specifically forbids it. Vocabularies\r\n * MUST NOT specify any effect of `$comment` beyond what is described in\r\n * this specification.\r\n *\r\n * Tools that translate other media types or programming languages\r\n * to and from `application/schema+json` MAY choose to convert that media\r\n * type or programming language's native comments to or from `$comment`\r\n * values. The behavior of such translation when both native comments and\r\n * `$comment` properties are present is implementation-dependent.\r\n *\r\n * Implementations MAY strip `$comment` values at any point during\r\n * processing. In particular, this allows for shortening schemas when the\r\n * size of deployed schemas is a concern.\r\n *\r\n * Implementations MUST NOT take any other action based on the presence,\r\n * absence, or contents of `$comment` properties. In particular, the\r\n * value of `$comment` MUST NOT be collected as an annotation result.\r\n */\r\n $comment?: string;\r\n /**\r\n * The `$defs` keyword reserves a location for schema authors to inline\r\n * re-usable JSON Schemas into a more general schema. The keyword does not\r\n * directly affect the validation result.\r\n *\r\n * This keyword's value MUST be an object. Each member value of this object\r\n * MUST be a valid JSON Schema.\r\n */\r\n $defs?: Record<string, JSONSchema>;\r\n /**\r\n * \"The `$dynamicAnchor` indicates that the fragment is an extension\r\n * point when used with the `$dynamicRef` keyword. This low-level,\r\n * advanced feature makes it easier to extend recursive schemas such as the\r\n * meta-schemas, without imposing any particular semantics on that\r\n * extension. See `$dynamicRef` for more details.\r\n */\r\n $dynamicAnchor?: string;\r\n /**\r\n * The `$dynamicRef` keyword is an applicator that allows for deferring\r\n * the full resolution until runtime, at which point it is resolved each\r\n * time it is encountered while evaluating an instance.\r\n *\r\n * Together with `$dynamicAnchor`, `$dynamicRef` implements a\r\n * cooperative extension mechanism that is primarily useful with recursive\r\n * schemas (schemas that reference themselves). Both the extension point\r\n * and the runtime-determined extension target are defined with\r\n * `$dynamicAnchor`, and only exhibit runtime dynamic behavior when\r\n * referenced with `$dynamicRef`.\r\n *\r\n * The value of the `$dynamicRef` property MUST be a string which is\r\n * a URI-Reference. Resolved against the current URI base, it produces\r\n * the URI used as the starting point for runtime resolution. This initial\r\n * resolution is safe to perform on schema load.\r\n *\r\n * If the initially resolved starting point URI includes a fragment that\r\n * was created by the `$dynamicAnchor` keyword, the initial URI MUST be\r\n * replaced by the URI (including the fragment) for the outermost schema\r\n * resource in the [dynamic scope][scopes] that defines\r\n * an identically named fragment with `$dynamicAnchor`.\r\n *\r\n * Otherwise, its behavior is identical to `$ref`, and no runtime\r\n * resolution is needed.\r\n *\r\n * [scopes]: https://json-schema.org/draft/2020-12/json-schema-core.html#scopes\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $dynamicRef?: string;\r\n /**\r\n * The `$id` keyword identifies a schema resource with its\r\n * [canonical][[RFC6596]] URI.\r\n *\r\n * Note that this URI is an identifier and not necessarily a network\r\n * locator. In the case of a network-addressable URL, a schema need not be\r\n * downloadable from its canonical URI.\r\n *\r\n * If present, the value for this keyword MUST be a string, and MUST\r\n * represent a valid [URI-reference][RFC3986]. This URI-reference SHOULD\r\n * be normalized, and MUST resolve to an [absolute-URI][RFC3986] (without a\r\n * fragment). Therefore, `$id` MUST NOT contain a non-empty fragment,\r\n * and SHOULD NOT contain an empty fragment.\r\n *\r\n * Since an empty fragment in the context of the\r\n * `application/schema+json` media type refers to the same resource as\r\n * the base URI without a fragment, an implementation MAY normalize a URI\r\n * ending with an empty fragment by removing the fragment. However, schema\r\n * authors SHOULD NOT rely on this behavior across implementations.\r\n *\r\n * This URI also serves as the base URI for relative URI-references in\r\n * keywords within the schema resource, in accordance with\r\n * [RFC 3986][RFC3986] section 5.1.1 regarding base URIs embedded in\r\n * content.\r\n *\r\n * The presence of `$id` in a subschema indicates that the subschema\r\n * constitutes a distinct schema resource within a single schema document.\r\n * Furthermore, in accordance with [RFC 3986][RFC3986] section 5.1.2\r\n * regarding encapsulating entities, if an `$id` in a subschema is a\r\n * relative URI-reference, the base URI for resolving that reference is the\r\n * URI of the parent schema resource.\r\n *\r\n * If no parent schema object explicitly identifies itself as a resource\r\n * with `$id`, the base URI is that of the entire document.\r\n *\r\n * The root schema of a JSON Schema document SHOULD contain an `$id`\r\n * keyword with an [absolute-URI][RFC3986] (containing a scheme, but no\r\n * fragment).\r\n *\r\n * [RFC6596]: https://datatracker.ietf.org/doc/html/rfc6596\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $id?: string;\r\n /**\r\n * The `$ref` keyword is an applicator that is used to reference a\r\n * statically identified schema. Its results are the results of the\r\n * referenced schema. Other keywords can appear alongside of `$ref` in\r\n * the same schema object.\r\n *\r\n * The value of the `$ref` property MUST be a string which is a\r\n * URI-Reference. Resolved against the current URI base, it produces the\r\n * URI of the schema to apply.\r\n *\r\n * @format \"uri-reference\"\r\n */\r\n $ref?: string;\r\n /**\r\n * The `$schema` keyword is both used as a JSON Schema dialect identifier\r\n * and as the identifier of a resource which is itself a JSON Schema, which\r\n * describes the set of valid schemas written for this particular dialect.\r\n *\r\n * The value of this keyword MUST be a [URI][RFC3986] (containing a scheme)\r\n * and this URI MUST be normalized. The current schema MUST be valid\r\n * against the meta-schema identified by this URI.\r\n *\r\n * If this URI identifies a retrievable resource, that resource SHOULD be\r\n * of media type `application/schema+json`.\r\n *\r\n * The `$schema` keyword SHOULD be used in the document root schema\r\n * object, and MAY be used in the root schema objects of embedded schema\r\n * resources. It MUST NOT appear in non-resource root schema objects. If\r\n * absent from the document root schema, the resulting behavior is\r\n * implementation-defined.\r\n *\r\n * Values for this property are defined elsewhere in this and other\r\n * documents, and by other parties.\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n *\r\n * @format \"uri\"\r\n */\r\n $schema?: string;\r\n /**\r\n * The `$vocabulary` keyword is used in meta-schemas to identify the\r\n * vocabularies available for use in schemas described by that meta-schema.\r\n * It is also used to indicate whether each vocabulary is required or\r\n * optional, in the sense that an implementation MUST understand the\r\n * required vocabularies in order to successfully process the schema.\r\n * Together, this information forms a dialect. Any vocabulary that is\r\n * understood by the implementation MUST be processed in a manner\r\n * consistent with the semantic definitions contained within the\r\n * vocabulary.\r\n *\r\n * The value of this keyword MUST be an object. The property names in the\r\n * object MUST be URIs (containing a scheme) and this URI MUST be\r\n * normalized. Each URI that appears as a property name identifies a\r\n * specific set of keywords and their semantics.\r\n *\r\n * The URI MAY be a URL, but the nature of the retrievable resource is\r\n * currently undefined, and reserved for future use. Vocabulary authors\r\n * MAY use the URL of the vocabulary specification, in a human-readable\r\n * media type such as `text/html` or `text/plain`, as the vocabulary\r\n * URI.\r\n *\r\n * The values of the object properties MUST be booleans. If the value is\r\n * `true`, then implementations that do not recognize the vocabulary MUST\r\n * refuse to process any schemas that declare this meta-schema with\r\n * `$schema`. If the value is `false`, implementations that do not\r\n * recognize the vocabulary SHOULD proceed with processing such schemas.\r\n * The value has no impact if the implementation understands the\r\n * vocabulary.\r\n *\r\n * Unrecognized keywords SHOULD be ignored. This remains the case for\r\n * keywords defined by unrecognized vocabularies. It is not currently\r\n * possible to distinguish between unrecognized keywords that are defined\r\n * in vocabularies from those that are not part of any vocabulary.\r\n *\r\n * The `$vocabulary` keyword SHOULD be used in the root schema of any\r\n * schema document intended for use as a meta-schema. It MUST NOT appear\r\n * in subschemas.\r\n *\r\n * The `$vocabulary` keyword MUST be ignored in schema documents that are\r\n * not being processed as a meta-schema.\r\n */\r\n $vocabulary?: Record<string, string>;\r\n /**\r\n * @deprecated `additionalItems` has been deprecated in favor of `prefixItems`\r\n * paired with `items`.\r\n */\r\n additionalItems?: JSONSchema;\r\n /**\r\n * The value of `additionalProperties` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the presence and annotation\r\n * results of `properties` and `patternProperties` within the same\r\n * schema object. Validation with `additionalProperties` applies only to\r\n * the child values of instance names that do not appear in the annotation\r\n * results of either `properties` or `patternProperties`.\r\n *\r\n * For all such properties, validation succeeds if the child instance\r\n * validates against the `additionalProperties` schema.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names validated by this keyword's subschema. Annotation results for\r\n * `additionalProperties` keywords from multiple schemas applied to the\r\n * same instance location are combined by taking the union of the sets.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * Implementations MAY choose to implement or optimize this keyword in\r\n * another way that produces the same effect, such as by directly checking\r\n * the names in `properties` and the patterns in `patternProperties`\r\n * against the instance property set.\r\n */\r\n additionalProperties?: JSONSchema;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against all schemas defined by this keyword's value.\r\n */\r\n allOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against at least one schema defined by this keyword's\r\n * value.\r\n */\r\n anyOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * An instance validates successfully against this keyword if its value is\r\n * equal to the value of the keyword.\r\n *\r\n * Use of this keyword is functionally equivalent to the `enum` keyword\r\n * with a single value.\r\n */\r\n const?: Value;\r\n /**\r\n * The value of this keyword MUST be a valid JSON Schema.\r\n *\r\n * An array instance is valid against `contains` if at least one of its\r\n * elements is valid against the given schema. The subschema MUST be\r\n * applied to every array element even after the first match has been\r\n * found, in order to collect annotations for use by other keywords.\r\n * This is to ensure that all possible annotations are collected.\r\n *\r\n * Logically, the validation result of applying the value subschema to each\r\n * item in the array MUST be OR'ed with `false`, resulting in an overall\r\n * validation result.\r\n *\r\n * This keyword produces an annotation value which is an array of the\r\n * indexes to which this keyword validates successfully when applying its\r\n * subschema, in ascending order. The value MAY be a boolean `true` if\r\n * the subschema validates successfully when applied to every index of the\r\n * instance. The annotation MUST be present if the instance array to which\r\n * this keyword's schema applies is empty.\r\n */\r\n contains?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * If the instance value is a string, this property defines that the\r\n * string SHOULD be interpreted as binary data and decoded using the\r\n * encoding named by this property. [RFC 2045, Sec 6.1][RFC2045] lists the\r\n * possible values for this property.\r\n *\r\n * The value of this property SHOULD be ignored if the instance described\r\n * is not a string.\r\n *\r\n * If this keyword is absent, but `contentMediaType` is present, this\r\n * indicates that the media type could be encoded into `UTF-8` like any\r\n * other JSON string value, and does not require additional decoding.\r\n *\r\n * The value of this property MUST be a string.\r\n *\r\n * [RFC2045]: https://datatracker.ietf.org/doc/html/rfc2045#section-6.1\r\n */\r\n contentEncoding?: \"7bit\" | \"8bit\" | \"base64\" | \"binary\" | \"ietf-token\" | \"quoted-printable\" | \"x-token\";\r\n /**\r\n * If the instance is a string, this property indicates the media type\r\n * of the contents of the string. If `contentEncoding` is present,\r\n * this property describes the decoded string.\r\n *\r\n * The value of this property must be a media type, as defined by\r\n * [RFC 2046][RFC2046]. This property defines the media type of instances\r\n * which this schema defines.\r\n *\r\n * The value of this property SHOULD be ignored if the instance described\r\n * is not a string.\r\n *\r\n * If the `contentEncoding` property is not present, but the instance\r\n * value is a string, then the value of this property SHOULD specify a text\r\n * document type, and the character set SHOULD be the character set into\r\n * which the JSON string value was decoded (for which the default is\r\n * Unicode).\r\n *\r\n * [RFC2046]: https://datatracker.ietf.org/doc/html/rfc2046\r\n */\r\n contentMediaType?: string;\r\n /**\r\n * If the instance is a string, and if `contentMediaType` is present,\r\n * this property contains a schema which describes the structure of the\r\n * string.\r\n *\r\n * This keyword MAY be used with any media type that can be mapped into\r\n * JSON Schema's data model.\r\n *\r\n * The value of this property MUST be a valid JSON schema. It SHOULD be\r\n * ignored if `contentMediaType` is not present.\r\n */\r\n contentSchema?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * This keyword can be used to supply a default JSON value associated with\r\n * a particular schema. It is RECOMMENDED that a `default` value be valid\r\n * against the associated schema.\r\n */\r\n default?: Value;\r\n /**\r\n * @deprecated `definitions` has been renamed to `$defs`.\r\n */\r\n definitions?: Record<string, JSONSchema>;\r\n /**\r\n * @deprecated `dependencies` has been split into two keywords:\r\n * `dependentSchemas` and `dependentRequired`.\r\n */\r\n dependencies?: Record<string, MaybeReadonlyArray<string> | JSONSchema>;\r\n /**\r\n * The value of this keyword MUST be an object. Properties in\r\n * this object, if any, MUST be arrays. Elements in each array,\r\n * if any, MUST be strings, and MUST be unique.\r\n *\r\n * This keyword specifies properties that are required if a specific\r\n * other property is present. Their requirement is dependent on the\r\n * presence of the other property.\r\n *\r\n * Validation succeeds if, for each name that appears in both\r\n * the instance and as a name within this keyword's value, every\r\n * item in the corresponding array is also the name of a property\r\n * in the instance.\r\n *\r\n * Omitting this keyword has the same behavior as an empty object.\r\n */\r\n dependentRequired?: Record<string, MaybeReadonlyArray<string>>;\r\n /**\r\n * This keyword specifies subschemas that are evaluated if the instance is\r\n * an object and contains a certain property.\r\n *\r\n * This keyword's value MUST be an object. Each value in the object MUST be\r\n * a valid JSON Schema.\r\n *\r\n * If the object key is a property in the instance, the entire instance\r\n * must validate against the subschema. Its use is dependent on the\r\n * presence of the property.\r\n *\r\n * Omitting this keyword has the same behavior as an empty object.\r\n */\r\n dependentSchemas?: Record<string, JSONSchema>;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword are applicable to a single sub-instance, applications\r\n * SHOULD consider the instance location to be deprecated if any occurrence\r\n * specifies a `true` value.\r\n *\r\n * If `deprecated` has a value of boolean `true`, it indicates that\r\n * applications SHOULD refrain from usage of the declared property. It MAY\r\n * mean the property is going to be removed in the future.\r\n *\r\n * A root schema containing `deprecated` with a value of `true`\r\n * indicates that the entire resource being described MAY be removed in the\r\n * future.\r\n *\r\n * The `deprecated` keyword applies to each instance location to which\r\n * the schema object containing the keyword successfully applies. This can\r\n * result in scenarios where every array item or object property is\r\n * deprecated even though the containing array or object is not.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `false`.\r\n */\r\n deprecated?: boolean;\r\n /**\r\n * Can be used to decorate a user interface with explanation or information\r\n * about the data produced.\r\n */\r\n description?: string;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * When `if` is present, and the instance fails to validate against its\r\n * subschema, then validation succeeds against this keyword if the instance\r\n * successfully validates against this keyword's subschema.\r\n *\r\n * This keyword has no effect when `if` is absent, or when the instance\r\n * successfully validates against its subschema. Implementations MUST NOT\r\n * evaluate the instance against this keyword, for either validation or\r\n * annotation collection purposes, in such cases.\r\n */\r\n else?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * The value of this keyword MUST be an array. This array SHOULD have at\r\n * least one element. Elements in the array SHOULD be unique.\r\n *\r\n * An instance validates successfully against this keyword if its value is\r\n * equal to one of the elements in this keyword's array value.\r\n *\r\n * Elements in the array might be of any type, including `null`.\r\n */\r\n enum?: MaybeReadonlyArray<Value>;\r\n /**\r\n * The value of this keyword MUST be an array. When multiple occurrences of\r\n * this keyword are applicable to a single sub-instance, implementations\r\n * MUST provide a flat array of all values rather than an array of arrays.\r\n *\r\n * This keyword can be used to provide sample JSON values associated with a\r\n * particular schema, for the purpose of illustrating usage. It is\r\n * RECOMMENDED that these values be valid against the associated schema.\r\n *\r\n * Implementations MAY use the value(s) of `default`, if present, as an\r\n * additional example. If `examples` is absent, `default` MAY still be\r\n * used in this manner.\r\n */\r\n examples?: MaybeReadonlyArray<Value>;\r\n /**\r\n * The value of `exclusiveMaximum` MUST be a number, representing an\r\n * exclusive upper limit for a numeric instance.\r\n *\r\n * If the instance is a number, then the instance is valid only if it has a\r\n * value strictly less than (not equal to) `exclusiveMaximum`.\r\n */\r\n exclusiveMaximum?: number;\r\n /**\r\n * The value of `exclusiveMinimum` MUST be a number, representing an\r\n * exclusive lower limit for a numeric instance.\r\n *\r\n * If the instance is a number, then the instance is valid only if it has a\r\n * value strictly greater than (not equal to) `exclusiveMinimum`.\r\n */\r\n exclusiveMinimum?: number;\r\n /**\r\n * Implementations MAY treat `format` as an assertion in addition to an\r\n * annotation, and attempt to validate the value's conformance to the\r\n * specified semantics.\r\n *\r\n * The value of this keyword is called a format attribute. It MUST be a\r\n * string. A format attribute can generally only validate a given set\r\n * of instance types. If the type of the instance to validate is not in\r\n * this set, validation for this format attribute and instance SHOULD\r\n * succeed. Format attributes are most often applied to strings, but can\r\n * be specified to apply to any type.\r\n *\r\n * Implementations MAY support custom format attributes. Save for agreement\r\n * between parties, schema authors SHALL NOT expect a peer implementation\r\n * to support such custom format attributes. An implementation MUST NOT\r\n * fail validation or cease processing due to an unknown format attribute.\r\n * When treating `format` as an annotation, implementations SHOULD\r\n * collect both known and unknown format attribute values.\r\n */\r\n format?: string;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * This validation outcome of this keyword's subschema has no direct effect\r\n * on the overall validation result. Rather, it controls which of the\r\n * `then` or `else` keywords are evaluated.\r\n *\r\n * Instances that successfully validate against this keyword's subschema\r\n * MUST also be valid against the subschema value of the `then` keyword,\r\n * if present.\r\n *\r\n * Instances that fail to validate against this keyword's subschema MUST\r\n * also be valid against the subschema value of the `else` keyword, if\r\n * present.\r\n *\r\n * If annotations are being collected, they are collected\r\n * from this keyword's subschema in the usual way, including when the\r\n * keyword is present without either `then` or `else`.\r\n */\r\n if?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * The value of `items` MUST be a valid JSON Schema.\r\n *\r\n * This keyword applies its subschema to all instance elements at indexes\r\n * greater than the length of the `prefixItems` array in the same schema\r\n * object, as reported by the annotation result of that `prefixItems`\r\n * keyword. If no such annotation result exists, `items` applies its\r\n * subschema to all instance array elements.\r\n *\r\n * Note that the behavior of `items` without `prefixItems` is identical\r\n * to that of the schema form of `items` in prior drafts.\r\n *\r\n * When `prefixItems` is present, the behavior of `items` is identical\r\n * to the former `additionalItems` keyword.\r\n *\r\n * If the `items` subschema is applied to any positions within the\r\n * instance array, it produces an annotation result of boolean `true`,\r\n * indicating that all remaining array elements have been evaluated against\r\n * this keyword's subschema.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * Implementations MAY choose to implement or optimize this keyword\r\n * in another way that produces the same effect, such as by directly\r\n * checking for the presence and size of a `prefixItems` array.\r\n */\r\n items?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * If `contains` is not present within the same schema object, then this\r\n * keyword has no effect.\r\n *\r\n * An instance array is valid against `maxContains` in two ways,\r\n * depending on the form of the annotation result of an adjacent\r\n * `contains` keyword. The first way is if the annotation result is an\r\n * array and the length of that array is less than or equal to the\r\n * `maxContains` value. The second way is if the annotation result is a\r\n * boolean `true` and the instance array length is less than or equal to\r\n * the `maxContains` value.\r\n */\r\n maxContains?: number;\r\n /**\r\n * The value of `maximum` MUST be a number, representing an inclusive\r\n * upper limit for a numeric instance.\r\n *\r\n * If the instance is a number, then this keyword validates only if the\r\n * instance is less than or exactly equal to `maximum`.\r\n */\r\n maximum?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An array instance is valid against `maxItems` if its size is less\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * @minimum 0\r\n */\r\n maxItems?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * A string instance is valid against this keyword if its length is less\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * The length of a string instance is defined as the number of its\r\n * characters as defined by [RFC 8259][RFC8259].\r\n *\r\n * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259\r\n *\r\n * @minimum 0\r\n */\r\n maxLength?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An object instance is valid against `maxProperties` if its number of\r\n * `properties` is less than, or equal to, the value of this keyword.\r\n *\r\n * @minimum 0\r\n */\r\n maxProperties?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * If `contains` is not present within the same schema object, then this\r\n * keyword has no effect.\r\n *\r\n * An instance array is valid against `minContains` in two ways,\r\n * depending on the form of the annotation result of an adjacent\r\n * `contains` keyword. The first way is if the annotation result is an\r\n * array and the length of that array is greater than or equal to the\r\n * `minContains` value. The second way is if the annotation result is a\r\n * boolean `true` and the instance array length is greater than or equal\r\n * to the `minContains` value.\r\n *\r\n * A value of `0` is allowed, but is only useful for setting a range\r\n * of occurrences from `0` to the value of `maxContains`. A value of\r\n * `0` with no `maxContains` causes `contains` to always pass\r\n * validation.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `1`.\r\n *\r\n * @default 1\r\n */\r\n minContains?: number;\r\n /**\r\n * The value of `minimum` MUST be a number, representing an inclusive\r\n * lower limit for a numeric instance.\r\n *\r\n * If the instance is a number, then this keyword validates only if the\r\n * instance is greater than or exactly equal to `minimum`.\r\n */\r\n minimum?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An array instance is valid against `minItems` if its size is greater\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minItems?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * A string instance is valid against this keyword if its length is greater\r\n * than, or equal to, the value of this keyword.\r\n *\r\n * The length of a string instance is defined as the number of its\r\n * characters as defined by [RFC 8259][RFC8259].\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * [RFC8259]: https://datatracker.ietf.org/doc/html/rfc8259\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minLength?: number;\r\n /**\r\n * The value of this keyword MUST be a non-negative integer.\r\n *\r\n * An object instance is valid against `minProperties` if its number of\r\n * `properties` is greater than, or equal to, the value of this keyword.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `0`.\r\n *\r\n * @default 0\r\n * @minimum 0\r\n */\r\n minProperties?: number;\r\n /**\r\n * The value of `multipleOf` MUST be a number, strictly greater than\r\n * `0`.\r\n *\r\n * A numeric instance is valid only if division by this keyword's value\r\n * results in an integer.\r\n *\r\n * @exclusiveMinimum 0\r\n */\r\n multipleOf?: number;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * An instance is valid against this keyword if it fails to validate\r\n * successfully against the schema defined by this keyword.\r\n */\r\n not?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * This keyword's value MUST be a non-empty array. Each item of the array\r\n * MUST be a valid JSON Schema.\r\n *\r\n * An instance validates successfully against this keyword if it validates\r\n * successfully against exactly one schema defined by this keyword's value.\r\n */\r\n oneOf?: MaybeReadonlyArray<JSONSchema<Value, SchemaType>>;\r\n /**\r\n * The value of this keyword MUST be a string. This string SHOULD be a\r\n * valid regular expression, according to the [ECMA-262][ecma262] regular\r\n * expression dialect.\r\n *\r\n * A string instance is considered valid if the regular expression matches\r\n * the instance successfully. Recall: regular expressions are not\r\n * implicitly anchored.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n *\r\n * @format \"regex\"\r\n */\r\n pattern?: string;\r\n /**\r\n * The value of `patternProperties` MUST be an object. Each property name\r\n * of this object SHOULD be a valid regular expression, according to the\r\n * [ECMA-262][ecma262] regular expression dialect. Each property value of\r\n * this object MUST be a valid JSON Schema.\r\n *\r\n * Validation succeeds if, for each instance name that matches any regular\r\n * expressions that appear as a property name in this keyword's value,\r\n * the child instance for that name successfully validates against each\r\n * schema that corresponds to a matching regular expression.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names matched by this keyword. Omitting this keyword has the same\r\n * assertion behavior as an empty object.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n */\r\n patternProperties?: Record<string, JSONSchema>;\r\n /**\r\n * The value of `prefixItems` MUST be a non-empty array of valid JSON\r\n * Schemas.\r\n *\r\n * Validation succeeds if each element of the instance validates against\r\n * the schema at the same position, if any. This keyword does not\r\n * constrain the length of the array. If the array is longer than this\r\n * keyword's value, this keyword validates only the prefix of matching\r\n * length.\r\n *\r\n * This keyword produces an annotation value which is the largest index to\r\n * which this keyword applied a subschema. The value MAY be a boolean\r\n * `true` if a subschema was applied to every index of the instance, such\r\n * as is produced by the `items` keyword.\r\n * This annotation affects the behavior of `items` and\r\n * `unevaluatedItems`.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty array.\r\n */\r\n prefixItems?: MaybeReadonlyArray<JSONSchema> | JSONSchema;\r\n /**\r\n * The value of `properties` MUST be an object. Each value of this object\r\n * MUST be a valid JSON Schema.\r\n *\r\n * Validation succeeds if, for each name that appears in both the instance\r\n * and as a name within this keyword's value, the child instance for that\r\n * name successfully validates against the corresponding schema.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names matched by this keyword.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * object.\r\n */\r\n properties?: Record<string, JSONSchema>;\r\n /**\r\n * The value of `propertyNames` MUST be a valid JSON Schema.\r\n *\r\n * If the instance is an object, this keyword validates if every property\r\n * name in the instance validates against the provided schema.\r\n * Note the property name that the schema is testing will always be a\r\n * string.\r\n *\r\n * Omitting this keyword has the same behavior as an empty schema.\r\n */\r\n propertyNames?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword are applicable to a single sub-instance, the resulting\r\n * value MUST be `true` if any occurrence specifies a `true` value, and\r\n * MUST be `false` otherwise.\r\n *\r\n * If `readOnly` has a value of boolean `true`, it indicates that the\r\n * value of the instance is managed exclusively by the owning authority,\r\n * and attempts by an application to modify the value of this property are\r\n * expected to be ignored or rejected by that owning authority.\r\n *\r\n * An instance document that is marked as `readOnly` for the entire\r\n * document MAY be ignored if sent to the owning authority, or MAY result\r\n * in an error, at the authority's discretion.\r\n *\r\n * For example, `readOnly` would be used to mark a database-generated\r\n * serial number as read-only.\r\n *\r\n * This keyword can be used to assist in user interface instance\r\n * generation.\r\n *\r\n * @default false\r\n */\r\n readOnly?: boolean;\r\n /**\r\n * The value of this keyword MUST be an array. Elements of this array, if\r\n * any, MUST be strings, and MUST be unique.\r\n *\r\n * An object instance is valid against this keyword if every item in the\r\n * array is the name of a property in the instance.\r\n *\r\n * Omitting this keyword has the same behavior as an empty array.\r\n */\r\n required?: MaybeReadonlyArray<string>;\r\n /**\r\n * This keyword's value MUST be a valid JSON Schema.\r\n *\r\n * When `if` is present, and the instance successfully validates against\r\n * its subschema, then validation succeeds against this keyword if the\r\n * instance also successfully validates against this keyword's subschema.\r\n *\r\n * This keyword has no effect when `if` is absent, or when the instance\r\n * fails to validate against its subschema. Implementations MUST NOT\r\n * evaluate the instance against this keyword, for either validation or\r\n * annotation collection purposes, in such cases.\r\n */\r\n then?: JSONSchema<Value, SchemaType>;\r\n /**\r\n * Can be used to decorate a user interface with a short label about the\r\n * data produced.\r\n */\r\n title?: string;\r\n /**\r\n * The value of this keyword MUST be either a string or an array. If it is\r\n * an array, elements of the array MUST be strings and MUST be unique.\r\n *\r\n * String values MUST be one of the six primitive types (`\"null\"`,\r\n * `\"boolean\"`, `\"object\"`, `\"array\"`, `\"number\"`, or\r\n * `\"string\"`), or `\"integer\"` which matches any number with a zero\r\n * fractional part.\r\n *\r\n * An instance validates if and only if the instance is in any of the sets\r\n * listed for this keyword.\r\n */\r\n type?: SchemaType;\r\n /**\r\n * The value of `unevaluatedItems` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the annotation results of\r\n * adjacent keywords that apply to the instance location being validated.\r\n * Specifically, the annotations from `prefixItems`, `items`, and\r\n * `contains`, which can come from those keywords when they are adjacent\r\n * to the `unevaluatedItems` keyword. Those three annotations, as well as\r\n * `unevaluatedItems`, can also result from any and all adjacent\r\n * [in-place applicator][in-place-applicator] keywords.\r\n *\r\n * If no relevant annotations are present, the `unevaluatedItems`\r\n * subschema MUST be applied to all locations in the array.\r\n * If a boolean `true` value is present from any of the relevant\r\n * annotations, `unevaluatedItems` MUST be ignored. Otherwise, the\r\n * subschema MUST be applied to any index greater than the largest\r\n * annotation value for `prefixItems`, which does not appear in any\r\n * annotation value for `contains`.\r\n *\r\n * This means that `prefixItems`, `items`, `contains`, and all\r\n * in-place applicators MUST be evaluated before this keyword can be\r\n * evaluated. Authors of extension keywords MUST NOT define an in-place\r\n * applicator that would need to be evaluated after this keyword.\r\n *\r\n * If the `unevaluatedItems` subschema is applied to any positions within\r\n * the instance array, it produces an annotation result of boolean\r\n * `true`, analogous to the behavior of `items`.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place\r\n */\r\n unevaluatedItems?: JSONSchema;\r\n /**\r\n * The value of `unevaluatedProperties` MUST be a valid JSON Schema.\r\n *\r\n * The behavior of this keyword depends on the annotation results of\r\n * adjacent keywords that apply to the instance location being validated.\r\n * Specifically, the annotations from `properties`,\r\n * `patternProperties`, and `additionalProperties`, which can come from\r\n * those keywords when they are adjacent to the `unevaluatedProperties`\r\n * keyword. Those three annotations, as well as `unevaluatedProperties`,\r\n * can also result from any and all adjacent\r\n * [in-place applicator][in-place-applicator] keywords.\r\n *\r\n * Validation with `unevaluatedProperties` applies only to the child\r\n * values of instance names that do not appear in the `properties`,\r\n * `patternProperties`, `additionalProperties`, or\r\n * `unevaluatedProperties` annotation results that apply to the\r\n * instance location being validated.\r\n *\r\n * For all such properties, validation succeeds if the child instance\r\n * validates against the \"unevaluatedProperties\" schema.\r\n *\r\n * This means that `properties`, `patternProperties`,\r\n * `additionalProperties`, and all in-place applicators MUST be evaluated\r\n * before this keyword can be evaluated. Authors of extension keywords\r\n * MUST NOT define an in-place applicator that would need to be evaluated\r\n * after this keyword.\r\n *\r\n * The annotation result of this keyword is the set of instance property\r\n * names validated by this keyword's subschema.\r\n *\r\n * Omitting this keyword has the same assertion behavior as an empty\r\n * schema.\r\n *\r\n * [in-place-applicator]: https://json-schema.org/draft/2020-12/json-schema-core.html#in-place\r\n */\r\n unevaluatedProperties?: JSONSchema;\r\n /**\r\n * The value of this keyword MUST be a boolean.\r\n *\r\n * If this keyword has boolean value `false`, the instance validates\r\n * successfully. If it has boolean value `true`, the instance validates\r\n * successfully if all of its elements are unique.\r\n *\r\n * Omitting this keyword has the same behavior as a value of `false`.\r\n *\r\n * @default false\r\n */\r\n uniqueItems?: boolean;\r\n /**\r\n * The value of this keyword MUST be a boolean. When multiple occurrences\r\n * of this keyword is applicable to a single sub-instance, the resulting\r\n * value MUST be `true` if any occurrence specifies a `true` value, and\r\n * MUST be `false` otherwise.\r\n *\r\n * If `writeOnly` has a value of boolean `true`, it indicates that the\r\n * value is never present when the instance is retrieved from the owning\r\n * authority. It can be present when sent to the owning authority to update\r\n * or create the document (or the resource it represents), but it will not\r\n * be included in any updated or newly created version of the instance.\r\n *\r\n * An instance document that is marked as `writeOnly` for the entire\r\n * document MAY be returned as a blank document of some sort, or MAY\r\n * produce an error upon retrieval, or have the retrieval request ignored,\r\n * at the authority's discretion.\r\n *\r\n * For example, `writeOnly` would be used to mark a password input field.\r\n *\r\n * These keywords can be used to assist in user interface instance\r\n * generation. In particular, an application MAY choose to use a widget\r\n * that hides input values as they are typed for write-only fields.\r\n *\r\n * @default false\r\n */\r\n writeOnly?: boolean;\r\n};\r\nexport declare namespace JSONSchema {\r\n type TypeValue = ValueOf<TypeName> | TypeName | Array<ValueOf<TypeName> | TypeName> | ReadonlyArray<ValueOf<TypeName> | TypeName>;\r\n /**\r\n * JSON Schema interface\r\n */\r\n type Interface<Value = any, SchemaType extends TypeValue = TypeValue> = Exclude<JSONSchema<Value, SchemaType>, boolean>;\r\n type Array<T = any> = Pick<Interface<T, \"array\">, KeywordByType.Any | KeywordByType.Array>;\r\n type Boolean = Pick<Interface<boolean, \"boolean\">, KeywordByType.Any>;\r\n type Integer = Pick<Interface<number, \"integer\">, KeywordByType.Any | KeywordByType.Number>;\r\n type Number = Pick<Interface<number, \"number\">, KeywordByType.Any | KeywordByType.Number>;\r\n type Null = Pick<Interface<null, \"null\">, KeywordByType.Any>;\r\n type Object<T = any> = Pick<Interface<T, \"object\">, KeywordByType.Any | KeywordByType.Object>;\r\n type String = Pick<Interface<string, \"string\">, KeywordByType.Any | KeywordByType.String>;\r\n}\r\ndeclare namespace KeywordByType {\r\n type Any = \"$anchor\" | \"$comment\" | \"$defs\" | \"$dynamicAnchor\" | \"$dynamicRef\" | \"$id\" | \"$ref\" | \"$schema\" | \"$vocabulary\" | \"allOf\" | \"anyOf\" | \"const\" | \"default\" | \"definitions\" | \"deprecated\" | \"description\" | \"else\" | \"enum\" | \"examples\" | \"format\" | \"if\" | \"not\" | \"oneOf\" | \"readOnly\" | \"then\" | \"title\" | \"type\" | \"writeOnly\";\r\n type Array = \"additionalItems\" | \"contains\" | \"items\" | \"maxContains\" | \"maxItems\" | \"minContains\" | \"minItems\" | \"prefixItems\" | \"unevaluatedItems\" | \"uniqueItems\";\r\n type Number = \"exclusiveMaximum\" | \"exclusiveMinimum\" | \"maximum\" | \"minimum\" | \"multipleOf\";\r\n type Object = \"additionalProperties\" | \"dependencies\" | \"dependentRequired\" | \"dependentSchemas\" | \"maxProperties\" | \"minProperties\" | \"patternProperties\" | \"properties\" | \"propertyNames\" | \"required\" | \"unevaluatedProperties\";\r\n type String = \"contentEncoding\" | \"contentMediaType\" | \"contentSchema\" | \"maxLength\" | \"minLength\" | \"pattern\";\r\n}\r\n/**\r\n * Content encoding strategy enum.\r\n *\r\n * - [Content-Transfer-Encoding Syntax](https://datatracker.ietf.org/doc/html/rfc2045#section-6.1)\r\n * - [7bit vs 8bit encoding](https://stackoverflow.com/questions/25710599/content-transfer-encoding-7bit-or-8-bit/28531705#28531705)\r\n */\r\nexport declare enum ContentEncoding {\r\n /**\r\n * Only US-ASCII characters, which use the lower 7 bits for each character.\r\n *\r\n * Each line must be less than 1,000 characters.\r\n */\r\n \"7bit\" = \"7bit\",\r\n /**\r\n * Allow extended ASCII characters which can use the 8th (highest) bit to\r\n * indicate special characters not available in 7bit.\r\n *\r\n * Each line must be less than 1,000 characters.\r\n */\r\n \"8bit\" = \"8bit\",\r\n /**\r\n * Useful for data that is mostly non-text.\r\n */\r\n Base64 = \"base64\",\r\n /**\r\n * Same character set as 8bit, with no line length restriction.\r\n */\r\n Binary = \"binary\",\r\n /**\r\n * An extension token defined by a standards-track RFC and registered with\r\n * IANA.\r\n */\r\n IETFToken = \"ietf-token\",\r\n /**\r\n * Lines are limited to 76 characters, and line breaks are represented using\r\n * special characters that are escaped.\r\n */\r\n QuotedPrintable = \"quoted-printable\",\r\n /**\r\n * The two characters \"X-\" or \"x-\" followed, with no intervening white space,\r\n * by any token.\r\n */\r\n XToken = \"x-token\"\r\n}\r\n/**\r\n * This enum provides well-known formats that apply to strings.\r\n */\r\nexport declare enum Format {\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"full-date\" production in\r\n * [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n Date = \"date\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"date-time\" production in\r\n * [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n DateTime = \"date-time\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"duration\" production.\r\n */\r\n Duration = \"duration\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid Internet\r\n * email address as defined by by the \"Mailbox\" ABNF rule in [RFC\r\n * 5321][RFC5322], section 4.1.2.\r\n *\r\n * [RFC5321]: https://datatracker.ietf.org/doc/html/rfc5321\r\n */\r\n Email = \"email\",\r\n /**\r\n * As defined by [RFC 1123, section 2.1][RFC1123], including host names\r\n * produced using the Punycode algorithm specified in\r\n * [RFC 5891, section 4.4][RFC5891].\r\n *\r\n * [RFC1123]: https://datatracker.ietf.org/doc/html/rfc1123\r\n * [RFC5891]: https://datatracker.ietf.org/doc/html/rfc5891\r\n */\r\n Hostname = \"hostname\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid Internet\r\n * email address as defined by the extended \"Mailbox\" ABNF rule in\r\n * [RFC 6531][RFC6531], section 3.3.\r\n *\r\n * [RFC6531]: https://datatracker.ietf.org/doc/html/rfc6531\r\n */\r\n IDNEmail = \"idn-email\",\r\n /**\r\n * As defined by either [RFC 1123, section 2.1][RFC1123] as for hostname, or\r\n * an internationalized hostname as defined by\r\n * [RFC 5890, section 2.3.2.3][RFC5890].\r\n *\r\n * [RFC1123]: https://datatracker.ietf.org/doc/html/rfc1123\r\n * [RFC5890]: https://datatracker.ietf.org/doc/html/rfc5890\r\n */\r\n IDNHostname = \"idn-hostname\",\r\n /**\r\n * An IPv4 address according to the \"dotted-quad\" ABNF syntax as defined in\r\n * [RFC 2673, section 3.2][RFC2673].\r\n *\r\n * [RFC2673]: https://datatracker.ietf.org/doc/html/rfc2673\r\n */\r\n IPv4 = \"ipv4\",\r\n /**\r\n * An IPv6 address as defined in [RFC 4291, section 2.2][RFC4291].\r\n *\r\n * [RFC4291]: https://datatracker.ietf.org/doc/html/rfc4291\r\n */\r\n IPv6 = \"ipv6\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid IRI,\r\n * according to [RFC 3987][RFC3987].\r\n *\r\n * [RFC3987]: https://datatracker.ietf.org/doc/html/rfc3987\r\n */\r\n IRI = \"iri\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid IRI\r\n * Reference (either an IRI or a relative-reference), according to\r\n * [RFC 3987][RFC3987].\r\n *\r\n * [RFC3987]: https://datatracker.ietf.org/doc/html/rfc3987\r\n */\r\n IRIReference = \"iri-reference\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid JSON\r\n * string representation of a JSON Pointer, according to\r\n * [RFC 6901, section 5][RFC6901].\r\n *\r\n * [RFC6901]: https://datatracker.ietf.org/doc/html/rfc6901\r\n */\r\n JSONPointer = \"json-pointer\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid JSON\r\n * string representation of a JSON Pointer fragment, according to\r\n * [RFC 6901, section 5][RFC6901].\r\n *\r\n * [RFC6901]: https://datatracker.ietf.org/doc/html/rfc6901\r\n */\r\n JSONPointerURIFragment = \"json-pointer-uri-fragment\",\r\n /**\r\n * This attribute applies to string instances.\r\n *\r\n * A regular expression, which SHOULD be valid according to the\r\n * [ECMA-262][ecma262] regular expression dialect.\r\n *\r\n * Implementations that validate formats MUST accept at least the subset of\r\n * [ECMA-262][ecma262] defined in the [Regular Expressions][regexInterop]\r\n * section of this specification, and SHOULD accept all valid\r\n * [ECMA-262][ecma262] expressions.\r\n *\r\n * [ecma262]: https://www.ecma-international.org/publications-and-standards/standards/ecma-262/\r\n * [regexInterop]: https://json-schema.org/draft/2020-12/json-schema-validation.html#regexInterop\r\n */\r\n RegEx = \"regex\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * [Relative JSON Pointer][relative-json-pointer].\r\n *\r\n * [relative-json-pointer]: https://datatracker.ietf.org/doc/html/draft-handrews-relative-json-pointer-01\r\n */\r\n RelativeJSONPointer = \"relative-json-pointer\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid\r\n * representation according to the \"time\" production in [RFC 3339][RFC3339].\r\n *\r\n * [RFC3339]: https://datatracker.ietf.org/doc/html/rfc3339\r\n */\r\n Time = \"time\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI,\r\n * according to [RFC3986][RFC3986].\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n */\r\n URI = \"uri\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI\r\n * Reference (either a URI or a relative-reference), according to\r\n * [RFC3986][RFC3986].\r\n *\r\n * [RFC3986]: https://datatracker.ietf.org/doc/html/rfc3986\r\n */\r\n URIReference = \"uri-reference\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid URI\r\n * Template (of any level), according to [RFC 6570][RFC6570].\r\n *\r\n * Note that URI Templates may be used for IRIs; there is no separate IRI\r\n * Template specification.\r\n *\r\n * [RFC6570]: https://datatracker.ietf.org/doc/html/rfc6570\r\n */\r\n URITemplate = \"uri-template\",\r\n /**\r\n * A string instance is valid against this attribute if it is a valid string\r\n * representation of a UUID, according to [RFC 4122][RFC4122].\r\n *\r\n * [RFC4122]: https://datatracker.ietf.org/doc/html/rfc4122\r\n */\r\n UUID = \"uuid\"\r\n}\r\n/**\r\n * Enum consisting of simple type names for the `type` keyword\r\n */\r\nexport declare enum TypeName {\r\n /**\r\n * Value MUST be an array.\r\n */\r\n Array = \"array\",\r\n /**\r\n * Value MUST be a boolean.\r\n */\r\n Boolean = \"boolean\",\r\n /**\r\n * Value MUST be an integer, no floating point numbers are allowed. This is a\r\n * subset of the number type.\r\n */\r\n Integer = \"integer\",\r\n /**\r\n * Value MUST be null. Note this is mainly for purpose of being able use union\r\n * types to define nullability. If this type is not included in a union, null\r\n * values are not allowed (the primitives listed above do not allow nulls on\r\n * their own).\r\n */\r\n Null = \"null\",\r\n /**\r\n * Value MUST be a number, floating point numbers are allowed.\r\n */\r\n Number = \"number\",\r\n /**\r\n * Value MUST be an object.\r\n */\r\n Object = \"object\",\r\n /**\r\n * Value MUST be a string.\r\n */\r\n String = \"string\"\r\n}\r\nexport declare const keywords: readonly [\"$anchor\", \"$comment\", \"$defs\", \"$dynamicAnchor\", \"$dynamicRef\", \"$id\", \"$ref\", \"$schema\", \"$vocabulary\", \"additionalItems\", \"additionalProperties\", \"allOf\", \"anyOf\", \"const\", \"contains\", \"contentEncoding\", \"contentMediaType\", \"contentSchema\", \"default\", \"definitions\", \"dependencies\", \"dependentRequired\", \"dependentSchemas\", \"deprecated\", \"description\", \"else\", \"enum\", \"examples\", \"exclusiveMaximum\", \"exclusiveMinimum\", \"format\", \"if\", \"items\", \"maxContains\", \"maximum\", \"maxItems\", \"maxLength\", \"maxProperties\", \"minContains\", \"minimum\", \"minItems\", \"minLength\", \"minProperties\", \"multipleOf\", \"not\", \"oneOf\", \"pattern\", \"patternProperties\", \"prefixItems\", \"properties\", \"propertyNames\", \"readOnly\", \"required\", \"then\", \"title\", \"type\", \"unevaluatedItems\", \"unevaluatedProperties\", \"uniqueItems\", \"writeOnly\"];\r\nexport {};\r\n"],"x_google_ignoreList":[0],"mappings":";;KAEKE,kBAA8BC,CAAAA,CAAAA,CAAAA,GAANC,KAAMD,CAAAA,CAAAA,CAAAA,GAAKE,aAALF,CAAmBA,CAAnBA,CAAAA;KAC9BG,OADwBF,CAAAA,CAAAA,CAAAA,GACXD,CADWC,CAAAA,MACHD,CADGC,CAAAA;;;;AACxBE,KAIOC,UAJAJ,CAAAA,QAAcA,GAAC,EAAA,cAIsBK,KAJtB,SAAA,OAAA,GAAA,SAAA,GAI0DA,KAJ1D,SAAA,IAAA,GAAA,MAAA,GAIwFA,KAJxF,SAAA,MAAA,GAAA,QAAA,GAAA,SAAA,GAIsIA,KAJtI,SAAA,MAAA,GAAA,QAAA,GAIwKA,KAJxK,SAAA,OAAA,EAAA,GAAA,OAAA,GAI4MA,KAJ5M,SAI0NE,MAJ1N,CAAA,MAAA,GAAA,MAAA,EAAA,OAAA,CAAA,GAAA,QAAA,GAIwQH,UAAAA,CAAWI,SAJnR,EAAA,GAAA,OAAA,GAAA;EAIfJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2WQA,OAAAA,CAAAA,EAAAA,MAAAA;EAMNC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyYuBD,QAAAA,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;;AAAmHJ,KCMvG,cAAA,GAAiB,UAAA,CAAW,SDN2EA;;;;AAAkIE,KCWzO,yBDXyOA,CAAAA,CAAAA,CAAAA,GAAAA;EAA8CH,KAAAA,EAAAA,IAAWI;EAqEnRJ,IAAAA,ECzDA,CDyDAA;EAAfG,YAAAA,EAAAA,SAAAA;CAsKMA,GAAAA;EAKIH,KAAAA,EAAAA,KAAAA;EA0BKA,IAAAA,EAAAA,SAAAA;EAQeC,YAAAA,EAAAA,MAAAA;CAAOC;;;;AASAA,KCzQrC,mBDyQqCA,CAAAA,CAAAA,CAAAA,GAAAA,CAAAA,KAAAA,EAAAA,OAAAA,EAAAA,GCzQQ,yBDyQRA,CCzQkC,CDyQlCA,CAAAA;;;;;;;;;;;;;;;;;;;;;;;;AAgLtCP,UChaM,mBAAA,CDgaNA;EAcuBM;;;;;;EAqObA,YAAAA,CAAAA,CAAAA,CAAAA,CAAAA,MAAAA,EC5oBO,cD4oBPA,CAAAA,EC5oBwB,mBD4oBxBA,CC5oB4C,CD4oB5CA,CAAAA"} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
81
17.39%6163601
-13.43%2
100%40402
-5.15%+ Added