-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtypes.d.ts
More file actions
70 lines (65 loc) · 1.36 KB
/
types.d.ts
File metadata and controls
70 lines (65 loc) · 1.36 KB
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
declare;
{
var ENVIRONMENT: "production" | "development";
var STYTCH_PROJECT_ID: string;
var STYTCH_SECRET: string;
var STYTCH_API: string;
var STYTCH_URL: string;
var SUPABASE_URL: string;
var SUPABASE_KEY: string;
var GITHUB_TOKEN: string;
}
type Profile = {
id: number;
login: string;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: string;
received_events_url: string;
type: string;
site_admin: boolean;
name: string;
company: string;
blog: string;
location: string;
email: string;
hireable: boolean;
bio: string;
twitter_username: string;
public_repos: number;
public_gists: number;
followers: number;
following: number;
created_at: string;
updated_at: string;
};
type REPLFile = {
main: string;
content: string[];
};
interface AuthenticatedRequest extends Request {
session: Session<AuthSession>;
}
type AuthSession = {
id: string;
display: string;
avatar: string;
github_register: string;
};
type Session<T> = {
readonly id: string;
readonly expires_at?: number;
data: T;
commit(session: Session<T>, expires_at: number): Promise<string>;
verify(): Promise<boolean>;
};