@voyant-travel/bookings-react 0.136.2 → 0.137.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/admin/index.d.ts +10 -10
  2. package/dist/components/booking-create-sheet.d.ts +1 -1
  3. package/dist/components/booking-create-sheet.js +1 -1
  4. package/dist/components/file-dropzone.d.ts +1 -1
  5. package/dist/components/file-dropzone.d.ts.map +1 -1
  6. package/dist/components/file-dropzone.js +1 -1
  7. package/dist/components/option-units-stepper-section.d.ts +1 -1
  8. package/dist/components/option-units-stepper-section.js +1 -1
  9. package/dist/components/voucher-picker-section.d.ts +1 -1
  10. package/dist/components/voucher-picker-section.js +1 -1
  11. package/dist/extras/hooks/use-product-extra.d.ts +3 -3
  12. package/dist/extras/hooks/use-product-extras.d.ts +3 -3
  13. package/dist/extras/hooks/use-slot-extra-manifest-mutation.js +3 -3
  14. package/dist/extras/hooks/use-slot-extra-manifest.d.ts +5 -5
  15. package/dist/extras/query-options.d.ts +44 -44
  16. package/dist/extras/query-options.js +3 -3
  17. package/dist/extras/schemas.d.ts +34 -34
  18. package/dist/hooks/use-booking-action-ledger.d.ts +4 -4
  19. package/dist/hooks/use-booking-cancel-mutation.d.ts +2 -2
  20. package/dist/hooks/use-booking-cancel-mutation.js +2 -2
  21. package/dist/hooks/use-booking-convert-mutation.d.ts +2 -2
  22. package/dist/hooks/use-booking-convert-mutation.js +2 -2
  23. package/dist/hooks/use-booking-create-mutation.d.ts +5 -5
  24. package/dist/hooks/use-booking-create-mutation.js +2 -2
  25. package/dist/hooks/use-booking-documents.js +2 -2
  26. package/dist/hooks/use-booking-dual-create-mutation.d.ts +9 -9
  27. package/dist/hooks/use-booking-dual-create-mutation.js +2 -2
  28. package/dist/hooks/use-booking-group-for-booking.d.ts +1 -1
  29. package/dist/hooks/use-booking-group-member-mutation.d.ts +1 -1
  30. package/dist/hooks/use-booking-group-member-mutation.js +2 -2
  31. package/dist/hooks/use-booking-group-mutation.js +3 -3
  32. package/dist/hooks/use-booking-group.d.ts +2 -2
  33. package/dist/hooks/use-booking-item-mutation.d.ts +6 -6
  34. package/dist/hooks/use-booking-item-mutation.js +3 -3
  35. package/dist/hooks/use-booking-item-travelers.d.ts +2 -2
  36. package/dist/hooks/use-booking-item-travelers.js +2 -2
  37. package/dist/hooks/use-booking-items.d.ts +2 -2
  38. package/dist/hooks/use-booking-mutation.d.ts +2 -2
  39. package/dist/hooks/use-booking-mutation.js +3 -3
  40. package/dist/hooks/use-booking-note-mutation.js +3 -3
  41. package/dist/hooks/use-booking-status-mutation.d.ts +2 -2
  42. package/dist/hooks/use-booking.d.ts +1 -1
  43. package/dist/hooks/use-bookings.d.ts +1 -1
  44. package/dist/hooks/use-public-booking-session-flow-mutation.d.ts +4 -4
  45. package/dist/hooks/use-public-booking-session.d.ts +4 -4
  46. package/dist/hooks/use-reveal-traveler.d.ts +1 -1
  47. package/dist/hooks/use-supplier-status-mutation.js +2 -2
  48. package/dist/hooks/use-traveler-mutation.js +3 -3
  49. package/dist/hooks/use-traveler-with-travel-details-mutation.d.ts +2 -2
  50. package/dist/hooks/use-traveler-with-travel-details-mutation.js +2 -2
  51. package/dist/query-options.d.ts +52 -52
  52. package/dist/query-options.d.ts.map +1 -1
  53. package/dist/query-options.js +16 -16
  54. package/dist/requirements/hooks/use-booking-questions.d.ts +2 -2
  55. package/dist/requirements/hooks/use-contact-requirements.d.ts +2 -2
  56. package/dist/requirements/hooks/use-transport-requirements.d.ts +1 -1
  57. package/dist/requirements/query-options.d.ts +20 -20
  58. package/dist/requirements/query-options.js +4 -4
  59. package/dist/requirements/schemas.d.ts +32 -32
  60. package/dist/schemas.d.ts +110 -110
  61. package/dist/status-presentation.d.ts +1 -1
  62. package/package.json +24 -24
@@ -14,25 +14,25 @@ export declare const productExtraRecordSchema: z.ZodObject<{
14
14
  name: z.ZodString;
15
15
  description: z.ZodNullable<z.ZodString>;
16
16
  selectionType: z.ZodEnum<{
17
- required: "required";
18
17
  optional: "optional";
19
- unavailable: "unavailable";
18
+ required: "required";
20
19
  default_selected: "default_selected";
20
+ unavailable: "unavailable";
21
21
  }>;
22
22
  pricingMode: z.ZodEnum<{
23
23
  on_request: "on_request";
24
- per_booking: "per_booking";
25
24
  included: "included";
26
25
  per_person: "per_person";
26
+ per_booking: "per_booking";
27
27
  quantity_based: "quantity_based";
28
28
  free: "free";
29
29
  }>;
30
30
  pricedPerPerson: z.ZodBoolean;
31
31
  collectionMode: z.ZodEnum<{
32
- none: "none";
33
- external: "external";
34
32
  cash_on_trip: "cash_on_trip";
33
+ external: "external";
35
34
  included: "included";
35
+ none: "none";
36
36
  booking_total: "booking_total";
37
37
  }>;
38
38
  showOnSlotManifest: z.ZodBoolean;
@@ -54,25 +54,25 @@ export declare const productExtraListResponse: z.ZodObject<{
54
54
  name: z.ZodString;
55
55
  description: z.ZodNullable<z.ZodString>;
56
56
  selectionType: z.ZodEnum<{
57
- required: "required";
58
57
  optional: "optional";
59
- unavailable: "unavailable";
58
+ required: "required";
60
59
  default_selected: "default_selected";
60
+ unavailable: "unavailable";
61
61
  }>;
62
62
  pricingMode: z.ZodEnum<{
63
63
  on_request: "on_request";
64
- per_booking: "per_booking";
65
64
  included: "included";
66
65
  per_person: "per_person";
66
+ per_booking: "per_booking";
67
67
  quantity_based: "quantity_based";
68
68
  free: "free";
69
69
  }>;
70
70
  pricedPerPerson: z.ZodBoolean;
71
71
  collectionMode: z.ZodEnum<{
72
- none: "none";
73
- external: "external";
74
72
  cash_on_trip: "cash_on_trip";
73
+ external: "external";
75
74
  included: "included";
75
+ none: "none";
76
76
  booking_total: "booking_total";
77
77
  }>;
78
78
  showOnSlotManifest: z.ZodBoolean;
@@ -97,25 +97,25 @@ export declare const productExtraSingleResponse: z.ZodObject<{
97
97
  name: z.ZodString;
98
98
  description: z.ZodNullable<z.ZodString>;
99
99
  selectionType: z.ZodEnum<{
100
- required: "required";
101
100
  optional: "optional";
102
- unavailable: "unavailable";
101
+ required: "required";
103
102
  default_selected: "default_selected";
103
+ unavailable: "unavailable";
104
104
  }>;
105
105
  pricingMode: z.ZodEnum<{
106
106
  on_request: "on_request";
107
- per_booking: "per_booking";
108
107
  included: "included";
109
108
  per_person: "per_person";
109
+ per_booking: "per_booking";
110
110
  quantity_based: "quantity_based";
111
111
  free: "free";
112
112
  }>;
113
113
  pricedPerPerson: z.ZodBoolean;
114
114
  collectionMode: z.ZodEnum<{
115
- none: "none";
116
- external: "external";
117
115
  cash_on_trip: "cash_on_trip";
116
+ external: "external";
118
117
  included: "included";
118
+ none: "none";
119
119
  booking_total: "booking_total";
120
120
  }>;
121
121
  showOnSlotManifest: z.ZodBoolean;
@@ -168,10 +168,10 @@ export declare const slotExtraManifestSelectionSchema: z.ZodObject<{
168
168
  }>;
169
169
  selected: z.ZodBoolean;
170
170
  collectionMode: z.ZodEnum<{
171
- none: "none";
172
- external: "external";
173
171
  cash_on_trip: "cash_on_trip";
172
+ external: "external";
174
173
  included: "included";
174
+ none: "none";
175
175
  booking_total: "booking_total";
176
176
  }>;
177
177
  collectionStatus: z.ZodEnum<{
@@ -188,9 +188,9 @@ export declare const slotExtraManifestSelectionSchema: z.ZodObject<{
188
188
  notes: z.ZodNullable<z.ZodString>;
189
189
  metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
190
190
  source: z.ZodEnum<{
191
- empty: "empty";
192
191
  selection: "selection";
193
192
  booking_item: "booking_item";
193
+ empty: "empty";
194
194
  }>;
195
195
  }, z.core.$strip>;
196
196
  export declare const slotExtraManifestSchema: z.ZodObject<{
@@ -211,25 +211,25 @@ export declare const slotExtraManifestSchema: z.ZodObject<{
211
211
  name: z.ZodString;
212
212
  description: z.ZodNullable<z.ZodString>;
213
213
  selectionType: z.ZodEnum<{
214
- required: "required";
215
214
  optional: "optional";
216
- unavailable: "unavailable";
215
+ required: "required";
217
216
  default_selected: "default_selected";
217
+ unavailable: "unavailable";
218
218
  }>;
219
219
  pricingMode: z.ZodEnum<{
220
220
  on_request: "on_request";
221
- per_booking: "per_booking";
222
221
  included: "included";
223
222
  per_person: "per_person";
223
+ per_booking: "per_booking";
224
224
  quantity_based: "quantity_based";
225
225
  free: "free";
226
226
  }>;
227
227
  pricedPerPerson: z.ZodBoolean;
228
228
  collectionMode: z.ZodEnum<{
229
- none: "none";
230
- external: "external";
231
229
  cash_on_trip: "cash_on_trip";
230
+ external: "external";
232
231
  included: "included";
232
+ none: "none";
233
233
  booking_total: "booking_total";
234
234
  }>;
235
235
  showOnSlotManifest: z.ZodBoolean;
@@ -271,10 +271,10 @@ export declare const slotExtraManifestSchema: z.ZodObject<{
271
271
  }>;
272
272
  selected: z.ZodBoolean;
273
273
  collectionMode: z.ZodEnum<{
274
- none: "none";
275
- external: "external";
276
274
  cash_on_trip: "cash_on_trip";
275
+ external: "external";
277
276
  included: "included";
277
+ none: "none";
278
278
  booking_total: "booking_total";
279
279
  }>;
280
280
  collectionStatus: z.ZodEnum<{
@@ -291,9 +291,9 @@ export declare const slotExtraManifestSchema: z.ZodObject<{
291
291
  notes: z.ZodNullable<z.ZodString>;
292
292
  metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
293
293
  source: z.ZodEnum<{
294
- empty: "empty";
295
294
  selection: "selection";
296
295
  booking_item: "booking_item";
296
+ empty: "empty";
297
297
  }>;
298
298
  }, z.core.$strip>>;
299
299
  }, z.core.$strip>;
@@ -316,25 +316,25 @@ export declare const slotExtraManifestResponse: z.ZodObject<{
316
316
  name: z.ZodString;
317
317
  description: z.ZodNullable<z.ZodString>;
318
318
  selectionType: z.ZodEnum<{
319
- required: "required";
320
319
  optional: "optional";
321
- unavailable: "unavailable";
320
+ required: "required";
322
321
  default_selected: "default_selected";
322
+ unavailable: "unavailable";
323
323
  }>;
324
324
  pricingMode: z.ZodEnum<{
325
325
  on_request: "on_request";
326
- per_booking: "per_booking";
327
326
  included: "included";
328
327
  per_person: "per_person";
328
+ per_booking: "per_booking";
329
329
  quantity_based: "quantity_based";
330
330
  free: "free";
331
331
  }>;
332
332
  pricedPerPerson: z.ZodBoolean;
333
333
  collectionMode: z.ZodEnum<{
334
- none: "none";
335
- external: "external";
336
334
  cash_on_trip: "cash_on_trip";
335
+ external: "external";
337
336
  included: "included";
337
+ none: "none";
338
338
  booking_total: "booking_total";
339
339
  }>;
340
340
  showOnSlotManifest: z.ZodBoolean;
@@ -376,10 +376,10 @@ export declare const slotExtraManifestResponse: z.ZodObject<{
376
376
  }>;
377
377
  selected: z.ZodBoolean;
378
378
  collectionMode: z.ZodEnum<{
379
- none: "none";
380
- external: "external";
381
379
  cash_on_trip: "cash_on_trip";
380
+ external: "external";
382
381
  included: "included";
382
+ none: "none";
383
383
  booking_total: "booking_total";
384
384
  }>;
385
385
  collectionStatus: z.ZodEnum<{
@@ -396,9 +396,9 @@ export declare const slotExtraManifestResponse: z.ZodObject<{
396
396
  notes: z.ZodNullable<z.ZodString>;
397
397
  metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
398
398
  source: z.ZodEnum<{
399
- empty: "empty";
400
399
  selection: "selection";
401
400
  booking_item: "booking_item";
401
+ empty: "empty";
402
402
  }>;
403
403
  }, z.core.$strip>>;
404
404
  }, z.core.$strip>;
@@ -16,17 +16,17 @@ export declare function useBookingActionLedger(bookingId: string | null | undefi
16
16
  occurredAt: string;
17
17
  actionName: string;
18
18
  actionVersion: string;
19
- actionKind: "reverse" | "execute" | "read" | "delete" | "create" | "update" | "approve" | "reject" | "compensate" | "duplicate";
20
- status: "reversed" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "compensated" | "expired" | "cancelled" | "superseded";
19
+ actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate";
20
+ status: "cancelled" | "expired" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "superseded";
21
21
  evaluatedRisk: "high" | "low" | "medium" | "critical";
22
22
  actorType: string | null;
23
- principalType: "user" | "system" | "api_key" | "agent" | "workflow";
23
+ principalType: "user" | "api_key" | "agent" | "workflow" | "system";
24
24
  principalId: string;
25
25
  principalSubtype: string | null;
26
26
  sessionId: string | null;
27
27
  apiTokenId: string | null;
28
28
  internalRequest: boolean;
29
- delegatedByPrincipalType: "user" | "system" | "api_key" | "agent" | "workflow" | null;
29
+ delegatedByPrincipalType: "user" | "api_key" | "agent" | "workflow" | "system" | null;
30
30
  delegatedByPrincipalId: string | null;
31
31
  delegationId: string | null;
32
32
  callerType: string | null;
@@ -2,13 +2,13 @@ export interface CancelBookingInput {
2
2
  note?: string | null;
3
3
  }
4
4
  /**
5
- * Cancels a booking via POST /v1/bookings/:id/cancel.
5
+ * Cancels a booking via POST /v1/admin/bookings/:id/cancel.
6
6
  * The backend releases allocations, cancels items, and logs a status-change activity.
7
7
  */
8
8
  export declare function useBookingCancelMutation(bookingId: string): import("@tanstack/react-query").UseMutationResult<{
9
9
  id: string;
10
10
  bookingNumber: string;
11
- status: "draft" | "expired" | "cancelled" | "completed" | "confirmed" | "on_hold" | "awaiting_payment" | "in_progress";
11
+ status: "draft" | "cancelled" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
12
12
  personId: string | null;
13
13
  organizationId: string | null;
14
14
  sellCurrency: string;
@@ -5,7 +5,7 @@ import { useVoyantBookingsContext } from "../provider.js";
5
5
  import { bookingsQueryKeys } from "../query-keys.js";
6
6
  import { bookingSingleResponse } from "../schemas.js";
7
7
  /**
8
- * Cancels a booking via POST /v1/bookings/:id/cancel.
8
+ * Cancels a booking via POST /v1/admin/bookings/:id/cancel.
9
9
  * The backend releases allocations, cancels items, and logs a status-change activity.
10
10
  */
11
11
  export function useBookingCancelMutation(bookingId) {
@@ -13,7 +13,7 @@ export function useBookingCancelMutation(bookingId) {
13
13
  const queryClient = useQueryClient();
14
14
  return useMutation({
15
15
  mutationFn: async (input) => {
16
- const { data } = await fetchWithValidation(`/v1/bookings/${bookingId}/cancel`, bookingSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input ?? {}) });
16
+ const { data } = await fetchWithValidation(`/v1/admin/bookings/${bookingId}/cancel`, bookingSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input ?? {}) });
17
17
  return data;
18
18
  },
19
19
  onSuccess: () => {
@@ -13,14 +13,14 @@ export interface ConvertProductToBookingInput {
13
13
  internalNotes?: string | null;
14
14
  }
15
15
  /**
16
- * Creates a draft booking from a product via POST /v1/bookings/from-product.
16
+ * Creates a draft booking from a product via POST /v1/admin/bookings/from-product.
17
17
  * Purpose-built for the operator booking-create flow — the backend seeds items,
18
18
  * dates, and pricing from the product definition.
19
19
  */
20
20
  export declare function useBookingConvertMutation(): import("@tanstack/react-query").UseMutationResult<{
21
21
  id: string;
22
22
  bookingNumber: string;
23
- status: "draft" | "expired" | "cancelled" | "completed" | "confirmed" | "on_hold" | "awaiting_payment" | "in_progress";
23
+ status: "draft" | "cancelled" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
24
24
  personId: string | null;
25
25
  organizationId: string | null;
26
26
  sellCurrency: string;
@@ -5,7 +5,7 @@ import { useVoyantBookingsContext } from "../provider.js";
5
5
  import { bookingsQueryKeys } from "../query-keys.js";
6
6
  import { bookingSingleResponse } from "../schemas.js";
7
7
  /**
8
- * Creates a draft booking from a product via POST /v1/bookings/from-product.
8
+ * Creates a draft booking from a product via POST /v1/admin/bookings/from-product.
9
9
  * Purpose-built for the operator booking-create flow — the backend seeds items,
10
10
  * dates, and pricing from the product definition.
11
11
  */
@@ -14,7 +14,7 @@ export function useBookingConvertMutation() {
14
14
  const queryClient = useQueryClient();
15
15
  return useMutation({
16
16
  mutationFn: async (input) => {
17
- const { data } = await fetchWithValidation("/v1/bookings/from-product", bookingSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
17
+ const { data } = await fetchWithValidation("/v1/admin/bookings/from-product", bookingSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
18
18
  return data;
19
19
  },
20
20
  onSuccess: () => {
@@ -175,13 +175,13 @@ declare const bookingCreateResultSchema: z.ZodObject<{
175
175
  bookingNumber: z.ZodString;
176
176
  status: z.ZodEnum<{
177
177
  draft: "draft";
178
- expired: "expired";
179
178
  cancelled: "cancelled";
180
- completed: "completed";
181
- confirmed: "confirmed";
182
179
  on_hold: "on_hold";
183
180
  awaiting_payment: "awaiting_payment";
181
+ confirmed: "confirmed";
184
182
  in_progress: "in_progress";
183
+ completed: "completed";
184
+ expired: "expired";
185
185
  }>;
186
186
  personId: z.ZodNullable<z.ZodString>;
187
187
  organizationId: z.ZodNullable<z.ZodString>;
@@ -257,7 +257,7 @@ declare const bookingCreateResultSchema: z.ZodObject<{
257
257
  }, z.core.$strip>;
258
258
  export type BookingCreateResult = z.infer<typeof bookingCreateResultSchema>;
259
259
  /**
260
- * Atomic booking-create: calls `POST /v1/bookings/create` which wraps
260
+ * Atomic booking-create: calls `POST /v1/admin/bookings/create` which wraps
261
261
  * convert-from-product + travelers + payment schedules + voucher redemption
262
262
  * + group membership in one transaction. Prefer this over chaining the
263
263
  * separate create mutations (convert, group, traveler) from a single submit
@@ -267,7 +267,7 @@ export declare function useBookingCreateMutation(): import("@tanstack/react-quer
267
267
  booking: {
268
268
  id: string;
269
269
  bookingNumber: string;
270
- status: "draft" | "expired" | "cancelled" | "completed" | "confirmed" | "on_hold" | "awaiting_payment" | "in_progress";
270
+ status: "draft" | "cancelled" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
271
271
  personId: string | null;
272
272
  organizationId: string | null;
273
273
  sellCurrency: string;
@@ -22,7 +22,7 @@ const bookingCreateResultSchema = z.object({
22
22
  });
23
23
  const bookingCreateResponseSchema = z.object({ data: bookingCreateResultSchema });
24
24
  /**
25
- * Atomic booking-create: calls `POST /v1/bookings/create` which wraps
25
+ * Atomic booking-create: calls `POST /v1/admin/bookings/create` which wraps
26
26
  * convert-from-product + travelers + payment schedules + voucher redemption
27
27
  * + group membership in one transaction. Prefer this over chaining the
28
28
  * separate create mutations (convert, group, traveler) from a single submit
@@ -33,7 +33,7 @@ export function useBookingCreateMutation() {
33
33
  const queryClient = useQueryClient();
34
34
  return useMutation({
35
35
  mutationFn: async (input) => {
36
- const { data } = await fetchWithValidation("/v1/bookings/create", bookingCreateResponseSchema, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
36
+ const { data } = await fetchWithValidation("/v1/admin/bookings/create", bookingCreateResponseSchema, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
37
37
  return data;
38
38
  },
39
39
  onSuccess: () => {
@@ -21,7 +21,7 @@ export function useBookingTravelerDocumentMutation(bookingId) {
21
21
  };
22
22
  const create = useMutation({
23
23
  mutationFn: async (input) => {
24
- const { data } = await fetchWithValidation(`/v1/bookings/${bookingId}/documents`, bookingSingleResponse.extend({
24
+ const { data } = await fetchWithValidation(`/v1/admin/bookings/${bookingId}/documents`, bookingSingleResponse.extend({
25
25
  data: bookingTravelerDocumentsResponse.shape.data.element,
26
26
  }), { baseUrl, fetcher }, {
27
27
  method: "POST",
@@ -39,7 +39,7 @@ export function useBookingTravelerDocumentMutation(bookingId) {
39
39
  onSuccess: invalidate,
40
40
  });
41
41
  const remove = useMutation({
42
- mutationFn: async (documentId) => fetchWithValidation(`/v1/bookings/${bookingId}/documents/${documentId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
42
+ mutationFn: async (documentId) => fetchWithValidation(`/v1/admin/bookings/${bookingId}/documents/${documentId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
43
43
  onSuccess: invalidate,
44
44
  });
45
45
  return { create, remove };
@@ -27,13 +27,13 @@ declare const dualCreateResultSchema: z.ZodObject<{
27
27
  bookingNumber: z.ZodString;
28
28
  status: z.ZodEnum<{
29
29
  draft: "draft";
30
- expired: "expired";
31
30
  cancelled: "cancelled";
32
- completed: "completed";
33
- confirmed: "confirmed";
34
31
  on_hold: "on_hold";
35
32
  awaiting_payment: "awaiting_payment";
33
+ confirmed: "confirmed";
36
34
  in_progress: "in_progress";
35
+ completed: "completed";
36
+ expired: "expired";
37
37
  }>;
38
38
  personId: z.ZodNullable<z.ZodString>;
39
39
  organizationId: z.ZodNullable<z.ZodString>;
@@ -109,13 +109,13 @@ declare const dualCreateResultSchema: z.ZodObject<{
109
109
  bookingNumber: z.ZodString;
110
110
  status: z.ZodEnum<{
111
111
  draft: "draft";
112
- expired: "expired";
113
112
  cancelled: "cancelled";
114
- completed: "completed";
115
- confirmed: "confirmed";
116
113
  on_hold: "on_hold";
117
114
  awaiting_payment: "awaiting_payment";
115
+ confirmed: "confirmed";
118
116
  in_progress: "in_progress";
117
+ completed: "completed";
118
+ expired: "expired";
119
119
  }>;
120
120
  personId: z.ZodNullable<z.ZodString>;
121
121
  organizationId: z.ZodNullable<z.ZodString>;
@@ -191,7 +191,7 @@ declare const dualCreateResultSchema: z.ZodObject<{
191
191
  }, z.core.$strip>;
192
192
  export type DualCreateBookingResult = z.infer<typeof dualCreateResultSchema>;
193
193
  /**
194
- * Atomic dual-booking (partaj) create: calls `POST /v1/bookings/dual-create`
194
+ * Atomic dual-booking (partaj) create: calls `POST /v1/admin/bookings/dual-create`
195
195
  * which wraps two createBooking calls + one booking_group in a single
196
196
  * transaction. Use this over calling useBookingCreateMutation twice
197
197
  * from a submit handler — a failure on the second call there would leave
@@ -202,7 +202,7 @@ export declare function useBookingDualCreateMutation(): import("@tanstack/react-
202
202
  booking: {
203
203
  id: string;
204
204
  bookingNumber: string;
205
- status: "draft" | "expired" | "cancelled" | "completed" | "confirmed" | "on_hold" | "awaiting_payment" | "in_progress";
205
+ status: "draft" | "cancelled" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
206
206
  personId: string | null;
207
207
  organizationId: string | null;
208
208
  sellCurrency: string;
@@ -268,7 +268,7 @@ export declare function useBookingDualCreateMutation(): import("@tanstack/react-
268
268
  booking: {
269
269
  id: string;
270
270
  bookingNumber: string;
271
- status: "draft" | "expired" | "cancelled" | "completed" | "confirmed" | "on_hold" | "awaiting_payment" | "in_progress";
271
+ status: "draft" | "cancelled" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
272
272
  personId: string | null;
273
273
  organizationId: string | null;
274
274
  sellCurrency: string;
@@ -24,7 +24,7 @@ const dualCreateResultSchema = z.object({
24
24
  });
25
25
  const dualCreateResponseSchema = z.object({ data: dualCreateResultSchema });
26
26
  /**
27
- * Atomic dual-booking (partaj) create: calls `POST /v1/bookings/dual-create`
27
+ * Atomic dual-booking (partaj) create: calls `POST /v1/admin/bookings/dual-create`
28
28
  * which wraps two createBooking calls + one booking_group in a single
29
29
  * transaction. Use this over calling useBookingCreateMutation twice
30
30
  * from a submit handler — a failure on the second call there would leave
@@ -35,7 +35,7 @@ export function useBookingDualCreateMutation() {
35
35
  const queryClient = useQueryClient();
36
36
  return useMutation({
37
37
  mutationFn: async (input) => {
38
- const { data } = await fetchWithValidation("/v1/bookings/dual-create", dualCreateResponseSchema, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
38
+ const { data } = await fetchWithValidation("/v1/admin/bookings/dual-create", dualCreateResponseSchema, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
39
39
  return data;
40
40
  },
41
41
  onSuccess: () => {
@@ -16,7 +16,7 @@ export declare function useBookingGroupForBooking(bookingId: string | null | und
16
16
  id: string;
17
17
  groupId: string;
18
18
  bookingId: string;
19
- role: "shared" | "primary";
19
+ role: "primary" | "shared";
20
20
  createdAt: string;
21
21
  };
22
22
  } | null;
@@ -17,7 +17,7 @@ export declare function useBookingGroupMemberMutation(): {
17
17
  id: string;
18
18
  groupId: string;
19
19
  bookingId: string;
20
- role: "shared" | "primary";
20
+ role: "primary" | "shared";
21
21
  createdAt: string;
22
22
  }, Error, AddBookingGroupMemberInput, unknown>;
23
23
  remove: import("@tanstack/react-query").UseMutationResult<{
@@ -22,7 +22,7 @@ export function useBookingGroupMemberMutation() {
22
22
  };
23
23
  const add = useMutation({
24
24
  mutationFn: async (input) => {
25
- const { data } = await fetchWithValidation(`/v1/bookings/groups/${input.groupId}/members`, bookingGroupMemberSingleResponse, { baseUrl, fetcher }, {
25
+ const { data } = await fetchWithValidation(`/v1/admin/bookings/groups/${input.groupId}/members`, bookingGroupMemberSingleResponse, { baseUrl, fetcher }, {
26
26
  method: "POST",
27
27
  body: JSON.stringify({ bookingId: input.bookingId, role: input.role }),
28
28
  });
@@ -31,7 +31,7 @@ export function useBookingGroupMemberMutation() {
31
31
  onSuccess: (_, variables) => invalidate(variables.groupId, variables.bookingId),
32
32
  });
33
33
  const remove = useMutation({
34
- mutationFn: async (input) => fetchWithValidation(`/v1/bookings/groups/${input.groupId}/members/${input.bookingId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
34
+ mutationFn: async (input) => fetchWithValidation(`/v1/admin/bookings/groups/${input.groupId}/members/${input.bookingId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
35
35
  onSuccess: (_, variables) => invalidate(variables.groupId, variables.bookingId),
36
36
  });
37
37
  return { add, remove };
@@ -12,20 +12,20 @@ export function useBookingGroupMutation() {
12
12
  };
13
13
  const create = useMutation({
14
14
  mutationFn: async (input) => {
15
- const { data } = await fetchWithValidation("/v1/bookings/groups", bookingGroupSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
15
+ const { data } = await fetchWithValidation("/v1/admin/bookings/groups", bookingGroupSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
16
16
  return data;
17
17
  },
18
18
  onSuccess: invalidate,
19
19
  });
20
20
  const update = useMutation({
21
21
  mutationFn: async ({ id, input }) => {
22
- const { data } = await fetchWithValidation(`/v1/bookings/groups/${id}`, bookingGroupSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
22
+ const { data } = await fetchWithValidation(`/v1/admin/bookings/groups/${id}`, bookingGroupSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
23
23
  return data;
24
24
  },
25
25
  onSuccess: invalidate,
26
26
  });
27
27
  const remove = useMutation({
28
- mutationFn: async (id) => fetchWithValidation(`/v1/bookings/groups/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
28
+ mutationFn: async (id) => fetchWithValidation(`/v1/admin/bookings/groups/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
29
29
  onSuccess: invalidate,
30
30
  });
31
31
  return { create, update, remove };
@@ -16,12 +16,12 @@ export declare function useBookingGroup(id: string | null | undefined, options?:
16
16
  id: string;
17
17
  groupId: string;
18
18
  bookingId: string;
19
- role: "shared" | "primary";
19
+ role: "primary" | "shared";
20
20
  createdAt: string;
21
21
  booking: {
22
22
  id: string;
23
23
  bookingNumber: string;
24
- status: "draft" | "expired" | "cancelled" | "completed" | "confirmed" | "on_hold" | "awaiting_payment" | "in_progress";
24
+ status: "draft" | "cancelled" | "on_hold" | "awaiting_payment" | "confirmed" | "in_progress" | "completed" | "expired";
25
25
  personId: string | null;
26
26
  organizationId: string | null;
27
27
  sellCurrency: string;
@@ -8,8 +8,8 @@ export declare function useBookingItemMutation(bookingId: string): {
8
8
  bookingId: string;
9
9
  title: string;
10
10
  description: string | null;
11
- itemType: "other" | "unit" | "service" | "accommodation" | "transport" | "tax" | "extra" | "fee" | "discount" | "adjustment";
12
- status: "draft" | "expired" | "cancelled" | "fulfilled" | "confirmed" | "on_hold";
11
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
12
+ status: "draft" | "cancelled" | "fulfilled" | "on_hold" | "confirmed" | "expired";
13
13
  serviceDate: string | null;
14
14
  startsAt: string | null;
15
15
  endsAt: string | null;
@@ -36,8 +36,8 @@ export declare function useBookingItemMutation(bookingId: string): {
36
36
  title: string;
37
37
  sellCurrency: string;
38
38
  description?: string | null | undefined;
39
- itemType?: "other" | "unit" | "service" | "accommodation" | "transport" | "tax" | "extra" | "fee" | "discount" | "adjustment" | undefined;
40
- status?: "draft" | "expired" | "cancelled" | "fulfilled" | "confirmed" | "on_hold" | undefined;
39
+ itemType?: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport" | undefined;
40
+ status?: "draft" | "cancelled" | "fulfilled" | "on_hold" | "confirmed" | "expired" | undefined;
41
41
  serviceDate?: string | null | undefined;
42
42
  startsAt?: string | null | undefined;
43
43
  endsAt?: string | null | undefined;
@@ -66,8 +66,8 @@ export declare function useBookingItemMutation(bookingId: string): {
66
66
  bookingId: string;
67
67
  title: string;
68
68
  description: string | null;
69
- itemType: "other" | "unit" | "service" | "accommodation" | "transport" | "tax" | "extra" | "fee" | "discount" | "adjustment";
70
- status: "draft" | "expired" | "cancelled" | "fulfilled" | "confirmed" | "on_hold";
69
+ itemType: "other" | "unit" | "extra" | "service" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
70
+ status: "draft" | "cancelled" | "fulfilled" | "on_hold" | "confirmed" | "expired";
71
71
  serviceDate: string | null;
72
72
  startsAt: string | null;
73
73
  endsAt: string | null;
@@ -9,7 +9,7 @@ export function useBookingItemMutation(bookingId) {
9
9
  const queryClient = useQueryClient();
10
10
  const create = useMutation({
11
11
  mutationFn: async (input) => {
12
- const { data } = await fetchWithValidation(`/v1/bookings/${bookingId}/items`, bookingSingleResponse.extend({
12
+ const { data } = await fetchWithValidation(`/v1/admin/bookings/${bookingId}/items`, bookingSingleResponse.extend({
13
13
  data: bookingItemsResponse.shape.data.element,
14
14
  }), { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
15
15
  return data;
@@ -21,7 +21,7 @@ export function useBookingItemMutation(bookingId) {
21
21
  });
22
22
  const update = useMutation({
23
23
  mutationFn: async ({ id, input }) => {
24
- const { data } = await fetchWithValidation(`/v1/bookings/${bookingId}/items/${id}`, bookingSingleResponse.extend({
24
+ const { data } = await fetchWithValidation(`/v1/admin/bookings/${bookingId}/items/${id}`, bookingSingleResponse.extend({
25
25
  data: bookingItemsResponse.shape.data.element,
26
26
  }), { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
27
27
  return data;
@@ -32,7 +32,7 @@ export function useBookingItemMutation(bookingId) {
32
32
  },
33
33
  });
34
34
  const remove = useMutation({
35
- mutationFn: async (itemId) => fetchWithValidation(`/v1/bookings/${bookingId}/items/${itemId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
35
+ mutationFn: async (itemId) => fetchWithValidation(`/v1/admin/bookings/${bookingId}/items/${itemId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
36
36
  onSuccess: () => {
37
37
  void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.items(bookingId) });
38
38
  void queryClient.invalidateQueries({ queryKey: bookingsQueryKeys.activity(bookingId) });
@@ -6,7 +6,7 @@ export declare function useBookingItemTravelers(bookingId: string | null | undef
6
6
  id: string;
7
7
  bookingItemId: string;
8
8
  travelerId: string;
9
- role: "other" | "traveler" | "occupant" | "beneficiary" | "service_assignee" | "primary_contact";
9
+ role: "other" | "traveler" | "occupant" | "primary_contact" | "service_assignee" | "beneficiary";
10
10
  isPrimary: boolean;
11
11
  createdAt: string;
12
12
  }[];
@@ -21,7 +21,7 @@ export declare function useBookingItemTravelerMutation(bookingId: string, itemId
21
21
  id: string;
22
22
  bookingItemId: string;
23
23
  travelerId: string;
24
- role: "other" | "traveler" | "occupant" | "beneficiary" | "service_assignee" | "primary_contact";
24
+ role: "other" | "traveler" | "occupant" | "primary_contact" | "service_assignee" | "beneficiary";
25
25
  isPrimary: boolean;
26
26
  createdAt: string;
27
27
  }, Error, AddItemTravelerInput, unknown>;