feat: TypeScript types for Directus collections

This commit is contained in:
achmad
2026-05-28 22:25:27 +07:00
parent 00e85b5c31
commit 7ffc6cbad6
+41
View File
@@ -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[]
}