-
Notifications
You must be signed in to change notification settings - Fork 10
/
interfaces.ts
199 lines (185 loc) · 6.05 KB
/
interfaces.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
/**
* Bungie.Net API
* 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.
*
* OpenAPI spec version: 2.3.5
* Contact: support@bungie.com
*
* NOTE: This class is auto generated by the bungie-api-ts code generator program.
* https://github.com/DestinyItemManager/bugie-api-ts
* Do not edit these files manually.
*/
import {
ContentItemPublicContract
} from '../content/interfaces';
import {
DestinyMilestoneContent,
DestinyPublicActivityStatus,
DestinyPublicMilestone
} from '../destiny2/interfaces';
import {
PagedQuery
} from '../common';
import {
PartnershipType
} from '../platform';
/** The known entity types that you can have returned from Trending. */
export const enum TrendingEntryType {
News = 0,
DestinyItem = 1,
DestinyActivity = 2,
DestinyRitual = 3,
SupportArticle = 4,
Creation = 5,
Stream = 6,
Update = 7,
Link = 8,
ForumTag = 9,
Container = 10,
Release = 11
}
export interface TrendingCategories {
readonly categories: TrendingCategory[];
}
export interface TrendingCategory {
readonly categoryName: string;
readonly entries: SearchResultOfTrendingEntry;
readonly categoryId: string;
}
export interface SearchResultOfTrendingEntry {
readonly results: TrendingEntry[];
readonly totalResults: number;
readonly hasMore: boolean;
readonly query: PagedQuery;
readonly replacementContinuationToken: string;
/**
* If useTotalResults is true, then totalResults represents an accurate count.
*
* If False, it does not, and may be estimated/only the size of the current page.
*
* Either way, you should probably always only trust hasMore.
*
* This is a long-held historical throwback to when we used to do paging with known
* total results. Those queries toasted our database, and we were left to hastily
* alter our endpoints and create backward- compatible shims, of which
* useTotalResults is one.
*/
readonly useTotalResults: boolean;
}
/**
* The list entry view for trending items. Returns just enough to show the item on
* the trending page.
*/
export interface TrendingEntry {
/** The weighted score of this trending item. */
readonly weight: number;
readonly isFeatured: boolean;
/**
* We don't know whether the identifier will be a string, a uint, or a long... so
* we're going to cast it all to a string. But either way, we need any trending
* item created to have a single unique identifier for its type.
*/
readonly identifier: string;
/**
* An enum - unfortunately - dictating all of the possible kinds of trending items
* that you might get in your result set, in case you want to do custom rendering
* or call to get the details of the item.
*/
readonly entityType: TrendingEntryType;
/**
* The localized "display name/article title/'primary localized identifier'" of the
* entity.
*/
readonly displayName: string;
/**
* If the entity has a localized tagline/subtitle/motto/whatever, that is found
* here.
*/
readonly tagline: string;
readonly image: string;
readonly startDate?: string;
readonly endDate?: string;
readonly link: string;
/**
* If this is populated, the entry has a related WebM video to show. I am 100%
* certain I am going to regret putting this directly on TrendingEntry, but it will
* work so yolo
*/
readonly webmVideo: string;
/**
* If this is populated, the entry has a related MP4 video to show. I am 100%
* certain I am going to regret putting this directly on TrendingEntry, but it will
* work so yolo
*/
readonly mp4Video: string;
/**
* If isFeatured, this image will be populated with whatever the featured image is.
* Note that this will likely be a very large image, so don't use it all the time.
*/
readonly featureImage: string;
/**
* If the item is of entityType TrendingEntryType.Container, it may have items -
* also Trending Entries - contained within it. This is the ordered list of those
* to display under the Container's header.
*/
readonly items: TrendingEntry[];
/** If the entry has a date at which it was created, this is that date. */
readonly creationDate?: string;
}
export interface TrendingDetail {
readonly identifier: string;
readonly entityType: TrendingEntryType;
readonly news: TrendingEntryNews;
readonly support: TrendingEntrySupportArticle;
readonly destinyItem: TrendingEntryDestinyItem;
readonly destinyActivity: TrendingEntryDestinyActivity;
readonly destinyRitual: TrendingEntryDestinyRitual;
readonly creation: TrendingEntryCommunityCreation;
readonly stream: TrendingEntryCommunityStream;
}
export interface TrendingEntryNews {
readonly article: ContentItemPublicContract;
}
export interface TrendingEntrySupportArticle {
readonly article: ContentItemPublicContract;
}
export interface TrendingEntryDestinyItem {
readonly itemHash: number;
}
export interface TrendingEntryDestinyActivity {
readonly activityHash: number;
readonly status: DestinyPublicActivityStatus;
}
export interface TrendingEntryDestinyRitual {
readonly image: string;
readonly icon: string;
readonly title: string;
readonly subtitle: string;
readonly dateStart?: string;
readonly dateEnd?: string;
/**
* A destiny event does not necessarily have a related Milestone, but if it does
* the details will be returned here.
*/
readonly milestoneDetails: DestinyPublicMilestone;
/**
* A destiny event will not necessarily have milestone "custom content", but if it
* does the details will be here.
*/
readonly eventContent: DestinyMilestoneContent;
}
export interface TrendingEntryCommunityCreation {
readonly media: string;
readonly title: string;
readonly author: string;
readonly authorMembershipId: string;
readonly postId: string;
readonly body: string;
readonly upvotes: number;
}
export interface TrendingEntryCommunityStream {
readonly image: string;
readonly title: string;
readonly partnershipIdentifier: string;
readonly partnershipType: PartnershipType;
}