/** * To save the model, the model object is serialized. * However, not all contents are serializable, such as Set objects. * A JSON-series data structures are defined to keep a serializable version of the model. * * So, there is a need to convert the JSON model to MMEL model (and vice versa) */ import { DataType, MMELNode } from '../serialize/interface/baseinterface'; import { MMELEnum } from '../serialize/interface/datainterface'; import { MMELSubprocess } from '../serialize/interface/flowcontrolinterface'; import { MMELFigure, MMELLink, MMELMetadata, MMELReference, MMELRole, MMELTable, MMELTerm, MMELTextSection, MMELVariable, MMELView, NOTE_TYPE } from '../serialize/interface/supportinterface'; import { JSONContextType } from '../utils/repo/io'; export interface MMELJSON { '@context': JSONContextType; '@type': 'MMEL_SMART'; meta?: MMELMetadata; roles?: Record; provisions?: Record; elements?: Record; refs?: Record; enums?: Record; vars?: Record; notes?: Record; pages?: Record; views?: Record; terms?: Record; tables?: Record; figures?: Record; sections?: Record; links?: Record; comments?: Record; root?: string; version?: string; } export interface JSONProvision { id: string; modality: string; condition: string; ref: string[]; datatype: DataType.PROVISION; } export interface JSONNote { id: string; type: NOTE_TYPE; message: string; ref: string[]; datatype: DataType.NOTE; } export interface JSONComment { id: string; username: string; message: string; feedback: string[]; resolved: boolean; timestamp: string; datatype: DataType.COMMENT; } export interface JSONProcess { id: string; name: string; modality: string; actor: string; output: string[]; input: string[]; provision: string[]; links: string[]; notes: string[]; tables: string[]; figures: string[]; comments: string[]; page: string; measure: string[]; datatype: DataType.PROCESS; } export interface JSONDataAttribute { id: string; type: string; modality: string; cardinality: string; definition: string; ref: string[]; datatype: DataType.DATAATTRIBUTE; } export interface JSONDataclass { id: string; attributes: Record; datatype: DataType.DATACLASS; } export interface JSONRegistry { id: string; title: string; data: string; datatype: DataType.REGISTRY; } export interface JSONApproval { id: string; name: string; modality: string; actor: string; approver: string; records: string[]; ref: string[]; datatype: DataType.APPROVAL; } export declare function isJSONProcess(x: MMELNode): x is JSONProcess; export declare function isJSONApproval(x: MMELNode): x is JSONApproval; export declare function isJSONDataClass(x: MMELNode): x is JSONDataclass; //# sourceMappingURL=json.d.ts.map