@voyant-travel/inventory-react 0.13.0 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/product-detail/product-departure-form.d.ts.map +1 -1
- package/dist/components/product-detail/product-departure-form.js +33 -2
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/use-day-service-translation-mutation.d.ts +55 -0
- package/dist/hooks/use-day-service-translation-mutation.d.ts.map +1 -0
- package/dist/hooks/use-day-service-translation-mutation.js +40 -0
- package/dist/hooks/use-day-service-translations.d.ts +19 -0
- package/dist/hooks/use-day-service-translations.d.ts.map +1 -0
- package/dist/hooks/use-day-service-translations.js +20 -0
- package/dist/hooks/use-product-itinerary-translation-mutation.d.ts +45 -0
- package/dist/hooks/use-product-itinerary-translation-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-itinerary-translation-mutation.js +40 -0
- package/dist/hooks/use-product-itinerary-translations.d.ts +17 -0
- package/dist/hooks/use-product-itinerary-translations.d.ts.map +1 -0
- package/dist/hooks/use-product-itinerary-translations.js +20 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/query-keys.d.ts +14 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +10 -0
- package/dist/schemas.d.ts +76 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +24 -2
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-departure-form.d.ts","sourceRoot":"","sources":["../../../src/components/product-detail/product-departure-form.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"product-departure-form.d.ts","sourceRoot":"","sources":["../../../src/components/product-detail/product-departure-form.tsx"],"names":[],"mappings":"AAkFA,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAA;IACpD,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACtB;AAyDD,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAwczF"}
|
|
@@ -8,7 +8,7 @@ import { Loader2 } from "lucide-react";
|
|
|
8
8
|
import { useEffect, useMemo, useRef } from "react";
|
|
9
9
|
import { useForm } from "react-hook-form";
|
|
10
10
|
import { z } from "zod/v4";
|
|
11
|
-
import { useProductItineraries } from "../../index.js";
|
|
11
|
+
import { useProductItineraries, useProductOptions } from "../../index.js";
|
|
12
12
|
import { useProductResourceTemplates } from "./commerce-client.js";
|
|
13
13
|
import { useProductDetailApi, useProductDetailMessages } from "./host.js";
|
|
14
14
|
import { getTimezoneLabel, TIMEZONE_IDS, TIMEZONE_OPTIONS } from "./timezone-options.js";
|
|
@@ -20,6 +20,7 @@ const buildDepartureFormSchema = (messages) => z
|
|
|
20
20
|
endDate: z.string().optional().nullable(),
|
|
21
21
|
endTime: z.string().optional().nullable(),
|
|
22
22
|
itineraryId: z.string().optional().nullable(),
|
|
23
|
+
optionId: z.string().optional().nullable(),
|
|
23
24
|
timezone: z.string().min(1, messages.validationTimezoneRequired),
|
|
24
25
|
status: z.enum(["open", "closed", "sold_out", "cancelled"]),
|
|
25
26
|
unlimited: z.boolean(),
|
|
@@ -69,6 +70,7 @@ function initialValues(slot, defaultTz) {
|
|
|
69
70
|
endDate: slot.endsAt ? isoToLocalDate(slot.endsAt) : "",
|
|
70
71
|
endTime: slot.endsAt ? isoToLocalTime(slot.endsAt) : "",
|
|
71
72
|
itineraryId: slot.itineraryId ?? "",
|
|
73
|
+
optionId: slot.optionId ?? "",
|
|
72
74
|
timezone: slot.timezone,
|
|
73
75
|
status: slot.status,
|
|
74
76
|
unlimited: slot.unlimited,
|
|
@@ -84,6 +86,7 @@ function initialValues(slot, defaultTz) {
|
|
|
84
86
|
endDate: "",
|
|
85
87
|
endTime: "",
|
|
86
88
|
itineraryId: "",
|
|
89
|
+
optionId: "",
|
|
87
90
|
timezone: defaultTz,
|
|
88
91
|
status: "open",
|
|
89
92
|
unlimited: false,
|
|
@@ -121,6 +124,11 @@ export function DepartureForm({ productId, slot, onSuccess, onCancel }) {
|
|
|
121
124
|
const { data: itineraryData } = useProductItineraries(productId);
|
|
122
125
|
const itineraries = itineraryData?.data ?? [];
|
|
123
126
|
const defaultItinerary = itineraries.find((itinerary) => itinerary.isDefault) ?? itineraries[0];
|
|
127
|
+
const { data: optionData } = useProductOptions({ productId, status: "active", limit: 100 });
|
|
128
|
+
const productOptions = optionData?.data ?? [];
|
|
129
|
+
const defaultOption = productOptions.find((option) => option.isDefault) ?? productOptions[0];
|
|
130
|
+
const selectedOptionId = form.watch("optionId");
|
|
131
|
+
const shouldShowOptionSelect = productOptions.length > 1 || (isEditing && !selectedOptionId && Boolean(defaultOption));
|
|
124
132
|
// Suggested pax = total physical capacity of the configured departure
|
|
125
133
|
// inventory (each room/seat type's count × its capacity, e.g. 20 doubles
|
|
126
134
|
// sleeping 2 = 40). Lets a new departure inherit capacity from the rooms the
|
|
@@ -151,6 +159,17 @@ export function DepartureForm({ productId, slot, onSuccess, onCancel }) {
|
|
|
151
159
|
useEffect(() => {
|
|
152
160
|
form.reset(initialValues(slot, defaultTz));
|
|
153
161
|
}, [slot, form, defaultTz]);
|
|
162
|
+
useEffect(() => {
|
|
163
|
+
if (!defaultOption)
|
|
164
|
+
return;
|
|
165
|
+
const current = form.getValues("optionId");
|
|
166
|
+
if (current)
|
|
167
|
+
return;
|
|
168
|
+
form.setValue("optionId", defaultOption.id, {
|
|
169
|
+
shouldDirty: false,
|
|
170
|
+
shouldValidate: true,
|
|
171
|
+
});
|
|
172
|
+
}, [defaultOption, form]);
|
|
154
173
|
const onSubmit = async (values) => {
|
|
155
174
|
const startsAt = combineLocalToIso(values.startDate, values.startTime);
|
|
156
175
|
const effectiveEndDate = values.endDate && typeof values.endDate === "string" && values.endDate.length > 0
|
|
@@ -167,6 +186,7 @@ export function DepartureForm({ productId, slot, onSuccess, onCancel }) {
|
|
|
167
186
|
// bug). The schema accepts `null` for both; sending `0` was the bug.
|
|
168
187
|
const nightsOverride = typeof values.nights === "number" && values.nights > 0 ? values.nights : null;
|
|
169
188
|
const daysOverride = typeof values.days === "number" && values.days > 0 ? values.days : null;
|
|
189
|
+
const optionId = values.optionId || defaultOption?.id || null;
|
|
170
190
|
// `remainingPax` is intentionally omitted on edit — the slot service is
|
|
171
191
|
// the source of truth for that field. Concurrent flows (holds, bookings,
|
|
172
192
|
// refunds) mutate it atomically while a form is open, so any snapshot
|
|
@@ -176,6 +196,7 @@ export function DepartureForm({ productId, slot, onSuccess, onCancel }) {
|
|
|
176
196
|
const baseFields = {
|
|
177
197
|
productId,
|
|
178
198
|
itineraryId: values.itineraryId ? values.itineraryId : null,
|
|
199
|
+
optionId,
|
|
179
200
|
dateLocal: values.startDate,
|
|
180
201
|
startsAt,
|
|
181
202
|
endsAt,
|
|
@@ -227,7 +248,17 @@ export function DepartureForm({ productId, slot, onSuccess, onCancel }) {
|
|
|
227
248
|
? formatMessage(itineraryMessages.defaultWithName, {
|
|
228
249
|
name: defaultItinerary.name,
|
|
229
250
|
})
|
|
230
|
-
: itineraryMessages.defaultBadge }), itineraries.map((itinerary) => (_jsx(SelectItem, { value: itinerary.id, children: itinerary.name }, itinerary.id)))] })] }), _jsx("p", { className: "text-xs text-muted-foreground", children: itineraryMessages.overrideHint })] })) : null, _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { children: departureMessages.
|
|
251
|
+
: itineraryMessages.defaultBadge }), itineraries.map((itinerary) => (_jsx(SelectItem, { value: itinerary.id, children: itinerary.name }, itinerary.id)))] })] }), _jsx("p", { className: "text-xs text-muted-foreground", children: itineraryMessages.overrideHint })] })) : null, shouldShowOptionSelect ? (_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { children: departureMessages.optionLabel }), _jsxs(Select, { value: selectedOptionId || defaultOption?.id || "", onValueChange: (value) => form.setValue("optionId", value, {
|
|
252
|
+
shouldDirty: true,
|
|
253
|
+
shouldValidate: true,
|
|
254
|
+
}), items: productOptions.map((option) => ({
|
|
255
|
+
label: option.isDefault
|
|
256
|
+
? formatMessage(departureMessages.defaultOptionLabel, { name: option.name })
|
|
257
|
+
: option.name,
|
|
258
|
+
value: option.id,
|
|
259
|
+
})), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: productOptions.map((option) => (_jsx(SelectItem, { value: option.id, children: option.isDefault
|
|
260
|
+
? formatMessage(departureMessages.defaultOptionLabel, { name: option.name })
|
|
261
|
+
: option.name }, option.id))) })] }), _jsx("p", { className: "text-xs text-muted-foreground", children: departureMessages.optionRepairHint })] })) : null, _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { children: departureMessages.timezoneLabel }), _jsxs(Combobox, { items: TIMEZONE_IDS, value: timezone || null, autoHighlight: true, itemToStringValue: (id) => getTimezoneLabel(id), onValueChange: (next) => {
|
|
231
262
|
if (typeof next === "string") {
|
|
232
263
|
form.setValue("timezone", next, {
|
|
233
264
|
shouldValidate: true,
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from "./use-day-service-translation-mutation.js";
|
|
2
|
+
export * from "./use-day-service-translations.js";
|
|
1
3
|
export * from "./use-duplicate-product-option-mutation.js";
|
|
2
4
|
export * from "./use-option-unit.js";
|
|
3
5
|
export * from "./use-option-unit-mutation.js";
|
|
@@ -16,6 +18,8 @@ export * from "./use-product-days.js";
|
|
|
16
18
|
export * from "./use-product-itineraries.js";
|
|
17
19
|
export * from "./use-product-itinerary-days.js";
|
|
18
20
|
export * from "./use-product-itinerary-mutation.js";
|
|
21
|
+
export * from "./use-product-itinerary-translation-mutation.js";
|
|
22
|
+
export * from "./use-product-itinerary-translations.js";
|
|
19
23
|
export * from "./use-product-media.js";
|
|
20
24
|
export * from "./use-product-media-mutation.js";
|
|
21
25
|
export * from "./use-product-mutation.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAA;AAC1D,cAAc,sBAAsB,CAAA;AACpC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,oCAAoC,CAAA;AAClD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uCAAuC,CAAA;AACrD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,2CAA2C,CAAA;AACzD,cAAc,mCAAmC,CAAA;AACjD,cAAc,uBAAuB,CAA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,CAAA;AACtC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,sBAAsB,CAAA;AACpC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,uCAAuC,CAAA;AACrD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from "./use-day-service-translation-mutation.js";
|
|
2
|
+
export * from "./use-day-service-translations.js";
|
|
1
3
|
export * from "./use-duplicate-product-option-mutation.js";
|
|
2
4
|
export * from "./use-option-unit.js";
|
|
3
5
|
export * from "./use-option-unit-mutation.js";
|
|
@@ -16,6 +18,8 @@ export * from "./use-product-days.js";
|
|
|
16
18
|
export * from "./use-product-itineraries.js";
|
|
17
19
|
export * from "./use-product-itinerary-days.js";
|
|
18
20
|
export * from "./use-product-itinerary-mutation.js";
|
|
21
|
+
export * from "./use-product-itinerary-translation-mutation.js";
|
|
22
|
+
export * from "./use-product-itinerary-translations.js";
|
|
19
23
|
export * from "./use-product-media.js";
|
|
20
24
|
export * from "./use-product-media-mutation.js";
|
|
21
25
|
export * from "./use-product-mutation.js";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type CreateDayServiceTranslationInput, type UpdateDayServiceTranslationInput } from "../schemas.js";
|
|
2
|
+
export declare function useDayServiceTranslationMutation(): {
|
|
3
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
4
|
+
productId: string;
|
|
5
|
+
dayId: string;
|
|
6
|
+
serviceId: string;
|
|
7
|
+
translation: {
|
|
8
|
+
id: string;
|
|
9
|
+
serviceId: string;
|
|
10
|
+
languageTag: string;
|
|
11
|
+
name: string;
|
|
12
|
+
description: string | null;
|
|
13
|
+
notes: string | null;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
};
|
|
17
|
+
}, Error, {
|
|
18
|
+
productId: string;
|
|
19
|
+
dayId: string;
|
|
20
|
+
serviceId: string;
|
|
21
|
+
input: CreateDayServiceTranslationInput;
|
|
22
|
+
}, unknown>;
|
|
23
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
24
|
+
productId: string;
|
|
25
|
+
dayId: string;
|
|
26
|
+
serviceId: string;
|
|
27
|
+
translation: {
|
|
28
|
+
id: string;
|
|
29
|
+
serviceId: string;
|
|
30
|
+
languageTag: string;
|
|
31
|
+
name: string;
|
|
32
|
+
description: string | null;
|
|
33
|
+
notes: string | null;
|
|
34
|
+
createdAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
};
|
|
37
|
+
}, Error, {
|
|
38
|
+
productId: string;
|
|
39
|
+
dayId: string;
|
|
40
|
+
serviceId: string;
|
|
41
|
+
translationId: string;
|
|
42
|
+
input: UpdateDayServiceTranslationInput;
|
|
43
|
+
}, unknown>;
|
|
44
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
45
|
+
productId: string;
|
|
46
|
+
dayId: string;
|
|
47
|
+
serviceId: string;
|
|
48
|
+
}, Error, {
|
|
49
|
+
productId: string;
|
|
50
|
+
dayId: string;
|
|
51
|
+
serviceId: string;
|
|
52
|
+
translationId: string;
|
|
53
|
+
}, unknown>;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=use-day-service-translation-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-day-service-translation-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-day-service-translation-mutation.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,gCAAgC,EAGrC,KAAK,gCAAgC,EACtC,MAAM,eAAe,CAAA;AAEtB,wBAAgB,gCAAgC;;;;;;;;;;;;;;;;mBAoB/B,MAAM;eACV,MAAM;mBACF,MAAM;eACV,gCAAgC;;;;;;;;;;;;;;;;;mBAqB5B,MAAM;eACV,MAAM;mBACF,MAAM;uBACF,MAAM;eACd,gCAAgC;;;;;;;mBAoB5B,MAAM;eACV,MAAM;mBACF,MAAM;uBACF,MAAM;;EAc1B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
5
|
+
import { productsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { dayServiceTranslationSingleResponse, successEnvelope, } from "../schemas.js";
|
|
7
|
+
export function useDayServiceTranslationMutation() {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
const invalidate = async (productId, dayId, serviceId) => {
|
|
11
|
+
await queryClient.invalidateQueries({
|
|
12
|
+
queryKey: productsQueryKeys.dayServiceTranslationsRoot(productId, dayId, serviceId),
|
|
13
|
+
});
|
|
14
|
+
await queryClient.invalidateQueries({
|
|
15
|
+
queryKey: productsQueryKeys.productDayServices(productId, dayId),
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const create = useMutation({
|
|
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) });
|
|
21
|
+
return { productId, dayId, serviceId, translation: data };
|
|
22
|
+
},
|
|
23
|
+
onSuccess: ({ productId, dayId, serviceId }) => invalidate(productId, dayId, serviceId),
|
|
24
|
+
});
|
|
25
|
+
const update = useMutation({
|
|
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) });
|
|
28
|
+
return { productId, dayId, serviceId, translation: data };
|
|
29
|
+
},
|
|
30
|
+
onSuccess: ({ productId, dayId, serviceId }) => invalidate(productId, dayId, serviceId),
|
|
31
|
+
});
|
|
32
|
+
const remove = useMutation({
|
|
33
|
+
mutationFn: async ({ productId, dayId, serviceId, translationId, }) => {
|
|
34
|
+
await fetchWithValidation(`/v1/products/${productId}/days/${dayId}/services/${serviceId}/translations/${translationId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
|
|
35
|
+
return { productId, dayId, serviceId };
|
|
36
|
+
},
|
|
37
|
+
onSuccess: ({ productId, dayId, serviceId }) => invalidate(productId, dayId, serviceId),
|
|
38
|
+
});
|
|
39
|
+
return { create, update, remove };
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface UseDayServiceTranslationsOptions {
|
|
2
|
+
enabled?: boolean | undefined;
|
|
3
|
+
}
|
|
4
|
+
export declare function useDayServiceTranslations(productId: string | null | undefined, dayId: string | null | undefined, serviceId: string | null | undefined, options?: UseDayServiceTranslationsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
serviceId: string;
|
|
8
|
+
languageTag: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string | null;
|
|
11
|
+
notes: string | null;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
updatedAt: string;
|
|
14
|
+
}[];
|
|
15
|
+
total: number;
|
|
16
|
+
limit: number;
|
|
17
|
+
offset: number;
|
|
18
|
+
}, Error>;
|
|
19
|
+
//# sourceMappingURL=use-day-service-translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-day-service-translations.d.ts","sourceRoot":"","sources":["../../src/hooks/use-day-service-translations.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,gCAAgC;IAC/C,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAChC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,gCAAqC;;;;;;;;;;;;;;UAwB/C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
5
|
+
import { productsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { dayServiceTranslationListResponse } from "../schemas.js";
|
|
7
|
+
export function useDayServiceTranslations(productId, dayId, serviceId, options = {}) {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return useQuery({
|
|
11
|
+
queryKey: productsQueryKeys.dayServiceTranslations(productId ?? "", dayId ?? "", serviceId ?? ""),
|
|
12
|
+
queryFn: () => {
|
|
13
|
+
if (!productId || !dayId || !serviceId) {
|
|
14
|
+
throw new Error("useDayServiceTranslations requires a productId, dayId, and serviceId");
|
|
15
|
+
}
|
|
16
|
+
return fetchWithValidation(`/v1/products/${productId}/days/${dayId}/services/${serviceId}/translations`, dayServiceTranslationListResponse, { baseUrl, fetcher });
|
|
17
|
+
},
|
|
18
|
+
enabled: enabled && Boolean(productId) && Boolean(dayId) && Boolean(serviceId),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type CreateProductItineraryTranslationInput, type UpdateProductItineraryTranslationInput } from "../schemas.js";
|
|
2
|
+
export declare function useProductItineraryTranslationMutation(): {
|
|
3
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
4
|
+
productId: string;
|
|
5
|
+
itineraryId: string;
|
|
6
|
+
translation: {
|
|
7
|
+
id: string;
|
|
8
|
+
itineraryId: string;
|
|
9
|
+
languageTag: string;
|
|
10
|
+
name: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
};
|
|
14
|
+
}, Error, {
|
|
15
|
+
productId: string;
|
|
16
|
+
itineraryId: string;
|
|
17
|
+
input: CreateProductItineraryTranslationInput;
|
|
18
|
+
}, unknown>;
|
|
19
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
20
|
+
productId: string;
|
|
21
|
+
itineraryId: string;
|
|
22
|
+
translation: {
|
|
23
|
+
id: string;
|
|
24
|
+
itineraryId: string;
|
|
25
|
+
languageTag: string;
|
|
26
|
+
name: string;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
updatedAt: string;
|
|
29
|
+
};
|
|
30
|
+
}, Error, {
|
|
31
|
+
productId: string;
|
|
32
|
+
itineraryId: string;
|
|
33
|
+
translationId: string;
|
|
34
|
+
input: UpdateProductItineraryTranslationInput;
|
|
35
|
+
}, unknown>;
|
|
36
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
37
|
+
productId: string;
|
|
38
|
+
itineraryId: string;
|
|
39
|
+
}, Error, {
|
|
40
|
+
productId: string;
|
|
41
|
+
itineraryId: string;
|
|
42
|
+
translationId: string;
|
|
43
|
+
}, unknown>;
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=use-product-itinerary-translation-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product-itinerary-translation-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-itinerary-translation-mutation.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,sCAAsC,EAG3C,KAAK,sCAAsC,EAC5C,MAAM,eAAe,CAAA;AAEtB,wBAAgB,sCAAsC;;;;;;;;;;;;;mBAmBrC,MAAM;qBACJ,MAAM;eACZ,sCAAsC;;;;;;;;;;;;;;mBAoBlC,MAAM;qBACJ,MAAM;uBACJ,MAAM;eACd,sCAAsC;;;;;;mBAmBlC,MAAM;qBACJ,MAAM;uBACJ,MAAM;;EAc1B"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
5
|
+
import { productsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { productItineraryTranslationSingleResponse, successEnvelope, } from "../schemas.js";
|
|
7
|
+
export function useProductItineraryTranslationMutation() {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
const invalidate = async (productId, itineraryId) => {
|
|
11
|
+
await queryClient.invalidateQueries({
|
|
12
|
+
queryKey: productsQueryKeys.productItineraryTranslationsRoot(productId, itineraryId),
|
|
13
|
+
});
|
|
14
|
+
await queryClient.invalidateQueries({
|
|
15
|
+
queryKey: productsQueryKeys.productItineraries(productId),
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const create = useMutation({
|
|
19
|
+
mutationFn: async ({ productId, itineraryId, input, }) => {
|
|
20
|
+
const { data } = await fetchWithValidation(`/v1/products/${productId}/itineraries/${itineraryId}/translations`, productItineraryTranslationSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
21
|
+
return { productId, itineraryId, translation: data };
|
|
22
|
+
},
|
|
23
|
+
onSuccess: ({ productId, itineraryId }) => invalidate(productId, itineraryId),
|
|
24
|
+
});
|
|
25
|
+
const update = useMutation({
|
|
26
|
+
mutationFn: async ({ productId, itineraryId, translationId, input, }) => {
|
|
27
|
+
const { data } = await fetchWithValidation(`/v1/products/${productId}/itineraries/${itineraryId}/translations/${translationId}`, productItineraryTranslationSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
28
|
+
return { productId, itineraryId, translation: data };
|
|
29
|
+
},
|
|
30
|
+
onSuccess: ({ productId, itineraryId }) => invalidate(productId, itineraryId),
|
|
31
|
+
});
|
|
32
|
+
const remove = useMutation({
|
|
33
|
+
mutationFn: async ({ productId, itineraryId, translationId, }) => {
|
|
34
|
+
await fetchWithValidation(`/v1/products/${productId}/itineraries/${itineraryId}/translations/${translationId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
|
|
35
|
+
return { productId, itineraryId };
|
|
36
|
+
},
|
|
37
|
+
onSuccess: ({ productId, itineraryId }) => invalidate(productId, itineraryId),
|
|
38
|
+
});
|
|
39
|
+
return { create, update, remove };
|
|
40
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface UseProductItineraryTranslationsOptions {
|
|
2
|
+
enabled?: boolean | undefined;
|
|
3
|
+
}
|
|
4
|
+
export declare function useProductItineraryTranslations(productId: string | null | undefined, itineraryId: string | null | undefined, options?: UseProductItineraryTranslationsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
id: string;
|
|
7
|
+
itineraryId: string;
|
|
8
|
+
languageTag: string;
|
|
9
|
+
name: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
}[];
|
|
13
|
+
total: number;
|
|
14
|
+
limit: number;
|
|
15
|
+
offset: number;
|
|
16
|
+
}, Error>;
|
|
17
|
+
//# sourceMappingURL=use-product-itinerary-translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product-itinerary-translations.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-itinerary-translations.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,sCAAsC;IACrD,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACtC,OAAO,GAAE,sCAA2C;;;;;;;;;;;;UAoBrD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation } from "../client.js";
|
|
4
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
5
|
+
import { productsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { productItineraryTranslationListResponse } from "../schemas.js";
|
|
7
|
+
export function useProductItineraryTranslations(productId, itineraryId, options = {}) {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
9
|
+
const { enabled = true } = options;
|
|
10
|
+
return useQuery({
|
|
11
|
+
queryKey: productsQueryKeys.productItineraryTranslations(productId ?? "", itineraryId ?? ""),
|
|
12
|
+
queryFn: () => {
|
|
13
|
+
if (!productId || !itineraryId) {
|
|
14
|
+
throw new Error("useProductItineraryTranslations requires a productId and itineraryId");
|
|
15
|
+
}
|
|
16
|
+
return fetchWithValidation(`/v1/products/${productId}/itineraries/${itineraryId}/translations`, productItineraryTranslationListResponse, { baseUrl, fetcher });
|
|
17
|
+
},
|
|
18
|
+
enabled: enabled && Boolean(productId) && Boolean(itineraryId),
|
|
19
|
+
});
|
|
20
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher
|
|
|
2
2
|
export * from "./hooks/index.js";
|
|
3
3
|
export { listProductActionLedger, type ProductActionLedgerListInput } from "./operations.js";
|
|
4
4
|
export { useVoyantProductsContext, type VoyantProductsContextValue, VoyantProductsProvider, type VoyantProductsProviderProps, } from "./provider.js";
|
|
5
|
-
export { type ProductActionLedgerListCursor, type ProductActionLedgerListFilters, type ProductsListFilters, type ProductsListSortDir, type ProductsListSortField, type ProductTranslationsListFilters, productsQueryKeys, } from "./query-keys.js";
|
|
5
|
+
export { type DayServiceTranslationsListFilters, type ProductActionLedgerListCursor, type ProductActionLedgerListFilters, type ProductDayTranslationsListFilters, type ProductItineraryTranslationsListFilters, type ProductsListFilters, type ProductsListSortDir, type ProductsListSortField, type ProductTranslationsListFilters, productsQueryKeys, } from "./query-keys.js";
|
|
6
6
|
export { getOptionUnitQueryOptions, getOptionUnitsQueryOptions, getProductCategoriesQueryOptions, getProductDayServicesQueryOptions, getProductDaysQueryOptions, getProductItinerariesQueryOptions, getProductItineraryDaysQueryOptions, getProductMediaQueryOptions, getProductOptionQueryOptions, getProductOptionsQueryOptions, getProductQueryOptions, getProductsQueryOptions, getProductTagsQueryOptions, getProductTypeQueryOptions, getProductTypesQueryOptions, getProductVersionsQueryOptions, } from "./query-options.js";
|
|
7
7
|
export { getProductActionLedgerQueryOptions } from "./query-options-action-ledger.js";
|
|
8
8
|
export * from "./schemas.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,uBAAuB,EAAE,KAAK,4BAA4B,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EACL,wBAAwB,EACxB,KAAK,0BAA0B,EAC/B,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,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ACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,kCAAkC,EAAE,MAAM,kCAAkC,CAAA;AACrF,cAAc,cAAc,CAAA"}
|
package/dist/query-keys.d.ts
CHANGED
|
@@ -77,6 +77,16 @@ export interface ProductDayTranslationsListFilters {
|
|
|
77
77
|
limit?: number | undefined;
|
|
78
78
|
offset?: number | undefined;
|
|
79
79
|
}
|
|
80
|
+
export interface ProductItineraryTranslationsListFilters {
|
|
81
|
+
languageTag?: string | undefined;
|
|
82
|
+
limit?: number | undefined;
|
|
83
|
+
offset?: number | undefined;
|
|
84
|
+
}
|
|
85
|
+
export interface DayServiceTranslationsListFilters {
|
|
86
|
+
languageTag?: string | undefined;
|
|
87
|
+
limit?: number | undefined;
|
|
88
|
+
offset?: number | undefined;
|
|
89
|
+
}
|
|
80
90
|
export declare const productsQueryKeys: {
|
|
81
91
|
readonly all: readonly ["voyant", "products"];
|
|
82
92
|
readonly products: () => readonly ["voyant", "products", "products"];
|
|
@@ -102,8 +112,12 @@ export declare const productsQueryKeys: {
|
|
|
102
112
|
readonly optionUnit: (id: string) => readonly ["voyant", "products", "option-units", "detail", string];
|
|
103
113
|
readonly productItineraries: (productId: string) => readonly ["voyant", "products", "products", "detail", string, "itineraries"];
|
|
104
114
|
readonly productItineraryDays: (productId: string, itineraryId: string) => readonly ["voyant", "products", "products", "detail", string, "itineraries", string, "days"];
|
|
115
|
+
readonly productItineraryTranslationsRoot: (productId: string, itineraryId: string) => readonly ["voyant", "products", "products", "detail", string, "itineraries", string, "translations"];
|
|
116
|
+
readonly productItineraryTranslations: (productId: string, itineraryId: string, filters?: ProductItineraryTranslationsListFilters) => readonly ["voyant", "products", "products", "detail", string, "itineraries", string, "translations", ProductItineraryTranslationsListFilters];
|
|
105
117
|
readonly productDays: (productId: string) => readonly ["voyant", "products", "products", "detail", string, "days"];
|
|
106
118
|
readonly productDayServices: (productId: string, dayId: string) => readonly ["voyant", "products", "products", "detail", string, "days", string, "services"];
|
|
119
|
+
readonly dayServiceTranslationsRoot: (productId: string, dayId: string, serviceId: string) => readonly ["voyant", "products", "products", "detail", string, "days", string, "services", string, "translations"];
|
|
120
|
+
readonly dayServiceTranslations: (productId: string, dayId: string, serviceId: string, filters?: DayServiceTranslationsListFilters) => readonly ["voyant", "products", "products", "detail", string, "days", string, "services", string, "translations", DayServiceTranslationsListFilters];
|
|
107
121
|
readonly productDayTranslationsRoot: (productId: string, dayId: string) => readonly ["voyant", "products", "products", "detail", string, "days", string, "translations"];
|
|
108
122
|
readonly productDayTranslations: (productId: string, dayId: string, filters?: ProductDayTranslationsListFilters) => readonly ["voyant", "products", "products", "detail", string, "days", string, "translations", ProductDayTranslationsListFilters];
|
|
109
123
|
readonly productVersions: (productId: string) => readonly ["voyant", "products", "products", "detail", string, "versions"];
|
package/dist/query-keys.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC7B,MAAM,GACN,QAAQ,GACR,YAAY,GACZ,KAAK,GACL,WAAW,GACX,SAAS,GACT,WAAW,CAAA;AAEf,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,MAAM,CAAA;AAEhD,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,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24
24
|
productItineraries: (productId) => [...productsQueryKeys.product(productId), "itineraries"],
|
|
25
25
|
productItineraryDays: (productId, itineraryId) => [...productsQueryKeys.productItineraries(productId), itineraryId, "days"],
|
|
26
|
+
productItineraryTranslationsRoot: (productId, itineraryId) => [...productsQueryKeys.productItineraries(productId), itineraryId, "translations"],
|
|
27
|
+
productItineraryTranslations: (productId, itineraryId, filters = {}) => [
|
|
28
|
+
...productsQueryKeys.productItineraryTranslationsRoot(productId, itineraryId),
|
|
29
|
+
filters,
|
|
30
|
+
],
|
|
26
31
|
productDays: (productId) => [...productsQueryKeys.product(productId), "days"],
|
|
27
32
|
productDayServices: (productId, dayId) => [...productsQueryKeys.productDays(productId), dayId, "services"],
|
|
33
|
+
dayServiceTranslationsRoot: (productId, dayId, serviceId) => [...productsQueryKeys.productDayServices(productId, dayId), serviceId, "translations"],
|
|
34
|
+
dayServiceTranslations: (productId, dayId, serviceId, filters = {}) => [
|
|
35
|
+
...productsQueryKeys.dayServiceTranslationsRoot(productId, dayId, serviceId),
|
|
36
|
+
filters,
|
|
37
|
+
],
|
|
28
38
|
productDayTranslationsRoot: (productId, dayId) => [...productsQueryKeys.productDays(productId), dayId, "translations"],
|
|
29
39
|
productDayTranslations: (productId, dayId, filters = {}) => [...productsQueryKeys.productDayTranslationsRoot(productId, dayId), filters],
|
|
30
40
|
productVersions: (productId) => [...productsQueryKeys.product(productId), "versions"],
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductDayTranslationSchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductDayTranslationSchema, updateProductMediaSchema, updateProductTranslationSchema } from "@voyant-travel/inventory/validation";
|
|
1
|
+
import { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertDayServiceTranslationSchema, insertItinerarySchema, insertProductDayTranslationSchema, insertProductItineraryTranslationSchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateDayServiceTranslationSchema, updateItinerarySchema, updateProductDayTranslationSchema, updateProductItineraryTranslationSchema, updateProductMediaSchema, updateProductTranslationSchema } from "@voyant-travel/inventory/validation";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export declare const paginatedEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
|
|
4
4
|
data: z.ZodArray<T>;
|
|
@@ -250,6 +250,15 @@ export declare const productDayTranslationRecordSchema: z.ZodObject<{
|
|
|
250
250
|
}, z.core.$strip>;
|
|
251
251
|
export type ProductDayTranslationRecord = z.infer<typeof productDayTranslationRecordSchema>;
|
|
252
252
|
export type ProductDayRecord = z.infer<typeof productDayRecordSchema>;
|
|
253
|
+
export declare const productItineraryTranslationRecordSchema: z.ZodObject<{
|
|
254
|
+
id: z.ZodString;
|
|
255
|
+
itineraryId: z.ZodString;
|
|
256
|
+
languageTag: z.ZodString;
|
|
257
|
+
name: z.ZodString;
|
|
258
|
+
createdAt: z.ZodString;
|
|
259
|
+
updatedAt: z.ZodString;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
export type ProductItineraryTranslationRecord = z.infer<typeof productItineraryTranslationRecordSchema>;
|
|
253
262
|
export declare const productDayServiceRecordSchema: z.ZodObject<{
|
|
254
263
|
id: z.ZodString;
|
|
255
264
|
dayId: z.ZodString;
|
|
@@ -273,6 +282,17 @@ export declare const productDayServiceRecordSchema: z.ZodObject<{
|
|
|
273
282
|
createdAt: z.ZodString;
|
|
274
283
|
}, z.core.$strip>;
|
|
275
284
|
export type ProductDayServiceRecord = z.infer<typeof productDayServiceRecordSchema>;
|
|
285
|
+
export declare const dayServiceTranslationRecordSchema: z.ZodObject<{
|
|
286
|
+
id: z.ZodString;
|
|
287
|
+
serviceId: z.ZodString;
|
|
288
|
+
languageTag: z.ZodString;
|
|
289
|
+
name: z.ZodString;
|
|
290
|
+
description: z.ZodNullable<z.ZodString>;
|
|
291
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
292
|
+
createdAt: z.ZodString;
|
|
293
|
+
updatedAt: z.ZodString;
|
|
294
|
+
}, z.core.$strip>;
|
|
295
|
+
export type DayServiceTranslationRecord = z.infer<typeof dayServiceTranslationRecordSchema>;
|
|
276
296
|
export declare const productVersionRecordSchema: z.ZodObject<{
|
|
277
297
|
id: z.ZodString;
|
|
278
298
|
productId: z.ZodString;
|
|
@@ -507,6 +527,56 @@ export declare const productDayTranslationSingleResponse: z.ZodObject<{
|
|
|
507
527
|
updatedAt: z.ZodString;
|
|
508
528
|
}, z.core.$strip>;
|
|
509
529
|
}, z.core.$strip>;
|
|
530
|
+
export declare const productItineraryTranslationListResponse: z.ZodObject<{
|
|
531
|
+
data: z.ZodArray<z.ZodObject<{
|
|
532
|
+
id: z.ZodString;
|
|
533
|
+
itineraryId: z.ZodString;
|
|
534
|
+
languageTag: z.ZodString;
|
|
535
|
+
name: z.ZodString;
|
|
536
|
+
createdAt: z.ZodString;
|
|
537
|
+
updatedAt: z.ZodString;
|
|
538
|
+
}, z.core.$strip>>;
|
|
539
|
+
total: z.ZodNumber;
|
|
540
|
+
limit: z.ZodNumber;
|
|
541
|
+
offset: z.ZodNumber;
|
|
542
|
+
}, z.core.$strip>;
|
|
543
|
+
export declare const productItineraryTranslationSingleResponse: z.ZodObject<{
|
|
544
|
+
data: z.ZodObject<{
|
|
545
|
+
id: z.ZodString;
|
|
546
|
+
itineraryId: z.ZodString;
|
|
547
|
+
languageTag: z.ZodString;
|
|
548
|
+
name: z.ZodString;
|
|
549
|
+
createdAt: z.ZodString;
|
|
550
|
+
updatedAt: z.ZodString;
|
|
551
|
+
}, z.core.$strip>;
|
|
552
|
+
}, z.core.$strip>;
|
|
553
|
+
export declare const dayServiceTranslationListResponse: z.ZodObject<{
|
|
554
|
+
data: z.ZodArray<z.ZodObject<{
|
|
555
|
+
id: z.ZodString;
|
|
556
|
+
serviceId: z.ZodString;
|
|
557
|
+
languageTag: z.ZodString;
|
|
558
|
+
name: z.ZodString;
|
|
559
|
+
description: z.ZodNullable<z.ZodString>;
|
|
560
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
561
|
+
createdAt: z.ZodString;
|
|
562
|
+
updatedAt: z.ZodString;
|
|
563
|
+
}, z.core.$strip>>;
|
|
564
|
+
total: z.ZodNumber;
|
|
565
|
+
limit: z.ZodNumber;
|
|
566
|
+
offset: z.ZodNumber;
|
|
567
|
+
}, z.core.$strip>;
|
|
568
|
+
export declare const dayServiceTranslationSingleResponse: z.ZodObject<{
|
|
569
|
+
data: z.ZodObject<{
|
|
570
|
+
id: z.ZodString;
|
|
571
|
+
serviceId: z.ZodString;
|
|
572
|
+
languageTag: z.ZodString;
|
|
573
|
+
name: z.ZodString;
|
|
574
|
+
description: z.ZodNullable<z.ZodString>;
|
|
575
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
576
|
+
createdAt: z.ZodString;
|
|
577
|
+
updatedAt: z.ZodString;
|
|
578
|
+
}, z.core.$strip>;
|
|
579
|
+
}, z.core.$strip>;
|
|
510
580
|
export declare const productTypeListResponse: z.ZodObject<{
|
|
511
581
|
data: z.ZodArray<z.ZodObject<{
|
|
512
582
|
id: z.ZodString;
|
|
@@ -1079,7 +1149,7 @@ export declare const productActionLedgerListResponse: z.ZodObject<{
|
|
|
1079
1149
|
}, z.core.$strip>;
|
|
1080
1150
|
}, z.core.$strip>;
|
|
1081
1151
|
export type ProductActionLedgerListResponse = z.infer<typeof productActionLedgerListResponse>;
|
|
1082
|
-
export { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductDayTranslationSchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductDayTranslationSchema, updateProductMediaSchema, updateProductTranslationSchema, };
|
|
1152
|
+
export { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertDayServiceTranslationSchema, insertItinerarySchema, insertProductDayTranslationSchema, insertProductItineraryTranslationSchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateDayServiceTranslationSchema, updateItinerarySchema, updateProductDayTranslationSchema, updateProductItineraryTranslationSchema, updateProductMediaSchema, updateProductTranslationSchema, };
|
|
1083
1153
|
export type CreateProductItineraryInput = z.input<typeof insertItinerarySchema>;
|
|
1084
1154
|
export type UpdateProductItineraryInput = z.input<typeof updateItinerarySchema>;
|
|
1085
1155
|
export type DuplicateProductItineraryInput = z.input<typeof duplicateItinerarySchema>;
|
|
@@ -1094,5 +1164,9 @@ export type CreateProductTranslationInput = z.input<typeof insertProductTranslat
|
|
|
1094
1164
|
export type UpdateProductTranslationInput = z.input<typeof updateProductTranslationSchema>;
|
|
1095
1165
|
export type CreateProductDayTranslationInput = z.input<typeof insertProductDayTranslationSchema>;
|
|
1096
1166
|
export type UpdateProductDayTranslationInput = z.input<typeof updateProductDayTranslationSchema>;
|
|
1167
|
+
export type CreateProductItineraryTranslationInput = z.input<typeof insertProductItineraryTranslationSchema>;
|
|
1168
|
+
export type UpdateProductItineraryTranslationInput = z.input<typeof updateProductItineraryTranslationSchema>;
|
|
1169
|
+
export type CreateDayServiceTranslationInput = z.input<typeof insertDayServiceTranslationSchema>;
|
|
1170
|
+
export type UpdateDayServiceTranslationInput = z.input<typeof updateDayServiceTranslationSchema>;
|
|
1097
1171
|
export type ReorderProductMediaInput = z.input<typeof reorderProductMediaSchema>;
|
|
1098
1172
|
//# sourceMappingURL=schemas.d.ts.map
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,sBAAsB,E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AK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC1F,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAChG,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAChG,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAC1D,OAAO,uCAAuC,CAC/C,CAAA;AACD,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAC1D,OAAO,uCAAuC,CAC/C,CAAA;AACD,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAChG,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAChG,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductDayTranslationSchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductDayTranslationSchema, updateProductMediaSchema, updateProductTranslationSchema, } from "@voyant-travel/inventory/validation";
|
|
1
|
+
import { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertDayServiceTranslationSchema, insertItinerarySchema, insertProductDayTranslationSchema, insertProductItineraryTranslationSchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateDayServiceTranslationSchema, updateItinerarySchema, updateProductDayTranslationSchema, updateProductItineraryTranslationSchema, updateProductMediaSchema, updateProductTranslationSchema, } from "@voyant-travel/inventory/validation";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export const paginatedEnvelope = (item) => z.object({
|
|
4
4
|
data: z.array(item),
|
|
@@ -169,6 +169,14 @@ export const productDayTranslationRecordSchema = z.object({
|
|
|
169
169
|
createdAt: z.string(),
|
|
170
170
|
updatedAt: z.string(),
|
|
171
171
|
});
|
|
172
|
+
export const productItineraryTranslationRecordSchema = z.object({
|
|
173
|
+
id: z.string(),
|
|
174
|
+
itineraryId: z.string(),
|
|
175
|
+
languageTag: z.string(),
|
|
176
|
+
name: z.string(),
|
|
177
|
+
createdAt: z.string(),
|
|
178
|
+
updatedAt: z.string(),
|
|
179
|
+
});
|
|
172
180
|
export const productDayServiceRecordSchema = z.object({
|
|
173
181
|
id: z.string(),
|
|
174
182
|
dayId: z.string(),
|
|
@@ -184,6 +192,16 @@ export const productDayServiceRecordSchema = z.object({
|
|
|
184
192
|
notes: z.string().nullable(),
|
|
185
193
|
createdAt: z.string(),
|
|
186
194
|
});
|
|
195
|
+
export const dayServiceTranslationRecordSchema = z.object({
|
|
196
|
+
id: z.string(),
|
|
197
|
+
serviceId: z.string(),
|
|
198
|
+
languageTag: z.string(),
|
|
199
|
+
name: z.string(),
|
|
200
|
+
description: z.string().nullable(),
|
|
201
|
+
notes: z.string().nullable(),
|
|
202
|
+
createdAt: z.string(),
|
|
203
|
+
updatedAt: z.string(),
|
|
204
|
+
});
|
|
187
205
|
export const productVersionRecordSchema = z.object({
|
|
188
206
|
id: z.string(),
|
|
189
207
|
productId: z.string(),
|
|
@@ -215,6 +233,10 @@ export const productTranslationListResponse = paginatedEnvelope(productTranslati
|
|
|
215
233
|
export const productTranslationSingleResponse = singleEnvelope(productTranslationRecordSchema);
|
|
216
234
|
export const productDayTranslationListResponse = paginatedEnvelope(productDayTranslationRecordSchema);
|
|
217
235
|
export const productDayTranslationSingleResponse = singleEnvelope(productDayTranslationRecordSchema);
|
|
236
|
+
export const productItineraryTranslationListResponse = paginatedEnvelope(productItineraryTranslationRecordSchema);
|
|
237
|
+
export const productItineraryTranslationSingleResponse = singleEnvelope(productItineraryTranslationRecordSchema);
|
|
238
|
+
export const dayServiceTranslationListResponse = paginatedEnvelope(dayServiceTranslationRecordSchema);
|
|
239
|
+
export const dayServiceTranslationSingleResponse = singleEnvelope(dayServiceTranslationRecordSchema);
|
|
218
240
|
export const productTypeListResponse = paginatedEnvelope(productTypeRecordSchema);
|
|
219
241
|
export const productTypeSingleResponse = singleEnvelope(productTypeRecordSchema);
|
|
220
242
|
export const productCategoryListResponse = paginatedEnvelope(productCategoryRecordSchema);
|
|
@@ -317,4 +339,4 @@ export const productActionLedgerListResponse = z.object({
|
|
|
317
339
|
.nullable(),
|
|
318
340
|
}),
|
|
319
341
|
});
|
|
320
|
-
export { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductDayTranslationSchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductDayTranslationSchema, updateProductMediaSchema, updateProductTranslationSchema, };
|
|
342
|
+
export { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertDayServiceTranslationSchema, insertItinerarySchema, insertProductDayTranslationSchema, insertProductItineraryTranslationSchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateDayServiceTranslationSchema, updateItinerarySchema, updateProductDayTranslationSchema, updateProductItineraryTranslationSchema, updateProductMediaSchema, updateProductTranslationSchema, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/inventory-react",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -88,10 +88,10 @@
|
|
|
88
88
|
"@voyant-travel/admin": "^0.114.0",
|
|
89
89
|
"@voyant-travel/catalog-react": "^0.129.0",
|
|
90
90
|
"@voyant-travel/finance": "^0.131.0",
|
|
91
|
-
"@voyant-travel/finance-react": "^0.131.0",
|
|
92
|
-
"@voyant-travel/inventory": "^0.4.3",
|
|
93
91
|
"@voyant-travel/ui": "^0.108.0",
|
|
94
|
-
"@voyant-travel/utils": "^0.105.2"
|
|
92
|
+
"@voyant-travel/utils": "^0.105.2",
|
|
93
|
+
"@voyant-travel/finance-react": "^0.131.0",
|
|
94
|
+
"@voyant-travel/inventory": "^0.4.4"
|
|
95
95
|
},
|
|
96
96
|
"peerDependenciesMeta": {
|
|
97
97
|
"@voyant-travel/admin": {
|
|
@@ -115,8 +115,8 @@
|
|
|
115
115
|
"motion": "^12.38.0",
|
|
116
116
|
"react-day-picker": "^9.8.0",
|
|
117
117
|
"sonner": "^2.0.7",
|
|
118
|
-
"@voyant-travel/
|
|
119
|
-
"@voyant-travel/
|
|
118
|
+
"@voyant-travel/react": "^0.104.1",
|
|
119
|
+
"@voyant-travel/i18n": "^0.107.4"
|
|
120
120
|
},
|
|
121
121
|
"devDependencies": {
|
|
122
122
|
"@tanstack/react-query": "^5.100.11",
|
|
@@ -129,16 +129,16 @@
|
|
|
129
129
|
"typescript": "^6.0.2",
|
|
130
130
|
"vitest": "^4.1.2",
|
|
131
131
|
"zod": "^4.3.6",
|
|
132
|
-
"@voyant-travel/admin": "^0.114.0",
|
|
133
|
-
"@voyant-travel/catalog-react": "^0.129.0",
|
|
134
132
|
"@voyant-travel/finance": "^0.131.0",
|
|
133
|
+
"@voyant-travel/catalog-react": "^0.129.0",
|
|
134
|
+
"@voyant-travel/admin": "^0.114.0",
|
|
135
135
|
"@voyant-travel/finance-react": "^0.131.0",
|
|
136
|
-
"@voyant-travel/i18n": "^0.107.3",
|
|
137
|
-
"@voyant-travel/inventory": "^0.4.3",
|
|
138
136
|
"@voyant-travel/react": "^0.104.1",
|
|
137
|
+
"@voyant-travel/i18n": "^0.107.4",
|
|
139
138
|
"@voyant-travel/ui": "^0.108.0",
|
|
140
139
|
"@voyant-travel/utils": "^0.105.2",
|
|
141
|
-
"@voyant-travel/voyant-typescript-config": "^0.1.0"
|
|
140
|
+
"@voyant-travel/voyant-typescript-config": "^0.1.0",
|
|
141
|
+
"@voyant-travel/inventory": "^0.4.4"
|
|
142
142
|
},
|
|
143
143
|
"files": [
|
|
144
144
|
"dist",
|