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