@taskeren/bungie-api-ts 5.10.0 → 5.10.2

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.
Files changed (162) hide show
  1. package/package.json +66 -27
  2. package/.babelrc +0 -4
  3. package/.gitattributes +0 -2
  4. package/.github/workflows/pr-build.yml +0 -50
  5. package/.github/workflows/publish.yml +0 -48
  6. package/.github/workflows/update.yml +0 -55
  7. package/.gitmodules +0 -3
  8. package/.nvmrc +0 -1
  9. package/.prettierrc +0 -10
  10. package/.vscode/extensions.json +0 -8
  11. package/.vscode/settings.json +0 -7
  12. package/LICENSE.md +0 -21
  13. package/api-src/.github/workflows/close-inactive.yml +0 -24
  14. package/api-src/CHANGELOG.md +0 -271
  15. package/api-src/CONTRIBUTING.md +0 -19
  16. package/api-src/LICENSE +0 -28
  17. package/api-src/README.md +0 -378
  18. package/api-src/openapi-2.json +0 -44518
  19. package/api-src/openapi.json +0 -46467
  20. package/build.sh +0 -30
  21. package/generated-src/app/api.ts +0 -50
  22. package/generated-src/app/index.ts +0 -17
  23. package/generated-src/app/interfaces.ts +0 -119
  24. package/generated-src/common.ts +0 -985
  25. package/generated-src/communitycontent/api.ts +0 -36
  26. package/generated-src/communitycontent/index.ts +0 -16
  27. package/generated-src/content/api.ts +0 -142
  28. package/generated-src/content/index.ts +0 -17
  29. package/generated-src/content/interfaces.ts +0 -225
  30. package/generated-src/core/api.ts +0 -57
  31. package/generated-src/core/index.ts +0 -17
  32. package/generated-src/core/interfaces.ts +0 -151
  33. package/generated-src/destiny2/api.ts +0 -821
  34. package/generated-src/destiny2/index.ts +0 -17
  35. package/generated-src/destiny2/interfaces.ts +0 -15714
  36. package/generated-src/destiny2/manifest.ts +0 -341
  37. package/generated-src/fireteam/api.ts +0 -151
  38. package/generated-src/fireteam/index.ts +0 -17
  39. package/generated-src/fireteam/interfaces.ts +0 -183
  40. package/generated-src/forum/api.ts +0 -197
  41. package/generated-src/forum/index.ts +0 -17
  42. package/generated-src/forum/interfaces.ts +0 -171
  43. package/generated-src/groupv2/api.ts +0 -515
  44. package/generated-src/groupv2/index.ts +0 -17
  45. package/generated-src/groupv2/interfaces.ts +0 -773
  46. package/generated-src/http.ts +0 -52
  47. package/generated-src/index.ts +0 -37
  48. package/generated-src/package.json.notyet +0 -99
  49. package/generated-src/platform.ts +0 -39
  50. package/generated-src/social/api.ts +0 -115
  51. package/generated-src/social/index.ts +0 -17
  52. package/generated-src/social/interfaces.ts +0 -89
  53. package/generated-src/tokens/api.ts +0 -126
  54. package/generated-src/tokens/index.ts +0 -17
  55. package/generated-src/tokens/interfaces.ts +0 -102
  56. package/generated-src/trending/api.ts +0 -62
  57. package/generated-src/trending/index.ts +0 -17
  58. package/generated-src/trending/interfaces.ts +0 -188
  59. package/generated-src/user/api.ts +0 -130
  60. package/generated-src/user/index.ts +0 -17
  61. package/generated-src/user/interfaces.ts +0 -338
  62. package/generator/generate-api.ts +0 -254
  63. package/generator/generate-common.ts +0 -123
  64. package/generator/generate-index.ts +0 -45
  65. package/generator/generate-interfaces.ts +0 -173
  66. package/generator/generate-manifest.ts +0 -217
  67. package/generator/generate-package-json.ts +0 -45
  68. package/generator/generate.ts +0 -54
  69. package/generator/http.ts +0 -52
  70. package/generator/missing-props.ts +0 -11
  71. package/generator/type-index.ts +0 -184
  72. package/generator/util.ts +0 -131
  73. package/lib/README.md +0 -97
  74. package/lib/bungie-api-LICENSE +0 -29
  75. package/lib/package.json +0 -99
  76. package/test-consumer.ts +0 -5
  77. package/tests/__snapshots__/config-builders.test.ts.snap +0 -343
  78. package/tests/config-builders.test.ts +0 -145
  79. package/tests/manifest-fetcher.test.ts +0 -43
  80. package/tests/test-manifest.js +0 -69
  81. package/tsconfig-package.json +0 -14
  82. package/tsconfig.json +0 -17
  83. /package/{lib/app → app}/api.d.ts +0 -0
  84. /package/{lib/app → app}/api.js +0 -0
  85. /package/{lib/app → app}/index.d.ts +0 -0
  86. /package/{lib/app → app}/index.js +0 -0
  87. /package/{lib/app → app}/interfaces.d.ts +0 -0
  88. /package/{lib/app → app}/interfaces.js +0 -0
  89. /package/{lib/common.d.ts → common.d.ts} +0 -0
  90. /package/{lib/common.js → common.js} +0 -0
  91. /package/{lib/communitycontent → communitycontent}/api.d.ts +0 -0
  92. /package/{lib/communitycontent → communitycontent}/api.js +0 -0
  93. /package/{lib/communitycontent → communitycontent}/index.d.ts +0 -0
  94. /package/{lib/communitycontent → communitycontent}/index.js +0 -0
  95. /package/{lib/content → content}/api.d.ts +0 -0
  96. /package/{lib/content → content}/api.js +0 -0
  97. /package/{lib/content → content}/index.d.ts +0 -0
  98. /package/{lib/content → content}/index.js +0 -0
  99. /package/{lib/content → content}/interfaces.d.ts +0 -0
  100. /package/{lib/content → content}/interfaces.js +0 -0
  101. /package/{lib/core → core}/api.d.ts +0 -0
  102. /package/{lib/core → core}/api.js +0 -0
  103. /package/{lib/core → core}/index.d.ts +0 -0
  104. /package/{lib/core → core}/index.js +0 -0
  105. /package/{lib/core → core}/interfaces.d.ts +0 -0
  106. /package/{lib/core → core}/interfaces.js +0 -0
  107. /package/{lib/destiny2 → destiny2}/api.d.ts +0 -0
  108. /package/{lib/destiny2 → destiny2}/api.js +0 -0
  109. /package/{lib/destiny2 → destiny2}/index.d.ts +0 -0
  110. /package/{lib/destiny2 → destiny2}/index.js +0 -0
  111. /package/{lib/destiny2 → destiny2}/interfaces.d.ts +0 -0
  112. /package/{lib/destiny2 → destiny2}/interfaces.js +0 -0
  113. /package/{lib/destiny2 → destiny2}/manifest.d.ts +0 -0
  114. /package/{lib/destiny2 → destiny2}/manifest.js +0 -0
  115. /package/{lib/fireteam → fireteam}/api.d.ts +0 -0
  116. /package/{lib/fireteam → fireteam}/api.js +0 -0
  117. /package/{lib/fireteam → fireteam}/index.d.ts +0 -0
  118. /package/{lib/fireteam → fireteam}/index.js +0 -0
  119. /package/{lib/fireteam → fireteam}/interfaces.d.ts +0 -0
  120. /package/{lib/fireteam → fireteam}/interfaces.js +0 -0
  121. /package/{lib/forum → forum}/api.d.ts +0 -0
  122. /package/{lib/forum → forum}/api.js +0 -0
  123. /package/{lib/forum → forum}/index.d.ts +0 -0
  124. /package/{lib/forum → forum}/index.js +0 -0
  125. /package/{lib/forum → forum}/interfaces.d.ts +0 -0
  126. /package/{lib/forum → forum}/interfaces.js +0 -0
  127. /package/{lib/groupv2 → groupv2}/api.d.ts +0 -0
  128. /package/{lib/groupv2 → groupv2}/api.js +0 -0
  129. /package/{lib/groupv2 → groupv2}/index.d.ts +0 -0
  130. /package/{lib/groupv2 → groupv2}/index.js +0 -0
  131. /package/{lib/groupv2 → groupv2}/interfaces.d.ts +0 -0
  132. /package/{lib/groupv2 → groupv2}/interfaces.js +0 -0
  133. /package/{lib/http.d.ts → http.d.ts} +0 -0
  134. /package/{lib/http.js → http.js} +0 -0
  135. /package/{lib/index.d.ts → index.d.ts} +0 -0
  136. /package/{lib/index.js → index.js} +0 -0
  137. /package/{lib/platform.d.ts → platform.d.ts} +0 -0
  138. /package/{lib/platform.js → platform.js} +0 -0
  139. /package/{lib/social → social}/api.d.ts +0 -0
  140. /package/{lib/social → social}/api.js +0 -0
  141. /package/{lib/social → social}/index.d.ts +0 -0
  142. /package/{lib/social → social}/index.js +0 -0
  143. /package/{lib/social → social}/interfaces.d.ts +0 -0
  144. /package/{lib/social → social}/interfaces.js +0 -0
  145. /package/{lib/tokens → tokens}/api.d.ts +0 -0
  146. /package/{lib/tokens → tokens}/api.js +0 -0
  147. /package/{lib/tokens → tokens}/index.d.ts +0 -0
  148. /package/{lib/tokens → tokens}/index.js +0 -0
  149. /package/{lib/tokens → tokens}/interfaces.d.ts +0 -0
  150. /package/{lib/tokens → tokens}/interfaces.js +0 -0
  151. /package/{lib/trending → trending}/api.d.ts +0 -0
  152. /package/{lib/trending → trending}/api.js +0 -0
  153. /package/{lib/trending → trending}/index.d.ts +0 -0
  154. /package/{lib/trending → trending}/index.js +0 -0
  155. /package/{lib/trending → trending}/interfaces.d.ts +0 -0
  156. /package/{lib/trending → trending}/interfaces.js +0 -0
  157. /package/{lib/user → user}/api.d.ts +0 -0
  158. /package/{lib/user → user}/api.js +0 -0
  159. /package/{lib/user → user}/index.d.ts +0 -0
  160. /package/{lib/user → user}/index.js +0 -0
  161. /package/{lib/user → user}/interfaces.d.ts +0 -0
  162. /package/{lib/user → user}/interfaces.js +0 -0
@@ -1,341 +0,0 @@
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
-
@@ -1,151 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
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';
@@ -1,183 +0,0 @@
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
- }