@shakerquiz/utilities 4.0.76 → 4.0.78

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.
@@ -0,0 +1,21 @@
1
+ name: Test @shakerquiz/utilities
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - aquamarine
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v6
16
+ - uses: actions/setup-node@v6
17
+ with:
18
+ node-version: lts/*
19
+ - uses: oven-sh/setup-bun@v2
20
+ - run: npm ci
21
+ - run: npm run prepublishOnly
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@shakerquiz/utilities",
4
- "version": "4.0.76",
4
+ "version": "4.0.78",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -92,11 +92,32 @@ export const RouteExcessiveCardinality = Object.freeze(
92
92
  'registrations/game/theme/search': 'n/1/1/1',
93
93
  'registrations/game/venue/search': 'n/1/1/1',
94
94
  'telegram/webhook': '1/1',
95
+ 'telegram/registration': '1/1',
96
+ 'telegram/registration/lineup': '1/1/1',
97
+ 'telegram/registration/status': '1/1/1',
95
98
  'telegram/registration/mailing': '1/1/1',
99
+ 'telegram/registrations': '1/n',
100
+ 'telegram/registrations/lineup': '1/n/1',
101
+ 'telegram/registrations/status': '1/n/1',
102
+ 'telegram/registrations/mailing': '1/n/1',
96
103
  'chatapp/webhook': '1/1',
97
104
  'chatapp/registration': '1/1',
105
+ 'chatapp/registration/lineup': '1/1/1',
106
+ 'chatapp/registration/status': '1/1/1',
107
+ 'chatapp/registration/dialog': '1/1/1',
108
+ 'chatapp/registration/channel': '1/1/1',
98
109
  'chatapp/registration/mailing': '1/1/1',
110
+ 'chatapp/registrations': '1/n',
111
+ 'chatapp/registrations/lineup': '1/n/1',
112
+ 'chatapp/registrations/status': '1/n/1',
113
+ 'chatapp/registrations/channel': '1/n/1',
114
+ 'chatapp/registrations/mailing': '1/n/1',
99
115
  'bitrix/registration': '1/1',
116
+ 'bitrix/registration/lineup': '1/1/1',
117
+ 'bitrix/registration/status': '1/1/1',
118
+ 'bitrix/registrations': '1/n',
119
+ 'bitrix/registrations/lineup': '1/n/1',
120
+ 'bitrix/registrations/status': '1/n/1',
100
121
  'source': '1',
101
122
  }),
102
123
  )
@@ -193,11 +214,32 @@ export const RouteCardinality = Object.freeze(
193
214
  'registrations/game/theme/search': 'n/1',
194
215
  'registrations/game/venue/search': 'n/1',
195
216
  'telegram/webhook': '1/1',
217
+ 'telegram/registration': '1/1',
218
+ 'telegram/registration/lineup': '1/1',
219
+ 'telegram/registration/status': '1/1',
196
220
  'telegram/registration/mailing': '1/1',
221
+ 'telegram/registrations': '1/n',
222
+ 'telegram/registrations/lineup': '1/1',
223
+ 'telegram/registrations/status': '1/1',
224
+ 'telegram/registrations/mailing': '1/1',
197
225
  'chatapp/webhook': '1/1',
198
226
  'chatapp/registration': '1/1',
227
+ 'chatapp/registration/lineup': '1/1',
228
+ 'chatapp/registration/status': '1/1',
229
+ 'chatapp/registration/dialog': '1/1',
230
+ 'chatapp/registration/channel': '1/1',
199
231
  'chatapp/registration/mailing': '1/1',
232
+ 'chatapp/registrations': '1/n',
233
+ 'chatapp/registrations/lineup': '1/1',
234
+ 'chatapp/registrations/status': '1/1',
235
+ 'chatapp/registrations/channel': '1/1',
236
+ 'chatapp/registrations/mailing': '1/1',
200
237
  'bitrix/registration': '1/1',
238
+ 'bitrix/registration/lineup': '1/1',
239
+ 'bitrix/registration/status': '1/1',
240
+ 'bitrix/registrations': '1/n',
241
+ 'bitrix/registrations/lineup': '1/1',
242
+ 'bitrix/registrations/status': '1/1',
201
243
  'source': '1',
202
244
  }),
203
245
  )
@@ -294,11 +336,32 @@ export const RoutePathname = Object.freeze(
294
336
  'registrations/game/theme/search': 'registrations/game/:game/theme/:theme/search',
295
337
  'registrations/game/venue/search': 'registrations/game/:game/venue/:venue/search',
296
338
  'telegram/webhook': 'telegram/webhook',
339
+ 'telegram/registration': 'telegram/registration/:registration',
340
+ 'telegram/registration/lineup': 'telegram/registration/:registration/lineup',
341
+ 'telegram/registration/status': 'telegram/registration/:registration/status',
297
342
  'telegram/registration/mailing': 'telegram/registration/:registration/mailing',
343
+ 'telegram/registrations': 'telegram/registrations',
344
+ 'telegram/registrations/lineup': 'telegram/registrations/lineup',
345
+ 'telegram/registrations/status': 'telegram/registrations/status',
346
+ 'telegram/registrations/mailing': 'telegram/registrations/mailing',
298
347
  'chatapp/webhook': 'chatapp/webhook',
299
348
  'chatapp/registration': 'chatapp/registration/:registration',
349
+ 'chatapp/registration/lineup': 'chatapp/registration/:registration/lineup',
350
+ 'chatapp/registration/status': 'chatapp/registration/:registration/status',
351
+ 'chatapp/registration/dialog': 'chatapp/registration/:registration/dialog',
352
+ 'chatapp/registration/channel': 'chatapp/registration/:registration/channel',
300
353
  'chatapp/registration/mailing': 'chatapp/registration/:registration/mailing',
354
+ 'chatapp/registrations': 'chatapp/registrations',
355
+ 'chatapp/registrations/lineup': 'chatapp/registrations/lineup',
356
+ 'chatapp/registrations/status': 'chatapp/registrations/status',
357
+ 'chatapp/registrations/channel': 'chatapp/registrations/channel',
358
+ 'chatapp/registrations/mailing': 'chatapp/registrations/mailing',
301
359
  'bitrix/registration': 'bitrix/registration/:registration',
360
+ 'bitrix/registration/lineup': 'bitrix/registration/:registration/lineup',
361
+ 'bitrix/registration/status': 'bitrix/registration/:registration/status',
362
+ 'bitrix/registrations': 'bitrix/registrations',
363
+ 'bitrix/registrations/lineup': 'bitrix/registrations/lineup',
364
+ 'bitrix/registrations/status': 'bitrix/registrations/status',
302
365
  'source': 'source',
303
366
  }),
304
367
  )
@@ -566,19 +629,58 @@ export const RouteParameters = Object.freeze(
566
629
  ':venue',
567
630
  ],
568
631
  'telegram/webhook': [],
632
+ 'telegram/registration': [
633
+ ':registration',
634
+ ],
635
+ 'telegram/registration/lineup': [
636
+ ':registration',
637
+ ],
638
+ 'telegram/registration/status': [
639
+ ':registration',
640
+ ],
569
641
  'telegram/registration/mailing': [
570
642
  ':registration',
571
643
  ],
644
+ 'telegram/registrations': [],
645
+ 'telegram/registrations/lineup': [],
646
+ 'telegram/registrations/status': [],
647
+ 'telegram/registrations/mailing': [],
572
648
  'chatapp/webhook': [],
573
649
  'chatapp/registration': [
574
650
  ':registration',
575
651
  ],
652
+ 'chatapp/registration/lineup': [
653
+ ':registration',
654
+ ],
655
+ 'chatapp/registration/status': [
656
+ ':registration',
657
+ ],
658
+ 'chatapp/registration/dialog': [
659
+ ':registration',
660
+ ],
661
+ 'chatapp/registration/channel': [
662
+ ':registration',
663
+ ],
576
664
  'chatapp/registration/mailing': [
577
665
  ':registration',
578
666
  ],
667
+ 'chatapp/registrations': [],
668
+ 'chatapp/registrations/lineup': [],
669
+ 'chatapp/registrations/status': [],
670
+ 'chatapp/registrations/channel': [],
671
+ 'chatapp/registrations/mailing': [],
579
672
  'bitrix/registration': [
580
673
  ':registration',
581
674
  ],
675
+ 'bitrix/registration/lineup': [
676
+ ':registration',
677
+ ],
678
+ 'bitrix/registration/status': [
679
+ ':registration',
680
+ ],
681
+ 'bitrix/registrations': [],
682
+ 'bitrix/registrations/lineup': [],
683
+ 'bitrix/registrations/status': [],
582
684
  'source': [],
583
685
  }),
584
686
  )
@@ -675,11 +777,32 @@ export const PathnameRoute = Object.freeze(
675
777
  'registrations/game/:game/theme/:theme/search': 'registrations/game/theme/search',
676
778
  'registrations/game/:game/venue/:venue/search': 'registrations/game/venue/search',
677
779
  'telegram/webhook': 'telegram/webhook',
780
+ 'telegram/registration/:registration': 'telegram/registration',
781
+ 'telegram/registration/:registration/lineup': 'telegram/registration/lineup',
782
+ 'telegram/registration/:registration/status': 'telegram/registration/status',
678
783
  'telegram/registration/:registration/mailing': 'telegram/registration/mailing',
784
+ 'telegram/registrations': 'telegram/registrations',
785
+ 'telegram/registrations/lineup': 'telegram/registrations/lineup',
786
+ 'telegram/registrations/status': 'telegram/registrations/status',
787
+ 'telegram/registrations/mailing': 'telegram/registrations/mailing',
679
788
  'chatapp/webhook': 'chatapp/webhook',
680
789
  'chatapp/registration/:registration': 'chatapp/registration',
790
+ 'chatapp/registration/:registration/lineup': 'chatapp/registration/lineup',
791
+ 'chatapp/registration/:registration/status': 'chatapp/registration/status',
792
+ 'chatapp/registration/:registration/dialog': 'chatapp/registration/dialog',
793
+ 'chatapp/registration/:registration/channel': 'chatapp/registration/channel',
681
794
  'chatapp/registration/:registration/mailing': 'chatapp/registration/mailing',
795
+ 'chatapp/registrations': 'chatapp/registrations',
796
+ 'chatapp/registrations/lineup': 'chatapp/registrations/lineup',
797
+ 'chatapp/registrations/status': 'chatapp/registrations/status',
798
+ 'chatapp/registrations/channel': 'chatapp/registrations/channel',
799
+ 'chatapp/registrations/mailing': 'chatapp/registrations/mailing',
682
800
  'bitrix/registration/:registration': 'bitrix/registration',
801
+ 'bitrix/registration/:registration/lineup': 'bitrix/registration/lineup',
802
+ 'bitrix/registration/:registration/status': 'bitrix/registration/status',
803
+ 'bitrix/registrations': 'bitrix/registrations',
804
+ 'bitrix/registrations/lineup': 'bitrix/registrations/lineup',
805
+ 'bitrix/registrations/status': 'bitrix/registrations/status',
683
806
  'source': 'source',
684
807
  }),
685
808
  )
@@ -947,19 +1070,58 @@ export const PathnameParameters = Object.freeze(
947
1070
  ':venue',
948
1071
  ],
949
1072
  'telegram/webhook': [],
1073
+ 'telegram/registration/:registration': [
1074
+ ':registration',
1075
+ ],
1076
+ 'telegram/registration/:registration/lineup': [
1077
+ ':registration',
1078
+ ],
1079
+ 'telegram/registration/:registration/status': [
1080
+ ':registration',
1081
+ ],
950
1082
  'telegram/registration/:registration/mailing': [
951
1083
  ':registration',
952
1084
  ],
1085
+ 'telegram/registrations': [],
1086
+ 'telegram/registrations/lineup': [],
1087
+ 'telegram/registrations/status': [],
1088
+ 'telegram/registrations/mailing': [],
953
1089
  'chatapp/webhook': [],
954
1090
  'chatapp/registration/:registration': [
955
1091
  ':registration',
956
1092
  ],
1093
+ 'chatapp/registration/:registration/lineup': [
1094
+ ':registration',
1095
+ ],
1096
+ 'chatapp/registration/:registration/status': [
1097
+ ':registration',
1098
+ ],
1099
+ 'chatapp/registration/:registration/dialog': [
1100
+ ':registration',
1101
+ ],
1102
+ 'chatapp/registration/:registration/channel': [
1103
+ ':registration',
1104
+ ],
957
1105
  'chatapp/registration/:registration/mailing': [
958
1106
  ':registration',
959
1107
  ],
1108
+ 'chatapp/registrations': [],
1109
+ 'chatapp/registrations/lineup': [],
1110
+ 'chatapp/registrations/status': [],
1111
+ 'chatapp/registrations/channel': [],
1112
+ 'chatapp/registrations/mailing': [],
960
1113
  'bitrix/registration/:registration': [
961
1114
  ':registration',
962
1115
  ],
1116
+ 'bitrix/registration/:registration/lineup': [
1117
+ ':registration',
1118
+ ],
1119
+ 'bitrix/registration/:registration/status': [
1120
+ ':registration',
1121
+ ],
1122
+ 'bitrix/registrations': [],
1123
+ 'bitrix/registrations/lineup': [],
1124
+ 'bitrix/registrations/status': [],
963
1125
  'source': [],
964
1126
  }),
965
1127
  )
@@ -1072,11 +1234,32 @@ export const RouteBreakdown = Object.freeze(
1072
1234
  'registrations/game/theme/search': 'registration/game/theme/search',
1073
1235
  'registrations/game/venue/search': 'registration/game/venue/search',
1074
1236
  'telegram/webhook': 'telegram/webhook',
1237
+ 'telegram/registration': 'telegram/registration',
1238
+ 'telegram/registration/lineup': 'telegram/registration/lineup',
1239
+ 'telegram/registration/status': 'telegram/registration/status',
1075
1240
  'telegram/registration/mailing': 'telegram/registration/mailing',
1241
+ 'telegram/registrations': 'telegram/registrations',
1242
+ 'telegram/registrations/lineup': 'telegram/registrations/lineup',
1243
+ 'telegram/registrations/status': 'telegram/registrations/status',
1244
+ 'telegram/registrations/mailing': 'telegram/registrations/mailing',
1076
1245
  'chatapp/webhook': 'chatapp/webhook',
1077
1246
  'chatapp/registration': 'chatapp/registration',
1247
+ 'chatapp/registration/lineup': 'chatapp/registration/lineup',
1248
+ 'chatapp/registration/status': 'chatapp/registration/status',
1249
+ 'chatapp/registration/dialog': 'chatapp/registration/dialog',
1250
+ 'chatapp/registration/channel': 'chatapp/registration/channel',
1078
1251
  'chatapp/registration/mailing': 'chatapp/registration/mailing',
1252
+ 'chatapp/registrations': 'chatapp/registrations',
1253
+ 'chatapp/registrations/lineup': 'chatapp/registrations/lineup',
1254
+ 'chatapp/registrations/status': 'chatapp/registrations/status',
1255
+ 'chatapp/registrations/channel': 'chatapp/registrations/channel',
1256
+ 'chatapp/registrations/mailing': 'chatapp/registrations/mailing',
1079
1257
  'bitrix/registration': 'bitrix/registration',
1258
+ 'bitrix/registration/lineup': 'bitrix/registration/lineup',
1259
+ 'bitrix/registration/status': 'bitrix/registration/status',
1260
+ 'bitrix/registrations': 'bitrix/registrations',
1261
+ 'bitrix/registrations/lineup': 'bitrix/registrations/lineup',
1262
+ 'bitrix/registrations/status': 'bitrix/registrations/status',
1080
1263
  'source': 'source',
1081
1264
  }),
1082
1265
  )
@@ -1214,11 +1397,32 @@ export const RouteRelation = Object.freeze(
1214
1397
  'registrations/game/theme/search': 'theme/search',
1215
1398
  'registrations/game/venue/search': 'venue/search',
1216
1399
  'telegram/webhook': 'telegram/webhook',
1400
+ 'telegram/registration': 'telegram/registration',
1401
+ 'telegram/registration/lineup': 'registration/lineup',
1402
+ 'telegram/registration/status': 'registration/status',
1217
1403
  'telegram/registration/mailing': 'registration/mailing',
1404
+ 'telegram/registrations': 'telegram/registration',
1405
+ 'telegram/registrations/lineup': 'registration/lineup',
1406
+ 'telegram/registrations/status': 'registration/status',
1407
+ 'telegram/registrations/mailing': 'registration/mailing',
1218
1408
  'chatapp/webhook': 'chatapp/webhook',
1219
1409
  'chatapp/registration': 'chatapp/registration',
1410
+ 'chatapp/registration/lineup': 'registration/lineup',
1411
+ 'chatapp/registration/status': 'registration/status',
1412
+ 'chatapp/registration/dialog': 'registration/dialog',
1413
+ 'chatapp/registration/channel': 'registration/channel',
1220
1414
  'chatapp/registration/mailing': 'registration/mailing',
1415
+ 'chatapp/registrations': 'chatapp/registration',
1416
+ 'chatapp/registrations/lineup': 'registration/lineup',
1417
+ 'chatapp/registrations/status': 'registration/status',
1418
+ 'chatapp/registrations/channel': 'registration/channel',
1419
+ 'chatapp/registrations/mailing': 'registration/mailing',
1221
1420
  'bitrix/registration': 'bitrix/registration',
1421
+ 'bitrix/registration/lineup': 'registration/lineup',
1422
+ 'bitrix/registration/status': 'registration/status',
1423
+ 'bitrix/registrations': 'bitrix/registration',
1424
+ 'bitrix/registrations/lineup': 'registration/lineup',
1425
+ 'bitrix/registrations/status': 'registration/status',
1222
1426
  'source': 'source',
1223
1427
  }),
1224
1428
  )
@@ -1315,11 +1519,32 @@ export const RouteService = Object.freeze(
1315
1519
  'registrations/game/theme/search': 'Registrations',
1316
1520
  'registrations/game/venue/search': 'Registrations',
1317
1521
  'telegram/webhook': 'Telegram',
1522
+ 'telegram/registration': 'Telegram',
1523
+ 'telegram/registration/lineup': 'Telegram',
1524
+ 'telegram/registration/status': 'Telegram',
1318
1525
  'telegram/registration/mailing': 'Telegram',
1526
+ 'telegram/registrations': 'Telegram',
1527
+ 'telegram/registrations/lineup': 'Telegram',
1528
+ 'telegram/registrations/status': 'Telegram',
1529
+ 'telegram/registrations/mailing': 'Telegram',
1319
1530
  'chatapp/webhook': 'Chatapp',
1320
1531
  'chatapp/registration': 'Chatapp',
1532
+ 'chatapp/registration/lineup': 'Chatapp',
1533
+ 'chatapp/registration/status': 'Chatapp',
1534
+ 'chatapp/registration/dialog': 'Chatapp',
1535
+ 'chatapp/registration/channel': 'Chatapp',
1321
1536
  'chatapp/registration/mailing': 'Chatapp',
1537
+ 'chatapp/registrations': 'Chatapp',
1538
+ 'chatapp/registrations/lineup': 'Chatapp',
1539
+ 'chatapp/registrations/status': 'Chatapp',
1540
+ 'chatapp/registrations/channel': 'Chatapp',
1541
+ 'chatapp/registrations/mailing': 'Chatapp',
1322
1542
  'bitrix/registration': 'Bitrix',
1543
+ 'bitrix/registration/lineup': 'Bitrix',
1544
+ 'bitrix/registration/status': 'Bitrix',
1545
+ 'bitrix/registrations': 'Bitrix',
1546
+ 'bitrix/registrations/lineup': 'Bitrix',
1547
+ 'bitrix/registrations/status': 'Bitrix',
1323
1548
  'source': 'Updates',
1324
1549
  }),
1325
1550
  )
@@ -1437,15 +1662,36 @@ export const ServiceRoutes = Object.freeze(
1437
1662
  ],
1438
1663
  'Telegram': [
1439
1664
  'telegram/webhook',
1665
+ 'telegram/registration',
1666
+ 'telegram/registration/lineup',
1667
+ 'telegram/registration/status',
1440
1668
  'telegram/registration/mailing',
1669
+ 'telegram/registrations',
1670
+ 'telegram/registrations/lineup',
1671
+ 'telegram/registrations/status',
1672
+ 'telegram/registrations/mailing',
1441
1673
  ],
1442
1674
  'Chatapp': [
1443
1675
  'chatapp/webhook',
1444
1676
  'chatapp/registration',
1677
+ 'chatapp/registration/lineup',
1678
+ 'chatapp/registration/status',
1679
+ 'chatapp/registration/dialog',
1680
+ 'chatapp/registration/channel',
1445
1681
  'chatapp/registration/mailing',
1682
+ 'chatapp/registrations',
1683
+ 'chatapp/registrations/lineup',
1684
+ 'chatapp/registrations/status',
1685
+ 'chatapp/registrations/channel',
1686
+ 'chatapp/registrations/mailing',
1446
1687
  ],
1447
1688
  'Bitrix': [
1448
1689
  'bitrix/registration',
1690
+ 'bitrix/registration/lineup',
1691
+ 'bitrix/registration/status',
1692
+ 'bitrix/registrations',
1693
+ 'bitrix/registrations/lineup',
1694
+ 'bitrix/registrations/status',
1449
1695
  ],
1450
1696
  'Updates': [
1451
1697
  'source',
@@ -2,213 +2,204 @@ import { Category } from './category.js'
2
2
  import { Mode } from './mode.js'
3
3
  import { Role } from './role.js'
4
4
 
5
- export const GameStatuses = Object.freeze(
6
- /** @type {const} */ ([
7
- 'APPROVED',
8
- 'ARCHIVE',
9
- 'CLOSED',
10
- 'FINISHED',
11
- 'FORINVITES',
12
- 'IS_RESERVE',
13
- 'MODERATION',
14
- 'PUBLISHED',
15
- 'REJECTED',
16
- ]),
17
- )
5
+ export const GameStatus = /** @type {const} */ ({
6
+ 'Approve': 'Approve',
7
+ 'Archive': 'Archive',
8
+ 'Close': 'Close',
9
+ 'Finish': 'Finish',
10
+ 'Invite': 'Invite',
11
+ 'Reserve': 'Reserve',
12
+ 'Moderate': 'Moderate',
13
+ 'Publish': 'Publish',
14
+ 'Reject': 'Reject',
15
+ })
18
16
 
19
- export const GameStatus = Object.freeze(
20
- /** @type {{ [x in typeof GameStatuses[number]]: x }} */ (
21
- GameStatuses.reduce(
22
- (o, x) => (o[x] = x, o),
23
- {},
24
- )
25
- ),
26
- )
17
+ export const GameStatuses = Object.values(GameStatus)
27
18
 
28
19
  export const RoleGameStatusGameStatuses = Object.freeze({
29
- [Role['admin']]: Object.freeze({
30
- [GameStatus['APPROVED']]: Object.freeze([
31
- GameStatus['APPROVED'],
32
- GameStatus['ARCHIVE'],
33
- GameStatus['CLOSED'],
34
- GameStatus['FINISHED'],
35
- GameStatus['FORINVITES'],
36
- GameStatus['IS_RESERVE'],
37
- GameStatus['MODERATION'],
38
- GameStatus['PUBLISHED'],
39
- GameStatus['REJECTED'],
20
+ [Role['Admin']]: Object.freeze({
21
+ [GameStatus['Approve']]: Object.freeze([
22
+ GameStatus['Approve'],
23
+ GameStatus['Archive'],
24
+ GameStatus['Close'],
25
+ GameStatus['Finish'],
26
+ GameStatus['Invite'],
27
+ GameStatus['Reserve'],
28
+ GameStatus['Moderate'],
29
+ GameStatus['Publish'],
30
+ GameStatus['Reject'],
40
31
  ]),
41
32
 
42
- [GameStatus['ARCHIVE']]: Object.freeze([
43
- GameStatus['APPROVED'],
44
- GameStatus['ARCHIVE'],
45
- GameStatus['CLOSED'],
46
- GameStatus['FINISHED'],
47
- GameStatus['FORINVITES'],
48
- GameStatus['IS_RESERVE'],
49
- GameStatus['MODERATION'],
50
- GameStatus['PUBLISHED'],
51
- GameStatus['REJECTED'],
33
+ [GameStatus['Archive']]: Object.freeze([
34
+ GameStatus['Approve'],
35
+ GameStatus['Archive'],
36
+ GameStatus['Close'],
37
+ GameStatus['Finish'],
38
+ GameStatus['Invite'],
39
+ GameStatus['Reserve'],
40
+ GameStatus['Moderate'],
41
+ GameStatus['Publish'],
42
+ GameStatus['Reject'],
52
43
  ]),
53
44
 
54
- [GameStatus['CLOSED']]: Object.freeze([
55
- GameStatus['APPROVED'],
56
- GameStatus['ARCHIVE'],
57
- GameStatus['CLOSED'],
58
- GameStatus['FINISHED'],
59
- GameStatus['FORINVITES'],
60
- GameStatus['IS_RESERVE'],
61
- GameStatus['MODERATION'],
62
- GameStatus['PUBLISHED'],
63
- GameStatus['REJECTED'],
45
+ [GameStatus['Close']]: Object.freeze([
46
+ GameStatus['Approve'],
47
+ GameStatus['Archive'],
48
+ GameStatus['Close'],
49
+ GameStatus['Finish'],
50
+ GameStatus['Invite'],
51
+ GameStatus['Reserve'],
52
+ GameStatus['Moderate'],
53
+ GameStatus['Publish'],
54
+ GameStatus['Reject'],
64
55
  ]),
65
56
 
66
- [GameStatus['FINISHED']]: Object.freeze([
67
- GameStatus['APPROVED'],
68
- GameStatus['ARCHIVE'],
69
- GameStatus['CLOSED'],
70
- GameStatus['FINISHED'],
71
- GameStatus['FORINVITES'],
72
- GameStatus['IS_RESERVE'],
73
- GameStatus['MODERATION'],
74
- GameStatus['PUBLISHED'],
75
- GameStatus['REJECTED'],
57
+ [GameStatus['Finish']]: Object.freeze([
58
+ GameStatus['Approve'],
59
+ GameStatus['Archive'],
60
+ GameStatus['Close'],
61
+ GameStatus['Finish'],
62
+ GameStatus['Invite'],
63
+ GameStatus['Reserve'],
64
+ GameStatus['Moderate'],
65
+ GameStatus['Publish'],
66
+ GameStatus['Reject'],
76
67
  ]),
77
68
 
78
- [GameStatus['FORINVITES']]: Object.freeze([
79
- GameStatus['APPROVED'],
80
- GameStatus['ARCHIVE'],
81
- GameStatus['CLOSED'],
82
- GameStatus['FINISHED'],
83
- GameStatus['FORINVITES'],
84
- GameStatus['IS_RESERVE'],
85
- GameStatus['MODERATION'],
86
- GameStatus['PUBLISHED'],
87
- GameStatus['REJECTED'],
69
+ [GameStatus['Invite']]: Object.freeze([
70
+ GameStatus['Approve'],
71
+ GameStatus['Archive'],
72
+ GameStatus['Close'],
73
+ GameStatus['Finish'],
74
+ GameStatus['Invite'],
75
+ GameStatus['Reserve'],
76
+ GameStatus['Moderate'],
77
+ GameStatus['Publish'],
78
+ GameStatus['Reject'],
88
79
  ]),
89
80
 
90
- [GameStatus['IS_RESERVE']]: Object.freeze([
91
- GameStatus['APPROVED'],
92
- GameStatus['ARCHIVE'],
93
- GameStatus['CLOSED'],
94
- GameStatus['FINISHED'],
95
- GameStatus['FORINVITES'],
96
- GameStatus['IS_RESERVE'],
97
- GameStatus['MODERATION'],
98
- GameStatus['PUBLISHED'],
99
- GameStatus['REJECTED'],
81
+ [GameStatus['Reserve']]: Object.freeze([
82
+ GameStatus['Approve'],
83
+ GameStatus['Archive'],
84
+ GameStatus['Close'],
85
+ GameStatus['Finish'],
86
+ GameStatus['Invite'],
87
+ GameStatus['Reserve'],
88
+ GameStatus['Moderate'],
89
+ GameStatus['Publish'],
90
+ GameStatus['Reject'],
100
91
  ]),
101
92
 
102
- [GameStatus['MODERATION']]: Object.freeze([
103
- GameStatus['APPROVED'],
104
- GameStatus['ARCHIVE'],
105
- GameStatus['CLOSED'],
106
- GameStatus['FINISHED'],
107
- GameStatus['FORINVITES'],
108
- GameStatus['IS_RESERVE'],
109
- GameStatus['MODERATION'],
110
- GameStatus['PUBLISHED'],
111
- GameStatus['REJECTED'],
93
+ [GameStatus['Moderate']]: Object.freeze([
94
+ GameStatus['Approve'],
95
+ GameStatus['Archive'],
96
+ GameStatus['Close'],
97
+ GameStatus['Finish'],
98
+ GameStatus['Invite'],
99
+ GameStatus['Reserve'],
100
+ GameStatus['Moderate'],
101
+ GameStatus['Publish'],
102
+ GameStatus['Reject'],
112
103
  ]),
113
104
 
114
- [GameStatus['PUBLISHED']]: Object.freeze([
115
- GameStatus['APPROVED'],
116
- GameStatus['ARCHIVE'],
117
- GameStatus['CLOSED'],
118
- GameStatus['FINISHED'],
119
- GameStatus['FORINVITES'],
120
- GameStatus['IS_RESERVE'],
121
- GameStatus['MODERATION'],
122
- GameStatus['PUBLISHED'],
123
- GameStatus['REJECTED'],
105
+ [GameStatus['Publish']]: Object.freeze([
106
+ GameStatus['Approve'],
107
+ GameStatus['Archive'],
108
+ GameStatus['Close'],
109
+ GameStatus['Finish'],
110
+ GameStatus['Invite'],
111
+ GameStatus['Reserve'],
112
+ GameStatus['Moderate'],
113
+ GameStatus['Publish'],
114
+ GameStatus['Reject'],
124
115
  ]),
125
116
 
126
- [GameStatus['REJECTED']]: Object.freeze([
127
- GameStatus['APPROVED'],
128
- GameStatus['ARCHIVE'],
129
- GameStatus['CLOSED'],
130
- GameStatus['FINISHED'],
131
- GameStatus['FORINVITES'],
132
- GameStatus['IS_RESERVE'],
133
- GameStatus['MODERATION'],
134
- GameStatus['PUBLISHED'],
135
- GameStatus['REJECTED'],
117
+ [GameStatus['Reject']]: Object.freeze([
118
+ GameStatus['Approve'],
119
+ GameStatus['Archive'],
120
+ GameStatus['Close'],
121
+ GameStatus['Finish'],
122
+ GameStatus['Invite'],
123
+ GameStatus['Reserve'],
124
+ GameStatus['Moderate'],
125
+ GameStatus['Publish'],
126
+ GameStatus['Reject'],
136
127
  ]),
137
128
  }),
138
129
 
139
- [Role['organizer']]: Object.freeze({
140
- [GameStatus['APPROVED']]: Object.freeze([
141
- GameStatus['CLOSED'],
142
- GameStatus['FORINVITES'],
143
- GameStatus['PUBLISHED'],
144
- GameStatus['IS_RESERVE'],
130
+ [Role['Organizer']]: Object.freeze({
131
+ [GameStatus['Approve']]: Object.freeze([
132
+ GameStatus['Close'],
133
+ GameStatus['Invite'],
134
+ GameStatus['Publish'],
135
+ GameStatus['Reserve'],
145
136
  ]),
146
137
 
147
- [GameStatus['ARCHIVE']]: Object.freeze([]),
138
+ [GameStatus['Archive']]: Object.freeze([]),
148
139
 
149
- [GameStatus['CLOSED']]: Object.freeze([]),
140
+ [GameStatus['Close']]: Object.freeze([]),
150
141
 
151
- [GameStatus['FINISHED']]: Object.freeze([]),
142
+ [GameStatus['Finish']]: Object.freeze([]),
152
143
 
153
- [GameStatus['FORINVITES']]: Object.freeze([]),
144
+ [GameStatus['Invite']]: Object.freeze([]),
154
145
 
155
- [GameStatus['IS_RESERVE']]: Object.freeze([]),
146
+ [GameStatus['Reserve']]: Object.freeze([]),
156
147
 
157
- [GameStatus['MODERATION']]: Object.freeze([]),
148
+ [GameStatus['Moderate']]: Object.freeze([]),
158
149
 
159
- [GameStatus['PUBLISHED']]: Object.freeze([
160
- GameStatus['CLOSED'],
161
- GameStatus['FORINVITES'],
162
- GameStatus['IS_RESERVE'],
150
+ [GameStatus['Publish']]: Object.freeze([
151
+ GameStatus['Close'],
152
+ GameStatus['Invite'],
153
+ GameStatus['Reserve'],
163
154
  ]),
164
155
 
165
- [GameStatus['REJECTED']]: Object.freeze([
166
- GameStatus['MODERATION'],
156
+ [GameStatus['Reject']]: Object.freeze([
157
+ GameStatus['Moderate'],
167
158
  ]),
168
159
  }),
169
160
 
170
161
  [Mode['Unknown']]: Object.freeze({
171
- [GameStatus['APPROVED']]: Object.freeze([]),
162
+ [GameStatus['Approve']]: Object.freeze([]),
172
163
 
173
- [GameStatus['ARCHIVE']]: Object.freeze([]),
164
+ [GameStatus['Archive']]: Object.freeze([]),
174
165
 
175
- [GameStatus['CLOSED']]: Object.freeze([]),
166
+ [GameStatus['Close']]: Object.freeze([]),
176
167
 
177
- [GameStatus['FINISHED']]: Object.freeze([]),
168
+ [GameStatus['Finish']]: Object.freeze([]),
178
169
 
179
- [GameStatus['FORINVITES']]: Object.freeze([]),
170
+ [GameStatus['Invite']]: Object.freeze([]),
180
171
 
181
- [GameStatus['IS_RESERVE']]: Object.freeze([]),
172
+ [GameStatus['Reserve']]: Object.freeze([]),
182
173
 
183
- [GameStatus['MODERATION']]: Object.freeze([]),
174
+ [GameStatus['Moderate']]: Object.freeze([]),
184
175
 
185
- [GameStatus['PUBLISHED']]: Object.freeze([]),
176
+ [GameStatus['Publish']]: Object.freeze([]),
186
177
 
187
- [GameStatus['REJECTED']]: Object.freeze([]),
178
+ [GameStatus['Reject']]: Object.freeze([]),
188
179
  }),
189
180
  })
190
181
 
191
182
  export const RoleGameStatuses = Object.freeze({
192
- [Role['admin']]: Object.freeze([
193
- GameStatus['APPROVED'],
194
- GameStatus['ARCHIVE'],
195
- GameStatus['CLOSED'],
196
- GameStatus['FINISHED'],
197
- GameStatus['FORINVITES'],
198
- GameStatus['IS_RESERVE'],
199
- GameStatus['MODERATION'],
200
- GameStatus['PUBLISHED'],
201
- GameStatus['REJECTED'],
183
+ [Role['Admin']]: Object.freeze([
184
+ GameStatus['Approve'],
185
+ GameStatus['Archive'],
186
+ GameStatus['Close'],
187
+ GameStatus['Finish'],
188
+ GameStatus['Invite'],
189
+ GameStatus['Reserve'],
190
+ GameStatus['Moderate'],
191
+ GameStatus['Publish'],
192
+ GameStatus['Reject'],
202
193
  ]),
203
194
 
204
- [Role['organizer']]: Object.freeze([
205
- GameStatus['ARCHIVE'],
206
- GameStatus['CLOSED'],
207
- GameStatus['FINISHED'],
208
- GameStatus['FORINVITES'],
209
- GameStatus['IS_RESERVE'],
210
- GameStatus['MODERATION'],
211
- GameStatus['PUBLISHED'],
195
+ [Role['Organizer']]: Object.freeze([
196
+ GameStatus['Archive'],
197
+ GameStatus['Close'],
198
+ GameStatus['Finish'],
199
+ GameStatus['Invite'],
200
+ GameStatus['Reserve'],
201
+ GameStatus['Moderate'],
202
+ GameStatus['Publish'],
212
203
  ]),
213
204
 
214
205
  [Mode['Unknown']]: Object.freeze([]),
@@ -216,29 +207,29 @@ export const RoleGameStatuses = Object.freeze({
216
207
 
217
208
  export const CategoryGameStatuses = Object.freeze({
218
209
  [Category['Active']]: Object.freeze([
219
- GameStatus['CLOSED'],
220
- GameStatus['FORINVITES'],
221
- GameStatus['IS_RESERVE'],
222
- GameStatus['PUBLISHED'],
210
+ GameStatus['Close'],
211
+ GameStatus['Invite'],
212
+ GameStatus['Reserve'],
213
+ GameStatus['Publish'],
223
214
  ]),
224
215
 
225
- [GameStatus['REJECTED']]: Object.freeze([
226
- GameStatus['REJECTED'],
216
+ [GameStatus['Reject']]: Object.freeze([
217
+ GameStatus['Reject'],
227
218
  ]),
228
219
 
229
- [GameStatus['MODERATION']]: Object.freeze([
230
- GameStatus['MODERATION'],
220
+ [GameStatus['Moderate']]: Object.freeze([
221
+ GameStatus['Moderate'],
231
222
  ]),
232
223
 
233
- [GameStatus['APPROVED']]: Object.freeze([
234
- GameStatus['APPROVED'],
224
+ [GameStatus['Approve']]: Object.freeze([
225
+ GameStatus['Approve'],
235
226
  ]),
236
227
 
237
- [GameStatus['FINISHED']]: Object.freeze([
238
- GameStatus['FINISHED'],
228
+ [GameStatus['Finish']]: Object.freeze([
229
+ GameStatus['Finish'],
239
230
  ]),
240
231
 
241
- [GameStatus['ARCHIVE']]: Object.freeze([
242
- GameStatus['ARCHIVE'],
232
+ [GameStatus['Archive']]: Object.freeze([
233
+ GameStatus['Archive'],
243
234
  ]),
244
235
  })
@@ -1,16 +1,16 @@
1
- export const RegistrationChannels = Object.freeze(
2
- /** @type {const} */ ([
3
- 'vkontakte',
4
- 'telegramBot',
5
- 'email',
6
- ]),
7
- )
1
+ export const RegistrationChannel = /** @type {const} */ ({
2
+ 'Vkontakte': 'Vkontakte',
3
+ 'Telegram': 'Telegram',
4
+ 'Email': 'Email',
5
+ })
8
6
 
9
- export const RegistrationChannel = Object.freeze(
10
- /** @type {{ [x in typeof RegistrationChannels[number]]: x }} */ (
11
- RegistrationChannels.reduce(
12
- (o, x) => (o[x] = x, o),
13
- {},
14
- )
15
- ),
16
- )
7
+ export const RegistrationChannels = Object.values(RegistrationChannel)
8
+
9
+ export const RegistrationConfirmedChannel = /** @type {const} */ ({
10
+ 'Vkontakte': 'Vkontakte',
11
+ 'Telegram': 'Telegram',
12
+ 'Email': 'Email',
13
+ 'Unspecified': 'Unspecified',
14
+ })
15
+
16
+ export const RegistrationConfirmedChannels = Object.values(RegistrationConfirmedChannel)
@@ -1,20 +1,9 @@
1
- export const Roles = Object.freeze(
2
- /** @type {const} */ ([
3
- 'admin',
4
- 'organizer',
5
- 'captain',
6
- 'player',
7
- 'user',
8
- 'manager',
9
- 'Service',
10
- ]),
11
- )
1
+ export const Role = /** @type {const} */ ({
2
+ 'Admin': 'Admin',
3
+ 'Organizer': 'Organizer',
4
+ 'Captain': 'Captain',
5
+ 'Player': 'Player',
6
+ 'Service': 'Service',
7
+ })
12
8
 
13
- export const Role = Object.freeze(
14
- /** @type {{ [x in typeof Roles[number]]: x }} */ (
15
- Roles.reduce(
16
- (o, x) => (o[x] = x, o),
17
- {},
18
- )
19
- ),
20
- )
9
+ export const Roles = Object.values(Role)
@@ -90,11 +90,32 @@ export const Routes = Object.freeze(
90
90
  'registrations/game/theme/search',
91
91
  'registrations/game/venue/search',
92
92
  'telegram/webhook',
93
+ 'telegram/registration',
94
+ 'telegram/registration/lineup',
95
+ 'telegram/registration/status',
93
96
  'telegram/registration/mailing',
97
+ 'telegram/registrations',
98
+ 'telegram/registrations/lineup',
99
+ 'telegram/registrations/status',
100
+ 'telegram/registrations/mailing',
94
101
  'chatapp/webhook',
95
102
  'chatapp/registration',
103
+ 'chatapp/registration/lineup',
104
+ 'chatapp/registration/status',
105
+ 'chatapp/registration/dialog',
106
+ 'chatapp/registration/channel',
96
107
  'chatapp/registration/mailing',
108
+ 'chatapp/registrations',
109
+ 'chatapp/registrations/lineup',
110
+ 'chatapp/registrations/status',
111
+ 'chatapp/registrations/channel',
112
+ 'chatapp/registrations/mailing',
97
113
  'bitrix/registration',
114
+ 'bitrix/registration/lineup',
115
+ 'bitrix/registration/status',
116
+ 'bitrix/registrations',
117
+ 'bitrix/registrations/lineup',
118
+ 'bitrix/registrations/status',
98
119
  'source',
99
120
  ]),
100
121
  )
@@ -487,6 +487,17 @@ export const Segments = Object.freeze(
487
487
  kind: 'Property',
488
488
  }),
489
489
  ),
490
+ Object.freeze(
491
+ /** @type {const} */ ({
492
+ key: 'dialog',
493
+ cardinality: '1',
494
+ singular: 'dialog',
495
+ plural: 'dialogs',
496
+ service: null,
497
+ pattern: null,
498
+ kind: 'Property',
499
+ }),
500
+ ),
490
501
  ]),
491
502
  )
492
503