export interface CelebrationSetup {
showCleanerAnniversariesOnCalendar: boolean;
showCleanerBirthdaysOnCalendar: boolean;
showCustomerAnniversariesOnCalendar: boolean;
showCustomerBirthdaysOnCalendar: boolean;
}
export interface CleanerWithAnniversaryDates {
id: string;
displayName: string;
birthDate?: Date; // actually an incoming string
hiredDate?: Date; // actually an incoming string
}
export interface CelebrationSetupQueryResponse {
me: {
id: string;
account: CelebrationSetup;
cleaners: CleanerWithAnniversaryDates[];
};
}
export async function fetchCelebrationSetup() {
return request<CelebrationSetupQueryResponse>(gql`
query CelebrationSetup {
me {
id
cleaners {
id
displayName
birthDate
hiredDate
}
account {
id
showCleanerAnniversariesOnCalendar
showCleanerBirthdaysOnCalendar
showCustomerAnniversariesOnCalendar
showCustomerBirthdaysOnCalendar
}
}
}
`);
}
export interface CelebrationSetup {
showCleanerAnniversariesOnCalendar: boolean;
showCleanerBirthdaysOnCalendar: boolean;
showCustomerAnniversariesOnCalendar: boolean;
showCustomerBirthdaysOnCalendar: boolean;
}
export interface CleanerWithAnniversaryDates {
id: string;
displayName: string;
birthDate?: Date; // actually an incoming string
hiredDate?: Date; // actually an incoming string
}
export interface CelebrationSetupQueryResponse {
me: {
id: string;
account: CelebrationSetup;
cleaners: CleanerWithAnniversaryDates[];
};
}
export async function fetchCelebrationSetup() {
return request<CelebrationSetupQueryResponse>(gql`
query CelebrationSetup {
me {
id
cleaners {
id
displayName
birthDate
hiredDate
}
account {
id
showCleanerAnniversariesOnCalendar
showCleanerBirthdaysOnCalendar
showCustomerAnniversariesOnCalendar
showCustomerBirthdaysOnCalendar
}
}
}
`);
}