UNPKG

@datocms/cma-client

Version:
27 lines (26 loc) 1.18 kB
import { type LocalizedFieldValue } from '../utilities/normalizedFieldValues'; import type { LinksEmbedEditorConfiguration } from './appearance/links_embed'; import type { LinksSelectEditorConfiguration } from './appearance/links_select'; import type { ItemsItemTypeValidator } from './validators/items_item_type'; import type { SizeValidator } from './validators/size'; export type LinksFieldValue = string[]; export declare function isLinksFieldValue(value: unknown): value is LinksFieldValue; export declare function isLocalizedLinksFieldValue(value: unknown): value is LocalizedFieldValue<LinksFieldValue>; export type LinksFieldValidators = { /** Only accept references to records of the specified models */ items_item_type: ItemsItemTypeValidator; /** Only accept a number of items within the specified range */ size?: SizeValidator; }; export type LinksFieldAppearance = { editor: 'links_select'; parameters: LinksSelectEditorConfiguration; } | { editor: 'links_embed'; parameters: LinksEmbedEditorConfiguration; } | { /** Plugin ID */ editor: string; /** Plugin configuration */ parameters: Record<string, unknown>; };