@gigapay-dev/contracts 1.2.7 → 1.2.9
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.
|
@@ -4,10 +4,11 @@ exports.UserCreateSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enums_1 = require("./enums");
|
|
6
6
|
exports.UserCreateSchema = zod_1.z.object({
|
|
7
|
-
username: zod_1.z.string(),
|
|
8
|
-
picture: zod_1.z.string(),
|
|
9
|
-
email: zod_1.z.string(),
|
|
10
|
-
password: zod_1.z.string(),
|
|
7
|
+
username: zod_1.z.string().nullable().optional(),
|
|
8
|
+
picture: zod_1.z.string().nullable().optional(),
|
|
9
|
+
email: zod_1.z.string().nullable().optional(),
|
|
10
|
+
password: zod_1.z.string().nullable().optional(),
|
|
11
|
+
isConfirmEmail: zod_1.z.boolean().optional(),
|
|
11
12
|
role: enums_1.UserRoleEnum,
|
|
12
13
|
status: enums_1.UserStatusEnum,
|
|
13
14
|
});
|
|
@@ -8,13 +8,14 @@ const zod_1 = __importDefault(require("zod"));
|
|
|
8
8
|
const enums_1 = require("./enums");
|
|
9
9
|
exports.UserReadResponseSchema = zod_1.default.object({
|
|
10
10
|
id: zod_1.default.coerce.number().positive(),
|
|
11
|
-
username: zod_1.default.string(),
|
|
12
|
-
picture: zod_1.default.string(),
|
|
13
|
-
email: zod_1.default.string(),
|
|
14
|
-
steamId: zod_1.default.string(),
|
|
15
|
-
telegramId: zod_1.default.string(),
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
username: zod_1.default.string().nullable(),
|
|
12
|
+
picture: zod_1.default.string().nullable(),
|
|
13
|
+
email: zod_1.default.string().nullable(),
|
|
14
|
+
steamId: zod_1.default.string().nullable(),
|
|
15
|
+
telegramId: zod_1.default.string().nullable(),
|
|
16
|
+
password: zod_1.default.string().nullable(),
|
|
17
|
+
vkId: zod_1.default.string().nullable(),
|
|
18
|
+
googleId: zod_1.default.string().nullable(),
|
|
18
19
|
createdAt: zod_1.default.coerce.date().nullable().optional(),
|
|
19
20
|
updatedAt: zod_1.default.coerce.date().nullable().optional(),
|
|
20
21
|
blockedAt: zod_1.default.coerce.date().nullable().optional(),
|
|
@@ -4,10 +4,11 @@ exports.UserUpdateSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const enums_1 = require("./enums");
|
|
6
6
|
exports.UserUpdateSchema = zod_1.z.object({
|
|
7
|
-
username: zod_1.z.string(),
|
|
8
|
-
picture: zod_1.z.string(),
|
|
9
|
-
email: zod_1.z.string(),
|
|
10
|
-
password: zod_1.z.string(),
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
username: zod_1.z.string().nullable().optional(),
|
|
8
|
+
picture: zod_1.z.string().nullable().optional(),
|
|
9
|
+
email: zod_1.z.string().nullable().optional(),
|
|
10
|
+
password: zod_1.z.string().nullable().optional(),
|
|
11
|
+
isConfirmEmail: zod_1.z.boolean().optional(),
|
|
12
|
+
role: enums_1.UserRoleEnum.optional(),
|
|
13
|
+
status: enums_1.UserStatusEnum.optional(),
|
|
13
14
|
});
|
package/commands/users/create.ts
CHANGED
|
@@ -2,10 +2,11 @@ import { z } from "zod";
|
|
|
2
2
|
import { UserRoleEnum, UserStatusEnum } from "./enums";
|
|
3
3
|
|
|
4
4
|
export const UserCreateSchema = z.object({
|
|
5
|
-
username: z.string(),
|
|
6
|
-
picture: z.string(),
|
|
7
|
-
email: z.string(),
|
|
8
|
-
password: z.string(),
|
|
5
|
+
username: z.string().nullable().optional(),
|
|
6
|
+
picture: z.string().nullable().optional(),
|
|
7
|
+
email: z.string().nullable().optional(),
|
|
8
|
+
password: z.string().nullable().optional(),
|
|
9
|
+
isConfirmEmail: z.boolean().optional(),
|
|
9
10
|
role: UserRoleEnum,
|
|
10
11
|
status: UserStatusEnum,
|
|
11
12
|
});
|
package/commands/users/read.ts
CHANGED
|
@@ -3,13 +3,14 @@ import { UserRoleEnum, UserStatusEnum } from "./enums";
|
|
|
3
3
|
|
|
4
4
|
export const UserReadResponseSchema = z.object({
|
|
5
5
|
id: z.coerce.number().positive(),
|
|
6
|
-
username: z.string(),
|
|
7
|
-
picture: z.string(),
|
|
8
|
-
email: z.string(),
|
|
9
|
-
steamId: z.string(),
|
|
10
|
-
telegramId: z.string(),
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
username: z.string().nullable(),
|
|
7
|
+
picture: z.string().nullable(),
|
|
8
|
+
email: z.string().nullable(),
|
|
9
|
+
steamId: z.string().nullable(),
|
|
10
|
+
telegramId: z.string().nullable(),
|
|
11
|
+
password: z.string().nullable(),
|
|
12
|
+
vkId: z.string().nullable(),
|
|
13
|
+
googleId: z.string().nullable(),
|
|
13
14
|
createdAt: z.coerce.date().nullable().optional(),
|
|
14
15
|
updatedAt: z.coerce.date().nullable().optional(),
|
|
15
16
|
blockedAt: z.coerce.date().nullable().optional(),
|
package/commands/users/update.ts
CHANGED
|
@@ -2,12 +2,13 @@ import { z } from "zod";
|
|
|
2
2
|
import { UserRoleEnum, UserStatusEnum } from "./enums";
|
|
3
3
|
|
|
4
4
|
export const UserUpdateSchema = z.object({
|
|
5
|
-
username: z.string(),
|
|
6
|
-
picture: z.string(),
|
|
7
|
-
email: z.string(),
|
|
8
|
-
password: z.string(),
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
username: z.string().nullable().optional(),
|
|
6
|
+
picture: z.string().nullable().optional(),
|
|
7
|
+
email: z.string().nullable().optional(),
|
|
8
|
+
password: z.string().nullable().optional(),
|
|
9
|
+
isConfirmEmail: z.boolean().optional(),
|
|
10
|
+
role: UserRoleEnum.optional(),
|
|
11
|
+
status: UserStatusEnum.optional(),
|
|
11
12
|
})
|
|
12
13
|
|
|
13
14
|
export type UserUpdate = z.infer<typeof UserUpdateSchema>;
|