improve timezone discovery
This commit is contained in:
@@ -5,6 +5,7 @@ export interface ParticipantAPI {
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
timezone: string;
|
||||
ics_url: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
@@ -13,6 +14,7 @@ export interface ParticipantAPI {
|
||||
export interface TimeSlotAPI {
|
||||
day: string;
|
||||
hour: number;
|
||||
start_time: string;
|
||||
availability: 'full' | 'partial' | 'none';
|
||||
availableParticipants: string[];
|
||||
}
|
||||
@@ -20,6 +22,12 @@ export interface TimeSlotAPI {
|
||||
export interface CreateParticipantRequest {
|
||||
name: string;
|
||||
email: string;
|
||||
timezone: string;
|
||||
ics_url?: string;
|
||||
}
|
||||
|
||||
export interface UpdateParticipantRequest {
|
||||
timezone?: string;
|
||||
ics_url?: string;
|
||||
}
|
||||
|
||||
@@ -45,6 +53,15 @@ export async function createParticipant(data: CreateParticipantRequest): Promise
|
||||
return handleResponse<ParticipantAPI>(response);
|
||||
}
|
||||
|
||||
export async function updateParticipant(id: string, data: UpdateParticipantRequest): Promise<ParticipantAPI> {
|
||||
const response = await fetch(`${API_URL}/api/participants/${id}`, {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
return handleResponse<ParticipantAPI>(response);
|
||||
}
|
||||
|
||||
export async function deleteParticipant(id: string): Promise<void> {
|
||||
const response = await fetch(`${API_URL}/api/participants/${id}`, {
|
||||
method: 'DELETE',
|
||||
|
||||
Reference in New Issue
Block a user