@sorokchat-messenger/contracts 1.0.4 → 1.0.6
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/authorization/login.schema.d.ts.map +1 -1
- package/dist/authorization/login.schema.js +1 -1
- package/dist/authorization/login.schema.js.map +1 -1
- package/dist/authorization/register.schema.d.ts.map +1 -1
- package/dist/authorization/register.schema.js +1 -1
- package/dist/authorization/register.schema.js.map +1 -1
- package/dist/users/new-user.schema.d.ts.map +1 -1
- package/dist/users/new-user.schema.js +7 -18
- package/dist/users/new-user.schema.js.map +1 -1
- package/package.json +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.schema.d.ts","sourceRoot":"","sources":["../../src/authorization/login.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,eAAO,MAAM,WAAW;;;
|
|
1
|
+
{"version":3,"file":"login.schema.d.ts","sourceRoot":"","sources":["../../src/authorization/login.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,eAAO,MAAM,WAAW;;;iBAGM,CAAC;AAC/B,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.schema.js","sourceRoot":"","sources":["../../src/authorization/login.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC;IAC5C,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"login.schema.js","sourceRoot":"","sources":["../../src/authorization/login.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC;IAC5C,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.schema.d.ts","sourceRoot":"","sources":["../../src/authorization/register.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,eAAO,MAAM,cAAc;;;;
|
|
1
|
+
{"version":3,"file":"register.schema.d.ts","sourceRoot":"","sources":["../../src/authorization/register.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,eAAO,MAAM,cAAc;;;;iBAIM,CAAC;AAClC,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.schema.js","sourceRoot":"","sources":["../../src/authorization/register.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,IAAI,CAAC;IAC/C,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,IAAI;CAClB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"register.schema.js","sourceRoot":"","sources":["../../src/authorization/register.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,IAAI,CAAC;IAC/C,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,IAAI;CAClB,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC"}
|
|
@@ -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;;;;iBAwBM,CAAC;AACjC,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { UserCodes } from "./codes.js";
|
|
2
2
|
import z from "zod";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export const NewUserSchema = z.object({
|
|
3
|
+
export const NewUserSchema = z
|
|
4
|
+
.object({
|
|
6
5
|
login: z
|
|
7
6
|
.string()
|
|
8
7
|
.nonempty({ message: UserCodes.LOGIN.EMPTY })
|
|
9
8
|
.nonoptional({ message: UserCodes.LOGIN.UNDEFINED })
|
|
10
|
-
.
|
|
11
|
-
description: "Унікальне ім'я користувача",
|
|
12
|
-
example: "sorokovsky_andrey",
|
|
13
|
-
}),
|
|
9
|
+
.meta({ example: "andrey_sorokovsky" }),
|
|
14
10
|
password: z
|
|
15
11
|
.string()
|
|
16
12
|
.min(UserCodes.PASSWORD.MIN_LENGTH.VALUE, {
|
|
@@ -21,19 +17,12 @@ export const NewUserSchema = z.object({
|
|
|
21
17
|
})
|
|
22
18
|
.nonempty({ message: UserCodes.PASSWORD.EMPTY })
|
|
23
19
|
.nonoptional({ message: UserCodes.PASSWORD.UNDEFINED })
|
|
24
|
-
.
|
|
25
|
-
description: "Пароль користувача",
|
|
26
|
-
example: "<PASSWORD>",
|
|
27
|
-
minLength: UserCodes.PASSWORD.MIN_LENGTH.VALUE,
|
|
28
|
-
maxLength: UserCodes.PASSWORD.MAX_LENGTH.VALUE,
|
|
29
|
-
}),
|
|
20
|
+
.meta({ example: "<PASSWORD>" }),
|
|
30
21
|
displayName: z
|
|
31
22
|
.string()
|
|
32
23
|
.nonempty({ message: UserCodes.DISPLAY_NAME.EMPTY })
|
|
33
24
|
.optional()
|
|
34
|
-
.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}),
|
|
38
|
-
});
|
|
25
|
+
.meta({ example: "Сороковський Андрій" }),
|
|
26
|
+
})
|
|
27
|
+
.meta({ id: "NewUserSchema" });
|
|
39
28
|
//# 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;KAC3B,MAAM,CAAC;IACN,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;SACnD,IAAI,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC;IACzC,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;SACtD,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC;IAClC,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;SACnD,QAAQ,EAAE;SACV,IAAI,CAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC;CAC5C,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,eAAe,EAAE,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.6",
|
|
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
|
},
|