@shivam1121/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.
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/package.json +16 -0
- package/src/index.ts +31 -0
- package/tsconfig.json +44 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare const signupInput: z.ZodObject<{
|
|
3
|
+
username: z.ZodEmail;
|
|
4
|
+
password: z.ZodString;
|
|
5
|
+
name: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.z.core.$strip>;
|
|
7
|
+
export type SignupInput = z.infer<typeof signupInput>;
|
|
8
|
+
export declare const signinInput: z.ZodObject<{
|
|
9
|
+
username: z.ZodString;
|
|
10
|
+
password: z.ZodString;
|
|
11
|
+
}, z.z.core.$strip>;
|
|
12
|
+
export type SigninInput = z.infer<typeof signinInput>;
|
|
13
|
+
export declare const createBlogInput: z.ZodObject<{
|
|
14
|
+
title: z.ZodString;
|
|
15
|
+
content: z.ZodString;
|
|
16
|
+
}, z.z.core.$strip>;
|
|
17
|
+
export type CreateBlogInput = z.infer<typeof createBlogInput>;
|
|
18
|
+
export declare const updateBlogInput: z.ZodObject<{
|
|
19
|
+
title: z.ZodString;
|
|
20
|
+
content: z.ZodString;
|
|
21
|
+
id: z.ZodNumber;
|
|
22
|
+
}, z.z.core.$strip>;
|
|
23
|
+
export type UpdateBlogInput = z.infer<typeof updateBlogInput>;
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,WAAW;;;;mBAItB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAErD,eAAO,MAAM,WAAW;;;mBAGtB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAErD,eAAO,MAAM,eAAe;;;mBAG1B,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAE7D,eAAO,MAAM,eAAe;;;;mBAI1B,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export const signupInput = z.object({
|
|
3
|
+
username: z.email(),
|
|
4
|
+
password: z.string().min(6),
|
|
5
|
+
name: z.string().optional()
|
|
6
|
+
});
|
|
7
|
+
export const signinInput = z.object({
|
|
8
|
+
username: z.string().email(),
|
|
9
|
+
password: z.string().min(6),
|
|
10
|
+
});
|
|
11
|
+
export const createBlogInput = z.object({
|
|
12
|
+
title: z.string(),
|
|
13
|
+
content: z.string(),
|
|
14
|
+
});
|
|
15
|
+
export const updateBlogInput = z.object({
|
|
16
|
+
title: z.string(),
|
|
17
|
+
content: z.string(),
|
|
18
|
+
id: z.number()
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,QAAQ,EAAE,CAAC,CAAC,KAAK,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;IAC5B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC9B,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shivam1121/common",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"description": "",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"zod": "^4.3.4"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
export const signupInput = z.object({
|
|
4
|
+
username: z.email(),
|
|
5
|
+
password: z.string().min(6),
|
|
6
|
+
name: z.string().optional()
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
export type SignupInput = z.infer<typeof signupInput>
|
|
10
|
+
|
|
11
|
+
export const signinInput = z.object({
|
|
12
|
+
username: z.string().email(),
|
|
13
|
+
password: z.string().min(6),
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
export type SigninInput = z.infer<typeof signinInput>
|
|
17
|
+
|
|
18
|
+
export const createBlogInput = z.object({
|
|
19
|
+
title: z.string(),
|
|
20
|
+
content: z.string(),
|
|
21
|
+
})
|
|
22
|
+
export type CreateBlogInput = z.infer<typeof createBlogInput>
|
|
23
|
+
|
|
24
|
+
export const updateBlogInput = z.object({
|
|
25
|
+
title: z.string(),
|
|
26
|
+
content: z.string(),
|
|
27
|
+
id: z.number()
|
|
28
|
+
})
|
|
29
|
+
export type UpdateBlogInput = z.infer<typeof updateBlogInput>
|
|
30
|
+
|
|
31
|
+
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
// Visit https://aka.ms/tsconfig to read more about this file
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
// File Layout
|
|
5
|
+
"rootDir": "./src",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
|
|
8
|
+
// Environment Settings
|
|
9
|
+
// See also https://aka.ms/tsconfig/module
|
|
10
|
+
"module": "nodenext",
|
|
11
|
+
"target": "esnext",
|
|
12
|
+
"types": [],
|
|
13
|
+
// For nodejs:
|
|
14
|
+
// "lib": ["esnext"],
|
|
15
|
+
// "types": ["node"],
|
|
16
|
+
// and npm install -D @types/node
|
|
17
|
+
|
|
18
|
+
// Other Outputs
|
|
19
|
+
"sourceMap": true,
|
|
20
|
+
"declaration": true,
|
|
21
|
+
"declarationMap": true,
|
|
22
|
+
|
|
23
|
+
// Stricter Typechecking Options
|
|
24
|
+
"noUncheckedIndexedAccess": true,
|
|
25
|
+
"exactOptionalPropertyTypes": true,
|
|
26
|
+
|
|
27
|
+
// Style Options
|
|
28
|
+
// "noImplicitReturns": true,
|
|
29
|
+
// "noImplicitOverride": true,
|
|
30
|
+
// "noUnusedLocals": true,
|
|
31
|
+
// "noUnusedParameters": true,
|
|
32
|
+
// "noFallthroughCasesInSwitch": true,
|
|
33
|
+
// "noPropertyAccessFromIndexSignature": true,
|
|
34
|
+
|
|
35
|
+
// Recommended Options
|
|
36
|
+
"strict": true,
|
|
37
|
+
"jsx": "react-jsx",
|
|
38
|
+
"verbatimModuleSyntax": true,
|
|
39
|
+
"isolatedModules": true,
|
|
40
|
+
"noUncheckedSideEffectImports": true,
|
|
41
|
+
"moduleDetection": "force",
|
|
42
|
+
"skipLibCheck": true,
|
|
43
|
+
}
|
|
44
|
+
}
|