@idfkit/schemas¶
EnergyPlus epJSON schemas for all 17 supported versions, content-addressed so that the whole set is around 1 MB gzipped rather than 11.9 MB. See Content-addressed schemas for why, and Slim schema format for what a definition contains.
@idfkit/core re-exports Schema, SchemaBundle, httpSource, and the slim
type definitions, so most applications never import this package directly.
Portable surface¶
BlobStore
¶
Schema
¶
A single EnergyPlus version's schema, backed by a shared blob store.
Type definitions are hydrated lazily and cached in the store, so loading a second version only pays for the definitions that version does not already share with one in memory. In practice that is a couple hundred out of 858.
SchemaBundle
¶
Loads schemas from a bundle, sharing one blob store across every version.
Hold one of these for the lifetime of the process. Loading 26.1.0 and then 9.4.0 costs far less than twice one version, because most definitions are byte-identical and already hydrated.
BundleIndex
¶
BundleSource
¶
Where bundle files come from.
The only runtime-specific part of this package. Node reads from disk, the
browser fetches over HTTP, and a bundler-driven app can supply its own
resolver backed by import(). Everything above this interface is portable.
read
¶
SchemaDelta
¶
SlimExtensible
¶
SlimField
¶
auto
¶
Field is an anyOf of a numeric branch and a string branch, in that order.
Set for every one of the 13060 such fields across the 17 bundled versions.
The numeric branch's type, enum and bounds are hoisted onto this record;
the string branch survives as se.
d
¶
Schema default, applied on write when the field is absent.
e
¶
Permitted values for a choice field.
Numbers, not strings, on the 68 fields across the versions that express a
choice numerically (e: [1, 3] on Site:GroundDomain:Slab.phase). Compare
strings case-insensitively and numbers by value.
max
¶
min
¶
ol
¶
Names of reference lists this field points into (i.e. it is a foreign key).
rc
¶
Value is case-sensitive and must not be normalized.
ref
¶
Names of reference lists this field contributes to (i.e. it is a key).
se
¶
String literals the anyOf string branch accepts, verbatim from the schema.
Only meaningful together with auto. Absent while auto is set means the
string branch carries no enum at all and ANY string is legal there, which is
the shape of 646 fields including Schedule:Compact's extensible field.
That is why the empty string is kept here rather than filtered out the way
e filters it: se: [''] (the whole string branch of the 68 fields whose
number branch carries a numeric enum) and no se at all mean the opposite
of one another.
The sentinel is not a constant: 10565 fields take Autosize and 1781 take
Autocalculate, so a validator that accepts either everywhere accepts a
value EnergyPlus rejects.
t
¶
Storage class.
u
¶
SI units, used by the unit-conversion helpers.
xmax
¶
Exclusive maximum. Number or boolean, exactly as xmin.
xmin
¶
Exclusive minimum, in whichever JSON Schema dialect the version shipped.
A number is the bound itself (draft-06+, 9.6.0 onwards). The boolean true
qualifies the sibling min, making it exclusive (draft-04, 8.9.0 through
9.5.0). Measured across the bundled schemas: xmin is boolean 9013 times
in the older seven versions and numeric 13840 times in the newer ten;
xmax behaves identically, and no version mixes the two. Branch on the
value's type, never on the version.
SlimType
¶
anon
¶
Object has no name field at all, e.g. Version, GlobalGeometryRules.
f
¶
All field names in IDF positional order, from legacy_idd.fields.
g
¶
IDD group, e.g. Thermal Zones and Surfaces.
nref
¶
Reference lists the object's name contributes to.
nreq
¶
Object's name is required.
p
¶
Field definitions, keyed by epJSON field name.
r
¶
Required field names.
s
¶
Object is a singleton (maxProperties: 1), e.g. Version, Building.
x
¶
Extensible group definition, if the object has one.
FieldKind
¶
Field storage class, mirroring how the IDF writer must format the value.
Manifest
¶
A manifest maps object type name to a blob hash in the shared store.