@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,31 @@
|
|
|
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
|
+
CommunityContentSortMode,
|
|
15
|
+
ForumTopicsCategoryFiltersEnum,
|
|
16
|
+
PostSearchResponse,
|
|
17
|
+
} from '../forum/interfaces.js';
|
|
18
|
+
import { ServerResponse } from '../common.js';
|
|
19
|
+
export interface GetCommunityContentParams {
|
|
20
|
+
/** The type of media to get */
|
|
21
|
+
mediaFilter: ForumTopicsCategoryFiltersEnum;
|
|
22
|
+
/** Zero based page */
|
|
23
|
+
page: number;
|
|
24
|
+
/** The sort mode. */
|
|
25
|
+
sort: CommunityContentSortMode;
|
|
26
|
+
}
|
|
27
|
+
/** Returns community content. */
|
|
28
|
+
export declare function getCommunityContent(
|
|
29
|
+
http: HttpClient,
|
|
30
|
+
params: GetCommunityContentParams
|
|
31
|
+
): Promise<ServerResponse<PostSearchResponse>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
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';
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
ContentItemPublicContract,
|
|
15
|
+
ContentTypeDescription,
|
|
16
|
+
NewsArticleRssResponse,
|
|
17
|
+
SearchResultOfContentItemPublicContract,
|
|
18
|
+
} from './interfaces.js';
|
|
19
|
+
import { ServerResponse } from '../common.js';
|
|
20
|
+
export interface GetContentTypeParams {
|
|
21
|
+
type: string;
|
|
22
|
+
}
|
|
23
|
+
/** Gets an object describing a particular variant of content. */
|
|
24
|
+
export declare function getContentType(
|
|
25
|
+
http: HttpClient,
|
|
26
|
+
params: GetContentTypeParams
|
|
27
|
+
): Promise<ServerResponse<ContentTypeDescription>>;
|
|
28
|
+
export interface GetContentByIdParams {
|
|
29
|
+
/** false */
|
|
30
|
+
head?: boolean;
|
|
31
|
+
id: string;
|
|
32
|
+
locale: string;
|
|
33
|
+
}
|
|
34
|
+
/** Returns a content item referenced by id */
|
|
35
|
+
export declare function getContentById(
|
|
36
|
+
http: HttpClient,
|
|
37
|
+
params: GetContentByIdParams
|
|
38
|
+
): Promise<ServerResponse<ContentItemPublicContract>>;
|
|
39
|
+
export interface GetContentByTagAndTypeParams {
|
|
40
|
+
/** Not used. */
|
|
41
|
+
head?: boolean;
|
|
42
|
+
locale: string;
|
|
43
|
+
tag: string;
|
|
44
|
+
type: string;
|
|
45
|
+
}
|
|
46
|
+
/** Returns the newest item that matches a given tag and Content Type. */
|
|
47
|
+
export declare function getContentByTagAndType(
|
|
48
|
+
http: HttpClient,
|
|
49
|
+
params: GetContentByTagAndTypeParams
|
|
50
|
+
): Promise<ServerResponse<ContentItemPublicContract>>;
|
|
51
|
+
export interface SearchContentWithTextParams {
|
|
52
|
+
/** Content type tag: Help, News, etc. Supply multiple ctypes separated by space. */
|
|
53
|
+
ctype?: string;
|
|
54
|
+
/** Page number for the search results, starting with page 1. */
|
|
55
|
+
currentpage?: number;
|
|
56
|
+
/** Not used. */
|
|
57
|
+
head?: boolean;
|
|
58
|
+
locale: string;
|
|
59
|
+
/** Word or phrase for the search. */
|
|
60
|
+
searchtext?: string;
|
|
61
|
+
/** For analytics, hint at the part of the app that triggered the search. Optional. */
|
|
62
|
+
source?: string;
|
|
63
|
+
/** Tag used on the content to be searched. */
|
|
64
|
+
tag?: string;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Gets content based on querystring information passed in. Provides basic search
|
|
68
|
+
* and text search capabilities.
|
|
69
|
+
*/
|
|
70
|
+
export declare function searchContentWithText(
|
|
71
|
+
http: HttpClient,
|
|
72
|
+
params: SearchContentWithTextParams
|
|
73
|
+
): Promise<ServerResponse<SearchResultOfContentItemPublicContract>>;
|
|
74
|
+
export interface SearchContentByTagAndTypeParams {
|
|
75
|
+
/** Page number for the search results starting with page 1. */
|
|
76
|
+
currentpage?: number;
|
|
77
|
+
/** Not used. */
|
|
78
|
+
head?: boolean;
|
|
79
|
+
/** Not used. */
|
|
80
|
+
itemsperpage?: number;
|
|
81
|
+
locale: string;
|
|
82
|
+
tag: string;
|
|
83
|
+
type: string;
|
|
84
|
+
}
|
|
85
|
+
/** Searches for Content Items that match the given Tag and Content Type. */
|
|
86
|
+
export declare function searchContentByTagAndType(
|
|
87
|
+
http: HttpClient,
|
|
88
|
+
params: SearchContentByTagAndTypeParams
|
|
89
|
+
): Promise<ServerResponse<SearchResultOfContentItemPublicContract>>;
|
|
90
|
+
export interface SearchHelpArticlesParams {
|
|
91
|
+
searchtext: string;
|
|
92
|
+
size: string;
|
|
93
|
+
}
|
|
94
|
+
/** Search for Help Articles. */
|
|
95
|
+
export declare function searchHelpArticles(
|
|
96
|
+
http: HttpClient,
|
|
97
|
+
params: SearchHelpArticlesParams
|
|
98
|
+
): Promise<ServerResponse<object>>;
|
|
99
|
+
export interface RssNewsArticlesParams {
|
|
100
|
+
/** Optionally filter response to only include news items in a certain category. */
|
|
101
|
+
categoryfilter?: string;
|
|
102
|
+
/** Optionally include full content body for each news item. */
|
|
103
|
+
includebody?: boolean;
|
|
104
|
+
/** Zero-based pagination token for paging through result sets. */
|
|
105
|
+
pageToken: string;
|
|
106
|
+
}
|
|
107
|
+
/** Returns a JSON string response that is the RSS feed for news articles. */
|
|
108
|
+
export declare function rssNewsArticles(
|
|
109
|
+
http: HttpClient,
|
|
110
|
+
params: RssNewsArticlesParams
|
|
111
|
+
): Promise<ServerResponse<NewsArticleRssResponse>>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { get } from '../http.js';
|
|
2
|
+
const API_BASE = 'https://www.bungie.net/Platform/Content/';
|
|
3
|
+
export function getContentType(http, params) {
|
|
4
|
+
return get(http, `${API_BASE}GetContentType/${params.type}/`);
|
|
5
|
+
}
|
|
6
|
+
export function getContentById(http, params) {
|
|
7
|
+
const strParams = {};
|
|
8
|
+
if (params.head !== undefined) {
|
|
9
|
+
strParams.head = params.head.toString();
|
|
10
|
+
}
|
|
11
|
+
return get(http, `${API_BASE}GetContentById/${params.id}/${params.locale}/`, strParams);
|
|
12
|
+
}
|
|
13
|
+
export function getContentByTagAndType(http, params) {
|
|
14
|
+
const strParams = {};
|
|
15
|
+
if (params.head !== undefined) {
|
|
16
|
+
strParams.head = params.head.toString();
|
|
17
|
+
}
|
|
18
|
+
return get(
|
|
19
|
+
http,
|
|
20
|
+
`${API_BASE}GetContentByTagAndType/${params.tag}/${params.type}/${params.locale}/`,
|
|
21
|
+
strParams
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export function searchContentWithText(http, params) {
|
|
25
|
+
const strParams = {};
|
|
26
|
+
if (params.ctype !== undefined) {
|
|
27
|
+
strParams.ctype = params.ctype;
|
|
28
|
+
}
|
|
29
|
+
if (params.currentpage !== undefined) {
|
|
30
|
+
strParams.currentpage = params.currentpage.toString();
|
|
31
|
+
}
|
|
32
|
+
if (params.head !== undefined) {
|
|
33
|
+
strParams.head = params.head.toString();
|
|
34
|
+
}
|
|
35
|
+
if (params.searchtext !== undefined) {
|
|
36
|
+
strParams.searchtext = params.searchtext;
|
|
37
|
+
}
|
|
38
|
+
if (params.source !== undefined) {
|
|
39
|
+
strParams.source = params.source;
|
|
40
|
+
}
|
|
41
|
+
if (params.tag !== undefined) {
|
|
42
|
+
strParams.tag = params.tag;
|
|
43
|
+
}
|
|
44
|
+
return get(http, `${API_BASE}Search/${params.locale}/`, strParams);
|
|
45
|
+
}
|
|
46
|
+
export function searchContentByTagAndType(http, params) {
|
|
47
|
+
const strParams = {};
|
|
48
|
+
if (params.currentpage !== undefined) {
|
|
49
|
+
strParams.currentpage = params.currentpage.toString();
|
|
50
|
+
}
|
|
51
|
+
if (params.head !== undefined) {
|
|
52
|
+
strParams.head = params.head.toString();
|
|
53
|
+
}
|
|
54
|
+
if (params.itemsperpage !== undefined) {
|
|
55
|
+
strParams.itemsperpage = params.itemsperpage.toString();
|
|
56
|
+
}
|
|
57
|
+
return get(
|
|
58
|
+
http,
|
|
59
|
+
`${API_BASE}SearchContentByTagAndType/${params.tag}/${params.type}/${params.locale}/`,
|
|
60
|
+
strParams
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
export function searchHelpArticles(http, params) {
|
|
64
|
+
return get(http, `${API_BASE}SearchHelpArticles/${params.searchtext}/${params.size}/`);
|
|
65
|
+
}
|
|
66
|
+
export function rssNewsArticles(http, params) {
|
|
67
|
+
const strParams = {};
|
|
68
|
+
if (params.categoryfilter !== undefined) {
|
|
69
|
+
strParams.categoryfilter = params.categoryfilter;
|
|
70
|
+
}
|
|
71
|
+
if (params.includebody !== undefined) {
|
|
72
|
+
strParams.includebody = params.includebody.toString();
|
|
73
|
+
}
|
|
74
|
+
return get(http, `${API_BASE}Rss/NewsArticles/${params.pageToken}/`, strParams);
|
|
75
|
+
}
|
|
@@ -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,214 @@
|
|
|
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 { PagedQuery } from '../common.js';
|
|
14
|
+
export interface ContentTypeDescription {
|
|
15
|
+
readonly cType: string;
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly contentDescription: string;
|
|
18
|
+
readonly previewImage: string;
|
|
19
|
+
readonly priority: number;
|
|
20
|
+
readonly reminder: string;
|
|
21
|
+
readonly properties: ContentTypeProperty[];
|
|
22
|
+
readonly tagMetadata: TagMetadataDefinition[];
|
|
23
|
+
readonly tagMetadataItems: {
|
|
24
|
+
[key: string]: TagMetadataItem;
|
|
25
|
+
};
|
|
26
|
+
readonly usageExamples: string[];
|
|
27
|
+
readonly showInContentEditor: boolean;
|
|
28
|
+
readonly typeOf: string;
|
|
29
|
+
readonly bindIdentifierToProperty: string;
|
|
30
|
+
readonly boundRegex: string;
|
|
31
|
+
readonly forceIdentifierBinding: boolean;
|
|
32
|
+
readonly allowComments: boolean;
|
|
33
|
+
readonly autoEnglishPropertyFallback: boolean;
|
|
34
|
+
readonly bulkUploadable: boolean;
|
|
35
|
+
readonly previews: ContentPreview[];
|
|
36
|
+
readonly suppressCmsPath: boolean;
|
|
37
|
+
readonly propertySections: ContentTypePropertySection[];
|
|
38
|
+
}
|
|
39
|
+
export interface ContentTypeProperty {
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly rootPropertyName: string;
|
|
42
|
+
readonly readableName: string;
|
|
43
|
+
readonly value: string;
|
|
44
|
+
readonly propertyDescription: string;
|
|
45
|
+
readonly localizable: boolean;
|
|
46
|
+
readonly fallback: boolean;
|
|
47
|
+
readonly enabled: boolean;
|
|
48
|
+
readonly order: number;
|
|
49
|
+
readonly visible: boolean;
|
|
50
|
+
readonly isTitle: boolean;
|
|
51
|
+
readonly required: boolean;
|
|
52
|
+
readonly maxLength: number;
|
|
53
|
+
readonly maxByteLength: number;
|
|
54
|
+
readonly maxFileSize: number;
|
|
55
|
+
readonly regexp: string;
|
|
56
|
+
readonly validateAs: string;
|
|
57
|
+
readonly rssAttribute: string;
|
|
58
|
+
readonly visibleDependency: string;
|
|
59
|
+
readonly visibleOn: string;
|
|
60
|
+
readonly datatype: ContentPropertyDataTypeEnum;
|
|
61
|
+
readonly attributes: {
|
|
62
|
+
[key: string]: string;
|
|
63
|
+
};
|
|
64
|
+
readonly childProperties: ContentTypeProperty[];
|
|
65
|
+
readonly contentTypeAllowed: string;
|
|
66
|
+
readonly bindToProperty: string;
|
|
67
|
+
readonly boundRegex: string;
|
|
68
|
+
readonly representationSelection: {
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
};
|
|
71
|
+
readonly defaultValues: ContentTypeDefaultValue[];
|
|
72
|
+
readonly isExternalAllowed: boolean;
|
|
73
|
+
readonly propertySection: string;
|
|
74
|
+
readonly weight: number;
|
|
75
|
+
readonly entitytype: string;
|
|
76
|
+
readonly isCombo: boolean;
|
|
77
|
+
readonly suppressProperty: boolean;
|
|
78
|
+
readonly legalContentTypes: string[];
|
|
79
|
+
readonly representationValidationString: string;
|
|
80
|
+
readonly minWidth: number;
|
|
81
|
+
readonly maxWidth: number;
|
|
82
|
+
readonly minHeight: number;
|
|
83
|
+
readonly maxHeight: number;
|
|
84
|
+
readonly isVideo: boolean;
|
|
85
|
+
readonly isImage: boolean;
|
|
86
|
+
}
|
|
87
|
+
export declare const enum ContentPropertyDataTypeEnum {
|
|
88
|
+
None = 0,
|
|
89
|
+
Plaintext = 1,
|
|
90
|
+
Html = 2,
|
|
91
|
+
Dropdown = 3,
|
|
92
|
+
List = 4,
|
|
93
|
+
Json = 5,
|
|
94
|
+
Content = 6,
|
|
95
|
+
Representation = 7,
|
|
96
|
+
Set = 8,
|
|
97
|
+
File = 9,
|
|
98
|
+
FolderSet = 10,
|
|
99
|
+
Date = 11,
|
|
100
|
+
MultilinePlaintext = 12,
|
|
101
|
+
DestinyContent = 13,
|
|
102
|
+
Color = 14,
|
|
103
|
+
}
|
|
104
|
+
export interface ContentTypeDefaultValue {
|
|
105
|
+
readonly whenClause: string;
|
|
106
|
+
readonly whenValue: string;
|
|
107
|
+
readonly defaultValue: string;
|
|
108
|
+
}
|
|
109
|
+
export interface TagMetadataDefinition {
|
|
110
|
+
readonly description: string;
|
|
111
|
+
readonly order: number;
|
|
112
|
+
readonly items: TagMetadataItem[];
|
|
113
|
+
readonly datatype: string;
|
|
114
|
+
readonly name: string;
|
|
115
|
+
readonly isRequired: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface TagMetadataItem {
|
|
118
|
+
readonly description: string;
|
|
119
|
+
readonly tagText: string;
|
|
120
|
+
readonly groups: string[];
|
|
121
|
+
readonly isDefault: boolean;
|
|
122
|
+
readonly name: string;
|
|
123
|
+
}
|
|
124
|
+
export interface ContentPreview {
|
|
125
|
+
readonly name: string;
|
|
126
|
+
readonly path: string;
|
|
127
|
+
readonly itemInSet: boolean;
|
|
128
|
+
readonly setTag: string;
|
|
129
|
+
readonly setNesting: number;
|
|
130
|
+
readonly useSetId: number;
|
|
131
|
+
}
|
|
132
|
+
export interface ContentTypePropertySection {
|
|
133
|
+
readonly name: string;
|
|
134
|
+
readonly readableName: string;
|
|
135
|
+
readonly collapsed: boolean;
|
|
136
|
+
}
|
|
137
|
+
export interface ContentItemPublicContract {
|
|
138
|
+
readonly contentId: string;
|
|
139
|
+
readonly cType: string;
|
|
140
|
+
readonly cmsPath: string;
|
|
141
|
+
readonly creationDate: string;
|
|
142
|
+
readonly modifyDate: string;
|
|
143
|
+
readonly allowComments: boolean;
|
|
144
|
+
readonly hasAgeGate: boolean;
|
|
145
|
+
readonly minimumAge: number;
|
|
146
|
+
readonly ratingImagePath: string;
|
|
147
|
+
readonly author: GeneralUser;
|
|
148
|
+
readonly autoEnglishPropertyFallback: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Firehose content is really a collection of metadata and "properties", which are
|
|
151
|
+
* the potentially-but-not-strictly localizable data that comprises the meat of
|
|
152
|
+
* whatever content is being shown.
|
|
153
|
+
*
|
|
154
|
+
* As Cole Porter would have crooned, "Anything Goes" with Firehose properties.
|
|
155
|
+
* They are most often strings, but they can theoretically be anything. They are
|
|
156
|
+
* JSON encoded, and could be JSON structures, simple strings, numbers etc... The
|
|
157
|
+
* Content Type of the item (cType) will describe the properties, and thus how they
|
|
158
|
+
* ought to be deserialized.
|
|
159
|
+
*/
|
|
160
|
+
readonly properties: {
|
|
161
|
+
[key: string]: object;
|
|
162
|
+
};
|
|
163
|
+
readonly representations: ContentRepresentation[];
|
|
164
|
+
/** NOTE: Tags will always be lower case. */
|
|
165
|
+
readonly tags: string[];
|
|
166
|
+
readonly commentSummary: CommentSummary;
|
|
167
|
+
}
|
|
168
|
+
export interface ContentRepresentation {
|
|
169
|
+
readonly name: string;
|
|
170
|
+
readonly path: string;
|
|
171
|
+
readonly validationString: string;
|
|
172
|
+
}
|
|
173
|
+
export interface CommentSummary {
|
|
174
|
+
readonly topicId: string;
|
|
175
|
+
readonly commentCount: number;
|
|
176
|
+
}
|
|
177
|
+
export interface SearchResultOfContentItemPublicContract {
|
|
178
|
+
readonly results: ContentItemPublicContract[];
|
|
179
|
+
readonly totalResults: number;
|
|
180
|
+
readonly hasMore: boolean;
|
|
181
|
+
readonly query: PagedQuery;
|
|
182
|
+
readonly replacementContinuationToken: string;
|
|
183
|
+
/**
|
|
184
|
+
* If useTotalResults is true, then totalResults represents an accurate count.
|
|
185
|
+
*
|
|
186
|
+
* If False, it does not, and may be estimated/only the size of the current page.
|
|
187
|
+
*
|
|
188
|
+
* Either way, you should probably always only trust hasMore.
|
|
189
|
+
*
|
|
190
|
+
* This is a long-held historical throwback to when we used to do paging with known
|
|
191
|
+
* total results. Those queries toasted our database, and we were left to hastily
|
|
192
|
+
* alter our endpoints and create backward- compatible shims, of which
|
|
193
|
+
* useTotalResults is one.
|
|
194
|
+
*/
|
|
195
|
+
readonly useTotalResults: boolean;
|
|
196
|
+
}
|
|
197
|
+
export interface NewsArticleRssResponse {
|
|
198
|
+
readonly CurrentPaginationToken: number;
|
|
199
|
+
readonly NextPaginationToken?: number;
|
|
200
|
+
readonly ResultCountThisPage: number;
|
|
201
|
+
readonly NewsArticles: NewsArticleRssItem[];
|
|
202
|
+
readonly CategoryFilter: string;
|
|
203
|
+
readonly PagerAction: string;
|
|
204
|
+
}
|
|
205
|
+
export interface NewsArticleRssItem {
|
|
206
|
+
readonly Title: string;
|
|
207
|
+
readonly Link: string;
|
|
208
|
+
readonly PubDate: string;
|
|
209
|
+
readonly UniqueIdentifier: string;
|
|
210
|
+
readonly Description: string;
|
|
211
|
+
readonly HtmlContent: string;
|
|
212
|
+
readonly ImagePath: string;
|
|
213
|
+
readonly OptionalMobileImagePath: string;
|
|
214
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export var ContentPropertyDataTypeEnum = {
|
|
2
|
+
None: 0,
|
|
3
|
+
Plaintext: 1,
|
|
4
|
+
Html: 2,
|
|
5
|
+
Dropdown: 3,
|
|
6
|
+
List: 4,
|
|
7
|
+
Json: 5,
|
|
8
|
+
Content: 6,
|
|
9
|
+
Representation: 7,
|
|
10
|
+
Set: 8,
|
|
11
|
+
File: 9,
|
|
12
|
+
FolderSet: 10,
|
|
13
|
+
Date: 11,
|
|
14
|
+
MultilinePlaintext: 12,
|
|
15
|
+
DestinyContent: 13,
|
|
16
|
+
Color: 14,
|
|
17
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { CoreSettingsConfiguration, CoreSystem, GlobalAlert } from './interfaces.js';
|
|
14
|
+
import { ServerResponse } from '../common.js';
|
|
15
|
+
/** List of available localization cultures */
|
|
16
|
+
export declare function getAvailableLocales(http: HttpClient): Promise<
|
|
17
|
+
ServerResponse<{
|
|
18
|
+
[key: string]: string;
|
|
19
|
+
}>
|
|
20
|
+
>;
|
|
21
|
+
/** Get the common settings used by the Bungie.Net environment. */
|
|
22
|
+
export declare function getCommonSettings(
|
|
23
|
+
http: HttpClient
|
|
24
|
+
): Promise<ServerResponse<CoreSettingsConfiguration>>;
|
|
25
|
+
/**
|
|
26
|
+
* Get the user-specific system overrides that should be respected alongside common
|
|
27
|
+
* systems.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getUserSystemOverrides(http: HttpClient): Promise<
|
|
30
|
+
ServerResponse<{
|
|
31
|
+
[key: string]: CoreSystem;
|
|
32
|
+
}>
|
|
33
|
+
>;
|
|
34
|
+
export interface GetGlobalAlertsParams {
|
|
35
|
+
/** Determines whether Streaming Alerts are included in results */
|
|
36
|
+
includestreaming?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Gets any active global alert for display in the forum banners, help pages, etc.
|
|
40
|
+
* Usually used for DOC alerts.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getGlobalAlerts(
|
|
43
|
+
http: HttpClient,
|
|
44
|
+
params: GetGlobalAlertsParams
|
|
45
|
+
): Promise<ServerResponse<GlobalAlert[]>>;
|
package/lib/core/api.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { get } from '../http.js';
|
|
2
|
+
const API_BASE = 'https://www.bungie.net/Platform/';
|
|
3
|
+
export function getAvailableLocales(http) {
|
|
4
|
+
return get(http, `${API_BASE}GetAvailableLocales/`);
|
|
5
|
+
}
|
|
6
|
+
export function getCommonSettings(http) {
|
|
7
|
+
return get(http, `${API_BASE}Settings/`);
|
|
8
|
+
}
|
|
9
|
+
export function getUserSystemOverrides(http) {
|
|
10
|
+
return get(http, `${API_BASE}UserSystemOverrides/`);
|
|
11
|
+
}
|
|
12
|
+
export function getGlobalAlerts(http, params) {
|
|
13
|
+
const strParams = {};
|
|
14
|
+
if (params.includestreaming !== undefined) {
|
|
15
|
+
strParams.includestreaming = params.includestreaming.toString();
|
|
16
|
+
}
|
|
17
|
+
return get(http, `${API_BASE}GlobalAlerts/`, strParams);
|
|
18
|
+
}
|
|
@@ -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';
|