@gigapay-dev/contracts 3.4.0 → 3.6.0

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.
@@ -5,6 +5,16 @@ export declare const ListProductsQuerySchema: z.ZodObject<{
5
5
  showcaseId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6
6
  subShowcaseId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
7
7
  categoryId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
8
+ type: z.ZodOptional<z.ZodEnum<{
9
+ GAME_KEY: "GAME_KEY";
10
+ GAME_GIFT: "GAME_GIFT";
11
+ TOPUP: "TOPUP";
12
+ SUBSCRIPTION: "SUBSCRIPTION";
13
+ IN_GAME_ITEM: "IN_GAME_ITEM";
14
+ DLC: "DLC";
15
+ CURRENCY: "CURRENCY";
16
+ VOUCHER: "VOUCHER";
17
+ }>>;
8
18
  search: z.ZodOptional<z.ZodString>;
9
19
  currency: z.ZodDefault<z.ZodEnum<{
10
20
  USD: "USD";
@@ -22,6 +32,16 @@ export declare const ListProductsEndpoint: {
22
32
  showcaseId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
23
33
  subShowcaseId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
24
34
  categoryId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
35
+ type: z.ZodOptional<z.ZodEnum<{
36
+ GAME_KEY: "GAME_KEY";
37
+ GAME_GIFT: "GAME_GIFT";
38
+ TOPUP: "TOPUP";
39
+ SUBSCRIPTION: "SUBSCRIPTION";
40
+ IN_GAME_ITEM: "IN_GAME_ITEM";
41
+ DLC: "DLC";
42
+ CURRENCY: "CURRENCY";
43
+ VOUCHER: "VOUCHER";
44
+ }>>;
25
45
  search: z.ZodOptional<z.ZodString>;
26
46
  currency: z.ZodDefault<z.ZodEnum<{
27
47
  USD: "USD";
@@ -182,6 +202,254 @@ export declare const GetVariantStockEndpoint: {
182
202
  total: z.ZodNumber;
183
203
  }, z.core.$strip>;
184
204
  };
205
+ export declare const ListAdminProductsEndpoint: {
206
+ readonly method: "GET";
207
+ readonly path: "/api/admin/products";
208
+ readonly query: z.ZodObject<{
209
+ skip: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
210
+ take: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
211
+ showcaseId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
212
+ subShowcaseId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
213
+ categoryId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
214
+ type: z.ZodOptional<z.ZodEnum<{
215
+ GAME_KEY: "GAME_KEY";
216
+ GAME_GIFT: "GAME_GIFT";
217
+ TOPUP: "TOPUP";
218
+ SUBSCRIPTION: "SUBSCRIPTION";
219
+ IN_GAME_ITEM: "IN_GAME_ITEM";
220
+ DLC: "DLC";
221
+ CURRENCY: "CURRENCY";
222
+ VOUCHER: "VOUCHER";
223
+ }>>;
224
+ search: z.ZodOptional<z.ZodString>;
225
+ currency: z.ZodDefault<z.ZodEnum<{
226
+ USD: "USD";
227
+ RUB: "RUB";
228
+ UAH: "UAH";
229
+ KZT: "KZT";
230
+ }>>;
231
+ }, z.core.$strip>;
232
+ readonly response: z.ZodObject<{
233
+ items: z.ZodArray<z.ZodObject<{
234
+ id: z.ZodNumber;
235
+ slug: z.ZodString;
236
+ title: z.ZodString;
237
+ type: z.ZodEnum<{
238
+ GAME_KEY: "GAME_KEY";
239
+ GAME_GIFT: "GAME_GIFT";
240
+ TOPUP: "TOPUP";
241
+ SUBSCRIPTION: "SUBSCRIPTION";
242
+ IN_GAME_ITEM: "IN_GAME_ITEM";
243
+ DLC: "DLC";
244
+ CURRENCY: "CURRENCY";
245
+ VOUCHER: "VOUCHER";
246
+ }>;
247
+ status: z.ZodEnum<{
248
+ OUT_OF_STOCK: "OUT_OF_STOCK";
249
+ ACTIVE: "ACTIVE";
250
+ DRAFT: "DRAFT";
251
+ ARCHIVED: "ARCHIVED";
252
+ }>;
253
+ description: z.ZodNullable<z.ZodString>;
254
+ shortDescription: z.ZodNullable<z.ZodString>;
255
+ coverImageUrl: z.ZodNullable<z.ZodString>;
256
+ basePrice: z.ZodObject<{
257
+ usd: z.ZodString;
258
+ rub: z.ZodString;
259
+ uah: z.ZodString;
260
+ kzt: z.ZodString;
261
+ }, z.core.$strip>;
262
+ originalTitle: z.ZodNullable<z.ZodString>;
263
+ catalogImageUrl: z.ZodNullable<z.ZodString>;
264
+ cardImageUrl: z.ZodNullable<z.ZodString>;
265
+ steamAppId: z.ZodNullable<z.ZodNumber>;
266
+ steamRating: z.ZodNullable<z.ZodNumber>;
267
+ showcaseId: z.ZodNullable<z.ZodNumber>;
268
+ subShowcaseId: z.ZodNullable<z.ZodNumber>;
269
+ categoryId: z.ZodNullable<z.ZodNumber>;
270
+ showcase: z.ZodNullable<z.ZodObject<{
271
+ id: z.ZodNumber;
272
+ slug: z.ZodString;
273
+ name: z.ZodString;
274
+ }, z.core.$strip>>;
275
+ subShowcase: z.ZodNullable<z.ZodObject<{
276
+ id: z.ZodNumber;
277
+ slug: z.ZodString;
278
+ name: z.ZodString;
279
+ }, z.core.$strip>>;
280
+ category: z.ZodNullable<z.ZodObject<{
281
+ id: z.ZodNumber;
282
+ slug: z.ZodString;
283
+ name: z.ZodString;
284
+ }, z.core.$strip>>;
285
+ basePriceUsd: z.ZodString;
286
+ originalPriceUsd: z.ZodNullable<z.ZodString>;
287
+ costPriceUsd: z.ZodNullable<z.ZodString>;
288
+ salesCount: z.ZodNumber;
289
+ viewsCount: z.ZodNumber;
290
+ version: z.ZodNumber;
291
+ variants: z.ZodArray<z.ZodObject<{
292
+ id: z.ZodNumber;
293
+ name: z.ZodString;
294
+ sku: z.ZodString;
295
+ imageUrl: z.ZodNullable<z.ZodString>;
296
+ price: z.ZodObject<{
297
+ usd: z.ZodString;
298
+ rub: z.ZodString;
299
+ uah: z.ZodString;
300
+ kzt: z.ZodString;
301
+ }, z.core.$strip>;
302
+ deliveryType: z.ZodEnum<{
303
+ AUTOMATIC: "AUTOMATIC";
304
+ MANUAL: "MANUAL";
305
+ BOT: "BOT";
306
+ }>;
307
+ desslyServiceType: z.ZodNullable<z.ZodEnum<{
308
+ VOUCHER: "VOUCHER";
309
+ STEAM_TOPUP: "STEAM_TOPUP";
310
+ STEAM_GIFT: "STEAM_GIFT";
311
+ MOBILE_REFILL: "MOBILE_REFILL";
312
+ CRYPTO_REFILL: "CRYPTO_REFILL";
313
+ }>>;
314
+ isActive: z.ZodBoolean;
315
+ priceUsd: z.ZodString;
316
+ originalPriceUsd: z.ZodNullable<z.ZodString>;
317
+ costPriceUsd: z.ZodNullable<z.ZodString>;
318
+ topupAmount: z.ZodNullable<z.ZodString>;
319
+ topupCurrency: z.ZodNullable<z.ZodString>;
320
+ durationDays: z.ZodNullable<z.ZodNumber>;
321
+ platform: z.ZodNullable<z.ZodString>;
322
+ regionCode: z.ZodNullable<z.ZodString>;
323
+ desslyProductId: z.ZodNullable<z.ZodNumber>;
324
+ desslyVariationId: z.ZodNullable<z.ZodNumber>;
325
+ desslyRegion: z.ZodNullable<z.ZodString>;
326
+ externalStock: z.ZodNullable<z.ZodNumber>;
327
+ marginPct: z.ZodString;
328
+ sortOrder: z.ZodNumber;
329
+ }, z.core.$strip>>;
330
+ }, z.core.$strip>>;
331
+ total: z.ZodNumber;
332
+ skip: z.ZodNumber;
333
+ take: z.ZodNumber;
334
+ }, z.core.$strip>;
335
+ readonly requiresAuth: true;
336
+ readonly requiresAdmin: true;
337
+ };
338
+ export declare const GetAdminProductBySlugEndpoint: {
339
+ readonly method: "GET";
340
+ readonly path: "/api/admin/products/by-slug/:slug";
341
+ readonly params: z.ZodObject<{
342
+ slug: z.ZodString;
343
+ }, z.core.$strip>;
344
+ readonly query: z.ZodObject<{
345
+ currency: z.ZodDefault<z.ZodEnum<{
346
+ USD: "USD";
347
+ RUB: "RUB";
348
+ UAH: "UAH";
349
+ KZT: "KZT";
350
+ }>>;
351
+ }, z.core.$strip>;
352
+ readonly response: z.ZodObject<{
353
+ id: z.ZodNumber;
354
+ slug: z.ZodString;
355
+ title: z.ZodString;
356
+ type: z.ZodEnum<{
357
+ GAME_KEY: "GAME_KEY";
358
+ GAME_GIFT: "GAME_GIFT";
359
+ TOPUP: "TOPUP";
360
+ SUBSCRIPTION: "SUBSCRIPTION";
361
+ IN_GAME_ITEM: "IN_GAME_ITEM";
362
+ DLC: "DLC";
363
+ CURRENCY: "CURRENCY";
364
+ VOUCHER: "VOUCHER";
365
+ }>;
366
+ status: z.ZodEnum<{
367
+ OUT_OF_STOCK: "OUT_OF_STOCK";
368
+ ACTIVE: "ACTIVE";
369
+ DRAFT: "DRAFT";
370
+ ARCHIVED: "ARCHIVED";
371
+ }>;
372
+ description: z.ZodNullable<z.ZodString>;
373
+ shortDescription: z.ZodNullable<z.ZodString>;
374
+ coverImageUrl: z.ZodNullable<z.ZodString>;
375
+ basePrice: z.ZodObject<{
376
+ usd: z.ZodString;
377
+ rub: z.ZodString;
378
+ uah: z.ZodString;
379
+ kzt: z.ZodString;
380
+ }, z.core.$strip>;
381
+ originalTitle: z.ZodNullable<z.ZodString>;
382
+ catalogImageUrl: z.ZodNullable<z.ZodString>;
383
+ cardImageUrl: z.ZodNullable<z.ZodString>;
384
+ steamAppId: z.ZodNullable<z.ZodNumber>;
385
+ steamRating: z.ZodNullable<z.ZodNumber>;
386
+ showcaseId: z.ZodNullable<z.ZodNumber>;
387
+ subShowcaseId: z.ZodNullable<z.ZodNumber>;
388
+ categoryId: z.ZodNullable<z.ZodNumber>;
389
+ showcase: z.ZodNullable<z.ZodObject<{
390
+ id: z.ZodNumber;
391
+ slug: z.ZodString;
392
+ name: z.ZodString;
393
+ }, z.core.$strip>>;
394
+ subShowcase: z.ZodNullable<z.ZodObject<{
395
+ id: z.ZodNumber;
396
+ slug: z.ZodString;
397
+ name: z.ZodString;
398
+ }, z.core.$strip>>;
399
+ category: z.ZodNullable<z.ZodObject<{
400
+ id: z.ZodNumber;
401
+ slug: z.ZodString;
402
+ name: z.ZodString;
403
+ }, z.core.$strip>>;
404
+ basePriceUsd: z.ZodString;
405
+ originalPriceUsd: z.ZodNullable<z.ZodString>;
406
+ costPriceUsd: z.ZodNullable<z.ZodString>;
407
+ salesCount: z.ZodNumber;
408
+ viewsCount: z.ZodNumber;
409
+ version: z.ZodNumber;
410
+ variants: z.ZodArray<z.ZodObject<{
411
+ id: z.ZodNumber;
412
+ name: z.ZodString;
413
+ sku: z.ZodString;
414
+ imageUrl: z.ZodNullable<z.ZodString>;
415
+ price: z.ZodObject<{
416
+ usd: z.ZodString;
417
+ rub: z.ZodString;
418
+ uah: z.ZodString;
419
+ kzt: z.ZodString;
420
+ }, z.core.$strip>;
421
+ deliveryType: z.ZodEnum<{
422
+ AUTOMATIC: "AUTOMATIC";
423
+ MANUAL: "MANUAL";
424
+ BOT: "BOT";
425
+ }>;
426
+ desslyServiceType: z.ZodNullable<z.ZodEnum<{
427
+ VOUCHER: "VOUCHER";
428
+ STEAM_TOPUP: "STEAM_TOPUP";
429
+ STEAM_GIFT: "STEAM_GIFT";
430
+ MOBILE_REFILL: "MOBILE_REFILL";
431
+ CRYPTO_REFILL: "CRYPTO_REFILL";
432
+ }>>;
433
+ isActive: z.ZodBoolean;
434
+ priceUsd: z.ZodString;
435
+ originalPriceUsd: z.ZodNullable<z.ZodString>;
436
+ costPriceUsd: z.ZodNullable<z.ZodString>;
437
+ topupAmount: z.ZodNullable<z.ZodString>;
438
+ topupCurrency: z.ZodNullable<z.ZodString>;
439
+ durationDays: z.ZodNullable<z.ZodNumber>;
440
+ platform: z.ZodNullable<z.ZodString>;
441
+ regionCode: z.ZodNullable<z.ZodString>;
442
+ desslyProductId: z.ZodNullable<z.ZodNumber>;
443
+ desslyVariationId: z.ZodNullable<z.ZodNumber>;
444
+ desslyRegion: z.ZodNullable<z.ZodString>;
445
+ externalStock: z.ZodNullable<z.ZodNumber>;
446
+ marginPct: z.ZodString;
447
+ sortOrder: z.ZodNumber;
448
+ }, z.core.$strip>>;
449
+ }, z.core.$strip>;
450
+ readonly requiresAuth: true;
451
+ readonly requiresAdmin: true;
452
+ };
185
453
  export declare const ProductQueries: {
186
454
  readonly list: {
187
455
  readonly method: "GET";
@@ -192,6 +460,16 @@ export declare const ProductQueries: {
192
460
  showcaseId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
193
461
  subShowcaseId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
194
462
  categoryId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
463
+ type: z.ZodOptional<z.ZodEnum<{
464
+ GAME_KEY: "GAME_KEY";
465
+ GAME_GIFT: "GAME_GIFT";
466
+ TOPUP: "TOPUP";
467
+ SUBSCRIPTION: "SUBSCRIPTION";
468
+ IN_GAME_ITEM: "IN_GAME_ITEM";
469
+ DLC: "DLC";
470
+ CURRENCY: "CURRENCY";
471
+ VOUCHER: "VOUCHER";
472
+ }>>;
195
473
  search: z.ZodOptional<z.ZodString>;
196
474
  currency: z.ZodDefault<z.ZodEnum<{
197
475
  USD: "USD";
@@ -344,5 +622,253 @@ export declare const ProductQueries: {
344
622
  total: z.ZodNumber;
345
623
  }, z.core.$strip>;
346
624
  };
625
+ readonly adminList: {
626
+ readonly method: "GET";
627
+ readonly path: "/api/admin/products";
628
+ readonly query: z.ZodObject<{
629
+ skip: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
630
+ take: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
631
+ showcaseId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
632
+ subShowcaseId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
633
+ categoryId: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
634
+ type: z.ZodOptional<z.ZodEnum<{
635
+ GAME_KEY: "GAME_KEY";
636
+ GAME_GIFT: "GAME_GIFT";
637
+ TOPUP: "TOPUP";
638
+ SUBSCRIPTION: "SUBSCRIPTION";
639
+ IN_GAME_ITEM: "IN_GAME_ITEM";
640
+ DLC: "DLC";
641
+ CURRENCY: "CURRENCY";
642
+ VOUCHER: "VOUCHER";
643
+ }>>;
644
+ search: z.ZodOptional<z.ZodString>;
645
+ currency: z.ZodDefault<z.ZodEnum<{
646
+ USD: "USD";
647
+ RUB: "RUB";
648
+ UAH: "UAH";
649
+ KZT: "KZT";
650
+ }>>;
651
+ }, z.core.$strip>;
652
+ readonly response: z.ZodObject<{
653
+ items: z.ZodArray<z.ZodObject<{
654
+ id: z.ZodNumber;
655
+ slug: z.ZodString;
656
+ title: z.ZodString;
657
+ type: z.ZodEnum<{
658
+ GAME_KEY: "GAME_KEY";
659
+ GAME_GIFT: "GAME_GIFT";
660
+ TOPUP: "TOPUP";
661
+ SUBSCRIPTION: "SUBSCRIPTION";
662
+ IN_GAME_ITEM: "IN_GAME_ITEM";
663
+ DLC: "DLC";
664
+ CURRENCY: "CURRENCY";
665
+ VOUCHER: "VOUCHER";
666
+ }>;
667
+ status: z.ZodEnum<{
668
+ OUT_OF_STOCK: "OUT_OF_STOCK";
669
+ ACTIVE: "ACTIVE";
670
+ DRAFT: "DRAFT";
671
+ ARCHIVED: "ARCHIVED";
672
+ }>;
673
+ description: z.ZodNullable<z.ZodString>;
674
+ shortDescription: z.ZodNullable<z.ZodString>;
675
+ coverImageUrl: z.ZodNullable<z.ZodString>;
676
+ basePrice: z.ZodObject<{
677
+ usd: z.ZodString;
678
+ rub: z.ZodString;
679
+ uah: z.ZodString;
680
+ kzt: z.ZodString;
681
+ }, z.core.$strip>;
682
+ originalTitle: z.ZodNullable<z.ZodString>;
683
+ catalogImageUrl: z.ZodNullable<z.ZodString>;
684
+ cardImageUrl: z.ZodNullable<z.ZodString>;
685
+ steamAppId: z.ZodNullable<z.ZodNumber>;
686
+ steamRating: z.ZodNullable<z.ZodNumber>;
687
+ showcaseId: z.ZodNullable<z.ZodNumber>;
688
+ subShowcaseId: z.ZodNullable<z.ZodNumber>;
689
+ categoryId: z.ZodNullable<z.ZodNumber>;
690
+ showcase: z.ZodNullable<z.ZodObject<{
691
+ id: z.ZodNumber;
692
+ slug: z.ZodString;
693
+ name: z.ZodString;
694
+ }, z.core.$strip>>;
695
+ subShowcase: z.ZodNullable<z.ZodObject<{
696
+ id: z.ZodNumber;
697
+ slug: z.ZodString;
698
+ name: z.ZodString;
699
+ }, z.core.$strip>>;
700
+ category: z.ZodNullable<z.ZodObject<{
701
+ id: z.ZodNumber;
702
+ slug: z.ZodString;
703
+ name: z.ZodString;
704
+ }, z.core.$strip>>;
705
+ basePriceUsd: z.ZodString;
706
+ originalPriceUsd: z.ZodNullable<z.ZodString>;
707
+ costPriceUsd: z.ZodNullable<z.ZodString>;
708
+ salesCount: z.ZodNumber;
709
+ viewsCount: z.ZodNumber;
710
+ version: z.ZodNumber;
711
+ variants: z.ZodArray<z.ZodObject<{
712
+ id: z.ZodNumber;
713
+ name: z.ZodString;
714
+ sku: z.ZodString;
715
+ imageUrl: z.ZodNullable<z.ZodString>;
716
+ price: z.ZodObject<{
717
+ usd: z.ZodString;
718
+ rub: z.ZodString;
719
+ uah: z.ZodString;
720
+ kzt: z.ZodString;
721
+ }, z.core.$strip>;
722
+ deliveryType: z.ZodEnum<{
723
+ AUTOMATIC: "AUTOMATIC";
724
+ MANUAL: "MANUAL";
725
+ BOT: "BOT";
726
+ }>;
727
+ desslyServiceType: z.ZodNullable<z.ZodEnum<{
728
+ VOUCHER: "VOUCHER";
729
+ STEAM_TOPUP: "STEAM_TOPUP";
730
+ STEAM_GIFT: "STEAM_GIFT";
731
+ MOBILE_REFILL: "MOBILE_REFILL";
732
+ CRYPTO_REFILL: "CRYPTO_REFILL";
733
+ }>>;
734
+ isActive: z.ZodBoolean;
735
+ priceUsd: z.ZodString;
736
+ originalPriceUsd: z.ZodNullable<z.ZodString>;
737
+ costPriceUsd: z.ZodNullable<z.ZodString>;
738
+ topupAmount: z.ZodNullable<z.ZodString>;
739
+ topupCurrency: z.ZodNullable<z.ZodString>;
740
+ durationDays: z.ZodNullable<z.ZodNumber>;
741
+ platform: z.ZodNullable<z.ZodString>;
742
+ regionCode: z.ZodNullable<z.ZodString>;
743
+ desslyProductId: z.ZodNullable<z.ZodNumber>;
744
+ desslyVariationId: z.ZodNullable<z.ZodNumber>;
745
+ desslyRegion: z.ZodNullable<z.ZodString>;
746
+ externalStock: z.ZodNullable<z.ZodNumber>;
747
+ marginPct: z.ZodString;
748
+ sortOrder: z.ZodNumber;
749
+ }, z.core.$strip>>;
750
+ }, z.core.$strip>>;
751
+ total: z.ZodNumber;
752
+ skip: z.ZodNumber;
753
+ take: z.ZodNumber;
754
+ }, z.core.$strip>;
755
+ readonly requiresAuth: true;
756
+ readonly requiresAdmin: true;
757
+ };
758
+ readonly adminGetBySlug: {
759
+ readonly method: "GET";
760
+ readonly path: "/api/admin/products/by-slug/:slug";
761
+ readonly params: z.ZodObject<{
762
+ slug: z.ZodString;
763
+ }, z.core.$strip>;
764
+ readonly query: z.ZodObject<{
765
+ currency: z.ZodDefault<z.ZodEnum<{
766
+ USD: "USD";
767
+ RUB: "RUB";
768
+ UAH: "UAH";
769
+ KZT: "KZT";
770
+ }>>;
771
+ }, z.core.$strip>;
772
+ readonly response: z.ZodObject<{
773
+ id: z.ZodNumber;
774
+ slug: z.ZodString;
775
+ title: z.ZodString;
776
+ type: z.ZodEnum<{
777
+ GAME_KEY: "GAME_KEY";
778
+ GAME_GIFT: "GAME_GIFT";
779
+ TOPUP: "TOPUP";
780
+ SUBSCRIPTION: "SUBSCRIPTION";
781
+ IN_GAME_ITEM: "IN_GAME_ITEM";
782
+ DLC: "DLC";
783
+ CURRENCY: "CURRENCY";
784
+ VOUCHER: "VOUCHER";
785
+ }>;
786
+ status: z.ZodEnum<{
787
+ OUT_OF_STOCK: "OUT_OF_STOCK";
788
+ ACTIVE: "ACTIVE";
789
+ DRAFT: "DRAFT";
790
+ ARCHIVED: "ARCHIVED";
791
+ }>;
792
+ description: z.ZodNullable<z.ZodString>;
793
+ shortDescription: z.ZodNullable<z.ZodString>;
794
+ coverImageUrl: z.ZodNullable<z.ZodString>;
795
+ basePrice: z.ZodObject<{
796
+ usd: z.ZodString;
797
+ rub: z.ZodString;
798
+ uah: z.ZodString;
799
+ kzt: z.ZodString;
800
+ }, z.core.$strip>;
801
+ originalTitle: z.ZodNullable<z.ZodString>;
802
+ catalogImageUrl: z.ZodNullable<z.ZodString>;
803
+ cardImageUrl: z.ZodNullable<z.ZodString>;
804
+ steamAppId: z.ZodNullable<z.ZodNumber>;
805
+ steamRating: z.ZodNullable<z.ZodNumber>;
806
+ showcaseId: z.ZodNullable<z.ZodNumber>;
807
+ subShowcaseId: z.ZodNullable<z.ZodNumber>;
808
+ categoryId: z.ZodNullable<z.ZodNumber>;
809
+ showcase: z.ZodNullable<z.ZodObject<{
810
+ id: z.ZodNumber;
811
+ slug: z.ZodString;
812
+ name: z.ZodString;
813
+ }, z.core.$strip>>;
814
+ subShowcase: z.ZodNullable<z.ZodObject<{
815
+ id: z.ZodNumber;
816
+ slug: z.ZodString;
817
+ name: z.ZodString;
818
+ }, z.core.$strip>>;
819
+ category: z.ZodNullable<z.ZodObject<{
820
+ id: z.ZodNumber;
821
+ slug: z.ZodString;
822
+ name: z.ZodString;
823
+ }, z.core.$strip>>;
824
+ basePriceUsd: z.ZodString;
825
+ originalPriceUsd: z.ZodNullable<z.ZodString>;
826
+ costPriceUsd: z.ZodNullable<z.ZodString>;
827
+ salesCount: z.ZodNumber;
828
+ viewsCount: z.ZodNumber;
829
+ version: z.ZodNumber;
830
+ variants: z.ZodArray<z.ZodObject<{
831
+ id: z.ZodNumber;
832
+ name: z.ZodString;
833
+ sku: z.ZodString;
834
+ imageUrl: z.ZodNullable<z.ZodString>;
835
+ price: z.ZodObject<{
836
+ usd: z.ZodString;
837
+ rub: z.ZodString;
838
+ uah: z.ZodString;
839
+ kzt: z.ZodString;
840
+ }, z.core.$strip>;
841
+ deliveryType: z.ZodEnum<{
842
+ AUTOMATIC: "AUTOMATIC";
843
+ MANUAL: "MANUAL";
844
+ BOT: "BOT";
845
+ }>;
846
+ desslyServiceType: z.ZodNullable<z.ZodEnum<{
847
+ VOUCHER: "VOUCHER";
848
+ STEAM_TOPUP: "STEAM_TOPUP";
849
+ STEAM_GIFT: "STEAM_GIFT";
850
+ MOBILE_REFILL: "MOBILE_REFILL";
851
+ CRYPTO_REFILL: "CRYPTO_REFILL";
852
+ }>>;
853
+ isActive: z.ZodBoolean;
854
+ priceUsd: z.ZodString;
855
+ originalPriceUsd: z.ZodNullable<z.ZodString>;
856
+ costPriceUsd: z.ZodNullable<z.ZodString>;
857
+ topupAmount: z.ZodNullable<z.ZodString>;
858
+ topupCurrency: z.ZodNullable<z.ZodString>;
859
+ durationDays: z.ZodNullable<z.ZodNumber>;
860
+ platform: z.ZodNullable<z.ZodString>;
861
+ regionCode: z.ZodNullable<z.ZodString>;
862
+ desslyProductId: z.ZodNullable<z.ZodNumber>;
863
+ desslyVariationId: z.ZodNullable<z.ZodNumber>;
864
+ desslyRegion: z.ZodNullable<z.ZodString>;
865
+ externalStock: z.ZodNullable<z.ZodNumber>;
866
+ marginPct: z.ZodString;
867
+ sortOrder: z.ZodNumber;
868
+ }, z.core.$strip>>;
869
+ }, z.core.$strip>;
870
+ readonly requiresAuth: true;
871
+ readonly requiresAdmin: true;
872
+ };
347
873
  };
348
874
  //# sourceMappingURL=queries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../../src/domains/products/queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;iBAMlC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKI,CAAC;AAEtC,eAAO,MAAM,2BAA2B;;;;;;;iBAAwD,CAAC;AACjG,eAAO,MAAM,wBAAwB;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQL,CAAC;AAEtC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMjB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductQueries = exports.GetVariantStockEndpoint = exports.GetProductBySlugEndpoint = exports.GetProductBySlugQuerySchema = exports.ListProductsEndpoint = exports.ListProductsQuerySchema = void 0;
3
+ exports.ProductQueries = exports.GetAdminProductBySlugEndpoint = exports.ListAdminProductsEndpoint = exports.GetVariantStockEndpoint = exports.GetProductBySlugEndpoint = exports.GetProductBySlugQuerySchema = exports.ListProductsEndpoint = exports.ListProductsQuerySchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const common_1 = require("../../shared/common");
6
6
  const pagination_1 = require("../../shared/pagination");
@@ -10,6 +10,7 @@ exports.ListProductsQuerySchema = pagination_1.PaginationQuerySchema.extend({
10
10
  showcaseId: zod_1.z.coerce.number().int().positive().optional(),
11
11
  subShowcaseId: zod_1.z.coerce.number().int().positive().optional(),
12
12
  categoryId: zod_1.z.coerce.number().int().positive().optional(),
13
+ type: dtos_1.ProductTypeSchema.optional(),
13
14
  search: zod_1.z.string().max(64).optional(),
14
15
  currency: money_1.CurrencySchema.default("RUB"),
15
16
  });
@@ -33,9 +34,28 @@ exports.GetVariantStockEndpoint = {
33
34
  params: common_1.IdParamSchema,
34
35
  response: dtos_1.VariantStockSchema,
35
36
  };
37
+ exports.ListAdminProductsEndpoint = {
38
+ method: "GET",
39
+ path: "/api/admin/products",
40
+ query: exports.ListProductsQuerySchema,
41
+ response: (0, pagination_1.PaginatedResponseSchema)(dtos_1.AdminProductSchema),
42
+ requiresAuth: true,
43
+ requiresAdmin: true,
44
+ };
45
+ exports.GetAdminProductBySlugEndpoint = {
46
+ method: "GET",
47
+ path: "/api/admin/products/by-slug/:slug",
48
+ params: common_1.SlugParamSchema,
49
+ query: exports.GetProductBySlugQuerySchema,
50
+ response: dtos_1.AdminProductSchema,
51
+ requiresAuth: true,
52
+ requiresAdmin: true,
53
+ };
36
54
  exports.ProductQueries = {
37
55
  list: exports.ListProductsEndpoint,
38
56
  getBySlug: exports.GetProductBySlugEndpoint,
39
57
  getVariantStock: exports.GetVariantStockEndpoint,
58
+ adminList: exports.ListAdminProductsEndpoint,
59
+ adminGetBySlug: exports.GetAdminProductBySlugEndpoint,
40
60
  };
41
61
  //# sourceMappingURL=queries.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../../src/domains/products/queries.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,gDAAqE;AACrE,wDAAyF;AACzF,8CAAoD;AACpD,iCAA2D;AAE9C,QAAA,uBAAuB,GAAG,kCAAqB,CAAC,MAAM,CAAC;IACnE,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACzD,aAAa,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,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