import { ResolvableType } from '../jsonTypeResolution/TypeResolver'; interface MatrixAssetShape { matrixAssetId: string; matrixIdentifier: string; matrixDomain?: string; } export const MatrixAssetType = ResolvableType({ title: 'MatrixAsset', type: 'object', properties: { matrixAssetId: { type: 'string', }, matrixIdentifier: { type: 'string', }, matrixDomain: { type: 'string', }, }, required: ['matrixAssetId', 'matrixIdentifier'], }); export type MatrixAssetType = typeof MatrixAssetType; interface MatrixAssetLinkShape extends MatrixAssetShape { text?: string; target: '_blank' | '_parent' | '_self' | '_top'; } export const MatrixAssetLinkType = ResolvableType({ title: 'MatrixAssetLink', type: 'object', properties: { matrixAssetId: { type: 'string', }, matrixIdentifier: { type: 'string', }, matrixDomain: { type: 'string', }, text: { type: 'string', }, target: { type: 'string', enum: ['_blank', '_parent', '_self', '_top'], }, }, required: ['matrixAssetId', 'matrixIdentifier'], }); export type MatrixAssetLinkType = typeof MatrixAssetLinkType;