@overture-stack/lyric
Version:
Data Submission system
17 lines (16 loc) • 822 B
TypeScript
import { Dictionary as SchemasDictionary, type Schema } from '@overture-stack/lectern-client';
import type { FieldNamesByPriorityMap } from './types.js';
/**
* Retrieves a schema definition by its name from the provided schemas dictionary.
* @param schemaName The name of the schema to look up.
* @param schemasDictionary The dictionary containing all available schemas.
* @returns The matching schema if found, otherwise `undefined`
*/
export declare const getSchemaByName: (schemaName: string, schemasDictionary: SchemasDictionary) => Schema | undefined;
/**
* Get Fields from Schema
* @param {Schema} schema Schema object
* @returns The arrays of requied and options fields from the schema
*/
export declare const getSchemaFieldNames: (schema: Schema) => FieldNamesByPriorityMap;
export { SchemasDictionary };