feat(scheduling): add a task-focused poll workspace
This commit is contained in:
@@ -115,6 +115,15 @@ export type SchedulingDecisionPayload = {
|
||||
handoff_to_calendar?: boolean | null;
|
||||
};
|
||||
|
||||
export type SchedulingAvailabilityValue = "available" | "maybe" | "unavailable";
|
||||
|
||||
export type SchedulingAvailabilityPayload = {
|
||||
answers: Array<{
|
||||
slot_id: string;
|
||||
value: SchedulingAvailabilityValue;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type SchedulingCalendarActionResponse = {
|
||||
request: SchedulingRequest;
|
||||
created_event_ids: string[];
|
||||
@@ -197,6 +206,18 @@ export function createSchedulingRequest(settings: ApiSettings, payload: Scheduli
|
||||
return apiFetch<SchedulingRequest>(settings, "/api/v1/scheduling/requests", json(payload));
|
||||
}
|
||||
|
||||
export function submitSchedulingAvailability(
|
||||
settings: ApiSettings,
|
||||
requestId: string,
|
||||
payload: SchedulingAvailabilityPayload
|
||||
): Promise<SchedulingStatusResponse> {
|
||||
return apiFetch<SchedulingStatusResponse>(
|
||||
settings,
|
||||
`/api/v1/scheduling/requests/${requestId}/responses`,
|
||||
json(payload)
|
||||
);
|
||||
}
|
||||
|
||||
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