export interface Post {
  apiVersion: string;
  kind: string;
  metadata: {
    annotations: Record<string, string>;
    name: string;
  };
  spec: {
    allowComment: boolean;
    baseSnapshot: string;
    categories: string[];
    cover: string;
    deleted: boolean;
    excerpt: {
      autoGenerate: boolean;
      raw: string;
    };
    headSnapshot: string;
    htmlMetas: unknown[];
    owner: string;
    pinned: boolean;
    priority: number;
    publish: boolean;
    publishTime: string;
    releaseSnapshot: string;
    slug: string;
    tags: string[];
    template: string;
    title: string;
    visible: string;
  };
}

export interface Snapshot {
  metadata: {
    annotations?: Record<string, string>;
    name?: string;
  };
  spec?: {
    rawType?: string;
    displayName?: string;
    slug?: string;
  };
}

export interface Content {
  rawType: string;
  raw: string;
  content: string;
}

export interface Category {
  metadata: {
    name: string;
  };
  spec: {
    displayName: string;
    slug: string;
    description: string;
    cover: string;
    template: string;
    priority: number;
    children: unknown[];
  };
}

export interface Tag {
  metadata: {
    name: string;
  };
  spec: {
    displayName: string;
    slug: string;
    color: string;
    cover: string;
  };
}
