@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/lib/package.json
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@taskeren/bungie-api-ts",
|
|
3
|
-
"version": "5.10.1",
|
|
4
|
-
"description": "TypeScript mappings for the Bungie.net API",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"sideEffects": false,
|
|
7
|
-
"scripts": {},
|
|
8
|
-
"jest": {
|
|
9
|
-
"preset": "ts-jest/presets/js-with-babel-esm",
|
|
10
|
-
"testEnvironment": "node",
|
|
11
|
-
"moduleNameMapper": {
|
|
12
|
-
"^(\\.{1,2}/.*)\\.js$": "$1"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"engines": {
|
|
16
|
-
"node": ">=13.2.0"
|
|
17
|
-
},
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "https://github.com/DestinyItemManager/bungie-api-ts.git"
|
|
21
|
-
},
|
|
22
|
-
"author": "Ben Hollis",
|
|
23
|
-
"license": "MIT",
|
|
24
|
-
"bugs": {
|
|
25
|
-
"url": "https://github.com/DestinyItemManager/bungie-api-ts/issues"
|
|
26
|
-
},
|
|
27
|
-
"keywords": [
|
|
28
|
-
"Destiny",
|
|
29
|
-
"Bungie",
|
|
30
|
-
"Bungie.net",
|
|
31
|
-
"TypeScript"
|
|
32
|
-
],
|
|
33
|
-
"homepage": "https://github.com/DestinyItemManager/bungie-api-ts",
|
|
34
|
-
"devDependencies": {},
|
|
35
|
-
"packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81",
|
|
36
|
-
"main": "./index.js",
|
|
37
|
-
"types": "./index.d.ts",
|
|
38
|
-
"module": "./index.js",
|
|
39
|
-
"exports": {
|
|
40
|
-
".": {
|
|
41
|
-
"default": "./index.js",
|
|
42
|
-
"types": "./index.d.ts"
|
|
43
|
-
},
|
|
44
|
-
"./http": {
|
|
45
|
-
"default": "./http.js",
|
|
46
|
-
"types": "./http.d.ts"
|
|
47
|
-
},
|
|
48
|
-
"./package.json": "./package.json",
|
|
49
|
-
"./app": {
|
|
50
|
-
"default": "./app/index.js",
|
|
51
|
-
"types": "./app/index.d.ts"
|
|
52
|
-
},
|
|
53
|
-
"./user": {
|
|
54
|
-
"default": "./user/index.js",
|
|
55
|
-
"types": "./user/index.d.ts"
|
|
56
|
-
},
|
|
57
|
-
"./content": {
|
|
58
|
-
"default": "./content/index.js",
|
|
59
|
-
"types": "./content/index.d.ts"
|
|
60
|
-
},
|
|
61
|
-
"./forum": {
|
|
62
|
-
"default": "./forum/index.js",
|
|
63
|
-
"types": "./forum/index.d.ts"
|
|
64
|
-
},
|
|
65
|
-
"./groupv2": {
|
|
66
|
-
"default": "./groupv2/index.js",
|
|
67
|
-
"types": "./groupv2/index.d.ts"
|
|
68
|
-
},
|
|
69
|
-
"./tokens": {
|
|
70
|
-
"default": "./tokens/index.js",
|
|
71
|
-
"types": "./tokens/index.d.ts"
|
|
72
|
-
},
|
|
73
|
-
"./destiny2": {
|
|
74
|
-
"default": "./destiny2/index.js",
|
|
75
|
-
"types": "./destiny2/index.d.ts"
|
|
76
|
-
},
|
|
77
|
-
"./communitycontent": {
|
|
78
|
-
"default": "./communitycontent/index.js",
|
|
79
|
-
"types": "./communitycontent/index.d.ts"
|
|
80
|
-
},
|
|
81
|
-
"./trending": {
|
|
82
|
-
"default": "./trending/index.js",
|
|
83
|
-
"types": "./trending/index.d.ts"
|
|
84
|
-
},
|
|
85
|
-
"./fireteam": {
|
|
86
|
-
"default": "./fireteam/index.js",
|
|
87
|
-
"types": "./fireteam/index.d.ts"
|
|
88
|
-
},
|
|
89
|
-
"./social": {
|
|
90
|
-
"default": "./social/index.js",
|
|
91
|
-
"types": "./social/index.d.ts"
|
|
92
|
-
},
|
|
93
|
-
"./core": {
|
|
94
|
-
"default": "./core/index.js",
|
|
95
|
-
"types": "./core/index.d.ts"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"dependencies": {}
|
|
99
|
-
}
|
package/test-consumer.ts
DELETED
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`check config builder for [Function awaGetActionToken] 1`] = `
|
|
4
|
-
{
|
|
5
|
-
"method": "GET",
|
|
6
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Awa/GetActionToken/456734563673/",
|
|
7
|
-
}
|
|
8
|
-
`;
|
|
9
|
-
|
|
10
|
-
exports[`check config builder for [Function awaInitializeRequest] 1`] = `
|
|
11
|
-
{
|
|
12
|
-
"body": {},
|
|
13
|
-
"method": "POST",
|
|
14
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Awa/Initialize/",
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
exports[`check config builder for [Function awaProvideAuthorizationResult] 1`] = `
|
|
19
|
-
{
|
|
20
|
-
"body": {},
|
|
21
|
-
"method": "POST",
|
|
22
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Awa/AwaProvideAuthorizationResult/",
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
25
|
-
|
|
26
|
-
exports[`check config builder for [Function equipItem] 1`] = `
|
|
27
|
-
{
|
|
28
|
-
"body": {},
|
|
29
|
-
"method": "POST",
|
|
30
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Actions/Items/EquipItem/",
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
|
|
34
|
-
exports[`check config builder for [Function equipItems] 1`] = `
|
|
35
|
-
{
|
|
36
|
-
"body": {},
|
|
37
|
-
"method": "POST",
|
|
38
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Actions/Items/EquipItems/",
|
|
39
|
-
}
|
|
40
|
-
`;
|
|
41
|
-
|
|
42
|
-
exports[`check config builder for [Function getActivityHistory] 1`] = `
|
|
43
|
-
{
|
|
44
|
-
"method": "GET",
|
|
45
|
-
"params": {
|
|
46
|
-
"count": "10",
|
|
47
|
-
"mode": "5",
|
|
48
|
-
"page": "2",
|
|
49
|
-
},
|
|
50
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Account/123456/Character/1234658790/Stats/Activities/",
|
|
51
|
-
}
|
|
52
|
-
`;
|
|
53
|
-
|
|
54
|
-
exports[`check config builder for [Function getCharacter] 1`] = `
|
|
55
|
-
{
|
|
56
|
-
"method": "GET",
|
|
57
|
-
"params": {
|
|
58
|
-
"components": "400,402,300,301,304,305,306,307,600,308,310,309",
|
|
59
|
-
},
|
|
60
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Profile/123456/Character/1234658790/",
|
|
61
|
-
}
|
|
62
|
-
`;
|
|
63
|
-
|
|
64
|
-
exports[`check config builder for [Function getClanAggregateStats] 1`] = `
|
|
65
|
-
{
|
|
66
|
-
"method": "GET",
|
|
67
|
-
"params": {
|
|
68
|
-
"modes": [
|
|
69
|
-
5,
|
|
70
|
-
7,
|
|
71
|
-
],
|
|
72
|
-
},
|
|
73
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Stats/AggregateClanStats/78346592834756/",
|
|
74
|
-
}
|
|
75
|
-
`;
|
|
76
|
-
|
|
77
|
-
exports[`check config builder for [Function getClanLeaderboards] 1`] = `
|
|
78
|
-
{
|
|
79
|
-
"method": "GET",
|
|
80
|
-
"params": {
|
|
81
|
-
"maxtop": "6",
|
|
82
|
-
"modes": [
|
|
83
|
-
5,
|
|
84
|
-
7,
|
|
85
|
-
],
|
|
86
|
-
"statid": "234624564",
|
|
87
|
-
},
|
|
88
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Stats/Leaderboards/Clans/78346592834756/",
|
|
89
|
-
}
|
|
90
|
-
`;
|
|
91
|
-
|
|
92
|
-
exports[`check config builder for [Function getClanWeeklyRewardState] 1`] = `
|
|
93
|
-
{
|
|
94
|
-
"method": "GET",
|
|
95
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Clan/78346592834756/WeeklyRewardState/",
|
|
96
|
-
}
|
|
97
|
-
`;
|
|
98
|
-
|
|
99
|
-
exports[`check config builder for [Function getCollectibleNodeDetails] 1`] = `
|
|
100
|
-
{
|
|
101
|
-
"method": "GET",
|
|
102
|
-
"params": {
|
|
103
|
-
"components": "400,402,300,301,304,305,306,307,600,308,310,309",
|
|
104
|
-
},
|
|
105
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Profile/123456/Character/1234658790/Collectibles/10293847/",
|
|
106
|
-
}
|
|
107
|
-
`;
|
|
108
|
-
|
|
109
|
-
exports[`check config builder for [Function getDestinyAggregateActivityStats] 1`] = `
|
|
110
|
-
{
|
|
111
|
-
"method": "GET",
|
|
112
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Account/123456/Character/1234658790/Stats/AggregateActivityStats/",
|
|
113
|
-
}
|
|
114
|
-
`;
|
|
115
|
-
|
|
116
|
-
exports[`check config builder for [Function getDestinyEntityDefinition] 1`] = `
|
|
117
|
-
{
|
|
118
|
-
"method": "GET",
|
|
119
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Manifest/DestinyInventoryItemDefinition/23463456/",
|
|
120
|
-
}
|
|
121
|
-
`;
|
|
122
|
-
|
|
123
|
-
exports[`check config builder for [Function getDestinyManifest] 1`] = `
|
|
124
|
-
{
|
|
125
|
-
"method": "GET",
|
|
126
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Manifest/",
|
|
127
|
-
}
|
|
128
|
-
`;
|
|
129
|
-
|
|
130
|
-
exports[`check config builder for [Function getHistoricalStats] 1`] = `
|
|
131
|
-
{
|
|
132
|
-
"method": "GET",
|
|
133
|
-
"params": {
|
|
134
|
-
"dayend": "YYYY-MM-DD",
|
|
135
|
-
"daystart": "YYYY-MM-DD",
|
|
136
|
-
"groups": "General,Weapons",
|
|
137
|
-
"modes": "5,7",
|
|
138
|
-
"periodType": "AllTime",
|
|
139
|
-
},
|
|
140
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Account/123456/Character/1234658790/Stats/",
|
|
141
|
-
}
|
|
142
|
-
`;
|
|
143
|
-
|
|
144
|
-
exports[`check config builder for [Function getHistoricalStatsDefinition] 1`] = `
|
|
145
|
-
{
|
|
146
|
-
"method": "GET",
|
|
147
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Stats/Definition/",
|
|
148
|
-
}
|
|
149
|
-
`;
|
|
150
|
-
|
|
151
|
-
exports[`check config builder for [Function getHistoricalStatsForAccount] 1`] = `
|
|
152
|
-
{
|
|
153
|
-
"method": "GET",
|
|
154
|
-
"params": {
|
|
155
|
-
"groups": "General,Weapons",
|
|
156
|
-
},
|
|
157
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Account/123456/Stats/",
|
|
158
|
-
}
|
|
159
|
-
`;
|
|
160
|
-
|
|
161
|
-
exports[`check config builder for [Function getItem] 1`] = `
|
|
162
|
-
{
|
|
163
|
-
"method": "GET",
|
|
164
|
-
"params": {
|
|
165
|
-
"components": "400,402,300,301,304,305,306,307,600,308,310,309",
|
|
166
|
-
},
|
|
167
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Profile/123456/Item/0987654321/",
|
|
168
|
-
}
|
|
169
|
-
`;
|
|
170
|
-
|
|
171
|
-
exports[`check config builder for [Function getLeaderboards] 1`] = `
|
|
172
|
-
{
|
|
173
|
-
"method": "GET",
|
|
174
|
-
"params": {
|
|
175
|
-
"maxtop": "6",
|
|
176
|
-
"modes": [
|
|
177
|
-
5,
|
|
178
|
-
7,
|
|
179
|
-
],
|
|
180
|
-
"statid": "234624564",
|
|
181
|
-
},
|
|
182
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Account/123456/Stats/Leaderboards/",
|
|
183
|
-
}
|
|
184
|
-
`;
|
|
185
|
-
|
|
186
|
-
exports[`check config builder for [Function getLeaderboardsForCharacter] 1`] = `
|
|
187
|
-
{
|
|
188
|
-
"method": "GET",
|
|
189
|
-
"params": {
|
|
190
|
-
"maxtop": "6",
|
|
191
|
-
"modes": [
|
|
192
|
-
5,
|
|
193
|
-
7,
|
|
194
|
-
],
|
|
195
|
-
"statid": "234624564",
|
|
196
|
-
},
|
|
197
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Stats/Leaderboards/3/123456/1234658790/",
|
|
198
|
-
}
|
|
199
|
-
`;
|
|
200
|
-
|
|
201
|
-
exports[`check config builder for [Function getLinkedProfiles] 1`] = `
|
|
202
|
-
{
|
|
203
|
-
"method": "GET",
|
|
204
|
-
"params": {
|
|
205
|
-
"getAllMemberships": "true",
|
|
206
|
-
},
|
|
207
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Profile/123456/LinkedProfiles/",
|
|
208
|
-
}
|
|
209
|
-
`;
|
|
210
|
-
|
|
211
|
-
exports[`check config builder for [Function getPostGameCarnageReport] 1`] = `
|
|
212
|
-
{
|
|
213
|
-
"method": "GET",
|
|
214
|
-
"url": "https://stats.bungie.net/Platform/Destiny2/Stats/PostGameCarnageReport/456745673456/",
|
|
215
|
-
}
|
|
216
|
-
`;
|
|
217
|
-
|
|
218
|
-
exports[`check config builder for [Function getProfile] 1`] = `
|
|
219
|
-
{
|
|
220
|
-
"method": "GET",
|
|
221
|
-
"params": {
|
|
222
|
-
"components": "400,402,300,301,304,305,306,307,600,308,310,309",
|
|
223
|
-
},
|
|
224
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Profile/123456/",
|
|
225
|
-
}
|
|
226
|
-
`;
|
|
227
|
-
|
|
228
|
-
exports[`check config builder for [Function getPublicMilestoneContent] 1`] = `
|
|
229
|
-
{
|
|
230
|
-
"method": "GET",
|
|
231
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Milestones/23546789/Content/",
|
|
232
|
-
}
|
|
233
|
-
`;
|
|
234
|
-
|
|
235
|
-
exports[`check config builder for [Function getPublicMilestones] 1`] = `
|
|
236
|
-
{
|
|
237
|
-
"method": "GET",
|
|
238
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Milestones/",
|
|
239
|
-
}
|
|
240
|
-
`;
|
|
241
|
-
|
|
242
|
-
exports[`check config builder for [Function getPublicVendors] 1`] = `
|
|
243
|
-
{
|
|
244
|
-
"method": "GET",
|
|
245
|
-
"params": {
|
|
246
|
-
"components": "400,402,300,301,304,305,306,307,600,308,310,309",
|
|
247
|
-
},
|
|
248
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Vendors/",
|
|
249
|
-
}
|
|
250
|
-
`;
|
|
251
|
-
|
|
252
|
-
exports[`check config builder for [Function getUniqueWeaponHistory] 1`] = `
|
|
253
|
-
{
|
|
254
|
-
"method": "GET",
|
|
255
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Account/123456/Character/1234658790/Stats/UniqueWeapons/",
|
|
256
|
-
}
|
|
257
|
-
`;
|
|
258
|
-
|
|
259
|
-
exports[`check config builder for [Function getVendor] 1`] = `
|
|
260
|
-
{
|
|
261
|
-
"method": "GET",
|
|
262
|
-
"params": {
|
|
263
|
-
"components": "400,402,300,301,304,305,306,307,600,308,310,309",
|
|
264
|
-
},
|
|
265
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Profile/123456/Character/1234658790/Vendors/45674576/",
|
|
266
|
-
}
|
|
267
|
-
`;
|
|
268
|
-
|
|
269
|
-
exports[`check config builder for [Function getVendors] 1`] = `
|
|
270
|
-
{
|
|
271
|
-
"method": "GET",
|
|
272
|
-
"params": {
|
|
273
|
-
"components": "400,402,300,301,304,305,306,307,600,308,310,309",
|
|
274
|
-
"filter": "0",
|
|
275
|
-
},
|
|
276
|
-
"url": "https://www.bungie.net/Platform/Destiny2/3/Profile/123456/Character/1234658790/Vendors/",
|
|
277
|
-
}
|
|
278
|
-
`;
|
|
279
|
-
|
|
280
|
-
exports[`check config builder for [Function insertSocketPlug] 1`] = `
|
|
281
|
-
{
|
|
282
|
-
"body": {},
|
|
283
|
-
"method": "POST",
|
|
284
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Actions/Items/InsertSocketPlug/",
|
|
285
|
-
}
|
|
286
|
-
`;
|
|
287
|
-
|
|
288
|
-
exports[`check config builder for [Function pullFromPostmaster] 1`] = `
|
|
289
|
-
{
|
|
290
|
-
"body": {},
|
|
291
|
-
"method": "POST",
|
|
292
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Actions/Items/PullFromPostmaster/",
|
|
293
|
-
}
|
|
294
|
-
`;
|
|
295
|
-
|
|
296
|
-
exports[`check config builder for [Function reportOffensivePostGameCarnageReportPlayer] 1`] = `
|
|
297
|
-
{
|
|
298
|
-
"body": {},
|
|
299
|
-
"method": "POST",
|
|
300
|
-
"url": "https://stats.bungie.net/Platform/Destiny2/Stats/PostGameCarnageReport/456745673456/Report/",
|
|
301
|
-
}
|
|
302
|
-
`;
|
|
303
|
-
|
|
304
|
-
exports[`check config builder for [Function searchDestinyEntities] 1`] = `
|
|
305
|
-
{
|
|
306
|
-
"method": "GET",
|
|
307
|
-
"params": {
|
|
308
|
-
"page": "2",
|
|
309
|
-
},
|
|
310
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Armory/Search/DestinyInventoryItemDefinition/something/",
|
|
311
|
-
}
|
|
312
|
-
`;
|
|
313
|
-
|
|
314
|
-
exports[`check config builder for [Function searchDestinyPlayerByBungieName] 1`] = `
|
|
315
|
-
{
|
|
316
|
-
"method": "POST",
|
|
317
|
-
"url": "https://www.bungie.net/Platform/Destiny2/SearchDestinyPlayerByBungieName/3/",
|
|
318
|
-
}
|
|
319
|
-
`;
|
|
320
|
-
|
|
321
|
-
exports[`check config builder for [Function setItemLockState] 1`] = `
|
|
322
|
-
{
|
|
323
|
-
"body": {},
|
|
324
|
-
"method": "POST",
|
|
325
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Actions/Items/SetLockState/",
|
|
326
|
-
}
|
|
327
|
-
`;
|
|
328
|
-
|
|
329
|
-
exports[`check config builder for [Function setQuestTrackedState] 1`] = `
|
|
330
|
-
{
|
|
331
|
-
"body": {},
|
|
332
|
-
"method": "POST",
|
|
333
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Actions/Items/SetTrackedState/",
|
|
334
|
-
}
|
|
335
|
-
`;
|
|
336
|
-
|
|
337
|
-
exports[`check config builder for [Function transferItem] 1`] = `
|
|
338
|
-
{
|
|
339
|
-
"body": {},
|
|
340
|
-
"method": "POST",
|
|
341
|
-
"url": "https://www.bungie.net/Platform/Destiny2/Actions/Items/TransferItem/",
|
|
342
|
-
}
|
|
343
|
-
`;
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getDestinyManifest,
|
|
3
|
-
getDestinyEntityDefinition,
|
|
4
|
-
getLinkedProfiles,
|
|
5
|
-
getProfile,
|
|
6
|
-
getCharacter,
|
|
7
|
-
getClanWeeklyRewardState,
|
|
8
|
-
getItem,
|
|
9
|
-
getVendors,
|
|
10
|
-
getVendor,
|
|
11
|
-
getPublicVendors,
|
|
12
|
-
getCollectibleNodeDetails,
|
|
13
|
-
transferItem,
|
|
14
|
-
pullFromPostmaster,
|
|
15
|
-
equipItem,
|
|
16
|
-
equipItems,
|
|
17
|
-
setItemLockState,
|
|
18
|
-
setQuestTrackedState,
|
|
19
|
-
insertSocketPlug,
|
|
20
|
-
getPostGameCarnageReport,
|
|
21
|
-
reportOffensivePostGameCarnageReportPlayer,
|
|
22
|
-
getHistoricalStatsDefinition,
|
|
23
|
-
getClanLeaderboards,
|
|
24
|
-
getClanAggregateStats,
|
|
25
|
-
getLeaderboards,
|
|
26
|
-
getLeaderboardsForCharacter,
|
|
27
|
-
searchDestinyEntities,
|
|
28
|
-
getHistoricalStats,
|
|
29
|
-
getHistoricalStatsForAccount,
|
|
30
|
-
getActivityHistory,
|
|
31
|
-
getUniqueWeaponHistory,
|
|
32
|
-
getDestinyAggregateActivityStats,
|
|
33
|
-
getPublicMilestoneContent,
|
|
34
|
-
getPublicMilestones,
|
|
35
|
-
awaInitializeRequest,
|
|
36
|
-
awaProvideAuthorizationResult,
|
|
37
|
-
awaGetActionToken,
|
|
38
|
-
searchDestinyPlayerByBungieName,
|
|
39
|
-
} from '../generated-src/destiny2/api';
|
|
40
|
-
import { HttpClient } from '../generated-src/http';
|
|
41
|
-
import { DestinyComponentType } from '../generated-src/destiny2/interfaces';
|
|
42
|
-
|
|
43
|
-
// instead of actually performing a fetch,
|
|
44
|
-
// this fake HttpClient returns the HttpConfig it would have used to make the fetch
|
|
45
|
-
// so we can check of the HttpConfig was built right
|
|
46
|
-
const h = ((httpConfig?: any) => Promise.resolve(httpConfig)) as HttpClient;
|
|
47
|
-
|
|
48
|
-
// sample values for the "body" argument
|
|
49
|
-
const b = {} as any;
|
|
50
|
-
|
|
51
|
-
// sample values for parameters
|
|
52
|
-
const p = {
|
|
53
|
-
characterId: '1234658790',
|
|
54
|
-
components: [
|
|
55
|
-
DestinyComponentType.Vendors,
|
|
56
|
-
DestinyComponentType.VendorSales,
|
|
57
|
-
DestinyComponentType.ItemInstances,
|
|
58
|
-
DestinyComponentType.ItemObjectives,
|
|
59
|
-
DestinyComponentType.ItemStats,
|
|
60
|
-
DestinyComponentType.ItemSockets,
|
|
61
|
-
DestinyComponentType.ItemTalentGrids,
|
|
62
|
-
DestinyComponentType.ItemCommonData,
|
|
63
|
-
DestinyComponentType.CurrencyLookups,
|
|
64
|
-
DestinyComponentType.ItemPlugStates,
|
|
65
|
-
DestinyComponentType.ItemReusablePlugs,
|
|
66
|
-
DestinyComponentType.ItemPlugObjectives,
|
|
67
|
-
],
|
|
68
|
-
destinyMembershipId: '123456',
|
|
69
|
-
getAllMemberships: true,
|
|
70
|
-
itemId: '0987654321',
|
|
71
|
-
itemInstanceId: '0987654321',
|
|
72
|
-
itemReferenceHash: 45674576,
|
|
73
|
-
membershipId: '123456',
|
|
74
|
-
membershipType: 3,
|
|
75
|
-
stackSize: 7,
|
|
76
|
-
transferToVault: true,
|
|
77
|
-
vendorHash: 45674576,
|
|
78
|
-
state: true,
|
|
79
|
-
groupId: '78346592834756',
|
|
80
|
-
correlationId: '456734563673',
|
|
81
|
-
count: 10,
|
|
82
|
-
mode: 5,
|
|
83
|
-
modes: [5, 7],
|
|
84
|
-
page: 2,
|
|
85
|
-
maxtop: 6,
|
|
86
|
-
statid: '234624564',
|
|
87
|
-
returnOriginalProfile: true,
|
|
88
|
-
displayName: 'asdf',
|
|
89
|
-
entityType: 'DestinyInventoryItemDefinition',
|
|
90
|
-
hashIdentifier: 23463456,
|
|
91
|
-
dayend: 'YYYY-MM-DD',
|
|
92
|
-
daystart: 'YYYY-MM-DD',
|
|
93
|
-
groups: ['General', 'Weapons'],
|
|
94
|
-
periodType: 'AllTime',
|
|
95
|
-
milestoneHash: 23546789,
|
|
96
|
-
collectiblePresentationNodeHash: 10293847,
|
|
97
|
-
activityId: '456745673456',
|
|
98
|
-
filter: 0,
|
|
99
|
-
type: 'DestinyInventoryItemDefinition',
|
|
100
|
-
searchTerm: 'something',
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
const testCases: [(..._: any) => any, any[]][] = [
|
|
104
|
-
[getDestinyManifest, [h]],
|
|
105
|
-
[getDestinyEntityDefinition, [h, p]],
|
|
106
|
-
[searchDestinyPlayerByBungieName, [h, p]],
|
|
107
|
-
[getLinkedProfiles, [h, p]],
|
|
108
|
-
[getProfile, [h, p]],
|
|
109
|
-
[getCharacter, [h, p]],
|
|
110
|
-
[getClanWeeklyRewardState, [h, p]],
|
|
111
|
-
[getItem, [h, p]],
|
|
112
|
-
[getVendors, [h, p]],
|
|
113
|
-
[getVendor, [h, p]],
|
|
114
|
-
[getPublicVendors, [h, p]],
|
|
115
|
-
[getCollectibleNodeDetails, [h, p]],
|
|
116
|
-
[transferItem, [h, b]],
|
|
117
|
-
[pullFromPostmaster, [h, b]],
|
|
118
|
-
[equipItem, [h, b]],
|
|
119
|
-
[equipItems, [h, b]],
|
|
120
|
-
[setItemLockState, [h, b]],
|
|
121
|
-
[setQuestTrackedState, [h, b]],
|
|
122
|
-
[insertSocketPlug, [h, b]],
|
|
123
|
-
[getPostGameCarnageReport, [h, p]],
|
|
124
|
-
[reportOffensivePostGameCarnageReportPlayer, [h, p, b]],
|
|
125
|
-
[getHistoricalStatsDefinition, [h]],
|
|
126
|
-
[getClanLeaderboards, [h, p]],
|
|
127
|
-
[getClanAggregateStats, [h, p]],
|
|
128
|
-
[getLeaderboards, [h, p]],
|
|
129
|
-
[getLeaderboardsForCharacter, [h, p]],
|
|
130
|
-
[searchDestinyEntities, [h, p]],
|
|
131
|
-
[getHistoricalStats, [h, p]],
|
|
132
|
-
[getHistoricalStatsForAccount, [h, p]],
|
|
133
|
-
[getActivityHistory, [h, p]],
|
|
134
|
-
[getUniqueWeaponHistory, [h, p]],
|
|
135
|
-
[getDestinyAggregateActivityStats, [h, p]],
|
|
136
|
-
[getPublicMilestoneContent, [h, p]],
|
|
137
|
-
[getPublicMilestones, [h]],
|
|
138
|
-
[awaInitializeRequest, [h, b]],
|
|
139
|
-
[awaProvideAuthorizationResult, [h, b]],
|
|
140
|
-
[awaGetActionToken, [h, p]],
|
|
141
|
-
];
|
|
142
|
-
|
|
143
|
-
test.each(testCases)('check config builder for %p', async (func, args) => {
|
|
144
|
-
expect(await func(...args)).toMatchSnapshot();
|
|
145
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { getDestinyManifest } from '../generated-src/destiny2/api';
|
|
2
|
-
import { getDestinyManifestSlice } from '../generated-src/destiny2/manifest';
|
|
3
|
-
import { HttpClientConfig } from '../generated-src/http';
|
|
4
|
-
|
|
5
|
-
async function httpClient(config: HttpClientConfig) {
|
|
6
|
-
return (fetch as any)(config.url, config)
|
|
7
|
-
.then((res: Response) => res.json())
|
|
8
|
-
.catch((e: any) => {
|
|
9
|
-
console.log('DESTINY API ERROR');
|
|
10
|
-
console.log('probably about to fail a promise here. sorry.');
|
|
11
|
-
console.log(console.log(e));
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
test('manifest downloads and getDestinyManifestSlice contains 2 tables', async () => {
|
|
16
|
-
const manifestMetadata = (await getDestinyManifest(httpClient)).Response;
|
|
17
|
-
|
|
18
|
-
const partialManifest = await getDestinyManifestSlice(httpClient, {
|
|
19
|
-
destinyManifest: manifestMetadata,
|
|
20
|
-
tableNames: ['DestinyInventoryItemDefinition', 'DestinyLocationDefinition'],
|
|
21
|
-
language: 'en',
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
expect(Object.keys(partialManifest)).toMatchInlineSnapshot(`
|
|
25
|
-
[
|
|
26
|
-
"DestinyInventoryItemDefinition",
|
|
27
|
-
"DestinyLocationDefinition",
|
|
28
|
-
]
|
|
29
|
-
`);
|
|
30
|
-
|
|
31
|
-
// const items = partialManifest.DestinyInventoryItemDefinition;
|
|
32
|
-
// const locations = partialManifest.DestinyLocationDefinition;
|
|
33
|
-
// maybe this is overkill
|
|
34
|
-
// expect(
|
|
35
|
-
// Object.values(items).filter((i) => (i as any).vendorHash || (i as any).locationReleases)
|
|
36
|
-
// ).toHaveLength(0);
|
|
37
|
-
|
|
38
|
-
// expect(
|
|
39
|
-
// Object.values(locations).filter(
|
|
40
|
-
// (l) => (l as any).itemTypeAndTierDisplayName || (l as any).damageTypeHashes
|
|
41
|
-
// )
|
|
42
|
-
// ).toHaveLength(0);
|
|
43
|
-
});
|