@@ -2,24 +2,12 @@ basePath: /api/v1
22definitions :
33 CreateGuest :
44 properties :
5- email :
6- example : jane.doe@example.com
7- type : string
85 first_name :
96 example : Jane
107 type : string
118 last_name :
129 example : Doe
1310 type : string
14- notes :
15- example : VIP
16- type : string
17- phone :
18- example : +1 (617) 012-3456
19- type : string
20- preferences :
21- example : extra pillows
22- type : string
2311 profile_picture :
2412 example : https://example.com/john.jpg
2513 type : string
@@ -83,9 +71,6 @@ definitions:
8371 created_at :
8472 example : " 2024-01-02T00:00:00Z"
8573 type : string
86- email :
87- example : jane.doe@example.com
88- type : string
8974 first_name :
9075 example : Jane
9176 type : string
@@ -95,15 +80,6 @@ definitions:
9580 last_name :
9681 example : Doe
9782 type : string
98- notes :
99- example : VIP
100- type : string
101- phone :
102- example : +1 (617) 012-3456
103- type : string
104- preferences :
105- example : extra pillows
106- type : string
10783 profile_picture :
10884 example : https://example.com/john.jpg
10985 type : string
@@ -114,6 +90,51 @@ definitions:
11490 example : " 2024-01-02T00:00:00Z"
11591 type : string
11692 type : object
93+ GuestBooking :
94+ properties :
95+ arrival_date :
96+ type : string
97+ departure_date :
98+ type : string
99+ guest :
100+ $ref : ' #/definitions/Guest'
101+ hotel_id :
102+ example : 521e8400-e458-41d4-a716-446655440000
103+ type : string
104+ id :
105+ example : f353ca91-4fc5-49f2-9b9e-304f83d11914
106+ type : string
107+ room :
108+ $ref : ' #/definitions/Room'
109+ status :
110+ $ref : ' #/definitions/github_com_generate_selfserve_internal_models.BookingStatus'
111+ type : object
112+ GuestFilters :
113+ properties :
114+ cursor :
115+ type : string
116+ floors :
117+ items :
118+ type : integer
119+ type : array
120+ hotel_id :
121+ type : string
122+ limit :
123+ maximum : 100
124+ minimum : 1
125+ type : integer
126+ required :
127+ - hotel_id
128+ type : object
129+ GuestPage :
130+ properties :
131+ data :
132+ items :
133+ $ref : ' #/definitions/GuestWithBooking'
134+ type : array
135+ next_cursor :
136+ type : string
137+ type : object
117138 GuestWithBooking :
118139 properties :
119140 first_name :
@@ -126,6 +147,12 @@ definitions:
126147 type : string
127148 room_number :
128149 type : integer
150+ required :
151+ - first_name
152+ - floor
153+ - id
154+ - last_name
155+ - room_number
129156 type : object
130157 GuestWithStays :
131158 properties :
@@ -159,9 +186,11 @@ definitions:
159186 example : extra pillows
160187 type : string
161188 required :
189+ - current_stays
162190 - first_name
163191 - id
164192 - last_name
193+ - past_stays
165194 type : object
166195 Hotel :
167196 properties :
@@ -293,6 +322,17 @@ definitions:
293322 example : 521ee400-e458-41d4-a716-446655440000
294323 type : string
295324 type : object
325+ Room :
326+ properties :
327+ floor :
328+ type : integer
329+ room_number :
330+ type : integer
331+ room_status :
332+ type : string
333+ suite_type :
334+ type : string
335+ type : object
296336 RoomWithOptionalGuestBooking :
297337 properties :
298338 booking_status :
@@ -420,78 +460,44 @@ info:
420460 version : " 1.0"
421461paths :
422462 /api/v1/guests :
423- get :
424- description : Retrieves guests optionally filtered by floor in which they are
425- staying
463+ post :
464+ consumes :
465+ - application/json
466+ description : Retrieves guests optionally filtered by floor
426467 parameters :
427468 - description : Hotel ID (UUID)
428469 in : header
429470 name : X-Hotel-ID
430471 required : true
431472 type : string
432- - description : Floor
433- in : query
434- name : number
435- type : string
436- produces :
437- - application/json
438- responses :
439- " 200 " :
440- description : OK
441- schema :
442- items :
443- $ref : ' #/definitions/GuestWithBooking'
444- type : array
445- " 400 " :
446- description : Bad Request
447- schema :
448- additionalProperties :
449- type : string
450- type : object
451- " 500 " :
452- description : Internal Server Error
453- schema :
454- additionalProperties :
455- type : string
456- type : object
457- security :
458- - BearerAuth : []
459- summary : Get Guests
460- tags :
461- - guests
462- post :
463- consumes :
464- - application/json
465- description : Creates a guest with the given data
466- parameters :
467- - description : Guest data
473+ - description : Guest filters
468474 in : body
469- name : request
475+ name : body
470476 required : true
471477 schema :
472- $ref : ' #/definitions/CreateGuest '
478+ $ref : ' #/definitions/GuestFilters '
473479 produces :
474480 - application/json
475481 responses :
476482 " 200 " :
477483 description : OK
478484 schema :
479- $ref : ' #/definitions/Guest '
485+ $ref : ' #/definitions/GuestPage '
480486 " 400 " :
481- description : Invalid guest body format
487+ description : Bad Request
482488 schema :
483489 additionalProperties :
484490 type : string
485491 type : object
486492 " 500 " :
487- description : Internal server error
493+ description : Internal Server Error
488494 schema :
489495 additionalProperties :
490496 type : string
491497 type : object
492498 security :
493499 - BearerAuth : []
494- summary : Creates a guest
500+ summary : Get Guests
495501 tags :
496502 - guests
497503 /api/v1/guests/{id} :
@@ -720,6 +726,40 @@ paths:
720726 summary : Get developer member
721727 tags :
722728 - devs
729+ /guest_bookings/floor :
730+ get :
731+ description : Retrieves multiple guest bookings whose booked rooms are in the
732+ provided floors array
733+ parameters :
734+ - description : Comma-separated floor numbers
735+ in : query
736+ name : floors
737+ required : true
738+ type : string
739+ produces :
740+ - application/json
741+ responses :
742+ " 200 " :
743+ description : OK
744+ schema :
745+ items :
746+ $ref : ' #/definitions/GuestBooking'
747+ type : array
748+ " 400 " :
749+ description : Bad Request
750+ schema :
751+ additionalProperties :
752+ type : string
753+ type : object
754+ " 500 " :
755+ description : Internal Server Error
756+ schema :
757+ additionalProperties :
758+ type : string
759+ type : object
760+ summary : Get guest Bookings By Floor
761+ tags :
762+ - guest-bookings
723763 /hello :
724764 get :
725765 consumes :
0 commit comments