-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtyping.d.ts
141 lines (136 loc) · 2.77 KB
/
typing.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
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
interface Board {
columns: Map<TypedColumn, Column>;
}
type TypedColumn = "todo" | "inprogress" | "done";
interface Column {
id: TypedColumn;
todos: Todo[];
}
interface Todo {
$id: string;
$createdAt: string;
title: string;
status: TypedColumn;
image?: Image;
}
interface Image{
bucketId: string;
fileId: string;
}
interface User {
$id: string;
$createdAt: string;
$updatedAt: string;
name: string;
registration: string;
status: boolean;
passwordUpdate: string;
email: string;
phone: string;
emailVerification: boolean;
phoneVerification: boolean;
prefs: Record<string, any>; // Replace 'any' with the actual type if known
session?: Session<Session, any>;
}
interface Session {
/**
* Session ID.
*/
$id: string;
/**
* Session creation date in ISO 8601 format.
*/
$createdAt: string;
/**
* User ID.
*/
userId: string;
/**
* Session expiration date in ISO 8601 format.
*/
expire: string;
/**
* Session Provider.
*/
provider: string;
/**
* Session Provider User ID.
*/
providerUid: string;
/**
* Session Provider Access Token.
*/
providerAccessToken: string;
/**
* The date of when the access token expires in ISO 8601 format.
*/
providerAccessTokenExpiry: string;
/**
* Session Provider Refresh Token.
*/
providerRefreshToken: string;
/**
* IP in use when the session was created.
*/
ip: string;
/**
* Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
*/
osCode: string;
/**
* Operating system name.
*/
osName: string;
/**
* Operating system version.
*/
osVersion: string;
/**
* Client type.
*/
clientType: string;
/**
* Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).
*/
clientCode: string;
/**
* Client name.
*/
clientName: string;
/**
* Client version.
*/
clientVersion: string;
/**
* Client engine name.
*/
clientEngine: string;
/**
* Client engine name.
*/
clientEngineVersion: string;
/**
* Device name.
*/
deviceName: string;
/**
* Device brand name.
*/
deviceBrand: string;
/**
* Device model name.
*/
deviceModel: string;
/**
* Country two-character ISO 3166-1 alpha code.
*/
countryCode: string;
/**
* Country name.
*/
countryName: string;
/**
* Returns true if this the current user session.
*/
current: boolean;
};