@voyantjs/availability 0.2.0 → 0.3.1

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.
@@ -0,0 +1,851 @@
1
+ import { type Env } from "./routes-shared.js";
2
+ export declare const availabilityCoreRoutes: import("hono/hono-base").HonoBase<Env, {
3
+ "/rules": {
4
+ $get: {
5
+ input: {};
6
+ output: {
7
+ data: {
8
+ id: string;
9
+ productId: string;
10
+ optionId: string | null;
11
+ facilityId: string | null;
12
+ timezone: string;
13
+ recurrenceRule: string;
14
+ maxCapacity: number;
15
+ maxPickupCapacity: number | null;
16
+ minTotalPax: number | null;
17
+ cutoffMinutes: number | null;
18
+ earlyBookingLimitMinutes: number | null;
19
+ active: boolean;
20
+ createdAt: string;
21
+ updatedAt: string;
22
+ }[];
23
+ total: number;
24
+ limit: number;
25
+ offset: number;
26
+ };
27
+ outputFormat: "json";
28
+ status: import("hono/utils/http-status").ContentfulStatusCode;
29
+ };
30
+ };
31
+ } & {
32
+ "/rules": {
33
+ $post: {
34
+ input: {};
35
+ output: {
36
+ data: {
37
+ id: string;
38
+ productId: string;
39
+ optionId: string | null;
40
+ facilityId: string | null;
41
+ timezone: string;
42
+ recurrenceRule: string;
43
+ maxCapacity: number;
44
+ maxPickupCapacity: number | null;
45
+ minTotalPax: number | null;
46
+ cutoffMinutes: number | null;
47
+ earlyBookingLimitMinutes: number | null;
48
+ active: boolean;
49
+ createdAt: string;
50
+ updatedAt: string;
51
+ } | undefined;
52
+ };
53
+ outputFormat: "json";
54
+ status: 201;
55
+ };
56
+ };
57
+ } & {
58
+ "/rules/batch-update": {
59
+ $post: {
60
+ input: {};
61
+ output: {
62
+ data: {
63
+ id: string;
64
+ productId: string;
65
+ optionId: string | null;
66
+ facilityId: string | null;
67
+ timezone: string;
68
+ recurrenceRule: string;
69
+ maxCapacity: number;
70
+ maxPickupCapacity: number | null;
71
+ minTotalPax: number | null;
72
+ cutoffMinutes: number | null;
73
+ earlyBookingLimitMinutes: number | null;
74
+ active: boolean;
75
+ createdAt: string;
76
+ updatedAt: string;
77
+ }[];
78
+ total: number;
79
+ succeeded: number;
80
+ failed: {
81
+ id: string;
82
+ error: string;
83
+ }[];
84
+ };
85
+ outputFormat: "json";
86
+ status: import("hono/utils/http-status").ContentfulStatusCode;
87
+ };
88
+ };
89
+ } & {
90
+ "/rules/batch-delete": {
91
+ $post: {
92
+ input: {};
93
+ output: {
94
+ deletedIds: string[];
95
+ total: number;
96
+ succeeded: number;
97
+ failed: {
98
+ id: string;
99
+ error: string;
100
+ }[];
101
+ };
102
+ outputFormat: "json";
103
+ status: import("hono/utils/http-status").ContentfulStatusCode;
104
+ };
105
+ };
106
+ } & {
107
+ "/rules/:id": {
108
+ $get: {
109
+ input: {
110
+ param: {
111
+ id: string;
112
+ };
113
+ };
114
+ output: {
115
+ error: string;
116
+ };
117
+ outputFormat: "json";
118
+ status: 404;
119
+ } | {
120
+ input: {
121
+ param: {
122
+ id: string;
123
+ };
124
+ };
125
+ output: {
126
+ data: {
127
+ id: string;
128
+ productId: string;
129
+ optionId: string | null;
130
+ facilityId: string | null;
131
+ timezone: string;
132
+ recurrenceRule: string;
133
+ maxCapacity: number;
134
+ maxPickupCapacity: number | null;
135
+ minTotalPax: number | null;
136
+ cutoffMinutes: number | null;
137
+ earlyBookingLimitMinutes: number | null;
138
+ active: boolean;
139
+ createdAt: string;
140
+ updatedAt: string;
141
+ };
142
+ };
143
+ outputFormat: "json";
144
+ status: import("hono/utils/http-status").ContentfulStatusCode;
145
+ };
146
+ };
147
+ } & {
148
+ "/rules/:id": {
149
+ $patch: {
150
+ input: {
151
+ param: {
152
+ id: string;
153
+ };
154
+ };
155
+ output: {
156
+ error: string;
157
+ };
158
+ outputFormat: "json";
159
+ status: 404;
160
+ } | {
161
+ input: {
162
+ param: {
163
+ id: string;
164
+ };
165
+ };
166
+ output: {
167
+ data: {
168
+ id: string;
169
+ productId: string;
170
+ optionId: string | null;
171
+ facilityId: string | null;
172
+ timezone: string;
173
+ recurrenceRule: string;
174
+ maxCapacity: number;
175
+ maxPickupCapacity: number | null;
176
+ minTotalPax: number | null;
177
+ cutoffMinutes: number | null;
178
+ earlyBookingLimitMinutes: number | null;
179
+ active: boolean;
180
+ createdAt: string;
181
+ updatedAt: string;
182
+ };
183
+ };
184
+ outputFormat: "json";
185
+ status: import("hono/utils/http-status").ContentfulStatusCode;
186
+ };
187
+ };
188
+ } & {
189
+ "/rules/:id": {
190
+ $delete: {
191
+ input: {
192
+ param: {
193
+ id: string;
194
+ };
195
+ };
196
+ output: {
197
+ error: string;
198
+ };
199
+ outputFormat: "json";
200
+ status: 404;
201
+ } | {
202
+ input: {
203
+ param: {
204
+ id: string;
205
+ };
206
+ };
207
+ output: {
208
+ success: true;
209
+ };
210
+ outputFormat: "json";
211
+ status: import("hono/utils/http-status").ContentfulStatusCode;
212
+ };
213
+ };
214
+ } & {
215
+ "/start-times": {
216
+ $get: {
217
+ input: {};
218
+ output: {
219
+ data: {
220
+ id: string;
221
+ productId: string;
222
+ optionId: string | null;
223
+ facilityId: string | null;
224
+ label: string | null;
225
+ startTimeLocal: string;
226
+ durationMinutes: number | null;
227
+ sortOrder: number;
228
+ active: boolean;
229
+ createdAt: string;
230
+ updatedAt: string;
231
+ }[];
232
+ total: number;
233
+ limit: number;
234
+ offset: number;
235
+ };
236
+ outputFormat: "json";
237
+ status: import("hono/utils/http-status").ContentfulStatusCode;
238
+ };
239
+ };
240
+ } & {
241
+ "/start-times": {
242
+ $post: {
243
+ input: {};
244
+ output: {
245
+ data: {
246
+ id: string;
247
+ productId: string;
248
+ optionId: string | null;
249
+ facilityId: string | null;
250
+ active: boolean;
251
+ createdAt: string;
252
+ updatedAt: string;
253
+ label: string | null;
254
+ startTimeLocal: string;
255
+ durationMinutes: number | null;
256
+ sortOrder: number;
257
+ } | undefined;
258
+ };
259
+ outputFormat: "json";
260
+ status: 201;
261
+ };
262
+ };
263
+ } & {
264
+ "/start-times/batch-update": {
265
+ $post: {
266
+ input: {};
267
+ output: {
268
+ data: {
269
+ id: string;
270
+ productId: string;
271
+ optionId: string | null;
272
+ facilityId: string | null;
273
+ label: string | null;
274
+ startTimeLocal: string;
275
+ durationMinutes: number | null;
276
+ sortOrder: number;
277
+ active: boolean;
278
+ createdAt: string;
279
+ updatedAt: string;
280
+ }[];
281
+ total: number;
282
+ succeeded: number;
283
+ failed: {
284
+ id: string;
285
+ error: string;
286
+ }[];
287
+ };
288
+ outputFormat: "json";
289
+ status: import("hono/utils/http-status").ContentfulStatusCode;
290
+ };
291
+ };
292
+ } & {
293
+ "/start-times/batch-delete": {
294
+ $post: {
295
+ input: {};
296
+ output: {
297
+ deletedIds: string[];
298
+ total: number;
299
+ succeeded: number;
300
+ failed: {
301
+ id: string;
302
+ error: string;
303
+ }[];
304
+ };
305
+ outputFormat: "json";
306
+ status: import("hono/utils/http-status").ContentfulStatusCode;
307
+ };
308
+ };
309
+ } & {
310
+ "/start-times/:id": {
311
+ $get: {
312
+ input: {
313
+ param: {
314
+ id: string;
315
+ };
316
+ };
317
+ output: {
318
+ error: string;
319
+ };
320
+ outputFormat: "json";
321
+ status: 404;
322
+ } | {
323
+ input: {
324
+ param: {
325
+ id: string;
326
+ };
327
+ };
328
+ output: {
329
+ data: {
330
+ id: string;
331
+ productId: string;
332
+ optionId: string | null;
333
+ facilityId: string | null;
334
+ label: string | null;
335
+ startTimeLocal: string;
336
+ durationMinutes: number | null;
337
+ sortOrder: number;
338
+ active: boolean;
339
+ createdAt: string;
340
+ updatedAt: string;
341
+ };
342
+ };
343
+ outputFormat: "json";
344
+ status: import("hono/utils/http-status").ContentfulStatusCode;
345
+ };
346
+ };
347
+ } & {
348
+ "/start-times/:id": {
349
+ $patch: {
350
+ input: {
351
+ param: {
352
+ id: string;
353
+ };
354
+ };
355
+ output: {
356
+ error: string;
357
+ };
358
+ outputFormat: "json";
359
+ status: 404;
360
+ } | {
361
+ input: {
362
+ param: {
363
+ id: string;
364
+ };
365
+ };
366
+ output: {
367
+ data: {
368
+ id: string;
369
+ productId: string;
370
+ optionId: string | null;
371
+ facilityId: string | null;
372
+ label: string | null;
373
+ startTimeLocal: string;
374
+ durationMinutes: number | null;
375
+ sortOrder: number;
376
+ active: boolean;
377
+ createdAt: string;
378
+ updatedAt: string;
379
+ };
380
+ };
381
+ outputFormat: "json";
382
+ status: import("hono/utils/http-status").ContentfulStatusCode;
383
+ };
384
+ };
385
+ } & {
386
+ "/start-times/:id": {
387
+ $delete: {
388
+ input: {
389
+ param: {
390
+ id: string;
391
+ };
392
+ };
393
+ output: {
394
+ error: string;
395
+ };
396
+ outputFormat: "json";
397
+ status: 404;
398
+ } | {
399
+ input: {
400
+ param: {
401
+ id: string;
402
+ };
403
+ };
404
+ output: {
405
+ success: true;
406
+ };
407
+ outputFormat: "json";
408
+ status: import("hono/utils/http-status").ContentfulStatusCode;
409
+ };
410
+ };
411
+ } & {
412
+ "/slots": {
413
+ $get: {
414
+ input: {};
415
+ output: {
416
+ data: {
417
+ id: string;
418
+ productId: string;
419
+ optionId: string | null;
420
+ facilityId: string | null;
421
+ availabilityRuleId: string | null;
422
+ startTimeId: string | null;
423
+ dateLocal: string;
424
+ startsAt: string;
425
+ endsAt: string | null;
426
+ timezone: string;
427
+ status: "open" | "closed" | "sold_out" | "cancelled";
428
+ unlimited: boolean;
429
+ initialPax: number | null;
430
+ remainingPax: number | null;
431
+ initialPickups: number | null;
432
+ remainingPickups: number | null;
433
+ remainingResources: number | null;
434
+ pastCutoff: boolean;
435
+ tooEarly: boolean;
436
+ nights: number | null;
437
+ days: number | null;
438
+ notes: string | null;
439
+ createdAt: string;
440
+ updatedAt: string;
441
+ }[];
442
+ total: number;
443
+ limit: number;
444
+ offset: number;
445
+ };
446
+ outputFormat: "json";
447
+ status: import("hono/utils/http-status").ContentfulStatusCode;
448
+ };
449
+ };
450
+ } & {
451
+ "/slots": {
452
+ $post: {
453
+ input: {};
454
+ output: {
455
+ data: {
456
+ id: string;
457
+ productId: string;
458
+ optionId: string | null;
459
+ facilityId: string | null;
460
+ timezone: string;
461
+ createdAt: string;
462
+ updatedAt: string;
463
+ availabilityRuleId: string | null;
464
+ startTimeId: string | null;
465
+ dateLocal: string;
466
+ startsAt: string;
467
+ endsAt: string | null;
468
+ status: "open" | "closed" | "sold_out" | "cancelled";
469
+ unlimited: boolean;
470
+ initialPax: number | null;
471
+ remainingPax: number | null;
472
+ initialPickups: number | null;
473
+ remainingPickups: number | null;
474
+ remainingResources: number | null;
475
+ pastCutoff: boolean;
476
+ tooEarly: boolean;
477
+ nights: number | null;
478
+ days: number | null;
479
+ notes: string | null;
480
+ } | undefined;
481
+ };
482
+ outputFormat: "json";
483
+ status: 201;
484
+ };
485
+ };
486
+ } & {
487
+ "/slots/batch-update": {
488
+ $post: {
489
+ input: {};
490
+ output: {
491
+ data: {
492
+ id: string;
493
+ productId: string;
494
+ optionId: string | null;
495
+ facilityId: string | null;
496
+ availabilityRuleId: string | null;
497
+ startTimeId: string | null;
498
+ dateLocal: string;
499
+ startsAt: string;
500
+ endsAt: string | null;
501
+ timezone: string;
502
+ status: "open" | "closed" | "sold_out" | "cancelled";
503
+ unlimited: boolean;
504
+ initialPax: number | null;
505
+ remainingPax: number | null;
506
+ initialPickups: number | null;
507
+ remainingPickups: number | null;
508
+ remainingResources: number | null;
509
+ pastCutoff: boolean;
510
+ tooEarly: boolean;
511
+ nights: number | null;
512
+ days: number | null;
513
+ notes: string | null;
514
+ createdAt: string;
515
+ updatedAt: string;
516
+ }[];
517
+ total: number;
518
+ succeeded: number;
519
+ failed: {
520
+ id: string;
521
+ error: string;
522
+ }[];
523
+ };
524
+ outputFormat: "json";
525
+ status: import("hono/utils/http-status").ContentfulStatusCode;
526
+ };
527
+ };
528
+ } & {
529
+ "/slots/batch-delete": {
530
+ $post: {
531
+ input: {};
532
+ output: {
533
+ deletedIds: string[];
534
+ total: number;
535
+ succeeded: number;
536
+ failed: {
537
+ id: string;
538
+ error: string;
539
+ }[];
540
+ };
541
+ outputFormat: "json";
542
+ status: import("hono/utils/http-status").ContentfulStatusCode;
543
+ };
544
+ };
545
+ } & {
546
+ "/slots/:id": {
547
+ $get: {
548
+ input: {
549
+ param: {
550
+ id: string;
551
+ };
552
+ };
553
+ output: {
554
+ error: string;
555
+ };
556
+ outputFormat: "json";
557
+ status: 404;
558
+ } | {
559
+ input: {
560
+ param: {
561
+ id: string;
562
+ };
563
+ };
564
+ output: {
565
+ data: {
566
+ id: string;
567
+ productId: string;
568
+ optionId: string | null;
569
+ facilityId: string | null;
570
+ availabilityRuleId: string | null;
571
+ startTimeId: string | null;
572
+ dateLocal: string;
573
+ startsAt: string;
574
+ endsAt: string | null;
575
+ timezone: string;
576
+ status: "open" | "closed" | "sold_out" | "cancelled";
577
+ unlimited: boolean;
578
+ initialPax: number | null;
579
+ remainingPax: number | null;
580
+ initialPickups: number | null;
581
+ remainingPickups: number | null;
582
+ remainingResources: number | null;
583
+ pastCutoff: boolean;
584
+ tooEarly: boolean;
585
+ nights: number | null;
586
+ days: number | null;
587
+ notes: string | null;
588
+ createdAt: string;
589
+ updatedAt: string;
590
+ };
591
+ };
592
+ outputFormat: "json";
593
+ status: import("hono/utils/http-status").ContentfulStatusCode;
594
+ };
595
+ };
596
+ } & {
597
+ "/slots/:id": {
598
+ $patch: {
599
+ input: {
600
+ param: {
601
+ id: string;
602
+ };
603
+ };
604
+ output: {
605
+ error: string;
606
+ };
607
+ outputFormat: "json";
608
+ status: 404;
609
+ } | {
610
+ input: {
611
+ param: {
612
+ id: string;
613
+ };
614
+ };
615
+ output: {
616
+ data: {
617
+ id: string;
618
+ productId: string;
619
+ optionId: string | null;
620
+ facilityId: string | null;
621
+ availabilityRuleId: string | null;
622
+ startTimeId: string | null;
623
+ dateLocal: string;
624
+ startsAt: string;
625
+ endsAt: string | null;
626
+ timezone: string;
627
+ status: "open" | "closed" | "sold_out" | "cancelled";
628
+ unlimited: boolean;
629
+ initialPax: number | null;
630
+ remainingPax: number | null;
631
+ initialPickups: number | null;
632
+ remainingPickups: number | null;
633
+ remainingResources: number | null;
634
+ pastCutoff: boolean;
635
+ tooEarly: boolean;
636
+ nights: number | null;
637
+ days: number | null;
638
+ notes: string | null;
639
+ createdAt: string;
640
+ updatedAt: string;
641
+ };
642
+ };
643
+ outputFormat: "json";
644
+ status: import("hono/utils/http-status").ContentfulStatusCode;
645
+ };
646
+ };
647
+ } & {
648
+ "/slots/:id": {
649
+ $delete: {
650
+ input: {
651
+ param: {
652
+ id: string;
653
+ };
654
+ };
655
+ output: {
656
+ error: string;
657
+ };
658
+ outputFormat: "json";
659
+ status: 404;
660
+ } | {
661
+ input: {
662
+ param: {
663
+ id: string;
664
+ };
665
+ };
666
+ output: {
667
+ success: true;
668
+ };
669
+ outputFormat: "json";
670
+ status: import("hono/utils/http-status").ContentfulStatusCode;
671
+ };
672
+ };
673
+ } & {
674
+ "/closeouts": {
675
+ $get: {
676
+ input: {};
677
+ output: {
678
+ data: {
679
+ id: string;
680
+ productId: string;
681
+ slotId: string | null;
682
+ dateLocal: string;
683
+ reason: string | null;
684
+ createdBy: string | null;
685
+ createdAt: string;
686
+ }[];
687
+ total: number;
688
+ limit: number;
689
+ offset: number;
690
+ };
691
+ outputFormat: "json";
692
+ status: import("hono/utils/http-status").ContentfulStatusCode;
693
+ };
694
+ };
695
+ } & {
696
+ "/closeouts": {
697
+ $post: {
698
+ input: {};
699
+ output: {
700
+ data: {
701
+ id: string;
702
+ productId: string;
703
+ createdAt: string;
704
+ dateLocal: string;
705
+ slotId: string | null;
706
+ reason: string | null;
707
+ createdBy: string | null;
708
+ } | undefined;
709
+ };
710
+ outputFormat: "json";
711
+ status: 201;
712
+ };
713
+ };
714
+ } & {
715
+ "/closeouts/batch-update": {
716
+ $post: {
717
+ input: {};
718
+ output: {
719
+ data: {
720
+ id: string;
721
+ productId: string;
722
+ slotId: string | null;
723
+ dateLocal: string;
724
+ reason: string | null;
725
+ createdBy: string | null;
726
+ createdAt: string;
727
+ }[];
728
+ total: number;
729
+ succeeded: number;
730
+ failed: {
731
+ id: string;
732
+ error: string;
733
+ }[];
734
+ };
735
+ outputFormat: "json";
736
+ status: import("hono/utils/http-status").ContentfulStatusCode;
737
+ };
738
+ };
739
+ } & {
740
+ "/closeouts/batch-delete": {
741
+ $post: {
742
+ input: {};
743
+ output: {
744
+ deletedIds: string[];
745
+ total: number;
746
+ succeeded: number;
747
+ failed: {
748
+ id: string;
749
+ error: string;
750
+ }[];
751
+ };
752
+ outputFormat: "json";
753
+ status: import("hono/utils/http-status").ContentfulStatusCode;
754
+ };
755
+ };
756
+ } & {
757
+ "/closeouts/:id": {
758
+ $get: {
759
+ input: {
760
+ param: {
761
+ id: string;
762
+ };
763
+ };
764
+ output: {
765
+ error: string;
766
+ };
767
+ outputFormat: "json";
768
+ status: 404;
769
+ } | {
770
+ input: {
771
+ param: {
772
+ id: string;
773
+ };
774
+ };
775
+ output: {
776
+ data: {
777
+ id: string;
778
+ productId: string;
779
+ slotId: string | null;
780
+ dateLocal: string;
781
+ reason: string | null;
782
+ createdBy: string | null;
783
+ createdAt: string;
784
+ };
785
+ };
786
+ outputFormat: "json";
787
+ status: import("hono/utils/http-status").ContentfulStatusCode;
788
+ };
789
+ };
790
+ } & {
791
+ "/closeouts/:id": {
792
+ $patch: {
793
+ input: {
794
+ param: {
795
+ id: string;
796
+ };
797
+ };
798
+ output: {
799
+ error: string;
800
+ };
801
+ outputFormat: "json";
802
+ status: 404;
803
+ } | {
804
+ input: {
805
+ param: {
806
+ id: string;
807
+ };
808
+ };
809
+ output: {
810
+ data: {
811
+ id: string;
812
+ productId: string;
813
+ slotId: string | null;
814
+ dateLocal: string;
815
+ reason: string | null;
816
+ createdBy: string | null;
817
+ createdAt: string;
818
+ };
819
+ };
820
+ outputFormat: "json";
821
+ status: import("hono/utils/http-status").ContentfulStatusCode;
822
+ };
823
+ };
824
+ } & {
825
+ "/closeouts/:id": {
826
+ $delete: {
827
+ input: {
828
+ param: {
829
+ id: string;
830
+ };
831
+ };
832
+ output: {
833
+ error: string;
834
+ };
835
+ outputFormat: "json";
836
+ status: 404;
837
+ } | {
838
+ input: {
839
+ param: {
840
+ id: string;
841
+ };
842
+ };
843
+ output: {
844
+ success: true;
845
+ };
846
+ outputFormat: "json";
847
+ status: import("hono/utils/http-status").ContentfulStatusCode;
848
+ };
849
+ };
850
+ }, "/", "/closeouts/:id">;
851
+ //# sourceMappingURL=routes-core.d.ts.map