aboutsummaryrefslogtreecommitdiffstats
path: root/src/ts/types/articles.ts
blob: 5d5fbc501bbf7ea9715204bfc319d08a66d38fd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Cover, CoverResponse } from './cover';
import { SubjectPreview, ThematicPreview } from './taxonomies';

export type ArticleDates = {
  publication: string;
  update: string;
};

export type ArticlePreviewResponse = {
  acfPosts: {
    postsInSubject: SubjectPreview[] | null;
    postsInThematics: ThematicPreview[] | null;
  };
  commentCount: number;
  contentParts: {
    beforeMore: string;
  };
  databaseId: number;
  date: string;
  featuredImage: CoverResponse | null;
  id: string;
  modified: string;
  slug: string;
  title: string;
};

export type ArticlePreview = {
  commentCount: number;
  content: string;
  databaseId: number;
  date: ArticleDates;
  featuredImage?: Cover | object;
  id: string;
  slug: string;
  subjects: SubjectPreview[] | [];
  thematics: ThematicPreview[] | [];
  title: string;
};