Initial commit
This commit is contained in:
9
shared/types/api.ts
Normal file
9
shared/types/api.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export type ApiErrorDTO = {
|
||||
code: string
|
||||
message: string
|
||||
details?: unknown
|
||||
}
|
||||
|
||||
export type ApiResponse<T> =
|
||||
| { success: true; data: T }
|
||||
| { success: false; error: ApiErrorDTO }
|
||||
Reference in New Issue
Block a user