@voyantjs/storefront-sdk 0.50.0 → 0.50.2

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.
package/README.md CHANGED
@@ -29,6 +29,15 @@ const session = await voyant.booking.createSession({
29
29
  const state = voyant.booking.deriveState(session)
30
30
  ```
31
31
 
32
+ Use `voyant.booking.bootstrapSession(...)` or the lower-level
33
+ `bootstrapBookingSession(...)` operation when the storefront has a selected
34
+ departure slot and quote and needs the native combined bootstrap payload:
35
+ session, availability, repricing, payment plan/schedule, allocation, and the
36
+ checkout capability attached at `session.checkoutCapability`. Use
37
+ `voyant.booking.createSession(...)` / `createPublicBookingSession(...)` only
38
+ when the UI intentionally wants to reserve a bare public booking session and
39
+ orchestrate pricing, availability, and payment setup separately.
40
+
32
41
  For custom booking engines, prefer the `bookingEngine` facade. It keeps the
33
42
  route-shaped public booking and checkout calls behind flow-oriented methods and
34
43
  returns a canonical engine snapshot alongside session reads and mutations.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { bootstrapBookingEnginePayment, confirmBookingEngineSession, expireBookingEngineSession, getBookingEngineOverview, previewBookingEnginePayment, repriceBookingEngineSession, reserveBookingEngineSession, startBookingEnginePayment, updateBookingEngineProgress, updateBookingEngineSession, updateBookingEngineTravelers } from "./booking-engine.js";
2
2
  import { type VoyantStorefrontClientOptions } from "./client.js";
3
3
  import { canRunBookingEngineAction, createBookingEngineSnapshot, deriveBookingEngineState } from "./engine-state.js";
4
- import { bootstrapCheckoutCollection, confirmPublicBookingSession, createPublicBookingSession, expirePublicBookingSession, getPublicBookingOverview, getStorefrontOfferBySlug, getStorefrontProductAvailability, initiateCheckoutCollection, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewCheckoutCollection, previewStorefrontDeparturePrice, repricePublicBookingSession, updatePublicBookingSession, updatePublicBookingSessionState } from "./operations.js";
4
+ import { bootstrapBookingSession, bootstrapCheckoutCollection, confirmPublicBookingSession, createPublicBookingSession, createStorefrontLead, expirePublicBookingSession, getPublicBookingOverview, getStorefrontOfferBySlug, getStorefrontProductAvailability, initiateCheckoutCollection, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewCheckoutCollection, previewStorefrontDeparturePrice, repricePublicBookingSession, subscribeStorefrontNewsletter, updatePublicBookingSession, updatePublicBookingSessionState } from "./operations.js";
5
5
  export * from "./booking-engine.js";
6
6
  export type { StorefrontQueryParamValue, StorefrontRequestOptions, VoyantStorefrontClientOptions, VoyantStorefrontFetcher, } from "./client.js";
7
7
  export { defaultStorefrontFetcher, storefrontFetchWithValidation, VoyantStorefrontApiError, withStorefrontQueryParams, } from "./client.js";
@@ -79,11 +79,25 @@ export declare function createVoyantStorefrontClient(options: VoyantStorefrontCl
79
79
  description: string | null;
80
80
  enabled: boolean;
81
81
  }[];
82
+ structure: "split" | "full";
83
+ schedule: {
84
+ percent: number;
85
+ dueInDays: number;
86
+ dueCondition: "after_booking" | "before_departure";
87
+ }[];
82
88
  defaultSchedule: {
83
89
  depositPercent: number | null;
84
90
  balanceDueDaysBeforeDeparture: number | null;
85
91
  } | null;
86
92
  bankTransfer: {
93
+ dueDays: number | null;
94
+ account: {
95
+ provider: string | null;
96
+ currency: string | null;
97
+ iban: string;
98
+ beneficiary: string;
99
+ bank: string;
100
+ } | null;
87
101
  accountHolder: string | null;
88
102
  bankName: string | null;
89
103
  iban: string | null;
@@ -93,6 +107,23 @@ export declare function createVoyantStorefrontClient(options: VoyantStorefrontCl
93
107
  } | null;
94
108
  };
95
109
  }>;
110
+ createLead: (input: Parameters<typeof createStorefrontLead>[1], requestOptions?: Parameters<typeof createStorefrontLead>[2]) => Promise<{
111
+ id: string;
112
+ personId: string;
113
+ kind: "notify" | "wishlist" | "inquiry" | "request_offer" | "referral";
114
+ source: "phone" | "admin" | "form" | "booking" | "website" | "abandoned_cart";
115
+ status: "expired" | "converted" | "lost" | "new" | "contacted" | "qualified";
116
+ duplicate: boolean;
117
+ }>;
118
+ subscribeNewsletter: (input: Parameters<typeof subscribeStorefrontNewsletter>[1], requestOptions?: Parameters<typeof subscribeStorefrontNewsletter>[2]) => Promise<{
119
+ id: string;
120
+ personId: string;
121
+ kind: "notify" | "wishlist" | "inquiry" | "request_offer" | "referral";
122
+ source: "phone" | "admin" | "form" | "booking" | "website" | "abandoned_cart";
123
+ status: "expired" | "converted" | "lost" | "new" | "contacted" | "qualified";
124
+ duplicate: boolean;
125
+ doubleOptIn: "requested" | "not_configured";
126
+ }>;
96
127
  getDeparture: (departureId: string) => Promise<{
97
128
  id: string;
98
129
  productId: string;
@@ -539,6 +570,181 @@ export declare function createVoyantStorefrontClient(options: VoyantStorefrontCl
539
570
  }>;
540
571
  };
541
572
  booking: {
573
+ bootstrapSession: (input: Parameters<typeof bootstrapBookingSession>[1], requestOptions?: Parameters<typeof bootstrapBookingSession>[2]) => Promise<{
574
+ paymentPlan: {
575
+ source: "storefront_default";
576
+ depositKind: "percent" | "none" | "fixed_cents";
577
+ depositPercent: number | null;
578
+ depositAmountCents: number | null;
579
+ requiresFullPayment: boolean;
580
+ };
581
+ paymentSchedule: {
582
+ id: string;
583
+ scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
584
+ status: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
585
+ dueDate: string;
586
+ currency: string;
587
+ amountCents: number;
588
+ notes: string | null;
589
+ }[];
590
+ repricing: {
591
+ originalQuote: {
592
+ currencyCode: string;
593
+ totalSellAmountCents: number;
594
+ quotedAt?: string | null | undefined;
595
+ expiresAt?: string | null | undefined;
596
+ };
597
+ current: {
598
+ sessionId: string;
599
+ catalogId: string | null;
600
+ currencyCode: string;
601
+ totalSellAmountCents: number;
602
+ items: {
603
+ itemId: string;
604
+ title: string;
605
+ productId: string | null;
606
+ optionId: string | null;
607
+ optionUnitId: string | null;
608
+ optionUnitName: string | null;
609
+ optionUnitType: string | null;
610
+ pricingCategoryId: string | null;
611
+ quantity: number;
612
+ pricingMode: string;
613
+ unitSellAmountCents: number | null;
614
+ totalSellAmountCents: number | null;
615
+ warnings: string[];
616
+ }[];
617
+ warnings: string[];
618
+ appliedToSession: boolean;
619
+ };
620
+ deltaAmountCents: number;
621
+ staleQuote: boolean;
622
+ };
623
+ availability: {
624
+ departureId: string;
625
+ slotId: string;
626
+ productId: string;
627
+ optionId: string | null;
628
+ dateLocal: string | null;
629
+ startsAt: string | null;
630
+ endsAt: string | null;
631
+ timezone: string;
632
+ status: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
633
+ capacity: number | null;
634
+ remaining: number | null;
635
+ };
636
+ allocation: {
637
+ id: string;
638
+ bookingItemId: string | null;
639
+ productId: string | null;
640
+ optionId: string | null;
641
+ optionUnitId: string | null;
642
+ pricingCategoryId: string | null;
643
+ availabilitySlotId: string | null;
644
+ quantity: number;
645
+ allocationType: "unit" | "pickup" | "resource";
646
+ status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
647
+ holdExpiresAt: string | null;
648
+ confirmedAt: string | null;
649
+ releasedAt: string | null;
650
+ }[];
651
+ currency: string;
652
+ session: {
653
+ sessionId: string;
654
+ bookingNumber: string;
655
+ status: "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired" | "cancelled";
656
+ externalBookingRef: string | null;
657
+ communicationLanguage: string | null;
658
+ sellCurrency: string;
659
+ sellAmountCents: number | null;
660
+ startDate: string | null;
661
+ endDate: string | null;
662
+ pax: number | null;
663
+ holdExpiresAt: string | null;
664
+ confirmedAt: string | null;
665
+ expiredAt: string | null;
666
+ cancelledAt: string | null;
667
+ completedAt: string | null;
668
+ travelers: {
669
+ id: string;
670
+ participantType: "traveler" | "occupant" | "other";
671
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
672
+ firstName: string;
673
+ lastName: string;
674
+ email: string | null;
675
+ phone: string | null;
676
+ preferredLanguage: string | null;
677
+ specialRequests: string | null;
678
+ isPrimary: boolean;
679
+ notes: string | null;
680
+ }[];
681
+ items: {
682
+ id: string;
683
+ title: string;
684
+ description: string | null;
685
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
686
+ status: "draft" | "on_hold" | "confirmed" | "expired" | "cancelled" | "fulfilled";
687
+ serviceDate: string | null;
688
+ startsAt: string | null;
689
+ endsAt: string | null;
690
+ quantity: number;
691
+ sellCurrency: string;
692
+ unitSellAmountCents: number | null;
693
+ totalSellAmountCents: number | null;
694
+ costCurrency: string | null;
695
+ unitCostAmountCents: number | null;
696
+ totalCostAmountCents: number | null;
697
+ notes: string | null;
698
+ productId: string | null;
699
+ optionId: string | null;
700
+ optionUnitId: string | null;
701
+ pricingCategoryId: string | null;
702
+ travelerLinks: {
703
+ id: string;
704
+ travelerId: string;
705
+ role: "traveler" | "occupant" | "other" | "beneficiary";
706
+ isPrimary: boolean;
707
+ }[];
708
+ }[];
709
+ allocations: {
710
+ id: string;
711
+ bookingItemId: string | null;
712
+ productId: string | null;
713
+ optionId: string | null;
714
+ optionUnitId: string | null;
715
+ pricingCategoryId: string | null;
716
+ availabilitySlotId: string | null;
717
+ quantity: number;
718
+ allocationType: "unit" | "pickup" | "resource";
719
+ status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
720
+ holdExpiresAt: string | null;
721
+ confirmedAt: string | null;
722
+ releasedAt: string | null;
723
+ }[];
724
+ checklist: {
725
+ hasTravelers: boolean;
726
+ hasPrimaryTraveler: boolean;
727
+ hasItems: boolean;
728
+ hasAllocations: boolean;
729
+ readyForConfirmation: boolean;
730
+ };
731
+ state: {
732
+ sessionId: string;
733
+ stateKey: "wizard";
734
+ currentStep: string | null;
735
+ completedSteps: string[];
736
+ payload: Record<string, unknown>;
737
+ version: number;
738
+ createdAt: string;
739
+ updatedAt: string;
740
+ } | null;
741
+ checkoutCapability: {
742
+ token: string;
743
+ expiresAt: string;
744
+ actions: ("session:read" | "session:update" | "session:reprice" | "session:finalize" | "payment:read" | "payment:start")[];
745
+ };
746
+ };
747
+ }>;
542
748
  createSession: (input: Parameters<typeof createPublicBookingSession>[1], requestOptions?: Parameters<typeof createPublicBookingSession>[2]) => Promise<{
543
749
  sessionId: string;
544
750
  bookingNumber: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,0BAA0B,EAC1B,wBAAwB,EAGxB,2BAA2B,EAC3B,2BAA2B,EAC3B,2BAA2B,EAC3B,yBAAyB,EACzB,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAA4B,KAAK,6BAA6B,EAAE,MAAM,aAAa,CAAA;AAC1F,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,wBAAwB,EAKxB,wBAAwB,EACxB,gCAAgC,EAEhC,0BAA0B,EAC1B,+BAA+B,EAC/B,+BAA+B,EAC/B,2BAA2B,EAC3B,yBAAyB,EACzB,+BAA+B,EAC/B,2BAA2B,EAC3B,0BAA0B,EAC1B,+BAA+B,EAChC,MAAM,iBAAiB,CAAA;AAExB,cAAc,qBAAqB,CAAA;AACnC,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,2BA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D,MAAM,SACV,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC,CAAC,mBACtC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAG1D,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC,CAAC,mBACvC,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIzE;AAED,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { bootstrapBookingEnginePayment, confirmBookingEngineSession, expireBookingEngineSession, getBookingEngineOverview, getBookingEngineProgress, getBookingEngineSessionSnapshot, previewBookingEnginePayment, repriceBookingEngineSession, reserveBookingEngineSession, startBookingEnginePayment, updateBookingEngineProgress, updateBookingEngineSession, updateBookingEngineTravelers, } from "./booking-engine.js";
2
2
  import { defaultStorefrontFetcher } from "./client.js";
3
3
  import { canRunBookingEngineAction, createBookingEngineSnapshot, deriveBookingEngineState, } from "./engine-state.js";
4
- import { bootstrapCheckoutCollection, confirmPublicBookingSession, createPublicBookingSession, expirePublicBookingSession, getPublicBookingOverview, getPublicBookingSession, getPublicBookingSessionState, getStorefrontDeparture, getStorefrontDepartureItinerary, getStorefrontOfferBySlug, getStorefrontProductAvailability, getStorefrontSettings, initiateCheckoutCollection, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewCheckoutCollection, previewStorefrontDeparturePrice, repricePublicBookingSession, updatePublicBookingSession, updatePublicBookingSessionState, } from "./operations.js";
4
+ import { bootstrapBookingSession, bootstrapCheckoutCollection, confirmPublicBookingSession, createPublicBookingSession, createStorefrontLead, expirePublicBookingSession, getPublicBookingOverview, getPublicBookingSession, getPublicBookingSessionState, getStorefrontDeparture, getStorefrontDepartureItinerary, getStorefrontOfferBySlug, getStorefrontProductAvailability, getStorefrontSettings, initiateCheckoutCollection, listStorefrontProductDepartures, listStorefrontProductExtensions, listStorefrontProductOffers, previewCheckoutCollection, previewStorefrontDeparturePrice, repricePublicBookingSession, subscribeStorefrontNewsletter, updatePublicBookingSession, updatePublicBookingSessionState, } from "./operations.js";
5
5
  export * from "./booking-engine.js";
6
6
  export { defaultStorefrontFetcher, storefrontFetchWithValidation, VoyantStorefrontApiError, withStorefrontQueryParams, } from "./client.js";
7
7
  export { bookingEngineActions, bookingEngineStates, canRunBookingEngineAction, createBookingEngineSnapshot, deriveBookingEngineState, getAllowedBookingEngineActions, } from "./engine-state.js";
@@ -17,6 +17,8 @@ export function createVoyantStorefrontClient(options) {
17
17
  return {
18
18
  storefront: {
19
19
  getSettings: () => getStorefrontSettings(client),
20
+ createLead: (input, requestOptions) => createStorefrontLead(client, input, requestOptions),
21
+ subscribeNewsletter: (input, requestOptions) => subscribeStorefrontNewsletter(client, input, requestOptions),
20
22
  getDeparture: (departureId) => getStorefrontDeparture(client, departureId),
21
23
  listProductDepartures: (productId, query) => listStorefrontProductDepartures(client, productId, query),
22
24
  getProductAvailability: (productId, query) => getStorefrontProductAvailability(client, productId, query),
@@ -27,6 +29,7 @@ export function createVoyantStorefrontClient(options) {
27
29
  getOfferBySlug: (slug, query) => getStorefrontOfferBySlug(client, slug, query),
28
30
  },
29
31
  booking: {
32
+ bootstrapSession: (input, requestOptions) => bootstrapBookingSession(client, input, requestOptions),
30
33
  createSession: (input, requestOptions) => createPublicBookingSession(client, input, requestOptions),
31
34
  getSession: (sessionId) => getPublicBookingSession(client, sessionId),
32
35
  updateSession: (sessionId, input, requestOptions) => updatePublicBookingSession(client, sessionId, input, requestOptions),
@@ -1,5 +1,5 @@
1
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";
2
+ import { type BootstrapCheckoutCollectionInput, type InitiateCheckoutCollectionInput, type PreviewCheckoutCollectionInput, type PublicBookingOverviewLookupQuery, type PublicBookingSessionMutationInput, type PublicBookingSessionRepriceInput, type PublicCreateBookingSessionInput, type PublicUpdateBookingSessionInput, type PublicUpsertBookingSessionStateInput, type StorefrontBookingSessionBootstrapInput, type StorefrontDepartureListQuery, type StorefrontDeparturePricePreviewInput, type StorefrontLeadIntakeInput, type StorefrontNewsletterSubscribeInput, type StorefrontProductAvailabilitySummaryQuery, type StorefrontProductExtensionsQuery, type StorefrontPromotionalOfferListQuery } from "./schemas.js";
3
3
  type ResolvedClientOptions = Required<Pick<VoyantStorefrontClientOptions, "baseUrl" | "fetcher">> & Pick<VoyantStorefrontClientOptions, "headers">;
4
4
  export declare function getStorefrontSettings(client: ResolvedClientOptions): Promise<{
5
5
  branding: {
@@ -68,11 +68,25 @@ export declare function getStorefrontSettings(client: ResolvedClientOptions): Pr
68
68
  description: string | null;
69
69
  enabled: boolean;
70
70
  }[];
71
+ structure: "split" | "full";
72
+ schedule: {
73
+ percent: number;
74
+ dueInDays: number;
75
+ dueCondition: "after_booking" | "before_departure";
76
+ }[];
71
77
  defaultSchedule: {
72
78
  depositPercent: number | null;
73
79
  balanceDueDaysBeforeDeparture: number | null;
74
80
  } | null;
75
81
  bankTransfer: {
82
+ dueDays: number | null;
83
+ account: {
84
+ provider: string | null;
85
+ currency: string | null;
86
+ iban: string;
87
+ beneficiary: string;
88
+ bank: string;
89
+ } | null;
76
90
  accountHolder: string | null;
77
91
  bankName: string | null;
78
92
  iban: string | null;
@@ -82,6 +96,23 @@ export declare function getStorefrontSettings(client: ResolvedClientOptions): Pr
82
96
  } | null;
83
97
  };
84
98
  }>;
99
+ export declare function createStorefrontLead(client: ResolvedClientOptions, input: StorefrontLeadIntakeInput, options?: StorefrontRequestOptions): Promise<{
100
+ id: string;
101
+ personId: string;
102
+ kind: "notify" | "wishlist" | "inquiry" | "request_offer" | "referral";
103
+ source: "phone" | "admin" | "form" | "booking" | "website" | "abandoned_cart";
104
+ status: "expired" | "converted" | "lost" | "new" | "contacted" | "qualified";
105
+ duplicate: boolean;
106
+ }>;
107
+ export declare function subscribeStorefrontNewsletter(client: ResolvedClientOptions, input: StorefrontNewsletterSubscribeInput, options?: StorefrontRequestOptions): Promise<{
108
+ id: string;
109
+ personId: string;
110
+ kind: "notify" | "wishlist" | "inquiry" | "request_offer" | "referral";
111
+ source: "phone" | "admin" | "form" | "booking" | "website" | "abandoned_cart";
112
+ status: "expired" | "converted" | "lost" | "new" | "contacted" | "qualified";
113
+ duplicate: boolean;
114
+ doubleOptIn: "requested" | "not_configured";
115
+ }>;
85
116
  export declare function getStorefrontDeparture(client: ResolvedClientOptions, departureId: string): Promise<{
86
117
  id: string;
87
118
  productId: string;
@@ -621,6 +652,181 @@ export declare function createPublicBookingSession(client: ResolvedClientOptions
621
652
  actions: ("session:read" | "session:update" | "session:reprice" | "session:finalize" | "payment:read" | "payment:start")[];
622
653
  } | undefined;
623
654
  }>;
655
+ export declare function bootstrapBookingSession(client: ResolvedClientOptions, input: StorefrontBookingSessionBootstrapInput, options?: StorefrontRequestOptions): Promise<{
656
+ paymentPlan: {
657
+ source: "storefront_default";
658
+ depositKind: "percent" | "none" | "fixed_cents";
659
+ depositPercent: number | null;
660
+ depositAmountCents: number | null;
661
+ requiresFullPayment: boolean;
662
+ };
663
+ paymentSchedule: {
664
+ id: string;
665
+ scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
666
+ status: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
667
+ dueDate: string;
668
+ currency: string;
669
+ amountCents: number;
670
+ notes: string | null;
671
+ }[];
672
+ repricing: {
673
+ originalQuote: {
674
+ currencyCode: string;
675
+ totalSellAmountCents: number;
676
+ quotedAt?: string | null | undefined;
677
+ expiresAt?: string | null | undefined;
678
+ };
679
+ current: {
680
+ sessionId: string;
681
+ catalogId: string | null;
682
+ currencyCode: string;
683
+ totalSellAmountCents: number;
684
+ items: {
685
+ itemId: string;
686
+ title: string;
687
+ productId: string | null;
688
+ optionId: string | null;
689
+ optionUnitId: string | null;
690
+ optionUnitName: string | null;
691
+ optionUnitType: string | null;
692
+ pricingCategoryId: string | null;
693
+ quantity: number;
694
+ pricingMode: string;
695
+ unitSellAmountCents: number | null;
696
+ totalSellAmountCents: number | null;
697
+ warnings: string[];
698
+ }[];
699
+ warnings: string[];
700
+ appliedToSession: boolean;
701
+ };
702
+ deltaAmountCents: number;
703
+ staleQuote: boolean;
704
+ };
705
+ availability: {
706
+ departureId: string;
707
+ slotId: string;
708
+ productId: string;
709
+ optionId: string | null;
710
+ dateLocal: string | null;
711
+ startsAt: string | null;
712
+ endsAt: string | null;
713
+ timezone: string;
714
+ status: "cancelled" | "open" | "closed" | "sold_out" | "on_request";
715
+ capacity: number | null;
716
+ remaining: number | null;
717
+ };
718
+ allocation: {
719
+ id: string;
720
+ bookingItemId: string | null;
721
+ productId: string | null;
722
+ optionId: string | null;
723
+ optionUnitId: string | null;
724
+ pricingCategoryId: string | null;
725
+ availabilitySlotId: string | null;
726
+ quantity: number;
727
+ allocationType: "unit" | "pickup" | "resource";
728
+ status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
729
+ holdExpiresAt: string | null;
730
+ confirmedAt: string | null;
731
+ releasedAt: string | null;
732
+ }[];
733
+ currency: string;
734
+ session: {
735
+ sessionId: string;
736
+ bookingNumber: string;
737
+ status: "draft" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired" | "cancelled";
738
+ externalBookingRef: string | null;
739
+ communicationLanguage: string | null;
740
+ sellCurrency: string;
741
+ sellAmountCents: number | null;
742
+ startDate: string | null;
743
+ endDate: string | null;
744
+ pax: number | null;
745
+ holdExpiresAt: string | null;
746
+ confirmedAt: string | null;
747
+ expiredAt: string | null;
748
+ cancelledAt: string | null;
749
+ completedAt: string | null;
750
+ travelers: {
751
+ id: string;
752
+ participantType: "traveler" | "occupant" | "other";
753
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
754
+ firstName: string;
755
+ lastName: string;
756
+ email: string | null;
757
+ phone: string | null;
758
+ preferredLanguage: string | null;
759
+ specialRequests: string | null;
760
+ isPrimary: boolean;
761
+ notes: string | null;
762
+ }[];
763
+ items: {
764
+ id: string;
765
+ title: string;
766
+ description: string | null;
767
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
768
+ status: "draft" | "on_hold" | "confirmed" | "expired" | "cancelled" | "fulfilled";
769
+ serviceDate: string | null;
770
+ startsAt: string | null;
771
+ endsAt: string | null;
772
+ quantity: number;
773
+ sellCurrency: string;
774
+ unitSellAmountCents: number | null;
775
+ totalSellAmountCents: number | null;
776
+ costCurrency: string | null;
777
+ unitCostAmountCents: number | null;
778
+ totalCostAmountCents: number | null;
779
+ notes: string | null;
780
+ productId: string | null;
781
+ optionId: string | null;
782
+ optionUnitId: string | null;
783
+ pricingCategoryId: string | null;
784
+ travelerLinks: {
785
+ id: string;
786
+ travelerId: string;
787
+ role: "traveler" | "occupant" | "other" | "beneficiary";
788
+ isPrimary: boolean;
789
+ }[];
790
+ }[];
791
+ allocations: {
792
+ id: string;
793
+ bookingItemId: string | null;
794
+ productId: string | null;
795
+ optionId: string | null;
796
+ optionUnitId: string | null;
797
+ pricingCategoryId: string | null;
798
+ availabilitySlotId: string | null;
799
+ quantity: number;
800
+ allocationType: "unit" | "pickup" | "resource";
801
+ status: "confirmed" | "expired" | "cancelled" | "fulfilled" | "held" | "released";
802
+ holdExpiresAt: string | null;
803
+ confirmedAt: string | null;
804
+ releasedAt: string | null;
805
+ }[];
806
+ checklist: {
807
+ hasTravelers: boolean;
808
+ hasPrimaryTraveler: boolean;
809
+ hasItems: boolean;
810
+ hasAllocations: boolean;
811
+ readyForConfirmation: boolean;
812
+ };
813
+ state: {
814
+ sessionId: string;
815
+ stateKey: "wizard";
816
+ currentStep: string | null;
817
+ completedSteps: string[];
818
+ payload: Record<string, unknown>;
819
+ version: number;
820
+ createdAt: string;
821
+ updatedAt: string;
822
+ } | null;
823
+ checkoutCapability: {
824
+ token: string;
825
+ expiresAt: string;
826
+ actions: ("session:read" | "session:update" | "session:reprice" | "session:finalize" | "payment:read" | "payment:start")[];
827
+ };
828
+ };
829
+ }>;
624
830
  export declare function getPublicBookingSession(client: ResolvedClientOptions, sessionId: string): Promise<{
625
831
  sessionId: string;
626
832
  bookingNumber: string;
@@ -1 +1 @@
1
- {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,wBAAwB,EAE7B,KAAK,6BAA6B,EAEnC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,KAAK,gCAAgC,EAIrC,KAAK,+BAA+B,EAGpC,KAAK,8BAA8B,EACnC,KAAK,gCAAgC,EACrC,KAAK,iCAAiC,EACtC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,+BAA+B,EACpC,KAAK,oCAAoC,EAYzC,KAAK,4BAA4B,EACjC,KAAK,oCAAoC,EACzC,KAAK,yCAAyC,EAC9C,KAAK,gCAAgC,EACrC,KAAK,mCAAmC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1,8 +1,16 @@
1
1
  import { requestHeaders, storefrontFetchWithValidation, withStorefrontQueryParams, } from "./client.js";
2
- import { bootstrapCheckoutCollectionSchema, bootstrappedCheckoutCollectionResponseSchema, checkoutCollectionPlanResponseSchema, initiateCheckoutCollectionSchema, initiatedCheckoutCollectionResponseSchema, previewCheckoutCollectionSchema, publicBookingOverviewLookupQuerySchema, publicBookingOverviewResponseSchema, publicBookingSessionMutationSchema, publicBookingSessionRepriceResponseSchema, publicBookingSessionResponseSchema, publicBookingSessionStateResponseSchema, publicCreateBookingSessionSchema, publicRepriceBookingSessionSchema, publicUpdateBookingSessionSchema, publicUpsertBookingSessionStateSchema, storefrontDepartureItineraryResponseSchema, storefrontDepartureListQuerySchema, storefrontDepartureListResponseSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewResponseSchema, storefrontDepartureResponseSchema, storefrontProductAvailabilitySummaryQuerySchema, storefrontProductAvailabilitySummaryResponseSchema, storefrontProductExtensionsQuerySchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListQuerySchema, storefrontPromotionalOfferListResponseSchema, storefrontPromotionalOfferResponseSchema, storefrontSettingsResponseSchema, } from "./schemas.js";
2
+ import { bootstrapCheckoutCollectionSchema, bootstrappedBookingSessionResponseSchema, bootstrappedCheckoutCollectionResponseSchema, checkoutCollectionPlanResponseSchema, initiateCheckoutCollectionSchema, initiatedCheckoutCollectionResponseSchema, previewCheckoutCollectionSchema, publicBookingOverviewLookupQuerySchema, publicBookingOverviewResponseSchema, publicBookingSessionMutationSchema, publicBookingSessionRepriceResponseSchema, publicBookingSessionResponseSchema, publicBookingSessionStateResponseSchema, publicCreateBookingSessionSchema, publicRepriceBookingSessionSchema, publicUpdateBookingSessionSchema, publicUpsertBookingSessionStateSchema, storefrontBookingSessionBootstrapInputSchema, storefrontDepartureItineraryResponseSchema, storefrontDepartureListQuerySchema, storefrontDepartureListResponseSchema, storefrontDeparturePricePreviewInputSchema, storefrontDeparturePricePreviewResponseSchema, storefrontDepartureResponseSchema, storefrontIntakeResponseEnvelopeSchema, storefrontLeadIntakeInputSchema, storefrontNewsletterSubscribeInputSchema, storefrontNewsletterSubscribeResponseEnvelopeSchema, storefrontProductAvailabilitySummaryQuerySchema, storefrontProductAvailabilitySummaryResponseSchema, storefrontProductExtensionsQuerySchema, storefrontProductExtensionsResponseSchema, storefrontPromotionalOfferListQuerySchema, storefrontPromotionalOfferListResponseSchema, storefrontPromotionalOfferResponseSchema, storefrontSettingsResponseSchema, } from "./schemas.js";
3
3
  export function getStorefrontSettings(client) {
4
4
  return storefrontFetchWithValidation("/v1/public/settings", storefrontSettingsResponseSchema, client).then((response) => response.data);
5
5
  }
6
+ export function createStorefrontLead(client, input, options) {
7
+ const parsed = storefrontLeadIntakeInputSchema.parse(input);
8
+ return storefrontFetchWithValidation("/v1/public/leads", storefrontIntakeResponseEnvelopeSchema, client, { method: "POST", headers: requestHeaders(options), body: JSON.stringify(parsed) }).then((response) => response.data);
9
+ }
10
+ export function subscribeStorefrontNewsletter(client, input, options) {
11
+ const parsed = storefrontNewsletterSubscribeInputSchema.parse(input);
12
+ return storefrontFetchWithValidation("/v1/public/newsletter/subscribe", storefrontNewsletterSubscribeResponseEnvelopeSchema, client, { method: "POST", headers: requestHeaders(options), body: JSON.stringify(parsed) }).then((response) => response.data);
13
+ }
6
14
  export function getStorefrontDeparture(client, departureId) {
7
15
  return storefrontFetchWithValidation(`/v1/public/departures/${encodeURIComponent(departureId)}`, storefrontDepartureResponseSchema, client).then((response) => response.data);
8
16
  }
@@ -36,6 +44,10 @@ export function createPublicBookingSession(client, input, options) {
36
44
  const parsed = publicCreateBookingSessionSchema.parse(input);
37
45
  return storefrontFetchWithValidation("/v1/public/bookings/sessions", publicBookingSessionResponseSchema, client, { method: "POST", headers: requestHeaders(options), body: JSON.stringify(parsed) }).then((response) => response.data);
38
46
  }
47
+ export function bootstrapBookingSession(client, input, options) {
48
+ const parsed = storefrontBookingSessionBootstrapInputSchema.parse(input);
49
+ return storefrontFetchWithValidation("/v1/public/bookings/sessions/bootstrap", bootstrappedBookingSessionResponseSchema, client, { method: "POST", headers: requestHeaders(options), body: JSON.stringify(parsed) }).then((response) => response.data);
50
+ }
39
51
  export function getPublicBookingSession(client, sessionId) {
40
52
  return storefrontFetchWithValidation(`/v1/public/bookings/sessions/${encodeURIComponent(sessionId)}`, publicBookingSessionResponseSchema, client).then((response) => response.data);
41
53
  }