/** * Represents a "compiled" bit of work to implement rules * * * File automatically generated using json-schema-to-typescript. * ! DO NOT MODIFY IT BY HAND ! * Instead, modify the source file ./trellis/rules/compiled.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/trellis/rules/compiled.schema.json} */ export declare const $id = "https://formats.openag.io/trellis/rules/compiled.schema.json"; /** * JSON Schema used to generate this type * @see {@link https://formats.openag.io/trellis/rules/compiled.schema.json} */ export declare const schema: { readonly $id: "https://formats.openag.io/trellis/rules/compiled.schema.json"; readonly $schema: "http://json-schema.org/draft-07/schema#"; readonly description: "Represents a \"compiled\" bit of work to implement rules"; readonly allOf: readonly [{ readonly $ref: "../../oada/resource.schema.json"; }]; readonly properties: { readonly rule: { readonly description: "Reference to the rule this is implementing"; readonly $ref: "../../oada/link/v1.schema.json#/definitions/versioned"; }; readonly action: { readonly description: "Name of the action invloved"; readonly type: "string"; readonly examples: readonly ["push audit"]; }; readonly service: { readonly description: "Name of the service performing this piece of work"; readonly type: "string"; }; readonly schema: { readonly description: "A JSON Schema which filters inputs to this work"; readonly $ref: "https://json-schema.org/draft/2019-09/schema"; }; readonly path: { readonly description: "The path to an OADA list to watch for inputs"; readonly $ref: "../../oada.schema.json#/definitions/path"; }; readonly type: { readonly description: "Content-type(s) with which this works"; readonly oneOf: readonly [{ readonly type: "string"; }, { readonly type: "array"; readonly items: { readonly type: "string"; }; }]; }; readonly on: { readonly $comment: "Where should this definiton live?"; readonly $ref: "./configured.schema.json#/properties/on"; }; readonly options: { readonly description: "Parameter values for this work"; readonly $comment: "Should these live in parent rule?"; readonly type: "object"; }; }; readonly required: readonly ["rule", "action", "service", "type", "on", "path", "schema"]; }; /** * Returns true if `val` is a @type `CompiledSchema`, false otherwise */ export declare function is(val: unknown): val is CompiledSchema; /** * Asserts that `val` is a @type `CompiledSchema` */ export declare function assert(val: unknown): asserts val is CompiledSchema; /** * Represents a "compiled" bit of work to implement rules * */ export default CompiledSchema; /** * Represents a "compiled" bit of work to implement rules */ export type CompiledSchema = OADAResource & { rule: Versioned1; /** * Name of the action invloved */ action: string; /** * Name of the service performing this piece of work */ service: string; schema: CoreAndValidationSpecificationsMetaSchema; /** * The path to an OADA list to watch for inputs */ path: string; /** * Content-type(s) with which this works */ type: string | string[]; /** * Whether to trigger on new item, changed item, etc. */ on: 'new' | 'change'; /** * Parameter values for this work */ options?: { [k: string]: unknown; }; [k: string]: unknown; }; /** * A JSON Schema which filters inputs to this work */ export type CoreAndValidationSpecificationsMetaSchema = CoreVocabularyMetaSchema & ApplicatorVocabularyMetaSchema & ValidationVocabularyMetaSchema & MetaDataVocabularyMetaSchema & FormatVocabularyMetaSchema & ContentVocabularyMetaSchema & { definitions?: { [k: string]: { [k: string]: unknown; }; }; dependencies?: { [k: string]: { [k: string]: unknown; } | string[]; }; [k: string]: unknown; } & ({ definitions?: { [k: string]: { [k: string]: unknown; }; }; dependencies?: { [k: string]: { [k: string]: unknown; } | string[]; }; [k: string]: unknown; } | boolean); export type CoreVocabularyMetaSchema = { $id?: string; $schema?: string; $anchor?: string; $ref?: string; $recursiveRef?: string; $recursiveAnchor?: boolean; $vocabulary?: { [k: string]: boolean; }; $comment?: string; $defs?: { [k: string]: { [k: string]: unknown; }; }; [k: string]: unknown; } & ({ $id?: string; $schema?: string; $anchor?: string; $ref?: string; $recursiveRef?: string; $recursiveAnchor?: boolean; $vocabulary?: { [k: string]: boolean; }; $comment?: string; $defs?: { [k: string]: { [k: string]: unknown; }; }; [k: string]: unknown; } | boolean); export type ApplicatorVocabularyMetaSchema = { additionalItems?: { [k: string]: unknown; }; unevaluatedItems?: { [k: string]: unknown; }; items?: { [k: string]: unknown; } | SchemaArray; contains?: { [k: string]: unknown; }; additionalProperties?: { [k: string]: unknown; }; unevaluatedProperties?: { [k: string]: unknown; }; properties?: { [k: string]: { [k: string]: unknown; }; }; patternProperties?: { [k: string]: { [k: string]: unknown; }; }; dependentSchemas?: { [k: string]: { [k: string]: unknown; }; }; propertyNames?: { [k: string]: unknown; }; if?: { [k: string]: unknown; }; then?: { [k: string]: unknown; }; else?: { [k: string]: unknown; }; allOf?: SchemaArray; anyOf?: SchemaArray; oneOf?: SchemaArray; not?: { [k: string]: unknown; }; [k: string]: unknown; } & ({ additionalItems?: { [k: string]: unknown; }; unevaluatedItems?: { [k: string]: unknown; }; items?: { [k: string]: unknown; } | SchemaArray; contains?: { [k: string]: unknown; }; additionalProperties?: { [k: string]: unknown; }; unevaluatedProperties?: { [k: string]: unknown; }; properties?: { [k: string]: { [k: string]: unknown; }; }; patternProperties?: { [k: string]: { [k: string]: unknown; }; }; dependentSchemas?: { [k: string]: { [k: string]: unknown; }; }; propertyNames?: { [k: string]: unknown; }; if?: { [k: string]: unknown; }; then?: { [k: string]: unknown; }; else?: { [k: string]: unknown; }; allOf?: SchemaArray; anyOf?: SchemaArray; oneOf?: SchemaArray; not?: { [k: string]: unknown; }; [k: string]: unknown; } | boolean); /** * @minItems 1 * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "schemaArray". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "schemaArray". */ export type SchemaArray = [ { [k: string]: unknown; }, ...{ [k: string]: unknown; }[] ]; export type ValidationVocabularyMetaSchema = { multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". */ maxLength?: number; minLength?: number; pattern?: string; /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". */ maxItems?: number; minItems?: number; uniqueItems?: boolean; /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". */ maxContains?: number; minContains?: number; /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". */ maxProperties?: number; minProperties?: number; /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "stringArray". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "stringArray". */ required?: string[]; dependentRequired?: { /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "stringArray". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "stringArray". */ [k: string]: string[]; }; const?: unknown; enum?: unknown[]; type?: ('array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string') | [ 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string', ...('array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string')[] ]; [k: string]: unknown; } & ({ multipleOf?: number; maximum?: number; exclusiveMaximum?: number; minimum?: number; exclusiveMinimum?: number; /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". */ maxLength?: number; minLength?: number; pattern?: string; /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". */ maxItems?: number; minItems?: number; uniqueItems?: boolean; /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". */ maxContains?: number; minContains?: number; /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "nonNegativeInteger". */ maxProperties?: number; minProperties?: number; /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "stringArray". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "stringArray". */ required?: string[]; dependentRequired?: { /** * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "stringArray". * * This interface was referenced by `undefined`'s JSON-Schema * via the `definition` "stringArray". */ [k: string]: string[]; }; const?: unknown; enum?: unknown[]; type?: ('array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string') | [ 'array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string', ...('array' | 'boolean' | 'integer' | 'null' | 'number' | 'object' | 'string')[] ]; [k: string]: unknown; } | boolean); export type MetaDataVocabularyMetaSchema = { title?: string; description?: string; default?: unknown; deprecated?: boolean; readOnly?: boolean; writeOnly?: boolean; examples?: unknown[]; [k: string]: unknown; } & ({ title?: string; description?: string; default?: unknown; deprecated?: boolean; readOnly?: boolean; writeOnly?: boolean; examples?: unknown[]; [k: string]: unknown; } | boolean); export type FormatVocabularyMetaSchema = { format?: string; [k: string]: unknown; } & ({ format?: string; [k: string]: unknown; } | boolean); export type ContentVocabularyMetaSchema = { contentMediaType?: string; contentEncoding?: string; contentSchema?: { [k: string]: unknown; }; [k: string]: unknown; } & ({ contentMediaType?: string; contentEncoding?: string; contentSchema?: { [k: string]: unknown; }; [k: string]: unknown; } | boolean); export interface OADAResource { /** * _id identifies a resource in the OADA API. */ _id: string; /** * _rev is the revision for a resource in the OADA API. */ _rev: number; _meta: Versioned; /** * _type identifies the content-type of a resource in the OADA API. */ _type: string; [k: string]: unknown; } export interface Versioned { /** * _rev is the revision for a resource in the OADA API. */ _rev: number; /** * _id identifies a resource in the OADA API. */ _id?: string; /** * _type identifies the content-type of a resource in the OADA API. */ _type?: string; } /** * Reference to the rule this is implementing */ export interface Versioned1 { _id: string; /** * _rev is the revision for a resource in the OADA API. */ _rev: number; [k: string]: unknown; }