summaryrefslogtreecommitdiffstats
path: root/src/ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/ts')
-rw-r--r--src/ts/types/taxonomies.ts47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/ts/types/taxonomies.ts b/src/ts/types/taxonomies.ts
index dd45852..d090e2d 100644
--- a/src/ts/types/taxonomies.ts
+++ b/src/ts/types/taxonomies.ts
@@ -1,3 +1,4 @@
+import { ArticlePreview, ArticlePreviewResponse } from './articles';
import { Cover } from './cover';
type TaxonomyPreview = {
@@ -7,8 +8,54 @@ type TaxonomyPreview = {
title: string;
};
+export type Taxonomy = TaxonomyPreview & {
+ content: string;
+ date: string;
+ intro: string;
+ modified: string;
+ posts: ArticlePreview[];
+};
+
export type SubjectPreview = TaxonomyPreview & {
cover: Cover;
};
export type ThematicPreview = TaxonomyPreview;
+
+export type ThematicResponse = TaxonomyPreview & {
+ acfThematics: {
+ postsInThematic: ArticlePreviewResponse[];
+ };
+ contentParts: {
+ afterMore: string;
+ beforeMore: string;
+ };
+ date: string;
+ modified: string;
+};
+
+export type ThematicProps = {
+ thematic: Taxonomy;
+};
+
+export type AllTaxonomiesSlug = {
+ slug: string;
+};
+
+export type AllTaxonomiesSlugResponse = {
+ thematics: {
+ nodes: AllTaxonomiesSlug[];
+ };
+};
+
+export type ThematicByResponse = {
+ thematicBy: ThematicResponse;
+};
+
+export type FetchThematicByReturn = (
+ slug: string
+) => Promise<ThematicByResponse>;
+
+export type GetTaxonomyByReturn = (slug: string) => Promise<Taxonomy>;
+
+export type FetchAllTaxonomiesSlugReturn = () => Promise<AllTaxonomiesSlug[]>;