/** * OADA Link object * @example * ```json * { * "_id": "akjf92jxcJds", * "_rev": "1-jxusuf3sc" * } * ``` * * * File automatically generated using json-schema-to-typescript. * ! DO NOT MODIFY IT BY HAND ! * Instead, modify the source file ./oada/link/v1.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/link/v1.schema.json} */ export declare const $id = "https://formats.openag.io/oada/link/v1.schema.json"; /** * JSON Schema used to generate this type * @see {@link https://formats.openag.io/oada/link/v1.schema.json} */ export declare const schema: { readonly $id: "https://formats.openag.io/oada/link/v1.schema.json"; readonly $schema: "http://json-schema.org/draft-07/schema#"; readonly description: "OADA Link object"; readonly title: "Link"; readonly definitions: { readonly link: { readonly anyOf: readonly [{ readonly $ref: "#/definitions/nonversioned"; }, { readonly $ref: "#/definitions/versioned"; }]; }; readonly nonversioned: { readonly type: "object"; readonly required: readonly ["_id"]; readonly additionalProperties: true; readonly properties: { readonly _id: { readonly type: "string"; }; }; }; readonly versioned: { readonly type: "object"; readonly required: readonly ["_rev", "_id"]; readonly additionalProperties: true; readonly properties: { readonly _id: { readonly type: "string"; }; readonly _rev: { readonly $ref: "../../oada.schema.json#/definitions/_rev"; }; }; }; readonly list: { readonly definitions: { readonly versioned: { readonly type: "object"; readonly additionalProperties: { readonly $ref: "#/definitions/versioned"; }; }; readonly nonversioned: { readonly type: "object"; readonly additionalProperties: { readonly $ref: "#/definitions/nonversioned"; }; }; }; readonly type: "object"; readonly additionalProperties: { readonly $ref: "#/definitions/link"; }; }; }; readonly anyOf: readonly [{ readonly $ref: "#/definitions/nonversioned"; }, { readonly $ref: "#/definitions/versioned"; }]; readonly examples: readonly [{ readonly _id: "akjf92jxcJds"; readonly _rev: "1-jxusuf3sc"; }]; }; /** * Returns true if `val` is a @type `Link`, false otherwise */ export declare function is(val: unknown): val is Link; /** * Asserts that `val` is a @type `Link` */ export declare function assert(val: unknown): asserts val is Link; /** * OADA Link object * @example * ```json * { * "_id": "akjf92jxcJds", * "_rev": "1-jxusuf3sc" * } * ``` * */ export default Link; /** * OADA Link object */ export type Link = Nonversioned | Versioned; export interface Nonversioned { _id: string; [k: string]: unknown; } export interface Versioned { _id: string; /** * _rev is the revision for a resource in the OADA API. */ _rev: number; [k: string]: unknown; }