diff --git a/app/types/strapi/common.ts b/app/types/strapi/common.ts deleted file mode 100644 index 78f30c0..0000000 --- a/app/types/strapi/common.ts +++ /dev/null @@ -1,53 +0,0 @@ -export interface StrapiEntity { - id: number; - documentId: string; - createdAt: string; - updatedAt: string; - publishedAt: string; - locale: string; -} - -export interface StrapiMedia { - id: number; - url: string; - ext: string; - name: string; - size: number; - alternativeText: string; - caption: string; -} - -export interface StrapiImageFormat { - url: string; - width: number; - height: number; - size: number; -} - -export interface StrapiImage extends StrapiMedia { - width: number; - height: number; - formats: { - small: StrapiImageFormat; - medium: StrapiImageFormat; - thumbnail: StrapiImageFormat; - }; -} - -export interface StrapiResponse { - data: T; - meta: { - pagination: { - page: number; - pageSize: number; - pageCount: number; - total: number; - }; - }; -} - -export type StrapiRelation = Omit< - T, - K | keyof StrapiEntity -> & - StrapiEntity; diff --git a/app/types/strapi/index.ts b/app/types/strapi/index.ts deleted file mode 100644 index cbbf316..0000000 --- a/app/types/strapi/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './common'; -export * from './production'; -export * from './singleTypes'; -export * from './solution'; -export * from './question'; diff --git a/app/types/strapi/production.ts b/app/types/strapi/production.ts deleted file mode 100644 index b14afb3..0000000 --- a/app/types/strapi/production.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { - StrapiEntity, - StrapiImage, - StrapiMedia, - StrapiRelation, -} from './common'; - -export interface ProductionType extends StrapiEntity { - type: string; -} - -export interface ProductionSpecItem { - label: string; - value: string; -} - -export interface ProductionSpecGroup { - title: string; - items: ProductionSpecItem[]; -} - -export interface Production extends StrapiEntity { - title: string; - summary: string; - production_type: ProductionType; - cover: StrapiImage; - production_images: StrapiImage[]; - production_details: string; - production_specs: ProductionSpecGroup[]; - production_documents: StrapiRelation< - ProductionDocument, - 'related_productions' - >[]; - questions: StrapiRelation[]; - show_in_production_list: boolean; -} - -export interface ProductionDocument extends StrapiEntity { - document: StrapiMedia; - related_productions: StrapiRelation[]; -} diff --git a/app/types/strapi/question.ts b/app/types/strapi/question.ts deleted file mode 100644 index 1014eeb..0000000 --- a/app/types/strapi/question.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface Question extends StrapiEntity { - title: string; - content: string; - related_productions: StrapiRelation[]; -} diff --git a/app/types/strapi/singleTypes.ts b/app/types/strapi/singleTypes.ts deleted file mode 100644 index a7441be..0000000 --- a/app/types/strapi/singleTypes.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface StrapiCompanyProfile extends StrapiEntity { - content: string; -} - -export interface StrapiContactInfo extends StrapiEntity { - content: string; -} - -export interface StrapiHomepage extends StrapiEntity { - carousel: StrapiImage[]; - recommend_productions: StrapiRelation[]; - recommend_solutions: StrapiRelation[]; -} diff --git a/app/types/strapi/solution.ts b/app/types/strapi/solution.ts deleted file mode 100644 index b03f10a..0000000 --- a/app/types/strapi/solution.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { StrapiEntity, StrapiImage } from './common'; - -export interface SolutionType extends StrapiEntity { - type: string; -} - -export interface Solution extends StrapiEntity { - title: string; - summary: string; - cover: StrapiImage; - solution_type: SolutionType; - content: string; -}