@voyant-travel/inventory-react 0.19.0 → 0.19.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 (75) hide show
  1. package/dist/admin/pages/product-detail-page.d.ts +1 -1
  2. package/dist/admin/pages/product-detail-page.js +1 -1
  3. package/dist/components/product-detail/commerce-client.d.ts.map +1 -1
  4. package/dist/components/product-detail/commerce-client.js +21 -24
  5. package/dist/components/product-detail/product-departure-form.js +2 -2
  6. package/dist/components/product-detail/product-detail-form.d.ts.map +1 -1
  7. package/dist/components/product-detail/product-detail-form.js +3 -3
  8. package/dist/components/product-detail/product-detail-itinerary-section.d.ts.map +1 -1
  9. package/dist/components/product-detail/product-detail-itinerary-section.js +2 -2
  10. package/dist/components/product-detail/product-detail-shared.d.ts.map +1 -1
  11. package/dist/components/product-detail/product-detail-shared.js +8 -8
  12. package/dist/components/product-detail/product-detail-summary-section.js +2 -2
  13. package/dist/components/product-detail/product-media-gallery.js +1 -1
  14. package/dist/components/product-detail/product-options-shared.d.ts +4 -4
  15. package/dist/components/product-detail/product-schedule-form.js +2 -2
  16. package/dist/components/product-detail/product-service-form.d.ts.map +1 -1
  17. package/dist/components/product-detail/product-service-form.js +4 -4
  18. package/dist/components/product-detail/use-product-detail-data.d.ts.map +1 -1
  19. package/dist/components/product-detail/use-product-detail-data.js +9 -9
  20. package/dist/components/product-facility-combobox.d.ts.map +1 -1
  21. package/dist/components/product-facility-combobox.js +2 -2
  22. package/dist/components/product-tax-class-combobox.js +2 -2
  23. package/dist/extras/hooks/use-product-extra-mutation.d.ts +6 -6
  24. package/dist/extras/hooks/use-product-extra-mutation.js +3 -3
  25. package/dist/extras/hooks/use-product-extra.d.ts +2 -2
  26. package/dist/extras/hooks/use-product-extras.d.ts +2 -2
  27. package/dist/extras/query-options.d.ts +28 -28
  28. package/dist/extras/query-options.js +3 -3
  29. package/dist/extras/schemas.d.ts +13 -13
  30. package/dist/hooks/use-day-service-translation-mutation.js +3 -3
  31. package/dist/hooks/use-day-service-translations.js +1 -1
  32. package/dist/hooks/use-duplicate-product-option-mutation.d.ts.map +1 -1
  33. package/dist/hooks/use-duplicate-product-option-mutation.js +2 -2
  34. package/dist/hooks/use-option-unit-mutation.d.ts +2 -2
  35. package/dist/hooks/use-option-unit-mutation.js +3 -3
  36. package/dist/hooks/use-option-unit.d.ts +1 -1
  37. package/dist/hooks/use-option-units.d.ts +1 -1
  38. package/dist/hooks/use-product-action-ledger.d.ts +1 -1
  39. package/dist/hooks/use-product-categories.js +1 -1
  40. package/dist/hooks/use-product-category-mutation.js +3 -3
  41. package/dist/hooks/use-product-category.js +1 -1
  42. package/dist/hooks/use-product-day-mutation.js +4 -4
  43. package/dist/hooks/use-product-day-service-mutation.d.ts +3 -3
  44. package/dist/hooks/use-product-day-service-mutation.js +3 -3
  45. package/dist/hooks/use-product-day-services.d.ts +1 -1
  46. package/dist/hooks/use-product-day-translation-mutation.js +3 -3
  47. package/dist/hooks/use-product-day-translations.js +1 -1
  48. package/dist/hooks/use-product-itinerary-mutation.js +4 -4
  49. package/dist/hooks/use-product-itinerary-translation-mutation.js +3 -3
  50. package/dist/hooks/use-product-itinerary-translations.js +1 -1
  51. package/dist/hooks/use-product-media-mutation.js +6 -6
  52. package/dist/hooks/use-product-mutation.d.ts +2 -2
  53. package/dist/hooks/use-product-mutation.js +3 -3
  54. package/dist/hooks/use-product-option-mutation.js +3 -3
  55. package/dist/hooks/use-product-tag-mutation.js +3 -3
  56. package/dist/hooks/use-product-tag.js +1 -1
  57. package/dist/hooks/use-product-tags.js +1 -1
  58. package/dist/hooks/use-product-translation-mutation.js +3 -3
  59. package/dist/hooks/use-product-translations.js +1 -1
  60. package/dist/hooks/use-product-type-mutation.js +3 -3
  61. package/dist/hooks/use-product-version-mutation.js +1 -1
  62. package/dist/hooks/use-product.d.ts +1 -1
  63. package/dist/hooks/use-product.d.ts.map +1 -1
  64. package/dist/hooks/use-product.js +1 -1
  65. package/dist/hooks/use-products.d.ts +1 -1
  66. package/dist/hooks/use-products.js +1 -1
  67. package/dist/operations.d.ts +1 -1
  68. package/dist/operations.d.ts.map +1 -1
  69. package/dist/operations.js +1 -1
  70. package/dist/query-options-action-ledger.d.ts +4 -4
  71. package/dist/query-options.d.ts +20 -20
  72. package/dist/query-options.d.ts.map +1 -1
  73. package/dist/query-options.js +17 -17
  74. package/dist/schemas.d.ts +15 -15
  75. package/package.json +12 -12
@@ -9,8 +9,8 @@ export declare function useProductExtraMutation(): {
9
9
  code: string | null;
10
10
  name: string;
11
11
  description: string | null;
12
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
13
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
12
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
13
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
14
14
  pricedPerPerson: boolean;
15
15
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
16
16
  showOnSlotManifest: boolean;
@@ -28,8 +28,8 @@ export declare function useProductExtraMutation(): {
28
28
  supplierId?: string | null | undefined;
29
29
  code?: string | null | undefined;
30
30
  description?: string | null | undefined;
31
- selectionType?: "optional" | "required" | "unavailable" | "default_selected" | undefined;
32
- pricingMode?: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free" | undefined;
31
+ selectionType?: "optional" | "required" | "default_selected" | "unavailable" | undefined;
32
+ pricingMode?: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free" | undefined;
33
33
  pricedPerPerson?: boolean | undefined;
34
34
  collectionMode?: "none" | "external" | "cash_on_trip" | "included" | "booking_total" | undefined;
35
35
  showOnSlotManifest?: boolean | undefined;
@@ -46,8 +46,8 @@ export declare function useProductExtraMutation(): {
46
46
  code: string | null;
47
47
  name: string;
48
48
  description: string | null;
49
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
50
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
49
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
50
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
51
51
  pricedPerPerson: boolean;
52
52
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
53
53
  showOnSlotManifest: boolean;
@@ -9,7 +9,7 @@ export function useProductExtraMutation() {
9
9
  const queryClient = useQueryClient();
10
10
  const create = useMutation({
11
11
  mutationFn: async (input) => {
12
- const { data } = await fetchWithValidation("/v1/extras/product-extras", productExtraSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
12
+ const { data } = await fetchWithValidation("/v1/admin/extras/product-extras", productExtraSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
13
13
  return data;
14
14
  },
15
15
  onSuccess: (data) => {
@@ -19,7 +19,7 @@ export function useProductExtraMutation() {
19
19
  });
20
20
  const update = useMutation({
21
21
  mutationFn: async ({ id, input }) => {
22
- const { data } = await fetchWithValidation(`/v1/extras/product-extras/${id}`, productExtraSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
22
+ const { data } = await fetchWithValidation(`/v1/admin/extras/product-extras/${id}`, productExtraSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
23
23
  return data;
24
24
  },
25
25
  onSuccess: (data) => {
@@ -28,7 +28,7 @@ export function useProductExtraMutation() {
28
28
  },
29
29
  });
30
30
  const remove = useMutation({
31
- mutationFn: async (id) => fetchWithValidation(`/v1/extras/product-extras/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
31
+ mutationFn: async (id) => fetchWithValidation(`/v1/admin/extras/product-extras/${id}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
32
32
  onSuccess: (_data, id) => {
33
33
  void queryClient.invalidateQueries({ queryKey: extrasQueryKeys.productExtras() });
34
34
  queryClient.removeQueries({ queryKey: extrasQueryKeys.productExtra(id) });
@@ -7,8 +7,8 @@ export declare function useProductExtra(id: string | null | undefined, options?:
7
7
  code: string | null;
8
8
  name: string;
9
9
  description: string | null;
10
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
11
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
10
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
11
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
12
12
  pricedPerPerson: boolean;
13
13
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
14
14
  showOnSlotManifest: boolean;
@@ -9,8 +9,8 @@ export declare function useProductExtras(options?: UseProductExtrasOptions): imp
9
9
  code: string | null;
10
10
  name: string;
11
11
  description: string | null;
12
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
13
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
12
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
13
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
14
14
  pricedPerPerson: boolean;
15
15
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
16
16
  showOnSlotManifest: boolean;
@@ -7,8 +7,8 @@ export declare function getProductExtrasQueryOptions(client: FetchWithValidation
7
7
  code: string | null;
8
8
  name: string;
9
9
  description: string | null;
10
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
11
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
10
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
11
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
12
12
  pricedPerPerson: boolean;
13
13
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
14
14
  showOnSlotManifest: boolean;
@@ -31,8 +31,8 @@ export declare function getProductExtrasQueryOptions(client: FetchWithValidation
31
31
  code: string | null;
32
32
  name: string;
33
33
  description: string | null;
34
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
35
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
34
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
35
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
36
36
  pricedPerPerson: boolean;
37
37
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
38
38
  showOnSlotManifest: boolean;
@@ -56,8 +56,8 @@ export declare function getProductExtrasQueryOptions(client: FetchWithValidation
56
56
  code: string | null;
57
57
  name: string;
58
58
  description: string | null;
59
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
60
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
59
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
60
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
61
61
  pricedPerPerson: boolean;
62
62
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
63
63
  showOnSlotManifest: boolean;
@@ -83,8 +83,8 @@ export declare function getProductExtrasQueryOptions(client: FetchWithValidation
83
83
  code: string | null;
84
84
  name: string;
85
85
  description: string | null;
86
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
87
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
86
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
87
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
88
88
  pricedPerPerson: boolean;
89
89
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
90
90
  showOnSlotManifest: boolean;
@@ -110,8 +110,8 @@ export declare function getProductExtraQueryOptions(client: FetchWithValidationO
110
110
  code: string | null;
111
111
  name: string;
112
112
  description: string | null;
113
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
114
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
113
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
114
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
115
115
  pricedPerPerson: boolean;
116
116
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
117
117
  showOnSlotManifest: boolean;
@@ -129,8 +129,8 @@ export declare function getProductExtraQueryOptions(client: FetchWithValidationO
129
129
  code: string | null;
130
130
  name: string;
131
131
  description: string | null;
132
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
133
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
132
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
133
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
134
134
  pricedPerPerson: boolean;
135
135
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
136
136
  showOnSlotManifest: boolean;
@@ -149,8 +149,8 @@ export declare function getProductExtraQueryOptions(client: FetchWithValidationO
149
149
  code: string | null;
150
150
  name: string;
151
151
  description: string | null;
152
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
153
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
152
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
153
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
154
154
  pricedPerPerson: boolean;
155
155
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
156
156
  showOnSlotManifest: boolean;
@@ -171,8 +171,8 @@ export declare function getProductExtraQueryOptions(client: FetchWithValidationO
171
171
  code: string | null;
172
172
  name: string;
173
173
  description: string | null;
174
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
175
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
174
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
175
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
176
176
  pricedPerPerson: boolean;
177
177
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
178
178
  showOnSlotManifest: boolean;
@@ -205,8 +205,8 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
205
205
  code: string | null;
206
206
  name: string;
207
207
  description: string | null;
208
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
209
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
208
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
209
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
210
210
  pricedPerPerson: boolean;
211
211
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
212
212
  showOnSlotManifest: boolean;
@@ -250,7 +250,7 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
250
250
  collectedBy: string | null;
251
251
  notes: string | null;
252
252
  metadata: Record<string, unknown> | null;
253
- source: "empty" | "selection" | "booking_item";
253
+ source: "selection" | "booking_item" | "empty";
254
254
  }[];
255
255
  }, Error, {
256
256
  slot: {
@@ -269,8 +269,8 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
269
269
  code: string | null;
270
270
  name: string;
271
271
  description: string | null;
272
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
273
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
272
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
273
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
274
274
  pricedPerPerson: boolean;
275
275
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
276
276
  showOnSlotManifest: boolean;
@@ -314,7 +314,7 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
314
314
  collectedBy: string | null;
315
315
  notes: string | null;
316
316
  metadata: Record<string, unknown> | null;
317
- source: "empty" | "selection" | "booking_item";
317
+ source: "selection" | "booking_item" | "empty";
318
318
  }[];
319
319
  }, readonly ["voyant", "extras", "slot-manifests", string]>, "queryFn"> & {
320
320
  queryFn?: import("@tanstack/react-query").QueryFunction<{
@@ -334,8 +334,8 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
334
334
  code: string | null;
335
335
  name: string;
336
336
  description: string | null;
337
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
338
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
337
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
338
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
339
339
  pricedPerPerson: boolean;
340
340
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
341
341
  showOnSlotManifest: boolean;
@@ -379,7 +379,7 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
379
379
  collectedBy: string | null;
380
380
  notes: string | null;
381
381
  metadata: Record<string, unknown> | null;
382
- source: "empty" | "selection" | "booking_item";
382
+ source: "selection" | "booking_item" | "empty";
383
383
  }[];
384
384
  }, readonly ["voyant", "extras", "slot-manifests", string], never> | undefined;
385
385
  } & {
@@ -401,8 +401,8 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
401
401
  code: string | null;
402
402
  name: string;
403
403
  description: string | null;
404
- selectionType: "optional" | "required" | "unavailable" | "default_selected";
405
- pricingMode: "on_request" | "per_booking" | "included" | "per_person" | "quantity_based" | "free";
404
+ selectionType: "optional" | "required" | "default_selected" | "unavailable";
405
+ pricingMode: "on_request" | "included" | "per_person" | "per_booking" | "quantity_based" | "free";
406
406
  pricedPerPerson: boolean;
407
407
  collectionMode: "none" | "external" | "cash_on_trip" | "included" | "booking_total";
408
408
  showOnSlotManifest: boolean;
@@ -446,7 +446,7 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
446
446
  collectedBy: string | null;
447
447
  notes: string | null;
448
448
  metadata: Record<string, unknown> | null;
449
- source: "empty" | "selection" | "booking_item";
449
+ source: "selection" | "booking_item" | "empty";
450
450
  }[];
451
451
  };
452
452
  [dataTagErrorSymbol]: Error;
@@ -20,7 +20,7 @@ export function getProductExtrasQueryOptions(client, options = {}) {
20
20
  if (filters.offset !== undefined)
21
21
  params.set("offset", String(filters.offset));
22
22
  const qs = params.toString();
23
- return fetchWithValidation(`/v1/extras/product-extras${qs ? `?${qs}` : ""}`, productExtraListResponse, client);
23
+ return fetchWithValidation(`/v1/admin/extras/product-extras${qs ? `?${qs}` : ""}`, productExtraListResponse, client);
24
24
  },
25
25
  });
26
26
  }
@@ -28,7 +28,7 @@ export function getProductExtraQueryOptions(client, id) {
28
28
  return queryOptions({
29
29
  queryKey: extrasQueryKeys.productExtra(id),
30
30
  queryFn: async () => {
31
- const { data } = await fetchWithValidation(`/v1/extras/product-extras/${id}`, productExtraSingleResponse, client);
31
+ const { data } = await fetchWithValidation(`/v1/admin/extras/product-extras/${id}`, productExtraSingleResponse, client);
32
32
  return data;
33
33
  },
34
34
  });
@@ -37,7 +37,7 @@ export function getSlotExtraManifestQueryOptions(client, slotId) {
37
37
  return queryOptions({
38
38
  queryKey: extrasQueryKeys.slotManifest(slotId),
39
39
  queryFn: async () => {
40
- const { data } = await fetchWithValidation(`/v1/extras/slot-manifests/${slotId}`, slotExtraManifestResponse, client);
40
+ const { data } = await fetchWithValidation(`/v1/admin/extras/slot-manifests/${slotId}`, slotExtraManifestResponse, client);
41
41
  return data;
42
42
  },
43
43
  });
@@ -16,14 +16,14 @@ export declare const productExtraRecordSchema: z.ZodObject<{
16
16
  selectionType: z.ZodEnum<{
17
17
  optional: "optional";
18
18
  required: "required";
19
- unavailable: "unavailable";
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
  }>;
@@ -56,14 +56,14 @@ export declare const productExtraListResponse: z.ZodObject<{
56
56
  selectionType: z.ZodEnum<{
57
57
  optional: "optional";
58
58
  required: "required";
59
- unavailable: "unavailable";
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
  }>;
@@ -99,14 +99,14 @@ export declare const productExtraSingleResponse: z.ZodObject<{
99
99
  selectionType: z.ZodEnum<{
100
100
  optional: "optional";
101
101
  required: "required";
102
- unavailable: "unavailable";
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
  }>;
@@ -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<{
@@ -213,14 +213,14 @@ export declare const slotExtraManifestSchema: z.ZodObject<{
213
213
  selectionType: z.ZodEnum<{
214
214
  optional: "optional";
215
215
  required: "required";
216
- unavailable: "unavailable";
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
  }>;
@@ -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>;
@@ -318,14 +318,14 @@ export declare const slotExtraManifestResponse: z.ZodObject<{
318
318
  selectionType: z.ZodEnum<{
319
319
  optional: "optional";
320
320
  required: "required";
321
- unavailable: "unavailable";
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
  }>;
@@ -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>;
@@ -17,21 +17,21 @@ export function useDayServiceTranslationMutation() {
17
17
  };
18
18
  const create = useMutation({
19
19
  mutationFn: async ({ productId, dayId, serviceId, input, }) => {
20
- const { data } = await fetchWithValidation(`/v1/products/${productId}/days/${dayId}/services/${serviceId}/translations`, dayServiceTranslationSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
20
+ const { data } = await fetchWithValidation(`/v1/admin/products/${productId}/days/${dayId}/services/${serviceId}/translations`, dayServiceTranslationSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
21
21
  return { productId, dayId, serviceId, translation: data };
22
22
  },
23
23
  onSuccess: ({ productId, dayId, serviceId }) => invalidate(productId, dayId, serviceId),
24
24
  });
25
25
  const update = useMutation({
26
26
  mutationFn: async ({ productId, dayId, serviceId, translationId, input, }) => {
27
- const { data } = await fetchWithValidation(`/v1/products/${productId}/days/${dayId}/services/${serviceId}/translations/${translationId}`, dayServiceTranslationSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
27
+ const { data } = await fetchWithValidation(`/v1/admin/products/${productId}/days/${dayId}/services/${serviceId}/translations/${translationId}`, dayServiceTranslationSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
28
28
  return { productId, dayId, serviceId, translation: data };
29
29
  },
30
30
  onSuccess: ({ productId, dayId, serviceId }) => invalidate(productId, dayId, serviceId),
31
31
  });
32
32
  const remove = useMutation({
33
33
  mutationFn: async ({ productId, dayId, serviceId, translationId, }) => {
34
- await fetchWithValidation(`/v1/products/${productId}/days/${dayId}/services/${serviceId}/translations/${translationId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
34
+ await fetchWithValidation(`/v1/admin/products/${productId}/days/${dayId}/services/${serviceId}/translations/${translationId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
35
35
  return { productId, dayId, serviceId };
36
36
  },
37
37
  onSuccess: ({ productId, dayId, serviceId }) => invalidate(productId, dayId, serviceId),
@@ -13,7 +13,7 @@ export function useDayServiceTranslations(productId, dayId, serviceId, options =
13
13
  if (!productId || !dayId || !serviceId) {
14
14
  throw new Error("useDayServiceTranslations requires a productId, dayId, and serviceId");
15
15
  }
16
- return fetchWithValidation(`/v1/products/${productId}/days/${dayId}/services/${serviceId}/translations`, dayServiceTranslationListResponse, { baseUrl, fetcher });
16
+ return fetchWithValidation(`/v1/admin/products/${productId}/days/${dayId}/services/${serviceId}/translations`, dayServiceTranslationListResponse, { baseUrl, fetcher });
17
17
  },
18
18
  enabled: enabled && Boolean(productId) && Boolean(dayId) && Boolean(serviceId),
19
19
  });
@@ -1 +1 @@
1
- {"version":3,"file":"use-duplicate-product-option-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-duplicate-product-option-mutation.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,eAAe,CAAA;AAItB,MAAM,WAAW,2BAA2B;IAC1C,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAA;IACtC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,mBAAmB,CAAA;IAC3B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAClC;AAMD,wBAAgB,iCAAiC,iIAwEhD"}
1
+ {"version":3,"file":"use-duplicate-product-option-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-duplicate-product-option-mutation.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,eAAe,CAAA;AAItB,MAAM,WAAW,2BAA2B;IAC1C,cAAc,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAA;IACtC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,mBAAmB,CAAA;IAC3B,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAClC;AAMD,wBAAgB,iCAAiC,iIA4EhD"}
@@ -17,11 +17,11 @@ export function useDuplicateProductOptionMutation() {
17
17
  return useMutation({
18
18
  mutationFn: async ({ sourceOptionId, productId, name, code, description, status, isDefault, sortOrder, availableFrom, availableTo, }) => {
19
19
  const [{ data: sourceOption }, { data: sourceUnits }] = await Promise.all([
20
- fetchWithValidation(`/v1/products/options/${sourceOptionId}`, productOptionSingleResponse, {
20
+ fetchWithValidation(`/v1/admin/products/options/${sourceOptionId}`, productOptionSingleResponse, {
21
21
  baseUrl,
22
22
  fetcher,
23
23
  }),
24
- fetchWithValidation(`/v1/products/option-units?optionId=${encodeURIComponent(sourceOptionId)}&limit=100`, optionUnitListResponse, { baseUrl, fetcher }),
24
+ fetchWithValidation(`/v1/admin/products/units?optionId=${encodeURIComponent(sourceOptionId)}&limit=100`, optionUnitListResponse, { baseUrl, fetcher }),
25
25
  ]);
26
26
  const duplicatedOption = await createOption.mutateAsync({
27
27
  productId: productId ?? sourceOption.productId,
@@ -22,7 +22,7 @@ export declare function useOptionUnitMutation(): {
22
22
  name: string;
23
23
  code: string | null;
24
24
  description: string | null;
25
- unitType: "person" | "group" | "room" | "vehicle" | "service" | "other";
25
+ unitType: "other" | "person" | "group" | "room" | "vehicle" | "service";
26
26
  minQuantity: number | null;
27
27
  maxQuantity: number | null;
28
28
  minAge: number | null;
@@ -39,7 +39,7 @@ export declare function useOptionUnitMutation(): {
39
39
  name: string;
40
40
  code: string | null;
41
41
  description: string | null;
42
- unitType: "person" | "group" | "room" | "vehicle" | "service" | "other";
42
+ unitType: "other" | "person" | "group" | "room" | "vehicle" | "service";
43
43
  minQuantity: number | null;
44
44
  maxQuantity: number | null;
45
45
  minAge: number | null;
@@ -11,7 +11,7 @@ export function useOptionUnitMutation() {
11
11
  const queryClient = useQueryClient();
12
12
  const create = useMutation({
13
13
  mutationFn: async ({ optionId, ...input }) => {
14
- const { data } = await fetchWithValidation(`/v1/products/options/${optionId}/units`, optionUnitSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
14
+ const { data } = await fetchWithValidation(`/v1/admin/products/options/${optionId}/units`, optionUnitSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
15
15
  return data;
16
16
  },
17
17
  onSuccess: (data) => {
@@ -23,7 +23,7 @@ export function useOptionUnitMutation() {
23
23
  });
24
24
  const update = useMutation({
25
25
  mutationFn: async ({ id, input }) => {
26
- const { data } = await fetchWithValidation(`/v1/products/units/${id}`, optionUnitSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
26
+ const { data } = await fetchWithValidation(`/v1/admin/products/units/${id}`, optionUnitSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
27
27
  return data;
28
28
  },
29
29
  onSuccess: (data) => {
@@ -32,7 +32,7 @@ export function useOptionUnitMutation() {
32
32
  },
33
33
  });
34
34
  const remove = useMutation({
35
- mutationFn: async (id) => fetchWithValidation(`/v1/products/units/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" }),
35
+ mutationFn: async (id) => fetchWithValidation(`/v1/admin/products/units/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" }),
36
36
  onSuccess: () => {
37
37
  void queryClient.invalidateQueries({ queryKey: productsQueryKeys.optionUnits() });
38
38
  },
@@ -7,7 +7,7 @@ export declare function useOptionUnit(id: string | undefined, options?: UseOptio
7
7
  name: string;
8
8
  code: string | null;
9
9
  description: string | null;
10
- unitType: "person" | "group" | "room" | "vehicle" | "service" | "other";
10
+ unitType: "other" | "person" | "group" | "room" | "vehicle" | "service";
11
11
  minQuantity: number | null;
12
12
  maxQuantity: number | null;
13
13
  minAge: number | null;
@@ -9,7 +9,7 @@ export declare function useOptionUnits(options?: UseOptionUnitsOptions): import(
9
9
  name: string;
10
10
  code: string | null;
11
11
  description: string | null;
12
- unitType: "person" | "group" | "room" | "vehicle" | "service" | "other";
12
+ unitType: "other" | "person" | "group" | "room" | "vehicle" | "service";
13
13
  minQuantity: number | null;
14
14
  maxQuantity: number | null;
15
15
  minAge: number | null;
@@ -5,7 +5,7 @@ export declare function useProductActionLedger(productId: string | null | undefi
5
5
  occurredAt: string;
6
6
  actionName: string;
7
7
  actionVersion: string;
8
- actionKind: "reverse" | "read" | "delete" | "create" | "update" | "execute" | "approve" | "reject" | "compensate" | "duplicate";
8
+ actionKind: "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "reverse" | "compensate" | "duplicate";
9
9
  status: "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "expired" | "cancelled" | "superseded";
10
10
  evaluatedRisk: "high" | "low" | "medium" | "critical";
11
11
  actorType: string | null;
@@ -22,7 +22,7 @@ export function useProductCategories(options = {}) {
22
22
  if (filters.offset !== undefined)
23
23
  params.set("offset", String(filters.offset));
24
24
  const qs = params.toString();
25
- return fetchWithValidation(`/v1/products/product-categories${qs ? `?${qs}` : ""}`, productCategoryListResponse, { baseUrl, fetcher });
25
+ return fetchWithValidation(`/v1/admin/products/product-categories${qs ? `?${qs}` : ""}`, productCategoryListResponse, { baseUrl, fetcher });
26
26
  },
27
27
  enabled,
28
28
  });
@@ -11,7 +11,7 @@ export function useProductCategoryMutation() {
11
11
  const queryClient = useQueryClient();
12
12
  const create = useMutation({
13
13
  mutationFn: async (input) => {
14
- const { data } = await fetchWithValidation("/v1/products/product-categories", productCategorySingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
14
+ const { data } = await fetchWithValidation("/v1/admin/products/product-categories", productCategorySingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
15
15
  return data;
16
16
  },
17
17
  onSuccess: () => {
@@ -20,7 +20,7 @@ export function useProductCategoryMutation() {
20
20
  });
21
21
  const update = useMutation({
22
22
  mutationFn: async ({ id, input }) => {
23
- const { data } = await fetchWithValidation(`/v1/products/product-categories/${id}`, productCategorySingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
23
+ const { data } = await fetchWithValidation(`/v1/admin/products/product-categories/${id}`, productCategorySingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
24
24
  return data;
25
25
  },
26
26
  onSuccess: (data) => {
@@ -29,7 +29,7 @@ export function useProductCategoryMutation() {
29
29
  },
30
30
  });
31
31
  const remove = useMutation({
32
- mutationFn: async (id) => fetchWithValidation(`/v1/products/product-categories/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" }),
32
+ mutationFn: async (id) => fetchWithValidation(`/v1/admin/products/product-categories/${id}`, deleteResponseSchema, { baseUrl, fetcher }, { method: "DELETE" }),
33
33
  onSuccess: (_data, id) => {
34
34
  void queryClient.invalidateQueries({ queryKey: productsQueryKeys.productCategories() });
35
35
  queryClient.removeQueries({ queryKey: productsQueryKeys.productCategory(id) });
@@ -10,7 +10,7 @@ export function useProductCategory(id, options = {}) {
10
10
  return useQuery({
11
11
  queryKey: productsQueryKeys.productCategory(id ?? "__missing__"),
12
12
  queryFn: async () => {
13
- const { data } = await fetchWithValidation(`/v1/products/product-categories/${id}`, productCategorySingleResponse, { baseUrl, fetcher });
13
+ const { data } = await fetchWithValidation(`/v1/admin/products/product-categories/${id}`, productCategorySingleResponse, { baseUrl, fetcher });
14
14
  return data;
15
15
  },
16
16
  enabled: enabled && Boolean(id),
@@ -10,8 +10,8 @@ export function useProductDayMutation() {
10
10
  const create = useMutation({
11
11
  mutationFn: async ({ productId, itineraryId, ...input }) => {
12
12
  const { data } = await fetchWithValidation(itineraryId
13
- ? `/v1/products/${productId}/itineraries/${itineraryId}/days`
14
- : `/v1/products/${productId}/days`, productDayResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
13
+ ? `/v1/admin/products/${productId}/itineraries/${itineraryId}/days`
14
+ : `/v1/admin/products/${productId}/days`, productDayResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
15
15
  return data;
16
16
  },
17
17
  onSuccess: async (data, variables) => {
@@ -25,7 +25,7 @@ export function useProductDayMutation() {
25
25
  });
26
26
  const update = useMutation({
27
27
  mutationFn: async ({ productId, dayId, input, }) => {
28
- const { data } = await fetchWithValidation(`/v1/products/${productId}/days/${dayId}`, productDayResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
28
+ const { data } = await fetchWithValidation(`/v1/admin/products/${productId}/days/${dayId}`, productDayResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
29
29
  return data;
30
30
  },
31
31
  onSuccess: async (data, variables) => {
@@ -38,7 +38,7 @@ export function useProductDayMutation() {
38
38
  },
39
39
  });
40
40
  const remove = useMutation({
41
- mutationFn: async ({ productId, dayId, }) => fetchWithValidation(`/v1/products/${productId}/days/${dayId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
41
+ mutationFn: async ({ productId, dayId, }) => fetchWithValidation(`/v1/admin/products/${productId}/days/${dayId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" }),
42
42
  onSuccess: async (_data, variables) => {
43
43
  await queryClient.invalidateQueries({
44
44
  queryKey: productsQueryKeys.productDays(variables.productId),