@laboratory-one/api-components 0.0.25 → 0.0.27
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/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +1 -0
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/schema.util.d.ts +13 -0
- package/dist/src/utils/schema.util.d.ts.map +1 -0
- package/dist/src/utils/schema.util.js +16 -0
- package/dist/src/utils/schema.util.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -19
- package/src/utils/index.ts +1 -0
- package/src/utils/schema.util.ts +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@laboratory-one/api-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"description": "API components for Laboratory One",
|
|
5
5
|
"author": "Laboratory One",
|
|
6
6
|
"private": false,
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsc",
|
|
37
37
|
"format": "prettier --write 'src/**/*.{js,ts}'",
|
|
38
|
-
"types:generate": "npx prisma generate",
|
|
39
38
|
"lint": "eslint 'src/**/*.{js,ts}'",
|
|
40
39
|
"lint:fix": "yarn format && yarn lint --fix",
|
|
41
40
|
"publish:local": "yalc publish",
|
|
42
41
|
"push": "yarn build && yalc push --replace",
|
|
43
42
|
"typecheck": "tsc --noEmit",
|
|
43
|
+
"types:generate": "npx prisma generate",
|
|
44
44
|
"version:minor": "./scripts/version.sh minor",
|
|
45
45
|
"version:patch": "./scripts/version.sh patch",
|
|
46
46
|
"start:dev": "watchman watch . && watchman -- trigger . yalc-push-trigger \"**/*\" -- ./scripts/yalc-push-trigger.sh"
|
|
@@ -57,53 +57,37 @@
|
|
|
57
57
|
"@nestjs/swagger": "11.2.0",
|
|
58
58
|
"@nestjs/terminus": "11.0.0",
|
|
59
59
|
"@prisma/client": "6.16.2",
|
|
60
|
-
"@sendgrid/mail": "8.1.6",
|
|
61
60
|
"@sentry/nestjs": "10.12.0",
|
|
62
61
|
"@sentry/node": "10.12.0",
|
|
63
62
|
"@sentry/profiling-node": "10.12.0",
|
|
64
63
|
"algoliasearch": "5.37.0",
|
|
65
64
|
"axios": "1.12.2",
|
|
66
|
-
"class-transformer": "0.5.1",
|
|
67
65
|
"class-validator": "0.14.2",
|
|
68
|
-
"compression": "1.8.1",
|
|
69
66
|
"expo-server-sdk": "4.0.0",
|
|
70
67
|
"globals": "16.4.0",
|
|
71
|
-
"helmet": "8.1.0",
|
|
72
68
|
"moment": "2.30.1",
|
|
73
69
|
"prisma": "6.16.2",
|
|
74
70
|
"reflect-metadata": "0.2.2",
|
|
75
71
|
"rxjs": "7.8.2",
|
|
76
|
-
"
|
|
72
|
+
"zod": "4.1.11"
|
|
77
73
|
},
|
|
78
74
|
"devDependencies": {
|
|
79
|
-
"@babel/core": "7.28.4",
|
|
80
75
|
"@nestjs/cli": "11.0.10",
|
|
81
76
|
"@nestjs/schematics": "11.0.7",
|
|
82
77
|
"@nestjs/testing": "11.1.6",
|
|
83
78
|
"@sentry/cli": "2.54.0",
|
|
84
79
|
"@sentry/types": "10.12.0",
|
|
85
|
-
"@tanstack/eslint-plugin-query": "5.89.0",
|
|
86
|
-
"@types/compression": "1.8.1",
|
|
87
80
|
"@types/express": "5.0.3",
|
|
88
81
|
"@types/jest": "30.0.0",
|
|
89
82
|
"@types/node": "24.5.2",
|
|
90
|
-
"@types/supertest": "6.0.3",
|
|
91
83
|
"@typescript-eslint/eslint-plugin": "8.44.0",
|
|
92
84
|
"@typescript-eslint/parser": "8.44.0",
|
|
93
85
|
"eslint": "9.36.0",
|
|
94
|
-
"eslint-config-expo": "10.0.0",
|
|
95
86
|
"eslint-config-prettier": "10.1.8",
|
|
96
|
-
"eslint-import-resolver-typescript": "4.4.4",
|
|
97
|
-
"eslint-plugin-import": "2.32.0",
|
|
98
87
|
"eslint-plugin-prettier": "5.5.4",
|
|
99
88
|
"jest": "30.1.3",
|
|
100
89
|
"prettier": "3.6.2",
|
|
101
|
-
"source-map-support": "0.5.21",
|
|
102
|
-
"supertest": "7.1.4",
|
|
103
|
-
"ts-jest": "29.4.4",
|
|
104
|
-
"ts-loader": "9.5.4",
|
|
105
90
|
"ts-node": "10.9.2",
|
|
106
|
-
"tsc-alias": "1.8.16",
|
|
107
91
|
"tsconfig-paths": "4.2.0",
|
|
108
92
|
"typescript": "5.9.2"
|
|
109
93
|
}
|
package/src/utils/index.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const schemaPatterns = {
|
|
4
|
+
email: z.email().max(100).min(1).toLowerCase().trim(),
|
|
5
|
+
password: z.string().min(10).max(100).trim(),
|
|
6
|
+
phoneNumber: z.string().min(7).max(20).trim(),
|
|
7
|
+
fullName: z.string().min(2).max(100).trim(),
|
|
8
|
+
pushToken: z.string().min(1).max(500).trim(),
|
|
9
|
+
tz: z.number().int().min(-10000).max(10000),
|
|
10
|
+
date: z.string().date(),
|
|
11
|
+
code: z.string().length(6).trim(),
|
|
12
|
+
methodId: z.string().min(1).max(500).trim(),
|
|
13
|
+
};
|