mirror of
https://github.com/DerTyp7/explainegy-nextjs.git
synced 2025-10-29 21:02:13 +01:00
cherry
This commit is contained in:
40
types/api.ts
Normal file
40
types/api.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import { IContentTableEntry } from "./contentTable";
|
||||
import { Prisma } from '@prisma/client';
|
||||
|
||||
export interface CreateArticle {
|
||||
title: string;
|
||||
markdown: string;
|
||||
introduction: string;
|
||||
categoryId: number;
|
||||
contentTable: Prisma.JsonArray
|
||||
imageId?: number;
|
||||
}
|
||||
|
||||
export interface UpdateArticle {
|
||||
id: string;
|
||||
title?: string;
|
||||
markdown?: string;
|
||||
introduction?: string;
|
||||
categoryId?: number;
|
||||
contentTable?: Prisma.JsonArray
|
||||
imageId?: number;
|
||||
}
|
||||
|
||||
export interface CreateCategory {
|
||||
title: string;
|
||||
svg: {
|
||||
|
||||
path: string;
|
||||
viewbox: string;
|
||||
}
|
||||
color: string;
|
||||
}
|
||||
export interface UpdateCategory {
|
||||
id: string;
|
||||
title?: string;
|
||||
svg?: {
|
||||
path?: string;
|
||||
viewbox?: string;
|
||||
}
|
||||
color?: string;
|
||||
}
|
||||
5
types/contentTable.ts
Normal file
5
types/contentTable.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
export interface IContentTableEntry {
|
||||
anchor: string;
|
||||
title: string;
|
||||
}
|
||||
4
types/responseErrors.ts
Normal file
4
types/responseErrors.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export type ResponseError = {
|
||||
code: string;
|
||||
message: string;
|
||||
};
|
||||
Reference in New Issue
Block a user