@shakerquiz/utilities 3.0.0 → 4.0.1

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 (116) hide show
  1. package/.github/workflows/publish.yml +32 -0
  2. package/package.json +5 -5
  3. package/scripts/route-cardinality.js +23 -0
  4. package/scripts/route-parameter.js +29 -0
  5. package/scripts/route-pathname.js +37 -0
  6. package/scripts/route-relation.js +26 -0
  7. package/scripts/route-service.js +25 -0
  8. package/scripts/templates/route-cardinality.js +5 -0
  9. package/scripts/templates/route-parameter.js +5 -0
  10. package/scripts/templates/route-pathname.js +7 -0
  11. package/scripts/templates/route-relation.js +5 -0
  12. package/scripts/templates/route-service.js +7 -0
  13. package/source/entities/blend.js +5 -0
  14. package/source/entities/cardinality.js +4 -0
  15. package/source/entities/category.js +4 -0
  16. package/source/entities/city-affilation.js +10 -0
  17. package/source/entities/city-chatapp-version.js +9 -0
  18. package/source/{enumerations/misc → entities}/constants.js +1 -1
  19. package/source/entities/display.js +4 -0
  20. package/source/entities/game-status.js +98 -0
  21. package/source/entities/gender.js +13 -0
  22. package/source/entities/icon.js +654 -0
  23. package/source/entities/key.js +41 -0
  24. package/source/{enumerations/core/methods.js → entities/method.js} +10 -4
  25. package/source/entities/mode.js +9 -0
  26. package/source/entities/network.js +9 -0
  27. package/source/entities/numerosity.js +5 -0
  28. package/source/entities/pattern.js +7 -0
  29. package/source/entities/phase.js +15 -0
  30. package/source/entities/quantifier.js +41 -0
  31. package/source/entities/registration-attribute.js +61 -0
  32. package/source/entities/registration-channel.js +11 -0
  33. package/source/entities/registration-lineup.js +14 -0
  34. package/source/entities/registration-mailing.js +20 -0
  35. package/source/entities/registration-status.js +19 -0
  36. package/source/entities/role.js +16 -0
  37. package/source/entities/route-cardinality.js +151 -0
  38. package/source/entities/route-parameter.js +151 -0
  39. package/source/entities/route-pathname.js +226 -0
  40. package/source/entities/route-relation.js +151 -0
  41. package/source/entities/route-service.js +181 -0
  42. package/source/entities/route.js +83 -0
  43. package/source/entities/runtime.js +6 -0
  44. package/source/entities/segment.js +255 -0
  45. package/source/entities/service-runtime.js +22 -0
  46. package/source/entities/service.js +22 -0
  47. package/source/entities/theme-status.js +9 -0
  48. package/source/entities/venue-audience.js +9 -0
  49. package/source/entities/venue-status.js +9 -0
  50. package/source/helpers/access.js +161 -0
  51. package/source/helpers/hydrate-route-pathname.js +29 -0
  52. package/source/helpers/tag.js +35 -0
  53. package/source/index.js +40 -34
  54. package/source/enumerations/core/features.js +0 -56
  55. package/source/enumerations/core/networks.js +0 -6
  56. package/source/enumerations/core/runtimes.js +0 -6
  57. package/source/enumerations/entities/affilation.js +0 -91
  58. package/source/enumerations/entities/cities-mode.js +0 -49
  59. package/source/enumerations/entities/city/timezone-mode.js +0 -44
  60. package/source/enumerations/entities/city/venues-mode.js +0 -60
  61. package/source/enumerations/entities/game-status.js +0 -130
  62. package/source/enumerations/entities/password-mode.js +0 -40
  63. package/source/enumerations/entities/registration-attribute.js +0 -83
  64. package/source/enumerations/entities/registration-channel.js +0 -26
  65. package/source/enumerations/entities/registration-lineup.js +0 -75
  66. package/source/enumerations/entities/registration-mailing.js +0 -24
  67. package/source/enumerations/entities/registration-status.js +0 -89
  68. package/source/enumerations/entities/role-mode.js +0 -40
  69. package/source/enumerations/entities/role.js +0 -82
  70. package/source/enumerations/entities/venue/audience.js +0 -100
  71. package/source/enumerations/entities/venue/city-mode.js +0 -44
  72. package/source/enumerations/entities/venue/status.js +0 -53
  73. package/source/enumerations/entities/version.js +0 -76
  74. package/source/enumerations/misc/icons.js +0 -655
  75. package/source/enumerations/misc/keys.js +0 -15
  76. package/source/enumerations/misc/phases.js +0 -42
  77. package/source/enumerations/misc/regexps.js +0 -5
  78. package/source/enumerations/misc/routes.js +0 -610
  79. package/source/functions/tag.d.ts +0 -1
  80. package/source/functions/tag.js +0 -5
  81. package/source/schemas/PATCH/city/admin.json +0 -126
  82. package/source/schemas/PATCH/city/currency/admin.json +0 -173
  83. package/source/schemas/PATCH/city/timezone/admin.json +0 -501
  84. package/source/schemas/PATCH/game/admin.json +0 -30
  85. package/source/schemas/PATCH/game/organizer.json +0 -30
  86. package/source/schemas/PATCH/registration/admin.json +0 -43
  87. package/source/schemas/PATCH/registration/cancellation/default.json +0 -12
  88. package/source/schemas/PATCH/registration/channel/default.json +0 -22
  89. package/source/schemas/PATCH/registration/confirmation/default.json +0 -12
  90. package/source/schemas/PATCH/registration/default.json +0 -10
  91. package/source/schemas/PATCH/registration/organizer.json +0 -43
  92. package/source/schemas/PATCH/theme/admin.json +0 -19
  93. package/source/schemas/PATCH/user/admin.json +0 -30
  94. package/source/schemas/PATCH/user/cities/admin.json +0 -17
  95. package/source/schemas/PATCH/user/password/admin.json +0 -12
  96. package/source/schemas/PATCH/user/role/admin.json +0 -13
  97. package/source/schemas/PATCH/venue/admin.json +0 -44
  98. package/source/schemas/PATCH/venue/organizer.json +0 -44
  99. package/source/schemas/POST/checkin/default.json +0 -16
  100. package/source/schemas/POST/city/admin.json +0 -696
  101. package/source/schemas/POST/game/admin.json +0 -27
  102. package/source/schemas/POST/game/organizer.json +0 -27
  103. package/source/schemas/POST/game/registrations/export/admin.json +0 -17
  104. package/source/schemas/POST/game/registrations/export/organizer.json +0 -17
  105. package/source/schemas/POST/registration/default.json +0 -125
  106. package/source/schemas/POST/registration/mailing/admin.json +0 -16
  107. package/source/schemas/POST/registration/mailing/organizer.json +0 -16
  108. package/source/schemas/POST/registrations/export/admin.json +0 -17
  109. package/source/schemas/POST/registrations/export/organizer.json +0 -17
  110. package/source/schemas/POST/theme/admin.json +0 -24
  111. package/source/schemas/POST/user/admin.json +0 -12
  112. package/source/schemas/POST/user/cities/admin.json +0 -17
  113. package/source/schemas/POST/user/password/admin.json +0 -12
  114. package/source/schemas/POST/user/role/admin.json +0 -13
  115. package/source/schemas/POST/venue/admin.json +0 -38
  116. package/source/schemas/POST/venue/organizer.json +0 -38
@@ -1,42 +0,0 @@
1
- export var Phase = /** @type {const} */ ({
2
- 'Idle': 'Idle',
3
- 'Loading': 'Loading',
4
- 'Loaded': 'Loaded',
5
- 'Aborted': 'Aborted',
6
- 'Failed': 'Failed',
7
- })
8
-
9
- export var Phases = Object.values(Phase)
10
-
11
- export var PhaseWieght = {
12
- [Phase.Idle]: 0,
13
- [Phase.Loading]: 1,
14
- [Phase.Loaded]: 2,
15
- [Phase.Aborted]: 3,
16
- [Phase.Failed]: 4,
17
- }
18
-
19
- export var PhaseTitle = {
20
- [Phase.Idle]: 'Простой',
21
- [Phase.Loading]: 'В процессе',
22
- [Phase.Loaded]: 'Завершено',
23
- [Phase.Aborted]: 'Оборвано',
24
- [Phase.Failed]: 'Ошибка',
25
- }
26
-
27
- /** @type {Record<Phase, Icon>} */
28
- export var PhaseIcon = {
29
- [Phase.Idle]: 'hero/outline/clock',
30
- [Phase.Loading]: 'hero/outline/clock',
31
- [Phase.Loaded]: 'hero/outline/check',
32
- [Phase.Aborted]: 'hero/outline/x-mark',
33
- [Phase.Failed]: 'hero/outline/x-mark',
34
- }
35
-
36
- export var PhaseColor = {
37
- [Phase.Idle]: 'text-default',
38
- [Phase.Loading]: 'text-default',
39
- [Phase.Loaded]: 'text-success',
40
- [Phase.Aborted]: 'text-warning',
41
- [Phase.Failed]: 'text-danger',
42
- }
@@ -1,5 +0,0 @@
1
- export var RegExps = {
2
- Uuid: /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/,
3
- ElementId: /\d+:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:\d+/,
4
- Jwt: /^[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*$/,
5
- }
@@ -1,610 +0,0 @@
1
- export var Service = /** @type {const} */ ({
2
- 'Users': 'Users',
3
- 'Roles': 'Roles',
4
- 'Checkin': 'Checkin',
5
- 'Locations': 'Locations',
6
- 'Cities': 'Cities',
7
- 'Venues': 'Venues',
8
- 'Themes': 'Themes',
9
- 'Games': 'Games',
10
- 'Registrations': 'Registrations',
11
- 'Files': 'Files',
12
- 'Procedures': 'Procedures',
13
- 'Integrations': 'Integrations',
14
- 'Updates': 'Updates',
15
- 'Hub': 'Hub',
16
- 'Landing': 'Landing',
17
- 'Vkma': 'Vkma',
18
- })
19
-
20
- export var Services = Object.values(Service)
21
-
22
- export var SingularRoute = /** @type {const} */ ({
23
- 'user': 'user',
24
- 'user/password': 'user/password',
25
- 'user/role': 'user/role',
26
- 'user/cities': 'user/cities',
27
- 'role': 'role',
28
- 'checkin': 'checkin',
29
- 'country': 'country',
30
- 'currency': 'currency',
31
- 'timezone': 'timezone',
32
- 'city': 'city',
33
- 'city/country': 'city/country',
34
- 'city/currency': 'city/currency',
35
- 'city/timezone': 'city/timezone',
36
- 'city/venues': 'city/venues',
37
- 'venue': 'venue',
38
- 'venue/city': 'venue/city',
39
- 'theme': 'theme',
40
- 'theme/cover': 'theme/cover',
41
- 'game': 'game',
42
- 'game/city': 'game/city',
43
- 'game/venue': 'game/venue',
44
- 'game/theme': 'game/theme',
45
- 'game/registrations': 'game/registrations',
46
- 'game/registrations/export': 'game/registrations/export',
47
- 'game/summary': 'game/summary',
48
- 'registration': 'registration',
49
- 'registration/game': 'registration/game',
50
- 'registration/mailing': 'registration/mailing',
51
- 'registration/channel': 'registration/channel',
52
- 'registration/confirmation': 'registration/confirmation',
53
- 'registration/cancellation': 'registration/cancellation',
54
- 'registration/export': 'registration/export',
55
- })
56
-
57
- export var SingularRoutes = Object.values(SingularRoute)
58
-
59
- export var PluralRoute = /** @type {const} */ ({
60
- 'users': 'users',
61
- 'users/password': 'users/password',
62
- 'users/role': 'users/role',
63
- 'users/cities': 'users/cities',
64
- 'roles': 'roles',
65
- 'checkins': 'checkins',
66
- 'countries': 'countries',
67
- 'currencies': 'currencies',
68
- 'timezones': 'timezones',
69
- 'cities': 'cities',
70
- 'cities/country': 'cities/country',
71
- 'cities/currency': 'cities/currency',
72
- 'cities/timezone': 'cities/timezone',
73
- 'cities/venues': 'cities/venues',
74
- 'venues': 'venues',
75
- 'venues/city': 'venues/city',
76
- 'themes': 'themes',
77
- 'themes/cover': 'themes/cover',
78
- 'games': 'games',
79
- 'games/city': 'games/city',
80
- 'games/venue': 'games/venue',
81
- 'games/theme': 'games/theme',
82
- 'games/registrations': 'games/registrations',
83
- 'games/registrations/export': 'games/registrations/export',
84
- 'games/summary': 'games/summary',
85
- 'registrations': 'registrations',
86
- 'registrations/export': 'registrations/export',
87
- })
88
-
89
- export var PluralRoutes = Object.values(PluralRoute)
90
-
91
- export var Route = {
92
- ...SingularRoute,
93
- ...PluralRoute,
94
- }
95
-
96
- export var SingularPluralRouteRelation = {
97
- [Route['user']]: Route['users'],
98
- [Route['user/password']]: Route['users/password'],
99
- [Route['user/role']]: Route['users/role'],
100
- [Route['user/cities']]: Route['users/cities'],
101
- [Route['role']]: Route['roles'],
102
- [Route['checkin']]: Route['checkins'],
103
- [Route['country']]: Route['countries'],
104
- [Route['currency']]: Route['currencies'],
105
- [Route['timezone']]: Route['timezones'],
106
- [Route['city']]: Route['cities'],
107
- [Route['city/country']]: Route['cities/country'],
108
- [Route['city/currency']]: Route['cities/currency'],
109
- [Route['city/timezone']]: Route['cities/timezone'],
110
- [Route['city/venues']]: Route['cities/venues'],
111
- [Route['venue']]: Route['venues'],
112
- [Route['venue/city']]: Route['venues/city'],
113
- [Route['theme']]: Route['themes'],
114
- [Route['theme/cover']]: Route['themes/cover'],
115
- [Route['game']]: Route['games'],
116
- [Route['game/city']]: Route['games/city'],
117
- [Route['game/venue']]: Route['games/venue'],
118
- [Route['game/theme']]: Route['games/theme'],
119
- [Route['game/registrations']]: Route['games/registrations'],
120
- [Route['game/registrations/export']]: Route['games/registrations/export'],
121
- [Route['game/summary']]: Route['games/summary'],
122
- [Route['registration']]: Route['registrations'],
123
- [Route['registration/export']]: Route['registrations/export'],
124
- }
125
-
126
- export var PluralSingularRouteRelation = {
127
- [Route['roles']]: Route['role'],
128
- [Route['users']]: Route['user'],
129
- [Route['users/role']]: Route['user/role'],
130
- [Route['users/cities']]: Route['user/cities'],
131
- [Route['checkins']]: Route['checkin'],
132
- [Route['countries']]: Route['country'],
133
- [Route['currencies']]: Route['currency'],
134
- [Route['timezones']]: Route['timezone'],
135
- [Route['cities']]: Route['city'],
136
- [Route['cities/country']]: Route['city/country'],
137
- [Route['cities/currency']]: Route['city/currency'],
138
- [Route['cities/timezone']]: Route['city/timezone'],
139
- [Route['cities/venues']]: Route['city/venues'],
140
- [Route['venues']]: Route['venue'],
141
- [Route['venues/city']]: Route['venue/city'],
142
- [Route['themes']]: Route['theme'],
143
- [Route['themes/cover']]: Route['theme/cover'],
144
- [Route['games']]: Route['game'],
145
- [Route['games/city']]: Route['game/city'],
146
- [Route['games/venue']]: Route['game/venue'],
147
- [Route['games/theme']]: Route['game/theme'],
148
- [Route['games/registrations']]: Route['game/registrations'],
149
- [Route['games/registrations/export']]: Route['game/registrations/export'],
150
- [Route['games/summary']]: Route['game/summary'],
151
- [Route['registrations']]: Route['registration'],
152
- [Route['registrations/export']]: Route['registration/export'],
153
- }
154
-
155
- export var Routes = Object.values(Route)
156
-
157
- export var RoutePathname = /** @type {const} */ ({
158
- [Route['user']]: 'user/:user',
159
- [Route['user/password']]: 'user/:user/password',
160
- [Route['user/role']]: 'user/:user/role',
161
- [Route['user/cities']]: 'user/:user/cities',
162
-
163
- [Route['users']]: 'users',
164
- [Route['users/role']]: 'users/role',
165
- [Route['users/cities']]: 'users/cities',
166
-
167
- [Route['role']]: 'role/:role',
168
-
169
- [Route['roles']]: 'roles',
170
-
171
- [Route['checkin']]: 'checkin',
172
-
173
- [Route['checkins']]: 'checkins',
174
-
175
- [Route['country']]: 'country/:country',
176
-
177
- [Route['countries']]: 'countries',
178
-
179
- [Route['currency']]: 'currency/:currency',
180
-
181
- [Route['currencies']]: 'currencies',
182
-
183
- [Route['timezone']]: 'timezone/:timezone',
184
-
185
- [Route['timezones']]: 'timezones',
186
-
187
- [Route['city']]: 'city/:city',
188
- [Route['city/country']]: 'city/:city/country',
189
- [Route['city/currency']]: 'city/:city/currency',
190
- [Route['city/timezone']]: 'city/:city/timezone',
191
- [Route['city/venues']]: 'city/:city/venues',
192
-
193
- [Route['cities']]: 'cities',
194
- [Route['cities/country']]: 'cities/country',
195
- [Route['cities/currency']]: 'cities/currency',
196
- [Route['cities/timezone']]: 'cities/timezone',
197
- [Route['cities/venues']]: 'cities/venues',
198
-
199
- [Route['venue']]: 'venue/:venue',
200
- [Route['venue/city']]: 'venue/:venue/city',
201
-
202
- [Route['venues']]: 'venues',
203
- [Route['venues/city']]: 'venues/city',
204
-
205
- [Route['theme']]: 'theme/:theme',
206
- [Route['theme/cover']]: 'theme/:theme/cover',
207
-
208
- [Route['themes']]: 'themes',
209
- [Route['themes/cover']]: 'themes/cover',
210
-
211
- [Route['game']]: 'game/:game',
212
- [Route['game/city']]: 'game/:game/city',
213
- [Route['game/venue']]: 'game/:game/venue',
214
- [Route['game/theme']]: 'game/:game/theme',
215
- [Route['game/registrations']]: 'game/:game/registrations',
216
- [Route['game/registrations/export']]: 'game/:game/registrations/export',
217
- [Route['game/summary']]: 'game/:game/summary',
218
-
219
- [Route['games']]: 'games',
220
- [Route['games/city']]: 'games/city',
221
- [Route['games/venue']]: 'games/venue',
222
- [Route['games/theme']]: 'games/theme',
223
- [Route['games/registrations']]: 'games/registrations',
224
- [Route['games/registrations/export']]: 'games/registrations/export',
225
- [Route['games/summary']]: 'games/summary',
226
-
227
- [Route['registration']]: 'registration/:registration',
228
- [Route['registration/game']]: 'registration/:registration/game',
229
- [Route['registration/mailing']]: 'registration/:registration/mailing',
230
- [Route['registration/channel']]: 'registration/:registration/channel',
231
- [Route['registration/confirmation']]: 'registration/:registration/confirmation',
232
- [Route['registration/cancellation']]: 'registration/:registration/cancellation',
233
- [Route['registration/export']]: 'registration/:registration/export',
234
-
235
- [Route['registrations']]: 'registrations',
236
- [Route['registrations/export']]: 'registrations/export',
237
- })
238
-
239
- export var RoutePathnames = Object.values(RoutePathname)
240
-
241
- export var RouteParams = /** @type {const} */ ({
242
- [Route['user']]: [':user'],
243
- [Route['user/password']]: [':user'],
244
- [Route['user/role']]: [':user'],
245
- [Route['user/cities']]: [':user'],
246
-
247
- [Route['users']]: [],
248
- [Route['users/role']]: [],
249
- [Route['users/cities']]: [],
250
-
251
- [Route['role']]: [':role'],
252
-
253
- [Route['roles']]: [],
254
-
255
- [Route['checkin']]: [],
256
-
257
- [Route['checkins']]: [],
258
-
259
- [Route['country']]: [':country'],
260
-
261
- [Route['countries']]: [],
262
-
263
- [Route['currency']]: [':currency'],
264
-
265
- [Route['currencies']]: [],
266
-
267
- [Route['timezone']]: [':timezone'],
268
-
269
- [Route['timezones']]: [],
270
-
271
- [Route['city']]: [':city'],
272
- [Route['city/country']]: [':city'],
273
- [Route['city/currency']]: [':city'],
274
- [Route['city/timezone']]: [':city'],
275
- [Route['city/venues']]: [':city'],
276
-
277
- [Route['cities']]: [],
278
- [Route['cities/country']]: [],
279
- [Route['cities/currency']]: [],
280
- [Route['cities/timezone']]: [],
281
- [Route['cities/venues']]: [],
282
-
283
- [Route['venue']]: [':venue'],
284
- [Route['venue/city']]: [':venue'],
285
-
286
- [Route['venues']]: [],
287
- [Route['venues/city']]: [],
288
-
289
- [Route['theme']]: [':theme'],
290
- [Route['theme/cover']]: [':theme'],
291
-
292
- [Route['themes']]: [],
293
- [Route['themes/cover']]: [],
294
-
295
- [Route['game']]: [':game'],
296
- [Route['game/city']]: [':game'],
297
- [Route['game/venue']]: [':game'],
298
- [Route['game/theme']]: [':game'],
299
- [Route['game/registrations']]: [':game'],
300
- [Route['game/registrations/export']]: [':game'],
301
- [Route['game/summary']]: [':game'],
302
-
303
- [Route['games']]: [],
304
- [Route['games/city']]: [],
305
- [Route['games/venue']]: [],
306
- [Route['games/theme']]: [],
307
- [Route['games/registrations']]: [],
308
- [Route['games/registrations/export']]: [],
309
- [Route['games/summary']]: [],
310
-
311
- [Route['registration']]: [':registration'],
312
- [Route['registration/game']]: [':registration'],
313
- [Route['registration/mailing']]: [':registration'],
314
- [Route['registration/channel']]: [':registration'],
315
- [Route['registration/confirmation']]: [':registration'],
316
- [Route['registration/cancellation']]: [':registration'],
317
- [Route['registration/export']]: [':registration'],
318
-
319
- [Route['registrations']]: [],
320
- [Route['registrations/export']]: [],
321
- })
322
-
323
- export var RouteService = {
324
- [Route['user']]: Service.Users,
325
- [Route['user/password']]: Service.Users,
326
- [Route['user/role']]: Service.Users,
327
- [Route['user/cities']]: Service.Users,
328
-
329
- [Route['users']]: Service.Users,
330
- [Route['users/role']]: Service.Users,
331
- [Route['users/cities']]: Service.Users,
332
-
333
- [Route['role']]: Service.Roles,
334
-
335
- [Route['roles']]: Service.Roles,
336
-
337
- [Route['checkin']]: Service.Checkin,
338
-
339
- [Route['country']]: Service.Locations,
340
-
341
- [Route['countries']]: Service.Locations,
342
-
343
- [Route['currency']]: Service.Locations,
344
-
345
- [Route['currencies']]: Service.Locations,
346
-
347
- [Route['timezone']]: Service.Locations,
348
-
349
- [Route['timezones']]: Service.Locations,
350
-
351
- [Route['city']]: Service.Cities,
352
- [Route['city/country']]: Service.Cities,
353
- [Route['city/currency']]: Service.Cities,
354
- [Route['city/timezone']]: Service.Cities,
355
- [Route['city/venues']]: Service.Cities,
356
-
357
- [Route['cities']]: Service.Cities,
358
- [Route['cities/country']]: Service.Cities,
359
- [Route['cities/currency']]: Service.Cities,
360
- [Route['cities/timezone']]: Service.Cities,
361
- [Route['cities/venues']]: Service.Cities,
362
-
363
- [Route['venue']]: Service.Venues,
364
- [Route['venue/city']]: Service.Venues,
365
-
366
- [Route['venues']]: Service.Venues,
367
- [Route['venues/city']]: Service.Venues,
368
-
369
- [Route['theme']]: Service.Themes,
370
- [Route['theme/cover']]: Service.Themes,
371
-
372
- [Route['themes']]: Service.Themes,
373
- [Route['themes/cover']]: Service.Themes,
374
-
375
- [Route['game']]: Service.Games,
376
- [Route['game/city']]: Service.Games,
377
- [Route['game/venue']]: Service.Games,
378
- [Route['game/theme']]: Service.Games,
379
- [Route['game/registrations']]: Service.Games,
380
- [Route['game/registrations/export']]: Service.Games,
381
- [Route['game/summary']]: Service.Games,
382
-
383
- [Route['games']]: Service.Games,
384
- [Route['games/city']]: Service.Games,
385
- [Route['games/venue']]: Service.Games,
386
- [Route['games/theme']]: Service.Games,
387
- [Route['games/registrations']]: Service.Games,
388
- [Route['games/registrations/export']]: Service.Games,
389
- [Route['games/summary']]: Service.Games,
390
-
391
- [Route['registration']]: Service.Registrations,
392
- [Route['registration/game']]: Service.Registrations,
393
- [Route['registration/mailing']]: Service.Registrations,
394
- [Route['registration/channel']]: Service.Registrations,
395
- [Route['registration/confirmation']]: Service.Registrations,
396
- [Route['registration/cancellation']]: Service.Registrations,
397
-
398
- [Route['registrations']]: Service.Registrations,
399
- [Route['registrations/export']]: Service.Registrations,
400
- }
401
-
402
- export var ServiceRoutes = {
403
- [Service.Users]: [
404
- Route['user'],
405
- Route['user/password'],
406
- Route['user/role'],
407
- Route['user/cities'],
408
- Route['users'],
409
- Route['users/role'],
410
- Route['users/cities'],
411
- ],
412
-
413
- [Service.Roles]: [
414
- Route['role'],
415
- Route['roles'],
416
- ],
417
-
418
- [Service.Checkin]: [
419
- Route['checkin'],
420
- ],
421
-
422
- [Service.Locations]: [
423
- Route['country'],
424
- Route['countries'],
425
- Route['currency'],
426
- Route['currencies'],
427
- Route['timezone'],
428
- Route['timezones'],
429
- ],
430
-
431
- [Service.Cities]: [
432
- Route['city'],
433
- Route['city/country'],
434
- Route['city/currency'],
435
- Route['city/timezone'],
436
- Route['city/venues'],
437
- Route['cities'],
438
- Route['cities/country'],
439
- Route['cities/currency'],
440
- Route['cities/timezone'],
441
- Route['cities/venues'],
442
- ],
443
-
444
- [Service.Venues]: [
445
- Route['venue'],
446
- Route['venue/city'],
447
- Route['venues'],
448
- Route['venues/city'],
449
- ],
450
-
451
- [Service.Themes]: [
452
- Route['theme'],
453
- Route['theme/cover'],
454
- Route['themes'],
455
- Route['themes/cover'],
456
- ],
457
-
458
- [Service.Games]: [
459
- Route['game'],
460
- Route['game/city'],
461
- Route['game/venue'],
462
- Route['game/theme'],
463
- Route['game/registrations'],
464
- Route['game/registrations/export'],
465
- Route['game/summary'],
466
- Route['games'],
467
- Route['games/city'],
468
- Route['games/venue'],
469
- Route['games/theme'],
470
- Route['games/registrations'],
471
- Route['games/registrations/export'],
472
- Route['games/summary'],
473
- ],
474
-
475
- [Service.Registrations]: [
476
- Route['registration'],
477
- Route['registration/game'],
478
- Route['registration/mailing'],
479
- Route['registration/channel'],
480
- Route['registration/confirmation'],
481
- Route['registration/cancellation'],
482
- Route['registrations'],
483
- Route['registrations/export'],
484
- ],
485
-
486
- [Service.Procedures]: [],
487
-
488
- [Service.Integrations]: [],
489
-
490
- [Service.Updates]: [],
491
-
492
- [Service.Hub]: [],
493
-
494
- [Service.Landing]: [],
495
-
496
- [Service.Vkma]: [],
497
- }
498
-
499
- /**
500
- * @param {keyof Route} value
501
- */
502
- export var getRoute = value => {
503
- if (!(value in Route))
504
- throw TypeError(`[getRoute] Route '${value}' must be a member of Route.`)
505
-
506
- return Route[value]
507
- }
508
-
509
- /**
510
- * @param {keyof Route} value
511
- */
512
- export var getRouteKind = value => {
513
- var route = getRoute(value)
514
-
515
- if (SingularRoutes.includes(route))
516
- return 'Singular'
517
- else if (PluralRoutes.includes(route))
518
- return 'Plural'
519
- else
520
- return 'Unknown'
521
- }
522
-
523
- /**
524
- * @param {keyof typeof Route} value
525
- *
526
- * @returns {keyof typeof Service}
527
- */
528
- export var getRouteService = value => {
529
- var route = getRoute(value)
530
-
531
- if (!(route in RouteService))
532
- throw TypeError(
533
- `[getRouteService] Route '${route}' must be a member of RouteService.`,
534
- )
535
-
536
- return RouteService[route]
537
- }
538
-
539
- /**
540
- * @param {keyof Route} value
541
- */
542
- export var getSingularPluralRouteRelation = value => {
543
- var route = getRoute(value)
544
-
545
- if (!(route in SingularPluralRouteRelation))
546
- throw TypeError(
547
- `[getSingularPluralRouteRelation] Route '${route}' must be a member of SingularPluralRouteRelation.`,
548
- )
549
-
550
- return SingularPluralRouteRelation[route]
551
- }
552
-
553
- export var getPluralSingularRouteRelation = value => {
554
- var route = getRoute(value)
555
-
556
- if (!(route in PluralSingularRouteRelation))
557
- throw TypeError(
558
- `[getPluralSingularRouteRelation] Route '${route}' must be a member of PluralSingularRouteRelation.`,
559
- )
560
-
561
- return PluralSingularRouteRelation[route]
562
- }
563
-
564
- /**
565
- * @param {keyof Route} value
566
- */
567
- export var getRoutePathname = value => {
568
- var route = getRoute(value)
569
-
570
- if (!(route in RoutePathname))
571
- throw TypeError(`[getRoutePathname] Route '${route}' must be a member of RoutePathname.`)
572
-
573
- return RoutePathname[route]
574
- }
575
-
576
- /**
577
- * @param {keyof Route} value
578
- */
579
- export var getRoutePathnamePattern = value => {
580
- var route = getRoute(value)
581
-
582
- if (!(route in RoutePathname))
583
- throw TypeError(`[getRoutePathname] Route '${route}' must be a member of RoutePathname.`)
584
-
585
- return new URLPattern({ pathname: '/' + RoutePathname[route] })
586
- }
587
-
588
- export var hydrateRoutePathname = (value, parameters) => {
589
- var route = getRoute(value)
590
- var pathname = getRoutePathname(route)
591
- var params = getRouteParams(route)
592
-
593
- return params.reduce(
594
- (pathname, param, index) => pathname.replace(param, parameters[index]),
595
- pathname,
596
- )
597
- }
598
-
599
- /**
600
- * @param {keyof Route} value
601
- * @returns
602
- */
603
- export var getRouteParams = value => {
604
- var route = getRoute(value)
605
-
606
- if (!(route in RouteParams))
607
- throw TypeError(`[getRouteParams] Route '${route}' must be a member of RouteParams.`)
608
-
609
- return RouteParams[route]
610
- }
@@ -1 +0,0 @@
1
- export function getTag(value: any): string;
@@ -1,5 +0,0 @@
1
- /**
2
- * @param {*} value
3
- * @returns {string}
4
- */
5
- export var getTag = value => Object.prototype.toString.call(value).slice(8, -1)