@gigapay-dev/contracts 1.8.4 → 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 (67) 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 +833 -0
  30. package/build/commands/products/update.d.ts +78 -0
  31. package/build/commands/promocode-activations/create.d.ts +18 -0
  32. package/build/commands/promocode-activations/index.d.ts +3 -0
  33. package/build/commands/promocode-activations/read.d.ts +21 -0
  34. package/build/commands/promocode-activations/update.d.ts +18 -0
  35. package/build/commands/promocodes/create.d.ts +39 -0
  36. package/build/commands/promocodes/endpoints.d.ts +353 -0
  37. package/build/commands/promocodes/enums.d.ts +5 -0
  38. package/build/commands/promocodes/index.d.ts +5 -0
  39. package/build/commands/promocodes/read.d.ts +45 -0
  40. package/build/commands/promocodes/update.d.ts +33 -0
  41. package/build/commands/refresh-sessions/create.d.ts +24 -0
  42. package/build/commands/refresh-sessions/enums.d.ts +3 -0
  43. package/build/commands/refresh-sessions/index.d.ts +4 -0
  44. package/build/commands/refresh-sessions/read.d.ts +27 -0
  45. package/build/commands/refresh-sessions/update.d.ts +24 -0
  46. package/build/commands/settings/endpoints.d.ts +108 -0
  47. package/build/commands/settings/index.d.ts +3 -0
  48. package/build/commands/settings/read.d.ts +18 -0
  49. package/build/commands/settings/update.d.ts +18 -0
  50. package/build/commands/stats/endpoints.d.ts +67 -0
  51. package/build/commands/stats/index.d.ts +3 -0
  52. package/build/commands/stats/query.d.ts +31 -0
  53. package/build/commands/stats/read.d.ts +30 -0
  54. package/build/commands/users/create.d.ts +42 -0
  55. package/build/commands/users/endpoints.d.ts +403 -0
  56. package/build/commands/users/enums.d.ts +6 -0
  57. package/build/commands/users/index.d.ts +6 -0
  58. package/build/commands/users/query.d.ts +52 -0
  59. package/build/commands/users/read.d.ts +60 -0
  60. package/build/commands/users/update.d.ts +42 -0
  61. package/build/index.d.ts +1 -0
  62. package/build/types.d.ts +8 -0
  63. package/package.json +3 -2
  64. package/tsconfig.json +1 -1
  65. package/build/commands/status/endpoints.js +0 -33
  66. package/build/commands/status/index.js +0 -18
  67. package/build/commands/status/read.js +0 -12
@@ -0,0 +1,726 @@
1
+ import z from "zod";
2
+ export declare const OrderEndpoints: {
3
+ create: {
4
+ method: "POST";
5
+ path: string;
6
+ request: z.ZodObject<{
7
+ email: z.ZodString;
8
+ paymentMethodId: z.ZodNumber;
9
+ items: z.ZodArray<z.ZodObject<{
10
+ variantId: z.ZodNumber;
11
+ quantity: z.ZodDefault<z.ZodNumber>;
12
+ gameUsername: z.ZodOptional<z.ZodString>;
13
+ gameUsernameType: z.ZodOptional<z.ZodString>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ variantId: number;
16
+ quantity: number;
17
+ gameUsername?: string | undefined;
18
+ gameUsernameType?: string | undefined;
19
+ }, {
20
+ variantId: number;
21
+ quantity?: number | undefined;
22
+ gameUsername?: string | undefined;
23
+ gameUsernameType?: string | undefined;
24
+ }>, "many">;
25
+ promocodeId: z.ZodOptional<z.ZodNumber>;
26
+ userId: z.ZodOptional<z.ZodNumber>;
27
+ telegramId: z.ZodOptional<z.ZodString>;
28
+ utmSource: z.ZodOptional<z.ZodString>;
29
+ designType: z.ZodOptional<z.ZodString>;
30
+ type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["MAIN", "WEBAPP"]>>>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ email: string;
33
+ type: "MAIN" | "WEBAPP";
34
+ paymentMethodId: number;
35
+ items: {
36
+ variantId: number;
37
+ quantity: number;
38
+ gameUsername?: string | undefined;
39
+ gameUsernameType?: string | undefined;
40
+ }[];
41
+ promocodeId?: number | undefined;
42
+ userId?: number | undefined;
43
+ telegramId?: string | undefined;
44
+ utmSource?: string | undefined;
45
+ designType?: string | undefined;
46
+ }, {
47
+ email: string;
48
+ paymentMethodId: number;
49
+ items: {
50
+ variantId: number;
51
+ quantity?: number | undefined;
52
+ gameUsername?: string | undefined;
53
+ gameUsernameType?: string | undefined;
54
+ }[];
55
+ type?: "MAIN" | "WEBAPP" | undefined;
56
+ promocodeId?: number | undefined;
57
+ userId?: number | undefined;
58
+ telegramId?: string | undefined;
59
+ utmSource?: string | undefined;
60
+ designType?: string | undefined;
61
+ }>;
62
+ response: z.ZodObject<{
63
+ redirectUrl: z.ZodString;
64
+ }, "strip", z.ZodTypeAny, {
65
+ redirectUrl: string;
66
+ }, {
67
+ redirectUrl: string;
68
+ }>;
69
+ };
70
+ list: {
71
+ method: "GET";
72
+ path: string;
73
+ request: z.ZodObject<{
74
+ take: z.ZodOptional<z.ZodString>;
75
+ skip: z.ZodOptional<z.ZodString>;
76
+ } & {
77
+ email: z.ZodOptional<z.ZodString>;
78
+ status: z.ZodOptional<z.ZodEnum<["PENDING", "AWAITING_PAYMENT", "PAID", "PROCESSING", "SUCCESS", "FAILED", "REFUNDED", "CANCELLED"]>>;
79
+ } & {
80
+ sortBy: z.ZodDefault<z.ZodEnum<["createdAt", "updatedAt", "total", "subtotal"]>>;
81
+ sortDir: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
82
+ } & {
83
+ period: z.ZodOptional<z.ZodEnum<["day", "week", "month", "year", "custom"]>>;
84
+ start: z.ZodOptional<z.ZodString>;
85
+ end: z.ZodOptional<z.ZodString>;
86
+ }, "strip", z.ZodTypeAny, {
87
+ sortBy: "subtotal" | "total" | "createdAt" | "updatedAt";
88
+ sortDir: "asc" | "desc";
89
+ email?: string | undefined;
90
+ status?: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED" | undefined;
91
+ take?: string | undefined;
92
+ skip?: string | undefined;
93
+ period?: "day" | "week" | "month" | "year" | "custom" | undefined;
94
+ start?: string | undefined;
95
+ end?: string | undefined;
96
+ }, {
97
+ email?: string | undefined;
98
+ status?: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED" | undefined;
99
+ take?: string | undefined;
100
+ skip?: string | undefined;
101
+ period?: "day" | "week" | "month" | "year" | "custom" | undefined;
102
+ start?: string | undefined;
103
+ end?: string | undefined;
104
+ sortBy?: "subtotal" | "total" | "createdAt" | "updatedAt" | undefined;
105
+ sortDir?: "asc" | "desc" | undefined;
106
+ }>;
107
+ response: z.ZodArray<z.ZodObject<{
108
+ id: z.ZodNumber;
109
+ userId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
110
+ promocodeId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
111
+ paymentMethodId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
112
+ email: z.ZodString;
113
+ status: z.ZodEnum<["PENDING", "AWAITING_PAYMENT", "PAID", "PROCESSING", "SUCCESS", "FAILED", "REFUNDED", "CANCELLED"]>;
114
+ type: z.ZodEnum<["MAIN", "WEBAPP"]>;
115
+ subtotal: z.ZodString;
116
+ discount: z.ZodString;
117
+ commission: z.ZodString;
118
+ serviceCommission: z.ZodString;
119
+ total: z.ZodString;
120
+ ipAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ utmSource: z.ZodNullable<z.ZodString>;
122
+ designType: z.ZodNullable<z.ZodString>;
123
+ paymentMethodName: z.ZodNullable<z.ZodString>;
124
+ promocodeValue: z.ZodNullable<z.ZodString>;
125
+ promocodeDiscount: z.ZodNullable<z.ZodString>;
126
+ serviceCommissionPercent: z.ZodOptional<z.ZodNumber>;
127
+ acquiringCommissionPercent: z.ZodOptional<z.ZodNumber>;
128
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
129
+ id: z.ZodNumber;
130
+ productId: z.ZodNumber;
131
+ variantId: z.ZodNumber;
132
+ quantity: z.ZodNumber;
133
+ price: z.ZodString;
134
+ gameUsername: z.ZodNullable<z.ZodString>;
135
+ gameUsernameType: z.ZodNullable<z.ZodString>;
136
+ deliveredKey: z.ZodNullable<z.ZodString>;
137
+ deliveredAt: z.ZodNullable<z.ZodDate>;
138
+ status: z.ZodEnum<["PENDING", "PROCESSING", "DELIVERED", "FAILED", "REFUNDED"]>;
139
+ productTitle: z.ZodOptional<z.ZodString>;
140
+ variantName: z.ZodOptional<z.ZodString>;
141
+ }, "strip", z.ZodTypeAny, {
142
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
143
+ id: number;
144
+ variantId: number;
145
+ quantity: number;
146
+ gameUsername: string | null;
147
+ gameUsernameType: string | null;
148
+ productId: number;
149
+ price: string;
150
+ deliveredKey: string | null;
151
+ deliveredAt: Date | null;
152
+ productTitle?: string | undefined;
153
+ variantName?: string | undefined;
154
+ }, {
155
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
156
+ id: number;
157
+ variantId: number;
158
+ quantity: number;
159
+ gameUsername: string | null;
160
+ gameUsernameType: string | null;
161
+ productId: number;
162
+ price: string;
163
+ deliveredKey: string | null;
164
+ deliveredAt: Date | null;
165
+ productTitle?: string | undefined;
166
+ variantName?: string | undefined;
167
+ }>, "many">>;
168
+ createdAt: z.ZodDefault<z.ZodDate>;
169
+ updatedAt: z.ZodDefault<z.ZodDate>;
170
+ }, "strip", z.ZodTypeAny, {
171
+ email: string;
172
+ type: "MAIN" | "WEBAPP";
173
+ status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
174
+ id: number;
175
+ utmSource: string | null;
176
+ designType: string | null;
177
+ subtotal: string;
178
+ discount: string;
179
+ commission: string;
180
+ serviceCommission: string;
181
+ total: string;
182
+ paymentMethodName: string | null;
183
+ promocodeValue: string | null;
184
+ promocodeDiscount: string | null;
185
+ createdAt: Date;
186
+ updatedAt: Date;
187
+ paymentMethodId?: number | null | undefined;
188
+ items?: {
189
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
190
+ id: number;
191
+ variantId: number;
192
+ quantity: number;
193
+ gameUsername: string | null;
194
+ gameUsernameType: string | null;
195
+ productId: number;
196
+ price: string;
197
+ deliveredKey: string | null;
198
+ deliveredAt: Date | null;
199
+ productTitle?: string | undefined;
200
+ variantName?: string | undefined;
201
+ }[] | undefined;
202
+ promocodeId?: number | null | undefined;
203
+ userId?: number | null | undefined;
204
+ ipAddress?: string | null | undefined;
205
+ serviceCommissionPercent?: number | undefined;
206
+ acquiringCommissionPercent?: number | undefined;
207
+ }, {
208
+ email: string;
209
+ type: "MAIN" | "WEBAPP";
210
+ status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
211
+ id: number;
212
+ utmSource: string | null;
213
+ designType: string | null;
214
+ subtotal: string;
215
+ discount: string;
216
+ commission: string;
217
+ serviceCommission: string;
218
+ total: string;
219
+ paymentMethodName: string | null;
220
+ promocodeValue: string | null;
221
+ promocodeDiscount: string | null;
222
+ paymentMethodId?: number | null | undefined;
223
+ items?: {
224
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
225
+ id: number;
226
+ variantId: number;
227
+ quantity: number;
228
+ gameUsername: string | null;
229
+ gameUsernameType: string | null;
230
+ productId: number;
231
+ price: string;
232
+ deliveredKey: string | null;
233
+ deliveredAt: Date | null;
234
+ productTitle?: string | undefined;
235
+ variantName?: string | undefined;
236
+ }[] | undefined;
237
+ promocodeId?: number | null | undefined;
238
+ userId?: number | null | undefined;
239
+ ipAddress?: string | null | undefined;
240
+ serviceCommissionPercent?: number | undefined;
241
+ acquiringCommissionPercent?: number | undefined;
242
+ createdAt?: Date | undefined;
243
+ updatedAt?: Date | undefined;
244
+ }>, "many">;
245
+ };
246
+ getById: {
247
+ method: "GET";
248
+ path: string;
249
+ request: z.ZodObject<{
250
+ id: z.ZodNumber;
251
+ }, "strip", z.ZodTypeAny, {
252
+ id: number;
253
+ }, {
254
+ id: number;
255
+ }>;
256
+ response: z.ZodObject<{
257
+ id: z.ZodNumber;
258
+ userId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
259
+ promocodeId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
260
+ paymentMethodId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
261
+ email: z.ZodString;
262
+ status: z.ZodEnum<["PENDING", "AWAITING_PAYMENT", "PAID", "PROCESSING", "SUCCESS", "FAILED", "REFUNDED", "CANCELLED"]>;
263
+ type: z.ZodEnum<["MAIN", "WEBAPP"]>;
264
+ subtotal: z.ZodString;
265
+ discount: z.ZodString;
266
+ commission: z.ZodString;
267
+ serviceCommission: z.ZodString;
268
+ total: z.ZodString;
269
+ ipAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
270
+ utmSource: z.ZodNullable<z.ZodString>;
271
+ designType: z.ZodNullable<z.ZodString>;
272
+ paymentMethodName: z.ZodNullable<z.ZodString>;
273
+ promocodeValue: z.ZodNullable<z.ZodString>;
274
+ promocodeDiscount: z.ZodNullable<z.ZodString>;
275
+ serviceCommissionPercent: z.ZodOptional<z.ZodNumber>;
276
+ acquiringCommissionPercent: z.ZodOptional<z.ZodNumber>;
277
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
278
+ id: z.ZodNumber;
279
+ productId: z.ZodNumber;
280
+ variantId: z.ZodNumber;
281
+ quantity: z.ZodNumber;
282
+ price: z.ZodString;
283
+ gameUsername: z.ZodNullable<z.ZodString>;
284
+ gameUsernameType: z.ZodNullable<z.ZodString>;
285
+ deliveredKey: z.ZodNullable<z.ZodString>;
286
+ deliveredAt: z.ZodNullable<z.ZodDate>;
287
+ status: z.ZodEnum<["PENDING", "PROCESSING", "DELIVERED", "FAILED", "REFUNDED"]>;
288
+ productTitle: z.ZodOptional<z.ZodString>;
289
+ variantName: z.ZodOptional<z.ZodString>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
292
+ id: number;
293
+ variantId: number;
294
+ quantity: number;
295
+ gameUsername: string | null;
296
+ gameUsernameType: string | null;
297
+ productId: number;
298
+ price: string;
299
+ deliveredKey: string | null;
300
+ deliveredAt: Date | null;
301
+ productTitle?: string | undefined;
302
+ variantName?: string | undefined;
303
+ }, {
304
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
305
+ id: number;
306
+ variantId: number;
307
+ quantity: number;
308
+ gameUsername: string | null;
309
+ gameUsernameType: string | null;
310
+ productId: number;
311
+ price: string;
312
+ deliveredKey: string | null;
313
+ deliveredAt: Date | null;
314
+ productTitle?: string | undefined;
315
+ variantName?: string | undefined;
316
+ }>, "many">>;
317
+ createdAt: z.ZodDefault<z.ZodDate>;
318
+ updatedAt: z.ZodDefault<z.ZodDate>;
319
+ }, "strip", z.ZodTypeAny, {
320
+ email: string;
321
+ type: "MAIN" | "WEBAPP";
322
+ status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
323
+ id: number;
324
+ utmSource: string | null;
325
+ designType: string | null;
326
+ subtotal: string;
327
+ discount: string;
328
+ commission: string;
329
+ serviceCommission: string;
330
+ total: string;
331
+ paymentMethodName: string | null;
332
+ promocodeValue: string | null;
333
+ promocodeDiscount: string | null;
334
+ createdAt: Date;
335
+ updatedAt: Date;
336
+ paymentMethodId?: number | null | undefined;
337
+ items?: {
338
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
339
+ id: number;
340
+ variantId: number;
341
+ quantity: number;
342
+ gameUsername: string | null;
343
+ gameUsernameType: string | null;
344
+ productId: number;
345
+ price: string;
346
+ deliveredKey: string | null;
347
+ deliveredAt: Date | null;
348
+ productTitle?: string | undefined;
349
+ variantName?: string | undefined;
350
+ }[] | undefined;
351
+ promocodeId?: number | null | undefined;
352
+ userId?: number | null | undefined;
353
+ ipAddress?: string | null | undefined;
354
+ serviceCommissionPercent?: number | undefined;
355
+ acquiringCommissionPercent?: number | undefined;
356
+ }, {
357
+ email: string;
358
+ type: "MAIN" | "WEBAPP";
359
+ status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
360
+ id: number;
361
+ utmSource: string | null;
362
+ designType: string | null;
363
+ subtotal: string;
364
+ discount: string;
365
+ commission: string;
366
+ serviceCommission: string;
367
+ total: string;
368
+ paymentMethodName: string | null;
369
+ promocodeValue: string | null;
370
+ promocodeDiscount: string | null;
371
+ paymentMethodId?: number | null | undefined;
372
+ items?: {
373
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
374
+ id: number;
375
+ variantId: number;
376
+ quantity: number;
377
+ gameUsername: string | null;
378
+ gameUsernameType: string | null;
379
+ productId: number;
380
+ price: string;
381
+ deliveredKey: string | null;
382
+ deliveredAt: Date | null;
383
+ productTitle?: string | undefined;
384
+ variantName?: string | undefined;
385
+ }[] | undefined;
386
+ promocodeId?: number | null | undefined;
387
+ userId?: number | null | undefined;
388
+ ipAddress?: string | null | undefined;
389
+ serviceCommissionPercent?: number | undefined;
390
+ acquiringCommissionPercent?: number | undefined;
391
+ createdAt?: Date | undefined;
392
+ updatedAt?: Date | undefined;
393
+ }>;
394
+ };
395
+ getUserOrders: {
396
+ method: "GET";
397
+ path: string;
398
+ request: z.ZodObject<{
399
+ take: z.ZodOptional<z.ZodString>;
400
+ skip: z.ZodOptional<z.ZodString>;
401
+ } & {
402
+ email: z.ZodOptional<z.ZodString>;
403
+ status: z.ZodOptional<z.ZodEnum<["PENDING", "AWAITING_PAYMENT", "PAID", "PROCESSING", "SUCCESS", "FAILED", "REFUNDED", "CANCELLED"]>>;
404
+ } & {
405
+ sortBy: z.ZodDefault<z.ZodEnum<["createdAt", "updatedAt", "total", "subtotal"]>>;
406
+ sortDir: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
407
+ } & {
408
+ period: z.ZodOptional<z.ZodEnum<["day", "week", "month", "year", "custom"]>>;
409
+ start: z.ZodOptional<z.ZodString>;
410
+ end: z.ZodOptional<z.ZodString>;
411
+ }, "strip", z.ZodTypeAny, {
412
+ sortBy: "subtotal" | "total" | "createdAt" | "updatedAt";
413
+ sortDir: "asc" | "desc";
414
+ email?: string | undefined;
415
+ status?: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED" | undefined;
416
+ take?: string | undefined;
417
+ skip?: string | undefined;
418
+ period?: "day" | "week" | "month" | "year" | "custom" | undefined;
419
+ start?: string | undefined;
420
+ end?: string | undefined;
421
+ }, {
422
+ email?: string | undefined;
423
+ status?: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED" | undefined;
424
+ take?: string | undefined;
425
+ skip?: string | undefined;
426
+ period?: "day" | "week" | "month" | "year" | "custom" | undefined;
427
+ start?: string | undefined;
428
+ end?: string | undefined;
429
+ sortBy?: "subtotal" | "total" | "createdAt" | "updatedAt" | undefined;
430
+ sortDir?: "asc" | "desc" | undefined;
431
+ }>;
432
+ response: z.ZodArray<z.ZodObject<{
433
+ id: z.ZodNumber;
434
+ userId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
435
+ promocodeId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
436
+ paymentMethodId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
437
+ email: z.ZodString;
438
+ status: z.ZodEnum<["PENDING", "AWAITING_PAYMENT", "PAID", "PROCESSING", "SUCCESS", "FAILED", "REFUNDED", "CANCELLED"]>;
439
+ type: z.ZodEnum<["MAIN", "WEBAPP"]>;
440
+ subtotal: z.ZodString;
441
+ discount: z.ZodString;
442
+ commission: z.ZodString;
443
+ serviceCommission: z.ZodString;
444
+ total: z.ZodString;
445
+ ipAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
446
+ utmSource: z.ZodNullable<z.ZodString>;
447
+ designType: z.ZodNullable<z.ZodString>;
448
+ paymentMethodName: z.ZodNullable<z.ZodString>;
449
+ promocodeValue: z.ZodNullable<z.ZodString>;
450
+ promocodeDiscount: z.ZodNullable<z.ZodString>;
451
+ serviceCommissionPercent: z.ZodOptional<z.ZodNumber>;
452
+ acquiringCommissionPercent: z.ZodOptional<z.ZodNumber>;
453
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
454
+ id: z.ZodNumber;
455
+ productId: z.ZodNumber;
456
+ variantId: z.ZodNumber;
457
+ quantity: z.ZodNumber;
458
+ price: z.ZodString;
459
+ gameUsername: z.ZodNullable<z.ZodString>;
460
+ gameUsernameType: z.ZodNullable<z.ZodString>;
461
+ deliveredKey: z.ZodNullable<z.ZodString>;
462
+ deliveredAt: z.ZodNullable<z.ZodDate>;
463
+ status: z.ZodEnum<["PENDING", "PROCESSING", "DELIVERED", "FAILED", "REFUNDED"]>;
464
+ productTitle: z.ZodOptional<z.ZodString>;
465
+ variantName: z.ZodOptional<z.ZodString>;
466
+ }, "strip", z.ZodTypeAny, {
467
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
468
+ id: number;
469
+ variantId: number;
470
+ quantity: number;
471
+ gameUsername: string | null;
472
+ gameUsernameType: string | null;
473
+ productId: number;
474
+ price: string;
475
+ deliveredKey: string | null;
476
+ deliveredAt: Date | null;
477
+ productTitle?: string | undefined;
478
+ variantName?: string | undefined;
479
+ }, {
480
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
481
+ id: number;
482
+ variantId: number;
483
+ quantity: number;
484
+ gameUsername: string | null;
485
+ gameUsernameType: string | null;
486
+ productId: number;
487
+ price: string;
488
+ deliveredKey: string | null;
489
+ deliveredAt: Date | null;
490
+ productTitle?: string | undefined;
491
+ variantName?: string | undefined;
492
+ }>, "many">>;
493
+ createdAt: z.ZodDefault<z.ZodDate>;
494
+ updatedAt: z.ZodDefault<z.ZodDate>;
495
+ }, "strip", z.ZodTypeAny, {
496
+ email: string;
497
+ type: "MAIN" | "WEBAPP";
498
+ status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
499
+ id: number;
500
+ utmSource: string | null;
501
+ designType: string | null;
502
+ subtotal: string;
503
+ discount: string;
504
+ commission: string;
505
+ serviceCommission: string;
506
+ total: string;
507
+ paymentMethodName: string | null;
508
+ promocodeValue: string | null;
509
+ promocodeDiscount: string | null;
510
+ createdAt: Date;
511
+ updatedAt: Date;
512
+ paymentMethodId?: number | null | undefined;
513
+ items?: {
514
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
515
+ id: number;
516
+ variantId: number;
517
+ quantity: number;
518
+ gameUsername: string | null;
519
+ gameUsernameType: string | null;
520
+ productId: number;
521
+ price: string;
522
+ deliveredKey: string | null;
523
+ deliveredAt: Date | null;
524
+ productTitle?: string | undefined;
525
+ variantName?: string | undefined;
526
+ }[] | undefined;
527
+ promocodeId?: number | null | undefined;
528
+ userId?: number | null | undefined;
529
+ ipAddress?: string | null | undefined;
530
+ serviceCommissionPercent?: number | undefined;
531
+ acquiringCommissionPercent?: number | undefined;
532
+ }, {
533
+ email: string;
534
+ type: "MAIN" | "WEBAPP";
535
+ status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
536
+ id: number;
537
+ utmSource: string | null;
538
+ designType: string | null;
539
+ subtotal: string;
540
+ discount: string;
541
+ commission: string;
542
+ serviceCommission: string;
543
+ total: string;
544
+ paymentMethodName: string | null;
545
+ promocodeValue: string | null;
546
+ promocodeDiscount: string | null;
547
+ paymentMethodId?: number | null | undefined;
548
+ items?: {
549
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
550
+ id: number;
551
+ variantId: number;
552
+ quantity: number;
553
+ gameUsername: string | null;
554
+ gameUsernameType: string | null;
555
+ productId: number;
556
+ price: string;
557
+ deliveredKey: string | null;
558
+ deliveredAt: Date | null;
559
+ productTitle?: string | undefined;
560
+ variantName?: string | undefined;
561
+ }[] | undefined;
562
+ promocodeId?: number | null | undefined;
563
+ userId?: number | null | undefined;
564
+ ipAddress?: string | null | undefined;
565
+ serviceCommissionPercent?: number | undefined;
566
+ acquiringCommissionPercent?: number | undefined;
567
+ createdAt?: Date | undefined;
568
+ updatedAt?: Date | undefined;
569
+ }>, "many">;
570
+ };
571
+ getUserOrderById: {
572
+ method: "GET";
573
+ path: string;
574
+ request: z.ZodObject<{
575
+ userId: z.ZodNumber;
576
+ orderId: z.ZodNumber;
577
+ }, "strip", z.ZodTypeAny, {
578
+ userId: number;
579
+ orderId: number;
580
+ }, {
581
+ userId: number;
582
+ orderId: number;
583
+ }>;
584
+ response: z.ZodObject<{
585
+ id: z.ZodNumber;
586
+ userId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
587
+ promocodeId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
588
+ paymentMethodId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
589
+ email: z.ZodString;
590
+ status: z.ZodEnum<["PENDING", "AWAITING_PAYMENT", "PAID", "PROCESSING", "SUCCESS", "FAILED", "REFUNDED", "CANCELLED"]>;
591
+ type: z.ZodEnum<["MAIN", "WEBAPP"]>;
592
+ subtotal: z.ZodString;
593
+ discount: z.ZodString;
594
+ commission: z.ZodString;
595
+ serviceCommission: z.ZodString;
596
+ total: z.ZodString;
597
+ ipAddress: z.ZodOptional<z.ZodNullable<z.ZodString>>;
598
+ utmSource: z.ZodNullable<z.ZodString>;
599
+ designType: z.ZodNullable<z.ZodString>;
600
+ paymentMethodName: z.ZodNullable<z.ZodString>;
601
+ promocodeValue: z.ZodNullable<z.ZodString>;
602
+ promocodeDiscount: z.ZodNullable<z.ZodString>;
603
+ serviceCommissionPercent: z.ZodOptional<z.ZodNumber>;
604
+ acquiringCommissionPercent: z.ZodOptional<z.ZodNumber>;
605
+ items: z.ZodOptional<z.ZodArray<z.ZodObject<{
606
+ id: z.ZodNumber;
607
+ productId: z.ZodNumber;
608
+ variantId: z.ZodNumber;
609
+ quantity: z.ZodNumber;
610
+ price: z.ZodString;
611
+ gameUsername: z.ZodNullable<z.ZodString>;
612
+ gameUsernameType: z.ZodNullable<z.ZodString>;
613
+ deliveredKey: z.ZodNullable<z.ZodString>;
614
+ deliveredAt: z.ZodNullable<z.ZodDate>;
615
+ status: z.ZodEnum<["PENDING", "PROCESSING", "DELIVERED", "FAILED", "REFUNDED"]>;
616
+ productTitle: z.ZodOptional<z.ZodString>;
617
+ variantName: z.ZodOptional<z.ZodString>;
618
+ }, "strip", z.ZodTypeAny, {
619
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
620
+ id: number;
621
+ variantId: number;
622
+ quantity: number;
623
+ gameUsername: string | null;
624
+ gameUsernameType: string | null;
625
+ productId: number;
626
+ price: string;
627
+ deliveredKey: string | null;
628
+ deliveredAt: Date | null;
629
+ productTitle?: string | undefined;
630
+ variantName?: string | undefined;
631
+ }, {
632
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
633
+ id: number;
634
+ variantId: number;
635
+ quantity: number;
636
+ gameUsername: string | null;
637
+ gameUsernameType: string | null;
638
+ productId: number;
639
+ price: string;
640
+ deliveredKey: string | null;
641
+ deliveredAt: Date | null;
642
+ productTitle?: string | undefined;
643
+ variantName?: string | undefined;
644
+ }>, "many">>;
645
+ createdAt: z.ZodDefault<z.ZodDate>;
646
+ updatedAt: z.ZodDefault<z.ZodDate>;
647
+ }, "strip", z.ZodTypeAny, {
648
+ email: string;
649
+ type: "MAIN" | "WEBAPP";
650
+ status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
651
+ id: number;
652
+ utmSource: string | null;
653
+ designType: string | null;
654
+ subtotal: string;
655
+ discount: string;
656
+ commission: string;
657
+ serviceCommission: string;
658
+ total: string;
659
+ paymentMethodName: string | null;
660
+ promocodeValue: string | null;
661
+ promocodeDiscount: string | null;
662
+ createdAt: Date;
663
+ updatedAt: Date;
664
+ paymentMethodId?: number | null | undefined;
665
+ items?: {
666
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
667
+ id: number;
668
+ variantId: number;
669
+ quantity: number;
670
+ gameUsername: string | null;
671
+ gameUsernameType: string | null;
672
+ productId: number;
673
+ price: string;
674
+ deliveredKey: string | null;
675
+ deliveredAt: Date | null;
676
+ productTitle?: string | undefined;
677
+ variantName?: string | undefined;
678
+ }[] | undefined;
679
+ promocodeId?: number | null | undefined;
680
+ userId?: number | null | undefined;
681
+ ipAddress?: string | null | undefined;
682
+ serviceCommissionPercent?: number | undefined;
683
+ acquiringCommissionPercent?: number | undefined;
684
+ }, {
685
+ email: string;
686
+ type: "MAIN" | "WEBAPP";
687
+ status: "PENDING" | "AWAITING_PAYMENT" | "PAID" | "PROCESSING" | "SUCCESS" | "FAILED" | "REFUNDED" | "CANCELLED";
688
+ id: number;
689
+ utmSource: string | null;
690
+ designType: string | null;
691
+ subtotal: string;
692
+ discount: string;
693
+ commission: string;
694
+ serviceCommission: string;
695
+ total: string;
696
+ paymentMethodName: string | null;
697
+ promocodeValue: string | null;
698
+ promocodeDiscount: string | null;
699
+ paymentMethodId?: number | null | undefined;
700
+ items?: {
701
+ status: "PENDING" | "PROCESSING" | "FAILED" | "REFUNDED" | "DELIVERED";
702
+ id: number;
703
+ variantId: number;
704
+ quantity: number;
705
+ gameUsername: string | null;
706
+ gameUsernameType: string | null;
707
+ productId: number;
708
+ price: string;
709
+ deliveredKey: string | null;
710
+ deliveredAt: Date | null;
711
+ productTitle?: string | undefined;
712
+ variantName?: string | undefined;
713
+ }[] | undefined;
714
+ promocodeId?: number | null | undefined;
715
+ userId?: number | null | undefined;
716
+ ipAddress?: string | null | undefined;
717
+ serviceCommissionPercent?: number | undefined;
718
+ acquiringCommissionPercent?: number | undefined;
719
+ createdAt?: Date | undefined;
720
+ updatedAt?: Date | undefined;
721
+ }>;
722
+ };
723
+ };
724
+ export type OrderEndpointKey = keyof typeof OrderEndpoints;
725
+ export type GetOrderRequest<K extends OrderEndpointKey> = z.infer<typeof OrderEndpoints[K]["request"]>;
726
+ export type GetOrderResponse<K extends OrderEndpointKey> = z.infer<typeof OrderEndpoints[K]["response"]>;