@valoranchi/riot-client 0.4.0 → 0.6.0

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 (156) hide show
  1. package/README.md +15 -0
  2. package/dist/RiotClient.d.ts +4 -1
  3. package/dist/RiotClient.d.ts.map +1 -1
  4. package/dist/RiotClient.js +7 -1
  5. package/dist/RiotClient.js.map +1 -1
  6. package/dist/analysis/wishlist.d.ts +5 -0
  7. package/dist/analysis/wishlist.d.ts.map +1 -0
  8. package/dist/analysis/wishlist.js +122 -0
  9. package/dist/analysis/wishlist.js.map +1 -0
  10. package/dist/catalogue/Catalogue.d.ts +1 -0
  11. package/dist/catalogue/Catalogue.d.ts.map +1 -1
  12. package/dist/catalogue/Catalogue.js +11 -0
  13. package/dist/catalogue/Catalogue.js.map +1 -1
  14. package/dist/cli.d.ts +10 -9
  15. package/dist/cli.d.ts.map +1 -1
  16. package/dist/cli.js +205 -36
  17. package/dist/cli.js.map +1 -1
  18. package/dist/client/AccountService.d.ts.map +1 -1
  19. package/dist/client/AccountService.js.map +1 -1
  20. package/dist/client/ClientContext.d.ts +4 -0
  21. package/dist/client/ClientContext.d.ts.map +1 -1
  22. package/dist/client/ClientContext.js.map +1 -1
  23. package/dist/client/OfficialService.d.ts +35 -0
  24. package/dist/client/OfficialService.d.ts.map +1 -0
  25. package/dist/client/OfficialService.js +141 -0
  26. package/dist/client/OfficialService.js.map +1 -0
  27. package/dist/client/StoreService.d.ts +6 -1
  28. package/dist/client/StoreService.d.ts.map +1 -1
  29. package/dist/client/StoreService.js +87 -5
  30. package/dist/client/StoreService.js.map +1 -1
  31. package/dist/client/api.d.ts +32 -1
  32. package/dist/client/api.d.ts.map +1 -1
  33. package/dist/dashboardLauncher.d.ts +12 -0
  34. package/dist/dashboardLauncher.d.ts.map +1 -0
  35. package/dist/dashboardLauncher.js +94 -0
  36. package/dist/dashboardLauncher.js.map +1 -0
  37. package/dist/errors.d.ts +12 -2
  38. package/dist/errors.d.ts.map +1 -1
  39. package/dist/errors.js +20 -3
  40. package/dist/errors.js.map +1 -1
  41. package/dist/formatError.d.ts +10 -0
  42. package/dist/formatError.d.ts.map +1 -0
  43. package/dist/formatError.js +29 -0
  44. package/dist/formatError.js.map +1 -0
  45. package/dist/index.d.ts +7 -5
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +5 -3
  48. package/dist/index.js.map +1 -1
  49. package/dist/mcp/McpServer.d.ts +21 -0
  50. package/dist/mcp/McpServer.d.ts.map +1 -0
  51. package/dist/mcp/McpServer.js +135 -0
  52. package/dist/mcp/McpServer.js.map +1 -0
  53. package/dist/mcp/index.d.ts +4 -0
  54. package/dist/mcp/index.d.ts.map +1 -0
  55. package/dist/mcp/index.js +3 -0
  56. package/dist/mcp/index.js.map +1 -0
  57. package/dist/mcp/tools.d.ts +9 -0
  58. package/dist/mcp/tools.d.ts.map +1 -0
  59. package/dist/mcp/tools.js +83 -0
  60. package/dist/mcp/tools.js.map +1 -0
  61. package/dist/mcp/types.d.ts +46 -0
  62. package/dist/mcp/types.d.ts.map +1 -0
  63. package/dist/mcp/types.js +2 -0
  64. package/dist/mcp/types.js.map +1 -0
  65. package/dist/model/index.d.ts +45 -0
  66. package/dist/model/index.d.ts.map +1 -1
  67. package/dist/official/OfficialApi.d.ts +35 -0
  68. package/dist/official/OfficialApi.d.ts.map +1 -0
  69. package/dist/official/OfficialApi.js +148 -0
  70. package/dist/official/OfficialApi.js.map +1 -0
  71. package/dist/official/OfficialMatchAdapter.d.ts +11 -0
  72. package/dist/official/OfficialMatchAdapter.d.ts.map +1 -0
  73. package/dist/official/OfficialMatchAdapter.js +157 -0
  74. package/dist/official/OfficialMatchAdapter.js.map +1 -0
  75. package/dist/official/RateLimiter.d.ts +20 -0
  76. package/dist/official/RateLimiter.d.ts.map +1 -0
  77. package/dist/official/RateLimiter.js +56 -0
  78. package/dist/official/RateLimiter.js.map +1 -0
  79. package/dist/official/types.d.ts +214 -0
  80. package/dist/official/types.d.ts.map +1 -0
  81. package/dist/official/types.js +2 -0
  82. package/dist/official/types.js.map +1 -0
  83. package/dist/raw.d.ts +4 -0
  84. package/dist/raw.d.ts.map +1 -1
  85. package/dist/raw.js +4 -0
  86. package/dist/raw.js.map +1 -1
  87. package/dist/riot/HttpGateway.d.ts.map +1 -1
  88. package/dist/riot/HttpGateway.js +9 -2
  89. package/dist/riot/HttpGateway.js.map +1 -1
  90. package/dist/riot/ResponseCache.d.ts +2 -0
  91. package/dist/riot/ResponseCache.d.ts.map +1 -1
  92. package/dist/riot/ResponseCache.js +8 -2
  93. package/dist/riot/ResponseCache.js.map +1 -1
  94. package/dist/serve/dashboard/dashboardCss.d.ts +2 -0
  95. package/dist/serve/dashboard/dashboardCss.d.ts.map +1 -0
  96. package/dist/serve/dashboard/dashboardCss.js +634 -0
  97. package/dist/serve/dashboard/dashboardCss.js.map +1 -0
  98. package/dist/serve/dashboard/dashboardHtml.d.ts +2 -0
  99. package/dist/serve/dashboard/dashboardHtml.d.ts.map +1 -0
  100. package/dist/serve/dashboard/dashboardHtml.js +95 -0
  101. package/dist/serve/dashboard/dashboardHtml.js.map +1 -0
  102. package/dist/serve/dashboard/dashboardJs.d.ts +2 -0
  103. package/dist/serve/dashboard/dashboardJs.d.ts.map +1 -0
  104. package/dist/serve/dashboard/dashboardJs.js +668 -0
  105. package/dist/serve/dashboard/dashboardJs.js.map +1 -0
  106. package/dist/serve/dashboard/index.d.ts +4 -0
  107. package/dist/serve/dashboard/index.d.ts.map +1 -0
  108. package/dist/serve/dashboard/index.js +4 -0
  109. package/dist/serve/dashboard/index.js.map +1 -0
  110. package/dist/serve/index.d.ts +2 -1
  111. package/dist/serve/index.d.ts.map +1 -1
  112. package/dist/serve/index.js +1 -0
  113. package/dist/serve/index.js.map +1 -1
  114. package/dist/serve/indexHtml.d.ts.map +1 -1
  115. package/dist/serve/indexHtml.js +1 -0
  116. package/dist/serve/indexHtml.js.map +1 -1
  117. package/dist/serve/openapi.d.ts.map +1 -1
  118. package/dist/serve/openapi.js +11 -0
  119. package/dist/serve/openapi.js.map +1 -1
  120. package/dist/serve/routes.d.ts +4 -2
  121. package/dist/serve/routes.d.ts.map +1 -1
  122. package/dist/serve/routes.js +434 -0
  123. package/dist/serve/routes.js.map +1 -1
  124. package/dist/serve/security.d.ts +6 -0
  125. package/dist/serve/security.d.ts.map +1 -0
  126. package/dist/serve/security.js +65 -0
  127. package/dist/serve/security.js.map +1 -0
  128. package/dist/serve/server.d.ts.map +1 -1
  129. package/dist/serve/server.js +38 -5
  130. package/dist/serve/server.js.map +1 -1
  131. package/dist/serve/types.d.ts +8 -0
  132. package/dist/serve/types.d.ts.map +1 -1
  133. package/dist/version.d.ts +2 -0
  134. package/dist/version.d.ts.map +1 -0
  135. package/dist/version.js +12 -0
  136. package/dist/version.js.map +1 -0
  137. package/dist/watch/StoreWatcher.d.ts +27 -0
  138. package/dist/watch/StoreWatcher.d.ts.map +1 -0
  139. package/dist/watch/StoreWatcher.js +116 -0
  140. package/dist/watch/StoreWatcher.js.map +1 -0
  141. package/dist/watch/WebhookNotifier.d.ts +8 -0
  142. package/dist/watch/WebhookNotifier.d.ts.map +1 -0
  143. package/dist/watch/WebhookNotifier.js +42 -0
  144. package/dist/watch/WebhookNotifier.js.map +1 -0
  145. package/dist/watch/index.d.ts +9 -3
  146. package/dist/watch/index.d.ts.map +1 -1
  147. package/dist/watch/index.js +12 -1
  148. package/dist/watch/index.js.map +1 -1
  149. package/dist/watch/types.d.ts +17 -1
  150. package/dist/watch/types.d.ts.map +1 -1
  151. package/package.json +1 -1
  152. package/schema/OfficialAccount.json +25 -0
  153. package/schema/OfficialProfile.json +354 -0
  154. package/schema/Wishlist.json +35 -0
  155. package/schema/WishlistCheck.json +67 -0
  156. package/schema/WishlistHit.json +51 -0
@@ -23,6 +23,13 @@ export const ROUTE_DEFINITIONS = [
23
23
  path: "/api/account/ownedItems",
24
24
  summary: "Get owned inventory collection",
25
25
  responseSchema: "OwnedItems",
26
+ params: [
27
+ {
28
+ name: "language",
29
+ type: "string",
30
+ description: "Locale code for localized item names (e.g. en-US)",
31
+ },
32
+ ],
26
33
  },
27
34
  {
28
35
  method: "GET",
@@ -241,6 +248,13 @@ export const ROUTE_DEFINITIONS = [
241
248
  path: "/api/social/messages",
242
249
  summary: "Get chat messages",
243
250
  responseSchema: "Message",
251
+ params: [
252
+ {
253
+ name: "cid",
254
+ type: "string",
255
+ description: "Conversation ID to filter messages",
256
+ },
257
+ ],
244
258
  },
245
259
  {
246
260
  method: "GET",
@@ -249,6 +263,13 @@ export const ROUTE_DEFINITIONS = [
249
263
  path: "/api/social/participants",
250
264
  summary: "Get chat participants",
251
265
  responseSchema: "Participant",
266
+ params: [
267
+ {
268
+ name: "cid",
269
+ type: "string",
270
+ description: "Conversation ID to filter participants",
271
+ },
272
+ ],
252
273
  },
253
274
  {
254
275
  method: "POST",
@@ -321,6 +342,13 @@ export const ROUTE_DEFINITIONS = [
321
342
  path: "/api/store/current",
322
343
  summary: "Get current store offers and storefront",
323
344
  responseSchema: "Store",
345
+ params: [
346
+ {
347
+ name: "language",
348
+ type: "string",
349
+ description: "Locale code for localized item names",
350
+ },
351
+ ],
324
352
  },
325
353
  {
326
354
  method: "GET",
@@ -328,7 +356,15 @@ export const ROUTE_DEFINITIONS = [
328
356
  action: "store",
329
357
  path: "/api/store/store",
330
358
  summary: "Get storefront alias",
359
+ alias: true,
331
360
  responseSchema: "Store",
361
+ params: [
362
+ {
363
+ name: "language",
364
+ type: "string",
365
+ description: "Locale code for localized item names",
366
+ },
367
+ ],
332
368
  },
333
369
  {
334
370
  method: "GET",
@@ -345,6 +381,14 @@ export const ROUTE_DEFINITIONS = [
345
381
  path: "/api/store/order",
346
382
  summary: "Get store order details",
347
383
  responseSchema: "Order",
384
+ params: [
385
+ {
386
+ name: "id",
387
+ type: "string",
388
+ description: "Order ID",
389
+ required: true,
390
+ },
391
+ ],
348
392
  },
349
393
  {
350
394
  method: "GET",
@@ -353,6 +397,13 @@ export const ROUTE_DEFINITIONS = [
353
397
  path: "/api/store/history",
354
398
  summary: "Get recorded store rotation history",
355
399
  responseSchema: "StoreHistory",
400
+ params: [
401
+ {
402
+ name: "days",
403
+ type: "number",
404
+ description: "Number of past days to query",
405
+ },
406
+ ],
356
407
  },
357
408
  {
358
409
  method: "GET",
@@ -360,6 +411,14 @@ export const ROUTE_DEFINITIONS = [
360
411
  action: "seen",
361
412
  path: "/api/store/seen",
362
413
  summary: "Get when a skin was last seen in store",
414
+ params: [
415
+ {
416
+ name: "skin",
417
+ type: "string",
418
+ description: "Skin name or UUID to check",
419
+ required: true,
420
+ },
421
+ ],
363
422
  },
364
423
  {
365
424
  method: "POST",
@@ -378,6 +437,62 @@ export const ROUTE_DEFINITIONS = [
378
437
  isConfirmGated: true,
379
438
  responseSchema: "Order",
380
439
  },
440
+ {
441
+ method: "GET",
442
+ namespace: "store",
443
+ action: "wishlist",
444
+ path: "/api/store/wishlist",
445
+ summary: "Get current skin wishlist",
446
+ responseSchema: "Wishlist",
447
+ },
448
+ {
449
+ method: "GET",
450
+ namespace: "store",
451
+ action: "wishlistCheck",
452
+ path: "/api/store/wishlistCheck",
453
+ summary: "Check current store offers against wishlist",
454
+ responseSchema: "WishlistCheck",
455
+ },
456
+ {
457
+ method: "POST",
458
+ namespace: "store",
459
+ action: "wishlistAdd",
460
+ path: "/api/store/wishlistAdd",
461
+ summary: "Add skin to wishlist",
462
+ responseSchema: "Wishlist",
463
+ params: [
464
+ {
465
+ name: "skin",
466
+ type: "string",
467
+ description: "Skin name or UUID to add",
468
+ required: true,
469
+ },
470
+ ],
471
+ },
472
+ {
473
+ method: "POST",
474
+ namespace: "store",
475
+ action: "wishlistRemove",
476
+ path: "/api/store/wishlistRemove",
477
+ summary: "Remove skin from wishlist",
478
+ responseSchema: "Wishlist",
479
+ params: [
480
+ {
481
+ name: "skin",
482
+ type: "string",
483
+ description: "Skin name or UUID to remove",
484
+ required: true,
485
+ },
486
+ ],
487
+ },
488
+ {
489
+ method: "GET",
490
+ namespace: "store",
491
+ action: "skins",
492
+ path: "/api/store/skins",
493
+ summary: "Get purchasable weapon skins for autocomplete",
494
+ responseSchema: "CatalogSkin",
495
+ },
381
496
  {
382
497
  method: "GET",
383
498
  namespace: "matches",
@@ -385,6 +500,18 @@ export const ROUTE_DEFINITIONS = [
385
500
  path: "/api/matches/list",
386
501
  summary: "List recent match summaries",
387
502
  responseSchema: "MatchSummary",
503
+ params: [
504
+ {
505
+ name: "count",
506
+ type: "number",
507
+ description: "Number of matches to return",
508
+ },
509
+ {
510
+ name: "queue",
511
+ type: "string",
512
+ description: "Match queue type (e.g. competitive, unrated)",
513
+ },
514
+ ],
388
515
  },
389
516
  {
390
517
  method: "GET",
@@ -392,7 +519,20 @@ export const ROUTE_DEFINITIONS = [
392
519
  action: "matches",
393
520
  path: "/api/matches/matches",
394
521
  summary: "List match summaries alias",
522
+ alias: true,
395
523
  responseSchema: "MatchSummary",
524
+ params: [
525
+ {
526
+ name: "count",
527
+ type: "number",
528
+ description: "Number of matches to return",
529
+ },
530
+ {
531
+ name: "queue",
532
+ type: "string",
533
+ description: "Match queue type (e.g. competitive, unrated)",
534
+ },
535
+ ],
396
536
  },
397
537
  {
398
538
  method: "GET",
@@ -401,6 +541,13 @@ export const ROUTE_DEFINITIONS = [
401
541
  path: "/api/matches/sync",
402
542
  summary: "Synchronize matches into cache",
403
543
  responseSchema: "MatchSyncResult",
544
+ params: [
545
+ {
546
+ name: "maxPages",
547
+ type: "number",
548
+ description: "Maximum number of history pages to fetch",
549
+ },
550
+ ],
404
551
  },
405
552
  {
406
553
  method: "GET",
@@ -409,6 +556,13 @@ export const ROUTE_DEFINITIONS = [
409
556
  path: "/api/matches/known",
410
557
  summary: "Get cached match summaries",
411
558
  responseSchema: "MatchSummary",
559
+ params: [
560
+ {
561
+ name: "puuid",
562
+ type: "string",
563
+ description: "Target player PUUID (defaults to signed-in player)",
564
+ },
565
+ ],
412
566
  },
413
567
  {
414
568
  method: "GET",
@@ -417,6 +571,14 @@ export const ROUTE_DEFINITIONS = [
417
571
  path: "/api/matches/get",
418
572
  summary: "Get full match details by ID",
419
573
  responseSchema: "Match",
574
+ params: [
575
+ {
576
+ name: "id",
577
+ type: "string",
578
+ description: "Match ID",
579
+ required: true,
580
+ },
581
+ ],
420
582
  },
421
583
  {
422
584
  method: "GET",
@@ -424,7 +586,16 @@ export const ROUTE_DEFINITIONS = [
424
586
  action: "match",
425
587
  path: "/api/matches/match",
426
588
  summary: "Get match details alias",
589
+ alias: true,
427
590
  responseSchema: "Match",
591
+ params: [
592
+ {
593
+ name: "id",
594
+ type: "string",
595
+ description: "Match ID",
596
+ required: true,
597
+ },
598
+ ],
428
599
  },
429
600
  {
430
601
  method: "GET",
@@ -441,6 +612,13 @@ export const ROUTE_DEFINITIONS = [
441
612
  path: "/api/matches/rankHistory",
442
613
  summary: "Get competitive rating updates",
443
614
  responseSchema: "RankChange",
615
+ params: [
616
+ {
617
+ name: "count",
618
+ type: "number",
619
+ description: "Number of rank updates to return",
620
+ },
621
+ ],
444
622
  },
445
623
  {
446
624
  method: "GET",
@@ -449,6 +627,18 @@ export const ROUTE_DEFINITIONS = [
449
627
  path: "/api/matches/live",
450
628
  summary: "Get live pregame or coregame lobby",
451
629
  responseSchema: "LiveMatch",
630
+ params: [
631
+ {
632
+ name: "ranks",
633
+ type: "boolean",
634
+ description: "Include player competitive ranks",
635
+ },
636
+ {
637
+ name: "loadouts",
638
+ type: "boolean",
639
+ description: "Include player loadout details",
640
+ },
641
+ ],
452
642
  },
453
643
  {
454
644
  method: "GET",
@@ -457,6 +647,24 @@ export const ROUTE_DEFINITIONS = [
457
647
  path: "/api/matches/listFor",
458
648
  summary: "List matches for specific player",
459
649
  responseSchema: "MatchSummary",
650
+ params: [
651
+ {
652
+ name: "puuid",
653
+ type: "string",
654
+ description: "Target player PUUID",
655
+ required: true,
656
+ },
657
+ {
658
+ name: "count",
659
+ type: "number",
660
+ description: "Number of matches to return",
661
+ },
662
+ {
663
+ name: "queue",
664
+ type: "string",
665
+ description: "Match queue type",
666
+ },
667
+ ],
460
668
  },
461
669
  {
462
670
  method: "GET",
@@ -465,6 +673,14 @@ export const ROUTE_DEFINITIONS = [
465
673
  path: "/api/matches/mmrFor",
466
674
  summary: "Get MMR for specific player",
467
675
  responseSchema: "Mmr",
676
+ params: [
677
+ {
678
+ name: "puuid",
679
+ type: "string",
680
+ description: "Target player PUUID",
681
+ required: true,
682
+ },
683
+ ],
468
684
  },
469
685
  {
470
686
  method: "GET",
@@ -473,6 +689,19 @@ export const ROUTE_DEFINITIONS = [
473
689
  path: "/api/matches/rankHistoryFor",
474
690
  summary: "Get rank history for player",
475
691
  responseSchema: "RankChange",
692
+ params: [
693
+ {
694
+ name: "puuid",
695
+ type: "string",
696
+ description: "Target player PUUID",
697
+ required: true,
698
+ },
699
+ {
700
+ name: "count",
701
+ type: "number",
702
+ description: "Number of rank updates to return",
703
+ },
704
+ ],
476
705
  },
477
706
  {
478
707
  method: "GET",
@@ -481,6 +710,28 @@ export const ROUTE_DEFINITIONS = [
481
710
  path: "/api/matches/leaderboard",
482
711
  summary: "Get competitive leaderboard",
483
712
  responseSchema: "Leaderboard",
713
+ params: [
714
+ {
715
+ name: "season",
716
+ type: "string",
717
+ description: "Season or act UUID",
718
+ },
719
+ {
720
+ name: "start",
721
+ type: "number",
722
+ description: "Starting rank offset (0-indexed)",
723
+ },
724
+ {
725
+ name: "size",
726
+ type: "number",
727
+ description: "Number of players to return",
728
+ },
729
+ {
730
+ name: "query",
731
+ type: "string",
732
+ description: "Search query for player name",
733
+ },
734
+ ],
484
735
  },
485
736
  {
486
737
  method: "GET",
@@ -505,6 +756,18 @@ export const ROUTE_DEFINITIONS = [
505
756
  path: "/api/matches/trend",
506
757
  summary: "Get competitive rating trend",
507
758
  responseSchema: "RatingTrend",
759
+ params: [
760
+ {
761
+ name: "count",
762
+ type: "number",
763
+ description: "Number of matches to evaluate",
764
+ },
765
+ {
766
+ name: "puuid",
767
+ type: "string",
768
+ description: "Target player PUUID",
769
+ },
770
+ ],
508
771
  },
509
772
  {
510
773
  method: "GET",
@@ -513,6 +776,23 @@ export const ROUTE_DEFINITIONS = [
513
776
  path: "/api/matches/summary",
514
777
  summary: "Get recent performance summary",
515
778
  responseSchema: "PerformanceSummary",
779
+ params: [
780
+ {
781
+ name: "count",
782
+ type: "number",
783
+ description: "Number of matches to summarize",
784
+ },
785
+ {
786
+ name: "queue",
787
+ type: "string",
788
+ description: "Match queue type",
789
+ },
790
+ {
791
+ name: "puuid",
792
+ type: "string",
793
+ description: "Target player PUUID",
794
+ },
795
+ ],
516
796
  },
517
797
  {
518
798
  method: "GET",
@@ -521,6 +801,13 @@ export const ROUTE_DEFINITIONS = [
521
801
  path: "/api/matches/assess",
522
802
  summary: "Assess player rank anomalies",
523
803
  responseSchema: "PlayerAssessment",
804
+ params: [
805
+ {
806
+ name: "puuid",
807
+ type: "string",
808
+ description: "Target player PUUID (defaults to signed-in player)",
809
+ },
810
+ ],
524
811
  },
525
812
  {
526
813
  method: "POST",
@@ -568,6 +855,7 @@ export const ROUTE_DEFINITIONS = [
568
855
  action: "party",
569
856
  path: "/api/party/party",
570
857
  summary: "Get party alias",
858
+ alias: true,
571
859
  responseSchema: "Party",
572
860
  },
573
861
  {
@@ -799,6 +1087,107 @@ export const ROUTE_DEFINITIONS = [
799
1087
  summary: "Refresh party state",
800
1088
  responseSchema: "Party",
801
1089
  },
1090
+ {
1091
+ method: "GET",
1092
+ namespace: "official",
1093
+ action: "account",
1094
+ path: "/api/official/account",
1095
+ summary: "Resolve any player's account and shard through Riot's official API",
1096
+ responseSchema: "OfficialAccount",
1097
+ params: [
1098
+ { name: "riotId", type: "string", description: "Riot ID as Name#Tag", required: true },
1099
+ ],
1100
+ },
1101
+ {
1102
+ method: "GET",
1103
+ namespace: "official",
1104
+ action: "matches",
1105
+ path: "/api/official/matches",
1106
+ summary: "Recent match summaries of any player through Riot's official API",
1107
+ responseSchema: "MatchSummary",
1108
+ params: [
1109
+ { name: "riotId", type: "string", description: "Riot ID as Name#Tag", required: true },
1110
+ { name: "queue", type: "string", description: "Queue id filter, e.g. competitive" },
1111
+ { name: "count", type: "number", description: "Number of matches, default 10" },
1112
+ ],
1113
+ },
1114
+ {
1115
+ method: "GET",
1116
+ namespace: "official",
1117
+ action: "match",
1118
+ path: "/api/official/match",
1119
+ summary: "Full match details through Riot's official API",
1120
+ responseSchema: "Match",
1121
+ params: [
1122
+ { name: "matchId", type: "string", description: "Match id", required: true },
1123
+ {
1124
+ name: "shard",
1125
+ type: "string",
1126
+ description: "Shard: na, latam, br, eu, ap or kr",
1127
+ required: true,
1128
+ },
1129
+ { name: "self", type: "string", description: "Puuid whose point of view to use" },
1130
+ ],
1131
+ },
1132
+ {
1133
+ method: "GET",
1134
+ namespace: "official",
1135
+ action: "summary",
1136
+ path: "/api/official/summary",
1137
+ summary: "Performance summary of any player through Riot's official API",
1138
+ responseSchema: "PerformanceSummary",
1139
+ params: [
1140
+ { name: "riotId", type: "string", description: "Riot ID as Name#Tag", required: true },
1141
+ { name: "queue", type: "string", description: "Queue id, default competitive" },
1142
+ { name: "count", type: "number", description: "Number of matches, default 10" },
1143
+ ],
1144
+ },
1145
+ {
1146
+ method: "GET",
1147
+ namespace: "official",
1148
+ action: "profile",
1149
+ path: "/api/official/profile",
1150
+ summary: "Level, rank and performance of any player through Riot's official API",
1151
+ responseSchema: "OfficialProfile",
1152
+ params: [
1153
+ { name: "riotId", type: "string", description: "Riot ID as Name#Tag", required: true },
1154
+ { name: "count", type: "number", description: "Number of matches, default 10" },
1155
+ ],
1156
+ },
1157
+ {
1158
+ method: "GET",
1159
+ namespace: "official",
1160
+ action: "leaderboard",
1161
+ path: "/api/official/leaderboard",
1162
+ summary: "Ranked leaderboard of a shard through Riot's official API",
1163
+ responseSchema: "Leaderboard",
1164
+ params: [
1165
+ {
1166
+ name: "shard",
1167
+ type: "string",
1168
+ description: "Shard: na, latam, br, eu, ap or kr",
1169
+ required: true,
1170
+ },
1171
+ { name: "act", type: "string", description: "Act id, default the active act" },
1172
+ { name: "start", type: "number", description: "Start index, default 0" },
1173
+ { name: "size", type: "number", description: "Page size, default 50" },
1174
+ ],
1175
+ },
1176
+ {
1177
+ method: "GET",
1178
+ namespace: "official",
1179
+ action: "status",
1180
+ path: "/api/official/status",
1181
+ summary: "Platform status of a shard through Riot's official API",
1182
+ params: [
1183
+ {
1184
+ name: "shard",
1185
+ type: "string",
1186
+ description: "Shard: na, latam, br, eu, ap or kr",
1187
+ required: true,
1188
+ },
1189
+ ],
1190
+ },
802
1191
  ];
803
1192
  function isDryRun(query, body, headers) {
804
1193
  if (query.dryRun !== undefined) {
@@ -1000,6 +1389,16 @@ export async function dispatchApiRoute(client, namespace, methodName, query, bod
1000
1389
  ? client.store.validateBuy(target, { confirm: true })
1001
1390
  : client.store.buy(target, { confirm: true });
1002
1391
  }
1392
+ case "wishlist":
1393
+ return client.store.wishlist();
1394
+ case "wishlistCheck":
1395
+ return client.store.wishlistCheck();
1396
+ case "wishlistAdd":
1397
+ return client.store.wishlistAdd(String(body.skin ?? query.skin));
1398
+ case "wishlistRemove":
1399
+ return client.store.wishlistRemove(String(body.skin ?? query.skin));
1400
+ case "skins":
1401
+ return client.store.skins();
1003
1402
  }
1004
1403
  }
1005
1404
  if (namespace === "matches") {
@@ -1202,6 +1601,41 @@ export async function dispatchApiRoute(client, namespace, methodName, query, bod
1202
1601
  return dryRun ? client.party.validateRefresh() : client.party.refresh();
1203
1602
  }
1204
1603
  }
1604
+ const official = namespace === "official" && dispatchOfficialRoute(client, normMethod, query);
1605
+ if (official)
1606
+ return official;
1205
1607
  throw new ValidationError("route-not-found", `Unknown endpoint: ${req.method} /api/${namespace}/${methodName}`);
1206
1608
  }
1609
+ function optionalNumber(value) {
1610
+ return value === undefined ? undefined : Number(value);
1611
+ }
1612
+ function dispatchOfficialRoute(client, method, query) {
1613
+ const count = optionalNumber(query.count);
1614
+ switch (method) {
1615
+ case "account":
1616
+ return client.official.account(query.riotId ?? "");
1617
+ case "matches":
1618
+ return client.official.matches(query.riotId ?? "", { queue: query.queue, count });
1619
+ case "match":
1620
+ return client.official.match(query.matchId ?? "", {
1621
+ shard: query.shard ?? "",
1622
+ self: query.self,
1623
+ });
1624
+ case "summary":
1625
+ return client.official.summary(query.riotId ?? "", { queue: query.queue, count });
1626
+ case "profile":
1627
+ return client.official.profile(query.riotId ?? "", { count });
1628
+ case "leaderboard":
1629
+ return client.official.leaderboard({
1630
+ shard: query.shard ?? "",
1631
+ act: query.act,
1632
+ start: optionalNumber(query.start),
1633
+ size: optionalNumber(query.size),
1634
+ });
1635
+ case "status":
1636
+ return client.official.status(query.shard ?? "");
1637
+ default:
1638
+ return undefined;
1639
+ }
1640
+ }
1207
1641
  //# sourceMappingURL=routes.js.map