Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
directus.ts 1.10 KiB
import { createDirectus, rest, } from '@directus/sdk';

type Post = {
  id: string;
  status: string;
  sort: string;
  user_created: string;
  user_updated: string;
  date_created: string;
  date_updated: string;
  title: string;
  content: string;
}


type Member = {
  id: number;
  date_created: number;
  name: string;
  department: string;
  image1: string;
  image2: string;
}

type Mottos = {
  Motto: string; 
  Description: string;
}

type Globals_translations = {
  id: string;
  Languages_code: string;
  Introduction: string;
}

type Abouts = {
  link: string;
  id: number;
  sort: number;
  translations: number[];
}

export type Abouts_translations = {
  id: string;
  Abouts_id: number;
  Languages_code: string;
  title: string;
  content: string;
}


type Schema = {
  Posts: Post[];
  Globals: any;
  Globals_translations: Globals_translations[];
  Members: Member[];
  Mottos: Mottos[];
  Abouts: Abouts[];
  Abouts_translations: Abouts_translations[];
}

export const CONTENT_URL = "https://content.hai-liste.de"
const directus = createDirectus<Schema>(CONTENT_URL).with(rest());

export default directus;