/** * Tree-based change representation (OADA v1) * @example * ```json * { * "body": { * "test": "abc", * "_rev": 1 * }, * "type": "merge" * } * ``` * * * File automatically generated using json-schema-to-typescript. * ! DO NOT MODIFY IT BY HAND ! * Instead, modify the source file ./oada/change/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/change/v1.schema.json} */ export declare const $id = "https://formats.openag.io/oada/change/v1.schema.json"; /** * JSON Schema used to generate this type * @see {@link https://formats.openag.io/oada/change/v1.schema.json} */ export declare const schema: { readonly $id: "https://formats.openag.io/oada/change/v1.schema.json"; readonly $schema: "http://json-schema.org/draft-07/schema#"; readonly description: "Tree-based change representation (OADA v1)"; readonly definitions: { readonly type: { readonly description: "Indicates the type of change that occurred."; readonly enum: readonly ["merge", "delete"]; }; }; readonly type: "object"; readonly required: readonly ["type", "body"]; readonly properties: { readonly type: { readonly $ref: "#/definitions/type"; }; readonly body: { readonly $comment: "Should probably narrow this schema down"; readonly description: "The contents of what was changed."; }; }; readonly examples: readonly [{ readonly body: { readonly test: "abc"; readonly _rev: 1; }; readonly type: "merge"; }]; }; /** * Returns true if `val` is a @type `V1Schema`, false otherwise */ export declare function is(val: unknown): val is V1Schema; /** * Asserts that `val` is a @type `V1Schema` */ export declare function assert(val: unknown): asserts val is V1Schema; /** * Tree-based change representation (OADA v1) * @example * ```json * { * "body": { * "test": "abc", * "_rev": 1 * }, * "type": "merge" * } * ``` * */ export default V1Schema; /** * Indicates the type of change that occurred. * * This interface was referenced by `V1Schema`'s JSON-Schema * via the `definition` "type". */ export type Type = 'merge' | 'delete'; /** * Tree-based change representation (OADA v1) */ export interface V1Schema { type: Type; /** * The contents of what was changed. */ body: { [k: string]: unknown; }; [k: string]: unknown; }