guildwars2-ts 1.0.4 → 1.1.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.
package/dist/index.mjs CHANGED
@@ -179,10 +179,7 @@ var ApiBase = class {
179
179
  throw new ApiTokenError();
180
180
  }
181
181
  if (status === 403) {
182
- const requiredScope = (
183
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/restrict-plus-operands
184
- prevError.response.data.text.slice(0, 1).toUpperCase() + prevError.response.data.text.slice(1)
185
- );
182
+ const requiredScope = prevError.response.data.text.slice(0, 1).toUpperCase() + prevError.response.data.text.slice(1);
186
183
  logger.warn(`Request to ${prevOptions.url} failed. ${requiredScope}.`);
187
184
  throw new ApiPermissionsError(requiredScope);
188
185
  }
@@ -225,875 +222,6 @@ var ApiBase = class {
225
222
  return fullUrl;
226
223
  }
227
224
  };
228
-
229
- // src/apis/endpoints.ts
230
- var endpoints = {
231
- account: {
232
- base: {
233
- path: "v2/account",
234
- tokenRequired: true
235
- },
236
- achievements: {
237
- path: "v2/account/achievements",
238
- tokenRequired: true
239
- },
240
- bank: {
241
- path: "v2/account/bank",
242
- tokenRequired: true
243
- },
244
- buildStorage: {
245
- path: "v2/account/buildstorage?ids=all",
246
- tokenRequired: true
247
- },
248
- dailyCrafting: {
249
- path: "v2/account/dailycrafting",
250
- tokenRequired: true
251
- },
252
- dungeons: {
253
- path: "v2/account/dungeons",
254
- tokenRequired: true
255
- },
256
- dyes: {
257
- path: "v2/account/dyes",
258
- tokenRequired: true
259
- },
260
- emotes: {
261
- path: "v2/account/emotes",
262
- tokenRequired: true
263
- },
264
- finishers: {
265
- path: "v2/account/finishers",
266
- tokenRequired: true
267
- },
268
- gliders: {
269
- path: "v2/account/gliders",
270
- tokenRequired: true
271
- },
272
- homeCats: {
273
- path: "v2/account/home/cats",
274
- tokenRequired: true
275
- },
276
- homeNodes: {
277
- path: "v2/account/home/nodes",
278
- tokenRequired: true
279
- },
280
- inventory: {
281
- path: "v2/account/inventory",
282
- tokenRequired: true
283
- },
284
- jadebots: {
285
- path: "v2/account/jadebots",
286
- tokenRequired: true
287
- },
288
- legendaryArmory: {
289
- path: "v2/account/legendaryarmory",
290
- tokenRequired: true
291
- },
292
- luck: {
293
- path: "v2/account/luck",
294
- tokenRequired: true
295
- },
296
- mailCarriers: {
297
- path: "v2/account/mailcarriers",
298
- tokenRequired: true
299
- },
300
- mapChests: {
301
- path: "v2/account/mapchests",
302
- tokenRequired: true
303
- },
304
- masteries: {
305
- path: "v2/account/masteries",
306
- tokenRequired: true
307
- },
308
- masteryPoints: {
309
- path: "v2/account/mastery/points",
310
- tokenRequired: true
311
- },
312
- materials: {
313
- path: "v2/account/materials",
314
- tokenRequired: true
315
- },
316
- minis: {
317
- path: "v2/account/minis",
318
- tokenRequired: true
319
- },
320
- mountsSkins: {
321
- path: "v2/account/mounts/skins",
322
- tokenRequired: true
323
- },
324
- mountsTypes: {
325
- path: "v2/account/mounts/types",
326
- tokenRequired: true
327
- },
328
- novelties: {
329
- path: "v2/account/novelties",
330
- tokenRequired: true
331
- },
332
- outfits: {
333
- path: "v2/account/outfits",
334
- tokenRequired: true
335
- },
336
- progression: {
337
- path: "v2/account/progression",
338
- tokenRequired: true
339
- },
340
- pvpHeroes: {
341
- path: "v2/account/pvp/heroes",
342
- tokenRequired: true
343
- },
344
- raids: {
345
- path: "v2/account/raids",
346
- tokenRequired: true
347
- },
348
- recipes: {
349
- path: "v2/account/recipes",
350
- tokenRequired: true
351
- },
352
- skiffs: {
353
- path: "v2/account/skiffs",
354
- tokenRequired: true
355
- },
356
- skins: {
357
- path: "v2/account/skins",
358
- tokenRequired: true
359
- },
360
- titles: {
361
- path: "v2/account/titles",
362
- tokenRequired: true
363
- },
364
- wallet: {
365
- path: "v2/account/wallet",
366
- tokenRequired: true
367
- },
368
- worldBosses: {
369
- path: "v2/account/worldbosses",
370
- tokenRequired: true
371
- }
372
- },
373
- achievements: {
374
- categoryIds: {
375
- path: "v2/achievements/categories",
376
- tokenRequired: false
377
- },
378
- categories: {
379
- path: "v2/achievements/categories?ids=$(ids)",
380
- tokenRequired: false
381
- },
382
- groupsAll: {
383
- path: "v2/achievements/groups",
384
- tokenRequired: false
385
- },
386
- groupsById: {
387
- path: "v2/achievements/groups/$(id)",
388
- tokenRequired: false
389
- }
390
- },
391
- backstory: {
392
- answersAll: {
393
- path: "v2/backstory/answers",
394
- tokenRequired: false
395
- },
396
- answersById: {
397
- path: "v2/backstory/answers?ids=$(ids)",
398
- tokenRequired: false
399
- },
400
- questionsAll: {
401
- path: "v2/backstory/questions",
402
- tokenRequired: false
403
- },
404
- questionsById: {
405
- path: "v2/backstory/questions?ids=$(ids)",
406
- tokenRequired: false
407
- }
408
- },
409
- build: {
410
- path: "v2/build",
411
- tokenRequired: false
412
- },
413
- characters: {
414
- base: {
415
- path: "v2/characters",
416
- tokenRequired: true
417
- },
418
- backstory: {
419
- path: "v2/characters/$(id)/backstory",
420
- tokenRequired: true
421
- },
422
- buildTabs: {
423
- path: "v2/characters/$(id)/buildtabs?tabs=$(tabs)",
424
- tokenRequired: true
425
- },
426
- core: {
427
- path: "v2/characters/$(id)/core",
428
- tokenRequired: true
429
- },
430
- crafting: {
431
- path: "v2/characters/$(id)/crafting",
432
- tokenRequired: true
433
- },
434
- equipment: {
435
- path: "v2/characters/$(id)/equipment",
436
- tokenRequired: true
437
- },
438
- equipmentTabsById: {
439
- path: "v2/characters/$(id)/equipmenttabs?tabs=$(tabs)",
440
- tokenRequired: true
441
- },
442
- equipmentTabActive: {
443
- path: "v2/characters/$(id)/equipmenttabs/active",
444
- tokenRequired: true
445
- },
446
- heroPoints: {
447
- path: "v2/characters/$(id)/heropoints",
448
- tokenRequired: true
449
- },
450
- inventory: {
451
- path: "v2/characters/$(id)/inventory",
452
- tokenRequired: true
453
- },
454
- quests: {
455
- path: "v2/characters/$(id)/quests",
456
- tokenRequired: true
457
- },
458
- recipes: {
459
- path: "v2/characters/$(id)/recipes",
460
- tokenRequired: true
461
- },
462
- sab: {
463
- path: "v2/characters/$(id)/sab",
464
- tokenRequired: true
465
- },
466
- skills: {
467
- path: "v2/characters/$(id)/skills",
468
- tokenRequired: true
469
- },
470
- specializations: {
471
- path: "v2/characters/$(id)/specializations",
472
- tokenRequired: true
473
- },
474
- training: {
475
- path: "v2/characters/$(id)/training",
476
- tokenRequired: true
477
- }
478
- },
479
- colors: {
480
- all: {
481
- path: "v2/colors",
482
- tokenRequired: false
483
- },
484
- byId: {
485
- path: "v2/colors?ids=$(ids)",
486
- tokenRequired: false
487
- }
488
- },
489
- commerce: {
490
- delivery: {
491
- path: "v2/commerce/delivery",
492
- tokenRequired: true
493
- },
494
- exchange: {
495
- path: "v2/commerce/exchange/$(type)?quantity=$(quantity)",
496
- tokenRequired: false
497
- },
498
- listings: {
499
- path: "v2/commerce/listings?ids=$(ids)",
500
- tokenRequired: false
501
- },
502
- prices: {
503
- path: "v2/commerce/prices?ids=$(ids)",
504
- tokenRequired: false
505
- },
506
- transactions: {
507
- path: "v2/commerce/transactions/$(status)/$(type)",
508
- tokenRequired: true
509
- }
510
- },
511
- continents: {
512
- core: {
513
- path: "v2/continents",
514
- tokenRequired: false
515
- },
516
- continents: {
517
- path: "v2/continents?ids=$(continents)",
518
- tokenRequired: false
519
- },
520
- floors: {
521
- path: "v2/continents/$(continents)/floors?ids=$(floors)",
522
- tokenRequired: false
523
- },
524
- regions: {
525
- path: "v2/continents/$(continents)/floors/$(floors)/regions?ids=$(regions)",
526
- tokenRequired: false
527
- },
528
- maps: {
529
- path: "v2/continents/$(continents)/floors/$(floors)/regions/$(regions)/maps?ids=$(maps)",
530
- tokenRequired: false
531
- }
532
- },
533
- createSubtoken: {
534
- noUrl: {
535
- path: "v2/createsubtoken?expire=$(expire)&permissions=$(permissions)",
536
- tokenRequired: true
537
- },
538
- url: {
539
- path: "v2/createsubtoken?expire=$(expire)&permissions=$(permissions)&urls=$(urls)",
540
- tokenRequired: true
541
- }
542
- },
543
- currencies: {
544
- all: {
545
- path: "v2/currencies",
546
- tokenRequired: false
547
- },
548
- byId: {
549
- path: "v2/currencies?ids=$(ids)",
550
- tokenRequired: false
551
- }
552
- },
553
- dailyCrafting: {
554
- path: "v2/dailycrafting",
555
- tokenRequired: false
556
- },
557
- dungeons: {
558
- all: {
559
- path: "v2/dungeons",
560
- tokenRequired: false
561
- },
562
- byId: {
563
- path: "v2/dungeons?ids=$(ids)",
564
- tokenRequired: false
565
- }
566
- },
567
- emblem: {
568
- path: "v2/emblem/$(type)?ids=$(ids)",
569
- tokenRequired: false
570
- },
571
- emotes: {
572
- all: {
573
- path: "v2/emotes",
574
- tokenRequired: false
575
- },
576
- byId: {
577
- path: "v2/emotes?ids=$(ids)",
578
- tokenRequired: false
579
- }
580
- },
581
- files: {
582
- all: {
583
- path: "v2/files",
584
- tokenRequired: false
585
- },
586
- byId: {
587
- path: "v2/files?ids=$(ids)",
588
- tokenRequired: false
589
- }
590
- },
591
- finishers: {
592
- all: {
593
- path: "v2/finishers",
594
- tokenRequired: false
595
- },
596
- byId: {
597
- path: "v2/finishers?ids=$(ids)",
598
- tokenRequired: false
599
- }
600
- },
601
- gliders: {
602
- all: {
603
- path: "v2/gliders",
604
- tokenRequired: false
605
- },
606
- byId: {
607
- path: "v2/gliders?ids=$(ids)",
608
- tokenRequired: false
609
- },
610
- paginated: {
611
- path: "v2/gliders?ids=$(ids)&page=$(page)&page_size=$(page_size)",
612
- tokenRequired: false
613
- }
614
- },
615
- guild: {
616
- core: {
617
- path: "v2/guild/$(id)",
618
- tokenRequired: false
619
- },
620
- log: {
621
- path: "v2/guild/$(id)/log?since=$(since)",
622
- tokenRequired: true
623
- },
624
- members: {
625
- path: "v2/guild/$(id)/members",
626
- tokenRequired: true
627
- },
628
- ranks: {
629
- path: "v2/guild/$(id)/ranks",
630
- tokenRequired: true
631
- },
632
- stash: {
633
- path: "v2/guild/$(id)/stash",
634
- tokenRequired: true
635
- },
636
- storage: {
637
- path: "v2/guild/$(id)/storage",
638
- tokenRequired: true
639
- },
640
- teams: {
641
- path: "v2/guild/$(id)/teams",
642
- tokenRequired: true
643
- },
644
- treasury: {
645
- path: "v2/guild/$(id)/treasury",
646
- tokenRequired: true
647
- },
648
- upgrades: {
649
- path: "v2/guild/$(id)/upgrades",
650
- tokenRequired: true
651
- },
652
- upgradesInfo: {
653
- path: "v2/guild/upgrades?ids=$(ids)",
654
- tokenRequired: false
655
- },
656
- permissionsAll: {
657
- path: "v2/guild/permissions",
658
- tokenRequired: false
659
- },
660
- permissionsById: {
661
- path: "v2/guild/permissions?ids=$(ids)",
662
- tokenRequired: false
663
- },
664
- search: {
665
- path: "v2/guild/search?name=$(name)",
666
- tokenRequired: false
667
- }
668
- },
669
- home: {
670
- cats: {
671
- path: "v2/home/cats?ids=$(ids)",
672
- tokenRequired: false
673
- },
674
- nodes: {
675
- path: "v2/home/nodes?ids=$(ids)",
676
- tokenRequired: false
677
- }
678
- },
679
- items: {
680
- all: {
681
- path: "v2/items",
682
- tokenRequired: false
683
- },
684
- byId: {
685
- path: "v2/items?ids=$(ids)",
686
- tokenRequired: false
687
- }
688
- },
689
- itemstats: {
690
- all: {
691
- path: "v2/itemstats",
692
- tokenRequired: false
693
- },
694
- byId: {
695
- path: "v2/itemstats?ids=$(ids)",
696
- tokenRequired: false
697
- }
698
- },
699
- jadebots: {
700
- all: {
701
- path: "v2/jadebots",
702
- tokenRequired: false
703
- },
704
- byId: {
705
- path: "v2/jadebots?ids=$(ids)",
706
- tokenRequired: false
707
- }
708
- },
709
- legendaryArmory: {
710
- all: {
711
- path: "v2/legendaryarmory",
712
- tokenRequired: false
713
- },
714
- byId: {
715
- path: "v2/legendaryarmory?ids=$(ids)",
716
- tokenRequired: false
717
- }
718
- },
719
- legends: {
720
- all: {
721
- path: "v2/legends",
722
- tokenRequired: false
723
- },
724
- byId: {
725
- path: "v2/legends?ids=$(ids)",
726
- tokenRequired: false
727
- }
728
- },
729
- mailCarriers: {
730
- all: {
731
- path: "v2/mailcarriers",
732
- tokenRequired: false
733
- },
734
- byId: {
735
- path: "v2/mailcarriers?ids=$(ids)",
736
- tokenRequired: false
737
- }
738
- },
739
- mapChests: {
740
- path: "v2/mapchests",
741
- tokenRequired: false
742
- },
743
- maps: {
744
- all: {
745
- path: "v2/maps",
746
- tokenRequired: false
747
- },
748
- byId: {
749
- path: "v2/maps?ids=$(ids)",
750
- tokenRequired: false
751
- }
752
- },
753
- masteries: {
754
- all: {
755
- path: "v2/masteries",
756
- tokenRequired: false
757
- },
758
- byId: {
759
- path: "v2/masteries?ids=$(ids)",
760
- tokenRequired: false
761
- }
762
- },
763
- materials: {
764
- all: {
765
- path: "v2/materials",
766
- tokenRequired: false
767
- },
768
- byId: {
769
- path: "v2/materials?ids=$(ids)",
770
- tokenRequired: false
771
- }
772
- },
773
- minis: {
774
- all: {
775
- path: "v2/minis",
776
- tokenRequired: false
777
- },
778
- byId: {
779
- path: "v2/minis?ids=$(ids)",
780
- tokenRequired: false
781
- }
782
- },
783
- mountsSkins: {
784
- all: {
785
- path: "v2/mounts/skins",
786
- tokenRequired: false
787
- },
788
- byId: {
789
- path: "v2/mounts/skins?ids=$(ids)",
790
- tokenRequired: false
791
- }
792
- },
793
- mountsTypes: {
794
- all: {
795
- path: "v2/mounts/types",
796
- tokenRequired: false
797
- },
798
- byId: {
799
- path: "v2/mounts/types?ids=$(ids)",
800
- tokenRequired: false
801
- }
802
- },
803
- novelties: {
804
- all: {
805
- path: "v2/novelties",
806
- tokenRequired: false
807
- },
808
- byId: {
809
- path: "v2/novelties?ids=$(ids)",
810
- tokenRequired: false
811
- }
812
- },
813
- outfits: {
814
- all: {
815
- path: "v2/outfits",
816
- tokenRequired: false
817
- },
818
- byId: {
819
- path: "v2/outfits?ids=$(ids)",
820
- tokenRequired: false
821
- }
822
- },
823
- pets: {
824
- all: {
825
- path: "v2/pets",
826
- tokenRequired: false
827
- },
828
- byId: {
829
- path: "v2/pets?ids=$(ids)",
830
- tokenRequired: false
831
- }
832
- },
833
- professions: {
834
- all: {
835
- path: "v2/professions",
836
- tokenRequired: false
837
- },
838
- byId: {
839
- path: "v2/professions?ids=$(ids)",
840
- tokenRequired: false
841
- }
842
- },
843
- pvp: {
844
- amuletsAll: {
845
- path: "v2/pvp/amulets",
846
- tokenRequired: false
847
- },
848
- amuletsById: {
849
- path: `v2/pvp/amulets?ids=$(ids)`,
850
- tokenRequired: false
851
- },
852
- gamesAll: {
853
- path: `v2/pvp/games`,
854
- tokenRequired: true
855
- },
856
- gamesById: {
857
- path: `v2/pvp/games?ids=$(ids)`,
858
- tokenRequired: true
859
- },
860
- heroesAll: {
861
- path: `v2/pvp/heroes`,
862
- tokenRequired: false
863
- },
864
- heroesById: {
865
- path: `v2/pvp/heroes?ids=$(ids)`,
866
- tokenRequired: false
867
- },
868
- ranksAll: {
869
- path: `v2/pvp/ranks`,
870
- tokenRequired: false
871
- },
872
- ranksById: {
873
- path: `v2/pvp/ranks?ids=$(ids)`,
874
- tokenRequired: false
875
- },
876
- seasonsAll: {
877
- path: `v2/pvp/seasons`,
878
- tokenRequired: false
879
- },
880
- seasonsById: {
881
- path: `v2/pvp/seasons?ids=$(ids)`,
882
- tokenRequired: false
883
- },
884
- leaderboards: {
885
- path: `v2/pvp/seasons/$(id)/leaderboards/$(type)/$(region)`,
886
- tokenRequired: false
887
- },
888
- leaderboardsNoType: {
889
- path: `v2/pvp/seasons/$(id)/leaderboards`,
890
- tokenRequired: false
891
- },
892
- standings: {
893
- path: `v2/pvp/standings`,
894
- tokenRequired: true
895
- },
896
- stats: {
897
- path: `v2/pvp/stats`,
898
- tokenRequired: true
899
- }
900
- },
901
- quaggans: {
902
- all: {
903
- path: "v2/quaggans",
904
- tokenRequired: false
905
- },
906
- byId: {
907
- path: "v2/quaggans?ids=$(ids)",
908
- tokenRequired: false
909
- }
910
- },
911
- quests: {
912
- all: {
913
- path: "v2/quests",
914
- tokenRequired: false
915
- },
916
- byId: {
917
- path: "v2/quests?ids=$(ids)",
918
- tokenRequired: false
919
- }
920
- },
921
- races: {
922
- all: {
923
- path: "v2/races",
924
- tokenRequired: false
925
- },
926
- byId: {
927
- path: "v2/races?ids=$(ids)",
928
- tokenRequired: false
929
- }
930
- },
931
- raids: {
932
- all: {
933
- path: "v2/raids",
934
- tokenRequired: false
935
- },
936
- byId: {
937
- path: "v2/raids?ids=$(ids)",
938
- tokenRequired: false
939
- }
940
- },
941
- recipes: {
942
- byId: {
943
- /**
944
- * TODO: The hardcoded schema could use some work
945
- */
946
- path: "v2/recipes?ids=$(ids)&v=2022-03-09T02:00:00.000Z",
947
- tokenRequired: false
948
- },
949
- all: {
950
- path: "v2/recipes",
951
- tokenRequired: false
952
- },
953
- search: {
954
- path: "v2/recipes/search?$(type)=$(ids)",
955
- tokenRequired: false
956
- }
957
- },
958
- skiffs: {
959
- all: {
960
- path: "v2/skiffs",
961
- tokenRequired: false
962
- },
963
- byId: {
964
- path: "v2/skiffs?ids=$(ids)",
965
- tokenRequired: false
966
- }
967
- },
968
- skills: {
969
- path: "v2/skills?ids=$(ids)",
970
- tokenRequired: false
971
- },
972
- skins: {
973
- all: {
974
- path: "v2/skins",
975
- tokenRequired: false
976
- },
977
- byId: {
978
- path: "v2/skins?ids=$(ids)",
979
- tokenRequired: false
980
- }
981
- },
982
- specializations: {
983
- all: {
984
- path: "v2/specializations",
985
- tokenRequired: false
986
- },
987
- byId: {
988
- path: "v2/specializations?ids=$(ids)",
989
- tokenRequired: false
990
- }
991
- },
992
- stories: {
993
- all: {
994
- path: "v2/stories",
995
- tokenRequired: false
996
- },
997
- byId: {
998
- path: "v2/stories?ids=$(ids)",
999
- tokenRequired: false
1000
- }
1001
- },
1002
- seasons: {
1003
- all: {
1004
- path: "v2/stories/seasons",
1005
- tokenRequired: false
1006
- },
1007
- byId: {
1008
- path: "v2/stories/seasons?ids=$(ids)",
1009
- tokenRequired: false
1010
- }
1011
- },
1012
- titles: {
1013
- all: {
1014
- path: "v2/titles",
1015
- tokenRequired: false
1016
- },
1017
- byId: {
1018
- path: "v2/titles?ids=$(ids)",
1019
- tokenRequired: false
1020
- }
1021
- },
1022
- tokenInfo: {
1023
- path: "v2/tokeninfo",
1024
- tokenRequired: true
1025
- },
1026
- traits: {
1027
- all: {
1028
- path: "v2/traits",
1029
- tokenRequired: false
1030
- },
1031
- byId: {
1032
- path: "v2/traits?ids=$(ids)",
1033
- tokenRequired: false
1034
- }
1035
- },
1036
- worldBosses: {
1037
- path: "v2/worldbosses",
1038
- tokenRequired: false
1039
- },
1040
- worlds: {
1041
- all: {
1042
- path: "v2/worlds",
1043
- tokenRequired: false
1044
- },
1045
- byId: {
1046
- path: "v2/worlds?ids=$(ids)",
1047
- tokenRequired: false
1048
- }
1049
- },
1050
- wvw: {
1051
- abilities: {
1052
- path: "v2/wvw/abilities",
1053
- tokenRequired: false
1054
- },
1055
- abilitiesById: {
1056
- path: "v2/wvw/abilities?ids=$(ids)",
1057
- tokenRequired: false
1058
- },
1059
- matches: {
1060
- path: "v2/wvw/matches",
1061
- tokenRequired: false
1062
- },
1063
- matchesById: {
1064
- path: "v2/wvw/matches?ids=$(ids)",
1065
- tokenRequired: false
1066
- },
1067
- matchesByWorld: {
1068
- path: "v2/wvw/matches/$(type)?world=$(world)",
1069
- tokenRequired: false
1070
- },
1071
- objectives: {
1072
- path: "v2/wvw/objectives",
1073
- tokenRequired: false
1074
- },
1075
- objectivesById: {
1076
- path: "v2/wvw/objectives?ids=$(ids)",
1077
- tokenRequired: false
1078
- },
1079
- ranks: {
1080
- path: "v2/wvw/ranks",
1081
- tokenRequired: false
1082
- },
1083
- ranksById: {
1084
- path: "v2/wvw/ranks?ids=$(ids)",
1085
- tokenRequired: false
1086
- },
1087
- upgradesById: {
1088
- path: "v2/wvw/upgrades?ids=$(ids)",
1089
- tokenRequired: false
1090
- },
1091
- upgradesAll: {
1092
- path: "v2/wvw/upgrades",
1093
- tokenRequired: false
1094
- }
1095
- }
1096
- };
1097
225
  var AccountDTO = z.object({
1098
226
  /** Account id. */
1099
227
  id: z.string(),
@@ -3430,16 +2558,11 @@ var ProfessionsDTO = z.array(
3430
2558
  /** The skill id. Can be resolved against /v2/skills. */
3431
2559
  id: z.number(),
3432
2560
  /** The skill bar slot that this weapon skill can be used in. */
3433
- slot: z.enum([
3434
- "Profession_1",
3435
- "Weapon_1",
3436
- "Weapon_2",
3437
- "Weapon_3",
3438
- "Weapon_4",
3439
- "Weapon_5",
3440
- "Utility",
3441
- "Heal",
3442
- "Elite"
2561
+ slot: z.union([
2562
+ z.enum(["Profession_1", "Utility", "Heal", "Elite"]),
2563
+ z.custom(
2564
+ (val) => typeof val === "string" ? /^Weapon_[1-5]$/.test(val) : false
2565
+ )
3443
2566
  ]),
3444
2567
  /** The name of the offhand weapon this skill requires to be equipped. This field is usually only present for Thief skills. */
3445
2568
  offhand: z.string().optional(),
@@ -4750,6 +3873,875 @@ var WvWUpgradesDTO = z.array(
4750
3873
  })
4751
3874
  );
4752
3875
 
3876
+ // src/apis/endpoints.ts
3877
+ var endpoints = {
3878
+ account: {
3879
+ base: {
3880
+ path: "v2/account",
3881
+ tokenRequired: true
3882
+ },
3883
+ achievements: {
3884
+ path: "v2/account/achievements",
3885
+ tokenRequired: true
3886
+ },
3887
+ bank: {
3888
+ path: "v2/account/bank",
3889
+ tokenRequired: true
3890
+ },
3891
+ buildStorage: {
3892
+ path: "v2/account/buildstorage?ids=all",
3893
+ tokenRequired: true
3894
+ },
3895
+ dailyCrafting: {
3896
+ path: "v2/account/dailycrafting",
3897
+ tokenRequired: true
3898
+ },
3899
+ dungeons: {
3900
+ path: "v2/account/dungeons",
3901
+ tokenRequired: true
3902
+ },
3903
+ dyes: {
3904
+ path: "v2/account/dyes",
3905
+ tokenRequired: true
3906
+ },
3907
+ emotes: {
3908
+ path: "v2/account/emotes",
3909
+ tokenRequired: true
3910
+ },
3911
+ finishers: {
3912
+ path: "v2/account/finishers",
3913
+ tokenRequired: true
3914
+ },
3915
+ gliders: {
3916
+ path: "v2/account/gliders",
3917
+ tokenRequired: true
3918
+ },
3919
+ homeCats: {
3920
+ path: "v2/account/home/cats",
3921
+ tokenRequired: true
3922
+ },
3923
+ homeNodes: {
3924
+ path: "v2/account/home/nodes",
3925
+ tokenRequired: true
3926
+ },
3927
+ inventory: {
3928
+ path: "v2/account/inventory",
3929
+ tokenRequired: true
3930
+ },
3931
+ jadebots: {
3932
+ path: "v2/account/jadebots",
3933
+ tokenRequired: true
3934
+ },
3935
+ legendaryArmory: {
3936
+ path: "v2/account/legendaryarmory",
3937
+ tokenRequired: true
3938
+ },
3939
+ luck: {
3940
+ path: "v2/account/luck",
3941
+ tokenRequired: true
3942
+ },
3943
+ mailCarriers: {
3944
+ path: "v2/account/mailcarriers",
3945
+ tokenRequired: true
3946
+ },
3947
+ mapChests: {
3948
+ path: "v2/account/mapchests",
3949
+ tokenRequired: true
3950
+ },
3951
+ masteries: {
3952
+ path: "v2/account/masteries",
3953
+ tokenRequired: true
3954
+ },
3955
+ masteryPoints: {
3956
+ path: "v2/account/mastery/points",
3957
+ tokenRequired: true
3958
+ },
3959
+ materials: {
3960
+ path: "v2/account/materials",
3961
+ tokenRequired: true
3962
+ },
3963
+ minis: {
3964
+ path: "v2/account/minis",
3965
+ tokenRequired: true
3966
+ },
3967
+ mountsSkins: {
3968
+ path: "v2/account/mounts/skins",
3969
+ tokenRequired: true
3970
+ },
3971
+ mountsTypes: {
3972
+ path: "v2/account/mounts/types",
3973
+ tokenRequired: true
3974
+ },
3975
+ novelties: {
3976
+ path: "v2/account/novelties",
3977
+ tokenRequired: true
3978
+ },
3979
+ outfits: {
3980
+ path: "v2/account/outfits",
3981
+ tokenRequired: true
3982
+ },
3983
+ progression: {
3984
+ path: "v2/account/progression",
3985
+ tokenRequired: true
3986
+ },
3987
+ pvpHeroes: {
3988
+ path: "v2/account/pvp/heroes",
3989
+ tokenRequired: true
3990
+ },
3991
+ raids: {
3992
+ path: "v2/account/raids",
3993
+ tokenRequired: true
3994
+ },
3995
+ recipes: {
3996
+ path: "v2/account/recipes",
3997
+ tokenRequired: true
3998
+ },
3999
+ skiffs: {
4000
+ path: "v2/account/skiffs",
4001
+ tokenRequired: true
4002
+ },
4003
+ skins: {
4004
+ path: "v2/account/skins",
4005
+ tokenRequired: true
4006
+ },
4007
+ titles: {
4008
+ path: "v2/account/titles",
4009
+ tokenRequired: true
4010
+ },
4011
+ wallet: {
4012
+ path: "v2/account/wallet",
4013
+ tokenRequired: true
4014
+ },
4015
+ worldBosses: {
4016
+ path: "v2/account/worldbosses",
4017
+ tokenRequired: true
4018
+ }
4019
+ },
4020
+ achievements: {
4021
+ categoryIds: {
4022
+ path: "v2/achievements/categories",
4023
+ tokenRequired: false
4024
+ },
4025
+ categories: {
4026
+ path: "v2/achievements/categories?ids=$(ids)",
4027
+ tokenRequired: false
4028
+ },
4029
+ groupsAll: {
4030
+ path: "v2/achievements/groups",
4031
+ tokenRequired: false
4032
+ },
4033
+ groupsById: {
4034
+ path: "v2/achievements/groups/$(id)",
4035
+ tokenRequired: false
4036
+ }
4037
+ },
4038
+ backstory: {
4039
+ answersAll: {
4040
+ path: "v2/backstory/answers",
4041
+ tokenRequired: false
4042
+ },
4043
+ answersById: {
4044
+ path: "v2/backstory/answers?ids=$(ids)",
4045
+ tokenRequired: false
4046
+ },
4047
+ questionsAll: {
4048
+ path: "v2/backstory/questions",
4049
+ tokenRequired: false
4050
+ },
4051
+ questionsById: {
4052
+ path: "v2/backstory/questions?ids=$(ids)",
4053
+ tokenRequired: false
4054
+ }
4055
+ },
4056
+ build: {
4057
+ path: "v2/build",
4058
+ tokenRequired: false
4059
+ },
4060
+ characters: {
4061
+ base: {
4062
+ path: "v2/characters",
4063
+ tokenRequired: true
4064
+ },
4065
+ backstory: {
4066
+ path: "v2/characters/$(id)/backstory",
4067
+ tokenRequired: true
4068
+ },
4069
+ buildTabs: {
4070
+ path: "v2/characters/$(id)/buildtabs?tabs=$(tabs)",
4071
+ tokenRequired: true
4072
+ },
4073
+ core: {
4074
+ path: "v2/characters/$(id)/core",
4075
+ tokenRequired: true
4076
+ },
4077
+ crafting: {
4078
+ path: "v2/characters/$(id)/crafting",
4079
+ tokenRequired: true
4080
+ },
4081
+ equipment: {
4082
+ path: "v2/characters/$(id)/equipment",
4083
+ tokenRequired: true
4084
+ },
4085
+ equipmentTabsById: {
4086
+ path: "v2/characters/$(id)/equipmenttabs?tabs=$(tabs)",
4087
+ tokenRequired: true
4088
+ },
4089
+ equipmentTabActive: {
4090
+ path: "v2/characters/$(id)/equipmenttabs/active",
4091
+ tokenRequired: true
4092
+ },
4093
+ heroPoints: {
4094
+ path: "v2/characters/$(id)/heropoints",
4095
+ tokenRequired: true
4096
+ },
4097
+ inventory: {
4098
+ path: "v2/characters/$(id)/inventory",
4099
+ tokenRequired: true
4100
+ },
4101
+ quests: {
4102
+ path: "v2/characters/$(id)/quests",
4103
+ tokenRequired: true
4104
+ },
4105
+ recipes: {
4106
+ path: "v2/characters/$(id)/recipes",
4107
+ tokenRequired: true
4108
+ },
4109
+ sab: {
4110
+ path: "v2/characters/$(id)/sab",
4111
+ tokenRequired: true
4112
+ },
4113
+ skills: {
4114
+ path: "v2/characters/$(id)/skills",
4115
+ tokenRequired: true
4116
+ },
4117
+ specializations: {
4118
+ path: "v2/characters/$(id)/specializations",
4119
+ tokenRequired: true
4120
+ },
4121
+ training: {
4122
+ path: "v2/characters/$(id)/training",
4123
+ tokenRequired: true
4124
+ }
4125
+ },
4126
+ colors: {
4127
+ all: {
4128
+ path: "v2/colors",
4129
+ tokenRequired: false
4130
+ },
4131
+ byId: {
4132
+ path: "v2/colors?ids=$(ids)",
4133
+ tokenRequired: false
4134
+ }
4135
+ },
4136
+ commerce: {
4137
+ delivery: {
4138
+ path: "v2/commerce/delivery",
4139
+ tokenRequired: true
4140
+ },
4141
+ exchange: {
4142
+ path: "v2/commerce/exchange/$(type)?quantity=$(quantity)",
4143
+ tokenRequired: false
4144
+ },
4145
+ listings: {
4146
+ path: "v2/commerce/listings?ids=$(ids)",
4147
+ tokenRequired: false
4148
+ },
4149
+ prices: {
4150
+ path: "v2/commerce/prices?ids=$(ids)",
4151
+ tokenRequired: false
4152
+ },
4153
+ transactions: {
4154
+ path: "v2/commerce/transactions/$(status)/$(type)",
4155
+ tokenRequired: true
4156
+ }
4157
+ },
4158
+ continents: {
4159
+ core: {
4160
+ path: "v2/continents",
4161
+ tokenRequired: false
4162
+ },
4163
+ continents: {
4164
+ path: "v2/continents?ids=$(continents)",
4165
+ tokenRequired: false
4166
+ },
4167
+ floors: {
4168
+ path: "v2/continents/$(continents)/floors?ids=$(floors)",
4169
+ tokenRequired: false
4170
+ },
4171
+ regions: {
4172
+ path: "v2/continents/$(continents)/floors/$(floors)/regions?ids=$(regions)",
4173
+ tokenRequired: false
4174
+ },
4175
+ maps: {
4176
+ path: "v2/continents/$(continents)/floors/$(floors)/regions/$(regions)/maps?ids=$(maps)",
4177
+ tokenRequired: false
4178
+ }
4179
+ },
4180
+ createSubtoken: {
4181
+ noUrl: {
4182
+ path: "v2/createsubtoken?expire=$(expire)&permissions=$(permissions)",
4183
+ tokenRequired: true
4184
+ },
4185
+ url: {
4186
+ path: "v2/createsubtoken?expire=$(expire)&permissions=$(permissions)&urls=$(urls)",
4187
+ tokenRequired: true
4188
+ }
4189
+ },
4190
+ currencies: {
4191
+ all: {
4192
+ path: "v2/currencies",
4193
+ tokenRequired: false
4194
+ },
4195
+ byId: {
4196
+ path: "v2/currencies?ids=$(ids)",
4197
+ tokenRequired: false
4198
+ }
4199
+ },
4200
+ dailyCrafting: {
4201
+ path: "v2/dailycrafting",
4202
+ tokenRequired: false
4203
+ },
4204
+ dungeons: {
4205
+ all: {
4206
+ path: "v2/dungeons",
4207
+ tokenRequired: false
4208
+ },
4209
+ byId: {
4210
+ path: "v2/dungeons?ids=$(ids)",
4211
+ tokenRequired: false
4212
+ }
4213
+ },
4214
+ emblem: {
4215
+ path: "v2/emblem/$(type)?ids=$(ids)",
4216
+ tokenRequired: false
4217
+ },
4218
+ emotes: {
4219
+ all: {
4220
+ path: "v2/emotes",
4221
+ tokenRequired: false
4222
+ },
4223
+ byId: {
4224
+ path: "v2/emotes?ids=$(ids)",
4225
+ tokenRequired: false
4226
+ }
4227
+ },
4228
+ files: {
4229
+ all: {
4230
+ path: "v2/files",
4231
+ tokenRequired: false
4232
+ },
4233
+ byId: {
4234
+ path: "v2/files?ids=$(ids)",
4235
+ tokenRequired: false
4236
+ }
4237
+ },
4238
+ finishers: {
4239
+ all: {
4240
+ path: "v2/finishers",
4241
+ tokenRequired: false
4242
+ },
4243
+ byId: {
4244
+ path: "v2/finishers?ids=$(ids)",
4245
+ tokenRequired: false
4246
+ }
4247
+ },
4248
+ gliders: {
4249
+ all: {
4250
+ path: "v2/gliders",
4251
+ tokenRequired: false
4252
+ },
4253
+ byId: {
4254
+ path: "v2/gliders?ids=$(ids)",
4255
+ tokenRequired: false
4256
+ },
4257
+ paginated: {
4258
+ path: "v2/gliders?ids=$(ids)&page=$(page)&page_size=$(page_size)",
4259
+ tokenRequired: false
4260
+ }
4261
+ },
4262
+ guild: {
4263
+ core: {
4264
+ path: "v2/guild/$(id)",
4265
+ tokenRequired: false
4266
+ },
4267
+ log: {
4268
+ path: "v2/guild/$(id)/log?since=$(since)",
4269
+ tokenRequired: true
4270
+ },
4271
+ members: {
4272
+ path: "v2/guild/$(id)/members",
4273
+ tokenRequired: true
4274
+ },
4275
+ ranks: {
4276
+ path: "v2/guild/$(id)/ranks",
4277
+ tokenRequired: true
4278
+ },
4279
+ stash: {
4280
+ path: "v2/guild/$(id)/stash",
4281
+ tokenRequired: true
4282
+ },
4283
+ storage: {
4284
+ path: "v2/guild/$(id)/storage",
4285
+ tokenRequired: true
4286
+ },
4287
+ teams: {
4288
+ path: "v2/guild/$(id)/teams",
4289
+ tokenRequired: true
4290
+ },
4291
+ treasury: {
4292
+ path: "v2/guild/$(id)/treasury",
4293
+ tokenRequired: true
4294
+ },
4295
+ upgrades: {
4296
+ path: "v2/guild/$(id)/upgrades",
4297
+ tokenRequired: true
4298
+ },
4299
+ upgradesInfo: {
4300
+ path: "v2/guild/upgrades?ids=$(ids)",
4301
+ tokenRequired: false
4302
+ },
4303
+ permissionsAll: {
4304
+ path: "v2/guild/permissions",
4305
+ tokenRequired: false
4306
+ },
4307
+ permissionsById: {
4308
+ path: "v2/guild/permissions?ids=$(ids)",
4309
+ tokenRequired: false
4310
+ },
4311
+ search: {
4312
+ path: "v2/guild/search?name=$(name)",
4313
+ tokenRequired: false
4314
+ }
4315
+ },
4316
+ home: {
4317
+ cats: {
4318
+ path: "v2/home/cats?ids=$(ids)",
4319
+ tokenRequired: false
4320
+ },
4321
+ nodes: {
4322
+ path: "v2/home/nodes?ids=$(ids)",
4323
+ tokenRequired: false
4324
+ }
4325
+ },
4326
+ items: {
4327
+ all: {
4328
+ path: "v2/items",
4329
+ tokenRequired: false
4330
+ },
4331
+ byId: {
4332
+ path: "v2/items?ids=$(ids)",
4333
+ tokenRequired: false
4334
+ }
4335
+ },
4336
+ itemstats: {
4337
+ all: {
4338
+ path: "v2/itemstats",
4339
+ tokenRequired: false
4340
+ },
4341
+ byId: {
4342
+ path: "v2/itemstats?ids=$(ids)",
4343
+ tokenRequired: false
4344
+ }
4345
+ },
4346
+ jadebots: {
4347
+ all: {
4348
+ path: "v2/jadebots",
4349
+ tokenRequired: false
4350
+ },
4351
+ byId: {
4352
+ path: "v2/jadebots?ids=$(ids)",
4353
+ tokenRequired: false
4354
+ }
4355
+ },
4356
+ legendaryArmory: {
4357
+ all: {
4358
+ path: "v2/legendaryarmory",
4359
+ tokenRequired: false
4360
+ },
4361
+ byId: {
4362
+ path: "v2/legendaryarmory?ids=$(ids)",
4363
+ tokenRequired: false
4364
+ }
4365
+ },
4366
+ legends: {
4367
+ all: {
4368
+ path: "v2/legends",
4369
+ tokenRequired: false
4370
+ },
4371
+ byId: {
4372
+ path: "v2/legends?ids=$(ids)",
4373
+ tokenRequired: false
4374
+ }
4375
+ },
4376
+ mailCarriers: {
4377
+ all: {
4378
+ path: "v2/mailcarriers",
4379
+ tokenRequired: false
4380
+ },
4381
+ byId: {
4382
+ path: "v2/mailcarriers?ids=$(ids)",
4383
+ tokenRequired: false
4384
+ }
4385
+ },
4386
+ mapChests: {
4387
+ path: "v2/mapchests",
4388
+ tokenRequired: false
4389
+ },
4390
+ maps: {
4391
+ all: {
4392
+ path: "v2/maps",
4393
+ tokenRequired: false
4394
+ },
4395
+ byId: {
4396
+ path: "v2/maps?ids=$(ids)",
4397
+ tokenRequired: false
4398
+ }
4399
+ },
4400
+ masteries: {
4401
+ all: {
4402
+ path: "v2/masteries",
4403
+ tokenRequired: false
4404
+ },
4405
+ byId: {
4406
+ path: "v2/masteries?ids=$(ids)",
4407
+ tokenRequired: false
4408
+ }
4409
+ },
4410
+ materials: {
4411
+ all: {
4412
+ path: "v2/materials",
4413
+ tokenRequired: false
4414
+ },
4415
+ byId: {
4416
+ path: "v2/materials?ids=$(ids)",
4417
+ tokenRequired: false
4418
+ }
4419
+ },
4420
+ minis: {
4421
+ all: {
4422
+ path: "v2/minis",
4423
+ tokenRequired: false
4424
+ },
4425
+ byId: {
4426
+ path: "v2/minis?ids=$(ids)",
4427
+ tokenRequired: false
4428
+ }
4429
+ },
4430
+ mountsSkins: {
4431
+ all: {
4432
+ path: "v2/mounts/skins",
4433
+ tokenRequired: false
4434
+ },
4435
+ byId: {
4436
+ path: "v2/mounts/skins?ids=$(ids)",
4437
+ tokenRequired: false
4438
+ }
4439
+ },
4440
+ mountsTypes: {
4441
+ all: {
4442
+ path: "v2/mounts/types",
4443
+ tokenRequired: false
4444
+ },
4445
+ byId: {
4446
+ path: "v2/mounts/types?ids=$(ids)",
4447
+ tokenRequired: false
4448
+ }
4449
+ },
4450
+ novelties: {
4451
+ all: {
4452
+ path: "v2/novelties",
4453
+ tokenRequired: false
4454
+ },
4455
+ byId: {
4456
+ path: "v2/novelties?ids=$(ids)",
4457
+ tokenRequired: false
4458
+ }
4459
+ },
4460
+ outfits: {
4461
+ all: {
4462
+ path: "v2/outfits",
4463
+ tokenRequired: false
4464
+ },
4465
+ byId: {
4466
+ path: "v2/outfits?ids=$(ids)",
4467
+ tokenRequired: false
4468
+ }
4469
+ },
4470
+ pets: {
4471
+ all: {
4472
+ path: "v2/pets",
4473
+ tokenRequired: false
4474
+ },
4475
+ byId: {
4476
+ path: "v2/pets?ids=$(ids)",
4477
+ tokenRequired: false
4478
+ }
4479
+ },
4480
+ professions: {
4481
+ all: {
4482
+ path: "v2/professions",
4483
+ tokenRequired: false
4484
+ },
4485
+ byId: {
4486
+ path: "v2/professions?ids=$(ids)",
4487
+ tokenRequired: false
4488
+ }
4489
+ },
4490
+ pvp: {
4491
+ amuletsAll: {
4492
+ path: "v2/pvp/amulets",
4493
+ tokenRequired: false
4494
+ },
4495
+ amuletsById: {
4496
+ path: "v2/pvp/amulets?ids=$(ids)",
4497
+ tokenRequired: false
4498
+ },
4499
+ gamesAll: {
4500
+ path: "v2/pvp/games",
4501
+ tokenRequired: true
4502
+ },
4503
+ gamesById: {
4504
+ path: "v2/pvp/games?ids=$(ids)",
4505
+ tokenRequired: true
4506
+ },
4507
+ heroesAll: {
4508
+ path: "v2/pvp/heroes",
4509
+ tokenRequired: false
4510
+ },
4511
+ heroesById: {
4512
+ path: "v2/pvp/heroes?ids=$(ids)",
4513
+ tokenRequired: false
4514
+ },
4515
+ ranksAll: {
4516
+ path: "v2/pvp/ranks",
4517
+ tokenRequired: false
4518
+ },
4519
+ ranksById: {
4520
+ path: "v2/pvp/ranks?ids=$(ids)",
4521
+ tokenRequired: false
4522
+ },
4523
+ seasonsAll: {
4524
+ path: "v2/pvp/seasons",
4525
+ tokenRequired: false
4526
+ },
4527
+ seasonsById: {
4528
+ path: "v2/pvp/seasons?ids=$(ids)",
4529
+ tokenRequired: false
4530
+ },
4531
+ leaderboards: {
4532
+ path: "v2/pvp/seasons/$(id)/leaderboards/$(type)/$(region)",
4533
+ tokenRequired: false
4534
+ },
4535
+ leaderboardsNoType: {
4536
+ path: "v2/pvp/seasons/$(id)/leaderboards",
4537
+ tokenRequired: false
4538
+ },
4539
+ standings: {
4540
+ path: "v2/pvp/standings",
4541
+ tokenRequired: true
4542
+ },
4543
+ stats: {
4544
+ path: "v2/pvp/stats",
4545
+ tokenRequired: true
4546
+ }
4547
+ },
4548
+ quaggans: {
4549
+ all: {
4550
+ path: "v2/quaggans",
4551
+ tokenRequired: false
4552
+ },
4553
+ byId: {
4554
+ path: "v2/quaggans?ids=$(ids)",
4555
+ tokenRequired: false
4556
+ }
4557
+ },
4558
+ quests: {
4559
+ all: {
4560
+ path: "v2/quests",
4561
+ tokenRequired: false
4562
+ },
4563
+ byId: {
4564
+ path: "v2/quests?ids=$(ids)",
4565
+ tokenRequired: false
4566
+ }
4567
+ },
4568
+ races: {
4569
+ all: {
4570
+ path: "v2/races",
4571
+ tokenRequired: false
4572
+ },
4573
+ byId: {
4574
+ path: "v2/races?ids=$(ids)",
4575
+ tokenRequired: false
4576
+ }
4577
+ },
4578
+ raids: {
4579
+ all: {
4580
+ path: "v2/raids",
4581
+ tokenRequired: false
4582
+ },
4583
+ byId: {
4584
+ path: "v2/raids?ids=$(ids)",
4585
+ tokenRequired: false
4586
+ }
4587
+ },
4588
+ recipes: {
4589
+ byId: {
4590
+ /**
4591
+ * TODO: The hardcoded schema could use some work
4592
+ */
4593
+ path: "v2/recipes?ids=$(ids)&v=2022-03-09T02:00:00.000Z",
4594
+ tokenRequired: false
4595
+ },
4596
+ all: {
4597
+ path: "v2/recipes",
4598
+ tokenRequired: false
4599
+ },
4600
+ search: {
4601
+ path: "v2/recipes/search?$(type)=$(ids)",
4602
+ tokenRequired: false
4603
+ }
4604
+ },
4605
+ skiffs: {
4606
+ all: {
4607
+ path: "v2/skiffs",
4608
+ tokenRequired: false
4609
+ },
4610
+ byId: {
4611
+ path: "v2/skiffs?ids=$(ids)",
4612
+ tokenRequired: false
4613
+ }
4614
+ },
4615
+ skills: {
4616
+ path: "v2/skills?ids=$(ids)",
4617
+ tokenRequired: false
4618
+ },
4619
+ skins: {
4620
+ all: {
4621
+ path: "v2/skins",
4622
+ tokenRequired: false
4623
+ },
4624
+ byId: {
4625
+ path: "v2/skins?ids=$(ids)",
4626
+ tokenRequired: false
4627
+ }
4628
+ },
4629
+ specializations: {
4630
+ all: {
4631
+ path: "v2/specializations",
4632
+ tokenRequired: false
4633
+ },
4634
+ byId: {
4635
+ path: "v2/specializations?ids=$(ids)",
4636
+ tokenRequired: false
4637
+ }
4638
+ },
4639
+ stories: {
4640
+ all: {
4641
+ path: "v2/stories",
4642
+ tokenRequired: false
4643
+ },
4644
+ byId: {
4645
+ path: "v2/stories?ids=$(ids)",
4646
+ tokenRequired: false
4647
+ }
4648
+ },
4649
+ seasons: {
4650
+ all: {
4651
+ path: "v2/stories/seasons",
4652
+ tokenRequired: false
4653
+ },
4654
+ byId: {
4655
+ path: "v2/stories/seasons?ids=$(ids)",
4656
+ tokenRequired: false
4657
+ }
4658
+ },
4659
+ titles: {
4660
+ all: {
4661
+ path: "v2/titles",
4662
+ tokenRequired: false
4663
+ },
4664
+ byId: {
4665
+ path: "v2/titles?ids=$(ids)",
4666
+ tokenRequired: false
4667
+ }
4668
+ },
4669
+ tokenInfo: {
4670
+ path: "v2/tokeninfo",
4671
+ tokenRequired: true
4672
+ },
4673
+ traits: {
4674
+ all: {
4675
+ path: "v2/traits",
4676
+ tokenRequired: false
4677
+ },
4678
+ byId: {
4679
+ path: "v2/traits?ids=$(ids)",
4680
+ tokenRequired: false
4681
+ }
4682
+ },
4683
+ worldBosses: {
4684
+ path: "v2/worldbosses",
4685
+ tokenRequired: false
4686
+ },
4687
+ worlds: {
4688
+ all: {
4689
+ path: "v2/worlds",
4690
+ tokenRequired: false
4691
+ },
4692
+ byId: {
4693
+ path: "v2/worlds?ids=$(ids)",
4694
+ tokenRequired: false
4695
+ }
4696
+ },
4697
+ wvw: {
4698
+ abilities: {
4699
+ path: "v2/wvw/abilities",
4700
+ tokenRequired: false
4701
+ },
4702
+ abilitiesById: {
4703
+ path: "v2/wvw/abilities?ids=$(ids)",
4704
+ tokenRequired: false
4705
+ },
4706
+ matches: {
4707
+ path: "v2/wvw/matches",
4708
+ tokenRequired: false
4709
+ },
4710
+ matchesById: {
4711
+ path: "v2/wvw/matches?ids=$(ids)",
4712
+ tokenRequired: false
4713
+ },
4714
+ matchesByWorld: {
4715
+ path: "v2/wvw/matches/$(type)?world=$(world)",
4716
+ tokenRequired: false
4717
+ },
4718
+ objectives: {
4719
+ path: "v2/wvw/objectives",
4720
+ tokenRequired: false
4721
+ },
4722
+ objectivesById: {
4723
+ path: "v2/wvw/objectives?ids=$(ids)",
4724
+ tokenRequired: false
4725
+ },
4726
+ ranks: {
4727
+ path: "v2/wvw/ranks",
4728
+ tokenRequired: false
4729
+ },
4730
+ ranksById: {
4731
+ path: "v2/wvw/ranks?ids=$(ids)",
4732
+ tokenRequired: false
4733
+ },
4734
+ upgradesById: {
4735
+ path: "v2/wvw/upgrades?ids=$(ids)",
4736
+ tokenRequired: false
4737
+ },
4738
+ upgradesAll: {
4739
+ path: "v2/wvw/upgrades",
4740
+ tokenRequired: false
4741
+ }
4742
+ }
4743
+ };
4744
+
4753
4745
  // src/apis/account/account.ts
4754
4746
  var AccountApi = class extends ApiBase {
4755
4747
  /**
@@ -5092,12 +5084,12 @@ var CharactersApi = class extends ApiBase {
5092
5084
  */
5093
5085
  async getBuildTabs(id, tabs = "all") {
5094
5086
  if (Array.isArray(tabs)) {
5095
- tabs.forEach((tab) => {
5087
+ for (const tab of tabs) {
5096
5088
  if (tab < 1 || tab > 8) {
5097
5089
  logger.warn("Build tab ids must be between 1 and 8. Returning all tabs");
5098
5090
  tabs = "all";
5099
5091
  }
5100
- });
5092
+ }
5101
5093
  }
5102
5094
  return await this.buildRequest(
5103
5095
  endpoints.characters.buildTabs,
@@ -5148,12 +5140,12 @@ var CharactersApi = class extends ApiBase {
5148
5140
  */
5149
5141
  async getEquipmentTabs(id, tabs = "all") {
5150
5142
  if (Array.isArray(tabs)) {
5151
- tabs.forEach((tab) => {
5143
+ for (const tab of tabs) {
5152
5144
  if (tab < 1 || tab > 8) {
5153
5145
  logger.warn("Equipment tab ids must be between 1 and 8. Returning all tabs.");
5154
5146
  tabs = "all";
5155
5147
  }
5156
- });
5148
+ }
5157
5149
  }
5158
5150
  return await this.buildRequest(
5159
5151
  endpoints.characters.equipmentTabsById,
@@ -5570,7 +5562,7 @@ var ContinentsApi = class extends ApiBase {
5570
5562
  ContinentsMapsDTO
5571
5563
  );
5572
5564
  }
5573
- } else if (regions instanceof Array || regions === "all") {
5565
+ } else if (Array.isArray(regions) || regions === "all") {
5574
5566
  return await this.buildRequest(
5575
5567
  endpoints.continents.regions,
5576
5568
  {
@@ -5581,7 +5573,7 @@ var ContinentsApi = class extends ApiBase {
5581
5573
  ContinentsRegionsDTO
5582
5574
  );
5583
5575
  }
5584
- } else if (floors instanceof Array || floors === "all") {
5576
+ } else if (Array.isArray(floors) || floors === "all") {
5585
5577
  return await this.buildRequest(
5586
5578
  endpoints.continents.floors,
5587
5579
  {
@@ -5591,7 +5583,7 @@ var ContinentsApi = class extends ApiBase {
5591
5583
  ContinentsFloorsDTO
5592
5584
  );
5593
5585
  }
5594
- } else if (continents instanceof Array || continents === "all") {
5586
+ } else if (Array.isArray(continents) || continents === "all") {
5595
5587
  return await this.buildRequest(
5596
5588
  endpoints.continents.continents,
5597
5589
  {
@@ -5638,7 +5630,7 @@ var EmotesApi = class extends ApiBase {
5638
5630
  if (ids && Array.isArray(ids)) {
5639
5631
  ids = ids.map((id) => {
5640
5632
  if (["shiverplus", "stretch"].includes(id.toLocaleLowerCase()))
5641
- return id[0].toLocaleUpperCase() + id.substring(1);
5633
+ return id[0]?.toLocaleUpperCase() + id.substring(1);
5642
5634
  return id.toLocaleLowerCase();
5643
5635
  });
5644
5636
  return await this.buildRequest(endpoints.emotes.byId, { ids }, EmotesDTO);
@@ -6170,213 +6162,109 @@ var WorldVsWorldApi = class extends ApiBase {
6170
6162
 
6171
6163
  // src/api.ts
6172
6164
  var GW2Api = class extends ApiBase {
6173
- /**
6174
- * /v2/account Api
6175
- */
6165
+ /** /v2/account Api */
6176
6166
  account = new AccountApi(this.getParams());
6177
- /**
6178
- * /v2/achievements Api
6179
- */
6167
+ /** /v2/achievements Api */
6180
6168
  achievements = new AchievementsApi(this.getParams());
6181
- /**
6182
- * /v2/backstory Api
6183
- */
6169
+ /** /v2/backstory Api */
6184
6170
  backstory = new BackstoryApi(this.getParams());
6185
- /**
6186
- * /v2/build Api
6187
- */
6171
+ /** /v2/build Api */
6188
6172
  build = new BuildApi(this.getParams());
6189
- /**
6190
- * /v2/characters Api
6191
- */
6173
+ /** /v2/characters Api */
6192
6174
  characters = new CharactersApi(this.getParams());
6193
- /**
6194
- * /v2/colors Api
6195
- */
6175
+ /** /v2/colors Api */
6196
6176
  colors = new ColorsApi(this.getParams());
6197
- /**
6198
- * /v2/commerce Api
6199
- */
6177
+ /** /v2/commerce Api */
6200
6178
  commerce = new CommerceApi(this.getParams());
6201
- /**
6202
- * /v2/continents Api
6203
- */
6179
+ /** /v2/continents Api */
6204
6180
  continents = new ContinentsApi(this.getParams());
6205
- /**
6206
- * /v2/currencies Api
6207
- */
6181
+ /** /v2/currencies Api */
6208
6182
  currencies = new CurrenciesApi(this.getParams());
6209
- /**
6210
- * /v2/dailycrafting Api
6211
- */
6183
+ /** /v2/dailycrafting Api */
6212
6184
  dailyCrafting = new DailyCraftingApi(this.getParams());
6213
- /**
6214
- * /v2/dungeons Api
6215
- */
6185
+ /** /v2/dungeons Api */
6216
6186
  dungeons = new DungeonsApi(this.getParams());
6217
- /**
6218
- * /v2/emblem Api
6219
- */
6187
+ /** /v2/emblem Api */
6220
6188
  emblem = new EmblemApi(this.getParams());
6221
- /**
6222
- * /v2/emotes Api
6223
- */
6189
+ /** /v2/emotes Api */
6224
6190
  emotes = new EmotesApi(this.getParams());
6225
- /**
6226
- * /v2/files Api
6227
- */
6191
+ /** /v2/files Api */
6228
6192
  files = new FilesApi(this.getParams());
6229
- /**
6230
- * /v2/finishers Api
6231
- */
6193
+ /** /v2/finishers Api */
6232
6194
  finishers = new FinishersApi(this.getParams());
6233
- /**
6234
- * /v2/gliders Api
6235
- */
6195
+ /** /v2/gliders Api */
6236
6196
  gliders = new GlidersApi(this.getParams());
6237
- /**
6238
- * /v2/guild Api
6239
- */
6197
+ /** /v2/guild Api */
6240
6198
  guild = new GuildApi(this.getParams());
6241
- /**
6242
- * /v2/home Api
6243
- */
6199
+ /** /v2/home Api */
6244
6200
  home = new HomeApi(this.getParams());
6245
- /**
6246
- * /v2/items Api
6247
- */
6201
+ /** /v2/items Api */
6248
6202
  items = new ItemsApi(this.getParams());
6249
- /**
6250
- * /v2/itemstats Api
6251
- */
6203
+ /** /v2/itemstats Api */
6252
6204
  itemstats = new ItemStatsApi(this.getParams());
6253
- /**
6254
- * /v2/jadebots Api
6255
- */
6205
+ /** /v2/jadebots Api */
6256
6206
  jadebots = new JadebotsApi(this.getParams());
6257
- /**
6258
- * /v2/legendaryarmory Api
6259
- */
6207
+ /** /v2/legendaryarmory Api */
6260
6208
  legendaryArmory = new LegendaryArmoryApi(this.getParams());
6261
- /**
6262
- * /v2/legends Api
6263
- */
6209
+ /** /v2/legends Api */
6264
6210
  legends = new LegendsApi(this.getParams());
6265
- /**
6266
- * /v2/mailcarriers Api
6267
- */
6211
+ /** /v2/mailcarriers Api */
6268
6212
  mailCarriers = new MailCarriersApi(this.getParams());
6269
- /**
6270
- * /v2/mapchests Api
6271
- */
6213
+ /** /v2/mapchests Api */
6272
6214
  mapChests = new MapChestsApi(this.getParams());
6273
- /**
6274
- * /v2/maps Api
6275
- */
6215
+ /** /v2/maps Api */
6276
6216
  maps = new MapsApi(this.getParams());
6277
- /**
6278
- * /v2/masteries Api
6279
- */
6217
+ /** /v2/masteries Api */
6280
6218
  masteries = new MasteriesApi(this.getParams());
6281
- /**
6282
- * /v2/materials Api
6283
- */
6219
+ /** /v2/materials Api */
6284
6220
  materials = new MaterialsApi(this.getParams());
6285
- /**
6286
- * /v2/minis Api
6287
- */
6221
+ /** /v2/minis Api */
6288
6222
  minis = new MinisApi(this.getParams());
6289
- /**
6290
- * /v2/mounts Api
6291
- */
6223
+ /** /v2/mounts Api */
6292
6224
  mounts = new MountsApi(this.getParams());
6293
- /**
6294
- * /v2/novelties Api
6295
- */
6225
+ /** /v2/novelties Api */
6296
6226
  novelties = new NoveltiesApi(this.getParams());
6297
- /**
6298
- * /v2/outfits Api
6299
- */
6227
+ /** /v2/outfits Api */
6300
6228
  outfits = new OutfitsApi(this.getParams());
6301
- /**
6302
- * /v2/pets Api
6303
- */
6229
+ /** /v2/pets Api */
6304
6230
  pets = new PetsApi(this.getParams());
6305
- /**
6306
- * /v2/professions Api
6307
- */
6231
+ /** /v2/professions Api */
6308
6232
  professions = new ProfessionsApi(this.getParams());
6309
- /**
6310
- * /v2/pvp Api
6311
- */
6233
+ /** /v2/pvp Api */
6312
6234
  pvp = new PvPApi(this.getParams());
6313
- /**
6314
- * /v2/quaggans Api
6315
- */
6235
+ /** /v2/quaggans Api */
6316
6236
  quaggans = new QuaggansApi(this.getParams());
6317
- /**
6318
- * /v2/quests Api
6319
- */
6237
+ /** /v2/quests Api */
6320
6238
  quests = new QuestsApi(this.getParams());
6321
- /**
6322
- * /v2/races Api
6323
- */
6239
+ /** /v2/races Api */
6324
6240
  races = new RacesApi(this.getParams());
6325
- /**
6326
- * /v2/raids Api
6327
- */
6241
+ /** /v2/raids Api */
6328
6242
  raids = new RaidsApi(this.getParams());
6329
- /**
6330
- * /v2/recipes Api
6331
- */
6243
+ /** /v2/recipes Api */
6332
6244
  recipes = new RecipesApi(this.getParams());
6333
- /**
6334
- * /v2/skiffs Api
6335
- */
6245
+ /** /v2/skiffs Api */
6336
6246
  skiffs = new SkiffsApi(this.getParams());
6337
- /**
6338
- * /v2/skills Api
6339
- */
6247
+ /** /v2/skills Api */
6340
6248
  skills = new SkillsApi(this.getParams());
6341
- /**
6342
- * /v2/skins Api
6343
- */
6249
+ /** /v2/skins Api */
6344
6250
  skins = new SkinsApi(this.getParams());
6345
- /**
6346
- * /v2/specializations Api
6347
- */
6251
+ /** /v2/specializations Api */
6348
6252
  specializations = new SpecializationsApi(this.getParams());
6349
- /**
6350
- * /v2/stories Api
6351
- */
6253
+ /** /v2/stories Api */
6352
6254
  stories = new StoriesApi(this.getParams());
6353
- /**
6354
- * /v2/subtoken Api
6355
- */
6255
+ /** /v2/subtoken Api */
6356
6256
  subtoken = new SubtokenApi(this.getParams());
6357
- /**
6358
- * /v2/titles Api
6359
- */
6257
+ /** /v2/titles Api */
6360
6258
  titles = new TitlesApi(this.getParams());
6361
- /**
6362
- * /v2/tokeninfo Api
6363
- */
6259
+ /** /v2/tokeninfo Api */
6364
6260
  tokenInfo = new TokenInfoApi(this.getParams());
6365
- /**
6366
- * /v2/traits Api
6367
- */
6261
+ /** /v2/traits Api */
6368
6262
  traits = new TraitsApi(this.getParams());
6369
- /**
6370
- * /v2/worldbosses Api
6371
- */
6263
+ /** /v2/worldbosses Api */
6372
6264
  worldBosses = new WorldBossesApi(this.getParams());
6373
- /**
6374
- * /v2/worlds Api
6375
- */
6265
+ /** /v2/worlds Api */
6376
6266
  worlds = new WorldsApi(this.getParams());
6377
- /**
6378
- * /v2/wvw Api
6379
- */
6267
+ /** /v2/wvw Api */
6380
6268
  wvw = new WorldVsWorldApi(this.getParams());
6381
6269
  };
6382
6270