@taskeren/bungie-api-ts 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +4 -0
- package/.gitattributes +2 -0
- package/.github/workflows/pr-build.yml +50 -0
- package/.github/workflows/publish.yml +48 -0
- package/.github/workflows/update.yml +55 -0
- package/.gitmodules +3 -0
- package/.nvmrc +1 -0
- package/.prettierrc +10 -0
- package/.vscode/extensions.json +8 -0
- package/.vscode/settings.json +7 -0
- package/LICENSE.md +21 -0
- package/README.md +97 -0
- package/api-src/.github/workflows/close-inactive.yml +24 -0
- package/api-src/CHANGELOG.md +271 -0
- package/api-src/CONTRIBUTING.md +19 -0
- package/api-src/LICENSE +28 -0
- package/api-src/README.md +378 -0
- package/api-src/openapi-2.json +44518 -0
- package/api-src/openapi.json +46467 -0
- package/build.sh +30 -0
- package/bungie-api-LICENSE +29 -0
- package/generated-src/app/api.ts +50 -0
- package/generated-src/app/index.ts +17 -0
- package/generated-src/app/interfaces.ts +119 -0
- package/generated-src/common.ts +985 -0
- package/generated-src/communitycontent/api.ts +36 -0
- package/generated-src/communitycontent/index.ts +16 -0
- package/generated-src/content/api.ts +142 -0
- package/generated-src/content/index.ts +17 -0
- package/generated-src/content/interfaces.ts +225 -0
- package/generated-src/core/api.ts +57 -0
- package/generated-src/core/index.ts +17 -0
- package/generated-src/core/interfaces.ts +151 -0
- package/generated-src/destiny2/api.ts +821 -0
- package/generated-src/destiny2/index.ts +17 -0
- package/generated-src/destiny2/interfaces.ts +15714 -0
- package/generated-src/destiny2/manifest.ts +341 -0
- package/generated-src/fireteam/api.ts +151 -0
- package/generated-src/fireteam/index.ts +17 -0
- package/generated-src/fireteam/interfaces.ts +183 -0
- package/generated-src/forum/api.ts +197 -0
- package/generated-src/forum/index.ts +17 -0
- package/generated-src/forum/interfaces.ts +171 -0
- package/generated-src/groupv2/api.ts +515 -0
- package/generated-src/groupv2/index.ts +17 -0
- package/generated-src/groupv2/interfaces.ts +773 -0
- package/generated-src/http.ts +52 -0
- package/generated-src/index.ts +37 -0
- package/generated-src/package.json.notyet +99 -0
- package/generated-src/platform.ts +39 -0
- package/generated-src/social/api.ts +115 -0
- package/generated-src/social/index.ts +17 -0
- package/generated-src/social/interfaces.ts +89 -0
- package/generated-src/tokens/api.ts +126 -0
- package/generated-src/tokens/index.ts +17 -0
- package/generated-src/tokens/interfaces.ts +102 -0
- package/generated-src/trending/api.ts +62 -0
- package/generated-src/trending/index.ts +17 -0
- package/generated-src/trending/interfaces.ts +188 -0
- package/generated-src/user/api.ts +130 -0
- package/generated-src/user/index.ts +17 -0
- package/generated-src/user/interfaces.ts +338 -0
- package/generator/generate-api.ts +254 -0
- package/generator/generate-common.ts +123 -0
- package/generator/generate-index.ts +45 -0
- package/generator/generate-interfaces.ts +173 -0
- package/generator/generate-manifest.ts +217 -0
- package/generator/generate-package-json.ts +45 -0
- package/generator/generate.ts +54 -0
- package/generator/http.ts +52 -0
- package/generator/missing-props.ts +11 -0
- package/generator/type-index.ts +184 -0
- package/generator/util.ts +131 -0
- package/lib/README.md +97 -0
- package/lib/app/api.d.ts +36 -0
- package/lib/app/api.js +15 -0
- package/lib/app/index.d.ts +16 -0
- package/lib/app/index.js +5 -0
- package/lib/app/interfaces.d.ts +108 -0
- package/lib/app/interfaces.js +17 -0
- package/lib/bungie-api-LICENSE +29 -0
- package/lib/common.d.ts +979 -0
- package/lib/common.js +923 -0
- package/lib/communitycontent/api.d.ts +31 -0
- package/lib/communitycontent/api.js +7 -0
- package/lib/communitycontent/index.d.ts +15 -0
- package/lib/communitycontent/index.js +4 -0
- package/lib/content/api.d.ts +111 -0
- package/lib/content/api.js +75 -0
- package/lib/content/index.d.ts +16 -0
- package/lib/content/index.js +5 -0
- package/lib/content/interfaces.d.ts +214 -0
- package/lib/content/interfaces.js +17 -0
- package/lib/core/api.d.ts +45 -0
- package/lib/core/api.js +18 -0
- package/lib/core/index.d.ts +16 -0
- package/lib/core/index.js +5 -0
- package/lib/core/interfaces.d.ts +144 -0
- package/lib/core/interfaces.js +10 -0
- package/lib/destiny2/api.d.ts +765 -0
- package/lib/destiny2/api.js +295 -0
- package/lib/destiny2/index.d.ts +16 -0
- package/lib/destiny2/index.js +5 -0
- package/lib/destiny2/interfaces.d.ts +15340 -0
- package/lib/destiny2/interfaces.js +826 -0
- package/lib/destiny2/manifest.d.ts +465 -0
- package/lib/destiny2/manifest.js +56 -0
- package/lib/fireteam/api.d.ts +131 -0
- package/lib/fireteam/api.js +50 -0
- package/lib/fireteam/index.d.ts +16 -0
- package/lib/fireteam/index.js +5 -0
- package/lib/fireteam/interfaces.d.ts +166 -0
- package/lib/fireteam/interfaces.js +33 -0
- package/lib/forum/api.d.ts +165 -0
- package/lib/forum/api.js +79 -0
- package/lib/forum/index.d.ts +16 -0
- package/lib/forum/index.js +5 -0
- package/lib/forum/interfaces.d.ts +147 -0
- package/lib/forum/interfaces.js +61 -0
- package/lib/groupv2/api.d.ts +484 -0
- package/lib/groupv2/api.js +154 -0
- package/lib/groupv2/index.d.ts +16 -0
- package/lib/groupv2/index.js +5 -0
- package/lib/groupv2/interfaces.d.ts +718 -0
- package/lib/groupv2/interfaces.js +100 -0
- package/lib/http.d.ts +18 -0
- package/lib/http.js +20 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.js +24 -0
- package/lib/package.json +99 -0
- package/lib/platform.d.ts +36 -0
- package/lib/platform.js +9 -0
- package/lib/social/api.d.ts +101 -0
- package/lib/social/api.js +26 -0
- package/lib/social/index.d.ts +16 -0
- package/lib/social/index.js +5 -0
- package/lib/social/interfaces.d.ts +75 -0
- package/lib/social/interfaces.js +22 -0
- package/lib/tokens/api.d.ts +120 -0
- package/lib/tokens/api.js +38 -0
- package/lib/tokens/index.d.ts +16 -0
- package/lib/tokens/index.js +5 -0
- package/lib/tokens/interfaces.d.ts +88 -0
- package/lib/tokens/interfaces.js +5 -0
- package/lib/trending/api.d.ts +53 -0
- package/lib/trending/api.js +11 -0
- package/lib/trending/index.d.ts +16 -0
- package/lib/trending/index.js +5 -0
- package/lib/trending/interfaces.d.ts +171 -0
- package/lib/trending/interfaces.js +14 -0
- package/lib/user/api.d.ts +117 -0
- package/lib/user/api.js +35 -0
- package/lib/user/index.d.ts +16 -0
- package/lib/user/index.js +5 -0
- package/lib/user/interfaces.d.ts +320 -0
- package/lib/user/interfaces.js +28 -0
- package/package.json +60 -0
- package/test-consumer.ts +5 -0
- package/tests/__snapshots__/config-builders.test.ts.snap +343 -0
- package/tests/config-builders.test.ts +145 -0
- package/tests/manifest-fetcher.test.ts +43 -0
- package/tests/test-manifest.js +69 -0
- package/tsconfig-package.json +14 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export var GroupType = {
|
|
2
|
+
General: 0,
|
|
3
|
+
Clan: 1,
|
|
4
|
+
};
|
|
5
|
+
export var ChatSecuritySetting = {
|
|
6
|
+
Group: 0,
|
|
7
|
+
Admins: 1,
|
|
8
|
+
};
|
|
9
|
+
export var GroupHomepage = {
|
|
10
|
+
Wall: 0,
|
|
11
|
+
Forum: 1,
|
|
12
|
+
AllianceForum: 2,
|
|
13
|
+
};
|
|
14
|
+
export var MembershipOption = {
|
|
15
|
+
Reviewed: 0,
|
|
16
|
+
Open: 1,
|
|
17
|
+
Closed: 2,
|
|
18
|
+
};
|
|
19
|
+
export var GroupPostPublicity = {
|
|
20
|
+
Public: 0,
|
|
21
|
+
Alliance: 1,
|
|
22
|
+
Private: 2,
|
|
23
|
+
};
|
|
24
|
+
export var Capabilities = {
|
|
25
|
+
None: 0,
|
|
26
|
+
Leaderboards: 1,
|
|
27
|
+
Callsign: 2,
|
|
28
|
+
OptionalConversations: 4,
|
|
29
|
+
ClanBanner: 8,
|
|
30
|
+
D2InvestmentData: 16,
|
|
31
|
+
Tags: 32,
|
|
32
|
+
Alliances: 64,
|
|
33
|
+
};
|
|
34
|
+
export var HostGuidedGamesPermissionLevel = {
|
|
35
|
+
None: 0,
|
|
36
|
+
Beginner: 1,
|
|
37
|
+
Member: 2,
|
|
38
|
+
};
|
|
39
|
+
export var RuntimeGroupMemberType = {
|
|
40
|
+
None: 0,
|
|
41
|
+
Beginner: 1,
|
|
42
|
+
Member: 2,
|
|
43
|
+
Admin: 3,
|
|
44
|
+
ActingFounder: 4,
|
|
45
|
+
Founder: 5,
|
|
46
|
+
};
|
|
47
|
+
export var GroupAllianceStatus = {
|
|
48
|
+
Unallied: 0,
|
|
49
|
+
Parent: 1,
|
|
50
|
+
Child: 2,
|
|
51
|
+
};
|
|
52
|
+
export var GroupPotentialMemberStatus = {
|
|
53
|
+
None: 0,
|
|
54
|
+
Applicant: 1,
|
|
55
|
+
Invitee: 2,
|
|
56
|
+
};
|
|
57
|
+
export var GroupDateRange = {
|
|
58
|
+
All: 0,
|
|
59
|
+
PastDay: 1,
|
|
60
|
+
PastWeek: 2,
|
|
61
|
+
PastMonth: 3,
|
|
62
|
+
PastYear: 4,
|
|
63
|
+
};
|
|
64
|
+
export var GroupsForMemberFilter = {
|
|
65
|
+
All: 0,
|
|
66
|
+
Founded: 1,
|
|
67
|
+
NonFounded: 2,
|
|
68
|
+
};
|
|
69
|
+
export var GroupSortBy = {
|
|
70
|
+
Name: 0,
|
|
71
|
+
Date: 1,
|
|
72
|
+
Popularity: 2,
|
|
73
|
+
Id: 3,
|
|
74
|
+
};
|
|
75
|
+
export var GroupMemberCountFilter = {
|
|
76
|
+
All: 0,
|
|
77
|
+
OneToTen: 1,
|
|
78
|
+
ElevenToOneHundred: 2,
|
|
79
|
+
GreaterThanOneHundred: 3,
|
|
80
|
+
};
|
|
81
|
+
export var IgnoreLength = {
|
|
82
|
+
None: 0,
|
|
83
|
+
Week: 1,
|
|
84
|
+
TwoWeeks: 2,
|
|
85
|
+
ThreeWeeks: 3,
|
|
86
|
+
Month: 4,
|
|
87
|
+
ThreeMonths: 5,
|
|
88
|
+
SixMonths: 6,
|
|
89
|
+
Year: 7,
|
|
90
|
+
Forever: 8,
|
|
91
|
+
ThreeMinutes: 9,
|
|
92
|
+
Hour: 10,
|
|
93
|
+
ThirtyDays: 11,
|
|
94
|
+
};
|
|
95
|
+
export var GroupApplicationResolveState = {
|
|
96
|
+
Unresolved: 0,
|
|
97
|
+
Accepted: 1,
|
|
98
|
+
Denied: 2,
|
|
99
|
+
Rescinded: 3,
|
|
100
|
+
};
|
package/lib/http.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type HttpQueryParams = Record<string, string>;
|
|
2
|
+
export interface HttpClientConfig {
|
|
3
|
+
method: 'GET' | 'POST';
|
|
4
|
+
url: string;
|
|
5
|
+
/** Query string params */
|
|
6
|
+
params?: HttpQueryParams;
|
|
7
|
+
/** Request body */
|
|
8
|
+
body?: any;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A generic, minimal type for providing an HTTP client function.
|
|
12
|
+
* This gets the necessary config provided as an argument, and then
|
|
13
|
+
* should produce a promise for the parsed JSON as a result. The API
|
|
14
|
+
* helper functions will use this to return the right type.
|
|
15
|
+
*/
|
|
16
|
+
export type HttpClient = <Return>(config: HttpClientConfig) => Promise<Return>;
|
|
17
|
+
export declare function get<Return>(http: HttpClient, url: string, params?: HttpQueryParams): Promise<Return>;
|
|
18
|
+
export declare function post<Return>(http: HttpClient, url: string, body?: any): Promise<Return>;
|
package/lib/http.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function get(http, url, params) {
|
|
2
|
+
return http(params ? {
|
|
3
|
+
method: 'GET',
|
|
4
|
+
url,
|
|
5
|
+
params
|
|
6
|
+
} : {
|
|
7
|
+
method: 'GET',
|
|
8
|
+
url
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export function post(http, url, body) {
|
|
12
|
+
return http(body ? {
|
|
13
|
+
method: 'POST',
|
|
14
|
+
url,
|
|
15
|
+
body
|
|
16
|
+
} : {
|
|
17
|
+
method: 'POST',
|
|
18
|
+
url
|
|
19
|
+
});
|
|
20
|
+
}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bungie.Net API
|
|
3
|
+
* These endpoints constitute the functionality exposed by Bungie.net, both for more traditional website functionality and for connectivity to Bungie video games and their related functionality.
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 2.21.9
|
|
6
|
+
* Contact: support@bungie.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the bungie-api-ts code generator program.
|
|
9
|
+
* https://github.com/DestinyItemManager/bungie-api-ts
|
|
10
|
+
* Do not edit these files manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as AppImport from './app/index.js';
|
|
13
|
+
import * as UserImport from './user/index.js';
|
|
14
|
+
import * as ContentImport from './content/index.js';
|
|
15
|
+
import * as ForumImport from './forum/index.js';
|
|
16
|
+
import * as GroupV2Import from './groupv2/index.js';
|
|
17
|
+
import * as TokensImport from './tokens/index.js';
|
|
18
|
+
import * as Destiny2Import from './destiny2/index.js';
|
|
19
|
+
import * as CommunityContentImport from './communitycontent/index.js';
|
|
20
|
+
import * as TrendingImport from './trending/index.js';
|
|
21
|
+
import * as FireteamImport from './fireteam/index.js';
|
|
22
|
+
import * as SocialImport from './social/index.js';
|
|
23
|
+
import * as CoreImport from './core/index.js';
|
|
24
|
+
export declare const App: typeof AppImport;
|
|
25
|
+
export declare const User: typeof UserImport;
|
|
26
|
+
export declare const Content: typeof ContentImport;
|
|
27
|
+
export declare const Forum: typeof ForumImport;
|
|
28
|
+
export declare const GroupV2: typeof GroupV2Import;
|
|
29
|
+
export declare const Tokens: typeof TokensImport;
|
|
30
|
+
export declare const Destiny2: typeof Destiny2Import;
|
|
31
|
+
export declare const CommunityContent: typeof CommunityContentImport;
|
|
32
|
+
export declare const Trending: typeof TrendingImport;
|
|
33
|
+
export declare const Fireteam: typeof FireteamImport;
|
|
34
|
+
export declare const Social: typeof SocialImport;
|
|
35
|
+
export declare const Core: typeof CoreImport;
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as AppImport from './app/index.js';
|
|
2
|
+
import * as UserImport from './user/index.js';
|
|
3
|
+
import * as ContentImport from './content/index.js';
|
|
4
|
+
import * as ForumImport from './forum/index.js';
|
|
5
|
+
import * as GroupV2Import from './groupv2/index.js';
|
|
6
|
+
import * as TokensImport from './tokens/index.js';
|
|
7
|
+
import * as Destiny2Import from './destiny2/index.js';
|
|
8
|
+
import * as CommunityContentImport from './communitycontent/index.js';
|
|
9
|
+
import * as TrendingImport from './trending/index.js';
|
|
10
|
+
import * as FireteamImport from './fireteam/index.js';
|
|
11
|
+
import * as SocialImport from './social/index.js';
|
|
12
|
+
import * as CoreImport from './core/index.js';
|
|
13
|
+
export const App = AppImport;
|
|
14
|
+
export const User = UserImport;
|
|
15
|
+
export const Content = ContentImport;
|
|
16
|
+
export const Forum = ForumImport;
|
|
17
|
+
export const GroupV2 = GroupV2Import;
|
|
18
|
+
export const Tokens = TokensImport;
|
|
19
|
+
export const Destiny2 = Destiny2Import;
|
|
20
|
+
export const CommunityContent = CommunityContentImport;
|
|
21
|
+
export const Trending = TrendingImport;
|
|
22
|
+
export const Fireteam = FireteamImport;
|
|
23
|
+
export const Social = SocialImport;
|
|
24
|
+
export const Core = CoreImport;
|
package/lib/package.json
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bungie-api-ts",
|
|
3
|
+
"version": "5.10.0",
|
|
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
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
export interface IgnoreResponse {
|
|
13
|
+
readonly isIgnored: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* This enum represents a set of flags - use bitwise operators to check which of
|
|
16
|
+
* these match your value.
|
|
17
|
+
*/
|
|
18
|
+
readonly ignoreFlags: IgnoreStatus;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* This enum represents a set of flags - use bitwise operators to check which of
|
|
22
|
+
* these match your value.
|
|
23
|
+
*/
|
|
24
|
+
export declare const enum IgnoreStatus {
|
|
25
|
+
NotIgnored = 0,
|
|
26
|
+
IgnoredUser = 1,
|
|
27
|
+
IgnoredGroup = 2,
|
|
28
|
+
IgnoredByGroup = 4,
|
|
29
|
+
IgnoredPost = 8,
|
|
30
|
+
IgnoredTag = 16,
|
|
31
|
+
IgnoredGlobal = 32
|
|
32
|
+
}
|
|
33
|
+
export interface TagResponse {
|
|
34
|
+
readonly tagText: string;
|
|
35
|
+
readonly ignoreStatus: IgnoreResponse;
|
|
36
|
+
}
|
package/lib/platform.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bungie.Net API
|
|
3
|
+
* These endpoints constitute the functionality exposed by Bungie.net, both for more traditional website functionality and for connectivity to Bungie video games and their related functionality.
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 2.21.9
|
|
6
|
+
* Contact: support@bungie.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the bungie-api-ts code generator program.
|
|
9
|
+
* https://github.com/DestinyItemManager/bungie-api-ts
|
|
10
|
+
* Do not edit these files manually.
|
|
11
|
+
*/
|
|
12
|
+
import { HttpClient } from '../http.js';
|
|
13
|
+
import {
|
|
14
|
+
BungieFriendListResponse,
|
|
15
|
+
BungieFriendRequestListResponse,
|
|
16
|
+
PlatformFriendResponse,
|
|
17
|
+
PlatformFriendType,
|
|
18
|
+
} from './interfaces.js';
|
|
19
|
+
import { ServerResponse } from '../common.js';
|
|
20
|
+
/** Returns your Bungie Friend list */
|
|
21
|
+
export declare function getFriendList(
|
|
22
|
+
http: HttpClient
|
|
23
|
+
): Promise<ServerResponse<BungieFriendListResponse>>;
|
|
24
|
+
/** Returns your friend request queue. */
|
|
25
|
+
export declare function getFriendRequestList(
|
|
26
|
+
http: HttpClient
|
|
27
|
+
): Promise<ServerResponse<BungieFriendRequestListResponse>>;
|
|
28
|
+
export interface IssueFriendRequestParams {
|
|
29
|
+
/** The membership id of the user you wish to add. */
|
|
30
|
+
membershipId: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Requests a friend relationship with the target user. Any of the target user's
|
|
34
|
+
* linked membership ids are valid inputs.
|
|
35
|
+
*/
|
|
36
|
+
export declare function issueFriendRequest(
|
|
37
|
+
http: HttpClient,
|
|
38
|
+
params: IssueFriendRequestParams
|
|
39
|
+
): Promise<ServerResponse<boolean>>;
|
|
40
|
+
export interface AcceptFriendRequestParams {
|
|
41
|
+
/** The membership id of the user you wish to accept. */
|
|
42
|
+
membershipId: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Accepts a friend relationship with the target user. The user must be on your
|
|
46
|
+
* incoming friend request list, though no error will occur if they are not.
|
|
47
|
+
*/
|
|
48
|
+
export declare function acceptFriendRequest(
|
|
49
|
+
http: HttpClient,
|
|
50
|
+
params: AcceptFriendRequestParams
|
|
51
|
+
): Promise<ServerResponse<boolean>>;
|
|
52
|
+
export interface DeclineFriendRequestParams {
|
|
53
|
+
/** The membership id of the user you wish to decline. */
|
|
54
|
+
membershipId: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Declines a friend relationship with the target user. The user must be on your
|
|
58
|
+
* incoming friend request list, though no error will occur if they are not.
|
|
59
|
+
*/
|
|
60
|
+
export declare function declineFriendRequest(
|
|
61
|
+
http: HttpClient,
|
|
62
|
+
params: DeclineFriendRequestParams
|
|
63
|
+
): Promise<ServerResponse<boolean>>;
|
|
64
|
+
export interface RemoveFriendParams {
|
|
65
|
+
/** The membership id of the user you wish to remove. */
|
|
66
|
+
membershipId: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Remove a friend relationship with the target user. The user must be on your
|
|
70
|
+
* friend list, though no error will occur if they are not.
|
|
71
|
+
*/
|
|
72
|
+
export declare function removeFriend(
|
|
73
|
+
http: HttpClient,
|
|
74
|
+
params: RemoveFriendParams
|
|
75
|
+
): Promise<ServerResponse<boolean>>;
|
|
76
|
+
export interface RemoveFriendRequestParams {
|
|
77
|
+
/** The membership id of the user you wish to remove. */
|
|
78
|
+
membershipId: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Remove a friend relationship with the target user. The user must be on your
|
|
82
|
+
* outgoing request friend list, though no error will occur if they are not.
|
|
83
|
+
*/
|
|
84
|
+
export declare function removeFriendRequest(
|
|
85
|
+
http: HttpClient,
|
|
86
|
+
params: RemoveFriendRequestParams
|
|
87
|
+
): Promise<ServerResponse<boolean>>;
|
|
88
|
+
export interface GetPlatformFriendListParams {
|
|
89
|
+
/** The platform friend type. */
|
|
90
|
+
friendPlatform: PlatformFriendType;
|
|
91
|
+
/** The zero based page to return. Page size is 100. */
|
|
92
|
+
page: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Gets the platform friend of the requested type, with additional information if
|
|
96
|
+
* they have Bungie accounts. Must have a recent login session with said platform.
|
|
97
|
+
*/
|
|
98
|
+
export declare function getPlatformFriendList(
|
|
99
|
+
http: HttpClient,
|
|
100
|
+
params: GetPlatformFriendListParams
|
|
101
|
+
): Promise<ServerResponse<PlatformFriendResponse>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { get, post } from '../http.js';
|
|
2
|
+
const API_BASE = 'https://www.bungie.net/Platform/Social/';
|
|
3
|
+
export function getFriendList(http) {
|
|
4
|
+
return get(http, `${API_BASE}Friends/`);
|
|
5
|
+
}
|
|
6
|
+
export function getFriendRequestList(http) {
|
|
7
|
+
return get(http, `${API_BASE}Friends/Requests/`);
|
|
8
|
+
}
|
|
9
|
+
export function issueFriendRequest(http, params) {
|
|
10
|
+
return post(http, `${API_BASE}Friends/Add/${params.membershipId}/`);
|
|
11
|
+
}
|
|
12
|
+
export function acceptFriendRequest(http, params) {
|
|
13
|
+
return post(http, `${API_BASE}Friends/Requests/Accept/${params.membershipId}/`);
|
|
14
|
+
}
|
|
15
|
+
export function declineFriendRequest(http, params) {
|
|
16
|
+
return post(http, `${API_BASE}Friends/Requests/Decline/${params.membershipId}/`);
|
|
17
|
+
}
|
|
18
|
+
export function removeFriend(http, params) {
|
|
19
|
+
return post(http, `${API_BASE}Friends/Remove/${params.membershipId}/`);
|
|
20
|
+
}
|
|
21
|
+
export function removeFriendRequest(http, params) {
|
|
22
|
+
return post(http, `${API_BASE}Friends/Requests/Remove/${params.membershipId}/`);
|
|
23
|
+
}
|
|
24
|
+
export function getPlatformFriendList(http, params) {
|
|
25
|
+
return get(http, `${API_BASE}PlatformFriends/${params.friendPlatform}/${params.page}/`);
|
|
26
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export * from '../common.js';
|
|
13
|
+
export * from '../platform.js';
|
|
14
|
+
export type { HttpClientConfig, HttpClient } from '../http.js';
|
|
15
|
+
export * from './api.js';
|
|
16
|
+
export * from './interfaces.js';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bungie.Net API
|
|
3
|
+
* These endpoints constitute the functionality exposed by Bungie.net, both for more traditional website functionality and for connectivity to Bungie video games and their related functionality.
|
|
4
|
+
*
|
|
5
|
+
* OpenAPI spec version: 2.21.9
|
|
6
|
+
* Contact: support@bungie.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by the bungie-api-ts code generator program.
|
|
9
|
+
* https://github.com/DestinyItemManager/bungie-api-ts
|
|
10
|
+
* Do not edit these files manually.
|
|
11
|
+
*/
|
|
12
|
+
import { BungieMembershipType } from '../common.js';
|
|
13
|
+
import { GeneralUser } from '../user/interfaces.js';
|
|
14
|
+
export declare const enum PlatformFriendType {
|
|
15
|
+
Unknown = 0,
|
|
16
|
+
Xbox = 1,
|
|
17
|
+
PSN = 2,
|
|
18
|
+
Steam = 3,
|
|
19
|
+
Egs = 4,
|
|
20
|
+
}
|
|
21
|
+
export interface BungieFriendListResponse {
|
|
22
|
+
readonly friends: BungieFriend[];
|
|
23
|
+
}
|
|
24
|
+
export interface BungieFriend {
|
|
25
|
+
readonly lastSeenAsMembershipId: string;
|
|
26
|
+
readonly lastSeenAsBungieMembershipType: BungieMembershipType;
|
|
27
|
+
readonly bungieGlobalDisplayName: string;
|
|
28
|
+
readonly bungieGlobalDisplayNameCode?: number;
|
|
29
|
+
readonly onlineStatus: PresenceStatus;
|
|
30
|
+
/**
|
|
31
|
+
* This enum represents a set of flags - use bitwise operators to check which of
|
|
32
|
+
* these match your value.
|
|
33
|
+
*/
|
|
34
|
+
readonly onlineTitle: PresenceOnlineStateFlags;
|
|
35
|
+
readonly relationship: FriendRelationshipState;
|
|
36
|
+
readonly bungieNetUser: GeneralUser;
|
|
37
|
+
}
|
|
38
|
+
export declare const enum PresenceStatus {
|
|
39
|
+
OfflineOrUnknown = 0,
|
|
40
|
+
Online = 1,
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* This enum represents a set of flags - use bitwise operators to check which of
|
|
44
|
+
* these match your value.
|
|
45
|
+
*/
|
|
46
|
+
export declare const enum PresenceOnlineStateFlags {
|
|
47
|
+
None = 0,
|
|
48
|
+
Destiny1 = 1,
|
|
49
|
+
Destiny2 = 2,
|
|
50
|
+
}
|
|
51
|
+
export declare const enum FriendRelationshipState {
|
|
52
|
+
Unknown = 0,
|
|
53
|
+
Friend = 1,
|
|
54
|
+
IncomingRequest = 2,
|
|
55
|
+
OutgoingRequest = 3,
|
|
56
|
+
}
|
|
57
|
+
export interface BungieFriendRequestListResponse {
|
|
58
|
+
readonly incomingRequests: BungieFriend[];
|
|
59
|
+
readonly outgoingRequests: BungieFriend[];
|
|
60
|
+
}
|
|
61
|
+
export interface PlatformFriendResponse {
|
|
62
|
+
readonly itemsPerPage: number;
|
|
63
|
+
readonly currentPage: number;
|
|
64
|
+
readonly hasMore: boolean;
|
|
65
|
+
readonly platformFriends: PlatformFriend[];
|
|
66
|
+
}
|
|
67
|
+
export interface PlatformFriend {
|
|
68
|
+
readonly platformDisplayName: string;
|
|
69
|
+
readonly friendPlatform: PlatformFriendType;
|
|
70
|
+
readonly destinyMembershipId?: string;
|
|
71
|
+
readonly destinyMembershipType?: BungieMembershipType;
|
|
72
|
+
readonly bungieNetMembershipId?: string;
|
|
73
|
+
readonly bungieGlobalDisplayName: string;
|
|
74
|
+
readonly bungieGlobalDisplayNameCode?: number;
|
|
75
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export var PlatformFriendType = {
|
|
2
|
+
Unknown: 0,
|
|
3
|
+
Xbox: 1,
|
|
4
|
+
PSN: 2,
|
|
5
|
+
Steam: 3,
|
|
6
|
+
Egs: 4,
|
|
7
|
+
};
|
|
8
|
+
export var PresenceStatus = {
|
|
9
|
+
OfflineOrUnknown: 0,
|
|
10
|
+
Online: 1,
|
|
11
|
+
};
|
|
12
|
+
export var PresenceOnlineStateFlags = {
|
|
13
|
+
None: 0,
|
|
14
|
+
Destiny1: 1,
|
|
15
|
+
Destiny2: 2,
|
|
16
|
+
};
|
|
17
|
+
export var FriendRelationshipState = {
|
|
18
|
+
Unknown: 0,
|
|
19
|
+
Friend: 1,
|
|
20
|
+
IncomingRequest: 2,
|
|
21
|
+
OutgoingRequest: 3,
|
|
22
|
+
};
|