dolorealiquam
Version:
TypeScript mappings for the Bungie.net API
1,215 lines (1,184 loc) • 382 kB
text/typescript
/**
* 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.1.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 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.
*/
readonly icon: string;
readonly hasIcon: boolean;
}
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[];
}
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;
/**
* 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.
*/
readonly icon: string;
readonly hasIcon: boolean;
}
/**
* Represents a color whose RGBA values are all represented as values between 0 and
* 255.
*/
export interface DestinyColor {
readonly red: number;
readonly green: number;
readonly blue: number;
readonly alpha: number;
}
/**
* If an item can have an action performed on it (like "Dismantle"), it will be
* defined here if you care.
*/
export interface DestinyItemActionBlockDefinition {
/** Localized text for the verb of the action being performed. */
readonly verbName: string;
/** Localized text describing the action being performed. */
readonly verbDescription: string;
/** The content has this property, however it's not entirely clear how it is used. */
readonly isPositive: boolean;
/**
* If the action has an overlay screen associated with it, this is the name of that
* screen. Unfortunately, we cannot return the screen's data itself.
*/
readonly overlayScreenName: string;
/** The icon associated with the overlay screen for the action, if any. */
readonly overlayIcon: string;
/** The number of seconds to delay before allowing this action to be performed again. */
readonly requiredCooldownSeconds: number;
/**
* If the action requires other items to exist or be destroyed, this is the list of
* those items and requirements.
*/
readonly requiredItems: DestinyItemActionRequiredItemDefinition[];
/**
* If performing this action earns you Progression, this is the list of
* progressions and values granted for those progressions by performing this action.
*/
readonly progressionRewards: DestinyProgressionRewardDefinition[];
/** The internal identifier for the action. */
readonly actionTypeLabel: string;
/**
* Theoretically, an item could have a localized string for a hint about the
* location in which the action should be performed. In practice, no items yet have
* this property.
*/
readonly requiredLocation: string;
/**
* The identifier hash for the Cooldown associated with this action. We have not
* pulled this data yet for you to have more data to use for cooldowns.
*/
readonly requiredCooldownHash: number;
/** If true, the item is deleted when the action completes. */
readonly deleteOnAction: boolean;
/** If true, the entire stack is deleted when the action completes. */
readonly consumeEntireStack: boolean;
/**
* If true, this action will be performed as soon as you earn this item. Some
* rewards work this way, providing you a single item to pick up from a reward-
* granting vendor in-game and then immediately consuming itself to provide you
* multiple items.
*/
readonly useOnAcquire: boolean;
}
/**
* The definition of an item and quantity required in a character's inventory in
* order to perform an action.
*/
export interface DestinyItemActionRequiredItemDefinition {
/** The minimum quantity of the item you have to have. */
readonly count: number;
/**
* The hash identifier of the item you need to have. Use it to look up the
* DestinyInventoryItemDefinition for more info.
*
* Mapped to DestinyInventoryItemDefinition in the manifest.
*/
readonly itemHash: number;
/**
* If true, the item/quantity will be deleted from your inventory when the action
* is performed. Otherwise, you'll retain these required items after the action is
* complete.
*/
readonly deleteOnAction: boolean;
}
/**
* Inventory Items can reward progression when actions are performed on them. A
* common example of this in Destiny 1 was Bounties, which would reward Experience
* on your Character and the like when you completed the bounty.
*
* Note that this maps to a DestinyProgressionMappingDefinition, and *not* a
* DestinyProgressionDefinition directly. This is apparently so that multiple
* progressions can be granted progression points/experience at the same time.
*/
export interface DestinyProgressionRewardDefinition {
/**
* The hash identifier of the DestinyProgressionMappingDefinition that contains the
* progressions for which experience should be applied.
*
* Mapped to DestinyProgressionMappingDefinition in the manifest.
*/
readonly progressionMappingHash: number;
/** The amount of experience to give to each of the mapped progressions. */
readonly amount: number;
/**
* If true, the game's internal mechanisms to throttle progression should be
* applied.
*/
readonly applyThrottles: boolean;
}
/**
* Aggregations of multiple progressions.
*
* These are used to apply rewards to multiple progressions at once. They can
* sometimes have human readable data as well, but only extremely sporadically.
*/
export interface DestinyProgressionMappingDefinition {
/**
* Infrequently defined in practice. Defer to the individual progressions' display
* properties.
*/
readonly displayProperties: DestinyDisplayPropertiesDefinition;
/**
* The localized unit of measurement for progression across the progressions
* defined in this mapping. Unfortunately, this is very infrequently defined. Defer
* to the individual progressions' display units.
*/
readonly displayUnits: 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;
}
/**
* If the item can exist in an inventory - the overwhelming majority of them can
* and do - then this is the basic properties regarding the item's relationship
* with the inventory.
*/
export interface DestinyItemInventoryBlockDefinition {
/**
* If this string is populated, you can't have more than one stack with this label
* in a given inventory. Note that this is different from the equipping block's
* unique label, which is used for equipping uniqueness.
*/
readonly stackUniqueLabel: string;
/** The maximum quantity of this item that can exist in a stack. */
readonly maxStackSize: number;
/**
* The hash identifier for the DestinyInventoryBucketDefinition to which this item
* belongs. I should have named this "bucketHash", but too many things refer to it
* now. Sigh.
*
* Mapped to DestinyInventoryBucketDefinition in the manifest.
*/
readonly bucketTypeHash: number;
/**
* If the item is picked up by the lost loot queue, this is the hash identifier for
* the DestinyInventoryBucketDefinition into which it will be placed. Again, I
* should have named this recoveryBucketHash instead.
*
* Mapped to DestinyInventoryBucketDefinition in the manifest.
*/
readonly recoveryBucketTypeHash: number;
/**
* The hash identifier for the Tier Type of the item, use to look up its
* DestinyItemTierTypeDefinition if you need to show localized data for the item's
* tier.
*
* Mapped to DestinyItemTierTypeDefinition in the manifest.
*/
readonly tierTypeHash: number;
/**
* If TRUE, this item is instanced. Otherwise, it is a generic item that merely has
* a quantity in a stack (like Glimmer).
*/
readonly isInstanceItem: boolean;
/**
* The localized name of the tier type, which is a useful shortcut so you don't
* have to look up the definition every time. However, it's mostly a holdover from
* days before we had a DestinyItemTierTypeDefinition to refer to.
*/
readonly tierTypeName: string;
/**
* The enumeration matching the tier type of the item to known values, again for
* convenience sake.
*/
readonly tierType: TierType;
}
/**
* An Inventory (be it Character or Profile level) is comprised of many Buckets. An
* example of a bucket is "Primary Weapons", where all of the primary weapons on a
* character are gathered together into a single visual element in the UI: a subset
* of the inventory that has a limited number of slots, and in this case also has
* an associated Equipment Slot for equipping an item in the bucket.
*
* Item definitions declare what their "default" bucket is (
* DestinyInventoryItemDefinition.inventory.bucketTypeHash), and Item instances
* will tell you which bucket they are currently residing in (DestinyItemComponent.
* bucketHash). You can use this information along with the
* DestinyInventoryBucketDefinition to show these items grouped by bucket.
*
* You cannot transfer an item to a bucket that is not its Default without going
* through a Vendor's "accepted items" (DestinyVendorDefinition.acceptedItems).
* This is how transfer functionality like the Vault is implemented, as a feature
* of a Vendor. See the vendor's acceptedItems property for more details.
*/
export interface DestinyInventoryBucketDefinition {
readonly displayProperties: DestinyDisplayPropertiesDefinition;
/** Where the bucket is found. 0 = Character, 1 = Account */
readonly scope: BucketScope;
/**
* An enum value for what items can be found in the bucket. See the BucketCategory
* enum for more details.
*/
readonly category: BucketCategory;
/**
* Use this property to provide a quick-and-dirty recommended ordering for buckets
* in the UI. Most UIs will likely want to forsake this for something more custom
* and manual.
*/
readonly bucketOrder: number;
/**
* The maximum # of item "slots" in a bucket. A slot is a given combination of item
* + quantity.
*
* For instance, a Weapon will always take up a single slot, and always have a
* quantity of 1. But a material could take up only a single slot with hundreds of
* quantity.
*/
readonly itemCount: number;
/**
* Sometimes, inventory buckets represent conceptual "locations" in the game that
* might not be expected. This value indicates the conceptual location of the
* bucket, regardless of where it is actually contained on the character/account.
*
* See ItemLocation for details.
*
* Note that location includes the Vault and the Postmaster (both of whom being
* just inventory buckets with additional actions that can be performed on them
* through a Vendor)
*/
readonly location: ItemLocation;
/**
* If TRUE, there is at least one Vendor that can transfer items to/from this
* bucket. See the DestinyVendorDefinition's acceptedItems property for more
* information on how transferring works.
*/
readonly hasTransferDestination: boolean;
/**
* If True, this bucket is enabled. Disabled buckets may include buckets that were
* included for test purposes, or that were going to be used but then were
* abandoned but never removed from content *cough*.
*/
readonly enabled: boolean;
/**
* if a FIFO bucket fills up, it will delete the oldest item from said bucket when
* a new item tries to be added to it. If this is FALSE, the bucket will not allow
* new items to be placed in it until room is made by the user manually deleting
* items from it. You can see an example of this with the Postmaster's bucket.
*/
readonly fifo: boolean;
/**
* 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 const enum BucketScope {
Character = 0,
Account = 1
}
export const enum BucketCategory {
Invisible = 0,
Item = 1,
Currency = 2,
Equippable = 3,
Ignored = 4
}
export const enum ItemLocation {
Unknown = 0,
Inventory = 1,
Vault = 2,
Vendor = 3,
Postmaster = 4
}
/**
* Defines the tier type of an item. Mostly this provides human readable properties
* for types like Common, Rare, etc...
*
* It also provides some base data for infusion that could be useful.
*/
export interface DestinyItemTierTypeDefinition {
readonly displayProperties: DestinyDisplayPropertiesDefinition;
/** If this tier defines infusion properties, they will be contained here. */
readonly infusionProcess: DestinyItemTierTypeInfusionBlock;
/**
* 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 DestinyItemTierTypeInfusionBlock {
/**
* The default portion of quality that will transfer from the infuser to the
* infusee item. (InfuserQuality - InfuseeQuality) * baseQualityTransferRatio =
* base quality transferred.
*/
readonly baseQualityTransferRatio: number;
/**
* As long as InfuserQuality > InfuseeQuality, the amount of quality bestowed is
* guaranteed to be at least this value, even if the transferRatio would dictate
* that it should be less. The total amount of quality that ends up in the Infusee
* cannot exceed the Infuser's quality however (for instance, if you infuse a 300
* item with a 301 item and the minimum quality increment is 10, the infused item
* will not end up with 310 quality)
*/
readonly minimumQualityIncrement: number;
}
export const enum TierType {
Unknown = 0,
Currency = 1,
Basic = 2,
Common = 3,
Rare = 4,
Superior = 5,
Exotic = 6
}
/**
* Primarily for Quests, this is the definition of properties related to the item
* if it is a quest and its various quest steps.
*/
export interface DestinyItemSetBlockDefinition {
/**
* A collection of hashes of set items, for items such as Quest Metadata items that
* possess this data.
*/
readonly itemList: DestinyItemSetBlockEntryDefinition[];
/**
* If true, items in the set can only be added in increasing order, and adding an
* item will remove any previous item. For Quests, this is by necessity true. Only
* one quest step is present at a time, and previous steps are removed as you
* advance in the quest.
*/
readonly requireOrderedSetItemAdd: boolean;
/** If true, the UI should treat this quest as "featured" */
readonly setIsFeatured: boolean;
/** A string identifier we can use to attempt to identify the category of the Quest. */
readonly setType: string;
}
/** Defines a particular entry in an ItemSet (AKA a particular Quest Step in a Quest) */
export interface DestinyItemSetBlockEntryDefinition {
/**
* Used for tracking which step a user reached. These values will be populated in
* the user's internal state, which we expose externally as a more usable
* DestinyQuestStatus object. If this item has been obtained, this value will be
* set in trackingUnlockValueHash.
*/
readonly trackingValue: number;
/**
* This is the hash identifier for a DestinyInventoryItemDefinition representing
* this quest step.
*
* Mapped to DestinyInventoryItemDefinition in the manifest.
*/
readonly itemHash: number;
}
/**
* Information about the item's calculated stats, with as much data as we can find
* for the stats without having an actual instance of the item.
*
* Note that this means the entire concept of providing these stats is
* fundamentally insufficient: we cannot predict with 100% accuracy the conditions
* under which an item can spawn, so we use various heuristics to attempt to
* simulate the conditions as accurately as possible. Actual stats for items in-
* game can and will vary, but these should at least be useful base points for
* comparison and display.
*
* It is also worth noting that some stats, like Magazine size, have further
* calculations performed on them by scripts in-game and on the game servers that
* BNet does not have access to. We cannot know how those stats are further
* transformed, and thus some stats will be inaccurate even on instances of items
* in BNet vs. how they appear in-game. This is a known limitation of our item
* statistics, without any planned fix.
*/
export interface DestinyItemStatBlockDefinition {
/**
* If the item's stats are meant to be modified by a DestinyStatGroupDefinition,
* this will be the identifier for that definition.
*
* If you are using live data or precomputed stats data on the
* DestinyInventoryItemDefinition.stats.stats property, you don't have to worry
* about statGroupHash and how it alters stats: the already altered stats are
* provided to you. But if you want to see how the sausage gets made, or perform
* computations yourself, this is valuable information.
*
* Mapped to DestinyStatGroupDefinition in the manifest.
*/
readonly statGroupHash?: number;
/**
* If you are looking for precomputed values for the stats on a weapon, this is
* where they are stored. Technically these are the "Display" stat values. Please
* see DestinyStatsDefinition for what Display Stat Values means, it's a very long
* story... but essentially these are the closest values BNet can get to the item
* stats that you see in-game.
*
* These stats are keyed by the DestinyStatDefinition's hash identifier for the
* stat that's found on the item.
*
* Mapped to DestinyStatDefinition in the manifest.
*/
readonly stats: { [key: number]: DestinyInventoryItemStatDefinition };
/**
* A quick and lazy way to determine whether any stat other than the "primary" stat
* is actually visible on the item. Items often have stats that we return in case
* people find them useful, but they're not part of the "Stat Group" and thus we
* wouldn't display them in our UI. If this is False, then we're not going to
* display any of these stats other than the primary one.
*/
readonly hasDisplayableStats: boolean;
/**
* This stat is determined to be the "primary" stat, and can be looked up in the
* stats or any other stat collection related to the item.
*
* Use this hash to look up the stat's value using DestinyInventoryItemDefinition.
* stats.stats, and the renderable data for the primary stat in the related
* DestinyStatDefinition.
*
* Mapped to DestinyStatDefinition in the manifest.
*/
readonly primaryBaseStatHash: number;
}
/**
* When an inventory item (DestinyInventoryItemDefinition) has Stats (such as
* Attack Power), the item will refer to a Stat Group. This definition enumerates
* the properties used to transform the item's "Investment" stats into "Display"
* stats.
*
* See DestinyStatDefinition's documentation for information about the
* transformation of Stats, and the meaning of an Investment vs. a Display stat.
*
* If you don't want to do these calculations on your own, fear not: pulling live
* data from the BNet endpoints will return display stat values pre-computed and
* ready for you to use. I highly recommend this approach, saves a lot of time and
* also accounts for certain stat modifiers that can't easily be accounted for
* without live data (such as stat modifiers on Talent Grids and Socket Plugs)
*/
export interface DestinyStatGroupDefinition {
/**
* The maximum possible value that any stat in this group can be transformed into.
*
* This is used by stats that *don't* have scaledStats entries below, but that
* still need to be displayed as a progress bar, in which case this is used as the
* upper bound for said progress bar. (the lower bound is always 0)
*/
readonly maximumValue: number;
/**
* This apparently indicates the position of the stats in the UI? I've returned it
* in case anyone can use it, but it's not of any use to us on BNet. Something's
* being lost in translation with this value.
*/
readonly uiPosition: number;
/**
* Any stat that requires scaling to be transformed from an "Investment" stat to a "
* Display" stat will have an entry in this list. For more information on what
* those types of stats mean and the transformation process, see
* DestinyStatDefinition.
*
* In retrospect, I wouldn't mind if this was a dictionary keyed by the stat hash
* instead. But I'm going to leave it be because [[After Apple Picking]].
*/
readonly scaledStats: DestinyStatDisplayDefinition[];
/**
* The game has the ability to override, based on the stat group, what the
* localized text is that is displayed for Stats being shown on the item.
*
* Mercifully, no Stat Groups use this feature currently. If they start using them,
* we'll all need to start using them (and those of you who are more prudent than I
* am can go ahead and start pre-checking for this.)
*/
readonly overrides: { [key: number]: DestinyStatOverrideDefinition };
/**
* 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;
}
/**
* Describes the way that an Item Stat (see DestinyStatDefinition) is transformed
* using the DestinyStatGroupDefinition related to that item. See both of the
* aforementioned definitions for more information about the stages of stat
* transformation.
*