@voyantjs/products-react 0.62.1 → 0.62.3
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/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/use-product-translation-mutation.d.ts +52 -0
- package/dist/hooks/use-product-translation-mutation.d.ts.map +1 -0
- package/dist/hooks/use-product-translation-mutation.js +47 -0
- package/dist/hooks/use-product-translations.d.ts +28 -0
- package/dist/hooks/use-product-translations.d.ts.map +1 -0
- package/dist/hooks/use-product-translations.js +24 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/query-keys.d.ts +8 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +2 -0
- package/dist/schemas.d.ts +60 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +20 -2
- package/package.json +5 -5
package/dist/hooks/index.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ export * from "./use-product-options.js";
|
|
|
23
23
|
export * from "./use-product-tag.js";
|
|
24
24
|
export * from "./use-product-tag-mutation.js";
|
|
25
25
|
export * from "./use-product-tags.js";
|
|
26
|
+
export * from "./use-product-translation-mutation.js";
|
|
27
|
+
export * from "./use-product-translations.js";
|
|
26
28
|
export * from "./use-product-type.js";
|
|
27
29
|
export * from "./use-product-type-mutation.js";
|
|
28
30
|
export * from "./use-product-types.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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BAAyB,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
|
@@ -23,6 +23,8 @@ export * from "./use-product-options.js";
|
|
|
23
23
|
export * from "./use-product-tag.js";
|
|
24
24
|
export * from "./use-product-tag-mutation.js";
|
|
25
25
|
export * from "./use-product-tags.js";
|
|
26
|
+
export * from "./use-product-translation-mutation.js";
|
|
27
|
+
export * from "./use-product-translations.js";
|
|
26
28
|
export * from "./use-product-type.js";
|
|
27
29
|
export * from "./use-product-type-mutation.js";
|
|
28
30
|
export * from "./use-product-types.js";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type CreateProductTranslationInput, type UpdateProductTranslationInput } from "../schemas.js";
|
|
2
|
+
export declare function useProductTranslationMutation(): {
|
|
3
|
+
create: import("@tanstack/react-query").UseMutationResult<{
|
|
4
|
+
id: string;
|
|
5
|
+
productId: string;
|
|
6
|
+
languageTag: string;
|
|
7
|
+
slug: string | null;
|
|
8
|
+
name: string;
|
|
9
|
+
shortDescription: string | null;
|
|
10
|
+
description: string | null;
|
|
11
|
+
inclusionsHtml: string | null;
|
|
12
|
+
exclusionsHtml: string | null;
|
|
13
|
+
termsHtml: string | null;
|
|
14
|
+
seoTitle: string | null;
|
|
15
|
+
seoDescription: string | null;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}, Error, {
|
|
19
|
+
productId: string;
|
|
20
|
+
input: CreateProductTranslationInput;
|
|
21
|
+
}, unknown>;
|
|
22
|
+
update: import("@tanstack/react-query").UseMutationResult<{
|
|
23
|
+
productId: string;
|
|
24
|
+
translation: {
|
|
25
|
+
id: string;
|
|
26
|
+
productId: string;
|
|
27
|
+
languageTag: string;
|
|
28
|
+
slug: string | null;
|
|
29
|
+
name: string;
|
|
30
|
+
shortDescription: string | null;
|
|
31
|
+
description: string | null;
|
|
32
|
+
inclusionsHtml: string | null;
|
|
33
|
+
exclusionsHtml: string | null;
|
|
34
|
+
termsHtml: string | null;
|
|
35
|
+
seoTitle: string | null;
|
|
36
|
+
seoDescription: string | null;
|
|
37
|
+
createdAt: string;
|
|
38
|
+
updatedAt: string;
|
|
39
|
+
};
|
|
40
|
+
}, Error, {
|
|
41
|
+
productId: string;
|
|
42
|
+
translationId: string;
|
|
43
|
+
input: UpdateProductTranslationInput;
|
|
44
|
+
}, unknown>;
|
|
45
|
+
remove: import("@tanstack/react-query").UseMutationResult<{
|
|
46
|
+
productId: string;
|
|
47
|
+
}, Error, {
|
|
48
|
+
productId: string;
|
|
49
|
+
translationId: string;
|
|
50
|
+
}, unknown>;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=use-product-translation-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product-translation-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-translation-mutation.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,6BAA6B,EAGlC,KAAK,6BAA6B,EACnC,MAAM,eAAe,CAAA;AAEtB,wBAAgB,6BAA6B;;;;;;;;;;;;;;;;;mBAS5B,MAAM;eACV,6BAA6B;;;;;;;;;;;;;;;;;;;;;mBAwBzB,MAAM;uBACF,MAAM;eACd,6BAA6B;;;;;mBAuBzB,MAAM;uBACF,MAAM;;EAmB1B"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { productTranslationSingleResponse, successEnvelope, } from "../schemas.js";
|
|
7
|
+
export function useProductTranslationMutation() {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
9
|
+
const queryClient = useQueryClient();
|
|
10
|
+
const create = useMutation({
|
|
11
|
+
mutationFn: async ({ productId, input, }) => {
|
|
12
|
+
const { data } = await fetchWithValidation(`/v1/products/${productId}/translations`, productTranslationSingleResponse, { baseUrl, fetcher }, { method: "POST", body: JSON.stringify(input) });
|
|
13
|
+
return data;
|
|
14
|
+
},
|
|
15
|
+
onSuccess: async (data) => {
|
|
16
|
+
await queryClient.invalidateQueries({
|
|
17
|
+
queryKey: productsQueryKeys.productTranslationsRoot(data.productId),
|
|
18
|
+
});
|
|
19
|
+
await queryClient.invalidateQueries({ queryKey: productsQueryKeys.product(data.productId) });
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
const update = useMutation({
|
|
23
|
+
mutationFn: async ({ productId, translationId, input, }) => {
|
|
24
|
+
const { data } = await fetchWithValidation(`/v1/products/translations/${translationId}`, productTranslationSingleResponse, { baseUrl, fetcher }, { method: "PATCH", body: JSON.stringify(input) });
|
|
25
|
+
return { productId, translation: data };
|
|
26
|
+
},
|
|
27
|
+
onSuccess: async ({ productId }) => {
|
|
28
|
+
await queryClient.invalidateQueries({
|
|
29
|
+
queryKey: productsQueryKeys.productTranslationsRoot(productId),
|
|
30
|
+
});
|
|
31
|
+
await queryClient.invalidateQueries({ queryKey: productsQueryKeys.product(productId) });
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
const remove = useMutation({
|
|
35
|
+
mutationFn: async ({ productId, translationId, }) => {
|
|
36
|
+
await fetchWithValidation(`/v1/products/translations/${translationId}`, successEnvelope, { baseUrl, fetcher }, { method: "DELETE" });
|
|
37
|
+
return { productId };
|
|
38
|
+
},
|
|
39
|
+
onSuccess: async ({ productId }) => {
|
|
40
|
+
await queryClient.invalidateQueries({
|
|
41
|
+
queryKey: productsQueryKeys.productTranslationsRoot(productId),
|
|
42
|
+
});
|
|
43
|
+
await queryClient.invalidateQueries({ queryKey: productsQueryKeys.product(productId) });
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
return { create, update, remove };
|
|
47
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface UseProductTranslationsOptions {
|
|
2
|
+
languageTag?: string | undefined;
|
|
3
|
+
limit?: number | undefined;
|
|
4
|
+
offset?: number | undefined;
|
|
5
|
+
enabled?: boolean | undefined;
|
|
6
|
+
}
|
|
7
|
+
export declare function useProductTranslations(productId: string | null | undefined, options?: UseProductTranslationsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
8
|
+
data: {
|
|
9
|
+
id: string;
|
|
10
|
+
productId: string;
|
|
11
|
+
languageTag: string;
|
|
12
|
+
slug: string | null;
|
|
13
|
+
name: string;
|
|
14
|
+
shortDescription: string | null;
|
|
15
|
+
description: string | null;
|
|
16
|
+
inclusionsHtml: string | null;
|
|
17
|
+
exclusionsHtml: string | null;
|
|
18
|
+
termsHtml: string | null;
|
|
19
|
+
seoTitle: string | null;
|
|
20
|
+
seoDescription: string | null;
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
}[];
|
|
24
|
+
total: number;
|
|
25
|
+
limit: number;
|
|
26
|
+
offset: number;
|
|
27
|
+
}, Error>;
|
|
28
|
+
//# sourceMappingURL=use-product-translations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product-translations.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product-translations.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,6BAA6B;IAC5C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC9B;AAED,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,6BAAkC;;;;;;;;;;;;;;;;;;;;UAuB5C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { fetchWithValidation, withQueryParams } from "../client.js";
|
|
4
|
+
import { useVoyantProductsContext } from "../provider.js";
|
|
5
|
+
import { productsQueryKeys } from "../query-keys.js";
|
|
6
|
+
import { productTranslationListResponse } from "../schemas.js";
|
|
7
|
+
export function useProductTranslations(productId, options = {}) {
|
|
8
|
+
const { baseUrl, fetcher } = useVoyantProductsContext();
|
|
9
|
+
const { enabled = true, ...filters } = options;
|
|
10
|
+
return useQuery({
|
|
11
|
+
queryKey: productsQueryKeys.productTranslations(productId ?? "", filters),
|
|
12
|
+
queryFn: () => {
|
|
13
|
+
if (!productId)
|
|
14
|
+
throw new Error("useProductTranslations requires a productId");
|
|
15
|
+
return fetchWithValidation(withQueryParams("/v1/products/translations", {
|
|
16
|
+
productId,
|
|
17
|
+
languageTag: filters.languageTag,
|
|
18
|
+
limit: filters.limit,
|
|
19
|
+
offset: filters.offset,
|
|
20
|
+
}), productTranslationListResponse, { baseUrl, fetcher });
|
|
21
|
+
},
|
|
22
|
+
enabled: enabled && Boolean(productId),
|
|
23
|
+
});
|
|
24
|
+
}
|
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, productsQueryKeys, } from "./query-keys.js";
|
|
5
|
+
export { type ProductActionLedgerListCursor, type ProductActionLedgerListFilters, 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,EAC1B,iBAAiB,GAClB,MAAM,iBAAiB,CAAA;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M,kCAAkC,CAAA;AACrF,cAAc,cAAc,CAAA"}
|
package/dist/query-keys.d.ts
CHANGED
|
@@ -66,11 +66,19 @@ export interface ProductActionLedgerListFilters {
|
|
|
66
66
|
cursorId?: string | undefined;
|
|
67
67
|
limit?: number | undefined;
|
|
68
68
|
}
|
|
69
|
+
export interface ProductTranslationsListFilters {
|
|
70
|
+
productId?: string | undefined;
|
|
71
|
+
languageTag?: string | undefined;
|
|
72
|
+
limit?: number | undefined;
|
|
73
|
+
offset?: number | undefined;
|
|
74
|
+
}
|
|
69
75
|
export declare const productsQueryKeys: {
|
|
70
76
|
readonly all: readonly ["voyant", "products"];
|
|
71
77
|
readonly products: () => readonly ["voyant", "products", "products"];
|
|
72
78
|
readonly productsList: (filters: ProductsListFilters) => readonly ["voyant", "products", "products", "list", ProductsListFilters];
|
|
73
79
|
readonly product: (id: string) => readonly ["voyant", "products", "products", "detail", string];
|
|
80
|
+
readonly productTranslationsRoot: (productId: string) => readonly ["voyant", "products", "products", "detail", string, "translations"];
|
|
81
|
+
readonly productTranslations: (productId: string, filters?: ProductTranslationsListFilters) => readonly ["voyant", "products", "products", "detail", string, "translations", ProductTranslationsListFilters];
|
|
74
82
|
readonly productActionLedger: (id: string, filters?: ProductActionLedgerListFilters) => readonly ["voyant", "products", "products", "detail", string, "action-ledger", ProductActionLedgerListFilters];
|
|
75
83
|
readonly productTypes: () => readonly ["voyant", "products", "product-types"];
|
|
76
84
|
readonly productTypesList: (filters: ProductTypesListFilters) => readonly ["voyant", "products", "product-types", "list", ProductTypesListFilters];
|
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,G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AS,MAAM;0CAExB,MAAM;uCAET,MAAM;2CACF,MAAM,WAAW,uBAAuB;yCAE1C,MAAM;CAE1B,CAAA"}
|
package/dist/query-keys.js
CHANGED
|
@@ -3,6 +3,8 @@ export const productsQueryKeys = {
|
|
|
3
3
|
products: () => [...productsQueryKeys.all, "products"],
|
|
4
4
|
productsList: (filters) => [...productsQueryKeys.products(), "list", filters],
|
|
5
5
|
product: (id) => [...productsQueryKeys.products(), "detail", id],
|
|
6
|
+
productTranslationsRoot: (productId) => [...productsQueryKeys.product(productId), "translations"],
|
|
7
|
+
productTranslations: (productId, filters = {}) => [...productsQueryKeys.productTranslationsRoot(productId), filters],
|
|
6
8
|
productActionLedger: (id, filters = {}) => [...productsQueryKeys.product(id), "action-ledger", filters],
|
|
7
9
|
productTypes: () => [...productsQueryKeys.all, "product-types"],
|
|
8
10
|
productTypesList: (filters) => [...productsQueryKeys.productTypes(), "list", filters],
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductMediaSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductMediaSchema } from "@voyantjs/products";
|
|
1
|
+
import { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductMediaSchema, updateProductTranslationSchema } from "@voyantjs/products";
|
|
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>;
|
|
@@ -94,6 +94,23 @@ export declare const productRecordSchema: z.ZodObject<{
|
|
|
94
94
|
updatedAt: z.ZodString;
|
|
95
95
|
}, z.core.$strip>;
|
|
96
96
|
export type ProductRecord = z.infer<typeof productRecordSchema>;
|
|
97
|
+
export declare const productTranslationRecordSchema: z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
productId: z.ZodString;
|
|
100
|
+
languageTag: z.ZodString;
|
|
101
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
102
|
+
name: z.ZodString;
|
|
103
|
+
shortDescription: z.ZodNullable<z.ZodString>;
|
|
104
|
+
description: z.ZodNullable<z.ZodString>;
|
|
105
|
+
inclusionsHtml: z.ZodNullable<z.ZodString>;
|
|
106
|
+
exclusionsHtml: z.ZodNullable<z.ZodString>;
|
|
107
|
+
termsHtml: z.ZodNullable<z.ZodString>;
|
|
108
|
+
seoTitle: z.ZodNullable<z.ZodString>;
|
|
109
|
+
seoDescription: z.ZodNullable<z.ZodString>;
|
|
110
|
+
createdAt: z.ZodString;
|
|
111
|
+
updatedAt: z.ZodString;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
export type ProductTranslationRecord = z.infer<typeof productTranslationRecordSchema>;
|
|
97
114
|
export declare const productTypeRecordSchema: z.ZodObject<{
|
|
98
115
|
id: z.ZodString;
|
|
99
116
|
name: z.ZodString;
|
|
@@ -407,6 +424,45 @@ export declare const productSingleResponse: z.ZodObject<{
|
|
|
407
424
|
updatedAt: z.ZodString;
|
|
408
425
|
}, z.core.$strip>;
|
|
409
426
|
}, z.core.$strip>;
|
|
427
|
+
export declare const productTranslationListResponse: z.ZodObject<{
|
|
428
|
+
data: z.ZodArray<z.ZodObject<{
|
|
429
|
+
id: z.ZodString;
|
|
430
|
+
productId: z.ZodString;
|
|
431
|
+
languageTag: z.ZodString;
|
|
432
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
433
|
+
name: z.ZodString;
|
|
434
|
+
shortDescription: z.ZodNullable<z.ZodString>;
|
|
435
|
+
description: z.ZodNullable<z.ZodString>;
|
|
436
|
+
inclusionsHtml: z.ZodNullable<z.ZodString>;
|
|
437
|
+
exclusionsHtml: z.ZodNullable<z.ZodString>;
|
|
438
|
+
termsHtml: z.ZodNullable<z.ZodString>;
|
|
439
|
+
seoTitle: z.ZodNullable<z.ZodString>;
|
|
440
|
+
seoDescription: z.ZodNullable<z.ZodString>;
|
|
441
|
+
createdAt: z.ZodString;
|
|
442
|
+
updatedAt: z.ZodString;
|
|
443
|
+
}, z.core.$strip>>;
|
|
444
|
+
total: z.ZodNumber;
|
|
445
|
+
limit: z.ZodNumber;
|
|
446
|
+
offset: z.ZodNumber;
|
|
447
|
+
}, z.core.$strip>;
|
|
448
|
+
export declare const productTranslationSingleResponse: z.ZodObject<{
|
|
449
|
+
data: z.ZodObject<{
|
|
450
|
+
id: z.ZodString;
|
|
451
|
+
productId: z.ZodString;
|
|
452
|
+
languageTag: z.ZodString;
|
|
453
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
454
|
+
name: z.ZodString;
|
|
455
|
+
shortDescription: z.ZodNullable<z.ZodString>;
|
|
456
|
+
description: z.ZodNullable<z.ZodString>;
|
|
457
|
+
inclusionsHtml: z.ZodNullable<z.ZodString>;
|
|
458
|
+
exclusionsHtml: z.ZodNullable<z.ZodString>;
|
|
459
|
+
termsHtml: z.ZodNullable<z.ZodString>;
|
|
460
|
+
seoTitle: z.ZodNullable<z.ZodString>;
|
|
461
|
+
seoDescription: z.ZodNullable<z.ZodString>;
|
|
462
|
+
createdAt: z.ZodString;
|
|
463
|
+
updatedAt: z.ZodString;
|
|
464
|
+
}, z.core.$strip>;
|
|
465
|
+
}, z.core.$strip>;
|
|
410
466
|
export declare const productTypeListResponse: z.ZodObject<{
|
|
411
467
|
data: z.ZodArray<z.ZodObject<{
|
|
412
468
|
id: z.ZodString;
|
|
@@ -979,7 +1035,7 @@ export declare const productActionLedgerListResponse: z.ZodObject<{
|
|
|
979
1035
|
}, z.core.$strip>;
|
|
980
1036
|
}, z.core.$strip>;
|
|
981
1037
|
export type ProductActionLedgerListResponse = z.infer<typeof productActionLedgerListResponse>;
|
|
982
|
-
export { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductMediaSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductMediaSchema, };
|
|
1038
|
+
export { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductMediaSchema, updateProductTranslationSchema, };
|
|
983
1039
|
export type CreateProductItineraryInput = z.input<typeof insertItinerarySchema>;
|
|
984
1040
|
export type UpdateProductItineraryInput = z.input<typeof updateItinerarySchema>;
|
|
985
1041
|
export type DuplicateProductItineraryInput = z.input<typeof duplicateItinerarySchema>;
|
|
@@ -990,5 +1046,7 @@ export type UpdateProductDayServiceInput = z.input<typeof updateDayServiceSchema
|
|
|
990
1046
|
export type CreateProductVersionInput = z.input<typeof insertVersionSchema>;
|
|
991
1047
|
export type CreateProductMediaInput = z.input<typeof insertProductMediaSchema>;
|
|
992
1048
|
export type UpdateProductMediaInput = z.input<typeof updateProductMediaSchema>;
|
|
1049
|
+
export type CreateProductTranslationInput = z.input<typeof insertProductTranslationSchema>;
|
|
1050
|
+
export type UpdateProductTranslationInput = z.input<typeof updateProductTranslationSchema>;
|
|
993
1051
|
export type ReorderProductMediaInput = z.input<typeof reorderProductMediaSchema>;
|
|
994
1052
|
//# 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,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"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C,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductMediaSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductMediaSchema, } from "@voyantjs/products";
|
|
1
|
+
import { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductMediaSchema, updateProductTranslationSchema, } from "@voyantjs/products";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export const paginatedEnvelope = (item) => z.object({
|
|
4
4
|
data: z.array(item),
|
|
@@ -50,6 +50,22 @@ export const productRecordSchema = z.object({
|
|
|
50
50
|
createdAt: z.string(),
|
|
51
51
|
updatedAt: z.string(),
|
|
52
52
|
});
|
|
53
|
+
export const productTranslationRecordSchema = z.object({
|
|
54
|
+
id: z.string(),
|
|
55
|
+
productId: z.string(),
|
|
56
|
+
languageTag: z.string(),
|
|
57
|
+
slug: z.string().nullable(),
|
|
58
|
+
name: z.string(),
|
|
59
|
+
shortDescription: z.string().nullable(),
|
|
60
|
+
description: z.string().nullable(),
|
|
61
|
+
inclusionsHtml: z.string().nullable(),
|
|
62
|
+
exclusionsHtml: z.string().nullable(),
|
|
63
|
+
termsHtml: z.string().nullable(),
|
|
64
|
+
seoTitle: z.string().nullable(),
|
|
65
|
+
seoDescription: z.string().nullable(),
|
|
66
|
+
createdAt: z.string(),
|
|
67
|
+
updatedAt: z.string(),
|
|
68
|
+
});
|
|
53
69
|
export const productTypeRecordSchema = z.object({
|
|
54
70
|
id: z.string(),
|
|
55
71
|
name: z.string(),
|
|
@@ -183,6 +199,8 @@ export const productMediaRecordSchema = z.object({
|
|
|
183
199
|
});
|
|
184
200
|
export const productListResponse = paginatedEnvelope(productRecordSchema);
|
|
185
201
|
export const productSingleResponse = singleEnvelope(productRecordSchema);
|
|
202
|
+
export const productTranslationListResponse = paginatedEnvelope(productTranslationRecordSchema);
|
|
203
|
+
export const productTranslationSingleResponse = singleEnvelope(productTranslationRecordSchema);
|
|
186
204
|
export const productTypeListResponse = paginatedEnvelope(productTypeRecordSchema);
|
|
187
205
|
export const productTypeSingleResponse = singleEnvelope(productTypeRecordSchema);
|
|
188
206
|
export const productCategoryListResponse = paginatedEnvelope(productCategoryRecordSchema);
|
|
@@ -285,4 +303,4 @@ export const productActionLedgerListResponse = z.object({
|
|
|
285
303
|
.nullable(),
|
|
286
304
|
}),
|
|
287
305
|
});
|
|
288
|
-
export { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductMediaSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductMediaSchema, };
|
|
306
|
+
export { duplicateItinerarySchema, insertDaySchema, insertDayServiceSchema, insertItinerarySchema, insertProductMediaSchema, insertProductTranslationSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateItinerarySchema, updateProductMediaSchema, updateProductTranslationSchema, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/products-react",
|
|
3
|
-
"version": "0.62.
|
|
3
|
+
"version": "0.62.3",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react": "^19.0.0",
|
|
42
42
|
"react-dom": "^19.0.0",
|
|
43
43
|
"zod": "^4.0.0",
|
|
44
|
-
"@voyantjs/products": "0.62.
|
|
44
|
+
"@voyantjs/products": "0.62.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@tanstack/react-query": "^5.100.11",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"typescript": "^6.0.2",
|
|
53
53
|
"vitest": "^4.1.2",
|
|
54
54
|
"zod": "^4.3.6",
|
|
55
|
-
"@voyantjs/products": "0.62.
|
|
56
|
-
"@voyantjs/react": "0.62.
|
|
55
|
+
"@voyantjs/products": "0.62.3",
|
|
56
|
+
"@voyantjs/react": "0.62.3",
|
|
57
57
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@voyantjs/react": "0.62.
|
|
60
|
+
"@voyantjs/react": "0.62.3"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|