@shakerquiz/utilities 4.0.37 → 4.0.38
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/package.json +1 -1
- package/scripts/codegen.js +7 -11
- package/source/codegen/autogenerated.js +20 -59
- package/source/entities/routes.js +0 -3
package/package.json
CHANGED
package/scripts/codegen.js
CHANGED
|
@@ -21,18 +21,14 @@ let parameters = pathname =>
|
|
|
21
21
|
.split('/')
|
|
22
22
|
.filter(x => x.includes(':'))
|
|
23
23
|
|
|
24
|
-
let breakdown = route =>
|
|
25
|
-
route
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
else if (Segment[x].cardinality === '1')
|
|
31
|
-
return x
|
|
32
|
-
else
|
|
33
|
-
return Segment[x].relation
|
|
34
|
-
})
|
|
24
|
+
let breakdown = route => {
|
|
25
|
+
let segments = route.split('/')
|
|
26
|
+
|
|
27
|
+
return segments
|
|
28
|
+
.slice(segments.length >= 3 ? -2 : 0)
|
|
29
|
+
.map(x => Segment[x].cardinality === '1' ? x : Segment[x].relation)
|
|
35
30
|
.join('/')
|
|
31
|
+
}
|
|
36
32
|
|
|
37
33
|
let service = route =>
|
|
38
34
|
route
|
|
@@ -44,7 +44,6 @@ export const RouteExcessiveCardinality = Object.freeze(
|
|
|
44
44
|
'themes/games': 'n/n',
|
|
45
45
|
'game': '1',
|
|
46
46
|
'game/status': '1/1',
|
|
47
|
-
'game/statuses': '1/n',
|
|
48
47
|
'game/city': '1/1',
|
|
49
48
|
'game/registrations': '1/n',
|
|
50
49
|
'game/registrations/status': '1/n/1',
|
|
@@ -65,12 +64,10 @@ export const RouteExcessiveCardinality = Object.freeze(
|
|
|
65
64
|
'games/venue': 'n/1',
|
|
66
65
|
'registration': '1',
|
|
67
66
|
'registration/status': '1/1',
|
|
68
|
-
'registration/statuses': '1/n',
|
|
69
67
|
'registration/creation': '1/1',
|
|
70
68
|
'registration/confirmation': '1/1',
|
|
71
69
|
'registration/cancellation': '1/1',
|
|
72
70
|
'registration/lineup': '1/1',
|
|
73
|
-
'registration/lineups': '1/n',
|
|
74
71
|
'registration/channel': '1/1',
|
|
75
72
|
'registration/export': '1/1',
|
|
76
73
|
'registration/city': '1/1',
|
|
@@ -140,7 +137,6 @@ export const RouteCardinality = Object.freeze(
|
|
|
140
137
|
'themes/games': 'n/n',
|
|
141
138
|
'game': '1',
|
|
142
139
|
'game/status': '1/1',
|
|
143
|
-
'game/statuses': '1/n',
|
|
144
140
|
'game/city': '1/1',
|
|
145
141
|
'game/registrations': '1/n',
|
|
146
142
|
'game/registrations/status': '1/1',
|
|
@@ -161,12 +157,10 @@ export const RouteCardinality = Object.freeze(
|
|
|
161
157
|
'games/venue': 'n/1',
|
|
162
158
|
'registration': '1',
|
|
163
159
|
'registration/status': '1/1',
|
|
164
|
-
'registration/statuses': '1/n',
|
|
165
160
|
'registration/creation': '1/1',
|
|
166
161
|
'registration/confirmation': '1/1',
|
|
167
162
|
'registration/cancellation': '1/1',
|
|
168
163
|
'registration/lineup': '1/1',
|
|
169
|
-
'registration/lineups': '1/n',
|
|
170
164
|
'registration/channel': '1/1',
|
|
171
165
|
'registration/export': '1/1',
|
|
172
166
|
'registration/city': '1/1',
|
|
@@ -236,7 +230,6 @@ export const RoutePathname = Object.freeze(
|
|
|
236
230
|
'themes/games': 'themes/games',
|
|
237
231
|
'game': 'game/:game',
|
|
238
232
|
'game/status': 'game/:game/status/:status',
|
|
239
|
-
'game/statuses': 'game/:game/statuses',
|
|
240
233
|
'game/city': 'game/:game/city/:city',
|
|
241
234
|
'game/registrations': 'game/:game/registrations',
|
|
242
235
|
'game/registrations/status': 'game/:game/registrations/status/:status',
|
|
@@ -257,12 +250,10 @@ export const RoutePathname = Object.freeze(
|
|
|
257
250
|
'games/venue': 'games/venue/:venue',
|
|
258
251
|
'registration': 'registration/:registration',
|
|
259
252
|
'registration/status': 'registration/:registration/status/:status',
|
|
260
|
-
'registration/statuses': 'registration/:registration/statuses',
|
|
261
253
|
'registration/creation': 'registration/:registration/creation',
|
|
262
254
|
'registration/confirmation': 'registration/:registration/confirmation',
|
|
263
255
|
'registration/cancellation': 'registration/:registration/cancellation',
|
|
264
256
|
'registration/lineup': 'registration/:registration/lineup',
|
|
265
|
-
'registration/lineups': 'registration/:registration/lineups',
|
|
266
257
|
'registration/channel': 'registration/:registration/channel',
|
|
267
258
|
'registration/export': 'registration/:registration/export',
|
|
268
259
|
'registration/city': 'registration/:registration/city/:city',
|
|
@@ -399,9 +390,6 @@ export const RouteParameters = Object.freeze(
|
|
|
399
390
|
':game',
|
|
400
391
|
':status',
|
|
401
392
|
],
|
|
402
|
-
'game/statuses': [
|
|
403
|
-
':game',
|
|
404
|
-
],
|
|
405
393
|
'game/city': [
|
|
406
394
|
':game',
|
|
407
395
|
':city',
|
|
@@ -462,9 +450,6 @@ export const RouteParameters = Object.freeze(
|
|
|
462
450
|
':registration',
|
|
463
451
|
':status',
|
|
464
452
|
],
|
|
465
|
-
'registration/statuses': [
|
|
466
|
-
':registration',
|
|
467
|
-
],
|
|
468
453
|
'registration/creation': [
|
|
469
454
|
':registration',
|
|
470
455
|
],
|
|
@@ -477,9 +462,6 @@ export const RouteParameters = Object.freeze(
|
|
|
477
462
|
'registration/lineup': [
|
|
478
463
|
':registration',
|
|
479
464
|
],
|
|
480
|
-
'registration/lineups': [
|
|
481
|
-
':registration',
|
|
482
|
-
],
|
|
483
465
|
'registration/channel': [
|
|
484
466
|
':registration',
|
|
485
467
|
],
|
|
@@ -592,7 +574,6 @@ export const PathnameRoute = Object.freeze(
|
|
|
592
574
|
'themes/games': 'themes/games',
|
|
593
575
|
'game/:game': 'game',
|
|
594
576
|
'game/:game/status/:status': 'game/status',
|
|
595
|
-
'game/:game/statuses': 'game/statuses',
|
|
596
577
|
'game/:game/city/:city': 'game/city',
|
|
597
578
|
'game/:game/registrations': 'game/registrations',
|
|
598
579
|
'game/:game/registrations/status/:status': 'game/registrations/status',
|
|
@@ -613,12 +594,10 @@ export const PathnameRoute = Object.freeze(
|
|
|
613
594
|
'games/venue/:venue': 'games/venue',
|
|
614
595
|
'registration/:registration': 'registration',
|
|
615
596
|
'registration/:registration/status/:status': 'registration/status',
|
|
616
|
-
'registration/:registration/statuses': 'registration/statuses',
|
|
617
597
|
'registration/:registration/creation': 'registration/creation',
|
|
618
598
|
'registration/:registration/confirmation': 'registration/confirmation',
|
|
619
599
|
'registration/:registration/cancellation': 'registration/cancellation',
|
|
620
600
|
'registration/:registration/lineup': 'registration/lineup',
|
|
621
|
-
'registration/:registration/lineups': 'registration/lineups',
|
|
622
601
|
'registration/:registration/channel': 'registration/channel',
|
|
623
602
|
'registration/:registration/export': 'registration/export',
|
|
624
603
|
'registration/:registration/city/:city': 'registration/city',
|
|
@@ -755,9 +734,6 @@ export const PathnameParameters = Object.freeze(
|
|
|
755
734
|
':game',
|
|
756
735
|
':status',
|
|
757
736
|
],
|
|
758
|
-
'game/:game/statuses': [
|
|
759
|
-
':game',
|
|
760
|
-
],
|
|
761
737
|
'game/:game/city/:city': [
|
|
762
738
|
':game',
|
|
763
739
|
':city',
|
|
@@ -818,9 +794,6 @@ export const PathnameParameters = Object.freeze(
|
|
|
818
794
|
':registration',
|
|
819
795
|
':status',
|
|
820
796
|
],
|
|
821
|
-
'registration/:registration/statuses': [
|
|
822
|
-
':registration',
|
|
823
|
-
],
|
|
824
797
|
'registration/:registration/creation': [
|
|
825
798
|
':registration',
|
|
826
799
|
],
|
|
@@ -833,9 +806,6 @@ export const PathnameParameters = Object.freeze(
|
|
|
833
806
|
'registration/:registration/lineup': [
|
|
834
807
|
':registration',
|
|
835
808
|
],
|
|
836
|
-
'registration/:registration/lineups': [
|
|
837
|
-
':registration',
|
|
838
|
-
],
|
|
839
809
|
'registration/:registration/channel': [
|
|
840
810
|
':registration',
|
|
841
811
|
],
|
|
@@ -929,24 +899,24 @@ export const RouteBreakdown = Object.freeze(
|
|
|
929
899
|
'user/password': 'user/password',
|
|
930
900
|
'user/role': 'user/role',
|
|
931
901
|
'user/city': 'user/city',
|
|
932
|
-
'user/cities': 'user/
|
|
902
|
+
'user/cities': 'user/city',
|
|
933
903
|
'users': 'user',
|
|
934
904
|
'users/password': 'user/password',
|
|
935
905
|
'users/role': 'user/role',
|
|
936
|
-
'users/cities': 'user/
|
|
906
|
+
'users/cities': 'user/city',
|
|
937
907
|
'checkin': 'checkin',
|
|
938
908
|
'cities': 'city',
|
|
939
909
|
'cities/country': 'city/country',
|
|
940
910
|
'cities/currency': 'city/currency',
|
|
941
911
|
'cities/timezone': 'city/timezone',
|
|
942
|
-
'cities/venues': 'city/
|
|
912
|
+
'cities/venues': 'city/venue',
|
|
943
913
|
'city': 'city',
|
|
944
914
|
'city/vk_group_token': 'city/vk_group_token',
|
|
945
915
|
'city/country': 'city/country',
|
|
946
916
|
'city/currency': 'city/currency',
|
|
947
917
|
'city/timezone': 'city/timezone',
|
|
948
918
|
'city/venue': 'city/venue',
|
|
949
|
-
'city/venues': 'city/
|
|
919
|
+
'city/venues': 'city/venue',
|
|
950
920
|
'country': 'country',
|
|
951
921
|
'countries': 'country',
|
|
952
922
|
'currency': 'currency',
|
|
@@ -962,56 +932,53 @@ export const RouteBreakdown = Object.freeze(
|
|
|
962
932
|
'theme/cover': 'theme/cover',
|
|
963
933
|
'themes': 'theme',
|
|
964
934
|
'themes/cover': 'theme/cover',
|
|
965
|
-
'themes/games': 'theme/
|
|
935
|
+
'themes/games': 'theme/game',
|
|
966
936
|
'game': 'game',
|
|
967
937
|
'game/status': 'game/status',
|
|
968
|
-
'game/statuses': 'game/statuses',
|
|
969
938
|
'game/city': 'game/city',
|
|
970
|
-
'game/registrations': 'game/
|
|
971
|
-
'game/registrations/status': '
|
|
972
|
-
'game/registrations/lineup': '
|
|
973
|
-
'game/registrations/export': '
|
|
939
|
+
'game/registrations': 'game/registration',
|
|
940
|
+
'game/registrations/status': 'registration/status',
|
|
941
|
+
'game/registrations/lineup': 'registration/lineup',
|
|
942
|
+
'game/registrations/export': 'registration/export',
|
|
974
943
|
'game/summary': 'game/summary',
|
|
975
944
|
'game/theme': 'game/theme',
|
|
976
|
-
'game/theme/cover': '
|
|
945
|
+
'game/theme/cover': 'theme/cover',
|
|
977
946
|
'game/venue': 'game/venue',
|
|
978
947
|
'games': 'game',
|
|
979
948
|
'games/status': 'game/status',
|
|
980
949
|
'games/city': 'game/city',
|
|
981
|
-
'games/registrations': 'game/
|
|
982
|
-
'games/registrations/export': '
|
|
950
|
+
'games/registrations': 'game/registration',
|
|
951
|
+
'games/registrations/export': 'registration/export',
|
|
983
952
|
'games/summary': 'game/summary',
|
|
984
953
|
'games/theme': 'game/theme',
|
|
985
|
-
'games/theme/cover': '
|
|
954
|
+
'games/theme/cover': 'theme/cover',
|
|
986
955
|
'games/venue': 'game/venue',
|
|
987
956
|
'registration': 'registration',
|
|
988
957
|
'registration/status': 'registration/status',
|
|
989
|
-
'registration/statuses': 'registration/statuses',
|
|
990
958
|
'registration/creation': 'registration/creation',
|
|
991
959
|
'registration/confirmation': 'registration/confirmation',
|
|
992
960
|
'registration/cancellation': 'registration/cancellation',
|
|
993
961
|
'registration/lineup': 'registration/lineup',
|
|
994
|
-
'registration/lineups': 'registration/lineups',
|
|
995
962
|
'registration/channel': 'registration/channel',
|
|
996
963
|
'registration/export': 'registration/export',
|
|
997
964
|
'registration/city': 'registration/city',
|
|
998
965
|
'registration/game': 'registration/game',
|
|
999
|
-
'registration/game/theme': '
|
|
1000
|
-
'registration/game/theme/cover': '
|
|
1001
|
-
'registration/game/venue': '
|
|
966
|
+
'registration/game/theme': 'game/theme',
|
|
967
|
+
'registration/game/theme/cover': 'theme/cover',
|
|
968
|
+
'registration/game/venue': 'game/venue',
|
|
1002
969
|
'registrations': 'registration',
|
|
1003
970
|
'registrations/status': 'registration/status',
|
|
1004
971
|
'registrations/lineup': 'registration/lineup',
|
|
1005
972
|
'registrations/city': 'registration/city',
|
|
1006
973
|
'registrations/game': 'registration/game',
|
|
1007
|
-
'registrations/game/status': '
|
|
1008
|
-
'registrations/game/theme': '
|
|
974
|
+
'registrations/game/status': 'game/status',
|
|
975
|
+
'registrations/game/theme': 'game/theme',
|
|
1009
976
|
'registrations/export': 'registration/export',
|
|
1010
977
|
'telegram/webhook': 'telegram/webhook',
|
|
1011
|
-
'telegram/registration/mailing': '
|
|
978
|
+
'telegram/registration/mailing': 'registration/mailing',
|
|
1012
979
|
'chatapp/webhook': 'chatapp/webhook',
|
|
1013
980
|
'chatapp/registration': 'chatapp/registration',
|
|
1014
|
-
'chatapp/registration/mailing': '
|
|
981
|
+
'chatapp/registration/mailing': 'registration/mailing',
|
|
1015
982
|
'bitrix/registration': 'bitrix/registration',
|
|
1016
983
|
'source': 'source',
|
|
1017
984
|
}),
|
|
@@ -1061,7 +1028,6 @@ export const RouteService = Object.freeze(
|
|
|
1061
1028
|
'themes/games': 'Themes',
|
|
1062
1029
|
'game': 'Games',
|
|
1063
1030
|
'game/status': 'Games',
|
|
1064
|
-
'game/statuses': 'Games',
|
|
1065
1031
|
'game/city': 'Games',
|
|
1066
1032
|
'game/registrations': 'Games',
|
|
1067
1033
|
'game/registrations/status': 'Games',
|
|
@@ -1082,12 +1048,10 @@ export const RouteService = Object.freeze(
|
|
|
1082
1048
|
'games/venue': 'Games',
|
|
1083
1049
|
'registration': 'Registrations',
|
|
1084
1050
|
'registration/status': 'Registrations',
|
|
1085
|
-
'registration/statuses': 'Registrations',
|
|
1086
1051
|
'registration/creation': 'Registrations',
|
|
1087
1052
|
'registration/confirmation': 'Registrations',
|
|
1088
1053
|
'registration/cancellation': 'Registrations',
|
|
1089
1054
|
'registration/lineup': 'Registrations',
|
|
1090
|
-
'registration/lineups': 'Registrations',
|
|
1091
1055
|
'registration/channel': 'Registrations',
|
|
1092
1056
|
'registration/export': 'Registrations',
|
|
1093
1057
|
'registration/city': 'Registrations',
|
|
@@ -1174,7 +1138,6 @@ export const ServiceRoutes = Object.freeze(
|
|
|
1174
1138
|
'Games': [
|
|
1175
1139
|
'game',
|
|
1176
1140
|
'game/status',
|
|
1177
|
-
'game/statuses',
|
|
1178
1141
|
'game/city',
|
|
1179
1142
|
'game/registrations',
|
|
1180
1143
|
'game/registrations/status',
|
|
@@ -1197,12 +1160,10 @@ export const ServiceRoutes = Object.freeze(
|
|
|
1197
1160
|
'Registrations': [
|
|
1198
1161
|
'registration',
|
|
1199
1162
|
'registration/status',
|
|
1200
|
-
'registration/statuses',
|
|
1201
1163
|
'registration/creation',
|
|
1202
1164
|
'registration/confirmation',
|
|
1203
1165
|
'registration/cancellation',
|
|
1204
1166
|
'registration/lineup',
|
|
1205
|
-
'registration/lineups',
|
|
1206
1167
|
'registration/channel',
|
|
1207
1168
|
'registration/export',
|
|
1208
1169
|
'registration/city',
|
|
@@ -42,7 +42,6 @@ export const Routes = Object.freeze(
|
|
|
42
42
|
'themes/games',
|
|
43
43
|
'game',
|
|
44
44
|
'game/status',
|
|
45
|
-
'game/statuses',
|
|
46
45
|
'game/city',
|
|
47
46
|
'game/registrations',
|
|
48
47
|
'game/registrations/status',
|
|
@@ -63,12 +62,10 @@ export const Routes = Object.freeze(
|
|
|
63
62
|
'games/venue',
|
|
64
63
|
'registration',
|
|
65
64
|
'registration/status',
|
|
66
|
-
'registration/statuses',
|
|
67
65
|
'registration/creation',
|
|
68
66
|
'registration/confirmation',
|
|
69
67
|
'registration/cancellation',
|
|
70
68
|
'registration/lineup',
|
|
71
|
-
'registration/lineups',
|
|
72
69
|
'registration/channel',
|
|
73
70
|
'registration/export',
|
|
74
71
|
'registration/city',
|