feat(scheduling): prefill participant availability
This commit is contained in:
@@ -124,6 +124,17 @@ export type SchedulingAvailabilityPayload = {
|
||||
}>;
|
||||
};
|
||||
|
||||
export type SchedulingAvailabilityResponse = {
|
||||
request_id: string;
|
||||
participant_id: string;
|
||||
has_response: boolean;
|
||||
submitted_at?: string | null;
|
||||
answers: Array<{
|
||||
slot_id: string;
|
||||
value: SchedulingAvailabilityValue;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type SchedulingCalendarActionResponse = {
|
||||
request: SchedulingRequest;
|
||||
created_event_ids: string[];
|
||||
@@ -218,6 +229,16 @@ export function submitSchedulingAvailability(
|
||||
);
|
||||
}
|
||||
|
||||
export function getSchedulingAvailabilityResponse(
|
||||
settings: ApiSettings,
|
||||
requestId: string
|
||||
): Promise<SchedulingAvailabilityResponse> {
|
||||
return apiFetch<SchedulingAvailabilityResponse>(
|
||||
settings,
|
||||
`/api/v1/scheduling/requests/${requestId}/responses/me`
|
||||
);
|
||||
}
|
||||
|
||||
export function openSchedulingRequest(settings: ApiSettings, requestId: string): Promise<SchedulingStatusResponse> {
|
||||
return apiFetch<SchedulingStatusResponse>(settings, `/api/v1/scheduling/requests/${requestId}/open`, json({}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user