@sorokchat-messenger/contracts 1.0.4 → 1.0.5
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-user.schema.d.ts","sourceRoot":"","sources":["../../src/users/new-user.schema.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"new-user.schema.d.ts","sourceRoot":"","sources":["../../src/users/new-user.schema.ts"],"names":[],"mappings":"AACA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,aAAa;;;;iBAmBxB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { UserCodes } from "./codes.js";
|
|
2
2
|
import z from "zod";
|
|
3
|
-
import { extendZodWithOpenApi } from "@asteasolutions/zod-to-openapi";
|
|
4
|
-
extendZodWithOpenApi(z);
|
|
5
3
|
export const NewUserSchema = z.object({
|
|
6
4
|
login: z
|
|
7
5
|
.string()
|
|
8
6
|
.nonempty({ message: UserCodes.LOGIN.EMPTY })
|
|
9
|
-
.nonoptional({ message: UserCodes.LOGIN.UNDEFINED })
|
|
10
|
-
.openapi({
|
|
11
|
-
description: "Унікальне ім'я користувача",
|
|
12
|
-
example: "sorokovsky_andrey",
|
|
13
|
-
}),
|
|
7
|
+
.nonoptional({ message: UserCodes.LOGIN.UNDEFINED }),
|
|
14
8
|
password: z
|
|
15
9
|
.string()
|
|
16
10
|
.min(UserCodes.PASSWORD.MIN_LENGTH.VALUE, {
|
|
@@ -20,20 +14,10 @@ export const NewUserSchema = z.object({
|
|
|
20
14
|
message: UserCodes.PASSWORD.MAX_LENGTH.CODE,
|
|
21
15
|
})
|
|
22
16
|
.nonempty({ message: UserCodes.PASSWORD.EMPTY })
|
|
23
|
-
.nonoptional({ message: UserCodes.PASSWORD.UNDEFINED })
|
|
24
|
-
.openapi({
|
|
25
|
-
description: "Пароль користувача",
|
|
26
|
-
example: "<PASSWORD>",
|
|
27
|
-
minLength: UserCodes.PASSWORD.MIN_LENGTH.VALUE,
|
|
28
|
-
maxLength: UserCodes.PASSWORD.MAX_LENGTH.VALUE,
|
|
29
|
-
}),
|
|
17
|
+
.nonoptional({ message: UserCodes.PASSWORD.UNDEFINED }),
|
|
30
18
|
displayName: z
|
|
31
19
|
.string()
|
|
32
20
|
.nonempty({ message: UserCodes.DISPLAY_NAME.EMPTY })
|
|
33
|
-
.optional()
|
|
34
|
-
.openapi({
|
|
35
|
-
description: "Видиме ім'я користувача",
|
|
36
|
-
example: "Сороковський Андрій",
|
|
37
|
-
}),
|
|
21
|
+
.optional(),
|
|
38
22
|
});
|
|
39
23
|
//# sourceMappingURL=new-user.schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-user.schema.js","sourceRoot":"","sources":["../../src/users/new-user.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"new-user.schema.js","sourceRoot":"","sources":["../../src/users/new-user.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;SAC5C,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;IACtD,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,EAAE;QACxC,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI;KAC5C,CAAC;SACD,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,EAAE;QACxC,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI;KAC5C,CAAC;SACD,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;SAC/C,WAAW,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;IACzD,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;SACnD,QAAQ,EAAE;CACd,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sorokchat-messenger/contracts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Frontend and backend contracts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"frontend",
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
"build": "tsc"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@asteasolutions/zod-to-openapi": "^9.1.0",
|
|
41
40
|
"@sorokchat-messenger/core": "^1.0.0",
|
|
42
41
|
"prettier": "^3.9.6"
|
|
43
42
|
},
|