@power-plant/schema 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codegen.cjs +77 -1
- package/dist/codegen.d.cts +1 -1
- package/dist/codegen.d.mts +1 -1
- package/dist/codegen.mjs +78 -1
- package/dist/codegen.mjs.map +1 -0
- package/dist/constants-CwyhgVEl.cjs +1 -0
- package/dist/constants-lk1mMbgx.mjs +2 -0
- package/dist/constants-lk1mMbgx.mjs.map +1 -0
- package/dist/helpers-B5sr5S3X.cjs +1 -0
- package/dist/helpers-Bh_V7xwV.mjs +2 -0
- package/dist/helpers-Bh_V7xwV.mjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +616 -31
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +616 -31
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -0
- package/dist/{types.d.cts → types-BawP3FVI.d.mts} +81 -180
- package/dist/types-BawP3FVI.d.mts.map +1 -0
- package/dist/{types.d.mts → types-BmNamqlM.d.cts} +80 -179
- package/dist/types-BmNamqlM.d.cts.map +1 -0
- package/dist/valibot.cjs +1 -0
- package/dist/valibot.d.cts +14 -0
- package/dist/valibot.d.cts.map +1 -0
- package/dist/valibot.d.mts +14 -0
- package/dist/valibot.d.mts.map +1 -0
- package/dist/valibot.mjs +2 -0
- package/dist/valibot.mjs.map +1 -0
- package/dist/zod.cjs +1 -0
- package/dist/zod.d.cts +14 -0
- package/dist/zod.d.cts.map +1 -0
- package/dist/zod.d.mts +14 -0
- package/dist/zod.d.mts.map +1 -0
- package/dist/zod.mjs +2 -0
- package/dist/zod.mjs.map +1 -0
- package/package.json +26 -91
- package/dist/constants-u7ovYS9e.d.cts +0 -31
- package/dist/constants-u7ovYS9e.d.cts.map +0 -1
- package/dist/constants-u7ovYS9e.d.mts +0 -31
- package/dist/constants-u7ovYS9e.d.mts.map +0 -1
- package/dist/constants.cjs +0 -1
- package/dist/constants.d.cts +0 -2
- package/dist/constants.d.mts +0 -2
- package/dist/constants.mjs +0 -2
- package/dist/constants.mjs.map +0 -1
- package/dist/extract.cjs +0 -1
- package/dist/extract.d.cts +0 -143
- package/dist/extract.d.cts.map +0 -1
- package/dist/extract.d.mts +0 -143
- package/dist/extract.d.mts.map +0 -1
- package/dist/extract.mjs +0 -2
- package/dist/extract.mjs.map +0 -1
- package/dist/helpers.cjs +0 -1
- package/dist/helpers.d.cts +0 -134
- package/dist/helpers.d.cts.map +0 -1
- package/dist/helpers.d.mts +0 -134
- package/dist/helpers.d.mts.map +0 -1
- package/dist/helpers.mjs +0 -1
- package/dist/metadata-CsY3HrP2.cjs +0 -77
- package/dist/metadata-DIEpQjbq.mjs +0 -78
- package/dist/metadata-DIEpQjbq.mjs.map +0 -1
- package/dist/metadata.cjs +0 -1
- package/dist/metadata.d.cts +0 -94
- package/dist/metadata.d.cts.map +0 -1
- package/dist/metadata.d.mts +0 -94
- package/dist/metadata.d.mts.map +0 -1
- package/dist/metadata.mjs +0 -1
- package/dist/type-checks.cjs +0 -1
- package/dist/type-checks.d.cts +0 -331
- package/dist/type-checks.d.cts.map +0 -1
- package/dist/type-checks.d.mts +0 -331
- package/dist/type-checks.d.mts.map +0 -1
- package/dist/type-checks.mjs +0 -2
- package/dist/type-checks.mjs.map +0 -1
- package/dist/types.cjs +0 -0
- package/dist/types.d.cts.map +0 -1
- package/dist/types.d.mts.map +0 -1
- package/dist/types.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import"./types.mjs";import{JSON_SCHEMA_METADATA_KEYS as e,JSON_SCHEMA_PRIMITIVE_TYPES as t,JSON_SCHEMA_TYPES as n,JsonSchemaTypeNames as r,SCHEMA_ARRAY_CONCAT_KEYWORDS as i,SCHEMA_RECORD_KEYWORDS as a,SCHEMA_SINGLE_KEYWORDS as o}from"./constants.mjs";import{isFileReference as s,isJsonSchema as c,isJsonSchemaAllOf as l,isJsonSchemaAny as u,isJsonSchemaAnyOf as d,isJsonSchemaArray as f,isJsonSchemaBigint as p,isJsonSchemaBoolean as m,isJsonSchemaDate as h,isJsonSchemaDecimal as g,isJsonSchemaEnum as _,isJsonSchemaInteger as v,isJsonSchemaKeywords as y,isJsonSchemaLiteral as b,isJsonSchemaMap as x,isJsonSchemaNativeEnum as S,isJsonSchemaNever as C,isJsonSchemaNull as w,isJsonSchemaNullable as T,isJsonSchemaNumber as E,isJsonSchemaObject as D,isJsonSchemaPrimitiveType as O,isJsonSchemaPrimitiveUnion as k,isJsonSchemaRecord as A,isJsonSchemaRef as j,isJsonSchemaSet as M,isJsonSchemaString as N,isJsonSchemaTuple as P,isJsonSchemaType as F,isJsonSchemaUndefined as I,isJsonSchemaUnion as L,isJsonSchemaUnknown as R,isNullOnlyJsonSchema as z,isSchema as B,isSchemaObject as V,isSchemaOf as H,isSchemaWithSource as U,isStandardSchema as W,isUntypedInput as G,isUntypedInputStrict as K,isUntypedSchema as q,isUntypedSchemaStrict as J,isValibotSchema as Y}from"./type-checks.mjs";import{C as X,E as Z,S as Q,T as $,_ as ee,a as te,b as ne,c as re,d as ie,f as ae,g as oe,h as se,i as ce,l as le,m as ue,n as de,o as fe,p as pe,r as me,s as he,t as ge,u as _e,v as ve,w as ye,x as be,y as xe}from"./metadata-DIEpQjbq.mjs";import{bundleReferences as Se,extract as Ce,extractHash as we,extractJsonSchema as Te,extractResolvedVariant as Ee,extractSchema as De,extractSchemaMeta as Oe,extractSchemaWithSource as ke,extractSource as Ae,extractTSType as je,extractVariant as Me}from"./extract.mjs";export{e as JSON_SCHEMA_METADATA_KEYS,t as JSON_SCHEMA_PRIMITIVE_TYPES,n as JSON_SCHEMA_TYPES,r as JsonSchemaTypeNames,i as SCHEMA_ARRAY_CONCAT_KEYWORDS,a as SCHEMA_RECORD_KEYWORDS,o as SCHEMA_SINGLE_KEYWORDS,oe as addProperty,ge as applyJsonSchemaMetadata,Se as bundleReferences,Ce as extract,we as extractHash,Te as extractJsonSchema,Ee as extractResolvedVariant,De as extractSchema,Oe as extractSchemaMeta,ke as extractSchemaWithSource,Ae as extractSource,je as extractTSType,Me as extractVariant,de as formatMetaVersion,ae as generateParserCode,ee as getJsonSchema,ve as getJsonSchemaObject,pe as getJsonSchemaType,me as getPrimarySchemaType,xe as getProperties,ne as getPropertiesList,be as getProperty,s as isFileReference,c as isJsonSchema,l as isJsonSchemaAllOf,u as isJsonSchemaAny,d as isJsonSchemaAnyOf,f as isJsonSchemaArray,p as isJsonSchemaBigint,m as isJsonSchemaBoolean,h as isJsonSchemaDate,g as isJsonSchemaDecimal,_ as isJsonSchemaEnum,v as isJsonSchemaInteger,y as isJsonSchemaKeywords,b as isJsonSchemaLiteral,x as isJsonSchemaMap,S as isJsonSchemaNativeEnum,C as isJsonSchemaNever,w as isJsonSchemaNull,T as isJsonSchemaNullable,E as isJsonSchemaNumber,D as isJsonSchemaObject,O as isJsonSchemaPrimitiveType,k as isJsonSchemaPrimitiveUnion,A as isJsonSchemaRecord,j as isJsonSchemaRef,M as isJsonSchemaSet,N as isJsonSchemaString,P as isJsonSchemaTuple,F as isJsonSchemaType,I as isJsonSchemaUndefined,L as isJsonSchemaUnion,R as isJsonSchemaUnknown,z as isNullOnlyJsonSchema,Q as isPropertyOptional,B as isSchema,X as isSchemaNullable,V as isSchemaObject,H as isSchemaOf,U as isSchemaWithSource,W as isStandardSchema,G as isUntypedInput,K as isUntypedInputStrict,q as isUntypedSchema,J as isUntypedSchemaStrict,Y as isValibotSchema,ye as isValidSchemaInputFile,$ as merge,Z as mergeMetadata,ce as readSchemaTypes,te as resolveMetaDescription,fe as resolveMetaDisplayName,he as resolveMetaExample,re as resolveMetaId,le as resolveMetaLinks,_e as resolveMetaName,ie as resolveMetaVersion,ue as stringifyType,se as stringifyValue};
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./constants-lk1mMbgx.mjs";import{$ as s,A as c,B as ee,C as te,D as ne,E as re,F as l,G as u,H as ie,I as ae,J as d,K as f,L as oe,M as se,N as ce,O as le,P as ue,Q as de,R as fe,S as pe,T as me,U as he,V as ge,W as _e,X as p,Y as ve,Z as m,_ as ye,a as be,b as h,c as xe,d as Se,et as g,f as Ce,g as _,h as v,i as we,j as Te,k as Ee,l as De,m as Oe,n as y,nt as b,o as x,p as S,q as C,r as w,rt as T,s as ke,t as Ae,tt as E,u as je,v as Me,w as Ne,x as Pe,y as Fe,z as Ie}from"./helpers-Bh_V7xwV.mjs";import{extractFileReference as D}from"@stryke/convert/extract-file-reference";import{murmurhash as O}from"@stryke/hash";import{deepClone as Le}from"@stryke/helpers/deep-clone";import{isStandardJsonSchema as k}from"@stryke/json";import{findFileExtensionSafe as Re}from"@stryke/path/find";import{VALID_OBJECT_SOURCE_EXTENSIONS as A}from"@stryke/resolve/constants";import{loadSafe as ze}from"@stryke/resolve/load";import{list as Be}from"@stryke/string-format/list";import{isSetString as j}from"@stryke/type-checks";import{isSetObject as M}from"@stryke/type-checks/is-set-object";import{extractJsonSchema as Ve,isZod3Type as N}from"@stryke/zod";import{toJsonSchema as He}from"@valibot/to-json-schema";import{createGenerator as Ue}from"ts-json-schema-generator/dist/factory/generator.js";const P=`https://power-plant.invalid/`;function We(e){return!(!M(e)||!(`schema`in e)||`hash`in e||`variant`in e||`source`in e)}function F(e){return We(e)?e.schema:e}function I(e){return e.endsWith(`#`)?e.slice(0,-1):e}function L(e){let t=e.indexOf(`#`);return t>=0?e.slice(0,t):e}function Ge(e){return e.replaceAll(`~`,`~0`).replaceAll(`/`,`~1`)}function Ke(e){return e.length===0?``:`/${e.map(e=>Ge(e)).join(`/`)}`}function R(e,t){try{return I(new URL(e,t).toString())}catch{return I(e)}}function z(e,t,n,r,i){if(!M(e))return;let a=e,o=Ke(t),s=j(a.$id)?R(a.$id,n):n,c=L(s);if(r.set(s,o),r.set(c,o),j(a.$anchor)&&r.set(`${c}#${a.$anchor}`,o),j(a.$dynamicAnchor)){let e=`${c}#${a.$dynamicAnchor}`;r.set(e,o),i.set(e,`#${a.$dynamicAnchor}`)}for(let[e,n]of Object.entries(a)){if(Array.isArray(n)){n.forEach((n,a)=>{z(n,[...t,e,String(a)],s,r,i)});continue}z(n,[...t,e],s,r,i)}}function B(e,t,n,r,i){if(!M(e))return;let a=e,o=j(a.$id)?R(a.$id,n):n;if(j(a.$ref)){let e=R(a.$ref,o),t=r.get(e)??r.get(L(e));t!==void 0&&(a.$ref=t.length>0?`#${t}`:`#`)}if(j(a.$dynamicRef)){let e=R(a.$dynamicRef,o),t=i.get(e);if(t)a.$dynamicRef=t;else{let t=r.get(e)??r.get(L(e));t!==void 0&&(a.$dynamicRef=t.length>0?`#${t}`:`#`)}}for(let[e,n]of Object.entries(a)){if(Array.isArray(n)){n.forEach((n,a)=>{B(n,[...t,e,String(a)],o,r,i)});continue}B(n,[...t,e],o,r,i)}}function V(e){if(!M(e))return e;let t=Le(e),n=j(t.$id)?R(t.$id,P):P,r=new Map,i=new Map;return z(t,[],n,r,i),B(t,[],n,r,i),t}function H(e){if(E(e))return W(e);if(M(e)){if(s(e))return G(e);let t=e;if(`$schema`in t&&E(t.$schema))return W(t.$schema)}return e}function qe(e){return Array.isArray(e)?e.map(e=>H(e)):e}function U(e){return He(e,{target:`draft-2020-12`})}function W(e){let t=e,n={};for(let[e,r]of Object.entries(t))if(!(e===`tsType`||e===`markdownType`||e===`tags`||e===`args`||e===`resolve`)){if(e===`id`&&j(r)){n.$id=r;continue}if(e===`properties`||e===`patternProperties`||e===`dependentSchemas`||e===`$defs`||e===`definitions`){if(!M(r)){n[e]=r;continue}n[e]=Object.fromEntries(Object.entries(r).map(([e,t])=>[e,H(t)]));continue}if(e===`items`||e===`contains`||e===`if`||e===`then`||e===`else`||e===`not`||e===`propertyNames`||e===`additionalProperties`||e===`unevaluatedProperties`){n[e]=H(r);continue}if(e===`oneOf`||e===`anyOf`||e===`allOf`){n[e]=qe(r);continue}n[e]=r}return n}function G(e){let t=e,n=E(t.$schema)?W(t.$schema):{},r={};for(let[e,n]of Object.entries(t)){if(e.startsWith(`$`)||!M(n))continue;if(s(n)){r[e]=G(n);continue}let t=n;if(`$schema`in t&&E(t.$schema)){r[e]=W(t.$schema);continue}E(n)&&(r[e]=W(n))}if(!l(n))throw Error(`Failed to convert untyped input to JSON Schema. The base schema must be a valid JSON Schema object.`);let i={...M(n.properties)?n.properties:{},...r};return{...n,type:n.type??`object`,...Object.keys(i).length>0?{properties:i}:{}}}function K(e,t){let n=F(t);if(m(n)||d(n))return O({variant:e,input:n.schema});if(j(n)||typeof n==`boolean`)return O({variant:e,input:n});if(M(n)){if(N(n))return O({variant:e,input:n._def});if(k(n))return O({variant:e,input:n[`~standard`]});if(_(n))return O({variant:e,input:n});if(T(n))return O({variant:e,input:U(n)});if(s(n))return O({variant:e,input:G(n)});if(E(n))return O({variant:e,input:W(n)})}throw Error(`Failed to create an input hash for the provided schema definition input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, or a reflected Deepkit Type object.`)}function q(e){if(M(e)){if(N(e))return Ve(e,{target:`draft-2020-12`});if(g(e))return G(e);if(b(e))return W(e);if(k(e))return e[`~standard`].jsonSchema.input({target:`draft-2020-12`});if(T(e))return U(e);if(_(e))return e}}function J(e){if(M(e)){if(N(e))return`zod3`;if(g(e)||b(e))return`untyped`;if(k(e))return`standard-schema`;if(_(e))return`json-schema`;if(T(e))return`valibot`}throw Error(`Failed to determine the variant of the provided schema definition input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, a reflected Deepkit Type object, or an Untyped schema.`)}function Y(e){let t=F(e);return m(t)||d(t)?t.variant:j(t)||v(t)?`file-reference`:J(t)}async function X(e,t){if(m(e))return e.schema;let n=t??J(e),r;if((n===`zod3`||n===`json-schema`||n===`standard-schema`||n===`untyped`||n===`valibot`)&&(r=q(e)),r)return V(r);throw Error(`Failed to extract a valid schema from the provided input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, a Valibot BaseSchema, an untyped schema, or a reflected Deepkit Type object.`)}function Z(e,t){if(e===`zod3`)return{hash:K(e,t),variant:`zod3`,schema:t};if(e===`untyped`)return{hash:K(e,t),variant:`untyped`,schema:t};if(e===`standard-schema`)return{hash:K(e,t),variant:`standard-schema`,schema:t};if(e===`json-schema`)return{hash:K(e,t),variant:`json-schema`,schema:t};if(e===`valibot`)return{hash:K(e,t),variant:`valibot`,schema:t};throw Error(`Failed to extract source information from the provided input. The input must be a Zod schema, a Standard JSON Schema, a JSON Schema object, an untyped schema, or a reflected Deepkit Type object.`)}async function Q(e,t={}){let n=D(e);if(!n)throw Error(`Failed to extract a file reference from the provided input. The input must be a string or an object with a "file" property that specifies the file path and optional export name.`);let r=n.export??`*`;try{return Ue({path:n.file,type:r,expose:`export`,jsDoc:`extended`,...t}).createSchema(r)}catch(e){throw Error(`Failed to generate a JSON schema for "${n.file}" using the type "${r}". Error: ${e.message}`)}}async function $(e,t={}){let n=F(e);if(m(n))return n;if(d(n))return{...n,source:{hash:K(`json-schema`,n.schema),variant:`json-schema`,schema:n.schema}};let r,i=Y(n),a=K(i,n);if(i===`file-reference`){let e=D(n);if(!e)throw Error(`Failed to extract a valid file reference from the provided input "${JSON.stringify(n)}". Please ensure that the input is correctly formatted as a file reference (e.g. "./schema.ts#MySchema") and that the file exists at the specified path.`);let i=Re(e.file);if(i&&!A.includes(i))throw Error(`The provided schema file input "${e.file}" has an invalid file extension (.${i}). Please ensure that the file has one of the following extensions: ${Be(A,{conjunction:`or`})}.`);let a=await ze(n,t);a??=await Q(n,t);let o=F(a);r=m(o)?o.source:d(o)?{hash:K(`json-schema`,o.schema),variant:`json-schema`,schema:o.schema}:Z(J(o),o)}else if([`json-schema`,`standard-schema`,`zod3`,`untyped`,`valibot`,`reflection`].includes(i))r=Z(i,n);else throw Error(`Invalid schema definition input "${i}". The variant must be one of "file-reference", "json-schema", "standard-schema", "zod3", "valibot", "untyped", or "reflection".`);return{variant:i,source:r,schema:await X(r.schema,r.variant),hash:a}}async function Je(e,t={}){let n=F(e);if(m(n)||p(n))return n;let r=await $(e,t);if(!r?.schema)throw Error(`Failed to extract a valid schema from the provided input. The input must be a Zod schema, a Valibot schema, any Standard JSON Schema type, a plain JSON Schema object, an untyped schema, or a reflected Deepkit Type object.`);return r}export{o as JSON_SCHEMA_METADATA_KEYS,n as JSON_SCHEMA_PRIMITIVE_TYPES,i as JSON_SCHEMA_TYPES,t as JsonSchemaTypeNames,e as SCHEMA_ARRAY_CONCAT_KEYWORDS,r as SCHEMA_RECORD_KEYWORDS,a as SCHEMA_SINGLE_KEYWORDS,Ae as addProperty,Ce as applyJsonSchemaMetadata,V as bundleReferences,Je as extract,K as extractHash,q as extractJsonSchema,J as extractResolvedVariant,X as extractSchema,$ as extractSchemaWithSource,Z as extractSource,Q as extractTSType,Y as extractVariant,y as getJsonSchema,w as getJsonSchemaObject,S as getPrimarySchemaType,we as getProperties,be as getPropertiesList,x as getProperty,v as isFileReference,_ as isJsonSchema,ye as isJsonSchemaAllOf,Me as isJsonSchemaAny,Fe as isJsonSchemaAnyOf,h as isJsonSchemaArray,Pe as isJsonSchemaBigint,pe as isJsonSchemaBoolean,te as isJsonSchemaDate,Ne as isJsonSchemaDecimal,me as isJsonSchemaEnum,re as isJsonSchemaInteger,ne as isJsonSchemaKeywords,le as isJsonSchemaLiteral,Ee as isJsonSchemaMap,c as isJsonSchemaNativeEnum,Te as isJsonSchemaNever,se as isJsonSchemaNull,ce as isJsonSchemaNullable,ue as isJsonSchemaNumber,l as isJsonSchemaObject,ae as isJsonSchemaPrimitiveType,oe as isJsonSchemaPrimitiveUnion,fe as isJsonSchemaRecord,Ie as isJsonSchemaRef,ee as isJsonSchemaSet,ge as isJsonSchemaString,ie as isJsonSchemaTuple,he as isJsonSchemaType,_e as isJsonSchemaUndefined,u as isJsonSchemaUnion,f as isJsonSchemaUnknown,C as isNullOnlyJsonSchema,ke as isPropertyOptional,d as isSchema,xe as isSchemaNullable,ve as isSchemaObject,p as isSchemaOf,m as isSchemaWithSource,de as isStandardSchema,s as isUntypedConfig,g as isUntypedConfigStrict,E as isUntypedSchema,b as isUntypedSchemaStrict,T as isValibotSchema,De as isValidSchemaConfigFile,je as merge,Se as mergeMetadata,Oe as readSchemaTypes};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":[],"mappings":""}
|
|
@@ -1,11 +1,38 @@
|
|
|
1
|
-
import { n as JSON_SCHEMA_PRIMITIVE_TYPES, r as JSON_SCHEMA_TYPES } from "./constants-u7ovYS9e.cjs";
|
|
2
|
-
import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
3
|
-
import { InferLoadOptions, LoadInput } from "@stryke/resolve/types";
|
|
4
|
-
import { MaybePromise } from "@stryke/types/base";
|
|
5
|
-
import { InputObject, Schema as Schema$1 } from "untyped";
|
|
6
1
|
import { BaseIssue, BaseSchema } from "valibot";
|
|
2
|
+
import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
3
|
+
import { InferLoadOptions, LoadReference } from "@stryke/resolve/types";
|
|
4
|
+
import { InputObject, Schema } from "untyped";
|
|
7
5
|
import * as z3 from "zod/v3";
|
|
8
6
|
|
|
7
|
+
//#region src/constants.d.ts
|
|
8
|
+
declare const JsonSchemaTypeNames: {
|
|
9
|
+
readonly STRING: "string";
|
|
10
|
+
readonly NUMBER: "number";
|
|
11
|
+
readonly INTEGER: "integer";
|
|
12
|
+
readonly BOOLEAN: "boolean";
|
|
13
|
+
readonly NULL: "null";
|
|
14
|
+
readonly OBJECT: "object";
|
|
15
|
+
readonly ARRAY: "array";
|
|
16
|
+
};
|
|
17
|
+
declare const JSON_SCHEMA_PRIMITIVE_TYPES: readonly ["string", "number", "integer", "boolean", "null"];
|
|
18
|
+
declare const JSON_SCHEMA_TYPES: readonly ["string", "number", "integer", "boolean", "null", "array", "object"];
|
|
19
|
+
declare const JSON_SCHEMA_METADATA_KEYS: ("$id" | "$schema" | "$vocabulary" | "$comment" | "$anchor" | "$defs" | "$dynamicRef" | "$dynamicAnchor" | "name" | "version" | "title" | "description" | "docs" | "examples" | "alias" | "tags" | "deprecated" | "hidden" | "ignore" | "internal" | "runtime" | "readOnly" | "writeOnly")[];
|
|
20
|
+
/**
|
|
21
|
+
* Keywords whose values are a flat record of named JSON Schema fragments.
|
|
22
|
+
* Each child schema is merged recursively with its counterpart.
|
|
23
|
+
*/
|
|
24
|
+
declare const SCHEMA_RECORD_KEYWORDS: Set<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Keywords whose value is a single JSON Schema fragment that should be
|
|
27
|
+
* recursively merged when both sides define it.
|
|
28
|
+
*/
|
|
29
|
+
declare const SCHEMA_SINGLE_KEYWORDS: Set<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Keywords whose values are arrays of JSON Schema fragments that should be
|
|
32
|
+
* concatenated (rather than overridden) during a merge.
|
|
33
|
+
*/
|
|
34
|
+
declare const SCHEMA_ARRAY_CONCAT_KEYWORDS: Set<string>;
|
|
35
|
+
//#endregion
|
|
9
36
|
//#region src/types.d.ts
|
|
10
37
|
/**
|
|
11
38
|
* Primitive JSON Schema `type` keyword values.
|
|
@@ -110,7 +137,7 @@ interface JsonSchemaMetadataKeywords {
|
|
|
110
137
|
/**
|
|
111
138
|
* A title for the schema, which can be used by documentation tools or other libraries that support this feature to provide a human-readable name or description for the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
|
|
112
139
|
*/
|
|
113
|
-
|
|
140
|
+
title?: string;
|
|
114
141
|
/**
|
|
115
142
|
* A description for the schema, which can be used by documentation tools or other libraries that support this feature to provide a human-readable explanation or summary of the schema's purpose and usage. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the schema when used in conjunction with compatible tools.
|
|
116
143
|
*/
|
|
@@ -1128,19 +1155,19 @@ type SchemaSourceVariant = "standard-schema" | "json-schema" | "zod3" | "untyped
|
|
|
1128
1155
|
/**
|
|
1129
1156
|
* Accepted schema input variants, including raw type definitions.
|
|
1130
1157
|
*/
|
|
1131
|
-
type
|
|
1158
|
+
type SchemaConfigVariant = SchemaSourceVariant | "file-reference";
|
|
1132
1159
|
/**
|
|
1133
1160
|
* Alias for the Untyped object-input schema shape.
|
|
1134
1161
|
*/
|
|
1135
|
-
type
|
|
1162
|
+
type UntypedConfigObject = InputObject;
|
|
1136
1163
|
/**
|
|
1137
1164
|
* Alias for the Untyped schema document shape.
|
|
1138
1165
|
*/
|
|
1139
|
-
type UntypedSchema = Schema
|
|
1166
|
+
type UntypedSchema = Schema;
|
|
1140
1167
|
/**
|
|
1141
1168
|
* A Valibot schema instance.
|
|
1142
1169
|
*
|
|
1143
|
-
* @template
|
|
1170
|
+
* @template TConfig - The raw input type accepted by the schema.
|
|
1144
1171
|
* @template TOutput - The parsed output type produced by the schema.
|
|
1145
1172
|
* @template TIssue - The issue type emitted for validation errors.
|
|
1146
1173
|
*/
|
|
@@ -1148,12 +1175,12 @@ type ValibotSchema<TInput = unknown, TOutput = unknown, TIssue extends BaseIssue
|
|
|
1148
1175
|
/**
|
|
1149
1176
|
* Raw schema source input union before normalization.
|
|
1150
1177
|
*/
|
|
1151
|
-
type
|
|
1178
|
+
type SchemaSourceConfig<TSpec = any> = StandardJSONSchemaV1<TSpec> | JsonSchemaOf<TSpec> | z3.ZodType<TSpec, any, any> | UntypedConfigObject | UntypedSchema | ValibotSchema<TSpec>;
|
|
1152
1179
|
/**
|
|
1153
1180
|
* Any accepted schema input, including normalized schemas and references.
|
|
1154
1181
|
*
|
|
1155
1182
|
* @remarks
|
|
1156
|
-
* The `
|
|
1183
|
+
* The `SchemaConfig` type can be one of the following variants:
|
|
1157
1184
|
* - A file path string (for example: `"./src/types.ts"`).
|
|
1158
1185
|
* - A URL string (for example: `"https://example.com/config.json"`).
|
|
1159
1186
|
* - A {@link GitHubReference | GitHub repository reference string}, starting with either `"github:"` or `"gh:"`, an optional branch or tag, and optionally including a specific file path within the repository (for example: `"github:main:storm-software/stryke/packages/resolve/src/types.ts"`). It is also valid to provide the branch or tag after the file path (for example: `"github:storm-software/stryke/packages/resolve/src/types.ts@main"`).
|
|
@@ -1162,168 +1189,20 @@ type SchemaSourceInput<TSpec = any> = StandardJSONSchemaV1<TSpec> | JsonSchemaOf
|
|
|
1162
1189
|
* - A file reference string (this value can include both a path to the TypeScript module and the name of the module export separated by a ":", "#", or ";" character - for example: `"./src/types.ts#ExampleExport"`).
|
|
1163
1190
|
* - A {@link FileReference} object, which contains information about a file reference.
|
|
1164
1191
|
* - A {@link URL} object, which represents a URL to fetch the file from.
|
|
1165
|
-
* - A {@link
|
|
1192
|
+
* - A {@link SchemaSourceConfig} object, which represents a raw schema input in one of the supported formats (Standard Schema, JSON Schema, Zod v3, Untyped, or Valibot).
|
|
1166
1193
|
*
|
|
1167
1194
|
* @template TSpec - The original TypeScript type for which the schema is being extracted. This type parameter is used to derive the appropriate JSON Schema representation based on the structure and constraints of `T`.
|
|
1168
1195
|
*
|
|
1169
|
-
* @see {@link
|
|
1170
|
-
* @see {@link
|
|
1171
|
-
* @see {@link
|
|
1196
|
+
* @see {@link SchemaSourceConfig}
|
|
1197
|
+
* @see {@link SchemaEnvelope}
|
|
1198
|
+
* @see {@link SchemaConfigWithMeta}
|
|
1172
1199
|
*/
|
|
1173
|
-
type
|
|
1174
|
-
type InferExtractOptions<T extends
|
|
1175
|
-
type MetaValue<TSpec, TValue = any> = TValue | ((spec: TSpec) => MaybePromise<TValue>);
|
|
1176
|
-
type MetaDeprecated = true | string | {
|
|
1177
|
-
message?: string;
|
|
1178
|
-
since?: string;
|
|
1179
|
-
alternative?: string;
|
|
1180
|
-
};
|
|
1181
|
-
type MetaLink = string | {
|
|
1182
|
-
href: string;
|
|
1183
|
-
description?: string;
|
|
1184
|
-
};
|
|
1185
|
-
interface MetaInput<TSpec> {
|
|
1186
|
-
/**
|
|
1187
|
-
* A name for the schema, which can be used to identify or reference the schema in documentation, tooling, or other contexts. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1188
|
-
*
|
|
1189
|
-
* @remarks
|
|
1190
|
-
* The `name` property is a string that can be used to give the schema a human-readable identifier. It can be used in documentation, error messages, or other contexts where it is helpful to have a name associated with the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1191
|
-
*/
|
|
1192
|
-
name?: MetaValue<TSpec, string>;
|
|
1193
|
-
/**
|
|
1194
|
-
* A version string that indicates the version of the schema. This property can be used to track changes or updates to the schema over time, allowing consumers of the schema to determine which version they are working with. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1195
|
-
*
|
|
1196
|
-
* @remarks
|
|
1197
|
-
* The `version` property is a string that can follow any versioning scheme, such as semantic versioning (e.g., "1.0.0", "2.1.3"), date-based versioning (e.g., "2023-06-15"), or any other format that conveys the version of the schema. It is recommended to use a consistent versioning scheme across all schemas to facilitate easier tracking and management of schema versions.
|
|
1198
|
-
*
|
|
1199
|
-
* @defaultValue "1.0"
|
|
1200
|
-
*/
|
|
1201
|
-
version?: MetaValue<TSpec, string | Date | number>;
|
|
1202
|
-
/**
|
|
1203
|
-
* A string that describes the schema in some way.
|
|
1204
|
-
*/
|
|
1205
|
-
description?: MetaValue<TSpec, string>;
|
|
1206
|
-
/**
|
|
1207
|
-
* A string that provides a human-readable name for the schema, which can be used in documentation, tooling, or other contexts to identify or reference the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1208
|
-
*
|
|
1209
|
-
* @remarks
|
|
1210
|
-
* The `displayName` property is a string that can be used to give the schema a more user-friendly or descriptive name. It can be used in documentation, error messages, or other contexts where it is helpful to have a display name associated with the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1211
|
-
*/
|
|
1212
|
-
displayName?: MetaValue<TSpec, string>;
|
|
1213
|
-
/**
|
|
1214
|
-
* A string that describes when the schema is used.
|
|
1215
|
-
*/
|
|
1216
|
-
usage?: MetaValue<TSpec, string>;
|
|
1217
|
-
/**
|
|
1218
|
-
* Indicates whether the schema is deprecated, and optionally provides additional information about the deprecation, such as a message, the version since which it is deprecated, and an alternative schema to use instead.
|
|
1219
|
-
*
|
|
1220
|
-
* @remarks
|
|
1221
|
-
* The `deprecated` property can be a boolean value, where `true` indicates that the schema is deprecated and `false` indicates that it is not. It can also be a string that provides a message explaining the deprecation, or an object that includes additional details such as a message, the version since which it is deprecated, and an alternative schema to use instead. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1222
|
-
*/
|
|
1223
|
-
deprecated?: MetaValue<TSpec, MetaDeprecated>;
|
|
1224
|
-
/**
|
|
1225
|
-
* An array of tags associated with the schema. Tags can be used to categorize or label schemas for organizational purposes, making it easier to search, filter, or group related schemas together. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1226
|
-
*
|
|
1227
|
-
* @remarks
|
|
1228
|
-
* Each tag in the array should be a string that represents a meaningful label or category for the schema. It is recommended to use consistent and descriptive tags across schemas to facilitate easier management and discovery of related schemas.
|
|
1229
|
-
*/
|
|
1230
|
-
tags?: MetaValue<TSpec, string[]>;
|
|
1231
|
-
/**
|
|
1232
|
-
* An array of links associated with the schema. Each link can be a string representing a URL or an object containing a `href` property and an optional `description` property.
|
|
1233
|
-
*/
|
|
1234
|
-
links?: MetaValue<TSpec, MetaLink[]>;
|
|
1235
|
-
}
|
|
1236
|
-
interface Meta<TSpec> {
|
|
1237
|
-
/**
|
|
1238
|
-
* A unique identifier for the schema, which can be used to reference or identify the schema in documentation, tooling, or other contexts. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1239
|
-
*
|
|
1240
|
-
* @remarks
|
|
1241
|
-
* The `id` property is a string that can be used to give the schema a unique identifier. It can be used in documentation, error messages, or other contexts where it is helpful to have an identifier associated with the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1242
|
-
*/
|
|
1243
|
-
id: MetaValue<TSpec, string>;
|
|
1244
|
-
/**
|
|
1245
|
-
* A name for the schema, which can be used to identify or reference the schema in documentation, tooling, or other contexts. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1246
|
-
*
|
|
1247
|
-
* @remarks
|
|
1248
|
-
* The `name` property is a string that can be used to give the schema a human-readable identifier. It can be used in documentation, error messages, or other contexts where it is helpful to have a name associated with the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1249
|
-
*/
|
|
1250
|
-
name: MetaValue<TSpec, string>;
|
|
1251
|
-
/**
|
|
1252
|
-
* A version string that indicates the version of the schema. This property can be used to track changes or updates to the schema over time, allowing consumers of the schema to determine which version they are working with. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1253
|
-
*
|
|
1254
|
-
* @remarks
|
|
1255
|
-
* The `version` property is a string that can follow any versioning scheme, such as semantic versioning (e.g., "1.0.0", "2.1.3"), date-based versioning (e.g., "2023-06-15"), or any other format that conveys the version of the schema. It is recommended to use a consistent versioning scheme across all schemas to facilitate easier tracking and management of schema versions.
|
|
1256
|
-
*
|
|
1257
|
-
* @defaultValue "1.0"
|
|
1258
|
-
*/
|
|
1259
|
-
version: MetaValue<TSpec, string | Date | number>;
|
|
1260
|
-
/**
|
|
1261
|
-
* A string that describes the schema in some way.
|
|
1262
|
-
*/
|
|
1263
|
-
description: MetaValue<TSpec, string>;
|
|
1264
|
-
/**
|
|
1265
|
-
* A string that provides a human-readable name for the schema, which can be used in documentation, tooling, or other contexts to identify or reference the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1266
|
-
*
|
|
1267
|
-
* @remarks
|
|
1268
|
-
* The `displayName` property is a string that can be used to give the schema a more user-friendly or descriptive name. It can be used in documentation, error messages, or other contexts where it is helpful to have a display name associated with the schema. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1269
|
-
*/
|
|
1270
|
-
displayName: MetaValue<TSpec, string>;
|
|
1271
|
-
/**
|
|
1272
|
-
* A string that describes when the schema is used.
|
|
1273
|
-
*/
|
|
1274
|
-
usage?: MetaValue<TSpec, string>;
|
|
1275
|
-
/**
|
|
1276
|
-
* Indicates whether the schema is deprecated, and optionally provides additional information about the deprecation, such as a message, the version since which it is deprecated, and an alternative schema to use instead.
|
|
1277
|
-
*
|
|
1278
|
-
* @remarks
|
|
1279
|
-
* The `deprecated` property can be a boolean value, where `true` indicates that the schema is deprecated and `false` indicates that it is not. It can also be a string that provides a message explaining the deprecation, or an object that includes additional details such as a message, the version since which it is deprecated, and an alternative schema to use instead. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1280
|
-
*/
|
|
1281
|
-
deprecated?: MetaValue<TSpec, MetaDeprecated>;
|
|
1282
|
-
/**
|
|
1283
|
-
* An array of tags associated with the schema. Tags can be used to categorize or label schemas for organizational purposes, making it easier to search, filter, or group related schemas together. The presence of this property does not affect the validation behavior of the schema itself, but it can provide additional context or information about the expected data when used in conjunction with compatible tools.
|
|
1284
|
-
*
|
|
1285
|
-
* @remarks
|
|
1286
|
-
* Each tag in the array should be a string that represents a meaningful label or category for the schema. It is recommended to use consistent and descriptive tags across schemas to facilitate easier management and discovery of related schemas.
|
|
1287
|
-
*/
|
|
1288
|
-
tags?: MetaValue<TSpec, string[]>;
|
|
1289
|
-
/**
|
|
1290
|
-
* An array of links associated with the schema. Each link can be a string representing a URL or an object containing a `href` property and an optional `description` property.
|
|
1291
|
-
*/
|
|
1292
|
-
links: MetaValue<TSpec, MetaLink[]>;
|
|
1293
|
-
}
|
|
1294
|
-
type SchemaMetaExample<TSpec> = TSpec | {
|
|
1295
|
-
description?: string;
|
|
1296
|
-
value: TSpec;
|
|
1297
|
-
};
|
|
1298
|
-
interface SchemaMetaInput<TSpec> extends MetaInput<TSpec> {
|
|
1299
|
-
/**
|
|
1300
|
-
* Examples of valid data for the schema. This can be a single example or an array of examples.
|
|
1301
|
-
*/
|
|
1302
|
-
examples?: SchemaMetaExample<TSpec> | MetaValue<TSpec, SchemaMetaExample<TSpec>[]>;
|
|
1303
|
-
}
|
|
1304
|
-
interface SchemaMeta<TSpec> extends Meta<TSpec> {
|
|
1305
|
-
/**
|
|
1306
|
-
* Examples of valid data for the schema.
|
|
1307
|
-
*/
|
|
1308
|
-
examples: MetaValue<TSpec, SchemaMetaExample<TSpec>[]>;
|
|
1309
|
-
}
|
|
1200
|
+
type SchemaConfig<TSpec = any> = LoadReference | SchemaSourceConfig<TSpec> | SchemaEnvelope<JsonSchemaOf<TSpec>>;
|
|
1201
|
+
type InferExtractOptions<T extends SchemaConfig> = T extends LoadReference ? InferLoadOptions<T> : {};
|
|
1310
1202
|
/**
|
|
1311
|
-
*
|
|
1203
|
+
* A schema envelope that contains the normalized schema and its source variant.
|
|
1312
1204
|
*/
|
|
1313
|
-
interface
|
|
1314
|
-
/**
|
|
1315
|
-
* The underlying schema input payload.
|
|
1316
|
-
*/
|
|
1317
|
-
schema: SchemaSourceInput<TSpec> | Schema<JsonSchemaOf<TSpec>> | LoadInput;
|
|
1318
|
-
/**
|
|
1319
|
-
* Optional contextual metadata associated with this schema input.
|
|
1320
|
-
*/
|
|
1321
|
-
meta?: SchemaMetaInput<TSpec> | string;
|
|
1322
|
-
}
|
|
1323
|
-
/**
|
|
1324
|
-
* A schema extracted from a source input, normalized to JSON Schema.
|
|
1325
|
-
*/
|
|
1326
|
-
interface Schema<TJsonSchema extends JsonSchema = JsonSchema> {
|
|
1205
|
+
interface SchemaEnvelope<TJsonSchema extends JsonSchema = JsonSchema> {
|
|
1327
1206
|
/**
|
|
1328
1207
|
* A stable content hash for the normalized schema.
|
|
1329
1208
|
*/
|
|
@@ -1331,24 +1210,20 @@ interface Schema<TJsonSchema extends JsonSchema = JsonSchema> {
|
|
|
1331
1210
|
/**
|
|
1332
1211
|
* The source variant used to derive the normalized {@link JsonSchema}.
|
|
1333
1212
|
*/
|
|
1334
|
-
variant:
|
|
1213
|
+
variant: SchemaConfigVariant;
|
|
1335
1214
|
/**
|
|
1336
1215
|
* The normalized schema definition.
|
|
1337
1216
|
*/
|
|
1338
1217
|
schema: TJsonSchema;
|
|
1339
|
-
/**
|
|
1340
|
-
* Optional contextual metadata associated with the schema.
|
|
1341
|
-
*/
|
|
1342
|
-
meta: SchemaMeta<SpecOf<TJsonSchema>>;
|
|
1343
1218
|
}
|
|
1344
1219
|
/**
|
|
1345
1220
|
* A normalized JSON Schema extracted from a source input of type `T`. This type represents the result of the schema extraction process, where a raw schema input (which could be in various formats such as Zod, Untyped, Valibot, or as a type definition in TypeScript source code) is transformed into a standardized JSON Schema format. The `SchemaOf<T>` type captures the normalized JSON Schema along with metadata about the source variant and a content hash for caching or identification purposes.
|
|
1346
1221
|
*
|
|
1347
1222
|
* @template TSpec - The original TypeScript type for which the schema is being extracted. This type parameter is used to derive the appropriate JSON Schema representation based on the structure and constraints of `T`.
|
|
1348
1223
|
*
|
|
1349
|
-
* @see {@link
|
|
1224
|
+
* @see {@link SchemaEnvelope}
|
|
1350
1225
|
*/
|
|
1351
|
-
type
|
|
1226
|
+
type SchemaEnvelopeOf<TSpec> = SchemaEnvelope<JsonSchemaOf<TSpec>>;
|
|
1352
1227
|
/**
|
|
1353
1228
|
* Base metadata captured for schema source inputs.
|
|
1354
1229
|
*/
|
|
@@ -1358,7 +1233,7 @@ interface BaseSchemaSource<TSpec = any> {
|
|
|
1358
1233
|
/** The specific source format used for the schema input. */
|
|
1359
1234
|
variant: SchemaSourceVariant;
|
|
1360
1235
|
/** The original schema input captured before normalization. */
|
|
1361
|
-
schema:
|
|
1236
|
+
schema: SchemaSourceConfig<TSpec>;
|
|
1362
1237
|
}
|
|
1363
1238
|
/**
|
|
1364
1239
|
* Source descriptor for schemas that already use JSON Schema.
|
|
@@ -1394,7 +1269,7 @@ interface UntypedSchemaSource<TSpec = any> extends BaseSchemaSource<TSpec> {
|
|
|
1394
1269
|
/** Indicates the source input comes from the Untyped schema model. */
|
|
1395
1270
|
variant: "untyped";
|
|
1396
1271
|
/** The original Untyped schema input. */
|
|
1397
|
-
schema:
|
|
1272
|
+
schema: UntypedConfigObject | UntypedSchema;
|
|
1398
1273
|
}
|
|
1399
1274
|
/**
|
|
1400
1275
|
* Source descriptor for Valibot schema inputs.
|
|
@@ -1412,12 +1287,38 @@ type SchemaSource<TSpec = any> = JsonSchemaSchemaSource<TSpec> | StandardSchemaS
|
|
|
1412
1287
|
/**
|
|
1413
1288
|
* A normalized schema plus metadata about the source that produced it.
|
|
1414
1289
|
*/
|
|
1415
|
-
interface
|
|
1290
|
+
interface ExtractedSchemaEnvelope<TSpec = any> extends SchemaEnvelopeOf<TSpec> {
|
|
1416
1291
|
/**
|
|
1417
1292
|
* The schema source that produced this normalized schema.
|
|
1418
1293
|
*/
|
|
1419
1294
|
source: SchemaSource<TSpec>;
|
|
1420
1295
|
}
|
|
1296
|
+
declare module "zod" {
|
|
1297
|
+
interface GlobalMeta {
|
|
1298
|
+
id?: string;
|
|
1299
|
+
title?: string;
|
|
1300
|
+
description?: string;
|
|
1301
|
+
docs?: string;
|
|
1302
|
+
alias?: string[];
|
|
1303
|
+
tags?: string[];
|
|
1304
|
+
deprecated?: boolean;
|
|
1305
|
+
hidden?: boolean;
|
|
1306
|
+
ignore?: boolean;
|
|
1307
|
+
internal?: boolean;
|
|
1308
|
+
runtime?: boolean;
|
|
1309
|
+
examples?: unknown | {
|
|
1310
|
+
name?: string;
|
|
1311
|
+
description?: string;
|
|
1312
|
+
value: unknown;
|
|
1313
|
+
}[];
|
|
1314
|
+
readOnly?: boolean;
|
|
1315
|
+
writeOnly?: boolean;
|
|
1316
|
+
contentEncoding?: string;
|
|
1317
|
+
contentMediaType?: string;
|
|
1318
|
+
contentSchema?: string;
|
|
1319
|
+
[keyword: string]: unknown;
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1421
1322
|
//#endregion
|
|
1422
|
-
export {
|
|
1423
|
-
//# sourceMappingURL=types.d.
|
|
1323
|
+
export { SpecOf as $, JsonSchemaObject as A, JsonSchemaStringFormat as B, JsonSchemaMetadataKeywords as C, JsonSchemaNullable as D, JsonSchemaNull as E, JsonSchemaRecordPropertyNames as F, JsonSchemaUnknown as G, JsonSchemaType as H, JsonSchemaRef as I, SchemaEnvelope as J, SchemaConfig as K, JsonSchemaSchemaSource as L, JsonSchemaPrimitiveType as M, JsonSchemaPrimitiveUnion as N, JsonSchemaNumber as O, JsonSchemaRecord as P, SchemaSourceVariant as Q, JsonSchemaSet as R, JsonSchemaMap as S, JsonSchemaNever as T, JsonSchemaUndefined as U, JsonSchemaTuple as V, JsonSchemaUnion as W, SchemaSource as X, SchemaEnvelopeOf as Y, SchemaSourceConfig as Z, JsonSchemaIntegerFormat as _, JsonSchemaAllOf as a, ValibotSchemaSource as at, JsonSchemaLiteral as b, JsonSchemaArray as c, JSON_SCHEMA_PRIMITIVE_TYPES as ct, JsonSchemaConditionalKeywords as d, SCHEMA_ARRAY_CONCAT_KEYWORDS as dt, StandardSchemaSchemaSource as et, JsonSchemaDate as f, SCHEMA_RECORD_KEYWORDS as ft, JsonSchemaInteger as g, JsonSchemaEnum as h, JsonSchema as i, ValibotSchema as it, JsonSchemaOf as j, JsonSchemaNumberFormat as k, JsonSchemaBigint as l, JSON_SCHEMA_TYPES as lt, JsonSchemaDecimalFormat as m, ExtractedSchemaEnvelope as n, UntypedSchema as nt, JsonSchemaAny as o, Zod3SchemaSource as ot, JsonSchemaDecimal as p, SCHEMA_SINGLE_KEYWORDS as pt, SchemaConfigVariant as q, InferExtractOptions as r, UntypedSchemaSource as rt, JsonSchemaAnyOf as s, JSON_SCHEMA_METADATA_KEYS as st, BaseSchemaSource as t, UntypedConfigObject as tt, JsonSchemaBoolean as u, JsonSchemaTypeNames as ut, JsonSchemaKeywords as v, JsonSchemaNativeEnum as w, JsonSchemaLogicKeywords as x, JsonSchemaLike as y, JsonSchemaString as z };
|
|
1324
|
+
//# sourceMappingURL=types-BawP3FVI.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-BawP3FVI.d.mts","names":[],"sources":["../src/constants.ts","../src/types.ts"],"mappings":""}
|