import { AxiosResponse } from "axios"; export type PublicApiPostTranslation = { id: number; locale: string; title: string; content: string; metaTitle: string; metaDescription: string; ogTitle: string; ogDescription: string; updatedAt: string; }; type PublicApiPost = { id: number; slug: string; author: string; category?: number; ogImage?: ApiImage; translations: PublicApiPostTranslation[]; }; type ApiImage = { id: number; fileName: string; }; type PublicApiCategoryTranslation = { id: number; locale: string; name: string; parent: number; }; type PublicApiCategory = { id: number; slug: string; name: string; parent?: number; translations: PublicApiCategoryTranslation[]; }; export type GetPublicApiPostsResponse = AxiosResponse<{ items: PublicApiPost[] }>; export type GetPublicApiCategoriesResponse = AxiosResponse<{ items: PublicApiCategory[] }>; export type LocalizedPostPageConfig = { title: string; metaTitle: string; metaDescription: string; ogTitle: string; ogDescription: string; blocks: { id: string; type: string; data: object }[]; // TODO category: { name: string; slug: string; url: string; } | null; hasCategory: boolean; author: string; updatedAt: string; }; // locale.category-slug.post-slug.post export type PagesConfig = { [key in string]: LocaleContent; }; export type LocaleContent = { [key in string]: CategoryContent; }; export type CategoryContent = { posts: { [key in string]: LocalizedPostPageConfig; }; // isCategoryEnabled: boolean; // isCategoryExists: boolean; category: { name: string; slug: string; locale: string; } | null; isCategoryEnabled: boolean; }; export type LatestPostData = { translationId: number; title: string; description: string; updatedAt: string; link: string; imageSrc?: string; }; export type LatestPostsByLocale = { [key in string]: LatestPostData[]; };