/** * * * * File automatically generated using json-schema-to-typescript. * ! DO NOT MODIFY IT BY HAND ! * Instead, modify the source file ./oada.schema.json of @oada/formats * and run `$ yarn build` to regenerate this file. * * @packageDocumentation */ /** * `$id` of the source schema * @see {@link https://formats.openag.io/oada.schema.json} */ export declare const $id = "https://formats.openag.io/oada.schema.json"; /** * JSON Schema used to generate this type * @see {@link https://formats.openag.io/oada.schema.json} */ export declare const schema: { readonly $id: "https://formats.openag.io/oada.schema.json"; readonly $schema: "http://json-schema.org/draft-07/schema#"; readonly definitions: { readonly link: { readonly $anchor: "link"; readonly definitions: { readonly versioned: { readonly $anchor: "versioned"; readonly type: "object"; readonly required: readonly ["_rev"]; readonly properties: { readonly _rev: { readonly $ref: "#/definitions/_rev"; }; readonly _id: { readonly $ref: "#/definitions/_id"; }; readonly _type: { readonly $ref: "#/definitions/_type"; }; }; readonly additionalProperties: false; }; readonly unversioned: { readonly $anchor: "unversioned"; readonly type: "object"; readonly required: readonly ["_id"]; readonly properties: { readonly _id: { readonly $ref: "#/definitions/_id"; }; readonly _type: { readonly $ref: "#/definitions/_type"; }; }; readonly additionalProperties: false; }; }; readonly anyOf: readonly [{ readonly $ref: "#/definitions/link/definitions/versioned"; }, { readonly $ref: "#/definitions/link/definitions/unversioned"; }]; }; readonly key: { readonly definitions: { readonly reserved: { readonly description: "Key names reserved for OADA use"; readonly type: "string"; readonly pattern: "^_"; readonly tsType: "`_${string}`"; }; readonly nonReserved: { readonly description: "Key names not reserved for OADA use"; readonly type: "string"; readonly pattern: "^[^_]"; readonly tsType: "`${\"a\"|\"b\"|\"c\"|\"d\"|\"e\"|\"f\"|\"g\"|\"h\"|\"i\"|\"j\"|\"k\"|\"l\"|\"m\"|\"n\"|\"o\"|\"p\"|\"q\"|\"r\"|\"s\"|\"t\"|\"u\"|\"v\"|\"w\"|\"x\"|\"y\"|\"z\"|\"A\"|\"B\"|\"C\"|\"D\"|\"E\"|\"F\"|\"G\"|\"H\"|\"I\"|\"J\"|\"K\"|\"L\"|\"M\"|\"N\"|\"O\"|\"P\"|\"Q\"|\"R\"|\"S\"|\"T\"|\"U\"|\"V\"|\"W\"|\"X\"|\"Y\"|\"Z\"|\"0\"|\"1\"|\"2\"|\"3\"|\"4\"|\"5\"|\"6\"|\"7\"|\"8\"|\"9\"}${string}`"; }; }; }; readonly _meta: { readonly $comment: "_meta is a versioned link"; readonly description: "_meta is a link to the meta document for a resources."; readonly $ref: "#/definitions/link/definitions/versioned"; }; readonly _id: { readonly description: "_id identifies a resource in the OADA API."; readonly type: "string"; readonly pattern: "^resources/.*$"; }; readonly _type: { readonly description: "_type identifies the content-type of a resource in the OADA API."; readonly type: "string"; readonly examples: readonly ["application/vnd.oada.something.1+json"]; }; readonly _rev: { readonly description: "_rev is the revision for a resource in the OADA API."; readonly type: "integer"; }; readonly method: { readonly description: "The request methods (a la HTTP) supported by OADA"; readonly enum: readonly ["head", "get", "put", "post", "delete"]; }; readonly path: { readonly description: "The representation of a path within an OADA server"; readonly type: "string"; readonly format: "uri-reference"; }; }; }; /** * Returns true if `val` is a @type `OadaSchema`, false otherwise */ export declare function is(val: unknown): val is OadaSchema; /** * Asserts that `val` is a @type `OadaSchema` */ export declare function assert(val: unknown): asserts val is OadaSchema; /** * * */ export default OadaSchema; /** * This interface was referenced by `OadaSchema`'s JSON-Schema * via the `definition` "link". */ export type Link = Versioned | Unversioned; /** * _rev is the revision for a resource in the OADA API. * * This interface was referenced by `OadaSchema`'s JSON-Schema * via the `definition` "_rev". */ export type _Rev = number; /** * _id identifies a resource in the OADA API. * * This interface was referenced by `OadaSchema`'s JSON-Schema * via the `definition` "_id". */ export type _Id = string; /** * _type identifies the content-type of a resource in the OADA API. * * This interface was referenced by `OadaSchema`'s JSON-Schema * via the `definition` "_type". */ export type _Type = string; /** * The request methods (a la HTTP) supported by OADA * * This interface was referenced by `OadaSchema`'s JSON-Schema * via the `definition` "method". */ export type Method = 'head' | 'get' | 'put' | 'post' | 'delete'; /** * The representation of a path within an OADA server * * This interface was referenced by `OadaSchema`'s JSON-Schema * via the `definition` "path". */ export type Path = string; export interface OadaSchema { [k: string]: unknown; } export interface Versioned { _rev: _Rev; _id?: _Id; _type?: _Type; } export interface Unversioned { _id: _Id; _type?: _Type; } /** * This interface was referenced by `OadaSchema`'s JSON-Schema * via the `definition` "key". */ export interface Key { [k: string]: unknown; } /** * _meta is a link to the meta document for a resources. * * This interface was referenced by `OadaSchema`'s JSON-Schema * via the `definition` "_meta". */ export interface Versioned1 { _rev: _Rev; _id?: _Id; _type?: _Type; }