import type { ProsePool, Schema } from '@idfkit/schemas'; /** * Description of a single field in an EnergyPlus object type. * * The field set mirrors Python's `idfkit.introspection.FieldDescription` * one-for-one, snake_case renamed to camelCase. Every member is always present, * so a description can be diffed against the Python dataclass key by key; * Python's `str | None` becomes `string | undefined`. */ export interface FieldDescription { /** Field name in epJSON spelling, e.g. `x_origin`. */ readonly name: string; /** * epJSON JSON-Schema type: `"number"`, `"string"`, `"integer"`, `"array"`, or * a pipe-delimited union in declaration order for heterogeneous `anyOf` * fields, e.g. `"number|string"` for `Schedule:Compact`'s extensible `field`. * * `undefined` when the field appears in the positional order but carries no * schema definition at all. */ readonly fieldType: string | undefined; /** Whether the field is listed in the object's `required` array. */ readonly required: boolean; readonly default: string | number | undefined; /** SI units, e.g. `"m"`, `"W/m-K"`. */ readonly units: string | undefined; /** * Permitted values for a choice field. * * Numbers rather than strings for the handful of fields that express a choice * numerically, matching Python, which also hands back the raw JSON values. */ readonly enumValues: readonly (string | number)[] | undefined; readonly minimum: number | undefined; readonly maximum: number | undefined; /** * Exclusive minimum, as the schema for this version declares it. * * `true` rather than a number on 8.9.0 through 9.5.0, whose draft-04 schemas * use the keyword as a flag qualifying `minimum` instead of as a bound. Python * reports the same raw value, so a caller comparing the two sides sees no * difference; a caller comparing a value against it must check the type first. */ readonly exclusiveMinimum: number | boolean | undefined; /** Exclusive maximum. Number or boolean, exactly as `exclusiveMinimum`. */ readonly exclusiveMaximum: number | boolean | undefined; /** * Field documentation note. * * Always `undefined` here. The slim schema bundle deliberately drops `note` * (see the header of `@idfkit/schemas`'s `types.ts`), and no other faithful * source for it exists in this package. It is kept in the type because the * naming register requires the same field set on both sides, and because * inventing a value from the field name would be worse than admitting the * absence. */ readonly note: string | undefined; /** Whether this field points into another object's reference list. */ readonly isReference: boolean; /** Reference list names this field points into. */ readonly objectList: readonly string[] | undefined; } /** * Description of an EnergyPlus object type. * * Field set mirrors Python's `idfkit.introspection.ObjectDescription`. */ export interface ObjectDescription { /** Canonical object type name, e.g. `"Zone"`. */ readonly objType: string; /** * Object memo from the schema. * * Always `undefined` here, for the same reason as `FieldDescription.note`: * the slim bundle drops `memo`, and this package has no faithful source for * it. See that member's note. */ readonly memo: string | undefined; readonly fields: readonly FieldDescription[]; /** Required field names, in schema order. */ readonly requiredFields: readonly string[]; /** Whether the type carries a name field. `Version` and friends do not. */ readonly hasName: boolean; /** Whether the type has a repeating extensible group. */ readonly isExtensible: boolean; /** Number of fields in one extensible repeat group. */ readonly extensibleSize: number | undefined; } /** * Describe an EnergyPlus object type: its fields, their order, and their * constraints. * * Synchronous and pure, like the rest of `@idfkit/core`'s root entry: the * schema is already in memory, and this only reads it. * * Ports `idfkit.introspection.describe_object_type`. Where the slim schema * cannot reproduce Python exactly the loss is recorded in a comment at the * point it happens rather than papered over with a plausible substitute. * * @throws If `objType` is not defined in this schema version. The message is * the one `Schema.require` already produces everywhere else in the package; * Python raises `UnknownObjectTypeError`, which has no registered TypeScript * counterpart and so must not become a new exported class. */ export declare function describeObjectType(schema: Schema, objType: string, prose?: ProsePool): ObjectDescription; //# sourceMappingURL=describe.d.ts.map