@vedhae/cms-schema 1.2.0 → 3.0.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.
- package/dist/{shopByCategory.schema.d.ts → cardSection.schema.d.ts} +29 -26
- package/dist/cardSection.schema.js +16 -0
- package/dist/hero.schema.d.ts +4 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/shopByCategory.schema.js +0 -15
- package/dist/shopByPerson.schema.d.ts +0 -110
- package/dist/shopByPerson.schema.js +0 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const CardItemSchema: z.ZodObject<{
|
|
3
3
|
name: z.ZodString;
|
|
4
4
|
link: z.ZodString;
|
|
5
5
|
order: z.ZodNumber;
|
|
@@ -17,30 +17,31 @@ export declare const ShopByCategoryItemSchema: z.ZodObject<{
|
|
|
17
17
|
alt: string;
|
|
18
18
|
}>;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
name: string;
|
|
21
|
+
link: string;
|
|
22
|
+
order: number;
|
|
20
23
|
image: {
|
|
21
24
|
url: string;
|
|
22
25
|
path: string;
|
|
23
26
|
alt: string;
|
|
24
27
|
};
|
|
28
|
+
}, {
|
|
25
29
|
name: string;
|
|
26
30
|
link: string;
|
|
27
31
|
order: number;
|
|
28
|
-
}, {
|
|
29
32
|
image: {
|
|
30
33
|
url: string;
|
|
31
34
|
path: string;
|
|
32
35
|
alt: string;
|
|
33
36
|
};
|
|
34
|
-
name: string;
|
|
35
|
-
link: string;
|
|
36
|
-
order: number;
|
|
37
37
|
}>;
|
|
38
|
-
export declare const
|
|
38
|
+
export declare const CardSectionSchema: z.ZodObject<{
|
|
39
39
|
page: z.ZodLiteral<"home">;
|
|
40
|
-
section: z.
|
|
41
|
-
active: z.ZodBoolean;
|
|
40
|
+
section: z.ZodEnum<["one", "two"]>;
|
|
42
41
|
title: z.ZodString;
|
|
43
|
-
|
|
42
|
+
order: z.ZodNumber;
|
|
43
|
+
active: z.ZodBoolean;
|
|
44
|
+
items: z.ZodArray<z.ZodObject<{
|
|
44
45
|
name: z.ZodString;
|
|
45
46
|
link: z.ZodString;
|
|
46
47
|
order: z.ZodNumber;
|
|
@@ -58,53 +59,55 @@ export declare const ShopByCategorySchema: z.ZodObject<{
|
|
|
58
59
|
alt: string;
|
|
59
60
|
}>;
|
|
60
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
name: string;
|
|
63
|
+
link: string;
|
|
64
|
+
order: number;
|
|
61
65
|
image: {
|
|
62
66
|
url: string;
|
|
63
67
|
path: string;
|
|
64
68
|
alt: string;
|
|
65
69
|
};
|
|
70
|
+
}, {
|
|
66
71
|
name: string;
|
|
67
72
|
link: string;
|
|
68
73
|
order: number;
|
|
69
|
-
}, {
|
|
70
74
|
image: {
|
|
71
75
|
url: string;
|
|
72
76
|
path: string;
|
|
73
77
|
alt: string;
|
|
74
78
|
};
|
|
75
|
-
name: string;
|
|
76
|
-
link: string;
|
|
77
|
-
order: number;
|
|
78
79
|
}>, "many">;
|
|
79
80
|
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
order: number;
|
|
80
82
|
page: "home";
|
|
81
|
-
section: "
|
|
82
|
-
active: boolean;
|
|
83
|
+
section: "one" | "two";
|
|
83
84
|
title: string;
|
|
84
|
-
|
|
85
|
+
active: boolean;
|
|
86
|
+
items: {
|
|
87
|
+
name: string;
|
|
88
|
+
link: string;
|
|
89
|
+
order: number;
|
|
85
90
|
image: {
|
|
86
91
|
url: string;
|
|
87
92
|
path: string;
|
|
88
93
|
alt: string;
|
|
89
94
|
};
|
|
90
|
-
name: string;
|
|
91
|
-
link: string;
|
|
92
|
-
order: number;
|
|
93
95
|
}[];
|
|
94
96
|
}, {
|
|
97
|
+
order: number;
|
|
95
98
|
page: "home";
|
|
96
|
-
section: "
|
|
97
|
-
active: boolean;
|
|
99
|
+
section: "one" | "two";
|
|
98
100
|
title: string;
|
|
99
|
-
|
|
101
|
+
active: boolean;
|
|
102
|
+
items: {
|
|
103
|
+
name: string;
|
|
104
|
+
link: string;
|
|
105
|
+
order: number;
|
|
100
106
|
image: {
|
|
101
107
|
url: string;
|
|
102
108
|
path: string;
|
|
103
109
|
alt: string;
|
|
104
110
|
};
|
|
105
|
-
name: string;
|
|
106
|
-
link: string;
|
|
107
|
-
order: number;
|
|
108
111
|
}[];
|
|
109
112
|
}>;
|
|
110
|
-
export type
|
|
113
|
+
export type CardSection = z.infer<typeof CardSectionSchema>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { ImageAssetSchema } from "./image.schema.js";
|
|
3
|
+
export const CardItemSchema = z.object({
|
|
4
|
+
name: z.string(),
|
|
5
|
+
link: z.string(),
|
|
6
|
+
order: z.number(),
|
|
7
|
+
image: ImageAssetSchema,
|
|
8
|
+
});
|
|
9
|
+
export const CardSectionSchema = z.object({
|
|
10
|
+
page: z.literal("home"),
|
|
11
|
+
section: z.enum(["one", "two"]),
|
|
12
|
+
title: z.string(),
|
|
13
|
+
order: z.number(),
|
|
14
|
+
active: z.boolean(),
|
|
15
|
+
items: z.array(CardItemSchema),
|
|
16
|
+
});
|
package/dist/hero.schema.d.ts
CHANGED
|
@@ -24,30 +24,30 @@ export declare const HeroSectionSchema: z.ZodObject<{
|
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
25
|
page: "home";
|
|
26
26
|
section: "hero";
|
|
27
|
+
title: string;
|
|
27
28
|
active: boolean;
|
|
28
29
|
tagline: string;
|
|
29
|
-
title: string;
|
|
30
30
|
ctaText: string;
|
|
31
31
|
ctaLink: string;
|
|
32
|
-
description?: string | undefined;
|
|
33
32
|
image?: {
|
|
34
33
|
url: string;
|
|
35
34
|
path: string;
|
|
36
35
|
alt: string;
|
|
37
36
|
} | undefined;
|
|
37
|
+
description?: string | undefined;
|
|
38
38
|
}, {
|
|
39
39
|
page: "home";
|
|
40
40
|
section: "hero";
|
|
41
|
+
title: string;
|
|
41
42
|
active: boolean;
|
|
42
43
|
tagline: string;
|
|
43
|
-
title: string;
|
|
44
44
|
ctaText: string;
|
|
45
45
|
ctaLink: string;
|
|
46
|
-
description?: string | undefined;
|
|
47
46
|
image?: {
|
|
48
47
|
url: string;
|
|
49
48
|
path: string;
|
|
50
49
|
alt: string;
|
|
51
50
|
} | undefined;
|
|
51
|
+
description?: string | undefined;
|
|
52
52
|
}>;
|
|
53
53
|
export type HeroSection = z.infer<typeof HeroSectionSchema>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export { ImageAssetSchema } from "./image.schema.js";
|
|
2
2
|
export { HeroSectionSchema } from "./hero.schema.js";
|
|
3
|
-
export { ShopByCategorySchema } from "./shopByCategory.schema.js";
|
|
4
|
-
export { ShopByPersonSchema } from "./shopByPerson.schema.js";
|
|
5
3
|
export type { ImageAsset } from "./image.schema.js";
|
|
6
4
|
export type { HeroSection } from "./hero.schema.js";
|
|
7
|
-
export
|
|
8
|
-
export type {
|
|
5
|
+
export { CardSectionSchema } from "./cardSection.schema.js";
|
|
6
|
+
export type { CardSection } from "./cardSection.schema.js";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
// schemas
|
|
1
2
|
export { ImageAssetSchema } from "./image.schema.js";
|
|
2
3
|
export { HeroSectionSchema } from "./hero.schema.js";
|
|
3
|
-
export {
|
|
4
|
-
export { ShopByPersonSchema } from "./shopByPerson.schema.js";
|
|
4
|
+
export { CardSectionSchema } from "./cardSection.schema.js";
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { ImageAssetSchema } from "./image.schema.js";
|
|
3
|
-
export const ShopByCategoryItemSchema = z.object({
|
|
4
|
-
name: z.string().min(1),
|
|
5
|
-
link: z.string().min(1),
|
|
6
|
-
order: z.number().int(),
|
|
7
|
-
image: ImageAssetSchema,
|
|
8
|
-
});
|
|
9
|
-
export const ShopByCategorySchema = z.object({
|
|
10
|
-
page: z.literal("home"),
|
|
11
|
-
section: z.literal("shopByCategory"),
|
|
12
|
-
active: z.boolean(),
|
|
13
|
-
title: z.string().min(1),
|
|
14
|
-
categories: z.array(ShopByCategoryItemSchema),
|
|
15
|
-
});
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const ShopByPersonItemSchema: z.ZodObject<{
|
|
3
|
-
label: z.ZodString;
|
|
4
|
-
link: z.ZodString;
|
|
5
|
-
order: z.ZodNumber;
|
|
6
|
-
image: z.ZodObject<{
|
|
7
|
-
url: z.ZodString;
|
|
8
|
-
path: z.ZodString;
|
|
9
|
-
alt: z.ZodString;
|
|
10
|
-
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
url: string;
|
|
12
|
-
path: string;
|
|
13
|
-
alt: string;
|
|
14
|
-
}, {
|
|
15
|
-
url: string;
|
|
16
|
-
path: string;
|
|
17
|
-
alt: string;
|
|
18
|
-
}>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
image: {
|
|
21
|
-
url: string;
|
|
22
|
-
path: string;
|
|
23
|
-
alt: string;
|
|
24
|
-
};
|
|
25
|
-
link: string;
|
|
26
|
-
order: number;
|
|
27
|
-
label: string;
|
|
28
|
-
}, {
|
|
29
|
-
image: {
|
|
30
|
-
url: string;
|
|
31
|
-
path: string;
|
|
32
|
-
alt: string;
|
|
33
|
-
};
|
|
34
|
-
link: string;
|
|
35
|
-
order: number;
|
|
36
|
-
label: string;
|
|
37
|
-
}>;
|
|
38
|
-
export declare const ShopByPersonSchema: z.ZodObject<{
|
|
39
|
-
page: z.ZodLiteral<"home">;
|
|
40
|
-
section: z.ZodLiteral<"shopByPerson">;
|
|
41
|
-
active: z.ZodBoolean;
|
|
42
|
-
title: z.ZodString;
|
|
43
|
-
cards: z.ZodArray<z.ZodObject<{
|
|
44
|
-
label: z.ZodString;
|
|
45
|
-
link: z.ZodString;
|
|
46
|
-
order: z.ZodNumber;
|
|
47
|
-
image: z.ZodObject<{
|
|
48
|
-
url: z.ZodString;
|
|
49
|
-
path: z.ZodString;
|
|
50
|
-
alt: z.ZodString;
|
|
51
|
-
}, "strip", z.ZodTypeAny, {
|
|
52
|
-
url: string;
|
|
53
|
-
path: string;
|
|
54
|
-
alt: string;
|
|
55
|
-
}, {
|
|
56
|
-
url: string;
|
|
57
|
-
path: string;
|
|
58
|
-
alt: string;
|
|
59
|
-
}>;
|
|
60
|
-
}, "strip", z.ZodTypeAny, {
|
|
61
|
-
image: {
|
|
62
|
-
url: string;
|
|
63
|
-
path: string;
|
|
64
|
-
alt: string;
|
|
65
|
-
};
|
|
66
|
-
link: string;
|
|
67
|
-
order: number;
|
|
68
|
-
label: string;
|
|
69
|
-
}, {
|
|
70
|
-
image: {
|
|
71
|
-
url: string;
|
|
72
|
-
path: string;
|
|
73
|
-
alt: string;
|
|
74
|
-
};
|
|
75
|
-
link: string;
|
|
76
|
-
order: number;
|
|
77
|
-
label: string;
|
|
78
|
-
}>, "many">;
|
|
79
|
-
}, "strip", z.ZodTypeAny, {
|
|
80
|
-
page: "home";
|
|
81
|
-
section: "shopByPerson";
|
|
82
|
-
active: boolean;
|
|
83
|
-
title: string;
|
|
84
|
-
cards: {
|
|
85
|
-
image: {
|
|
86
|
-
url: string;
|
|
87
|
-
path: string;
|
|
88
|
-
alt: string;
|
|
89
|
-
};
|
|
90
|
-
link: string;
|
|
91
|
-
order: number;
|
|
92
|
-
label: string;
|
|
93
|
-
}[];
|
|
94
|
-
}, {
|
|
95
|
-
page: "home";
|
|
96
|
-
section: "shopByPerson";
|
|
97
|
-
active: boolean;
|
|
98
|
-
title: string;
|
|
99
|
-
cards: {
|
|
100
|
-
image: {
|
|
101
|
-
url: string;
|
|
102
|
-
path: string;
|
|
103
|
-
alt: string;
|
|
104
|
-
};
|
|
105
|
-
link: string;
|
|
106
|
-
order: number;
|
|
107
|
-
label: string;
|
|
108
|
-
}[];
|
|
109
|
-
}>;
|
|
110
|
-
export type ShopByPersonSection = z.infer<typeof ShopByPersonSchema>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { ImageAssetSchema } from "./image.schema.js";
|
|
3
|
-
export const ShopByPersonItemSchema = z.object({
|
|
4
|
-
label: z.string().min(1),
|
|
5
|
-
link: z.string().min(1),
|
|
6
|
-
order: z.number().int(),
|
|
7
|
-
image: ImageAssetSchema,
|
|
8
|
-
});
|
|
9
|
-
export const ShopByPersonSchema = z.object({
|
|
10
|
-
page: z.literal("home"),
|
|
11
|
-
section: z.literal("shopByPerson"),
|
|
12
|
-
active: z.boolean(),
|
|
13
|
-
title: z.string().min(1),
|
|
14
|
-
cards: z.array(ShopByPersonItemSchema),
|
|
15
|
-
});
|