@shakerquiz/utilities 0.5.168 → 0.5.170

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@shakerquiz/utilities",
4
- "version": "0.5.168",
4
+ "version": "0.5.170",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -305,6 +305,42 @@ export const RouteKind = Object.freeze({
305
305
  [Route['venues/city']]: Kind['Composite'],
306
306
  })
307
307
 
308
+ export const CompositeRouteField = Object.freeze({
309
+ [Route['cities/country']]: 'country',
310
+ [Route['cities/currency']]: 'currency',
311
+ [Route['cities/timezone']]: 'timezone',
312
+ [Route['cities/venues']]: 'venues',
313
+ [Route['city/country']]: 'country',
314
+ [Route['city/currency']]: 'currency',
315
+ [Route['city/timezone']]: 'timezone',
316
+ [Route['city/venues']]: 'venues',
317
+ [Route['game/city']]: 'city',
318
+ [Route['game/registrations']]: 'registrations',
319
+ [Route['game/summary']]: 'summary',
320
+ [Route['game/theme']]: 'theme',
321
+ [Route['game/venue']]: 'venue',
322
+ [Route['games/city']]: 'city',
323
+ [Route['games/registrations']]: 'registrations',
324
+ [Route['games/summary']]: 'summary',
325
+ [Route['games/theme']]: 'theme',
326
+ [Route['games/venue']]: 'venue',
327
+ [Route['registration/cancellation']]: 'cancellation',
328
+ [Route['registration/channel']]: 'channel',
329
+ [Route['registration/confirmation']]: 'confirmation',
330
+ [Route['registration/game']]: 'game',
331
+ [Route['registration/mailing']]: 'mailing',
332
+ [Route['theme/cover']]: 'cover',
333
+ [Route['themes/cover']]: 'cover',
334
+ [Route['user/cities']]: 'cities',
335
+ [Route['user/password']]: 'password',
336
+ [Route['user/role']]: 'role',
337
+ [Route['users/cities']]: 'cities',
338
+ [Route['users/password']]: 'password',
339
+ [Route['users/role']]: 'role',
340
+ [Route['venue/city']]: 'city',
341
+ [Route['venues/city']]: 'city',
342
+ })
343
+
308
344
  export const RouteParams = Object.freeze({
309
345
  [Route['checkin']]: [],
310
346
  [Route['checkins']]: [],
@@ -522,26 +558,29 @@ export const ServiceRoutes = Object.freeze({
522
558
  [Service['Vkma']]: Object.freeze([]),
523
559
  })
524
560
 
525
- /** @returns {keyof typeof Route | 'Unknown'} */
561
+ /** @returns {typeof Route[keyof typeof Route] | 'Unknown'} */
526
562
  export const inferRoute = x => Route[x] ?? 'Unknown'
527
563
 
528
- /** @returns {keyof typeof RouteNumerosity | 'Unknown'} */
564
+ /** @returns {typeof RouteNumerosity[keyof typeof RouteNumerosity] | 'Unknown'} */
529
565
  export const inferRouteNumerosity = x => RouteNumerosity[x] ?? 'Unknown'
530
566
 
531
- /** @returns {keyof typeof RouteRelation | 'Unknown'} */
567
+ /** @returns {typeof RouteRelation[keyof typeof RouteRelation] | 'Unknown'} */
532
568
  export const inferRouteRelation = x => RouteRelation[x] ?? 'Unknown'
533
569
 
534
- /** @returns {keyof typeof RoutePathname | 'Unknown'} */
570
+ /** @returns {typeof RoutePathname[keyof typeof RoutePathname] | 'Unknown'} */
535
571
  export const inferRoutePathname = x => RoutePathname[x] ?? 'Unknown'
536
572
 
537
- /** @returns {keyof typeof RouteKind | 'Unknown'} */
573
+ /** @returns {typeof RouteKind[keyof typeof RouteKind] | 'Unknown'} */
538
574
  export const inferRouteKind = x => RouteKind[x] ?? 'Unknown'
539
575
 
540
- /** @returns {keyof typeof RouteParams | 'Unknown'} */
576
+ /** @returns {typeof CompositeRouteField[keyof typeof CompositeRouteField] | 'Unknown'} */
577
+ export const inferCompositeRouteField = x => CompositeRouteField[x] ?? 'Unknown'
578
+
579
+ /** @returns {typeof RouteParams[keyof typeof RouteParams] | 'Unknown'} */
541
580
  export const inferRouteParams = x => RouteParams[x] ?? 'Unknown'
542
581
 
543
- /** @returns {keyof typeof RouteService | 'Unknown'} */
582
+ /** @returns {typeof RouteService[keyof typeof RouteService] | 'Unknown'} */
544
583
  export const inferRouteService = x => RouteService[x] ?? 'Unknown'
545
584
 
546
- /** @returns {keyof typeof ServiceRoutes | 'Unknown'} */
585
+ /** @returns {typeof ServiceRoutes[keyof typeof ServiceRoutes] | 'Unknown'} */
547
586
  export const inferServiceRoutes = x => ServiceRoutes[x] ?? 'Unknown'