mirror of
https://github.com/OwethuManagedServices/oms-website-nextjs.git
synced 2025-12-17 18:58:10 +00:00
feature: intergrated directus for posts
This commit is contained in:
79
types/index.d.ts
vendored
Normal file
79
types/index.d.ts
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
export interface OutputData {
|
||||
time: number;
|
||||
blocks: ContentBlock[];
|
||||
version: string;
|
||||
}
|
||||
|
||||
export interface ContentBlock {
|
||||
id: string;
|
||||
type: string;
|
||||
data:
|
||||
| ParagraphData
|
||||
| HeaderData
|
||||
| ListData
|
||||
| ImageData
|
||||
| QuoteData
|
||||
| CodeData;
|
||||
}
|
||||
|
||||
export interface ParagraphData {
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface HeaderData {
|
||||
text: string;
|
||||
level: number;
|
||||
}
|
||||
|
||||
export interface ListData {
|
||||
style: "ordered" | "unordered";
|
||||
items: string[];
|
||||
}
|
||||
|
||||
export interface ImageData {
|
||||
file: {
|
||||
url: string;
|
||||
width?: number;
|
||||
height?: number;
|
||||
};
|
||||
caption?: string;
|
||||
}
|
||||
|
||||
export interface QuoteData {
|
||||
text: string;
|
||||
caption?: string;
|
||||
}
|
||||
|
||||
export interface CodeData {
|
||||
code: string;
|
||||
}
|
||||
|
||||
export interface Post {
|
||||
slug: string;
|
||||
status: string;
|
||||
user_created: string;
|
||||
date_created: string;
|
||||
user_updated: string | null;
|
||||
date_updated: string | null;
|
||||
title: string;
|
||||
content: OutputData | null;
|
||||
excerpt: string | null;
|
||||
featured_image: string | null;
|
||||
imageUrl?: string | null;
|
||||
}
|
||||
export interface HeroSection {
|
||||
id: string;
|
||||
hero_title?: string;
|
||||
hero_subtitle?: string;
|
||||
hero_cover?: string;
|
||||
hero_buttons?: HeroButton[];
|
||||
}
|
||||
|
||||
interface HeroButton {
|
||||
label?: string;
|
||||
link?: string;
|
||||
}
|
||||
|
||||
interface ItemsQuery {
|
||||
fields?: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user