@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,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,166 @@
|
|
|
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, PagedQuery } from '../common.js';
|
|
13
|
+
import { UserInfoCard } from '../user/interfaces.js';
|
|
14
|
+
export declare const enum FireteamDateRange {
|
|
15
|
+
All = 0,
|
|
16
|
+
Now = 1,
|
|
17
|
+
TwentyFourHours = 2,
|
|
18
|
+
FortyEightHours = 3,
|
|
19
|
+
ThisWeek = 4,
|
|
20
|
+
}
|
|
21
|
+
export declare const enum FireteamPlatform {
|
|
22
|
+
Any = 0,
|
|
23
|
+
Playstation4 = 1,
|
|
24
|
+
XboxOne = 2,
|
|
25
|
+
Blizzard = 3,
|
|
26
|
+
Steam = 4,
|
|
27
|
+
Stadia = 5,
|
|
28
|
+
Egs = 6,
|
|
29
|
+
}
|
|
30
|
+
export declare const enum FireteamPublicSearchOption {
|
|
31
|
+
PublicAndPrivate = 0,
|
|
32
|
+
PublicOnly = 1,
|
|
33
|
+
PrivateOnly = 2,
|
|
34
|
+
}
|
|
35
|
+
export declare const enum FireteamSlotSearch {
|
|
36
|
+
NoSlotRestriction = 0,
|
|
37
|
+
HasOpenPlayerSlots = 1,
|
|
38
|
+
HasOpenPlayerOrAltSlots = 2,
|
|
39
|
+
}
|
|
40
|
+
export interface SearchResultOfFireteamSummary {
|
|
41
|
+
readonly results: FireteamSummary[];
|
|
42
|
+
readonly totalResults: number;
|
|
43
|
+
readonly hasMore: boolean;
|
|
44
|
+
readonly query: PagedQuery;
|
|
45
|
+
readonly replacementContinuationToken: string;
|
|
46
|
+
/**
|
|
47
|
+
* If useTotalResults is true, then totalResults represents an accurate count.
|
|
48
|
+
*
|
|
49
|
+
* If False, it does not, and may be estimated/only the size of the current page.
|
|
50
|
+
*
|
|
51
|
+
* Either way, you should probably always only trust hasMore.
|
|
52
|
+
*
|
|
53
|
+
* This is a long-held historical throwback to when we used to do paging with known
|
|
54
|
+
* total results. Those queries toasted our database, and we were left to hastily
|
|
55
|
+
* alter our endpoints and create backward- compatible shims, of which
|
|
56
|
+
* useTotalResults is one.
|
|
57
|
+
*/
|
|
58
|
+
readonly useTotalResults: boolean;
|
|
59
|
+
}
|
|
60
|
+
export interface FireteamSummary {
|
|
61
|
+
readonly fireteamId: string;
|
|
62
|
+
readonly groupId: string;
|
|
63
|
+
readonly platform: FireteamPlatform;
|
|
64
|
+
readonly activityType: number;
|
|
65
|
+
readonly isImmediate: boolean;
|
|
66
|
+
readonly scheduledTime?: string;
|
|
67
|
+
readonly ownerMembershipId: string;
|
|
68
|
+
readonly playerSlotCount: number;
|
|
69
|
+
readonly alternateSlotCount?: number;
|
|
70
|
+
readonly availablePlayerSlotCount: number;
|
|
71
|
+
readonly availableAlternateSlotCount: number;
|
|
72
|
+
readonly title: string;
|
|
73
|
+
readonly dateCreated: string;
|
|
74
|
+
readonly dateModified?: string;
|
|
75
|
+
readonly isPublic: boolean;
|
|
76
|
+
readonly locale: string;
|
|
77
|
+
readonly isValid: boolean;
|
|
78
|
+
readonly datePlayerModified: string;
|
|
79
|
+
readonly titleBeforeModeration: string;
|
|
80
|
+
/** Mapped to DestinyGuardianRankDefinition in the manifest. */
|
|
81
|
+
readonly ownerCurrentGuardianRankSnapshot: number;
|
|
82
|
+
/** Mapped to DestinyGuardianRankDefinition in the manifest. */
|
|
83
|
+
readonly ownerHighestLifetimeGuardianRankSnapshot: number;
|
|
84
|
+
readonly ownerTotalCommendationScoreSnapshot: number;
|
|
85
|
+
}
|
|
86
|
+
export interface SearchResultOfFireteamResponse {
|
|
87
|
+
readonly results: FireteamResponse[];
|
|
88
|
+
readonly totalResults: number;
|
|
89
|
+
readonly hasMore: boolean;
|
|
90
|
+
readonly query: PagedQuery;
|
|
91
|
+
readonly replacementContinuationToken: string;
|
|
92
|
+
/**
|
|
93
|
+
* If useTotalResults is true, then totalResults represents an accurate count.
|
|
94
|
+
*
|
|
95
|
+
* If False, it does not, and may be estimated/only the size of the current page.
|
|
96
|
+
*
|
|
97
|
+
* Either way, you should probably always only trust hasMore.
|
|
98
|
+
*
|
|
99
|
+
* This is a long-held historical throwback to when we used to do paging with known
|
|
100
|
+
* total results. Those queries toasted our database, and we were left to hastily
|
|
101
|
+
* alter our endpoints and create backward- compatible shims, of which
|
|
102
|
+
* useTotalResults is one.
|
|
103
|
+
*/
|
|
104
|
+
readonly useTotalResults: boolean;
|
|
105
|
+
}
|
|
106
|
+
export interface FireteamResponse {
|
|
107
|
+
readonly Summary: FireteamSummary;
|
|
108
|
+
readonly Members: FireteamMember[];
|
|
109
|
+
readonly Alternates: FireteamMember[];
|
|
110
|
+
}
|
|
111
|
+
export interface FireteamMember {
|
|
112
|
+
readonly destinyUserInfo: FireteamUserInfoCard;
|
|
113
|
+
readonly bungieNetUserInfo: UserInfoCard;
|
|
114
|
+
readonly characterId: string;
|
|
115
|
+
readonly dateJoined: string;
|
|
116
|
+
readonly hasMicrophone: boolean;
|
|
117
|
+
readonly lastPlatformInviteAttemptDate: string;
|
|
118
|
+
readonly lastPlatformInviteAttemptResult: FireteamPlatformInviteResult;
|
|
119
|
+
}
|
|
120
|
+
export interface FireteamUserInfoCard {
|
|
121
|
+
readonly FireteamDisplayName: string;
|
|
122
|
+
readonly FireteamMembershipType: BungieMembershipType;
|
|
123
|
+
/**
|
|
124
|
+
* A platform specific additional display name - ex: psn Real Name, bnet Unique
|
|
125
|
+
* Name, etc.
|
|
126
|
+
*/
|
|
127
|
+
readonly supplementalDisplayName: string;
|
|
128
|
+
/** URL the Icon if available. */
|
|
129
|
+
readonly iconPath: string;
|
|
130
|
+
/**
|
|
131
|
+
* If there is a cross save override in effect, this value will tell you the type
|
|
132
|
+
* that is overridding this one.
|
|
133
|
+
*/
|
|
134
|
+
readonly crossSaveOverride: BungieMembershipType;
|
|
135
|
+
/**
|
|
136
|
+
* The list of Membership Types indicating the platforms on which this Membership
|
|
137
|
+
* can be used.
|
|
138
|
+
*
|
|
139
|
+
* Not in Cross Save = its original membership type. Cross Save Primary = Any
|
|
140
|
+
* membership types it is overridding, and its original membership type Cross Save
|
|
141
|
+
* Overridden = Empty list
|
|
142
|
+
*/
|
|
143
|
+
readonly applicableMembershipTypes: BungieMembershipType[];
|
|
144
|
+
/** If True, this is a public user membership. */
|
|
145
|
+
readonly isPublic: boolean;
|
|
146
|
+
/** Type of the membership. Not necessarily the native type. */
|
|
147
|
+
readonly membershipType: BungieMembershipType;
|
|
148
|
+
/** Membership ID as they user is known in the Accounts service */
|
|
149
|
+
readonly membershipId: string;
|
|
150
|
+
/**
|
|
151
|
+
* Display Name the player has chosen for themselves. The display name is optional
|
|
152
|
+
* when the data type is used as input to a platform API.
|
|
153
|
+
*/
|
|
154
|
+
readonly displayName: string;
|
|
155
|
+
/** The bungie global display name, if set. */
|
|
156
|
+
readonly bungieGlobalDisplayName: string;
|
|
157
|
+
/** The bungie global display name code, if set. */
|
|
158
|
+
readonly bungieGlobalDisplayNameCode?: number;
|
|
159
|
+
}
|
|
160
|
+
export declare const enum FireteamPlatformInviteResult {
|
|
161
|
+
None = 0,
|
|
162
|
+
Success = 1,
|
|
163
|
+
AlreadyInFireteam = 2,
|
|
164
|
+
Throttled = 3,
|
|
165
|
+
ServiceError = 4,
|
|
166
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export var FireteamDateRange = {
|
|
2
|
+
All: 0,
|
|
3
|
+
Now: 1,
|
|
4
|
+
TwentyFourHours: 2,
|
|
5
|
+
FortyEightHours: 3,
|
|
6
|
+
ThisWeek: 4,
|
|
7
|
+
};
|
|
8
|
+
export var FireteamPlatform = {
|
|
9
|
+
Any: 0,
|
|
10
|
+
Playstation4: 1,
|
|
11
|
+
XboxOne: 2,
|
|
12
|
+
Blizzard: 3,
|
|
13
|
+
Steam: 4,
|
|
14
|
+
Stadia: 5,
|
|
15
|
+
Egs: 6,
|
|
16
|
+
};
|
|
17
|
+
export var FireteamPublicSearchOption = {
|
|
18
|
+
PublicAndPrivate: 0,
|
|
19
|
+
PublicOnly: 1,
|
|
20
|
+
PrivateOnly: 2,
|
|
21
|
+
};
|
|
22
|
+
export var FireteamSlotSearch = {
|
|
23
|
+
NoSlotRestriction: 0,
|
|
24
|
+
HasOpenPlayerSlots: 1,
|
|
25
|
+
HasOpenPlayerOrAltSlots: 2,
|
|
26
|
+
};
|
|
27
|
+
export var FireteamPlatformInviteResult = {
|
|
28
|
+
None: 0,
|
|
29
|
+
Success: 1,
|
|
30
|
+
AlreadyInFireteam: 2,
|
|
31
|
+
Throttled: 3,
|
|
32
|
+
ServiceError: 4,
|
|
33
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
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
|
+
ForumPostSortEnum,
|
|
15
|
+
ForumRecruitmentDetail,
|
|
16
|
+
ForumTopicsCategoryFiltersEnum,
|
|
17
|
+
ForumTopicsQuickDateEnum,
|
|
18
|
+
ForumTopicsSortEnum,
|
|
19
|
+
PostSearchResponse,
|
|
20
|
+
} from './interfaces.js';
|
|
21
|
+
import { ServerResponse } from '../common.js';
|
|
22
|
+
import { TagResponse } from '../platform.js';
|
|
23
|
+
export interface GetTopicsPagedParams {
|
|
24
|
+
/** A category filter */
|
|
25
|
+
categoryFilter: ForumTopicsCategoryFiltersEnum;
|
|
26
|
+
/** The group, if any. */
|
|
27
|
+
group: string;
|
|
28
|
+
/**
|
|
29
|
+
* Comma seperated list of locales posts must match to return in the result list.
|
|
30
|
+
* Default 'en'
|
|
31
|
+
*/
|
|
32
|
+
locales?: string;
|
|
33
|
+
/** Zero paged page number */
|
|
34
|
+
page: number;
|
|
35
|
+
/** Unused */
|
|
36
|
+
pageSize: number;
|
|
37
|
+
/** A date filter. */
|
|
38
|
+
quickDate: ForumTopicsQuickDateEnum;
|
|
39
|
+
/** The sort mode. */
|
|
40
|
+
sort: ForumTopicsSortEnum;
|
|
41
|
+
/** The tags to search, if any. */
|
|
42
|
+
tagstring?: string;
|
|
43
|
+
}
|
|
44
|
+
/** Get topics from any forum. */
|
|
45
|
+
export declare function getTopicsPaged(
|
|
46
|
+
http: HttpClient,
|
|
47
|
+
params: GetTopicsPagedParams
|
|
48
|
+
): Promise<ServerResponse<PostSearchResponse>>;
|
|
49
|
+
export interface GetCoreTopicsPagedParams {
|
|
50
|
+
/** The category filter. */
|
|
51
|
+
categoryFilter: ForumTopicsCategoryFiltersEnum;
|
|
52
|
+
/**
|
|
53
|
+
* Comma seperated list of locales posts must match to return in the result list.
|
|
54
|
+
* Default 'en'
|
|
55
|
+
*/
|
|
56
|
+
locales?: string;
|
|
57
|
+
/** Zero base page */
|
|
58
|
+
page: number;
|
|
59
|
+
/** The date filter. */
|
|
60
|
+
quickDate: ForumTopicsQuickDateEnum;
|
|
61
|
+
/** The sort mode. */
|
|
62
|
+
sort: ForumTopicsSortEnum;
|
|
63
|
+
}
|
|
64
|
+
/** Gets a listing of all topics marked as part of the core group. */
|
|
65
|
+
export declare function getCoreTopicsPaged(
|
|
66
|
+
http: HttpClient,
|
|
67
|
+
params: GetCoreTopicsPagedParams
|
|
68
|
+
): Promise<ServerResponse<PostSearchResponse>>;
|
|
69
|
+
export interface GetPostsThreadedPagedParams {
|
|
70
|
+
getParentPost: boolean;
|
|
71
|
+
page: number;
|
|
72
|
+
pageSize: number;
|
|
73
|
+
parentPostId: string;
|
|
74
|
+
replySize: number;
|
|
75
|
+
rootThreadMode: boolean;
|
|
76
|
+
/** If this value is not null or empty, banned posts are requested to be returned */
|
|
77
|
+
showbanned?: string;
|
|
78
|
+
sortMode: ForumPostSortEnum;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Returns a thread of posts at the given parent, optionally returning replies to
|
|
82
|
+
* those posts as well as the original parent.
|
|
83
|
+
*/
|
|
84
|
+
export declare function getPostsThreadedPaged(
|
|
85
|
+
http: HttpClient,
|
|
86
|
+
params: GetPostsThreadedPagedParams
|
|
87
|
+
): Promise<ServerResponse<PostSearchResponse>>;
|
|
88
|
+
export interface GetPostsThreadedPagedFromChildParams {
|
|
89
|
+
childPostId: string;
|
|
90
|
+
page: number;
|
|
91
|
+
pageSize: number;
|
|
92
|
+
replySize: number;
|
|
93
|
+
rootThreadMode: boolean;
|
|
94
|
+
/** If this value is not null or empty, banned posts are requested to be returned */
|
|
95
|
+
showbanned?: string;
|
|
96
|
+
sortMode: ForumPostSortEnum;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Returns a thread of posts starting at the topicId of the input childPostId,
|
|
100
|
+
* optionally returning replies to those posts as well as the original parent.
|
|
101
|
+
*/
|
|
102
|
+
export declare function getPostsThreadedPagedFromChild(
|
|
103
|
+
http: HttpClient,
|
|
104
|
+
params: GetPostsThreadedPagedFromChildParams
|
|
105
|
+
): Promise<ServerResponse<PostSearchResponse>>;
|
|
106
|
+
export interface GetPostAndParentParams {
|
|
107
|
+
childPostId: string;
|
|
108
|
+
/** If this value is not null or empty, banned posts are requested to be returned */
|
|
109
|
+
showbanned?: string;
|
|
110
|
+
}
|
|
111
|
+
/** Returns the post specified and its immediate parent. */
|
|
112
|
+
export declare function getPostAndParent(
|
|
113
|
+
http: HttpClient,
|
|
114
|
+
params: GetPostAndParentParams
|
|
115
|
+
): Promise<ServerResponse<PostSearchResponse>>;
|
|
116
|
+
export interface GetPostAndParentAwaitingApprovalParams {
|
|
117
|
+
childPostId: string;
|
|
118
|
+
/** If this value is not null or empty, banned posts are requested to be returned */
|
|
119
|
+
showbanned?: string;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Returns the post specified and its immediate parent of posts that are awaiting
|
|
123
|
+
* approval.
|
|
124
|
+
*/
|
|
125
|
+
export declare function getPostAndParentAwaitingApproval(
|
|
126
|
+
http: HttpClient,
|
|
127
|
+
params: GetPostAndParentAwaitingApprovalParams
|
|
128
|
+
): Promise<ServerResponse<PostSearchResponse>>;
|
|
129
|
+
export interface GetTopicForContentParams {
|
|
130
|
+
contentId: string;
|
|
131
|
+
}
|
|
132
|
+
/** Gets the post Id for the given content item's comments, if it exists. */
|
|
133
|
+
export declare function getTopicForContent(
|
|
134
|
+
http: HttpClient,
|
|
135
|
+
params: GetTopicForContentParams
|
|
136
|
+
): Promise<ServerResponse<string>>;
|
|
137
|
+
export interface GetForumTagSuggestionsParams {
|
|
138
|
+
/** The partial tag input to generate suggestions from. */
|
|
139
|
+
partialtag?: string;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Gets tag suggestions based on partial text entry, matching them with other tags
|
|
143
|
+
* previously used in the forums.
|
|
144
|
+
*/
|
|
145
|
+
export declare function getForumTagSuggestions(
|
|
146
|
+
http: HttpClient,
|
|
147
|
+
params: GetForumTagSuggestionsParams
|
|
148
|
+
): Promise<ServerResponse<TagResponse[]>>;
|
|
149
|
+
export interface GetPollParams {
|
|
150
|
+
/** The post id of the topic that has the poll. */
|
|
151
|
+
topicId: string;
|
|
152
|
+
}
|
|
153
|
+
/** Gets the specified forum poll. */
|
|
154
|
+
export declare function getPoll(
|
|
155
|
+
http: HttpClient,
|
|
156
|
+
params: GetPollParams
|
|
157
|
+
): Promise<ServerResponse<PostSearchResponse>>;
|
|
158
|
+
/**
|
|
159
|
+
* Allows the caller to get a list of to 25 recruitment thread summary information
|
|
160
|
+
* objects.
|
|
161
|
+
*/
|
|
162
|
+
export declare function getRecruitmentThreadSummaries(
|
|
163
|
+
http: HttpClient,
|
|
164
|
+
body: string[]
|
|
165
|
+
): Promise<ServerResponse<ForumRecruitmentDetail[]>>;
|
package/lib/forum/api.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { get, post } from '../http.js';
|
|
2
|
+
const API_BASE = 'https://www.bungie.net/Platform/Forum/';
|
|
3
|
+
export function getTopicsPaged(http, params) {
|
|
4
|
+
const strParams = {};
|
|
5
|
+
if (params.locales !== undefined) {
|
|
6
|
+
strParams.locales = params.locales;
|
|
7
|
+
}
|
|
8
|
+
if (params.tagstring !== undefined) {
|
|
9
|
+
strParams.tagstring = params.tagstring;
|
|
10
|
+
}
|
|
11
|
+
return get(
|
|
12
|
+
http,
|
|
13
|
+
`${API_BASE}GetTopicsPaged/${params.page}/${params.pageSize}/${params.group}/${params.sort}/${params.quickDate}/${params.categoryFilter}/`,
|
|
14
|
+
strParams
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
export function getCoreTopicsPaged(http, params) {
|
|
18
|
+
const strParams = {};
|
|
19
|
+
if (params.locales !== undefined) {
|
|
20
|
+
strParams.locales = params.locales;
|
|
21
|
+
}
|
|
22
|
+
return get(
|
|
23
|
+
http,
|
|
24
|
+
`${API_BASE}GetCoreTopicsPaged/${params.page}/${params.sort}/${params.quickDate}/${params.categoryFilter}/`,
|
|
25
|
+
strParams
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
export function getPostsThreadedPaged(http, params) {
|
|
29
|
+
const strParams = {};
|
|
30
|
+
if (params.showbanned !== undefined) {
|
|
31
|
+
strParams.showbanned = params.showbanned;
|
|
32
|
+
}
|
|
33
|
+
return get(
|
|
34
|
+
http,
|
|
35
|
+
`${API_BASE}GetPostsThreadedPaged/${params.parentPostId}/${params.page}/${params.pageSize}/${params.replySize}/${params.getParentPost}/${params.rootThreadMode}/${params.sortMode}/`,
|
|
36
|
+
strParams
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
export function getPostsThreadedPagedFromChild(http, params) {
|
|
40
|
+
const strParams = {};
|
|
41
|
+
if (params.showbanned !== undefined) {
|
|
42
|
+
strParams.showbanned = params.showbanned;
|
|
43
|
+
}
|
|
44
|
+
return get(
|
|
45
|
+
http,
|
|
46
|
+
`${API_BASE}GetPostsThreadedPagedFromChild/${params.childPostId}/${params.page}/${params.pageSize}/${params.replySize}/${params.rootThreadMode}/${params.sortMode}/`,
|
|
47
|
+
strParams
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
export function getPostAndParent(http, params) {
|
|
51
|
+
const strParams = {};
|
|
52
|
+
if (params.showbanned !== undefined) {
|
|
53
|
+
strParams.showbanned = params.showbanned;
|
|
54
|
+
}
|
|
55
|
+
return get(http, `${API_BASE}GetPostAndParent/${params.childPostId}/`, strParams);
|
|
56
|
+
}
|
|
57
|
+
export function getPostAndParentAwaitingApproval(http, params) {
|
|
58
|
+
const strParams = {};
|
|
59
|
+
if (params.showbanned !== undefined) {
|
|
60
|
+
strParams.showbanned = params.showbanned;
|
|
61
|
+
}
|
|
62
|
+
return get(http, `${API_BASE}GetPostAndParentAwaitingApproval/${params.childPostId}/`, strParams);
|
|
63
|
+
}
|
|
64
|
+
export function getTopicForContent(http, params) {
|
|
65
|
+
return get(http, `${API_BASE}GetTopicForContent/${params.contentId}/`);
|
|
66
|
+
}
|
|
67
|
+
export function getForumTagSuggestions(http, params) {
|
|
68
|
+
const strParams = {};
|
|
69
|
+
if (params.partialtag !== undefined) {
|
|
70
|
+
strParams.partialtag = params.partialtag;
|
|
71
|
+
}
|
|
72
|
+
return get(http, `${API_BASE}GetForumTagSuggestions/`, strParams);
|
|
73
|
+
}
|
|
74
|
+
export function getPoll(http, params) {
|
|
75
|
+
return get(http, `${API_BASE}Poll/${params.topicId}/`);
|
|
76
|
+
}
|
|
77
|
+
export function getRecruitmentThreadSummaries(http, body) {
|
|
78
|
+
return post(http, `${API_BASE}Recruit/Summaries/`, body);
|
|
79
|
+
}
|
|
@@ -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,147 @@
|
|
|
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 { GeneralUser } from '../user/interfaces.js';
|
|
13
|
+
import { GroupResponse } from '../groupv2/interfaces.js';
|
|
14
|
+
import { IgnoreResponse, TagResponse } from '../platform.js';
|
|
15
|
+
import { PagedQuery } from '../common.js';
|
|
16
|
+
/**
|
|
17
|
+
* This enum represents a set of flags - use bitwise operators to check which of
|
|
18
|
+
* these match your value.
|
|
19
|
+
*/
|
|
20
|
+
export declare const enum ForumTopicsCategoryFiltersEnum {
|
|
21
|
+
None = 0,
|
|
22
|
+
Links = 1,
|
|
23
|
+
Questions = 2,
|
|
24
|
+
AnsweredQuestions = 4,
|
|
25
|
+
Media = 8,
|
|
26
|
+
TextOnly = 16,
|
|
27
|
+
Announcement = 32,
|
|
28
|
+
BungieOfficial = 64,
|
|
29
|
+
Polls = 128,
|
|
30
|
+
}
|
|
31
|
+
export declare const enum ForumTopicsQuickDateEnum {
|
|
32
|
+
All = 0,
|
|
33
|
+
LastYear = 1,
|
|
34
|
+
LastMonth = 2,
|
|
35
|
+
LastWeek = 3,
|
|
36
|
+
LastDay = 4,
|
|
37
|
+
}
|
|
38
|
+
export declare const enum ForumTopicsSortEnum {
|
|
39
|
+
Default = 0,
|
|
40
|
+
LastReplied = 1,
|
|
41
|
+
MostReplied = 2,
|
|
42
|
+
Popularity = 3,
|
|
43
|
+
Controversiality = 4,
|
|
44
|
+
Liked = 5,
|
|
45
|
+
HighestRated = 6,
|
|
46
|
+
MostUpvoted = 7,
|
|
47
|
+
}
|
|
48
|
+
export declare const enum ForumPostSortEnum {
|
|
49
|
+
Default = 0,
|
|
50
|
+
OldestFirst = 1,
|
|
51
|
+
}
|
|
52
|
+
export interface PostSearchResponse {
|
|
53
|
+
readonly relatedPosts: PostResponse[];
|
|
54
|
+
readonly authors: GeneralUser[];
|
|
55
|
+
readonly groups: GroupResponse[];
|
|
56
|
+
readonly searchedTags: TagResponse[];
|
|
57
|
+
readonly polls: PollResponse[];
|
|
58
|
+
readonly recruitmentDetails: ForumRecruitmentDetail[];
|
|
59
|
+
readonly availablePages?: number;
|
|
60
|
+
readonly results: PostResponse[];
|
|
61
|
+
readonly totalResults: number;
|
|
62
|
+
readonly hasMore: boolean;
|
|
63
|
+
readonly query: PagedQuery;
|
|
64
|
+
readonly replacementContinuationToken: string;
|
|
65
|
+
/**
|
|
66
|
+
* If useTotalResults is true, then totalResults represents an accurate count.
|
|
67
|
+
*
|
|
68
|
+
* If False, it does not, and may be estimated/only the size of the current page.
|
|
69
|
+
*
|
|
70
|
+
* Either way, you should probably always only trust hasMore.
|
|
71
|
+
*
|
|
72
|
+
* This is a long-held historical throwback to when we used to do paging with known
|
|
73
|
+
* total results. Those queries toasted our database, and we were left to hastily
|
|
74
|
+
* alter our endpoints and create backward- compatible shims, of which
|
|
75
|
+
* useTotalResults is one.
|
|
76
|
+
*/
|
|
77
|
+
readonly useTotalResults: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface PostResponse {
|
|
80
|
+
readonly lastReplyTimestamp: string;
|
|
81
|
+
readonly IsPinned: boolean;
|
|
82
|
+
readonly urlMediaType: ForumMediaType;
|
|
83
|
+
readonly thumbnail: string;
|
|
84
|
+
readonly popularity: ForumPostPopularity;
|
|
85
|
+
readonly isActive: boolean;
|
|
86
|
+
readonly isAnnouncement: boolean;
|
|
87
|
+
readonly userRating: number;
|
|
88
|
+
readonly userHasRated: boolean;
|
|
89
|
+
readonly userHasMutedPost: boolean;
|
|
90
|
+
readonly latestReplyPostId: string;
|
|
91
|
+
readonly latestReplyAuthorId: string;
|
|
92
|
+
readonly ignoreStatus: IgnoreResponse;
|
|
93
|
+
readonly locale: string;
|
|
94
|
+
}
|
|
95
|
+
export declare const enum ForumMediaType {
|
|
96
|
+
None = 0,
|
|
97
|
+
Image = 1,
|
|
98
|
+
Video = 2,
|
|
99
|
+
Youtube = 3,
|
|
100
|
+
}
|
|
101
|
+
export declare const enum ForumPostPopularity {
|
|
102
|
+
Empty = 0,
|
|
103
|
+
Default = 1,
|
|
104
|
+
Discussed = 2,
|
|
105
|
+
CoolStory = 3,
|
|
106
|
+
HeatingUp = 4,
|
|
107
|
+
Hot = 5,
|
|
108
|
+
}
|
|
109
|
+
export interface PollResponse {
|
|
110
|
+
readonly topicId: string;
|
|
111
|
+
readonly results: PollResult[];
|
|
112
|
+
readonly totalVotes: number;
|
|
113
|
+
}
|
|
114
|
+
export interface PollResult {
|
|
115
|
+
readonly answerText: string;
|
|
116
|
+
readonly answerSlot: number;
|
|
117
|
+
readonly lastVoteDate: string;
|
|
118
|
+
readonly votes: number;
|
|
119
|
+
readonly requestingUserVoted: boolean;
|
|
120
|
+
}
|
|
121
|
+
export interface ForumRecruitmentDetail {
|
|
122
|
+
readonly topicId: string;
|
|
123
|
+
readonly microphoneRequired: boolean;
|
|
124
|
+
readonly intensity: ForumRecruitmentIntensityLabel;
|
|
125
|
+
readonly tone: ForumRecruitmentToneLabel;
|
|
126
|
+
readonly approved: boolean;
|
|
127
|
+
readonly conversationId?: string;
|
|
128
|
+
readonly playerSlotsTotal: number;
|
|
129
|
+
readonly playerSlotsRemaining: number;
|
|
130
|
+
readonly Fireteam: GeneralUser[];
|
|
131
|
+
readonly kickedPlayerIds: string[];
|
|
132
|
+
}
|
|
133
|
+
export declare const enum ForumRecruitmentIntensityLabel {
|
|
134
|
+
None = 0,
|
|
135
|
+
Casual = 1,
|
|
136
|
+
Professional = 2,
|
|
137
|
+
}
|
|
138
|
+
export declare const enum ForumRecruitmentToneLabel {
|
|
139
|
+
None = 0,
|
|
140
|
+
FamilyFriendly = 1,
|
|
141
|
+
Rowdy = 2,
|
|
142
|
+
}
|
|
143
|
+
export declare const enum CommunityContentSortMode {
|
|
144
|
+
Trending = 0,
|
|
145
|
+
Latest = 1,
|
|
146
|
+
HighestRated = 2,
|
|
147
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export var ForumTopicsCategoryFiltersEnum = {
|
|
2
|
+
None: 0,
|
|
3
|
+
Links: 1,
|
|
4
|
+
Questions: 2,
|
|
5
|
+
AnsweredQuestions: 4,
|
|
6
|
+
Media: 8,
|
|
7
|
+
TextOnly: 16,
|
|
8
|
+
Announcement: 32,
|
|
9
|
+
BungieOfficial: 64,
|
|
10
|
+
Polls: 128,
|
|
11
|
+
};
|
|
12
|
+
export var ForumTopicsQuickDateEnum = {
|
|
13
|
+
All: 0,
|
|
14
|
+
LastYear: 1,
|
|
15
|
+
LastMonth: 2,
|
|
16
|
+
LastWeek: 3,
|
|
17
|
+
LastDay: 4,
|
|
18
|
+
};
|
|
19
|
+
export var ForumTopicsSortEnum = {
|
|
20
|
+
Default: 0,
|
|
21
|
+
LastReplied: 1,
|
|
22
|
+
MostReplied: 2,
|
|
23
|
+
Popularity: 3,
|
|
24
|
+
Controversiality: 4,
|
|
25
|
+
Liked: 5,
|
|
26
|
+
HighestRated: 6,
|
|
27
|
+
MostUpvoted: 7,
|
|
28
|
+
};
|
|
29
|
+
export var ForumPostSortEnum = {
|
|
30
|
+
Default: 0,
|
|
31
|
+
OldestFirst: 1,
|
|
32
|
+
};
|
|
33
|
+
export var ForumMediaType = {
|
|
34
|
+
None: 0,
|
|
35
|
+
Image: 1,
|
|
36
|
+
Video: 2,
|
|
37
|
+
Youtube: 3,
|
|
38
|
+
};
|
|
39
|
+
export var ForumPostPopularity = {
|
|
40
|
+
Empty: 0,
|
|
41
|
+
Default: 1,
|
|
42
|
+
Discussed: 2,
|
|
43
|
+
CoolStory: 3,
|
|
44
|
+
HeatingUp: 4,
|
|
45
|
+
Hot: 5,
|
|
46
|
+
};
|
|
47
|
+
export var ForumRecruitmentIntensityLabel = {
|
|
48
|
+
None: 0,
|
|
49
|
+
Casual: 1,
|
|
50
|
+
Professional: 2,
|
|
51
|
+
};
|
|
52
|
+
export var ForumRecruitmentToneLabel = {
|
|
53
|
+
None: 0,
|
|
54
|
+
FamilyFriendly: 1,
|
|
55
|
+
Rowdy: 2,
|
|
56
|
+
};
|
|
57
|
+
export var CommunityContentSortMode = {
|
|
58
|
+
Trending: 0,
|
|
59
|
+
Latest: 1,
|
|
60
|
+
HighestRated: 2,
|
|
61
|
+
};
|