@vedhae/cms-schema 4.2.0 → 4.2.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.
@@ -0,0 +1,40 @@
1
+ import { z } from "zod";
2
+ export declare const AboutHeroSchema: z.ZodObject<{
3
+ title: z.ZodString;
4
+ }, "strip", z.ZodTypeAny, {
5
+ title: string;
6
+ }, {
7
+ title: string;
8
+ }>;
9
+ export type AboutHero = z.infer<typeof AboutHeroSchema>;
10
+ export declare const AboutContentSchema: z.ZodObject<{
11
+ paragraphs: z.ZodArray<z.ZodString, "many">;
12
+ }, "strip", z.ZodTypeAny, {
13
+ paragraphs: string[];
14
+ }, {
15
+ paragraphs: string[];
16
+ }>;
17
+ export type AboutContent = z.infer<typeof AboutContentSchema>;
18
+ export declare const AboutImagesSchema: z.ZodObject<{
19
+ images: z.ZodArray<z.ZodObject<{
20
+ url: z.ZodString;
21
+ alt: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ url: string;
24
+ alt: string;
25
+ }, {
26
+ url: string;
27
+ alt: string;
28
+ }>, "many">;
29
+ }, "strip", z.ZodTypeAny, {
30
+ images: {
31
+ url: string;
32
+ alt: string;
33
+ }[];
34
+ }, {
35
+ images: {
36
+ url: string;
37
+ alt: string;
38
+ }[];
39
+ }>;
40
+ export type AboutImages = z.infer<typeof AboutImagesSchema>;
@@ -0,0 +1,16 @@
1
+ import { z } from "zod";
2
+ /* =========================
3
+ ABOUT PAGE
4
+ ========================= */
5
+ export const AboutHeroSchema = z.object({
6
+ title: z.string(),
7
+ });
8
+ export const AboutContentSchema = z.object({
9
+ paragraphs: z.array(z.string()),
10
+ });
11
+ export const AboutImagesSchema = z.object({
12
+ images: z.array(z.object({
13
+ url: z.string().url(),
14
+ alt: z.string(),
15
+ })),
16
+ });
@@ -8,12 +8,12 @@ export declare const CardItemSchema: z.ZodObject<{
8
8
  path: z.ZodString;
9
9
  alt: z.ZodString;
10
10
  }, "strip", z.ZodTypeAny, {
11
- url: string;
12
11
  path: string;
12
+ url: string;
13
13
  alt: string;
14
14
  }, {
15
- url: string;
16
15
  path: string;
16
+ url: string;
17
17
  alt: string;
18
18
  }>;
19
19
  }, "strip", z.ZodTypeAny, {
@@ -21,8 +21,8 @@ export declare const CardItemSchema: z.ZodObject<{
21
21
  link: string;
22
22
  order: number;
23
23
  image: {
24
- url: string;
25
24
  path: string;
25
+ url: string;
26
26
  alt: string;
27
27
  };
28
28
  }, {
@@ -30,8 +30,8 @@ export declare const CardItemSchema: z.ZodObject<{
30
30
  link: string;
31
31
  order: number;
32
32
  image: {
33
- url: string;
34
33
  path: string;
34
+ url: string;
35
35
  alt: string;
36
36
  };
37
37
  }>;
@@ -50,12 +50,12 @@ export declare const CardSectionSchema: z.ZodObject<{
50
50
  path: z.ZodString;
51
51
  alt: z.ZodString;
52
52
  }, "strip", z.ZodTypeAny, {
53
- url: string;
54
53
  path: string;
54
+ url: string;
55
55
  alt: string;
56
56
  }, {
57
- url: string;
58
57
  path: string;
58
+ url: string;
59
59
  alt: string;
60
60
  }>;
61
61
  }, "strip", z.ZodTypeAny, {
@@ -63,8 +63,8 @@ export declare const CardSectionSchema: z.ZodObject<{
63
63
  link: string;
64
64
  order: number;
65
65
  image: {
66
- url: string;
67
66
  path: string;
67
+ url: string;
68
68
  alt: string;
69
69
  };
70
70
  }, {
@@ -72,40 +72,40 @@ export declare const CardSectionSchema: z.ZodObject<{
72
72
  link: string;
73
73
  order: number;
74
74
  image: {
75
- url: string;
76
75
  path: string;
76
+ url: string;
77
77
  alt: string;
78
78
  };
79
79
  }>, "many">;
80
80
  }, "strip", z.ZodTypeAny, {
81
+ title: string;
81
82
  order: number;
82
83
  page: "home";
83
84
  section: "one" | "two";
84
- title: string;
85
85
  active: boolean;
86
86
  items: {
87
87
  name: string;
88
88
  link: string;
89
89
  order: number;
90
90
  image: {
91
- url: string;
92
91
  path: string;
92
+ url: string;
93
93
  alt: string;
94
94
  };
95
95
  }[];
96
96
  }, {
97
+ title: string;
97
98
  order: number;
98
99
  page: "home";
99
100
  section: "one" | "two";
100
- title: string;
101
101
  active: boolean;
102
102
  items: {
103
103
  name: string;
104
104
  link: string;
105
105
  order: number;
106
106
  image: {
107
- url: string;
108
107
  path: string;
108
+ url: string;
109
109
  alt: string;
110
110
  };
111
111
  }[];
@@ -13,39 +13,39 @@ export declare const HeroSectionSchema: z.ZodObject<{
13
13
  path: z.ZodString;
14
14
  alt: z.ZodString;
15
15
  }, "strip", z.ZodTypeAny, {
16
- url: string;
17
16
  path: string;
17
+ url: string;
18
18
  alt: string;
19
19
  }, {
20
- url: string;
21
20
  path: string;
21
+ url: string;
22
22
  alt: string;
23
23
  }>>;
24
24
  }, "strip", z.ZodTypeAny, {
25
+ title: string;
25
26
  page: "home";
26
27
  section: "hero";
27
- title: string;
28
28
  active: boolean;
29
29
  tagline: string;
30
30
  ctaText: string;
31
31
  ctaLink: string;
32
32
  image?: {
33
- url: string;
34
33
  path: string;
34
+ url: string;
35
35
  alt: string;
36
36
  } | undefined;
37
37
  description?: string | undefined;
38
38
  }, {
39
+ title: string;
39
40
  page: "home";
40
41
  section: "hero";
41
- title: string;
42
42
  active: boolean;
43
43
  tagline: string;
44
44
  ctaText: string;
45
45
  ctaLink: string;
46
46
  image?: {
47
- url: string;
48
47
  path: string;
48
+ url: string;
49
49
  alt: string;
50
50
  } | undefined;
51
51
  description?: string | undefined;
@@ -4,12 +4,12 @@ export declare const ImageAssetSchema: z.ZodObject<{
4
4
  path: z.ZodString;
5
5
  alt: z.ZodString;
6
6
  }, "strip", z.ZodTypeAny, {
7
- url: string;
8
7
  path: string;
8
+ url: string;
9
9
  alt: string;
10
10
  }, {
11
- url: string;
12
11
  path: string;
12
+ url: string;
13
13
  alt: string;
14
14
  }>;
15
15
  export type ImageAsset = z.infer<typeof ImageAssetSchema>;
package/dist/index.d.ts CHANGED
@@ -3,8 +3,10 @@ export { HeroSectionSchema } from "./hero.schema.js";
3
3
  export { CardSectionSchema } from "./cardSection.schema.js";
4
4
  export { ProductSchema } from "./product.schema.js";
5
5
  export { ProductHeroSchema } from "./productHero.schema.js";
6
+ export { AboutHeroSchema, AboutContentSchema, AboutImagesSchema, } from "./about.schema.js";
6
7
  export type { ImageAsset } from "./image.schema.js";
7
8
  export type { HeroSection } from "./hero.schema.js";
8
9
  export type { CardSection } from "./cardSection.schema.js";
9
10
  export type { Product } from "./product.schema.js";
10
11
  export type { ProductHero } from "./productHero.schema.js";
12
+ export type { AboutHero, AboutContent, AboutImages, } from "./about.schema.js";
package/dist/index.js CHANGED
@@ -1,6 +1,10 @@
1
+ // =========================
1
2
  // schemas
3
+ // =========================
2
4
  export { ImageAssetSchema } from "./image.schema.js";
3
5
  export { HeroSectionSchema } from "./hero.schema.js";
4
6
  export { CardSectionSchema } from "./cardSection.schema.js";
5
7
  export { ProductSchema } from "./product.schema.js";
6
8
  export { ProductHeroSchema } from "./productHero.schema.js";
9
+ // ABOUT
10
+ export { AboutHeroSchema, AboutContentSchema, AboutImagesSchema, } from "./about.schema.js";
@@ -20,12 +20,12 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
20
20
  path: z.ZodString;
21
21
  alt: z.ZodString;
22
22
  }, "strip", z.ZodTypeAny, {
23
- url: string;
24
23
  path: string;
24
+ url: string;
25
25
  alt: string;
26
26
  }, {
27
- url: string;
28
27
  path: string;
28
+ url: string;
29
29
  alt: string;
30
30
  }>, "many">;
31
31
  aboutTitle: z.ZodString;
@@ -43,8 +43,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
43
43
  createdAt: z.ZodNumber;
44
44
  updatedAt: z.ZodNumber;
45
45
  }, "strip", z.ZodTypeAny, {
46
- order: number;
47
46
  title: string;
47
+ order: number;
48
48
  active: boolean;
49
49
  id: string;
50
50
  titleDescription: string;
@@ -56,8 +56,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
56
56
  stockStatus: boolean;
57
57
  stockVolume: number;
58
58
  imageLinks: {
59
- url: string;
60
59
  path: string;
60
+ url: string;
61
61
  alt: string;
62
62
  }[];
63
63
  aboutTitle: string;
@@ -71,8 +71,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
71
71
  externalLink?: string | undefined;
72
72
  priceSubText?: string | undefined;
73
73
  }, {
74
- order: number;
75
74
  title: string;
75
+ order: number;
76
76
  active: boolean;
77
77
  id: string;
78
78
  titleDescription: string;
@@ -84,8 +84,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
84
84
  stockStatus: boolean;
85
85
  stockVolume: number;
86
86
  imageLinks: {
87
- url: string;
88
87
  path: string;
88
+ url: string;
89
89
  alt: string;
90
90
  }[];
91
91
  aboutTitle: string;
@@ -99,8 +99,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
99
99
  externalLink?: string | undefined;
100
100
  priceSubText?: string | undefined;
101
101
  }>, {
102
- order: number;
103
102
  title: string;
103
+ order: number;
104
104
  active: boolean;
105
105
  id: string;
106
106
  titleDescription: string;
@@ -112,8 +112,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
112
112
  stockStatus: boolean;
113
113
  stockVolume: number;
114
114
  imageLinks: {
115
- url: string;
116
115
  path: string;
116
+ url: string;
117
117
  alt: string;
118
118
  }[];
119
119
  aboutTitle: string;
@@ -127,8 +127,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
127
127
  externalLink?: string | undefined;
128
128
  priceSubText?: string | undefined;
129
129
  }, {
130
- order: number;
131
130
  title: string;
131
+ order: number;
132
132
  active: boolean;
133
133
  id: string;
134
134
  titleDescription: string;
@@ -140,8 +140,8 @@ export declare const ProductSchema: z.ZodEffects<z.ZodObject<{
140
140
  stockStatus: boolean;
141
141
  stockVolume: number;
142
142
  imageLinks: {
143
- url: string;
144
143
  path: string;
144
+ url: string;
145
145
  alt: string;
146
146
  }[];
147
147
  aboutTitle: string;
@@ -17,18 +17,18 @@ export declare const ProductHeroSchema: z.ZodObject<{
17
17
  path: z.ZodString;
18
18
  alt: z.ZodString;
19
19
  }, "strip", z.ZodTypeAny, {
20
- url: string;
21
20
  path: string;
21
+ url: string;
22
22
  alt: string;
23
23
  }, {
24
- url: string;
25
24
  path: string;
25
+ url: string;
26
26
  alt: string;
27
27
  }>;
28
28
  }, "strip", z.ZodTypeAny, {
29
29
  image: {
30
- url: string;
31
30
  path: string;
31
+ url: string;
32
32
  alt: string;
33
33
  };
34
34
  page: "products";
@@ -39,8 +39,8 @@ export declare const ProductHeroSchema: z.ZodObject<{
39
39
  };
40
40
  }, {
41
41
  image: {
42
- url: string;
43
42
  path: string;
43
+ url: string;
44
44
  alt: string;
45
45
  };
46
46
  page: "products";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vedhae/cms-schema",
3
- "version": "4.2.0",
3
+ "version": "4.2.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",