forked from TheBastionBot/Bastion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
115 lines (105 loc) · 3.28 KB
/
types.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
/*!
* @author TRACTION (iamtraction)
* @copyright 2022
*/
import { tesseract } from "@bastion/tesseract/typings/types.js";
export namespace bastion {
export interface Settings extends tesseract.Settings {
musicActivity?: boolean;
relayDirectMessages?: boolean | string;
port?: number;
auth?: string;
coinMarketCapApiKey?: string;
nasaApiKey?: string;
openWeatherMapApiKey?: string;
tmdbApiKey?: string;
trackerNetworkApiKey?: string;
twitch?: {
clientId?: string;
clientSecret?: string;
accessToken?: string;
};
ubisoft?: {
email?: string;
password?: string;
};
wordnikApiKey?: string;
bastion?: {
webhookId?: string;
webhookToken?: string;
};
patreon?: {
accessToken?: string;
};
}
}
export namespace patreon {
export interface UserSocialConnections {
readonly discord: {
readonly user_id: string;
};
}
export interface EntityAttributes {
readonly currently_entitled_amount_cents: number;
readonly full_name: string;
readonly is_follower: boolean;
readonly last_charge_date: string | null;
readonly last_charge_status: "Paid" | "Declined" | "Deleted" | "Pending" | "Refunded" | "Fraud" | "Other" | null;
readonly lifetime_support_cents: number;
readonly patron_status: "active_patron" | "declined_patron" | "former_patron" | null;
readonly pledge_relationship_start: string | null;
readonly will_pay_amount_cents: number;
readonly image_url: string;
readonly social_connections: UserSocialConnections;
}
export interface EntityRelationshipData {
readonly id: string;
readonly type: string;
}
export interface EntityRelationship {
readonly data: EntityRelationshipData;
}
export interface EntityRelationships {
readonly creator: EntityRelationship;
readonly patron: EntityRelationship;
readonly user: EntityRelationship;
}
export interface PatreonEntity {
readonly attributes: EntityAttributes;
readonly id: string;
readonly relationships: EntityRelationships;
readonly type: string;
}
export interface PatreonResponse {
readonly data: PatreonEntity[];
readonly included: PatreonEntity[];
readonly links: {
readonly prev: string;
readonly next: string;
};
readonly meta: {
readonly pagination: {
readonly total: number;
};
};
}
export interface Patron extends EntityAttributes {
discord_id?: UserSocialConnections["discord"]["user_id"];
discord_tag?: string;
discord_avatar?: string;
}
}
export interface TwitchStream {
readonly game_id: string;
readonly id: string;
readonly language: string;
readonly pagination: string;
readonly started_at: string;
readonly tag_ids: string;
readonly thumbnail_url: string;
readonly title: string;
readonly type: "live" | "";
readonly user_id: string;
readonly user_name: string;
readonly viewer_count: number;
}