@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,102 @@
|
|
|
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
|
+
|
|
13
|
+
import {
|
|
14
|
+
BungieMembershipType
|
|
15
|
+
} from '../common.js';
|
|
16
|
+
import {
|
|
17
|
+
DestinyCollectibleDefinition,
|
|
18
|
+
DestinyInventoryItemDefinition,
|
|
19
|
+
DestinyRecordDefinition
|
|
20
|
+
} from '../destiny2/interfaces.js';
|
|
21
|
+
|
|
22
|
+
export interface PartnerOfferClaimRequest {
|
|
23
|
+
readonly PartnerOfferId: string;
|
|
24
|
+
readonly BungieNetMembershipId: string;
|
|
25
|
+
readonly TransactionId: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface PartnerOfferSkuHistoryResponse {
|
|
29
|
+
readonly SkuIdentifier: string;
|
|
30
|
+
readonly LocalizedName: string;
|
|
31
|
+
readonly LocalizedDescription: string;
|
|
32
|
+
readonly ClaimDate: string;
|
|
33
|
+
readonly AllOffersApplied: boolean;
|
|
34
|
+
readonly TransactionId: string;
|
|
35
|
+
readonly SkuOffers: PartnerOfferHistoryResponse[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface PartnerOfferHistoryResponse {
|
|
39
|
+
readonly PartnerOfferKey: string;
|
|
40
|
+
readonly MembershipId?: string;
|
|
41
|
+
readonly MembershipType?: BungieMembershipType;
|
|
42
|
+
readonly LocalizedName: string;
|
|
43
|
+
readonly LocalizedDescription: string;
|
|
44
|
+
readonly IsConsumable: boolean;
|
|
45
|
+
readonly QuantityApplied: number;
|
|
46
|
+
readonly ApplyDate?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface PartnerRewardHistoryResponse {
|
|
50
|
+
readonly PartnerOffers: PartnerOfferSkuHistoryResponse[];
|
|
51
|
+
readonly TwitchDrops: TwitchDropHistoryResponse[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface TwitchDropHistoryResponse {
|
|
55
|
+
readonly Title: string;
|
|
56
|
+
readonly Description: string;
|
|
57
|
+
readonly CreatedAt?: string;
|
|
58
|
+
readonly ClaimState?: DropStateEnum;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const enum DropStateEnum {
|
|
62
|
+
Claimed = 0,
|
|
63
|
+
Applied = 1,
|
|
64
|
+
Fulfilled = 2
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface BungieRewardDisplay {
|
|
68
|
+
readonly UserRewardAvailabilityModel: UserRewardAvailabilityModel;
|
|
69
|
+
readonly ObjectiveDisplayProperties: RewardDisplayProperties;
|
|
70
|
+
readonly RewardDisplayProperties: RewardDisplayProperties;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface UserRewardAvailabilityModel {
|
|
74
|
+
readonly AvailabilityModel: RewardAvailabilityModel;
|
|
75
|
+
readonly IsAvailableForUser: boolean;
|
|
76
|
+
readonly IsUnlockedForUser: boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface RewardAvailabilityModel {
|
|
80
|
+
readonly HasExistingCode: boolean;
|
|
81
|
+
readonly RecordDefinitions: DestinyRecordDefinition[];
|
|
82
|
+
readonly CollectibleDefinitions: CollectibleDefinitions[];
|
|
83
|
+
readonly IsOffer: boolean;
|
|
84
|
+
readonly HasOffer: boolean;
|
|
85
|
+
readonly OfferApplied: boolean;
|
|
86
|
+
readonly DecryptedToken: string;
|
|
87
|
+
readonly IsLoyaltyReward: boolean;
|
|
88
|
+
readonly ShopifyEndDate?: string;
|
|
89
|
+
readonly GameEarnByDate: string;
|
|
90
|
+
readonly RedemptionEndDate: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface CollectibleDefinitions {
|
|
94
|
+
readonly CollectibleDefinition: DestinyCollectibleDefinition;
|
|
95
|
+
readonly DestinyInventoryItemDefinition: DestinyInventoryItemDefinition;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface RewardDisplayProperties {
|
|
99
|
+
readonly Name: string;
|
|
100
|
+
readonly Description: string;
|
|
101
|
+
readonly ImagePath: string;
|
|
102
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
|
|
13
|
+
import { HttpClient, get, post } from '../http.js';
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
SearchResultOfTrendingEntry,
|
|
17
|
+
TrendingCategories,
|
|
18
|
+
TrendingDetail,
|
|
19
|
+
TrendingEntryType
|
|
20
|
+
} from './interfaces.js';
|
|
21
|
+
import {
|
|
22
|
+
ServerResponse
|
|
23
|
+
} from '../common.js';
|
|
24
|
+
|
|
25
|
+
const API_BASE = "https://www.bungie.net/Platform/Trending/";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns trending items for Bungie.net, collapsed into the first page of items
|
|
29
|
+
* per category. For pagination within a category, call GetTrendingCategory.
|
|
30
|
+
*/
|
|
31
|
+
export function getTrendingCategories(http: HttpClient): Promise<ServerResponse<TrendingCategories>> {
|
|
32
|
+
return get(http, `${API_BASE}Categories/`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface GetTrendingCategoryParams {
|
|
36
|
+
/** The ID of the category for whom you want additional results. */
|
|
37
|
+
categoryId: string;
|
|
38
|
+
/** The page # of results to return. */
|
|
39
|
+
pageNumber: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Returns paginated lists of trending items for a category. */
|
|
43
|
+
export function getTrendingCategory(http: HttpClient, params: GetTrendingCategoryParams): Promise<ServerResponse<SearchResultOfTrendingEntry>> {
|
|
44
|
+
return get(http, `${API_BASE}Categories/${params.categoryId}/${params.pageNumber}/`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface GetTrendingEntryDetailParams {
|
|
48
|
+
/** The identifier for the entity to be returned. */
|
|
49
|
+
identifier: string;
|
|
50
|
+
/** The type of entity to be returned. */
|
|
51
|
+
trendingEntryType: TrendingEntryType;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Returns the detailed results for a specific trending entry. Note that trending
|
|
56
|
+
* entries are uniquely identified by a combination of *both* the TrendingEntryType
|
|
57
|
+
* *and* the identifier: the identifier alone is not guaranteed to be globally
|
|
58
|
+
* unique.
|
|
59
|
+
*/
|
|
60
|
+
export function getTrendingEntryDetail(http: HttpClient, params: GetTrendingEntryDetailParams): Promise<ServerResponse<TrendingDetail>> {
|
|
61
|
+
return get(http, `${API_BASE}Details/${params.trendingEntryType}/${params.identifier}/`);
|
|
62
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
|
|
13
|
+
export * from '../common.js';
|
|
14
|
+
export * from '../platform.js';
|
|
15
|
+
export type {HttpClientConfig, HttpClient} from '../http.js';
|
|
16
|
+
export * from './api.js';
|
|
17
|
+
export * from './interfaces.js';
|
|
@@ -0,0 +1,188 @@
|
|
|
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
|
+
|
|
13
|
+
import {
|
|
14
|
+
ContentItemPublicContract
|
|
15
|
+
} from '../content/interfaces.js';
|
|
16
|
+
import {
|
|
17
|
+
DestinyMilestoneContent,
|
|
18
|
+
DestinyPublicActivityStatus,
|
|
19
|
+
DestinyPublicMilestone
|
|
20
|
+
} from '../destiny2/interfaces.js';
|
|
21
|
+
import {
|
|
22
|
+
PagedQuery
|
|
23
|
+
} from '../common.js';
|
|
24
|
+
|
|
25
|
+
/** The known entity types that you can have returned from Trending. */
|
|
26
|
+
export const enum TrendingEntryType {
|
|
27
|
+
News = 0,
|
|
28
|
+
DestinyItem = 1,
|
|
29
|
+
DestinyActivity = 2,
|
|
30
|
+
DestinyRitual = 3,
|
|
31
|
+
SupportArticle = 4,
|
|
32
|
+
Creation = 5,
|
|
33
|
+
Stream = 6,
|
|
34
|
+
Update = 7,
|
|
35
|
+
Link = 8,
|
|
36
|
+
ForumTag = 9,
|
|
37
|
+
Container = 10,
|
|
38
|
+
Release = 11
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface TrendingCategories {
|
|
42
|
+
readonly categories: TrendingCategory[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface TrendingCategory {
|
|
46
|
+
readonly categoryName: string;
|
|
47
|
+
readonly entries: SearchResultOfTrendingEntry;
|
|
48
|
+
readonly categoryId: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface SearchResultOfTrendingEntry {
|
|
52
|
+
readonly results: TrendingEntry[];
|
|
53
|
+
readonly totalResults: number;
|
|
54
|
+
readonly hasMore: boolean;
|
|
55
|
+
readonly query: PagedQuery;
|
|
56
|
+
readonly replacementContinuationToken: string;
|
|
57
|
+
/**
|
|
58
|
+
* If useTotalResults is true, then totalResults represents an accurate count.
|
|
59
|
+
*
|
|
60
|
+
* If False, it does not, and may be estimated/only the size of the current page.
|
|
61
|
+
*
|
|
62
|
+
* Either way, you should probably always only trust hasMore.
|
|
63
|
+
*
|
|
64
|
+
* This is a long-held historical throwback to when we used to do paging with known
|
|
65
|
+
* total results. Those queries toasted our database, and we were left to hastily
|
|
66
|
+
* alter our endpoints and create backward- compatible shims, of which
|
|
67
|
+
* useTotalResults is one.
|
|
68
|
+
*/
|
|
69
|
+
readonly useTotalResults: boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The list entry view for trending items. Returns just enough to show the item on
|
|
74
|
+
* the trending page.
|
|
75
|
+
*/
|
|
76
|
+
export interface TrendingEntry {
|
|
77
|
+
/** The weighted score of this trending item. */
|
|
78
|
+
readonly weight: number;
|
|
79
|
+
readonly isFeatured: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* We don't know whether the identifier will be a string, a uint, or a long... so
|
|
82
|
+
* we're going to cast it all to a string. But either way, we need any trending
|
|
83
|
+
* item created to have a single unique identifier for its type.
|
|
84
|
+
*/
|
|
85
|
+
readonly identifier: string;
|
|
86
|
+
/**
|
|
87
|
+
* An enum - unfortunately - dictating all of the possible kinds of trending items
|
|
88
|
+
* that you might get in your result set, in case you want to do custom rendering
|
|
89
|
+
* or call to get the details of the item.
|
|
90
|
+
*/
|
|
91
|
+
readonly entityType: TrendingEntryType;
|
|
92
|
+
/**
|
|
93
|
+
* The localized "display name/article title/'primary localized identifier'" of the
|
|
94
|
+
* entity.
|
|
95
|
+
*/
|
|
96
|
+
readonly displayName: string;
|
|
97
|
+
/**
|
|
98
|
+
* If the entity has a localized tagline/subtitle/motto/whatever, that is found
|
|
99
|
+
* here.
|
|
100
|
+
*/
|
|
101
|
+
readonly tagline: string;
|
|
102
|
+
readonly image: string;
|
|
103
|
+
readonly startDate?: string;
|
|
104
|
+
readonly endDate?: string;
|
|
105
|
+
readonly link: string;
|
|
106
|
+
/**
|
|
107
|
+
* If this is populated, the entry has a related WebM video to show. I am 100%
|
|
108
|
+
* certain I am going to regret putting this directly on TrendingEntry, but it will
|
|
109
|
+
* work so yolo
|
|
110
|
+
*/
|
|
111
|
+
readonly webmVideo: string;
|
|
112
|
+
/**
|
|
113
|
+
* If this is populated, the entry has a related MP4 video to show. I am 100%
|
|
114
|
+
* certain I am going to regret putting this directly on TrendingEntry, but it will
|
|
115
|
+
* work so yolo
|
|
116
|
+
*/
|
|
117
|
+
readonly mp4Video: string;
|
|
118
|
+
/**
|
|
119
|
+
* If isFeatured, this image will be populated with whatever the featured image is.
|
|
120
|
+
* Note that this will likely be a very large image, so don't use it all the time.
|
|
121
|
+
*/
|
|
122
|
+
readonly featureImage: string;
|
|
123
|
+
/**
|
|
124
|
+
* If the item is of entityType TrendingEntryType.Container, it may have items -
|
|
125
|
+
* also Trending Entries - contained within it. This is the ordered list of those
|
|
126
|
+
* to display under the Container's header.
|
|
127
|
+
*/
|
|
128
|
+
readonly items: TrendingEntry[];
|
|
129
|
+
/** If the entry has a date at which it was created, this is that date. */
|
|
130
|
+
readonly creationDate?: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface TrendingDetail {
|
|
134
|
+
readonly identifier: string;
|
|
135
|
+
readonly entityType: TrendingEntryType;
|
|
136
|
+
readonly news: TrendingEntryNews;
|
|
137
|
+
readonly support: TrendingEntrySupportArticle;
|
|
138
|
+
readonly destinyItem: TrendingEntryDestinyItem;
|
|
139
|
+
readonly destinyActivity: TrendingEntryDestinyActivity;
|
|
140
|
+
readonly destinyRitual: TrendingEntryDestinyRitual;
|
|
141
|
+
readonly creation: TrendingEntryCommunityCreation;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface TrendingEntryNews {
|
|
145
|
+
readonly article: ContentItemPublicContract;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface TrendingEntrySupportArticle {
|
|
149
|
+
readonly article: ContentItemPublicContract;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface TrendingEntryDestinyItem {
|
|
153
|
+
readonly itemHash: number;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface TrendingEntryDestinyActivity {
|
|
157
|
+
readonly activityHash: number;
|
|
158
|
+
readonly status: DestinyPublicActivityStatus;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface TrendingEntryDestinyRitual {
|
|
162
|
+
readonly image: string;
|
|
163
|
+
readonly icon: string;
|
|
164
|
+
readonly title: string;
|
|
165
|
+
readonly subtitle: string;
|
|
166
|
+
readonly dateStart?: string;
|
|
167
|
+
readonly dateEnd?: string;
|
|
168
|
+
/**
|
|
169
|
+
* A destiny event does not necessarily have a related Milestone, but if it does
|
|
170
|
+
* the details will be returned here.
|
|
171
|
+
*/
|
|
172
|
+
readonly milestoneDetails: DestinyPublicMilestone;
|
|
173
|
+
/**
|
|
174
|
+
* A destiny event will not necessarily have milestone "custom content", but if it
|
|
175
|
+
* does the details will be here.
|
|
176
|
+
*/
|
|
177
|
+
readonly eventContent: DestinyMilestoneContent;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export interface TrendingEntryCommunityCreation {
|
|
181
|
+
readonly media: string;
|
|
182
|
+
readonly title: string;
|
|
183
|
+
readonly author: string;
|
|
184
|
+
readonly authorMembershipId: string;
|
|
185
|
+
readonly postId: string;
|
|
186
|
+
readonly body: string;
|
|
187
|
+
readonly upvotes: number;
|
|
188
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
|
|
13
|
+
import { HttpClient, get, post } from '../http.js';
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
BungieCredentialType,
|
|
17
|
+
GeneralUser,
|
|
18
|
+
GetCredentialTypesForAccountResponse,
|
|
19
|
+
HardLinkedUserMembership,
|
|
20
|
+
UserMembershipData,
|
|
21
|
+
UserSearchPrefixRequest,
|
|
22
|
+
UserSearchResponse,
|
|
23
|
+
UserTheme
|
|
24
|
+
} from './interfaces.js';
|
|
25
|
+
import {
|
|
26
|
+
BungieMembershipType,
|
|
27
|
+
ServerResponse
|
|
28
|
+
} from '../common.js';
|
|
29
|
+
|
|
30
|
+
const API_BASE = "https://www.bungie.net/Platform/User/";
|
|
31
|
+
|
|
32
|
+
export interface GetBungieNetUserByIdParams {
|
|
33
|
+
/** The requested Bungie.net membership id. */
|
|
34
|
+
id: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Loads a bungienet user by membership id. */
|
|
38
|
+
export function getBungieNetUserById(http: HttpClient, params: GetBungieNetUserByIdParams): Promise<ServerResponse<GeneralUser>> {
|
|
39
|
+
return get(http, `${API_BASE}GetBungieNetUserById/${params.id}/`);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface GetSanitizedPlatformDisplayNamesParams {
|
|
43
|
+
/** The requested membership id to load. */
|
|
44
|
+
membershipId: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Gets a list of all display names linked to this membership id but sanitized (
|
|
49
|
+
* profanity filtered). Obeys all visibility rules of calling user and is heavily
|
|
50
|
+
* cached.
|
|
51
|
+
*/
|
|
52
|
+
export function getSanitizedPlatformDisplayNames(http: HttpClient, params: GetSanitizedPlatformDisplayNamesParams): Promise<ServerResponse<{ [key in BungieCredentialType]: string }>> {
|
|
53
|
+
return get(http, `${API_BASE}GetSanitizedPlatformDisplayNames/${params.membershipId}/`);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface GetCredentialTypesForTargetAccountParams {
|
|
57
|
+
/** The user's membership id */
|
|
58
|
+
membershipId: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Returns a list of credential types attached to the requested account */
|
|
62
|
+
export function getCredentialTypesForTargetAccount(http: HttpClient, params: GetCredentialTypesForTargetAccountParams): Promise<ServerResponse<GetCredentialTypesForAccountResponse[]>> {
|
|
63
|
+
return get(http, `${API_BASE}GetCredentialTypesForTargetAccount/${params.membershipId}/`);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** Returns a list of all available user themes. */
|
|
67
|
+
export function getAvailableThemes(http: HttpClient): Promise<ServerResponse<UserTheme[]>> {
|
|
68
|
+
return get(http, `${API_BASE}GetAvailableThemes/`);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface GetMembershipDataByIdParams {
|
|
72
|
+
/** The membership ID of the target user. */
|
|
73
|
+
membershipId: string;
|
|
74
|
+
/** Type of the supplied membership ID. */
|
|
75
|
+
membershipType: BungieMembershipType;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Returns a list of accounts associated with the supplied membership ID and
|
|
80
|
+
* membership type. This will include all linked accounts (even when hidden) if
|
|
81
|
+
* supplied credentials permit it.
|
|
82
|
+
*/
|
|
83
|
+
export function getMembershipDataById(http: HttpClient, params: GetMembershipDataByIdParams): Promise<ServerResponse<UserMembershipData>> {
|
|
84
|
+
return get(http, `${API_BASE}GetMembershipsById/${params.membershipId}/${params.membershipType}/`);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Returns a list of accounts associated with signed in user. This is useful for
|
|
89
|
+
* OAuth implementations that do not give you access to the token response.
|
|
90
|
+
*/
|
|
91
|
+
export function getMembershipDataForCurrentUser(http: HttpClient): Promise<ServerResponse<UserMembershipData>> {
|
|
92
|
+
return get(http, `${API_BASE}GetMembershipsForCurrentUser/`);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface GetMembershipFromHardLinkedCredentialParams {
|
|
96
|
+
/** The credential to look up. Must be a valid SteamID64. */
|
|
97
|
+
credential: string;
|
|
98
|
+
/** The credential type. 'SteamId' is the only valid value at present. */
|
|
99
|
+
crType: BungieCredentialType;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Gets any hard linked membership given a credential. Only works for credentials
|
|
104
|
+
* that are public (just SteamID64 right now). Cross Save aware.
|
|
105
|
+
*/
|
|
106
|
+
export function getMembershipFromHardLinkedCredential(http: HttpClient, params: GetMembershipFromHardLinkedCredentialParams): Promise<ServerResponse<HardLinkedUserMembership>> {
|
|
107
|
+
return get(http, `${API_BASE}GetMembershipFromHardLinkedCredential/${params.crType}/${params.credential}/`);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface SearchByGlobalNamePrefixParams {
|
|
111
|
+
/** The display name prefix you're looking for. */
|
|
112
|
+
displayNamePrefix: string;
|
|
113
|
+
/** The zero-based page of results you desire. */
|
|
114
|
+
page: number;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** [OBSOLETE] Do not use this to search users, use SearchByGlobalNamePost instead. */
|
|
118
|
+
export function searchByGlobalNamePrefix(http: HttpClient, params: SearchByGlobalNamePrefixParams): Promise<ServerResponse<UserSearchResponse>> {
|
|
119
|
+
return get(http, `${API_BASE}Search/Prefix/${params.displayNamePrefix}/${params.page}/`);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface SearchByGlobalNamePostParams {
|
|
123
|
+
/** The zero-based page of results you desire. */
|
|
124
|
+
page: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** Given the prefix of a global display name, returns all users who share that name. */
|
|
128
|
+
export function searchByGlobalNamePost(http: HttpClient, params: SearchByGlobalNamePostParams, body: UserSearchPrefixRequest): Promise<ServerResponse<UserSearchResponse>> {
|
|
129
|
+
return post(http, `${API_BASE}Search/GlobalName/${params.page}/`, body);
|
|
130
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
|
|
13
|
+
export * from '../common.js';
|
|
14
|
+
export * from '../platform.js';
|
|
15
|
+
export type {HttpClientConfig, HttpClient} from '../http.js';
|
|
16
|
+
export * from './api.js';
|
|
17
|
+
export * from './interfaces.js';
|