@aditya_1006/mediumblog-common 1.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.
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ export declare const signupSchema: z.ZodObject<{
3
+ firstname: z.ZodString;
4
+ lastname: z.ZodString;
5
+ email: z.ZodString;
6
+ password: z.ZodString;
7
+ }, z.core.$strip>;
8
+ export declare const signinSchema: z.ZodObject<{
9
+ email: z.ZodString;
10
+ password: z.ZodString;
11
+ }, z.core.$strip>;
12
+ export declare const updateSchema: z.ZodObject<{
13
+ firstname: z.ZodOptional<z.ZodString>;
14
+ lastname: z.ZodOptional<z.ZodString>;
15
+ age: z.ZodOptional<z.ZodNumber>;
16
+ profilepic: z.ZodOptional<z.ZodString>;
17
+ about: z.ZodOptional<z.ZodString>;
18
+ }, z.core.$strip>;
19
+ export declare const blogSchema: z.ZodObject<{
20
+ title: z.ZodString;
21
+ content: z.ZodString;
22
+ }, z.core.$strip>;
23
+ export declare const updateBlogSchema: z.ZodObject<{
24
+ title: z.ZodOptional<z.ZodString>;
25
+ content: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>;
27
+ export type SignupInput = z.infer<typeof signupSchema>;
28
+ export type SigninInput = z.infer<typeof signinSchema>;
29
+ export type UpdateInput = z.infer<typeof updateSchema>;
30
+ export type BlogInput = z.infer<typeof blogSchema>;
31
+ export type UpdateBlogInput = z.infer<typeof updateBlogSchema>;
32
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,YAAY;;;;;iBAKvB,CAAC;AAGH,eAAO,MAAM,YAAY;;;iBAGvB,CAAC;AAGH,eAAO,MAAM,YAAY;;;;;;iBAMvB,CAAC;AAGH,eAAO,MAAM,UAAU;;;iBAGrB,CAAA;AAGF,eAAO,MAAM,gBAAgB;;;iBAG3B,CAAA;AAMF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACvD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACvD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACvD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACnD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,29 @@
1
+ import { z } from "zod";
2
+ // --------x--------x--------x--------x--------x--------x---------x--------x--------x--------x--------x--------x--------x--------x-
3
+ //Backend will need this
4
+ export const signupSchema = z.object({
5
+ firstname: z.string().min(1),
6
+ lastname: z.string().min(1),
7
+ email: z.string().email(),
8
+ password: z.string().min(6),
9
+ });
10
+ export const signinSchema = z.object({
11
+ email: z.string().email(),
12
+ password: z.string().min(6),
13
+ });
14
+ export const updateSchema = z.object({
15
+ firstname: z.string().min(1).optional(),
16
+ lastname: z.string().min(1).optional(),
17
+ age: z.number().min(0).optional(),
18
+ profilepic: z.string().url().optional(),
19
+ about: z.string().min(1).optional(),
20
+ });
21
+ export const blogSchema = z.object({
22
+ title: z.string().min(1).max(30),
23
+ content: z.string().min(1),
24
+ });
25
+ export const updateBlogSchema = z.object({
26
+ title: z.string().min(1).max(30).optional(),
27
+ content: z.string().min(1).optional(),
28
+ });
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,mIAAmI;AACnI,wBAAwB;AACx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,GAAG,CAAC,EAAE,CAAC;IAC/B,OAAO,EAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@aditya_1006/mediumblog-common",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "main": "./dist/index.js",
6
+ "scripts": {
7
+ "build": "tsc",
8
+ "start": "node dist/index.js"
9
+ },
10
+ "keywords": [],
11
+ "author": "",
12
+ "license": "ISC",
13
+ "description": "",
14
+ "dependencies": {
15
+ "express": "^5.2.1",
16
+ "zod": "^4.2.1"
17
+ },
18
+ "devDependencies": {
19
+ "@types/express": "^5.0.6",
20
+ "@types/node": "^20.11.0",
21
+ "typescript": "^5.4.0"
22
+ }
23
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "rootDir": "./src",
4
+ "outDir": "./dist",
5
+
6
+ "target": "ES2022",
7
+ "module": "NodeNext",
8
+ "moduleResolution": "NodeNext",
9
+
10
+ "lib": ["ES2022"],
11
+ "types": ["node"],
12
+
13
+ "sourceMap": true,
14
+ "declaration": true,
15
+ "declarationMap": true,
16
+
17
+ "strict": true,
18
+ "verbatimModuleSyntax": true,
19
+ "isolatedModules": true,
20
+ "moduleDetection": "force",
21
+ "skipLibCheck": true
22
+ },
23
+ "include": ["src"]
24
+ }
@@ -0,0 +1 @@
1
+ {"root":["./src/index.ts"],"version":"5.9.3"}