@voyantjs/availability-react 0.105.2 → 0.107.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 (87) hide show
  1. package/README.md +161 -1
  2. package/dist/admin/availability-index-host.d.ts +12 -0
  3. package/dist/admin/availability-index-host.d.ts.map +1 -0
  4. package/dist/admin/availability-index-host.js +125 -0
  5. package/dist/admin/availability-page-data.d.ts +9 -0
  6. package/dist/admin/availability-page-data.d.ts.map +1 -0
  7. package/dist/admin/availability-page-data.js +25 -0
  8. package/dist/admin/index.d.ts +69 -0
  9. package/dist/admin/index.d.ts.map +1 -0
  10. package/dist/admin/index.js +73 -0
  11. package/dist/admin/option-resource-templates-panel.d.ts +22 -0
  12. package/dist/admin/option-resource-templates-panel.d.ts.map +1 -0
  13. package/dist/admin/option-resource-templates-panel.js +251 -0
  14. package/dist/admin/rule-detail-host.d.ts +14 -0
  15. package/dist/admin/rule-detail-host.d.ts.map +1 -0
  16. package/dist/admin/rule-detail-host.js +27 -0
  17. package/dist/admin/slot-detail-host.d.ts +29 -0
  18. package/dist/admin/slot-detail-host.d.ts.map +1 -0
  19. package/dist/admin/slot-detail-host.js +110 -0
  20. package/dist/admin/start-time-detail-host.d.ts +15 -0
  21. package/dist/admin/start-time-detail-host.d.ts.map +1 -0
  22. package/dist/admin/start-time-detail-host.js +37 -0
  23. package/dist/components/availability-columns.d.ts +42 -0
  24. package/dist/components/availability-columns.d.ts.map +1 -0
  25. package/dist/components/availability-columns.js +182 -0
  26. package/dist/components/availability-dialogs.d.ts +236 -0
  27. package/dist/components/availability-dialogs.d.ts.map +1 -0
  28. package/dist/components/availability-dialogs.js +369 -0
  29. package/dist/components/availability-overview.d.ts +54 -0
  30. package/dist/components/availability-overview.d.ts.map +1 -0
  31. package/dist/components/availability-overview.js +50 -0
  32. package/dist/components/availability-page.d.ts +32 -0
  33. package/dist/components/availability-page.d.ts.map +1 -0
  34. package/dist/components/availability-page.js +128 -0
  35. package/dist/components/availability-rule-detail-page.d.ts +251 -0
  36. package/dist/components/availability-rule-detail-page.d.ts.map +1 -0
  37. package/dist/components/availability-rule-detail-page.js +74 -0
  38. package/dist/components/availability-section-header.d.ts +8 -0
  39. package/dist/components/availability-section-header.d.ts.map +1 -0
  40. package/dist/components/availability-section-header.js +7 -0
  41. package/dist/components/availability-skeletons.d.ts +6 -0
  42. package/dist/components/availability-skeletons.d.ts.map +1 -0
  43. package/dist/components/availability-skeletons.js +34 -0
  44. package/dist/components/availability-slot-detail-page.d.ts +974 -0
  45. package/dist/components/availability-slot-detail-page.d.ts.map +1 -0
  46. package/dist/components/availability-slot-detail-page.js +383 -0
  47. package/dist/components/availability-start-time-detail-page.d.ts +246 -0
  48. package/dist/components/availability-start-time-detail-page.d.ts.map +1 -0
  49. package/dist/components/availability-start-time-detail-page.js +83 -0
  50. package/dist/components/availability-tabs.d.ts +152 -0
  51. package/dist/components/availability-tabs.d.ts.map +1 -0
  52. package/dist/components/availability-tabs.js +192 -0
  53. package/dist/components/slot-status-tone.d.ts +15 -0
  54. package/dist/components/slot-status-tone.d.ts.map +1 -0
  55. package/dist/components/slot-status-tone.js +18 -0
  56. package/dist/form-resolver.d.ts +4 -0
  57. package/dist/form-resolver.d.ts.map +1 -0
  58. package/dist/form-resolver.js +40 -0
  59. package/dist/hooks/index.d.ts +4 -0
  60. package/dist/hooks/index.d.ts.map +1 -1
  61. package/dist/hooks/index.js +3 -0
  62. package/dist/hooks/use-availability-batch-mutations.d.ts +193 -0
  63. package/dist/hooks/use-availability-batch-mutations.d.ts.map +1 -0
  64. package/dist/hooks/use-availability-batch-mutations.js +53 -0
  65. package/dist/hooks/use-availability-closeout-mutation.d.ts +34 -0
  66. package/dist/hooks/use-availability-closeout-mutation.d.ts.map +1 -0
  67. package/dist/hooks/use-availability-closeout-mutation.js +38 -0
  68. package/dist/hooks/use-availability-pickup-point-mutation.d.ts +35 -0
  69. package/dist/hooks/use-availability-pickup-point-mutation.d.ts.map +1 -0
  70. package/dist/hooks/use-availability-pickup-point-mutation.js +38 -0
  71. package/dist/i18n/index.d.ts +2 -0
  72. package/dist/i18n/index.d.ts.map +1 -0
  73. package/dist/i18n/index.js +1 -0
  74. package/dist/i18n/provider.d.ts +2003 -0
  75. package/dist/i18n/provider.d.ts.map +1 -0
  76. package/dist/i18n/provider.js +102 -0
  77. package/dist/schemas.d.ts +63 -2
  78. package/dist/schemas.d.ts.map +1 -1
  79. package/dist/schemas.js +22 -2
  80. package/dist/ui.d.ts +13 -0
  81. package/dist/ui.d.ts.map +1 -0
  82. package/dist/ui.js +12 -0
  83. package/dist/utils.d.ts +1 -0
  84. package/dist/utils.d.ts.map +1 -1
  85. package/dist/utils.js +3 -0
  86. package/package.json +92 -9
  87. package/src/styles.css +11 -0
@@ -0,0 +1,974 @@
1
+ import type { QueryClient } from "@tanstack/react-query";
2
+ import { type ReactNode } from "react";
3
+ import { type AllocationManifestBooking, type VoyantAvailabilityContextValue } from "../index.js";
4
+ export interface AvailabilitySlotDetailPageProps {
5
+ id: string;
6
+ className?: string;
7
+ onBack?: () => void;
8
+ onDeleted?: () => void;
9
+ onOpenProduct?: (productId: string) => void;
10
+ onOpenStartTime?: (startTimeId: string) => void;
11
+ onCreateBooking?: (input: {
12
+ slotId: string;
13
+ productId: string;
14
+ }) => void;
15
+ /**
16
+ * Opens the host's slot-edit dialog (status / pax / dates / notes …).
17
+ * The detail page only surfaces the button — the host owns the dialog
18
+ * because it already has the catalog data (products / rules / start
19
+ * times) the edit form needs.
20
+ */
21
+ onEdit?: () => void;
22
+ /**
23
+ * Breadcrumb element rendered above the page header. Hosts that
24
+ * already render breadcrumbs in their sidebar inset top bar can
25
+ * leave this undefined.
26
+ */
27
+ breadcrumb?: ReactNode;
28
+ /**
29
+ * Primary header actions (Open product, Delete, …). When supplied,
30
+ * the in-page action buttons are hidden so the host can render the
31
+ * same actions in the inset top bar instead.
32
+ */
33
+ headerActions?: ReactNode;
34
+ /**
35
+ * Content for the Allocation tab. Hosts mount their allocation
36
+ * manager here (e.g. `@voyantjs/allocation-ui`'s
37
+ * `SlotAllocationPage` in `embed` mode) so this package keeps no
38
+ * runtime dependency on the allocation UI. When omitted, the tab
39
+ * shows a stub message instead.
40
+ */
41
+ renderAllocation?: (context: {
42
+ slotId: string;
43
+ productId: string | null;
44
+ }) => ReactNode;
45
+ /**
46
+ * Content for the Extras tab. Hosts that mount `@voyantjs/extras` can
47
+ * render a slot-level operations manifest here without making
48
+ * availability-ui depend on extras-ui.
49
+ */
50
+ renderExtras?: (context: {
51
+ slotId: string;
52
+ productId: string | null;
53
+ }) => ReactNode;
54
+ extrasTabLabel?: ReactNode;
55
+ }
56
+ export declare function getAvailabilitySlotDetailQueryOptions(client: VoyantAvailabilityContextValue, id: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
57
+ data: {
58
+ id: string;
59
+ productId: string;
60
+ itineraryId: string | null;
61
+ optionId: string | null;
62
+ facilityId: string | null;
63
+ availabilityRuleId: string | null;
64
+ startTimeId: string | null;
65
+ dateLocal: string;
66
+ startsAt: string;
67
+ endsAt: string | null;
68
+ timezone: string;
69
+ status: "cancelled" | "open" | "closed" | "sold_out";
70
+ unlimited: boolean;
71
+ initialPax: number | null;
72
+ remainingPax: number | null;
73
+ nights: number | null;
74
+ days: number | null;
75
+ notes: string | null;
76
+ initialPickups: number | null;
77
+ remainingPickups: number | null;
78
+ remainingResources: number | null;
79
+ pastCutoff: boolean;
80
+ tooEarly: boolean;
81
+ createdAt: string;
82
+ updatedAt: string;
83
+ productName?: string | null | undefined;
84
+ endDateLocal?: string | null | undefined;
85
+ };
86
+ }, Error, {
87
+ data: {
88
+ id: string;
89
+ productId: string;
90
+ itineraryId: string | null;
91
+ optionId: string | null;
92
+ facilityId: string | null;
93
+ availabilityRuleId: string | null;
94
+ startTimeId: string | null;
95
+ dateLocal: string;
96
+ startsAt: string;
97
+ endsAt: string | null;
98
+ timezone: string;
99
+ status: "cancelled" | "open" | "closed" | "sold_out";
100
+ unlimited: boolean;
101
+ initialPax: number | null;
102
+ remainingPax: number | null;
103
+ nights: number | null;
104
+ days: number | null;
105
+ notes: string | null;
106
+ initialPickups: number | null;
107
+ remainingPickups: number | null;
108
+ remainingResources: number | null;
109
+ pastCutoff: boolean;
110
+ tooEarly: boolean;
111
+ createdAt: string;
112
+ updatedAt: string;
113
+ productName?: string | null | undefined;
114
+ endDateLocal?: string | null | undefined;
115
+ };
116
+ }, readonly ["voyant", "availability", "slots", "detail", string]>, "queryFn"> & {
117
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
118
+ data: {
119
+ id: string;
120
+ productId: string;
121
+ itineraryId: string | null;
122
+ optionId: string | null;
123
+ facilityId: string | null;
124
+ availabilityRuleId: string | null;
125
+ startTimeId: string | null;
126
+ dateLocal: string;
127
+ startsAt: string;
128
+ endsAt: string | null;
129
+ timezone: string;
130
+ status: "cancelled" | "open" | "closed" | "sold_out";
131
+ unlimited: boolean;
132
+ initialPax: number | null;
133
+ remainingPax: number | null;
134
+ nights: number | null;
135
+ days: number | null;
136
+ notes: string | null;
137
+ initialPickups: number | null;
138
+ remainingPickups: number | null;
139
+ remainingResources: number | null;
140
+ pastCutoff: boolean;
141
+ tooEarly: boolean;
142
+ createdAt: string;
143
+ updatedAt: string;
144
+ productName?: string | null | undefined;
145
+ endDateLocal?: string | null | undefined;
146
+ };
147
+ }, readonly ["voyant", "availability", "slots", "detail", string], never> | undefined;
148
+ } & {
149
+ queryKey: readonly ["voyant", "availability", "slots", "detail", string] & {
150
+ [dataTagSymbol]: {
151
+ data: {
152
+ id: string;
153
+ productId: string;
154
+ itineraryId: string | null;
155
+ optionId: string | null;
156
+ facilityId: string | null;
157
+ availabilityRuleId: string | null;
158
+ startTimeId: string | null;
159
+ dateLocal: string;
160
+ startsAt: string;
161
+ endsAt: string | null;
162
+ timezone: string;
163
+ status: "cancelled" | "open" | "closed" | "sold_out";
164
+ unlimited: boolean;
165
+ initialPax: number | null;
166
+ remainingPax: number | null;
167
+ nights: number | null;
168
+ days: number | null;
169
+ notes: string | null;
170
+ initialPickups: number | null;
171
+ remainingPickups: number | null;
172
+ remainingResources: number | null;
173
+ pastCutoff: boolean;
174
+ tooEarly: boolean;
175
+ createdAt: string;
176
+ updatedAt: string;
177
+ productName?: string | null | undefined;
178
+ endDateLocal?: string | null | undefined;
179
+ };
180
+ };
181
+ [dataTagErrorSymbol]: Error;
182
+ };
183
+ };
184
+ export declare function getAvailabilitySlotProductQueryOptions(client: VoyantAvailabilityContextValue, productId: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
185
+ data: {
186
+ id: string;
187
+ name: string;
188
+ sellCurrency: string | null;
189
+ productType: {
190
+ id: string;
191
+ name: string;
192
+ code: string | null;
193
+ } | null;
194
+ };
195
+ }, Error, {
196
+ data: {
197
+ id: string;
198
+ name: string;
199
+ sellCurrency: string | null;
200
+ productType: {
201
+ id: string;
202
+ name: string;
203
+ code: string | null;
204
+ } | null;
205
+ };
206
+ }, readonly ["voyant", "availability", "products", "detail", string]>, "queryFn"> & {
207
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
208
+ data: {
209
+ id: string;
210
+ name: string;
211
+ sellCurrency: string | null;
212
+ productType: {
213
+ id: string;
214
+ name: string;
215
+ code: string | null;
216
+ } | null;
217
+ };
218
+ }, readonly ["voyant", "availability", "products", "detail", string], never> | undefined;
219
+ } & {
220
+ queryKey: readonly ["voyant", "availability", "products", "detail", string] & {
221
+ [dataTagSymbol]: {
222
+ data: {
223
+ id: string;
224
+ name: string;
225
+ sellCurrency: string | null;
226
+ productType: {
227
+ id: string;
228
+ name: string;
229
+ code: string | null;
230
+ } | null;
231
+ };
232
+ };
233
+ [dataTagErrorSymbol]: Error;
234
+ };
235
+ };
236
+ export declare function getAvailabilitySlotPickupsQueryOptions(client: VoyantAvailabilityContextValue, id: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
237
+ data: {
238
+ id: string;
239
+ slotId: string;
240
+ pickupPointId: string;
241
+ initialCapacity: number | null;
242
+ remainingCapacity: number | null;
243
+ }[];
244
+ total: number;
245
+ limit: number;
246
+ offset: number;
247
+ }, Error, {
248
+ data: {
249
+ id: string;
250
+ slotId: string;
251
+ pickupPointId: string;
252
+ initialCapacity: number | null;
253
+ remainingCapacity: number | null;
254
+ }[];
255
+ total: number;
256
+ limit: number;
257
+ offset: number;
258
+ }, readonly ["voyant", "availability", "slots", "pickups", "list", import("../query-keys.js").AvailabilitySlotDetailFilters]>, "queryFn"> & {
259
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
260
+ data: {
261
+ id: string;
262
+ slotId: string;
263
+ pickupPointId: string;
264
+ initialCapacity: number | null;
265
+ remainingCapacity: number | null;
266
+ }[];
267
+ total: number;
268
+ limit: number;
269
+ offset: number;
270
+ }, readonly ["voyant", "availability", "slots", "pickups", "list", import("../query-keys.js").AvailabilitySlotDetailFilters], never> | undefined;
271
+ } & {
272
+ queryKey: readonly ["voyant", "availability", "slots", "pickups", "list", import("../query-keys.js").AvailabilitySlotDetailFilters] & {
273
+ [dataTagSymbol]: {
274
+ data: {
275
+ id: string;
276
+ slotId: string;
277
+ pickupPointId: string;
278
+ initialCapacity: number | null;
279
+ remainingCapacity: number | null;
280
+ }[];
281
+ total: number;
282
+ limit: number;
283
+ offset: number;
284
+ };
285
+ [dataTagErrorSymbol]: Error;
286
+ };
287
+ };
288
+ export declare function getAvailabilitySlotPickupPointsQueryOptions(client: VoyantAvailabilityContextValue, productId: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
289
+ data: {
290
+ id: string;
291
+ productId: string;
292
+ name: string;
293
+ description: string | null;
294
+ locationText: string | null;
295
+ active: boolean;
296
+ productName?: string | null | undefined;
297
+ }[];
298
+ total: number;
299
+ limit: number;
300
+ offset: number;
301
+ }, Error, {
302
+ data: {
303
+ id: string;
304
+ productId: string;
305
+ name: string;
306
+ description: string | null;
307
+ locationText: string | null;
308
+ active: boolean;
309
+ productName?: string | null | undefined;
310
+ }[];
311
+ total: number;
312
+ limit: number;
313
+ offset: number;
314
+ }, readonly ["voyant", "availability", "pickup-points", "list", import("../query-keys.js").AvailabilityPickupPointsListFilters]>, "queryFn"> & {
315
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
316
+ data: {
317
+ id: string;
318
+ productId: string;
319
+ name: string;
320
+ description: string | null;
321
+ locationText: string | null;
322
+ active: boolean;
323
+ productName?: string | null | undefined;
324
+ }[];
325
+ total: number;
326
+ limit: number;
327
+ offset: number;
328
+ }, readonly ["voyant", "availability", "pickup-points", "list", import("../query-keys.js").AvailabilityPickupPointsListFilters], never> | undefined;
329
+ } & {
330
+ queryKey: readonly ["voyant", "availability", "pickup-points", "list", import("../query-keys.js").AvailabilityPickupPointsListFilters] & {
331
+ [dataTagSymbol]: {
332
+ data: {
333
+ id: string;
334
+ productId: string;
335
+ name: string;
336
+ description: string | null;
337
+ locationText: string | null;
338
+ active: boolean;
339
+ productName?: string | null | undefined;
340
+ }[];
341
+ total: number;
342
+ limit: number;
343
+ offset: number;
344
+ };
345
+ [dataTagErrorSymbol]: Error;
346
+ };
347
+ };
348
+ export declare function getAvailabilitySlotCloseoutsQueryOptions(client: VoyantAvailabilityContextValue, id: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
349
+ data: {
350
+ id: string;
351
+ productId: string;
352
+ slotId: string | null;
353
+ dateLocal: string;
354
+ reason: string | null;
355
+ createdBy: string | null;
356
+ productName?: string | null | undefined;
357
+ }[];
358
+ total: number;
359
+ limit: number;
360
+ offset: number;
361
+ }, Error, {
362
+ data: {
363
+ id: string;
364
+ productId: string;
365
+ slotId: string | null;
366
+ dateLocal: string;
367
+ reason: string | null;
368
+ createdBy: string | null;
369
+ productName?: string | null | undefined;
370
+ }[];
371
+ total: number;
372
+ limit: number;
373
+ offset: number;
374
+ }, readonly ["voyant", "availability", "slots", "closeouts", "list", import("../query-keys.js").AvailabilitySlotDetailFilters]>, "queryFn"> & {
375
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
376
+ data: {
377
+ id: string;
378
+ productId: string;
379
+ slotId: string | null;
380
+ dateLocal: string;
381
+ reason: string | null;
382
+ createdBy: string | null;
383
+ productName?: string | null | undefined;
384
+ }[];
385
+ total: number;
386
+ limit: number;
387
+ offset: number;
388
+ }, readonly ["voyant", "availability", "slots", "closeouts", "list", import("../query-keys.js").AvailabilitySlotDetailFilters], never> | undefined;
389
+ } & {
390
+ queryKey: readonly ["voyant", "availability", "slots", "closeouts", "list", import("../query-keys.js").AvailabilitySlotDetailFilters] & {
391
+ [dataTagSymbol]: {
392
+ data: {
393
+ id: string;
394
+ productId: string;
395
+ slotId: string | null;
396
+ dateLocal: string;
397
+ reason: string | null;
398
+ createdBy: string | null;
399
+ productName?: string | null | undefined;
400
+ }[];
401
+ total: number;
402
+ limit: number;
403
+ offset: number;
404
+ };
405
+ [dataTagErrorSymbol]: Error;
406
+ };
407
+ };
408
+ export declare function getAvailabilitySlotAssignmentsQueryOptions(client: VoyantAvailabilityContextValue, id: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
409
+ data: {
410
+ id: string;
411
+ poolId: string | null;
412
+ resourceId: string | null;
413
+ bookingId: string | null;
414
+ status: "completed" | "cancelled" | "assigned" | "reserved" | "released";
415
+ assignedBy: string | null;
416
+ releasedAt: string | null;
417
+ notes: string | null;
418
+ }[];
419
+ total: number;
420
+ limit: number;
421
+ offset: number;
422
+ }, Error, {
423
+ data: {
424
+ id: string;
425
+ poolId: string | null;
426
+ resourceId: string | null;
427
+ bookingId: string | null;
428
+ status: "completed" | "cancelled" | "assigned" | "reserved" | "released";
429
+ assignedBy: string | null;
430
+ releasedAt: string | null;
431
+ notes: string | null;
432
+ }[];
433
+ total: number;
434
+ limit: number;
435
+ offset: number;
436
+ }, readonly ["voyant", "availability", "slots", "assignments", "list", import("../query-keys.js").AvailabilitySlotDetailFilters]>, "queryFn"> & {
437
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
438
+ data: {
439
+ id: string;
440
+ poolId: string | null;
441
+ resourceId: string | null;
442
+ bookingId: string | null;
443
+ status: "completed" | "cancelled" | "assigned" | "reserved" | "released";
444
+ assignedBy: string | null;
445
+ releasedAt: string | null;
446
+ notes: string | null;
447
+ }[];
448
+ total: number;
449
+ limit: number;
450
+ offset: number;
451
+ }, readonly ["voyant", "availability", "slots", "assignments", "list", import("../query-keys.js").AvailabilitySlotDetailFilters], never> | undefined;
452
+ } & {
453
+ queryKey: readonly ["voyant", "availability", "slots", "assignments", "list", import("../query-keys.js").AvailabilitySlotDetailFilters] & {
454
+ [dataTagSymbol]: {
455
+ data: {
456
+ id: string;
457
+ poolId: string | null;
458
+ resourceId: string | null;
459
+ bookingId: string | null;
460
+ status: "completed" | "cancelled" | "assigned" | "reserved" | "released";
461
+ assignedBy: string | null;
462
+ releasedAt: string | null;
463
+ notes: string | null;
464
+ }[];
465
+ total: number;
466
+ limit: number;
467
+ offset: number;
468
+ };
469
+ [dataTagErrorSymbol]: Error;
470
+ };
471
+ };
472
+ export declare function getAvailabilitySlotResourcesQueryOptions(client: VoyantAvailabilityContextValue): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
473
+ data: {
474
+ id: string;
475
+ name: string;
476
+ }[];
477
+ total: number;
478
+ limit: number;
479
+ offset: number;
480
+ }, Error, {
481
+ data: {
482
+ id: string;
483
+ name: string;
484
+ }[];
485
+ total: number;
486
+ limit: number;
487
+ offset: number;
488
+ }, readonly ["voyant", "availability", "slots", "resources", "list", import("../query-keys.js").PaginationFilters]>, "queryFn"> & {
489
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
490
+ data: {
491
+ id: string;
492
+ name: string;
493
+ }[];
494
+ total: number;
495
+ limit: number;
496
+ offset: number;
497
+ }, readonly ["voyant", "availability", "slots", "resources", "list", import("../query-keys.js").PaginationFilters], never> | undefined;
498
+ } & {
499
+ queryKey: readonly ["voyant", "availability", "slots", "resources", "list", import("../query-keys.js").PaginationFilters] & {
500
+ [dataTagSymbol]: {
501
+ data: {
502
+ id: string;
503
+ name: string;
504
+ }[];
505
+ total: number;
506
+ limit: number;
507
+ offset: number;
508
+ };
509
+ [dataTagErrorSymbol]: Error;
510
+ };
511
+ };
512
+ export declare function getAvailabilitySlotAllocationQueryOptions(client: VoyantAvailabilityContextValue, id: string | null | undefined): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
513
+ data: {
514
+ slot: {
515
+ id: string;
516
+ productId: string | null;
517
+ startsAt: string | null;
518
+ endsAt: string | null;
519
+ };
520
+ bookings: {
521
+ id: string;
522
+ bookingNumber: string;
523
+ status: string;
524
+ bookingSequence: number;
525
+ paymentStatus: "partial" | "paid" | "unpaid";
526
+ contactFirstName: string | null;
527
+ contactLastName: string | null;
528
+ contactEmail: string | null;
529
+ contactPhone: string | null;
530
+ sellCurrency: string | null;
531
+ pax: number | null;
532
+ sellAmountCents: number | null;
533
+ paidAmountCents: number | null;
534
+ travelers: {
535
+ id: string;
536
+ bookingId: string;
537
+ bookingNumber: string;
538
+ bookingStatus: string;
539
+ bookingSequence: number;
540
+ paymentStatus: "partial" | "paid" | "unpaid";
541
+ firstName: string;
542
+ lastName: string;
543
+ fullName: string;
544
+ email: string | null;
545
+ phone: string | null;
546
+ isLeadTraveler: boolean;
547
+ isPrimary: boolean;
548
+ sharingGroupId: string | null;
549
+ roomTypeId: string | null;
550
+ bedPreference: string | null;
551
+ allocations: Record<string, string>;
552
+ travelerCategory: string | null;
553
+ participantType: string;
554
+ hasAccessibilityNeeds: boolean;
555
+ hasDietaryRequirements: boolean;
556
+ }[];
557
+ }[];
558
+ resources: {
559
+ id: string;
560
+ slotId: string;
561
+ kind: string;
562
+ refType: string | null;
563
+ refId: string | null;
564
+ label: string | null;
565
+ capacity: number;
566
+ flags: Record<string, unknown>;
567
+ parentId: string | null;
568
+ sortOrder: number;
569
+ createdAt: string | Date;
570
+ updatedAt: string | Date;
571
+ }[];
572
+ sharingGroupLabels: Record<string, string>;
573
+ summary: {
574
+ bookingCount: number;
575
+ travelerCount: number;
576
+ leadTravelerCount: number;
577
+ bookingsByStatus: Record<string, number>;
578
+ };
579
+ };
580
+ }, Error, {
581
+ data: {
582
+ slot: {
583
+ id: string;
584
+ productId: string | null;
585
+ startsAt: string | null;
586
+ endsAt: string | null;
587
+ };
588
+ bookings: {
589
+ id: string;
590
+ bookingNumber: string;
591
+ status: string;
592
+ bookingSequence: number;
593
+ paymentStatus: "partial" | "paid" | "unpaid";
594
+ contactFirstName: string | null;
595
+ contactLastName: string | null;
596
+ contactEmail: string | null;
597
+ contactPhone: string | null;
598
+ sellCurrency: string | null;
599
+ pax: number | null;
600
+ sellAmountCents: number | null;
601
+ paidAmountCents: number | null;
602
+ travelers: {
603
+ id: string;
604
+ bookingId: string;
605
+ bookingNumber: string;
606
+ bookingStatus: string;
607
+ bookingSequence: number;
608
+ paymentStatus: "partial" | "paid" | "unpaid";
609
+ firstName: string;
610
+ lastName: string;
611
+ fullName: string;
612
+ email: string | null;
613
+ phone: string | null;
614
+ isLeadTraveler: boolean;
615
+ isPrimary: boolean;
616
+ sharingGroupId: string | null;
617
+ roomTypeId: string | null;
618
+ bedPreference: string | null;
619
+ allocations: Record<string, string>;
620
+ travelerCategory: string | null;
621
+ participantType: string;
622
+ hasAccessibilityNeeds: boolean;
623
+ hasDietaryRequirements: boolean;
624
+ }[];
625
+ }[];
626
+ resources: {
627
+ id: string;
628
+ slotId: string;
629
+ kind: string;
630
+ refType: string | null;
631
+ refId: string | null;
632
+ label: string | null;
633
+ capacity: number;
634
+ flags: Record<string, unknown>;
635
+ parentId: string | null;
636
+ sortOrder: number;
637
+ createdAt: string | Date;
638
+ updatedAt: string | Date;
639
+ }[];
640
+ sharingGroupLabels: Record<string, string>;
641
+ summary: {
642
+ bookingCount: number;
643
+ travelerCount: number;
644
+ leadTravelerCount: number;
645
+ bookingsByStatus: Record<string, number>;
646
+ };
647
+ };
648
+ }, readonly ["voyant", "availability", "slots", "allocation", string]>, "queryFn"> & {
649
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
650
+ data: {
651
+ slot: {
652
+ id: string;
653
+ productId: string | null;
654
+ startsAt: string | null;
655
+ endsAt: string | null;
656
+ };
657
+ bookings: {
658
+ id: string;
659
+ bookingNumber: string;
660
+ status: string;
661
+ bookingSequence: number;
662
+ paymentStatus: "partial" | "paid" | "unpaid";
663
+ contactFirstName: string | null;
664
+ contactLastName: string | null;
665
+ contactEmail: string | null;
666
+ contactPhone: string | null;
667
+ sellCurrency: string | null;
668
+ pax: number | null;
669
+ sellAmountCents: number | null;
670
+ paidAmountCents: number | null;
671
+ travelers: {
672
+ id: string;
673
+ bookingId: string;
674
+ bookingNumber: string;
675
+ bookingStatus: string;
676
+ bookingSequence: number;
677
+ paymentStatus: "partial" | "paid" | "unpaid";
678
+ firstName: string;
679
+ lastName: string;
680
+ fullName: string;
681
+ email: string | null;
682
+ phone: string | null;
683
+ isLeadTraveler: boolean;
684
+ isPrimary: boolean;
685
+ sharingGroupId: string | null;
686
+ roomTypeId: string | null;
687
+ bedPreference: string | null;
688
+ allocations: Record<string, string>;
689
+ travelerCategory: string | null;
690
+ participantType: string;
691
+ hasAccessibilityNeeds: boolean;
692
+ hasDietaryRequirements: boolean;
693
+ }[];
694
+ }[];
695
+ resources: {
696
+ id: string;
697
+ slotId: string;
698
+ kind: string;
699
+ refType: string | null;
700
+ refId: string | null;
701
+ label: string | null;
702
+ capacity: number;
703
+ flags: Record<string, unknown>;
704
+ parentId: string | null;
705
+ sortOrder: number;
706
+ createdAt: string | Date;
707
+ updatedAt: string | Date;
708
+ }[];
709
+ sharingGroupLabels: Record<string, string>;
710
+ summary: {
711
+ bookingCount: number;
712
+ travelerCount: number;
713
+ leadTravelerCount: number;
714
+ bookingsByStatus: Record<string, number>;
715
+ };
716
+ };
717
+ }, readonly ["voyant", "availability", "slots", "allocation", string], never> | undefined;
718
+ } & {
719
+ queryKey: readonly ["voyant", "availability", "slots", "allocation", string] & {
720
+ [dataTagSymbol]: {
721
+ data: {
722
+ slot: {
723
+ id: string;
724
+ productId: string | null;
725
+ startsAt: string | null;
726
+ endsAt: string | null;
727
+ };
728
+ bookings: {
729
+ id: string;
730
+ bookingNumber: string;
731
+ status: string;
732
+ bookingSequence: number;
733
+ paymentStatus: "partial" | "paid" | "unpaid";
734
+ contactFirstName: string | null;
735
+ contactLastName: string | null;
736
+ contactEmail: string | null;
737
+ contactPhone: string | null;
738
+ sellCurrency: string | null;
739
+ pax: number | null;
740
+ sellAmountCents: number | null;
741
+ paidAmountCents: number | null;
742
+ travelers: {
743
+ id: string;
744
+ bookingId: string;
745
+ bookingNumber: string;
746
+ bookingStatus: string;
747
+ bookingSequence: number;
748
+ paymentStatus: "partial" | "paid" | "unpaid";
749
+ firstName: string;
750
+ lastName: string;
751
+ fullName: string;
752
+ email: string | null;
753
+ phone: string | null;
754
+ isLeadTraveler: boolean;
755
+ isPrimary: boolean;
756
+ sharingGroupId: string | null;
757
+ roomTypeId: string | null;
758
+ bedPreference: string | null;
759
+ allocations: Record<string, string>;
760
+ travelerCategory: string | null;
761
+ participantType: string;
762
+ hasAccessibilityNeeds: boolean;
763
+ hasDietaryRequirements: boolean;
764
+ }[];
765
+ }[];
766
+ resources: {
767
+ id: string;
768
+ slotId: string;
769
+ kind: string;
770
+ refType: string | null;
771
+ refId: string | null;
772
+ label: string | null;
773
+ capacity: number;
774
+ flags: Record<string, unknown>;
775
+ parentId: string | null;
776
+ sortOrder: number;
777
+ createdAt: string | Date;
778
+ updatedAt: string | Date;
779
+ }[];
780
+ sharingGroupLabels: Record<string, string>;
781
+ summary: {
782
+ bookingCount: number;
783
+ travelerCount: number;
784
+ leadTravelerCount: number;
785
+ bookingsByStatus: Record<string, number>;
786
+ };
787
+ };
788
+ };
789
+ [dataTagErrorSymbol]: Error;
790
+ };
791
+ };
792
+ export declare function loadAvailabilitySlotDetailPage(queryClient: QueryClient, client: VoyantAvailabilityContextValue, id: string): Promise<[{
793
+ data: {
794
+ id: string;
795
+ productId: string;
796
+ itineraryId: string | null;
797
+ optionId: string | null;
798
+ facilityId: string | null;
799
+ availabilityRuleId: string | null;
800
+ startTimeId: string | null;
801
+ dateLocal: string;
802
+ startsAt: string;
803
+ endsAt: string | null;
804
+ timezone: string;
805
+ status: "cancelled" | "open" | "closed" | "sold_out";
806
+ unlimited: boolean;
807
+ initialPax: number | null;
808
+ remainingPax: number | null;
809
+ nights: number | null;
810
+ days: number | null;
811
+ notes: string | null;
812
+ initialPickups: number | null;
813
+ remainingPickups: number | null;
814
+ remainingResources: number | null;
815
+ pastCutoff: boolean;
816
+ tooEarly: boolean;
817
+ createdAt: string;
818
+ updatedAt: string;
819
+ productName?: string | null | undefined;
820
+ endDateLocal?: string | null | undefined;
821
+ };
822
+ }, {
823
+ data: {
824
+ id: string;
825
+ slotId: string;
826
+ pickupPointId: string;
827
+ initialCapacity: number | null;
828
+ remainingCapacity: number | null;
829
+ }[];
830
+ total: number;
831
+ limit: number;
832
+ offset: number;
833
+ }, {
834
+ data: {
835
+ id: string;
836
+ productId: string;
837
+ slotId: string | null;
838
+ dateLocal: string;
839
+ reason: string | null;
840
+ createdBy: string | null;
841
+ productName?: string | null | undefined;
842
+ }[];
843
+ total: number;
844
+ limit: number;
845
+ offset: number;
846
+ }, {
847
+ data: {
848
+ id: string;
849
+ poolId: string | null;
850
+ resourceId: string | null;
851
+ bookingId: string | null;
852
+ status: "completed" | "cancelled" | "assigned" | "reserved" | "released";
853
+ assignedBy: string | null;
854
+ releasedAt: string | null;
855
+ notes: string | null;
856
+ }[];
857
+ total: number;
858
+ limit: number;
859
+ offset: number;
860
+ }, {
861
+ data: {
862
+ id: string;
863
+ name: string;
864
+ }[];
865
+ total: number;
866
+ limit: number;
867
+ offset: number;
868
+ }, {
869
+ data: {
870
+ slot: {
871
+ id: string;
872
+ productId: string | null;
873
+ startsAt: string | null;
874
+ endsAt: string | null;
875
+ };
876
+ bookings: {
877
+ id: string;
878
+ bookingNumber: string;
879
+ status: string;
880
+ bookingSequence: number;
881
+ paymentStatus: "partial" | "paid" | "unpaid";
882
+ contactFirstName: string | null;
883
+ contactLastName: string | null;
884
+ contactEmail: string | null;
885
+ contactPhone: string | null;
886
+ sellCurrency: string | null;
887
+ pax: number | null;
888
+ sellAmountCents: number | null;
889
+ paidAmountCents: number | null;
890
+ travelers: {
891
+ id: string;
892
+ bookingId: string;
893
+ bookingNumber: string;
894
+ bookingStatus: string;
895
+ bookingSequence: number;
896
+ paymentStatus: "partial" | "paid" | "unpaid";
897
+ firstName: string;
898
+ lastName: string;
899
+ fullName: string;
900
+ email: string | null;
901
+ phone: string | null;
902
+ isLeadTraveler: boolean;
903
+ isPrimary: boolean;
904
+ sharingGroupId: string | null;
905
+ roomTypeId: string | null;
906
+ bedPreference: string | null;
907
+ allocations: Record<string, string>;
908
+ travelerCategory: string | null;
909
+ participantType: string;
910
+ hasAccessibilityNeeds: boolean;
911
+ hasDietaryRequirements: boolean;
912
+ }[];
913
+ }[];
914
+ resources: {
915
+ id: string;
916
+ slotId: string;
917
+ kind: string;
918
+ refType: string | null;
919
+ refId: string | null;
920
+ label: string | null;
921
+ capacity: number;
922
+ flags: Record<string, unknown>;
923
+ parentId: string | null;
924
+ sortOrder: number;
925
+ createdAt: string | Date;
926
+ updatedAt: string | Date;
927
+ }[];
928
+ sharingGroupLabels: Record<string, string>;
929
+ summary: {
930
+ bookingCount: number;
931
+ travelerCount: number;
932
+ leadTravelerCount: number;
933
+ bookingsByStatus: Record<string, number>;
934
+ };
935
+ };
936
+ }, {
937
+ data: {
938
+ id: string;
939
+ name: string;
940
+ sellCurrency: string | null;
941
+ productType: {
942
+ id: string;
943
+ name: string;
944
+ code: string | null;
945
+ } | null;
946
+ };
947
+ }, {
948
+ data: {
949
+ id: string;
950
+ productId: string;
951
+ name: string;
952
+ description: string | null;
953
+ locationText: string | null;
954
+ active: boolean;
955
+ productName?: string | null | undefined;
956
+ }[];
957
+ total: number;
958
+ limit: number;
959
+ offset: number;
960
+ }]>;
961
+ export declare function AvailabilitySlotDetailPage({ id, className, onBack: _onBack, onDeleted, onOpenProduct, onOpenStartTime, onCreateBooking, onEdit, breadcrumb, headerActions, renderAllocation, renderExtras, extrasTabLabel, }: AvailabilitySlotDetailPageProps): import("react/jsx-runtime").JSX.Element;
962
+ interface CurrencyTotals {
963
+ currency: string;
964
+ sellCents: number;
965
+ paidCents: number;
966
+ outstandingCents: number;
967
+ }
968
+ export interface SlotFinancialRollup {
969
+ primaryCurrency: string | null;
970
+ entries: CurrencyTotals[];
971
+ }
972
+ export declare function aggregateSlotFinancials(bookings: ReadonlyArray<AllocationManifestBooking>, productCurrency: string | null): SlotFinancialRollup;
973
+ export {};
974
+ //# sourceMappingURL=availability-slot-detail-page.d.ts.map