@voyant-travel/trips-react 0.110.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.
Files changed (114) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +30 -0
  3. package/dist/admin/admin-trips-page-controls.d.ts +28 -0
  4. package/dist/admin/admin-trips-page-controls.d.ts.map +1 -0
  5. package/dist/admin/admin-trips-page-controls.js +28 -0
  6. package/dist/admin/admin-trips-page-model.d.ts +87 -0
  7. package/dist/admin/admin-trips-page-model.d.ts.map +1 -0
  8. package/dist/admin/admin-trips-page-model.js +457 -0
  9. package/dist/admin/admin-trips-page.d.ts +6 -0
  10. package/dist/admin/admin-trips-page.d.ts.map +1 -0
  11. package/dist/admin/admin-trips-page.js +322 -0
  12. package/dist/admin/admin-trips-panels.d.ts +11 -0
  13. package/dist/admin/admin-trips-panels.d.ts.map +1 -0
  14. package/dist/admin/admin-trips-panels.js +11 -0
  15. package/dist/admin/index.d.ts +63 -0
  16. package/dist/admin/index.d.ts.map +1 -0
  17. package/dist/admin/index.js +119 -0
  18. package/dist/admin/pages/trip-detail-page.d.ts +10 -0
  19. package/dist/admin/pages/trip-detail-page.d.ts.map +1 -0
  20. package/dist/admin/pages/trip-detail-page.js +12 -0
  21. package/dist/admin/trip-component-display.d.ts +10 -0
  22. package/dist/admin/trip-component-display.d.ts.map +1 -0
  23. package/dist/admin/trip-component-display.js +137 -0
  24. package/dist/admin/trip-detail-host.d.ts +12 -0
  25. package/dist/admin/trip-detail-host.d.ts.map +1 -0
  26. package/dist/admin/trip-detail-host.js +37 -0
  27. package/dist/admin/trip-detail-record-model.d.ts +30 -0
  28. package/dist/admin/trip-detail-record-model.d.ts.map +1 -0
  29. package/dist/admin/trip-detail-record-model.js +56 -0
  30. package/dist/admin/trip-detail-record.d.ts +47 -0
  31. package/dist/admin/trip-detail-record.d.ts.map +1 -0
  32. package/dist/admin/trip-detail-record.js +170 -0
  33. package/dist/admin/trip-list-filters.d.ts +33 -0
  34. package/dist/admin/trip-list-filters.d.ts.map +1 -0
  35. package/dist/admin/trip-list-filters.js +94 -0
  36. package/dist/admin/trips-host.d.ts +15 -0
  37. package/dist/admin/trips-host.d.ts.map +1 -0
  38. package/dist/admin/trips-host.js +233 -0
  39. package/dist/admin/trips-panels/catalog-configurator.d.ts +34 -0
  40. package/dist/admin/trips-panels/catalog-configurator.d.ts.map +1 -0
  41. package/dist/admin/trips-panels/catalog-configurator.js +200 -0
  42. package/dist/admin/trips-panels/catalog-options.d.ts +58 -0
  43. package/dist/admin/trips-panels/catalog-options.d.ts.map +1 -0
  44. package/dist/admin/trips-panels/catalog-options.js +124 -0
  45. package/dist/admin/trips-panels/committed-component-card.d.ts +27 -0
  46. package/dist/admin/trips-panels/committed-component-card.d.ts.map +1 -0
  47. package/dist/admin/trips-panels/committed-component-card.js +44 -0
  48. package/dist/admin/trips-panels/display.d.ts +51 -0
  49. package/dist/admin/trips-panels/display.d.ts.map +1 -0
  50. package/dist/admin/trips-panels/display.js +336 -0
  51. package/dist/admin/trips-panels/flight-configurator.d.ts +34 -0
  52. package/dist/admin/trips-panels/flight-configurator.d.ts.map +1 -0
  53. package/dist/admin/trips-panels/flight-configurator.js +208 -0
  54. package/dist/admin/trips-panels/manual-configurators.d.ts +16 -0
  55. package/dist/admin/trips-panels/manual-configurators.d.ts.map +1 -0
  56. package/dist/admin/trips-panels/manual-configurators.js +41 -0
  57. package/dist/admin/trips-panels/pending-component-card.d.ts +16 -0
  58. package/dist/admin/trips-panels/pending-component-card.d.ts.map +1 -0
  59. package/dist/admin/trips-panels/pending-component-card.js +29 -0
  60. package/dist/admin/trips-panels/shared.d.ts +122 -0
  61. package/dist/admin/trips-panels/shared.d.ts.map +1 -0
  62. package/dist/admin/trips-panels/shared.js +152 -0
  63. package/dist/admin/trips-panels/travelers-section.d.ts +53 -0
  64. package/dist/admin/trips-panels/travelers-section.d.ts.map +1 -0
  65. package/dist/admin/trips-panels/travelers-section.js +183 -0
  66. package/dist/admin/trips-panels/trip-preview-rail.d.ts +52 -0
  67. package/dist/admin/trips-panels/trip-preview-rail.d.ts.map +1 -0
  68. package/dist/admin/trips-panels/trip-preview-rail.js +122 -0
  69. package/dist/cache.d.ts +9 -0
  70. package/dist/cache.d.ts.map +1 -0
  71. package/dist/cache.js +21 -0
  72. package/dist/client.d.ts +15 -0
  73. package/dist/client.d.ts.map +1 -0
  74. package/dist/client.js +51 -0
  75. package/dist/hooks/index.d.ts +7 -0
  76. package/dist/hooks/index.d.ts.map +1 -0
  77. package/dist/hooks/index.js +6 -0
  78. package/dist/hooks/use-price-trip.d.ts +3 -0
  79. package/dist/hooks/use-price-trip.d.ts.map +1 -0
  80. package/dist/hooks/use-price-trip.js +17 -0
  81. package/dist/hooks/use-reserve-trip.d.ts +3 -0
  82. package/dist/hooks/use-reserve-trip.d.ts.map +1 -0
  83. package/dist/hooks/use-reserve-trip.js +17 -0
  84. package/dist/hooks/use-trip-checkout.d.ts +3 -0
  85. package/dist/hooks/use-trip-checkout.d.ts.map +1 -0
  86. package/dist/hooks/use-trip-checkout.js +17 -0
  87. package/dist/hooks/use-trip-components.d.ts +40 -0
  88. package/dist/hooks/use-trip-components.d.ts.map +1 -0
  89. package/dist/hooks/use-trip-components.js +13 -0
  90. package/dist/hooks/use-trip.d.ts +5 -0
  91. package/dist/hooks/use-trip.d.ts.map +1 -0
  92. package/dist/hooks/use-trip.js +13 -0
  93. package/dist/hooks/use-trips.d.ts +6 -0
  94. package/dist/hooks/use-trips.d.ts.map +1 -0
  95. package/dist/hooks/use-trips.js +12 -0
  96. package/dist/index.d.ts +9 -0
  97. package/dist/index.d.ts.map +1 -0
  98. package/dist/index.js +8 -0
  99. package/dist/operations.d.ts +212 -0
  100. package/dist/operations.d.ts.map +1 -0
  101. package/dist/operations.js +92 -0
  102. package/dist/provider.d.ts +2 -0
  103. package/dist/provider.d.ts.map +1 -0
  104. package/dist/provider.js +1 -0
  105. package/dist/query-keys.d.ts +10 -0
  106. package/dist/query-keys.d.ts.map +1 -0
  107. package/dist/query-keys.js +9 -0
  108. package/dist/query-options.d.ts +167 -0
  109. package/dist/query-options.d.ts.map +1 -0
  110. package/dist/query-options.js +22 -0
  111. package/dist/schemas.d.ts +69 -0
  112. package/dist/schemas.d.ts.map +1 -0
  113. package/dist/schemas.js +16 -0
  114. package/package.json +133 -0
@@ -0,0 +1,212 @@
1
+ import type { CancelTripComponentsInput, CreateTripComponentBodyInput, CreateTripEnvelopeInput, CreateTripSnapshotInput, PreviewTripCancellationInput, PriceTripInput, ReserveTripInput, StartTripCheckoutInput, TripEnvelopeStatus, TripsListSortDir, TripsListSortField } from "@voyant-travel/trips";
2
+ import { type FetchWithValidationOptions } from "./client.js";
3
+ export type ListTripsParams = {
4
+ status?: TripEnvelopeStatus;
5
+ search?: string;
6
+ productId?: string;
7
+ accommodationId?: string;
8
+ cruiseId?: string;
9
+ hasFlight?: boolean;
10
+ totalMinCents?: number;
11
+ totalMaxCents?: number;
12
+ createdFrom?: string;
13
+ createdTo?: string;
14
+ sortBy?: TripsListSortField;
15
+ sortDir?: TripsListSortDir;
16
+ limit?: number;
17
+ offset?: number;
18
+ };
19
+ export type CreateTripBody = Omit<CreateTripEnvelopeInput, "travelerParty" | "constraints"> & Partial<Pick<CreateTripEnvelopeInput, "travelerParty" | "constraints">>;
20
+ export type AddTripComponentBody = Omit<CreateTripComponentBodyInput, "sequence" | "metadata"> & Partial<Pick<CreateTripComponentBodyInput, "sequence" | "metadata">>;
21
+ export type UpdateTripComponentBody = {
22
+ sequence?: number;
23
+ status?: string;
24
+ description?: string | null;
25
+ catalogRef?: unknown;
26
+ metadata?: Record<string, unknown>;
27
+ warningCodes?: string[];
28
+ };
29
+ export type PriceTripBody = Omit<PriceTripInput, "envelopeId">;
30
+ export type ReserveTripBody = Omit<ReserveTripInput, "envelopeId">;
31
+ export type StartTripCheckoutBody = Omit<StartTripCheckoutInput, "envelopeId">;
32
+ export type PreviewTripCancellationBody = Omit<PreviewTripCancellationInput, "envelopeId" | "request"> & Partial<Pick<PreviewTripCancellationInput, "request">>;
33
+ export type CancelTripComponentsBody = Omit<CancelTripComponentsInput, "envelopeId" | "request"> & Partial<Pick<CancelTripComponentsInput, "request">>;
34
+ export type CreateTripSnapshotBody = Omit<CreateTripSnapshotInput, "envelopeId">;
35
+ export declare function listTrips(client: FetchWithValidationOptions, params?: ListTripsParams): Promise<import("@voyant-travel/trips").TripListResult>;
36
+ export declare function createTrip(client: FetchWithValidationOptions, input: CreateTripBody): Promise<import("@voyant-travel/trips").Trip>;
37
+ export declare function getTrip(client: FetchWithValidationOptions, envelopeId: string): Promise<import("@voyant-travel/trips").Trip>;
38
+ export declare function listTripSnapshots(client: FetchWithValidationOptions, envelopeId: string): Promise<{
39
+ id: string;
40
+ currency: string;
41
+ createdBy: string | null;
42
+ createdAt: Date;
43
+ envelopeId: string;
44
+ subtotalAmountCents: number;
45
+ taxAmountCents: number;
46
+ totalAmountCents: number;
47
+ componentCount: number;
48
+ sourceEnvelopeUpdatedAt: Date;
49
+ titleSnapshot: string | null;
50
+ descriptionSnapshot: string | null;
51
+ travelerPartySnapshot: Record<string, unknown>;
52
+ constraintsSnapshot: Record<string, unknown>;
53
+ pricedComponentCount: number;
54
+ frozenEnvelope: Record<string, unknown>;
55
+ frozenComponents: Record<string, unknown>[];
56
+ proposal: import("@voyant-travel/trips").TripSnapshotProposal;
57
+ }[]>;
58
+ export declare function getTripSnapshot(client: FetchWithValidationOptions, snapshotId: string): Promise<{
59
+ id: string;
60
+ currency: string;
61
+ createdBy: string | null;
62
+ createdAt: Date;
63
+ envelopeId: string;
64
+ subtotalAmountCents: number;
65
+ taxAmountCents: number;
66
+ totalAmountCents: number;
67
+ componentCount: number;
68
+ sourceEnvelopeUpdatedAt: Date;
69
+ titleSnapshot: string | null;
70
+ descriptionSnapshot: string | null;
71
+ travelerPartySnapshot: Record<string, unknown>;
72
+ constraintsSnapshot: Record<string, unknown>;
73
+ pricedComponentCount: number;
74
+ frozenEnvelope: Record<string, unknown>;
75
+ frozenComponents: Record<string, unknown>[];
76
+ proposal: import("@voyant-travel/trips").TripSnapshotProposal;
77
+ }>;
78
+ export declare function freezeTripSnapshot(client: FetchWithValidationOptions, envelopeId: string, input?: CreateTripSnapshotBody): Promise<{
79
+ id: string;
80
+ currency: string;
81
+ createdBy: string | null;
82
+ createdAt: Date;
83
+ envelopeId: string;
84
+ subtotalAmountCents: number;
85
+ taxAmountCents: number;
86
+ totalAmountCents: number;
87
+ componentCount: number;
88
+ sourceEnvelopeUpdatedAt: Date;
89
+ titleSnapshot: string | null;
90
+ descriptionSnapshot: string | null;
91
+ travelerPartySnapshot: Record<string, unknown>;
92
+ constraintsSnapshot: Record<string, unknown>;
93
+ pricedComponentCount: number;
94
+ frozenEnvelope: Record<string, unknown>;
95
+ frozenComponents: Record<string, unknown>[];
96
+ proposal: import("@voyant-travel/trips").TripSnapshotProposal;
97
+ }>;
98
+ export declare function freezeTripSnapshotForQuoteVersion(client: FetchWithValidationOptions, envelopeId: string, quoteVersionId: string, input?: CreateTripSnapshotBody): Promise<import("./schemas.js").QuoteVersionSnapshotApplyResult>;
99
+ export declare function addTripComponent(client: FetchWithValidationOptions, envelopeId: string, input: AddTripComponentBody): Promise<{
100
+ id: string;
101
+ title: string | null;
102
+ description: string | null;
103
+ metadata: Record<string, unknown>;
104
+ status: "failed" | "cancelled" | "draft" | "priced" | "checkout_started" | "booked" | "unavailable" | "held" | "removed";
105
+ bookingGroupId: string | null;
106
+ orderId: string | null;
107
+ paymentSessionId: string | null;
108
+ createdAt: Date;
109
+ updatedAt: Date;
110
+ envelopeId: string;
111
+ sequence: number;
112
+ kind: "catalog_booking" | "manual_placeholder" | "flight_placeholder" | "flight_order" | "external_order";
113
+ entityModule: string | null;
114
+ entityId: string | null;
115
+ sourceKind: string | null;
116
+ sourceConnectionId: string | null;
117
+ sourceRef: string | null;
118
+ bookingDraftId: string | null;
119
+ catalogQuoteId: string | null;
120
+ bookingId: string | null;
121
+ providerRef: string | null;
122
+ supplierRef: string | null;
123
+ componentCurrency: string | null;
124
+ componentSubtotalAmountCents: number | null;
125
+ componentTaxAmountCents: number | null;
126
+ componentTotalAmountCents: number | null;
127
+ pricingSnapshot: import("@voyant-travel/trips").TripComponentPricingSnapshot | null;
128
+ taxLines: import("@voyant-travel/trips").TripComponentTaxLineSnapshot[] | null;
129
+ cancellationSnapshot: Record<string, unknown> | null;
130
+ holdToken: string | null;
131
+ holdExpiresAt: Date | null;
132
+ priceExpiresAt: Date | null;
133
+ warningCodes: string[];
134
+ }>;
135
+ export declare function removeTripComponent(client: FetchWithValidationOptions, componentId: string): Promise<{
136
+ id: string;
137
+ title: string | null;
138
+ description: string | null;
139
+ metadata: Record<string, unknown>;
140
+ status: "failed" | "cancelled" | "draft" | "priced" | "checkout_started" | "booked" | "unavailable" | "held" | "removed";
141
+ bookingGroupId: string | null;
142
+ orderId: string | null;
143
+ paymentSessionId: string | null;
144
+ createdAt: Date;
145
+ updatedAt: Date;
146
+ envelopeId: string;
147
+ sequence: number;
148
+ kind: "catalog_booking" | "manual_placeholder" | "flight_placeholder" | "flight_order" | "external_order";
149
+ entityModule: string | null;
150
+ entityId: string | null;
151
+ sourceKind: string | null;
152
+ sourceConnectionId: string | null;
153
+ sourceRef: string | null;
154
+ bookingDraftId: string | null;
155
+ catalogQuoteId: string | null;
156
+ bookingId: string | null;
157
+ providerRef: string | null;
158
+ supplierRef: string | null;
159
+ componentCurrency: string | null;
160
+ componentSubtotalAmountCents: number | null;
161
+ componentTaxAmountCents: number | null;
162
+ componentTotalAmountCents: number | null;
163
+ pricingSnapshot: import("@voyant-travel/trips").TripComponentPricingSnapshot | null;
164
+ taxLines: import("@voyant-travel/trips").TripComponentTaxLineSnapshot[] | null;
165
+ cancellationSnapshot: Record<string, unknown> | null;
166
+ holdToken: string | null;
167
+ holdExpiresAt: Date | null;
168
+ priceExpiresAt: Date | null;
169
+ warningCodes: string[];
170
+ }>;
171
+ export declare function updateTripComponent(client: FetchWithValidationOptions, componentId: string, input: UpdateTripComponentBody): Promise<{
172
+ id: string;
173
+ title: string | null;
174
+ description: string | null;
175
+ metadata: Record<string, unknown>;
176
+ status: "failed" | "cancelled" | "draft" | "priced" | "checkout_started" | "booked" | "unavailable" | "held" | "removed";
177
+ bookingGroupId: string | null;
178
+ orderId: string | null;
179
+ paymentSessionId: string | null;
180
+ createdAt: Date;
181
+ updatedAt: Date;
182
+ envelopeId: string;
183
+ sequence: number;
184
+ kind: "catalog_booking" | "manual_placeholder" | "flight_placeholder" | "flight_order" | "external_order";
185
+ entityModule: string | null;
186
+ entityId: string | null;
187
+ sourceKind: string | null;
188
+ sourceConnectionId: string | null;
189
+ sourceRef: string | null;
190
+ bookingDraftId: string | null;
191
+ catalogQuoteId: string | null;
192
+ bookingId: string | null;
193
+ providerRef: string | null;
194
+ supplierRef: string | null;
195
+ componentCurrency: string | null;
196
+ componentSubtotalAmountCents: number | null;
197
+ componentTaxAmountCents: number | null;
198
+ componentTotalAmountCents: number | null;
199
+ pricingSnapshot: import("@voyant-travel/trips").TripComponentPricingSnapshot | null;
200
+ taxLines: import("@voyant-travel/trips").TripComponentTaxLineSnapshot[] | null;
201
+ cancellationSnapshot: Record<string, unknown> | null;
202
+ holdToken: string | null;
203
+ holdExpiresAt: Date | null;
204
+ priceExpiresAt: Date | null;
205
+ warningCodes: string[];
206
+ }>;
207
+ export declare function priceTrip(client: FetchWithValidationOptions, envelopeId: string, input: PriceTripBody): Promise<import("@voyant-travel/trips").PriceTripResult>;
208
+ export declare function reserveTrip(client: FetchWithValidationOptions, envelopeId: string, input?: ReserveTripBody): Promise<import("@voyant-travel/trips").ReserveTripResult>;
209
+ export declare function startTripCheckout(client: FetchWithValidationOptions, envelopeId: string, input: StartTripCheckoutBody): Promise<import("@voyant-travel/trips").StartCheckoutResult>;
210
+ export declare function previewTripCancellation(client: FetchWithValidationOptions, envelopeId: string, input: PreviewTripCancellationBody): Promise<import("@voyant-travel/trips").TripCancellationPreviewResult>;
211
+ export declare function cancelTripComponents(client: FetchWithValidationOptions, envelopeId: string, input: CancelTripComponentsBody): Promise<import("@voyant-travel/trips").CancelTripComponentsResult>;
212
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,yBAAyB,EACzB,4BAA4B,EAC5B,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAelF,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AACD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,uBAAuB,EAAE,eAAe,GAAG,aAAa,CAAC,GACzF,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,eAAe,GAAG,aAAa,CAAC,CAAC,CAAA;AACzE,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,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AQ7B;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,0BAA0B,EAClC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,2BAA2B,yEAQnC;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,0BAA0B,EAClC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,wBAAwB,sEAQhC"}
@@ -0,0 +1,92 @@
1
+ "use client";
2
+ import { fetchWithValidation } from "./client.js";
3
+ import { cancelTripComponentsResponseSchema, previewTripCancellationResponseSchema, priceTripResponseSchema, quoteVersionSnapshotApplyResponseSchema, reserveTripResponseSchema, startTripCheckoutResponseSchema, tripComponentResponseSchema, tripListResponseSchema, tripResponseSchema, tripSnapshotResponseSchema, tripSnapshotsResponseSchema, } from "./schemas.js";
4
+ function composerPath(client, path) {
5
+ return `/v1/${client.surface ?? "admin"}/trips${path}`;
6
+ }
7
+ function adminComposerPath(path) {
8
+ return `/v1/admin/trips${path}`;
9
+ }
10
+ function withQuery(path, params = {}) {
11
+ const search = new URLSearchParams();
12
+ if (params.status)
13
+ search.set("status", params.status);
14
+ if (params.search)
15
+ search.set("search", params.search);
16
+ if (params.productId)
17
+ search.set("productId", params.productId);
18
+ if (params.accommodationId)
19
+ search.set("accommodationId", params.accommodationId);
20
+ if (params.cruiseId)
21
+ search.set("cruiseId", params.cruiseId);
22
+ if (params.hasFlight !== undefined)
23
+ search.set("hasFlight", String(params.hasFlight));
24
+ if (params.totalMinCents !== undefined) {
25
+ search.set("totalMinCents", String(params.totalMinCents));
26
+ }
27
+ if (params.totalMaxCents !== undefined) {
28
+ search.set("totalMaxCents", String(params.totalMaxCents));
29
+ }
30
+ if (params.createdFrom)
31
+ search.set("createdFrom", params.createdFrom);
32
+ if (params.createdTo)
33
+ search.set("createdTo", params.createdTo);
34
+ if (params.sortBy)
35
+ search.set("sortBy", params.sortBy);
36
+ if (params.sortDir)
37
+ search.set("sortDir", params.sortDir);
38
+ if (params.limit !== undefined)
39
+ search.set("limit", String(params.limit));
40
+ if (params.offset !== undefined)
41
+ search.set("offset", String(params.offset));
42
+ const suffix = search.toString();
43
+ return suffix ? `${path}?${suffix}` : path;
44
+ }
45
+ export function listTrips(client, params = {}) {
46
+ return fetchWithValidation(composerPath(client, withQuery("", params)), tripListResponseSchema, client);
47
+ }
48
+ export function createTrip(client, input) {
49
+ return fetchWithValidation(composerPath(client, ""), tripResponseSchema, client, {
50
+ method: "POST",
51
+ body: JSON.stringify(input),
52
+ }).then((response) => response.data);
53
+ }
54
+ export function getTrip(client, envelopeId) {
55
+ return fetchWithValidation(composerPath(client, `/${encodeURIComponent(envelopeId)}`), tripResponseSchema, client).then((response) => response.data);
56
+ }
57
+ export function listTripSnapshots(client, envelopeId) {
58
+ return fetchWithValidation(composerPath(client, `/${encodeURIComponent(envelopeId)}/snapshots`), tripSnapshotsResponseSchema, client).then((response) => response.data);
59
+ }
60
+ export function getTripSnapshot(client, snapshotId) {
61
+ return fetchWithValidation(composerPath(client, `/snapshots/${encodeURIComponent(snapshotId)}`), tripSnapshotResponseSchema, client).then((response) => response.data);
62
+ }
63
+ export function freezeTripSnapshot(client, envelopeId, input = {}) {
64
+ return fetchWithValidation(composerPath(client, `/${encodeURIComponent(envelopeId)}/snapshots`), tripSnapshotResponseSchema, client, { method: "POST", body: JSON.stringify(input) }).then((response) => response.data);
65
+ }
66
+ export function freezeTripSnapshotForQuoteVersion(client, envelopeId, quoteVersionId, input = {}) {
67
+ return fetchWithValidation(adminComposerPath(`/${encodeURIComponent(envelopeId)}/quote-versions/${encodeURIComponent(quoteVersionId)}/snapshot`), quoteVersionSnapshotApplyResponseSchema, client, { method: "POST", body: JSON.stringify(input) }).then((response) => response.data);
68
+ }
69
+ export function addTripComponent(client, envelopeId, input) {
70
+ return fetchWithValidation(composerPath(client, `/${encodeURIComponent(envelopeId)}/components`), tripComponentResponseSchema, client, { method: "POST", body: JSON.stringify(input) }).then((response) => response.data);
71
+ }
72
+ export function removeTripComponent(client, componentId) {
73
+ return fetchWithValidation(composerPath(client, `/components/${encodeURIComponent(componentId)}`), tripComponentResponseSchema, client, { method: "DELETE" }).then((response) => response.data);
74
+ }
75
+ export function updateTripComponent(client, componentId, input) {
76
+ return fetchWithValidation(composerPath(client, `/components/${encodeURIComponent(componentId)}`), tripComponentResponseSchema, client, { method: "PATCH", body: JSON.stringify(input) }).then((response) => response.data);
77
+ }
78
+ export function priceTrip(client, envelopeId, input) {
79
+ return fetchWithValidation(composerPath(client, `/${encodeURIComponent(envelopeId)}/price`), priceTripResponseSchema, client, { method: "POST", body: JSON.stringify(input) }).then((response) => response.data);
80
+ }
81
+ export function reserveTrip(client, envelopeId, input = {}) {
82
+ return fetchWithValidation(composerPath(client, `/${encodeURIComponent(envelopeId)}/reserve`), reserveTripResponseSchema, client, { method: "POST", body: JSON.stringify(input) }).then((response) => response.data);
83
+ }
84
+ export function startTripCheckout(client, envelopeId, input) {
85
+ return fetchWithValidation(composerPath(client, `/${encodeURIComponent(envelopeId)}/checkout`), startTripCheckoutResponseSchema, client, { method: "POST", body: JSON.stringify(input) }).then((response) => response.data);
86
+ }
87
+ export function previewTripCancellation(client, envelopeId, input) {
88
+ return fetchWithValidation(composerPath(client, `/${encodeURIComponent(envelopeId)}/cancellation-preview`), previewTripCancellationResponseSchema, client, { method: "POST", body: JSON.stringify(input) }).then((response) => response.data);
89
+ }
90
+ export function cancelTripComponents(client, envelopeId, input) {
91
+ return fetchWithValidation(composerPath(client, `/${encodeURIComponent(envelopeId)}/cancel-components`), cancelTripComponentsResponseSchema, client, { method: "POST", body: JSON.stringify(input) }).then((response) => response.data);
92
+ }
@@ -0,0 +1,2 @@
1
+ export { useVoyantReactContext as useVoyantTripsContext, type VoyantReactContextValue as VoyantTripsContextValue, VoyantReactProvider as VoyantTripsProvider, type VoyantReactProviderProps as VoyantTripsProviderProps, } from "@voyant-travel/react";
2
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,IAAI,qBAAqB,EAC9C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,mBAAmB,IAAI,mBAAmB,EAC1C,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,MAAM,sBAAsB,CAAA"}
@@ -0,0 +1 @@
1
+ export { useVoyantReactContext as useVoyantTripsContext, VoyantReactProvider as VoyantTripsProvider, } from "@voyant-travel/react";
@@ -0,0 +1,10 @@
1
+ export declare const tripsQueryKeys: {
2
+ readonly all: readonly ["voyant", "trips"];
3
+ readonly trips: () => readonly ["voyant", "trips", "trips"];
4
+ readonly tripList: (filters: Record<string, unknown>) => readonly ["voyant", "trips", "trips", "list", Record<string, unknown>];
5
+ readonly trip: (envelopeId: string) => readonly ["voyant", "trips", "trips", "detail", string];
6
+ readonly components: (envelopeId: string) => readonly ["voyant", "trips", "trips", "detail", string, "components"];
7
+ readonly pricing: (envelopeId: string) => readonly ["voyant", "trips", "trips", "detail", string, "pricing"];
8
+ readonly checkout: (envelopeId: string) => readonly ["voyant", "trips", "trips", "detail", string, "checkout"];
9
+ };
10
+ //# sourceMappingURL=query-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;iCAIL,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gCAExB,MAAM;sCAEA,MAAM;mCACT,MAAM;oCACL,MAAM;CACrB,CAAA"}
@@ -0,0 +1,9 @@
1
+ export const tripsQueryKeys = {
2
+ all: ["voyant", "trips"],
3
+ trips: () => [...tripsQueryKeys.all, "trips"],
4
+ tripList: (filters) => [...tripsQueryKeys.trips(), "list", filters],
5
+ trip: (envelopeId) => [...tripsQueryKeys.trips(), "detail", envelopeId],
6
+ components: (envelopeId) => [...tripsQueryKeys.trip(envelopeId), "components"],
7
+ pricing: (envelopeId) => [...tripsQueryKeys.trip(envelopeId), "pricing"],
8
+ checkout: (envelopeId) => [...tripsQueryKeys.trip(envelopeId), "checkout"],
9
+ };
@@ -0,0 +1,167 @@
1
+ import type { FetchWithValidationOptions } from "./client.js";
2
+ import { type ListTripsParams } from "./operations.js";
3
+ export declare function listTripsQueryOptions(client: FetchWithValidationOptions, params?: ListTripsParams): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@voyant-travel/trips").TripListResult, Error, import("@voyant-travel/trips").TripListResult, readonly ["voyant", "trips", "trips", "list", Record<string, unknown>]>, "queryFn"> & {
4
+ queryFn?: import("@tanstack/react-query").QueryFunction<import("@voyant-travel/trips").TripListResult, readonly ["voyant", "trips", "trips", "list", Record<string, unknown>], never> | undefined;
5
+ } & {
6
+ queryKey: readonly ["voyant", "trips", "trips", "list", Record<string, unknown>] & {
7
+ [dataTagSymbol]: import("@voyant-travel/trips").TripListResult;
8
+ [dataTagErrorSymbol]: Error;
9
+ };
10
+ };
11
+ export declare function getTripQueryOptions(client: FetchWithValidationOptions, envelopeId: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@voyant-travel/trips").Trip, Error, import("@voyant-travel/trips").Trip, readonly ["voyant", "trips", "trips", "detail", string]>, "queryFn"> & {
12
+ queryFn?: import("@tanstack/react-query").QueryFunction<import("@voyant-travel/trips").Trip, readonly ["voyant", "trips", "trips", "detail", string], never> | undefined;
13
+ } & {
14
+ queryKey: readonly ["voyant", "trips", "trips", "detail", string] & {
15
+ [dataTagSymbol]: import("@voyant-travel/trips").Trip;
16
+ [dataTagErrorSymbol]: Error;
17
+ };
18
+ };
19
+ export declare function getTripComponentsQueryOptions(client: FetchWithValidationOptions, envelopeId: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
20
+ id: string;
21
+ title: string | null;
22
+ description: string | null;
23
+ metadata: Record<string, unknown>;
24
+ status: "failed" | "cancelled" | "draft" | "priced" | "checkout_started" | "booked" | "unavailable" | "held" | "removed";
25
+ bookingGroupId: string | null;
26
+ orderId: string | null;
27
+ paymentSessionId: string | null;
28
+ createdAt: Date;
29
+ updatedAt: Date;
30
+ envelopeId: string;
31
+ sequence: number;
32
+ kind: "catalog_booking" | "manual_placeholder" | "flight_placeholder" | "flight_order" | "external_order";
33
+ entityModule: string | null;
34
+ entityId: string | null;
35
+ sourceKind: string | null;
36
+ sourceConnectionId: string | null;
37
+ sourceRef: string | null;
38
+ bookingDraftId: string | null;
39
+ catalogQuoteId: string | null;
40
+ bookingId: string | null;
41
+ providerRef: string | null;
42
+ supplierRef: string | null;
43
+ componentCurrency: string | null;
44
+ componentSubtotalAmountCents: number | null;
45
+ componentTaxAmountCents: number | null;
46
+ componentTotalAmountCents: number | null;
47
+ pricingSnapshot: import("@voyant-travel/trips").TripComponentPricingSnapshot | null;
48
+ taxLines: import("@voyant-travel/trips").TripComponentTaxLineSnapshot[] | null;
49
+ cancellationSnapshot: Record<string, unknown> | null;
50
+ holdToken: string | null;
51
+ holdExpiresAt: Date | null;
52
+ priceExpiresAt: Date | null;
53
+ warningCodes: string[];
54
+ }[], Error, {
55
+ id: string;
56
+ title: string | null;
57
+ description: string | null;
58
+ metadata: Record<string, unknown>;
59
+ status: "failed" | "cancelled" | "draft" | "priced" | "checkout_started" | "booked" | "unavailable" | "held" | "removed";
60
+ bookingGroupId: string | null;
61
+ orderId: string | null;
62
+ paymentSessionId: string | null;
63
+ createdAt: Date;
64
+ updatedAt: Date;
65
+ envelopeId: string;
66
+ sequence: number;
67
+ kind: "catalog_booking" | "manual_placeholder" | "flight_placeholder" | "flight_order" | "external_order";
68
+ entityModule: string | null;
69
+ entityId: string | null;
70
+ sourceKind: string | null;
71
+ sourceConnectionId: string | null;
72
+ sourceRef: string | null;
73
+ bookingDraftId: string | null;
74
+ catalogQuoteId: string | null;
75
+ bookingId: string | null;
76
+ providerRef: string | null;
77
+ supplierRef: string | null;
78
+ componentCurrency: string | null;
79
+ componentSubtotalAmountCents: number | null;
80
+ componentTaxAmountCents: number | null;
81
+ componentTotalAmountCents: number | null;
82
+ pricingSnapshot: import("@voyant-travel/trips").TripComponentPricingSnapshot | null;
83
+ taxLines: import("@voyant-travel/trips").TripComponentTaxLineSnapshot[] | null;
84
+ cancellationSnapshot: Record<string, unknown> | null;
85
+ holdToken: string | null;
86
+ holdExpiresAt: Date | null;
87
+ priceExpiresAt: Date | null;
88
+ warningCodes: string[];
89
+ }[], readonly ["voyant", "trips", "trips", "detail", string, "components"]>, "queryFn"> & {
90
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
91
+ id: string;
92
+ title: string | null;
93
+ description: string | null;
94
+ metadata: Record<string, unknown>;
95
+ status: "failed" | "cancelled" | "draft" | "priced" | "checkout_started" | "booked" | "unavailable" | "held" | "removed";
96
+ bookingGroupId: string | null;
97
+ orderId: string | null;
98
+ paymentSessionId: string | null;
99
+ createdAt: Date;
100
+ updatedAt: Date;
101
+ envelopeId: string;
102
+ sequence: number;
103
+ kind: "catalog_booking" | "manual_placeholder" | "flight_placeholder" | "flight_order" | "external_order";
104
+ entityModule: string | null;
105
+ entityId: string | null;
106
+ sourceKind: string | null;
107
+ sourceConnectionId: string | null;
108
+ sourceRef: string | null;
109
+ bookingDraftId: string | null;
110
+ catalogQuoteId: string | null;
111
+ bookingId: string | null;
112
+ providerRef: string | null;
113
+ supplierRef: string | null;
114
+ componentCurrency: string | null;
115
+ componentSubtotalAmountCents: number | null;
116
+ componentTaxAmountCents: number | null;
117
+ componentTotalAmountCents: number | null;
118
+ pricingSnapshot: import("@voyant-travel/trips").TripComponentPricingSnapshot | null;
119
+ taxLines: import("@voyant-travel/trips").TripComponentTaxLineSnapshot[] | null;
120
+ cancellationSnapshot: Record<string, unknown> | null;
121
+ holdToken: string | null;
122
+ holdExpiresAt: Date | null;
123
+ priceExpiresAt: Date | null;
124
+ warningCodes: string[];
125
+ }[], readonly ["voyant", "trips", "trips", "detail", string, "components"], never> | undefined;
126
+ } & {
127
+ queryKey: readonly ["voyant", "trips", "trips", "detail", string, "components"] & {
128
+ [dataTagSymbol]: {
129
+ id: string;
130
+ title: string | null;
131
+ description: string | null;
132
+ metadata: Record<string, unknown>;
133
+ status: "failed" | "cancelled" | "draft" | "priced" | "checkout_started" | "booked" | "unavailable" | "held" | "removed";
134
+ bookingGroupId: string | null;
135
+ orderId: string | null;
136
+ paymentSessionId: string | null;
137
+ createdAt: Date;
138
+ updatedAt: Date;
139
+ envelopeId: string;
140
+ sequence: number;
141
+ kind: "catalog_booking" | "manual_placeholder" | "flight_placeholder" | "flight_order" | "external_order";
142
+ entityModule: string | null;
143
+ entityId: string | null;
144
+ sourceKind: string | null;
145
+ sourceConnectionId: string | null;
146
+ sourceRef: string | null;
147
+ bookingDraftId: string | null;
148
+ catalogQuoteId: string | null;
149
+ bookingId: string | null;
150
+ providerRef: string | null;
151
+ supplierRef: string | null;
152
+ componentCurrency: string | null;
153
+ componentSubtotalAmountCents: number | null;
154
+ componentTaxAmountCents: number | null;
155
+ componentTotalAmountCents: number | null;
156
+ pricingSnapshot: import("@voyant-travel/trips").TripComponentPricingSnapshot | null;
157
+ taxLines: import("@voyant-travel/trips").TripComponentTaxLineSnapshot[] | null;
158
+ cancellationSnapshot: Record<string, unknown> | null;
159
+ holdToken: string | null;
160
+ holdExpiresAt: Date | null;
161
+ priceExpiresAt: Date | null;
162
+ warningCodes: string[];
163
+ }[];
164
+ [dataTagErrorSymbol]: Error;
165
+ };
166
+ };
167
+ //# sourceMappingURL=query-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EAAW,KAAK,eAAe,EAAa,MAAM,iBAAiB,CAAA;AAG1E,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,0BAA0B,EAClC,MAAM,GAAE,eAAoB;;;;;;;EAM7B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,0BAA0B,EAAE,UAAU,EAAE,MAAM;;;;;;;EAKzF;AAED,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,0BAA0B,EAClC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMnB"}
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import { queryOptions } from "@tanstack/react-query";
3
+ import { getTrip, listTrips } from "./operations.js";
4
+ import { tripsQueryKeys } from "./query-keys.js";
5
+ export function listTripsQueryOptions(client, params = {}) {
6
+ return queryOptions({
7
+ queryKey: tripsQueryKeys.tripList(params),
8
+ queryFn: () => listTrips(client, params),
9
+ });
10
+ }
11
+ export function getTripQueryOptions(client, envelopeId) {
12
+ return queryOptions({
13
+ queryKey: tripsQueryKeys.trip(envelopeId),
14
+ queryFn: () => getTrip(client, envelopeId),
15
+ });
16
+ }
17
+ export function getTripComponentsQueryOptions(client, envelopeId) {
18
+ return queryOptions({
19
+ queryKey: tripsQueryKeys.components(envelopeId),
20
+ queryFn: () => getTrip(client, envelopeId).then((trip) => trip.components),
21
+ });
22
+ }
@@ -0,0 +1,69 @@
1
+ import type { CancelTripComponentsResult, PriceTripResult, ReserveTripResult, StartCheckoutResult, Trip, TripCancellationPreviewResult, TripComponent, TripEnvelope, TripListResult, TripSnapshot } from "@voyant-travel/trips";
2
+ import { z } from "zod";
3
+ export type QuoteVersionSnapshotApplyResult = {
4
+ snapshot: TripSnapshot;
5
+ quoteVersion: {
6
+ id: string;
7
+ quoteId: string;
8
+ status: string;
9
+ tripSnapshotId: string | null;
10
+ currency: string;
11
+ subtotalAmountCents: number;
12
+ taxAmountCents: number;
13
+ totalAmountCents: number;
14
+ [key: string]: unknown;
15
+ };
16
+ lines: Array<{
17
+ id: string;
18
+ quoteVersionId: string;
19
+ productId: string | null;
20
+ supplierServiceId: string | null;
21
+ description: string;
22
+ quantity: number;
23
+ unitPriceAmountCents: number;
24
+ totalAmountCents: number;
25
+ currency: string;
26
+ [key: string]: unknown;
27
+ }>;
28
+ };
29
+ export declare const singleEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
30
+ data: T;
31
+ }, z.core.$strip>;
32
+ export declare const tripResponseSchema: z.ZodType<{
33
+ data: Trip;
34
+ }>;
35
+ export declare const tripListResponseSchema: z.ZodType<TripListResult>;
36
+ export declare const tripEnvelopeResponseSchema: z.ZodType<{
37
+ data: TripEnvelope;
38
+ }>;
39
+ export declare const tripComponentResponseSchema: z.ZodType<{
40
+ data: TripComponent;
41
+ }>;
42
+ export declare const tripComponentsResponseSchema: z.ZodType<{
43
+ data: Trip["components"];
44
+ }>;
45
+ export declare const tripSnapshotResponseSchema: z.ZodType<{
46
+ data: TripSnapshot;
47
+ }>;
48
+ export declare const tripSnapshotsResponseSchema: z.ZodType<{
49
+ data: TripSnapshot[];
50
+ }>;
51
+ export declare const quoteVersionSnapshotApplyResponseSchema: z.ZodType<{
52
+ data: QuoteVersionSnapshotApplyResult;
53
+ }>;
54
+ export declare const priceTripResponseSchema: z.ZodType<{
55
+ data: PriceTripResult;
56
+ }>;
57
+ export declare const reserveTripResponseSchema: z.ZodType<{
58
+ data: ReserveTripResult;
59
+ }>;
60
+ export declare const startTripCheckoutResponseSchema: z.ZodType<{
61
+ data: StartCheckoutResult;
62
+ }>;
63
+ export declare const previewTripCancellationResponseSchema: z.ZodType<{
64
+ data: TripCancellationPreviewResult;
65
+ }>;
66
+ export declare const cancelTripComponentsResponseSchema: z.ZodType<{
67
+ data: CancelTripComponentsResult;
68
+ }>;
69
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"m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,EAAE,0BAA0B,CAAA;CACjC,CAAC,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+ export const singleEnvelope = (item) => z.object({ data: item });
3
+ const unknownData = z.unknown();
4
+ export const tripResponseSchema = singleEnvelope(unknownData);
5
+ export const tripListResponseSchema = unknownData;
6
+ export const tripEnvelopeResponseSchema = singleEnvelope(unknownData);
7
+ export const tripComponentResponseSchema = singleEnvelope(unknownData);
8
+ export const tripComponentsResponseSchema = singleEnvelope(unknownData);
9
+ export const tripSnapshotResponseSchema = singleEnvelope(unknownData);
10
+ export const tripSnapshotsResponseSchema = singleEnvelope(unknownData);
11
+ export const quoteVersionSnapshotApplyResponseSchema = singleEnvelope(unknownData);
12
+ export const priceTripResponseSchema = singleEnvelope(unknownData);
13
+ export const reserveTripResponseSchema = singleEnvelope(unknownData);
14
+ export const startTripCheckoutResponseSchema = singleEnvelope(unknownData);
15
+ export const previewTripCancellationResponseSchema = singleEnvelope(unknownData);
16
+ export const cancelTripComponentsResponseSchema = singleEnvelope(unknownData);