Suncel home pageSuncel logoSuncel v1.1
  1. References

Types > references

Types references

Type references for Pages, Globals and Project.

Page

type Page = {
  _id: string;
  name: string;
  slug: string;
  is_folder: boolean;
  language?: string;
  page_variant_id?: string;
  status?: PageStatus;
  tags?: string[];
  content_type: string;
  updatedAt: string;
  createdAt:string;
  author: {
    _id: string;
    firstname: string;
    lastname: string;
    email: string;
    avatar_url: string;
  };
  content?: Record<string, any>;
  history?:
    | {
        id: string;
        author: string;
        createdAt: string;
      }[]
    | SaveContent[];
  saved_content?: SavedContent;
  path?: string;
  properties: { metas?: MetaProps } & Record<string, any>;
  parent: string;
  published_date?: string;
};

Global

interface Global<GlobalContentType = Record<string, any>> {
  _id: string;
  name: string;
  slug: string;
  is_folder: boolean;
  parent?: string;
  global_type: string;
  updatedAt: string;
  author: {
    _id: string;
    firstname: string;
    lastname: string;
    email: string;
  };
  contents?: [{ language: string; content: GlobalContentType }];
  content?: GlobalContentType;// When use getGlobal with language option
  language?: string // When use getGlobal with language option
  path?: string;
  properties: Record<string, any>;
}

Project

interface Project {
  _id: string;
  name: string;
  slug: string;
  logo?: string;
  languages?: { code: string; name: string }[];
  default_language: string;
  sns: SnsSettingsType;
  revalidate_secret?: string;
  domain?: string;
}