@morpheus.live/medium-common 1.0.0 → 1.0.1
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/package.json +1 -1
- package/src/index.ts +0 -36
package/package.json
CHANGED
package/src/index.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// zod validation schemas and types are here
|
|
2
|
-
import * as z from "zod";
|
|
3
|
-
export const signupInput = z.object({
|
|
4
|
-
username: z.string().trim(),
|
|
5
|
-
useremail: z.email(),
|
|
6
|
-
password: z.string().trim().min(6, "Password must contains 6 characters.")
|
|
7
|
-
})
|
|
8
|
-
|
|
9
|
-
export const signinInput = z.object({
|
|
10
|
-
username: z.string().trim(),
|
|
11
|
-
useremail: z.email(),
|
|
12
|
-
password: z.string().trim().min(6, "Password must contains 6 characters.")
|
|
13
|
-
})
|
|
14
|
-
export const createBlogInput = z.object({
|
|
15
|
-
title: z.string(),
|
|
16
|
-
content: z.string()
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
export const uploadBlogInput = z.object({
|
|
20
|
-
title: z.string(),
|
|
21
|
-
content: z.string(),
|
|
22
|
-
id: z.string()
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
export const postSchema = z.object({
|
|
26
|
-
title: z.string(),
|
|
27
|
-
content: z.string(),
|
|
28
|
-
published: z.boolean().optional()
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
// zod infer -> used in our frontend
|
|
33
|
-
export type SigninInput = z.infer<typeof signinInput>
|
|
34
|
-
export type CreateBlogInput = z.infer<typeof createBlogInput>
|
|
35
|
-
export type SignupInput = z.infer<typeof signupInput>
|
|
36
|
-
export type UploadBlogInput = z.infer<typeof uploadBlogInput>
|