rategame-shared 1.1.459 → 1.1.460
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.
- package/dist/lib/consoleColors.d.ts +5 -0
- package/dist/lib/consoleColors.js +19 -0
- package/dist/schemas/communityGame.d.ts +29 -0
- package/dist/schemas/game.d.ts +731 -0
- package/dist/schemas/game.js +15 -0
- package/dist/schemas/notification.d.ts +27 -0
- package/dist/schemas/pick.d.ts +1835 -0
- package/dist/schemas/poll.d.ts +696 -0
- package/dist/schemas/rating.d.ts +39 -0
- package/dist/schemas/scorePrediction.d.ts +1392 -0
- package/dist/schemas/stadium.d.ts +28 -0
- package/dist/schemas/team.d.ts +21 -0
- package/dist/schemas/team.js +1 -0
- package/dist/schemas/voting.d.ts +294 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.colorLog = void 0;
|
|
4
|
+
const ansi = (hex) => {
|
|
5
|
+
const value = hex.replace("#", "");
|
|
6
|
+
const red = parseInt(value.slice(0, 2), 16);
|
|
7
|
+
const green = parseInt(value.slice(2, 4), 16);
|
|
8
|
+
const blue = parseInt(value.slice(4, 6), 16);
|
|
9
|
+
return `\x1b[38;2;${red};${green};${blue}m`;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @param value - The value to log in the format of 'value:color'.
|
|
13
|
+
* @returns The value logged in the color.
|
|
14
|
+
*/
|
|
15
|
+
const colorLog = (value) => {
|
|
16
|
+
const [logValue, color] = value.split(":");
|
|
17
|
+
return `${ansi(color)}${logValue}\x1b[0m`;
|
|
18
|
+
};
|
|
19
|
+
exports.colorLog = colorLog;
|
|
@@ -447,6 +447,7 @@ export declare const communityGameTeamSchema: z.ZodObject<{
|
|
|
447
447
|
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
448
448
|
venueName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
449
449
|
primaryColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
450
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
450
451
|
pickCount: z.ZodOptional<z.ZodNumber>;
|
|
451
452
|
}, "strip", z.ZodTypeAny, {
|
|
452
453
|
name: string | null;
|
|
@@ -463,6 +464,7 @@ export declare const communityGameTeamSchema: z.ZodObject<{
|
|
|
463
464
|
city?: string | null | undefined;
|
|
464
465
|
venueName?: string | null | undefined;
|
|
465
466
|
primaryColor?: string | null | undefined;
|
|
467
|
+
aliases?: string[] | undefined;
|
|
466
468
|
pickCount?: number | undefined;
|
|
467
469
|
}, {
|
|
468
470
|
name: string | null;
|
|
@@ -479,6 +481,7 @@ export declare const communityGameTeamSchema: z.ZodObject<{
|
|
|
479
481
|
city?: string | null | undefined;
|
|
480
482
|
venueName?: string | null | undefined;
|
|
481
483
|
primaryColor?: string | null | undefined;
|
|
484
|
+
aliases?: string[] | undefined;
|
|
482
485
|
pickCount?: number | undefined;
|
|
483
486
|
}>>;
|
|
484
487
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -508,6 +511,7 @@ export declare const communityGameTeamSchema: z.ZodObject<{
|
|
|
508
511
|
city?: string | null | undefined;
|
|
509
512
|
venueName?: string | null | undefined;
|
|
510
513
|
primaryColor?: string | null | undefined;
|
|
514
|
+
aliases?: string[] | undefined;
|
|
511
515
|
pickCount?: number | undefined;
|
|
512
516
|
} | undefined;
|
|
513
517
|
}, {
|
|
@@ -537,6 +541,7 @@ export declare const communityGameTeamSchema: z.ZodObject<{
|
|
|
537
541
|
city?: string | null | undefined;
|
|
538
542
|
venueName?: string | null | undefined;
|
|
539
543
|
primaryColor?: string | null | undefined;
|
|
544
|
+
aliases?: string[] | undefined;
|
|
540
545
|
pickCount?: number | undefined;
|
|
541
546
|
} | undefined;
|
|
542
547
|
}>;
|
|
@@ -621,6 +626,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
621
626
|
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
622
627
|
venueName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
623
628
|
primaryColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
629
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
624
630
|
pickCount: z.ZodOptional<z.ZodNumber>;
|
|
625
631
|
}, "strip", z.ZodTypeAny, {
|
|
626
632
|
name: string | null;
|
|
@@ -637,6 +643,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
637
643
|
city?: string | null | undefined;
|
|
638
644
|
venueName?: string | null | undefined;
|
|
639
645
|
primaryColor?: string | null | undefined;
|
|
646
|
+
aliases?: string[] | undefined;
|
|
640
647
|
pickCount?: number | undefined;
|
|
641
648
|
}, {
|
|
642
649
|
name: string | null;
|
|
@@ -653,6 +660,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
653
660
|
city?: string | null | undefined;
|
|
654
661
|
venueName?: string | null | undefined;
|
|
655
662
|
primaryColor?: string | null | undefined;
|
|
663
|
+
aliases?: string[] | undefined;
|
|
656
664
|
pickCount?: number | undefined;
|
|
657
665
|
}>>;
|
|
658
666
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -682,6 +690,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
682
690
|
city?: string | null | undefined;
|
|
683
691
|
venueName?: string | null | undefined;
|
|
684
692
|
primaryColor?: string | null | undefined;
|
|
693
|
+
aliases?: string[] | undefined;
|
|
685
694
|
pickCount?: number | undefined;
|
|
686
695
|
} | undefined;
|
|
687
696
|
}, {
|
|
@@ -711,6 +720,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
711
720
|
city?: string | null | undefined;
|
|
712
721
|
venueName?: string | null | undefined;
|
|
713
722
|
primaryColor?: string | null | undefined;
|
|
723
|
+
aliases?: string[] | undefined;
|
|
714
724
|
pickCount?: number | undefined;
|
|
715
725
|
} | undefined;
|
|
716
726
|
}>;
|
|
@@ -757,6 +767,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
757
767
|
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
758
768
|
venueName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
759
769
|
primaryColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
770
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
760
771
|
pickCount: z.ZodOptional<z.ZodNumber>;
|
|
761
772
|
}, "strip", z.ZodTypeAny, {
|
|
762
773
|
name: string | null;
|
|
@@ -773,6 +784,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
773
784
|
city?: string | null | undefined;
|
|
774
785
|
venueName?: string | null | undefined;
|
|
775
786
|
primaryColor?: string | null | undefined;
|
|
787
|
+
aliases?: string[] | undefined;
|
|
776
788
|
pickCount?: number | undefined;
|
|
777
789
|
}, {
|
|
778
790
|
name: string | null;
|
|
@@ -789,6 +801,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
789
801
|
city?: string | null | undefined;
|
|
790
802
|
venueName?: string | null | undefined;
|
|
791
803
|
primaryColor?: string | null | undefined;
|
|
804
|
+
aliases?: string[] | undefined;
|
|
792
805
|
pickCount?: number | undefined;
|
|
793
806
|
}>>;
|
|
794
807
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -818,6 +831,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
818
831
|
city?: string | null | undefined;
|
|
819
832
|
venueName?: string | null | undefined;
|
|
820
833
|
primaryColor?: string | null | undefined;
|
|
834
|
+
aliases?: string[] | undefined;
|
|
821
835
|
pickCount?: number | undefined;
|
|
822
836
|
} | undefined;
|
|
823
837
|
}, {
|
|
@@ -847,6 +861,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
847
861
|
city?: string | null | undefined;
|
|
848
862
|
venueName?: string | null | undefined;
|
|
849
863
|
primaryColor?: string | null | undefined;
|
|
864
|
+
aliases?: string[] | undefined;
|
|
850
865
|
pickCount?: number | undefined;
|
|
851
866
|
} | undefined;
|
|
852
867
|
}>;
|
|
@@ -1165,6 +1180,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1165
1180
|
city?: string | null | undefined;
|
|
1166
1181
|
venueName?: string | null | undefined;
|
|
1167
1182
|
primaryColor?: string | null | undefined;
|
|
1183
|
+
aliases?: string[] | undefined;
|
|
1168
1184
|
pickCount?: number | undefined;
|
|
1169
1185
|
} | undefined;
|
|
1170
1186
|
};
|
|
@@ -1195,6 +1211,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1195
1211
|
city?: string | null | undefined;
|
|
1196
1212
|
venueName?: string | null | undefined;
|
|
1197
1213
|
primaryColor?: string | null | undefined;
|
|
1214
|
+
aliases?: string[] | undefined;
|
|
1198
1215
|
pickCount?: number | undefined;
|
|
1199
1216
|
} | undefined;
|
|
1200
1217
|
};
|
|
@@ -1309,6 +1326,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1309
1326
|
city?: string | null | undefined;
|
|
1310
1327
|
venueName?: string | null | undefined;
|
|
1311
1328
|
primaryColor?: string | null | undefined;
|
|
1329
|
+
aliases?: string[] | undefined;
|
|
1312
1330
|
pickCount?: number | undefined;
|
|
1313
1331
|
} | undefined;
|
|
1314
1332
|
};
|
|
@@ -1339,6 +1357,7 @@ export declare const createCommunityGameSchema: z.ZodObject<{
|
|
|
1339
1357
|
city?: string | null | undefined;
|
|
1340
1358
|
venueName?: string | null | undefined;
|
|
1341
1359
|
primaryColor?: string | null | undefined;
|
|
1360
|
+
aliases?: string[] | undefined;
|
|
1342
1361
|
pickCount?: number | undefined;
|
|
1343
1362
|
} | undefined;
|
|
1344
1363
|
};
|
|
@@ -1444,6 +1463,7 @@ export declare const communityGameResponseSchema: z.ZodObject<{
|
|
|
1444
1463
|
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1445
1464
|
venueName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1446
1465
|
primaryColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1466
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1447
1467
|
pickCount: z.ZodOptional<z.ZodNumber>;
|
|
1448
1468
|
}, "strip", z.ZodTypeAny, {
|
|
1449
1469
|
name: string | null;
|
|
@@ -1460,6 +1480,7 @@ export declare const communityGameResponseSchema: z.ZodObject<{
|
|
|
1460
1480
|
city?: string | null | undefined;
|
|
1461
1481
|
venueName?: string | null | undefined;
|
|
1462
1482
|
primaryColor?: string | null | undefined;
|
|
1483
|
+
aliases?: string[] | undefined;
|
|
1463
1484
|
pickCount?: number | undefined;
|
|
1464
1485
|
}, {
|
|
1465
1486
|
name: string | null;
|
|
@@ -1476,6 +1497,7 @@ export declare const communityGameResponseSchema: z.ZodObject<{
|
|
|
1476
1497
|
city?: string | null | undefined;
|
|
1477
1498
|
venueName?: string | null | undefined;
|
|
1478
1499
|
primaryColor?: string | null | undefined;
|
|
1500
|
+
aliases?: string[] | undefined;
|
|
1479
1501
|
pickCount?: number | undefined;
|
|
1480
1502
|
}>;
|
|
1481
1503
|
awayTeam: z.ZodObject<{
|
|
@@ -1493,6 +1515,7 @@ export declare const communityGameResponseSchema: z.ZodObject<{
|
|
|
1493
1515
|
city: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1494
1516
|
venueName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1495
1517
|
primaryColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1518
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1496
1519
|
pickCount: z.ZodOptional<z.ZodNumber>;
|
|
1497
1520
|
}, "strip", z.ZodTypeAny, {
|
|
1498
1521
|
name: string | null;
|
|
@@ -1509,6 +1532,7 @@ export declare const communityGameResponseSchema: z.ZodObject<{
|
|
|
1509
1532
|
city?: string | null | undefined;
|
|
1510
1533
|
venueName?: string | null | undefined;
|
|
1511
1534
|
primaryColor?: string | null | undefined;
|
|
1535
|
+
aliases?: string[] | undefined;
|
|
1512
1536
|
pickCount?: number | undefined;
|
|
1513
1537
|
}, {
|
|
1514
1538
|
name: string | null;
|
|
@@ -1525,6 +1549,7 @@ export declare const communityGameResponseSchema: z.ZodObject<{
|
|
|
1525
1549
|
city?: string | null | undefined;
|
|
1526
1550
|
venueName?: string | null | undefined;
|
|
1527
1551
|
primaryColor?: string | null | undefined;
|
|
1552
|
+
aliases?: string[] | undefined;
|
|
1528
1553
|
pickCount?: number | undefined;
|
|
1529
1554
|
}>;
|
|
1530
1555
|
startedAt: z.ZodNumber;
|
|
@@ -1552,6 +1577,7 @@ export declare const communityGameResponseSchema: z.ZodObject<{
|
|
|
1552
1577
|
city?: string | null | undefined;
|
|
1553
1578
|
venueName?: string | null | undefined;
|
|
1554
1579
|
primaryColor?: string | null | undefined;
|
|
1580
|
+
aliases?: string[] | undefined;
|
|
1555
1581
|
pickCount?: number | undefined;
|
|
1556
1582
|
};
|
|
1557
1583
|
awayTeam: {
|
|
@@ -1569,6 +1595,7 @@ export declare const communityGameResponseSchema: z.ZodObject<{
|
|
|
1569
1595
|
city?: string | null | undefined;
|
|
1570
1596
|
venueName?: string | null | undefined;
|
|
1571
1597
|
primaryColor?: string | null | undefined;
|
|
1598
|
+
aliases?: string[] | undefined;
|
|
1572
1599
|
pickCount?: number | undefined;
|
|
1573
1600
|
};
|
|
1574
1601
|
communityGame: true;
|
|
@@ -1594,6 +1621,7 @@ export declare const communityGameResponseSchema: z.ZodObject<{
|
|
|
1594
1621
|
city?: string | null | undefined;
|
|
1595
1622
|
venueName?: string | null | undefined;
|
|
1596
1623
|
primaryColor?: string | null | undefined;
|
|
1624
|
+
aliases?: string[] | undefined;
|
|
1597
1625
|
pickCount?: number | undefined;
|
|
1598
1626
|
};
|
|
1599
1627
|
awayTeam: {
|
|
@@ -1611,6 +1639,7 @@ export declare const communityGameResponseSchema: z.ZodObject<{
|
|
|
1611
1639
|
city?: string | null | undefined;
|
|
1612
1640
|
venueName?: string | null | undefined;
|
|
1613
1641
|
primaryColor?: string | null | undefined;
|
|
1642
|
+
aliases?: string[] | undefined;
|
|
1614
1643
|
pickCount?: number | undefined;
|
|
1615
1644
|
};
|
|
1616
1645
|
communityGame: true;
|