cal.pub0.org/lib/types.ts

23 lines
483 B
TypeScript
Raw Normal View History

2022-03-30 12:17:55 +00:00
import { User, ApiKey } from "@calcom/prisma/client";
// 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>[];
};