@taskeren/bungie-api-ts 5.10.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/.babelrc +4 -0
- package/.gitattributes +2 -0
- package/.github/workflows/pr-build.yml +50 -0
- package/.github/workflows/publish.yml +48 -0
- package/.github/workflows/update.yml +55 -0
- package/.gitmodules +3 -0
- package/.nvmrc +1 -0
- package/.prettierrc +10 -0
- package/.vscode/extensions.json +8 -0
- package/.vscode/settings.json +7 -0
- package/LICENSE.md +21 -0
- package/README.md +97 -0
- package/api-src/.github/workflows/close-inactive.yml +24 -0
- package/api-src/CHANGELOG.md +271 -0
- package/api-src/CONTRIBUTING.md +19 -0
- package/api-src/LICENSE +28 -0
- package/api-src/README.md +378 -0
- package/api-src/openapi-2.json +44518 -0
- package/api-src/openapi.json +46467 -0
- package/build.sh +30 -0
- package/bungie-api-LICENSE +29 -0
- package/generated-src/app/api.ts +50 -0
- package/generated-src/app/index.ts +17 -0
- package/generated-src/app/interfaces.ts +119 -0
- package/generated-src/common.ts +985 -0
- package/generated-src/communitycontent/api.ts +36 -0
- package/generated-src/communitycontent/index.ts +16 -0
- package/generated-src/content/api.ts +142 -0
- package/generated-src/content/index.ts +17 -0
- package/generated-src/content/interfaces.ts +225 -0
- package/generated-src/core/api.ts +57 -0
- package/generated-src/core/index.ts +17 -0
- package/generated-src/core/interfaces.ts +151 -0
- package/generated-src/destiny2/api.ts +821 -0
- package/generated-src/destiny2/index.ts +17 -0
- package/generated-src/destiny2/interfaces.ts +15714 -0
- package/generated-src/destiny2/manifest.ts +341 -0
- package/generated-src/fireteam/api.ts +151 -0
- package/generated-src/fireteam/index.ts +17 -0
- package/generated-src/fireteam/interfaces.ts +183 -0
- package/generated-src/forum/api.ts +197 -0
- package/generated-src/forum/index.ts +17 -0
- package/generated-src/forum/interfaces.ts +171 -0
- package/generated-src/groupv2/api.ts +515 -0
- package/generated-src/groupv2/index.ts +17 -0
- package/generated-src/groupv2/interfaces.ts +773 -0
- package/generated-src/http.ts +52 -0
- package/generated-src/index.ts +37 -0
- package/generated-src/package.json.notyet +99 -0
- package/generated-src/platform.ts +39 -0
- package/generated-src/social/api.ts +115 -0
- package/generated-src/social/index.ts +17 -0
- package/generated-src/social/interfaces.ts +89 -0
- package/generated-src/tokens/api.ts +126 -0
- package/generated-src/tokens/index.ts +17 -0
- package/generated-src/tokens/interfaces.ts +102 -0
- package/generated-src/trending/api.ts +62 -0
- package/generated-src/trending/index.ts +17 -0
- package/generated-src/trending/interfaces.ts +188 -0
- package/generated-src/user/api.ts +130 -0
- package/generated-src/user/index.ts +17 -0
- package/generated-src/user/interfaces.ts +338 -0
- package/generator/generate-api.ts +254 -0
- package/generator/generate-common.ts +123 -0
- package/generator/generate-index.ts +45 -0
- package/generator/generate-interfaces.ts +173 -0
- package/generator/generate-manifest.ts +217 -0
- package/generator/generate-package-json.ts +45 -0
- package/generator/generate.ts +54 -0
- package/generator/http.ts +52 -0
- package/generator/missing-props.ts +11 -0
- package/generator/type-index.ts +184 -0
- package/generator/util.ts +131 -0
- package/lib/README.md +97 -0
- package/lib/app/api.d.ts +36 -0
- package/lib/app/api.js +15 -0
- package/lib/app/index.d.ts +16 -0
- package/lib/app/index.js +5 -0
- package/lib/app/interfaces.d.ts +108 -0
- package/lib/app/interfaces.js +17 -0
- package/lib/bungie-api-LICENSE +29 -0
- package/lib/common.d.ts +979 -0
- package/lib/common.js +923 -0
- package/lib/communitycontent/api.d.ts +31 -0
- package/lib/communitycontent/api.js +7 -0
- package/lib/communitycontent/index.d.ts +15 -0
- package/lib/communitycontent/index.js +4 -0
- package/lib/content/api.d.ts +111 -0
- package/lib/content/api.js +75 -0
- package/lib/content/index.d.ts +16 -0
- package/lib/content/index.js +5 -0
- package/lib/content/interfaces.d.ts +214 -0
- package/lib/content/interfaces.js +17 -0
- package/lib/core/api.d.ts +45 -0
- package/lib/core/api.js +18 -0
- package/lib/core/index.d.ts +16 -0
- package/lib/core/index.js +5 -0
- package/lib/core/interfaces.d.ts +144 -0
- package/lib/core/interfaces.js +10 -0
- package/lib/destiny2/api.d.ts +765 -0
- package/lib/destiny2/api.js +295 -0
- package/lib/destiny2/index.d.ts +16 -0
- package/lib/destiny2/index.js +5 -0
- package/lib/destiny2/interfaces.d.ts +15340 -0
- package/lib/destiny2/interfaces.js +826 -0
- package/lib/destiny2/manifest.d.ts +465 -0
- package/lib/destiny2/manifest.js +56 -0
- package/lib/fireteam/api.d.ts +131 -0
- package/lib/fireteam/api.js +50 -0
- package/lib/fireteam/index.d.ts +16 -0
- package/lib/fireteam/index.js +5 -0
- package/lib/fireteam/interfaces.d.ts +166 -0
- package/lib/fireteam/interfaces.js +33 -0
- package/lib/forum/api.d.ts +165 -0
- package/lib/forum/api.js +79 -0
- package/lib/forum/index.d.ts +16 -0
- package/lib/forum/index.js +5 -0
- package/lib/forum/interfaces.d.ts +147 -0
- package/lib/forum/interfaces.js +61 -0
- package/lib/groupv2/api.d.ts +484 -0
- package/lib/groupv2/api.js +154 -0
- package/lib/groupv2/index.d.ts +16 -0
- package/lib/groupv2/index.js +5 -0
- package/lib/groupv2/interfaces.d.ts +718 -0
- package/lib/groupv2/interfaces.js +100 -0
- package/lib/http.d.ts +18 -0
- package/lib/http.js +20 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.js +24 -0
- package/lib/package.json +99 -0
- package/lib/platform.d.ts +36 -0
- package/lib/platform.js +9 -0
- package/lib/social/api.d.ts +101 -0
- package/lib/social/api.js +26 -0
- package/lib/social/index.d.ts +16 -0
- package/lib/social/index.js +5 -0
- package/lib/social/interfaces.d.ts +75 -0
- package/lib/social/interfaces.js +22 -0
- package/lib/tokens/api.d.ts +120 -0
- package/lib/tokens/api.js +38 -0
- package/lib/tokens/index.d.ts +16 -0
- package/lib/tokens/index.js +5 -0
- package/lib/tokens/interfaces.d.ts +88 -0
- package/lib/tokens/interfaces.js +5 -0
- package/lib/trending/api.d.ts +53 -0
- package/lib/trending/api.js +11 -0
- package/lib/trending/index.d.ts +16 -0
- package/lib/trending/index.js +5 -0
- package/lib/trending/interfaces.d.ts +171 -0
- package/lib/trending/interfaces.js +14 -0
- package/lib/user/api.d.ts +117 -0
- package/lib/user/api.js +35 -0
- package/lib/user/index.d.ts +16 -0
- package/lib/user/index.js +5 -0
- package/lib/user/interfaces.d.ts +320 -0
- package/lib/user/interfaces.js +28 -0
- package/package.json +60 -0
- package/test-consumer.ts +5 -0
- package/tests/__snapshots__/config-builders.test.ts.snap +343 -0
- package/tests/config-builders.test.ts +145 -0
- package/tests/manifest-fetcher.test.ts +43 -0
- package/tests/test-manifest.js +69 -0
- package/tsconfig-package.json +14 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* these helper functions and definitions are based off the structure of DestinyManifest
|
|
3
|
+
* in the bungie.net API spec, but are not explicity defined endpoints in the spec.
|
|
4
|
+
*
|
|
5
|
+
* they were last hand-checked for OpenAPI spec version 2.8.0,
|
|
6
|
+
* and have been automatically tested for the latest OpenAPI spec version 2.21.9.
|
|
7
|
+
* if there are typing issues with them, please let us know at the below repo.
|
|
8
|
+
*
|
|
9
|
+
* NOTE: This class is auto generated by the bungie-api-ts code generator program.
|
|
10
|
+
* https://github.com/DestinyItemManager/bungie-api-ts
|
|
11
|
+
* Do not edit these files manually.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { HttpClient, get } from '../http.js';
|
|
15
|
+
|
|
16
|
+
import {
|
|
17
|
+
DestinyPlaceDefinition,
|
|
18
|
+
DestinyActivityDefinition,
|
|
19
|
+
DestinyActivityTypeDefinition,
|
|
20
|
+
DestinyClassDefinition,
|
|
21
|
+
DestinyGenderDefinition,
|
|
22
|
+
DestinyInventoryBucketDefinition,
|
|
23
|
+
DestinyRaceDefinition,
|
|
24
|
+
DestinyUnlockDefinition,
|
|
25
|
+
DestinyStatGroupDefinition,
|
|
26
|
+
DestinyProgressionMappingDefinition,
|
|
27
|
+
DestinyFactionDefinition,
|
|
28
|
+
DestinyVendorGroupDefinition,
|
|
29
|
+
DestinyRewardSourceDefinition,
|
|
30
|
+
DestinyUnlockValueDefinition,
|
|
31
|
+
DestinyItemCategoryDefinition,
|
|
32
|
+
DestinyDamageTypeDefinition,
|
|
33
|
+
DestinyActivityModeDefinition,
|
|
34
|
+
DestinyMedalTierDefinition,
|
|
35
|
+
DestinyActivityDifficultyTierCollectionDefinition,
|
|
36
|
+
DestinyActivityFamilyDefinition,
|
|
37
|
+
DestinyActivityGraphDefinition,
|
|
38
|
+
DestinyActivityInteractableDefinition,
|
|
39
|
+
DestinyActivityLoadoutRestrictionDefinition,
|
|
40
|
+
DestinyActivitySelectableSkullCollectionDefinition,
|
|
41
|
+
DestinyActivitySelectableSkullExclusionGroupDefinition,
|
|
42
|
+
DestinyActivitySkullCategoryDefinition,
|
|
43
|
+
DestinyActivitySkullSubcategoryDefinition,
|
|
44
|
+
DestinyCollectibleDefinition,
|
|
45
|
+
DestinyDestinationDefinition,
|
|
46
|
+
DestinyEquipableItemSetDefinition,
|
|
47
|
+
DestinyEquipmentSlotDefinition,
|
|
48
|
+
DestinyEventCardDefinition,
|
|
49
|
+
DestinyFireteamFinderActivityGraphDefinition,
|
|
50
|
+
DestinyFireteamFinderActivitySetDefinition,
|
|
51
|
+
DestinyFireteamFinderLabelDefinition,
|
|
52
|
+
DestinyFireteamFinderLabelGroupDefinition,
|
|
53
|
+
DestinyFireteamFinderOptionDefinition,
|
|
54
|
+
DestinyFireteamFinderOptionGroupDefinition,
|
|
55
|
+
DestinyIconDefinition,
|
|
56
|
+
DestinyStatDefinition,
|
|
57
|
+
DestinyInventoryItemDefinition,
|
|
58
|
+
DestinyItemFilterDefinition,
|
|
59
|
+
DestinyItemTierTypeDefinition,
|
|
60
|
+
DestinyLoadoutColorDefinition,
|
|
61
|
+
DestinyLoadoutIconDefinition,
|
|
62
|
+
DestinyLoadoutNameDefinition,
|
|
63
|
+
DestinyLocationDefinition,
|
|
64
|
+
DestinyLoreDefinition,
|
|
65
|
+
DestinyMaterialRequirementSetDefinition,
|
|
66
|
+
DestinyMetricDefinition,
|
|
67
|
+
DestinyObjectiveDefinition,
|
|
68
|
+
DestinySandboxPerkDefinition,
|
|
69
|
+
DestinyPlugSetDefinition,
|
|
70
|
+
DestinyPowerCapDefinition,
|
|
71
|
+
DestinyPresentationNodeDefinition,
|
|
72
|
+
DestinyProgressionDefinition,
|
|
73
|
+
DestinyProgressionLevelRequirementDefinition,
|
|
74
|
+
DestinyRecordDefinition,
|
|
75
|
+
DestinySandboxPatternDefinition,
|
|
76
|
+
DestinySeasonDefinition,
|
|
77
|
+
DestinySeasonPassDefinition,
|
|
78
|
+
DestinySocialCommendationDefinition,
|
|
79
|
+
DestinySocketCategoryDefinition,
|
|
80
|
+
DestinySocketTypeDefinition,
|
|
81
|
+
DestinyTraitDefinition,
|
|
82
|
+
DestinyVendorDefinition,
|
|
83
|
+
DestinyMilestoneDefinition,
|
|
84
|
+
DestinyActivityModifierDefinition,
|
|
85
|
+
DestinyReportReasonCategoryDefinition,
|
|
86
|
+
DestinyArtifactDefinition,
|
|
87
|
+
DestinyBreakerTypeDefinition,
|
|
88
|
+
DestinyChecklistDefinition,
|
|
89
|
+
DestinyEnergyTypeDefinition,
|
|
90
|
+
DestinySocialCommendationNodeDefinition,
|
|
91
|
+
DestinyGuardianRankDefinition,
|
|
92
|
+
DestinyGuardianRankConstantsDefinition,
|
|
93
|
+
DestinyLoadoutConstantsDefinition,
|
|
94
|
+
DestinyFireteamFinderConstantsDefinition,
|
|
95
|
+
DestinyGlobalConstantsDefinition,
|
|
96
|
+
DestinyInventoryItemConstantsDefinition,
|
|
97
|
+
DestinyManifest
|
|
98
|
+
} from './interfaces.js';
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* this describes a big object holding several tables of hash-keyed DestinyDefinitions.
|
|
102
|
+
* this is roughly what you get if you decode the gigantic, single-json manifest blob,
|
|
103
|
+
* but also just what we use here to dole out single-table, typed definitions
|
|
104
|
+
*/
|
|
105
|
+
export interface AllDestinyManifestComponents {
|
|
106
|
+
DestinyPlaceDefinition: { [key: number]: DestinyPlaceDefinition };
|
|
107
|
+
DestinyActivityDefinition: { [key: number]: DestinyActivityDefinition };
|
|
108
|
+
DestinyActivityTypeDefinition: { [key: number]: DestinyActivityTypeDefinition };
|
|
109
|
+
DestinyClassDefinition: { [key: number]: DestinyClassDefinition };
|
|
110
|
+
DestinyGenderDefinition: { [key: number]: DestinyGenderDefinition };
|
|
111
|
+
DestinyInventoryBucketDefinition: { [key: number]: DestinyInventoryBucketDefinition };
|
|
112
|
+
DestinyRaceDefinition: { [key: number]: DestinyRaceDefinition };
|
|
113
|
+
DestinyUnlockDefinition: { [key: number]: DestinyUnlockDefinition };
|
|
114
|
+
DestinyStatGroupDefinition: { [key: number]: DestinyStatGroupDefinition };
|
|
115
|
+
DestinyProgressionMappingDefinition: { [key: number]: DestinyProgressionMappingDefinition };
|
|
116
|
+
DestinyFactionDefinition: { [key: number]: DestinyFactionDefinition };
|
|
117
|
+
DestinyVendorGroupDefinition: { [key: number]: DestinyVendorGroupDefinition };
|
|
118
|
+
DestinyRewardSourceDefinition: { [key: number]: DestinyRewardSourceDefinition };
|
|
119
|
+
DestinyUnlockValueDefinition: { [key: number]: DestinyUnlockValueDefinition };
|
|
120
|
+
DestinyItemCategoryDefinition: { [key: number]: DestinyItemCategoryDefinition };
|
|
121
|
+
DestinyDamageTypeDefinition: { [key: number]: DestinyDamageTypeDefinition };
|
|
122
|
+
DestinyActivityModeDefinition: { [key: number]: DestinyActivityModeDefinition };
|
|
123
|
+
DestinyMedalTierDefinition: { [key: number]: DestinyMedalTierDefinition };
|
|
124
|
+
DestinyActivityDifficultyTierCollectionDefinition: { [key: number]: DestinyActivityDifficultyTierCollectionDefinition };
|
|
125
|
+
DestinyActivityFamilyDefinition: { [key: number]: DestinyActivityFamilyDefinition };
|
|
126
|
+
DestinyActivityGraphDefinition: { [key: number]: DestinyActivityGraphDefinition };
|
|
127
|
+
DestinyActivityInteractableDefinition: { [key: number]: DestinyActivityInteractableDefinition };
|
|
128
|
+
DestinyActivityLoadoutRestrictionDefinition: { [key: number]: DestinyActivityLoadoutRestrictionDefinition };
|
|
129
|
+
DestinyActivitySelectableSkullCollectionDefinition: { [key: number]: DestinyActivitySelectableSkullCollectionDefinition };
|
|
130
|
+
DestinyActivitySelectableSkullExclusionGroupDefinition: { [key: number]: DestinyActivitySelectableSkullExclusionGroupDefinition };
|
|
131
|
+
DestinyActivitySkullCategoryDefinition: { [key: number]: DestinyActivitySkullCategoryDefinition };
|
|
132
|
+
DestinyActivitySkullSubcategoryDefinition: { [key: number]: DestinyActivitySkullSubcategoryDefinition };
|
|
133
|
+
DestinyCollectibleDefinition: { [key: number]: DestinyCollectibleDefinition };
|
|
134
|
+
DestinyDestinationDefinition: { [key: number]: DestinyDestinationDefinition };
|
|
135
|
+
DestinyEquipableItemSetDefinition: { [key: number]: DestinyEquipableItemSetDefinition };
|
|
136
|
+
DestinyEquipmentSlotDefinition: { [key: number]: DestinyEquipmentSlotDefinition };
|
|
137
|
+
DestinyEventCardDefinition: { [key: number]: DestinyEventCardDefinition };
|
|
138
|
+
DestinyFireteamFinderActivityGraphDefinition: { [key: number]: DestinyFireteamFinderActivityGraphDefinition };
|
|
139
|
+
DestinyFireteamFinderActivitySetDefinition: { [key: number]: DestinyFireteamFinderActivitySetDefinition };
|
|
140
|
+
DestinyFireteamFinderLabelDefinition: { [key: number]: DestinyFireteamFinderLabelDefinition };
|
|
141
|
+
DestinyFireteamFinderLabelGroupDefinition: { [key: number]: DestinyFireteamFinderLabelGroupDefinition };
|
|
142
|
+
DestinyFireteamFinderOptionDefinition: { [key: number]: DestinyFireteamFinderOptionDefinition };
|
|
143
|
+
DestinyFireteamFinderOptionGroupDefinition: { [key: number]: DestinyFireteamFinderOptionGroupDefinition };
|
|
144
|
+
DestinyIconDefinition: { [key: number]: DestinyIconDefinition };
|
|
145
|
+
DestinyStatDefinition: { [key: number]: DestinyStatDefinition };
|
|
146
|
+
DestinyInventoryItemDefinition: { [key: number]: DestinyInventoryItemDefinition };
|
|
147
|
+
DestinyItemFilterDefinition: { [key: number]: DestinyItemFilterDefinition };
|
|
148
|
+
DestinyItemTierTypeDefinition: { [key: number]: DestinyItemTierTypeDefinition };
|
|
149
|
+
DestinyLoadoutColorDefinition: { [key: number]: DestinyLoadoutColorDefinition };
|
|
150
|
+
DestinyLoadoutIconDefinition: { [key: number]: DestinyLoadoutIconDefinition };
|
|
151
|
+
DestinyLoadoutNameDefinition: { [key: number]: DestinyLoadoutNameDefinition };
|
|
152
|
+
DestinyLocationDefinition: { [key: number]: DestinyLocationDefinition };
|
|
153
|
+
DestinyLoreDefinition: { [key: number]: DestinyLoreDefinition };
|
|
154
|
+
DestinyMaterialRequirementSetDefinition: { [key: number]: DestinyMaterialRequirementSetDefinition };
|
|
155
|
+
DestinyMetricDefinition: { [key: number]: DestinyMetricDefinition };
|
|
156
|
+
DestinyObjectiveDefinition: { [key: number]: DestinyObjectiveDefinition };
|
|
157
|
+
DestinySandboxPerkDefinition: { [key: number]: DestinySandboxPerkDefinition };
|
|
158
|
+
DestinyPlugSetDefinition: { [key: number]: DestinyPlugSetDefinition };
|
|
159
|
+
DestinyPowerCapDefinition: { [key: number]: DestinyPowerCapDefinition };
|
|
160
|
+
DestinyPresentationNodeDefinition: { [key: number]: DestinyPresentationNodeDefinition };
|
|
161
|
+
DestinyProgressionDefinition: { [key: number]: DestinyProgressionDefinition };
|
|
162
|
+
DestinyProgressionLevelRequirementDefinition: { [key: number]: DestinyProgressionLevelRequirementDefinition };
|
|
163
|
+
DestinyRecordDefinition: { [key: number]: DestinyRecordDefinition };
|
|
164
|
+
DestinySandboxPatternDefinition: { [key: number]: DestinySandboxPatternDefinition };
|
|
165
|
+
DestinySeasonDefinition: { [key: number]: DestinySeasonDefinition };
|
|
166
|
+
DestinySeasonPassDefinition: { [key: number]: DestinySeasonPassDefinition };
|
|
167
|
+
DestinySocialCommendationDefinition: { [key: number]: DestinySocialCommendationDefinition };
|
|
168
|
+
DestinySocketCategoryDefinition: { [key: number]: DestinySocketCategoryDefinition };
|
|
169
|
+
DestinySocketTypeDefinition: { [key: number]: DestinySocketTypeDefinition };
|
|
170
|
+
DestinyTraitDefinition: { [key: number]: DestinyTraitDefinition };
|
|
171
|
+
DestinyVendorDefinition: { [key: number]: DestinyVendorDefinition };
|
|
172
|
+
DestinyMilestoneDefinition: { [key: number]: DestinyMilestoneDefinition };
|
|
173
|
+
DestinyActivityModifierDefinition: { [key: number]: DestinyActivityModifierDefinition };
|
|
174
|
+
DestinyReportReasonCategoryDefinition: { [key: number]: DestinyReportReasonCategoryDefinition };
|
|
175
|
+
DestinyArtifactDefinition: { [key: number]: DestinyArtifactDefinition };
|
|
176
|
+
DestinyBreakerTypeDefinition: { [key: number]: DestinyBreakerTypeDefinition };
|
|
177
|
+
DestinyChecklistDefinition: { [key: number]: DestinyChecklistDefinition };
|
|
178
|
+
DestinyEnergyTypeDefinition: { [key: number]: DestinyEnergyTypeDefinition };
|
|
179
|
+
DestinySocialCommendationNodeDefinition: { [key: number]: DestinySocialCommendationNodeDefinition };
|
|
180
|
+
DestinyGuardianRankDefinition: { [key: number]: DestinyGuardianRankDefinition };
|
|
181
|
+
DestinyGuardianRankConstantsDefinition: { [key: number]: DestinyGuardianRankConstantsDefinition };
|
|
182
|
+
DestinyLoadoutConstantsDefinition: { [key: number]: DestinyLoadoutConstantsDefinition };
|
|
183
|
+
DestinyFireteamFinderConstantsDefinition: { [key: number]: DestinyFireteamFinderConstantsDefinition };
|
|
184
|
+
DestinyGlobalConstantsDefinition: { [key: number]: DestinyGlobalConstantsDefinition };
|
|
185
|
+
DestinyInventoryItemConstantsDefinition: { [key: number]: DestinyInventoryItemConstantsDefinition };
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type DestinyInventoryItemLiteDefinition = Omit<
|
|
189
|
+
DestinyInventoryItemDefinition,
|
|
190
|
+
| "iconWatermarkShelved" | "screenshot" | "flavorText" | "tooltipStyle"
|
|
191
|
+
| "action" | "stats" | "statsEnabledUnlockExpression" | "translationBlock"
|
|
192
|
+
| "preview" | "sourceData" | "objectives" | "metrics" | "plug"
|
|
193
|
+
| "gearset" | "sack" | "sockets" | "investmentStats" | "traitIds"
|
|
194
|
+
| "traitHashes" | "boundToRelease" | "hash" | "index" | "contentIdentifier"
|
|
195
|
+
| "redacted" | "blacklisted"
|
|
196
|
+
>;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* languages the manifest comes in, as their required keys to download them
|
|
200
|
+
*/
|
|
201
|
+
export const destinyManifestLanguages = [
|
|
202
|
+
'de',
|
|
203
|
+
'en',
|
|
204
|
+
'es',
|
|
205
|
+
'es-mx',
|
|
206
|
+
'fr',
|
|
207
|
+
'it',
|
|
208
|
+
'ja',
|
|
209
|
+
'ko',
|
|
210
|
+
'pl',
|
|
211
|
+
'pt-br',
|
|
212
|
+
'ru',
|
|
213
|
+
'zh-chs',
|
|
214
|
+
'zh-cht',
|
|
215
|
+
] as const;
|
|
216
|
+
|
|
217
|
+
export type DestinyManifestLanguage = typeof destinyManifestLanguages[number];
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
// thoughts:
|
|
223
|
+
// this relies on the assumption that the separate
|
|
224
|
+
// manifest pieces offered in jsonWorldComponentContentPaths,
|
|
225
|
+
// will all be present in the big manifest at jsonWorldContentPaths.
|
|
226
|
+
|
|
227
|
+
// this has been the case so far, but there aren't
|
|
228
|
+
// strict spec standards for how the manifest will be available
|
|
229
|
+
|
|
230
|
+
export type DestinyManifestComponentName = keyof AllDestinyManifestComponents;
|
|
231
|
+
|
|
232
|
+
export type DestinyManifestSlice<K extends Readonly<DestinyManifestComponentName[]>> = Pick<
|
|
233
|
+
AllDestinyManifestComponents,
|
|
234
|
+
K[number]
|
|
235
|
+
>;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* given a STRING table name, returns that TYPE, so that you can write a function like:
|
|
239
|
+
* func<K extends DestinyManifestComponentName>(arg0:K):DestinyDefinitionFrom<K>{...}
|
|
240
|
+
* i.e.
|
|
241
|
+
* func('DestinyInventoryItemDefinition') will return type DestinyInventoryItemDefinition
|
|
242
|
+
*/
|
|
243
|
+
export type DestinyDefinitionFrom<
|
|
244
|
+
K extends DestinyManifestComponentName
|
|
245
|
+
> = AllDestinyManifestComponents[K][number];
|
|
246
|
+
|
|
247
|
+
export interface GetAllDestinyManifestComponentsParams {
|
|
248
|
+
destinyManifest: DestinyManifest;
|
|
249
|
+
language: DestinyManifestLanguage;
|
|
250
|
+
}
|
|
251
|
+
/** fetches the enormous combined JSON manifest file */
|
|
252
|
+
export function getAllDestinyManifestComponents(
|
|
253
|
+
http: HttpClient,
|
|
254
|
+
params: GetAllDestinyManifestComponentsParams
|
|
255
|
+
): Promise<AllDestinyManifestComponents> {
|
|
256
|
+
return get(http, 'https://www.bungie.net'+params.destinyManifest.jsonWorldContentPaths[params.language]);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface GetDestinyManifestComponentParams<T extends DestinyManifestComponentName> {
|
|
260
|
+
destinyManifest: DestinyManifest;
|
|
261
|
+
tableName: T;
|
|
262
|
+
language: DestinyManifestLanguage;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* this fetches and returns a single table (Component) from the d2 manifest
|
|
266
|
+
* i.e. DestinyInventoryItemDefinition / DestinyObjectiveDefinition /
|
|
267
|
+
* DestinyVendorDefinition / DestinySeasonDefinition / etc.
|
|
268
|
+
*
|
|
269
|
+
* due to typescript limitations, the table name needs to be recognized by
|
|
270
|
+
* typescript as a const (not mutable between inception and going into the function),
|
|
271
|
+
* so that it considers it a table name and not just a string.
|
|
272
|
+
*
|
|
273
|
+
* this is easy with a string, since
|
|
274
|
+
*
|
|
275
|
+
* `const x = 'thing';` is type `'thing'`, not type `string`,
|
|
276
|
+
*
|
|
277
|
+
* but make sure it's not a `let x =` or a dynamically set string.
|
|
278
|
+
*/
|
|
279
|
+
export async function getDestinyManifestComponent<T extends DestinyManifestComponentName>(
|
|
280
|
+
http: HttpClient,
|
|
281
|
+
params: GetDestinyManifestComponentParams<T>
|
|
282
|
+
): Promise<AllDestinyManifestComponents[T]> {
|
|
283
|
+
const url = 'https://www.bungie.net' +
|
|
284
|
+
params.destinyManifest.jsonWorldComponentContentPaths[params.language][params.tableName];
|
|
285
|
+
try {
|
|
286
|
+
return await get(http, url);
|
|
287
|
+
} catch (e) {
|
|
288
|
+
try {
|
|
289
|
+
return await get(http, `${url}?retry`);
|
|
290
|
+
} catch {
|
|
291
|
+
throw e;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface GetDestinyManifestSliceParams<T extends DestinyManifestComponentName[]> {
|
|
297
|
+
destinyManifest: DestinyManifest;
|
|
298
|
+
tableNames: T;
|
|
299
|
+
language: DestinyManifestLanguage;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* this returns a similar structure to getAllDestinyManifestComponents (the big manifest json)
|
|
303
|
+
* but only specific components within. it bundles multiple single tables requests,
|
|
304
|
+
* into a single properly typed object with keys named after manifest components
|
|
305
|
+
*
|
|
306
|
+
* i.e. `{ DestinyInventoryItemDefinition: etc...,
|
|
307
|
+
* DestinyObjectiveDefinition: etc... }`
|
|
308
|
+
*
|
|
309
|
+
* due to typescript limitations, the array of tableNames needs to be recognized by
|
|
310
|
+
* typescript as readonly (not mutable between inception and going into the function),
|
|
311
|
+
* so that it considers them table names and not just strings.
|
|
312
|
+
*
|
|
313
|
+
* like `['DestinyInventoryItemDefinition' as const]`
|
|
314
|
+
*
|
|
315
|
+
* or maybe `['DestinyInventoryItemDefinition'] as const`
|
|
316
|
+
*
|
|
317
|
+
* or just feed in into the function hardcoded like
|
|
318
|
+
*
|
|
319
|
+
* `function(['DestinyInventoryItemDefinition'])`
|
|
320
|
+
*/
|
|
321
|
+
export async function getDestinyManifestSlice<T extends DestinyManifestComponentName[]>(
|
|
322
|
+
http: HttpClient,
|
|
323
|
+
params: GetDestinyManifestSliceParams<T>
|
|
324
|
+
): Promise<DestinyManifestSlice<T>> {
|
|
325
|
+
const downloadedTables = await Promise.all(
|
|
326
|
+
params.tableNames.map(async (tableName) => {
|
|
327
|
+
const tableContent = await getDestinyManifestComponent(http, {
|
|
328
|
+
destinyManifest: params.destinyManifest,
|
|
329
|
+
tableName,
|
|
330
|
+
language: params.language,
|
|
331
|
+
});
|
|
332
|
+
return { tableName, tableContent };
|
|
333
|
+
})
|
|
334
|
+
);
|
|
335
|
+
const manifestSlice = {} as AllDestinyManifestComponents;
|
|
336
|
+
for (const downloadedTable of downloadedTables) {
|
|
337
|
+
manifestSlice[downloadedTable.tableName] = downloadedTable.tableContent as any;
|
|
338
|
+
}
|
|
339
|
+
return manifestSlice as DestinyManifestSlice<T>;
|
|
340
|
+
}
|
|
341
|
+
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bungie.Net API
|
|
3
|
+
* 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.
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 2.21.9
|
|
6
|
+
* Contact: support@bungie.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the bungie-api-ts code generator program.
|
|
9
|
+
* https://github.com/DestinyItemManager/bungie-api-ts
|
|
10
|
+
* Do not edit these files manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { HttpClient, get, post } from '../http.js';
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
FireteamDateRange,
|
|
17
|
+
FireteamPlatform,
|
|
18
|
+
FireteamPublicSearchOption,
|
|
19
|
+
FireteamResponse,
|
|
20
|
+
FireteamSlotSearch,
|
|
21
|
+
SearchResultOfFireteamResponse,
|
|
22
|
+
SearchResultOfFireteamSummary
|
|
23
|
+
} from './interfaces.js';
|
|
24
|
+
import {
|
|
25
|
+
ServerResponse
|
|
26
|
+
} from '../common.js';
|
|
27
|
+
|
|
28
|
+
const API_BASE = "https://www.bungie.net/Platform/Fireteam/";
|
|
29
|
+
|
|
30
|
+
export interface GetActivePrivateClanFireteamCountParams {
|
|
31
|
+
/** The group id of the clan. */
|
|
32
|
+
groupId: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Gets a count of all active non-public fireteams for the specified clan. Maximum
|
|
37
|
+
* value returned is 25.
|
|
38
|
+
*/
|
|
39
|
+
export function getActivePrivateClanFireteamCount(http: HttpClient, params: GetActivePrivateClanFireteamCountParams): Promise<ServerResponse<number>> {
|
|
40
|
+
return get(http, `${API_BASE}Clan/${params.groupId}/ActiveCount/`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface GetAvailableClanFireteamsParams {
|
|
44
|
+
/** The activity type to filter by. */
|
|
45
|
+
activityType: number;
|
|
46
|
+
/** The date range to grab available fireteams. */
|
|
47
|
+
dateRange: FireteamDateRange;
|
|
48
|
+
/**
|
|
49
|
+
* If you wish the result to exclude immediate fireteams, set this to true.
|
|
50
|
+
* Immediate-only can be forced using the dateRange enum.
|
|
51
|
+
*/
|
|
52
|
+
excludeImmediate?: boolean;
|
|
53
|
+
/** The group id of the clan. */
|
|
54
|
+
groupId: string;
|
|
55
|
+
/** An optional language filter. */
|
|
56
|
+
langFilter?: string;
|
|
57
|
+
/** Zero based page */
|
|
58
|
+
page: number;
|
|
59
|
+
/** The platform filter. */
|
|
60
|
+
platform: FireteamPlatform;
|
|
61
|
+
/** Determines public/private filtering. */
|
|
62
|
+
publicOnly: FireteamPublicSearchOption;
|
|
63
|
+
/** Filters based on available slots */
|
|
64
|
+
slotFilter: FireteamSlotSearch;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Gets a listing of all of this clan's fireteams that are have available slots.
|
|
69
|
+
* Caller is not checked for join criteria so caching is maximized.
|
|
70
|
+
*/
|
|
71
|
+
export function getAvailableClanFireteams(http: HttpClient, params: GetAvailableClanFireteamsParams): Promise<ServerResponse<SearchResultOfFireteamSummary>> {
|
|
72
|
+
const strParams: Record<string, string> = {};
|
|
73
|
+
if (params.excludeImmediate !== undefined) { strParams.excludeImmediate = params.excludeImmediate.toString(); }
|
|
74
|
+
if (params.langFilter !== undefined) { strParams.langFilter = params.langFilter; }
|
|
75
|
+
return get(http, `${API_BASE}Clan/${params.groupId}/Available/${params.platform}/${params.activityType}/${params.dateRange}/${params.slotFilter}/${params.publicOnly}/${params.page}/`, strParams);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface SearchPublicAvailableClanFireteamsParams {
|
|
79
|
+
/** The activity type to filter by. */
|
|
80
|
+
activityType: number;
|
|
81
|
+
/** The date range to grab available fireteams. */
|
|
82
|
+
dateRange: FireteamDateRange;
|
|
83
|
+
/**
|
|
84
|
+
* If you wish the result to exclude immediate fireteams, set this to true.
|
|
85
|
+
* Immediate-only can be forced using the dateRange enum.
|
|
86
|
+
*/
|
|
87
|
+
excludeImmediate?: boolean;
|
|
88
|
+
/** An optional language filter. */
|
|
89
|
+
langFilter?: string;
|
|
90
|
+
/** Zero based page */
|
|
91
|
+
page: number;
|
|
92
|
+
/** The platform filter. */
|
|
93
|
+
platform: FireteamPlatform;
|
|
94
|
+
/** Filters based on available slots */
|
|
95
|
+
slotFilter: FireteamSlotSearch;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Gets a listing of all public fireteams starting now with open slots. Caller is
|
|
100
|
+
* not checked for join criteria so caching is maximized.
|
|
101
|
+
*/
|
|
102
|
+
export function searchPublicAvailableClanFireteams(http: HttpClient, params: SearchPublicAvailableClanFireteamsParams): Promise<ServerResponse<SearchResultOfFireteamSummary>> {
|
|
103
|
+
const strParams: Record<string, string> = {};
|
|
104
|
+
if (params.excludeImmediate !== undefined) { strParams.excludeImmediate = params.excludeImmediate.toString(); }
|
|
105
|
+
if (params.langFilter !== undefined) { strParams.langFilter = params.langFilter; }
|
|
106
|
+
return get(http, `${API_BASE}Search/Available/${params.platform}/${params.activityType}/${params.dateRange}/${params.slotFilter}/${params.page}/`, strParams);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface GetMyClanFireteamsParams {
|
|
110
|
+
/**
|
|
111
|
+
* If true, filter by clan. Otherwise, ignore the clan and show all of the user's
|
|
112
|
+
* fireteams.
|
|
113
|
+
*/
|
|
114
|
+
groupFilter?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* The group id of the clan. (This parameter is ignored unless the optional query
|
|
117
|
+
* parameter groupFilter is true).
|
|
118
|
+
*/
|
|
119
|
+
groupId: string;
|
|
120
|
+
/** If true, return fireteams that have been closed. */
|
|
121
|
+
includeClosed: boolean;
|
|
122
|
+
/** An optional language filter. */
|
|
123
|
+
langFilter?: string;
|
|
124
|
+
/** Deprecated parameter, ignored. */
|
|
125
|
+
page: number;
|
|
126
|
+
/** The platform filter. */
|
|
127
|
+
platform: FireteamPlatform;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Gets a listing of all fireteams that caller is an applicant, a member, or an
|
|
132
|
+
* alternate of.
|
|
133
|
+
*/
|
|
134
|
+
export function getMyClanFireteams(http: HttpClient, params: GetMyClanFireteamsParams): Promise<ServerResponse<SearchResultOfFireteamResponse>> {
|
|
135
|
+
const strParams: Record<string, string> = {};
|
|
136
|
+
if (params.groupFilter !== undefined) { strParams.groupFilter = params.groupFilter.toString(); }
|
|
137
|
+
if (params.langFilter !== undefined) { strParams.langFilter = params.langFilter; }
|
|
138
|
+
return get(http, `${API_BASE}Clan/${params.groupId}/My/${params.platform}/${params.includeClosed}/${params.page}/`, strParams);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface GetClanFireteamParams {
|
|
142
|
+
/** The unique id of the fireteam. */
|
|
143
|
+
fireteamId: string;
|
|
144
|
+
/** The group id of the clan. */
|
|
145
|
+
groupId: string;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** Gets a specific fireteam. */
|
|
149
|
+
export function getClanFireteam(http: HttpClient, params: GetClanFireteamParams): Promise<ServerResponse<FireteamResponse>> {
|
|
150
|
+
return get(http, `${API_BASE}Clan/${params.groupId}/Summary/${params.fireteamId}/`);
|
|
151
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bungie.Net API
|
|
3
|
+
* 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.
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 2.21.9
|
|
6
|
+
* Contact: support@bungie.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the bungie-api-ts code generator program.
|
|
9
|
+
* https://github.com/DestinyItemManager/bungie-api-ts
|
|
10
|
+
* Do not edit these files manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export * from '../common.js';
|
|
14
|
+
export * from '../platform.js';
|
|
15
|
+
export type {HttpClientConfig, HttpClient} from '../http.js';
|
|
16
|
+
export * from './api.js';
|
|
17
|
+
export * from './interfaces.js';
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bungie.Net API
|
|
3
|
+
* 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.
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 2.21.9
|
|
6
|
+
* Contact: support@bungie.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the bungie-api-ts code generator program.
|
|
9
|
+
* https://github.com/DestinyItemManager/bungie-api-ts
|
|
10
|
+
* Do not edit these files manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
BungieMembershipType,
|
|
15
|
+
PagedQuery
|
|
16
|
+
} from '../common.js';
|
|
17
|
+
import {
|
|
18
|
+
UserInfoCard
|
|
19
|
+
} from '../user/interfaces.js';
|
|
20
|
+
|
|
21
|
+
export const enum FireteamDateRange {
|
|
22
|
+
All = 0,
|
|
23
|
+
Now = 1,
|
|
24
|
+
TwentyFourHours = 2,
|
|
25
|
+
FortyEightHours = 3,
|
|
26
|
+
ThisWeek = 4
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const enum FireteamPlatform {
|
|
30
|
+
Any = 0,
|
|
31
|
+
Playstation4 = 1,
|
|
32
|
+
XboxOne = 2,
|
|
33
|
+
Blizzard = 3,
|
|
34
|
+
Steam = 4,
|
|
35
|
+
Stadia = 5,
|
|
36
|
+
Egs = 6
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const enum FireteamPublicSearchOption {
|
|
40
|
+
PublicAndPrivate = 0,
|
|
41
|
+
PublicOnly = 1,
|
|
42
|
+
PrivateOnly = 2
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const enum FireteamSlotSearch {
|
|
46
|
+
NoSlotRestriction = 0,
|
|
47
|
+
HasOpenPlayerSlots = 1,
|
|
48
|
+
HasOpenPlayerOrAltSlots = 2
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface SearchResultOfFireteamSummary {
|
|
52
|
+
readonly results: FireteamSummary[];
|
|
53
|
+
readonly totalResults: number;
|
|
54
|
+
readonly hasMore: boolean;
|
|
55
|
+
readonly query: PagedQuery;
|
|
56
|
+
readonly replacementContinuationToken: string;
|
|
57
|
+
/**
|
|
58
|
+
* If useTotalResults is true, then totalResults represents an accurate count.
|
|
59
|
+
*
|
|
60
|
+
* If False, it does not, and may be estimated/only the size of the current page.
|
|
61
|
+
*
|
|
62
|
+
* Either way, you should probably always only trust hasMore.
|
|
63
|
+
*
|
|
64
|
+
* This is a long-held historical throwback to when we used to do paging with known
|
|
65
|
+
* total results. Those queries toasted our database, and we were left to hastily
|
|
66
|
+
* alter our endpoints and create backward- compatible shims, of which
|
|
67
|
+
* useTotalResults is one.
|
|
68
|
+
*/
|
|
69
|
+
readonly useTotalResults: boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface FireteamSummary {
|
|
73
|
+
readonly fireteamId: string;
|
|
74
|
+
readonly groupId: string;
|
|
75
|
+
readonly platform: FireteamPlatform;
|
|
76
|
+
readonly activityType: number;
|
|
77
|
+
readonly isImmediate: boolean;
|
|
78
|
+
readonly scheduledTime?: string;
|
|
79
|
+
readonly ownerMembershipId: string;
|
|
80
|
+
readonly playerSlotCount: number;
|
|
81
|
+
readonly alternateSlotCount?: number;
|
|
82
|
+
readonly availablePlayerSlotCount: number;
|
|
83
|
+
readonly availableAlternateSlotCount: number;
|
|
84
|
+
readonly title: string;
|
|
85
|
+
readonly dateCreated: string;
|
|
86
|
+
readonly dateModified?: string;
|
|
87
|
+
readonly isPublic: boolean;
|
|
88
|
+
readonly locale: string;
|
|
89
|
+
readonly isValid: boolean;
|
|
90
|
+
readonly datePlayerModified: string;
|
|
91
|
+
readonly titleBeforeModeration: string;
|
|
92
|
+
/** Mapped to DestinyGuardianRankDefinition in the manifest. */
|
|
93
|
+
readonly ownerCurrentGuardianRankSnapshot: number;
|
|
94
|
+
/** Mapped to DestinyGuardianRankDefinition in the manifest. */
|
|
95
|
+
readonly ownerHighestLifetimeGuardianRankSnapshot: number;
|
|
96
|
+
readonly ownerTotalCommendationScoreSnapshot: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface SearchResultOfFireteamResponse {
|
|
100
|
+
readonly results: FireteamResponse[];
|
|
101
|
+
readonly totalResults: number;
|
|
102
|
+
readonly hasMore: boolean;
|
|
103
|
+
readonly query: PagedQuery;
|
|
104
|
+
readonly replacementContinuationToken: string;
|
|
105
|
+
/**
|
|
106
|
+
* If useTotalResults is true, then totalResults represents an accurate count.
|
|
107
|
+
*
|
|
108
|
+
* If False, it does not, and may be estimated/only the size of the current page.
|
|
109
|
+
*
|
|
110
|
+
* Either way, you should probably always only trust hasMore.
|
|
111
|
+
*
|
|
112
|
+
* This is a long-held historical throwback to when we used to do paging with known
|
|
113
|
+
* total results. Those queries toasted our database, and we were left to hastily
|
|
114
|
+
* alter our endpoints and create backward- compatible shims, of which
|
|
115
|
+
* useTotalResults is one.
|
|
116
|
+
*/
|
|
117
|
+
readonly useTotalResults: boolean;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface FireteamResponse {
|
|
121
|
+
readonly Summary: FireteamSummary;
|
|
122
|
+
readonly Members: FireteamMember[];
|
|
123
|
+
readonly Alternates: FireteamMember[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface FireteamMember {
|
|
127
|
+
readonly destinyUserInfo: FireteamUserInfoCard;
|
|
128
|
+
readonly bungieNetUserInfo: UserInfoCard;
|
|
129
|
+
readonly characterId: string;
|
|
130
|
+
readonly dateJoined: string;
|
|
131
|
+
readonly hasMicrophone: boolean;
|
|
132
|
+
readonly lastPlatformInviteAttemptDate: string;
|
|
133
|
+
readonly lastPlatformInviteAttemptResult: FireteamPlatformInviteResult;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface FireteamUserInfoCard {
|
|
137
|
+
readonly FireteamDisplayName: string;
|
|
138
|
+
readonly FireteamMembershipType: BungieMembershipType;
|
|
139
|
+
/**
|
|
140
|
+
* A platform specific additional display name - ex: psn Real Name, bnet Unique
|
|
141
|
+
* Name, etc.
|
|
142
|
+
*/
|
|
143
|
+
readonly supplementalDisplayName: string;
|
|
144
|
+
/** URL the Icon if available. */
|
|
145
|
+
readonly iconPath: string;
|
|
146
|
+
/**
|
|
147
|
+
* If there is a cross save override in effect, this value will tell you the type
|
|
148
|
+
* that is overridding this one.
|
|
149
|
+
*/
|
|
150
|
+
readonly crossSaveOverride: BungieMembershipType;
|
|
151
|
+
/**
|
|
152
|
+
* The list of Membership Types indicating the platforms on which this Membership
|
|
153
|
+
* can be used.
|
|
154
|
+
*
|
|
155
|
+
* Not in Cross Save = its original membership type. Cross Save Primary = Any
|
|
156
|
+
* membership types it is overridding, and its original membership type Cross Save
|
|
157
|
+
* Overridden = Empty list
|
|
158
|
+
*/
|
|
159
|
+
readonly applicableMembershipTypes: BungieMembershipType[];
|
|
160
|
+
/** If True, this is a public user membership. */
|
|
161
|
+
readonly isPublic: boolean;
|
|
162
|
+
/** Type of the membership. Not necessarily the native type. */
|
|
163
|
+
readonly membershipType: BungieMembershipType;
|
|
164
|
+
/** Membership ID as they user is known in the Accounts service */
|
|
165
|
+
readonly membershipId: string;
|
|
166
|
+
/**
|
|
167
|
+
* Display Name the player has chosen for themselves. The display name is optional
|
|
168
|
+
* when the data type is used as input to a platform API.
|
|
169
|
+
*/
|
|
170
|
+
readonly displayName: string;
|
|
171
|
+
/** The bungie global display name, if set. */
|
|
172
|
+
readonly bungieGlobalDisplayName: string;
|
|
173
|
+
/** The bungie global display name code, if set. */
|
|
174
|
+
readonly bungieGlobalDisplayNameCode?: number;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export const enum FireteamPlatformInviteResult {
|
|
178
|
+
None = 0,
|
|
179
|
+
Success = 1,
|
|
180
|
+
AlreadyInFireteam = 2,
|
|
181
|
+
Throttled = 3,
|
|
182
|
+
ServiceError = 4
|
|
183
|
+
}
|