@stencila/schema
Version:
Stencila schema and other specifications
1,162 lines • 51.9 kB
TypeScript
export interface Types {
ArrayValidator: ArrayValidator;
Article: Article;
AudioObject: AudioObject;
BlockContent: BlockContent;
BooleanValidator: BooleanValidator;
Brand: Brand;
Cite: Cite;
CiteGroup: CiteGroup;
Code: Code;
CodeBlock: CodeBlock;
CodeBlockTypes: CodeBlockTypes;
CodeChunk: CodeChunk;
CodeError: CodeError;
CodeExpression: CodeExpression;
CodeFragment: CodeFragment;
CodeFragmentTypes: CodeFragmentTypes;
CodeTypes: CodeTypes;
Collection: Collection;
ConstantValidator: ConstantValidator;
ContactPoint: ContactPoint;
CreativeWork: CreativeWork;
CreativeWorkTypes: CreativeWorkTypes;
Datatable: Datatable;
DatatableColumn: DatatableColumn;
Date: Date;
Delete: Delete;
Emphasis: Emphasis;
Entity: Entity;
EntityTypes: EntityTypes;
EnumValidator: EnumValidator;
Figure: Figure;
Function: Function;
Grant: Grant;
GrantTypes: GrantTypes;
Heading: Heading;
ImageObject: ImageObject;
Include: Include;
InlineContent: InlineContent;
IntegerValidator: IntegerValidator;
Link: Link;
List: List;
ListItem: ListItem;
Mark: Mark;
MarkTypes: MarkTypes;
Math: Math;
MathBlock: MathBlock;
MathFragment: MathFragment;
MathTypes: MathTypes;
MediaObject: MediaObject;
MediaObjectTypes: MediaObjectTypes;
MonetaryGrant: MonetaryGrant;
Node: Node;
NumberValidator: NumberValidator;
NumberValidatorTypes: NumberValidatorTypes;
Organization: Organization;
Paragraph: Paragraph;
Parameter: Parameter;
Periodical: Periodical;
Person: Person;
Product: Product;
PropertyValue: PropertyValue;
PublicationIssue: PublicationIssue;
PublicationVolume: PublicationVolume;
Quote: Quote;
QuoteBlock: QuoteBlock;
SoftwareApplication: SoftwareApplication;
SoftwareEnvironment: SoftwareEnvironment;
SoftwareSession: SoftwareSession;
SoftwareSourceCode: SoftwareSourceCode;
StringValidator: StringValidator;
Strong: Strong;
Subscript: Subscript;
Superscript: Superscript;
Table: Table;
TableCell: TableCell;
TableRow: TableRow;
ThematicBreak: ThematicBreak;
Thing: Thing;
ThingTypes: ThingTypes;
TupleValidator: TupleValidator;
ValidatorTypes: ValidatorTypes;
Variable: Variable;
VariableTypes: VariableTypes;
VideoObject: VideoObject;
VolumeMount: VolumeMount;
}
/**
* The most simple compound (ie. non-atomic like `number`, `string` etc) type.
*/
export interface Entity {
type: 'Entity' | 'ArrayValidator' | 'Article' | 'AudioObject' | 'BooleanValidator' | 'Brand' | 'Cite' | 'CiteGroup' | 'Code' | 'CodeBlock' | 'CodeChunk' | 'CodeError' | 'CodeExpression' | 'CodeFragment' | 'Collection' | 'ConstantValidator' | 'ContactPoint' | 'CreativeWork' | 'Datatable' | 'DatatableColumn' | 'Date' | 'Delete' | 'Emphasis' | 'EnumValidator' | 'Figure' | 'Function' | 'Grant' | 'Heading' | 'ImageObject' | 'Include' | 'IntegerValidator' | 'Link' | 'List' | 'ListItem' | 'Mark' | 'Math' | 'MathBlock' | 'MathFragment' | 'MediaObject' | 'MonetaryGrant' | 'NumberValidator' | 'Organization' | 'Paragraph' | 'Parameter' | 'Periodical' | 'Person' | 'Product' | 'PropertyValue' | 'PublicationIssue' | 'PublicationVolume' | 'Quote' | 'QuoteBlock' | 'SoftwareApplication' | 'SoftwareEnvironment' | 'SoftwareSession' | 'SoftwareSourceCode' | 'StringValidator' | 'Strong' | 'Subscript' | 'Superscript' | 'Table' | 'TableCell' | 'TableRow' | 'ThematicBreak' | 'Thing' | 'TupleValidator' | 'Variable' | 'VideoObject' | 'VolumeMount';
id?: string;
meta?: {
[key: string]: any;
};
}
/**
* Create a `Entity` node
* @param props Object containing Entity schema properties as key/value pairs
* @returns {Entity} Entity schema node
*/
export declare const entity: (props?: Pick<Entity, "id" | "meta">) => Entity;
/**
* A validator specifying constraints on an array node.
*/
export interface ArrayValidator extends Entity {
type: 'ArrayValidator';
contains?: ValidatorTypes;
items?: ValidatorTypes;
maxItems?: number;
minItems?: number;
uniqueItems?: boolean;
}
/**
* Create a `ArrayValidator` node
* @param props Object containing ArrayValidator schema properties as key/value pairs
* @returns {ArrayValidator} ArrayValidator schema node
*/
export declare const arrayValidator: (props?: Pick<ArrayValidator, "id" | "meta" | "contains" | "items" | "maxItems" | "minItems" | "uniqueItems">) => ArrayValidator;
/**
* A schema specifying that a node must be a boolean value.
*/
export interface BooleanValidator extends Entity {
type: 'BooleanValidator';
}
/**
* Create a `BooleanValidator` node
* @param props Object containing BooleanValidator schema properties as key/value pairs
* @returns {BooleanValidator} BooleanValidator schema node
*/
export declare const booleanValidator: (props?: Pick<BooleanValidator, "id" | "meta">) => BooleanValidator;
/**
* A reference to a CreativeWork that is cited in another CreativeWork.
*/
export interface Cite extends Entity {
type: 'Cite';
target: string;
citationMode?: 'normal' | 'suppressAuthor';
content?: Array<InlineContent>;
pageEnd?: string | number;
pageStart?: string | number;
pagination?: string;
prefix?: string;
suffix?: string;
}
/**
* Create a `Cite` node
* @param props Object containing Cite schema properties as key/value pairs
* @returns {Cite} Cite schema node
*/
export declare const cite: (props: Pick<Cite, "id" | "meta" | "target" | "citationMode" | "content" | "pageEnd" | "pageStart" | "pagination" | "prefix" | "suffix">) => Cite;
/**
* A group of `Cite` nodes
*/
export interface CiteGroup extends Entity {
type: 'CiteGroup';
items: Array<Cite>;
}
/**
* Create a `CiteGroup` node
* @param props Object containing CiteGroup schema properties as key/value pairs
* @returns {CiteGroup} CiteGroup schema node
*/
export declare const citeGroup: (props: Pick<CiteGroup, "id" | "meta" | "items">) => CiteGroup;
/**
* Base type for code nodes e.g. `CodeBlock`, `CodeExpression`.
*/
export interface Code extends Entity {
type: 'Code' | 'CodeBlock' | 'CodeChunk' | 'CodeExpression' | 'CodeFragment';
text: string;
format?: string;
programmingLanguage?: string;
}
/**
* Create a `Code` node
* @param props Object containing Code schema properties as key/value pairs
* @returns {Code} Code schema node
*/
export declare const code: (props: Pick<Code, "id" | "meta" | "text" | "format" | "programmingLanguage">) => Code;
/**
* A code block.
*/
export interface CodeBlock extends Code {
type: 'CodeBlock' | 'CodeChunk';
exportFrom?: string;
importTo?: string;
}
/**
* Create a `CodeBlock` node
* @param props Object containing CodeBlock schema properties as key/value pairs
* @returns {CodeBlock} CodeBlock schema node
*/
export declare const codeBlock: (props: Pick<CodeBlock, "id" | "meta" | "text" | "format" | "programmingLanguage" | "exportFrom" | "importTo">) => CodeBlock;
/**
* A executable chunk of code.
*/
export interface CodeChunk extends CodeBlock {
type: 'CodeChunk';
alters?: Array<string>;
assigns?: Array<string | Variable>;
declares?: Array<string | Variable | Function>;
duration?: number;
errors?: Array<CodeError>;
imports?: Array<string | SoftwareSourceCode | SoftwareApplication>;
outputs?: Array<Node>;
reads?: Array<string>;
uses?: Array<string | Variable>;
}
/**
* Create a `CodeChunk` node
* @param props Object containing CodeChunk schema properties as key/value pairs
* @returns {CodeChunk} CodeChunk schema node
*/
export declare const codeChunk: (props: Pick<CodeChunk, "id" | "meta" | "text" | "format" | "programmingLanguage" | "exportFrom" | "importTo" | "alters" | "assigns" | "declares" | "duration" | "errors" | "imports" | "outputs" | "reads" | "uses">) => CodeChunk;
/**
* Inline code.
*/
export interface CodeFragment extends Code {
type: 'CodeFragment' | 'CodeExpression';
}
/**
* Create a `CodeFragment` node
* @param props Object containing CodeFragment schema properties as key/value pairs
* @returns {CodeFragment} CodeFragment schema node
*/
export declare const codeFragment: (props: Pick<CodeFragment, "id" | "meta" | "text" | "format" | "programmingLanguage">) => CodeFragment;
/**
* An expression defined in programming language source code.
*/
export interface CodeExpression extends CodeFragment {
type: 'CodeExpression';
errors?: Array<CodeError>;
output?: Node;
}
/**
* Create a `CodeExpression` node
* @param props Object containing CodeExpression schema properties as key/value pairs
* @returns {CodeExpression} CodeExpression schema node
*/
export declare const codeExpression: (props: Pick<CodeExpression, "id" | "meta" | "text" | "format" | "programmingLanguage" | "errors" | "output">) => CodeExpression;
/**
* An error that occurred when parsing, compiling or executing a Code node.
*/
export interface CodeError extends Entity {
type: 'CodeError';
errorMessage?: string;
errorType?: string;
stackTrace?: string;
}
/**
* Create a `CodeError` node
* @param props Object containing CodeError schema properties as key/value pairs
* @returns {CodeError} CodeError schema node
*/
export declare const codeError: (props?: Pick<CodeError, "id" | "meta" | "errorMessage" | "errorType" | "stackTrace">) => CodeError;
/**
* A validator specifying a constant value that a node must have.
*/
export interface ConstantValidator extends Entity {
type: 'ConstantValidator';
value?: Node;
}
/**
* Create a `ConstantValidator` node
* @param props Object containing ConstantValidator schema properties as key/value pairs
* @returns {ConstantValidator} ConstantValidator schema node
*/
export declare const constantValidator: (props?: Pick<ConstantValidator, "id" | "meta" | "value">) => ConstantValidator;
/**
* A date encoded as a ISO 8601 string.
*/
export interface Date extends Entity {
type: 'Date';
value: string;
}
/**
* Create a `Date` node
* @param props Object containing Date schema properties as key/value pairs
* @returns {Date} Date schema node
*/
export declare const date: (props: Pick<Date, "id" | "meta" | "value">) => Date;
/**
* A base class for nodes that mark some other inline content
* in some way (e.g. as being emphasised, or quoted).
*/
export interface Mark extends Entity {
type: 'Mark' | 'Delete' | 'Emphasis' | 'Quote' | 'Strong' | 'Subscript' | 'Superscript';
content: Array<InlineContent>;
}
/**
* Create a `Mark` node
* @param props Object containing Mark schema properties as key/value pairs
* @returns {Mark} Mark schema node
*/
export declare const mark: (props: Pick<Mark, "id" | "meta" | "content">) => Mark;
/**
* Content that is marked for deletion
*/
export interface Delete extends Mark {
type: 'Delete';
}
/**
* Create a `Delete` node
* @param props Object containing Delete schema properties as key/value pairs
* @returns {Delete} Delete schema node
*/
export declare const del: (props: Pick<Delete, "id" | "meta" | "content">) => Delete;
/**
* Emphasised content.
*/
export interface Emphasis extends Mark {
type: 'Emphasis';
}
/**
* Create a `Emphasis` node
* @param props Object containing Emphasis schema properties as key/value pairs
* @returns {Emphasis} Emphasis schema node
*/
export declare const emphasis: (props: Pick<Emphasis, "id" | "meta" | "content">) => Emphasis;
/**
* The most generic type of item.
*/
export interface Thing extends Entity {
type: 'Thing' | 'Article' | 'AudioObject' | 'Brand' | 'Collection' | 'ContactPoint' | 'CreativeWork' | 'Datatable' | 'DatatableColumn' | 'Figure' | 'Grant' | 'ImageObject' | 'MediaObject' | 'MonetaryGrant' | 'Organization' | 'Periodical' | 'Person' | 'Product' | 'PropertyValue' | 'PublicationIssue' | 'PublicationVolume' | 'SoftwareApplication' | 'SoftwareEnvironment' | 'SoftwareSession' | 'SoftwareSourceCode' | 'Table' | 'VideoObject' | 'VolumeMount';
alternateNames?: Array<string>;
description?: string | Array<Node>;
identifiers?: Array<string | PropertyValue>;
name?: string;
url?: string;
}
/**
* Create a `Thing` node
* @param props Object containing Thing schema properties as key/value pairs
* @returns {Thing} Thing schema node
*/
export declare const thing: (props?: Pick<Thing, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url">) => Thing;
/**
* A brand used by an organization or person for labeling a product,
* product group, or similar.
*/
export interface Brand extends Thing {
type: 'Brand';
name: string;
logo?: string | ImageObject;
reviews?: Array<string>;
}
/**
* Create a `Brand` node
* @param props Object containing Brand schema properties as key/value pairs
* @returns {Brand} Brand schema node
*/
export declare const brand: (props: Pick<Brand, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "logo" | "reviews">) => Brand;
/**
* A contact point, for example, a R&D department.
*/
export interface ContactPoint extends Thing {
type: 'ContactPoint';
availableLanguages?: Array<string>;
emails?: Array<string>;
telephoneNumbers?: Array<string>;
}
/**
* Create a `ContactPoint` node
* @param props Object containing ContactPoint schema properties as key/value pairs
* @returns {ContactPoint} ContactPoint schema node
*/
export declare const contactPoint: (props?: Pick<ContactPoint, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "availableLanguages" | "emails" | "telephoneNumbers">) => ContactPoint;
/**
* A creative work, including books, movies, photographs, software programs, etc.
*/
export interface CreativeWork extends Thing {
type: 'CreativeWork' | 'Article' | 'AudioObject' | 'Collection' | 'Datatable' | 'Figure' | 'ImageObject' | 'MediaObject' | 'Periodical' | 'PublicationIssue' | 'PublicationVolume' | 'SoftwareApplication' | 'SoftwareSourceCode' | 'Table' | 'VideoObject';
authors?: Array<Person | Organization>;
content?: Array<Node>;
dateAccepted?: Date | string;
dateCreated?: Date | string;
dateModified?: Date | string;
datePublished?: Date | string;
dateReceived?: Date | string;
editors?: Array<Person>;
fundedBy?: Array<Grant | MonetaryGrant>;
funders?: Array<Person | Organization>;
isPartOf?: CreativeWorkTypes;
keywords?: Array<string>;
licenses?: Array<string | CreativeWorkTypes>;
parts?: Array<CreativeWorkTypes>;
publisher?: Person | Organization;
references?: Array<string | CreativeWorkTypes>;
text?: string;
title?: string | Array<Node>;
version?: string | number;
}
/**
* Create a `CreativeWork` node
* @param props Object containing CreativeWork schema properties as key/value pairs
* @returns {CreativeWork} CreativeWork schema node
*/
export declare const creativeWork: (props?: Pick<CreativeWork, "id" | "meta" | "content" | "text" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version">) => CreativeWork;
/**
* An article, including news and scholarly articles.
*/
export interface Article extends CreativeWork {
type: 'Article';
}
/**
* Create a `Article` node
* @param props Object containing Article schema properties as key/value pairs
* @returns {Article} Article schema node
*/
export declare const article: (props?: Pick<Article, "id" | "meta" | "content" | "text" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version">) => Article;
/**
* A created collection of CreativeWorks or other artefacts.
*/
export interface Collection extends CreativeWork {
type: 'Collection';
parts: Array<CreativeWorkTypes>;
}
/**
* Create a `Collection` node
* @param props Object containing Collection schema properties as key/value pairs
* @returns {Collection} Collection schema node
*/
export declare const collection: (props: Pick<Collection, "id" | "meta" | "content" | "text" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version">) => Collection;
/**
* A table of data.
*/
export interface Datatable extends CreativeWork {
type: 'Datatable';
columns: Array<DatatableColumn>;
}
/**
* Create a `Datatable` node
* @param props Object containing Datatable schema properties as key/value pairs
* @returns {Datatable} Datatable schema node
*/
export declare const datatable: (props: Pick<Datatable, "id" | "meta" | "content" | "text" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "columns">) => Datatable;
/**
* A media object, such as an image, video, or audio object embedded in a web page or a
* downloadable dataset.
*/
export interface MediaObject extends CreativeWork {
type: 'MediaObject' | 'AudioObject' | 'ImageObject' | 'VideoObject';
contentUrl: string;
bitrate?: number;
contentSize?: number;
embedUrl?: string;
format?: string;
}
/**
* Create a `MediaObject` node
* @param props Object containing MediaObject schema properties as key/value pairs
* @returns {MediaObject} MediaObject schema node
*/
export declare const mediaObject: (props: Pick<MediaObject, "id" | "meta" | "content" | "text" | "format" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "contentUrl" | "bitrate" | "contentSize" | "embedUrl">) => MediaObject;
/**
* An audio file
*/
export interface AudioObject extends MediaObject {
type: 'AudioObject';
caption?: string;
transcript?: string;
}
/**
* Create a `AudioObject` node
* @param props Object containing AudioObject schema properties as key/value pairs
* @returns {AudioObject} AudioObject schema node
*/
export declare const audioObject: (props: Pick<AudioObject, "id" | "meta" | "content" | "text" | "format" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "contentUrl" | "bitrate" | "contentSize" | "embedUrl" | "caption" | "transcript">) => AudioObject;
/**
* A column of data within a Datatable.
*/
export interface DatatableColumn extends Thing {
type: 'DatatableColumn';
name: string;
values: Array<any>;
validator?: ArrayValidator;
}
/**
* Create a `DatatableColumn` node
* @param props Object containing DatatableColumn schema properties as key/value pairs
* @returns {DatatableColumn} DatatableColumn schema node
*/
export declare const datatableColumn: (props: Pick<DatatableColumn, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "values" | "validator">) => DatatableColumn;
/**
* A schema specifying that a node must be one of several values.
*/
export interface EnumValidator extends Entity {
type: 'EnumValidator';
values?: Array<Node>;
}
/**
* Create a `EnumValidator` node
* @param props Object containing EnumValidator schema properties as key/value pairs
* @returns {EnumValidator} EnumValidator schema node
*/
export declare const enumValidator: (props?: Pick<EnumValidator, "id" | "meta" | "values">) => EnumValidator;
/**
* Encapsulates one or more images, videos, tables, etc, and provides captions and labels for them.
*/
export interface Figure extends CreativeWork {
type: 'Figure';
caption?: Array<Node>;
label?: string;
}
/**
* Create a `Figure` node
* @param props Object containing Figure schema properties as key/value pairs
* @returns {Figure} Figure schema node
*/
export declare const figure: (props?: Pick<Figure, "id" | "meta" | "content" | "text" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "caption" | "label">) => Figure;
/**
* A function with a name, which might take Parameters and return a value of a certain type.
*/
export interface Function extends Entity {
type: 'Function';
name?: string;
parameters?: Array<Parameter>;
returns?: ValidatorTypes;
}
/**
* Create a `Function` node
* @param props Object containing Function schema properties as key/value pairs
* @returns {Function} Function schema node
*/
export declare const function_: (props?: Pick<Function, "id" | "meta" | "name" | "parameters" | "returns">) => Function;
/**
* A grant, typically financial or otherwise quantifiable, of resources.
*/
export interface Grant extends Thing {
type: 'Grant' | 'MonetaryGrant';
fundedItems?: Array<Thing>;
sponsors?: Array<Person | Organization>;
}
/**
* Create a `Grant` node
* @param props Object containing Grant schema properties as key/value pairs
* @returns {Grant} Grant schema node
*/
export declare const grant: (props?: Pick<Grant, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "fundedItems" | "sponsors">) => Grant;
/**
* Heading
*/
export interface Heading extends Entity {
type: 'Heading';
content: Array<InlineContent>;
depth?: number;
}
/**
* Create a `Heading` node
* @param props Object containing Heading schema properties as key/value pairs
* @returns {Heading} Heading schema node
*/
export declare const heading: (props: Pick<Heading, "id" | "meta" | "content" | "depth">) => Heading;
/**
* An image file.
*/
export interface ImageObject extends MediaObject {
type: 'ImageObject';
caption?: string;
thumbnail?: ImageObject;
}
/**
* Create a `ImageObject` node
* @param props Object containing ImageObject schema properties as key/value pairs
* @returns {ImageObject} ImageObject schema node
*/
export declare const imageObject: (props: Pick<ImageObject, "id" | "meta" | "content" | "text" | "format" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "contentUrl" | "bitrate" | "contentSize" | "embedUrl" | "caption" | "thumbnail">) => ImageObject;
/**
* A directive to include content from an external source (e.g. file, URL) or content.
*/
export interface Include extends Entity {
type: 'Include';
source: string;
content?: Array<BlockContent>;
format?: string;
}
/**
* Create a `Include` node
* @param props Object containing Include schema properties as key/value pairs
* @returns {Include} Include schema node
*/
export declare const include: (props: Pick<Include, "id" | "meta" | "content" | "format" | "source">) => Include;
/**
* A validator specifying the constraints on a numeric node.
*/
export interface NumberValidator extends Entity {
type: 'NumberValidator' | 'IntegerValidator';
exclusiveMaximum?: number;
exclusiveMinimum?: number;
maximum?: number;
minimum?: number;
multipleOf?: number;
}
/**
* Create a `NumberValidator` node
* @param props Object containing NumberValidator schema properties as key/value pairs
* @returns {NumberValidator} NumberValidator schema node
*/
export declare const numberValidator: (props?: Pick<NumberValidator, "id" | "meta" | "exclusiveMaximum" | "exclusiveMinimum" | "maximum" | "minimum" | "multipleOf">) => NumberValidator;
/**
* A validator specifying the constraints on an integer node.
*/
export interface IntegerValidator extends NumberValidator {
type: 'IntegerValidator';
}
/**
* Create a `IntegerValidator` node
* @param props Object containing IntegerValidator schema properties as key/value pairs
* @returns {IntegerValidator} IntegerValidator schema node
*/
export declare const integerValidator: (props?: Pick<IntegerValidator, "id" | "meta" | "exclusiveMaximum" | "exclusiveMinimum" | "maximum" | "minimum" | "multipleOf">) => IntegerValidator;
/**
* A hyperlink to other pages, sections within the same document, resources, or any URL.
*/
export interface Link extends Entity {
type: 'Link';
content: Array<InlineContent>;
target: string;
exportFrom?: string;
importTo?: string;
relation?: string;
title?: string;
}
/**
* Create a `Link` node
* @param props Object containing Link schema properties as key/value pairs
* @returns {Link} Link schema node
*/
export declare const link: (props: Pick<Link, "id" | "meta" | "target" | "content" | "exportFrom" | "importTo" | "title" | "relation">) => Link;
/**
* A list of items.
*/
export interface List extends Entity {
type: 'List';
items: Array<ListItem>;
order?: 'ascending' | 'descending' | 'unordered';
}
/**
* Create a `List` node
* @param props Object containing List schema properties as key/value pairs
* @returns {List} List schema node
*/
export declare const list: (props: Pick<List, "id" | "meta" | "items" | "order">) => List;
/**
* A single item in a list.
*/
export interface ListItem extends Entity {
type: 'ListItem';
content: Array<Node>;
checked?: boolean;
}
/**
* Create a `ListItem` node
* @param props Object containing ListItem schema properties as key/value pairs
* @returns {ListItem} ListItem schema node
*/
export declare const listItem: (props: Pick<ListItem, "id" | "meta" | "content" | "checked">) => ListItem;
/**
* A mathematical variable or equation.
*/
export interface Math extends Entity {
type: 'Math' | 'MathBlock' | 'MathFragment';
text: string;
errors?: Array<string>;
mathLanguage?: string;
}
/**
* Create a `Math` node
* @param props Object containing Math schema properties as key/value pairs
* @returns {Math} Math schema node
*/
export declare const math: (props: Pick<Math, "id" | "meta" | "text" | "errors" | "mathLanguage">) => Math;
/**
* A block of math, e.g an equation, to be treated as block content.
*/
export interface MathBlock extends Math {
type: 'MathBlock';
}
/**
* Create a `MathBlock` node
* @param props Object containing MathBlock schema properties as key/value pairs
* @returns {MathBlock} MathBlock schema node
*/
export declare const mathBlock: (props: Pick<MathBlock, "id" | "meta" | "text" | "errors" | "mathLanguage">) => MathBlock;
/**
* A fragment of math, e.g a variable name, to be treated as inline content.
*/
export interface MathFragment extends Math {
type: 'MathFragment';
}
/**
* Create a `MathFragment` node
* @param props Object containing MathFragment schema properties as key/value pairs
* @returns {MathFragment} MathFragment schema node
*/
export declare const mathFragment: (props: Pick<MathFragment, "id" | "meta" | "text" | "errors" | "mathLanguage">) => MathFragment;
/**
* A monetary grant.
*/
export interface MonetaryGrant extends Grant {
type: 'MonetaryGrant';
amounts?: number;
funders?: Array<Person | Organization>;
}
/**
* Create a `MonetaryGrant` node
* @param props Object containing MonetaryGrant schema properties as key/value pairs
* @returns {MonetaryGrant} MonetaryGrant schema node
*/
export declare const monetaryGrant: (props?: Pick<MonetaryGrant, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "funders" | "fundedItems" | "sponsors" | "amounts">) => MonetaryGrant;
/**
* An organization such as a school, NGO, corporation, club, etc.
*/
export interface Organization extends Thing {
type: 'Organization';
address?: string;
brands?: Array<Brand>;
contactPoints?: Array<ContactPoint>;
departments?: Array<Organization>;
funders?: Array<Organization | Person>;
legalName?: string;
logo?: string | ImageObject;
parentOrganization?: Organization;
}
/**
* Create a `Organization` node
* @param props Object containing Organization schema properties as key/value pairs
* @returns {Organization} Organization schema node
*/
export declare const organization: (props?: Pick<Organization, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "logo" | "funders" | "address" | "brands" | "contactPoints" | "departments" | "legalName" | "parentOrganization">) => Organization;
/**
* Paragraph
*/
export interface Paragraph extends Entity {
type: 'Paragraph';
content: Array<InlineContent>;
}
/**
* Create a `Paragraph` node
* @param props Object containing Paragraph schema properties as key/value pairs
* @returns {Paragraph} Paragraph schema node
*/
export declare const paragraph: (props: Pick<Paragraph, "id" | "meta" | "content">) => Paragraph;
/**
* A variable representing a name / value pair.
*/
export interface Variable extends Entity {
type: 'Variable' | 'Parameter';
name: string;
readonly?: boolean;
validator?: ValidatorTypes;
value?: Node;
}
/**
* Create a `Variable` node
* @param props Object containing Variable schema properties as key/value pairs
* @returns {Variable} Variable schema node
*/
export declare const variable: (props: Pick<Variable, "id" | "meta" | "value" | "name" | "validator" | "readonly">) => Variable;
/**
* A parameter that can be set and used in evaluated code.
*/
export interface Parameter extends Variable {
type: 'Parameter';
default?: Node;
extends?: boolean;
repeats?: boolean;
required?: boolean;
}
/**
* Create a `Parameter` node
* @param props Object containing Parameter schema properties as key/value pairs
* @returns {Parameter} Parameter schema node
*/
export declare const parameter: (props: Pick<Parameter, "id" | "meta" | "value" | "name" | "validator" | "readonly" | "default" | "extends" | "repeats" | "required">) => Parameter;
/**
* A periodical publication.
*/
export interface Periodical extends CreativeWork {
type: 'Periodical';
dateEnd?: Date | string;
dateStart?: Date | string;
issns?: Array<string>;
}
/**
* Create a `Periodical` node
* @param props Object containing Periodical schema properties as key/value pairs
* @returns {Periodical} Periodical schema node
*/
export declare const periodical: (props?: Pick<Periodical, "id" | "meta" | "content" | "text" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "dateEnd" | "dateStart" | "issns">) => Periodical;
/**
* A person (alive, dead, undead, or fictional).
*/
export interface Person extends Thing {
type: 'Person';
address?: string;
affiliations?: Array<Organization>;
emails?: Array<string>;
familyNames?: Array<string>;
funders?: Array<Organization | Person>;
givenNames?: Array<string>;
honorificPrefix?: string;
honorificSuffix?: string;
jobTitle?: string;
memberOf?: Array<Organization>;
telephoneNumbers?: Array<string>;
}
/**
* Create a `Person` node
* @param props Object containing Person schema properties as key/value pairs
* @returns {Person} Person schema node
*/
export declare const person: (props?: Pick<Person, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "emails" | "telephoneNumbers" | "funders" | "address" | "affiliations" | "familyNames" | "givenNames" | "honorificPrefix" | "honorificSuffix" | "jobTitle" | "memberOf">) => Person;
/**
* Any offered product or service. For example, a pair of shoes;
* a haircut; or an episode of a TV show streamed online.
*/
export interface Product extends Thing {
type: 'Product';
brands?: Array<Brand>;
logo?: string | ImageObject;
productID?: string;
}
/**
* Create a `Product` node
* @param props Object containing Product schema properties as key/value pairs
* @returns {Product} Product schema node
*/
export declare const product: (props?: Pick<Product, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "logo" | "brands" | "productID">) => Product;
/**
* A property-value pair.
*/
export interface PropertyValue extends Thing {
type: 'PropertyValue';
value: Node;
propertyID?: string;
}
/**
* Create a `PropertyValue` node
* @param props Object containing PropertyValue schema properties as key/value pairs
* @returns {PropertyValue} PropertyValue schema node
*/
export declare const propertyValue: (props: Pick<PropertyValue, "id" | "meta" | "value" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "propertyID">) => PropertyValue;
/**
* A part of a successively published publication such as a periodical or publication
* volume, often numbered.
*/
export interface PublicationIssue extends CreativeWork {
type: 'PublicationIssue';
issueNumber?: string | number;
pageEnd?: string | number;
pageStart?: string | number;
pagination?: string;
}
/**
* Create a `PublicationIssue` node
* @param props Object containing PublicationIssue schema properties as key/value pairs
* @returns {PublicationIssue} PublicationIssue schema node
*/
export declare const publicationIssue: (props?: Pick<PublicationIssue, "id" | "meta" | "content" | "pageEnd" | "pageStart" | "pagination" | "text" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "issueNumber">) => PublicationIssue;
/**
* A part of a successively published publication such as a periodical or multi-volume work.
*/
export interface PublicationVolume extends CreativeWork {
type: 'PublicationVolume';
pageEnd?: string | number;
pageStart?: string | number;
pagination?: string;
volumeNumber?: string | number;
}
/**
* Create a `PublicationVolume` node
* @param props Object containing PublicationVolume schema properties as key/value pairs
* @returns {PublicationVolume} PublicationVolume schema node
*/
export declare const publicationVolume: (props?: Pick<PublicationVolume, "id" | "meta" | "content" | "pageEnd" | "pageStart" | "pagination" | "text" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "volumeNumber">) => PublicationVolume;
/**
* Inline, quoted content.
*/
export interface Quote extends Mark {
type: 'Quote';
cite?: Cite | string;
}
/**
* Create a `Quote` node
* @param props Object containing Quote schema properties as key/value pairs
* @returns {Quote} Quote schema node
*/
export declare const quote: (props: Pick<Quote, "id" | "meta" | "content" | "cite">) => Quote;
/**
* A section quoted from somewhere else.
*/
export interface QuoteBlock extends Entity {
type: 'QuoteBlock';
content: Array<BlockContent>;
cite?: Cite | string;
}
/**
* Create a `QuoteBlock` node
* @param props Object containing QuoteBlock schema properties as key/value pairs
* @returns {QuoteBlock} QuoteBlock schema node
*/
export declare const quoteBlock: (props: Pick<QuoteBlock, "id" | "meta" | "content" | "cite">) => QuoteBlock;
/**
* A software application.
*/
export interface SoftwareApplication extends CreativeWork {
type: 'SoftwareApplication';
softwareRequirements?: Array<SoftwareApplication>;
softwareVersion?: string;
}
/**
* Create a `SoftwareApplication` node
* @param props Object containing SoftwareApplication schema properties as key/value pairs
* @returns {SoftwareApplication} SoftwareApplication schema node
*/
export declare const softwareApplication: (props?: Pick<SoftwareApplication, "id" | "meta" | "content" | "text" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "softwareRequirements" | "softwareVersion">) => SoftwareApplication;
/**
* A computational environment.
*/
export interface SoftwareEnvironment extends Thing {
type: 'SoftwareEnvironment';
name: string;
adds?: Array<SoftwareSourceCode>;
extends?: Array<SoftwareEnvironment>;
removes?: Array<SoftwareSourceCode>;
}
/**
* Create a `SoftwareEnvironment` node
* @param props Object containing SoftwareEnvironment schema properties as key/value pairs
* @returns {SoftwareEnvironment} SoftwareEnvironment schema node
*/
export declare const softwareEnvironment: (props: Pick<SoftwareEnvironment, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "extends" | "adds" | "removes">) => SoftwareEnvironment;
/**
* Definition of a compute session, including its software and compute resource
* requirements and status.
*/
export interface SoftwareSession extends Thing {
type: 'SoftwareSession';
clientsLimit?: number;
clientsRequest?: number;
cpuLimit?: number;
cpuRequest?: number;
dateEnd?: Date | string;
dateStart?: Date | string;
durationLimit?: number;
durationRequest?: number;
environment?: SoftwareEnvironment;
memoryLimit?: number;
memoryRequest?: number;
networkTransferLimit?: number;
networkTransferRequest?: number;
status?: 'unknown' | 'starting' | 'started' | 'stopping' | 'stopped' | 'failed';
timeoutLimit?: number;
timeoutRequest?: number;
volumeMounts?: Array<VolumeMount>;
}
/**
* Create a `SoftwareSession` node
* @param props Object containing SoftwareSession schema properties as key/value pairs
* @returns {SoftwareSession} SoftwareSession schema node
*/
export declare const softwareSession: (props?: Pick<SoftwareSession, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "dateEnd" | "dateStart" | "clientsLimit" | "clientsRequest" | "cpuLimit" | "cpuRequest" | "durationLimit" | "durationRequest" | "environment" | "memoryLimit" | "memoryRequest" | "networkTransferLimit" | "networkTransferRequest" | "status" | "timeoutLimit" | "timeoutRequest" | "volumeMounts">) => SoftwareSession;
/**
* Computer programming source code. Example: Full (compile ready) solutions, code snippet samples, scripts, templates.
*/
export interface SoftwareSourceCode extends CreativeWork {
type: 'SoftwareSourceCode';
codeRepository?: string;
codeSampleType?: string;
maintainers?: Array<Organization | Person>;
programmingLanguage?: string;
runtimePlatform?: Array<string>;
softwareRequirements?: Array<SoftwareSourceCode | SoftwareApplication | string>;
targetProducts?: Array<SoftwareApplication>;
}
/**
* Create a `SoftwareSourceCode` node
* @param props Object containing SoftwareSourceCode schema properties as key/value pairs
* @returns {SoftwareSourceCode} SoftwareSourceCode schema node
*/
export declare const softwareSourceCode: (props?: Pick<SoftwareSourceCode, "id" | "meta" | "content" | "text" | "programmingLanguage" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "softwareRequirements" | "codeRepository" | "codeSampleType" | "maintainers" | "runtimePlatform" | "targetProducts">) => SoftwareSourceCode;
/**
* A schema specifying constraints on a string node.
*/
export interface StringValidator extends Entity {
type: 'StringValidator';
maxLength?: number;
minLength?: number;
pattern?: string;
}
/**
* Create a `StringValidator` node
* @param props Object containing StringValidator schema properties as key/value pairs
* @returns {StringValidator} StringValidator schema node
*/
export declare const stringValidator: (props?: Pick<StringValidator, "id" | "meta" | "maxLength" | "minLength" | "pattern">) => StringValidator;
/**
* Strongly emphasised content.
*/
export interface Strong extends Mark {
type: 'Strong';
}
/**
* Create a `Strong` node
* @param props Object containing Strong schema properties as key/value pairs
* @returns {Strong} Strong schema node
*/
export declare const strong: (props: Pick<Strong, "id" | "meta" | "content">) => Strong;
/**
* Subscripted content.
*/
export interface Subscript extends Mark {
type: 'Subscript';
}
/**
* Create a `Subscript` node
* @param props Object containing Subscript schema properties as key/value pairs
* @returns {Subscript} Subscript schema node
*/
export declare const subscript: (props: Pick<Subscript, "id" | "meta" | "content">) => Subscript;
/**
* Superscripted content.
*/
export interface Superscript extends Mark {
type: 'Superscript';
}
/**
* Create a `Superscript` node
* @param props Object containing Superscript schema properties as key/value pairs
* @returns {Superscript} Superscript schema node
*/
export declare const superscript: (props: Pick<Superscript, "id" | "meta" | "content">) => Superscript;
/**
* A table.
*/
export interface Table extends CreativeWork {
type: 'Table';
rows: Array<TableRow>;
}
/**
* Create a `Table` node
* @param props Object containing Table schema properties as key/value pairs
* @returns {Table} Table schema node
*/
export declare const table: (props: Pick<Table, "id" | "meta" | "content" | "text" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "rows">) => Table;
/**
* A cell within a `Table`.
*/
export interface TableCell extends Entity {
type: 'TableCell';
content: Array<Node>;
cellType?: 'data' | 'header';
colspan?: number;
name?: string;
rowspan?: number;
}
/**
* Create a `TableCell` node
* @param props Object containing TableCell schema properties as key/value pairs
* @returns {TableCell} TableCell schema node
*/
export declare const tableCell: (props: Pick<TableCell, "id" | "meta" | "content" | "name" | "cellType" | "colspan" | "rowspan">) => TableCell;
/**
* A row within a Table.
*/
export interface TableRow extends Entity {
type: 'TableRow';
cells: Array<TableCell>;
rowType?: 'header' | 'footer';
}
/**
* Create a `TableRow` node
* @param props Object containing TableRow schema properties as key/value pairs
* @returns {TableRow} TableRow schema node
*/
export declare const tableRow: (props: Pick<TableRow, "id" | "meta" | "cells" | "rowType">) => TableRow;
/**
* A thematic break, such as a scene change in a story, a transition to another topic, or a new document.
*/
export interface ThematicBreak extends Entity {
type: 'ThematicBreak';
}
/**
* Create a `ThematicBreak` node
* @param props Object containing ThematicBreak schema properties as key/value pairs
* @returns {ThematicBreak} ThematicBreak schema node
*/
export declare const thematicBreak: (props?: Pick<ThematicBreak, "id" | "meta">) => ThematicBreak;
/**
* A validator specifying constraints on an array of heterogeneous items.
*/
export interface TupleValidator extends Entity {
type: 'TupleValidator';
items?: Array<ValidatorTypes>;
}
/**
* Create a `TupleValidator` node
* @param props Object containing TupleValidator schema properties as key/value pairs
* @returns {TupleValidator} TupleValidator schema node
*/
export declare const tupleValidator: (props?: Pick<TupleValidator, "id" | "meta" | "items">) => TupleValidator;
/**
* A video file.
*/
export interface VideoObject extends MediaObject {
type: 'VideoObject';
caption?: string;
thumbnail?: ImageObject;
transcript?: string;
}
/**
* Create a `VideoObject` node
* @param props Object containing VideoObject schema properties as key/value pairs
* @returns {VideoObject} VideoObject schema node
*/
export declare const videoObject: (props: Pick<VideoObject, "id" | "meta" | "content" | "text" | "format" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "authors" | "dateAccepted" | "dateCreated" | "dateModified" | "datePublished" | "dateReceived" | "editors" | "fundedBy" | "funders" | "isPartOf" | "keywords" | "licenses" | "parts" | "publisher" | "references" | "title" | "version" | "contentUrl" | "bitrate" | "contentSize" | "embedUrl" | "caption" | "transcript" | "thumbnail">) => VideoObject;
/**
* Describes a volume mount from a host to container.
*/
export interface VolumeMount extends Thing {
type: 'VolumeMount';
mountDestination: string;
mountOptions?: Array<string>;
mountSource?: string;
mountType?: string;
}
/**
* Create a `VolumeMount` node
* @param props Object containing VolumeMount schema properties as key/value pairs
* @returns {VolumeMount} VolumeMount schema node
*/
export declare const volumeMount: (props: Pick<VolumeMount, "id" | "meta" | "alternateNames" | "description" | "identifiers" | "name" | "url" | "mountDestination" | "mountOptions" | "mountSource" | "mountType">) => VolumeMount;
/**
* Union type for valid block content.
*/
export declare type BlockContent = CodeBlock | CodeChunk | Heading | List | ListItem | MathBlock | Paragraph | QuoteBlock | Table | ThematicBreak;
/**
* All type schemas that are derived from CodeBlock
*/
export declare type CodeBlockTypes = CodeBlock | CodeChunk;
/**
* All type schemas that are derived from CodeFragment
*/
export declare type CodeFragmentTypes = CodeFragment | CodeExpression;
/**
* All type schemas that are derived from Code
*/
export declare type CodeTypes = Code | CodeBlock | CodeChunk | CodeExpression | CodeFragment;
/**
* All type schemas that are derived from CreativeWork
*/
export declare type CreativeWorkTypes = CreativeWork | Article | AudioObject | Collection | Datatable | Figure | ImageObject | MediaObject | Periodical | PublicationIssue | PublicationVolume | SoftwareApplication | SoftwareSourceCode | Table | VideoObject;
/**
* All type schemas that are derived from Entity
*/
export declare type EntityTypes = Entity | ArrayValidator | Article | AudioObject | BooleanValidator | Brand | Cite | CiteGroup | Code | CodeBlock | CodeChunk | CodeError | CodeExpression | CodeFragment | Collection | ConstantValidator | ContactPoint | CreativeWork | Datatable | DatatableColumn | Date | Delete | Emphasis | EnumValidator | Figure | Function | Grant | Heading | ImageObject | Include | IntegerValidator | Link | List | ListItem | Mark | Math | MathBlock | MathFragment | MediaObject | MonetaryGrant | NumberValidator | Organization | Paragraph | Parameter | Periodical | Person | Product | PropertyValue | PublicationIssue | PublicationVolume | Quote | QuoteBlock | SoftwareApplication | SoftwareEnvironment | SoftwareSession | SoftwareSourceCode | StringValidator | Strong | Subscript | Superscript | Table | TableCell | TableRow | ThematicBreak | Thing | TupleValidator | Variable | VideoObject | VolumeMount;
/**
* All type schemas that are derived from Grant
*/
export declare type GrantTypes = Grant |