@gigapay-dev/contracts 1.8.3 → 1.8.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.
Files changed (82) hide show
  1. package/build/commands/api-response.d.ts +18 -0
  2. package/build/commands/auth/confirm.d.ts +11 -0
  3. package/build/commands/auth/endpoints.d.ts +114 -0
  4. package/build/commands/auth/index.d.ts +5 -0
  5. package/build/commands/auth/login.d.ts +20 -0
  6. package/build/commands/auth/profile.d.ts +18 -0
  7. package/build/commands/auth/register.d.ts +12 -0
  8. package/build/commands/auth/reset.d.ts +12 -0
  9. package/build/commands/consts.d.ts +1 -0
  10. package/build/commands/index.d.ts +13 -0
  11. package/build/commands/index.js +1 -0
  12. package/build/commands/orders/create.d.ts +95 -0
  13. package/build/commands/orders/endpoints.d.ts +726 -0
  14. package/build/commands/orders/enums.d.ts +7 -0
  15. package/build/commands/orders/index.d.ts +6 -0
  16. package/build/commands/orders/query.d.ts +103 -0
  17. package/build/commands/orders/read.d.ts +230 -0
  18. package/build/commands/orders/update.d.ts +23 -0
  19. package/build/commands/pagination.d.ts +12 -0
  20. package/build/commands/payment-methods/create.d.ts +45 -0
  21. package/build/commands/payment-methods/endpoints.d.ts +536 -0
  22. package/build/commands/payment-methods/index.d.ts +4 -0
  23. package/build/commands/payment-methods/read.d.ts +71 -0
  24. package/build/commands/payment-methods/update.d.ts +45 -0
  25. package/build/commands/products/create.d.ts +229 -0
  26. package/build/commands/products/create.js +122 -0
  27. package/build/commands/products/endpoints.d.ts +1881 -0
  28. package/build/commands/products/endpoints.js +99 -0
  29. package/build/commands/products/enums.d.ts +19 -0
  30. package/build/commands/products/enums.js +27 -0
  31. package/build/commands/products/index.d.ts +6 -0
  32. package/build/commands/{status → products}/index.js +4 -0
  33. package/build/commands/products/query.d.ts +79 -0
  34. package/build/commands/products/query.js +55 -0
  35. package/build/commands/products/read.d.ts +833 -0
  36. package/build/commands/products/read.js +176 -0
  37. package/build/commands/products/update.d.ts +78 -0
  38. package/build/commands/products/update.js +10 -0
  39. package/build/commands/promocode-activations/create.d.ts +18 -0
  40. package/build/commands/promocode-activations/index.d.ts +3 -0
  41. package/build/commands/promocode-activations/read.d.ts +21 -0
  42. package/build/commands/promocode-activations/update.d.ts +18 -0
  43. package/build/commands/promocodes/create.d.ts +39 -0
  44. package/build/commands/promocodes/endpoints.d.ts +353 -0
  45. package/build/commands/promocodes/enums.d.ts +5 -0
  46. package/build/commands/promocodes/index.d.ts +5 -0
  47. package/build/commands/promocodes/read.d.ts +45 -0
  48. package/build/commands/promocodes/update.d.ts +33 -0
  49. package/build/commands/refresh-sessions/create.d.ts +24 -0
  50. package/build/commands/refresh-sessions/enums.d.ts +3 -0
  51. package/build/commands/refresh-sessions/index.d.ts +4 -0
  52. package/build/commands/refresh-sessions/read.d.ts +27 -0
  53. package/build/commands/refresh-sessions/update.d.ts +24 -0
  54. package/build/commands/settings/endpoints.d.ts +108 -0
  55. package/build/commands/settings/index.d.ts +3 -0
  56. package/build/commands/settings/read.d.ts +18 -0
  57. package/build/commands/settings/update.d.ts +18 -0
  58. package/build/commands/stats/endpoints.d.ts +67 -0
  59. package/build/commands/stats/index.d.ts +3 -0
  60. package/build/commands/stats/query.d.ts +31 -0
  61. package/build/commands/stats/read.d.ts +30 -0
  62. package/build/commands/users/create.d.ts +42 -0
  63. package/build/commands/users/endpoints.d.ts +403 -0
  64. package/build/commands/users/enums.d.ts +6 -0
  65. package/build/commands/users/index.d.ts +6 -0
  66. package/build/commands/users/query.d.ts +52 -0
  67. package/build/commands/users/read.d.ts +60 -0
  68. package/build/commands/users/update.d.ts +42 -0
  69. package/build/index.d.ts +1 -0
  70. package/build/types.d.ts +8 -0
  71. package/commands/index.ts +2 -1
  72. package/commands/products/create.ts +134 -0
  73. package/commands/products/endpoints.ts +108 -0
  74. package/commands/products/enums.ts +33 -0
  75. package/commands/products/index.ts +6 -0
  76. package/commands/products/query.ts +52 -0
  77. package/commands/products/read.ts +205 -0
  78. package/commands/products/update.ts +11 -0
  79. package/package.json +3 -2
  80. package/tsconfig.json +1 -1
  81. package/build/commands/status/endpoints.js +0 -33
  82. package/build/commands/status/read.js +0 -12
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ export declare const SettingsUpdateRequestSchema: z.ZodObject<{
3
+ desslyDiscount: z.ZodOptional<z.ZodString>;
4
+ serviceEnabled: z.ZodOptional<z.ZodBoolean>;
5
+ worksEnabled: z.ZodOptional<z.ZodBoolean>;
6
+ paymentsEnabled: z.ZodOptional<z.ZodBoolean>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ desslyDiscount?: string | undefined;
9
+ serviceEnabled?: boolean | undefined;
10
+ worksEnabled?: boolean | undefined;
11
+ paymentsEnabled?: boolean | undefined;
12
+ }, {
13
+ desslyDiscount?: string | undefined;
14
+ serviceEnabled?: boolean | undefined;
15
+ worksEnabled?: boolean | undefined;
16
+ paymentsEnabled?: boolean | undefined;
17
+ }>;
18
+ export type SettingsUpdateRequest = z.infer<typeof SettingsUpdateRequestSchema>;
@@ -0,0 +1,67 @@
1
+ import { z } from "zod";
2
+ export declare const StatsEndpoints: {
3
+ list: {
4
+ method: "GET";
5
+ path: string;
6
+ request: z.ZodEffects<z.ZodEffects<z.ZodObject<{
7
+ period: z.ZodDefault<z.ZodEnum<["day", "week", "month", "year", "custom"]>>;
8
+ start: z.ZodOptional<z.ZodString>;
9
+ end: z.ZodOptional<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ period: "day" | "week" | "month" | "year" | "custom";
12
+ start?: string | undefined;
13
+ end?: string | undefined;
14
+ }, {
15
+ period?: "day" | "week" | "month" | "year" | "custom" | undefined;
16
+ start?: string | undefined;
17
+ end?: string | undefined;
18
+ }>, {
19
+ period: "day" | "week" | "month" | "year" | "custom";
20
+ start?: string | undefined;
21
+ end?: string | undefined;
22
+ }, {
23
+ period?: "day" | "week" | "month" | "year" | "custom" | undefined;
24
+ start?: string | undefined;
25
+ end?: string | undefined;
26
+ }>, {
27
+ period: "day" | "week" | "month" | "year" | "custom";
28
+ start?: string | undefined;
29
+ end?: string | undefined;
30
+ }, {
31
+ period?: "day" | "week" | "month" | "year" | "custom" | undefined;
32
+ start?: string | undefined;
33
+ end?: string | undefined;
34
+ }>;
35
+ response: z.ZodObject<{
36
+ usersCount: z.ZodNumber;
37
+ ordersCount: z.ZodNumber;
38
+ totalAmount: z.ZodNumber;
39
+ acquiringCommission: z.ZodNumber;
40
+ serviceCommission: z.ZodNumber;
41
+ totalAmountWithCommission: z.ZodNumber;
42
+ periodStart: z.ZodOptional<z.ZodString>;
43
+ periodEnd: z.ZodOptional<z.ZodString>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ serviceCommission: number;
46
+ ordersCount: number;
47
+ usersCount: number;
48
+ totalAmount: number;
49
+ acquiringCommission: number;
50
+ totalAmountWithCommission: number;
51
+ periodStart?: string | undefined;
52
+ periodEnd?: string | undefined;
53
+ }, {
54
+ serviceCommission: number;
55
+ ordersCount: number;
56
+ usersCount: number;
57
+ totalAmount: number;
58
+ acquiringCommission: number;
59
+ totalAmountWithCommission: number;
60
+ periodStart?: string | undefined;
61
+ periodEnd?: string | undefined;
62
+ }>;
63
+ };
64
+ };
65
+ export type StatsEndpointKey = keyof typeof StatsEndpoints;
66
+ export type GetStatsRequest<K extends StatsEndpointKey> = z.infer<typeof StatsEndpoints[K]["request"]>;
67
+ export type GetStatsResponse<K extends StatsEndpointKey> = z.infer<typeof StatsEndpoints[K]["response"]>;
@@ -0,0 +1,3 @@
1
+ export * from "./read";
2
+ export * from "./query";
3
+ export * from "./endpoints";
@@ -0,0 +1,31 @@
1
+ import z from "zod";
2
+ export declare const StatsReadRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
3
+ period: z.ZodDefault<z.ZodEnum<["day", "week", "month", "year", "custom"]>>;
4
+ start: z.ZodOptional<z.ZodString>;
5
+ end: z.ZodOptional<z.ZodString>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ period: "day" | "week" | "month" | "year" | "custom";
8
+ start?: string | undefined;
9
+ end?: string | undefined;
10
+ }, {
11
+ period?: "day" | "week" | "month" | "year" | "custom" | undefined;
12
+ start?: string | undefined;
13
+ end?: string | undefined;
14
+ }>, {
15
+ period: "day" | "week" | "month" | "year" | "custom";
16
+ start?: string | undefined;
17
+ end?: string | undefined;
18
+ }, {
19
+ period?: "day" | "week" | "month" | "year" | "custom" | undefined;
20
+ start?: string | undefined;
21
+ end?: string | undefined;
22
+ }>, {
23
+ period: "day" | "week" | "month" | "year" | "custom";
24
+ start?: string | undefined;
25
+ end?: string | undefined;
26
+ }, {
27
+ period?: "day" | "week" | "month" | "year" | "custom" | undefined;
28
+ start?: string | undefined;
29
+ end?: string | undefined;
30
+ }>;
31
+ export type StatsReadRequest = z.infer<typeof StatsReadRequestSchema>;
@@ -0,0 +1,30 @@
1
+ import z from "zod";
2
+ export declare const StatsReadResponseSchema: z.ZodObject<{
3
+ usersCount: z.ZodNumber;
4
+ ordersCount: z.ZodNumber;
5
+ totalAmount: z.ZodNumber;
6
+ acquiringCommission: z.ZodNumber;
7
+ serviceCommission: z.ZodNumber;
8
+ totalAmountWithCommission: z.ZodNumber;
9
+ periodStart: z.ZodOptional<z.ZodString>;
10
+ periodEnd: z.ZodOptional<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ serviceCommission: number;
13
+ ordersCount: number;
14
+ usersCount: number;
15
+ totalAmount: number;
16
+ acquiringCommission: number;
17
+ totalAmountWithCommission: number;
18
+ periodStart?: string | undefined;
19
+ periodEnd?: string | undefined;
20
+ }, {
21
+ serviceCommission: number;
22
+ ordersCount: number;
23
+ usersCount: number;
24
+ totalAmount: number;
25
+ acquiringCommission: number;
26
+ totalAmountWithCommission: number;
27
+ periodStart?: string | undefined;
28
+ periodEnd?: string | undefined;
29
+ }>;
30
+ export type StatsReadResponse = z.infer<typeof StatsReadResponseSchema>;
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ export declare const UserCreateSchema: z.ZodObject<{
3
+ username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
+ picture: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ email: z.ZodString;
6
+ password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ steamId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
+ telegramId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
+ vkId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ googleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ isConfirmEmail: z.ZodOptional<z.ZodBoolean>;
12
+ role: z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>;
13
+ status: z.ZodEnum<["ACTIVE", "BLOCKED"]>;
14
+ utmSource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ email: string;
17
+ status: "ACTIVE" | "BLOCKED";
18
+ role: "USER" | "ADMIN" | "NO_AUTH";
19
+ password?: string | null | undefined;
20
+ username?: string | null | undefined;
21
+ telegramId?: string | null | undefined;
22
+ utmSource?: string | null | undefined;
23
+ picture?: string | null | undefined;
24
+ steamId?: string | null | undefined;
25
+ vkId?: string | null | undefined;
26
+ googleId?: string | null | undefined;
27
+ isConfirmEmail?: boolean | undefined;
28
+ }, {
29
+ email: string;
30
+ status: "ACTIVE" | "BLOCKED";
31
+ role: "USER" | "ADMIN" | "NO_AUTH";
32
+ password?: string | null | undefined;
33
+ username?: string | null | undefined;
34
+ telegramId?: string | null | undefined;
35
+ utmSource?: string | null | undefined;
36
+ picture?: string | null | undefined;
37
+ steamId?: string | null | undefined;
38
+ vkId?: string | null | undefined;
39
+ googleId?: string | null | undefined;
40
+ isConfirmEmail?: boolean | undefined;
41
+ }>;
42
+ export type UserCreate = z.infer<typeof UserCreateSchema>;
@@ -0,0 +1,403 @@
1
+ import { z } from "zod";
2
+ export declare const UserEndpoints: {
3
+ create: {
4
+ method: "POST";
5
+ path: string;
6
+ request: z.ZodObject<{
7
+ username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
+ picture: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
+ email: z.ZodString;
10
+ password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ steamId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ telegramId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
+ vkId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ googleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ isConfirmEmail: z.ZodOptional<z.ZodBoolean>;
16
+ role: z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>;
17
+ status: z.ZodEnum<["ACTIVE", "BLOCKED"]>;
18
+ utmSource: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ email: string;
21
+ status: "ACTIVE" | "BLOCKED";
22
+ role: "USER" | "ADMIN" | "NO_AUTH";
23
+ password?: string | null | undefined;
24
+ username?: string | null | undefined;
25
+ telegramId?: string | null | undefined;
26
+ utmSource?: string | null | undefined;
27
+ picture?: string | null | undefined;
28
+ steamId?: string | null | undefined;
29
+ vkId?: string | null | undefined;
30
+ googleId?: string | null | undefined;
31
+ isConfirmEmail?: boolean | undefined;
32
+ }, {
33
+ email: string;
34
+ status: "ACTIVE" | "BLOCKED";
35
+ role: "USER" | "ADMIN" | "NO_AUTH";
36
+ password?: string | null | undefined;
37
+ username?: string | null | undefined;
38
+ telegramId?: string | null | undefined;
39
+ utmSource?: string | null | undefined;
40
+ picture?: string | null | undefined;
41
+ steamId?: string | null | undefined;
42
+ vkId?: string | null | undefined;
43
+ googleId?: string | null | undefined;
44
+ isConfirmEmail?: boolean | undefined;
45
+ }>;
46
+ response: z.ZodObject<{
47
+ id: z.ZodNumber;
48
+ username: z.ZodNullable<z.ZodString>;
49
+ picture: z.ZodNullable<z.ZodString>;
50
+ email: z.ZodNullable<z.ZodString>;
51
+ steamId: z.ZodNullable<z.ZodString>;
52
+ telegramId: z.ZodNullable<z.ZodString>;
53
+ password: z.ZodNullable<z.ZodString>;
54
+ vkId: z.ZodNullable<z.ZodString>;
55
+ googleId: z.ZodNullable<z.ZodString>;
56
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
57
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
58
+ blockedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
59
+ ordersCount: z.ZodOptional<z.ZodNumber>;
60
+ ordersAmount: z.ZodOptional<z.ZodNumber>;
61
+ isConfirmEmail: z.ZodBoolean;
62
+ isOnline: z.ZodBoolean;
63
+ role: z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>;
64
+ status: z.ZodEnum<["ACTIVE", "BLOCKED"]>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ email: string | null;
67
+ password: string | null;
68
+ status: "ACTIVE" | "BLOCKED";
69
+ id: number;
70
+ username: string | null;
71
+ telegramId: string | null;
72
+ picture: string | null;
73
+ steamId: string | null;
74
+ vkId: string | null;
75
+ googleId: string | null;
76
+ isConfirmEmail: boolean;
77
+ role: "USER" | "ADMIN" | "NO_AUTH";
78
+ isOnline: boolean;
79
+ createdAt?: Date | null | undefined;
80
+ updatedAt?: Date | null | undefined;
81
+ blockedAt?: Date | null | undefined;
82
+ ordersCount?: number | undefined;
83
+ ordersAmount?: number | undefined;
84
+ }, {
85
+ email: string | null;
86
+ password: string | null;
87
+ status: "ACTIVE" | "BLOCKED";
88
+ id: number;
89
+ username: string | null;
90
+ telegramId: string | null;
91
+ picture: string | null;
92
+ steamId: string | null;
93
+ vkId: string | null;
94
+ googleId: string | null;
95
+ isConfirmEmail: boolean;
96
+ role: "USER" | "ADMIN" | "NO_AUTH";
97
+ isOnline: boolean;
98
+ createdAt?: Date | null | undefined;
99
+ updatedAt?: Date | null | undefined;
100
+ blockedAt?: Date | null | undefined;
101
+ ordersCount?: number | undefined;
102
+ ordersAmount?: number | undefined;
103
+ }>;
104
+ };
105
+ list: {
106
+ method: "GET";
107
+ path: string;
108
+ request: z.ZodObject<{
109
+ take: z.ZodOptional<z.ZodString>;
110
+ skip: z.ZodOptional<z.ZodString>;
111
+ } & {
112
+ email: z.ZodOptional<z.ZodString>;
113
+ id: z.ZodOptional<z.ZodNumber>;
114
+ role: z.ZodOptional<z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>>;
115
+ } & {
116
+ sortBy: z.ZodDefault<z.ZodString>;
117
+ sortDir: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
118
+ }, "strip", z.ZodTypeAny, {
119
+ sortBy: string;
120
+ sortDir: "asc" | "desc";
121
+ email?: string | undefined;
122
+ id?: number | undefined;
123
+ take?: string | undefined;
124
+ skip?: string | undefined;
125
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
126
+ }, {
127
+ email?: string | undefined;
128
+ id?: number | undefined;
129
+ take?: string | undefined;
130
+ skip?: string | undefined;
131
+ sortBy?: string | undefined;
132
+ sortDir?: "asc" | "desc" | undefined;
133
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
134
+ }>;
135
+ response: z.ZodArray<z.ZodObject<{
136
+ id: z.ZodNumber;
137
+ username: z.ZodNullable<z.ZodString>;
138
+ picture: z.ZodNullable<z.ZodString>;
139
+ email: z.ZodNullable<z.ZodString>;
140
+ steamId: z.ZodNullable<z.ZodString>;
141
+ telegramId: z.ZodNullable<z.ZodString>;
142
+ password: z.ZodNullable<z.ZodString>;
143
+ vkId: z.ZodNullable<z.ZodString>;
144
+ googleId: z.ZodNullable<z.ZodString>;
145
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
146
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
147
+ blockedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
148
+ ordersCount: z.ZodOptional<z.ZodNumber>;
149
+ ordersAmount: z.ZodOptional<z.ZodNumber>;
150
+ isConfirmEmail: z.ZodBoolean;
151
+ isOnline: z.ZodBoolean;
152
+ role: z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>;
153
+ status: z.ZodEnum<["ACTIVE", "BLOCKED"]>;
154
+ }, "strip", z.ZodTypeAny, {
155
+ email: string | null;
156
+ password: string | null;
157
+ status: "ACTIVE" | "BLOCKED";
158
+ id: number;
159
+ username: string | null;
160
+ telegramId: string | null;
161
+ picture: string | null;
162
+ steamId: string | null;
163
+ vkId: string | null;
164
+ googleId: string | null;
165
+ isConfirmEmail: boolean;
166
+ role: "USER" | "ADMIN" | "NO_AUTH";
167
+ isOnline: boolean;
168
+ createdAt?: Date | null | undefined;
169
+ updatedAt?: Date | null | undefined;
170
+ blockedAt?: Date | null | undefined;
171
+ ordersCount?: number | undefined;
172
+ ordersAmount?: number | undefined;
173
+ }, {
174
+ email: string | null;
175
+ password: string | null;
176
+ status: "ACTIVE" | "BLOCKED";
177
+ id: number;
178
+ username: string | null;
179
+ telegramId: string | null;
180
+ picture: string | null;
181
+ steamId: string | null;
182
+ vkId: string | null;
183
+ googleId: string | null;
184
+ isConfirmEmail: boolean;
185
+ role: "USER" | "ADMIN" | "NO_AUTH";
186
+ isOnline: boolean;
187
+ createdAt?: Date | null | undefined;
188
+ updatedAt?: Date | null | undefined;
189
+ blockedAt?: Date | null | undefined;
190
+ ordersCount?: number | undefined;
191
+ ordersAmount?: number | undefined;
192
+ }>, "many">;
193
+ };
194
+ getById: {
195
+ method: "GET";
196
+ path: string;
197
+ request: z.ZodObject<{
198
+ id: z.ZodNumber;
199
+ }, "strip", z.ZodTypeAny, {
200
+ id: number;
201
+ }, {
202
+ id: number;
203
+ }>;
204
+ response: z.ZodObject<{
205
+ id: z.ZodNumber;
206
+ username: z.ZodNullable<z.ZodString>;
207
+ picture: z.ZodNullable<z.ZodString>;
208
+ email: z.ZodNullable<z.ZodString>;
209
+ steamId: z.ZodNullable<z.ZodString>;
210
+ telegramId: z.ZodNullable<z.ZodString>;
211
+ password: z.ZodNullable<z.ZodString>;
212
+ vkId: z.ZodNullable<z.ZodString>;
213
+ googleId: z.ZodNullable<z.ZodString>;
214
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
215
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
216
+ blockedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
217
+ ordersCount: z.ZodOptional<z.ZodNumber>;
218
+ ordersAmount: z.ZodOptional<z.ZodNumber>;
219
+ isConfirmEmail: z.ZodBoolean;
220
+ isOnline: z.ZodBoolean;
221
+ role: z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>;
222
+ status: z.ZodEnum<["ACTIVE", "BLOCKED"]>;
223
+ }, "strip", z.ZodTypeAny, {
224
+ email: string | null;
225
+ password: string | null;
226
+ status: "ACTIVE" | "BLOCKED";
227
+ id: number;
228
+ username: string | null;
229
+ telegramId: string | null;
230
+ picture: string | null;
231
+ steamId: string | null;
232
+ vkId: string | null;
233
+ googleId: string | null;
234
+ isConfirmEmail: boolean;
235
+ role: "USER" | "ADMIN" | "NO_AUTH";
236
+ isOnline: boolean;
237
+ createdAt?: Date | null | undefined;
238
+ updatedAt?: Date | null | undefined;
239
+ blockedAt?: Date | null | undefined;
240
+ ordersCount?: number | undefined;
241
+ ordersAmount?: number | undefined;
242
+ }, {
243
+ email: string | null;
244
+ password: string | null;
245
+ status: "ACTIVE" | "BLOCKED";
246
+ id: number;
247
+ username: string | null;
248
+ telegramId: string | null;
249
+ picture: string | null;
250
+ steamId: string | null;
251
+ vkId: string | null;
252
+ googleId: string | null;
253
+ isConfirmEmail: boolean;
254
+ role: "USER" | "ADMIN" | "NO_AUTH";
255
+ isOnline: boolean;
256
+ createdAt?: Date | null | undefined;
257
+ updatedAt?: Date | null | undefined;
258
+ blockedAt?: Date | null | undefined;
259
+ ordersCount?: number | undefined;
260
+ ordersAmount?: number | undefined;
261
+ }>;
262
+ };
263
+ update: {
264
+ method: "PATCH";
265
+ path: string;
266
+ request: z.ZodObject<{
267
+ id: z.ZodNumber;
268
+ body: z.ZodObject<{
269
+ username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
270
+ picture: z.ZodOptional<z.ZodNullable<z.ZodString>>;
271
+ email: z.ZodOptional<z.ZodString>;
272
+ password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
273
+ provider: z.ZodOptional<z.ZodEnum<["GOOGLE", "STEAM"]>>;
274
+ steamId: z.ZodOptional<z.ZodString>;
275
+ telegramId: z.ZodOptional<z.ZodString>;
276
+ vkId: z.ZodOptional<z.ZodString>;
277
+ googleId: z.ZodOptional<z.ZodString>;
278
+ isConfirmEmail: z.ZodOptional<z.ZodBoolean>;
279
+ role: z.ZodOptional<z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>>;
280
+ status: z.ZodOptional<z.ZodEnum<["ACTIVE", "BLOCKED"]>>;
281
+ }, "strip", z.ZodTypeAny, {
282
+ email?: string | undefined;
283
+ password?: string | null | undefined;
284
+ status?: "ACTIVE" | "BLOCKED" | undefined;
285
+ username?: string | null | undefined;
286
+ telegramId?: string | undefined;
287
+ picture?: string | null | undefined;
288
+ steamId?: string | undefined;
289
+ vkId?: string | undefined;
290
+ googleId?: string | undefined;
291
+ isConfirmEmail?: boolean | undefined;
292
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
293
+ provider?: "GOOGLE" | "STEAM" | undefined;
294
+ }, {
295
+ email?: string | undefined;
296
+ password?: string | null | undefined;
297
+ status?: "ACTIVE" | "BLOCKED" | undefined;
298
+ username?: string | null | undefined;
299
+ telegramId?: string | undefined;
300
+ picture?: string | null | undefined;
301
+ steamId?: string | undefined;
302
+ vkId?: string | undefined;
303
+ googleId?: string | undefined;
304
+ isConfirmEmail?: boolean | undefined;
305
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
306
+ provider?: "GOOGLE" | "STEAM" | undefined;
307
+ }>;
308
+ }, "strip", z.ZodTypeAny, {
309
+ id: number;
310
+ body: {
311
+ email?: string | undefined;
312
+ password?: string | null | undefined;
313
+ status?: "ACTIVE" | "BLOCKED" | undefined;
314
+ username?: string | null | undefined;
315
+ telegramId?: string | undefined;
316
+ picture?: string | null | undefined;
317
+ steamId?: string | undefined;
318
+ vkId?: string | undefined;
319
+ googleId?: string | undefined;
320
+ isConfirmEmail?: boolean | undefined;
321
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
322
+ provider?: "GOOGLE" | "STEAM" | undefined;
323
+ };
324
+ }, {
325
+ id: number;
326
+ body: {
327
+ email?: string | undefined;
328
+ password?: string | null | undefined;
329
+ status?: "ACTIVE" | "BLOCKED" | undefined;
330
+ username?: string | null | undefined;
331
+ telegramId?: string | undefined;
332
+ picture?: string | null | undefined;
333
+ steamId?: string | undefined;
334
+ vkId?: string | undefined;
335
+ googleId?: string | undefined;
336
+ isConfirmEmail?: boolean | undefined;
337
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
338
+ provider?: "GOOGLE" | "STEAM" | undefined;
339
+ };
340
+ }>;
341
+ response: z.ZodObject<{
342
+ id: z.ZodNumber;
343
+ username: z.ZodNullable<z.ZodString>;
344
+ picture: z.ZodNullable<z.ZodString>;
345
+ email: z.ZodNullable<z.ZodString>;
346
+ steamId: z.ZodNullable<z.ZodString>;
347
+ telegramId: z.ZodNullable<z.ZodString>;
348
+ password: z.ZodNullable<z.ZodString>;
349
+ vkId: z.ZodNullable<z.ZodString>;
350
+ googleId: z.ZodNullable<z.ZodString>;
351
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
352
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
353
+ blockedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
354
+ ordersCount: z.ZodOptional<z.ZodNumber>;
355
+ ordersAmount: z.ZodOptional<z.ZodNumber>;
356
+ isConfirmEmail: z.ZodBoolean;
357
+ isOnline: z.ZodBoolean;
358
+ role: z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>;
359
+ status: z.ZodEnum<["ACTIVE", "BLOCKED"]>;
360
+ }, "strip", z.ZodTypeAny, {
361
+ email: string | null;
362
+ password: string | null;
363
+ status: "ACTIVE" | "BLOCKED";
364
+ id: number;
365
+ username: string | null;
366
+ telegramId: string | null;
367
+ picture: string | null;
368
+ steamId: string | null;
369
+ vkId: string | null;
370
+ googleId: string | null;
371
+ isConfirmEmail: boolean;
372
+ role: "USER" | "ADMIN" | "NO_AUTH";
373
+ isOnline: boolean;
374
+ createdAt?: Date | null | undefined;
375
+ updatedAt?: Date | null | undefined;
376
+ blockedAt?: Date | null | undefined;
377
+ ordersCount?: number | undefined;
378
+ ordersAmount?: number | undefined;
379
+ }, {
380
+ email: string | null;
381
+ password: string | null;
382
+ status: "ACTIVE" | "BLOCKED";
383
+ id: number;
384
+ username: string | null;
385
+ telegramId: string | null;
386
+ picture: string | null;
387
+ steamId: string | null;
388
+ vkId: string | null;
389
+ googleId: string | null;
390
+ isConfirmEmail: boolean;
391
+ role: "USER" | "ADMIN" | "NO_AUTH";
392
+ isOnline: boolean;
393
+ createdAt?: Date | null | undefined;
394
+ updatedAt?: Date | null | undefined;
395
+ blockedAt?: Date | null | undefined;
396
+ ordersCount?: number | undefined;
397
+ ordersAmount?: number | undefined;
398
+ }>;
399
+ };
400
+ };
401
+ export type UserEndpointKey = keyof typeof UserEndpoints;
402
+ export type GetUserRequest<K extends UserEndpointKey> = z.infer<typeof UserEndpoints[K]["request"]>;
403
+ export type GetUserResponse<K extends UserEndpointKey> = z.infer<typeof UserEndpoints[K]["response"]>;
@@ -0,0 +1,6 @@
1
+ import z from "zod";
2
+ export declare const UserRoleEnum: z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>;
3
+ export declare const UserStatusEnum: z.ZodEnum<["ACTIVE", "BLOCKED"]>;
4
+ export declare const SocialProviderEnum: z.ZodEnum<["GOOGLE", "STEAM"]>;
5
+ export type UserRoleType = z.infer<typeof UserRoleEnum>;
6
+ export type UserStatusType = z.infer<typeof UserStatusEnum>;
@@ -0,0 +1,6 @@
1
+ export * from "./create";
2
+ export * from "./read";
3
+ export * from "./update";
4
+ export * from "./query";
5
+ export * from "./enums";
6
+ export * from "./endpoints";
@@ -0,0 +1,52 @@
1
+ import z from "zod";
2
+ export declare const UsersFiltersSchema: z.ZodObject<{
3
+ email: z.ZodOptional<z.ZodString>;
4
+ id: z.ZodOptional<z.ZodNumber>;
5
+ role: z.ZodOptional<z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ email?: string | undefined;
8
+ id?: number | undefined;
9
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
10
+ }, {
11
+ email?: string | undefined;
12
+ id?: number | undefined;
13
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
14
+ }>;
15
+ export declare const UsersSortSchema: z.ZodObject<{
16
+ sortBy: z.ZodDefault<z.ZodString>;
17
+ sortDir: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ sortBy: string;
20
+ sortDir: "asc" | "desc";
21
+ }, {
22
+ sortBy?: string | undefined;
23
+ sortDir?: "asc" | "desc" | undefined;
24
+ }>;
25
+ export declare const UsersListQuerySchema: z.ZodObject<{
26
+ take: z.ZodOptional<z.ZodString>;
27
+ skip: z.ZodOptional<z.ZodString>;
28
+ } & {
29
+ email: z.ZodOptional<z.ZodString>;
30
+ id: z.ZodOptional<z.ZodNumber>;
31
+ role: z.ZodOptional<z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>>;
32
+ } & {
33
+ sortBy: z.ZodDefault<z.ZodString>;
34
+ sortDir: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ sortBy: string;
37
+ sortDir: "asc" | "desc";
38
+ email?: string | undefined;
39
+ id?: number | undefined;
40
+ take?: string | undefined;
41
+ skip?: string | undefined;
42
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
43
+ }, {
44
+ email?: string | undefined;
45
+ id?: number | undefined;
46
+ take?: string | undefined;
47
+ skip?: string | undefined;
48
+ sortBy?: string | undefined;
49
+ sortDir?: "asc" | "desc" | undefined;
50
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
51
+ }>;
52
+ export type UsersListQuery = z.infer<typeof UsersListQuerySchema>;