shared_schemas 1.0.3 → 1.0.4
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
declare const loginSchema: z.ZodObject<{
|
|
2
|
+
export declare const loginSchema: z.ZodObject<{
|
|
3
3
|
email: z.ZodString;
|
|
4
4
|
password: z.ZodString;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
|
-
declare const registerSchema: z.ZodObject<{
|
|
6
|
+
export declare const registerSchema: z.ZodObject<{
|
|
7
7
|
name: z.ZodString;
|
|
8
8
|
email: z.ZodString;
|
|
9
9
|
password: z.ZodString;
|
|
@@ -11,5 +11,4 @@ declare const registerSchema: z.ZodObject<{
|
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export type LoginCredentials = z.infer<typeof loginSchema>;
|
|
13
13
|
export type SignupCredentials = z.infer<typeof registerSchema>;
|
|
14
|
-
export {};
|
|
15
14
|
//# sourceMappingURL=auth.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/auth.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,
|
|
1
|
+
{"version":3,"file":"auth.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/auth.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,WAAW;;;iBAItB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA;AAC1D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerSchema = exports.loginSchema = void 0;
|
|
3
4
|
const zod_1 = require("zod");
|
|
4
|
-
|
|
5
|
+
exports.loginSchema = zod_1.z.object({
|
|
5
6
|
email: zod_1.z.string().trim().min(1, "Email is required").email({ message: "Invalid Email format" }),
|
|
6
7
|
password: zod_1.z.string().min(1, "Password is required")
|
|
7
8
|
});
|
|
8
|
-
|
|
9
|
+
exports.registerSchema = zod_1.z.object({
|
|
9
10
|
name: zod_1.z.string().min(1, "Name is required"),
|
|
10
11
|
email: zod_1.z.string().trim().min(1, "Email is required").email({ message: "Invalid email format" }),
|
|
11
12
|
password: zod_1.z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.schemas.js","sourceRoot":"","sources":["../../src/schemas/auth.schemas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.schemas.js","sourceRoot":"","sources":["../../src/schemas/auth.schemas.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAET,QAAA,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,KAAK,CAAC,EAAC,OAAO,EAAE,sBAAsB,EAAC,CAAC;IAC7F,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;CAEtD,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,kBAAkB,CAAC;IAC3C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC;IAC/F,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,gCAAgC,CAAC;CACvE,CAAC,CAAC;AAKH,8BAA8B;AAC9B,mBAAmB;AACnB,uBAAuB"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {z} from "zod";
|
|
2
2
|
|
|
3
|
-
const loginSchema = z.object({
|
|
3
|
+
export const loginSchema = z.object({
|
|
4
4
|
email: z.string().trim().min(1, "Email is required").email({message: "Invalid Email format"}),
|
|
5
5
|
password: z.string().min(1, "Password is required")
|
|
6
6
|
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
const registerSchema = z.object({
|
|
9
|
+
export const registerSchema = z.object({
|
|
10
10
|
name: z.string().min(1, "Name is required"),
|
|
11
11
|
email: z.string().trim().min(1, "Email is required").email({ message: "Invalid email format" }),
|
|
12
12
|
password: z.string(),
|