import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; import type { ListValue, ListValueJson, StructJson } from "@bufbuild/protobuf/wkt"; import type { JsonObject, Message } from "@bufbuild/protobuf"; /** * Describes the file mochabugapis/adapt/graph/v1/jtd_schema.proto. */ export declare const file_mochabugapis_adapt_graph_v1_jtd_schema: GenFile; /** * JTDSchema represents the JSON schema syntax in RFC 8927, Section 2. * https://www.rfc-editor.org/rfc/rfc8927.html#section-2 * * A known keyword set to null is treated as omitted. The shared validator * applies the same rule inside Struct fields. * Every RFC-valid schema retains its meaning; the resulting schema must still * satisfy all JTD form and contextual rules. * * This does not apply to a null schema, unknown keywords, null schema-map entries, * null enum members, instance values, or null values inside opaque metadata. * Empty objects, empty arrays, false, and empty strings are never treated as null: * {} is unconstrained; {"properties":{}} requires an object with no unlisted fields; * {"properties":null} becomes {}; {"enum":[]} is invalid. A discriminator variant * must remain properties form after null keywords are omitted. * * Standard ProtoJSON defaults reject unknown fields and emit camelCase names. * Keys inside Struct and metadata remain unchanged. JSON and binary round trips * retain field presence. * * Struct and ListValue retain presence for empty objects and arrays, unlike * protobuf maps and repeated fields. The shared JTD validator checks recursive * schema rules, root definitions, references, and discriminator context. * * @generated from message mochabugapis.adapt.graph.v1.JTDSchema */ export type JTDSchema = Message<"mochabugapis.adapt.graph.v1.JTDSchema"> & { /** * Root definition names mapped to schemas. Presence distinguishes a forbidden * nested definitions object, even when empty, from an absent definitions field. * * @generated from field: google.protobuf.Struct definitions = 1; */ definitions?: JsonObject | undefined; /** * Application metadata; its contents are not schemas. * Numbers use standard ProtoJSON/Struct double-precision semantics; schema * instance validation uses the raw JSON validator. * * @generated from field: google.protobuf.Struct metadata = 2; */ metadata?: JsonObject | undefined; /** * Whether null additionally satisfies this schema. * * @generated from field: optional bool nullable = 3; */ nullable?: boolean | undefined; /** * Exact name of a definition in the root schema, including the empty name. * * @generated from field: optional string ref = 4; */ ref?: string | undefined; /** * One of the primitive types defined by RFC 8927. * * @generated from field: optional string type = 5; */ type?: string | undefined; /** * Nonempty, distinct strings. ListValue preserves an invalid empty array so it * can be rejected instead of silently turning the schema into the empty form. * * @generated from field: google.protobuf.ListValue enum = 6; */ enum?: ListValue | undefined; /** * The schema of each array element. * * @generated from field: mochabugapis.adapt.graph.v1.JTDSchema elements = 7; */ elements?: JTDSchema | undefined; /** * Required properties. A present empty object still selects properties form. * * @generated from field: google.protobuf.Struct properties = 8; */ properties?: JsonObject | undefined; /** * Optional properties. A present empty object still selects properties form. * * @generated from field: google.protobuf.Struct optional_properties = 9; */ optionalProperties?: JsonObject | undefined; /** * Whether properties form permits unlisted object members. * * @generated from field: optional bool additional_properties = 10; */ additionalProperties?: boolean | undefined; /** * The schema of each value in an object. * * @generated from field: mochabugapis.adapt.graph.v1.JTDSchema values = 11; */ values?: JTDSchema | undefined; /** * Exact property name selecting a mapping entry, including the empty name. * * @generated from field: optional string discriminator = 12; */ discriminator?: string | undefined; /** * Tags mapped to properties-form schemas. Empty mappings are valid. * * @generated from field: google.protobuf.Struct mapping = 13; */ mapping?: JsonObject | undefined; }; /** * JTDSchema represents the JSON schema syntax in RFC 8927, Section 2. * https://www.rfc-editor.org/rfc/rfc8927.html#section-2 * * A known keyword set to null is treated as omitted. The shared validator * applies the same rule inside Struct fields. * Every RFC-valid schema retains its meaning; the resulting schema must still * satisfy all JTD form and contextual rules. * * This does not apply to a null schema, unknown keywords, null schema-map entries, * null enum members, instance values, or null values inside opaque metadata. * Empty objects, empty arrays, false, and empty strings are never treated as null: * {} is unconstrained; {"properties":{}} requires an object with no unlisted fields; * {"properties":null} becomes {}; {"enum":[]} is invalid. A discriminator variant * must remain properties form after null keywords are omitted. * * Standard ProtoJSON defaults reject unknown fields and emit camelCase names. * Keys inside Struct and metadata remain unchanged. JSON and binary round trips * retain field presence. * * Struct and ListValue retain presence for empty objects and arrays, unlike * protobuf maps and repeated fields. The shared JTD validator checks recursive * schema rules, root definitions, references, and discriminator context. * * @generated from message mochabugapis.adapt.graph.v1.JTDSchema */ export type JTDSchemaJson = { /** * Root definition names mapped to schemas. Presence distinguishes a forbidden * nested definitions object, even when empty, from an absent definitions field. * * @generated from field: google.protobuf.Struct definitions = 1; */ definitions?: StructJson; /** * Application metadata; its contents are not schemas. * Numbers use standard ProtoJSON/Struct double-precision semantics; schema * instance validation uses the raw JSON validator. * * @generated from field: google.protobuf.Struct metadata = 2; */ metadata?: StructJson; /** * Whether null additionally satisfies this schema. * * @generated from field: optional bool nullable = 3; */ nullable?: boolean; /** * Exact name of a definition in the root schema, including the empty name. * * @generated from field: optional string ref = 4; */ ref?: string; /** * One of the primitive types defined by RFC 8927. * * @generated from field: optional string type = 5; */ type?: string; /** * Nonempty, distinct strings. ListValue preserves an invalid empty array so it * can be rejected instead of silently turning the schema into the empty form. * * @generated from field: google.protobuf.ListValue enum = 6; */ enum?: ListValueJson; /** * The schema of each array element. * * @generated from field: mochabugapis.adapt.graph.v1.JTDSchema elements = 7; */ elements?: JTDSchemaJson; /** * Required properties. A present empty object still selects properties form. * * @generated from field: google.protobuf.Struct properties = 8; */ properties?: StructJson; /** * Optional properties. A present empty object still selects properties form. * * @generated from field: google.protobuf.Struct optional_properties = 9; */ optionalProperties?: StructJson; /** * Whether properties form permits unlisted object members. * * @generated from field: optional bool additional_properties = 10; */ additionalProperties?: boolean; /** * The schema of each value in an object. * * @generated from field: mochabugapis.adapt.graph.v1.JTDSchema values = 11; */ values?: JTDSchemaJson; /** * Exact property name selecting a mapping entry, including the empty name. * * @generated from field: optional string discriminator = 12; */ discriminator?: string; /** * Tags mapped to properties-form schemas. Empty mappings are valid. * * @generated from field: google.protobuf.Struct mapping = 13; */ mapping?: StructJson; }; /** * Describes the message mochabugapis.adapt.graph.v1.JTDSchema. * Use `create(JTDSchemaSchema)` to create a new message. */ export declare const JTDSchemaSchema: GenMessage; //# sourceMappingURL=jtd_schema_pb.d.ts.map