admin-ui/src/partyAdminApiTypes.ts
Dominic Zimmer fd5d6fa71b
All checks were successful
continuous-integration/drone/push Build is passing
Implement party editing, Creation and Deletion
2022-10-16 18:18:49 +02:00

44 lines
964 B
TypeScript

export type ResponseListParties = ResponseCreateParty[];
export type ResponseCreateParty = {
_id: string,
name: string,
created: string,
allowed_extra: AllowedExtraLengths,
}
export type AllowedExtraLengths = { [key: string]: number };
export type RequestCreateParty = {
name: string,
allowed_extra: AllowedExtraLengths,
}
export type ResponseListGuests = Person[];
export type GrammaticalGender = "m" | "f" | "d";
export type ComingStatus = "yes" | "no" | "maybe" | null;
export type Person = {
_id: string,
token: string,
name: string,
coming: ComingStatus,
grammatical_gender: GrammaticalGender,
extra: Record<string, string>,
};
export type RequestCreateGuest = {
token: string,
name: string,
coming: ComingStatus,
grammatical_gender: GrammaticalGender,
extra: Record<string, string>,
};
export type CreatePartyRequest = {
name: string,
allowed_extra: AllowedExtraLengths,
}