shared_schemas 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/app.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./schemas/auth.schemas";
2
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA"}
package/dist/app.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./schemas/auth.schemas"), exports);
18
+ //# sourceMappingURL=app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAsC"}
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ export declare const authSchema: {
3
+ login: z.ZodObject<{
4
+ email: z.ZodString;
5
+ password: z.ZodString;
6
+ }, z.core.$strip>;
7
+ register: z.ZodObject<{
8
+ name: z.ZodString;
9
+ email: z.ZodString;
10
+ password: z.ZodString;
11
+ number: z.ZodString;
12
+ }, z.core.$strip>;
13
+ };
14
+ //# sourceMappingURL=auth.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.schemas.d.ts","sourceRoot":"","sources":["../src/schemas/auth.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAetB,eAAO,MAAO,UAAU;;;;;;;;;;;CAGvB,CAAA"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.authSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const login = zod_1.z.object({
6
+ email: zod_1.z.string().trim().min(1, "Email is required").email({ message: "Invalid Email format" }),
7
+ password: zod_1.z.string().min(1, "Password is required")
8
+ });
9
+ const register = zod_1.z.object({
10
+ name: zod_1.z.string(),
11
+ email: zod_1.z.string().trim().min(1, "Email is required").email({ message: "Invalid email format" }),
12
+ password: zod_1.z.string(),
13
+ number: zod_1.z.string()
14
+ });
15
+ exports.authSchema = {
16
+ login,
17
+ register
18
+ };
19
+ //# sourceMappingURL=auth.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.schemas.js","sourceRoot":"","sources":["../src/schemas/auth.schemas.ts"],"names":[],"mappings":";;;AACA,6BAAsB;AAEtB,MAAM,KAAK,GAAG,OAAC,CAAC,MAAM,CAAC;IACnB,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;AAEH,MAAM,QAAQ,GAAG,OAAC,CAAC,MAAM,CAAC;IACtB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,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,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAEW,QAAA,UAAU,GAAG;IACvB,KAAK;IACL,QAAQ;CACX,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ export declare const authSchema: {
3
+ login: z.ZodObject<{
4
+ email: z.ZodString;
5
+ password: z.ZodString;
6
+ }, z.core.$strip>;
7
+ register: z.ZodObject<{
8
+ name: z.ZodString;
9
+ email: z.ZodString;
10
+ password: z.ZodString;
11
+ number: z.ZodString;
12
+ }, z.core.$strip>;
13
+ };
14
+ //# sourceMappingURL=auth.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/auth.schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAetB,eAAO,MAAO,UAAU;;;;;;;;;;;CAGvB,CAAA"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.authSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const login = zod_1.z.object({
6
+ email: zod_1.z.string().trim().min(1, "Email is required").email({ message: "Invalid Email format" }),
7
+ password: zod_1.z.string().min(1, "Password is required")
8
+ });
9
+ const register = zod_1.z.object({
10
+ name: zod_1.z.string(),
11
+ email: zod_1.z.string().trim().min(1, "Email is required").email({ message: "Invalid email format" }),
12
+ password: zod_1.z.string(),
13
+ number: zod_1.z.string()
14
+ });
15
+ exports.authSchema = {
16
+ login,
17
+ register
18
+ };
19
+ //# sourceMappingURL=auth.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.schemas.js","sourceRoot":"","sources":["../../src/schemas/auth.schemas.ts"],"names":[],"mappings":";;;AACA,6BAAsB;AAEtB,MAAM,KAAK,GAAG,OAAC,CAAC,MAAM,CAAC;IACnB,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;AAEH,MAAM,QAAQ,GAAG,OAAC,CAAC,MAAM,CAAC;IACtB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,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,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAEW,QAAA,UAAU,GAAG;IACvB,KAAK;IACL,QAAQ;CACX,CAAA"}
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "shared_schemas",
3
+ "version": "1.0.0",
4
+ "main": "dist/app.js",
5
+ "scripts": {
6
+ "build": "tsc",
7
+ "prepublishOnly": "npm run build"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "description": "",
13
+ "dependencies": {
14
+ "zod": "^4.1.13"
15
+ },
16
+ "devDependencies": {
17
+ "typescript": "^5.9.3"
18
+ }
19
+ }
package/src/app.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./schemas/auth.schemas"
@@ -0,0 +1,20 @@
1
+
2
+ import {z} from "zod";
3
+
4
+ const login = z.object({
5
+ email: z.string().trim().min(1, "Email is required").email({message: "Invalid Email format"}),
6
+ password: z.string().min(1, "Password is required")
7
+
8
+ });
9
+
10
+ const register = z.object({
11
+ name: z.string(),
12
+ email: z.string().trim().min(1, "Email is required").email({ message: "Invalid email format" }),
13
+ password: z.string(),
14
+ number: z.string()
15
+ });
16
+
17
+ export const authSchema = {
18
+ login,
19
+ register
20
+ }
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
+ "outDir": "./dist",
6
+
7
+ // Environment Settings
8
+ // See also https://aka.ms/tsconfig/module
9
+ "module": "nodenext",
10
+ "target": "esnext",
11
+ "types": [],
12
+ // For nodejs:
13
+ // "lib": ["esnext"],
14
+ // "types": ["node"],
15
+ // and npm install -D @types/node
16
+
17
+ // Other Outputs
18
+ "sourceMap": true,
19
+ "declaration": true,
20
+ "declarationMap": true,
21
+
22
+ // Stricter Typechecking Options
23
+ "noUncheckedIndexedAccess": true,
24
+ "exactOptionalPropertyTypes": true,
25
+
26
+ // Style Options
27
+ // "noImplicitReturns": true,
28
+ // "noImplicitOverride": true,
29
+ // "noUnusedLocals": true,
30
+ // "noUnusedParameters": true,
31
+ // "noFallthroughCasesInSwitch": true,
32
+ // "noPropertyAccessFromIndexSignature": true,
33
+
34
+ // Recommended Options
35
+ "strict": true,
36
+ "jsx": "react-jsx",
37
+ "verbatimModuleSyntax": false,
38
+ "isolatedModules": true,
39
+ "noUncheckedSideEffectImports": true,
40
+ "moduleDetection": "force",
41
+ "skipLibCheck": true,
42
+ },
43
+ "include": ["src"]
44
+ }