@voyantjs/storefront-sdk 0.31.3

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,1263 @@
1
+ import { type StorefrontRequestOptions, type VoyantStorefrontClientOptions } from "./client.js";
2
+ import { type BootstrapCheckoutCollectionInput, type InitiateCheckoutCollectionInput, type PreviewCheckoutCollectionInput, type PublicBookingOverviewLookupQuery, type PublicBookingSessionMutationInput, type PublicBookingSessionRepriceInput, type PublicCreateBookingSessionInput, type PublicUpdateBookingSessionInput, type PublicUpsertBookingSessionStateInput, type StorefrontDepartureListQuery, type StorefrontDeparturePricePreviewInput, type StorefrontProductAvailabilitySummaryQuery, type StorefrontProductExtensionsQuery, type StorefrontPromotionalOfferListQuery } from "./schemas.js";
3
+ type ResolvedClientOptions = Required<Pick<VoyantStorefrontClientOptions, "baseUrl" | "fetcher">> & Pick<VoyantStorefrontClientOptions, "headers">;
4
+ export declare function getStorefrontSettings(client: ResolvedClientOptions): Promise<{
5
+ branding: {
6
+ logoUrl: string | null;
7
+ supportedLanguages: string[];
8
+ };
9
+ support: {
10
+ email: string | null;
11
+ phone: string | null;
12
+ };
13
+ legal: {
14
+ termsUrl: string | null;
15
+ privacyUrl: string | null;
16
+ defaultContractTemplateId: string | null;
17
+ };
18
+ forms: {
19
+ billing: {
20
+ fields: {
21
+ key: string;
22
+ label: string;
23
+ type: "email" | "date" | "text" | "tel" | "textarea" | "select" | "checkbox" | "country";
24
+ required: boolean;
25
+ placeholder: string | null;
26
+ description: string | null;
27
+ autocomplete: string | null;
28
+ options: {
29
+ value: string;
30
+ label: string;
31
+ }[];
32
+ }[];
33
+ };
34
+ travelers: {
35
+ fields: {
36
+ key: string;
37
+ label: string;
38
+ type: "email" | "date" | "text" | "tel" | "textarea" | "select" | "checkbox" | "country";
39
+ required: boolean;
40
+ placeholder: string | null;
41
+ description: string | null;
42
+ autocomplete: string | null;
43
+ options: {
44
+ value: string;
45
+ label: string;
46
+ }[];
47
+ }[];
48
+ };
49
+ };
50
+ payment: {
51
+ defaultMethod: "card" | "bank_transfer" | "invoice" | "voucher" | "cash" | null;
52
+ methods: {
53
+ code: "card" | "bank_transfer" | "invoice" | "voucher" | "cash";
54
+ label: string;
55
+ description: string | null;
56
+ enabled: boolean;
57
+ }[];
58
+ };
59
+ }>;
60
+ export declare function getStorefrontDeparture(client: ResolvedClientOptions, departureId: string): Promise<{
61
+ id: string;
62
+ productId: string;
63
+ itineraryId: string;
64
+ optionId: string | null;
65
+ dateLocal: string | null;
66
+ startAt: string | null;
67
+ endAt: string | null;
68
+ timezone: string;
69
+ startTime: {
70
+ id: string;
71
+ label: string | null;
72
+ startTimeLocal: string;
73
+ durationMinutes: number | null;
74
+ } | null;
75
+ meetingPoint: string | null;
76
+ capacity: number | null;
77
+ remaining: number | null;
78
+ departureStatus: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
79
+ nights: number | null;
80
+ days: number | null;
81
+ ratePlans: {
82
+ id: string;
83
+ active: boolean;
84
+ name: string;
85
+ pricingModel: string;
86
+ basePrices: {
87
+ amount: number;
88
+ currencyCode: string;
89
+ }[];
90
+ roomPrices: {
91
+ amount: number;
92
+ currencyCode: string;
93
+ roomType: {
94
+ id: string;
95
+ name: string;
96
+ occupancy: {
97
+ adultsMin: number;
98
+ adultsMax: number;
99
+ childrenMax: number;
100
+ };
101
+ };
102
+ }[];
103
+ }[];
104
+ }>;
105
+ export declare function listStorefrontProductDepartures(client: ResolvedClientOptions, productId: string, query?: StorefrontDepartureListQuery): Promise<{
106
+ data: {
107
+ id: string;
108
+ productId: string;
109
+ itineraryId: string;
110
+ optionId: string | null;
111
+ dateLocal: string | null;
112
+ startAt: string | null;
113
+ endAt: string | null;
114
+ timezone: string;
115
+ startTime: {
116
+ id: string;
117
+ label: string | null;
118
+ startTimeLocal: string;
119
+ durationMinutes: number | null;
120
+ } | null;
121
+ meetingPoint: string | null;
122
+ capacity: number | null;
123
+ remaining: number | null;
124
+ departureStatus: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
125
+ nights: number | null;
126
+ days: number | null;
127
+ ratePlans: {
128
+ id: string;
129
+ active: boolean;
130
+ name: string;
131
+ pricingModel: string;
132
+ basePrices: {
133
+ amount: number;
134
+ currencyCode: string;
135
+ }[];
136
+ roomPrices: {
137
+ amount: number;
138
+ currencyCode: string;
139
+ roomType: {
140
+ id: string;
141
+ name: string;
142
+ occupancy: {
143
+ adultsMin: number;
144
+ adultsMax: number;
145
+ childrenMax: number;
146
+ };
147
+ };
148
+ }[];
149
+ }[];
150
+ }[];
151
+ total: number;
152
+ limit: number;
153
+ offset: number;
154
+ }>;
155
+ export declare function getStorefrontProductAvailability(client: ResolvedClientOptions, productId: string, query?: StorefrontProductAvailabilitySummaryQuery): Promise<{
156
+ productId: string;
157
+ availabilityState: "cancelled" | "closed" | "sold_out" | "on_request" | "available" | "past_cutoff" | "too_early" | "unavailable";
158
+ counts: {
159
+ total: number;
160
+ open: number;
161
+ closed: number;
162
+ soldOut: number;
163
+ cancelled: number;
164
+ onRequest: number;
165
+ pastCutoff: number;
166
+ tooEarly: number;
167
+ available: number;
168
+ };
169
+ departures: {
170
+ id: string;
171
+ productId: string;
172
+ optionId: string | null;
173
+ dateLocal: string | null;
174
+ startAt: string | null;
175
+ endAt: string | null;
176
+ timezone: string;
177
+ status: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
178
+ availabilityState: "cancelled" | "closed" | "sold_out" | "on_request" | "available" | "past_cutoff" | "too_early" | "unavailable";
179
+ capacity: number | null;
180
+ remaining: number | null;
181
+ pastCutoff: boolean;
182
+ tooEarly: boolean;
183
+ }[];
184
+ total: number;
185
+ limit: number;
186
+ offset: number;
187
+ }>;
188
+ export declare function previewStorefrontDeparturePrice(client: ResolvedClientOptions, departureId: string, input: StorefrontDeparturePricePreviewInput, options?: StorefrontRequestOptions): Promise<{
189
+ departureId: string;
190
+ productId: string;
191
+ optionId: string | null;
192
+ currencyCode: string;
193
+ basePrice: number;
194
+ taxAmount: number;
195
+ total: number;
196
+ notes: string | null;
197
+ lineItems: {
198
+ name: string;
199
+ total: number;
200
+ quantity: number;
201
+ unitPrice: number;
202
+ }[];
203
+ }>;
204
+ export declare function listStorefrontProductExtensions(client: ResolvedClientOptions, productId: string, query?: StorefrontProductExtensionsQuery): Promise<{
205
+ extensions: {
206
+ id: string;
207
+ name: string;
208
+ label: string;
209
+ required: boolean;
210
+ selectable: boolean;
211
+ hasOptions: boolean;
212
+ refProductId: string | null;
213
+ thumb: string | null;
214
+ pricePerPerson: number | null;
215
+ currencyCode: string;
216
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
217
+ defaultQuantity: number | null;
218
+ minQuantity: number | null;
219
+ maxQuantity: number | null;
220
+ }[];
221
+ items: {
222
+ id: string;
223
+ name: string;
224
+ label: string;
225
+ required: boolean;
226
+ selectable: boolean;
227
+ hasOptions: boolean;
228
+ refProductId: string | null;
229
+ thumb: string | null;
230
+ pricePerPerson: number | null;
231
+ currencyCode: string;
232
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
233
+ defaultQuantity: number | null;
234
+ minQuantity: number | null;
235
+ maxQuantity: number | null;
236
+ }[];
237
+ details: Record<string, {
238
+ description: string | null;
239
+ media: {
240
+ url: string;
241
+ alt: string | null;
242
+ }[];
243
+ }>;
244
+ currencyCode: string;
245
+ }>;
246
+ export declare function getStorefrontDepartureItinerary(client: ResolvedClientOptions, productId: string, departureId: string): Promise<{
247
+ id: string;
248
+ itineraryId: string;
249
+ days: {
250
+ id: string;
251
+ title: string;
252
+ description: string | null;
253
+ thumbnail: {
254
+ url: string;
255
+ } | null;
256
+ segments: {
257
+ id: string;
258
+ title: string;
259
+ description: string | null;
260
+ }[];
261
+ }[];
262
+ }>;
263
+ export declare function listStorefrontProductOffers(client: ResolvedClientOptions, productId: string, query?: StorefrontPromotionalOfferListQuery): Promise<{
264
+ id: string;
265
+ name: string;
266
+ slug: string | null;
267
+ description: string | null;
268
+ discountType: "percentage" | "fixed_amount";
269
+ discountValue: string;
270
+ currency: string | null;
271
+ applicableProductIds: string[];
272
+ applicableDepartureIds: string[];
273
+ validFrom: string | null;
274
+ validTo: string | null;
275
+ minTravelers: number | null;
276
+ imageMobileUrl: string | null;
277
+ imageDesktopUrl: string | null;
278
+ stackable: boolean;
279
+ createdAt: string;
280
+ updatedAt: string;
281
+ }[]>;
282
+ export declare function getStorefrontOfferBySlug(client: ResolvedClientOptions, slug: string, query?: Pick<StorefrontPromotionalOfferListQuery, "locale">): Promise<{
283
+ id: string;
284
+ name: string;
285
+ slug: string | null;
286
+ description: string | null;
287
+ discountType: "percentage" | "fixed_amount";
288
+ discountValue: string;
289
+ currency: string | null;
290
+ applicableProductIds: string[];
291
+ applicableDepartureIds: string[];
292
+ validFrom: string | null;
293
+ validTo: string | null;
294
+ minTravelers: number | null;
295
+ imageMobileUrl: string | null;
296
+ imageDesktopUrl: string | null;
297
+ stackable: boolean;
298
+ createdAt: string;
299
+ updatedAt: string;
300
+ }>;
301
+ export declare function createPublicBookingSession(client: ResolvedClientOptions, input: PublicCreateBookingSessionInput, options?: StorefrontRequestOptions): Promise<{
302
+ sessionId: string;
303
+ bookingNumber: string;
304
+ status: "draft" | "confirmed" | "completed" | "expired" | "cancelled" | "on_hold" | "awaiting_payment" | "in_progress";
305
+ externalBookingRef: string | null;
306
+ communicationLanguage: string | null;
307
+ sellCurrency: string;
308
+ sellAmountCents: number | null;
309
+ startDate: string | null;
310
+ endDate: string | null;
311
+ pax: number | null;
312
+ holdExpiresAt: string | null;
313
+ confirmedAt: string | null;
314
+ expiredAt: string | null;
315
+ cancelledAt: string | null;
316
+ completedAt: string | null;
317
+ travelers: {
318
+ id: string;
319
+ participantType: "traveler" | "occupant" | "other";
320
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
321
+ firstName: string;
322
+ lastName: string;
323
+ email: string | null;
324
+ phone: string | null;
325
+ preferredLanguage: string | null;
326
+ specialRequests: string | null;
327
+ isPrimary: boolean;
328
+ notes: string | null;
329
+ }[];
330
+ items: {
331
+ id: string;
332
+ title: string;
333
+ description: string | null;
334
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
335
+ status: "draft" | "confirmed" | "expired" | "cancelled" | "on_hold" | "fulfilled";
336
+ serviceDate: string | null;
337
+ startsAt: string | null;
338
+ endsAt: string | null;
339
+ quantity: number;
340
+ sellCurrency: string;
341
+ unitSellAmountCents: number | null;
342
+ totalSellAmountCents: number | null;
343
+ costCurrency: string | null;
344
+ unitCostAmountCents: number | null;
345
+ totalCostAmountCents: number | null;
346
+ notes: string | null;
347
+ productId: string | null;
348
+ optionId: string | null;
349
+ optionUnitId: string | null;
350
+ pricingCategoryId: string | null;
351
+ travelerLinks: {
352
+ id: string;
353
+ travelerId: string;
354
+ role: "traveler" | "occupant" | "other" | "beneficiary";
355
+ isPrimary: boolean;
356
+ }[];
357
+ }[];
358
+ allocations: {
359
+ id: string;
360
+ bookingItemId: string | null;
361
+ productId: string | null;
362
+ optionId: string | null;
363
+ optionUnitId: string | null;
364
+ pricingCategoryId: string | null;
365
+ availabilitySlotId: string | null;
366
+ quantity: number;
367
+ allocationType: "unit" | "pickup" | "resource";
368
+ status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
369
+ holdExpiresAt: string | null;
370
+ confirmedAt: string | null;
371
+ releasedAt: string | null;
372
+ }[];
373
+ checklist: {
374
+ hasTravelers: boolean;
375
+ hasPrimaryTraveler: boolean;
376
+ hasItems: boolean;
377
+ hasAllocations: boolean;
378
+ readyForConfirmation: boolean;
379
+ };
380
+ state: {
381
+ sessionId: string;
382
+ stateKey: "wizard";
383
+ currentStep: string | null;
384
+ completedSteps: string[];
385
+ payload: Record<string, unknown>;
386
+ version: number;
387
+ createdAt: string;
388
+ updatedAt: string;
389
+ } | null;
390
+ }>;
391
+ export declare function getPublicBookingSession(client: ResolvedClientOptions, sessionId: string): Promise<{
392
+ sessionId: string;
393
+ bookingNumber: string;
394
+ status: "draft" | "confirmed" | "completed" | "expired" | "cancelled" | "on_hold" | "awaiting_payment" | "in_progress";
395
+ externalBookingRef: string | null;
396
+ communicationLanguage: string | null;
397
+ sellCurrency: string;
398
+ sellAmountCents: number | null;
399
+ startDate: string | null;
400
+ endDate: string | null;
401
+ pax: number | null;
402
+ holdExpiresAt: string | null;
403
+ confirmedAt: string | null;
404
+ expiredAt: string | null;
405
+ cancelledAt: string | null;
406
+ completedAt: string | null;
407
+ travelers: {
408
+ id: string;
409
+ participantType: "traveler" | "occupant" | "other";
410
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
411
+ firstName: string;
412
+ lastName: string;
413
+ email: string | null;
414
+ phone: string | null;
415
+ preferredLanguage: string | null;
416
+ specialRequests: string | null;
417
+ isPrimary: boolean;
418
+ notes: string | null;
419
+ }[];
420
+ items: {
421
+ id: string;
422
+ title: string;
423
+ description: string | null;
424
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
425
+ status: "draft" | "confirmed" | "expired" | "cancelled" | "on_hold" | "fulfilled";
426
+ serviceDate: string | null;
427
+ startsAt: string | null;
428
+ endsAt: string | null;
429
+ quantity: number;
430
+ sellCurrency: string;
431
+ unitSellAmountCents: number | null;
432
+ totalSellAmountCents: number | null;
433
+ costCurrency: string | null;
434
+ unitCostAmountCents: number | null;
435
+ totalCostAmountCents: number | null;
436
+ notes: string | null;
437
+ productId: string | null;
438
+ optionId: string | null;
439
+ optionUnitId: string | null;
440
+ pricingCategoryId: string | null;
441
+ travelerLinks: {
442
+ id: string;
443
+ travelerId: string;
444
+ role: "traveler" | "occupant" | "other" | "beneficiary";
445
+ isPrimary: boolean;
446
+ }[];
447
+ }[];
448
+ allocations: {
449
+ id: string;
450
+ bookingItemId: string | null;
451
+ productId: string | null;
452
+ optionId: string | null;
453
+ optionUnitId: string | null;
454
+ pricingCategoryId: string | null;
455
+ availabilitySlotId: string | null;
456
+ quantity: number;
457
+ allocationType: "unit" | "pickup" | "resource";
458
+ status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
459
+ holdExpiresAt: string | null;
460
+ confirmedAt: string | null;
461
+ releasedAt: string | null;
462
+ }[];
463
+ checklist: {
464
+ hasTravelers: boolean;
465
+ hasPrimaryTraveler: boolean;
466
+ hasItems: boolean;
467
+ hasAllocations: boolean;
468
+ readyForConfirmation: boolean;
469
+ };
470
+ state: {
471
+ sessionId: string;
472
+ stateKey: "wizard";
473
+ currentStep: string | null;
474
+ completedSteps: string[];
475
+ payload: Record<string, unknown>;
476
+ version: number;
477
+ createdAt: string;
478
+ updatedAt: string;
479
+ } | null;
480
+ }>;
481
+ export declare function updatePublicBookingSession(client: ResolvedClientOptions, sessionId: string, input: PublicUpdateBookingSessionInput, options?: StorefrontRequestOptions): Promise<{
482
+ sessionId: string;
483
+ bookingNumber: string;
484
+ status: "draft" | "confirmed" | "completed" | "expired" | "cancelled" | "on_hold" | "awaiting_payment" | "in_progress";
485
+ externalBookingRef: string | null;
486
+ communicationLanguage: string | null;
487
+ sellCurrency: string;
488
+ sellAmountCents: number | null;
489
+ startDate: string | null;
490
+ endDate: string | null;
491
+ pax: number | null;
492
+ holdExpiresAt: string | null;
493
+ confirmedAt: string | null;
494
+ expiredAt: string | null;
495
+ cancelledAt: string | null;
496
+ completedAt: string | null;
497
+ travelers: {
498
+ id: string;
499
+ participantType: "traveler" | "occupant" | "other";
500
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
501
+ firstName: string;
502
+ lastName: string;
503
+ email: string | null;
504
+ phone: string | null;
505
+ preferredLanguage: string | null;
506
+ specialRequests: string | null;
507
+ isPrimary: boolean;
508
+ notes: string | null;
509
+ }[];
510
+ items: {
511
+ id: string;
512
+ title: string;
513
+ description: string | null;
514
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
515
+ status: "draft" | "confirmed" | "expired" | "cancelled" | "on_hold" | "fulfilled";
516
+ serviceDate: string | null;
517
+ startsAt: string | null;
518
+ endsAt: string | null;
519
+ quantity: number;
520
+ sellCurrency: string;
521
+ unitSellAmountCents: number | null;
522
+ totalSellAmountCents: number | null;
523
+ costCurrency: string | null;
524
+ unitCostAmountCents: number | null;
525
+ totalCostAmountCents: number | null;
526
+ notes: string | null;
527
+ productId: string | null;
528
+ optionId: string | null;
529
+ optionUnitId: string | null;
530
+ pricingCategoryId: string | null;
531
+ travelerLinks: {
532
+ id: string;
533
+ travelerId: string;
534
+ role: "traveler" | "occupant" | "other" | "beneficiary";
535
+ isPrimary: boolean;
536
+ }[];
537
+ }[];
538
+ allocations: {
539
+ id: string;
540
+ bookingItemId: string | null;
541
+ productId: string | null;
542
+ optionId: string | null;
543
+ optionUnitId: string | null;
544
+ pricingCategoryId: string | null;
545
+ availabilitySlotId: string | null;
546
+ quantity: number;
547
+ allocationType: "unit" | "pickup" | "resource";
548
+ status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
549
+ holdExpiresAt: string | null;
550
+ confirmedAt: string | null;
551
+ releasedAt: string | null;
552
+ }[];
553
+ checklist: {
554
+ hasTravelers: boolean;
555
+ hasPrimaryTraveler: boolean;
556
+ hasItems: boolean;
557
+ hasAllocations: boolean;
558
+ readyForConfirmation: boolean;
559
+ };
560
+ state: {
561
+ sessionId: string;
562
+ stateKey: "wizard";
563
+ currentStep: string | null;
564
+ completedSteps: string[];
565
+ payload: Record<string, unknown>;
566
+ version: number;
567
+ createdAt: string;
568
+ updatedAt: string;
569
+ } | null;
570
+ }>;
571
+ export declare function getPublicBookingSessionState(client: ResolvedClientOptions, sessionId: string): Promise<{
572
+ sessionId: string;
573
+ stateKey: "wizard";
574
+ currentStep: string | null;
575
+ completedSteps: string[];
576
+ payload: Record<string, unknown>;
577
+ version: number;
578
+ createdAt: string;
579
+ updatedAt: string;
580
+ }>;
581
+ export declare function updatePublicBookingSessionState(client: ResolvedClientOptions, sessionId: string, input: PublicUpsertBookingSessionStateInput, options?: StorefrontRequestOptions): Promise<{
582
+ sessionId: string;
583
+ stateKey: "wizard";
584
+ currentStep: string | null;
585
+ completedSteps: string[];
586
+ payload: Record<string, unknown>;
587
+ version: number;
588
+ createdAt: string;
589
+ updatedAt: string;
590
+ }>;
591
+ export declare function repricePublicBookingSession(client: ResolvedClientOptions, sessionId: string, input: PublicBookingSessionRepriceInput, options?: StorefrontRequestOptions): Promise<{
592
+ pricing: {
593
+ sessionId: string;
594
+ catalogId: string | null;
595
+ currencyCode: string;
596
+ totalSellAmountCents: number;
597
+ items: {
598
+ itemId: string;
599
+ title: string;
600
+ productId: string | null;
601
+ optionId: string | null;
602
+ optionUnitId: string | null;
603
+ optionUnitName: string | null;
604
+ optionUnitType: string | null;
605
+ pricingCategoryId: string | null;
606
+ quantity: number;
607
+ pricingMode: string;
608
+ unitSellAmountCents: number | null;
609
+ totalSellAmountCents: number | null;
610
+ warnings: string[];
611
+ }[];
612
+ warnings: string[];
613
+ appliedToSession: boolean;
614
+ };
615
+ session: {
616
+ sessionId: string;
617
+ bookingNumber: string;
618
+ status: "draft" | "confirmed" | "completed" | "expired" | "cancelled" | "on_hold" | "awaiting_payment" | "in_progress";
619
+ externalBookingRef: string | null;
620
+ communicationLanguage: string | null;
621
+ sellCurrency: string;
622
+ sellAmountCents: number | null;
623
+ startDate: string | null;
624
+ endDate: string | null;
625
+ pax: number | null;
626
+ holdExpiresAt: string | null;
627
+ confirmedAt: string | null;
628
+ expiredAt: string | null;
629
+ cancelledAt: string | null;
630
+ completedAt: string | null;
631
+ travelers: {
632
+ id: string;
633
+ participantType: "traveler" | "occupant" | "other";
634
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
635
+ firstName: string;
636
+ lastName: string;
637
+ email: string | null;
638
+ phone: string | null;
639
+ preferredLanguage: string | null;
640
+ specialRequests: string | null;
641
+ isPrimary: boolean;
642
+ notes: string | null;
643
+ }[];
644
+ items: {
645
+ id: string;
646
+ title: string;
647
+ description: string | null;
648
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
649
+ status: "draft" | "confirmed" | "expired" | "cancelled" | "on_hold" | "fulfilled";
650
+ serviceDate: string | null;
651
+ startsAt: string | null;
652
+ endsAt: string | null;
653
+ quantity: number;
654
+ sellCurrency: string;
655
+ unitSellAmountCents: number | null;
656
+ totalSellAmountCents: number | null;
657
+ costCurrency: string | null;
658
+ unitCostAmountCents: number | null;
659
+ totalCostAmountCents: number | null;
660
+ notes: string | null;
661
+ productId: string | null;
662
+ optionId: string | null;
663
+ optionUnitId: string | null;
664
+ pricingCategoryId: string | null;
665
+ travelerLinks: {
666
+ id: string;
667
+ travelerId: string;
668
+ role: "traveler" | "occupant" | "other" | "beneficiary";
669
+ isPrimary: boolean;
670
+ }[];
671
+ }[];
672
+ allocations: {
673
+ id: string;
674
+ bookingItemId: string | null;
675
+ productId: string | null;
676
+ optionId: string | null;
677
+ optionUnitId: string | null;
678
+ pricingCategoryId: string | null;
679
+ availabilitySlotId: string | null;
680
+ quantity: number;
681
+ allocationType: "unit" | "pickup" | "resource";
682
+ status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
683
+ holdExpiresAt: string | null;
684
+ confirmedAt: string | null;
685
+ releasedAt: string | null;
686
+ }[];
687
+ checklist: {
688
+ hasTravelers: boolean;
689
+ hasPrimaryTraveler: boolean;
690
+ hasItems: boolean;
691
+ hasAllocations: boolean;
692
+ readyForConfirmation: boolean;
693
+ };
694
+ state: {
695
+ sessionId: string;
696
+ stateKey: "wizard";
697
+ currentStep: string | null;
698
+ completedSteps: string[];
699
+ payload: Record<string, unknown>;
700
+ version: number;
701
+ createdAt: string;
702
+ updatedAt: string;
703
+ } | null;
704
+ } | null;
705
+ }>;
706
+ export declare function confirmPublicBookingSession(client: ResolvedClientOptions, sessionId: string, input?: PublicBookingSessionMutationInput, options?: StorefrontRequestOptions): Promise<{
707
+ sessionId: string;
708
+ bookingNumber: string;
709
+ status: "draft" | "confirmed" | "completed" | "expired" | "cancelled" | "on_hold" | "awaiting_payment" | "in_progress";
710
+ externalBookingRef: string | null;
711
+ communicationLanguage: string | null;
712
+ sellCurrency: string;
713
+ sellAmountCents: number | null;
714
+ startDate: string | null;
715
+ endDate: string | null;
716
+ pax: number | null;
717
+ holdExpiresAt: string | null;
718
+ confirmedAt: string | null;
719
+ expiredAt: string | null;
720
+ cancelledAt: string | null;
721
+ completedAt: string | null;
722
+ travelers: {
723
+ id: string;
724
+ participantType: "traveler" | "occupant" | "other";
725
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
726
+ firstName: string;
727
+ lastName: string;
728
+ email: string | null;
729
+ phone: string | null;
730
+ preferredLanguage: string | null;
731
+ specialRequests: string | null;
732
+ isPrimary: boolean;
733
+ notes: string | null;
734
+ }[];
735
+ items: {
736
+ id: string;
737
+ title: string;
738
+ description: string | null;
739
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
740
+ status: "draft" | "confirmed" | "expired" | "cancelled" | "on_hold" | "fulfilled";
741
+ serviceDate: string | null;
742
+ startsAt: string | null;
743
+ endsAt: string | null;
744
+ quantity: number;
745
+ sellCurrency: string;
746
+ unitSellAmountCents: number | null;
747
+ totalSellAmountCents: number | null;
748
+ costCurrency: string | null;
749
+ unitCostAmountCents: number | null;
750
+ totalCostAmountCents: number | null;
751
+ notes: string | null;
752
+ productId: string | null;
753
+ optionId: string | null;
754
+ optionUnitId: string | null;
755
+ pricingCategoryId: string | null;
756
+ travelerLinks: {
757
+ id: string;
758
+ travelerId: string;
759
+ role: "traveler" | "occupant" | "other" | "beneficiary";
760
+ isPrimary: boolean;
761
+ }[];
762
+ }[];
763
+ allocations: {
764
+ id: string;
765
+ bookingItemId: string | null;
766
+ productId: string | null;
767
+ optionId: string | null;
768
+ optionUnitId: string | null;
769
+ pricingCategoryId: string | null;
770
+ availabilitySlotId: string | null;
771
+ quantity: number;
772
+ allocationType: "unit" | "pickup" | "resource";
773
+ status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
774
+ holdExpiresAt: string | null;
775
+ confirmedAt: string | null;
776
+ releasedAt: string | null;
777
+ }[];
778
+ checklist: {
779
+ hasTravelers: boolean;
780
+ hasPrimaryTraveler: boolean;
781
+ hasItems: boolean;
782
+ hasAllocations: boolean;
783
+ readyForConfirmation: boolean;
784
+ };
785
+ state: {
786
+ sessionId: string;
787
+ stateKey: "wizard";
788
+ currentStep: string | null;
789
+ completedSteps: string[];
790
+ payload: Record<string, unknown>;
791
+ version: number;
792
+ createdAt: string;
793
+ updatedAt: string;
794
+ } | null;
795
+ }>;
796
+ export declare function expirePublicBookingSession(client: ResolvedClientOptions, sessionId: string, input?: PublicBookingSessionMutationInput, options?: StorefrontRequestOptions): Promise<{
797
+ sessionId: string;
798
+ bookingNumber: string;
799
+ status: "draft" | "confirmed" | "completed" | "expired" | "cancelled" | "on_hold" | "awaiting_payment" | "in_progress";
800
+ externalBookingRef: string | null;
801
+ communicationLanguage: string | null;
802
+ sellCurrency: string;
803
+ sellAmountCents: number | null;
804
+ startDate: string | null;
805
+ endDate: string | null;
806
+ pax: number | null;
807
+ holdExpiresAt: string | null;
808
+ confirmedAt: string | null;
809
+ expiredAt: string | null;
810
+ cancelledAt: string | null;
811
+ completedAt: string | null;
812
+ travelers: {
813
+ id: string;
814
+ participantType: "traveler" | "occupant" | "other";
815
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
816
+ firstName: string;
817
+ lastName: string;
818
+ email: string | null;
819
+ phone: string | null;
820
+ preferredLanguage: string | null;
821
+ specialRequests: string | null;
822
+ isPrimary: boolean;
823
+ notes: string | null;
824
+ }[];
825
+ items: {
826
+ id: string;
827
+ title: string;
828
+ description: string | null;
829
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
830
+ status: "draft" | "confirmed" | "expired" | "cancelled" | "on_hold" | "fulfilled";
831
+ serviceDate: string | null;
832
+ startsAt: string | null;
833
+ endsAt: string | null;
834
+ quantity: number;
835
+ sellCurrency: string;
836
+ unitSellAmountCents: number | null;
837
+ totalSellAmountCents: number | null;
838
+ costCurrency: string | null;
839
+ unitCostAmountCents: number | null;
840
+ totalCostAmountCents: number | null;
841
+ notes: string | null;
842
+ productId: string | null;
843
+ optionId: string | null;
844
+ optionUnitId: string | null;
845
+ pricingCategoryId: string | null;
846
+ travelerLinks: {
847
+ id: string;
848
+ travelerId: string;
849
+ role: "traveler" | "occupant" | "other" | "beneficiary";
850
+ isPrimary: boolean;
851
+ }[];
852
+ }[];
853
+ allocations: {
854
+ id: string;
855
+ bookingItemId: string | null;
856
+ productId: string | null;
857
+ optionId: string | null;
858
+ optionUnitId: string | null;
859
+ pricingCategoryId: string | null;
860
+ availabilitySlotId: string | null;
861
+ quantity: number;
862
+ allocationType: "unit" | "pickup" | "resource";
863
+ status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
864
+ holdExpiresAt: string | null;
865
+ confirmedAt: string | null;
866
+ releasedAt: string | null;
867
+ }[];
868
+ checklist: {
869
+ hasTravelers: boolean;
870
+ hasPrimaryTraveler: boolean;
871
+ hasItems: boolean;
872
+ hasAllocations: boolean;
873
+ readyForConfirmation: boolean;
874
+ };
875
+ state: {
876
+ sessionId: string;
877
+ stateKey: "wizard";
878
+ currentStep: string | null;
879
+ completedSteps: string[];
880
+ payload: Record<string, unknown>;
881
+ version: number;
882
+ createdAt: string;
883
+ updatedAt: string;
884
+ } | null;
885
+ }>;
886
+ export declare function getPublicBookingOverview(client: ResolvedClientOptions, query: PublicBookingOverviewLookupQuery): Promise<{
887
+ bookingId: string;
888
+ bookingNumber: string;
889
+ status: "draft" | "confirmed" | "completed" | "expired" | "cancelled" | "on_hold" | "awaiting_payment" | "in_progress";
890
+ sellCurrency: string;
891
+ sellAmountCents: number | null;
892
+ startDate: string | null;
893
+ endDate: string | null;
894
+ pax: number | null;
895
+ confirmedAt: string | null;
896
+ cancelledAt: string | null;
897
+ completedAt: string | null;
898
+ travelers: {
899
+ id: string;
900
+ participantType: "traveler" | "occupant" | "other";
901
+ firstName: string;
902
+ lastName: string;
903
+ isPrimary: boolean;
904
+ }[];
905
+ items: {
906
+ id: string;
907
+ title: string;
908
+ description: string | null;
909
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
910
+ status: "draft" | "confirmed" | "expired" | "cancelled" | "on_hold" | "fulfilled";
911
+ serviceDate: string | null;
912
+ startsAt: string | null;
913
+ endsAt: string | null;
914
+ quantity: number;
915
+ sellCurrency: string;
916
+ unitSellAmountCents: number | null;
917
+ totalSellAmountCents: number | null;
918
+ costCurrency: string | null;
919
+ unitCostAmountCents: number | null;
920
+ totalCostAmountCents: number | null;
921
+ notes: string | null;
922
+ productId: string | null;
923
+ optionId: string | null;
924
+ optionUnitId: string | null;
925
+ pricingCategoryId: string | null;
926
+ travelerLinks: {
927
+ id: string;
928
+ travelerId: string;
929
+ role: "traveler" | "occupant" | "other" | "beneficiary";
930
+ isPrimary: boolean;
931
+ }[];
932
+ }[];
933
+ documents: {
934
+ id: string;
935
+ travelerId: string | null;
936
+ type: "other" | "visa" | "insurance" | "health" | "passport_copy";
937
+ fileName: string;
938
+ fileUrl: string;
939
+ }[];
940
+ fulfillments: {
941
+ id: string;
942
+ bookingItemId: string | null;
943
+ travelerId: string | null;
944
+ fulfillmentType: "other" | "voucher" | "ticket" | "pdf" | "qr_code" | "barcode" | "mobile";
945
+ deliveryChannel: "other" | "email" | "wallet" | "download" | "api";
946
+ status: "pending" | "issued" | "reissued" | "revoked" | "failed";
947
+ artifactUrl: string | null;
948
+ }[];
949
+ }>;
950
+ export declare function previewCheckoutCollection(client: ResolvedClientOptions, bookingId: string, input: PreviewCheckoutCollectionInput, options?: StorefrontRequestOptions): Promise<{
951
+ bookingId: string;
952
+ method: "card" | "bank_transfer";
953
+ stage: "manual" | "initial" | "reminder";
954
+ paymentSessionTarget: "schedule" | "invoice" | null;
955
+ documentType: "invoice" | "proforma" | null;
956
+ willCreateDefaultPaymentPlan: boolean;
957
+ selectedSchedule: {
958
+ id: string;
959
+ bookingId: string;
960
+ bookingItemId: string | null;
961
+ scheduleType: string;
962
+ status: string;
963
+ dueDate: string;
964
+ currency: string;
965
+ amountCents: number;
966
+ notes: string | null;
967
+ } | null;
968
+ selectedInvoice: {
969
+ id: string;
970
+ invoiceNumber: string;
971
+ invoiceType: string;
972
+ bookingId: string;
973
+ personId: string | null;
974
+ organizationId: string | null;
975
+ status: string;
976
+ currency: string;
977
+ totalCents: number;
978
+ paidCents: number;
979
+ balanceDueCents: number;
980
+ issueDate: string;
981
+ dueDate: string;
982
+ notes: string | null;
983
+ createdAt: string;
984
+ updatedAt: string;
985
+ } | null;
986
+ amountCents: number;
987
+ currency: string;
988
+ recommendedAction: "none" | "create_bank_transfer_document" | "create_payment_session" | "create_invoice_then_payment_session";
989
+ }>;
990
+ export declare function initiateCheckoutCollection(client: ResolvedClientOptions, bookingId: string, input: InitiateCheckoutCollectionInput, options?: StorefrontRequestOptions): Promise<{
991
+ plan: {
992
+ bookingId: string;
993
+ method: "card" | "bank_transfer";
994
+ stage: "manual" | "initial" | "reminder";
995
+ paymentSessionTarget: "schedule" | "invoice" | null;
996
+ documentType: "invoice" | "proforma" | null;
997
+ willCreateDefaultPaymentPlan: boolean;
998
+ selectedSchedule: {
999
+ id: string;
1000
+ bookingId: string;
1001
+ bookingItemId: string | null;
1002
+ scheduleType: string;
1003
+ status: string;
1004
+ dueDate: string;
1005
+ currency: string;
1006
+ amountCents: number;
1007
+ notes: string | null;
1008
+ } | null;
1009
+ selectedInvoice: {
1010
+ id: string;
1011
+ invoiceNumber: string;
1012
+ invoiceType: string;
1013
+ bookingId: string;
1014
+ personId: string | null;
1015
+ organizationId: string | null;
1016
+ status: string;
1017
+ currency: string;
1018
+ totalCents: number;
1019
+ paidCents: number;
1020
+ balanceDueCents: number;
1021
+ issueDate: string;
1022
+ dueDate: string;
1023
+ notes: string | null;
1024
+ createdAt: string;
1025
+ updatedAt: string;
1026
+ } | null;
1027
+ amountCents: number;
1028
+ currency: string;
1029
+ recommendedAction: "none" | "create_bank_transfer_document" | "create_payment_session" | "create_invoice_then_payment_session";
1030
+ };
1031
+ invoice: {
1032
+ id: string;
1033
+ invoiceNumber: string;
1034
+ invoiceType: string;
1035
+ bookingId: string;
1036
+ personId: string | null;
1037
+ organizationId: string | null;
1038
+ status: string;
1039
+ currency: string;
1040
+ totalCents: number;
1041
+ paidCents: number;
1042
+ balanceDueCents: number;
1043
+ issueDate: string;
1044
+ dueDate: string;
1045
+ notes: string | null;
1046
+ createdAt: string;
1047
+ updatedAt: string;
1048
+ } | null;
1049
+ paymentSession: {
1050
+ id: string;
1051
+ targetType: "other" | "invoice" | "booking" | "order" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
1052
+ targetId: string | null;
1053
+ bookingId: string | null;
1054
+ invoiceId: string | null;
1055
+ bookingPaymentScheduleId: string | null;
1056
+ bookingGuaranteeId: string | null;
1057
+ status: "expired" | "cancelled" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "paid";
1058
+ provider: string | null;
1059
+ providerSessionId: string | null;
1060
+ providerPaymentId: string | null;
1061
+ externalReference: string | null;
1062
+ clientReference: string | null;
1063
+ currency: string;
1064
+ amountCents: number;
1065
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
1066
+ payerEmail: string | null;
1067
+ payerName: string | null;
1068
+ redirectUrl: string | null;
1069
+ returnUrl: string | null;
1070
+ cancelUrl: string | null;
1071
+ expiresAt: string | null;
1072
+ completedAt: string | null;
1073
+ failureCode: string | null;
1074
+ failureMessage: string | null;
1075
+ notes: string | null;
1076
+ } | null;
1077
+ invoiceNotification: {
1078
+ id: string;
1079
+ templateSlug: string | null;
1080
+ channel: "email" | "sms";
1081
+ provider: string;
1082
+ status: "cancelled" | "pending" | "failed" | "sent";
1083
+ toAddress: string;
1084
+ subject: string | null;
1085
+ sentAt: string | null;
1086
+ failedAt: string | null;
1087
+ errorMessage: string | null;
1088
+ } | null;
1089
+ paymentSessionNotification: {
1090
+ id: string;
1091
+ templateSlug: string | null;
1092
+ channel: "email" | "sms";
1093
+ provider: string;
1094
+ status: "cancelled" | "pending" | "failed" | "sent";
1095
+ toAddress: string;
1096
+ subject: string | null;
1097
+ sentAt: string | null;
1098
+ failedAt: string | null;
1099
+ errorMessage: string | null;
1100
+ } | null;
1101
+ bankTransferInstructions: {
1102
+ provider: string | null;
1103
+ invoiceId: string;
1104
+ invoiceNumber: string;
1105
+ documentType: "invoice" | "proforma";
1106
+ amountCents: number;
1107
+ currency: string;
1108
+ dueDate: string | null;
1109
+ beneficiary: string;
1110
+ iban: string;
1111
+ bankName: string | null;
1112
+ notes: string | null;
1113
+ } | null;
1114
+ providerStart: {
1115
+ provider: string;
1116
+ paymentSessionId: string;
1117
+ redirectUrl: string | null;
1118
+ externalReference: string | null;
1119
+ providerSessionId: string | null;
1120
+ providerPaymentId: string | null;
1121
+ response: Record<string, unknown> | null;
1122
+ } | null;
1123
+ }>;
1124
+ export declare function bootstrapCheckoutCollection(client: ResolvedClientOptions, input: BootstrapCheckoutCollectionInput, options?: StorefrontRequestOptions): Promise<{
1125
+ plan: {
1126
+ bookingId: string;
1127
+ method: "card" | "bank_transfer";
1128
+ stage: "manual" | "initial" | "reminder";
1129
+ paymentSessionTarget: "schedule" | "invoice" | null;
1130
+ documentType: "invoice" | "proforma" | null;
1131
+ willCreateDefaultPaymentPlan: boolean;
1132
+ selectedSchedule: {
1133
+ id: string;
1134
+ bookingId: string;
1135
+ bookingItemId: string | null;
1136
+ scheduleType: string;
1137
+ status: string;
1138
+ dueDate: string;
1139
+ currency: string;
1140
+ amountCents: number;
1141
+ notes: string | null;
1142
+ } | null;
1143
+ selectedInvoice: {
1144
+ id: string;
1145
+ invoiceNumber: string;
1146
+ invoiceType: string;
1147
+ bookingId: string;
1148
+ personId: string | null;
1149
+ organizationId: string | null;
1150
+ status: string;
1151
+ currency: string;
1152
+ totalCents: number;
1153
+ paidCents: number;
1154
+ balanceDueCents: number;
1155
+ issueDate: string;
1156
+ dueDate: string;
1157
+ notes: string | null;
1158
+ createdAt: string;
1159
+ updatedAt: string;
1160
+ } | null;
1161
+ amountCents: number;
1162
+ currency: string;
1163
+ recommendedAction: "none" | "create_bank_transfer_document" | "create_payment_session" | "create_invoice_then_payment_session";
1164
+ };
1165
+ invoice: {
1166
+ id: string;
1167
+ invoiceNumber: string;
1168
+ invoiceType: string;
1169
+ bookingId: string;
1170
+ personId: string | null;
1171
+ organizationId: string | null;
1172
+ status: string;
1173
+ currency: string;
1174
+ totalCents: number;
1175
+ paidCents: number;
1176
+ balanceDueCents: number;
1177
+ issueDate: string;
1178
+ dueDate: string;
1179
+ notes: string | null;
1180
+ createdAt: string;
1181
+ updatedAt: string;
1182
+ } | null;
1183
+ paymentSession: {
1184
+ id: string;
1185
+ targetType: "other" | "invoice" | "booking" | "order" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
1186
+ targetId: string | null;
1187
+ bookingId: string | null;
1188
+ invoiceId: string | null;
1189
+ bookingPaymentScheduleId: string | null;
1190
+ bookingGuaranteeId: string | null;
1191
+ status: "expired" | "cancelled" | "pending" | "failed" | "requires_redirect" | "processing" | "authorized" | "paid";
1192
+ provider: string | null;
1193
+ providerSessionId: string | null;
1194
+ providerPaymentId: string | null;
1195
+ externalReference: string | null;
1196
+ clientReference: string | null;
1197
+ currency: string;
1198
+ amountCents: number;
1199
+ paymentMethod: "other" | "bank_transfer" | "credit_card" | "voucher" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | null;
1200
+ payerEmail: string | null;
1201
+ payerName: string | null;
1202
+ redirectUrl: string | null;
1203
+ returnUrl: string | null;
1204
+ cancelUrl: string | null;
1205
+ expiresAt: string | null;
1206
+ completedAt: string | null;
1207
+ failureCode: string | null;
1208
+ failureMessage: string | null;
1209
+ notes: string | null;
1210
+ } | null;
1211
+ invoiceNotification: {
1212
+ id: string;
1213
+ templateSlug: string | null;
1214
+ channel: "email" | "sms";
1215
+ provider: string;
1216
+ status: "cancelled" | "pending" | "failed" | "sent";
1217
+ toAddress: string;
1218
+ subject: string | null;
1219
+ sentAt: string | null;
1220
+ failedAt: string | null;
1221
+ errorMessage: string | null;
1222
+ } | null;
1223
+ paymentSessionNotification: {
1224
+ id: string;
1225
+ templateSlug: string | null;
1226
+ channel: "email" | "sms";
1227
+ provider: string;
1228
+ status: "cancelled" | "pending" | "failed" | "sent";
1229
+ toAddress: string;
1230
+ subject: string | null;
1231
+ sentAt: string | null;
1232
+ failedAt: string | null;
1233
+ errorMessage: string | null;
1234
+ } | null;
1235
+ bankTransferInstructions: {
1236
+ provider: string | null;
1237
+ invoiceId: string;
1238
+ invoiceNumber: string;
1239
+ documentType: "invoice" | "proforma";
1240
+ amountCents: number;
1241
+ currency: string;
1242
+ dueDate: string | null;
1243
+ beneficiary: string;
1244
+ iban: string;
1245
+ bankName: string | null;
1246
+ notes: string | null;
1247
+ } | null;
1248
+ providerStart: {
1249
+ provider: string;
1250
+ paymentSessionId: string;
1251
+ redirectUrl: string | null;
1252
+ externalReference: string | null;
1253
+ providerSessionId: string | null;
1254
+ providerPaymentId: string | null;
1255
+ response: Record<string, unknown> | null;
1256
+ } | null;
1257
+ bookingId: string;
1258
+ sessionId: string;
1259
+ sourceType: "session" | "booking";
1260
+ intent: "custom" | "deposit" | "balance";
1261
+ }>;
1262
+ export {};
1263
+ //# sourceMappingURL=operations.d.ts.map