@voyantjs/products-react 0.3.0 → 0.4.0

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 (40) hide show
  1. package/dist/hooks/index.d.ts +8 -0
  2. package/dist/hooks/index.d.ts.map +1 -1
  3. package/dist/hooks/index.js +8 -0
  4. package/dist/hooks/use-product-day-mutation.d.ts +41 -0
  5. package/dist/hooks/use-product-day-mutation.d.ts.map +1 -0
  6. package/dist/hooks/use-product-day-mutation.js +41 -0
  7. package/dist/hooks/use-product-day-service-mutation.d.ts +63 -0
  8. package/dist/hooks/use-product-day-service-mutation.d.ts.map +1 -0
  9. package/dist/hooks/use-product-day-service-mutation.js +41 -0
  10. package/dist/hooks/use-product-day-services.d.ts +20 -0
  11. package/dist/hooks/use-product-day-services.d.ts.map +1 -0
  12. package/dist/hooks/use-product-day-services.js +12 -0
  13. package/dist/hooks/use-product-days.d.ts +16 -0
  14. package/dist/hooks/use-product-days.d.ts.map +1 -0
  15. package/dist/hooks/use-product-days.js +12 -0
  16. package/dist/hooks/use-product-media-mutation.d.ts +101 -0
  17. package/dist/hooks/use-product-media-mutation.d.ts.map +1 -0
  18. package/dist/hooks/use-product-media-mutation.js +69 -0
  19. package/dist/hooks/use-product-media.d.ts +26 -0
  20. package/dist/hooks/use-product-media.d.ts.map +1 -0
  21. package/dist/hooks/use-product-media.js +12 -0
  22. package/dist/hooks/use-product-version-mutation.d.ts +16 -0
  23. package/dist/hooks/use-product-version-mutation.d.ts.map +1 -0
  24. package/dist/hooks/use-product-version-mutation.js +22 -0
  25. package/dist/hooks/use-product-versions.d.ts +15 -0
  26. package/dist/hooks/use-product-versions.d.ts.map +1 -0
  27. package/dist/hooks/use-product-versions.js +12 -0
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/query-keys.d.ts +12 -0
  32. package/dist/query-keys.d.ts.map +1 -1
  33. package/dist/query-keys.js +6 -0
  34. package/dist/query-options.d.ts +260 -0
  35. package/dist/query-options.d.ts.map +1 -1
  36. package/dist/query-options.js +62 -1
  37. package/dist/schemas.d.ts +216 -0
  38. package/dist/schemas.d.ts.map +1 -1
  39. package/dist/schemas.js +60 -0
  40. package/package.json +5 -5
@@ -38,6 +38,12 @@ export interface OptionUnitsListFilters {
38
38
  limit?: number | undefined;
39
39
  offset?: number | undefined;
40
40
  }
41
+ export interface ProductMediaListFilters {
42
+ dayId?: string | undefined;
43
+ mediaType?: string | undefined;
44
+ limit?: number | undefined;
45
+ offset?: number | undefined;
46
+ }
41
47
  export declare const productsQueryKeys: {
42
48
  readonly all: readonly ["voyant", "products"];
43
49
  readonly products: () => readonly ["voyant", "products", "products"];
@@ -58,5 +64,11 @@ export declare const productsQueryKeys: {
58
64
  readonly optionUnits: () => readonly ["voyant", "products", "option-units"];
59
65
  readonly optionUnitsList: (filters: OptionUnitsListFilters) => readonly ["voyant", "products", "option-units", "list", OptionUnitsListFilters];
60
66
  readonly optionUnit: (id: string) => readonly ["voyant", "products", "option-units", "detail", string];
67
+ readonly productDays: (productId: string) => readonly ["voyant", "products", "products", "detail", string, "days"];
68
+ readonly productDayServices: (productId: string, dayId: string) => readonly ["voyant", "products", "products", "detail", string, "days", string, "services"];
69
+ readonly productVersions: (productId: string) => readonly ["voyant", "products", "products", "detail", string, "versions"];
70
+ readonly productMedia: (productId: string) => readonly ["voyant", "products", "products", "detail", string, "media"];
71
+ readonly productMediaList: (productId: string, filters: ProductMediaListFilters) => readonly ["voyant", "products", "products", "detail", string, "media", "list", ProductMediaListFilters];
72
+ readonly productMediaItem: (mediaId: string) => readonly ["voyant", "products", "product-media", string];
61
73
  };
62
74
  //# sourceMappingURL=query-keys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,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jC,MAAM;;8CAGS,4BAA4B;mCAEvC,MAAM;;wCAID,sBAAsB;8BAEhC,MAAM;;2CAGO,yBAAyB;iCAEnC,MAAM;;wCAGC,sBAAsB;8BAEhC,MAAM;sCAEE,MAAM;6CACC,MAAM,SAAS,MAAM;0CAExB,MAAM;uCAET,MAAM;2CACF,MAAM,WAAW,uBAAuB;yCAE1C,MAAM;CAE1B,CAAA"}
@@ -18,4 +18,10 @@ export const productsQueryKeys = {
18
18
  optionUnits: () => [...productsQueryKeys.all, "option-units"],
19
19
  optionUnitsList: (filters) => [...productsQueryKeys.optionUnits(), "list", filters],
20
20
  optionUnit: (id) => [...productsQueryKeys.optionUnits(), "detail", id],
21
+ productDays: (productId) => [...productsQueryKeys.product(productId), "days"],
22
+ productDayServices: (productId, dayId) => [...productsQueryKeys.productDays(productId), dayId, "services"],
23
+ productVersions: (productId) => [...productsQueryKeys.product(productId), "versions"],
24
+ productMedia: (productId) => [...productsQueryKeys.product(productId), "media"],
25
+ productMediaList: (productId, filters) => [...productsQueryKeys.productMedia(productId), "list", filters],
26
+ productMediaItem: (mediaId) => [...productsQueryKeys.all, "product-media", mediaId],
21
27
  };
@@ -3,10 +3,14 @@ import type { UseOptionUnitOptions } from "./hooks/use-option-unit.js";
3
3
  import type { UseOptionUnitsOptions } from "./hooks/use-option-units.js";
4
4
  import type { UseProductOptions } from "./hooks/use-product.js";
5
5
  import type { UseProductCategoriesOptions } from "./hooks/use-product-categories.js";
6
+ import type { UseProductDayServicesOptions } from "./hooks/use-product-day-services.js";
7
+ import type { UseProductDaysOptions } from "./hooks/use-product-days.js";
8
+ import type { UseProductMediaOptions } from "./hooks/use-product-media.js";
6
9
  import type { UseProductOptionOptions } from "./hooks/use-product-option.js";
7
10
  import type { UseProductOptionsListOptions } from "./hooks/use-product-options.js";
8
11
  import type { UseProductTagsOptions } from "./hooks/use-product-tags.js";
9
12
  import type { UseProductTypesOptions } from "./hooks/use-product-types.js";
13
+ import type { UseProductVersionsOptions } from "./hooks/use-product-versions.js";
10
14
  import type { UseProductsOptions } from "./hooks/use-products.js";
11
15
  export declare function getProductsQueryOptions(client: FetchWithValidationOptions, options?: UseProductsOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
12
16
  data: {
@@ -768,4 +772,260 @@ export declare function getOptionUnitQueryOptions(client: FetchWithValidationOpt
768
772
  [dataTagErrorSymbol]: Error;
769
773
  };
770
774
  };
775
+ export declare function getProductDaysQueryOptions(client: FetchWithValidationOptions, productId: string | null | undefined, options?: UseProductDaysOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
776
+ data: {
777
+ id: string;
778
+ productId: string;
779
+ dayNumber: number;
780
+ title: string | null;
781
+ description: string | null;
782
+ location: string | null;
783
+ createdAt: string;
784
+ updatedAt: string;
785
+ }[];
786
+ }, Error, {
787
+ data: {
788
+ id: string;
789
+ productId: string;
790
+ dayNumber: number;
791
+ title: string | null;
792
+ description: string | null;
793
+ location: string | null;
794
+ createdAt: string;
795
+ updatedAt: string;
796
+ }[];
797
+ }, readonly ["voyant", "products", "products", "detail", string, "days"]>, "queryFn"> & {
798
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
799
+ data: {
800
+ id: string;
801
+ productId: string;
802
+ dayNumber: number;
803
+ title: string | null;
804
+ description: string | null;
805
+ location: string | null;
806
+ createdAt: string;
807
+ updatedAt: string;
808
+ }[];
809
+ }, readonly ["voyant", "products", "products", "detail", string, "days"], never> | undefined;
810
+ } & {
811
+ queryKey: readonly ["voyant", "products", "products", "detail", string, "days"] & {
812
+ [dataTagSymbol]: {
813
+ data: {
814
+ id: string;
815
+ productId: string;
816
+ dayNumber: number;
817
+ title: string | null;
818
+ description: string | null;
819
+ location: string | null;
820
+ createdAt: string;
821
+ updatedAt: string;
822
+ }[];
823
+ };
824
+ [dataTagErrorSymbol]: Error;
825
+ };
826
+ };
827
+ export declare function getProductDayServicesQueryOptions(client: FetchWithValidationOptions, productId: string | null | undefined, dayId: string | null | undefined, options?: UseProductDayServicesOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
828
+ data: {
829
+ id: string;
830
+ dayId: string;
831
+ supplierServiceId: string | null;
832
+ serviceType: "other" | "transfer" | "accommodation" | "experience" | "guide" | "meal";
833
+ name: string;
834
+ description: string | null;
835
+ costCurrency: string;
836
+ costAmountCents: number;
837
+ quantity: number;
838
+ sortOrder: number | null;
839
+ notes: string | null;
840
+ createdAt: string;
841
+ }[];
842
+ }, Error, {
843
+ data: {
844
+ id: string;
845
+ dayId: string;
846
+ supplierServiceId: string | null;
847
+ serviceType: "other" | "transfer" | "accommodation" | "experience" | "guide" | "meal";
848
+ name: string;
849
+ description: string | null;
850
+ costCurrency: string;
851
+ costAmountCents: number;
852
+ quantity: number;
853
+ sortOrder: number | null;
854
+ notes: string | null;
855
+ createdAt: string;
856
+ }[];
857
+ }, readonly ["voyant", "products", "products", "detail", string, "days", string, "services"]>, "queryFn"> & {
858
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
859
+ data: {
860
+ id: string;
861
+ dayId: string;
862
+ supplierServiceId: string | null;
863
+ serviceType: "other" | "transfer" | "accommodation" | "experience" | "guide" | "meal";
864
+ name: string;
865
+ description: string | null;
866
+ costCurrency: string;
867
+ costAmountCents: number;
868
+ quantity: number;
869
+ sortOrder: number | null;
870
+ notes: string | null;
871
+ createdAt: string;
872
+ }[];
873
+ }, readonly ["voyant", "products", "products", "detail", string, "days", string, "services"], never> | undefined;
874
+ } & {
875
+ queryKey: readonly ["voyant", "products", "products", "detail", string, "days", string, "services"] & {
876
+ [dataTagSymbol]: {
877
+ data: {
878
+ id: string;
879
+ dayId: string;
880
+ supplierServiceId: string | null;
881
+ serviceType: "other" | "transfer" | "accommodation" | "experience" | "guide" | "meal";
882
+ name: string;
883
+ description: string | null;
884
+ costCurrency: string;
885
+ costAmountCents: number;
886
+ quantity: number;
887
+ sortOrder: number | null;
888
+ notes: string | null;
889
+ createdAt: string;
890
+ }[];
891
+ };
892
+ [dataTagErrorSymbol]: Error;
893
+ };
894
+ };
895
+ export declare function getProductVersionsQueryOptions(client: FetchWithValidationOptions, productId: string | null | undefined, options?: UseProductVersionsOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
896
+ data: {
897
+ id: string;
898
+ productId: string;
899
+ versionNumber: number;
900
+ snapshot: unknown;
901
+ authorId: string;
902
+ notes: string | null;
903
+ createdAt: string;
904
+ }[];
905
+ }, Error, {
906
+ data: {
907
+ id: string;
908
+ productId: string;
909
+ versionNumber: number;
910
+ snapshot: unknown;
911
+ authorId: string;
912
+ notes: string | null;
913
+ createdAt: string;
914
+ }[];
915
+ }, readonly ["voyant", "products", "products", "detail", string, "versions"]>, "queryFn"> & {
916
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
917
+ data: {
918
+ id: string;
919
+ productId: string;
920
+ versionNumber: number;
921
+ snapshot: unknown;
922
+ authorId: string;
923
+ notes: string | null;
924
+ createdAt: string;
925
+ }[];
926
+ }, readonly ["voyant", "products", "products", "detail", string, "versions"], never> | undefined;
927
+ } & {
928
+ queryKey: readonly ["voyant", "products", "products", "detail", string, "versions"] & {
929
+ [dataTagSymbol]: {
930
+ data: {
931
+ id: string;
932
+ productId: string;
933
+ versionNumber: number;
934
+ snapshot: unknown;
935
+ authorId: string;
936
+ notes: string | null;
937
+ createdAt: string;
938
+ }[];
939
+ };
940
+ [dataTagErrorSymbol]: Error;
941
+ };
942
+ };
943
+ export declare function getProductMediaQueryOptions(client: FetchWithValidationOptions, productId: string | null | undefined, options?: UseProductMediaOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
944
+ data: {
945
+ id: string;
946
+ productId: string;
947
+ dayId: string | null;
948
+ mediaType: "image" | "video" | "document";
949
+ name: string;
950
+ url: string;
951
+ storageKey: string | null;
952
+ mimeType: string | null;
953
+ fileSize: number | null;
954
+ altText: string | null;
955
+ sortOrder: number;
956
+ isCover: boolean;
957
+ createdAt: string;
958
+ updatedAt: string;
959
+ }[];
960
+ total: number;
961
+ limit: number;
962
+ offset: number;
963
+ }, Error, {
964
+ data: {
965
+ id: string;
966
+ productId: string;
967
+ dayId: string | null;
968
+ mediaType: "image" | "video" | "document";
969
+ name: string;
970
+ url: string;
971
+ storageKey: string | null;
972
+ mimeType: string | null;
973
+ fileSize: number | null;
974
+ altText: string | null;
975
+ sortOrder: number;
976
+ isCover: boolean;
977
+ createdAt: string;
978
+ updatedAt: string;
979
+ }[];
980
+ total: number;
981
+ limit: number;
982
+ offset: number;
983
+ }, readonly ["voyant", "products", "products", "detail", string, "media", "list", import("./query-keys.js").ProductMediaListFilters]>, "queryFn"> & {
984
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
985
+ data: {
986
+ id: string;
987
+ productId: string;
988
+ dayId: string | null;
989
+ mediaType: "image" | "video" | "document";
990
+ name: string;
991
+ url: string;
992
+ storageKey: string | null;
993
+ mimeType: string | null;
994
+ fileSize: number | null;
995
+ altText: string | null;
996
+ sortOrder: number;
997
+ isCover: boolean;
998
+ createdAt: string;
999
+ updatedAt: string;
1000
+ }[];
1001
+ total: number;
1002
+ limit: number;
1003
+ offset: number;
1004
+ }, readonly ["voyant", "products", "products", "detail", string, "media", "list", import("./query-keys.js").ProductMediaListFilters], never> | undefined;
1005
+ } & {
1006
+ queryKey: readonly ["voyant", "products", "products", "detail", string, "media", "list", import("./query-keys.js").ProductMediaListFilters] & {
1007
+ [dataTagSymbol]: {
1008
+ data: {
1009
+ id: string;
1010
+ productId: string;
1011
+ dayId: string | null;
1012
+ mediaType: "image" | "video" | "document";
1013
+ name: string;
1014
+ url: string;
1015
+ storageKey: string | null;
1016
+ mimeType: string | null;
1017
+ fileSize: number | null;
1018
+ altText: string | null;
1019
+ sortOrder: number;
1020
+ isCover: boolean;
1021
+ createdAt: string;
1022
+ updatedAt: string;
1023
+ }[];
1024
+ total: number;
1025
+ limit: number;
1026
+ offset: number;
1027
+ };
1028
+ [dataTagErrorSymbol]: Error;
1029
+ };
1030
+ };
771
1031
  //# sourceMappingURL=query-options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAA;AACpF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAA;AAC5E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAA;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAejE,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,kBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBjC;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7B,OAAO,GAAE,iBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAi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,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BrC"}
@@ -2,7 +2,7 @@
2
2
  import { queryOptions } from "@tanstack/react-query";
3
3
  import { fetchWithValidation } from "./client.js";
4
4
  import { productsQueryKeys } from "./query-keys.js";
5
- import { optionUnitListResponse, optionUnitSingleResponse, productCategoryListResponse, productListResponse, productOptionListResponse, productOptionSingleResponse, productSingleResponse, productTagListResponse, productTypeListResponse, productTypeSingleResponse, } from "./schemas.js";
5
+ import { optionUnitListResponse, optionUnitSingleResponse, productCategoryListResponse, productDayServicesResponse, productDaysResponse, productListResponse, productMediaListResponse, productOptionListResponse, productOptionSingleResponse, productSingleResponse, productTagListResponse, productTypeListResponse, productTypeSingleResponse, productVersionsResponse, } from "./schemas.js";
6
6
  export function getProductsQueryOptions(client, options = {}) {
7
7
  const { enabled: _enabled = true, ...filters } = options;
8
8
  return queryOptions({
@@ -172,3 +172,64 @@ export function getOptionUnitQueryOptions(client, id, options = {}) {
172
172
  },
173
173
  });
174
174
  }
175
+ export function getProductDaysQueryOptions(client, productId, options = {}) {
176
+ const { enabled: _enabled = true } = options;
177
+ return queryOptions({
178
+ queryKey: productsQueryKeys.productDays(productId ?? ""),
179
+ queryFn: async () => {
180
+ if (!productId)
181
+ throw new Error("getProductDaysQueryOptions requires a productId");
182
+ return fetchWithValidation(`/v1/products/${productId}/days`, productDaysResponse, client);
183
+ },
184
+ });
185
+ }
186
+ export function getProductDayServicesQueryOptions(client, productId, dayId, options = {}) {
187
+ const { enabled: _enabled = true } = options;
188
+ return queryOptions({
189
+ queryKey: productsQueryKeys.productDayServices(productId ?? "", dayId ?? ""),
190
+ queryFn: async () => {
191
+ if (!productId || !dayId) {
192
+ throw new Error("getProductDayServicesQueryOptions requires productId and dayId");
193
+ }
194
+ return fetchWithValidation(`/v1/products/${productId}/days/${dayId}/services`, productDayServicesResponse, client);
195
+ },
196
+ });
197
+ }
198
+ export function getProductVersionsQueryOptions(client, productId, options = {}) {
199
+ const { enabled: _enabled = true } = options;
200
+ return queryOptions({
201
+ queryKey: productsQueryKeys.productVersions(productId ?? ""),
202
+ queryFn: async () => {
203
+ if (!productId)
204
+ throw new Error("getProductVersionsQueryOptions requires a productId");
205
+ return fetchWithValidation(`/v1/products/${productId}/versions`, productVersionsResponse, client);
206
+ },
207
+ });
208
+ }
209
+ export function getProductMediaQueryOptions(client, productId, options = {}) {
210
+ const { enabled: _enabled = true, dayId, mediaType, limit, offset } = options;
211
+ return queryOptions({
212
+ queryKey: productsQueryKeys.productMediaList(productId ?? "", {
213
+ dayId,
214
+ mediaType,
215
+ limit,
216
+ offset,
217
+ }),
218
+ queryFn: async () => {
219
+ if (!productId)
220
+ throw new Error("getProductMediaQueryOptions requires a productId");
221
+ const params = new URLSearchParams();
222
+ if (mediaType)
223
+ params.set("mediaType", mediaType);
224
+ if (limit !== undefined)
225
+ params.set("limit", String(limit));
226
+ if (offset !== undefined)
227
+ params.set("offset", String(offset));
228
+ const qs = params.toString();
229
+ const basePath = dayId
230
+ ? `/v1/products/${productId}/days/${dayId}/media`
231
+ : `/v1/products/${productId}/media`;
232
+ return fetchWithValidation(`${basePath}${qs ? `?${qs}` : ""}`, productMediaListResponse, client);
233
+ },
234
+ });
235
+ }
package/dist/schemas.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { insertDaySchema, insertDayServiceSchema, insertProductMediaSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateProductMediaSchema } from "@voyantjs/products";
1
2
  import { z } from "zod";
2
3
  export declare const paginatedEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
3
4
  data: z.ZodArray<T>;
@@ -8,6 +9,9 @@ export declare const paginatedEnvelope: <T extends z.ZodTypeAny>(item: T) => z.Z
8
9
  export declare const singleEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
9
10
  data: T;
10
11
  }, z.core.$strip>;
12
+ export declare const arrayEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
13
+ data: z.ZodArray<T>;
14
+ }, z.core.$strip>;
11
15
  export declare const successEnvelope: z.ZodObject<{
12
16
  success: z.ZodBoolean;
13
17
  }, z.core.$strip>;
@@ -132,6 +136,70 @@ export declare const optionUnitRecordSchema: z.ZodObject<{
132
136
  sortOrder: z.ZodNumber;
133
137
  }, z.core.$strip>;
134
138
  export type OptionUnitRecord = z.infer<typeof optionUnitRecordSchema>;
139
+ export declare const productDayRecordSchema: z.ZodObject<{
140
+ id: z.ZodString;
141
+ productId: z.ZodString;
142
+ dayNumber: z.ZodNumber;
143
+ title: z.ZodNullable<z.ZodString>;
144
+ description: z.ZodNullable<z.ZodString>;
145
+ location: z.ZodNullable<z.ZodString>;
146
+ createdAt: z.ZodString;
147
+ updatedAt: z.ZodString;
148
+ }, z.core.$strip>;
149
+ export type ProductDayRecord = z.infer<typeof productDayRecordSchema>;
150
+ export declare const productDayServiceRecordSchema: z.ZodObject<{
151
+ id: z.ZodString;
152
+ dayId: z.ZodString;
153
+ supplierServiceId: z.ZodNullable<z.ZodString>;
154
+ serviceType: z.ZodEnum<{
155
+ other: "other";
156
+ transfer: "transfer";
157
+ accommodation: "accommodation";
158
+ experience: "experience";
159
+ guide: "guide";
160
+ meal: "meal";
161
+ }>;
162
+ name: z.ZodString;
163
+ description: z.ZodNullable<z.ZodString>;
164
+ costCurrency: z.ZodString;
165
+ costAmountCents: z.ZodNumber;
166
+ quantity: z.ZodNumber;
167
+ sortOrder: z.ZodNullable<z.ZodNumber>;
168
+ notes: z.ZodNullable<z.ZodString>;
169
+ createdAt: z.ZodString;
170
+ }, z.core.$strip>;
171
+ export type ProductDayServiceRecord = z.infer<typeof productDayServiceRecordSchema>;
172
+ export declare const productVersionRecordSchema: z.ZodObject<{
173
+ id: z.ZodString;
174
+ productId: z.ZodString;
175
+ versionNumber: z.ZodNumber;
176
+ snapshot: z.ZodUnknown;
177
+ authorId: z.ZodString;
178
+ notes: z.ZodNullable<z.ZodString>;
179
+ createdAt: z.ZodString;
180
+ }, z.core.$strip>;
181
+ export type ProductVersionRecord = z.infer<typeof productVersionRecordSchema>;
182
+ export declare const productMediaRecordSchema: z.ZodObject<{
183
+ id: z.ZodString;
184
+ productId: z.ZodString;
185
+ dayId: z.ZodNullable<z.ZodString>;
186
+ mediaType: z.ZodEnum<{
187
+ image: "image";
188
+ video: "video";
189
+ document: "document";
190
+ }>;
191
+ name: z.ZodString;
192
+ url: z.ZodString;
193
+ storageKey: z.ZodNullable<z.ZodString>;
194
+ mimeType: z.ZodNullable<z.ZodString>;
195
+ fileSize: z.ZodNullable<z.ZodNumber>;
196
+ altText: z.ZodNullable<z.ZodString>;
197
+ sortOrder: z.ZodNumber;
198
+ isCover: z.ZodBoolean;
199
+ createdAt: z.ZodString;
200
+ updatedAt: z.ZodString;
201
+ }, z.core.$strip>;
202
+ export type ProductMediaRecord = z.infer<typeof productMediaRecordSchema>;
135
203
  export declare const productListResponse: z.ZodObject<{
136
204
  data: z.ZodArray<z.ZodObject<{
137
205
  id: z.ZodString;
@@ -404,4 +472,152 @@ export declare const optionUnitSingleResponse: z.ZodObject<{
404
472
  sortOrder: z.ZodNumber;
405
473
  }, z.core.$strip>;
406
474
  }, z.core.$strip>;
475
+ export declare const productDaysResponse: z.ZodObject<{
476
+ data: z.ZodArray<z.ZodObject<{
477
+ id: z.ZodString;
478
+ productId: z.ZodString;
479
+ dayNumber: z.ZodNumber;
480
+ title: z.ZodNullable<z.ZodString>;
481
+ description: z.ZodNullable<z.ZodString>;
482
+ location: z.ZodNullable<z.ZodString>;
483
+ createdAt: z.ZodString;
484
+ updatedAt: z.ZodString;
485
+ }, z.core.$strip>>;
486
+ }, z.core.$strip>;
487
+ export declare const productDayResponse: z.ZodObject<{
488
+ data: z.ZodObject<{
489
+ id: z.ZodString;
490
+ productId: z.ZodString;
491
+ dayNumber: z.ZodNumber;
492
+ title: z.ZodNullable<z.ZodString>;
493
+ description: z.ZodNullable<z.ZodString>;
494
+ location: z.ZodNullable<z.ZodString>;
495
+ createdAt: z.ZodString;
496
+ updatedAt: z.ZodString;
497
+ }, z.core.$strip>;
498
+ }, z.core.$strip>;
499
+ export declare const productDayServicesResponse: z.ZodObject<{
500
+ data: z.ZodArray<z.ZodObject<{
501
+ id: z.ZodString;
502
+ dayId: z.ZodString;
503
+ supplierServiceId: z.ZodNullable<z.ZodString>;
504
+ serviceType: z.ZodEnum<{
505
+ other: "other";
506
+ transfer: "transfer";
507
+ accommodation: "accommodation";
508
+ experience: "experience";
509
+ guide: "guide";
510
+ meal: "meal";
511
+ }>;
512
+ name: z.ZodString;
513
+ description: z.ZodNullable<z.ZodString>;
514
+ costCurrency: z.ZodString;
515
+ costAmountCents: z.ZodNumber;
516
+ quantity: z.ZodNumber;
517
+ sortOrder: z.ZodNullable<z.ZodNumber>;
518
+ notes: z.ZodNullable<z.ZodString>;
519
+ createdAt: z.ZodString;
520
+ }, z.core.$strip>>;
521
+ }, z.core.$strip>;
522
+ export declare const productDayServiceResponse: z.ZodObject<{
523
+ data: z.ZodObject<{
524
+ id: z.ZodString;
525
+ dayId: z.ZodString;
526
+ supplierServiceId: z.ZodNullable<z.ZodString>;
527
+ serviceType: z.ZodEnum<{
528
+ other: "other";
529
+ transfer: "transfer";
530
+ accommodation: "accommodation";
531
+ experience: "experience";
532
+ guide: "guide";
533
+ meal: "meal";
534
+ }>;
535
+ name: z.ZodString;
536
+ description: z.ZodNullable<z.ZodString>;
537
+ costCurrency: z.ZodString;
538
+ costAmountCents: z.ZodNumber;
539
+ quantity: z.ZodNumber;
540
+ sortOrder: z.ZodNullable<z.ZodNumber>;
541
+ notes: z.ZodNullable<z.ZodString>;
542
+ createdAt: z.ZodString;
543
+ }, z.core.$strip>;
544
+ }, z.core.$strip>;
545
+ export declare const productVersionsResponse: z.ZodObject<{
546
+ data: z.ZodArray<z.ZodObject<{
547
+ id: z.ZodString;
548
+ productId: z.ZodString;
549
+ versionNumber: z.ZodNumber;
550
+ snapshot: z.ZodUnknown;
551
+ authorId: z.ZodString;
552
+ notes: z.ZodNullable<z.ZodString>;
553
+ createdAt: z.ZodString;
554
+ }, z.core.$strip>>;
555
+ }, z.core.$strip>;
556
+ export declare const productVersionResponse: z.ZodObject<{
557
+ data: z.ZodObject<{
558
+ id: z.ZodString;
559
+ productId: z.ZodString;
560
+ versionNumber: z.ZodNumber;
561
+ snapshot: z.ZodUnknown;
562
+ authorId: z.ZodString;
563
+ notes: z.ZodNullable<z.ZodString>;
564
+ createdAt: z.ZodString;
565
+ }, z.core.$strip>;
566
+ }, z.core.$strip>;
567
+ export declare const productMediaListResponse: z.ZodObject<{
568
+ data: z.ZodArray<z.ZodObject<{
569
+ id: z.ZodString;
570
+ productId: z.ZodString;
571
+ dayId: z.ZodNullable<z.ZodString>;
572
+ mediaType: z.ZodEnum<{
573
+ image: "image";
574
+ video: "video";
575
+ document: "document";
576
+ }>;
577
+ name: z.ZodString;
578
+ url: z.ZodString;
579
+ storageKey: z.ZodNullable<z.ZodString>;
580
+ mimeType: z.ZodNullable<z.ZodString>;
581
+ fileSize: z.ZodNullable<z.ZodNumber>;
582
+ altText: z.ZodNullable<z.ZodString>;
583
+ sortOrder: z.ZodNumber;
584
+ isCover: z.ZodBoolean;
585
+ createdAt: z.ZodString;
586
+ updatedAt: z.ZodString;
587
+ }, z.core.$strip>>;
588
+ total: z.ZodNumber;
589
+ limit: z.ZodNumber;
590
+ offset: z.ZodNumber;
591
+ }, z.core.$strip>;
592
+ export declare const productMediaResponse: z.ZodObject<{
593
+ data: z.ZodObject<{
594
+ id: z.ZodString;
595
+ productId: z.ZodString;
596
+ dayId: z.ZodNullable<z.ZodString>;
597
+ mediaType: z.ZodEnum<{
598
+ image: "image";
599
+ video: "video";
600
+ document: "document";
601
+ }>;
602
+ name: z.ZodString;
603
+ url: z.ZodString;
604
+ storageKey: z.ZodNullable<z.ZodString>;
605
+ mimeType: z.ZodNullable<z.ZodString>;
606
+ fileSize: z.ZodNullable<z.ZodNumber>;
607
+ altText: z.ZodNullable<z.ZodString>;
608
+ sortOrder: z.ZodNumber;
609
+ isCover: z.ZodBoolean;
610
+ createdAt: z.ZodString;
611
+ updatedAt: z.ZodString;
612
+ }, z.core.$strip>;
613
+ }, z.core.$strip>;
614
+ export { insertDaySchema, insertDayServiceSchema, insertProductMediaSchema, insertVersionSchema, reorderProductMediaSchema, updateDaySchema, updateDayServiceSchema, updateProductMediaSchema, };
615
+ export type CreateProductDayInput = z.input<typeof insertDaySchema>;
616
+ export type UpdateProductDayInput = z.input<typeof updateDaySchema>;
617
+ export type CreateProductDayServiceInput = z.input<typeof insertDayServiceSchema>;
618
+ export type UpdateProductDayServiceInput = z.input<typeof updateDayServiceSchema>;
619
+ export type CreateProductVersionInput = z.input<typeof insertVersionSchema>;
620
+ export type CreateProductMediaInput = z.input<typeof insertProductMediaSchema>;
621
+ export type UpdateProductMediaInput = z.input<typeof updateProductMediaSchema>;
622
+ export type ReorderProductMediaInput = z.input<typeof reorderProductMediaSchema>;
407
623
  //# sourceMappingURL=schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;;;;iBAM7D,CAAA;AAEJ,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAA6B,CAAA;AAE3F,eAAO,MAAM,eAAe;;iBAAqC,CAAA;AAEjE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuB9B,CAAA;AAEF,MAAM,MAAM,aAAa,GA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