2022-03-30 14:56:24 +00:00
|
|
|
import { User, ApiKey, Team, SelectedCalendar } from "@calcom/prisma/client";
|
2022-03-30 12:17:55 +00:00
|
|
|
|
|
|
|
// Base response, used for all responses
|
|
|
|
export type BaseResponse = {
|
|
|
|
message?: string;
|
|
|
|
error?: Error;
|
|
|
|
};
|
|
|
|
// User
|
|
|
|
export type UserResponse = BaseResponse & {
|
|
|
|
data?: Partial<User>;
|
|
|
|
};
|
|
|
|
export type UsersResponse = BaseResponse & {
|
|
|
|
data?: Partial<User>[];
|
|
|
|
};
|
|
|
|
|
|
|
|
// API Key
|
|
|
|
export type ApiKeyResponse = BaseResponse & {
|
|
|
|
data?: Partial<ApiKey>;
|
|
|
|
};
|
|
|
|
export type ApiKeysResponse = BaseResponse & {
|
|
|
|
data?: Partial<ApiKey>[];
|
|
|
|
};
|
2022-03-30 14:56:24 +00:00
|
|
|
|
|
|
|
// API Key
|
|
|
|
export type TeamResponse = BaseResponse & {
|
|
|
|
data?: Partial<Team>;
|
|
|
|
};
|
|
|
|
export type TeamsResponse = BaseResponse & {
|
|
|
|
data?: Partial<Team>[];
|
|
|
|
};
|
|
|
|
|
|
|
|
// API Key
|
|
|
|
export type SelectedCalendarResponse = BaseResponse & {
|
|
|
|
data?: Partial<SelectedCalendar>;
|
|
|
|
};
|
|
|
|
export type SelectedCalendarsResponse = BaseResponse & {
|
|
|
|
data?: Partial<SelectedCalendar>[];
|
|
|
|
};
|