Phase 3: Appointment model & booking API with timezone fix
This commit is contained in:
parent
f6cf093cb1
commit
06817875f7
9 changed files with 946 additions and 9 deletions
|
|
@ -356,6 +356,46 @@ export interface paths {
|
|||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/api/booking/slots": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
/**
|
||||
* Get Available Slots
|
||||
* @description Get available booking slots for a specific date.
|
||||
*/
|
||||
get: operations["get_available_slots_api_booking_slots_get"];
|
||||
put?: never;
|
||||
post?: never;
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/api/booking": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
get?: never;
|
||||
put?: never;
|
||||
/**
|
||||
* Create Booking
|
||||
* @description Book an appointment slot.
|
||||
*/
|
||||
post: operations["create_booking_api_booking_post"];
|
||||
delete?: never;
|
||||
options?: never;
|
||||
head?: never;
|
||||
patch?: never;
|
||||
trace?: never;
|
||||
};
|
||||
"/api/meta/constants": {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
@ -390,6 +430,39 @@ export interface components {
|
|||
/** Email */
|
||||
email: string;
|
||||
};
|
||||
/**
|
||||
* AppointmentResponse
|
||||
* @description Response model for an appointment.
|
||||
*/
|
||||
AppointmentResponse: {
|
||||
/** Id */
|
||||
id: number;
|
||||
/** User Id */
|
||||
user_id: number;
|
||||
/** User Email */
|
||||
user_email: string;
|
||||
/**
|
||||
* Slot Start
|
||||
* Format: date-time
|
||||
*/
|
||||
slot_start: string;
|
||||
/**
|
||||
* Slot End
|
||||
* Format: date-time
|
||||
*/
|
||||
slot_end: string;
|
||||
/** Note */
|
||||
note: string | null;
|
||||
/** Status */
|
||||
status: string;
|
||||
/**
|
||||
* Created At
|
||||
* Format: date-time
|
||||
*/
|
||||
created_at: string;
|
||||
/** Cancelled At */
|
||||
cancelled_at: string | null;
|
||||
};
|
||||
/**
|
||||
* AvailabilityDay
|
||||
* @description Availability for a single day.
|
||||
|
|
@ -411,6 +484,48 @@ export interface components {
|
|||
/** Days */
|
||||
days: components["schemas"]["AvailabilityDay"][];
|
||||
};
|
||||
/**
|
||||
* AvailableSlotsResponse
|
||||
* @description Response for available slots on a given date.
|
||||
*/
|
||||
AvailableSlotsResponse: {
|
||||
/**
|
||||
* Date
|
||||
* Format: date
|
||||
*/
|
||||
date: string;
|
||||
/** Slots */
|
||||
slots: components["schemas"]["BookableSlot"][];
|
||||
};
|
||||
/**
|
||||
* BookableSlot
|
||||
* @description A bookable 15-minute slot.
|
||||
*/
|
||||
BookableSlot: {
|
||||
/**
|
||||
* Start Time
|
||||
* Format: date-time
|
||||
*/
|
||||
start_time: string;
|
||||
/**
|
||||
* End Time
|
||||
* Format: date-time
|
||||
*/
|
||||
end_time: string;
|
||||
};
|
||||
/**
|
||||
* BookingRequest
|
||||
* @description Request to book an appointment.
|
||||
*/
|
||||
BookingRequest: {
|
||||
/**
|
||||
* Slot Start
|
||||
* Format: date-time
|
||||
*/
|
||||
slot_start: string;
|
||||
/** Note */
|
||||
note?: string | null;
|
||||
};
|
||||
/**
|
||||
* ConstantsResponse
|
||||
* @description Response model for shared constants.
|
||||
|
|
@ -1304,6 +1419,71 @@ export interface operations {
|
|||
};
|
||||
};
|
||||
};
|
||||
get_available_slots_api_booking_slots_get: {
|
||||
parameters: {
|
||||
query: {
|
||||
/** @description Date to get slots for */
|
||||
date: string;
|
||||
};
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody?: never;
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["AvailableSlotsResponse"];
|
||||
};
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["HTTPValidationError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
create_booking_api_booking_post: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
header?: never;
|
||||
path?: never;
|
||||
cookie?: never;
|
||||
};
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": components["schemas"]["BookingRequest"];
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Successful Response */
|
||||
200: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["AppointmentResponse"];
|
||||
};
|
||||
};
|
||||
/** @description Validation Error */
|
||||
422: {
|
||||
headers: {
|
||||
[name: string]: unknown;
|
||||
};
|
||||
content: {
|
||||
"application/json": components["schemas"]["HTTPValidationError"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
get_constants_api_meta_constants_get: {
|
||||
parameters: {
|
||||
query?: never;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue