UNPKG

storyblok

Version:
122 lines (119 loc) 3.14 kB
type StoryblokPropertyType = 'asset' | 'multiasset' | 'multilink' | 'table' | 'richtext'; interface StoryblokAsset { alt: string | null; copyright: string | null; fieldtype: 'asset'; id: number; filename: string | null; name: string; title: string | null; focus: string | null; meta_data: Record<string, any>; source: string | null; is_external_url: boolean; is_private: boolean; src: string; updated_at: string; width: number | null; height: number | null; aspect_ratio: number | null; public_id: string | null; content_type: string; } interface StoryblokMultiasset extends Array<StoryblokAsset> { } interface StoryblokMultilinkStory { name: string; created_at: string; published_at: string; id: number; uuid: string; content: Record<string, any>; slug: string; full_slug: string; sort_by_date?: string; position?: number; tag_list?: string[]; is_startpage?: boolean; parent_id?: number | null; meta_data?: Record<string, any> | null; group_id?: string; first_published_at?: string; release_id?: number | null; lang?: string; path?: string | null; alternates?: any[]; default_full_slug?: string | null; translated_slugs?: any[] | null; } interface StoryblokMultilinkLink { id: number; uuid: string; slug: string; path: string | null; parent_id: number; name: string; is_folder: boolean; published: boolean; is_startpage: boolean; position: number; real_path: string; } interface StoryblokMultilinkUrl { name: string; id: number; uuid: string; slug: string; url: string; full_slug: string; } interface StoryblokMultilinkBase { fieldtype: 'multilink'; id: string; url: string; cached_url: string; target?: '_blank' | '_self'; anchor?: string; rel?: string; title?: string; prep?: string; } type StoryblokMultilink = (StoryblokMultilinkBase & { linktype: 'story'; story?: StoryblokMultilinkStory | StoryblokMultilinkLink | StoryblokMultilinkUrl; }) | (StoryblokMultilinkBase & { linktype: 'url'; }) | (StoryblokMultilinkBase & { linktype: 'email'; email: string; }) | (StoryblokMultilinkBase & { linktype: 'asset'; }); interface StoryblokTable { fieldtype: 'table'; thead: Array<{ _uid: string; value: string; component: '_table_head'; _editable?: string; }>; tbody: Array<{ _uid: string; component: '_table_row'; _editable?: string; body: Array<{ _uid: string; value: string; component: '_table_col'; _editable?: string; }>; }>; } interface StoryblokRichtext { type: string; content?: StoryblokRichtext[]; marks?: StoryblokRichtext[]; attrs?: Record<string, any>; text?: string; } export type { StoryblokAsset, StoryblokMultiasset, StoryblokMultilink, StoryblokMultilinkLink, StoryblokMultilinkStory, StoryblokMultilinkUrl, StoryblokPropertyType, StoryblokRichtext, StoryblokTable };