-
Notifications
You must be signed in to change notification settings - Fork 10
/
interfaces.ts
122 lines (113 loc) · 3.68 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
/**
* 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 {
DateRange
} from '../common';
import {
UserInfoCard
} from '../user/interfaces';
export interface ApiUsage {
/** The date range for the data being reported. */
readonly range: DateRange;
/** Counts for on API calls made for the time range. */
readonly apiCalls: Series[];
/**
* Instances of blocked requests or requests that crossed the warn threshold during
* the time range.
*/
readonly throttledRequests: Series[];
}
export interface Series {
/** Collection of samples with time and value. */
readonly datapoints: Datapoint[];
/** Target to which to datapoints apply. */
readonly target: string;
}
export interface Datapoint {
/** Timestamp for the related count. */
readonly time: string;
/** Count associated with timestamp */
readonly count?: number;
}
export interface Application {
readonly applicationType: OAuthApplicationType;
/** Unique ID assigned to the application */
readonly applicationId: number;
/** Name of the application */
readonly name: string;
/** URL used to pass the user's authorization code to the application */
readonly redirectUrl: string;
/** Link to website for the application where a user can learn more about the app. */
readonly link: string;
/** Permissions the application needs to work */
readonly scope: string;
/** Value of the Origin header sent in requests generated by this application. */
readonly origin: string;
/** Current status of the application. */
readonly status: ApplicationStatus;
/** Date the application was first added to our database. */
readonly creationDate: string;
/** Date the application status last changed. */
readonly statusChanged: string;
/** Date the first time the application status entered the 'Public' status. */
readonly firstPublished: string;
/**
* List of team members who manage this application on Bungie.net. Will always
* consist of at least the application owner.
*/
readonly team: ApplicationDeveloper[];
}
export const enum OAuthApplicationType {
None = 0,
/**
* Indicates the application is server based and can keep its secrets from end
* users and other potential snoops.
*/
Confidential = 1,
/**
* Indicates the application runs in a public place, and it can't be trusted to
* keep a secret.
*/
Public = 2
}
export const enum ApplicationStatus {
/** No value assigned */
None = 0,
/**
* Application exists and works but will not appear in any public catalog. New
* applications start in this state, test applications will remain in this state.
*/
Private = 1,
/** Active applications that can appear in an catalog. */
Public = 2,
/**
* Application disabled by the owner. All authorizations will be treated as
* terminated while in this state. Owner can move back to private or public state.
*/
Disabled = 3,
/**
* Application has been blocked by Bungie. It cannot be transitioned out of this
* state by the owner. Authorizations are terminated when an application is in this
* state.
*/
Blocked = 4
}
export interface ApplicationDeveloper {
readonly role: DeveloperRole;
readonly apiEulaVersion: number;
readonly user: UserInfoCard;
}
export const enum DeveloperRole {
None = 0,
Owner = 1,
TeamMember = 2
}