@taskeren/bungie-api-ts 5.10.1 → 5.10.3

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 (163) hide show
  1. package/{lib/app → app}/interfaces.d.ts +20 -17
  2. package/{lib/app → app}/interfaces.js +3 -3
  3. package/common.d.ts +981 -0
  4. package/{lib/common.js → common.js} +2 -2
  5. package/{lib/content → content}/interfaces.d.ts +19 -17
  6. package/{lib/content → content}/interfaces.js +1 -1
  7. package/{lib/core → core}/interfaces.d.ts +12 -10
  8. package/{lib/core → core}/interfaces.js +2 -2
  9. package/{lib/destiny2 → destiny2}/interfaces.d.ts +1170 -1003
  10. package/{lib/destiny2 → destiny2}/interfaces.js +109 -102
  11. package/{lib/fireteam → fireteam}/interfaces.d.ts +40 -33
  12. package/{lib/fireteam → fireteam}/interfaces.js +5 -5
  13. package/{lib/forum → forum}/interfaces.d.ts +75 -61
  14. package/{lib/forum → forum}/interfaces.js +9 -9
  15. package/{lib/groupv2 → groupv2}/interfaces.d.ts +122 -100
  16. package/{lib/groupv2 → groupv2}/interfaces.js +16 -16
  17. package/package.json +66 -27
  18. package/{lib/platform.d.ts → platform.d.ts} +10 -9
  19. package/{lib/platform.js → platform.js} +1 -1
  20. package/{lib/social → social}/interfaces.d.ts +28 -22
  21. package/{lib/social → social}/interfaces.js +4 -4
  22. package/{lib/tokens → tokens}/interfaces.d.ts +6 -5
  23. package/{lib/tokens → tokens}/interfaces.js +1 -1
  24. package/{lib/trending → trending}/interfaces.d.ts +15 -14
  25. package/{lib/trending → trending}/interfaces.js +1 -1
  26. package/{lib/user → user}/interfaces.d.ts +30 -28
  27. package/{lib/user → user}/interfaces.js +2 -2
  28. package/.babelrc +0 -4
  29. package/.gitattributes +0 -2
  30. package/.github/workflows/pr-build.yml +0 -50
  31. package/.github/workflows/publish.yml +0 -48
  32. package/.github/workflows/update.yml +0 -55
  33. package/.gitmodules +0 -3
  34. package/.nvmrc +0 -1
  35. package/.prettierrc +0 -10
  36. package/.vscode/extensions.json +0 -8
  37. package/.vscode/settings.json +0 -7
  38. package/LICENSE.md +0 -21
  39. package/api-src/.github/workflows/close-inactive.yml +0 -24
  40. package/api-src/CHANGELOG.md +0 -271
  41. package/api-src/CONTRIBUTING.md +0 -19
  42. package/api-src/LICENSE +0 -28
  43. package/api-src/README.md +0 -378
  44. package/api-src/openapi-2.json +0 -44518
  45. package/api-src/openapi.json +0 -46467
  46. package/build.sh +0 -30
  47. package/generated-src/app/api.ts +0 -50
  48. package/generated-src/app/index.ts +0 -17
  49. package/generated-src/app/interfaces.ts +0 -119
  50. package/generated-src/common.ts +0 -985
  51. package/generated-src/communitycontent/api.ts +0 -36
  52. package/generated-src/communitycontent/index.ts +0 -16
  53. package/generated-src/content/api.ts +0 -142
  54. package/generated-src/content/index.ts +0 -17
  55. package/generated-src/content/interfaces.ts +0 -225
  56. package/generated-src/core/api.ts +0 -57
  57. package/generated-src/core/index.ts +0 -17
  58. package/generated-src/core/interfaces.ts +0 -151
  59. package/generated-src/destiny2/api.ts +0 -821
  60. package/generated-src/destiny2/index.ts +0 -17
  61. package/generated-src/destiny2/interfaces.ts +0 -15714
  62. package/generated-src/destiny2/manifest.ts +0 -341
  63. package/generated-src/fireteam/api.ts +0 -151
  64. package/generated-src/fireteam/index.ts +0 -17
  65. package/generated-src/fireteam/interfaces.ts +0 -183
  66. package/generated-src/forum/api.ts +0 -197
  67. package/generated-src/forum/index.ts +0 -17
  68. package/generated-src/forum/interfaces.ts +0 -171
  69. package/generated-src/groupv2/api.ts +0 -515
  70. package/generated-src/groupv2/index.ts +0 -17
  71. package/generated-src/groupv2/interfaces.ts +0 -773
  72. package/generated-src/http.ts +0 -52
  73. package/generated-src/index.ts +0 -37
  74. package/generated-src/package.json.notyet +0 -99
  75. package/generated-src/platform.ts +0 -39
  76. package/generated-src/social/api.ts +0 -115
  77. package/generated-src/social/index.ts +0 -17
  78. package/generated-src/social/interfaces.ts +0 -89
  79. package/generated-src/tokens/api.ts +0 -126
  80. package/generated-src/tokens/index.ts +0 -17
  81. package/generated-src/tokens/interfaces.ts +0 -102
  82. package/generated-src/trending/api.ts +0 -62
  83. package/generated-src/trending/index.ts +0 -17
  84. package/generated-src/trending/interfaces.ts +0 -188
  85. package/generated-src/user/api.ts +0 -130
  86. package/generated-src/user/index.ts +0 -17
  87. package/generated-src/user/interfaces.ts +0 -338
  88. package/generator/generate-api.ts +0 -254
  89. package/generator/generate-common.ts +0 -123
  90. package/generator/generate-index.ts +0 -45
  91. package/generator/generate-interfaces.ts +0 -173
  92. package/generator/generate-manifest.ts +0 -217
  93. package/generator/generate-package-json.ts +0 -45
  94. package/generator/generate.ts +0 -54
  95. package/generator/http.ts +0 -52
  96. package/generator/missing-props.ts +0 -11
  97. package/generator/type-index.ts +0 -184
  98. package/generator/util.ts +0 -131
  99. package/lib/README.md +0 -97
  100. package/lib/bungie-api-LICENSE +0 -29
  101. package/lib/common.d.ts +0 -979
  102. package/lib/package.json +0 -99
  103. package/test-consumer.ts +0 -5
  104. package/tests/__snapshots__/config-builders.test.ts.snap +0 -343
  105. package/tests/config-builders.test.ts +0 -145
  106. package/tests/manifest-fetcher.test.ts +0 -43
  107. package/tests/test-manifest.js +0 -69
  108. package/tsconfig-package.json +0 -14
  109. package/tsconfig.json +0 -17
  110. /package/{lib/app → app}/api.d.ts +0 -0
  111. /package/{lib/app → app}/api.js +0 -0
  112. /package/{lib/app → app}/index.d.ts +0 -0
  113. /package/{lib/app → app}/index.js +0 -0
  114. /package/{lib/communitycontent → communitycontent}/api.d.ts +0 -0
  115. /package/{lib/communitycontent → communitycontent}/api.js +0 -0
  116. /package/{lib/communitycontent → communitycontent}/index.d.ts +0 -0
  117. /package/{lib/communitycontent → communitycontent}/index.js +0 -0
  118. /package/{lib/content → content}/api.d.ts +0 -0
  119. /package/{lib/content → content}/api.js +0 -0
  120. /package/{lib/content → content}/index.d.ts +0 -0
  121. /package/{lib/content → content}/index.js +0 -0
  122. /package/{lib/core → core}/api.d.ts +0 -0
  123. /package/{lib/core → core}/api.js +0 -0
  124. /package/{lib/core → core}/index.d.ts +0 -0
  125. /package/{lib/core → core}/index.js +0 -0
  126. /package/{lib/destiny2 → destiny2}/api.d.ts +0 -0
  127. /package/{lib/destiny2 → destiny2}/api.js +0 -0
  128. /package/{lib/destiny2 → destiny2}/index.d.ts +0 -0
  129. /package/{lib/destiny2 → destiny2}/index.js +0 -0
  130. /package/{lib/destiny2 → destiny2}/manifest.d.ts +0 -0
  131. /package/{lib/destiny2 → destiny2}/manifest.js +0 -0
  132. /package/{lib/fireteam → fireteam}/api.d.ts +0 -0
  133. /package/{lib/fireteam → fireteam}/api.js +0 -0
  134. /package/{lib/fireteam → fireteam}/index.d.ts +0 -0
  135. /package/{lib/fireteam → fireteam}/index.js +0 -0
  136. /package/{lib/forum → forum}/api.d.ts +0 -0
  137. /package/{lib/forum → forum}/api.js +0 -0
  138. /package/{lib/forum → forum}/index.d.ts +0 -0
  139. /package/{lib/forum → forum}/index.js +0 -0
  140. /package/{lib/groupv2 → groupv2}/api.d.ts +0 -0
  141. /package/{lib/groupv2 → groupv2}/api.js +0 -0
  142. /package/{lib/groupv2 → groupv2}/index.d.ts +0 -0
  143. /package/{lib/groupv2 → groupv2}/index.js +0 -0
  144. /package/{lib/http.d.ts → http.d.ts} +0 -0
  145. /package/{lib/http.js → http.js} +0 -0
  146. /package/{lib/index.d.ts → index.d.ts} +0 -0
  147. /package/{lib/index.js → index.js} +0 -0
  148. /package/{lib/social → social}/api.d.ts +0 -0
  149. /package/{lib/social → social}/api.js +0 -0
  150. /package/{lib/social → social}/index.d.ts +0 -0
  151. /package/{lib/social → social}/index.js +0 -0
  152. /package/{lib/tokens → tokens}/api.d.ts +0 -0
  153. /package/{lib/tokens → tokens}/api.js +0 -0
  154. /package/{lib/tokens → tokens}/index.d.ts +0 -0
  155. /package/{lib/tokens → tokens}/index.js +0 -0
  156. /package/{lib/trending → trending}/api.d.ts +0 -0
  157. /package/{lib/trending → trending}/api.js +0 -0
  158. /package/{lib/trending → trending}/index.d.ts +0 -0
  159. /package/{lib/trending → trending}/index.js +0 -0
  160. /package/{lib/user → user}/api.d.ts +0 -0
  161. /package/{lib/user → user}/api.js +0 -0
  162. /package/{lib/user → user}/index.d.ts +0 -0
  163. /package/{lib/user → user}/index.js +0 -0
@@ -1,69 +0,0 @@
1
- import { getDestinyManifest } from '../lib/destiny2/index.js';
2
- import { getDestinyManifestSlice } from '../lib/destiny2/manifest.js';
3
- async function httpClient(config) {
4
- return fetch(config.url, config)
5
- .then((res) => res.json())
6
- .catch((e) => {
7
- console.log('DESTINY API ERROR');
8
- console.log('probably about to fail a promise here. sorry.');
9
- console.log(console.log(e));
10
- });
11
- }
12
- (async () => {
13
- var _a, _b, _c, _d, _e;
14
- const manifestMeta = (await getDestinyManifest(httpClient)).Response;
15
- // const manifestTable = await getDestinyManifestComponent(httpClient, {
16
- // destinyManifest: manifestMeta,
17
- // tableName: 'DestinyInventoryItemDefinition',
18
- // language: 'en',
19
- // });
20
- const partialManifest = await getDestinyManifestSlice(httpClient, {
21
- destinyManifest: manifestMeta,
22
- tableNames: ['DestinyInventoryItemDefinition', 'DestinyLocationDefinition'],
23
- language: 'en',
24
- });
25
- const items = partialManifest.DestinyInventoryItemDefinition;
26
- const locations = partialManifest.DestinyLocationDefinition;
27
- // grab a gun we know
28
- const betterDevils =
29
- (_c =
30
- (_b = (_a = items[1048266744]) !== null && _a !== void 0 ? _a : items[153979397]) !== null &&
31
- _b !== void 0
32
- ? _b
33
- : Object.values(items).find((i) => {
34
- var _a, _b;
35
- return (
36
- ((_b = (_a = i.displayProperties) === null || _a === void 0 ? void 0 : _a.name) ===
37
- null || _b === void 0
38
- ? void 0
39
- : _b.toLowerCase()) === 'better devils'
40
- );
41
- })) !== null && _c !== void 0
42
- ? _c
43
- : {};
44
- // ensure it has attributes we expect and not attributes from another table
45
- const betterDevilsTests =
46
- betterDevils.itemTypeAndTierDisplayName !== undefined &&
47
- betterDevils.inventory &&
48
- betterDevils.damageTypeHashes &&
49
- betterDevils.itemCategoryHashes &&
50
- !betterDevils.vendorHash &&
51
- !betterDevils.locationReleases;
52
- const exampleLocation =
53
- (_e =
54
- (_d = locations[337241121]) !== null && _d !== void 0 ? _d : Object.values(locations)[0]) !==
55
- null && _e !== void 0
56
- ? _e
57
- : {};
58
- const locationTests =
59
- exampleLocation.vendorHash !== undefined &&
60
- exampleLocation.hash !== undefined &&
61
- exampleLocation.locationReleases &&
62
- !exampleLocation.itemTypeAndTierDisplayName &&
63
- !exampleLocation.damageTypeHashes;
64
- if (!betterDevilsTests || !locationTests) {
65
- !betterDevilsTests && console.log('betterDevilsTests failed. unexpected data:', betterDevils);
66
- !locationTests && console.log('locationTests failed. unexpected data:', exampleLocation);
67
- process.exit(1);
68
- } else console.log('tests passed'); // manifest downloader worked and expected attributes were present
69
- })();
@@ -1,14 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "./lib/",
4
- "sourceMap": false,
5
- "strictNullChecks": true,
6
- "module": "ES2015",
7
- "target": "es5",
8
- "moduleResolution": "bundler",
9
- "declaration": true,
10
- "emitDeclarationOnly": true,
11
- "esModuleInterop": true
12
- },
13
- "include": ["./generated-src/**/*"]
14
- }
package/tsconfig.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "rootDir": "./generator",
4
- "outDir": "./build/",
5
- "sourceMap": true,
6
- "strictNullChecks": true,
7
- "strict": true,
8
- "module": "NodeNext",
9
- "target": "ESNext",
10
- "moduleResolution": "NodeNext",
11
- "esModuleInterop": true,
12
- "resolveJsonModule": true,
13
- "allowJs": true,
14
- "preserveConstEnums": true
15
- },
16
- "include": ["./generator/**/*"]
17
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes