@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,465 @@
|
|
|
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
|
+
import { HttpClient } from '../http.js';
|
|
14
|
+
import {
|
|
15
|
+
DestinyPlaceDefinition,
|
|
16
|
+
DestinyActivityDefinition,
|
|
17
|
+
DestinyActivityTypeDefinition,
|
|
18
|
+
DestinyClassDefinition,
|
|
19
|
+
DestinyGenderDefinition,
|
|
20
|
+
DestinyInventoryBucketDefinition,
|
|
21
|
+
DestinyRaceDefinition,
|
|
22
|
+
DestinyUnlockDefinition,
|
|
23
|
+
DestinyStatGroupDefinition,
|
|
24
|
+
DestinyProgressionMappingDefinition,
|
|
25
|
+
DestinyFactionDefinition,
|
|
26
|
+
DestinyVendorGroupDefinition,
|
|
27
|
+
DestinyRewardSourceDefinition,
|
|
28
|
+
DestinyUnlockValueDefinition,
|
|
29
|
+
DestinyItemCategoryDefinition,
|
|
30
|
+
DestinyDamageTypeDefinition,
|
|
31
|
+
DestinyActivityModeDefinition,
|
|
32
|
+
DestinyMedalTierDefinition,
|
|
33
|
+
DestinyActivityDifficultyTierCollectionDefinition,
|
|
34
|
+
DestinyActivityFamilyDefinition,
|
|
35
|
+
DestinyActivityGraphDefinition,
|
|
36
|
+
DestinyActivityInteractableDefinition,
|
|
37
|
+
DestinyActivityLoadoutRestrictionDefinition,
|
|
38
|
+
DestinyActivitySelectableSkullCollectionDefinition,
|
|
39
|
+
DestinyActivitySelectableSkullExclusionGroupDefinition,
|
|
40
|
+
DestinyActivitySkullCategoryDefinition,
|
|
41
|
+
DestinyActivitySkullSubcategoryDefinition,
|
|
42
|
+
DestinyCollectibleDefinition,
|
|
43
|
+
DestinyDestinationDefinition,
|
|
44
|
+
DestinyEquipableItemSetDefinition,
|
|
45
|
+
DestinyEquipmentSlotDefinition,
|
|
46
|
+
DestinyEventCardDefinition,
|
|
47
|
+
DestinyFireteamFinderActivityGraphDefinition,
|
|
48
|
+
DestinyFireteamFinderActivitySetDefinition,
|
|
49
|
+
DestinyFireteamFinderLabelDefinition,
|
|
50
|
+
DestinyFireteamFinderLabelGroupDefinition,
|
|
51
|
+
DestinyFireteamFinderOptionDefinition,
|
|
52
|
+
DestinyFireteamFinderOptionGroupDefinition,
|
|
53
|
+
DestinyIconDefinition,
|
|
54
|
+
DestinyStatDefinition,
|
|
55
|
+
DestinyInventoryItemDefinition,
|
|
56
|
+
DestinyItemFilterDefinition,
|
|
57
|
+
DestinyItemTierTypeDefinition,
|
|
58
|
+
DestinyLoadoutColorDefinition,
|
|
59
|
+
DestinyLoadoutIconDefinition,
|
|
60
|
+
DestinyLoadoutNameDefinition,
|
|
61
|
+
DestinyLocationDefinition,
|
|
62
|
+
DestinyLoreDefinition,
|
|
63
|
+
DestinyMaterialRequirementSetDefinition,
|
|
64
|
+
DestinyMetricDefinition,
|
|
65
|
+
DestinyObjectiveDefinition,
|
|
66
|
+
DestinySandboxPerkDefinition,
|
|
67
|
+
DestinyPlugSetDefinition,
|
|
68
|
+
DestinyPowerCapDefinition,
|
|
69
|
+
DestinyPresentationNodeDefinition,
|
|
70
|
+
DestinyProgressionDefinition,
|
|
71
|
+
DestinyProgressionLevelRequirementDefinition,
|
|
72
|
+
DestinyRecordDefinition,
|
|
73
|
+
DestinySandboxPatternDefinition,
|
|
74
|
+
DestinySeasonDefinition,
|
|
75
|
+
DestinySeasonPassDefinition,
|
|
76
|
+
DestinySocialCommendationDefinition,
|
|
77
|
+
DestinySocketCategoryDefinition,
|
|
78
|
+
DestinySocketTypeDefinition,
|
|
79
|
+
DestinyTraitDefinition,
|
|
80
|
+
DestinyVendorDefinition,
|
|
81
|
+
DestinyMilestoneDefinition,
|
|
82
|
+
DestinyActivityModifierDefinition,
|
|
83
|
+
DestinyReportReasonCategoryDefinition,
|
|
84
|
+
DestinyArtifactDefinition,
|
|
85
|
+
DestinyBreakerTypeDefinition,
|
|
86
|
+
DestinyChecklistDefinition,
|
|
87
|
+
DestinyEnergyTypeDefinition,
|
|
88
|
+
DestinySocialCommendationNodeDefinition,
|
|
89
|
+
DestinyGuardianRankDefinition,
|
|
90
|
+
DestinyGuardianRankConstantsDefinition,
|
|
91
|
+
DestinyLoadoutConstantsDefinition,
|
|
92
|
+
DestinyFireteamFinderConstantsDefinition,
|
|
93
|
+
DestinyGlobalConstantsDefinition,
|
|
94
|
+
DestinyInventoryItemConstantsDefinition,
|
|
95
|
+
DestinyManifest,
|
|
96
|
+
} from './interfaces.js';
|
|
97
|
+
/**
|
|
98
|
+
* this describes a big object holding several tables of hash-keyed DestinyDefinitions.
|
|
99
|
+
* this is roughly what you get if you decode the gigantic, single-json manifest blob,
|
|
100
|
+
* but also just what we use here to dole out single-table, typed definitions
|
|
101
|
+
*/
|
|
102
|
+
export interface AllDestinyManifestComponents {
|
|
103
|
+
DestinyPlaceDefinition: {
|
|
104
|
+
[key: number]: DestinyPlaceDefinition;
|
|
105
|
+
};
|
|
106
|
+
DestinyActivityDefinition: {
|
|
107
|
+
[key: number]: DestinyActivityDefinition;
|
|
108
|
+
};
|
|
109
|
+
DestinyActivityTypeDefinition: {
|
|
110
|
+
[key: number]: DestinyActivityTypeDefinition;
|
|
111
|
+
};
|
|
112
|
+
DestinyClassDefinition: {
|
|
113
|
+
[key: number]: DestinyClassDefinition;
|
|
114
|
+
};
|
|
115
|
+
DestinyGenderDefinition: {
|
|
116
|
+
[key: number]: DestinyGenderDefinition;
|
|
117
|
+
};
|
|
118
|
+
DestinyInventoryBucketDefinition: {
|
|
119
|
+
[key: number]: DestinyInventoryBucketDefinition;
|
|
120
|
+
};
|
|
121
|
+
DestinyRaceDefinition: {
|
|
122
|
+
[key: number]: DestinyRaceDefinition;
|
|
123
|
+
};
|
|
124
|
+
DestinyUnlockDefinition: {
|
|
125
|
+
[key: number]: DestinyUnlockDefinition;
|
|
126
|
+
};
|
|
127
|
+
DestinyStatGroupDefinition: {
|
|
128
|
+
[key: number]: DestinyStatGroupDefinition;
|
|
129
|
+
};
|
|
130
|
+
DestinyProgressionMappingDefinition: {
|
|
131
|
+
[key: number]: DestinyProgressionMappingDefinition;
|
|
132
|
+
};
|
|
133
|
+
DestinyFactionDefinition: {
|
|
134
|
+
[key: number]: DestinyFactionDefinition;
|
|
135
|
+
};
|
|
136
|
+
DestinyVendorGroupDefinition: {
|
|
137
|
+
[key: number]: DestinyVendorGroupDefinition;
|
|
138
|
+
};
|
|
139
|
+
DestinyRewardSourceDefinition: {
|
|
140
|
+
[key: number]: DestinyRewardSourceDefinition;
|
|
141
|
+
};
|
|
142
|
+
DestinyUnlockValueDefinition: {
|
|
143
|
+
[key: number]: DestinyUnlockValueDefinition;
|
|
144
|
+
};
|
|
145
|
+
DestinyItemCategoryDefinition: {
|
|
146
|
+
[key: number]: DestinyItemCategoryDefinition;
|
|
147
|
+
};
|
|
148
|
+
DestinyDamageTypeDefinition: {
|
|
149
|
+
[key: number]: DestinyDamageTypeDefinition;
|
|
150
|
+
};
|
|
151
|
+
DestinyActivityModeDefinition: {
|
|
152
|
+
[key: number]: DestinyActivityModeDefinition;
|
|
153
|
+
};
|
|
154
|
+
DestinyMedalTierDefinition: {
|
|
155
|
+
[key: number]: DestinyMedalTierDefinition;
|
|
156
|
+
};
|
|
157
|
+
DestinyActivityDifficultyTierCollectionDefinition: {
|
|
158
|
+
[key: number]: DestinyActivityDifficultyTierCollectionDefinition;
|
|
159
|
+
};
|
|
160
|
+
DestinyActivityFamilyDefinition: {
|
|
161
|
+
[key: number]: DestinyActivityFamilyDefinition;
|
|
162
|
+
};
|
|
163
|
+
DestinyActivityGraphDefinition: {
|
|
164
|
+
[key: number]: DestinyActivityGraphDefinition;
|
|
165
|
+
};
|
|
166
|
+
DestinyActivityInteractableDefinition: {
|
|
167
|
+
[key: number]: DestinyActivityInteractableDefinition;
|
|
168
|
+
};
|
|
169
|
+
DestinyActivityLoadoutRestrictionDefinition: {
|
|
170
|
+
[key: number]: DestinyActivityLoadoutRestrictionDefinition;
|
|
171
|
+
};
|
|
172
|
+
DestinyActivitySelectableSkullCollectionDefinition: {
|
|
173
|
+
[key: number]: DestinyActivitySelectableSkullCollectionDefinition;
|
|
174
|
+
};
|
|
175
|
+
DestinyActivitySelectableSkullExclusionGroupDefinition: {
|
|
176
|
+
[key: number]: DestinyActivitySelectableSkullExclusionGroupDefinition;
|
|
177
|
+
};
|
|
178
|
+
DestinyActivitySkullCategoryDefinition: {
|
|
179
|
+
[key: number]: DestinyActivitySkullCategoryDefinition;
|
|
180
|
+
};
|
|
181
|
+
DestinyActivitySkullSubcategoryDefinition: {
|
|
182
|
+
[key: number]: DestinyActivitySkullSubcategoryDefinition;
|
|
183
|
+
};
|
|
184
|
+
DestinyCollectibleDefinition: {
|
|
185
|
+
[key: number]: DestinyCollectibleDefinition;
|
|
186
|
+
};
|
|
187
|
+
DestinyDestinationDefinition: {
|
|
188
|
+
[key: number]: DestinyDestinationDefinition;
|
|
189
|
+
};
|
|
190
|
+
DestinyEquipableItemSetDefinition: {
|
|
191
|
+
[key: number]: DestinyEquipableItemSetDefinition;
|
|
192
|
+
};
|
|
193
|
+
DestinyEquipmentSlotDefinition: {
|
|
194
|
+
[key: number]: DestinyEquipmentSlotDefinition;
|
|
195
|
+
};
|
|
196
|
+
DestinyEventCardDefinition: {
|
|
197
|
+
[key: number]: DestinyEventCardDefinition;
|
|
198
|
+
};
|
|
199
|
+
DestinyFireteamFinderActivityGraphDefinition: {
|
|
200
|
+
[key: number]: DestinyFireteamFinderActivityGraphDefinition;
|
|
201
|
+
};
|
|
202
|
+
DestinyFireteamFinderActivitySetDefinition: {
|
|
203
|
+
[key: number]: DestinyFireteamFinderActivitySetDefinition;
|
|
204
|
+
};
|
|
205
|
+
DestinyFireteamFinderLabelDefinition: {
|
|
206
|
+
[key: number]: DestinyFireteamFinderLabelDefinition;
|
|
207
|
+
};
|
|
208
|
+
DestinyFireteamFinderLabelGroupDefinition: {
|
|
209
|
+
[key: number]: DestinyFireteamFinderLabelGroupDefinition;
|
|
210
|
+
};
|
|
211
|
+
DestinyFireteamFinderOptionDefinition: {
|
|
212
|
+
[key: number]: DestinyFireteamFinderOptionDefinition;
|
|
213
|
+
};
|
|
214
|
+
DestinyFireteamFinderOptionGroupDefinition: {
|
|
215
|
+
[key: number]: DestinyFireteamFinderOptionGroupDefinition;
|
|
216
|
+
};
|
|
217
|
+
DestinyIconDefinition: {
|
|
218
|
+
[key: number]: DestinyIconDefinition;
|
|
219
|
+
};
|
|
220
|
+
DestinyStatDefinition: {
|
|
221
|
+
[key: number]: DestinyStatDefinition;
|
|
222
|
+
};
|
|
223
|
+
DestinyInventoryItemDefinition: {
|
|
224
|
+
[key: number]: DestinyInventoryItemDefinition;
|
|
225
|
+
};
|
|
226
|
+
DestinyItemFilterDefinition: {
|
|
227
|
+
[key: number]: DestinyItemFilterDefinition;
|
|
228
|
+
};
|
|
229
|
+
DestinyItemTierTypeDefinition: {
|
|
230
|
+
[key: number]: DestinyItemTierTypeDefinition;
|
|
231
|
+
};
|
|
232
|
+
DestinyLoadoutColorDefinition: {
|
|
233
|
+
[key: number]: DestinyLoadoutColorDefinition;
|
|
234
|
+
};
|
|
235
|
+
DestinyLoadoutIconDefinition: {
|
|
236
|
+
[key: number]: DestinyLoadoutIconDefinition;
|
|
237
|
+
};
|
|
238
|
+
DestinyLoadoutNameDefinition: {
|
|
239
|
+
[key: number]: DestinyLoadoutNameDefinition;
|
|
240
|
+
};
|
|
241
|
+
DestinyLocationDefinition: {
|
|
242
|
+
[key: number]: DestinyLocationDefinition;
|
|
243
|
+
};
|
|
244
|
+
DestinyLoreDefinition: {
|
|
245
|
+
[key: number]: DestinyLoreDefinition;
|
|
246
|
+
};
|
|
247
|
+
DestinyMaterialRequirementSetDefinition: {
|
|
248
|
+
[key: number]: DestinyMaterialRequirementSetDefinition;
|
|
249
|
+
};
|
|
250
|
+
DestinyMetricDefinition: {
|
|
251
|
+
[key: number]: DestinyMetricDefinition;
|
|
252
|
+
};
|
|
253
|
+
DestinyObjectiveDefinition: {
|
|
254
|
+
[key: number]: DestinyObjectiveDefinition;
|
|
255
|
+
};
|
|
256
|
+
DestinySandboxPerkDefinition: {
|
|
257
|
+
[key: number]: DestinySandboxPerkDefinition;
|
|
258
|
+
};
|
|
259
|
+
DestinyPlugSetDefinition: {
|
|
260
|
+
[key: number]: DestinyPlugSetDefinition;
|
|
261
|
+
};
|
|
262
|
+
DestinyPowerCapDefinition: {
|
|
263
|
+
[key: number]: DestinyPowerCapDefinition;
|
|
264
|
+
};
|
|
265
|
+
DestinyPresentationNodeDefinition: {
|
|
266
|
+
[key: number]: DestinyPresentationNodeDefinition;
|
|
267
|
+
};
|
|
268
|
+
DestinyProgressionDefinition: {
|
|
269
|
+
[key: number]: DestinyProgressionDefinition;
|
|
270
|
+
};
|
|
271
|
+
DestinyProgressionLevelRequirementDefinition: {
|
|
272
|
+
[key: number]: DestinyProgressionLevelRequirementDefinition;
|
|
273
|
+
};
|
|
274
|
+
DestinyRecordDefinition: {
|
|
275
|
+
[key: number]: DestinyRecordDefinition;
|
|
276
|
+
};
|
|
277
|
+
DestinySandboxPatternDefinition: {
|
|
278
|
+
[key: number]: DestinySandboxPatternDefinition;
|
|
279
|
+
};
|
|
280
|
+
DestinySeasonDefinition: {
|
|
281
|
+
[key: number]: DestinySeasonDefinition;
|
|
282
|
+
};
|
|
283
|
+
DestinySeasonPassDefinition: {
|
|
284
|
+
[key: number]: DestinySeasonPassDefinition;
|
|
285
|
+
};
|
|
286
|
+
DestinySocialCommendationDefinition: {
|
|
287
|
+
[key: number]: DestinySocialCommendationDefinition;
|
|
288
|
+
};
|
|
289
|
+
DestinySocketCategoryDefinition: {
|
|
290
|
+
[key: number]: DestinySocketCategoryDefinition;
|
|
291
|
+
};
|
|
292
|
+
DestinySocketTypeDefinition: {
|
|
293
|
+
[key: number]: DestinySocketTypeDefinition;
|
|
294
|
+
};
|
|
295
|
+
DestinyTraitDefinition: {
|
|
296
|
+
[key: number]: DestinyTraitDefinition;
|
|
297
|
+
};
|
|
298
|
+
DestinyVendorDefinition: {
|
|
299
|
+
[key: number]: DestinyVendorDefinition;
|
|
300
|
+
};
|
|
301
|
+
DestinyMilestoneDefinition: {
|
|
302
|
+
[key: number]: DestinyMilestoneDefinition;
|
|
303
|
+
};
|
|
304
|
+
DestinyActivityModifierDefinition: {
|
|
305
|
+
[key: number]: DestinyActivityModifierDefinition;
|
|
306
|
+
};
|
|
307
|
+
DestinyReportReasonCategoryDefinition: {
|
|
308
|
+
[key: number]: DestinyReportReasonCategoryDefinition;
|
|
309
|
+
};
|
|
310
|
+
DestinyArtifactDefinition: {
|
|
311
|
+
[key: number]: DestinyArtifactDefinition;
|
|
312
|
+
};
|
|
313
|
+
DestinyBreakerTypeDefinition: {
|
|
314
|
+
[key: number]: DestinyBreakerTypeDefinition;
|
|
315
|
+
};
|
|
316
|
+
DestinyChecklistDefinition: {
|
|
317
|
+
[key: number]: DestinyChecklistDefinition;
|
|
318
|
+
};
|
|
319
|
+
DestinyEnergyTypeDefinition: {
|
|
320
|
+
[key: number]: DestinyEnergyTypeDefinition;
|
|
321
|
+
};
|
|
322
|
+
DestinySocialCommendationNodeDefinition: {
|
|
323
|
+
[key: number]: DestinySocialCommendationNodeDefinition;
|
|
324
|
+
};
|
|
325
|
+
DestinyGuardianRankDefinition: {
|
|
326
|
+
[key: number]: DestinyGuardianRankDefinition;
|
|
327
|
+
};
|
|
328
|
+
DestinyGuardianRankConstantsDefinition: {
|
|
329
|
+
[key: number]: DestinyGuardianRankConstantsDefinition;
|
|
330
|
+
};
|
|
331
|
+
DestinyLoadoutConstantsDefinition: {
|
|
332
|
+
[key: number]: DestinyLoadoutConstantsDefinition;
|
|
333
|
+
};
|
|
334
|
+
DestinyFireteamFinderConstantsDefinition: {
|
|
335
|
+
[key: number]: DestinyFireteamFinderConstantsDefinition;
|
|
336
|
+
};
|
|
337
|
+
DestinyGlobalConstantsDefinition: {
|
|
338
|
+
[key: number]: DestinyGlobalConstantsDefinition;
|
|
339
|
+
};
|
|
340
|
+
DestinyInventoryItemConstantsDefinition: {
|
|
341
|
+
[key: number]: DestinyInventoryItemConstantsDefinition;
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
export type DestinyInventoryItemLiteDefinition = Omit<
|
|
345
|
+
DestinyInventoryItemDefinition,
|
|
346
|
+
| 'iconWatermarkShelved'
|
|
347
|
+
| 'screenshot'
|
|
348
|
+
| 'flavorText'
|
|
349
|
+
| 'tooltipStyle'
|
|
350
|
+
| 'action'
|
|
351
|
+
| 'stats'
|
|
352
|
+
| 'statsEnabledUnlockExpression'
|
|
353
|
+
| 'translationBlock'
|
|
354
|
+
| 'preview'
|
|
355
|
+
| 'sourceData'
|
|
356
|
+
| 'objectives'
|
|
357
|
+
| 'metrics'
|
|
358
|
+
| 'plug'
|
|
359
|
+
| 'gearset'
|
|
360
|
+
| 'sack'
|
|
361
|
+
| 'sockets'
|
|
362
|
+
| 'investmentStats'
|
|
363
|
+
| 'traitIds'
|
|
364
|
+
| 'traitHashes'
|
|
365
|
+
| 'boundToRelease'
|
|
366
|
+
| 'hash'
|
|
367
|
+
| 'index'
|
|
368
|
+
| 'contentIdentifier'
|
|
369
|
+
| 'redacted'
|
|
370
|
+
| 'blacklisted'
|
|
371
|
+
>;
|
|
372
|
+
/**
|
|
373
|
+
* languages the manifest comes in, as their required keys to download them
|
|
374
|
+
*/
|
|
375
|
+
export declare const destinyManifestLanguages: readonly [
|
|
376
|
+
'de',
|
|
377
|
+
'en',
|
|
378
|
+
'es',
|
|
379
|
+
'es-mx',
|
|
380
|
+
'fr',
|
|
381
|
+
'it',
|
|
382
|
+
'ja',
|
|
383
|
+
'ko',
|
|
384
|
+
'pl',
|
|
385
|
+
'pt-br',
|
|
386
|
+
'ru',
|
|
387
|
+
'zh-chs',
|
|
388
|
+
'zh-cht'
|
|
389
|
+
];
|
|
390
|
+
export type DestinyManifestLanguage = (typeof destinyManifestLanguages)[number];
|
|
391
|
+
export type DestinyManifestComponentName = keyof AllDestinyManifestComponents;
|
|
392
|
+
export type DestinyManifestSlice<K extends Readonly<DestinyManifestComponentName[]>> = Pick<
|
|
393
|
+
AllDestinyManifestComponents,
|
|
394
|
+
K[number]
|
|
395
|
+
>;
|
|
396
|
+
/**
|
|
397
|
+
* given a STRING table name, returns that TYPE, so that you can write a function like:
|
|
398
|
+
* func<K extends DestinyManifestComponentName>(arg0:K):DestinyDefinitionFrom<K>{...}
|
|
399
|
+
* i.e.
|
|
400
|
+
* func('DestinyInventoryItemDefinition') will return type DestinyInventoryItemDefinition
|
|
401
|
+
*/
|
|
402
|
+
export type DestinyDefinitionFrom<K extends DestinyManifestComponentName> =
|
|
403
|
+
AllDestinyManifestComponents[K][number];
|
|
404
|
+
export interface GetAllDestinyManifestComponentsParams {
|
|
405
|
+
destinyManifest: DestinyManifest;
|
|
406
|
+
language: DestinyManifestLanguage;
|
|
407
|
+
}
|
|
408
|
+
/** fetches the enormous combined JSON manifest file */
|
|
409
|
+
export declare function getAllDestinyManifestComponents(
|
|
410
|
+
http: HttpClient,
|
|
411
|
+
params: GetAllDestinyManifestComponentsParams
|
|
412
|
+
): Promise<AllDestinyManifestComponents>;
|
|
413
|
+
export interface GetDestinyManifestComponentParams<T extends DestinyManifestComponentName> {
|
|
414
|
+
destinyManifest: DestinyManifest;
|
|
415
|
+
tableName: T;
|
|
416
|
+
language: DestinyManifestLanguage;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* this fetches and returns a single table (Component) from the d2 manifest
|
|
420
|
+
* i.e. DestinyInventoryItemDefinition / DestinyObjectiveDefinition /
|
|
421
|
+
* DestinyVendorDefinition / DestinySeasonDefinition / etc.
|
|
422
|
+
*
|
|
423
|
+
* due to typescript limitations, the table name needs to be recognized by
|
|
424
|
+
* typescript as a const (not mutable between inception and going into the function),
|
|
425
|
+
* so that it considers it a table name and not just a string.
|
|
426
|
+
*
|
|
427
|
+
* this is easy with a string, since
|
|
428
|
+
*
|
|
429
|
+
* `const x = 'thing';` is type `'thing'`, not type `string`,
|
|
430
|
+
*
|
|
431
|
+
* but make sure it's not a `let x =` or a dynamically set string.
|
|
432
|
+
*/
|
|
433
|
+
export declare function getDestinyManifestComponent<T extends DestinyManifestComponentName>(
|
|
434
|
+
http: HttpClient,
|
|
435
|
+
params: GetDestinyManifestComponentParams<T>
|
|
436
|
+
): Promise<AllDestinyManifestComponents[T]>;
|
|
437
|
+
export interface GetDestinyManifestSliceParams<T extends DestinyManifestComponentName[]> {
|
|
438
|
+
destinyManifest: DestinyManifest;
|
|
439
|
+
tableNames: T;
|
|
440
|
+
language: DestinyManifestLanguage;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* this returns a similar structure to getAllDestinyManifestComponents (the big manifest json)
|
|
444
|
+
* but only specific components within. it bundles multiple single tables requests,
|
|
445
|
+
* into a single properly typed object with keys named after manifest components
|
|
446
|
+
*
|
|
447
|
+
* i.e. `{ DestinyInventoryItemDefinition: etc...,
|
|
448
|
+
* DestinyObjectiveDefinition: etc... }`
|
|
449
|
+
*
|
|
450
|
+
* due to typescript limitations, the array of tableNames needs to be recognized by
|
|
451
|
+
* typescript as readonly (not mutable between inception and going into the function),
|
|
452
|
+
* so that it considers them table names and not just strings.
|
|
453
|
+
*
|
|
454
|
+
* like `['DestinyInventoryItemDefinition' as const]`
|
|
455
|
+
*
|
|
456
|
+
* or maybe `['DestinyInventoryItemDefinition'] as const`
|
|
457
|
+
*
|
|
458
|
+
* or just feed in into the function hardcoded like
|
|
459
|
+
*
|
|
460
|
+
* `function(['DestinyInventoryItemDefinition'])`
|
|
461
|
+
*/
|
|
462
|
+
export declare function getDestinyManifestSlice<T extends DestinyManifestComponentName[]>(
|
|
463
|
+
http: HttpClient,
|
|
464
|
+
params: GetDestinyManifestSliceParams<T>
|
|
465
|
+
): Promise<DestinyManifestSlice<T>>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { get } from '../http.js';
|
|
2
|
+
export const destinyManifestLanguages = [
|
|
3
|
+
'de',
|
|
4
|
+
'en',
|
|
5
|
+
'es',
|
|
6
|
+
'es-mx',
|
|
7
|
+
'fr',
|
|
8
|
+
'it',
|
|
9
|
+
'ja',
|
|
10
|
+
'ko',
|
|
11
|
+
'pl',
|
|
12
|
+
'pt-br',
|
|
13
|
+
'ru',
|
|
14
|
+
'zh-chs',
|
|
15
|
+
'zh-cht',
|
|
16
|
+
];
|
|
17
|
+
export function getAllDestinyManifestComponents(http, params) {
|
|
18
|
+
return get(
|
|
19
|
+
http,
|
|
20
|
+
'https://www.bungie.net' + params.destinyManifest.jsonWorldContentPaths[params.language]
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
export async function getDestinyManifestComponent(http, params) {
|
|
24
|
+
const url =
|
|
25
|
+
'https://www.bungie.net' +
|
|
26
|
+
params.destinyManifest.jsonWorldComponentContentPaths[params.language][params.tableName];
|
|
27
|
+
try {
|
|
28
|
+
return await get(http, url);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
try {
|
|
31
|
+
return await get(http, `${url}?retry`);
|
|
32
|
+
} catch {
|
|
33
|
+
throw e;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export async function getDestinyManifestSlice(http, params) {
|
|
38
|
+
const downloadedTables = await Promise.all(
|
|
39
|
+
params.tableNames.map(async (tableName) => {
|
|
40
|
+
const tableContent = await getDestinyManifestComponent(http, {
|
|
41
|
+
destinyManifest: params.destinyManifest,
|
|
42
|
+
tableName,
|
|
43
|
+
language: params.language,
|
|
44
|
+
});
|
|
45
|
+
return {
|
|
46
|
+
tableName,
|
|
47
|
+
tableContent,
|
|
48
|
+
};
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
const manifestSlice = {};
|
|
52
|
+
for (const downloadedTable of downloadedTables) {
|
|
53
|
+
manifestSlice[downloadedTable.tableName] = downloadedTable.tableContent;
|
|
54
|
+
}
|
|
55
|
+
return manifestSlice;
|
|
56
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
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
|
+
import { HttpClient } from '../http.js';
|
|
13
|
+
import {
|
|
14
|
+
FireteamDateRange,
|
|
15
|
+
FireteamPlatform,
|
|
16
|
+
FireteamPublicSearchOption,
|
|
17
|
+
FireteamResponse,
|
|
18
|
+
FireteamSlotSearch,
|
|
19
|
+
SearchResultOfFireteamResponse,
|
|
20
|
+
SearchResultOfFireteamSummary,
|
|
21
|
+
} from './interfaces.js';
|
|
22
|
+
import { ServerResponse } from '../common.js';
|
|
23
|
+
export interface GetActivePrivateClanFireteamCountParams {
|
|
24
|
+
/** The group id of the clan. */
|
|
25
|
+
groupId: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Gets a count of all active non-public fireteams for the specified clan. Maximum
|
|
29
|
+
* value returned is 25.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getActivePrivateClanFireteamCount(
|
|
32
|
+
http: HttpClient,
|
|
33
|
+
params: GetActivePrivateClanFireteamCountParams
|
|
34
|
+
): Promise<ServerResponse<number>>;
|
|
35
|
+
export interface GetAvailableClanFireteamsParams {
|
|
36
|
+
/** The activity type to filter by. */
|
|
37
|
+
activityType: number;
|
|
38
|
+
/** The date range to grab available fireteams. */
|
|
39
|
+
dateRange: FireteamDateRange;
|
|
40
|
+
/**
|
|
41
|
+
* If you wish the result to exclude immediate fireteams, set this to true.
|
|
42
|
+
* Immediate-only can be forced using the dateRange enum.
|
|
43
|
+
*/
|
|
44
|
+
excludeImmediate?: boolean;
|
|
45
|
+
/** The group id of the clan. */
|
|
46
|
+
groupId: string;
|
|
47
|
+
/** An optional language filter. */
|
|
48
|
+
langFilter?: string;
|
|
49
|
+
/** Zero based page */
|
|
50
|
+
page: number;
|
|
51
|
+
/** The platform filter. */
|
|
52
|
+
platform: FireteamPlatform;
|
|
53
|
+
/** Determines public/private filtering. */
|
|
54
|
+
publicOnly: FireteamPublicSearchOption;
|
|
55
|
+
/** Filters based on available slots */
|
|
56
|
+
slotFilter: FireteamSlotSearch;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Gets a listing of all of this clan's fireteams that are have available slots.
|
|
60
|
+
* Caller is not checked for join criteria so caching is maximized.
|
|
61
|
+
*/
|
|
62
|
+
export declare function getAvailableClanFireteams(
|
|
63
|
+
http: HttpClient,
|
|
64
|
+
params: GetAvailableClanFireteamsParams
|
|
65
|
+
): Promise<ServerResponse<SearchResultOfFireteamSummary>>;
|
|
66
|
+
export interface SearchPublicAvailableClanFireteamsParams {
|
|
67
|
+
/** The activity type to filter by. */
|
|
68
|
+
activityType: number;
|
|
69
|
+
/** The date range to grab available fireteams. */
|
|
70
|
+
dateRange: FireteamDateRange;
|
|
71
|
+
/**
|
|
72
|
+
* If you wish the result to exclude immediate fireteams, set this to true.
|
|
73
|
+
* Immediate-only can be forced using the dateRange enum.
|
|
74
|
+
*/
|
|
75
|
+
excludeImmediate?: boolean;
|
|
76
|
+
/** An optional language filter. */
|
|
77
|
+
langFilter?: string;
|
|
78
|
+
/** Zero based page */
|
|
79
|
+
page: number;
|
|
80
|
+
/** The platform filter. */
|
|
81
|
+
platform: FireteamPlatform;
|
|
82
|
+
/** Filters based on available slots */
|
|
83
|
+
slotFilter: FireteamSlotSearch;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Gets a listing of all public fireteams starting now with open slots. Caller is
|
|
87
|
+
* not checked for join criteria so caching is maximized.
|
|
88
|
+
*/
|
|
89
|
+
export declare function searchPublicAvailableClanFireteams(
|
|
90
|
+
http: HttpClient,
|
|
91
|
+
params: SearchPublicAvailableClanFireteamsParams
|
|
92
|
+
): Promise<ServerResponse<SearchResultOfFireteamSummary>>;
|
|
93
|
+
export interface GetMyClanFireteamsParams {
|
|
94
|
+
/**
|
|
95
|
+
* If true, filter by clan. Otherwise, ignore the clan and show all of the user's
|
|
96
|
+
* fireteams.
|
|
97
|
+
*/
|
|
98
|
+
groupFilter?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* The group id of the clan. (This parameter is ignored unless the optional query
|
|
101
|
+
* parameter groupFilter is true).
|
|
102
|
+
*/
|
|
103
|
+
groupId: string;
|
|
104
|
+
/** If true, return fireteams that have been closed. */
|
|
105
|
+
includeClosed: boolean;
|
|
106
|
+
/** An optional language filter. */
|
|
107
|
+
langFilter?: string;
|
|
108
|
+
/** Deprecated parameter, ignored. */
|
|
109
|
+
page: number;
|
|
110
|
+
/** The platform filter. */
|
|
111
|
+
platform: FireteamPlatform;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Gets a listing of all fireteams that caller is an applicant, a member, or an
|
|
115
|
+
* alternate of.
|
|
116
|
+
*/
|
|
117
|
+
export declare function getMyClanFireteams(
|
|
118
|
+
http: HttpClient,
|
|
119
|
+
params: GetMyClanFireteamsParams
|
|
120
|
+
): Promise<ServerResponse<SearchResultOfFireteamResponse>>;
|
|
121
|
+
export interface GetClanFireteamParams {
|
|
122
|
+
/** The unique id of the fireteam. */
|
|
123
|
+
fireteamId: string;
|
|
124
|
+
/** The group id of the clan. */
|
|
125
|
+
groupId: string;
|
|
126
|
+
}
|
|
127
|
+
/** Gets a specific fireteam. */
|
|
128
|
+
export declare function getClanFireteam(
|
|
129
|
+
http: HttpClient,
|
|
130
|
+
params: GetClanFireteamParams
|
|
131
|
+
): Promise<ServerResponse<FireteamResponse>>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { get } from '../http.js';
|
|
2
|
+
const API_BASE = 'https://www.bungie.net/Platform/Fireteam/';
|
|
3
|
+
export function getActivePrivateClanFireteamCount(http, params) {
|
|
4
|
+
return get(http, `${API_BASE}Clan/${params.groupId}/ActiveCount/`);
|
|
5
|
+
}
|
|
6
|
+
export function getAvailableClanFireteams(http, params) {
|
|
7
|
+
const strParams = {};
|
|
8
|
+
if (params.excludeImmediate !== undefined) {
|
|
9
|
+
strParams.excludeImmediate = params.excludeImmediate.toString();
|
|
10
|
+
}
|
|
11
|
+
if (params.langFilter !== undefined) {
|
|
12
|
+
strParams.langFilter = params.langFilter;
|
|
13
|
+
}
|
|
14
|
+
return get(
|
|
15
|
+
http,
|
|
16
|
+
`${API_BASE}Clan/${params.groupId}/Available/${params.platform}/${params.activityType}/${params.dateRange}/${params.slotFilter}/${params.publicOnly}/${params.page}/`,
|
|
17
|
+
strParams
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export function searchPublicAvailableClanFireteams(http, params) {
|
|
21
|
+
const strParams = {};
|
|
22
|
+
if (params.excludeImmediate !== undefined) {
|
|
23
|
+
strParams.excludeImmediate = params.excludeImmediate.toString();
|
|
24
|
+
}
|
|
25
|
+
if (params.langFilter !== undefined) {
|
|
26
|
+
strParams.langFilter = params.langFilter;
|
|
27
|
+
}
|
|
28
|
+
return get(
|
|
29
|
+
http,
|
|
30
|
+
`${API_BASE}Search/Available/${params.platform}/${params.activityType}/${params.dateRange}/${params.slotFilter}/${params.page}/`,
|
|
31
|
+
strParams
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
export function getMyClanFireteams(http, params) {
|
|
35
|
+
const strParams = {};
|
|
36
|
+
if (params.groupFilter !== undefined) {
|
|
37
|
+
strParams.groupFilter = params.groupFilter.toString();
|
|
38
|
+
}
|
|
39
|
+
if (params.langFilter !== undefined) {
|
|
40
|
+
strParams.langFilter = params.langFilter;
|
|
41
|
+
}
|
|
42
|
+
return get(
|
|
43
|
+
http,
|
|
44
|
+
`${API_BASE}Clan/${params.groupId}/My/${params.platform}/${params.includeClosed}/${params.page}/`,
|
|
45
|
+
strParams
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
export function getClanFireteam(http, params) {
|
|
49
|
+
return get(http, `${API_BASE}Clan/${params.groupId}/Summary/${params.fireteamId}/`);
|
|
50
|
+
}
|