@voyant-travel/openapi 0.2.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/package.json +8 -5
  2. package/spec/admin/accommodations.json +1443 -0
  3. package/spec/admin/action-ledger.json +6285 -0
  4. package/spec/admin/booking-requirements.json +5975 -0
  5. package/spec/admin/bookings.json +19276 -0
  6. package/spec/admin/catalog.json +703 -0
  7. package/spec/admin/distribution.json +20434 -0
  8. package/spec/admin/external-refs.json +1437 -0
  9. package/spec/admin/extras.json +4787 -0
  10. package/spec/admin/finance.json +36583 -0
  11. package/spec/admin/identity.json +4141 -0
  12. package/spec/admin/legal.json +14821 -0
  13. package/spec/admin/markets.json +5551 -0
  14. package/spec/admin/notifications.json +8667 -0
  15. package/spec/admin/operations.json +41627 -0
  16. package/spec/admin/operator-settings.json +1451 -0
  17. package/spec/admin/pricing.json +11136 -0
  18. package/spec/admin/products.json +23257 -0
  19. package/spec/admin/promotions.json +2778 -0
  20. package/spec/admin/quotes.json +7333 -0
  21. package/spec/admin/relationships.json +14512 -0
  22. package/spec/admin/sellability.json +5056 -0
  23. package/spec/admin/storefront.json +1973 -0
  24. package/spec/admin/suppliers.json +6094 -0
  25. package/spec/admin/trips.json +9531 -0
  26. package/spec/framework-admin.json +12715 -1375
  27. package/spec/framework-openapi.json +13731 -1482
  28. package/spec/framework-storefront.json +1022 -107
  29. package/spec/storefront/booking-requirements.json +380 -0
  30. package/spec/storefront/bookings.json +6213 -0
  31. package/spec/storefront/catalog.json +703 -0
  32. package/spec/storefront/customer-portal.json +6177 -0
  33. package/spec/storefront/finance.json +4914 -0
  34. package/spec/storefront/legal.json +2165 -0
  35. package/spec/storefront/markets.json +269 -0
  36. package/spec/storefront/operator-settings.json +329 -0
  37. package/spec/storefront/pricing.json +598 -0
  38. package/spec/storefront/products.json +2965 -0
  39. package/spec/storefront/storefront-verification.json +943 -0
  40. package/spec/storefront/storefront.json +4157 -0
  41. package/spec/storefront/trips.json +9531 -0
@@ -0,0 +1,1443 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Voyant Framework API",
5
+ "version": "0.0.0",
6
+ "description": "Generated from the Voyant framework's standard module composition. Do not edit by hand."
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "/",
11
+ "description": "This deployment (same origin)"
12
+ }
13
+ ],
14
+ "components": {
15
+ "schemas": {
16
+ "CatalogSearchFilter": {
17
+ "anyOf": [
18
+ {
19
+ "type": "object",
20
+ "properties": {
21
+ "kind": {
22
+ "type": "string",
23
+ "enum": [
24
+ "eq"
25
+ ]
26
+ },
27
+ "field": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "value": {
32
+ "anyOf": [
33
+ {
34
+ "type": "string"
35
+ },
36
+ {
37
+ "type": "number"
38
+ },
39
+ {
40
+ "type": "boolean"
41
+ }
42
+ ]
43
+ }
44
+ },
45
+ "required": [
46
+ "kind",
47
+ "field",
48
+ "value"
49
+ ]
50
+ },
51
+ {
52
+ "type": "object",
53
+ "properties": {
54
+ "kind": {
55
+ "type": "string",
56
+ "enum": [
57
+ "in"
58
+ ]
59
+ },
60
+ "field": {
61
+ "type": "string",
62
+ "minLength": 1
63
+ },
64
+ "values": {
65
+ "type": "array",
66
+ "items": {
67
+ "anyOf": [
68
+ {
69
+ "type": "string"
70
+ },
71
+ {
72
+ "type": "number"
73
+ }
74
+ ]
75
+ }
76
+ }
77
+ },
78
+ "required": [
79
+ "kind",
80
+ "field",
81
+ "values"
82
+ ]
83
+ },
84
+ {
85
+ "type": "object",
86
+ "properties": {
87
+ "kind": {
88
+ "type": "string",
89
+ "enum": [
90
+ "range"
91
+ ]
92
+ },
93
+ "field": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ },
97
+ "gte": {
98
+ "type": "number"
99
+ },
100
+ "lte": {
101
+ "type": "number"
102
+ }
103
+ },
104
+ "required": [
105
+ "kind",
106
+ "field"
107
+ ]
108
+ },
109
+ {
110
+ "type": "object",
111
+ "properties": {
112
+ "kind": {
113
+ "type": "string",
114
+ "enum": [
115
+ "and"
116
+ ]
117
+ },
118
+ "clauses": {
119
+ "type": "array",
120
+ "items": {
121
+ "$ref": "#/components/schemas/CatalogSearchFilter"
122
+ }
123
+ }
124
+ },
125
+ "required": [
126
+ "kind",
127
+ "clauses"
128
+ ]
129
+ },
130
+ {
131
+ "type": "object",
132
+ "properties": {
133
+ "kind": {
134
+ "type": "string",
135
+ "enum": [
136
+ "or"
137
+ ]
138
+ },
139
+ "clauses": {
140
+ "type": "array",
141
+ "items": {
142
+ "$ref": "#/components/schemas/CatalogSearchFilter"
143
+ }
144
+ }
145
+ },
146
+ "required": [
147
+ "kind",
148
+ "clauses"
149
+ ]
150
+ }
151
+ ]
152
+ }
153
+ },
154
+ "parameters": {}
155
+ },
156
+ "paths": {
157
+ "/v1/admin/accommodations/room-blocks": {
158
+ "post": {
159
+ "requestBody": {
160
+ "required": true,
161
+ "content": {
162
+ "application/json": {
163
+ "schema": {
164
+ "type": "object",
165
+ "properties": {
166
+ "roomTypeId": {
167
+ "type": "string",
168
+ "minLength": 1
169
+ },
170
+ "name": {
171
+ "type": "string",
172
+ "minLength": 1
173
+ },
174
+ "currency": {
175
+ "type": "string",
176
+ "minLength": 1
177
+ },
178
+ "programId": {
179
+ "type": "string",
180
+ "minLength": 1
181
+ },
182
+ "supplierId": {
183
+ "type": "string",
184
+ "minLength": 1
185
+ },
186
+ "propertyId": {
187
+ "type": "string",
188
+ "minLength": 1
189
+ },
190
+ "netRateCents": {
191
+ "type": "integer",
192
+ "minimum": 0
193
+ },
194
+ "sellRateCents": {
195
+ "type": "integer",
196
+ "minimum": 0
197
+ },
198
+ "optionDate": {
199
+ "type": "string",
200
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
201
+ },
202
+ "cutoffDate": {
203
+ "type": "string",
204
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
205
+ },
206
+ "notes": {
207
+ "type": "string"
208
+ }
209
+ },
210
+ "required": [
211
+ "roomTypeId",
212
+ "name",
213
+ "currency"
214
+ ]
215
+ }
216
+ }
217
+ }
218
+ },
219
+ "responses": {
220
+ "201": {
221
+ "description": "The created room block (starts in `inquiry`; nights are set separately)",
222
+ "content": {
223
+ "application/json": {
224
+ "schema": {
225
+ "type": "object",
226
+ "properties": {
227
+ "data": {
228
+ "type": "object",
229
+ "properties": {
230
+ "id": {
231
+ "type": "string"
232
+ },
233
+ "programId": {
234
+ "type": [
235
+ "string",
236
+ "null"
237
+ ]
238
+ },
239
+ "supplierId": {
240
+ "type": [
241
+ "string",
242
+ "null"
243
+ ]
244
+ },
245
+ "propertyId": {
246
+ "type": [
247
+ "string",
248
+ "null"
249
+ ]
250
+ },
251
+ "roomTypeId": {
252
+ "type": "string"
253
+ },
254
+ "name": {
255
+ "type": "string"
256
+ },
257
+ "status": {
258
+ "type": "string",
259
+ "enum": [
260
+ "inquiry",
261
+ "held",
262
+ "confirmed",
263
+ "released",
264
+ "cancelled",
265
+ "expired"
266
+ ]
267
+ },
268
+ "currency": {
269
+ "type": "string"
270
+ },
271
+ "netRateCents": {
272
+ "type": [
273
+ "integer",
274
+ "null"
275
+ ]
276
+ },
277
+ "sellRateCents": {
278
+ "type": [
279
+ "integer",
280
+ "null"
281
+ ]
282
+ },
283
+ "optionDate": {
284
+ "type": [
285
+ "string",
286
+ "null"
287
+ ]
288
+ },
289
+ "cutoffDate": {
290
+ "type": [
291
+ "string",
292
+ "null"
293
+ ]
294
+ },
295
+ "attritionTerms": {
296
+ "type": [
297
+ "object",
298
+ "null"
299
+ ],
300
+ "additionalProperties": {}
301
+ },
302
+ "depositTerms": {
303
+ "type": [
304
+ "object",
305
+ "null"
306
+ ],
307
+ "additionalProperties": {}
308
+ },
309
+ "notes": {
310
+ "type": [
311
+ "string",
312
+ "null"
313
+ ]
314
+ },
315
+ "metadata": {
316
+ "type": [
317
+ "object",
318
+ "null"
319
+ ],
320
+ "additionalProperties": {}
321
+ },
322
+ "createdAt": {
323
+ "type": "string"
324
+ },
325
+ "updatedAt": {
326
+ "type": "string"
327
+ }
328
+ },
329
+ "required": [
330
+ "id",
331
+ "programId",
332
+ "supplierId",
333
+ "propertyId",
334
+ "roomTypeId",
335
+ "name",
336
+ "status",
337
+ "currency",
338
+ "netRateCents",
339
+ "sellRateCents",
340
+ "optionDate",
341
+ "cutoffDate",
342
+ "attritionTerms",
343
+ "depositTerms",
344
+ "notes",
345
+ "metadata",
346
+ "createdAt",
347
+ "updatedAt"
348
+ ]
349
+ }
350
+ },
351
+ "required": [
352
+ "data"
353
+ ]
354
+ }
355
+ }
356
+ }
357
+ },
358
+ "400": {
359
+ "description": "Invalid request body",
360
+ "content": {
361
+ "application/json": {
362
+ "schema": {
363
+ "type": "object",
364
+ "properties": {
365
+ "error": {
366
+ "type": "string"
367
+ }
368
+ },
369
+ "required": [
370
+ "error"
371
+ ]
372
+ }
373
+ }
374
+ }
375
+ }
376
+ },
377
+ "operationId": "postAdminAccommodationsRoomBlocks",
378
+ "summary": "POST /v1/admin/accommodations/room-blocks",
379
+ "tags": [
380
+ "accommodations"
381
+ ],
382
+ "x-voyant-module": "accommodations",
383
+ "x-voyant-surface": "admin"
384
+ }
385
+ },
386
+ "/v1/admin/accommodations/room-blocks/{id}": {
387
+ "get": {
388
+ "parameters": [
389
+ {
390
+ "schema": {
391
+ "type": "string"
392
+ },
393
+ "required": true,
394
+ "name": "id",
395
+ "in": "path"
396
+ }
397
+ ],
398
+ "responses": {
399
+ "200": {
400
+ "description": "The room block header plus its derived pickup summary",
401
+ "content": {
402
+ "application/json": {
403
+ "schema": {
404
+ "type": "object",
405
+ "properties": {
406
+ "data": {
407
+ "type": "object",
408
+ "properties": {
409
+ "block": {
410
+ "type": "object",
411
+ "properties": {
412
+ "id": {
413
+ "type": "string"
414
+ },
415
+ "programId": {
416
+ "type": [
417
+ "string",
418
+ "null"
419
+ ]
420
+ },
421
+ "supplierId": {
422
+ "type": [
423
+ "string",
424
+ "null"
425
+ ]
426
+ },
427
+ "propertyId": {
428
+ "type": [
429
+ "string",
430
+ "null"
431
+ ]
432
+ },
433
+ "roomTypeId": {
434
+ "type": "string"
435
+ },
436
+ "name": {
437
+ "type": "string"
438
+ },
439
+ "status": {
440
+ "type": "string",
441
+ "enum": [
442
+ "inquiry",
443
+ "held",
444
+ "confirmed",
445
+ "released",
446
+ "cancelled",
447
+ "expired"
448
+ ]
449
+ },
450
+ "currency": {
451
+ "type": "string"
452
+ },
453
+ "netRateCents": {
454
+ "type": [
455
+ "integer",
456
+ "null"
457
+ ]
458
+ },
459
+ "sellRateCents": {
460
+ "type": [
461
+ "integer",
462
+ "null"
463
+ ]
464
+ },
465
+ "optionDate": {
466
+ "type": [
467
+ "string",
468
+ "null"
469
+ ]
470
+ },
471
+ "cutoffDate": {
472
+ "type": [
473
+ "string",
474
+ "null"
475
+ ]
476
+ },
477
+ "attritionTerms": {
478
+ "type": [
479
+ "object",
480
+ "null"
481
+ ],
482
+ "additionalProperties": {}
483
+ },
484
+ "depositTerms": {
485
+ "type": [
486
+ "object",
487
+ "null"
488
+ ],
489
+ "additionalProperties": {}
490
+ },
491
+ "notes": {
492
+ "type": [
493
+ "string",
494
+ "null"
495
+ ]
496
+ },
497
+ "metadata": {
498
+ "type": [
499
+ "object",
500
+ "null"
501
+ ],
502
+ "additionalProperties": {}
503
+ },
504
+ "createdAt": {
505
+ "type": "string"
506
+ },
507
+ "updatedAt": {
508
+ "type": "string"
509
+ }
510
+ },
511
+ "required": [
512
+ "id",
513
+ "programId",
514
+ "supplierId",
515
+ "propertyId",
516
+ "roomTypeId",
517
+ "name",
518
+ "status",
519
+ "currency",
520
+ "netRateCents",
521
+ "sellRateCents",
522
+ "optionDate",
523
+ "cutoffDate",
524
+ "attritionTerms",
525
+ "depositTerms",
526
+ "notes",
527
+ "metadata",
528
+ "createdAt",
529
+ "updatedAt"
530
+ ]
531
+ },
532
+ "summary": {
533
+ "type": [
534
+ "object",
535
+ "null"
536
+ ],
537
+ "properties": {
538
+ "blockId": {
539
+ "type": "string"
540
+ },
541
+ "status": {
542
+ "type": "string",
543
+ "enum": [
544
+ "inquiry",
545
+ "held",
546
+ "confirmed",
547
+ "released",
548
+ "cancelled",
549
+ "expired"
550
+ ]
551
+ },
552
+ "totalHeld": {
553
+ "type": "integer"
554
+ },
555
+ "totalPickedUp": {
556
+ "type": "integer"
557
+ },
558
+ "totalReleased": {
559
+ "type": "integer"
560
+ },
561
+ "totalRemaining": {
562
+ "type": "integer"
563
+ },
564
+ "pickupProgress": {
565
+ "type": "string",
566
+ "enum": [
567
+ "none",
568
+ "partial",
569
+ "full"
570
+ ]
571
+ }
572
+ },
573
+ "required": [
574
+ "blockId",
575
+ "status",
576
+ "totalHeld",
577
+ "totalPickedUp",
578
+ "totalReleased",
579
+ "totalRemaining",
580
+ "pickupProgress"
581
+ ]
582
+ }
583
+ },
584
+ "required": [
585
+ "block",
586
+ "summary"
587
+ ]
588
+ }
589
+ },
590
+ "required": [
591
+ "data"
592
+ ]
593
+ }
594
+ }
595
+ }
596
+ },
597
+ "404": {
598
+ "description": "Room block not found",
599
+ "content": {
600
+ "application/json": {
601
+ "schema": {
602
+ "type": "object",
603
+ "properties": {
604
+ "error": {
605
+ "type": "string"
606
+ }
607
+ },
608
+ "required": [
609
+ "error"
610
+ ]
611
+ }
612
+ }
613
+ }
614
+ }
615
+ },
616
+ "operationId": "getAdminAccommodationsRoomBlocksById",
617
+ "summary": "GET /v1/admin/accommodations/room-blocks/{id}",
618
+ "tags": [
619
+ "accommodations"
620
+ ],
621
+ "x-voyant-module": "accommodations",
622
+ "x-voyant-surface": "admin"
623
+ }
624
+ },
625
+ "/v1/admin/accommodations/room-blocks/{id}/nights": {
626
+ "put": {
627
+ "parameters": [
628
+ {
629
+ "schema": {
630
+ "type": "string"
631
+ },
632
+ "required": true,
633
+ "name": "id",
634
+ "in": "path"
635
+ }
636
+ ],
637
+ "requestBody": {
638
+ "required": true,
639
+ "description": "Upsert the held inventory (and optional rate overrides) per night. Only `roomsHeld` and the rate overrides are caller-controlled; the pickup / release counters are owned by the lifecycle actions and never set here.",
640
+ "content": {
641
+ "application/json": {
642
+ "schema": {
643
+ "type": "object",
644
+ "properties": {
645
+ "nights": {
646
+ "type": "array",
647
+ "items": {
648
+ "type": "object",
649
+ "properties": {
650
+ "date": {
651
+ "type": "string",
652
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
653
+ },
654
+ "roomsHeld": {
655
+ "type": "integer",
656
+ "minimum": 0
657
+ },
658
+ "netRateCentsOverride": {
659
+ "type": "integer",
660
+ "minimum": 0
661
+ },
662
+ "sellRateCentsOverride": {
663
+ "type": "integer",
664
+ "minimum": 0
665
+ }
666
+ },
667
+ "required": [
668
+ "date",
669
+ "roomsHeld"
670
+ ]
671
+ },
672
+ "minItems": 1
673
+ }
674
+ },
675
+ "required": [
676
+ "nights"
677
+ ]
678
+ }
679
+ }
680
+ }
681
+ },
682
+ "responses": {
683
+ "200": {
684
+ "description": "The recomputed block summary after the nights upsert",
685
+ "content": {
686
+ "application/json": {
687
+ "schema": {
688
+ "type": "object",
689
+ "properties": {
690
+ "data": {
691
+ "type": [
692
+ "object",
693
+ "null"
694
+ ],
695
+ "properties": {
696
+ "blockId": {
697
+ "type": "string"
698
+ },
699
+ "status": {
700
+ "type": "string",
701
+ "enum": [
702
+ "inquiry",
703
+ "held",
704
+ "confirmed",
705
+ "released",
706
+ "cancelled",
707
+ "expired"
708
+ ]
709
+ },
710
+ "totalHeld": {
711
+ "type": "integer"
712
+ },
713
+ "totalPickedUp": {
714
+ "type": "integer"
715
+ },
716
+ "totalReleased": {
717
+ "type": "integer"
718
+ },
719
+ "totalRemaining": {
720
+ "type": "integer"
721
+ },
722
+ "pickupProgress": {
723
+ "type": "string",
724
+ "enum": [
725
+ "none",
726
+ "partial",
727
+ "full"
728
+ ]
729
+ }
730
+ },
731
+ "required": [
732
+ "blockId",
733
+ "status",
734
+ "totalHeld",
735
+ "totalPickedUp",
736
+ "totalReleased",
737
+ "totalRemaining",
738
+ "pickupProgress"
739
+ ]
740
+ }
741
+ },
742
+ "required": [
743
+ "data"
744
+ ]
745
+ }
746
+ }
747
+ }
748
+ },
749
+ "400": {
750
+ "description": "Invalid request body",
751
+ "content": {
752
+ "application/json": {
753
+ "schema": {
754
+ "type": "object",
755
+ "properties": {
756
+ "error": {
757
+ "type": "string"
758
+ }
759
+ },
760
+ "required": [
761
+ "error"
762
+ ]
763
+ }
764
+ }
765
+ }
766
+ },
767
+ "404": {
768
+ "description": "Room block not found",
769
+ "content": {
770
+ "application/json": {
771
+ "schema": {
772
+ "type": "object",
773
+ "properties": {
774
+ "error": {
775
+ "type": "string"
776
+ }
777
+ },
778
+ "required": [
779
+ "error"
780
+ ]
781
+ }
782
+ }
783
+ }
784
+ }
785
+ },
786
+ "operationId": "putAdminAccommodationsRoomBlocksByIdNights",
787
+ "summary": "PUT /v1/admin/accommodations/room-blocks/{id}/nights",
788
+ "tags": [
789
+ "accommodations"
790
+ ],
791
+ "x-voyant-module": "accommodations",
792
+ "x-voyant-surface": "admin"
793
+ }
794
+ },
795
+ "/v1/admin/accommodations/room-blocks/{id}/pickups": {
796
+ "post": {
797
+ "parameters": [
798
+ {
799
+ "schema": {
800
+ "type": "string"
801
+ },
802
+ "required": true,
803
+ "name": "id",
804
+ "in": "path"
805
+ }
806
+ ],
807
+ "requestBody": {
808
+ "required": true,
809
+ "description": "Record a pickup against the block. Idempotent on `stayBookingItemId`: re-processing the same stay item returns the existing active pickup with a 200 instead of a 201.",
810
+ "content": {
811
+ "application/json": {
812
+ "schema": {
813
+ "type": "object",
814
+ "properties": {
815
+ "bookingId": {
816
+ "type": "string",
817
+ "minLength": 1
818
+ },
819
+ "stayBookingItemId": {
820
+ "type": "string",
821
+ "minLength": 1
822
+ },
823
+ "checkIn": {
824
+ "type": "string",
825
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
826
+ },
827
+ "checkOut": {
828
+ "type": "string",
829
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
830
+ },
831
+ "rooms": {
832
+ "type": "integer",
833
+ "minimum": 1,
834
+ "default": 1
835
+ }
836
+ },
837
+ "required": [
838
+ "checkIn",
839
+ "checkOut"
840
+ ]
841
+ }
842
+ }
843
+ }
844
+ },
845
+ "responses": {
846
+ "200": {
847
+ "description": "An existing active pickup (idempotent replay on `stayBookingItemId`)",
848
+ "content": {
849
+ "application/json": {
850
+ "schema": {
851
+ "type": "object",
852
+ "properties": {
853
+ "data": {
854
+ "type": "object",
855
+ "properties": {
856
+ "id": {
857
+ "type": "string"
858
+ },
859
+ "blockId": {
860
+ "type": "string"
861
+ },
862
+ "bookingId": {
863
+ "type": [
864
+ "string",
865
+ "null"
866
+ ]
867
+ },
868
+ "stayBookingItemId": {
869
+ "type": [
870
+ "string",
871
+ "null"
872
+ ]
873
+ },
874
+ "checkIn": {
875
+ "type": "string"
876
+ },
877
+ "checkOut": {
878
+ "type": "string"
879
+ },
880
+ "rooms": {
881
+ "type": "integer"
882
+ },
883
+ "status": {
884
+ "type": "string",
885
+ "enum": [
886
+ "active",
887
+ "reversed"
888
+ ]
889
+ },
890
+ "pickedUpAt": {
891
+ "type": "string"
892
+ },
893
+ "reversedAt": {
894
+ "type": [
895
+ "string",
896
+ "null"
897
+ ]
898
+ }
899
+ },
900
+ "required": [
901
+ "id",
902
+ "blockId",
903
+ "bookingId",
904
+ "stayBookingItemId",
905
+ "checkIn",
906
+ "checkOut",
907
+ "rooms",
908
+ "status",
909
+ "pickedUpAt",
910
+ "reversedAt"
911
+ ]
912
+ }
913
+ },
914
+ "required": [
915
+ "data"
916
+ ]
917
+ }
918
+ }
919
+ }
920
+ },
921
+ "201": {
922
+ "description": "The newly recorded pickup",
923
+ "content": {
924
+ "application/json": {
925
+ "schema": {
926
+ "type": "object",
927
+ "properties": {
928
+ "data": {
929
+ "type": "object",
930
+ "properties": {
931
+ "id": {
932
+ "type": "string"
933
+ },
934
+ "blockId": {
935
+ "type": "string"
936
+ },
937
+ "bookingId": {
938
+ "type": [
939
+ "string",
940
+ "null"
941
+ ]
942
+ },
943
+ "stayBookingItemId": {
944
+ "type": [
945
+ "string",
946
+ "null"
947
+ ]
948
+ },
949
+ "checkIn": {
950
+ "type": "string"
951
+ },
952
+ "checkOut": {
953
+ "type": "string"
954
+ },
955
+ "rooms": {
956
+ "type": "integer"
957
+ },
958
+ "status": {
959
+ "type": "string",
960
+ "enum": [
961
+ "active",
962
+ "reversed"
963
+ ]
964
+ },
965
+ "pickedUpAt": {
966
+ "type": "string"
967
+ },
968
+ "reversedAt": {
969
+ "type": [
970
+ "string",
971
+ "null"
972
+ ]
973
+ }
974
+ },
975
+ "required": [
976
+ "id",
977
+ "blockId",
978
+ "bookingId",
979
+ "stayBookingItemId",
980
+ "checkIn",
981
+ "checkOut",
982
+ "rooms",
983
+ "status",
984
+ "pickedUpAt",
985
+ "reversedAt"
986
+ ]
987
+ }
988
+ },
989
+ "required": [
990
+ "data"
991
+ ]
992
+ }
993
+ }
994
+ }
995
+ },
996
+ "400": {
997
+ "description": "Invalid check-in/check-out range",
998
+ "content": {
999
+ "application/json": {
1000
+ "schema": {
1001
+ "type": "object",
1002
+ "properties": {
1003
+ "error": {
1004
+ "type": "string"
1005
+ }
1006
+ },
1007
+ "required": [
1008
+ "error"
1009
+ ]
1010
+ }
1011
+ }
1012
+ }
1013
+ },
1014
+ "404": {
1015
+ "description": "Room block not found",
1016
+ "content": {
1017
+ "application/json": {
1018
+ "schema": {
1019
+ "type": "object",
1020
+ "properties": {
1021
+ "error": {
1022
+ "type": "string"
1023
+ }
1024
+ },
1025
+ "required": [
1026
+ "error"
1027
+ ]
1028
+ }
1029
+ }
1030
+ }
1031
+ },
1032
+ "409": {
1033
+ "description": "The block is no longer accepting pickups, or a night has insufficient inventory (the latter carries a `detail` with the short night)",
1034
+ "content": {
1035
+ "application/json": {
1036
+ "schema": {
1037
+ "anyOf": [
1038
+ {
1039
+ "type": "object",
1040
+ "properties": {
1041
+ "error": {
1042
+ "type": "string"
1043
+ }
1044
+ },
1045
+ "required": [
1046
+ "error"
1047
+ ]
1048
+ },
1049
+ {
1050
+ "type": "object",
1051
+ "properties": {
1052
+ "error": {
1053
+ "type": "string"
1054
+ },
1055
+ "detail": {
1056
+ "type": "object",
1057
+ "properties": {
1058
+ "date": {
1059
+ "type": "string"
1060
+ },
1061
+ "remaining": {
1062
+ "type": "integer"
1063
+ },
1064
+ "needed": {
1065
+ "type": "integer"
1066
+ }
1067
+ },
1068
+ "required": [
1069
+ "date",
1070
+ "remaining",
1071
+ "needed"
1072
+ ]
1073
+ }
1074
+ },
1075
+ "required": [
1076
+ "error",
1077
+ "detail"
1078
+ ]
1079
+ }
1080
+ ]
1081
+ }
1082
+ }
1083
+ }
1084
+ }
1085
+ },
1086
+ "operationId": "postAdminAccommodationsRoomBlocksByIdPickups",
1087
+ "summary": "POST /v1/admin/accommodations/room-blocks/{id}/pickups",
1088
+ "tags": [
1089
+ "accommodations"
1090
+ ],
1091
+ "x-voyant-module": "accommodations",
1092
+ "x-voyant-surface": "admin"
1093
+ }
1094
+ },
1095
+ "/v1/admin/accommodations/room-blocks/{id}/pickups/reverse": {
1096
+ "post": {
1097
+ "parameters": [
1098
+ {
1099
+ "schema": {
1100
+ "type": "string"
1101
+ },
1102
+ "required": true,
1103
+ "name": "id",
1104
+ "in": "path"
1105
+ }
1106
+ ],
1107
+ "requestBody": {
1108
+ "required": true,
1109
+ "description": "Reverse a pickup (booking cancelled / rooms reduced). Exactly one of `pickupId` or `stayBookingItemId` is required; the body schema enforces this, so a request with neither (or both) fails request validation with a 400 `invalid_request`. A well-formed request whose pickup isn't found (or belongs to a different block) returns 404.",
1110
+ "content": {
1111
+ "application/json": {
1112
+ "schema": {
1113
+ "type": "object",
1114
+ "properties": {
1115
+ "pickupId": {
1116
+ "type": "string",
1117
+ "minLength": 1
1118
+ },
1119
+ "stayBookingItemId": {
1120
+ "type": "string",
1121
+ "minLength": 1
1122
+ }
1123
+ }
1124
+ }
1125
+ }
1126
+ }
1127
+ },
1128
+ "responses": {
1129
+ "200": {
1130
+ "description": "The reversed pickup ledger row",
1131
+ "content": {
1132
+ "application/json": {
1133
+ "schema": {
1134
+ "type": "object",
1135
+ "properties": {
1136
+ "data": {
1137
+ "type": "object",
1138
+ "properties": {
1139
+ "id": {
1140
+ "type": "string"
1141
+ },
1142
+ "blockId": {
1143
+ "type": "string"
1144
+ },
1145
+ "bookingId": {
1146
+ "type": [
1147
+ "string",
1148
+ "null"
1149
+ ]
1150
+ },
1151
+ "stayBookingItemId": {
1152
+ "type": [
1153
+ "string",
1154
+ "null"
1155
+ ]
1156
+ },
1157
+ "checkIn": {
1158
+ "type": "string"
1159
+ },
1160
+ "checkOut": {
1161
+ "type": "string"
1162
+ },
1163
+ "rooms": {
1164
+ "type": "integer"
1165
+ },
1166
+ "status": {
1167
+ "type": "string",
1168
+ "enum": [
1169
+ "active",
1170
+ "reversed"
1171
+ ]
1172
+ },
1173
+ "pickedUpAt": {
1174
+ "type": "string"
1175
+ },
1176
+ "reversedAt": {
1177
+ "type": [
1178
+ "string",
1179
+ "null"
1180
+ ]
1181
+ }
1182
+ },
1183
+ "required": [
1184
+ "id",
1185
+ "blockId",
1186
+ "bookingId",
1187
+ "stayBookingItemId",
1188
+ "checkIn",
1189
+ "checkOut",
1190
+ "rooms",
1191
+ "status",
1192
+ "pickedUpAt",
1193
+ "reversedAt"
1194
+ ]
1195
+ }
1196
+ },
1197
+ "required": [
1198
+ "data"
1199
+ ]
1200
+ }
1201
+ }
1202
+ }
1203
+ },
1204
+ "400": {
1205
+ "description": "Invalid body — neither (or both) of `pickupId`/`stayBookingItemId` supplied",
1206
+ "content": {
1207
+ "application/json": {
1208
+ "schema": {
1209
+ "type": "object",
1210
+ "properties": {
1211
+ "error": {
1212
+ "type": "string"
1213
+ }
1214
+ },
1215
+ "required": [
1216
+ "error"
1217
+ ]
1218
+ }
1219
+ }
1220
+ }
1221
+ },
1222
+ "404": {
1223
+ "description": "Active pickup not found (or it belongs to a different block)",
1224
+ "content": {
1225
+ "application/json": {
1226
+ "schema": {
1227
+ "type": "object",
1228
+ "properties": {
1229
+ "error": {
1230
+ "type": "string"
1231
+ }
1232
+ },
1233
+ "required": [
1234
+ "error"
1235
+ ]
1236
+ }
1237
+ }
1238
+ }
1239
+ }
1240
+ },
1241
+ "operationId": "postAdminAccommodationsRoomBlocksByIdPickupsReverse",
1242
+ "summary": "POST /v1/admin/accommodations/room-blocks/{id}/pickups/reverse",
1243
+ "tags": [
1244
+ "accommodations"
1245
+ ],
1246
+ "x-voyant-module": "accommodations",
1247
+ "x-voyant-surface": "admin"
1248
+ }
1249
+ },
1250
+ "/v1/admin/accommodations/room-blocks/{id}/release": {
1251
+ "post": {
1252
+ "parameters": [
1253
+ {
1254
+ "schema": {
1255
+ "type": "string"
1256
+ },
1257
+ "required": true,
1258
+ "name": "id",
1259
+ "in": "path"
1260
+ }
1261
+ ],
1262
+ "responses": {
1263
+ "200": {
1264
+ "description": "Unpicked rooms released back to the property; the block moves to `released`",
1265
+ "content": {
1266
+ "application/json": {
1267
+ "schema": {
1268
+ "type": "object",
1269
+ "properties": {
1270
+ "data": {
1271
+ "type": "object",
1272
+ "properties": {
1273
+ "releasedRooms": {
1274
+ "type": "integer"
1275
+ },
1276
+ "block": {
1277
+ "type": "object",
1278
+ "properties": {
1279
+ "id": {
1280
+ "type": "string"
1281
+ },
1282
+ "programId": {
1283
+ "type": [
1284
+ "string",
1285
+ "null"
1286
+ ]
1287
+ },
1288
+ "supplierId": {
1289
+ "type": [
1290
+ "string",
1291
+ "null"
1292
+ ]
1293
+ },
1294
+ "propertyId": {
1295
+ "type": [
1296
+ "string",
1297
+ "null"
1298
+ ]
1299
+ },
1300
+ "roomTypeId": {
1301
+ "type": "string"
1302
+ },
1303
+ "name": {
1304
+ "type": "string"
1305
+ },
1306
+ "status": {
1307
+ "type": "string",
1308
+ "enum": [
1309
+ "inquiry",
1310
+ "held",
1311
+ "confirmed",
1312
+ "released",
1313
+ "cancelled",
1314
+ "expired"
1315
+ ]
1316
+ },
1317
+ "currency": {
1318
+ "type": "string"
1319
+ },
1320
+ "netRateCents": {
1321
+ "type": [
1322
+ "integer",
1323
+ "null"
1324
+ ]
1325
+ },
1326
+ "sellRateCents": {
1327
+ "type": [
1328
+ "integer",
1329
+ "null"
1330
+ ]
1331
+ },
1332
+ "optionDate": {
1333
+ "type": [
1334
+ "string",
1335
+ "null"
1336
+ ]
1337
+ },
1338
+ "cutoffDate": {
1339
+ "type": [
1340
+ "string",
1341
+ "null"
1342
+ ]
1343
+ },
1344
+ "attritionTerms": {
1345
+ "type": [
1346
+ "object",
1347
+ "null"
1348
+ ],
1349
+ "additionalProperties": {}
1350
+ },
1351
+ "depositTerms": {
1352
+ "type": [
1353
+ "object",
1354
+ "null"
1355
+ ],
1356
+ "additionalProperties": {}
1357
+ },
1358
+ "notes": {
1359
+ "type": [
1360
+ "string",
1361
+ "null"
1362
+ ]
1363
+ },
1364
+ "metadata": {
1365
+ "type": [
1366
+ "object",
1367
+ "null"
1368
+ ],
1369
+ "additionalProperties": {}
1370
+ },
1371
+ "createdAt": {
1372
+ "type": "string"
1373
+ },
1374
+ "updatedAt": {
1375
+ "type": "string"
1376
+ }
1377
+ },
1378
+ "required": [
1379
+ "id",
1380
+ "programId",
1381
+ "supplierId",
1382
+ "propertyId",
1383
+ "roomTypeId",
1384
+ "name",
1385
+ "status",
1386
+ "currency",
1387
+ "netRateCents",
1388
+ "sellRateCents",
1389
+ "optionDate",
1390
+ "cutoffDate",
1391
+ "attritionTerms",
1392
+ "depositTerms",
1393
+ "notes",
1394
+ "metadata",
1395
+ "createdAt",
1396
+ "updatedAt"
1397
+ ]
1398
+ }
1399
+ },
1400
+ "required": [
1401
+ "releasedRooms",
1402
+ "block"
1403
+ ]
1404
+ }
1405
+ },
1406
+ "required": [
1407
+ "data"
1408
+ ]
1409
+ }
1410
+ }
1411
+ }
1412
+ },
1413
+ "404": {
1414
+ "description": "Room block not found",
1415
+ "content": {
1416
+ "application/json": {
1417
+ "schema": {
1418
+ "type": "object",
1419
+ "properties": {
1420
+ "error": {
1421
+ "type": "string"
1422
+ }
1423
+ },
1424
+ "required": [
1425
+ "error"
1426
+ ]
1427
+ }
1428
+ }
1429
+ }
1430
+ }
1431
+ },
1432
+ "operationId": "postAdminAccommodationsRoomBlocksByIdRelease",
1433
+ "summary": "POST /v1/admin/accommodations/room-blocks/{id}/release",
1434
+ "tags": [
1435
+ "accommodations"
1436
+ ],
1437
+ "x-voyant-module": "accommodations",
1438
+ "x-voyant-surface": "admin"
1439
+ }
1440
+ }
1441
+ },
1442
+ "webhooks": {}
1443
+ }