-
Notifications
You must be signed in to change notification settings - Fork 10
/
interfaces.ts
12043 lines (11655 loc) · 470 KB
/
interfaces.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Bungie.Net API
* These endpoints constitute the functionality exposed by Bungie.net, both for more traditional website functionality and for connectivity to Bungie video games and their related functionality.
*
* OpenAPI spec version: 2.3.5
* Contact: support@bungie.com
*
* NOTE: This class is auto generated by the bungie-api-ts code generator program.
* https://github.com/DestinyItemManager/bugie-api-ts
* Do not edit these files manually.
*/
import {
BungieMembershipType,
DateRange,
HyperlinkReference,
InterpolationPoint,
InterpolationPointFloat,
PagedQuery,
PlatformErrorCodes
} from '../common';
import {
UserInfoCard
} from '../user/interfaces';
export interface SingleComponentResponse<T> {
readonly data: T;
readonly privacy: ComponentPrivacySetting;
}
export interface DictionaryComponentResponse<T> {
readonly data: { [key: string]: T };
readonly privacy: ComponentPrivacySetting;
}
/**
* Information about a current character's status with a Progression. A progression
* is a value that can increase with activity and has levels. Think Character Level
* and Reputation Levels. Combine this "live" data with the related
* DestinyProgressionDefinition for a full picture of the Progression.
*/
export interface DestinyProgression {
/**
* The hash identifier of the Progression in question. Use it to look up the
* DestinyProgressionDefinition in static data.
*
* Mapped to DestinyProgressionDefinition in the manifest.
*/
readonly progressionHash: number;
/** The amount of progress earned today for this progression. */
readonly dailyProgress: number;
/** If this progression has a daily limit, this is that limit. */
readonly dailyLimit: number;
/** The amount of progress earned toward this progression in the current week. */
readonly weeklyProgress: number;
/** If this progression has a weekly limit, this is that limit. */
readonly weeklyLimit: number;
/**
* This is the total amount of progress obtained overall for this progression (for
* instance, the total amount of Character Level experience earned)
*/
readonly currentProgress: number;
/** This is the level of the progression (for instance, the Character Level). */
readonly level: number;
/**
* This is the maximum possible level you can achieve for this progression (for
* example, the maximum character level obtainable)
*/
readonly levelCap: number;
/**
* Progressions define their levels in "steps". Since the last step may be
* repeatable, the user may be at a higher level than the actual Step achieved in
* the progression. Not necessarily useful, but potentially interesting for those
* cruising the API. Relate this to the "steps" property of the DestinyProgression
* to see which step the user is on, if you care about that. (Note that this is
* Content Version dependent since it refers to indexes.)
*/
readonly stepIndex: number;
/**
* The amount of progression (i.e. "Experience") needed to reach the next level of
* this Progression. Jeez, progression is such an overloaded word.
*/
readonly progressToNextLevel: number;
/**
* The total amount of progression (i.e. "Experience") needed in order to reach the
* next level.
*/
readonly nextLevelAt: number;
}
/**
* A "Progression" in Destiny is best explained by an example.
*
* A Character's "Level" is a progression: it has Experience that can be earned,
* levels that can be gained, and is evaluated and displayed at various points in
* the game. A Character's "Faction Reputation" is also a progression for much the
* same reason.
*
* Progression is used by a variety of systems, and the definition of a Progression
* will generally only be useful if combining with live data (such as a character's
* DestinyCharacterProgressionComponent.progressions property, which holds that
* character's live Progression states).
*
* Fundamentally, a Progression measures your "Level" by evaluating the thresholds
* in its Steps (one step per level, except for the last step which can be repeated
* indefinitely for "Levels" that have no ceiling) against the total earned "
* progression points"/experience. (for simplicity purposes, we will henceforth
* refer to earned progression points as experience, though it need not be a
* mechanic that in any way resembles Experience in a traditional sense).
*
* Earned experience is calculated in a variety of ways, determined by the
* Progression's scope. These go from looking up a stored value to performing
* exceedingly obtuse calculations. This is why we provide live data in
* DestinyCharacterProgressionComponent.progressions, so you don't have to worry
* about those.
*/
export interface DestinyProgressionDefinition {
readonly displayProperties: DestinyProgressionDisplayPropertiesDefinition;
/**
* The "Scope" of the progression indicates the source of the progression's live
* data.
*
* See the DestinyProgressionScope enum for more info: but essentially, a
* Progression can either be backed by a stored value, or it can be a calculated
* derivative of other values.
*/
readonly scope: DestinyProgressionScope;
/** If this is True, then the progression doesn't have a maximum level. */
readonly repeatLastStep: boolean;
/**
* If there's a description of how to earn this progression in the local config,
* this will be that localized description.
*/
readonly source: string;
/**
* Progressions are divided into Steps, which roughly equate to "Levels" in the
* traditional sense of a Progression. Notably, the last step can be repeated
* indefinitely if repeatLastStep is true, meaning that the calculation for your
* level is not as simple as comparing your current progress to the max progress of
* the steps.
*
* These and more calculations are done for you if you grab live character
* progression data, such as in the DestinyCharacterProgressionComponent.
*/
readonly steps: DestinyProgressionStepDefinition[];
/**
* If true, the Progression is something worth showing to users.
*
* If false, BNet isn't going to show it. But that doesn't mean you can't. We're
* all friends here.
*/
readonly visible: boolean;
/**
* If the value exists, this is the hash identifier for the Faction that owns this
* Progression.
*
* This is purely for convenience, if you're looking at a progression and want to
* know if and who it's related to in terms of Faction Reputation.
*
* Mapped to DestinyFactionDefinition in the manifest.
*/
readonly factionHash?: number;
/** The #RGB string value for the color related to this progression, if there is one. */
readonly color: DestinyColor;
/**
* For progressions that have it, this is the rank icon we use in the Companion,
* displayed above the progressions' rank value.
*/
readonly rankIcon: string;
/**
* The unique identifier for this entity. Guaranteed to be unique for the type of
* entity, but not globally.
*
* When entities refer to each other in Destiny content, it is this hash that they
* are referring to.
*/
readonly hash: number;
/** The index of the entity as it was found in the investment tables. */
readonly index: number;
/**
* If this is true, then there is an entity with this identifier/type combination,
* but BNet is not yet allowed to show it. Sorry!
*/
readonly redacted: boolean;
}
export interface DestinyProgressionDisplayPropertiesDefinition {
/**
* When progressions show your "experience" gained, that bar has units (i.e. "
* Experience", "Bad Dudes Snuffed Out", whatever). This is the localized string
* for that unit of measurement.
*/
readonly displayUnitsName: string;
readonly description: string;
readonly name: string;
/**
* Note that "icon" is sometimes misleading, and should be interpreted in the
* context of the entity. For instance, in Destiny 1 the
* DestinyRecordBookDefinition's icon was a big picture of a book.
*
* But usually, it will be a small square image that you can use as... well, an
* icon.
*
* They are currently represented as 96px x 96px images.
*/
readonly icon: string;
readonly hasIcon: boolean;
}
/**
* There are many Progressions in Destiny (think Character Level, or Reputation).
* These are the various "Scopes" of Progressions, which affect many things: *
* Where/if they are stored * How they are calculated * Where they can be used in
* other game logic
*/
export const enum DestinyProgressionScope {
Account = 0,
Character = 1,
Clan = 2,
Item = 3,
ImplicitFromEquipment = 4,
Mapped = 5,
MappedAggregate = 6,
MappedStat = 7,
MappedUnlockValue = 8
}
/**
* This defines a single Step in a progression (which roughly equates to a level.
* See DestinyProgressionDefinition for caveats).
*/
export interface DestinyProgressionStepDefinition {
/**
* Very rarely, Progressions will have localized text describing the Level of the
* progression. This will be that localized text, if it exists. Otherwise, the
* standard appears to be to simply show the level numerically.
*/
readonly stepName: string;
/**
* This appears to be, when you "level up", whether a visual effect will display
* and on what entity. See DestinyProgressionStepDisplayEffect for slightly more
* info.
*/
readonly displayEffectType: DestinyProgressionStepDisplayEffect;
/**
* The total amount of progression points/"experience" you will need to initially
* reach this step. If this is the last step and the progression is repeating
* indefinitely (DestinyProgressionDefinition.repeatLastStep), this will also be
* the progress needed to level it up further by repeating this step again.
*/
readonly progressTotal: number;
/** A listing of items rewarded as a result of reaching this level. */
readonly rewardItems: DestinyItemQuantity[];
/**
* If this progression step has a specific icon related to it, this is the icon to
* show.
*/
readonly icon: string;
}
/**
* If progression is earned, this determines whether the progression shows visual
* effects on the character or its item - or neither.
*/
export const enum DestinyProgressionStepDisplayEffect {
None = 0,
Character = 1,
Item = 2
}
/**
* Used in a number of Destiny contracts to return data about an item stack and its
* quantity. Can optionally return an itemInstanceId if the item is instanced - in
* which case, the quantity returned will be 1. If it's not... uh, let me know okay?
* Thanks.
*/
export interface DestinyItemQuantity {
/**
* The hash identifier for the item in question. Use it to look up the item's
* DestinyInventoryItemDefinition.
*
* Mapped to DestinyInventoryItemDefinition in the manifest.
*/
readonly itemHash: number;
/**
* If this quantity is referring to a specific instance of an item, this will have
* the item's instance ID. Normally, this will be null.
*/
readonly itemInstanceId?: string;
/**
* The amount of the item needed/available depending on the context of where
* DestinyItemQuantity is being used.
*/
readonly quantity: number;
}
/**
* So much of what you see in Destiny is actually an Item used in a new and
* creative way. This is the definition for Items in Destiny, which started off as
* just entities that could exist in your Inventory but ended up being the backing
* data for so much more: quests, reward previews, slots, and subclasses.
*
* In practice, you will want to associate this data with "live" item data from a
* Bungie.Net Platform call: these definitions describe the item in generic, non-
* instanced terms: but an actual instance of an item can vary widely from these
* generic definitions.
*/
export interface DestinyInventoryItemDefinition {
readonly displayProperties: DestinyDisplayPropertiesDefinition;
/**
* If this item has a collectible related to it, this is the hash identifier of
* that collectible entry.
*
* Mapped to DestinyCollectibleDefinition in the manifest.
*/
readonly collectibleHash?: number;
/**
* A secondary icon associated with the item. Currently this is used in very
* context specific applications, such as Emblem Nameplates.
*/
readonly secondaryIcon: string;
/**
* Pulled from the secondary icon, this is the "secondary background" of the
* secondary icon. Confusing? Sure, that's why I call it "overlay" here: because as
* far as it's been used thus far, it has been for an optional overlay image. We'll
* see if that holds up, but at least for now it explains what this image is a bit
* better.
*/
readonly secondaryOverlay: string;
/**
* Pulled from the Secondary Icon, this is the "special" background for the item.
* For Emblems, this is the background image used on the Details view: but it need
* not be limited to that for other types of items.
*/
readonly secondarySpecial: string;
/**
* Sometimes, an item will have a background color. Most notably this occurs with
* Emblems, who use the Background Color for small character nameplates such as the
* "friends" view you see in-game. There are almost certainly other items that have
* background color as well, though I have not bothered to investigate what items
* have it nor what purposes they serve: use it as you will.
*/
readonly backgroundColor: DestinyColor;
/**
* If we were able to acquire an in-game screenshot for the item, the path to that
* screenshot will be returned here. Note that not all items have screenshots:
* particularly not any non-equippable items.
*/
readonly screenshot: string;
/**
* The localized title/name of the item's type. This can be whatever the designers
* want, and has no guarantee of consistency between items.
*/
readonly itemTypeDisplayName: string;
/**
* A string identifier that the game's UI uses to determine how the item should be
* rendered in inventory screens and the like. This could really be anything - at
* the moment, we don't have the time to really breakdown and maintain all the
* possible strings this could be, partly because new ones could be added ad hoc.
* But if you want to use it to dictate your own UI, or look for items with a
* certain display style, go for it!
*/
readonly uiItemDisplayStyle: string;
/**
* It became a common enough pattern in our UI to show Item Type and Tier combined
* into a single localized string that I'm just going to go ahead and start pre-
* creating these for items.
*/
readonly itemTypeAndTierDisplayName: string;
/**
* In theory, it is a localized string telling you about how you can find the item.
* I really wish this was more consistent. Many times, it has nothing. Sometimes,
* it's instead a more narrative-forward description of the item. Which is cool,
* and I wish all properties had that data, but it should really be its own
* property.
*/
readonly displaySource: string;
/**
* An identifier that the game UI uses to determine what type of tooltip to show
* for the item. These have no corresponding definitions that BNet can link to: so
* it'll be up to you to interpret and display your UI differently according to
* these styles (or ignore it).
*/
readonly tooltipStyle: string;
/**
* If the item can be "used", this block will be non-null, and will have data
* related to the action performed when using the item. (Guess what? 99% of the
* time, this action is "dismantle". Shocker)
*/
readonly action: DestinyItemActionBlockDefinition;
/**
* If this item can exist in an inventory, this block will be non-null. In practice,
* every item that currently exists has one of these blocks. But note that it is
* not necessarily guaranteed.
*/
readonly inventory: DestinyItemInventoryBlockDefinition;
/**
* If this item is a quest, this block will be non-null. In practice, I wish I had
* called this the Quest block, but at the time it wasn't clear to me whether it
* would end up being used for purposes other than quests. It will contain data
* about the steps in the quest, and mechanics we can use for displaying and
* tracking the quest.
*/
readonly setData: DestinyItemSetBlockDefinition;
/**
* If this item can have stats (such as a weapon, armor, or vehicle), this block
* will be non-null and populated with the stats found on the item.
*/
readonly stats: DestinyItemStatBlockDefinition;
/**
* If the item is an emblem that has a special Objective attached to it - for
* instance, if the emblem tracks PVP Kills, or what-have-you. This is a bit
* different from, for example, the Vanguard Kill Tracker mod, which pipes data
* into the "art channel". When I get some time, I would like to standardize these
* so you can get at the values they expose without having to care about what they'
* re being used for and how they are wired up, but for now here's the raw data.
*/
readonly emblemObjectiveHash?: number;
/**
* If this item can be equipped, this block will be non-null and will be populated
* with the conditions under which it can be equipped.
*/
readonly equippingBlock: DestinyEquippingBlockDefinition;
/**
* If this item can be rendered, this block will be non-null and will be populated
* with rendering information.
*/
readonly translationBlock: DestinyItemTranslationBlockDefinition;
/**
* If this item can be Used or Acquired to gain other items (for instance, how
* Eververse Boxes can be consumed to get items from the box), this block will be
* non-null and will give summary information for the items that can be acquired.
*/
readonly preview: DestinyItemPreviewBlockDefinition;
/**
* If this item can have a level or stats, this block will be non-null and will be
* populated with default quality (item level, "quality", and infusion) data. See
* the block for more details, there's often less upfront information in D2 so you'
* ll want to be aware of how you use quality and item level on the definition
* level now.
*/
readonly quality: DestinyItemQualityBlockDefinition;
/**
* The conceptual "Value" of an item, if any was defined. See the
* DestinyItemValueBlockDefinition for more details.
*/
readonly value: DestinyItemValueBlockDefinition;
/**
* If this item has a known source, this block will be non-null and populated with
* source information. Unfortunately, at this time we are not generating sources:
* that is some aggressively manual work which we didn't have time for, and I'm
* hoping to get back to at some point in the future.
*/
readonly sourceData: DestinyItemSourceBlockDefinition;
/**
* If this item has Objectives (extra tasks that can be accomplished related to the
* item... most frequently when the item is a Quest Step and the Objectives need to
* be completed to move on to the next Quest Step), this block will be non-null and
* the objectives defined herein.
*/
readonly objectives: DestinyItemObjectiveBlockDefinition;
/**
* If this item *is* a Plug, this will be non-null and the info defined herein. See
* DestinyItemPlugDefinition for more information.
*/
readonly plug: DestinyItemPlugDefinition;
/**
* If this item has related items in a "Gear Set", this will be non-null and the
* relationships defined herein.
*/
readonly gearset: DestinyItemGearsetBlockDefinition;
/**
* If this item is a "reward sack" that can be opened to provide other items, this
* will be non-null and the properties of the sack contained herein.
*/
readonly sack: DestinyItemSackBlockDefinition;
/**
* If this item has any Sockets, this will be non-null and the individual sockets
* on the item will be defined herein.
*/
readonly sockets: DestinyItemSocketBlockDefinition;
/** Summary data about the item. */
readonly summary: DestinyItemSummaryBlockDefinition;
/**
* If the item has a Talent Grid, this will be non-null and the properties of the
* grid defined herein. Note that, while many items still have talent grids, the
* only ones with meaningful Nodes still on them will be Subclass/"Build" items.
*/
readonly talentGrid: DestinyItemTalentGridBlockDefinition;
/**
* If the item has stats, this block will be defined. It has the "raw" investment
* stats for the item. These investment stats don't take into account the ways that
* the items can spawn, nor do they take into account any Stat Group
* transformations. I have retained them for debugging purposes, but I do not know
* how useful people will find them.
*/
readonly investmentStats: DestinyItemInvestmentStatDefinition[];
/**
* If the item has any *intrinsic* Perks (Perks that it will provide regardless of
* Sockets, Talent Grid, and other transitory state), they will be defined here.
*/
readonly perks: DestinyItemPerkEntryDefinition[];
/**
* If the item has any related Lore (DestinyLoreDefinition), this will be the hash
* identifier you can use to look up the lore definition.
*
* Mapped to DestinyLoreDefinition in the manifest.
*/
readonly loreHash?: number;
/**
* There are times when the game will show you a "summary/vague" version of an item
* - such as a description of its type represented as a
* DestinyInventoryItemDefinition - rather than display the item itself.
*
* This happens sometimes when summarizing possible rewards in a tooltip. This is
* the item displayed instead, if it exists.
*
* Mapped to DestinyInventoryItemDefinition in the manifest.
*/
readonly summaryItemHash?: number;
/**
* If any animations were extracted from game content for this item, these will be
* the definitions of those animations.
*/
readonly animations: DestinyAnimationReference[];
/**
* BNet may forbid the execution of actions on this item via the API. If that is
* occurring, allowActions will be set to false.
*/
readonly allowActions: boolean;
/**
* If we added any help or informational URLs about this item, these will be those
* links.
*/
readonly links: HyperlinkReference[];
/**
* The boolean will indicate to us (and you!) whether something *could* happen when
* you transfer this item from the Postmaster that might be considered a "
* destructive" action.
*
* It is not feasible currently to tell you (or ourelves!) in a consistent way
* whether this *will* actually cause a destructive action, so we are playing it
* safe: if it has the potential to do so, we will not allow it to be transferred
* from the Postmaster by default. You will need to check for this flag before
* transferring an item from the Postmaster, or else you'll end up receiving an
* error.
*/
readonly doesPostmasterPullHaveSideEffects: boolean;
/**
* The intrinsic transferability of an item.
*
* I hate that this boolean is negative - but there's a reason.
*
* Just because an item is intrinsically transferrable doesn't mean that it can be
* transferred, and we don't want to imply that this is the only source of that
* transferability.
*/
readonly nonTransferrable: boolean;
/**
* BNet attempts to make a more formal definition of item "Categories", as defined
* by DestinyItemCategoryDefinition. This is a list of all Categories that we were
* able to algorithmically determine that this item is a member of. (for instance,
* that it's a "Weapon", that it's an "Auto Rifle", etc...)
*
* The algorithm for these is, unfortunately, volatile. If you believe you see a
* miscategorized item, please let us know on the Bungie API forums.
*
* Mapped to DestinyItemCategoryDefinition in the manifest.
*/
readonly itemCategoryHashes: number[];
/**
* In Destiny 1, we identified some items as having particular categories that we'd
* like to know about for various internal logic purposes. These are defined in
* SpecialItemType, and while these days the itemCategoryHashes are the preferred
* way of identifying types, we have retained this enum for its convenience.
*/
readonly specialItemType: SpecialItemType;
/**
* A value indicating the "base" the of the item. This enum is a useful but
* dramatic oversimplification of what it means for an item to have a "Type". Still,
* it's handy in many situations.
*
* itemCategoryHashes are the preferred way of identifying types, we have retained
* this enum for its convenience.
*/
readonly itemType: DestinyItemType;
/**
* A value indicating the "sub-type" of the item. For instance, where an item might
* have an itemType value "Weapon", this will be something more specific like "Auto
* Rifle".
*
* itemCategoryHashes are the preferred way of identifying types, we have retained
* this enum for its convenience.
*/
readonly itemSubType: DestinyItemSubType;
/**
* We run a similarly weak-sauce algorithm to try and determine whether an item is
* restricted to a specific class. If we find it to be restricted in such a way, we
* set this classType property to match the class' enumeration value so that users
* can easily identify class restricted items.
*
* If you see a mis-classed item, please inform the developers in the Bungie API
* forum.
*/
readonly classType: DestinyClass;
/**
* If true, then you will be allowed to equip the item if you pass its other
* requirements.
*
* This being false means that you cannot equip the item under any circumstances.
*/
readonly equippable: boolean;
/**
* Theoretically, an item can have many possible damage types. In *practice*, this
* is not true, but just in case weapons start being made that have multiple (for
* instance, an item where a socket has reusable plugs for every possible damage
* type that you can choose from freely), this field will return all of the
* possible damage types that are available to the weapon by default.
*
* Mapped to DestinyDamageTypeDefinition in the manifest.
*/
readonly damageTypeHashes: number[];
/**
* This is the list of all damage types that we know ahead of time the item can
* take on. Unfortunately, this does not preclude the possibility of something
* funky happening to give the item a damage type that cannot be predicted
* beforehand: for example, if some designer decides to create arbitrary non-
* reusable plugs that cause damage type to change.
*
* This damage type prediction will only use the following to determine potential
* damage types:
*
* - Intrinsic perks
*
* - Talent Node perks
*
* - Known, reusable plugs for sockets
*/
readonly damageTypes: DamageType[];
/**
* If the item has a damage type that could be considered to be default, it will be
* populated here.
*
* For various upsetting reasons, it's surprisingly cumbersome to figure this out.
* I hope you're happy.
*/
readonly defaultDamageType: DamageType;
/**
* Similar to defaultDamageType, but represented as the hash identifier for a
* DestinyDamageTypeDefinition.
*
* I will likely regret leaving in the enumeration versions of these properties,
* but for now they're very convenient.
*
* Mapped to DestinyDamageTypeDefinition in the manifest.
*/
readonly defaultDamageTypeHash?: number;
/**
* The unique identifier for this entity. Guaranteed to be unique for the type of
* entity, but not globally.
*
* When entities refer to each other in Destiny content, it is this hash that they
* are referring to.
*/
readonly hash: number;
/** The index of the entity as it was found in the investment tables. */
readonly index: number;
/**
* If this is true, then there is an entity with this identifier/type combination,
* but BNet is not yet allowed to show it. Sorry!
*/
readonly redacted: boolean;
}
/**
* Many Destiny*Definition contracts - the "first order" entities of Destiny that
* have their own tables in the Manifest Database - also have displayable
* information. This is the base class for that display information.
*/
export interface DestinyDisplayPropertiesDefinition {
readonly description: string;
readonly name: string;
/**
* Note that "icon" is sometimes misleading, and should be interpreted in the
* context of the entity. For instance, in Destiny 1 the
* DestinyRecordBookDefinition's icon was a big picture of a book.
*
* But usually, it will be a small square image that you can use as... well, an
* icon.
*
* They are currently represented as 96px x 96px images.
*/
readonly icon: string;
readonly hasIcon: boolean;
}
/** Defines a */
export interface DestinyCollectibleDefinition {
readonly displayProperties: DestinyDisplayPropertiesDefinition;
/**
* Indicates whether this Collectible's state is determined on a per-character or
* on an account-wide basis.
*/
readonly scope: DestinyScope;
/** A human readable string for a hint about how to acquire the item. */
readonly sourceString: string;
/**
* This is a hash identifier we are building on the BNet side in an attempt to let
* people group collectibles by similar sources.
*
* I can't promise that it's going to be 100% accurate, but if the designers were
* consistent in assigning the same source strings to items with the same sources,
* it *ought to* be. No promises though.
*
* This hash also doesn't relate to an actual definition, just to note: we've got
* nothing useful other than the source string for this data.
*/
readonly sourceHash?: number;
/** Mapped to DestinyInventoryItemDefinition in the manifest. */
readonly itemHash: number;
readonly acquisitionInfo: DestinyCollectibleAcquisitionBlock;
readonly stateInfo: DestinyCollectibleStateBlock;
readonly presentationInfo: DestinyPresentationChildBlock;
/**
* The unique identifier for this entity. Guaranteed to be unique for the type of
* entity, but not globally.
*
* When entities refer to each other in Destiny content, it is this hash that they
* are referring to.
*/
readonly hash: number;
/** The index of the entity as it was found in the investment tables. */
readonly index: number;
/**
* If this is true, then there is an entity with this identifier/type combination,
* but BNet is not yet allowed to show it. Sorry!
*/
readonly redacted: boolean;
}
/**
* There's a lot of places where we need to know scope on more than just a profile
* or character level. For everything else, there's this more generic sense of
* scope.
*/
export const enum DestinyScope {
Profile = 0,
Character = 1
}
export interface DestinyCollectibleAcquisitionBlock {
/** Mapped to DestinyMaterialRequirementSetDefinition in the manifest. */
readonly acquireMaterialRequirementHash?: number;
/** Mapped to DestinyUnlockValueDefinition in the manifest. */
readonly acquireTimestampUnlockValueHash?: number;
}
/**
* Represent a set of material requirements: Items that either need to be owned or
* need to be consumed in order to perform an action.
*
* A variety of other entities refer to these as gatekeepers and payments for
* actions that can be performed in game.
*/
export interface DestinyMaterialRequirementSetDefinition {
/** The list of all materials that are required. */
readonly materials: DestinyMaterialRequirement[];
/**
* The unique identifier for this entity. Guaranteed to be unique for the type of
* entity, but not globally.
*
* When entities refer to each other in Destiny content, it is this hash that they
* are referring to.
*/
readonly hash: number;
/** The index of the entity as it was found in the investment tables. */
readonly index: number;
/**
* If this is true, then there is an entity with this identifier/type combination,
* but BNet is not yet allowed to show it. Sorry!
*/
readonly redacted: boolean;
}
/**
* Many actions relating to items require you to expend materials: - Activating a
* talent node - Inserting a plug into a socket The items will refer to material
* requirements by a materialRequirementsHash in these cases, and this is the
* definition for those requirements in terms of the item required, how much of it
* is required and other interesting info. This is one of the rare/strange times
* where a single contract class is used both in definitions *and* in live data
* response contracts. I'm not sure yet whether I regret that.
*/
export interface DestinyMaterialRequirement {
/**
* The hash identifier of the material required. Use it to look up the material's
* DestinyInventoryItemDefinition.
*
* Mapped to DestinyInventoryItemDefinition in the manifest.
*/
readonly itemHash: number;
/**
* If True, the material will be removed from the character's inventory when the
* action is performed.
*/
readonly deleteOnAction: boolean;
/** The amount of the material required. */
readonly count: number;
/**
* If True, this requirement is "silent": don't bother showing it in a material
* requirements display. I mean, I'm not your mom: I'm not going to tell you you *
* can't* show it. But we won't show it in our UI.
*/
readonly omitFromRequirements: boolean;
}
/**
* An Unlock Value is an internal integer value, stored on the server and used in a
* variety of ways, most frequently for the gating/requirement checks that the game
* performs across all of its main features. They can also be used as the storage
* data for mapped Progressions, Objectives, and other features that require
* storage of variable numeric values.
*/
export interface DestinyUnlockValueDefinition {
/**
* The unique identifier for this entity. Guaranteed to be unique for the type of
* entity, but not globally.
*
* When entities refer to each other in Destiny content, it is this hash that they
* are referring to.
*/
readonly hash: number;
/** The index of the entity as it was found in the investment tables. */
readonly index: number;
/**
* If this is true, then there is an entity with this identifier/type combination,
* but BNet is not yet allowed to show it. Sorry!
*/
readonly redacted: boolean;
}
export interface DestinyCollectibleStateBlock {
/** Mapped to DestinyInventoryItemDefinition in the manifest. */
readonly obscuredOverrideItemHash?: number;
readonly requirements: DestinyPresentationNodeRequirementsBlock;
}
/**
* Presentation nodes can be restricted by various requirements. This defines the
* rules of those requirements, and the message(s) to be shown if these
* requirements aren't met.
*/
export interface DestinyPresentationNodeRequirementsBlock {
/**
* If this node is not accessible due to Entitlements (for instance, you don't own
* the required game expansion), this is the message to show.
*/
readonly entitlementUnavailableMessage: string;
}
export interface DestinyPresentationChildBlock {
readonly presentationNodeType: DestinyPresentationNodeType;
/** Mapped to DestinyPresentationNodeDefinition in the manifest. */
readonly parentPresentationNodeHashes: number[];
readonly displayStyle: DestinyPresentationDisplayStyle;
}
export const enum DestinyPresentationNodeType {
Default = 0,
Category = 1,
Collectibles = 2,
Records = 3
}
/**
* A PresentationNode is an entity that represents a logical grouping of other
* entities visually/organizationally.
*
* For now, Presentation Nodes may contain the following... but it may be used for
* more in the future:
*
* - Collectibles - Records (Or, as the public will call them, "Triumphs." Don't
* ask me why we're overloading the term "Triumph", it still hurts me to think
* about it) - Other Presentation Nodes, allowing a tree of Presentation Nodes to
* be created
*
* Part of me wants to break these into conceptual definitions per entity being
* collected, but the possibility of these different types being mixed in the same
* UI and the possibility that it could actually be more useful to return the "bare
* metal" presentation node concept has resulted in me deciding against that for
* the time being.
*
* We'll see if I come to regret this as well.
*/
export interface DestinyPresentationNodeDefinition {
readonly displayProperties: DestinyDisplayPropertiesDefinition;
/** The original icon for this presentation node, before we futzed with it. */
readonly originalIcon: string;
/**
* Some presentation nodes are meant to be explicitly shown on the "root" or "entry"
* screens for the feature to which they are related. You should use this icon
* when showing them on such a view, if you have a similar "entry point" view in
* your UI. If you don't have a UI, then I guess it doesn't matter either way does
* it?
*/
readonly rootViewIcon: string;
readonly nodeType: DestinyPresentationNodeType;
/**
* Indicates whether this presentation node's state is determined on a per-
* character or on an account-wide basis.
*/
readonly scope: DestinyScope;
/**
* If this presentation node shows a related objective (for instance, if it tracks
* the progress of its children), the objective being tracked is indicated here.
*
* Mapped to DestinyObjectiveDefinition in the manifest.
*/
readonly objectiveHash?: number;
/**
* If this presentation node has an associated "Record" that you can accomplish for
* completing its children, this is the identifier of that Record.
*
* Mapped to DestinyRecordDefinition in the manifest.
*/
readonly completionRecordHash?: number;
/** The child entities contained by this presentation node. */
readonly children: DestinyPresentationNodeChildrenBlock;
/** A hint for how to display this presentation node when it's shown in a list. */
readonly displayStyle: DestinyPresentationDisplayStyle;
/**
* A hint for how to display this presentation node when it's shown in its own
* detail screen.
*/
readonly screenStyle: DestinyPresentationScreenStyle;
/**
* The requirements for being able to interact with this presentation node and its
* children.
*/
readonly requirements: DestinyPresentationNodeRequirementsBlock;
/**
* If this presentation node has children, but the game doesn't let you inspect the
* details of those children, that is indicated here.
*/
readonly disableChildSubscreenNavigation: boolean;
/**
* A quick reference to presentation nodes that have this node as a child. (
* presentation nodes can be parented under multiple parents)
*
* Mapped to DestinyPresentationNodeDefinition in the manifest.
*/
readonly parentNodeHashes: number[];
/**
* The unique identifier for this entity. Guaranteed to be unique for the type of
* entity, but not globally.
*
* When entities refer to each other in Destiny content, it is this hash that they
* are referring to.
*/
readonly hash: number;
/** The index of the entity as it was found in the investment tables. */
readonly index: number;
/**
* If this is true, then there is an entity with this identifier/type combination,
* but BNet is not yet allowed to show it. Sorry!
*/
readonly redacted: boolean;
}
/**
* Defines an "Objective".
*
* An objective is a specific task you should accomplish in the game. These are
* referred to by:
*
* - Quest Steps (which are DestinyInventoryItemDefinition entities with Objectives)
*
* - Challenges (which are Objectives defined on an DestinyActivityDefintion)
*
* - Milestones (which refer to Objectives that are defined on both Quest Steps and
* Activities)
*
* - Anything else that the designers decide to do later.
*
* Objectives have progress, a notion of having been Completed, human readable data
* describing the task to be accomplished, and a lot of optional tack-on data that
* can enhance the information provided about the task.
*/
export interface DestinyObjectiveDefinition {
/**
* Ideally, this should tell you what your task is. I'm not going to lie to you
* though. Sometimes this doesn't have useful information at all. Which sucks, but
* there's nothing either of us can do about it.
*/
readonly displayProperties: DestinyDisplayPropertiesDefinition;
/**
* The value that the unlock value defined in unlockValueHash must reach in order
* for the objective to be considered Completed. Used in calculating progress and
* completion status.
*/