@gigapay-dev/contracts 1.8.4 → 1.8.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.
Files changed (69) 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/orders/create.d.ts +95 -0
  12. package/build/commands/orders/endpoints.d.ts +726 -0
  13. package/build/commands/orders/enums.d.ts +7 -0
  14. package/build/commands/orders/index.d.ts +6 -0
  15. package/build/commands/orders/query.d.ts +103 -0
  16. package/build/commands/orders/read.d.ts +230 -0
  17. package/build/commands/orders/update.d.ts +23 -0
  18. package/build/commands/pagination.d.ts +12 -0
  19. package/build/commands/payment-methods/create.d.ts +45 -0
  20. package/build/commands/payment-methods/endpoints.d.ts +536 -0
  21. package/build/commands/payment-methods/index.d.ts +4 -0
  22. package/build/commands/payment-methods/read.d.ts +71 -0
  23. package/build/commands/payment-methods/update.d.ts +45 -0
  24. package/build/commands/products/create.d.ts +229 -0
  25. package/build/commands/products/endpoints.d.ts +1881 -0
  26. package/build/commands/products/enums.d.ts +19 -0
  27. package/build/commands/products/index.d.ts +6 -0
  28. package/build/commands/products/query.d.ts +79 -0
  29. package/build/commands/products/read.d.ts +1178 -0
  30. package/build/commands/products/read.js +56 -1
  31. package/build/commands/products/update.d.ts +78 -0
  32. package/build/commands/promocode-activations/create.d.ts +18 -0
  33. package/build/commands/promocode-activations/index.d.ts +3 -0
  34. package/build/commands/promocode-activations/read.d.ts +21 -0
  35. package/build/commands/promocode-activations/update.d.ts +18 -0
  36. package/build/commands/promocodes/create.d.ts +39 -0
  37. package/build/commands/promocodes/endpoints.d.ts +353 -0
  38. package/build/commands/promocodes/enums.d.ts +5 -0
  39. package/build/commands/promocodes/index.d.ts +5 -0
  40. package/build/commands/promocodes/read.d.ts +45 -0
  41. package/build/commands/promocodes/update.d.ts +33 -0
  42. package/build/commands/refresh-sessions/create.d.ts +24 -0
  43. package/build/commands/refresh-sessions/enums.d.ts +3 -0
  44. package/build/commands/refresh-sessions/index.d.ts +4 -0
  45. package/build/commands/refresh-sessions/read.d.ts +27 -0
  46. package/build/commands/refresh-sessions/update.d.ts +24 -0
  47. package/build/commands/settings/endpoints.d.ts +108 -0
  48. package/build/commands/settings/index.d.ts +3 -0
  49. package/build/commands/settings/read.d.ts +18 -0
  50. package/build/commands/settings/update.d.ts +18 -0
  51. package/build/commands/stats/endpoints.d.ts +67 -0
  52. package/build/commands/stats/index.d.ts +3 -0
  53. package/build/commands/stats/query.d.ts +31 -0
  54. package/build/commands/stats/read.d.ts +30 -0
  55. package/build/commands/users/create.d.ts +42 -0
  56. package/build/commands/users/endpoints.d.ts +403 -0
  57. package/build/commands/users/enums.d.ts +6 -0
  58. package/build/commands/users/index.d.ts +6 -0
  59. package/build/commands/users/query.d.ts +52 -0
  60. package/build/commands/users/read.d.ts +60 -0
  61. package/build/commands/users/update.d.ts +42 -0
  62. package/build/index.d.ts +1 -0
  63. package/build/types.d.ts +8 -0
  64. package/commands/products/read.ts +63 -0
  65. package/package.json +3 -2
  66. package/tsconfig.json +1 -1
  67. package/build/commands/status/endpoints.js +0 -33
  68. package/build/commands/status/index.js +0 -18
  69. package/build/commands/status/read.js +0 -12
@@ -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>;
@@ -0,0 +1,60 @@
1
+ import z from "zod";
2
+ export declare const UserReadResponseSchema: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ username: z.ZodNullable<z.ZodString>;
5
+ picture: z.ZodNullable<z.ZodString>;
6
+ email: z.ZodNullable<z.ZodString>;
7
+ steamId: z.ZodNullable<z.ZodString>;
8
+ telegramId: z.ZodNullable<z.ZodString>;
9
+ password: z.ZodNullable<z.ZodString>;
10
+ vkId: z.ZodNullable<z.ZodString>;
11
+ googleId: z.ZodNullable<z.ZodString>;
12
+ createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
13
+ updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
14
+ blockedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
15
+ ordersCount: z.ZodOptional<z.ZodNumber>;
16
+ ordersAmount: z.ZodOptional<z.ZodNumber>;
17
+ isConfirmEmail: z.ZodBoolean;
18
+ isOnline: z.ZodBoolean;
19
+ role: z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>;
20
+ status: z.ZodEnum<["ACTIVE", "BLOCKED"]>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ email: string | null;
23
+ password: string | null;
24
+ status: "ACTIVE" | "BLOCKED";
25
+ id: number;
26
+ username: string | null;
27
+ telegramId: string | null;
28
+ picture: string | null;
29
+ steamId: string | null;
30
+ vkId: string | null;
31
+ googleId: string | null;
32
+ isConfirmEmail: boolean;
33
+ role: "USER" | "ADMIN" | "NO_AUTH";
34
+ isOnline: boolean;
35
+ createdAt?: Date | null | undefined;
36
+ updatedAt?: Date | null | undefined;
37
+ blockedAt?: Date | null | undefined;
38
+ ordersCount?: number | undefined;
39
+ ordersAmount?: number | undefined;
40
+ }, {
41
+ email: string | null;
42
+ password: string | null;
43
+ status: "ACTIVE" | "BLOCKED";
44
+ id: number;
45
+ username: string | null;
46
+ telegramId: string | null;
47
+ picture: string | null;
48
+ steamId: string | null;
49
+ vkId: string | null;
50
+ googleId: string | null;
51
+ isConfirmEmail: boolean;
52
+ role: "USER" | "ADMIN" | "NO_AUTH";
53
+ isOnline: boolean;
54
+ createdAt?: Date | null | undefined;
55
+ updatedAt?: Date | null | undefined;
56
+ blockedAt?: Date | null | undefined;
57
+ ordersCount?: number | undefined;
58
+ ordersAmount?: number | undefined;
59
+ }>;
60
+ export type UserReadResponse = z.infer<typeof UserReadResponseSchema>;
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ export declare const UserUpdateSchema: z.ZodObject<{
3
+ username: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
+ picture: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
+ email: z.ZodOptional<z.ZodString>;
6
+ password: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ provider: z.ZodOptional<z.ZodEnum<["GOOGLE", "STEAM"]>>;
8
+ steamId: z.ZodOptional<z.ZodString>;
9
+ telegramId: z.ZodOptional<z.ZodString>;
10
+ vkId: z.ZodOptional<z.ZodString>;
11
+ googleId: z.ZodOptional<z.ZodString>;
12
+ isConfirmEmail: z.ZodOptional<z.ZodBoolean>;
13
+ role: z.ZodOptional<z.ZodEnum<["USER", "ADMIN", "NO_AUTH"]>>;
14
+ status: z.ZodOptional<z.ZodEnum<["ACTIVE", "BLOCKED"]>>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ email?: string | undefined;
17
+ password?: string | null | undefined;
18
+ status?: "ACTIVE" | "BLOCKED" | undefined;
19
+ username?: string | null | undefined;
20
+ telegramId?: string | undefined;
21
+ picture?: string | null | undefined;
22
+ steamId?: string | undefined;
23
+ vkId?: string | undefined;
24
+ googleId?: string | undefined;
25
+ isConfirmEmail?: boolean | undefined;
26
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
27
+ provider?: "GOOGLE" | "STEAM" | undefined;
28
+ }, {
29
+ email?: string | undefined;
30
+ password?: string | null | undefined;
31
+ status?: "ACTIVE" | "BLOCKED" | undefined;
32
+ username?: string | null | undefined;
33
+ telegramId?: string | undefined;
34
+ picture?: string | null | undefined;
35
+ steamId?: string | undefined;
36
+ vkId?: string | undefined;
37
+ googleId?: string | undefined;
38
+ isConfirmEmail?: boolean | undefined;
39
+ role?: "USER" | "ADMIN" | "NO_AUTH" | undefined;
40
+ provider?: "GOOGLE" | "STEAM" | undefined;
41
+ }>;
42
+ export type UserUpdate = z.infer<typeof UserUpdateSchema>;
@@ -0,0 +1 @@
1
+ export * from "./commands";
@@ -0,0 +1,8 @@
1
+ import z from "zod";
2
+ export type RequestMethods = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
3
+ export type EndpointContract = {
4
+ method: RequestMethods;
5
+ path: string;
6
+ request?: z.ZodTypeAny;
7
+ response?: z.ZodTypeAny;
8
+ };
@@ -187,6 +187,68 @@ export const KeysCountResponseSchema = z.object({
187
187
  total: z.number(),
188
188
  });
189
189
 
190
+ // === Парсинг Steam ===
191
+
192
+ /** Спарсенные системные требования */
193
+ const ParsedSystemRequirementsSchema = z.object({
194
+ os: z.string().optional(),
195
+ processor: z.string().optional(),
196
+ memory: z.string().optional(),
197
+ graphics: z.string().optional(),
198
+ storage: z.string().optional(),
199
+ directx: z.string().optional(),
200
+ network: z.string().optional(),
201
+ });
202
+
203
+ /** Данные игры из Steam Store API */
204
+ const SteamParsedDataSchema = z.object({
205
+ title: z.string(),
206
+ originalTitle: z.string().optional(),
207
+ description: z.string(),
208
+ shortDescription: z.string(),
209
+ coverImageUrl: z.string(),
210
+ developer: z.string().optional(),
211
+ publisher: z.string().optional(),
212
+ releaseDate: z.string().optional(),
213
+ steamAppId: z.number(),
214
+ steamRating: z.number().optional(),
215
+ hasMultiplayer: z.boolean(),
216
+ hasCoop: z.boolean(),
217
+ hasSinglePlayer: z.boolean(),
218
+ genres: z.array(z.string()),
219
+ screenshots: z.array(z.string()),
220
+ systemRequirements: z.object({
221
+ minimum: ParsedSystemRequirementsSchema.optional(),
222
+ recommended: ParsedSystemRequirementsSchema.optional(),
223
+ }),
224
+ });
225
+
226
+ /** Региональная цена из Dessly */
227
+ const DesslyRegionPriceSchema = z.object({
228
+ region: z.string(),
229
+ price: z.string(),
230
+ priceOriginal: z.string(),
231
+ discount: z.string(),
232
+ });
233
+
234
+ /** Издание игры из Dessly */
235
+ const DesslyEditionSchema = z.object({
236
+ edition: z.string(),
237
+ packageId: z.number(),
238
+ regions: z.array(DesslyRegionPriceSchema),
239
+ });
240
+
241
+ /** Данные из Dessly API */
242
+ const DesslyParsedDataSchema = z.object({
243
+ editions: z.array(DesslyEditionSchema),
244
+ });
245
+
246
+ /** Ответ парсинга игры по Steam App ID */
247
+ export const SteamParseResponseSchema = z.object({
248
+ steam: SteamParsedDataSchema.nullable(),
249
+ dessly: DesslyParsedDataSchema.nullable(),
250
+ });
251
+
190
252
  // === Type exports ===
191
253
 
192
254
  export type CategoryBrief = z.infer<typeof CategoryBriefSchema>;
@@ -203,3 +265,4 @@ export type SystemRequirementsResponse = z.infer<typeof SystemRequirementsRespon
203
265
  export type ProductCatalogResponse = z.infer<typeof ProductCatalogResponseSchema>;
204
266
  export type ProductDetailResponse = z.infer<typeof ProductDetailResponseSchema>;
205
267
  export type KeysCountResponse = z.infer<typeof KeysCountResponseSchema>;
268
+ export type SteamParseResponse = z.infer<typeof SteamParseResponseSchema>;
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@gigapay-dev/contracts",
3
- "version": "1.8.4",
3
+ "version": "1.8.6",
4
4
  "main": "./build/index.js",
5
- "scripts": {
5
+ "types": "./build/index.d.ts",
6
+ "scripts": {
6
7
  "test": "echo \"Error: no test specified\" && exit 1",
7
8
  "prepublish": "rm -r ./build && tsc"
8
9
  },