@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.
- package/{lib/app → app}/interfaces.d.ts +20 -17
- package/{lib/app → app}/interfaces.js +3 -3
- package/common.d.ts +981 -0
- package/{lib/common.js → common.js} +2 -2
- package/{lib/content → content}/interfaces.d.ts +19 -17
- package/{lib/content → content}/interfaces.js +1 -1
- package/{lib/core → core}/interfaces.d.ts +12 -10
- package/{lib/core → core}/interfaces.js +2 -2
- package/{lib/destiny2 → destiny2}/interfaces.d.ts +1170 -1003
- package/{lib/destiny2 → destiny2}/interfaces.js +109 -102
- package/{lib/fireteam → fireteam}/interfaces.d.ts +40 -33
- package/{lib/fireteam → fireteam}/interfaces.js +5 -5
- package/{lib/forum → forum}/interfaces.d.ts +75 -61
- package/{lib/forum → forum}/interfaces.js +9 -9
- package/{lib/groupv2 → groupv2}/interfaces.d.ts +122 -100
- package/{lib/groupv2 → groupv2}/interfaces.js +16 -16
- package/package.json +66 -27
- package/{lib/platform.d.ts → platform.d.ts} +10 -9
- package/{lib/platform.js → platform.js} +1 -1
- package/{lib/social → social}/interfaces.d.ts +28 -22
- package/{lib/social → social}/interfaces.js +4 -4
- package/{lib/tokens → tokens}/interfaces.d.ts +6 -5
- package/{lib/tokens → tokens}/interfaces.js +1 -1
- package/{lib/trending → trending}/interfaces.d.ts +15 -14
- package/{lib/trending → trending}/interfaces.js +1 -1
- package/{lib/user → user}/interfaces.d.ts +30 -28
- package/{lib/user → user}/interfaces.js +2 -2
- package/.babelrc +0 -4
- package/.gitattributes +0 -2
- package/.github/workflows/pr-build.yml +0 -50
- package/.github/workflows/publish.yml +0 -48
- package/.github/workflows/update.yml +0 -55
- package/.gitmodules +0 -3
- package/.nvmrc +0 -1
- package/.prettierrc +0 -10
- package/.vscode/extensions.json +0 -8
- package/.vscode/settings.json +0 -7
- package/LICENSE.md +0 -21
- package/api-src/.github/workflows/close-inactive.yml +0 -24
- package/api-src/CHANGELOG.md +0 -271
- package/api-src/CONTRIBUTING.md +0 -19
- package/api-src/LICENSE +0 -28
- package/api-src/README.md +0 -378
- package/api-src/openapi-2.json +0 -44518
- package/api-src/openapi.json +0 -46467
- package/build.sh +0 -30
- package/generated-src/app/api.ts +0 -50
- package/generated-src/app/index.ts +0 -17
- package/generated-src/app/interfaces.ts +0 -119
- package/generated-src/common.ts +0 -985
- package/generated-src/communitycontent/api.ts +0 -36
- package/generated-src/communitycontent/index.ts +0 -16
- package/generated-src/content/api.ts +0 -142
- package/generated-src/content/index.ts +0 -17
- package/generated-src/content/interfaces.ts +0 -225
- package/generated-src/core/api.ts +0 -57
- package/generated-src/core/index.ts +0 -17
- package/generated-src/core/interfaces.ts +0 -151
- package/generated-src/destiny2/api.ts +0 -821
- package/generated-src/destiny2/index.ts +0 -17
- package/generated-src/destiny2/interfaces.ts +0 -15714
- package/generated-src/destiny2/manifest.ts +0 -341
- package/generated-src/fireteam/api.ts +0 -151
- package/generated-src/fireteam/index.ts +0 -17
- package/generated-src/fireteam/interfaces.ts +0 -183
- package/generated-src/forum/api.ts +0 -197
- package/generated-src/forum/index.ts +0 -17
- package/generated-src/forum/interfaces.ts +0 -171
- package/generated-src/groupv2/api.ts +0 -515
- package/generated-src/groupv2/index.ts +0 -17
- package/generated-src/groupv2/interfaces.ts +0 -773
- package/generated-src/http.ts +0 -52
- package/generated-src/index.ts +0 -37
- package/generated-src/package.json.notyet +0 -99
- package/generated-src/platform.ts +0 -39
- package/generated-src/social/api.ts +0 -115
- package/generated-src/social/index.ts +0 -17
- package/generated-src/social/interfaces.ts +0 -89
- package/generated-src/tokens/api.ts +0 -126
- package/generated-src/tokens/index.ts +0 -17
- package/generated-src/tokens/interfaces.ts +0 -102
- package/generated-src/trending/api.ts +0 -62
- package/generated-src/trending/index.ts +0 -17
- package/generated-src/trending/interfaces.ts +0 -188
- package/generated-src/user/api.ts +0 -130
- package/generated-src/user/index.ts +0 -17
- package/generated-src/user/interfaces.ts +0 -338
- package/generator/generate-api.ts +0 -254
- package/generator/generate-common.ts +0 -123
- package/generator/generate-index.ts +0 -45
- package/generator/generate-interfaces.ts +0 -173
- package/generator/generate-manifest.ts +0 -217
- package/generator/generate-package-json.ts +0 -45
- package/generator/generate.ts +0 -54
- package/generator/http.ts +0 -52
- package/generator/missing-props.ts +0 -11
- package/generator/type-index.ts +0 -184
- package/generator/util.ts +0 -131
- package/lib/README.md +0 -97
- package/lib/bungie-api-LICENSE +0 -29
- package/lib/common.d.ts +0 -979
- package/lib/package.json +0 -99
- package/test-consumer.ts +0 -5
- package/tests/__snapshots__/config-builders.test.ts.snap +0 -343
- package/tests/config-builders.test.ts +0 -145
- package/tests/manifest-fetcher.test.ts +0 -43
- package/tests/test-manifest.js +0 -69
- package/tsconfig-package.json +0 -14
- package/tsconfig.json +0 -17
- /package/{lib/app → app}/api.d.ts +0 -0
- /package/{lib/app → app}/api.js +0 -0
- /package/{lib/app → app}/index.d.ts +0 -0
- /package/{lib/app → app}/index.js +0 -0
- /package/{lib/communitycontent → communitycontent}/api.d.ts +0 -0
- /package/{lib/communitycontent → communitycontent}/api.js +0 -0
- /package/{lib/communitycontent → communitycontent}/index.d.ts +0 -0
- /package/{lib/communitycontent → communitycontent}/index.js +0 -0
- /package/{lib/content → content}/api.d.ts +0 -0
- /package/{lib/content → content}/api.js +0 -0
- /package/{lib/content → content}/index.d.ts +0 -0
- /package/{lib/content → content}/index.js +0 -0
- /package/{lib/core → core}/api.d.ts +0 -0
- /package/{lib/core → core}/api.js +0 -0
- /package/{lib/core → core}/index.d.ts +0 -0
- /package/{lib/core → core}/index.js +0 -0
- /package/{lib/destiny2 → destiny2}/api.d.ts +0 -0
- /package/{lib/destiny2 → destiny2}/api.js +0 -0
- /package/{lib/destiny2 → destiny2}/index.d.ts +0 -0
- /package/{lib/destiny2 → destiny2}/index.js +0 -0
- /package/{lib/destiny2 → destiny2}/manifest.d.ts +0 -0
- /package/{lib/destiny2 → destiny2}/manifest.js +0 -0
- /package/{lib/fireteam → fireteam}/api.d.ts +0 -0
- /package/{lib/fireteam → fireteam}/api.js +0 -0
- /package/{lib/fireteam → fireteam}/index.d.ts +0 -0
- /package/{lib/fireteam → fireteam}/index.js +0 -0
- /package/{lib/forum → forum}/api.d.ts +0 -0
- /package/{lib/forum → forum}/api.js +0 -0
- /package/{lib/forum → forum}/index.d.ts +0 -0
- /package/{lib/forum → forum}/index.js +0 -0
- /package/{lib/groupv2 → groupv2}/api.d.ts +0 -0
- /package/{lib/groupv2 → groupv2}/api.js +0 -0
- /package/{lib/groupv2 → groupv2}/index.d.ts +0 -0
- /package/{lib/groupv2 → groupv2}/index.js +0 -0
- /package/{lib/http.d.ts → http.d.ts} +0 -0
- /package/{lib/http.js → http.js} +0 -0
- /package/{lib/index.d.ts → index.d.ts} +0 -0
- /package/{lib/index.js → index.js} +0 -0
- /package/{lib/social → social}/api.d.ts +0 -0
- /package/{lib/social → social}/api.js +0 -0
- /package/{lib/social → social}/index.d.ts +0 -0
- /package/{lib/social → social}/index.js +0 -0
- /package/{lib/tokens → tokens}/api.d.ts +0 -0
- /package/{lib/tokens → tokens}/api.js +0 -0
- /package/{lib/tokens → tokens}/index.d.ts +0 -0
- /package/{lib/tokens → tokens}/index.js +0 -0
- /package/{lib/trending → trending}/api.d.ts +0 -0
- /package/{lib/trending → trending}/api.js +0 -0
- /package/{lib/trending → trending}/index.d.ts +0 -0
- /package/{lib/trending → trending}/index.js +0 -0
- /package/{lib/user → user}/api.d.ts +0 -0
- /package/{lib/user → user}/api.js +0 -0
- /package/{lib/user → user}/index.d.ts +0 -0
- /package/{lib/user → user}/index.js +0 -0
package/tests/test-manifest.js
DELETED
|
@@ -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
|
-
})();
|
package/tsconfig-package.json
DELETED
|
@@ -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
|
/package/{lib/app → app}/api.js
RENAMED
|
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
|
/package/{lib/http.js → http.js}
RENAMED
|
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
|