feat: TypeScript types for Directus collections
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
export type ArticleStatus = 'published' | 'draft'
|
||||
|
||||
export interface Category {
|
||||
id: string
|
||||
name: string
|
||||
slug: string
|
||||
description: string | null
|
||||
}
|
||||
|
||||
export interface Tag {
|
||||
id: string
|
||||
name: string
|
||||
slug: string
|
||||
}
|
||||
|
||||
export interface ArticleTag {
|
||||
tags_id: Tag
|
||||
}
|
||||
|
||||
export interface Article {
|
||||
id: string
|
||||
title: string
|
||||
slug: string
|
||||
status: ArticleStatus
|
||||
content: string | null
|
||||
excerpt: string | null
|
||||
featured_image: string | null
|
||||
published_at: string | null
|
||||
is_featured: boolean
|
||||
seo_title: string | null
|
||||
seo_description: string | null
|
||||
category: Category
|
||||
tags: ArticleTag[]
|
||||
}
|
||||
|
||||
export interface SiteSettings {
|
||||
id: string
|
||||
site_name: string
|
||||
hero_article: Article | null
|
||||
nav_categories: Category[]
|
||||
}
|
||||
Reference in New Issue
Block a user