-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathapp.d.ts
47 lines (43 loc) · 837 Bytes
/
app.d.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
// See: https://kit.svelte.dev/docs/types#app
// import { Result} from "neverthrow";
declare namespace App {
interface Locals {
user?: User;
}
// interface PageData { }
// interface Error {}
// interface Platform {}
}
interface User {
id?: string;
email: string;
password?: string;
token?: string;
[key: string]: any;
}
type AuthResponse = Result<User>;
interface AuthAdapter {
login(props: {
email: string;
password: string;
// TEMPORARY
opts?: any;
}): Promise<AuthResponse>;
signup(props: {
email: string;
password: string;
password_confirm: string;
// TEMPORARY
opts?: any;
}): Promise<AuthResponse>;
validate_session(props: {
token: string;
// TEMPORARY
opts?: any;
}): Promise<AuthResponse>;
logout(props: {
token: string;
// TEMPORARY
opts?: any;
}): Promise<Result<void>>;
}